Community
3ds Max Programming
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max SDK, Maxscript and Python topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

change node list into a single node in the ParamBlock2desc

1 REPLY 1
Reply
Message 1 of 2
bdenhartog
512 Views, 1 Reply

change node list into a single node in the ParamBlock2desc

We have a paramblock in which the user can pick objects in the scene to connect them to our own object. (See picture)
screenshot.png
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!

 

 

1 REPLY 1
Message 2 of 2
istan
in reply to: bdenhartog


@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.

Post to forums  

Technology Administrators


Autodesk Design & Make Report