text stringlengths 15 267k |
|---|
import unreal
from . import shelf_core
def create_size_wrapper(widget):
size_box = unreal.SizeBox()
size_box.add_child(widget)
return size_box
def create_btn_with_text(text):
button = unreal.EditorUtilityButton()
button_text = unreal.TextBlock()
button_text.font.size = 10
button_text.set_t... |
#!-!-!-!-!-!-!-!-!-!-!-!-!-!-#
#####
######## 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
#!-!-!-!-!-!-!-!-!-!-!-!-!-!-#
#####
####... |
# 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... |
"""
Configuration settings for integration tests.
"""
import os
from typing import Dict, Any
# MCP Server settings
MCP_SERVER_HOST = "localhost"
MCP_SERVER_PORT = 8000
# Blender connection settings
BLENDER_HOST = "localhost"
BLENDER_PORT = 8400
# Unreal Engine connection settings
UNREAL_HOST = "localhost"
UNREAL_PO... |
# 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 scripts.utils.editorFuncs as editorFuncs
def torchToggle(actor):
"""Toggles the torch that the actor is holding."""
# Get the actor by name
if actor is None:
unreal.log_warning("Torch bearing actor not found in the current world.")
return False
# From the actor... |
import unreal
import sys
sys.path.append('C:/project/-packages')
from PySide import QtGui, QtUiTools
WINDOW_NAME = 'Qt Window Two'
UI_FILE_FULLNAME = __file__.replace('.py', '.ui')
class QtWindowTwo(QtGui.QWidget):
def __init__(self, parent=None):
super(QtWindowTwo, self).__init__(parent)
self.aboutToClose = Non... |
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
import os
import re
import glob
import json
import unreal
from typing import Any, Optional
from pathlib import Path
from deadline.unreal_logger import get_logger
from deadline.unreal_submitter import exceptions
logger = get_logger()
def get_proj... |
import unreal
# instances of unreal classes
editor_asset_lib = unreal.EditorAssetLibrary()
# get all assets in source dir and option
source_dir = "/project/"
include_subfolders = True
deleted = 0
# get all assets in source dir
assets = editor_asset_lib.list_assets(source_dir, recursive = include_subfolders, include_... |
import unreal
from ... import (shelf_core,
shelf_utl,
shelf_utl_widgets,
)
import pathlib
from . import shelf_mcpo_interface
class MCPToolHandle(shelf_core.StackWidgetHandle):
support_tool = ["AI"]
fill = True
def __init__(self, entity):
super(... |
import unreal
# Unreal Engine GlobalEditorUtilityBase Module
# get_selected_assets
@unreal.uclass()
class MyEditorUtility(unreal.GlobalEditorUtilityBase):
pass
#pockets
selectedAssets = MyEditorUtility().get_selected_assets()
for asset in selectedAssets:
unreal.log("there is something selected")
unreal.... |
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/
parser = argparse.ArgumentParser(desc... |
# Copyright Epic Games, Inc. All Rights Reserved.
import os
import sys
import unreal
import unrealcmd
import unreal.cmdline
from pathlib import Path
#-------------------------------------------------------------------------------
def _get_ip():
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_DGRA... |
# Copyright Epic Games, Inc. All Rights Reserved
# Built-in
import sys
from pathlib import Path
# Third-party
import unreal
import remote_executor
import mrq_cli
plugin_name = "MoviePipelineDeadline"
# Add the actions path to sys path
actions_path = Path(__file__).parent.joinpath("pipeline_actions").as_posix().lo... |
#! /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.utils import asset_utils
logger = log.MCA_LOGGER
SK_FBX_PATH = r'/project/.fbx'
SK_PATH = r'\Game\Dark... |
# Copyright Epic Games, Inc. All Rights Reserved.
# Modified for the Realis Render Farm System.
import unreal
import json
import time
import os
@unreal.uclass()
class RealisVirtualPlateRenderExecutor(unreal.MoviePipelinePythonHostExecutor):
"""
Custom Movie Pipeline Executor for the Realis render farm.
Thi... |
import math
from abc import ABC, abstractmethod
from typing import Dict, List, Literal, Tuple
from ..data_structure.constants import Transform, Vector, xf_obj_name
from ..rpc import remote_blender, remote_unreal
from ..utils import Validator
from ..utils.functions import blender_functions
try:
# linting and for e... |
# 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
"""
Script spawns an array of Static Mesh Actors from 0,0,0 coordinates
"""
margin = 100.0 #
axis = "X" #
origin_x = 0.0 # Inputs via Widget
origin_y = 0.0 #
origin_z = 0.0 #
def spawn_actor(mesh: unreal.StaticMesh, location: unreal.Vector = unreal.Vector(), rotation: unreal.Rotator = u... |
import unreal
_DEFAULT_ICON = unreal.Name('Log.TabIcon')
_OWNING_MENU = 'LevelEditor.LevelEditorToolBar.PlayToolBar'
def _get_play_toolbar(menu_name: str = _OWNING_MENU) -> unreal.ToolMenu:
tool_menus = unreal.ToolMenus.get()
return tool_menus.find_menu(
unreal.Name(menu_name)
)
def create_too... |
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
import logging
from deadline.unreal_logger.handlers import UnrealLogHandler
try:
import unreal # noqa: F401
UNREAL_INITIALIZED = True
except ModuleNotFoundError:
unreal = None
UNREAL_INITIALIZED = False
UNREAL_HANDLER_ADDED = Fa... |
import unreal
# INPUT : FileName
unreal.AutomationLibrary().take_high_res_screenshot(1920, 1080, FileName ) |
import os
import sys
import importlib
import time
import unreal
import random
from datetime import datetime
import json
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
import assets
import utils
import camera
import mesh_actor
import serialize
importlib.invalidate_caches()
importlib.reload(camera)
imp... |
import unreal
import os
def importMyAssets():
path = os.path.join(unreal.SystemLibrary.get_project_directory(), os.pardir, 'FBXImportDirectory')
for filename in os.listdir(path):
full_filename = os.path.join(path, filename)
print(full_filename)
if os.path.isfile(full_filename) and filename.lower().endswith('.... |
import unreal
# The path to your Blueprint (the 'C' at the end signifies the Blueprint's generated class)
blueprint_path = '/project/.Blueprint_WallSconce_C'
def spawn_actor_from_blueprint():
# Load the Blueprint class
blueprint_class = unreal.load_class(None, blueprint_path)
if blueprint_class is None:
... |
import unreal
def get_viewport_camera_matrix():
"""
Gets the active viewport's camera matrix, if it is available.
:return: Viewport's camera matrix if available, else None.
:rtype: unreal.Matrix
"""
editor_system = unreal.UnrealEditorSubsystem
cam_location, cam_rotation = editor_system.get... |
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... |
# Should be used with internal UE API in later versions of UE
"""Delete all actors from the map"""
import unreal
level_library = unreal.EditorLevelLibrary
editor_asset_library = unreal.EditorAssetLibrary
all_actors = level_library.get_all_level_actors()
print("All actors length is", len(all_actors))
for actor in ... |
# 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 os
import tensorflow as tf
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import unreal
from sionna.rt import load_scene, Transmitter, Receiver, PlanarArray, CoverageMap, Camera
def configure_tensorflow(gpu_num=0):
os.environ["CUDA_VISIBLE_DEVICES"] = f"{gpu_num}"
os.environ['TF_... |
import unreal
from src.sequencer.sequencerControls import SequencerControls, get_actor_by_name
class AnimationSessionManager:
def __init__(self, input_folder: str, output_folder: str, sequence_path: str, rig_path: str):
self.input_folder = input_folder
self.output_folder = output_folder
sel... |
# 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 = ... |
import gc
import unreal
import sys
__lo_d_level :str
_num_lod : int = int(__lo_d_level) # Binded value from Widget UI
selected : list = unreal.EditorUtilityLibrary.get_selected_assets() #get selected assets using editorUtilityLib
def skeletal_mesh_lod_builder ( __num_lod : int, __asssets : list ) -> bool :
... |
#Glory. To mankind.
import unreal
import os
import enum
import json
from math import *
from typing import Tuple
import re
import time
#Modify this section according to your desires
UnrealNierBaseMaterialDirectory = '/project/' #your game folder
UnrealMaterialsDirectory = '/project/'
UnrealTexturesDirectory = '/projec... |
# 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 = []
... |
import unreal
import sys
sys.path.append('C:/project/-packages')
from PySide import QtGui, QtUiTools
WINDOW_NAME = 'Qt Window Three'
UI_FILE_FULLNAME = __file__.replace('.py', '.ui')
class QtWindowThree(QtGui.QWidget):
def __init__(self, parent=None):
super(QtWindowThree, self).__init__(parent)
self.aboutToClose... |
# Copyright Epic Games, Inc. All Rights Reserved.
import os
import unreal
import flow.cmd
#-------------------------------------------------------------------------------
def get_uproject_from_dir(start_dir):
from pathlib import Path
start_dir = Path(start_dir)
for search_dir in (start_dir, *start_dir.pa... |
# 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 ... |
# Copyright 2024 by Evan Koh Wen Hong
from pathlib import Path as Path # Import Path class from pathlib module to retrieve file path of assets to import
from typing import List # Import List class to assist with the importing of assets
import unreal
# Purpose: To automate import of .FBX file into Unreal Engine... |
# 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... |
import unreal
asset_tools = unreal.AssetToolsHelpers.get_asset_tools()
loaded_subsystem = unreal.get_editor_subsystem(unreal.EditorAssetSubsystem)
target_asset_path_list: list[str]
error_path_message = ""
error_message = ""
failed_delete_asset_count = 0
print("에셋 삭제 스크립트")
if len(target_asset_path_list) == 0:
error_... |
# 本脚本用于批量导入fbx文件到Unreal Engine中
# GPT写的
# 执行步骤:
# 1. 修改基础变量,执行即可
# fbx_folder_path:FBX文件所在的文件夹路径
# unreal_destination_path:Unreal Engine中的目标路径
# 2. 如果需要使用cmd,可通过sys.args读取
# 参考unreal_cmd.py
# 优化建议:
# 1. 分批导入,避免一次性导入过多文件
# 2. 异步导入:unreal python API本身不支持真正的异步导入,但可以通过unreal.AsyncTask或unreal.EditorAssetLibrary的异步方法... |
import unreal
def get_asset_reference():
assets = unreal.EditorUtilityLibrary.get_selected_asset_data()
asset_registry = unreal.AssetRegistryHelpers.get_asset_registry()
asset_registry_option = unreal.AssetRegistryDependencyOptions()
asset_registry_option.include_soft_package_references = True
ass... |
import unreal
import json
""" Should be used with internal UE API in later versions of UE
Auto assign materials to the corresponding meshes according to data from materials_props.json,
which was collected by ReferencesCollectorMaterial.py"""
with open("C:/project/ Projects/project/"
"MaterialAutoAssign/pr... |
import unreal
selected_assets: list[unreal.Object] = unreal.EditorUtilityLibrary.get_selected_assets()
loaded_subsystem = unreal.get_editor_subsystem(unreal.EditorAssetSubsystem)
## set sm materials
sm_materials = []
selected_sm:unreal.SkeletalMesh = selected_assets[0]
for material in selected_sm.materials:
mic:... |
from infrastructure.logging.base_logging import BaseLogging
import unreal
class UnrealLogging(BaseLogging):
def log(self, message):
if isinstance(message, str):
unreal.log(message)
elif isinstance(message, list[str]):
for x in message:
unreal.log(x) |
import os
import re
import subprocess
import time
from pathlib import Path
import unreal
import winsound
from mods.liana.helpers import *
from mods.liana.valorant import *
# BigSets
all_textures = []
all_blueprints = {}
object_types = []
all_level_paths = []
AssetTools = unreal.AssetToolsHelpers.get_asset_tools()
... |
# -*- coding: utf-8 -*-
import unreal
from Utilities.Utils import Singleton
class MinimalExample(metaclass=Singleton):
def __init__(self, json_path:str):
self.json_path = json_path
self.data:unreal.ChameleonData = unreal.PythonBPLib.get_chameleon_data(self.json_path)
self.ui_output = "Info... |
# 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 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>.... |
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):
... |
# 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 = ... |
import sys
import unreal
def create_level_sequence_transform_track(asset_name, length_seconds=600, package_path='/Game/'):
sequence = unreal.AssetToolsHelpers.get_asset_tools().create_asset(asset_name, package_path, unreal.LevelSequence, unreal.LevelSequenceFactoryNew())
actor_class = unreal.EditorAssetLibrar... |
#
# 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 os
import spear
import unreal
if __name__ == "__main__":
unreal.AutomationLibrary.take_high_res_... |
# -*- coding: utf-8 -*-
"""Load UAsset."""
from pathlib import Path
import os
import shutil
from ayon_core.pipeline import AYON_CONTAINER_ID
from ayon_unreal.api import plugin
from ayon_unreal.api import pipeline as unreal_pipeline
import unreal # noqa
def parsing_to_absolute_directory(asset_dir):
"""Converting... |
from typing import List, Tuple, Union
import unreal
from utils import get_world
from GLOBAL_VARS import EditorActorSub
def set_stencil_value(
actor: unreal.Actor,
stencil_value: int,
receives_decals: bool = False
) -> None:
# skeletal mesh component
for skeletal_mesh_component in actor.get_comp... |
"""
Creates a world component in Unreal Control Rig.
"""
# System global imports
# mca python imports
# software specific imports
import unreal
# mca python imports
# Internal module imports
from mca.ue.rigging.controlrig import cr_pins
SCRIPT_STRUCT_PATH = '/project/.CR_Human_FRAG_C'
BASE_NODE_NAME = 'FRAG Create R... |
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)
... |
# -*- 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
selected_asset = unreal.EditorUtilityLibrary.get_selected_assets()[0]
anim_segment = unreal.EditorAnimSegment(selected_asset).get_editor_property("anim_segment")
loaded_anim_segment =anim_segment.get_editor_property("anim_reference")
print(loaded_anim_segment) |
import unreal
import os
import csv
import tempfile
from scripts.common.utils import get_sheet_data
SHEET_ID = "1E7VdiW8OndnToXPbxmhxW9a1quoOY1PqHIjNMZ5n5hg"
GID = "1098136304"
TABLE_PATH = "/project/"
def set_file_writable(file_path):
"""파일의 읽기 전용 속성을 해제"""
if os.path.exists(file_path):
try:
... |
import unreal
import requests
import os
import tempfile
import uuid
from PIL import Image
from io import BytesIO
API_URL = "http://localhost:8000/generate/" # FastAPI 주소
def request_glb_from_server(prompt: str, model: str) -> str:
try:
response = requests.post(API_URL, data={
"prompt": prompt... |
import unreal
def setup_scene_capture():
"""Find SceneCapture2D and enable stencil capture settings."""
# Find an existing SceneCapture2D actor
scene_capture = None
for actor in unreal.EditorLevelLibrary.get_all_level_actors():
if isinstance(actor, unreal.SceneCapture2D):
scene... |
# -*- 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-09-28 21:29:03"
import os
import struct
import tempfile
import posixpath
import webbrowser
fro... |
"""
UEMCP Viewport Operations - All viewport and camera-related operations
Enhanced with improved error handling framework to eliminate try/catch boilerplate.
"""
import math
import os
# import tempfile
import platform as py_platform
import time
from typing import List, Optional
import unreal
from utils import cre... |
import unreal
def get_all_assets_in_dir(directory_path):
asset_registry = unreal.AssetRegistryHelpers.get_asset_registry()
assets = asset_registry.get_assets_by_path(directory_path, recursive=True)
return assets
selected_assets = unreal.EditorUtilityLibrary.get_selected_assets()
new_UAGDA = []
old_UAGDA ... |
# _
# (_)
# _ __ ___ __ _ _ __ ___ ___ _ __ _ ___ _ __ ___
# | '_ ` _ \ / _` | '_ ` _ \ / _ \| '_ \| |/ _ \ '_ ` _ \
# | | | | | | (_| | | | | | | (_) | | | | | __/ | | | | |
# |_| |_| |_|\__,_|_| |_| |_|\___/|_| |_|_|\___|_| |_| |_|
# www.mamoniem.com
# www.ue4u.xyz
#Copyright 20... |
import unreal
import os
# instances of unreal classes
editor_util = unreal.EditorUtilityLibrary()
system_lib = unreal.SystemLibrary()
editor_asset_lib = unreal.EditorAssetLibrary()
# get the selected assets
selected_assets = editor_util.get_selected_assets()
num_assets = len(selected_assets)
cleaned = 0
# hard coded... |
import unreal
class CR_Control:
"""
Control Rig Wrapper
"""
def __init__(self, name, parent_name=""):
self.name = name
self.parent = parent_name
self.ctrl_type = unreal.RigElementType.CONTROL
self.rig_key = unreal.RigElementKey(type=self.ctrl_type, name=self.name)
... |
# 4.25 +
import unreal
# @unreal.uclass()
class EditorToolbarMenuEntry(unreal.ToolMenuEntryScript):
def __init__(
self,
menu="None",
section="None",
name="None",
label="",
tool_tip="",
icon=["None", "None", "None"],
owner_name="None",
insert_... |
#!/project/ python3
"""
Validate required plugins and report which are missing from the selected UE 5.6 install.
Run inside the Unreal Editor Python console (preferred) or externally by passing UE path.
Usage (in-editor):
py Tools/project/.py
Usage (external, Windows PowerShell):
py "C:/project/-Grounds/project/.... |
import unreal
selected_assets = unreal.EditorUtilityLibrary.get_selected_assets()
target_path = '/project/.M_UV'
for asset in selected_assets:
if isinstance(asset, unreal.MaterialInstance):
base_material = asset.get_editor_property('parent')
if base_material and base_material.get_path_name() == ... |
import unreal
setting = unreal.InputSettings.get_input_settings()
print(setting.get_axis_names())
|
# -*- 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-17 21:06:24"
import unreal
level_lib = unreal.EditorLevelLibrary
sys_lib = unreal.SystemLibrary
a... |
# unreal 5.6
import unreal
# Configurable variables
ASSETS_PATH = '/project/'
SPACING = 30
COLS = 5
asset_registry = unreal.AssetRegistryHelpers.get_asset_registry()
def get_static_mesh_bounds(static_mesh):
# Get the bounding box extent (half size) of the mesh
bounding_box = static_mesh.get_bounding_box()
... |
'''
File:
Author:
Date:
Description:
Base script that will take x HighResShot2 screenshots of the Unreal
Editor at different camera locations then return the camera to the
starting HOME point.
Actions are based on the '.register_slate_post_tick_callback()' method
to create a new asynchronous... |
# /project/
# @CBgameDev Optimisation Script - Log No Collision Static Meshes
# /project/
import unreal
import os
EditAssetLib = unreal.EditorAssetLibrary()
StatMeshLib = unreal.EditorStaticMeshLibrary()
workingPath = "/Game/" # Using the root directory
notepadFilePath = os.path.dirname(__file__) + "//PythonOptimiseL... |
import unreal
__anim_notify_name__ = "ChangeState"
__anim_sequence_dir__ = "/project/"
__anim_sequence_lists__ = unreal.EditorAssetLibrary.list_assets(__anim_sequence_dir__)
__anim_assets_lists__ = []
for i in __anim_sequence_lists__:
__anim_assets_lists__.append(unreal.EditorAssetLibrary.load_asset(i))
for i... |
import unreal
import json
import os
import math
import time
# Configuration - Adjust these settings as needed
JSON_FILE_PATH = "" # Will be set via command line argument
MAP_NAME = "DragonicaMap" # Will be appended with the JSON filename
SCALE_FACTOR = 0.02 # Initial guess based on other Korean MMOs (adjust after t... |
# -*- 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 -*-
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,... |
from typing import Callable, Optional
import unreal
import utils
from data.config import CfgNode
from GLOBAL_VARS import MATERIAL_PATHS, PLUGIN_ROOT
# define the post process material to the render_pass
material_paths = MATERIAL_PATHS
material_path_keys = [key.lower() for key in material_paths.keys()]
class Custom... |
# coding: utf-8
import unreal
import argparse
print("VRM4U python begin")
print (__file__)
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.ge... |
# Create Virtuos Menu
# Nguyen PHi Hung
import unreal_uiutils
from unreal_utils import AssetRegistryPostLoad
import unreal
def extend_editor():
# Create standard menu entry
me_reloadbutton = unreal_uiutils.create_menu_button(
name="ReloadBtn",
label="Reload",
command_string="import im... |
import unreal
# Set up the asset name and path
asset_name = "MeshPaint"
asset_path = "/project/"
# Create a new material and set its properties
material_factory = unreal.MaterialFactoryNew()
material_asset = unreal.AssetToolsHelpers.get_asset_tools().create_asset(
asset_name, asset_path, unreal.Material, material... |
import unreal
loaded_subsystem = unreal.get_editor_subsystem(unreal.AssetEditorSubsystem)
target = '/project/'
loaded = unreal.load_asset(target)
loaded_subsystem.open_editor_for_assets([loaded]) |
#coding:utf-8
import unreal
import sys
sys.path.append('C:/project/-packages')
from PySide import QtGui, QtUiTools, QtCore
import UE_MaterialTool
reload(UE_MaterialTool)
UI_FILE_FULLNAME = r"\\ftdytool.hytch.com\FTDY\hq_tool\software\Unreal Engine\PythonProject\UE_PipelineTool\Material\UE_MaterialTool_UI.ui"
class ... |
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 :
... |
# Standard library imports
import sys
import re
import time
import json
import os
import logging
import threading
from pathlib import Path
import importlib
# Third party imports
from PySide6 import QtWidgets, QtGui, QtCore
import unreal
# Local application imports
from export_performance import (
run_anim_sequenc... |
# -*- coding: UTF-8 -*-
import os, re, shutil, json, random, threading, socket, sys, time, requests
import unreal
class StaticTextureMeshTask:
def __init__(self):
self.MaterialLoaderData = '/project/.xml'
self.Material_Template = '/project/'
self.MaterialsTemplateArr = []
# def Create... |
# Unreal Python script
# Attempts to fix various issues in Source engine Datasmith
# imports into Unreal
from collections import Counter, defaultdict, OrderedDict
import sys
import unreal
import re
import traceback
import os
import json
import csv
import posixpath
import math
from glob import glob
def actor_contains... |
#Glory. To mankind.
import unreal
import os
import enum
import json
from math import *
from typing import Tuple
import re
import time
#Modify this section according to your desires
UnrealNierBaseMaterialDirectory = '/project/' #your game folder
UnrealMaterialsDirectory = '/project/'
UnrealTexturesDirectory = '/projec... |
import os
import unreal
def get_python_stub_dir():
""" Get the directory to where the 'unreal.py' stub file is located """
return os.path.join(os.path.abspath(unreal.Paths.project_intermediate_dir()), "PythonStub")
|
import unreal
@unreal.uclass()
class RemoteClass(unreal.BlueprintFunctionLibrary):
@unreal.ufunction(
ret=str, static=True
)
def py_RPC_Call():
result = "Success Remote call!!!"
unreal.log("Execute Remote Procedure Call")
return result
|
import json
import unreal
import gspread
import os
import csv
# ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
# ROOT_DIR = os.path.abspath(os.curdir) + "/"
ROOT_DIR = unreal.Paths.project_dir()
PLUGIN_DIR = f'{unreal.Paths.project_plugins_dir()}SpreadSheetToUnreal/'
SCRIPT_DIR = f'{PLUGIN_DIR}Scripts/'
SHEET... |
import unreal
import tkinter as tk
from tkinter import ttk
from tkinter import messagebox
import urllib.request
import json
import tempfile
import os
import csv
from datetime import datetime
import os.path
import sys
import importlib
from ..common.utils import get_sheet_data, check_unreal_environment
SHEET_ID = "1D0yA... |
"""
UEMCP Material Operations - All material creation and management operations
Enhanced with improved error handling framework to eliminate try/catch boilerplate.
"""
from typing import Any, Dict, Optional
import unreal
from utils import asset_exists, load_asset, log_debug
# Enhanced error handling framework
from... |
# -*- 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 ... |
"""
code for the main script editor window
"""
import ast
import logging
import os
import sys
import traceback
from collections import namedtuple
try:
import unreal
RUNNING_IN_UNREAL = True
except ImportError:
RUNNING_IN_UNREAL = False
from PySide6 import QtWidgets, QtCore, QtGui
from unreal_script_edit... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.