text
stringlengths
15
267k
import unreal import os from collections import defaultdict # actors = unreal.EditorLevelLibrary.get_all_level_actors() # for actor in actors: # if isinstance(actor,unreal.StaticMeshActor): # comp = actor.static_mesh_component # mesh = comp.static_mesh # path = mesh.get_path_name() # ...
import unreal from ayon_core.pipeline import InventoryAction from ayon_unreal.api.pipeline import imprint def find_content_plugin_asset(container_dir): """Search if the asset exists in the content plugin Args: container_dir (str): directory of the container Returns: str: asset, asset pa...
from foundation.mcp_app import UnrealMCP from mcp.server.fastmcp.server import FastMCP import unreal from foundation.utility import like_str_parameter def register_common_tools(mcp : UnrealMCP): @mcp.tool() def test_tool(): return "Hello from first tool!" @mcp.game_thread_tool() def run_p...
# Do not run this from visual studio or the command prompt! # This can only be run from within the unreal editor. # # To run, first ensure that the following plugins are enabled: # Editor Scripting Utilities # Python Editor Script Plugin # Sequencer Scripting # # Then, from the output log, run this script with th...
# -*- coding: utf-8 -*- from pathlib import Path import unreal from ayon_core.hosts.unreal.api.pipeline import ( UNREAL_VERSION, create_folder, get_subsequences, ) from ayon_core.hosts.unreal.api.plugin import ( UnrealAssetCreator ) from ayon_core.lib import ( UILabelDef, UISeparatorDef, B...
# Copyright 2018 Epic Games, Inc. import unreal import os import sys """ Functions to import FBX into Unreal """ def _sanitize_name(name): # Remove the default Shotgun versioning number if found (of the form '.v001') name_no_version = re.sub(r'.v[0-9]{3}', '', name) # Replace any remaining '.' with...
# -*- 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, *...
import os import unreal def main(): path = unreal.EditorUtilityLibrary.get_current_content_browser_path() subfolders = unreal.EditorAssetLibrary.list_assets(path, False, True) for subfolder in subfolders: print(subfolder) main()
import sys from qtpy import QtWidgets, QtCore, QtGui from ayon_core import ( resources, style ) from ayon_core.pipeline import ( get_current_folder_path, get_current_task_name, ) import ayon_api from ayon_core.pipeline.context_tools import change_current_context from ayon_core.tools.utils import hos...
# Copyright (C) 2024 Louis Vottero user@example.com All rights reserved. from vtool import util, unreal_lib from vtool import util_math from vtool import util_file if util.in_unreal: import unreal current_control_rig = None undo_open = False import re import functools def decorator_undo(title=''): de...
import shutil import socket from pathlib import Path from typing import Any, Dict, List, Optional, Tuple from loguru import logger from ..data_structure.constants import PathLike, RenderOutputEnumUnreal from ..rpc import remote_unreal from ..utils import ConverterUnreal from ..utils.functions import unreal_functions ...
import unreal import json import os import sys import csv def create_tabledatas(): project_name = unreal.Paths.get_base_filename(unreal.Paths.get_project_file_path()) #LoadJson json_file_path = unreal.SystemLibrary.get_project_directory() + "/project/.json" print(project_name) print(json_file_path...
# Nguyen Phi Hung @ 2020 # user@example.com import hashlib import unreal import subprocess class AssetRegistryPostLoad: _callbacks = {} @classmethod def register_callback(cls, func, *args, **kws): cls._callbacks[hashlib.md5(str((func, args, kws)).encode()).hexdigest()] = ( func, ...
# -*- coding: utf-8 -*- import os import sys import subprocess import unreal from Utilities.Utils import Singleton import random import re if sys.platform == "darwin": import webbrowser class ChameleonGallery(metaclass=Singleton): def __init__(self, jsonPath): self.jsonPath = jsonPath self.da...
import pandas as pd import unreal """Creates Blueprint Classes for accessoires """ # Change me! ASSET_DIR = "/project/" TABLE_PATH = "C:/project/ Projects/project/" \ "lsm_weapon_mods.csv" GENERAL_TABLE_PATH = "C:/project/ Projects/project/" \ "lsm.csv" BFL = unreal.SubobjectDataB...
import unreal import scripts.UEFileManagerScript as UEFileManager import scripts.popUp as popUp import os import scripts.state.stateManagerScript as stateManagerScript import scripts.export.exportAndSend as exportAndSend class TakeRecorder: """ Class for recording functionality in Unreal Engine. This clas...
from src.OSCListener import OSCListener from src.OSCToSequencer import OSCToSequencerBridge from src.tickHook import tickHooker from src.sequencer.sequencerControls import SequencerControls, get_actor_by_name import unreal def load_in_animation(): seq = unreal.EditorAssetLibrary.load_asset("/project/.empty") c...
# -*- coding: utf-8 -*- import os import sys import subprocess import unreal from Utilities.Utils import Singleton import random import re if sys.platform == "darwin": import webbrowser class ChameleonGallery(metaclass=Singleton): def __init__(self, jsonPath): self.jsonPath = jsonPath self.da...
#from typing_extensions import Self from typing_extensions import Self import unreal class wrapped_sb_bp : dir :str bp_class :object loaded_bp :object name :str def get_selected_asset_dir() -> str : selected_asset = unreal.EditorUtilityLibrary.get_selected_assets()[0]...
# UE 5.6中启动崩溃 import unreal import pypinyin import pandas as pd import json import io import os import openpyxl from openpyxl import load_workbook import traceback @unreal.uclass() class PythonBridgeImplementation(unreal.PythonBridge): @unreal.ufunction(override=True) def function_implemented_in_python(self):...
# -*- coding: utf-8 -*- """ Wrapper for unreal asset SkeletalMesh. """ # mca python imports import random # software specific imports import unreal # mca python imports from mca.common import log from mca.ue.assettypes import py_base_mesh, py_material_instance from mca.ue.utils import asset_utils, asset_import logg...
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...
# /project/ # @CBgameDev Optimisation Script - Log Particles With No LODs # /project/ import unreal import os EditAssetLib = unreal.EditorAssetLibrary() SystemsLib = unreal.SystemLibrary StringLib = unreal.StringLibrary() workingPath = "/Game/" # Using the root directory notepadFilePath = os.path.dirname(__file__) + ...
# 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...
################################################################################################## # File Name: loadHeightmapTiles.py # Author: Wilson Lee # # Purpose: # This script will create a new level (.umap) for every heightmap tile from the given directory # # Arguments: # arg 1 Heightmap Tile Directory (...
""" Unreal Engine 5 Scene Builder Headless script to build UE5 scenes from JSON scene graphs. """ import json import os import sys import unreal from typing import Dict, Any, List, Tuple def load_env_vars(): """Load environment variables from .env file""" env_path = os.path.join(os.path.dirname(os.path.dirnam...
""" AutoMatty Material Builder - SMART SPACING VERSION No more hardcoded coordinates - everything auto-calculated """ import unreal from automatty_config import AutoMattyConfig from automatty_utils import AutoMattyUtils # ======================================== # SMART SPACING SYSTEM # ===============================...
import unreal import sys import os from dotenv import load_dotenv # Add the script directories to sys.path script_dir = os.path.dirname(__file__) sys.path.append(script_dir) sys.path.append(os.path.join(script_dir, "..")) sys.path.append(os.path.join(script_dir, "..", "carla_scripts")) sys.path.append(os.path.join(scri...
import unreal def set_mi_texture(mi_asset, param_name, tex_path): if not unreal.EditorAssetLibrary.does_asset_exist(tex_path): unreal.log_warning("Can't find texture: " + tex_path) return False tex_asset = unreal.EditorAssetLibrary.find_asset_data(tex_path).get_asset() return unreal.Materi...
import unreal import os #Get the classes editor_util_lib = unreal.EditorUtilityLibrary() editor_asset_lib = unreal.EditorAssetLibrary() #Get selected assets selected_assets = editor_util_lib.get_selected_assets() num_assets = len(selected_assets) not_used = 0 #Instantly delete assets or move to Trash folder instant...
# 导出所有static mesh actor 的transform和材质base color到json文件中 import unreal import json def get_static_mesh_actors_transforms_with_color(): actors = unreal.get_editor_subsystem(unreal.EditorActorSubsystem).get_all_level_actors() static_mesh_actors = [actor for actor in actors if isinstance(actor, unreal.StaticMeshA...
import unreal from pathlib import Path from meta_human_dna_utilities.ingest import import_texture from meta_human_dna_utilities.constants import MATERIAL_INSTANCE_PARAMETERS def update_material_instance_params( material_instance: unreal.MaterialInstanceConstant, maps_folder: Path, content_fold...
import json import os import re import time from collections.abc import Iterable from pathlib import Path from subprocess import run import unreal SELECTIVE_OBJECTS = [] projectpath = unreal.Paths.project_plugins_dir() newpath = projectpath + 'Uiana/project/.json' f = open(newpath) JsonMapTypeData = json.load(f) FILE...
import unreal current_world : object = unreal.EditorLevelLibrary.get_editor_world() #get current world day_light_level_path : str = "/project/" #prepared light level unreal.EditorLevelUtils.add_level_to_world(current_world,day_light_level_path,unreal.LevelStreamingAlwaysLoaded)
import os import sys import json import unreal def get_asset_tools(): return unreal.AssetToolsHelpers.get_asset_tools() def get_assets(*args, **kwargs): return unreal.AssetRegistryHelpers.get_asset_registry().get_assets(unreal.ARFilter(*args, **kwargs)) def get_assets_by_class(class_name): return unre...
import unreal import re import os def create_control_rig_from_asset(asset_path): asset = unreal.load_asset(asset_path) if not asset or not isinstance(asset, (unreal.SkeletalMesh, unreal.Skeleton)): raise RuntimeError("Asset must be a SkeletalMesh or Skeleton.") control_rig_bp = unreal.ControlRigB...
import unreal import os import json # Set your folder where the JSON files are located JSON_FOLDER = r"/project/" # Helper: Load a material by its short name def load_material_by_name(name, slot_index=0): assets = unreal.EditorAssetLibrary.list_assets('/Game', recursive=True, include_folder=False) for asset_p...
"""This is just a scratch area for simple class and function designs, before being refactored into a proper location.""" import unreal import ueGear.sequencer as sequencer import ueGear.sequencer.bindings import ueGear.assets as assets import ueGear.commands as ueCommands import ueGear.mayaio as mayaio import importl...
# 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...
# Copyright Epic Games, Inc. All Rights Reserved. import os import unreal #------------------------------------------------------------------------------- class Platform(unreal.Platform): name = "TVOS" def _read_env(self): yield from () def _get_version_ue4(self): dot_cs = self.get_unrea...
# #Generated for: Mr. Gary # By: Juniper (ChatGPT) April 7, 2025 v4 # run in UE python (REPL) bash: exec(open("E:/UNREAL ENGINE/TEMPLATE PROJECTS/project/.py").read()) # filename: generate_wall_collision.py import unreal # Settings for Auto Convex Collision accuracy = 6 max_hull_verts = 8 max_hulls_per_mesh = 2 # Ge...
# Copyright Epic Games, Inc. All Rights Reserved. """ Test (and demo) UE Python stub type hinting/syntax highlighting. This module checks if Python stub type hinting works properly. The file can be executed, but it is also meant to be loaded in a third party Python editor that support type checking (VSCode/PyCharm) a...
# 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 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 from pathlib import Path class Mtl: def __init__(self): self.name = "" self.textureMap = "" self.alphaMap = "" self.diffuse = [0.7, 0.7, 0.7] self.specular = [0.0, 0.0, 0.0] self.ambient = [0.0, 0.0, 0.0] self.trans = 1.0 self.power = 0...
import unreal """ Script will add menus each time the Project starts """ @unreal.uclass() class PyScript(unreal.ToolMenuEntryScript): # Class for all scripts menu_section_name = "Python Tools" script_name = "ScriptName" tool_name = "ToolName" tool_tip = "tip" icon = "BreadcrumbTrail.Delimiter" ...
import unreal import json import os def save_lights_to_json(filename): actor_subsystem = unreal.get_editor_subsystem(unreal.EditorActorSubsystem) actors = actor_subsystem.get_all_level_actors() lights_data = [] for actor in actors: if isinstance(actor, unreal.Light): transform = ac...
# coding: utf-8 import unreal import time import argparse parser = argparse.ArgumentParser() parser.add_argument("-vrm") parser.add_argument("-rig") parser.add_argument("-debugeachsave") args = parser.parse_args() #print(args.vrm) ###### with unreal.ScopedSlowTask(1, "Convert MorphTarget") as slow_task_root: s...
import unreal def rename_assets(search_pattern, replace_pattern): system_lib = unreal.SystemLibrary() editor_util = unreal.EditorUtilityLibrary() string_library = unreal.StringLibrary() #Get assets selected_assests = editor_util.get_selected_assets() num_assets = len(selected_assests) repla...
import unreal import random import unreal_engine.utils as utils from math import pi class PointLight: def __init__(self): self.object = unreal.PointLight(name='pointLight') self.actor = unreal.EditorLevelLibrary.spawn_actor_from_object(self.object, [0., 0., 0.]) self.binding = None de...
import unreal # Step 1: Load all assets into memory def load_assets_in_memory(asset_paths): loaded_assets = [] for path in asset_paths: asset = unreal.EditorAssetLibrary.load_asset(path) if asset: loaded_assets.append(asset) print(f'Loaded asset: {asset.get_name()}') ...
import unreal import tkinter as tk import pprint class wrUESceneCopyPaste(): def __init__(self) -> None: r = tk.Tk() r.withdraw() self.clip = r.clipboard_get() def parse_clipboard(self,clip): """クリップボードをパースしてアセット名、トランスフォームの辞書型のリストを出力 args: clip(str):クリップボードの...
import unreal import math def get_viewport_camera() -> tuple[unreal.Vector, unreal.Rotator]: viewport_cam_info = unreal.EditorLevelLibrary.get_level_viewport_camera_info() return viewport_cam_info viewport_camera_info = get_viewport_camera() if viewport_camera_info: # 카메라의 위치 정보를 가져옴 camera_positio...
import unreal import utils_sequencer from GLOBAL_VARS import PLUGIN_ROOT from data.config import CfgNode from utils import loader_func, log_msg_with_socket from custom_movie_pipeline import CustomMoviePipeline @loader_func def main(render_config_path: str = str(PLUGIN_ROOT / 'misc/render_config_common.yaml')): ...
# # Copyright(c) 2025 The SPEAR Development Team. Licensed under the MIT License <http://opensource.org/project/>. # Copyright(c) 2022 Intel. Licensed under the MIT License <http://opensource.org/project/>. # import argparse import json import os import pandas as pd import posixpath import spear import spear.utils.edi...
# 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 ...
import unreal selected = unreal.EditorLevelLibrary.get_selected_level_actors() for sel in selected: if type(sel) is unreal.StaticMeshActor: break mesh = unreal.EditableMeshFactory.make_editable_mesh(sel,0) print(mesh) # NOTE 获取 StaticMeshComponent component = sel.get_component_by_class(unreal.StaticMesh...
import unreal from .char_asset_common import * WIDGET_BP_PATH = '/project/.EUW_NpcBpAssembler' skeletal_meshes = [] tab_id = None eus = unreal.get_editor_subsystem(unreal.EditorUtilitySubsystem) widget_inst = None msg = "" ### WIDGET ### def check_if_bp_exists( folder_path : str, asset_name : str ...
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. import unreal from typing import Optional, Callable from dataclasses import dataclass, asdict from deadline.unreal_submitter import common from deadline.unreal_logger import get_logger logger = get_logger() asset_registry = unreal.AssetRegistryHe...
# 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 sgtk import unreal from tank_vendor import six import copy import datetime import os import pprint import subprocess import sys import tempfile import re from sgtk.platform.qt import QtGui _OS_LOCAL_STORAGE_PATH_FIELD = { "darwin": "mac_path", "win32": "windows_path", "linux": "linux_path", "li...
# -*- coding: utf-8 -*- import time import unreal from Utilities.Utils import Singleton import random import os import json class ChameleonSketch(metaclass=Singleton): def __init__(self, jsonPath): self.jsonPath = jsonPath self.data = unreal.PythonBPLib.get_chameleon_data(self.jsonPath) se...
import unreal def isGame() -> bool: # pkg if (unreal.SystemLibrary.is_packaged_for_distribution()): return True command_line = unreal.SystemLibrary.get_command_line() if "-game" in command_line: return True elif "-server" in command_line: return True # editor # is...
import unreal def rename_assets(search_pattern, replace_pattern, use_case): # instances of unreal classes system_lib = unreal.SystemLibrary() editor_util = unreal.EditorUtilityLibrary() string_lib = unreal.StringLibrary() # get the selected assets selected_assets = editor_util.get_selected_ass...
import unreal import importlib from Lib import __lib_topaz__ as topaz from Lib import __lib_stelle__ as stelle importlib.reload(topaz) csv_to_read = '/project/.csv' asset_paths = stelle.read_csv_to_list(csv_to_read) asset = unreal.load_asset(asset_paths[0]) print(asset) for asset in asset_paths : actor :...
import unreal from ueGear.controlrig.paths import CONTROL_RIG_FUNCTION_PATH from ueGear.controlrig.components import base_component, EPIC_control_01 from ueGear.controlrig.helpers import controls class Component(base_component.UEComponent): name = "test_Arm" mgear_component = "EPIC_arm_01" def __init__(...
import unreal def create_material(path:str, bco_path:str, es_path:str, mra_path:str, n_path:str, udmi:bool, material_type:str, emissive_type:bool)->unreal.Material: asset_library:unreal.EditorAssetLibrary = unreal.EditorAssetLibrary() if asset_library.do_assets_exist([path]): return asset_library.load_...
import unreal import utils.utils as utils from utils.taskrender import TaskRender from actor.background import Background PATH_MAIN = "/project/" background = Background() level_sequence = unreal.LevelSequenceEditorBlueprintLibrary.get_current_level_sequence() length_animation = 0 on_finished_callback = unreal.OnRend...
# This script describes a generic use case for the variant manager 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 No...
# -*- coding: utf-8 -*- """ Paint Qt Image into UMG and keep response """ # Import future modules from __future__ import absolute_import from __future__ import division from __future__ import print_function # Import built-in modules import os import posixpath import tempfile from dayu_widgets import dayu_theme from f...
from os import listdir import os from os.path import isfile, join import unreal import csv import string import unicodedata import argparse ##Command line to run without editor open ## /project/-Cmd.exe /project/.uproject -run=pythonscript -script="/project/.py" class USendToUnreal: #csv filepaths ''' ...
import unreal subsystem_level = unreal.get_editor_subsystem(unreal.LevelEditorSubsystem) subsystem_actor = unreal.get_editor_subsystem(unreal.EditorActorSubsystem) subsystem_editor = unreal.get_editor_subsystem(unreal.EditorAssetSubsystem) all_actors = subsystem_actor.get_all_level_actors() current_level_name = unreal...
""" Module that sets up the environment variables for MAT """ # mca python imports import os # software specific imports import unreal # mca python imports from mca.ue.rigging.controlrig import cr_base class UEFRAGNode(cr_base.ControlRigBase): def __init__(self, control_rig, fnode): super().__init__(co...
# # Copyright(c) 2025 The SPEAR Development Team. Licensed under the MIT License <http://opensource.org/project/>. # Copyright(c) 2022 Intel. Licensed under the MIT License <http://opensource.org/project/>. # import glob import numpy as np import os import pathlib import posixpath import unreal asset_tools = unreal....
""" Test script to import a model into Unreal Engine. """ import unreal import os import json # This script assumes that the export_from_blender.py script has been run # and the export_path is passed as a parameter to this script # Get the import path from the provided data string (if any) # The data parameter shoul...
import unreal def on_asset_post_import(asset): """在资源导入完成后触发""" if isinstance(asset, unreal.StaticMesh): # 只处理 StaticMesh unreal.log(f"[自动回调] Reimport 完成: {asset.get_name()}") # 在这里调用你的后续脚本 # 例如:修改材质、生成LOD、触发其他工具等 your_custom_script(asset) def your_custom_script(static_mesh): ...
# coding: utf-8 import unreal import argparse print("VRM4U python begin") print (__file__) 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...
# This scripts describes the process of capturing an managing properties with a little more # detail than test_variant_manager.py 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_...
import unreal def replace_specific_base_material(): selected_assets = unreal.EditorUtilityLibrary.get_selected_assets() target_material_path = "/project/" source_material_path = "/project/.M_Masked" target_material = unreal.load_asset(target_material_path) if not target_material: ...
#!/project/ python3 """Scene building automation for Unreal Engine 5.6.""" import json import logging import pathlib import sys from typing import Any, Dict, List, Optional, Type, Union import unreal # Configure logging logging.basicConfig(level=logging.INFO, format='%(levelname)s: %(message)s') logger = logging.get...
''' File: 01-main-Weld_ImagePipeline.py Author: John Smutny Date: 05/project/ Description: This is the main python script that is executed from a Unreal Engine (UE) Editor window to collect screenshots of points on a rectangular mesh with a specific texture applied. In order for this script to com...
import unreal import csv def GetCSV(csvPath): file = open(csvPath, "r") csvReader = csv.reader(file) csvList = list(csvReader) file.close() return csvList def LoadAssets(assetPath): # Based on: # https://docs.unrealengine.com/en-us/project/-and-Automating-the-Editor/Editor-Scripting-How-Tos/Setting-up-Collisi...
"""AutoMatty Plugin Scripts Package""" import automatty_utils import unreal import os import sys import automatty_config from automatty_config import AutoMattyConfig from automatty_utils import AutoMattyUtils
# coding: utf-8 from asyncio.windows_events import NULL from platform import java_ver import unreal import time import argparse print("VRM4U python begin") print (__file__) parser = argparse.ArgumentParser() parser.add_argument("-vrm") parser.add_argument("-rig") parser.add_argument("-meta") args = parser.parse_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 ...
import unreal menu_owner = "questToolViewerOwner" tool_menus = unreal.ToolMenus.get() @unreal.uclass() class createEntry_QuestToolViewer(unreal.ToolMenuEntryScript): @unreal.ufunction(override=True) def execute(self, context): pass registry = unreal.AssetRegistryHelpers.get_asset_registry() ...
# -*- coding: utf-8 -*- import unreal from ayon_core.pipeline import CreatorError from ayon_core.hosts.unreal.api.pipeline import UNREAL_VERSION from ayon_core.hosts.unreal.api.plugin import ( UnrealAssetCreator, ) class CreateCamera(UnrealAssetCreator): """Create Camera.""" identifier = "io.ayon.creato...
import unreal import unreallibrary from PySide6.QtCore import Qt, QPointF, QRectF, QPoint, QRect from PySide6.QtGui import QPen, QPainter, QFont, QIntValidator from PySide6.QtWidgets import QWidget, QPushButton, QVBoxLayout, QHBoxLayout, QFileDialog, QLineEdit from unreallibrary import UnrealLibrary class AssetPicker...
''' File: Author: Date: Description: A narrow proof-of-concept script that will rotate a UE4 CineCamera actor around an object then take screenshots. Rotation will occur in orbit around a particular environment object. Changes will be in distance, azimuth, and aspect dimensions Rotation con...
import os import sys import constants import utils import unreal utils.validate_args_count(6) working_dir = sys.argv[1] plugin_branch = sys.argv[2] engine_version = sys.argv[3] build_platform = sys.argv[4] is_platform_browser = sys.argv[5] project_dir = os.path.join(working_dir, "_WORK_") source_dir = os.path.join(p...
import unreal # Helper function to filter and gather possessable and spawnable actors def gather_actors(editor_actor_subsystem, light_actor_classes): all_actors = editor_actor_subsystem.get_all_level_actors() possessable_actors = [] spawnable_actors = [] for cls in light_actor_classes: filtere...
# Copyright Epic Games, Inc. All Rights Reserved. import os import sys import shutil import unreal import unrealcmd import unreal.cmdline import unreal.zencmd import http.client import json import hashlib #------------------------------------------------------------------------------- class Dashboard(unreal.zencmd.Ze...
# This script describes a generic use case for the variant manager 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 No...
# /project/ # @CBgameDev Optimisation Script - Log Unused Project Assets # /project/ import unreal import os EditAssetLib = unreal.EditorAssetLibrary() workingPath = "/Game/" # Using the root directory notepadFilePath = os.path.dirname(__file__) + "//PythonOptimiseLog.txt" allAssets = EditAssetLib.list_assets(working...
# -*- coding: utf-8 -*- """ """ from __future__ import division, unicode_literals from __future__ import print_function from __future__ import absolute_import __author__ = 'timmyliang' __email__ = 'user@example.com' __date__ = '2021-08-11 22:48:59' import unreal @unreal.uclass() class PyBPFunctionLibrary(unreal.Bl...
import unreal from unreal import ToolMenuContext from CommonFunctions import run_widget tool_menus = unreal.ToolMenus.get() WIDGET_PATH = "/project/" def add_menu(): """添加菜单""" main_menu = tool_menus.find_menu("LevelEditor.MainMenu") main_menu.add_sub_menu( owner="CustomTools", ...
#!/project/ python3 """ Script to recreate the WarriorCharacter Blueprint from scratch """ import unreal def log_message(message): """Print and log message""" print(message) unreal.log(message) def recreate_character_blueprint(): """Recreate the WarriorCharacter Blueprint based on C++ class""" l...
# 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. import unreal import sgtk.platform from . import config import sys import os unreal.log("Loading SG Engine for Unreal from {}...
import unreal from unreal import ToolMenus, ToolMenu, ToolMenuEntry, ToolMenuEntryScript, ToolMenuEntryScriptData, ToolMenuInsertType, UserInterfaceActionType, AppReturnType, EditorDialog # class MenuCommand: # """菜单命令基类""" # def __init__(self, name, label, tooltip, section="CustomSection"): # ...