Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update
Failed saving image on plugin directory. (solved)
-
Is there a way to save image inside the folder in plugin directory specified in code?
I can save in folder outside plugin directory but not sure what folder dir is compatible with MAC and WIN. Only way is to call File.dirname(FILE)...any ideas?
@@path = File.dirname(__FILE__) # this plugin's folder @@export_files = File.join(@@path, '/ExportFiles/') if params['antialias'].to_s == "true" @anti = true else @anti = false end if params['transparent'].to_s == "true" @trans = true else @trans = false end keys = { ;filename => "#{@@export_files}write_image.#{params['sel_type'].to_s}", ;width => params['getwidth'].to_i, ;height => params['getheight'].to_i, ;antialias => @anti, ;compression => 0.9, ;transparent => @trans } model = Sketchup.active_model view = model.active_view view.write_image keys -
Interesting... When I use UI.savepanel and find that folder on plugin directory I can see the images but with a lock icon on the corner. If I browse that folder normally I don't see anything inside.
-
Hi,
Doing some research I found this post by TIG and it was pretty much what I was looking for.
http://sketchucation.com/forums/viewtopic.php?p=281017#p281017
Thanks!
Advertisement