Bootstrap Chameleon Logo

PythonPhysicsAssetLib

Function Name Description
get_selected_bodies_indexes Get the indexes of the selected bodies in Physics Asset Editor
rotate_selected_body Set the rotation of the selected body in Physics Asset Editor
rotate_selected_constraint Set the rotation of the selected constraint in Physics Asset Editor
get_selected None
get_body_center Get the center value of the specified body
set_body_center Set the center value of the specified body
get_body_rotation Get the rotation value of the first body
get_bodies_rotations Get the rotation value of the first body
set_body_rotation Set the rotation value of the specified body
get_body_radius Get the Radius value of the body
set_body_radius Set the Radius value of the body
get_body_length Get the rotation value of the first body
set_body_length Get the rotation value of the first body
get_body_size Get the Size value of the box body
set_body_size Set the Size value of the box body
scale_body Scale the specified body
get_edited_physics_assets Get all PhysicsAsset currently being tracked with open editors
get_physics_asset_from_top_window Get the PhysicsAsset from the top opened editor window.
log_selected None
get_selected_item_names Get all the selected items name in PhysicsAsset editor window.
select_body_by_name Select the Body by name in PhysicsAsset editor window.
select_body_by_names Select the Bodies by name in PhysicsAsset editor window.
select_shape_by_name Select the Shape by name in PhysicsAsset editor window.
select_shape_by_names Select the Shapes by name in PhysicsAsset editor window.
select_constraint_by_name Select the constraint by name in PhysicsAsset editor window.
select_constraint_by_names Select the constraints by name in PhysicsAsset editor window.
add_constraints Add constraint to specified bodies
get_skeleton_hierarchy Get the bones hierarchy
get_bodies_hierarchy Get all the bodies names and their parent bone's index
get_constraints_names Get all the constraint's display names of PhysicsAsset
get_bone_indexes_of_constraint Get the parent and child bone's indexes of the specified Constraint
get_bone_index_from_body Get the first Body under the specified bone
get_bodies_from_bone Get the Bodies under the specified bone
get_constraint_instance_accessor Get the ConstraintInstanceAccessor from PhysicsAsset
reset_constraint_properties Reset the specified Constraint's values
update_profile_instance Update the Profile according to the specified Constraint
break_constraint_accessor Get the Owner and Constraint Index from ConstraintInstanceAccessor
get_constraint_name Get the Constraint's name by Constraint Index

get_selected_bodies_indexes

Get the indexes of the selected bodies in Physics Asset Editor

unreal.PythonPhysicsAssetLib.get_selected_bodies_indexes(physics_asset) -> Array[int32]
    Get the indexes of the selected bodies in Physics Asset Editor
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset

    Returns:
        Array[int32]: Indexes values in list

rotate_selected_body

Set the rotation of the selected body in Physics Asset Editor

unreal.PythonPhysicsAssetLib.rotate_selected_body(physics_asset, rotation) -> bool
    Set the rotation of the selected body in Physics Asset Editor
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset):
        rotation (Rotator): The rotation value

    Returns:
        bool: True if succeed

rotate_selected_constraint

Set the rotation of the selected constraint in Physics Asset Editor

unreal.PythonPhysicsAssetLib.rotate_selected_constraint(physics_asset, rotation) -> bool
    Set the rotation of the selected constraint in Physics Asset Editor
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset):
        rotation (Rotator): The rotation value

    Returns:
        bool: True if succeed

get_selected

unreal.PythonPhysicsAssetLib.get_selected(physics_asset) -> bool
    Get Selected

    Args:
        physics_asset (PhysicsAsset):

    Returns:
        bool:

get_body_center

Get the center value of the specified body

unreal.PythonPhysicsAssetLib.get_body_center(physics_asset, body_index) -> Vector or None
    Get the center value of the specified body
    prarm: BodyIndex                       The index of body
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset
        body_index (int32):

    Returns:
        Vector or None: None or Center value

        result (Vector):

set_body_center

Set the center value of the specified body

unreal.PythonPhysicsAssetLib.set_body_center(physics_asset, body_index, center) -> bool
    Set the center value of the specified body
    prarm: BodyIndex                       The index of body
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset
        body_index (int32):
        center (Vector): The new Center value

    Returns:
        bool: True if succeed

get_body_rotation

Get the rotation value of the first body

unreal.PythonPhysicsAssetLib.get_body_rotation(physics_asset, body_index) -> Rotator or None
    Get the rotation value of the first body
    prarm: BodyIndex                       The index of body
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset
        body_index (int32):

    Returns:
        Rotator or None: None or Rotation value

        result (Rotator):

get_bodies_rotations

Get the rotation value of the first body

unreal.PythonPhysicsAssetLib.get_bodies_rotations(physics_asset, body_index) -> Array[Rotator] or None
    Get the rotation value of the first body
    prarm: BodyIndex                       The index of body
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset
        body_index (int32):

    Returns:
        Array[Rotator] or None: None or Rotation values

        result (Array[Rotator]):

set_body_rotation

Set the rotation value of the specified body

unreal.PythonPhysicsAssetLib.set_body_rotation(physics_asset, body_index, rotation) -> bool
    Set the rotation value of the specified body
    prarm: BodyIndex                       The index of body
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset
        body_index (int32):
        rotation (Rotator): The new Rotation value

    Returns:
        bool: True if succeed

get_body_radius

Get the Radius value of the body

unreal.PythonPhysicsAssetLib.get_body_radius(physics_asset, body_index) -> float or None
    Get the Radius value of the body
    prarm: BodyIndex                       The index of body
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset
        body_index (int32):

    Returns:
        float or None: None or Radius values

        radius (float):

set_body_radius

Set the Radius value of the body

unreal.PythonPhysicsAssetLib.set_body_radius(physics_asset, body_index, radius) -> bool
    Set the Radius value of the body
    prarm: BodyIndex                       The index of body
    prarm: Radius                          The new radius
    note: Support Sphere and Capsule body.
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset
        body_index (int32):
        radius (float):

    Returns:
        bool: True if succeed

get_body_length

Get the rotation value of the first body

unreal.PythonPhysicsAssetLib.get_body_length(physics_asset, body_index) -> float or None
    Get the rotation value of the first body
    prarm: BodyIndex                       The index of body
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset
        body_index (int32):

    Returns:
        float or None: None or Length of the capsule body

        length (float):

set_body_length

Get the rotation value of the first body

unreal.PythonPhysicsAssetLib.set_body_length(physics_asset, body_index, length) -> bool
    Get the rotation value of the first body
    prarm: BodyIndex                       The index of body
    prarm: Length                          The new Length value for the capsule body
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset
        body_index (int32):
        length (float):

    Returns:
        bool: True if succeed

get_body_size

Get the Size value of the box body

unreal.PythonPhysicsAssetLib.get_body_size(physics_asset, body_index) -> Vector or None
    Get the Size value of the box body
    prarm: BodyIndex                       The index of body
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset
        body_index (int32):

    Returns:
        Vector or None: None or Size value of the Box Body

        size (Vector):

set_body_size

Set the Size value of the box body

unreal.PythonPhysicsAssetLib.set_body_size(physics_asset, body_index, size) -> bool
    Set the Size value of the box body
    prarm: BodyIndex                       The index of body
    prarm: Size                            The new size value for the box body
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset
        body_index (int32):
        size (Vector):

    Returns:
        bool: True if succeed

scale_body

Scale the specified body

unreal.PythonPhysicsAssetLib.scale_body(physics_asset, body_index, scale) -> bool
    Scale the specified body
    prarm: BodyIndex                       The index of body
    prarm: Scale                           The scale value for body
    Suppport: Sphere, Capsule and Box bodies
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset
        body_index (int32):
        scale (float):

    Returns:
        bool: True if succeed

get_edited_physics_assets

Get all PhysicsAsset currently being tracked with open editors

unreal.PythonPhysicsAssetLib.get_edited_physics_assets() -> Array[PhysicsAsset]
    Get all PhysicsAsset currently being tracked with open editors
    note: added in v1.0.10

    Returns:
        Array[PhysicsAsset]: The opened PhysicsAssets.

get_physics_asset_from_top_window

Get the PhysicsAsset from the top opened editor window.

unreal.PythonPhysicsAssetLib.get_physics_asset_from_top_window() -> PhysicsAsset
    Get the PhysicsAsset from the top opened editor window.
    note: Will return null if the PhysicsAsset Editor window is docked.
    note: added in v1.0.10

    Returns:
        PhysicsAsset: The opened PhysicsAsset.

log_selected

unreal.PythonPhysicsAssetLib.log_selected(physics_asset) -> None
    Log Selected

    Args:
        physics_asset (PhysicsAsset):

get_selected_item_names

Get all the selected items name in PhysicsAsset editor window.

unreal.PythonPhysicsAssetLib.get_selected_item_names(physics_asset) -> Array[Name]
    Get all the selected items name in PhysicsAsset editor window.
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The name of body.

    Returns:
        Array[Name]: True if succeed

select_body_by_name

Select the Body by name in PhysicsAsset editor window.

unreal.PythonPhysicsAssetLib.select_body_by_name(physics_asset, name_in) -> bool
    Select the Body by name in PhysicsAsset editor window.
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset
        name_in (Name):

    Returns:
        bool: True if succeed

select_body_by_names

Select the Bodies by name in PhysicsAsset editor window.

unreal.PythonPhysicsAssetLib.select_body_by_names(physics_asset, names) -> bool
    Select the Bodies by name in PhysicsAsset editor window.
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset
        names (Array[Name]): The bodies names.

    Returns:
        bool: True if any succeed

select_shape_by_name

Select the Shape by name in PhysicsAsset editor window.

unreal.PythonPhysicsAssetLib.select_shape_by_name(physics_asset, name_in) -> bool
    Select the Shape by name in PhysicsAsset editor window.
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset
        name_in (Name): The name of shape.

    Returns:
        bool: True if succeed

select_shape_by_names

Select the Shapes by name in PhysicsAsset editor window.

unreal.PythonPhysicsAssetLib.select_shape_by_names(physics_asset, names) -> bool
    Select the Shapes by name in PhysicsAsset editor window.
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset
        names (Array[Name]): The shapes names.

    Returns:
        bool: True if any succeed

select_constraint_by_name

Select the constraint by name in PhysicsAsset editor window.

unreal.PythonPhysicsAssetLib.select_constraint_by_name(physics_asset, name_in) -> bool
    Select the constraint by name in PhysicsAsset editor window.
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset
        name_in (Name): The name of constraint.

    Returns:
        bool: True if succeed

select_constraint_by_names

Select the constraints by name in PhysicsAsset editor window.

unreal.PythonPhysicsAssetLib.select_constraint_by_names(physics_asset, names) -> bool
    Select the constraints by name in PhysicsAsset editor window.
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset
        names (Array[Name]): The constraints names.

    Returns:
        bool: True if any succeed.

add_constraints

Add constraint to specified bodies

unreal.PythonPhysicsAssetLib.add_constraints(physics_asset, parent_body_index, child_bodies_indexes) -> Array[Name]
    Add constraint to specified bodies
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset
        parent_body_index (int32): The parent body index of the new constraint
        child_bodies_indexes (Array[int32]): The child bodies indexes of the new constraint, one constraint for one body

    Returns:
        Array[Name]: Added constraint names

get_skeleton_hierarchy

Get the bones hierarchy

unreal.PythonPhysicsAssetLib.get_skeleton_hierarchy(physics_asset) -> (bone_names=Array[Name], parents_indexes=Array[int32])
    Get the bones hierarchy
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset

    Returns:
        tuple:

        bone_names (Array[Name]):

        parents_indexes (Array[int32]):

get_bodies_hierarchy

Get all the bodies names and their parent bone's index

unreal.PythonPhysicsAssetLib.get_bodies_hierarchy(physics_asset) -> (bodies_names=Array[Name], parent_bones_indexes=Array[int32])
    Get all the bodies names and their parent bone's index
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset

    Returns:
        tuple:

        bodies_names (Array[Name]):

        parent_bones_indexes (Array[int32]):

get_constraints_names

Get all the constraint's display names of PhysicsAsset

unreal.PythonPhysicsAssetLib.get_constraints_names(physics_asset) -> Array[Name]
    Get all the constraint's display names of PhysicsAsset
    note: Display name format: "[ {parent_bone_name} -> {child_bone_name} ] Constraint"
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset

    Returns:
        Array[Name]:

        constraints_names (Array[Name]):

get_bone_indexes_of_constraint

Get the parent and child bone's indexes of the specified Constraint

unreal.PythonPhysicsAssetLib.get_bone_indexes_of_constraint(physics_asset, constraint_index) -> (parent_bone_index=int32, child_bone_index=int32)
    Get the parent and child bone's indexes of the specified Constraint
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset
        constraint_index (int32): The index of Constraint

    Returns:
        tuple:

        parent_bone_index (int32):

        child_bone_index (int32):

get_bone_index_from_body

Get the first Body under the specified bone

unreal.PythonPhysicsAssetLib.get_bone_index_from_body(physics_asset, body_index) -> int32
    Get the first Body under the specified bone
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset
        body_index (int32):

    Returns:
        int32: The bone's index

get_bodies_from_bone

Get the Bodies under the specified bone

unreal.PythonPhysicsAssetLib.get_bodies_from_bone(physics_asset, bone_index) -> Array[int32]
    Get the Bodies under the specified bone
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset
        bone_index (int32): The index of Bone

    Returns:
        Array[int32]: The bodies's indexes in array

get_constraint_instance_accessor

Get the ConstraintInstanceAccessor from PhysicsAsset

unreal.PythonPhysicsAssetLib.get_constraint_instance_accessor(physics_asset, constraint_index) -> ConstraintInstanceAccessor
    Get the ConstraintInstanceAccessor from PhysicsAsset
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset
        constraint_index (int32): The index of constraint

    Returns:
        ConstraintInstanceAccessor: The ConstraintInstanceAccessor

reset_constraint_properties

Reset the specified Constraint's values

unreal.PythonPhysicsAssetLib.reset_constraint_properties(physics_asset, constraint_index) -> None
    Reset the specified Constraint's values
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset
        constraint_index (int32): The index of constraint

update_profile_instance

Update the Profile according to the specified Constraint

unreal.PythonPhysicsAssetLib.update_profile_instance(physics_asset, constraint_index) -> None
    Update the Profile according to the specified Constraint
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset
        constraint_index (int32): The index of constraint

break_constraint_accessor

Get the Owner and Constraint Index from ConstraintInstanceAccessor

unreal.PythonPhysicsAssetLib.break_constraint_accessor(accessor) -> (owner=Object, constraint_index=int32) or None
    Get the Owner and Constraint Index from ConstraintInstanceAccessor
    note: added in v1.0.10
    note: need UE5

    Args:
        accessor (ConstraintInstanceAccessor): The ConstraintInstanceAccessor instance

    Returns:
        tuple or None: None or tuple(Owner, ConstraintIndex)

        owner (Object):

        constraint_index (int32):

get_constraint_name

Get the Constraint's name by Constraint Index

unreal.PythonPhysicsAssetLib.get_constraint_name(physics_asset, constraint_index) -> Name
    Get the Constraint's name by Constraint Index
    note: added in v1.0.10

    Args:
        physics_asset (PhysicsAsset): The PhysicsAsset
        constraint_index (int32): The index of constraint

    Returns:
        Name: Name of the Constraint

Other Editor Python Libs: