CGTalk > Software > Autodesk 3ds max > 3dsMax SDK and MaxScript
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 10-11-2012, 01:20 PM   #1
3rd Dimentia
Expert
 
3rd Dimentia's Avatar
Chris Gray
TD/DeluxePaint3 Veteran
Melbourne, Australia
 
Join Date: Aug 2002
Posts: 660
Send a message via ICQ to 3rd Dimentia Send a message via MSN to 3rd Dimentia
Any scene object scale callback?

I'm looking for a way to add a callback for when an object/objects are scaled. I don't mean specific objects, I'm talking about any objects in the scene. So whenever any object in the scene is scaled. I've found the "when transform obj changes do", but from trying that out, it only seems to work on specific objects that you designate at the time of adding the event handler rather than any objects added to the scene. I've been searching through here and the help for a while now and don't know if this is even possible.

Cheers,

Cg.
__________________
Not bad. For a hughman.
 
Old 10-11-2012, 01:57 PM   #2
Nysuatro
Veteran
portfolio
Robbert-Jan Brems
Leuven, Belgium
 
Join Date: Oct 2005
Posts: 80
Send a message via MSN to Nysuatro
How about a NodeEventCallback with the property geometrychanged and then check if your scale is still [1,1,1] ?
__________________
Portfolio
 
Old 10-11-2012, 02:14 PM   #3
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,498
Send a message via ICQ to denisT
Quote:
Originally Posted by Nysuatro
How about a NodeEventCallback with the property geometrychanged and then check if your scale is still [1,1,1] ?

right idea. but it's better to use controllerOtherEvent
 
Old 10-11-2012, 02:40 PM   #4
3rd Dimentia
Expert
 
3rd Dimentia's Avatar
Chris Gray
TD/DeluxePaint3 Veteran
Melbourne, Australia
 
Join Date: Aug 2002
Posts: 660
Send a message via ICQ to 3rd Dimentia Send a message via MSN to 3rd Dimentia
Thanks nysuatro, I don't think a geometry change is what I'm looking for though as i would like to have it work on other things like helpers. I'll look into the control other event. Cheers Denis.
__________________
Not bad. For a hughman.
 
Old 10-11-2012, 02:48 PM   #5
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,498
Send a message via ICQ to denisT
Quote:
Originally Posted by 3rd Dimentia
Thanks nysuatro, I don't think a geometry change is what I'm looking for though as i would like to have it work on other things like helpers. I'll look into the control other event.

the system doesn't fire the geometry change event on a transform change
 
Old 10-11-2012, 02:55 PM   #6
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,498
Send a message via ICQ to denisT
Quote:
Originally Posted by 3rd Dimentia
I'm looking for a way to add a callback for when an object/objects are scaled. I don't mean specific objects, I'm talking about any objects in the scene.

just curious... what do you do with scaled objects?
 
Old 10-12-2012, 12:23 AM   #7
3rd Dimentia
Expert
 
3rd Dimentia's Avatar
Chris Gray
TD/DeluxePaint3 Veteran
Melbourne, Australia
 
Join Date: Aug 2002
Posts: 660
Send a message via ICQ to 3rd Dimentia Send a message via MSN to 3rd Dimentia
I'm trying to stop people from scaling objects in scenes.
__________________
Not bad. For a hughman.
 
Old 10-12-2012, 12:31 AM   #8
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,498
Send a message via ICQ to denisT
Quote:
Originally Posted by 3rd Dimentia
I'm trying to stop people from scaling objects in scenes.

i've expected this answer . everything is much easier. just lock scale controller for all nodes that must not be scaled. probably they are created by your tool. so lock them on creation. do you know how to lock a controller?
 
Old 10-12-2012, 12:40 AM   #9
3rd Dimentia
Expert
 
3rd Dimentia's Avatar
Chris Gray
TD/DeluxePaint3 Veteran
Melbourne, Australia
 
Join Date: Aug 2002
Posts: 660
Send a message via ICQ to 3rd Dimentia Send a message via MSN to 3rd Dimentia
You're always thinking one step ahead. Yeah I know about locking controllers. But i don't think that would be the solution for me as i still want people to be able to animate the scale of objects. Just not lazily scale them when they should be using either subobject scale or xform modifiers. The objects can be created by everyone. So I was assuming you meant locking the scale controller of all objects on creation with a callback ? Which would also stop the ability to animate the scale. Am I correct? Or maybe it would be good to lock them all on creation and then people would have to go manually unlock them which is more work than scaling things in less destructively annoying ways. I've got some things to think about. Thanks Denis.


Cheers,

Cg.
__________________
Not bad. For a hughman.
 
Old 10-12-2012, 01:17 AM   #10
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,498
Send a message via ICQ to denisT
to prohibit scaling of all objects in the scene sounds like a paranoia for me
it makes sense just to protect only specific nodes. as i said if the object created by your tool you can easy lock its scale controller on creation. if you want to lock objects by some specific criteria and this object can be created manually you can listen node created (or added) event, and lock all objects those match the criteria. i don't know how undo/redo mechanism will work in this pipeline, but i don't see real problems.
using the transform change event you can catch the fact of change, but you cannot prevent the change.
 
Old 10-12-2012, 09:47 AM   #11
3rd Dimentia
Expert
 
3rd Dimentia's Avatar
Chris Gray
TD/DeluxePaint3 Veteran
Melbourne, Australia
 
Join Date: Aug 2002
Posts: 660
Send a message via ICQ to 3rd Dimentia Send a message via MSN to 3rd Dimentia
Paranoia is generally based on unfounded "feelings" rather than experience.
__________________
Not bad. For a hughman.
 
Old 10-12-2012, 09:47 AM   #12
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,480
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 07:11 AM.


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