I’d like to get/set the world relative coordinates of an
entity, even if it’s in a hierarchy.
I’m linking the translation of two bones in
Hypershade, but that data is an offset from the
respective parents instead of absolute position.
I’m new to Maya so I might be missing something
trivial. I’ve been reading the help/web for quite
a while now and only found MEL and SDK solutions
for this kind of conversion.
That should query the world-space transform value of the node.
Edit: Wait, what do you mean “only found MEL and SDK solutions”… surely a MEL solution is what you want? Or do you want to do this in Python? Not sure what you mean.
zoltan - there is also a matrix mult node (createNode pointMatrixMult) in there - so you can multiply together the parent inverse matrix of the node with the world matrix of whatever, do a decompose on the resulting matrix and voila - local coords.
I’m sorry but I still have no idea what to do. I’d really
appreciate a screenshot which shows a setup which
does the same/similar thing as the linked image.
The pointMatrixMult has only one matrix input so
I used multMatrix but linking the result back to the
target node caused syntax errors for the matrix
inputs. Also, I don’t really see where I could add
simple math expressions like on the image.
my bad - for some reason I thought pointMatrixMult could also mult two matrices together. I thought there was a node that multiplied matrices together…
[QUOTE=macaronikazoo;10188]my bad - for some reason I thought pointMatrixMult could also mult two matrices together. I thought there was a node that multiplied matrices together…
I guess you could write an expression to do it.[/QUOTE]
I am not sure what you want in the end. You could use parent constraint to get world coordinates as well, that´s the easiest. Parent constraint a locator to your bone and the locator´s matrix is the world matrix of your bone. Or you could use worldMatrix and parentInverseMatrix together to get your final world space matrix (I don´t remember exact attributes, I dont have maya right now).
Or are you trying to find relative transform value of one to another tranform?
As I wrote earlier I did manage to get the world relative
transforms but I couldn’t do anything with them because the
target bone expected parent relative data. I’m sure something
could be done with further math but I ran out of time.