Notifications
Clear all

[Closed] SDK: node with sub-nodes

Is it possible to ‘group’ nodes inside of another node?

Imagine I have a geometry plugin, and I want it to create 1000 teapots. But I don’t want those teapots to be separate objects, and I don’t want them to simply be attached together to form the mesh of my object. I want to keep them as sub-nodes of my object. In fact, not only do I want to keep them as sub-nodes but I want them to be instances and not copies of each other.

Is this possible?

15 Replies

what is an expected difference between ‘real’ and ‘sub’ nodes?

Well I don’t want the user to suddenly see 1000 new objects in their scene each time the plugin does its thing. I want all the sub-nodes to be a part of my single object. So if you click on any one of the teapots, it selects them all as a single object.

Basically I’d want the plugin to act exactly the way ‘grouping’ nodes works in max, without the ability of the user to ‘ungroup’ them.

1 Reply
(@denist)
Joined: 1 year ago

Posts: 0

group them all, and set their group node OFF (node->SetGroupHead(FALSE);). it will put it in state where a user can’t ungroup it using max UI

Do you want to move these subnodes independently from each other or are they ‘attached’.
If your case is the second one, can’t your plugin make all subnodes as an aditionnal variable (as elements in fact)?

Yup, they’d all be attached. Functionally, it would be like they’re all one piece of geometry.

When you say elements, do you mean geometry elements? The reason I need them to be individual objects is because the objects I’m instancing are Vray Proxy objects. So I want to retain their instancing behavior in order to maintain a low memory footprint. If I convert them to geo at any point in the process it would defeat the purpose of the plugin.

sure it works without using sdk… you can try the trick via mxs

setGroupHead <node> <boolean> 

Thanks Denis,

I’m looking for a solution closer to how the ‘multiscatter’ plugin works though, where I can select the group and I get the parameters of the group ‘head’ showing up in the modifier panel to control all of the instances. When I do the trick you mentioned it results in other weird behaviour and the modifier panel is empty when I click my object.

it’s empty probably because you check something like isGroupHead
after the trick it’s not an ‘official’ grouphead anymore. you have to search this node some different way

No, what I mean is…I have my plugin node:

{plugin}

And then I attach the child nodes so they form a group where the plugin node is the head:

[{plugin} – {child} {child} {child}]

But when I select the group head (the plugin node) max starts acting weird and doesn’t display any of its parameters in the modifier panel. This is regardless of whether or not I override its grouphead property.

what is plugin’s type?

Page 1 / 2