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 CLOSED
 
Thread Tools Search this Thread Display Modes
Old 06 June 2010   #1
boundingbox of object is illegal reference

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
 
Old 06 June 2010   #2
"this" is a reserved name. Try using another name.
 
Old 06 June 2010   #3
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.
 
Old 06 June 2010   #4
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.
 
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
CGSociety
Society of Digital Artists
www.cgsociety.org

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

All times are GMT. The time now is 01:11 AM.


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