How to add new fields in the inspector for my custom class ?
-
Here is an example for a Visual model, you can simply adapt that:
1 Create and implements the functions
SBQuantity::length getVal1() const; float getVal2() const; void setVal1(SBQuantity::length val1); void setVal2(float val2);2 Then in the descriptor(you may have to create the descriptor if not already done) of your node, add:
SB_INTERFACE_BEGIN; SB_ATTRIBUTE_READ_WRITE(SBQuantity::length, MyVisualModel, Val1, "value 1", "My Parameter"); SB_ATTRIBUTE_READ_WRITE(float, MyVisualModel, Val2, "value 2", "My Parameter"); SB_INTERFACE_END;
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login