text
stringlengths
15
267k
# -*- 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 """ 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): ...
# -*- coding: utf-8 -*- import random import numpy as np import unreal from Utilities.Utils import Singleton class ChameleonTest(metaclass=Singleton): def __init__(self, jsonPath:str): self.jsonPath = jsonPath self.data = unreal.PythonBPLib.get_chameleon_data(self.jsonPath) self.ui_image ...
from typing import Dict, List, Tuple, Union import unreal from constants import SubSystem, mask_colors from utils import get_world def get_stencil_value(actor: unreal.Actor) -> int: # skeletal mesh component for skeletal_mesh_component in actor.get_components_by_class(unreal.SkeletalMeshComponent): s...
import json import os.path import re import unreal """Creates Actor blueprint with static mesh components from json. WARNING: Works only in UE 5.1 internal API """ # Change me! DO_DELETE_IF_EXISTS = False ASSET_DIR = "/project/" # ASSET_DIR = "/project/" # ASSET_DIR = "/project/" JSON_FILEPATH = "C:/project/ Project...
# This file is generated. Please do NOT modify. import unreal from pamux_unreal_tools.impl.material_expression_impl import MaterialExpressionImpl from pamux_unreal_tools.impl.material_expression_editor_property_impl import MaterialExpressionEditorPropertyImpl from pamux_unreal_tools.impl.in_socket_impl import InSocketI...
# 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) #print(dummy[3]) humanoidBoneList = [ "hips", "leftUpperLeg", "rightUpperLeg", "leftLowerLeg", "rightL...
# -*- coding: utf-8 -*- """ Created on Sat Apr 13 11:46:18 2024 @author: WillQuantique """ import unreal import time import random as rd import numpy as np import asyncio def reset_scene(sequence_path): """ Deletes the specified sequence from the asset library and removes the MetaHuman actor and camera acto...
import unreal actorsCount = 50 slowTaskDisplayText = "Spawning actors in the level..." @unreal.uclass() class MyEditorUtility(unreal.GlobalEditorUtilityBase): pass selectedAsset = MyEditorUtility().get_selected_assets() with unreal.ScopedSlowTask(actorsCount, slowTaskDisplayText) as ST: ST.make_dialog(True)...
#! /project/ python # -*- coding: utf-8 -*- """ Module that contains functions related with Unreal tag functionality for ueGear. """ from __future__ import print_function, division, absolute_import import unreal from . import helpers, assets TAG_ASSET_TYPE_ATTR_NAME = "ueGearAssetType" TAG_ASSET_ID_ATTR_NAME = "ue...
import unreal def import_assets(self): """ Import assets into project. """ # list of files to import fileNames = [ '/project/.fbx', ] # create asset tools object assetTools = unreal.AssetToolsHelpers.get_asset_tools() # create asset import data object assetImportData =...
# -*- coding: utf-8 -*- """ """ from __future__ import division from __future__ import print_function from __future__ import absolute_import __author__ = "timmyliang" __email__ = "user@example.com" __date__ = "2021-08-09 15:36:57" import unreal (mesh,) = unreal.EditorUtilityLibrary.get_selected_assets() physics ...
# Copyright Epic Games, Inc. All Rights Reserved # Third-party import unreal @unreal.uclass() class BaseActionMenuEntry(unreal.ToolMenuEntryScript): """ This is a custom Unreal Class that adds executable python menus to the Editor """ def __init__(self, callable_method, parent=None): """...
# -*- coding: utf-8 -*- import logging import unreal import inspect import types import Utilities from collections import Counter class attr_detail(object): def __init__(self, obj, name:str): self.name = name attr = None self.bCallable = None self.bCallable_builtin = None ...
import json import re import unreal """ Should be used with internal UE Python API Replace all actors of given asset in the level by another asset, saving coords, rotation and scale""" level_actors = unreal.EditorLevelLibrary.get_all_level_actors() def get_path_from_ref(string): path = re.search(r"'(?P<path>....
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. import os import sys from http import HTTPStatus from typing import Optional if "PYTHONPATH" in os.environ: for p in os.environ["PYTHONPATH"].split(os.pathsep): print(f"Adding PYTHONPATH {p} to sys.path") if p not in sys.path: ...
import unreal from pamux_unreal_tools.impl.material_impl import MaterialImpl from pamux_unreal_tools.base.material.material_factory_base import MaterialFactoryBase class MaterialFactory(MaterialFactoryBase): def __init__(self): super().__init__(unreal.Material, unreal.MaterialFactoryNew(), MaterialImpl)
''' import unreal selected_assets = unreal.EditorUtilityLibrary.get_selected_assets() def testGraphTraversalBackwardTrace(mat, prop = unreal.MaterialProperty.MP_EMISSIVE_COLOR): output_node = unreal.MaterialEditingLibrary.get_material_property_input_node(mat, prop) assert output_node != None, "No Output i...
import unreal import json from collections import namedtuple PythonExamplePayload = namedtuple("PythonExamplePayload", "map_name actor_name") @unreal.uclass() class HyperlinkPythonExample(unreal.HyperlinkDefinitionBlueprintBase): @unreal.ufunction(override=True) def initialize_impl(self) -> None: ...
import unreal # Collect all assets in the project all_assets = unreal.EditorAssetLibrary.list_assets("/Game") # Initialize an empty set to hold assets used in levels used_assets = set() # For each level in the project for level_path in unreal.EditorAssetLibrary.list_assets("/project/"): # Load the level leve...
import unreal import json # instances of unreal classes editor_util = unreal.EditorUtilityLibrary() system_lib = unreal.SystemLibrary() # prefix mapping prefix_mapping = {} with open("/project/ Examples\\Bluetilities\\PyScripts\\prefix_mapping.json", "r") as json_file: prefix_mapping = json.loads(json_file.read()...
# -*- coding: utf-8 -*- import unreal import Utilities.Utils def print_refs(packagePath): print("-" * 70) results, parentsIndex = unreal.PythonBPLib.get_all_refs(packagePath, True) print ("resultsCount: {}".format(len(results))) assert len(results) == len(parentsIndex), "results count not equal paren...
#!/project/ python3 """ Simple script to create just one working animation """ import unreal def log_message(message): """Print and log message""" print(message) unreal.log(message) def create_idle_animation(): """Create just the idle animation to test""" log_message("Creating Idle animation..."...
import unreal import json # Instances of Unreal Classes editor_util = unreal.EditorUtilityLibrary() system_lib = unreal.SystemLibrary() # Prefix mapping prefix_mapping = {} # Load the prefix mapping from a JSON file with open("prefix_mapping.json", "r") as json_file: prefix_mapping = json.loads(json_file.read())...
# -*- 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 ...
# 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 ...
''' File: change_material_param Author: Date: Description: First attempt to interface with a Other Notes: ''' import random import time import unreal def toggle_param(material_path, param): ############################ # Get the material instance # # Lessons: # 1) Cannot use the 'E...
import unreal import os from datetime import date def get_dependencies_hard(asset_data): """ get the dependencies hard from the asset data, deep is one """ dependencies_hard = None if isinstance(asset_data, unreal.AssetData): asset_registry = unreal.AssetRegistryHelpers.get_asset_registry() ...
# Copyright Epic Games, Inc. All Rights Reserved. import os import signal import unreal import subprocess #------------------------------------------------------------------------------- class Debugger(unreal.Debugger): name = "lldb" def _disable_ctrl_c(self): def nop_handler(*args): pass sel...
import unreal import sys from unreal import Vector rosbridge_port = 9090 args = unreal.SystemLibrary.get_command_line() tokens, switches, params = unreal.SystemLibrary.parse_command_line(args) if "rosbridge_port" in params: rosbridge_port = int(params["rosbridge_port"]) unreal.log("rosbridge_port: " + str(ro...
import asyncio import importlib import sys import unreal import os counter = 0# Static counter variable loop = asyncio.SelectorEventLoop() def get_counter() -> int: """Get the current value of the static counter.""" global counter return counter def increment_counter() -> int: """Increment the stat...
# -*- coding: utf-8 -*- """ 渲染 sequencer 的画面 选择 LevelSequence 批量进行渲染 """ from __future__ import division from __future__ import print_function from __future__ import absolute_import __author__ = 'timmyliang' __email__ = 'user@example.com' __date__ = '2020-07-14 21:57:32' import unreal import os import subprocess fr...
import unreal input_list:list[list[str, str]] selected_assets:list[unreal.Object] = unreal.EditorUtilityLibrary.get_selected_assets() input_list = [["CreatedBy","HeyThere"],["Category","Chair"]] for asset in selected_assets: asset_path = asset.get_path_name().split('.')[0] loaded_asset = unreal.EditorAssetLib...
from pysolar.solar import get_altitude, get_radiation_direct import datetime import unreal # Pysolar calculations latitude = 42.206 longitude = -71.382 date = datetime.datetime.now(datetime.timezone.utc) altitude = get_altitude(latitude, longitude, date) radiation = get_radiation_direct(date, altitude) # Unreal Engi...
# Copyright Epic Games, Inc. All Rights Reserved """ This script handles processing jobs for a specific sequence """ import unreal from getpass import getuser from .render_queue_jobs import render_jobs from .utils import ( movie_pipeline_queue, project_settings, get_asset_data ) def setup_sequence_pars...
import unreal loaded_subsystem = unreal.get_editor_subsystem(unreal.EditorAssetSubsystem) selected_assets: list[unreal.Object] = unreal.EditorUtilityLibrary.get_selected_assets() selected_sm: unreal.SkeletalMesh = selected_assets[0] duplicate_this_outline = '/project/' loaded_be_duplicated = unreal.load_asset(duplic...
# AdvancedSkeleton To ControlRig # Copyright (C) Animation Studios # email: user@example.com # exported using AdvancedSkeleton version:x.xx import unreal import re engineVersion = unreal.SystemLibrary.get_engine_version() asExportVersion = x.xx asExportTemplate = '4x' print ('AdvancedSkeleton To ControlRig (Unreal:'+e...
# -*- coding utf-8 -*- import unreal """ using import TPS_Modules.blueprint_update_parameter as blueprint_update_parameter import importlib importlib.reload(blueprint_update_parameter) blueprint_update_parameter.set_selected_assets_property("IntVar", 9999) blueprint_update_parameter.set_selected_assets_property("Va...
import json import unreal red_lib = unreal.RedArtToolkitBPLibrary objects = red_lib.get_all_objects() # objects = red_lib.get_all_properties() # print(len(objects)) path_list = [] for obj in objects: try: path_list.append(obj.get_path_name()) except: print("error -> %s" % obj) path_list = [fu...
#!/project/ python3 """ Character Blueprint Setup - Python Implementation =============================================== This script configures the character Blueprint with proper components, movement logic, and animation setup for the 2D warrior character. Features: - Component setup (PaperFlipbookComponent, Capsul...
import unreal import math def spawn_cube(location = unreal.Vector(0, 0, 0), rotation = unreal.Rotator(0, 0, 0)): # Get the system to control the actors editor_actor_subs = unreal.get_editor_subsystem(unreal.EditorActorSubsystem) # Create a StaticMeshActor actor_class = unreal.StaticMeshActor ...
#!/project/ python # -*- coding: utf-8 -*- """ Module that contains installer related functions for Autodesk Maya """ # System global imports import os # software specific imports import unreal # mca python imports from mca.common.paths import project_paths from mca.common import log UE_ROOT = project_paths.MCA_UNRE...
import unreal import argparse import json def get_scriptstruct_by_node_name(node_name): control_rig_blueprint = unreal.load_object(None, '/project/') rig_vm_graph = control_rig_blueprint.get_model() nodes = rig_vm_graph.get_nodes() for node in nodes: if node.get_node_path() == node_name: ...
#! /project/ python # -*- coding: utf-8 -*- """ Initialization module for mca-package """ # mca python imports # software specific imports import unreal # mca python imports from mca.ue.rigging.controlrig import cr_config def get_top_level_graph_node(control_rig, node_name): """ Returns a top level graph no...
# -*- coding: utf-8 -*- """Load camera from FBX.""" from pathlib import Path import ayon_api import unreal from unreal import ( EditorAssetLibrary, EditorLevelLibrary, EditorLevelUtils, LevelSequenceEditorBlueprintLibrary as LevelSequenceLib, ) from ayon_core.pipeline import ( AYON_CONTAINER_ID, ...
# -*- coding: utf-8 -*- """Loader for Static Mesh 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 ...
#!/project/ python # -*- encoding: utf-8 -*- import unreal from MPath import MPath import unrealLib as ulib import importlib importlib.reload(ulib) ANode = ulib.ANode UNode = ulib.UNode e_util = unreal.EditorUtilityLibrary() a_util = unreal.EditorAssetLibrary() str_util = unreal.StringLibrary() sys_util = unreal.Syste...
import unreal from unreal_python_utility import assets_factory as af from unreal_python_utility import google_sheet_downloader as gsd from unreal_python_utility import google_id_helper as gih INTERLOCUTORS_SHEET_RANGE = "Interlocutors!A2:Z" DIALOGUES_RANGE = "!A2:Z" INTERLOCUTORS_FOLDER_PATH = "/Interlocutors" NODES_F...
# 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 ...
# AdvancedSkeleton To ModularRig # Copyright (C) Animation Studios # email: user@example.com # exported using AdvancedSkeleton version:x.xx import unreal import re engineVersion = unreal.SystemLibrary.get_engine_version() asExportVersion = 'x.xx' asExportTemplate = '4x' print ('AdvancedSkeleton To ModularControlRig (U...
# This python script is meant to be called in the Unreal Engine Python terminal. # This file reads the parameters from a specified directory, and changes the current # environment's materials, THIS SCRIPT DOES NOT TAKE AN IMAGE. from datetime import datetime import os from pathlib import Path import platform from sub...
# Should be used with internal UE API in later versions of UE """ Automatically create material instances based on mesh names (as they are similar to material names and texture names) """ import unreal import os OVERWRITE_EXISTING = False def set_material_instance_texture(material_instance_asset, material_paramete...
import unreal file_a = "/project/.fbx" file_b = "/project/.fbx" imported_scenes_path = "/project/" print 'Preparing import options...' advanced_mesh_options = unreal.DatasmithStaticMeshImportOptions() advanced_mesh_options.set_editor_property('max_lightmap_resolution', unreal.DatasmithImportLightmapMax.LIGHTMAP_512) ...
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...
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_...
# 本脚本用于读取json,散布 mesh 到场景中 # 与 unreal_python_AO\export_actor_json.py 搭配使用 # 变量说明: # json_path: json文件的路径 # asset_path: 要散布的 mesh 的路径 # 执行步骤: # 修改变量名称,执行即可 import unreal import json import os json_path = r"C:/project/-000-001.json" with open(json_path, 'r', encoding='utf-8') as json_file: # TODO:关于json文件的读取&写入 ...
import unreal from Utilities.Utils import Singleton import math try: import numpy as np b_use_numpy = True except: b_use_numpy = False class ImageCompare(metaclass=Singleton): def __init__(self, json_path:str): self.json_path = json_path self.data:unreal.ChameleonData = unreal.PythonB...
# This script describes the different ways of setting variant thumbnails via the Python API import unreal def import_texture(filename, contentpath): task = unreal.AssetImportTask() task.set_editor_property('filename', filename) task.set_editor_property('destination_path', contentpath) task.automated =...
import unreal anime_material = "/project/.MI_CA_Test" selected_assets = unreal.EditorUtilityLibrary.get_selected_assets() editor_subsystem = unreal.get_editor_subsystem(unreal.EditorAssetSubsystem) for selected_asset in selected_assets: if selected_asset.__class__ != unreal.StaticMesh: print('Selected a...
from cgl.plugins.preflight.preflight_check import PreflightCheck from cgl.plugins.unreal_engine.fg_tool import create_window import unreal import os import shutil # there is typically a alchemy.py, and utils.py file in the plugins directory. # look here for pre-built, useful functions # from cgl.plugins.unreal import a...
import math import os import re import inspect import struct import json from typing import List from Utilities.Utils import EObjectFlags from .Utilities import get_latest_snaps, editor_snapshot, assert_ocr_text, py_task from .Utilities import get_ocr_from_file import unreal from Utilities.Utils import Singleton c...
# coding: utf-8 import unreal import os import sys sys.path.append('C:/project/-packages') from PySide.QtGui import * from PySide import QtUiTools WINDOW_NAME = 'Qt Window Two' UI_FILE_FULLNAME = os.path.join(os.path.dirname(__file__), 'ui', 'window_rotate.ui').replace('\\','/') class QtWindowTwo(QWidget): def...
import unreal from queue import Queue from functools import partial from typing import Callable, Any def callable_name(any_callable: Callable[..., Any]) -> str: if isinstance(any_callable, partial): return any_callable.func.__name__ try: return any_callable.__name__ except AttributeError: ...
import unreal for mesh in unreal.EditorLevelLibrary.get_all_level_actors(): if mesh.get_actor_label() == "SM_Sedan_01a" or mesh.get_actor_label() == "SM_SUV_01a": #make a random scale between 0.5 and 1.5 scale_unit = unreal.MathLibrary.random_float_in_range(0.5, 1.5) scale = unreal.Vector(s...
import unreal # Create all assets and objects we'll use lvs = unreal.VariantManagerLibrary.create_level_variant_sets_asset("LVS", "/Game/") lvs_actor = unreal.VariantManagerLibrary.create_level_variant_sets_actor(lvs) if lvs is None or lvs_actor is None: print ("Failed to spawn either the LevelVariantSets asset or...
import unreal def reset_scene(): # Function to clear specific actors from the scene, adapted from your initial reset logic actors_to_delete = ["FA", "Rig", "CineCameraActor"] all_actors = unreal.EditorLevelLibrary.get_all_level_actors() for actor in all_actors: if any(name in actor.get_name() f...
""" UEMCP Viewport Optimization - Disable viewport updates during bulk operations """ from contextlib import contextmanager from typing import Any, Optional, Union import unreal from utils import execute_console_command, log_debug class ViewportManager: """Manages viewport performance during bulk operations.""...
from domain.texture_service import TextureService from infrastructure.data.base_repository import BaseRepository from infrastructure.logging.base_logging import BaseLogging from infrastructure.configuration.path_manager import PathManager from infrastructure.configuration.message import LogTexturesAboveXSizeMessage, Va...
import unreal import inspect class material_function_interface: def __init__(self, asset_path): self.asset_path = asset_path def __call__(self, func): func._asset_path = self.asset_path return func class parameter_name_prefix: def __init__(self, prefix): self.prefix = pref...
import unreal import os RootPath = "/project/" #몬스터 폴더에 넘버링 전까지 고정 LastPath = "/project/" #BS 폴더 고정 BsName_make = 'Airborne_BS' BsName_origin = 'IdleRun_BS_Peaceful' AnimName = '/project/' #공용 BlendSample 제작 defaultSamplingVector = unreal.Vector(0.0, 0.0, 0.0) defaultSampler = unreal.BlendSample() defaultSample...
import unreal @unreal.uenum() class MyPythonEnum(unreal.EnumBase): FIRST = unreal.uvalue(0) SECOND = unreal.uvalue(1) FOURTH = unreal.uvalue(3) @unreal.ustruct() class PythonUnrealStruct(unreal.StructBase): some_string = unreal.uproperty(str) some_number = unreal.uproperty(float) array_of_stri...
from domain.asset_service import AssetService from infrastructure.configuration.path_manager import PathManager from infrastructure.configuration.message import LogDeleteEmptyFolderMessage, LogRedirectsMessage, LogUnusedAssetMessage from infrastructure.data.base_repository import BaseRepository from infrastructure.logg...
import unreal import os import json import sys #from unreal import DataTableFunctionLibrary as DataTableFunctionLibrary class ImportAssetTool: import_path: str destination_path: str def __init__(self, import_path, destination_path): self.import_path = import_path self.destination_pa...
import unreal from pamux_unreal_tools.base.material_expression.material_expression_container_factory_base import MaterialExpressionContainerFactoryBase class MaterialFunctionFactoryBase(MaterialExpressionContainerFactoryBase): def __init__(elf, asset_class: unreal.Class, asset_factory: unreal.Factory, container_w...
import unreal #define actor locaiton actorLocation = unreal.Vector(0, 0, 0) actorRotation = unreal.Rotator(0, 0, 0) levelSubsys = unreal.get_editor_subsystem(unreal.LevelEditorSubsystem) #create new atmosphere actors dirLight = unreal.EditorLevelLibrary.spawn_actor_from_class(unreal.DirectionalLight, actorLocation, ...
#!-!-!-!-!-!-!-!-!-!-!-!-!-!-# ##### ######## IMPORTS ##### print('updater.py has started') import sys import os import shutil import unreal # For keeping a backup of the template files so users dont' have to reimport it everytime. from distutils.dir_util import copy_tree #!-!-!-!-!-!-!-!-!-!-!-!-!-!-# ##### ####...
# Copyright Epic Games, Inc. All Rights Reserved. import os import fzf import unreal import p4utils import flow.cmd import subprocess from peafour import P4 #------------------------------------------------------------------------------- class _RestorePoint(object): def __init__(self): self._files = {} ...
# -*- coding: utf-8 -*- import unreal import numpy as np import math from Utilities.Utils import Singleton class ImagePainter(metaclass=Singleton): def __init__(self, jsonPath:str): self.jsonPath = jsonPath self.data = unreal.PythonBPLib.get_chameleon_data(self.jsonPath) self.ui_image = "I...
import unreal import sys from unreal import Vector # Get a class for spawning my_class = unreal.EditorAssetLibrary.load_blueprint_class('/project/.BP_MRQ_Rain') # Get the editor actor subsystem actor_subsys = unreal.get_editor_subsystem(unreal.EditorActorSubsystem) lst_actors = unreal.EditorLevelLibrary.get_all_leve...
import unreal import os # import time import threading import sys # import aiohttp import asyncio import httpx import websocket import ssl import json import requests # import subprocess from multiprocessing import Process, Queue # Function to get the name of the skeletal mesh from the animation def get_skeletal_me...
# coding: utf-8 import unreal import argparse parser = argparse.ArgumentParser() parser.add_argument("-vrm") parser.add_argument("-rig") parser.add_argument("-debugeachsave") args = parser.parse_args() #print(args.vrm) ###### rigs = unreal.ControlRigBlueprint.get_currently_open_rig_blueprints() print(rigs) for r ...
# -*- coding: utf-8 -*- """ Created on Sat Apr 13 11:46:18 2024 @author: WillQuantique """ import unreal import time import math import random as rd import importlib.util import sys def reset_scene(sequence_path): """ Deletes the specified sequence from the asset library and removes the MetaHuman actor and c...
import unreal def get_all_assets_of_type(type='Skeleton', directory="/Game/"): asset_registry = unreal.AssetRegistryHelpers.get_asset_registry() asset_dict = dict() for data in [asset_data for asset_data in asset_registry.get_assets_by_path(directory, True)]: asset_name = str(data.asset_name) ...
import unreal def my_function(): unreal.log('This is an Unreal log') unreal.log_error('This is an Unreal error!!!') unreal.EditorLevelLibrary.spawn_actor_from_class(unreal.EditorAssetLibrary.load_blueprint_class('/project/.MyBlueprint_C'), unreal.Vector(0, 0, 0), unreal.Rotator(0, 0, 0)) unreal.Editor...
import os, sys, subprocess import urllib.request from urllib.parse import urlparse from subprocess import CalledProcessError import unreal dependencies = { "omegaconf": {}, "einops": {}, "clip": {}, "kornia": {}, "gitpython": {"module": "git"}, "pytorch_lightning": {}, "torch": {"args": "-...
import unreal #This python script should be put into a folder that is accessible to UE and add it to the "startup scripts" in the project settings #https://docs.unrealengine.com/en-US/scripting-the-unreal-editor-using-python/ #overriding Dataprep Operation class #this operation add a tag to static mesh actor with a s...
import unreal import sys from os.path import dirname, basename, isfile, join import glob import importlib import traceback 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...
import unreal def get_selected_asset_dir() : ar_asset_lists = unreal.EditorUtilityLibrary.get_selected_assets() if len(ar_asset_lists) > 0 : str_selected_asset = unreal.EditorAssetLibrary.get_path_name_for_loaded_asset(ar_asset_lists[0]) path = str_selected_asset.rsplit('/', 1)[0] + '/' r...
import unreal selected_assets = unreal.EditorUtilityLibrary.get_selected_assets() for asset in selected_assets: loaded_material_instance: unreal.MaterialInstanceConstant = asset if loaded_material_instance.__class__ == unreal.MaterialInstanceConstant: main_material = asset.get_base_material() ...
from unreal_global import * import unreal_utils import unreal @unreal.uclass() class SampleActorAction(unreal.ActorActionUtility): # @unreal.ufunction(override=True) # def get_supported_class(self): # return unreal.Actor @unreal.ufunction( static=True, meta=dict(CallInEditor=True,...
# 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 ...
from array import array import unreal _seek_comp_name : str = 'CapsuleComponent' _seek_property_name : str = '' selected : array = unreal.EditorUtilityLibrary.get_selected_assets() def swap_bp_obj_to_bp_c ( __bp_list:list) -> list : bp_c_list : list = [] for each in __bp_list : name_selected : str =...
# Copyright 2018 Epic Games, Inc. # Setup the asset in the turntable level for rendering import unreal import os import sys def setup_render_with_movie_render_queue(output_path, unreal_map_path, sequence_path): """ Setup rendering the given map and sequence to the given movie with the Movie render queue. ...
import unreal import math # instances of unreal classes editor_util = unreal.EditorUtilityLibrary() # get the selected assets selected_assets = editor_util.get_selected_assets() num_assets = len(selected_assets) not_pow = 0 for asset in selected_assets: asset_name = asset.get_fname() asset_path = asset.get_p...
import unreal # Ensure that you're using the correct factory classes and API functions. asset_tools = unreal.AssetToolsHelpers.get_asset_tools() # Create or retrieve the Editor Utility Widget. widget_path = "/project/" editor_utility_widget_class = unreal.EditorUtilityWidgetBlueprint editor_utility_widget_factory_cla...
"""This script collects blueprint in-game paths for further processing with clicker. For internal UE API""" import json import unreal # mode = "weapon" mode = "accessory_or_weapon_mod" asset_reg = unreal.AssetRegistryHelpers.get_asset_registry() asset_root_dir = "/project/" assets = asset_reg.get_assets_by_path(asse...
import unreal import os import socket import time is_playing = False tickhandle = None def testRegistry(deltaTime): asset_registry = unreal.AssetRegistryHelpers.get_asset_registry() if asset_registry.is_loading_assets(): unreal.log_warning("still loading...") else: #send the ready signal...