uzik
11-21-2003, 12:37 AM
I'm doing my first max script.
All the complicated stuff works, but
what should be simple doesn't!
I'm trying to select an object I've just
cloned and put a mesh select modifier
on it. It keeps erroring out saying
it's got an undefined class.
Here's the code:
-- add a mesh selection modifier
addModifier ($(js_LifeObjectName)) (Mesh_Select())
I get this:
-- Error occurred in s loop
-- Frame:
-- s: 1
-- js_LifeObjectName: "Life001001"
-- called in r loop
-- Frame:
-- r: 1
-- called in js_LifeCreate()
-- Frame:
-- n: 12
-- obj: $Editable_Mesh:Box01 @ [-4.743082,-4.347826,0.000000]
-- called in js_LifeCreatePickButton()
-- Frame:
-- obj: $Editable_Mesh:Box01 @ [-4.743082,-4.347826,0.000000]
>> MAXScript Rollout Handler Exception: -- Type error: Call needs function or class, got: undefined <<
js_LifeObjectName names the object.
I can see the object exists. The debug
output shows the variable is set.
I tried putting in $js_LifeObjectName
and $(js_LifeObjectName) and
($(js_LifeObjectName))
Why isn't it using the string as the
object name when I use
$(js_LifeObjectName)?
All the complicated stuff works, but
what should be simple doesn't!
I'm trying to select an object I've just
cloned and put a mesh select modifier
on it. It keeps erroring out saying
it's got an undefined class.
Here's the code:
-- add a mesh selection modifier
addModifier ($(js_LifeObjectName)) (Mesh_Select())
I get this:
-- Error occurred in s loop
-- Frame:
-- s: 1
-- js_LifeObjectName: "Life001001"
-- called in r loop
-- Frame:
-- r: 1
-- called in js_LifeCreate()
-- Frame:
-- n: 12
-- obj: $Editable_Mesh:Box01 @ [-4.743082,-4.347826,0.000000]
-- called in js_LifeCreatePickButton()
-- Frame:
-- obj: $Editable_Mesh:Box01 @ [-4.743082,-4.347826,0.000000]
>> MAXScript Rollout Handler Exception: -- Type error: Call needs function or class, got: undefined <<
js_LifeObjectName names the object.
I can see the object exists. The debug
output shows the variable is set.
I tried putting in $js_LifeObjectName
and $(js_LifeObjectName) and
($(js_LifeObjectName))
Why isn't it using the string as the
object name when I use
$(js_LifeObjectName)?
