Scripting help - PathCns 2005-06-01 - By Bradley R. Gabe
Back InspectObj ([InputObjs], [Keywords], [Title], [Mode], [Throw])
What you're looking for is the InspectObj() command which opens PPG's for the InputObjs. To do this, you will need to feed it the path constraint nodes created by the ApplyPath() command you are running in your loop.
If you want, you can open an independent PPG for each constraint by including the InspectObj() command inside your loop and setting the mode to siLock. Otherwise, if you get a collection of all your path constraints, you can feed that into the InputObjs argument and get a multi PPG.
It's been a while since I've built any tools using commands, but this sort of things is a lot easier to do using the Object Model. Each constraint you create, you get a pointer to the object, which you can then feed directly into the InspectObj command. In this case, you're at the mercy of what the ApplyPath() command returns, which is the target curve and not the path constraint.
-Brad
>I´m in need of some scripting help here :) I´m not very good at it so >step by step help would be appreciated. > >In my script (se attached script). I´m trying to make a more versatile >duplicate/animation to path >setup. What I would like to have is the possibility to have the PathCns >PPG come up at the >end of the script so that I can set these properties without hardcoding it >as I do now. > > > SetValue oSelection(i).Name + > ".kine.pathcns.affbyori1", True > SetValue oSelection(i).Name + > ".kine.pathcns.tangent", True > SetValue oSelection(i).Name + > ".kine.pathcns.dirx", -1 > SetValue oSelection(i).Name + > ".kine.pathcns.diry", 0 > SetValue oSelection(i).Name + > ".kine.pathcns.dirz", 0 > SetValue oSelection(i).Name + > ".kine.pathcns.upvct_active", True > SetValue oSelection(i).Name + > ".kine.pathcns.roll", 45 > > >Maybe there is a built in way of doing this, in that case please share it >with me :) >If anyone can set me in the right direction I would be thankfull. > >TIA > >Demian > > > > >-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- >D E M I A N Z A R I N S >Projektledare >S V T -> Växthuset - The Green House >Sveriges Television >Oxenstiernsg 26 >105 10 STOCKHOLM >Phone: +46 8 784 3312 ->mobile:+46 709-951984 >
<html> <body> <pre>InspectObj ([InputObjs], [Keywords], [Title], [Mode], [Throw])
</pre>What you're looking for is the InspectObj() command which opens PPG's for the InputObjs. To do this, you will need to feed it the path constraint nodes created by the ApplyPath() command you are running in your loop.<br><br> If you want, you can open an independent PPG for each constraint by including the InspectObj() command inside your loop and setting the mode to siLock. Otherwise, if you get a collection of all your path constraints, you can feed that into the InputObjs argument and get a multi PPG.<br><br> It's been a while since I've built any tools using commands, but this sort of things is a lot easier to do using the Object Model. Each constraint you create, you get a pointer to the object, which you can then feed directly into the InspectObj command. In this case, you're at the mercy of what the ApplyPath() command returns, which is the target curve and not the path constraint.<br><br> -Brad<br><br> <br> <blockquote type=cite class=cite cite=""><font size=2>I´m in need of some scripting help here :) I´m not very good at it so </font><br> <font size=2>step by step help would be appreciated. </font><br><br> <font size=2>In my script (se attached script). I´m trying to make a more versatile duplicate/animation to path</font> <br> <font size=2>setup. What I would like to have is the possibility to have the PathCns PPG come up at the</font> <br> <font size=2>end of the script so that I can set these properties without hardcoding it as I do now.</font> <br><br> <br> <font size=2> SetValue oSelection(i).Name + ".kine.pathcns.affbyori1", True</font> <br> <font size=2> SetValue oSelection(i).Name + ".kine.pathcns.tangent", True</font> <br> <font size=2> SetValue oSelection(i).Name + ".kine.pathcns.dirx", -1</font> <br> <font size=2> SetValue oSelection(i).Name + ".kine.pathcns.diry", 0</font> <br> <font size=2> SetValue oSelection(i).Name + ".kine.pathcns.dirz", 0</font> <br> <font size=2> SetValue oSelection(i).Name + ".kine.pathcns.upvct_active", True</font> <br> <font size=2> SetValue oSelection(i).Name + ".kine.pathcns.roll", 45</font> <br><br> <br> <font size=2>Maybe there is a built in way of doing this, in that case please share it with me :)</font> <br> <font size=2>If anyone can set me in the right direction I would be thankfull.</font> <br><br> <font size=2>TIA</font> <br><br> <font size=2>Demian</font> <br> <font size=2><br><br> <br><br> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --<br> D E M I A N Z A R I N S<br> Projektledare<br> S V T -> Växthuset - The Green House<br> Sveriges Television<br> Oxenstiernsg 26<br> 105 10 STOCKHOLM<br> Phone: +46 8 784 3312 ->mobile:+46 709-951984<br><br> </font></blockquote></body> </html>
|
|