element_set_attributes
Sets the attributes on a database element. If the element is of type IFunction_call then by default arguments are set rather than attributes. Note that it is not possible to set argument references using this command. Setting an MDL argument will detach any connected function from the argument.
References:
- Use of this command to set MDL arguments is deprecated. Please use mdl_set_arguments instead.
- see element_set_attribute for a description of supported attribute types and commonly used attributes.
- mi::neuraylib::IRendering_configuration::add_custom_attribute_filter()
- add_custom_attribute_filter
- remove_custom_attribute_filter
arguments
- "attributes" : Map
A Map containing the attributes to set on the element. Attributes can be specified as (name, Attribute_data) pairs or as (name, IData) pairs. The first case should be used if the attribute needs to be created. It allows for the specification of the attribute type.
- "create" : Boolean (default: false)
A boolean flag indicating if the attributes should be created if they do not exist.
- "element_name" : String
The database element to set the attributes on.
- "filter" : Boolean (default: false)
If true then the keys of the attribute Map parameter will be added to the list of attribute filters so that rendering does not update when the attributes are created, removed or modified. To remove an attribute name from the of filters use the remove_custom_attribute_filter command.
- "force_attribute" : Boolean (default: false)
If element is of type Material_instance or Function_call then set the actual attributse rather than arguments.