sheefy
09-03-2006, 04:26 AM
Hey guys,
I've run into a little problem which I just don't understand. I'm trying to create a point helper and then add a look at constraint to it but keep getting an error when I do things a certain way.
Here's the code - btw, all variables have their values initialized by the time I call this and are all fine (in terms of point 3 values beig point 3 values, etc);
-- Function Start
fn CreateSplineControl SCName SCPosition SCTarget =
(
SControl = point cross:off centermarker:off box:on axistripod:off size:StubLength
SControl.position = SCPosition
SControl.name = SCName
SControl.wireColor = (color 154 215 229)
SControl.rotation.controller = LookAt_Constraint()
SControl.rotation.controller.appendTarget SCTarget 100
SControl.rotation.controller.viewline_length_abs = false
)-- End Function
--Call the Function
CreateSplineControl "CNTRL_UpperLegSpline" ChainVectorTop $P_Knee
I get an error saying "-- Unable to convert: Point to type: String" and the Maxscript listener highlights the first line in the function where I create the point and tell it how to display it.
so anyways i can get it to work by changing the first line from;
SControl = point cross:off centermarker:off box:on axistripod:off size:StubLength
To...
SControl = point cross:off box:on size:StubLength
I don't understand why this should work - I've checked and rechecked and everything seems to be spelt right. I've used a similar method before.
Mind you, I can leave the first line alone and get rid of the last line in the function and it works too...
SControl.rotation.controller.viewline_length_abs = false
But I need that property.
I'm still a novice at this and I would greatly appreciate why I'm running into problems. By the way, I'm using Max 8 SP3.
Also, It was working before on another computer at work running 8 SP3 and one running 7 SP1.
Cheers!
-sheefy
I've run into a little problem which I just don't understand. I'm trying to create a point helper and then add a look at constraint to it but keep getting an error when I do things a certain way.
Here's the code - btw, all variables have their values initialized by the time I call this and are all fine (in terms of point 3 values beig point 3 values, etc);
-- Function Start
fn CreateSplineControl SCName SCPosition SCTarget =
(
SControl = point cross:off centermarker:off box:on axistripod:off size:StubLength
SControl.position = SCPosition
SControl.name = SCName
SControl.wireColor = (color 154 215 229)
SControl.rotation.controller = LookAt_Constraint()
SControl.rotation.controller.appendTarget SCTarget 100
SControl.rotation.controller.viewline_length_abs = false
)-- End Function
--Call the Function
CreateSplineControl "CNTRL_UpperLegSpline" ChainVectorTop $P_Knee
I get an error saying "-- Unable to convert: Point to type: String" and the Maxscript listener highlights the first line in the function where I create the point and tell it how to display it.
so anyways i can get it to work by changing the first line from;
SControl = point cross:off centermarker:off box:on axistripod:off size:StubLength
To...
SControl = point cross:off box:on size:StubLength
I don't understand why this should work - I've checked and rechecked and everything seems to be spelt right. I've used a similar method before.
Mind you, I can leave the first line alone and get rid of the last line in the function and it works too...
SControl.rotation.controller.viewline_length_abs = false
But I need that property.
I'm still a novice at this and I would greatly appreciate why I'm running into problems. By the way, I'm using Max 8 SP3.
Also, It was working before on another computer at work running 8 SP3 and one running 7 SP1.
Cheers!
-sheefy
