Jump to content

Workflow for node handling in plugin class


photo

Recommended Posts

Hi,

 

I am currently working on an Unigine plugin and therefor need a proper handling with nodes. As your tutorials described, there are nodeInit(), nodeUpdate() and nodeShutdown() as basic callback function. Currently, on selecting an existing node, the nodeInit() and nodeUpdate() function will be called immediately, but after that, I got no feedback (I expected that when the node is rotated/transformed/scaled, that the nodeUpdate() will be called again). Same thing, when I deselect node. The nodeShutdown() function will be called three times.

 

So my question is, what is a good way to work with the existing functionalities? Do I have to check in update, if the selected node has changed? And how do I check, if a node is deselected or destroyed, when nodeShutdown() will be called in both cases?

 

Thanks in advance.

Link to comment

christian.wolf2

 

You can start watching your selected node in nodeInit(). Inside your plugin's update() manually check if node is modified somehow. inside nodeShutdown() forget selected node.

 

Please, don't forget to check the following plugins source code as well: NodeExport, MeshCombiner.

 

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

Hi silent, thanks for the answer. To track, if a node is updated, your approach sounds reasonable for me. Thanks!

But how do I keep track, if the selected node is removed from the scene?

 

Cheers

Link to comment
×
×
  • Create New...