text
stringlengths
15
267k
# coding=utf8 # Copyright (c) 2020 GVF import unreal import os @unreal.uclass() class BPFunctionLibrary(unreal.BlueprintFunctionLibrary): @unreal.ufunction(ret=bool, params=[str], static=True, meta=dict(Category="Render Sequence")) def RenderSequence(path): capture_settings = unreal.AutomatedLevelSequ...
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. import unreal from typing import Any, Optional from openjd.model.v2023_09 import HostRequirementsTemplate class HostRequirementsHelper: @staticmethod def u_host_requirements_to_openjd_host_requirements( u_host_requirements: unreal...
# This file is based on templates provided and copyrighted by Autodesk, Inc. # This file has been modified by Epic Games, Inc. and is subject to the license # file included in this repository. from __future__ import print_function import sys import os import logging def bootstrap_plugin(plugin_root_path): # Ad...
# Copyright Epic Games, Inc. All Rights Reserved. """ This script is used to import takes for specified device (either iPhone or HMC) A temporary capture source asset is created and all the takes, the source is pointed to, Are imported. As part of the import process all relevant assets are created and A list of captur...
# unreal.AssetToolsHelpers # https://api.unrealengine.com/project/.html # unreal.AssetTools # https://api.unrealengine.com/project/.html # unreal.EditorAssetLibrary # https://api.unrealengine.com/project/.html # All operations can be slow. The editor should not be in play in editor mode. It will not work ...
import unreal # Get the current editor world editor_world = unreal.EditorLevelLibrary.get_editor_world() # Define the location and rotation for the NavMeshBoundsVolume location = unreal.Vector(0, 0, 0) rotation = unreal.Rotator(0, 0, 0) # Spawn the NavMeshBoundsVolume nav_mesh_volume = unreal.EditorLevelLibrary.spaw...
import unreal UEGEAR_AVAILABLE = False unreal.log("Loading ueGear Python Commands...") try: import ueGear.commands UEGEAR_AVAILABLE = True except ImportError as exc: unreal.log_error( "Something went wrong while importing ueGear Python commands: {}".format( exc ) ) finally...
import unreal from Lib import __lib_topaz__ as topaz assets = unreal.EditorUtilityLibrary.get_selected_assets() ## execution here ## for each in assets : if each.__class__ == unreal.Blueprint : comps = topaz.get_component_by_class(each, unreal.StaticMeshComponent) for comp in comps : ...
# -*- coding: utf-8 -*- import time import unreal from Utilities.Utils import Singleton import random import os class ChameleonSketch(metaclass=Singleton): def __init__(self, jsonPath): self.jsonPath = jsonPath self.data = unreal.PythonBPLib.get_chameleon_data(self.jsonPath) self.ui_names ...
# -*- coding: utf-8 -*- """ Created on Tue Feb 20 14:32:43 2024 @author: WillQuantique """ from __future__ import annotations import unreal import random import json ## doc for cine_camera_componenent # https://docs.unrealengine.com/5.0/en-US/project/.html?highlight=set_editor_property ############### todo #########...
import unreal import os def import_and_place_fbx_files_with_subdirs(): """ Imports all FBX files from a specified directory for modern UE5 versions, preserving the subdirectory structure. This prevents texture/material name conflicts. It then places the imported assets in a grid in the current level....
from cgl.plugins.preflight.preflight_check import PreflightCheck from cgl.plugins.perforce.perforce import commit, push from cgl.core.utils.general import load_json from cgl.core.path import PathObject import unreal # there is typically a alchemy.py, and utils.py file in the plugins directory. # look here for pre-built...
import unreal import os import time level_lib = unreal.EditorLevelLibrary() level_subsys = unreal.get_editor_subsystem(unreal.LevelEditorSubsystem) actor_subsys = unreal.get_editor_subsystem(unreal.EditorActorSubsystem) editor_subsys = unreal.get_editor_subsystem(unreal.UnrealEditorSubsystem) layers_subsys = unreal.g...
# /project/ # @CBgameDev Optimisation Script - Log Sound Cues Missing Attenuation Assets # /project/ import unreal import os EditAssetLib = unreal.EditorAssetLibrary() SystemsLib = unreal.SystemLibrary workingPath = "/Game/" # Using the root directory notepadFilePath = os.path.dirname(__file__) + "//PythonOptimiseLog...
import unreal asset_lists :list = unreal.EditorUtilityLibrary.get_selected_assets() asset = asset_lists[0] for each in asset.materials : MI = each.get_editor_property('material_interface') MI_overridable_properties = MI.get_editor_property('base_property_overrides') MI_overridable_properties.set_editor_...
import unreal import subprocess import pkg_resources from pathlib import Path PYTHON_INTERPRETER_PATH = unreal.get_interpreter_executable_path() assert Path(PYTHON_INTERPRETER_PATH).exists(), f"Python not found at '{PYTHON_INTERPRETER_PATH}'" class PackageSolver(): def pip_install(packages): # dont show w...
import unreal def replace_material(original, replacement): assetSubsystem = unreal.get_editor_subsystem(unreal.EditorAssetSubsystem) original_asset = assetSubsystem.load_asset(original) replacement_asset = assetSubsystem.load_asset(replacement) assetSubsystem.consolidate_assets(replacement_asset, [ori...
import unreal def rename_assets(): # instances of unreal classes system_lib = unreal.SystemLibrary() editor_util = unreal.EditorUtilityLibrary() string_lib = unreal.StringLibrary() search_pattern = "new" replace_pattern = "Old" use_case = True # get the selected assets selected_a...
import unreal import os # instances of unreal classes editor_util = unreal.EditorUtilityLibrary() system_lib = unreal.SystemLibrary() editor_asset_lib = unreal.EditorAssetLibrary() asset_reg = unreal.AssetRegistryHelpers.get_asset_registry() assets = asset_reg.get_assets_by_path(directory_text) # Directory mapping D...
import random import unreal from config.config import background_config def load_all_backgrounds(): result = [] cubemap_list = background_config['cubemap_list'] for cubemap_name in cubemap_list: background = Background(cubemap_name=cubemap_name) result.append(background) return(result...
# Copyright Epic Games, Inc. All Rights Reserved. import os import json import time import sys import inspect if sys.version_info.major == 3: from http.client import RemoteDisconnected from . import rpc from . import remote_execution try: import unreal except (ModuleNotFoundError if sys.version_info.major =...
# py automise script by Minomi ## run with python 2.7 in UE4 #######################################import modules from here################################# from pyclbr import Class import unreal import re from typing import List #######################################import modules end#############################...
import unreal def set_stencil_for_template_actors(stencil_value=1): editor_actor_subsystem = unreal.get_editor_subsystem(unreal.EditorActorSubsystem) all_actors = editor_actor_subsystem.get_all_level_actors() updated_actors = [] print(f"🔍 Setting stencil for TemplateActors with Static Mesh containin...
import unreal print("=== FINAL LEVEL SETUP ===") try: print("Setting up complete level with character...") # Create or load the level print("Creating/Loading TestLevel...") world = unreal.EditorLevelLibrary.new_level('/project/') print("✓ Level ready") # Set the game mode for th...
# Copyright (c) <2021> Side Effects Software Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list ...
import unreal asset_library:unreal.EditorAssetLibrary = unreal.EditorAssetLibrary() def find_asset(folder_path, name): assets = asset_library.list_assets(folder_path) for asset in assets: if name == asset[asset.rfind("/") + 1 : asset.rfind(".")]: return asset return None def import_tex...
import unreal import json from pathlib import Path CONTENT_DIR = unreal.Paths.project_content_dir() CONTENT_DIR = unreal.Paths.convert_relative_path_to_full(CONTENT_DIR) MAPPING_FILE = "python/project/.json" MAPPING_FILE_PATH = CONTENT_DIR + MAPPING_FILE editor_util = unreal.EditorUtilityLibrary() sys_lib =...
# General BP Maker ##Runs with Unreal Python Module import unreal import re def get_bp_c_by_name(__bp_dir:str) -> str : __bp_c = __bp_dir + '_C' return __bp_c def get_bp_mesh_comp (__bp_c:str) : #source_mesh = ue.load_asset(__mesh_dir) loaded_bp_c = unreal.EditorAssetLibrary.load_blueprint_cl...
import unreal levelActors = unreal.get_editor_subsystem(unreal.EditorActorSubsystem).get_all_level_actors() staticMeshActors = [] for levelActor in levelActors: if(levelActor.get_class().get_name() == 'StaticMeshActor'): StaticMeshComponent = levelActor.static_mesh_component if StaticMesh...
# _ # (_) # _ __ ___ __ _ _ __ ___ ___ _ __ _ ___ _ __ ___ # | '_ ` _ \ / _` | '_ ` _ \ / _ \| '_ \| |/ _ \ '_ ` _ \ # | | | | | | (_| | | | | | | (_) | | | | | __/ | | | | | # |_| |_| |_|\__,_|_| |_| |_|\___/|_| |_|_|\___|_| |_| |_| # www.mamoniem.com # www.ue4u.xyz #Copyright 20...
import unreal import os def reimport_data_table(data_table_path, csv_file_path): # Trova l'asset della data table data_table_asset = unreal.EditorAssetLibrary.load_asset(data_table_path) if not data_table_asset: unreal.log_error(f"Data table {data_table_path} non trovata.") return Fals...
# -*- coding: utf-8 -*- """Load UAsset.""" from pathlib import Path import shutil from ayon_core.pipeline import ( get_representation_path, AYON_CONTAINER_ID ) from ayon_core.hosts.unreal.api import plugin from ayon_core.hosts.unreal.api import pipeline as unreal_pipeline import unreal # noqa class UAssetLo...
# Copyright Epic Games, Inc. All Rights Reserved. import os import unreal import flow.cmd from peafour import P4 import subprocess as sp from pathlib import Path #------------------------------------------------------------------------------- class _Collector(object): def __init__(self): self._dirs = [] ...
# Copyright Epic Games, Inc. All Rights Reserved. import os import unreal import unrealcmd #------------------------------------------------------------------------------- def _find_autosdk_llvm(autosdk_path): path = f"{autosdk_path}/Host{unreal.Platform.get_host()}/project/" best_version = None if os.pa...
import unreal from unreal import (MeshLODSelectionType, ScopedSlowTask, StaticMeshActor) # progress bar with ScopedSlowTask(4, "Create proxy LOD") as slow_task: slow_task.make_dialog(True) slow_task.enter_progress_frame(1) actorSubsystem = unreal.get_editor_subsystem(unreal.EditorActorSubsystem) asse...
# unreal.SystemLibrary # https://api.unrealengine.com/project/.html import unreal import random # active_viewport_only: bool : If True, will only affect the active viewport # actor: obj unreal.Actor : The actor you want to snap to def focusViewportOnActor(active_viewport_only=True, actor=None): command = 'CAME...
# -*- coding: utf-8 -*- """ Documentation: """ import os import sys DJED_ROOT = os.getenv('DJED_ROOT') utils_path = os.path.join(DJED_ROOT, 'src') sysPaths = [DJED_ROOT, utils_path] for sysPath in sysPaths: if sysPath not in sys.path: sys.path.append(sysPath) from dcc.unreal.api.open_socket import liste...
# coding: utf-8 import unreal import argparse parser = argparse.ArgumentParser() parser.add_argument("-vrm") parser.add_argument("-rig") parser.add_argument("-meta") args = parser.parse_args() #print(args.vrm) humanoidBoneList = [ "hips", "leftUpperLeg", "rightUpperLeg", "leftLowerLeg", "rightLowerLeg", "leftF...
# unreal.EditorLevelLibrary # https://api.unrealengine.com/project/.html # unreal.GameplayStatics # https://api.unrealengine.com/project/.html # unreal.Actor # https://api.unrealengine.com/project/.html import unreal import PythonHelpers # use_selection: bool : True if you want to get only the selected actor...
import unreal import argparse # Info about Python with IKRigs here: # https://docs.unrealengine.com/5.2/en-US/using-python-to-create-and-edit-ik-rigs-in-unreal-engine/ # https://docs.unrealengine.com/5.2/en-US/using-python-to-create-and-edit-ik-retargeter-assets-in-unreal-engine/ # Figure out the forward axis for a c...
import unreal def show_popup_message(title, message): """ Display a pop-up message in the Unreal Engine editor. Args: title (str): The title of the pop-up window. message (str): The text to display in the pop-up. """ unreal.EditorDialog.show_message( title=title, me...
import unreal class myBound(): def __init__(self, bound): self.bound = bound self.level = bound.get_outer() self.bounds = bound.get_actor_bounds(False) # (origin, box_extent) self.name = self.level.get_path_name().split('.')[-1].split(':')[0] def __eq__(self, other): ...
# Nanite On 시키는 코드 import unreal selected_assets = unreal.EditorUtilityLibrary.get_selected_assets() for nanitemesh in selected_assets : meshNaniteSettings : bool = nanitemesh.get_editor_property('nanite_settings') if meshNaniteSettings.enabled == True : if meshNaniteSettings.preser...
import unreal from os.path import dirname, basename, isfile, join import glob import importlib import traceback import sys dir_name = dirname(__file__) dir_basename = basename(dir_name) modules = glob.glob(join(dir_name, "*.py")) __all__ = [ basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.p...
from infrastructure.configuration.path_manager import PathManager from infrastructure.utils.file_extension_helper import FileExtensionHelper import unreal from typing import Protocol from abc import abstractmethod import os import re class ImportAssetService(): def __init__(self, _editorAssetLibrary: unreal.Edito...
# -*- coding: utf-8 -*- """Loader for published alembics.""" import os from ayon_core.pipeline import ( get_representation_path, AYON_CONTAINER_ID ) from ayon_core.hosts.unreal.api import plugin from ayon_core.hosts.unreal.api.pipeline import ( AYON_ASSET_DIR, create_container, imprint, ) import u...
import unreal import unreal_uiutils from unreal_global import * from unreal_utils import AssetRegistryPostLoad unreal.log("""@ #################### Init Start up Script #################### """) assetregistry_pretickhandle = None def assetregistry_postload_handle(deltaTime): """ Run callback method af...
import unreal from pamux_unreal_tools.base.material_expression.material_expression_container_factory_base import MaterialExpressionContainerFactoryBase class MaterialFactoryBase(MaterialExpressionContainerFactoryBase): def __init__(elf, asset_class: unreal.Class, asset_factory: unreal.Factory, container_wrapper_c...
# coding: utf-8 from asyncio.windows_events import NULL import unreal import argparse parser = argparse.ArgumentParser() parser.add_argument("-vrm") parser.add_argument("-rig") parser.add_argument("-meta") args = parser.parse_args() print(args.vrm) reg = unreal.AssetRegistryHelpers.get_asset_registry(); ## rigs = ...
# Copyright Epic Games, Inc. All Rights Reserved # Third party import unreal # Internal from .base_menu_action import BaseActionMenuEntry class DeadlineToolBarMenu(object): """ Class for Deadline Unreal Toolbar menu """ TOOLBAR_NAME = "Deadline" TOOLBAR_OWNER = "deadline.toolbar.menu" PAREN...
# unreal.AssetToolsHelpers # https://api.unrealengine.com/project/.html # unreal.AssetTools # https://api.unrealengine.com/project/.html # unreal.EditorAssetLibrary # https://api.unrealengine.com/project/.html # All operations can be slow. The editor should not be in play in editor mode. It will not work ...
# Copyright (C) 2024 Louis Vottero user@example.com All rights reserved. from .. import util, util_file import os import unreal from .. import unreal_lib def import_file(filepath, content_path=None, create_control_rig=True): filename = util_file.get_basename_no_extension(filepath) content_path = content...
# This script shows how to setup dependencies between variants when using the Variant Manager Python API import unreal lvs = unreal.VariantManagerLibrary.create_level_variant_sets_asset("LVS", "/Game/") if lvs is None: print ("Failed to spawn either the LevelVariantSets asset or the LevelVariantSetsActor!") q...
from typing import Optional, Union import unreal @unreal.uclass() class UnlockAllActorsCommand(unreal.ActorLockerPythonCommand): current_map = unreal.uproperty(unreal.AssetData) current_id = unreal.uproperty(int) maps = unreal.uproperty(unreal.Array(unreal.AssetData)) def load_map(self, map_asset: ...
# Copyright Epic Games, Inc. All Rights Reserved """ This script handles processing manifest files for rendering in MRQ """ import unreal from getpass import getuser from pathlib import Path from .render_queue_jobs import render_jobs from .utils import movie_pipeline_queue def setup_manifest_parser(subparser): ...
"""Runner for starting blender or unreal as a rpc server.""" import json import os import platform import re import shutil import subprocess import threading import time from abc import ABC, abstractmethod from bisect import bisect_left from functools import lru_cache from http.client import RemoteDisconnected from pa...
import unreal all_actors = unreal.EditorLevelLibrary.get_all_level_actors() for actor in all_actors: mesh_components = actor.get_components_by_class(unreal.StaticMeshComponent) if not mesh_components: mesh_components = actor.get_components_by_class(unreal.SkeletalMeshComponent) for mesh_component...
import unreal def get_asset(path): ad = unreal.EditorAssetLibrary.find_asset_data(path) o = unreal.AssetRegistryHelpers.get_asset(ad) return o def get_primary_asset_id(path): return unreal.SystemLibrary.get_primary_asset_id_from_object(unreal.AssetRegistryHelpers.get_asset(unreal.EditorAssetLibrary.find_asset_da...
import os import unreal from ueGear.controlrig import mgear from ueGear.controlrig.manager import UEGearManager from ueGear import assets # --- # TO BE REMOVED FROM FINAL RELEASE import importlib from ueGear.controlrig import manager as ueM from ueGear.controlrig import manager from ueGear.controlrig.components impo...
import unreal asset_registry = unreal.AssetRegistryHelpers.get_asset_registry() folder_path_1 = "/project/" assets = asset_registry.get_assets_by_path(folder_path_1, recursive=True) if assets is not None: print(f"Found {len(assets)} assets in {folder_path_1}") else: print(f"No assets found in {folder_path_1}"...
import unreal target_string = "T_EyeLine_001" target_string = target_string.replace("T_", "") target_string = target_string.replace("mask_", "") print(target_string)
# ============================================================================= # 需要安装的插件: # 1. Cascade To Niagara Converter # 脚本功能: # 检查粒子(Cascade)系统中所有使用的材质是否符合项目规范,包括: # 1. 粒子材质必须为 Material Instance,不能直接使用 Material。 # 2. 粒子材质母材质路径必须在指定目录下(root_path)。 # 3. 粒子材质的 ShadingModel 必须为 Unlit。 # 4. 粒子材质的 BlendMod...
''' export spline type to json file. ''' import unreal import json import os unreal.log(type(terrain_type_array)) type_array = list(terrain_type_array) relpath = unreal.Paths.project_saved_dir() path = unreal.Paths.convert_relative_path_to_full(relpath) jsonfile = path + 'nextpcg_terrain_curve_type.json' content = {"t...
# Copyright Epic Games, Inc. All Rights Reserved. import os import unreal #------------------------------------------------------------------------------- class Platform(unreal.Platform): name = "IOS" def _read_env(self): yield from () def _get_version_ue4(self): dot_cs = self.get_unreal...
# -*- coding: utf-8 -*- import unreal import sys import pydoc import inspect import os import json from enum import IntFlag class Singleton(type): _instances = {} def __call__(cls, *args, **kwargs): if cls not in cls._instances: cls._instances[cls] = super(Singleton, cls).__call__(*args, *...
# Copyright (c) <2021> Side Effects Software Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list ...
# Copyright Epic Games, Inc. All Rights Reserved. import os from . import base_server from .base_server import BaseRPCServerThread, BaseRPCServerManager class UnrealRPCServerThread(BaseRPCServerThread): def thread_safe_call(self, callable_instance, *args): """ Implementation of a thread safe cal...
import unreal import logging from .utl_interface import add_logger, UnrealUTLInterface, UnrealInterface, actor_system from dataclasses import dataclass from enum import Enum, auto from typing import List import os try: import fbx import FbxCommon except ImportError: unreal.log_warning("未安装fbx sdk,无法使用相机同步功能...
# Copyright (c) <2021> Side Effects Software Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list ...
# SPDX-License-Identifier: BSD-3-Clause # Rodrigo Nascimento Hernandez import unreal import os import pathlib inputdir = r'/project/' # Enter directory where tiled texture files are stored asset_path = '/Game' material_dir = '/landsmaterials' # Change to your Texture scale calculated by srtm2heightmap.py UE4_TILE_TEX...
import json from enum import Enum, auto import inspect from typing import Callable, Union from concurrent.futures import ThreadPoolExecutor, Future from threading import Lock import logging import unreal logger = logging.getLogger(__name__) class FuncType(Enum): STATIC_METHOD = auto() CLASS_METHOD = auto(...
import unreal @unreal.uclass() class MyPreset(unreal.MoviePipelineMasterConfig): def __init__(self, preset): super(MyPreset, self).__init__(preset) self.copy_from(preset) self.set_file_name() self.set_flush_disk() @unreal.ufunction(ret=None, params=[]) def set_flush_disk...
# For all static mesh actors, read the metadata (datasmith user data) corresponding to certain keys and write the values as CSV file import unreal import os # List of metadata key that are of interest keys = ["Datasmith_UniqueId", "Description", "Material", "Struct__Matl", "Cost", "Absorptance", "Base_Constraint", "B...
# _ # (_) # _ __ ___ __ _ _ __ ___ ___ _ __ _ ___ _ __ ___ # | '_ ` _ \ / _` | '_ ` _ \ / _ \| '_ \| |/ _ \ '_ ` _ \ # | | | | | | (_| | | | | | | (_) | | | | | __/ | | | | | # |_| |_| |_|\__,_|_| |_| |_|\___/|_| |_|_|\___|_| |_| |_| # www.mamoniem.com # www.ue4u.xyz #Copyright 20...
import unreal # Get the world and camera world = unreal.EditorLevelLibrary.get_editor_world() camera_actors = unreal.GameplayStatics.get_all_actors_of_class(world, unreal.CameraActor) camera = camera_actors[0] if camera_actors else None if camera: # Capture scene viewport = unreal.ViewportClient() viewpor...
import unreal from collections import OrderedDict def get_texture_paths(directory): texture_dict = {} assets = unreal.EditorAssetLibrary.list_assets(directory, recursive=True) for asset in assets: asset_name = asset.split('/')[-1].split('.')[0] package_name = '/'.join(asset.split('/')[:-1])...
from dataclasses import dataclass from typing import Any import unreal @dataclass class AssetData: def __init__(self, assetData) -> None: self.asset = assetData.get_asset() self.assetName = self.asset.get_name() self.assetPathName = self.asset.get_path_name() self.assetClassName = ...
#!/project/ python3 """ Asset Import Monitor for Terminal Grounds Watches ComfyUI output directory and triggers UE5 import Author: CTO Architect """ import os import time import json import shutil from pathlib import Path from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler impor...
# Copyright (c) <2021> Side Effects Software Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list ...
import json import unreal def update_camera_settings(cine_cam_component) : if cine_cam_component == "MENU" : outliner = unreal.get_editor_subsystem(unreal.EditorActorSubsystem) selection = outliner.get_selected_level_actors() cine_cam_component = selection[0].get_cine_c...
import unreal def update_selected_attach_track_constraint_ids(): """ 현재 Level Sequence에서 선택된 바인딩들을 대상으로 다음 작업을 수행합니다: 1. 첫 번째 선택된 바인딩을 Constraint ID의 소스로 지정합니다. 2. 나머지 선택된 바인딩들에서 Attach 트랙(MovieScene3DAttachTrack)을 찾습니다. 3. 찾아낸 모든 Attach 트랙 섹션의 Constraint Binding ID를 1번 소스 바인딩의 현재 시퀀스 컨텍스트에 ...
import unreal def main(): from ToolShelf import shelf_start; shelf_start.start(False) section_name = 'ToolShelf' se_command = 'from ToolShelf import shelf_start;shelf_start.start()' label = 'ToolShelf Gallery' menus = unreal.ToolMenus.get() level_menu_bar = menus.find_menu('LevelEditor.Leve...
import unreal import importlib import subprocess from Lib import __lib_topaz__ as topaz importlib.reload(topaz) def __init__() -> None: ''' # Description: Source Control Support ## Don't use [UnrealPath], use [ExplorerPath] instead ### Example: /Game/[Asset] -> D:/project/[Asset] ''' print...
# Copyright Epic Games, Inc. All Rights Reserved """ Deadline Job object used to submit jobs to the render farm """ # Built-In import logging # Third-party import unreal # Internal from deadline_utils import merge_dictionaries, get_deadline_info_from_preset from deadline_enums import DeadlineJobStatus logger = lo...
# 本脚本的前置为 export_actor_json.py,同样是导出场景actor的transform为json # 只不过对于datasmith,根据需求进行了自定义 import unreal import json import os import pandas as pd # TODO:每次执行之前修改这里 saved_json_folder = r"C:/project/" saved_level_folder = r"/project/" # 执行之前保证这个路径下空的 # 已生成的json的列表 json_name = [] asset_paths = [] selected_assets = ...
""" UEMCP Utilities - Common utility functions for all modules """ import os import unreal def create_vector(location_array): """Create an Unreal Vector from a 3-element array. Args: location_array: [X, Y, Z] coordinates Returns: unreal.Vector """ return unreal.Vector(float(loc...
#! /project/ python # -*- coding: utf-8 -*- """ Initialization module for mca-package """ # mca python imports # software specific imports import unreal # mca python imports from mca.common import log from mca.ue.assettypes import asset_mapping, py_material_instance from mca.ue.texturetypes import texture_2d logger ...
import unreal import re referenced_assets = [] non_referenced_assets = [] throwable_sm_assets = [] throwable_bp_assets = [] def logit0(info): unreal.log(info) def logit(info): unreal.log_warning(info) def logit2(info): unreal.log_error(info) all_lib_assets = unreal.EditorAssetLibrary.list_assets("/Gam...
# Copyright Epic Games, Inc. All Rights Reserved. import os import unreal #------------------------------------------------------------------------------- class Prompt(object): def prompt(self, context): try: self._get_ue_branch(context) except EnvironmentError: self._get_g...
# coding: utf-8 import unreal import argparse parser = argparse.ArgumentParser() parser.add_argument("-rigSrc") parser.add_argument("-rigDst") args = parser.parse_args() #print(args.vrm) ###### ## rig 取得 reg = unreal.AssetRegistryHelpers.get_asset_registry(); a = reg.get_all_assets(); for aa in a: if (aa.get_ed...
# Copyright (c) <2021> Side Effects Software Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list ...
# Copyright (c) <2021> Side Effects Software Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list ...
# -*- coding: utf-8 -*- """ """ from __future__ import division from __future__ import print_function from __future__ import absolute_import __author__ = "timmyliang" __email__ = "user@example.com" __date__ = "2020-12-28 16:07:39" import unreal import os import json from collections import defaultdict # NOTE Pyth...
import unreal # https://docs.unrealengine.com/5.0/en-US/project/.html?highlight=create_asset#unreal.AssetTools.create_asset def create_material(asset_path, new_asset_name): asset_tools = unreal.AssetToolsHelpers.get_asset_tools() material_factory = unreal.MaterialFactoryNew() new_asset = asset_tools.creat...
import unreal def main(): sequence_list = [a for a in unreal.EditorUtilityLibrary.get_selected_assets() if isinstance(a,unreal.LevelSequence)] for sequence in sequence_list: for binding in sequence.get_bindings(): # print(binding.get_name()) for track in binding.get_tracks...
import unreal taget_bp = '/project/.BP_SMtoAnime' selected_asset = unreal.EditorUtilityLibrary.get_selected_assets()[0] editor_subsystem = unreal.get_editor_subsystem(unreal.EditorAssetSubsystem) selected_static_mesh:unreal.StaticMesh = selected_asset if selected_asset.__class__ != unreal.StaticMesh: print('Sel...
# -*- coding: utf-8 -*- import unreal def do_some_things(*args, **kwargs): unreal.log("do_some_things start:") for arg in args: unreal.log(arg) unreal.log("do_some_things end.")
# SPDX-License-Identifier: BSD-3-Clause # Rodrigo Nascimento Hernandez # Tested UE versions: # 4.26.1 # Blueprint: ImportLines import sys import json import unreal # ========================================= user inputs =============================================================== # Change this path pointing to you...
import unreal print("=== PYTHON IS WORKING! ===") print("Creating directories...") try: unreal.EditorAssetLibrary.make_directory('/project/') print("✓ Created Blueprints directory") unreal.EditorAssetLibrary.make_directory('/project/') print("✓ Created Maps directory") print("✓ SUCCESS: Python exec...
import unreal for asset in unreal.EditorUtilityLibrary.get_selected_assets(): if not isinstance(asset, unreal.GroomAsset): continue data = asset.get_editor_property("asset_user_data") print(data) pass