View Full Version : help:Script Controller Evaluation Error
11-07-2003, 02:18 AM
I have a script controller that works fine except when I first open up the max file it tells me this:
-- Unknown property: "multiplier" in $Free_Camera:DummyCam @ [0.000,0.000,0.000]
and it pops up my script window. All I have to do is click "Evaluate" and it gives me a number and works fine. No big deal except this message pops up on every renderfarm machine when we try to render the file. :(
Here is the script, any help would be greatly appreciated.
11-07-2003, 06:25 PM
I'm trying to reproduce this, so I can troubleshoot it for you, but It's not working. Or should I say, it's not not working:p I've assumed that multiplier and convergence are custom attributes on the camera, but I need to know how the rest of the scene is set up - like what channel(s) the script controller is on. Better yet, could you post a stripped-down scene that demonstrates the problem?
11-08-2003, 08:57 PM
If .multiplier and Convergence are custom attributes, it might be that these attributes haven't been applied to the scene yet when the script-controller is called on scene-load.. A simple check might do the trick here:
if (hasProperty $DummyCam "multiplier") and (hasProperty $DummyCam "Convergence") then
11-08-2003, 09:46 PM
Yeah, that's what I assumed as well, but I couldn't reproduce the problem no matter what I assigned the script controller to (reproducing a problem is how I troubleshoot around it!). What magicm suggests might be a good general technique to avoid this kind of situation.
magicm, you da man!
11-10-2003, 05:32 PM
that doesn't seem to be working. I added an 'else 0' to the end so it wouldn't error out until I fix this. I ran getPropNames on the DummyCam and all I got is this:
#(#type, #fov, #targetDistance, #nearrange, #farrange, #nearclip, #near_clip, #farclip, #far_clip, #mpassEnabled, #mpassRenderPerPass, #orthoProjection, #showCone, #showHorizon, #showRanges, #clipManually, #mpassEffect, #MultiPass_Effect)
So it seems that maxscript doesn't recognize Custom Attributes as properties. Is there another way to test Attribute names similar to how you did with the hasProperty command?
11-10-2003, 05:35 PM
I GOT IT!
While researching the hasProperty command, I found the isProperty command. For some reason, this happens with both commands:
isProperty $DummyCam "Convergence"
hasProperty $DummyCam "Convergence"
So I don't know why these commands would be different, but whatever the case, when I swapped in the isProperty command, the script works.
Thanks you guys!
01-16-2006, 02:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.