More than likely this has something to do with the way your hierarchy is 
organized. There is no reason why you can't do this. The key to making this 
work is that the gun cannot have had its pivot or transforms modified in 
relation to the child. The object as child to the gun must be zero-centric to 
it. In other words, the gun must be the "world" coordinates for the gun. Does 
that make sense?

Run the MEL commands below in your script editor in an empty scene. See 
specifically the angle of locator2 and the keyframed z translation of pCone1. 
Move locator1 around at will, and you can change the orientation of locator2 if 
you desire, but the cone's motion is always maintained on Z axis relative 
everything it is parented to. And it is only animated explicitly on Z. See the 
Graph editor for pCone1. Is this similar to what you are trying to accomplish?




file -f -new;
spaceLocator -p 0 0 0; 
updateRenderOverride;
spaceLocator -p 0 0 0;
CreatePolygonCone;
polyCone -r 1 -h 2 -sx 20 -sy 1 -sz 0 -ax 0 1 0 -rcp 0 -cuv 3 -ch 1;
parent pCone1 locator2 ;
select -r locator2 ;
selectKey -clear ;
parent locator2 locator1 ;
select -r locator2 ;
selectKey -clear ;
rotate -r -os -fo 9.453111 0 0 ;
setAttr "locator2.rotateX" 45;
select -r pCone1 ;
selectKey -clear ;
if( `getAttr -k "pCone1.tz"`||`getAttr -channelBox "pCone1.tz"` )setKeyframe 
"pCone1.tz";
currentTime 30 ;
move -r -ls -wd 0 0 -8.127347 ;
if( `getAttr -k "pCone1.tz"`||`getAttr -channelBox "pCone1.tz"` )setKeyframe 
"pCone1.tz";
currentTime 22 ;
selectKey -clear ;
currentTime 15 ;
select -r locator2 ;
selectKey -clear ;
select -r locator2 pCone1 ;
selectKey -clear ;
select -r pCone1 ;
selectKey -clear ;





Joey Ponthieux
__________________________________________________
Opinions stated here-in are strictly those of the author and do not 
represent the opinions of NASA or any other party.






-----Original Message-----
From: softimage-boun...@listproc.autodesk.com 
[mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Morten Bartholdy
Sent: Monday, September 11, 2017 6:17 AM
To: Userlist, Softimage <softimage@listproc.autodesk.com>
Subject: Maya - what were they thinking 2 - transforms

So I understand (to some degree) that there are fundamental differences between 
the  way transformations are handled in Maya vs Soft, but I just ran into 
something which on the surface looks simple, but is quite mindboggling. 
Hopefully it is just a case of Mayas way of hiding useful stuff in some obscure 
submenu or relationship editor, but here goes:

I am doing some very simple keyframe animation in Maya (one of the few things 
that does not drive me entirely crazy) and am animating a thingy which is 
parented to a gun which is pointed in a particular direction. I just want it to 
fly of on its local z-axis so I select it, set Transform Tool Settings, Axis 
Orientation to Object, key frame translate out along z-axis and keyframe. Now I 
want to edit the function curves to make sure it accelerates as desired, open 
the graph editor and see graph representation of its motion is in world space, 
ie. it is not only animated on the z-axis, but also on x and Y. Obviously 
editing these curves  manually will easily lead to having the object not flying 
in a straight line...

In this case I could draw a curve to use as motion path, but is is more 
cumbersome (like so many things in Maya) and for many reasons I would really 
prefer to be able to switch between World space and Object space in the Graph 
Editor. Our resident Maya artist has looked for similar functionality many 
times through different Maya versions, so far without luck, so she can not 
offer relief from this specific lack of brainpower on the part of the Maya devs.

Can Maya knowledgeable people here confirm this fundamental lack of 
functionality or perhaps tell where I find it, or barring that, offer advice 
regarding how to achieve something similar?

Thanks (sigh)

Morten
------
Softimage Mailing List.
To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com with 
"unsubscribe" in the subject, and reply to confirm.

------
Softimage Mailing List.
To unsubscribe, send a mail to softimage-requ...@listproc.autodesk.com with 
"unsubscribe" in the subject, and reply to confirm.

Reply via email to