How to rename an object in the scene?

How to rename an object in the scene?

jfwfreo
Enthusiast Enthusiast
790 Views
6 Replies
Message 1 of 7

How to rename an object in the scene?

jfwfreo
Enthusiast
Enthusiast

Can someone tell me how (via C++) I can find an object in the scene with a specific name and change its name to something else?

 

0 Likes
791 Views
6 Replies
Replies (6)
Message 2 of 7

denisT.MaxDoctor
Advisor
Advisor

@jfwfreo wrote:

Can someone tell me how (via C++) I can find an object in the scene with a specific name and change its name to something else?

 


is this the only problem with the c++ and MAX sdk you have?  😁 

 

Sorry, but I don't understand such questions... You are going to write something in c++ and MAX sdk, but a simple thing in terms of future complexity already raises problems and questions.
Maybe you should start with something simpler?

I can answer your question, but you answer mine first.

0 Likes
Message 3 of 7

denisT.MaxDoctor
Advisor
Advisor

ask ChatGPT this question... it doesn't care, and by the way, it answered it pretty well.

0 Likes
Message 4 of 7

klvnk
Collaborator
Collaborator

it answered it pretty well.

 

it is only two functions one to find the node and one to rename it 😉

 

 

INode* node = ip->GetINodeByName(_T("Box001"));  
if(node) 
	node->SetName(_T("Cube001"));

 




 

 

0 Likes
Message 5 of 7

istan
Advisor
Advisor

but keep in mind that node names are not unique..

0 Likes
Message 6 of 7

denisT.MaxDoctor
Advisor
Advisor

@klvnk wrote:

it answered it pretty well.

 

it is only two functions one to find the node and one to rename it 😉

 

 

INode* node = ip->GetINodeByName(_T("Box001"));  
if(node) 
	node->SetName(_T("Cube001"));

 

 


****! you've killed the suspense! 😁

0 Likes
Message 7 of 7

istan
Advisor
Advisor

****! you've killed the suspense! 😁

Yep.. would have been exciting.. 😉

0 Likes