| Item | Quantity | Price |
|---|
| Your cart is empty. Check out our collection of 3d models! |
Prices in:
Clear Cart
Edit:
Is your "dynamic field" a subclass of MPxFieldNode? Your inputData and outputForce attributes suggest that it is.
sorry i badly explained myself (don't have the code with me right now
)
I'm actually not writing a field but an MPxNode that can be connected to a field
so on my node I have the attributes :
output attr : fieldData (containing pos,vel,mass and deltatime)
input attr : inputForce (vectorArray)
these two attributes are connected to the inputData and outputForce attribute of the field.
my node also has a position output that I connect to locators.
My problem is, i have set a
attributeAffects(inputForce,outputPositions);
and when I get pulled on the compute() method for the outputPositions,
I query the value of the inputForce attribute, and I suppose that for the field
to send me the correct data it needs to pull on its inputData (so my fieldData) attribute.
But that does not happen ...
and I did check the clean status of the inputForce plug and it is always dirty, my guess is
the field doesn't get a clean on its inputData attribute so it cannot set the outputForce to clean,
but since I'm not called for the fieldData, I cannot set it to clean ...
sorry i know it's a bit confusing, I'll try and post some code tonight if I need to make it clearer.
Thanx !!
Your output attibute contains three elements. Is it a compound attribute?
Your latest reply raises as many questions as your original post. For example I'm still not sure if you by "field" you mean an subclass of MPxFieldNode. And now you mention a locator. Are we now talking about three nodes or just two? Perhaps you should post class declarations, initialize and compute methods of both nodes.
yes it's a compound attribute
ok to clarify things a bit here it's how my connections are made,
the plugin am writing is "myNode" :
Unfortunately I can't. Perhaps someone else can.
Hi !
How did you do that finally?
I have the same problem
zap ( 4years after...)
I'm writing a node plugin that connects to dynamic field in maya
using two attributes :
(node) fieldData -> inputData (field)
(node) inputForce <- outputForce (field)
my node will then output a series of translate/rotate
to move a locator in the 3d world
I did set dependencies on the outputs to the inputForce attribute
so that when the node is being pulled for the output , it should pull
on the inputForce to the field node and the field node should in return
pull on the fieldData of my node to get the points position ...
problem is ... I do never get a compute() call on the fieldData plug ...
Has anyone encountered something like that or did write a node
that was connecting to a field ??
Thanks!!