XM Magdalena 3D print, GGeorgy (3D)
LC #42 Pipers Alley

View Full Version : boundingbox of object is illegal reference

06-16-2010, 06:42 PM

I am doing a script where it is crucial to get the bounding box of my camera inside a float_script controller. So i create a variable called "this" and assign the camera node. this.min or this.max should give me the boundingbox values. Unfortunately maxscript throws an error: illegal self-reference in controller script.

As a workaround i tried adding an empty modifier and use this line of script to get the boundingbox values: getModContextBBoxMax this this.modifiers[1] This works surprisingly good without any errors. But it has two drawbacks: First, the list controller doesn't notice changes immediately (scrubbing the timeline helps), second, it's not very beautiful scripting to need an empty modifier.

So my question is: Is there a way to get the boundingbox without illegal self-reference and no additional modifier?

thanks, David

06-16-2010, 10:41 PM
"this" is a reserved name. Try using another name.

06-17-2010, 07:20 AM
"this" is a reserved name. Try using another name.

oh, good to know. But i have the same problem when the variable is called thiscamera.

CGTalk Moderation
06-17-2010, 07:20 AM
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.