boundingbox of object is illegal reference

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  06 June 2010
boundingbox of object is illegal reference


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 June 2010
"this" is a reserved name. Try using another name.
  06 June 2010
Originally Posted by lutteral: "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.
  06 June 2010
Thread automatically closed

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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 03:15 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.