Texture filename beginning with sits:

Hello,

On a model, I have SUTextureGetFileName that returned “sits:blinn1SG.png”.

What does sits: means? Please someone could explain this?

Thanks,
Manuel

That’s not something SketchUp adds. I’m surprised a colon has managed to sneak itself into a filename field though…

Thanks Thomas! I This is the first time I have come across this case! It reassures me. SUTextureSetFileName should not check too much the providen filename.

What was the actual full texture path ?

Are you running in a virtualized environment ?

Hello Dan,
I have no idea, this is a customer file and I don’t know anything of its working context.
Manuel

If you open the file in SketchUp the Ruby API will return the full path. See:

Sketchup::Texture#filename


Also are you aware of bugs in older version of the SDK ?

https://github.com/SketchUp/api-issue-tracker/issues/429

Do you have a way to dump all the material textures of a file in ruby, so I can check right now.
I don’t remember the name of the materials and there is a lot in this model.
I have no access to the computer with the c++ code.
Thanks.

model = Sketchup.active_model
matls = model.materials
matls.each do |matl|
  puts "Material name: #{matl.name}"
  if matl.texture
    puts "  Texture path: #{matl.texture.filename}"
  else
    puts "  Untextured"
  end
end

Note that “native” materials distributed by SketchUp do not show the path, just the filename.

Thanks!
The filename is the following:

Material name: sits_blinn1SG1
Material path: C:\Users\Lena\AppData\Local\Temp\3de42E2D5C6\sits:blinn1SG.png

It is not a valid filename. I guess that Sketchup should refuse it.

What SketchUp version was it made with ?

According to the file it should be 18.0.16975

Aside: I should have had the above snippet use the caption “Texture Path:” (fixed.)

It certainly is weird. Because it is from the User’s local Temp folder, I would think that this was a result of a GUI command rather than the user browsing to an image file and manually selecting it.

It might have been a texture that came in attached to a component’s material that was inserted into the model. The filename almost looks like something from Linux. (Ie, the 4 character device name.)

SketchUp should not store invalid path strings in any of it’s properties for any of it’s objects.

We have filed complaints about this in the recently.