it was crashing in 2012, but worked in 2013 it was about twice as fast :) thanks!
time for xform, poly: 0:00:04.453000 time for xform, surface: 0:00:04.552000 time for setAttr, poly: 0:00:02.619000 time for setAttr, surface: 0:00:02.718000 time for API, poly: 0:00:01.235000 time for API, surface: 0:00:01.138000 time for API2, surface: 0:00:00.607000 On Thu, Apr 11, 2013 at 9:50 PM, vux <[email protected]> wrote: > Simple example: > > fnTransform = api2.MFnTransform() > sl = api2.MSelectionList() > objects = 'pCube1', 'pSphere1' > translationVector = api2.MVector(1,0,0) > > for i in range( len(objects) ): > sl.add( objects[i] ) > dagPath = sl.getDagPath(i) > fnTransform.setObject( dagPath ) > fnTransform.setTranslation( translationVector, api.MSpace.kWorld ) > > -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
