Jump to content

[SOLVED] Passing selected nodes to plugin as argument


photo

Recommended Posts

I'm currently developing a plugin for Unigine 2.6.1

I want to pass the vector/array of the currently selected nodes to an external function.

In UnigineScript, the selected nodes are in ::Nodes::nodes.

How can I pass these nodes as an argument to an extern function?

 

Thanks in advance

Edited by karim.salama
Link to comment

The answer was in this page https://developer.unigine.com/en/docs/2.6.1/code/cpp/usage/arrays?rlang=cpp

All I had to do is to add the external function with a "[]" as arguments, like this:

MakeExternFunction(&my_array_vector_set,"[]")

and pass the ::Nodes::nodes directly to the external function.

Then, in C++ get the ArrayVector using the Variable which is passed to the function as an argument.

Link to comment
  • silent changed the title to [SOLVED] Passing selected nodes to plugin as argument
×
×
  • Create New...