Hey Marcus, Thanks for the reply, the thing is my script already works using UI but I wanted to do something without it just creating a node and storing the parents in them as MFnEnumAttributes and then when attribute is changed the matrix info is tapped into the locator. The problem is I dont know where to start.
D. On Friday, January 10, 2014 7:28:57 AM UTC+1, Marcus Ottosson wrote: > > Not in front of Maya at the moment, but if you're having trouble doing > this via maya.cmds or OpenMaya you could instead use an intermediate node > to store your matrix. Any node with a matrix attribute would do, such as > addMatrix or decomposeMatrix. > > To store it, simply connect it to the intermediate node and read its value > (this is important, otherwise Maya may not take the time to actually write > any values). Then you can disconnect. > > To read it back, simply connect your intermediate node to the target (and > make sure it reads. either by being visible in the viewport, or via the > cmds.getAttr() command), then you can disconnect and remove the old node. > > That way, you could potentially store your history of transfers with the > scene itself, without any extra hassle. > > > On Wednesday, 8 January 2014 14:31:46 UTC, Dilen Shah wrote: >> >> Hey guys, >> >> Need some help with something, I have written a script with UI for parent >> switching, but I wanted to know if its possible to create a node that takes >> in values and stores the matrix values of the child and once the parent >> attribute is changed, its applies the matrix values to the child. >> >> D. >> > -- 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/f8068b4d-fab8-4cd3-8c04-67be6d9e1ad1%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
