In the real plugin, I do declare Author Name, Plug Version, etc. The
point of my example was to remove all that code (which Maya allows- it gets
initialized to default values) to make it clear to myself, and others, what
the problem is. Hence I cut out the normal try/except error stuff as well-
You may benefit from at least testing out the setDependentsDirty call.
Typed attributes are a bit more complex than standard base type attributes
and Maya may handle them differently - I have no direct experience using
them in compute. Unlike compute, setDependentsDirty is called every time an
If you have nothing connected the compute method is triggered by either a
UI ( think attribute editor or any other connectControl/attributeControl
element), when it is selected or visible: I rarely use setDependsDirty: my
node use basic relationship and attributeAffects is enough for me.
I
first In your plugin declaration with the kDoubleArray output I would
rather correct those lines( things can be done in a lot of different ways,
this is how i do it ):
def initializePlugin(mobject):
fnPlugin = omMPx.MFnPlugin(mobject)
fnPlugin.registerNode(nodeType, nodeId,
So basically I've got a python node called *simpleLocator* with an
attribute called *pointCount *(type *kInt*) which is used to generate some
random points. These points can be passed out as an array with the
attribute *outPoints *(type *kDoubleArray *for this example). I've setup *
You don't need connect another node to pull the data from the plug and
trigger compute. It sounds like you are on the right track with the query
in draw. You can either use a real attribute, or create a dummy that is
used solely for the purpose of triggering compute. You then need to make
sure
You are right Judah, the other node is not mandatory: it was just a
personal preference: separating data processing( noise point ) from drawing
( the locator ).If you duplicate your locator you dont need to compute
several time your point list( when you need the same point list of course
). In