Bootstrap Chameleon Logo

TAPython for UE5.3.2 is here

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.

138_ChameleonAutoMenu

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

139_image_compare

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": {
            ...
        }
}
  • SDIPScaler is similar to widgets such as SBox that have a child widget, and also has a Content field to specify its child widget.

  • Within ChameleonData, the scaling ratio of the SDPIScaler widget can be set through the newly added set_dpi_scale method.

Other widgets

  • SDropTarget adds the OverrideBackgroundImagePadding field to set the Padding of the SDropTarget background image.

  • SComboBox adds the keyword: InitiallySelectedItem, which specifies the initially selected item of the SCoboBox.

  • SEditableText, SEditableTextBox adds the IsPassword field to specify whether it is a password input box.

  • SImage adds support for the Tile field 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_base64 Set the SImage's image data from base64 string

  • Add set_image_data_from_memory Set the SImage's image data from memory

  • Optimize the performance of set_image_data in UE5

  • set_image_data, set_image_data_from_memory, set_image_from_path, set_image_from and other methods add two new parameters: Tint and Tiling, used to set the color and repeat mode of SImage

  • Add set_image_data_from_texture2d to directly set the image of the SImage in the UI through the Texture2D in the project

  • Added set_desired_size_override to set the desired size of SImage
  • Added get_chameleon_desired_size to 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_content to 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

139_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

G41_image_compare_scene

Or compare two different textures

G42_image_compare_texture

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