Creating linear curve method & parenting 2004-02-14 - By Graham D Clark
Back var oLightRig = activesceneroot.addlightrig( "Spot.Preset", "Spot_Root" ); var oCurve = createcurve( 1, 0, "(0,0,0),(5,5,5)", false )(0); oLightRig.addchild( oCurve ); -- ---- ---- ---- ---- ---- -- http://www.grahamdclark.com
> -- --Original Message-- -- > From: owner-xsi@(protected) > [mailto:owner-xsi@(protected)] On Behalf Of Bernard Lebel > Sent: February 14, 2004 12:25 PM > To: XSI@(protected) > Subject: [Script] Creating linear curve method & parenting > > > Hello, > > I'm very confused. I assumed that to create a linear curve > made of two points and parent it to > another object would be a piece of cake, but for the life of > me I can't figure it out. > > > This is the code I have so far: > > > // -- ---- -- Begin script -- ---- ---- ---- -- > > // Get spot light, oLightRig is the spot root > var oLightRig = activesceneroot.addlightrig( > "Spot.Preset", "Spot_Root" ); > > // Now we'll create a curve that shows the link between > the spot and its interest > createcurve( 1, 0, "(0,0,0),(5,5,5)", false ); > > var oCurve = activesceneroot.child( "crvlist" ); // > <-- ---- --- Error here > > oLightRig.addchild( oCurve ); > > // -- ---- -- End script -- ---- ---- ---- -- > > when it reaches the line > var oCurve = activesceneroot.child( "crvlist" ); > (before the last one) > it says that the object doesn't support property or method. > > I also tried the method > oLightRig.addchild( oCurve ); > but again it doesn't work. > Too bad JScript doesn't accept output values, that would have > had helped a lot. > > So how can I parent that curve to the spot light root other > than using the commands...? > ParentObj("B:Spot_Root", "crvlist"); > SelectObj("B:Spot_Root", null, null); > > > > Another problem is that the methods for creating curves are > pretty tedious! Is there any way to > create a curve under an existing object without going through > things like AddNurbsCurve methods and > such? > > > > Thanks > Bernard > --- > Unsubscribe? Mail Majordomo@(protected) with the following > text in body: > unsubscribe xsi > > >
--- Unsubscribe? Mail Majordomo@(protected) with the following text in body: unsubscribe xsi
|
|