We have a paramblock in which the user can pick objects in the scene to connect them to our own object. (See picture)
With a paramblock2 descriptor snippet:
constraint_list_body1, _T("body1"), TYPE_INODE_TAB, 0, P_VARIABLE_SIZE, IDS_CONSTRAINT_BODY1_LIST,
p_ui, TYPE_NODELISTBOX, IDC_EABASE_LIST1, 0, 0, 0,
p_end,
It works, however the max script programmers now need to index the parameter if they use it from script.
For example:
object.body1[1] = picked_object
instead of:
object.body1 = picked_object
Can anyone help me with this? I haven't found the correct paramblock2desc syntax to make this work.
Thanks in advance!
@bdenhartog wrote:We have a paramblock in which the user can pick objects in the scene to connect them to our own object. (See picture)
With a paramblock2 descriptor snippet:
constraint_list_body1, _T("body1"), TYPE_INODE_TAB, 0, P_VARIABLE_SIZE, IDS_CONSTRAINT_BODY1_LIST,
p_ui, TYPE_NODELISTBOX, IDC_EABASE_LIST1, 0, 0, 0,
p_end,
It works, however the max script programmers now need to index the parameter if they use it from script.
For example:
object.body1[1] = picked_object
instead of:
object.body1 = picked_object
Can anyone help me with this? I haven't found the correct paramblock2desc syntax to make this work.
Thanks in advance!
Did you search for "TYPE_INODE_TAB" in the samples? What does "showproperties $" show?
Your 'body1' variable should display as type 'node array'.
And with MXS use 'append' to add new nodes to the list.
Can't find what you're looking for? Ask the community or share your knowledge.