Notifications
Clear all

[Closed] Rootnode references

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
2 Replies
 JHN

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

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).