Skip to content

How Can I Pass Parameters When Registering a Node? #700

Discussion options

You must be logged in to vote

You can include your additional parameters as additional arguments to factory.registerNodeType, for example:

factory.registerNodeType<RepeatNode>("Repeat", 6);

You can also do it by way of an initializer function. Note that when passing references you have to explicitly call std::ref.

This is all explained in Tutorial T08 (Tutorial file).

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by facontidavide
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants