TAPython has released v1.2.1
New Features¶
Define menu entry directly in Chameleon Tool's Json file¶
Add Define menu entry directly in Chameleon Tool's Json file feature. (In contrast, previous versions required defining menu entries in MenuConfig.json)
This feature is similar to the way Unity's MenuItem works, eliminating the need to define menu entries in MenuConfig.json. It is undoubtedly a great help for the migration and merging of tools.
How to use¶
Add menu entries for the tool through the MenuEntries field in the ChameleonTools json file. For example, in the following example, a menu entry Tools/Image Compare is defined for "Chameleon Tool". Clicking this menu entry will open the Image Compare tool.

{
"TabLabel": "Image Compare",
"InitTabSize": [1000, 650],
"InitTabPosition": [200, 100],
"MenuEntries": ["Tools/Image Compare"],
"Icon": {"style": "ChameleonStyle", "name": "Picture" },
"InitPyCmd": "..."
}

This tool has been added to Default Python Source and can be used directly.
Notes on menu¶
The menu items are separated by /, for example Tools/Image Comparison, which means that Tools is a menu group and Image Compare is a menu item under the menu group.
The MenuEntries field supports multiple menu entries, although in most cases, a tool only needs one menu entry. Currently, this feature supports adding menu items to the blue Chameleon button in the toolbar, and will support adding menu items to other locations in the future.
Add icon¶
The Icon field can be used to add icons to menu items, and the specific method is similar to the method of adding icons to menu items in MenuConfig.json.
Feature enable switch¶
A new configuration item MenuFromToolsJsonEnabled has been added to Config.ini to control whether to enable the function of reading menu entries from Json files. The default value is True.
Slate¶
Added support for SDPIScaler.¶
The SDPIScaler widget can control the scaling ratio of its child components. The usage is as follows:
"SDPIScaler":
{
"Aka": "Scaler",
"DPIScaler": 1.0,
"Content": {
...
}
}
-
SDIPScaleris similar to widgets such asSBoxthat have a child widget, and also has aContentfield to specify its child widget. -
Within
ChameleonData, the scaling ratio of the SDPIScaler widget can be set through the newly addedset_dpi_scalemethod.
Other widgets¶
-
SDropTargetadds theOverrideBackgroundImagePaddingfield to set the Padding of theSDropTargetbackground image. -
SComboBoxadds the keyword:InitiallySelectedItem, which specifies the initially selected item of theSCoboBox. -
SEditableText,SEditableTextBoxadds theIsPasswordfield to specify whether it is a password input box. -
SImageadds support for theTilefield to specify the SImage in repeat mode. The optional values are: - NoTile no repeat, default behavior
- Horizontal horizontal repeat
- Vertical vertical repeat
- Both horizontal and vertical repeat
ChameleonData¶
-
Add
set_image_data_base64Set the SImage's image data from base64 string -
Add
set_image_data_from_memorySet the SImage's image data from memory -
Optimize the performance of
set_image_datain UE5 -
set_image_data,set_image_data_from_memory,set_image_from_path,set_image_fromand other methods add two new parameters: Tint and Tiling, used to set the color and repeat mode of SImage -
Add
set_image_data_from_texture2dto directly set the image of theSImagein the UI through theTexture2Din the project - Added
set_desired_size_overrideto set the desired size of SImage - Added
get_chameleon_desired_sizeto get the desired size of the entire interface of Chameleon Tool.
PythonRBFLib (Experimental)¶
A new module has been added to use RBF (Radial Basis Function) interpolation in Python
- unreal.PythonBPLib.rbf
- unreal.PythonBPLib.set_rbf_params_deminsion
- unreal.PythonBPLib.rbf_fun
- Added UObject: unreal.PythonRBFTarget
- Added UObject: unreal.PythonRBFFunction
- Added UObject: unreal.UPythonRBFValues
PythonTextureLib¶
- Add
get_texture2d_contentto get the content of the 8-bit texture and return a byte array
Console Command¶
Add debug command TAPython.OverrideEnable 1
Enter this command in the CMD debug window, and the contents of the DefaultResource directory in the default resource of the plugin will replace the contents of the TA/TAPython directory in the current project.
CAUTION
This command will overwrite the contents of the TA/Python directory and will not delete the contents of the directory. Please make a backup before using it.
Default Python Source¶
Add example tool Image Compare¶

Compare the differences between two images, such as comparing the rendering content of the scene and the rendering content of the wireframe mode

Or compare two different textures

The Widget Gallery adds examples of SSplitter and SDPI widgets¶
Add icons - BackgroundGrid.png - BackgroundGridRed.png
Changes¶
Config.ini¶
Set LogOnTickWarnings of config.ini default value to False
Fixed¶
- Fix potential issues with SImage in SetColorAndOpacity
- Fix the problem that json is not imported in Utilities/Utils.py
- Fix the error of ResizeWindow when the interface cannot be found