Python Questions

Python Questions

Anonymous
Not applicable
1,035 Views
2 Replies
Message 1 of 3

Python Questions

Anonymous
Not applicable

Hi,
I'm trying to use python for scripting 3ds max. I'm a Maxscript user from long time and Python's developer (Blender) but I have some problems to migrate my work. So, I have many questions :

  • How access to the "Real-World Map Size" parameter for objects (like Box)?
  • How can I set the gizmo's positon for uvwmap modifier (try this link but i have this error "untimeError: NULL wrapped value dereferencing")?
  • How access to uTile, vTile... for bitampTexture? And "use Real-World Scale"?
  • How access to parameters from a node get by "MaxPlus.SelectionManager"?

I know there is many differents questions but if someone could answer just one, it would help me for better undertstand python in 3d smax... 

Thanks in advance!!!

 

0 Likes
Accepted solutions (1)
1,036 Views
2 Replies
Replies (2)
Message 2 of 3

drew_avis
Autodesk
Autodesk
Accepted solution

Hi there, here is an example of using pymxs (as opposed to MaxPlus) to access the gizmo for a UVWMap modifier.  

from pymxs import runtime as rt

myTeapot = rt.teapot()
rt.convertTo(myTeapot, rt.editable_poly)
myMod = rt.UVWMap()
rt.addModifier(myTeapot, myMod)
rt.redrawViews() # needed to make the gizmo available
myMod.gizmo.position = rt.Point3(20,20,20)
print myMod.gizmo.position

I hope that helps,

Drew



Drew Avis
Content Experience Designer
Message 3 of 3

Anonymous
Not applicable

Thanks.
Pymxs seems to be very usefull to mix the both codes (maxscript and python), but it's not really simple due to confusion between variables... With "myTeapot = rt.teapot()", myTeapot is a maxscript node but can't be used as python MaxPlus.INode...

0 Likes