text stringlengths 15 267k |
|---|
"""
UEMCP Validation Framework - Validates operations succeeded by checking actual state
"""
import unreal
# import time
# import math
class ValidationResult:
"""Result of a validation check"""
def __init__(self, success=True, errors=None, warnings=None):
self.success = success
self.errors ... |
# -*- coding: utf-8 -*-
import unreal
import Utilities.Utils
def print_refs(packagePath):
print("-" * 70)
results, parentsIndex = unreal.PythonBPLib.get_all_refs(packagePath, True)
print ("resultsCount: {}".format(len(results)))
assert len(results) == len(parentsIndex), "results count not equal paren... |
# Progress Dialogs for Slow Operations
import unreal
total_frames = 100000
text_label = "Working again!"
with unreal.ScopedSlowTask(total_frames, text_label) as slow_task:
slow_task.make_dialog(True) # Makes the dialog visible, if it isn't already
for i in range(total_frames):
if slow_task... |
# coding: utf-8
from asyncio.windows_events import NULL
from platform import java_ver
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(arg... |
"""
https://github.com/project/-unreal/project/-multi-publish2/project/.py
"""
import unreal
ERROR_CALLBACK = unreal.OnMoviePipelineExecutorErrored()
FINISH_CALLBACK = unreal.OnMoviePipelineExecutorFinished()
def render_errored(executor, pipeline, is_fatal, error_msg):
unreal.log_warning(
"Render Error:... |
# 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 csv
import json
import glob
class enum_data:
def __init__(self,name,desc):
self.name = name
if str(desc)=='nan':
self.desc = ""
else:
self.desc = desc
#project name
project_name = ""
enum_folder_path = ""
enum_data_dic = {... |
#!/project/ python3
"""
UE5 Connector for Terminal Grounds v2.0
=======================================
Seamless integration between asset generation pipeline and Unreal Engine 5.6.
"""
import json
import subprocess
import shutil
from pathlib import Path
from typing import Dict, Any, List, Optional, Union, Tuple
from ... |
import unreal
dirAnimBP = '/project/'
dirNew = dirAnimBP.replace('CH_M_NA_10','Master')
dirAnimBP = str(dirAnimBP)
print(dirAnimBP.replace('CH_M_NA_10','Master'))
bpAnimBP = unreal.EditorAssetLibrary.load_asset(dirAnimBP)
bpCloned = unreal.EditorAssetLibrary.duplicate_asset(dirAnimBP,dirNew)
#bpCloned1 = unreal.Ed... |
from typing import Iterable, Union
try: from typing import Protocol
except: from typing_extensions import Protocol
import unreal
class SupportsStr(Protocol):
"""Type Hints Protocol implementation for all class that support string conversion."""
def __str__(self) -> str:
"""Minimal implementation to... |
# -*- coding: utf-8 -*-
import json
import os
import unreal
from unreal import MaterialEditingLibrary as mat_lib
from ayon_core.pipeline import publish
class ExtractLook(publish.Extractor):
"""Extract look."""
label = "Extract Look"
hosts = ["unreal"]
families = ["look"]
optional = True
de... |
#!/project/ python3
"""
Create Test Level - Minimal script to create a basic level
This will work in headless mode for level creation
"""
import unreal
def create_basic_level():
"""Create a basic test level with minimal geometry"""
print("Creating basic test level...")
try:
# Create a simple ... |
import unreal
from ToolShelf import shelf_core
from .. import gallery_class
def on_click(button, context_menu: unreal.MenuAnchor):
def on_click1():
button
context_menu.open(True)
return on_click1
class GallaryContextMenu(gallery_class.GallaryWidgetFactory):
def with_content(self):
... |
from typing import *
from pydantic_model import SequenceKey
import unreal
from utils import *
from utils_actor import *
from GLOBAL_VARS import ENGINE_MAJOR_VERSION
################################################################################
# misc
def convert_frame_rate_to_fps(frame_rate: unreal.FrameRate) -> f... |
from src.MIDIToOSC.src.MIDIReader import MidiListener
from src.tickHook import tickHooker
from src.sequencer.sequencerControls import SequencerControls
import unreal
from functools import partial
from src.sequencer.sequencerControls import get_actor_by_name
import json
import time
control_mapping = json.load(open("/pr... |
# -*- 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-04-24 14:32:21'
import unreal
# def export_asset(obj, filename, exporter, options=None,prompt=Fal... |
import unreal
import os
import time
start_time = time.time()
# instances of unreal classes
editor_util = unreal.EditorUtilityLibrary()
editor_asset_lib = unreal.EditorAssetLibrary()
# get the selected assets
selected_assets = editor_util.get_selected_assets()
num_assets = len(selected_assets)
num_copies = 50
total_n... |
import unreal
def create_widget_blueprint(parent_class, widget_name, package_path):
"""Create a new Widget Blueprint."""
factory = unreal.WidgetBlueprintFactory()
factory.set_editor_property('ParentClass', parent_class)
asset_tools = unreal.AssetToolsHelpers.get_asset_tools()
return asset_tools.cre... |
# If you've somehow found this in your ai journey, don't judge my bad code! I worked 18h straight to get this ready for an update lol...
# Clean will happen later!
#!-!-!-!-!-!-!-!-!-!-!-!-!-!-#
#####
######## IMPORTS
#####
import unreal
import os
import sys
import shutil
print('ai_backups.py has started')
# copy... |
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... |
#!/project/ python
# Copyright (c) 2020 Computer Vision Center (CVC) at the Universitat Autonoma de
# Barcelona (UAB).
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/project/>.
""" This module provides a helper for the co-simulation between sumo and carla ."""
... |
import unreal
######### fill list of actors #########
def get_selected():
actor_subsys = unreal.get_editor_subsystem(unreal.EditorActorSubsystem)
return actor_subsys.get_selected_level_actors()
selected_actors = get_selected()
#filter to retain only static mesh actors
selected_static_mesh_actors = unrea... |
import unreal
class UEFileFunctionalities:
"""
Class for Unreal Engine file functionalities.
This class provides methods to interact with files and directories within an Unreal Engine project.
Methods:
- get_all_files_in_directory(self, directory): Get all files from a single directory (non-recu... |
import unreal
import utils.utils as utils
class MetaHuman:
def __init__(self, path_asset):
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, [0., 0., 0.])
... |
# 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... |
# 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
def get_actor_by_name(name):
"""
Fetch an actor by name.
Params:
- name (str): The name of the actor to fetch.
"""
actors = unreal.EditorLevelLibrary.get_all_level_actors()
for actor in actors:
if name in actor.get_name():
return actor
return None
def... |
# coding: utf-8
import unreal
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-vrm")
parser.add_argument("-rig")
parser.add_argument("-meta")
args = parser.parse_args()
print(args.vrm)
#print(dummy[3])
humanoidBoneList = [
"hips",
"leftUpperLeg",
"rightUpperLeg",
"leftLowerLeg",
"rightL... |
# coding: utf-8
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 sys
from pathlib import Path
from importlib import reload
from typing import Callable, Iterator, List, Optional, Union, cast
import unreal
asset_registry = unreal.AssetRegistryHelpers.get_asset_registry()
assert asset_registry
subobject_data_system = unreal.get_engine_subsystem(unreal.SubobjectDataSubsystem)
... |
import unreal
blendSpace_dir = input()
#blendSpace_dir = "/project/"
bs_lists = unreal.EditorAssetLibrary.list_assets(blendSpace_dir)
bs_assets_list = []
for i in bs_lists:
bs_assets_list.append ( unreal.EditorAssetLibrary.load_asset(i) )
for i in bs_assets_list:
num_sample = i.get_editor_property("sample_da... |
# Utility actions for Unreal Engine
import unreal
import json
import traceback
def ue_print_message(message: str = None) -> str:
"""
Logs a message to the Unreal log and returns a JSON success response.
"""
if message is None:
return json.dumps({"success": False, "message": "Required parameter... |
import unreal
from importlib import reload
def listAssetPaths():
EAL = unreal.EditorAssetLibrary
assetPaths = EAL.list_assets('/Game')
for assetPath in assetPaths:
print(assetPath)
def getSelectionContentBrowser():
EUL = unreal.EditorUtilityLibrary
selectedAssets = EUL.get_selected_assets(... |
# -*- coding: utf-8 -*-
"""Load Skeletal Meshes form FBX."""
from ayon_core.pipeline import AYON_CONTAINER_ID
from ayon_unreal.api import plugin
from ayon_unreal.api.pipeline import (
create_container,
imprint,
format_asset_directory,
get_dir_from_existing_asset
)
import unreal # noqa
class Skeletal... |
# coding: utf-8
import unreal
import os
import sys
sys.path.append('C:/project/-packages')
from PySide.QtGui import *
from PySide import QtUiTools
WINDOW_NAME = 'Qt Window One'
UI_FILE_FULLNAME = os.path.join(os.path.dirname(__file__), 'ui', 'window_move.ui').replace('\\','/')
class QtWindowOne(QWidget):
def __... |
# 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
# Muyuan Chen 2023-12
from EMAN2 import *
import numpy as np
def main():
usage="""prog --ptcls spt_xx/aliptcls3d_xx.lst --tomo <tomogram>
Map aligned particles back to tomograms.
This will generate a script to place the objects in unreal engine 5."""
parser = EMArgumentParser(usage=usage,vers... |
# -*- 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 ... |
import socket
import json
import unreal
import threading
import time
from typing import Dict, Any, Tuple, List, Optional
# Import handlers
from handlers import basic_commands, actor_commands, blueprint_commands, python_commands
from handlers import ui_commands
from utils import logging as log
# Global queues and stat... |
import unreal
def compile_blueprint_and_check(blueprint):
"""Compiles a Blueprint asset and prints the result."""
# Use the proper compilation method
unreal.EditorUtilityLibrary.compile_blueprint(blueprint)
unreal.EditorAssetLibrary.save_loaded_asset(blueprint)
if blueprint.status == unreal.BlueprintStatus.COMPIL... |
# /project/
# @CBgameDev Optimisation Script - Log Textures That Are Equal To X Size
# /project/
import unreal
import sys # So we can grab arguments fed into the python script
import os
EditAssetLib = unreal.EditorAssetLibrary()
workingPath = "/Game/" # Using the root directory
notepadFilePath = os.path.dirname(__fi... |
import unreal
from math import pi
import random
import utils.utils as utils
class Camera:
def __init__(self):
self.focus_distance_section = None
self.binding_camera = None
self.actor = unreal.EditorLevelLibrary.spawn_actor_from_class(unreal.CineCameraActor, [0., 0., 0.])
def add_to_le... |
# 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 ... |
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... |
import unreal
import sys
import scripts.recording.takeRecorder as takeRecorder
import scripts.communication.wsCommunicationScript as wsCommunicationScript
import scripts.state.stateManagerScript as stateManagerScript
import scripts.utils.popUp as popUp
import scripts.utils.editorFuncs as editorFuncs
import scripts.uti... |
# 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
from abc import abstractmethod
import traceback
from deadline_rpc.client import RPCClient
import unreal
import __main__
class _RPCContextManager:
"""
Context manager used for automatically marking a task as complete after
the statement is done... |
import unreal
factory = unreal.BlendSpaceFactory1D()
# target_skeleton = unreal.EditorAssetLibrary.load_asset('/project/')
# factory.set_editor_property('target_skeleton', target_skeleton)
# factory.set_editor_property
asset_tools = unreal.AssetToolsHelpers.get_asset_tools()
asset_tools.create_asset(
'tt',
... |
import unreal
import os
import json
#constants
DEFAULT_IO_TEMP_DIR = r"/project/"
BL_FLAG = "Blender"
BL_NEW = "NewActor"
BL_DEL = "Removed"
editor_subsys= unreal.get_editor_subsystem(unreal.UnrealEditorSubsystem)
level_subsys = unreal.get_editor_subsystem(unreal.LevelEditorSubsystem)
actor_subsys= unreal.get_editor_s... |
import unreal
### string path for assets
# texture_png = 'D:/project/.png'
# sound_wav = 'D:/project/.WAV'
static_mesh_fbx = 'D:/project/.FBX'
skeletal_mesh_fbx = 'D:/project/.FBX'
animation_fbx = 'D:/project/.FBX'
def importMyAssets():
texture_task = buildImportTask(texture_png, '/project/')
sound_task = ... |
# Copyright Epic Games, Inc. All Rights Reserved
# Built-in
import argparse
from getpass import getuser
# Internal
from deadline_service import get_global_deadline_service_instance
from deadline_job import DeadlineJob
from deadline_menus import DeadlineToolBarMenu
# Third Party
import unreal
# Editor Utility Widget... |
# 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 ... |
# Copyright Epic Games, Inc. All Rights Reserved.
import os
import unreal
#-------------------------------------------------------------------------------
class Platform(unreal.Platform):
name = "Mac"
def _read_env(self):
yield from ()
def _get_version_ue4(self):
dot_cs = self.get_unreal... |
# -*- coding: utf-8 -*-
import unreal
import Utilities.Utils
def print_refs(packagePath):
print("-" * 70)
results, parentsIndex = unreal.PythonBPLib.get_all_refs(packagePath, True)
print ("resultsCount: {}".format(len(results)))
assert len(results) == len(parentsIndex), "results count not equal paren... |
import unreal
file_a = "/project/.fbx"
file_b = "/project/.fbx"
imported_scenes_path = "/project/"
print 'Preparing import options...'
advanced_mesh_options = unreal.DatasmithStaticMeshImportOptions()
advanced_mesh_options.set_editor_property('max_lightmap_resolution', unreal.DatasmithImportLightmapMax.LIGHTMAP_512)
... |
import unreal
SocketNames = list[str]
class TMaterialAttributes:
pass
class TTextureObject_Color:
pass
class TTextureObject_Normal:
pass
class TTextureCoordinate:
def __init__(self, x, y):
self.x = x
self.y = y
class VecFBase:
def __init__(self):
self.linearColor = unr... |
import unreal
import time
# Get the world
editor_world = unreal.EditorLevelLibrary.get_editor_world()
# Find the car
vehicle_name = "SM_vehTruck_vehicle04" # Change to match your vehicle's Blueprint name
vehicle = None
# Find the actor by its class
actors = unreal.GameplayStatics.get_all_actors_of_class(editor_worl... |
# 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... |
# 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
file_a = "/project/.fbx"
file_b = "/project/.fbx"
imported_scenes_path = "/project/"
print 'Preparing import options...'
advanced_mesh_options = unreal.DatasmithStaticMeshImportOptions()
advanced_mesh_options.set_editor_property('max_lightmap_resolution', unreal.DatasmithImportLightmapMax.LIGHTMAP_512)
... |
import unreal
import unreal_uiutils
import unreal_utils
# from unreal_global import *
# from unreal_utils import AssetRegistryPostLoad
unreal.log("""@
####################
Init Start up Script
####################
""")
# assetregistry_pretickhandle = None
# def assetregistry_postload_handle(deltaTime):
# """
... |
# -*- coding utf-8 -*-
import unreal
import numpy as np
import sklearn
from sklearn.cluster import KMeans
"""
using
import TPS_Modules.instancing_generator as instancing_generator
import importlib
importlib.reload(instancing_generator)
instancing_generator.create_instancing_mesh()
"""
def create_instancing_mesh():... |
# 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_actors = unreal.EditorLevelLibrary.get_selected_level_actors()
for actor in selected_actors :
print(dir(actor))
|
# coding:utf-8
__author__ = 'timmyliang'
__email__ = 'user@example.com'
__date__ = '2020-01-09 12:57:22'
"""
"""
import sys
import Tkinter
import tkMessageBox
import unreal
win = Tkinter.Tk()
win.withdraw()
unreal.parent_external_window_to_slate(win.winfo_id())
# tkMessageBox.showerror("错误", sys.argv[0])
win.ma... |
import unittest
import unreal
from widget_utils import *
from tests.test_config import *
class TestWidgetUtils(unittest.TestCase):
def setUp(self):
"""Set up test environment before each test."""
self.test_package_path = TEST_WIDGET_PATH
self.test_widget_name = TEST_WIDGET_NAME
self... |
# coding: utf-8
import unreal
import argparse
print("VRM4U python begin")
print (__file__)
parser = argparse.ArgumentParser()
parser.add_argument("-vrm")
parser.add_argument("-rig")
args = parser.parse_args()
print(args.vrm)
#print(dummy[3])
humanoidBoneList = [
"hips",
"leftUpperLeg",
"rightUpperLeg",
"leftLo... |
# 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
level_actors = unreal.EditorLevelLibrary.get_all_level_actors()
actors = level_actors
for actor in actors :
tags = actor.get_editor_property('tags')
label = actor.get_actor_label()
if label == 'Ultra_Dynamic_Weather' or label == 'Ultra_Dynamic_Weather2' :
print(tags)
if ac... |
# 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
# ----------------------------------------------
import string
import re
from ty... |
# _
# (_)
# _ __ ___ __ _ _ __ ___ ___ _ __ _ ___ _ __ ___
# | '_ ` _ \ / _` | '_ ` _ \ / _ \| '_ \| |/ _ \ '_ ` _ \
# | | | | | | (_| | | | | | | (_) | | | | | __/ | | | | |
# |_| |_| |_|\__,_|_| |_| |_|\___/|_| |_|_|\___|_| |_| |_|
# www.mamoniem.com
# www.ue4u.xyz
#Copyright 20... |
import sys
import importlib
import unreal
import os
sys.path.append("Lib/site-packages")
from foundation import log_handler
# importlib.reload(log_handler)
#unreal.log("Logging Initialized")
import foundation.mcp_app
# importlib.reload(foundation.mcp_app)
import warnings
from foundation.mcp_app import UnrealMCP
fro... |
import subprocess
import json
import time
import os
import socket
import threading
from pathlib import Path
from typing import Dict, List, Optional, Any, Tuple
import logging
logger = logging.getLogger(__name__)
class UnrealEngineController:
"""Controller for automating Unreal Engine through Python API and comman... |
# 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
testKeys = {1:5,5:50,10:100,20:200,50:500}
blenderKeys = {0:(-0.09),1:(0.17),2:(0.14),3:(-0.01),4:(-0.13),5:(-0.07),6:(0.02),7:(-0.01),8:(0.08),9:(0.18),10:(0.17),11:(0.47),12:(0.27),13:(0.17),14:(0.12),15:(-0.01),16:(-0.1),17:(-0.09),18:(0.16),19:(0.18),20:(1.05),21:(0.59),22:(0.33),23:(0.23),24:(0.26)... |
# 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 unreal
AssetTools = unreal.AssetToolsHelpers.get_asset_tools()
MaterialEditLibrary = unreal.MaterialEditingLibrary
EditorAssetLibrary = unreal.EditorAssetLibrary
AssetPath = "/project/ "
# check if the material exists
if EditorAssetLibrary.do_assets_exist(AssetPath):
#If it does make a copy
NewAssetPa... |
#coding:utf-8
import unreal
import sys
sys.path.append('C:/project/-packages')
from PySide import QtGui
# 第一次import的时候会执行
# UE线程里面的,只会随UE关闭,其余时间存在内存里
unreal_app = QtGui.QApplication.instance()
if not unreal_app:
existing_windows = {}
opened_windows = []
unreal_app = QtGui.QApplication(sys.argv)
# tick_handle = u... |
import os
import unreal
class Toolbox:
def __init__(self):
self.menus = unreal.ToolMenus.get()
self.main_menu = self.menus.find_menu("LevelEditor.MainMenu")
if not self.main_menu:
unreal.log_warning("Failed to find the 'Main' menu. Something is wrong in the force!")
def a... |
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_... |
# coding: utf-8
import unreal
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-vrm")
parser.add_argument("-rig")
parser.add_argument("-debugeachsave")
args = parser.parse_args()
#print(args.vrm)
######
rigs = unreal.ControlRigBlueprint.get_currently_open_rig_blueprints()
print(rigs)
for r ... |
# -*- coding: utf-8 -*-
"""
Created on Thu Feb 22 19:18:21 2024
@author: WillQuantique
"""
import unreal
lp2 = "/project/"
def LoadLevel(path):
unreal.get_editor_subsystem(unreal.LevelEditorSubsystem).load_level(path) |
# Copyright (c) 2023 Max Planck Society
# License: https://bedlam.is.tuebingen.mpg.de/license.html
#
# Render jobs in MovieRenderQueue and generate camera ground truth (extrinsics/intrinsics) information
#
# Requirements:
# Python Editor Script Plugin
# Unreal 5.0.3+
#
from pathlib import Path
import re
import sy... |
# AdvancedSkeleton To ControlRig
# Copyright (C) Animation Studios
# email: user@example.com
# exported using AdvancedSkeleton version:x.xx
import unreal
import re
engineVersion = unreal.SystemLibrary.get_engine_version()
asExportVersion = x.xx
asExportTemplate = '4x'
print ('AdvancedSkeleton To ControlRig (Unreal:'+e... |
# coding: utf-8
# ノードの骨指定部分を _c のControllerに置き換える
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... |
# 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 Epic Games, Inc. All Rights Reserved.
'''
Utility script to debug the embedded UnrealEngine Python interpreter using debugpy in VS Code.
Usage:
1) import debugpy_unreal into Python within the UE Editor.
2) If debugpy has not yet been installed, run debugpy_unreal.install_debugpy().... |
import unreal
import os
import glob
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('-f', '--file')
args = parser.parse_args()
print(args.file)
actors = unreal.EditorLevelLibrary.get_all_level_actors()
export_dir = os.path.join(os.path.abspath(args.file), "objects")
exported_meshes = set()
# En... |
# coding: utf-8
import unreal
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-vrm")
parser.add_argument("-rig")
args = parser.parse_args()
print(args.vrm)
#print(dummy[3])
humanoidBoneList = [
"hips",
"leftUpperLeg",
"rightUpperLeg",
"leftLowerLeg",
"rightLowerLeg",
"leftFoot",
"righ... |
# Copyright Epic Games, Inc. All Rights Reserved.
import unreal
import random
# This example is an implementation of isolated Python script which is responsible
# for taking a level sequence and rendering it with some fixed settings on the current
# map in the editor. A more ideal implementation would be to implement... |
import unreal
from collections import deque
from collections.abc import Iterable
class PyTick():
_delegate_handle = None
_current = None
schedule = None
def __init__(self):
self.schedule = deque()
self._delegate_handle = unreal.register_slate_post_tick_callback(self._callback)
... |
# 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 re
def get_bp_c_by_name(__bp_dir: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_class(__bp_c)
bp_c_obj = unreal.get_default_object(loaded_bp_c)... |
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 import_fbx_and_create_blueprint(fbx_file_path, blueprint_name, wheel_bone_name):
# Unreal Editor API
editor_asset_lib = unreal.EditorAssetLibrary()
asset_tools = unreal.AssetToolsHelpers.get_asset_tools()
# Determine destination paths
destination_path = "/project/"
fbx_file_n... |
# _
# (_)
# _ __ ___ __ _ _ __ ___ ___ _ __ _ ___ _ __ ___
# | '_ ` _ \ / _` | '_ ` _ \ / _ \| '_ \| |/ _ \ '_ ` _ \
# | | | | | | (_| | | | | | | (_) | | | | | __/ | | | | |
# |_| |_| |_|\__,_|_| |_| |_|\___/|_| |_|_|\___|_| |_| |_|
# www.mamoniem.com
# www.ue4u.xyz
#Copyright 20... |
import unreal
# ======================================================================
# PCG Graph Blueprint Creation Script
# ======================================================================
#
# This is the fifth step in the Undini procedural generation pipeline:
# 1. Export splines from Unreal Engine (000_expo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.