text stringlengths 15 267k |
|---|
import os
import unreal
from utils import get_world
# filename: str : Windows file fullname of the asset you want to import
# destination_path: str : Asset path
# option: obj : Import option object. Can be None for assets that does not usually have a pop-up when importing. (e.g. Sound, Texture, etc.)
# return: obj :... |
import unreal
import utils.utils as utils
class MetaHuman:
def __init__(self, path_asset, level_sequence):
self.control_rig_face = None
self.control_rig_body = None
self.asset = unreal.load_asset(path_asset)
self.actor = unreal.EditorLevelLibrary.spawn_actor_from_object(self.asset,... |
# unreal.MovieSceneSequence
# https://api.unrealengine.com/project/.html
# unreal.LevelSequence
# https://api.unrealengine.com/project/.html
# unreal.SequencerBindingProxy
# https://api.unrealengine.com/project/.html
import unreal
# sequence_path: str : The level sequence asset path
# actor: obj unreal.Actor... |
import json
import unreal
from utils.key import get_all_keys
level_sequence = unreal.LevelSequenceEditorBlueprintLibrary.get_current_level_sequence()
rig_proxies = unreal.ControlRigSequencerLibrary.get_control_rigs(level_sequence)
control_rig_face = None
for rig in rig_proxies:
if rig.control_rig.get_name() == "... |
import unreal
selected_list = unreal.EditorLevelLibrary.get_selected_level_actors()
for actor in selected_list:
if not isinstance(actor,unreal.StaticMeshActor):
continue
component = actor.get_component_by_class(unreal.StaticMeshComponent)
# TODO 复制一个 static_mesh 进行高模编辑
static_mesh = component.... |
# 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... |
"""
AutoMatty Configuration - COMPLETE VERSION with UE 5.6 Native Menu System
Dictionary-driven config management with enhanced menu hierarchy
"""
import unreal
import os
import sys
import re
import json
# ========================================
# CONFIGURATION DICTIONARIES
# ========================================
... |
import random
import re
import os
import unreal
from datetime import datetime
from typing import Optional, Callable
def clean_sequencer(level_sequence):
bindings = level_sequence.get_bindings()
for b in bindings:
# b_display_name = str(b.get_display_name())
# if "Camera" not in b_display_name:... |
import unreal
selected_assets = unreal.EditorLevelLibrary.get_selected_level_actors()
editor_asset_library = unreal.EditorAssetLibrary()
def get_cinev_level_material_path():
subsystem_level = unreal.get_editor_subsystem(unreal.LevelEditorSubsystem)
level_path = subsystem_level.get_current_level().get_path_name()
... |
# coding=utf-8
import unreal
"""
Usage:
import sequencer
sequencer.NAME
sequencer.hello()
reload(sequencer)
"""
NAME = 'wangbo'
def hello():
"""
Only for test.
:return:
"""
print('========================================================================')
print('Get LevelSequence')
prin... |
import constants
import unreal
from rpc import RPC
from utils import Loader
@unreal.uenum()
class PythonEnumSample(unreal.EnumBase):
FIRST = unreal.uvalue(0)
SECOND = unreal.uvalue(1)
FOURTH = unreal.uvalue(3)
@unreal.ustruct()
class PathsStruct(unreal.StructBase):
project_dirs = unreal.uproperty(st... |
import unreal
from CommonFunctions import filter_class,split_keywords
""" 批量自动配置选中的贴图资产,根据贴图名自动设置贴图压缩类型 """
def set_compression_type_masks(texture):
texture.set_editor_property("sRGB", False)
texture.set_editor_property(
"CompressionSettings", unreal.TextureCompressionSettings.TC_MASKS
)
... |
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 =... |
"""
Base class for all control rig functions
"""
# mca python imports
# software specific imports
import unreal
# mca python imports
from mca.ue.rigging.frag import frag_base
class PinsComponent(frag_base.UEFRAGNode):
def __init__(self, control_rig, fnode):
super().__init__(control_rig=control_rig, fnode... |
import unreal
# # Get all actors in the current level
# EditorSub = unreal.get_editor_subsystem(unreal.UnrealEditorSubsystem)
# EditorActorSubsys = unreal.get_editor_subsystem(unreal.EditorActorSubsystem)
# level_actors = EditorActorSubsys.get_all_level_actors()
# editor_world = EditorSub.get_editor_world()
# curre... |
# Copyright Epic Games, Inc. All Rights Reserved.
#
import unreal
menu_owner = "TestPy"
tool_menus = unreal.ToolMenus.get()
def GetMainPythonMenu():
main_menu = tool_menus.extend_menu("LevelEditor.MainMenu")
main_menu.add_sub_menu(menu_owner, "", "Custom", "Custom", "")
custom_menu = tool_menus.register_menu("Le... |
import unreal
selected : list = unreal.EditorUtilityLibrary.get_selected_assets()
def setNaniteSetting (__selected : list ) -> bool :
fallbackTrianglePercent = unreal.GeometryScriptNaniteOptions(fallback_percent_triangles = 10.0)
# fallbackTrianglePercent = 0.1
for asset in __selected:
meshNani... |
# /project/
# @CBgameDev Optimisation Script - Log Materials With Missing Physical Materials
# /project/
import unreal
import os
EditAssetLib = unreal.EditorAssetLibrary()
SystemsLib = unreal.SystemLibrary
workingPath = "/Game/" # Using the root directory
notepadFilePath = os.path.dirname(__file__) + "//PythonOptimis... |
# /project/
# @CBgameDev Optimisation Script - LOG Static Meshes 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()
StatMeshLib = unreal.EditorStaticMeshLibrary()
workingPath = "/Game/" # Using... |
# 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... |
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 12 12:59:05 2024
@author: WillQuantique
"""
import unreal
name = "CineCameraActor_1"
def select_actor_by_name(name:str):
"""
Parameters
----------
name : str
Name of the object to be selected and returned
Tip : use get_all_names()... |
# Unreal Python script
# Attempts to fix various issues in Source engine Datasmith
# imports into Unreal
from collections import Counter, defaultdict, OrderedDict
import unreal
import re
import traceback
import os
import json
import csv
import posixpath
import math
from glob import glob
# This is the SCALE / 100 whic... |
# 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
import json
import os
import tkinter as tk
from tkinter import filedialog
# === TKINTER File Dialog ===
def choose_json_file():
root = tk.Tk()
root.withdraw()
file_path = filedialog.askopenfilename(
title="Choose JSON File",
filetypes=[("JSON Files", "*.json")],
initia... |
import unreal
# Instances of Unreal Classes
editor_level_lib = unreal.EditorLevelLibrary()
editor_filter_lib = unreal.EditorFilterLibrary()
# Get all actors and filter down to specific elements
actors = editor_level_lib.get_all_level_actors()
static_meshes = editor_filter_lib.by_class(actors, unreal.StaticMeshActor)... |
```python
import unreal
class UnrealEngineVR:
def __init__(self, investor_profile, experience_settings):
self.investor_profile = investor_profile
self.experience_settings = experience_settings
self.engine = unreal.EditorLevelLibrary()
def create_vr_experience(self):
# Create a ... |
# Copyright Epic Games, Inc. All Rights Reserved.
import os
import unreal
import p4utils
import flow.cmd
import unrealcmd
from peafour import P4
from pathlib import Path
#-------------------------------------------------------------------------------
class _SyncBase(unrealcmd.Cmd):
def _write_p4sync_txt_header(s... |
# 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... |
# 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 os
import sys
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.0
self.lum = 1
self.isAccessory = False
def imp... |
# -*- coding: utf-8 -*-
import os
import sys
import subprocess
import unreal
from Utilities.Utils import Singleton
import random
if sys.platform == "darwin":
import webbrowser
class ChameleonGallery(metaclass=Singleton):
def __init__(self, jsonPath):
self.jsonPath = jsonPath
self.data = unreal... |
"""
GUI class to detect USDStageActors within Unreal Engine and play their level sequences
"""
import unreal
import PySide2
from pathlib import Path
from pxr import Usd, UsdGeom, Sdf
from PySide2 import QtCore, QtWidgets, QtGui
from PySide2.QtWidgets import *
ELL = unreal.EditorLevelLibrary()
EAL = unreal.EditorAsse... |
import unreal
def get_component_handles(blueprint_asset_path):
subsystem = unreal.get_engine_subsystem(unreal.SubobjectDataSubsystem)
blueprint_asset = unreal.load_asset(blueprint_asset_path)
subobject_data_handles = subsystem.k2_gather_subobject_data_for_blueprint(blueprint_asset)
return subobject_da... |
import unreal
unreal.log("hello world") |
import unreal
import re
unreal.log(f'Python Asset Utilities nodes imported')
unreal.log(f'\tTools:')
unreal.log(f'\t\t Get Blueprint Factory node')
unreal.log(f'\t\t Create Blueprint From Static Mesh')
@unreal.uclass()
class MyPyFunctionLibrary(unreal.BlueprintFunctionLibrary):
@unreal.ufunction(params=[str, ], ... |
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... |
# Copyright (c) <2021> Side Effects Software Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list ... |
import json
from enum import Enum, auto
import inspect
from typing import Callable, Union
from concurrent.futures import ThreadPoolExecutor, Future
from threading import Lock
import logging
import unreal
logger = logging.getLogger(__name__)
class FuncType(Enum):
STATIC_METHOD = auto()
CLASS_METHOD = auto(... |
import unreal
from typing import TypedDict
subsystem_level = unreal.get_editor_subsystem(unreal.LevelEditorSubsystem)
subsystem_actor = unreal.get_editor_subsystem(unreal.EditorActorSubsystem)
subsystem_editor = unreal.get_editor_subsystem(unreal.EditorAssetSubsystem)
current_level_name = unreal.GameplayStatics.get_cu... |
#!-!-!-!-!-!-!-!-!-!-!-!-!-!-#
#####
######## IMPORTS
#####
import unreal
print('starting ai_updates.py')
######## THING
#####
#!-!-!-!-!-!-!-!-!-!-!-!-!-!-#
#####
######## VARIABLES
#####
######## THING
#####
#!-!-!-!-!-!-!-!-!-!-!-!-!-!-#
#####
######## FUNCTIONS
#####
######## THING
#####
# ######## R... |
# /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/" #... |
import unreal
import re
from typing import List, Literal
def get_bp_c_by_name(__bp_dir:str) -> str :
__bp_c = __bp_dir + '_C'
return __bp_c
def get_bp_mesh_comp (__bp_c:str) -> object :
#source_mesh = ue.load_asset(__mesh_dir)
loaded_bp_c = unreal.EditorAssetLibrary.load_blueprint_class(__bp_c)
... |
from itertools import count
import unreal
class DeleteEmptyDirectories(object):
editor_asset_lib = unreal.EditorAssetLibrary()
sourceDirectory = "/project/"
includeSubDirectories = True
countOfDeleted = 0
assets = editor_asset_lib.list_assets(sourceDirectory, recursive=includeSubDirectories, inclu... |
"""This uses a Qt binding of "any" kind, thanks to the Qt.py module,
to produce an UI. First, one .ui file is loaded and then attaches
another .ui file onto the first. Think of it as creating a modular UI.
More on Qt.py:
https://github.com/project/.py
"""
import sys
import os
import platform
import atexit
from . impo... |
import unreal
import os
save_data_dir = ( unreal.Paths.project_saved_dir() ) + 'SaveGames/'
print(save_data_dir)
path = os.path.realpath(save_data_dir)
os.startfile(path) |
import unreal
system_lib = unreal.SystemLibrary()
string_lib = unreal.StringLibrary()
SMSubsys = unreal.StaticMeshEditorSubsystem()
EditorSubsys = unreal.get_editor_subsystem(unreal.StaticMeshEditorSubsystem)
# selected_assets = unreal.EditorUtilityLibrary.get_selected_assets()
# assets=selected_assets
... |
# -*- 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 is used to fix properties of light actors in a game level.
Usage:
- Call the `fix_light_sources()` function to fix light actors at the current level.
Functions:
- `fix_light_actor()`: Adjusts the properties of a light actor.
- `fix_light_sources()`: Fixes light actors at the current level.
Note:
- T... |
# Copyright (c) 2023 Max Planck Society
# License: https://bedlam.is.tuebingen.mpg.de/license.html
#
# Batch import CLO exported Alembic .abc files into Unreal Engine
#
import math
import os
from pathlib import Path
import sys
import time
import unreal
data_root = r"/project/"
#whitelist_subjects_path = r"/project/.... |
"""
AutoMatty Utilities - Simplified for UE Plugin Architecture
No path discovery needed - UE handles it automatically!
"""
import unreal
import re
from automatty_config import AutoMattyConfig
# That's it! No complex path discovery needed.
# UE automatically adds Plugin/project/ to sys.path
def setup_automatty_import... |
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()
... |
import unreal
import re
from typing import List, Literal
def get_bp_c_by_name(__bp_dir:str) -> str :
__bp_c = __bp_dir + '_C'
return __bp_c
def get_bp_mesh_comp (__bp_c:str) -> object :
#source_mesh = ue.load_asset(__mesh_dir)
loaded_bp_c = unreal.EditorAssetLibrary.load_blueprint_class(__bp_c)
... |
# Copyright 2018 Epic Games, Inc.
# Setup the asset in the turntable level for rendering
import unreal
import os
import sys
def main(argv):
# Import the FBX into Unreal using the unreal_importer script
current_folder = os.path.dirname( __file__ )
if current_folder not in sys.path:
sys.path.... |
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)
... |
"""This uses a Qt binding of "any" kind, thanks to the Qt.py module,
to produce an UI. First, one .ui file is loaded and then attaches
another .ui file onto the first. Think of it as creating a modular UI.
More on Qt.py:
https://github.com/project/.py
"""
import sys
import os
import platform
import atexit
from . impo... |
import unreal
import sys
sys.path.append('C:/project/-packages')
from PySide import QtGui, QtUiTools
WINDOW_NAME = 'Qt Window One'
UI_FILE_FULLNAME = __file__.replace('.py', '.ui')
class QtWindowOne(QtGui.QWidget):
def __init__(self, parent=None):
super(QtWindowOne, self).__init__(parent)
self.aboutToClose = Non... |
# 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.levelSequence as levelSequence
import asyncio
import httpx
#########################################################################################################
# FBX EXPORT AND SENDER #
###################... |
"""
This is more of a personal preference, I found myself constantly
getting the same systems and library classes, so I decided to make
a module for them. This by no means every library or system,
just a few to give the idea
"""
import unreal
# Registries and Libraries
asset_registry_helper = unreal.AssetRegistryHe... |
# General BP Maker
##Runs with Unreal Python Module
import unreal
import re
def get_bp_c_by_name(__bp_dir:str) -> str :
__bp_c = __bp_dir + '_C'
return __bp_c
def get_bp_mesh_comp (__bp_c:str) :
#source_mesh = ue.load_asset(__mesh_dir)
loaded_bp_c = unreal.EditorAssetLibrary.load_blueprint_cl... |
import unreal
def get_all_actors_in_level(level=None):
"""Get all actors in the current or specified level."""
if level is None:
level = unreal.EditorLevelLibrary.get_editor_world().get_current_level()
return unreal.EditorLevelLibrary.get_all_level_actors(level)
def spawn_actor(actor_class, locati... |
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 21 11:51:52 2024
@author: WillQuantique
"""
import unreal
def dellcams():
all_actors = unreal.EditorLevelLibrary.get_all_level_actors()
# Loop through all actors to find the first camera
for actor in all_actors:
#unreal.log(actor.get_class().get_n... |
import unreal
# 获取所有菜单对象的入口点
menus = unreal.ToolMenus.get()
# 创建主编辑器菜单的自定义菜单
# 查找主级编辑器的主菜单
main_menu = menus.find_menu("LevelEditor.MainMenu")
# 在主菜单中添加名为"Custom Menu"的子菜单,内部标识为"LcL-Tools"
test_menu = main_menu.add_sub_menu("Custom Menu", "Python Automation", "LcL-Tools", "LcL-Tools")
# 刷新所有菜单组件以应用更改
menus.refresh_a... |
# _
# (_)
# _ __ ___ __ _ _ __ ___ ___ _ __ _ ___ _ __ ___
# | '_ ` _ \ / _` | '_ ` _ \ / _ \| '_ \| |/ _ \ '_ ` _ \
# | | | | | | (_| | | | | | | (_) | | | | | __/ | | | | |
# |_| |_| |_|\__,_|_| |_| |_|\___/|_| |_|_|\___|_| |_| |_|
# www.mamoniem.com
# www.ue4u.xyz
#Copyright 20... |
# 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
import argparse
import sys
import os
test_identity_asset_name = 'KU_Test_Identity'
def run_import_takes_script(path_to_takes : str, storage_path : str):
#führt das Skript create_capture_data_auto.py aus.
from create_capture_data_auto import import_take_data_for_specified_device
is_using_LLF... |
import unreal
selected_assets: list[unreal.Object] = unreal.EditorUtilityLibrary.get_selected_assets()
if not isinstance(selected_assets[0], unreal.SkeletalMesh):
print('Please select a skeletal mesh')
exit()
selected_sm: unreal.SkeletalMesh = selected_assets[0]
sm_path = selected_sm.get_path_name()
sm_skele... |
# 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... |
import unreal
import os
import csv
import tempfile
from scripts.common.utils import get_sheet_data
SHEET_ID = "1IPkguLmxUeet2eDBQ5itDTwch-36CFxZ-gYn6AmMlnE"
GID = "1018530766"
TABLE_PATH = "/project/"
def set_file_writable(file_path):
"""파일의 읽기 전용 속성을 해제"""
if os.path.exists(file_path):
try:
... |
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... |
#!/project/ python3
"""
Automated Birmingham Building Importer
Based on the GPT agent report - imports FBX buildings with embedded coordinates
"""
import subprocess
def import_birmingham_buildings():
"""Import all 5 Birmingham FBX buildings using UE5 Python automation"""
print("🏗️ Starting automated Bir... |
"""
UEMCP Auto-startup Script
This script is automatically executed when the plugin loads
"""
import os
import sys
import time
import unreal
# Add this plugin's Python directory to path
plugin_python_path = os.path.dirname(os.path.abspath(__file__))
if plugin_python_path not in sys.path:
sys.path.append(plugin_p... |
import os
import json
import unreal
from Utilities.Utils import Singleton
class Shelf(metaclass=Singleton):
'''
This is a demo tool for showing how to create Chamelon Tools in Python
'''
MAXIMUM_ICON_COUNT = 12
Visible = "Visible"
Collapsed = "Collapsed"
def __init__(self, jsonPath:str):... |
# 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... |
# 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 ... |
# Nguyen Phi Hung @ 2020
# user@example.com
from unreal_global import *
import hashlib
import unreal
class AssetRegistryPostLoad:
_callbacks = {}
@classmethod
def register_callback(cls, func, *args, **kws):
cls._callbacks[hashlib.md5(str((func, args, kws)).encode()).hexdigest()] = (
... |
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
MEL = unreal.MaterialEditingLibrary
from pathlib import Path
import sys
from importlib import *
sys.path.append(str(Path(__file__).parent.parent.parent.parent.resolve()))
reloads = []
for k, v in sys.modules.items():
if k.startswith("pamux_unreal_tools"):
reloads.append(v)
for module in ... |
from typing import *
from pathlib import Path
import unreal
def get_subsystem(
engine_major_version: int
):
EditorActorSub = EditorLevelSub = EditorSub = None
if engine_major_version == 5:
EditorActorSub = unreal.EditorActorSubsystem()
EditorLevelSub = unreal.LevelEditorSubsystem()
... |
# 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 ... |
#! /project/ python
# -*- coding: utf-8 -*-
"""
These are the Maya menus that get loaded
"""
# mca python imports
# PySide2 imports
# software specific imports
import unreal
# mca python imports
from mca.common import log
from mca.common.tools.toolbox import toolbox_data
logger = log.MCA_LOGGER
ACTION_PROJ_DOCS =... |
import unreal
def render_sequencer():
"""
Renders the currently open level sequence using Unreal Engine's Movie Render Pipeline.
"""
# Get the current level sequence
sequencer = unreal.LevelSequenceEditorBlueprintLibrary.get_current_level_sequence()
if not sequencer:
unreal.log_error("N... |
import unreal
import os
import glob
import csv
import time
def set_actor_location(actor, x, y):
actor.set_actor_location(unreal.Vector(x, y, 170), False, True)
def get_actor_location(actor):
return actor.get_actor_location()
def get_capture_cube():
# Will always be one actor!
actor_class = unreal.... |
#!/project/ python3
"""
Animation Assignment via Blueprint API
Uses Blueprint Editor API to set default values directly in the blueprint
"""
import unreal
def assign_animations_via_blueprint_api():
"""Assign animations using Blueprint Editor API"""
print("=== Assigning Animations via Blueprint Editor API... |
# -*- coding: utf-8 -*-
import unreal
import sys
import pydoc
import inspect
import os
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, **kwargs)
... |
# -*- coding: utf-8 -*-
"""
Initialization module for mca-package
"""
# mca python imports
import os
# software specific imports
import unreal
# mca python imports
from mca.ue.paths import ue_path_utils
from mca.ue.assettypes import py_base
from mca.common import log
logger = log.MCA_LOGGER
# Todo ncomes: The red... |
# Copyright (c) <2021> Side Effects Software Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list ... |
# SPDX-FileCopyrightText: 2018-2025 Xavier Loux (BleuRaven)
#
# SPDX-License-Identifier: GPL-3.0-or-later
# ----------------------------------------------
# Blender For UnrealEngine
# https://github.com/project/-For-UnrealEngine-Addons
# ----------------------------------------------
from typing import Tuple
import... |
import unreal
import logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
@unreal.uclass()
class EditorUtility(unreal.GlobalEditorUtilityBase):
pass
@unreal.uclass()
class EditorAssetLibrary(unreal.EditorAssetLibrary):
pass
@unreal.uclass()
class AnimationLibrary(unreal.Anima... |
import unreal
def getActor(actorName):
"""
seach for an actor label
arg:
actorName = str|label beaing searched for
returns:
list of actor(s)
"""
actor_subsys = unreal.get_editor_subsystem(unreal.EditorActorSubsystem)
level_actors = actor_subsys.get_all_level_actors()
filt... |
# -*- 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
import os
import pandas as pd
error_list = pd.read_csv(r"/project/.csv")
selectionAssets = unreal.EditorUtilityLibrary().get_selected_assets()
asset_paths = [item.get_path_name() for item in selectionAssets]
for asset_path in asset_paths:
asset = unreal.EditorAssetLibrary.load_asset(asset_path.spl... |
from __future__ import annotations
"""
This script will be called from 'vscode_execute_entry.py' and will execute the user script
"""
import traceback
import tempfile
import logging
import ast
import sys
import os
from contextlib import nullcontext
import unreal
TEMP_FOLDERPATH = os.path.join(tempfile.gettempdir()... |
import unreal
import os
import socket
import time
is_playing = False
tickhandle = None
s = socket.socket()
host = '127.0.0.1'
port = 12345
s.connect((host,port))
def testRegistry(deltaTime):
asset_registry = unreal.AssetRegistryHelpers.get_asset_registry()
if asset_registry.is_loading_assets():
... |
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 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_scene_with_static_mesh_component(blueprint_path):
"""
将 Blueprint 中的所有 SceneComponent 替换为 StaticMeshComponent
:param blueprint_path: Blueprint 资产路径(如 "/project/.MyBP")
"""
# 安全加载 Blueprint
try:
blueprint = unreal.load_asset(blueprint_path)
if not bluepr... |
# -*- 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-06-28 21:17:21'
import os
import itertools
import fbx
import FbxCommon
DIR = os.path.dirname(__fil... |
import unreal
selected_assets = unreal.EditorUtilityLibrary.get_selected_assets()
if len(selected_assets) == 0:
unreal.log_warning("Please select an asset")
quit()
dir_path = selected_assets[0].get_path_name().replace(selected_assets[0].get_name()+'.'+selected_assets[0].get_name(), "")
asset_registry = unre... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.