text
stringlengths
15
267k
# #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()) import unreal import re # Load the Blueprint class bp_class = unreal.EditorAssetLibrary.load_blueprint_class("/project/") # Get all actors in level a...
import unreal SelectedAsset = unreal.EditorUtilityLibrary.get_selected_assets() # print(SelectedAsset) i : list[str] = [] for i in SelectedAsset: print(i.get_name())
# 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...
""" This script describes how to open and import USD Stages in ways that automatically configure the generated StaticMeshes for Nanite. In summary, there are two different settings you can use: The NaniteTriangleThreshold property (any static mesh generated with this many triangles or more will be enabled for Nanite),...
# 本脚本用于导出当前场景中所有 Component 的 世界Transform 到json文件中 # 这里的component是和catia中层级对应的,即datasmith导入unreal之后,一个component可能包含多个part import unreal import json def get_component_transform(): actors = unreal.get_editor_subsystem(unreal.EditorActorSubsystem).get_all_level_actors() ddm_datasmith = unreal.EditorFilterLibrary....
""" VR Environment Module for ACM Project Manages VR simulations using Unreal Engine. Handles environment initialization, state updates, and agent interactions. """ import unreal import logging import time class VREnvironment: def __init__(self): """ Initialize the VR environment manager. ...
import unreal selected_asset: unreal.Object = unreal.EditorUtilityLibrary.get_selected_assets()[0] is_blueprint = selected_asset.get_class().get_name() == 'Blueprint' print('Selected asset is blueprint: ', selected_asset) if is_blueprint: result_unused_varuable = unreal.BlueprintEditorLibrary.remove_unused_vari...
# Copyright Epic Games, Inc. All Rights Reserved. import os import unreal import flow.cmd import unrealcmd #------------------------------------------------------------------------------- class Show(unrealcmd.Cmd): """ Display the current build configuration for the current project. To modify the configuratio...
# -*- 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...
#!/project/ python3 """ Test Automatic Assignment Verifies that the C++ automatic animation assignment is working """ import unreal def test_automatic_assignment(): """Test that animations are automatically assigned via C++ constructor""" print("=== Testing Automatic Animation Assignment ===") #...
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: ...
import unreal def open_level(level_name, level_path): level_editor_subsystem = unreal.get_editor_subsystem(unreal.LevelEditorSubsystem) # Build the full path to the level full_level_path = f"{level_path}/{level_name}.{level_name}" # Check if the level exists if unreal.EditorAssetLibrary.does_...
import unreal import csv import os contentPath = unreal.Paths.project_content_dir() pythonPath = contentPath + "Python/" filename = "PresetManager/project/.csv" data = [] print('Project Path:', pythonPath) with open(filename, 'r') as file: csv_reader = csv.reader(file) next(csv_reader) # Skip the header row...
for name in list(globals().keys()): if not name.startswith('_'): del globals()[name] import unreal from tqdm import tqdm import json import os import random import numpy as np import math import time import unreal class TaskScene: def __init__(self, original_objects_label=None): if o...
# /project/ # @CBgameDev Optimisation Script - LOG Skeletal Mesh Assets With X Num Of Materials # /project/ import unreal import sys # So we can grab arguments fed into the python script import os EditAssetLib = unreal.EditorAssetLibrary() SkeletalMeshLib = unreal.EditorSkeletalMeshLibrary() workingPath = "/Game/" #...
# Copyright Epic Games, Inc. All Rights Reserved. import os import re import shutil import unreal #------------------------------------------------------------------------------- class Platform(unreal.Platform): name = "Android" def _read_env(self): version = self.get_version() prefix = f"And...
# Copyright Epic Games, Inc. All Rights Reserved. import unreal import unrealcmd import subprocess #------------------------------------------------------------------------------- class _Impl(unrealcmd.Cmd): target = unrealcmd.Arg(str, "Cooked target to stage") platform = unrealcmd.Arg("", "Platform whose c...
import unreal print("=== SETTING UP COMPLETE TEST LEVEL ===") try: # Make sure we're working with TestLevel print("Loading TestLevel...") level_loaded = unreal.EditorLevelLibrary.load_level('/project/') if not level_loaded: print("Creating new TestLevel...") unreal.EditorLevelLibr...
import unreal loaded_subsystem = unreal.get_editor_subsystem(unreal.AssetEditorSubsystem) target = '/project/' loaded = unreal.load_asset(target) loaded_subsystem.open_editor_for_assets([loaded])
import unreal tempSkeleton = '/project/' tempSkeleton = unreal.EditorAssetLibrary.load_asset(tempSkeleton) unreal.AssetTools.create_asset('BS','/project/') BP = '/project/' BP1 = unreal.EditorAssetLibrary.load_asset(BP) unreal.EditorAssetLibrary.get_editor_property(BP1)
# 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 unreal def _log_error(error): import traceback unreal.log_error("{0}\n\t{1}".format(error, "\t".join(traceback.format_stack()))) @unreal.uclass() class PyTestPythonDefinedObject(unreal.PyTestObject): @unreal.ufunction(override=True) def func_blueprint_imp...
import unreal import re # 정규표현식 모듈 임포트 # --- 사용자 설정: 복잡한 이름 <-> 프리픽스 매핑 --- # 소스 이름의 시작 부분 (PC_ 제외, 대문자)을 키로, 원하는 프리픽스를 값으로 추가하세요. # 예: PC_DemiGod_F_... 이름을 'DGF' 프리픽스로 처리하려면 아래와 같이 추가 prefix_mapping = { "DEMIGOD_F": "DGF", # 다른 복잡한 매핑 규칙 추가... } # 매핑 성능을 위해 가장 긴 키부터 확인하도록 정렬 prefix_mapping_sorted = dict(sorte...
# _*_ coding: utf-8 _*_ # @FileName:PVDebug # @Data:2024-05-27 : 09 : 59 # @Author:zhongkailiu # @Contact:user@example.com import unreal print('+++++++++ pv debug Start +++++++++') asset_datas = unreal.EditorUtilityLibrary.get_selected_asset_data() for asset_data in asset_datas: asset = asset_data.get_asset() ...
# 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 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 import os os.startfile("/project/.txt") unreal.log("MOOOOOOOOOOOOOOOO>>>>") unreal.log_warning("This is a warning in here!!!") unreal.log_error("ERR ERR ERR") unreal.log_error(2*5)
import unreal target_path: str loaded_subsystem = unreal.get_editor_subsystem(unreal.AssetEditorSubsystem) loaded_object = unreal.load_asset(target_path) loaded_subsystem.open_editor_for_assets([loaded_object])
import unreal import sys import os import json def create_cinematic_sequence_from_json(anim_dict_path, destination_path="/project/"): """ :param anim_dict_path: path to json with sequence_data :param destination_path: path to where Cinematics are stored in project :return: """ if not os.path....
import unreal world = unreal.EditorLevelLibrary.get_editor_world() for actor in unreal.EditorLevelLibrary.get_all_level_actors(): if isinstance(actor, (unreal.SceneCapture2D, unreal.CameraActor)): unreal.EditorLevelLibrary.destroy_actor(actor) camera_location = unreal.Vector(0, 0, 1000) camera_rotation ...
import os, json, sys, csv try: import unreal # Available when running inside UE embedded Python except Exception: unreal = None from datetime import datetime # Import self-learning knowledge system try: from .knowledge.event_logger import EventLogger from .knowledge.insights_generator import Insights...
import unreal from datetime import datetime from pymongo import MongoClient from geo_change import ues2gps import yaml import os yaml.warnings({'YAMLLoadWarning':False}) def read_yaml(path="gps.conf",option="GPS0"): ''' 读 yaml 文件,提供 UE 静态系下 0,0,0 点的经纬高 ''' if os.path.exists(path): try: ...
import unreal import sys sys.path.append('Z:/project/') import lib_narrs
# 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...
import unreal # Function to get the name of the skeletal mesh from the animation def get_skeletal_mesh_name_from_animation(animation_path): print(f"Loading animation asset from path: {animation_path}") # Load the animation asset animation_asset = unreal.load_asset(animation_path) # Check if the as...
import unreal def print_referencers_of_selected_assets(): # 콘텐츠 브라우저에서 선택한 에셋 가져오기 selected_assets = unreal.EditorUtilityLibrary.get_selected_assets() if not selected_assets: unreal.log("No assets selected.") return for asset in selected_assets: # 에셋의 풀 패스 ("/project...
# -*- 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.")
import unreal unreal.log("ModolsAssetPlacer plugin initialized. Main script is 'modols_asset_placer_tool.py'.")
import logging import os import time import unreal from pprint import pprint # from PIL import Image # import keras_ocr def py_task(func, *args, **kwargs): qualname = func.__qualname__ arg_str = "" if args: arg_str = str(args)[1:-1] if kwargs: if arg_str: arg_str += ", " ...
import unreal import os # Define the root directory of the workspace and the export directory for FBX files # This is used when the script is run standalone, otherwise the export_dir parameter is used WORKSPACE_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) # Default export directory - follows ...
# Copyright Epic Games, Inc. All Rights Reserved. import os import re import unreal import tempfile import flow.cmd import unrealcmd import prettyprinter #------------------------------------------------------------------------------- def _fuzzy_find_code(prompt): import fzf import subprocess as sp rg_ar...
# 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. """ Hook that loads defines all the available actions, broken down by publish type. """ import os import sgtk import unreal i...
# coding: utf-8 import unreal # import AssetFunction_5 as af # reload(af) # print af.getAllOpenedAssets() # af.closeAssets() # ! 加载资产 def openAssets(): assets = [ unreal.load_asset('/project/'), unreal.load_asset('/project/'), unreal.load_asset('/project/') ] unreal.AssetToolsHelp...
import unreal import os import sys # Add the script directory to Python path script_dir = os.path.dirname(__file__) sys.path.append(script_dir) # Import functions from separate modules from Components.grouping import group_actors_by_type from Components.delete_empty_folders import delete_empty_folders menu_owner = ...
import unreal def get_selected_assets(): """Get selected assets from the Content Browser.""" editor_utility = unreal.EditorUtilityLibrary() return editor_utility.get_selected_assets() def spawn_actor_from_asset(asset, location, folder_name): """Spawn an actor in the level from the given asset and assi...
# 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 ...
# 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...
import unreal widget_lib = unreal.WidgetLibrary() level_lib = unreal.EditorLevelLibrary # path = '/project/(1).RenderSequence' path = '/project/.TestButtonWidget' widget_BP = unreal.load_asset(path) sub = unreal.get_editor_subsystem(unreal.EditorUtilitySubsystem) widget = sub.spawn_and_register_tab(widget_BP) # print(...
#! /project/ python # -*- coding: utf-8 -*- """ Initialization module for mca-package """ # mca python imports # software specific imports import unreal # mca python imports def create_control_rig_from_skeletal_mesh(sk_path): """ :param str sk_path: path to a skeletal mesh or skeleton. :return: Return...
import unreal def create_sound_wave(sound_name, package_path, sound_file_path): """Create a new sound wave asset from a sound file.""" factory = unreal.SoundWaveFactory() factory.set_editor_property('SoundFile', sound_file_path) asset_tools = unreal.AssetToolsHelpers.get_asset_tools() return asset_...
import unreal import time unreal.log('Hello World log!' + str(time.time()))
# 本脚本旨在将全部的AO,基于已合并完成的单个AO, # 重新按照工位分类文件夹 # 用于后续按工位合并AO # 执行步骤: # 0. 请确保已经合并完成单个AO # 1. 修改基础变量,执行即可 # csv_path:工位与AO对应关系 # AO_Path:已合并完成的单个AO路径 # GW_Path:工位文件夹路径 import unreal import os import pandas as pd csv_path = r"C:/project/.csv" AO_path = r'/project/' GW_path = r'"/project/' csv_data = pd.read_cs...
# from cgl.plugins.unreal import alchemy as alc from cgl.core.path import PathObject from cgl.plugins.unreal_engine.utils import update_mesh, update_bndl, update_layout, get_asset_task, get_source_path import unreal def run(): workspace_path = unreal.SystemLibrary.convert_to_absolute_path(unreal.Paths.project_dir...
# 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 import sys import unreal_stylesheet from PySide6.QtWidgets import QApplication, QWidget, QPushButton, QVBoxLayout, QHBoxLayout, QFileDialog from PySide6.QtCore import Qt from actorinfowidget import InfoWidget from graphicview import GridGraphicsView from unreallibrary import UnrealLibrary from assetpick...
import unreal from . import helpers # Dictionary containing all the default material sample types MATERIAL_SAMPLER_TYPES = { "Color": unreal.MaterialSamplerType.SAMPLERTYPE_COLOR, "Grayscale": unreal.MaterialSamplerType.SAMPLERTYPE_GRAYSCALE, "Alpha": unreal.MaterialSamplerType.SAMPLERTYPE_ALPHA, "Nor...
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/project/-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Licens...
# 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. """ An Unreal Editor engine for Tank. """ # Note that the VFX Plaform states that in 2019 all DCCs need to support Python 3, ...
import unreal #This script adds all atmosphere related actors to a scene actorLocation = unreal.Vector(0, 0, 0) actorRotation = unreal.Rotator(0, 0, 0) levelSubSys = unreal.get_editor_subsystem(unreal.LevelEditorSubsystem) # create a new atmosphereic actors dirLight = unreal.EditorLevelLibrary.spawn_actor_from_class(...