hi, yes, i did as described here http://groups.google.com/group/python_inside_maya/browse_thread/thread/1b0eae1c73c93042/ebbf7af9b00a26e4?hl=de&q=#ebbf7af9b00a26e4 but couls figure out th emissing argument... I only need worldspace scale from marix, maybe there is an easyer way after all? Thanks, katrin
-------- Original-Nachricht -------- > Datum: Sat, 22 Jan 2011 12:08:16 +0100 > Von: Jan Berger <[email protected]> > An: [email protected] > Betreff: Re: [Maya-Python] Re: object matrix > > Have you tried using > MScriptUtil.<http://download.autodesk.com/us/maya/2010help/API/class_m_script_util.html#891ecce0036c4ca210c39b27b1ead805>asDouble3Ptr > ? > > > From the docs: > Utility class for working with pointers and references. > > Utility class for working with pointers to basic types such as int, > float and arrays of these types. Class is more applicable for script > programming rather than C++. C++ pointers and references have no > equivalent in script so this class provides utility methods for > working with these type of parameters and return values. > > References are treated as pointers in script. This class allows > creating data and then acquiring a pointer to the data so that > information can be passed to class methods requiring references. > > Common scenarios: > > * A reference to an integer is required for a parameter: create > the > <http://download.autodesk.com/us/maya/2010help/API/class_m_script_util.html>MScriptUtil > object with the integer create() method, acquire a pointer using > <http://download.autodesk.com/us/maya/2010help/API/class_m_script_util.html#d9ea6a06354c1e489730649a2d9bf1ed>asIntPtr(), > pass that pointer to the method requiring the reference, create > another > <http://download.autodesk.com/us/maya/2010help/API/class_m_script_util.html>MScriptUtil > object using the int pointer that was returned, query the integer > return value using > <http://download.autodesk.com/us/maya/2010help/API/class_m_script_util.html#e42e1236dd42fccf9f98516deebcbe24>asInt(). > * A pointer to a list of floats are required for a parameter: > create the > <http://download.autodesk.com/us/maya/2010help/API/class_m_script_util.html>MScriptUtil > object with createFromList(), call asFloatPointer() and pass that to > the method. > * Several static methods are available for converting python > lists to matrices and integer/float arrays. > > This class is cumbersome to use but it provides a way of building > parameters and accessing return values for methods which would > normally not be scriptable. > > > > At 05:44 AM 1/22/2011, you wrote: > >hi, > >i would love to get the worldspace scales but can get the getScale > >arguments right. What did you use? > >I end up with > > > >tMatrix.getScale(ptr, om.MSpace.kWorld) > ># Error: line 1: in method 'MTransformationMatrix_getScale', argument > >2 of type 'double [3]' > ># Traceback (most recent call last): > ># File "<maya console>", line 1, in <module> > ># TypeError: in method 'MTransformationMatrix_getScale', argument 2 of > >type 'double [3]' # > > > >Best Regards, > >katrin > >-- > >NEU: FreePhone - kostenlos mobil telefonieren und > >surfen! > >Jetzt informieren: http://www.gmx.net/de/go/freephone > > > >-- > >http://groups.google.com/group/python_inside_maya > > Jan Berger > [email protected] :: www.janberger.de > > -- > http://groups.google.com/group/python_inside_maya -- GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit gratis Handy-Flat! http://portal.gmx.net/de/go/dsl -- http://groups.google.com/group/python_inside_maya
