[no subject]

With PlotShape command ( and I guess all the commands returning an
ISIVTCollection ) your code with a for loop doesn't work ( or I missed
something ).

Cheers

GUILLAUME LAFORGE :-)


On 7/14/07, javier <javier.vdp(at)gmail.com> wrote:
>
> Gilliaume,
>
> your method seems correct but you dont need to create an Enumerator for
> nested objects as nested objects are a collection so you can iterate them as
> such
>
> oNested = oClip.NestedObjects;
> for (i=0;i< oNested.Count;i++){
> if (oNested(i).Name == ...etc
>
> As you point out, NestedObjects feel dirty but they are the best way to
> get to properties and parameters of objects that have no OM connection
> built. Thus very useful.
>
> Otherwise, there is a more direct -- if dirtier way -- if you are sure
> that you have a clip and an instanced action, you know that "startoffset" is
> a parameter of the action, so you can check the full parameter name ( select
> your action and logmessage(selection(0).FullName  and put the path below
>
> SetValue( oClip.FullName+". --you have to check this om string yourself--
>   .startoffset", 15,null);
>
>
> javier
>
>
> On 7/12/07, Guillaume Laforge <guillaume(at)alamaison.fr> wrote:
> >
> >
> > In Jscript it can be tricky sometime...
> >
> > PlotShape command hide your new clip under two collections.
> >
> > Here is my try :
> >
> > var oPlot = PlotShape("cube", "plotMerged", 1, 40, 1, true, 1, 3, 2,
> > true, null, null);
> > var oClip = oPlot.item(1).item(1);//The joy of jscript...
> >
> > oEnum = new Enumerator(oClip.nestedobjects ) ;
> > for (;!oEnum.atEnd();oEnum.moveNext() )
> > {
> >     var oNested = oEnum.item() ;
> >     if( oNested.name == "Instanced Action" )
> >     {
> >         var oInstancedAction = oNested;
> >     }
> > }
> > var oTimeCtrl = oInstancedAction.nestedobjects.item(0);
> > oTimeCtrl.parameters.item("startoffset").value = 15;
> >
> >
> > Hope this help
> >
> > --
> > Guillaume Laforge | La Maison
> >
> >
> > On Thu, 12 Jul 2007 17:20:21 -0400, "Mathieu Leclaire" <
> > mleclair(at)hybride.com> wrote:
> > > No, I'm in 5.11. but the point is to track down the track and the clip
> > from
> > > the PlotShape command so I can offset it.
> > >
> > > Mathieu Leclaire
> > > R&D Programmer
> > > Hybride Technologies
> > >
> > > "Yesterday is history, tomorrow is a mystery, today is a gift and that
> > is
> > > why it's called the present"
> > >
> > > -----Original Message-----
> > > From: Andre DeAngelis [mailto: andre.deangelis(at)ubisoft.com]
> > > Sent: Thursday, July 12, 2007 5:12 PM
> > > To: XSI(at)Softimage.COM
> > > Subject: RE: PlotShape and offset clip
> > >
> > > If you are using 6.x there is there offset method, though i am not
> > 100%
> > > sure
> > > if it only applies to Fcurve sources.
> > >
> > > AD
> > >
> > >   _____
> > >
> > > From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On
> > Behalf
> > > Of
> > > Mathieu Leclaire
> > > Sent: July 12, 2007 4:47 PM
> > > To: XSI(at)Softimage.COM
> > > Subject: PlotShape and offset clip
> > >
> > > Once I called the PlotShape command { PlotShape(newMergedObj,
> > > "plotMerged",
> > > startFrame, endFrame, 1, true, 1, 3, 2, true, null, null); }, how can
> > I
> > > offset the start time of that newly plotted shape in JScript?
> > >
> > >
> > > Mathieu Leclaire
> > > R&D Programmer
> > > Hybride Technologies
> > >
> > > "Yesterday is history, tomorrow is a mystery, today is a gift and that
> > is
> > > why it's called the present"
> > >
> > >
> > >
> >
> >
> > ---
> > Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in
> > body:
> > unsubscribe xsi
> >
>
>

------=_Part_49243_25090693.1184440829113
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi Jaiviier,<br><br>I always use the enumerator object with collections. I find it faster to write it using a right clic in the script editor ( of course you can also choose a &quot;for loop&quot; in the right clic menu but you must write &quot;.count&quot;&nbsp; and clean up the line ).
<br>From the Jscript documentation, the enumerator object is designed&nbsp; to enumerate a collection so it should always work fine with ... collection :-) .<br><br>With <span class="e" id="q_113c5eff4335b2f8_2">PlotShape command ( and I guess all the commands returning an ISIVTCollection ) your code with a for loop doesn&#39;t work ( or I missed something ).
<br><br>Cheers<br><br>GUILLAUME LAFORGE :-)<br></span><br><br>On 7/14/07, <b class="gmail_sendername">javier</b> &lt;<a href="mailto:javier.vdp(at)gmail.com">javier.vdp(at)gmail.com</a>&gt; wrote:<div><span class="gmail_quote">
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Gilliaume, <br><br>your method seems correct but you dont need to create an Enumerator for nested objects as nested objects are a collection so you can iterate them as such
<br><br>oNested = oClip.NestedObjects;<br>for (i=0;i&lt;
oNested.Count;i++){<br>if (oNested(i).Name == ...etc<br><br>As you point out, NestedObjects feel dirty but they are the best way to get to properties and parameters of objects that have no OM connection built. Thus very useful.
<br><br>Otherwise, there is a more direct -- if dirtier way -- if you are sure that you have a clip and an instanced action, you know that &quot;startoffset&quot; is a parameter of the action, so you can check the full parameter name ( select your action and logmessage(selection(0).FullName&nbsp; and put the path below
<br><br>SetValue( oClip.FullName+&quot;. --you have to check this om string yourself-- &nbsp; .startoffset&quot;, 15,null);<br><span class="sg"><br><br>javier</span><div><span class="e" id="q_113c5eff4335b2f8_2"><br><br><br><div>
<span class="gmail_quote">On 7/12/07, <b class="gmail_sendername">Guillaume Laforge
</b> &lt;<a href="mailto:guillaume(at)alamaison.fr" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">guillaume(at)alamaison.fr</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>In Jscript it can be tricky sometime...<br><br>PlotShape command hide your new clip under two collections.<br><br>Here is my try :<br><br>var oPlot = PlotShape(&quot;cube&quot;, &quot;plotMerged&quot;, 1, 40, 1, true, 1, 3, 2, true, null, null);
<br>var oClip = oPlot.item(1).item(1);//The joy of jscript...<br><br>oEnum = new Enumerator(oClip.nestedobjects ) ;<br>for (;!oEnum.atEnd();oEnum.moveNext() )<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;var oNested = oEnum.item() ;<br>&nbsp;&nbsp;&nbsp;&nbsp;if( oNested.name

 == &quot;Instanced Action&quot; )<br>&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var oInstancedAction = oNested;<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>}<br>var oTimeCtrl = oInstancedAction.nestedobjects.item(0);<br>oTimeCtrl.parameters.item(&quot;startoffset&quot;).value = 15;
<br><br><br>Hope this help<br><br>--<br>Guillaume Laforge | La Maison<br><br><br>On Thu, 12 Jul 2007 17:20:21 -0400, &quot;Mathieu Leclaire&quot; &lt;<a href="mailto:mleclair(at)hybride.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
mleclair(at)hybride.com</a>&gt; wrote:
<br>&gt; No, I&#39;m in 5.11. but the point is to track down the track and the clip from<br>&gt; the PlotShape command so I can offset it.<br>&gt;<br>&gt; Mathieu Leclaire<br>&gt; R&amp;D Programmer<br>&gt; Hybride Technologies
<br>&gt;<br>&gt; &quot;Yesterday is history, tomorrow is a mystery, today is a gift and that is<br>&gt; why it&#39;s called the present&quot;<br>&gt;<br>&gt; -----Original Message-----<br>&gt; From: Andre DeAngelis [mailto:
<a href="mailto:andre.deangelis(at)ubisoft.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">andre.deangelis(at)ubisoft.com</a>]<br>&gt; Sent: Thursday, July 12, 2007 5:12 PM<br>&gt; To: <a href="mailto:XSI(at)Softimage.COM" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
XSI(at)Softimage.COM</a><br>&gt; Subject: RE: PlotShape and offset clip
<br>&gt;<br>&gt; If you are using 6.x there is there offset method, though i am not 100%<br>&gt; sure<br>&gt; if it only applies to Fcurve sources.<br>&gt;<br>&gt; AD<br>&gt;<br>&gt;&nbsp;&nbsp; _____<br>&gt;<br>&gt; From: <a href="mailto:owner-xsi(at)Softimage.COM" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

owner-xsi(at)Softimage.COM</a> [mailto:<a href="mailto:owner-xsi(at)Softimage.COM" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">owner-xsi(at)Softimage.COM</a>] On Behalf<br>&gt; Of<br>&gt; Mathieu Leclaire
<br>&gt; Sent: July 12, 2007 4:47 PM<br>&gt; To: <a href="mailto:XSI(at)Softimage.COM" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
XSI(at)Softimage.COM</a><br>&gt; Subject: PlotShape and offset clip<br>&gt;<br>&gt; Once I called the PlotShape command { PlotShape(newMergedObj,<br>&gt; &quot;plotMerged&quot;,<br>&gt; startFrame, endFrame, 1, true, 1, 3, 2, true, null, null); }, how can I
<br>&gt; offset the start time of that newly plotted shape in JScript?<br>&gt;<br>&gt;<br>&gt; Mathieu Leclaire<br>&gt; R&amp;D Programmer<br>&gt; Hybride Technologies<br>&gt;<br>&gt; &quot;Yesterday is history, tomorrow is a mystery, today is a gift and that is
<br>&gt; why it&#39;s called the present&quot;<br>&gt;<br>&gt;<br>&gt;<br><br><br>---<br>Unsubscribe? Mail <a href="mailto:Majordomo(at)Softimage.COM" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Majordomo(at)Softimage.COM
</a> with the following text in body:<br>unsubscribe xsi
<br></blockquote></div><br>
</span></div></blockquote></div><br><br clear="all"><br>

------=_Part_49243_25090693.1184440829113--
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.