cgl.plugins.unreal_engine.utils package

Submodules

cgl.plugins.unreal_engine.utils.asset module

cgl.plugins.unreal_engine.utils.engine module

cgl.plugins.unreal.utils.engine.get_engine_version()[source]

Gets the version of unreal engine being used from the ALC_ENGINE env variable

Returns:

The version number of the engine being used. ex. “02.25”

Return type:

version_number (str)

cgl.plugins.unreal.utils.engine.get_unreal_config_path()[source]
cgl.plugins.unreal.utils.engine.get_unreal_exe_path()[source]

Gets the full path to the UnrealEditor.exe application

cgl.plugins.unreal.utils.engine.get_unreal_marketplace_plugins_dir()[source]

Gets the path to the Unreal Marketplace plugins folder

Returns:

Path to the Unreal Marketplace plugins folder

Return type:

plugins_dir (str)

cgl.plugins.unreal.utils.engine.get_unreal_plugins_path()[source]

Gets the path to the Unreal Plugins folder

Returns:

Path to the Unreal Plugins folder

Return type:

plugins_dir (str)

cgl.plugins.unreal.utils.engine.get_unreal_python_path()[source]

Get the full path to the python.exe version for this unreal version.

Returns:

Full path to the python.exe for this unreal version

Return type:

ue_python (str)

cgl.plugins.unreal.utils.engine.get_unreal_version_number()[source]

Gets the version number of the Unreal Engine being used Returns:

cgl.plugins.unreal_engine.utils.import module

cgl.plugins.unreal_engine.utils.level module

cgl.plugins.unreal_engine.utils.perforce module

cgl.plugins.unreal.utils.perforce.commit()[source]

Commit all asset changes in the unreal project

cgl.plugins.unreal.utils.perforce.connect_unreal_to_perforce(company, project, world)[source]
Parameters:
  • company (str) – Company the world belongs to

  • project (str) – Project the world belongs to

  • world (str) – World to be opened

Returns:

True if the world was opened successfully, False if it was not

cgl.plugins.unreal.utils.perforce.get_all_changed_files(project, world)[source]
cgl.plugins.unreal.utils.perforce.get_multi_user_server_port(path_object)[source]

Function to get the port used to access the Unreal Multi User Editor server :param path_object: Path object for the current uproject :type path_object: PathObject

Returns:

the port specified in company globals

cgl.plugins.unreal.utils.perforce.has_perforce_settings(source_control_settings_filepath)[source]
cgl.plugins.unreal.utils.perforce.push()[source]

Pushes all changes to perforce

cgl.plugins.unreal.utils.perforce.setup_location_in_perforce(company, project, world)[source]

Sets up a workspace and pulls the world from the depot and opens it in unreal :param project: Project the world belongs to :type project: str :param world: World to be opened :type world: str

Returns:

True if the world was opened successfully, False if it was not

cgl.plugins.unreal.utils.perforce.setup_multi_user(path_object)[source]

Function to set up MultiUserEditing settings for an unreal project

Parameters:

path_object (PathObject) – Path object for the current uproject

Returns:

False if the settings were not set properly

cgl.plugins.unreal.utils.perforce.write_multi_user_settings(path_object)[source]

Write settings for multi-user in current unreal project settings

Parameters:

path_object (cfg) – Path object for the current unreal uproject

cgl.plugins.unreal.utils.perforce.write_udp_settings(path_object)[source]

Write udp messaging settings for current unreal project :param path_object: Path object for current uproject :type path_object: PathObject

Returns:

True if the settings were written successfully

cgl.plugins.unreal_engine.utils.plugins module

cgl.plugins.unreal.utils.plugins.download_plugin(plugin_name)[source]

Downloads a plugin from Amazon S3 bucket

Parameters:

plugin_name (str) – Name of the plugin to download

Returns:

Path to the downloaded plugin

Return type:

download_path (str)

cgl.plugins.unreal.utils.plugins.get_installed_marketplace_plugins()[source]

Gets a list of all the marketplace plugins installed to unreal engine

Returns:

List of all the marketplace plugins installed to unreal engine

Return type:

plugin_list (list)

cgl.plugins.unreal.utils.plugins.get_marketplace_plugins_for_location(project, location)[source]

Gets a list of all the non-built-in plugins needed for a location

Parameters:
  • project (str) – Project the location belongs to

  • location (str) – Location to check for plugins

Returns:

List of plugins that are not built-in

Return type:

marketplace_plugin_list (list)

Raises:

KeyError – If the uproject file is not in the expected format

cgl.plugins.unreal.utils.plugins.get_missing_local_plugins(project, location)[source]

Gets a list of plugins needed for the uproject that aren’t downloaded to Unreal Engine

Parameters:
  • project (str) – Project the location belongs to

  • location (str) – Location to check for missing plugins

Returns:

List of plugins that are missing from Unreal Engine

Return type:

missing_list (list)

cgl.plugins.unreal.utils.plugins.get_missing_s3_plugins(project, location)[source]

Gets a list of plugins needed for the uproject that aren’t downloaded to Unreal Engine

Parameters:
  • project (str) – Project the location belongs to

  • location (str) – Location to check for missing plugins

Returns:

List of plugins that are missing from Unreal Engine

Return type:

missing_list (list)

cgl.plugins.unreal.utils.plugins.get_plugin_exceptions()[source]

Gets list of exception plugins from cgl.plugins.yaml file. “Exception” plugins are plugins that won’t be listed as “marketplace” plugins in the .uplugin file, but need to be managed with s3

Returns:

List of all the exception plugins

Return type:

exception_list (list)

cgl.plugins.unreal.utils.plugins.get_plugin_zip_path(plugin_name)[source]
cgl.plugins.unreal.utils.plugins.get_plugins_in_s3(engine_version=5.1)[source]

Gets a list of all the plugins in the s3 bucket for the engine version specified

Parameters:

engine_version (float) – Unreal Engine Version to check for plugins. Defaults to 5.1

Returns:

List of all the plugins in the s3 bucket for the engine version specified

Return type:

clean_plugin_list (list)

cgl.plugins.unreal.utils.plugins.plugin_download_handler(project, location)[source]

Checks for missing plugins, downloads them, and unzips the plugins to Unreal Engine

Parameters:
  • project (str) – Project the location belongs to

  • location (str) – Location to check for missing plugins

cgl.plugins.unreal.utils.plugins.plugin_upload_handler(project, location)[source]

Checks for plugins that a location needs that aren’t uploaded to S3

Parameters:
  • project (str) – Project the location belongs to

  • location (str) – Location to check for missing plugins

cgl.plugins.unreal.utils.plugins.unzip_plugin(zip_file_path)[source]

Unzips the plugin file to the Unreal Plugins Folder

Parameters:

zip_file_path (str) – Path to the plugin zip file

cgl.plugins.unreal.utils.plugins.upload_plugin(plugin_name, zip_file_path)[source]

Uploads a plugin to Amazon S3 bucket

Parameters:
  • plugin_name (str) – Name of the plugin to upload

  • zip_file_path (str) – Path to the plugin zip file

Returns:

None

cgl.plugins.unreal.utils.plugins.zip_plugin(plugin_name)[source]

cgl.plugins.unreal_engine.utils.sequence module

cgl.plugins.unreal_engine.utils.setup module

cgl.plugins.unreal.utils.setup.configure_unreal_python_env(company=None, project=None, world=None)[source]

Sets up unreal python env to run alchemy tools and see cookbook

If called with no parameters we set this up in the engine settings, not in the project settings ex: C:Program FilesEpic GamesUE_5.3EngineConfigBaseEngine.ini

Parameters:
  • company (str) – company name

  • project (str) – Project name

  • world (str) – World name

cgl.plugins.unreal.utils.setup.enable_plugins(project, world)[source]

Enables the python plugins for the uproject asset being opened

Parameters:
  • project (str) – Project name

  • world (str) – World name

cgl.plugins.unreal.utils.setup.engine_setup()[source]
cgl.plugins.unreal.utils.setup.get_enabled_plugins(json_obj)[source]

Get list of plugins :param json_obj: json object from uproject file :type json_obj: arr

Returns:

List of enabled plugins

cgl.plugins.unreal.utils.setup.has_engine_settings_string(file_lines)[source]
cgl.plugins.unreal.utils.setup.has_python_settings_string(file_lines)[source]

Checks to see if the project config file has registered python settings already

Parameters:

file_lines (str) – Lines from the config txt file

Returns:

True if there already are python settings, False if no python settings

cgl.plugins.unreal.utils.setup.install_marketplace_plugins()[source]
cgl.plugins.unreal.utils.setup.location_setup(company, project, world)[source]
cgl.plugins.unreal.utils.setup.open_project_in_unreal(company: str, project: str, world: str, *, new_console: bool = False)[source]

Launch Unreal Editor for the given .uproject in a detached process. - Detaches from the current (Alchemy) process group so closing Alchemy won’t kill UE. - Avoids shell=True (safer + faster quoting). - On Windows: choose between a new visible console window (new_console=True) or no console.

Returns (pid) on success; raises RuntimeError on failure.

cgl.plugins.unreal.utils.setup.remove_read_only_attribute(file_path)[source]

Removes read only attribute from file

Parameters:

file_path (str) – Absolute file path to file

cgl.plugins.unreal.utils.setup.set_engine_settings(company, project, world)[source]
cgl.plugins.unreal.utils.setup.unreal_pip_install()[source]
cgl.plugins.unreal.utils.setup.unzip_storyboard_plugin()[source]

cgl.plugins.unreal_engine.utils.uproject module

cgl.plugins.unreal.utils.uproject.get_uproject_path(company, project, world)[source]
cgl.plugins.unreal.utils.uproject.set_default_map(path_object)[source]

Sets a default map to open whenever world is opened in unreal :param path_object: Path object for the current unreal uproject :type path_object: cfg

cgl.plugins.unreal_engine.utils.utils module

cgl.plugins.unreal_engine.utils.world module

cgl.plugins.unreal.utils.world.are_plugins_enabled(uproject_json_object)[source]

Checks to see if python plugins are enabled for the current uproject being opened :param uproject_json_object: Dictionary representation of the uproject json file :type uproject_json_object: dict

Returns:

True if python plugins are enabled, False if no python plugins are enabled

cgl.plugins.unreal.utils.world.get_alchemy_path_object()[source]
cgl.plugins.unreal.utils.world.get_engine_version()[source]

Module contents