Bootstrap Chameleon Logo

Configs

Know yourself and know your enemy, and you will never be defeated

In File Structure we introduced the file directory structure of the plugin. Here, we will introduce the configuration files in the plugin's Config directory.

TIP
If you find that the configuration is abnormal after modification, you can find the default Config.ini file in the <Your_Project>\Plugins\TAPython\Resources\DefaultPythonSource\TA\TAPython\Config directory

Configs

config.ini

UE5 TA\TAPython\Config\config.ini

[Settings]
MenuConfigFilePath=/TA/TAPython/UI/MenuConfig.json
ChameleonDataFolder=/Game/TA/ChameleonTools
PythonContentFolder=/TA/TAPython/Python

[Advanced]
MainbarExtensionHookName=Play
MenusOnToolbarEnabled=True
SketchToolsEnabled=True
MainMenuExtensionHookName=Instrumentation
LogCreateWidget=False
SButtonHorizontalPadding=0
LogOnTickWarnings=False
MaterialEditorMenuExtensionHookName=Instrumentation
LogNumberLimit=10240

CAUTION
Note that UE4 and UE5 configurations are not universal. The reason is that UE5 has modified the interface's ExtensionHookName. For example, the HookName Game in UE4 has changed to Play in UE5. Directly copying the configuration items from UE4 to UE5 will cause the corresponding menu items to not display in the interface.

Display ExtensionHookName

In EditorSetting, check Display UI Extension Point.

Displaying UI Extension option in Unreal Editor settings

Restart the editor, and you can see the green ExtensionHookName in the image below. In the image, the TAPython menu item is after Instrumentation.

A snapshot of 'UI Extension Points' activated

HookName UE4 UE 5
MainbarExtensionHookName Game Play
MainMenuExtensionHookName WindowLayout Instrumentation
MaterialEditorMenuExtensionHookName WindowLayout Instrumentation

The specific parameter meanings are as follows:

Name Purpose
MenuConfigFilePath The main entry for the tool configuration file
ChameleonDataFolder Deprecated
PythonContentFolder The root directory of Python resources
MainbarExtensionHookName The position of the main toolbar ico
MainMenuExtensionHookName The position where the main menu items are created
MenusOnToolbarEnabled Whether to display menu items on the main toolbar
SketchToolsEnabled Whether to enable Sketch tools. Who would want to turn off such a good feature?
LogCreateWidget=False Whether to output CreateWidget information in the Output window
SButtonHorizontalPadding In UE5, it controls the overall button horizontal Padding value, used to avoid the button text being obscured by blank Padding when the button is too small
LogOnTickWarnings=False Whether to output OnTick warning information in the Output window
MaterialEditorMenuExtensionHookName The position where the menu is created in the Material Editor
LogNumberLimit The number of Logs in the Log buffer in PythonTestLib

LogOnTickWarnings

ChameleonTools has a hidden keyword that has not been mentioned: "OnTick". The python code in it is executed during Slate updates. The current maximum Tick frequency in the plugin is 60hz. If you need to use OnTick, you can set LogOnTickWarnings to False, so that OnTick warning information will not be output in the Output window. Please note that OnTick should only be used when absolutely necessary, and the code in OnTick should be as simple as possible, avoiding the use of log or print, which can cause a large amount of repetitive information to flood the screen.

CAUTION
In 95% of cases, Chameleon tools do not need OnTick, which is the reason for the existence of this Warning option. A single Chameleon tool is strictly prohibited from using more than one OnTick, as it makes no sense for Python logic.

TIP
In future TAPython versions, OnTick will be replaced with a Timer that can set the Tick frequency.

Plugin_Config.ini

UE5 \Plugins\TAPython\Config\Plugin_Config.ini

[Advanced]
CopyInitialResource=True
Name Purpose
CopyInitialResource Whether to copy the initial content package to the project directory

When the plugin starts, if the "TA" directory is not found in the project directory, the initial resources in the <Your_UE_Project>\Plugins\TAPython\Resources\DefaultPythonSource directory will be copied to the project directory to ensure that the plugin has basic functionality and can run normally.

Summary

In this section, we introduced the configuration files of the plugin. If you need to modify the position of the menu items, you can modify the various ExtensionHookNames. For other options, using the default values provided by the TAPython plugin is a more reliable choice."