[Closed] Python 3dsmax 2015, modify object properties issues
Hello world,
I want to set some nodes non-renderable in 3dsmax 2015 using Python/MaxPlus.
I have the following code.
# nodes is a correct INodeTab value
for n in nodes:
n.SetRenderable(False)
# or
MaxPlus.INode.SetNodeAttribute(nodes,MaxPlus.Constants.AttribRenderable, 0)
None of those two functions work, none is throwing any error at execution. It just does nothing.
What am I missing ?
This is a known bug since maxplus 1.0 …
Instead use:
MaxPlus.Core.EvalMAXScript(“$.renderable = false”)
Yeah… sad thing.
The thing I’m lacking the most is also the fact I can’t provide any value except strings (e.g. a node, a material) to those mxs call.
As a result, in this example, to avoid the usage of the ‘$’ keyword (which would have implied that I change my selection in the calling function), I’m using INode.GetHandle method and put the result it into my mxs cmd (with maxscript getNodeByHandle function).
The lines begin to be long, but it works