Re: PlotShape and offset clip
| Date : Sat, 14 Jul 2007 19:05:08 -0700 |
| To : XSI(at)Softimage.COM |
| From : javier <javier.vdp(at)gmail.com> |
| Subject : Re: PlotShape and offset clip |
cheers
j
On 7/14/07, guillaume laforge <guillaume.laforge.3d(at)gmail.com> wrote:
> As you point out, NestedObjects feel dirty but they are the best way...
I don't know if NestedObjects feel dirty ( it is their problem after all ).
I was thinking of Jscript, output arguments and ISIVTCollection when I said "dirty" :-).
1/2
Guillaume--On 7/14/07, guillaume laforge < guillaume.laforge.3d(at)gmail.com > wrote:Hi Jaiviier,
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 "for loop" in the right clic menu but you must write ".count" and clean up the line ).
From the Jscript documentation, the enumerator object is designed to enumerate a collection so it should always work fine with ... collection :-) .
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
>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);
javierOn 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 ;
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
Guillaume Laforge
- References:
- RE: PlotShape and offset clip
- From: "Mathieu Leclaire" <mleclair(at)hybride.com>
- RE: PlotShape and offset clip
- From: Guillaume Laforge <guillaume(at)alamaison.fr>
- Re: PlotShape and offset clip
- From: javier <javier.vdp(at)gmail.com>
- Re: PlotShape and offset clip
- From: "guillaume laforge" <guillaume.laforge.3d(at)gmail.com>
- Re: PlotShape and offset clip
- From: "guillaume laforge" <guillaume.laforge.3d(at)gmail.com>
- RE: PlotShape and offset clip
| DATE: | << | >> | THREAD: | << | >> | INDEX: | Main | Thread |
|---|
- Previous by Date: RE: Bones and Ball Dynamic joint contraint
- Next by Date: RE: Bones and Ball Dynamic joint contraint
- Previous by Thread: RE: Bones and Ball Dynamic joint contraint
- Next by Thread: RE: Bones and Ball Dynamic joint contraint
- Index(es):
| Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available. |