blenderproc.python.types.StructUtility module¶
-
class
blenderproc.python.types.StructUtility.
Struct
(bpy_object)[source]¶ Bases:
object
-
del_cp
(key)[source]¶ Removes the custom property with the given key.
Parameters: key ( str
) – The key of the custom property to remove.
-
get_all_cps
()[source]¶ Returns all custom properties as key, value pairs.
Return type: list
Returns: A list of key value pairs
-
get_attr
(attr_name)[source]¶ Returns the value of the attribute with the given name.
Parameters: attr_name ( str
) – The name of the attribute.Return type: Any
Returns: The value of the attribute
-
get_cp
(key, frame=None)[source]¶ Returns the custom property with the given key.
Parameters: Return type: Returns: The value of the custom property.
-
has_cp
(key)[source]¶ Return whether a custom property with the given key exists.
Parameters: key ( str
) – The key of the custom property to check.Return type: bool
Returns: True, if the custom property exists.
-
is_valid
()[source]¶ Check whether the contained blender reference is valid.
The reference might become invalid after an undo operation or when the referenced struct is deleted.
Returns: True, if it is valid.
-