(TRICK) To re-enable skp file preview
-
@driven said:
@geomp said:
What's the best solution for Mac?
check out Jeff's earlier post, GraphicConvertor.app is still the best solution I'm aware of...
john
As a new Mac convert, I was frustrated by the lack of QuickLook thumbnails for SketchUp files, and worse, on my Mac QuickLook tried to treat the file as text, taking a long time and then displaying a huge amount of useless hexadecimal data. So I decided to see if there was a simple solution. Here's what I came up with.
First of all, although SketchUp saves a PNG format thumbnail inside each file (containing the last view you had open), and has Ruby API calls to generate thumbnails, these images are only 128 pixels wide. For a model of even modest complexity, this makes the image so distorted and blurry that it is useless. So, the first requirement was to create a better image for the file. To do this, I wrote the little Ruby plugin attached. It creates an observer that causes SketchUp to save a jpeg image of the current view each time you save a file. I set the image to 800x600 at a moderate level of compression to make it big and clear enough to see but not gigantic in size. You can easily edit the Ruby if you want a different size. The image has the same base name as the SketchUp file but with extension ".pv.jpg". There is a delay to export the image as you save a file; depending on the complexity of the model you might or might not notice.
Second, I wrote a little QuickLook generator, also attached, that looks for the image to go with a SketchUp file and tells the system to use it as a thumbnail. SketchUp does not (at this time) register its own UTI for its files, so OS X creates a dynamic UTI for them. I put the dynamic UTIs for skp and skb files in the info.plist for this generator. I am led to believe that these should be the same on all Macs, so hopefully they will work for everyone. With this generator, the thumbnail image is displayed for any file that has one and the SketchUp icon for files that do not.
To implement my system, copy the Ruby plugin into your plugins directory (~/Library/Application Support/Google SketchUp 8/SketchUp/Plugins) and copy the QuickLook generator into ~/Library/QuickLook. Note: by default the Finder hides your Library folder, but you can get there using the Go->Go To Folder menu in Finder. Also, you may need to restart the QuickLook system by rebooting or, if you are bolder, running qlmanage -r in a terminal window.
Despite the name of the generator, it actually creates a thumbnail, not a preview. After working on this it struck me that given a well-detailed thumbnail, there was really no need for a preview. If you want to go beyond the thumbnail, you can just open the file in SketchUp.
As I mentioned, I am new to Mac, so I don't know all the ins and outs of making this portable. I compiled the generator on a MacBook Pro under Mountain Lion, and I am not sure whether it will work on a non-Intel Mac or on an older version of the OS, as I have access to neither. If it won't run on your system, PM me and I'll be happy to send you the source code.
Steve
creates a jpeg image of the current view when you save a file
-
Great!
Now we have work-arounds for everyone (and it's up to Trimble to raise their product).
You can get nice transparent previews (as in this video) if you temporarily disable ground and sky
and set the option:transparent => true
.
-
@slbaumgartner said:
It creates an observer that causes SketchUp to save a jpeg image of the current view each time you save a file.
You'll probably get some grief about using the ~/User/Library/ path, but I use both without issue, you just need to be careful that all supporting files/folders are in the same Folder for other plugins.
however, I had to run from console the first time, for some reason, now it just works it.@unknownuser said:
Second, I wrote a little QuickLook generator, also attached,
Steve
nice works well, but I'm also on ML...I'll have a play and see if there are any issues, other than moving the .skp without the .pv.jpg, maybe a support folder with the plugin?
cheers
john -
@driven said:
@slbaumgartner said:
It creates an observer that causes SketchUp to save a jpeg image of the current view each time you save a file.
You'll probably get some grief about using the ~/User/Library/ path, but I use both without issue, you just need to be careful that all supporting files/folders are in the same Folder for other plugins.
however, I had to run from console the first time, for some reason, now it just works it.@unknownuser said:
Second, I wrote a little QuickLook generator, also attached,
Steve
nice works well, but I'm also on ML...I'll have a play and see if there are any issues, other than moving the .skp without the .pv.jpg, maybe a support folder with the plugin?
cheers
johnHello,
I have a habit of putting things into ~/Library born of times when I shared a system with others and I didn't want my tweakings to mess up theirs. Other than that, there is no reason you can't put these files into the /Library folders instead.
You may have needed the console action to get the system to notice the generator. Other than qlmanage -r, I don't know what events cause it to check for new QuickLook generators.
If you move the skp without the .pv.jpg you will lose the thumbnail and get a Trimble logo instead (nothing I did, it just happens) until you copy the image too or save the file again. Not sure I understand what you mean about the support folder - create some separate, fixed place where all the thumbnail images go instead of the same folder as the skp?
Steve
-
@slbaumgartner said:
Not sure I understand what you mean about the support folder - create some separate, fixed place where all the thumbnail images go instead of the same folder as the skp?
Steve
yes, could even be a dot files so it's hidden, point the QL generator at that... now I think of it some of my other QL have support folders with them, so you could install both at same time and place. completely separate from the ruby and the .skp
john -
@driven said:
@slbaumgartner said:
Not sure I understand what you mean about the support folder - create some separate, fixed place where all the thumbnail images go instead of the same folder as the skp?
Steve
yes, could even be a dot files so it's hidden, point the QL generator at that... now I think of it some of my other QL have support folders with them, so you could install both at same time and place. completely separate from the ruby and the .skp
johnI get it now. I'll look into this. It will require revision of both the ruby and the QL plugin so that they look at the same folder, which will have to be in a well-known location so that it doesn't depend on how someone installed the generator (esp ~/Library vs /Library). Maybe a hidden folder in your home directory?
Thanks
Steve -
~/.QL_SU/*.pv.png would be my first choice, that's probably best, no permision issues if I want to add titles etc... to the image or even add the image as the file icon with applescript.
john -
@driven said:
~/.QL_SU/*.pv.png would be my first choice, that's probably best, no permision issues if I want to add titles etc... to the image or even add the image as the file icon with applescript.
johnOf course, there is a tradeoff: if the thumbnails are placed there, you can forget to delete one when you delete the associated skp file, causing abandoned thumbnails to accumulate in a hidden place that Finder doesn't normally show you.
I'm trying this out. The Ruby part was easy, but I confess that the Objective-C part is forcing me to learn more about the Cocoa framework suite than I expected. It may take me a while
Steve
-
@driven said:
~/.QL_SU/*.pv.png would be my first choice, that's probably best, no permision issues if I want to add titles etc... to the image or even add the image as the file icon with applescript.
johnOK, try the attached instead of the previous versions. I used ~/.QL_SketchUp just to be more explicit. Using these, your skp files can be scattered anywhere and the QuickLook should still work. Just remember. per my previous post, to delete the thumbnail if you delete the skp!
Steve
-
@aerilius said:
Great!
Now we have work-arounds for everyone (and it's up to Trimble to raise their product).
You can get nice transparent previews (as in this video) if you temporarily disable ground and sky
and set the option:transparent => true
.Hi,
AERILIUS,how and where do i have to place the "UnityPreviews"to get the results showed in the video?
I am on macbook pro.
Thanks. -
Guys,
I have the same problem. I haven't the preview of sketchup files. Do you find the definitive solution? My computer: Win 7 - 64bits - SU8. I don´t want install mysticthumbs. Plese help me. Thank you. -
I have Sketchup Pro Mac osx and I have not preview of the files, all the files look the same and drive me crazy, can someone explain If exist any walk around? Thanks.
-
If anyone is using adobe software (I suspect many of you are) it is possible to see previews of .skp files in Adobe BRIDGE.
-
@whiterabbit said:
If anyone is using adobe software (I suspect many of you are) it is possible to see previews of .skp files in Adobe BRIDGE.
CS6 Bridge. And you can just drag and drop from Bridge into SU 2013 or 2014.
-
Hi,
On my Mac, only icons in the Bridge are displayed. I am a beginner with the Mac. Do I need to adjust anything?
-
Havent read through all the posts, but one solution to see previews is to run Sketchup, go to : File -> Import. Change "type of file" to .skp and preview all your files by selecting your file in that window.
-
Now here is a curious thing... in my mail client- Thunderbird- if I browse to attach an image to an email, voila! all my skps are displayed as thumbs!
How does that work?BTW Marko, thanks for the inadvertant tip, I hadn't realized that one could import a model that way. I usually open a new instance of SU and copy/paste from there.
-
Sorry to reveal it, but actually there is no magic about the thumbnails. One does not "need" SketchUp or other special software to generate thumbnails, but every file saved by SketchUp already includes a ready-made thumbnail.
The only obstacle for displaying the thumbnail is that you have to know at which position in the binary skp the thumbnail starts. Windows Explorer and many other programs don't know the position, and doesn't search for the thumbnail.
Software that shows thumbnails either has a compiled list for how to get the thumbnail for specific filetypes (Mystic Thumbs) or maybe seeks through the file to detect if there is somewhere an image that it could display.For Explorer32bit SketchUp ships already an extension that tells Explorer at what position an skp file contains a thumbnail. I have no idea what holds SketchUp back from doing this for Explorer64bit, I doubt it requires porting the full SketchUp and its 3d engine to 64bit.
-
CaniViz have just released a new version of their CaniVIZ 3D_Preview which allows mac users to see previews direct in the Finder ! The software is not cheap but... when you have thousands of files it can be worth it.
Otherwise I discovered that Clawmenu can also read the previews on skup files on Mac. It is free on the Mac Appstore.
Best to all -
@thomthom said:
@borgman said:
I have tried the Seperate command with Windows 7, but alas, it doesn't work. Has anyone come up with a solution for this rather annoying problem already?
Nope. They changed something between the Beta and the RC so explorer.exe always spawn the 64bit version.%Systemroot%\SysWOW64\explorer.exe /separate /e, {20D04FE0-3AEA-1069-A2D8-08002B30309D}
should do the trick under W7 x64.
Norbert
Advertisement