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_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_engine.utils.import module¶
cgl.plugins.unreal_engine.utils.level module¶
cgl.plugins.unreal_engine.utils.perforce module¶
- 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_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.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_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_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_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.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_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.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_engine.utils.uproject module¶
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