Wheiraucher
06-16-2010, 06:42 PM
Hi
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
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
