TAPython has released v1.0.10, which includes the build for Unreal Engine 5.1.1
The Intermediate directory is added to the package and includes UnrealEditor-TAPython.lib (UE4Editor-TAPython.lib in UE4) to make compatibility with the Automated Build System. At the same time, add the corresponding .dll for DebugGame mode.
New Feature¶
Slate¶
Add support for SWebBrowser¶
Adding support for SWebBrowser allows you to embed WebBrowser in the tool window, which can be helpful in some situations, such as embedding the internal pipeline tool in the python tool in Unreal Editor.
Using the SWebBrowser widget, the web browser plug-in is required. It is disabled by default. We must enable the plug-in before using it
Widgets¶
-
Added "SizeRule" attribute for the SSplitter widget. Optional values are "FractionOfParent" and "SizeToContent",
-
And more attributes for SColorBlock and SColorPicker
ChameleonData¶
- GetVisibility
Get the current visibility status of the widget.
- Set/GetColor
They are used for getting and setting the color of the widget.
More APIs for SWebBrowser widget though ChameleonData.
- LoadURL
- GetURL
- LoadPageFromString
- ReloadPage
- GetTitleTextOfPage
- IsPageLoaded
- IsPageLoading
- CanGoBack
- GoBack
- CanGoForward
- GoForward
- BindUobjectToBrowser
- UnbindUobjectToBrowser
ChameleonTool¶
- The tool's wind can be set with "IsModalWindow" or "HasMinimizeMaximizeButton" to hide the maximize button.
If IsModalWindow is set to True, Tab is still a nomad type and we can still dock to other Windows.
Known issue: the maximize button reappears after the window is floated from the docked window.
Menu¶
- Add "HasSection" attribute, which defaults to True, used to hide the Section text above the menu item when creating a menu with ToolMenus Anchor.
Add a configurable menu for PhysicsAssetEditor and ControlRigEditor¶
As the Material Editor, we can add custom menus for Physics Asset Editor and Control Rig Editor now.
"OnPhysicsAssetEditorMenu": {
"name": "Python Menu On Physics Asset Editor",
"items":
[
{
"name": "TA Python Physics Asset Example",
"items": [
{
"name": "Print Physics Asset",
"command": "print(%f)"
}
]
}
]
}
Add menu in ToolMenus Anchor¶
We can add a TAPython menu where the UE ToolMenus can.
"ControlRigEditor.RigHierarchy.ContextMenu": {
"name": "Python Menu On Control Rig Editor",
"items": [
{
"name": "Rigging Tools",
"command": "print('Rigging Tools')",
"icon": {
"style": "ChameleonStyle",
"name": "Resources.Chameleon_32x_png"
}
}
]
}
And we can add a context menu for object's component in Detail views.
Kismet.SubobjectEditorContextMenu: {
...
}
Console Command¶
TAPython.RefreshToolMenus
"TAPython.RefreshToolMenus" can be used to refresh the "ToolMenus" menus, other menus will be auto-refreshed and not need this command
Editor Lib¶
PythonBPLib¶
- GetModifierKeyState
GetModifierKeyState Get the modifier key states(Ctrl, Shift, Alt, etc.), so we used it to display an optional dialog or menu.
- SnapshotDetails
We can tank a snapshot of the entire Details window via 'snapshot_details'. The file will be saved to
PythonTestLib¶
- CancelDelayCallById
Cancel the specified DelayCall by ID.
Add PhysicsAssetLib¶
We got a new editor library: PhysicsAssetLib, as its name, it's for PhysicsAsset Editing.
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_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. | |
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 |
Fixed¶
- The "Margin" of STextBlock is not working.
- The "OnTextChanged" and "OnTextCommitted" callback are not working when the input text is empty. (delete the text with backspace)