PDA

View Full Version : Rootnode references


werwack
08-24-2009, 06:19 AM
Hello,

when we ask for the references of rootnode in an empty scene we get this:
refs.dependents rootnode
#(ReferenceTarget:Scene)

Do you know what is this “scene”, its purpose and how to get its properties?

The Maxscript help didn’t help me on that.

Thank you

JHN
08-24-2009, 03:37 PM
What it does is that it gives you access to the rootnode in the trackview.

What I use it for is to add a Custom Attribute to it and store data in it. It can be usefull for all sorts of things. If you're making a custom renderpresets tool, I'd store my settings there.

Some examples:

theScene = (refs.dependents rootNode)[1]
show theScene

select theScene.world.children
theScene.Environment.Ambient_Light = color 255 128 0
show theScene.Renderer


-Johan

werwack
08-25-2009, 12:20 PM
Thank you Johan,

I get a better understanding of the use of "theScene" now. I've also seem that this entity can be seen in the curve editor (or at least its custom attributes).

Do you have any clue for the purpose of rootnode?
As it is not viewable in the curve editor I will add my custom attributes to it.

Those CA will help me store some custom scene information for a material manager. This manager has to be unique and it will be queried by a scripted plugin material (or at least instances of it).

CGTalk Moderation
08-25-2009, 12:20 PM
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.