Community
3ds Max Programming
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max SDK, Maxscript and Python topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

delete child node

9 REPLIES 9
Reply
Message 1 of 10
yueshiwu
688 Views, 9 Replies

delete child node

Hi, 

  When i create a plugin instance, it creates two child nodes at the same time .But when i delete the instance from the scene,the child nodes are not deleted. How can i remove child node when the instance is removed? Thank you!

9 REPLIES 9
Message 2 of 10
istan
in reply to: yueshiwu

INode->NumberOfChildren();
INode->GetChildNode();
Message 3 of 10
yueshiwu
in reply to: istan

The question is i don't know where to call these functions. Does it have a callback function? 

Or I can override  a function which would be called when i delete a node from the scene panel.

Message 4 of 10
istan
in reply to: yueshiwu

The code can be called everywhere..

Honestly, I can't give you an answer without knowing what exactly you do..

Message 5 of 10
yueshiwu
in reply to: istan

Now i delete the child node in RefDeleted function. This function will be called by system when delete a plugin instance form the scene panel.

 

This method can solve my problem,but maybe there is a better one.

 

void SimpleCamera::RefDeleted()
{
if (!m_StereoNodeGroup.StereoNmae.isNull())
{
INode* pNode = GetCOREInterface()->GetINodeByName(m_StereoNodeGroup.StereoNmae);
if (pNode == NULL)
{
GetCOREInterface()->DeleteNode(m_StereoNodeGroup.pCameraNodeL);
GetCOREInterface()->DeleteNode(m_StereoNodeGroup.pCameraNodeR);
.....

}

}
}

Message 6 of 10
istan
in reply to: yueshiwu

ok..

 

will we soon be able to use the oculos on 3dsmax?

Message 7 of 10
yueshiwu
in reply to: istan

What does 'oculos' mean? My english is poor.

Message 8 of 10
yueshiwu
in reply to: istan

Do you mean 'oculus'?

Ye,We are developping a plugin of stereo camera, it can adjust parallax of any distance easily.

And it's different from the stereo plugin of 3ds max 2014.

Message 9 of 10
istan
in reply to: yueshiwu

Yes, I meant the 'oculus rift'

Many of my clients already asked for entering 3D data in 3dsMax on a "3D-screen" - which does not exist so far (at least I know of). There were already some - but not really useful - 3D camera attempts from others.

My clients want use 3dsMax (by the help of my plugins) in an interactive way and want to clearer see, what they input in 3D.

Message 10 of 10
yueshiwu
in reply to: istan

Your job is very cool and interesting.

So oculus rift use is like a screen. It uses left-eye and right-eye image to realize the 3d effect? 

The clients use mouse to interact with the 3ds max scene? It's too hard to interact just with eyes . It needs to control a 3d camera.

 

My plugin is designed to control three cameras(left,right,mid) and a stereo parallax model. Clients can adjust the model to make sure the parallax(between nearplane and farplane) is suitable. And then they output the left-eye and right-eye image and combine it together.Without a suitable parallax, the audience may feel swimmy after watching for a short time. And more features will be added later.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report