GfQuatEulerAttributeModel#
- class omni.kit.property.usd.GfQuatEulerAttributeModel(
- stage: Stage,
- attribute_paths: List[Path],
- tf_type: Type,
- self_refresh: bool,
- metadata: dict,
Bases:
AbstractItemModel
,UsdBase
A class for managing the conversion between quaternion and Euler rotation attributes in USD stages.
This model facilitates the representation and editing of quaternion-based rotation attributes as Euler angles, providing an intuitive interface for animators and artists. It supports updating and retrieving the rotation values in both formats, ensuring seamless integration with USD’s quaternion attributes.
- Parameters:
stage (
Usd.Stage
) – The USD stage where the attribute resides.attribute_paths (List[
Sdf.Path
]) – A list of paths to the quaternion attributes in the USD stage.tf_type (
Tf.Type
) – The type of the transformation, indicating whether it’s a rotation, scale, or translation.self_refresh (bool) – Indicates whether the model should automatically refresh its value when the USD stage is changed.
metadata (dict) – Additional metadata associated with the quaternion attribute.
Methods
__init__
(stage, attribute_paths, tf_type, ...)Constructor for GfQuatEulerAttributeModel.
begin_edit
([item])Begins an edit operation on the model.
clean
()Cleans up the model.
end_edit
([item])Ends an edit operation on the model.
get_item_children
(item)Gets the child items of the given item.
get_item_value_model
(item, column_id)Retrieves the value model for a given item and column.
Updates submodels with the current quaternion value.
Attributes
Axes used for quaternion to euler conversion.
- __init__(
- stage: Stage,
- attribute_paths: List[Path],
- tf_type: Type,
- self_refresh: bool,
- metadata: dict,
Constructor for GfQuatEulerAttributeModel.
- begin_edit(item=None)#
Begins an edit operation on the model.
- Parameters:
item (Optional[
UsdUIItem
]) – The item that is beginning an edit.
- clean()#
Cleans up the model.
- end_edit(item=None)#
Ends an edit operation on the model.
- Parameters:
item (Optional[
UsdUIItem
]) – The item that has finished editing.
- get_item_children(item)#
Gets the child items of the given item.
- Parameters:
item (Optional[
UsdUIItem
]) – The parent item to retrieve children for.
- get_item_value_model(item, column_id)#
Retrieves the value model for a given item and column.
- Parameters:
item (Optional[
UsdUIItem
]) – The item to retrieve the value model for.column_id (int) – The column id for which to retrieve the model.
- update_to_submodels()#
Updates submodels with the current quaternion value.
- axes = [Gf.Vec3d(1.0, 0.0, 0.0), Gf.Vec3d(0.0, 1.0, 0.0), Gf.Vec3d(0.0, 0.0, 1.0)]#
Axes used for quaternion to euler conversion.
- Type:
list of Gf.Vec3d