Hi everyone,
I'm currently facing some challenges while writing a custom Noise node in Maya. Here's what I'm aiming to achieve:
I want to create a custom noise node that sits between an animCurve connection and a transform attribute (e.g., tx). This node should take the animCurve output, perform some noise algorithms, and then output it back to the transform attribute (e.g., tx). I've managed to write the node to a certain extent, and everything seems to work as expected.
However, I'm encountering an issue. I want animators to still be able to set/move/rotate values on the attribute and see attribute keyframes in their timeline. I've tried using om.MPxNode.isPassiveOutput, and it seems to "unlock" my attribute successfully. Now, I can move/rotate my object around while the noise is connected. However, the values don't pass through to my animCurve node. If I move the timeline or perform any action, the values reset.
I'm unsure if my approach is correct, or if I'm missing something. Could you please share your thoughts and ideas on this matter?
-I've managed to achieve something similar with the pairBlend node, but I ran into this issue and I'm exploring alternative ways to achieve it without pairBlend. I've attached a picture of my pairBlend workaround for reference:
Regards, Matin F
Hi Marcus! Thanks for your reply!
Unfortunately, writing a manipulator is not an option for me as I want animators to still be able to use Maya's native manipulator. However, I did take a look at your implementation of a custom gizmo/manipulator in the Ragdoll and well... it's genius!
For those who come across this post in the future: I ended up using a custom MPxTransform for my auto-rig controllers, and MPxTransformationMatrix did the trick for adding my noise to the node's matrix itself (I can't add an offset group for controllers for a lot of reasons). Regards, Matin F
For those who come across this post in the future: I ended up using a custom MPxTransform for my auto-rig controllers
Please no! :O Defcon 2!
This will come back to bite you, I can guarantee it. Everything in Maya is built around the vanilla MPxTransform, especially constraints. Any change or alteration - especially with regards to how it is evaluated - can and will break native things your animators take for granted. Parent constraints will have subtle differences or be non-deterministic. Orient constraints will struggle to resolve rotation when X and Z are locked. Commands like Match Transforms will fail. Tons and tons of subtle assumptions both Autodesk and everyone else (including Ragdoll) have made will no longer be true. You are effectively writing your own Maya inside of Maya, replacing the most fundamental building block upon which everything is built.
To provide some anecdata, I only know of 1 studio that does this for their rigs, and have spent countless hours - internally and externally - trying to work around it. But even they are unable to use Maya’s native constraints, and are forced to now carry on writing their own Maya inside of Maya with their own point and orient constraints. Where does it end?
So, for those who do come across this post in the future, please please do not implement your own MPxTransform. 😅
as I want animators to still be able to use Maya’s native manipulator
About this, not to forget that custom manipulators are equally native as the Translate, Rotate and Scale manipulators. On your keyboard right now, you have W, E and R and next to it the T key. That’s the one that activates your manipulator. If you inherit from the example I provided, it will look and act just like Maya’s manipulator.
You can try a few, by selecting e.g. the Bend deformer and pressing T. Or making a Spot Light and pressing T. Those are custom, and equally native. It is a truly underappreciated and underused aspect of Maya, that is much much preferable to making your own MPxTransform (even though that’s a low bar 😊)
EDIT: Before posting this, I re-read what you said and noticed you said “auto-rig controllers”. If you mean nodes only used during use of your auto-rigger, and not in the actual final animation rig, then this is probably fine and damage will have been contained. But it also sounds like you expect animators to interact with your controller, in which case no no no no.
--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/bfa4380c-13f5-471c-9f07-a6ba50fe7a0fn%40googlegroups.com.