Hi friends!
I wrote a small script in the past which could copy/paste the position of a spline-knot. Nothing special. BUT i want to improve the script that makes it possible to copy paste a position of any object/subobject in 3Ds Max.
The
question i have: Is it possible to grab/set transformation values independet from the current selection type?
For example for knots of splines you have to do it with:
setKnotPoint ...
and for standard objects you can use
object.position
and i would like to avoid a lot of if-loops to get/set transformation values for every type - maybe there is a "global" way to do this?!
THX!
Replies
To avoid if-loops try with "case of" statement:
( case subobjectlevel of ( 1: (vertPos = for v in (polyop.getVertSelection selection[1]) collect (polyop.getVert selection[1] v)) 2: ( edgeList = polyop.getEdgeSelection selection[1] edgeVerts = polyop.getVertsUsingEdge selection[1] edgeList vertPos = for v in edgeVerts collect (polyop.getVert selection[1] v) ) 4: ( faceList = polyop.getFaceSelection selection[1] faceVerts = polyop.getVertsUsingFace selection[1] faceList vertPos = for v in faceVerts collect (polyop.getVert selection[1] v) ) ) )damn. just thought maybe there is a controler which sits on top of the selection - independ of its type - and allows access to the transformation