On Tue, Mar 13, 2018, 3:37 PM justin hidair <[email protected]> wrote:

>
>
> every now and then when changing , disconnecting , connecting an attribute
> , MPxNode::setDependentsDirty() is called( easily observable)  ,
> if there's no connected output no compute is called() . However ,
>
>  1) What happens if a user change two different attributes at the same
> time ? ( e.g. move two transforms dag nodes ) ,
> do Maya automatically order the thing and it seems to happen "at the same
> time " or does it open a black hole ?
>
>  2) How would I change two *different*  attributes on a node with its
> output connected , without calling compute() two times ?
>

I don't write Maya plugins so take my reply with a grain of salt. I just
thought to engage on a high level.
Are these questions maybe trying to reach beyond the expected concern of
the Maya Mpxnode plugin architecture? Does it actually matter how Maya
handles the effect of a user simultaneously changing multiple attributes?
If the stated goal of an mpxnode is to not look at any external state and
only handle the data blocks you are given, shouldn't that result in correct
behavior? At one point in time you might handle the state of one attribute
change, followed by another compute when the second attribute changes. But
maybe in some other circumstance Maya may end up being able to concatenate
the changes before triggering computes. If you adhere to only evaluating
your local data then you are always correct in either circumstance. The
trade off, as you are fully aware, would be potentially more computes in a
smaller time frame than you would want.
So that being said, maybe other experienced plugin writers have some tricks
to offer, to try and buffer the compute operations. But to me it just seems
like the intent is to stick to the bounds of the plugin interface and
compute when you are called.


> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/1d3df591-1fd9-401e-a8a8-f604ab55cf04%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/1d3df591-1fd9-401e-a8a8-f604ab55cf04%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2_0v0AOzq6zmno-t0--mpzyZvOY6x7S5eHEeore5T3dw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to