Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

How to judge one node is an instance of another node?

How to judge one node is an instance of another node?

jeremyliu1989
Enthusiast Enthusiast
884 Views
4 Replies
Message 1 of 5

How to judge one node is an instance of another node?

jeremyliu1989
Enthusiast
Enthusiast

Hey, all:

 

As we know, 3Ds Max has 3 ways to copy from one node: as duplication, reference, or instance.

 

My question:

How can I decide one node is an instance of other node?

Is there any property of node recording that or other method to judge the relationship of two nodes?

 

PS: The Python MaxPlus or C++ API is better. Thanks in advance. 

0 Likes
Accepted solutions (1)
885 Views
4 Replies
Replies (4)
Message 2 of 5

denisT.MaxDoctor
Advisor
Advisor
Accepted solution

i already answered this question on this forum... but lets do it again:

 

if two nodes have the same BaseObject it means they are references or instances

if two nodes have the same ObjectRef they are instances

so to be references but not instances two nodes have to have same BaseObject but different ObjectRefs

 

two  nodes are instances:

nodeA->GetObjectRef() == nodeB->GetObjectRef()

 

 

 

 

0 Likes
Message 3 of 5

jeremyliu1989
Enthusiast
Enthusiast

@denisT.MaxDoctor wrote:

i already answered this question on this forum... but lets do it again:

 

if two nodes have the same BaseObject it means they are references or instances

if two nodes have the same ObjectRef they are instances

so to be references but not instances two nodes have to have same BaseObject but different ObjectRefs

 

two  nodes are instances:

nodeA->GetObjectRef() == nodeB->GetObjectRef()

 

 

 

 


Very clear!

Maybe I haven't found the correlated topic, many thanks for the answer again. 

0 Likes
Message 4 of 5

jeremyliu1989
Enthusiast
Enthusiast
Hey denis, How are you doing? Actually, according to your answer of this topic, I have very clear about how to judge the relationship of instance and reference of nodes. They all depend on the 'BaseObject' and 'BaseObjectRef' of nodes. However, I have the other question about the relationship of 'copy' of two nodes. Could I also decide the relationship of copy just through the 'BaseObject' and 'BaseObjectRef' ? If it can not, do you know the method how to determine the relationship of copy? Thanks a lot.
0 Likes
Message 5 of 5

denisT.MaxDoctor
Advisor
Advisor

there is nothing that says that some nodes are copies. You have to use your own criterion to identify what nodes are similar. for example same size, name, topology (number vertices and faces), geometry (vertices position, face angles), material... or all things together. 

0 Likes