When I set texture projection mode for my texture:
SetProjectionMode(TextureProjectionMode.MappingChannel, ChangeContexts.Ignore);
SetMappingChannel(1, ChangeContexts.Ignore);
The result looks like if it was set to TextureProjectionMode.EnvironmentMap
And this one results in the correct mappingChannel mode
SetProjectionMode(TextureProjectionMode.View, ChangeContexts.Ignore);
Am I doing something wrong? (Or the enums are maybe mixed?)
import scriptcontext as sc
import Rhino as r
for rt in sc.doc.RenderTextures:
rt.SetProjectionMode(r.Render.TextureProjectionMode.MappingChannel, r.Render.RenderContent.ChangeContexts.Program)
rt.SetMappingChannel(1, r.Render.RenderContent.ChangeContexts.Program)
print "done"
The texture in the 3dm file gets properly its projection mode set.
I was ill after that (shortness of breath and all that), so I haven’t looked yet. I mean, I briefly looked at it, but haven’t figured out yet what the cause is.
I just committed the fix - it will be in 6.25. You will be able to get the first RC build of this next Wednesday, and the final release should be early May.