Bootstrap Chameleon Logo

Control Other Tools

In TAPython's Chameleon Tool, some methods can be used to control each other.

LaunchChameleonTool

Used to open other Chameleon Tools under the specified path, the path is relative to <Your_Project>\TA\TAPython\Python. Below is an example of opening other style galleries in ChameleonGallery:

unreal.ChameleonData.launch_chameleon_tool("ChameleonGallery/auto_gen/border_brushes_Gallery.json")

TIP
Note that this is a static method of ChameleonData, not an instance method

RequestClose

Used to close Chameleon Tools under the specified path:

unreal.ChameleonData.request_close('/Example/ChameleonExample.json')

SetChameleonWindowSize

Used to set the window size of other ChameleonTools. new_size is the absolute size of Vector2D.

unreal.ChameleonData.set_chameleon_window_size("ChameleonGallery/ChameleonGallery.json", new_size:Vector2D)

You can get the current window size through get_chameleon_window_size:

current_size = unreal.ChameleonData.get_chameleon_window_size("ChameleonGallery/ChameleonGallery.json")

TIP
It can not only be used to set the window size of other ChameleonTools but also to set the window size of the current ChameleonTool. Just pass in the json file path of the current tool.

SetChameleonWindowPosition

Used to set the window position of other ChameleonTools.

unreal.ChameleonData.set_chameleon_window_position(tools_path:str, new_position:Vector2D)

FlashChameleonWindow

Flashes the specified ChameleonTool's window to prompt the user for attention. The following code will flash the ChameleonGallery's window:

unreal.ChameleonData.flash_chameleon_window("ChameleonGallery/ChameleonGallery.json")

SnapshotChameleonWindow

Used to capture a screenshot of the specified ChameleonTool's window and save the screenshot to the specified path. For details, please refer to here: Take UI Snapshot

saved_file_path = unreal.ChameleonData.snapshot_chameleon_window(tools_path, override_size:Vector2D, output_file_path)