Hi there,
I have been playing a little bit with the MPxTransform / MPxTransformMatrix. My idea it was to create a transform node with some Pre-transforms attributes, like pre transform, pre rotation, or a pre matrix.
So you can use the pre rotation in the same way you use the jointOrient attribute in joints, the preTranslate would be an offset, usseful to zero out your node (kind of change the pivot) and my idea for the preMatrix was to been able to connect an external worldMatrix and follow his transformation.
But so far, I have found some problems and I don't know how to solve them, I have been taking a look to the rockingTransform example, but it also has the same result, the transformation applied it only affects to the hierarchy and worldMatrix (as i expected) but it doesn't 'transform' the local rotation axis.
Anyone has any experience with custom transforms?
Thanks!
I am not sure what you mean.
When you want to change the transformation behaviour, you got to do that in the ::asMatrix() method.
So, you got to transfer the input attribute values to the ::asMatrix, integrate the values in the final output matrix and give it Maya in the return value. Then this value is multiplied with the parent matrix of the transform node.
When you add the values in the rotation part of the output matrix, you definitely change the local rotation data.
Hi!
What I mean is that maya doesn't modify the manipulator in order to fit to the new transform's matrix. When you change the jointOrient attribute into a joint, it 'transform' also the manipulator, so you can work inside the local space of your node.
What i don't know if that is cause the manipulator, or if there is something into the MPxTransform class that allow you to 'refresh' the manipulator with the resulting transformation.
thanks!
What i don't know if that is cause the manipulator, or if there is something into the MPxTransform class that allow you to 'refresh' the manipulator with the resulting transformation.
The default Maya transform manipulators do their work only on corresponding transform attributes.
If you want a manipulator that also includes your own transform attributes, you have to write a custom manipulator for that.
Yep, that makes sense.
Thanks for your help!.
It has been a really long time since the last message, but by any chance did you ever figure out how to get the manipulator to play nice with your internal transform? I’m currently making a transform node that solves many pairblend issues by integrating constraint values internally and I wanted to solve the initial transform issue while I was at it (to make a very complete solution).