XM Magdalena 3D print, GGeorgy (3D)
LC #42 Pipers Alley

View Full Version : Problem with a mel command to parent a shapeNode to a node.

07-03-2007, 02:33 AM
This is the mel : parent -r -s nodeShape node;
For example : i have a cube and a sphere . I want a sphere will be selected when i select a cube shape. So that i use the mel . But when i execute it , the shape of the cube automatic snap to the sphere. That is not my will ! I want to keep the cube shape maintain its position. So if anybody have the answer . Please help ! thx !

Robert Bateman
07-03-2007, 03:02 PM
simple answer is that it just wont work. If you are parenting the shape node to another a transform, then it's current positional information gets lost because the transform will no longer exist. Parent the shapes transform instead, then freeze the transform on the shape, then parent the shape node under the transform. This will however only work for meshs, curves, nurbs and subdivs. locators/camera's etc will simply not work - you will have to parent their transforms and leave them there.

07-04-2007, 01:54 AM
it's work! thx so much for your solution . It's work for cube and sphere but how about cube and joint ? because i try to make my joint easily to be selected by select the cube. You know that it will be a great solution for my animation GUI !

07-04-2007, 02:20 AM
awesome !!! it work perfectly ! thx again ! it's great to have the forum like cgtalk !

Robert Bateman
07-04-2007, 01:26 PM
I seem to recall some version of maya not handling parenting of shapes to joints. (it would always generate an additional transform). I seem to recall hacking it by first instancing it under the joint, then deleting the original transform

CGTalk Moderation
07-04-2007, 01:26 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.