Skip to content

Conversation

@damienmarchal
Copy link
Contributor

I often have to change a lot of data field for the same object.
This function allows to do that by using the kwargs to set name=value.

A quick example

    myobject.setDataValues(position=[1.0,2.0,3.0], 
                                           velocity=[2.0,3.0, 4.0])

This is usefull to set a bunch of data fields.

# Conflicts:
#	bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_Base.cpp
@jnbrunet
Copy link
Contributor

This will be useful to bypass the python-to-str-to-data pipeline of root.addObject when possible, thanks for this.

@jnbrunet jnbrunet merged commit 13b1374 into sofa-framework:master Jul 23, 2020
@guparan guparan added this to the v20.12 milestone Oct 26, 2021
@damienmarchal damienmarchal deleted the addSetDataToMaster branch June 8, 2022 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants