MPxTransform 2003-11-25 - By m. park
Back Well, me neither! This is a workaround for the fact that maya doesn't duplicate well some attibutes on derived MPxTransform. In a normal implementation, everything sould be well duplicated in the base class. But it's not! The only function called on duplication I found (perhaps there are some others, but I didn't see them yet) is copyInternalData. If I override this function and still call the base class function, I can fix the lacks (and bugs) of the base class. Moreover, attibutes like rotate pivot and rotate order are still maya attributes, so I don't see any reason why I could not modify it through the public methods of MFnDependencyNode, or through script using MGlobal::executeCommand (I know this is not nice, but it should work).
Bryan, did you already try to write a derived class of the MPxTransform? Thank you. Mark
--- Bryan Ewert <maya@(protected)> wrote: > ? from Mon, 24 Nov 2003 07:51:49 -0800 (PST) > > > yes, I have the same problem. I noticed it was not copying other attributes > > like the rotate order. > > > I would say that you could fix that if you override the method : > > > void MPxNode:: copyInternalData ( MPxNode *node ) > > > which is called on duplication. > > I don't understand why you should have to do this, or how it would help. I > would expect the base class to copy its own internal data, particularly if > you did _not_ override this method with a custom implementation. > Furthermore, attributes such as the rotate pivot and rotate order are the > jurisdiction of the base class, not the derived class(es). > > Secondly, how would one copy internal data from the base class? Internal > data is, well, internal, and typically implemented as private data members. > Objects derived from MPxNode have no access to - nor knowledge of - the > implementation of the base class's internal data. So how are they supposed > to copy it? > > -- > Bryan Ewert ? maya@(protected) ? http://www.ewertb.com ? > > -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- > List-help: <mailto:listar@(protected)?Subject=help> > List-archive: <http://www.highend3d.com/maya/devarchive/> >
__ ____ ____ ____ ____ ____ ______ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- List-help: <mailto:listar@(protected)?Subject=help> List-archive: <http://www.highend3d.com/maya/devarchive/>
|
|