Failure to save file error
-
hi, you have a typo in
writable?
it should not have [ e ] after [ t ]...
but it's better to use...File.writable_real?(path)
but best is to open it and see if a file is in there, as I mentioned in the other thread...
%x(open -R "#{path}" )
if the File is in there, open it directly with your preferred editor, edit and save to the same place with the same name...
go back to SU and see if it updates...
It did with 'Preview' for me, and after doing that, both SU and Preview let me edit Materials...
I also reset the SU editor Preferences, i.e. changed to another one then restart changed back, then restart...
maybe not required but it works now...to check it first you can use...
plist = (ENV["XPC_SERVICE_NAME"]).split('.')[0..-2].join('.') editor = %x(defaults read #{@plist} Preferences | grep "Image Editor" )
mine returns...
"Image Editor" = "/Applications/Preview.app";
john
-
thanks john!
a little closer.first i fixed the typo, and re-entered the info and for both options (the one i posted, as well as the preferred method you included) and received a value of true for both.
then i verified which editor SU is seeing and the value returned preview when i had it set to preview and photoshop when i set it to photoshop.
now the bad news, i still receive the failure to save popup window.
this only occurs with textures not included with default sketchup make.
i use podium, i download something from their warehouse and cannot edit it, used to be able to (SU8), but not now (SU2015). i read in the other thread that downloaded textures/materials are flagged. not sure how to identify that or whether it even be relevant to this issue.lastly, i can open the folder but the texture i want to edit is of course not in there because i am unable to even open the texture in the external editor in the first place, hence the error.
i restarted, rebooted, did a dance and everything... cursed a little maybe too.
i don't get it and i don't know enough about programming to try other things. thanks for you help. if you have any other ideas, i'm all ears.
andrew
-
I'll dig up some code to remove the flags...
I have a Ruby Console version somewhere...
In the meantime, try downloading one of the SCF texture sets and see if you can edit those...
This will demonstrate if it's the 'downloaded' flag or not...
it may be Podium has locked the file???
john
-
ok. stupid qustion first,
SCF texture set? what is that.
i know... duh.i have a similar thread going on podiums forum and i presented the flagged content comment. we'll see what they say.
-
SketchUcation > Shop > Textures > Normal...
-
@atrodler said:
...SCF texture set? what is that.
Sketchup Community Forum aka. SketchUcation i.e. this forum...
has user downloads in the store that include some texture sets...
like here... http://sketchucation.com/shop/texturesI only just noticed these are only free for premium members...
john -
this 'should' remove the flag from skm files...
path = UI.openpanel("Select a .skm file in any folder or Cancel" ) if File.exist?(path.to_s) dir = File.dirname(path) files = '' files << %x( mdfind -onlyin "#{dir}" 'kMDItemDisplayName == "*.skm" ') files.split("\n").each{|file| %x(xattr -d com.apple.quarantine "#{file}")} else # File.exist? puts 'cancled in no file?' end # File.exist?
-
yeah TIG i should've known that.
john, some have samples. i'll download, install, an see what happens. -
okay, i'll try the latest. while you were doing that i discovered the following:
i've done this for SU8 with no problem, downloaded a few freebies, dropped them in the materials folder, and i was off and running. however, i do not have a materials folder in the SU2015 directory (Macintosh HD).
so where in the world is SU2015 pulling the default materials (skm files) from?
I looked in the (user) directory and i have a materials folder in there but nothing in it. i ran a search for skm files (both directories) and the only thing that turned up were the SFC samples i just downloaded. (excluding SU8 directory)
i have no idea where to place them to continue on with our initial experiment.
just to see, i place the downloaded freebies in the old SU8 materials folder but they do not show up when i open SU2015, and look in the respective materials menu. didn't expect them to be... but just to be sure.
this is whacked IMHO... thoroughly.
do i need to uninstall an reinstall SU2015? should i dump the SU8 folders?
update
input the info provided, a folder opens asking me to select skm files.
since i cannot find any of which to add the SCF samples, results still pending there.
as for the podium stuff. i download components just like from the SU warehouse, the texture is already in the component. when i click on the texture, whether on the model itself, or via the materials window, i cannot edit (current issue), so, results still pending there as well. -
success with the downloaded skm files. followed suit and created appropriate folders, opened SU, applied new material, clicked to edit, editor opened!
So, yes, i can edit downloaded SCF files.
-
@atrodler said:
so where in the world is SU2015 pulling the default materials (skm files) from? :?: :!: :?: :knockout:
Default Materials are now completely separate from User materials, as they should be...
save a material and SU will make the folder in your User/Lib [ beside Plugins]...
or you can make your own in there...
Do NOT use any of the 'Default' names as two with the same name causes other issues...
e.g. User/.../Materials/my_Bricks/Brick_1.skm
the Podium ones appear to be 'Colors' not 'Textures' so I can't edit any I downloaded...
john
edit, I missed out "NOT"...oops
-
i went to the podium browser and started importing items:
brought in the table set barbarrosa, i can edit both materials that come with it.
brought in the morella bench, good to gp.
brought in eagle roofing tile, cannot edit... failure to save file
brought in acer negundo, can edit leaf02, cannot edit leaf01 or bark.
brought in lucepian sky light fixture, can edit aluminum, other two n/a (i think because they are basic colors)then i tried items from the SU warehouse:
brought in a random chair, can edit one of the four materials. the one i could edit was a wood texture, the uneditable items were, a color n/a, and two images.
brought in a train station, colors n/a, 2 textures- good, 2 google earth images - good, image of station- used as a texture- cannot edit.random results to say the least.
-
are the ones you CAN edit shown using this?
model = Sketchup.active_model.materials.each do |mat| if mat.texture p mat.name end end
tip: if you switch model, use the UP arrow to re-use the same code on the next one...
john
-
i guess so,
this one i can edit and is one of the downloaded SCF skm filesmodel = Sketchup.active_model.materials.each do |mat|
if mat.texture
p mat.name
end
end
"suc-paving-054"
#Sketchup::Materials:0x007ff7d9d66e28this one was a material in a component from Podium, and i cannot edit it.
model = Sketchup.active_model.materials.each do |mat|
if mat.texture
p mat.name
end
end
"PDM_Wood_planks_01"
#Sketchup::Materials:0x007ff7dc9f8d38 -
the following is from one of the podium guys:
*One possible reason is that texture names in SU often have the full path of the file of the machine on which the texture was created in the texture name. If the file name, including the full path is too long, you can't do much with the files.
If this happens, there is a trick you can use.
Use the export script function (Generate) and open the renamed texture in your editor, alter it, and you can load it into SU. You should then be able to edit in in SU.*
the generate function is for exporting scenes to batch render later. all materials regardless of name goes into the folder of your choosing. from that point i can open, edit, save, rename, and then bring back into SU. it works fine and is not too tedious of a work around. from there, any edits can be performed from within SU as usual.
i can live with that. if you discover more, great but if not thats ok too. thanks all for your help and patience. -
glad you have an option, though I would question why they would distribute textures with hardcoded paths...
trawling back into memory, the test could have been...
model = Sketchup.active_model.materials.each do |mat| if mat.texture p mat.texture.filename end end
at least that will show the culprit...
john
-
@atrodler said:
Did you ever find a fix for this? I've been going through the same thing, following your (and some others) threads here and on reddit. Extremely frustrating bug. I'm getting the exact same results as you. Currently having to export textures in .dae format anytime I need to edit one. Then re-import, resize, replace, purge old, etc etc etc.
Advertisement