if I read this correctly – you’re just doing position – not orientation right?

it works in ICE like this:

for a null path constrained on curve.
make an identical copy (null1 on curve1)

[( null global pos – curve global pos ) multiply by –1 ]   >> translation port 
of an SRT to Matrix >> set curve1 global transform 

null1 stays put at the origin...

I’m probably oversimplifying things?
From: Steven Caron 
Sent: Thursday, January 14, 2016 8:56 PM
To: softimage@listproc.autodesk.com 
Subject: Re: Object motion converted to path animation but normalized atorigin?

For those interested in following... 

here is two scripts, one to set up the scene so you can see the scenario to 
start, and then another to normalize the motion per David's simpler method. 

#python
#setup example scene
Application.SICreateCurve("crvlist", 3, 0)
Application.SIAddPointOnCurveAtEnd("crvlist", 486.895161434139, 
325.493002786473, 34.5570511051906, False, 0, "")
Application.SIAddPointOnCurveAtEnd("crvlist", 409.033597647559, 
271.688103800014, 29.5535480810531, False, 0, "")
Application.SIAddPointOnCurveAtEnd("crvlist", 85.4440658602002, 
300.987801267806, -66.6103573229066, False, 0, "")
Application.SIAddPointOnCurveAtEnd("crvlist", -246.20762156975, 
272.753547344553, -147.807009721528, False, 0, "")
Application.SIAddPointOnCurveAtEnd("crvlist", -497.571600133753, 
131.0495559517, -173.495355859157, False, 0, "")
Application.SIAddPointOnCurveAtEnd("crvlist", -456.369852362362, 
-4.26177417487577, -122.038908353107, False, 0, "")
Application.SIAddPointOnCurveAtEnd("crvlist", -81.571345301959, 
14.3834878497712, -26.3265899671214, False, 0, "")
Application.SIAddPointOnCurveAtEnd("crvlist", 233.227806621437, 
145.965765570476, 19.5179940313196, False, 0, "")
Application.SIAddPointOnCurveAtEnd("crvlist", 553.247813449155, 
111.871572155872, 116.146231591289, False, 0, "")
Application.SIAddPointOnCurveAtEnd("crvlist", 537.167802185775, 
-116.666068097906, 179.907658216995, False, 0, "")
Application.SIAddPointOnCurveAtEnd("crvlist", 228.873883716215, 
-268.49177316504, 141.853471471277, False, 0, "")
Application.SIAddPointOnCurveAtEnd("crvlist", 124.433876714773, 
-305.782297213815, 124.747175301071, False, 0, "")
Application.CreatePrim("Cone", "MeshSurface", "", "")
Application.SetValue("cone.cone.radius", 3, "")
Application.SetValue("cone.cone.height", 12, "")
Application.ApplyCns("Path", "cone", "crvlist", "")
Application.SaveKey("cone.kine.pathcns.perc", 1, "", "", "", "", "")
Application.SetValue("PlayControl.Current", 100, "")
Application.SetValue("PlayControl.Key", 100, "")
Application.SetValue("cone.kine.pathcns.perc", 100, "")
Application.SaveKey("cone.kine.pathcns.perc", 100, "", "", "", "", "")
Application.SetValue("cone.kine.pathcns.tangent", True, "")
Application.SetValue("cone.kine.pathcns.dirx", 0, "")
Application.SetValue("cone.kine.pathcns.diry", 0, "")
Application.SetValue("cone.kine.pathcns.dirz", 1, "")
Application.SetValue("cone.kine.pathcns.dirx", 0, "")
Application.SetValue("cone.kine.pathcns.diry", 1, "")
Application.SetValue("cone.kine.pathcns.dirz", 0, "")
Application.SetValue("cone.kine.pathcns.upvct_active", True, "")


#python
#normalize and invert motion of path cns
Application.GetPrim("Null", "", "", "")
Application.SetValue("null.Name", "parent", "")
Application.Duplicate("parent", "", 2, 1, 1, 0, 0, 1, 0, 1, "", "", "", "", "", 
"", "", "", "", "", 0)
Application.SetValue("parent1.Name", "child", "")
Application.CopyPaste("child", "", "parent", 1)
Application.SelectObj("parent", "", "")
Application.ApplyCns("Position", "parent", "cone", "")
Application.SelectObj("child", "", "")
Application.ApplyCns("Position", "child", "crvlist", "")
Application.PlotConstrainedTransformsToActions("child", "plot", 1, 100, 1, 20, 
3, False, 0.01, True, True, True, True, True)
Application.SelectObj("parent,child", "", "")
Application.RemoveAllCns("", "")
Application.SelectObj("crvlist", "", True)
Application.ApplyCns("Position", "crvlist", "child", "")
Application.SelectObj("parent", "", "")
Application.ResetTransform("", "siObj", "siTrn", "siXYZ")


On Thu, Jan 14, 2016 at 11:48 AM, Steven Caron <car...@gmail.com> wrote:

  Not really, I have it working how I want now, I had come up with my own way 
but also David Barosin on the SItoA list (I accidentally posted there) gave me 
a simpler answer. Here is David's response... 



    If the plane is on a curve, a hierarchy of 2 nulls could do it.  
    The parent null is constrained to the plane. The child null is constrained 
to the curve.  Plot the child null's position. 
    Remove the constraints from both nulls. 
    Now constrain the curve to the child null and zero out the parent null's 
SRT.   
    Hope that makes sense. 

Reply via email to