I'm trying to write an MPxLocatorNode which uses an MVectorArray
attribute to hold some data that it needs to use while drawing the
shape of the locator, I mean the shape of the locator depends on to
the data inside this attribute...

My problem is the draw method doesn't have access to dataBlock which
is only valid through compute method, so I need to figure out some way
to access the MVectorArray without using the dataBlock, for simple
variables like float, int, MDistance etc. I can use the MPlug derived
from thisMObject like:

thisNode = self.thisMObject()
plug = OpenMaya.MPlug( thisNode, self.aTPos ) # aTPos is the attribute
someFloat = plug.asFloat()
someInt = plug.asInt()
someDistance = plug.asMDistance()

etc...

but I can't get an MVectorArray this way...

I tried to store the data in a class variable in compute, because it
doesn't run the compute() as it tries to draw it, it didn't work...

So, any idea ???

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/python_inside_maya
-~----------~----~----~----~------~----~------~--~---

Reply via email to