text stringlengths 15 267k |
|---|
# -*- coding: utf-8 -*-
import unreal
import os
from Utilities.Utils import Singleton
from Utilities.Utils import cast
import Utilities
import QueryTools
import re
import types
import collections
from .import Utils
global _r
COLUMN_COUNT = 2
class DetailData(object):
def __init__(self):
self.filter_str ... |
# Copyright Epic Games, Inc. All Rights Reserved.
import os
import unreal
#-------------------------------------------------------------------------------
class Platform(unreal.Platform):
name = "TVOS"
def _read_env(self):
yield from ()
def _get_version_ue4(self):
dot_cs = self.get_unrea... |
import unreal
#import unreal module
from typing import List
#import typing module for 'clearer' annotation
##But, this is not Typescript though, :(
_seek_parent_material: unreal.Material
#pick from editor
_seek_parent_material_class: object = _seek_parent_material.get_class()
compare_seek_parent_material_class ... |
#!/project/ python3
"""
Sprite Sheet Processor - Python Implementation
==============================================
This Python script replicates the C++ SpriteSheetProcessor functionality using
Unreal Engine's Python Editor Scripting API. It provides automated sprite sheet
processing for Paper2D system with the s... |
"""
>>> python -m tests.unreal.init_test
"""
from xrfeitoria.rpc import remote_unreal
from xrfeitoria.utils import setup_logger
from ..utils import __timer__, _init_unreal
@remote_unreal()
def test_unreal():
import unreal # fmt: skip
unreal.log('test')
def init_test(debug: bool = False, dev: bool = False... |
import unreal
import os
import random
'''
TO USE:
1. change NUM_PAIRS_IMAGES to whatever number of pairs you want
2. change base_directory to the UE5 Data folder in the PAIR repo wherever that is stored on your computer
3. In unreal, click on "tools" (in the top bar), scroll down to near the bottom, and click "Execute... |
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 None:
print ("Failed to spawn either the LevelVariantSets asset or... |
# 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
import logging
import re
# --- Script Configuration ---
# Set to True to see what the script will do without making any changes.
# Set to False to perform the actual assignments.
DRY_RUN = False
# !!! IMPORTANT !!!
# 1. SET THIS TO THE FULL, EXACT CONTENT BROWSER PATH FOR THE SKELETAL MESH ASSET.
# The... |
import unreal
import logging
logger = logging.getLogger(__name__)
from pamux_unreal_tools.generated.material_expression_wrappers import *
from pamux_unreal_tools.utils.types import *
from pamux_unreal_tools.base.material_expression.material_expression_container_builder_base import MaterialExpressionContainerBuilderBa... |
# 本脚本主要用于调试,python调用蓝图库c++
import unreal
unreal.TookitBPLibrary.export_actors_to_json() |
import unreal
import os
from pathlib import Path
import tempfile
def take_screenshot() -> str:
try:
with tempfile.NamedTemporaryFile(delete=False, suffix=".png") as temp_file:
screenshot_path = temp_file.name
unreal.AutomationLibrary.take_high_res_screenshot(640, 520, screenshot_p... |
from enum import Enum
from typing import List, Dict, Any
class ValidationErrorType(Enum):
MISSING_COLUMN = "컬럼 누락"
MISSING_ASSET = "필수 에셋 누락"
DUPLICATE_VALUE = "중복 값"
INVALID_REFERENCE = "잘못된 참조"
INVALID_VALUE = "잘못된 값"
class ValidationError:
def __init__(self, error_type: ValidationErrorType,... |
import unreal
selected : list = unreal.EditorUtilityLibrary.get_selected_assets() #get selected assets using editorUtilityLib
for staticMesh in selected :
meshNaniteSettings : bool = staticMesh.get_editor_property('nanite_settings')
print
if meshNaniteSettings.enabled : #if true
meshNaniteSettin... |
import unreal
# Instances of unreal classes
editor_util = unreal.EditorUtilityLibrary()
layer_sis = unreal.LayersSubsystem()
editor_filter_lib = unreal.EditorFilterLibrary()
# Get the selected material and selected static mesh actors
selected_assets = editor_util.get_selected_assets()
materials = editor_filter_lib.by... |
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 None:
print ("Failed to spawn either the LevelVariantSets asset or... |
import unreal
util_lib = unreal.EditorUtilityLibrary
red_lib = unreal.RedArtToolkitBPLibrary
bp, = unreal.EditorUtilityLibrary.get_selected_assets()
parent = red_lib.get_blueprint_parent_class(bp)
print(parent)
material = unreal.load_asset('/project/.M_Sanji01_L_body')
bp_gc = unreal.load_object(None, "%s_C" % bp.g... |
"""
UEMCP Error Handling Framework
Provides decorators, validators, and error types to reduce try/catch boilerplate
while improving error specificity and consistency.
"""
import functools
import inspect
from typing import Any, Dict, List, Optional, Union
import unreal
from utils import log_debug, log_error
# =====... |
"""Test script for UnrealMCP basic commands.
This script tests the basic scene and Python execution commands available in the UnrealMCP bridge.
Make sure Unreal Engine is running with the UnrealMCP plugin enabled before running this script.
"""
import sys
import os
import json
from mcp.server.fastmcp import FastMCP, ... |
'''
File:
Author:
Date:
Description:
Other Notes:
'''
import time
import unreal
# ar_lib = unreal.ARLibrary()
#
# cam = unreal.getARTexture()
# ar_lib.get_camera_image()
#
# cam = unreal.CameraActor(name='CineCameraActor')
# Get main camera - Confirmed if CAMERA is selected
actor = unreal.EditorLevelLib... |
# Copyright Epic Games, Inc. All Rights Reserved
"""
This script handles processing jobs for a specific queue asset
"""
import unreal
from .render_queue_jobs import render_jobs
from .utils import (
get_asset_data,
movie_pipeline_queue,
update_queue
)
def setup_queue_parser(subparser):
"""
This m... |
import unreal
import sys
from PySide2 import QtWidgets, QtUiTools, QtGui
#Import UE python lib
#import ui.qwidget_import_asset as q_import_asset
# RELOAD MODULE
import importlib
sys.path.append('C:/project/')
sys.path.append('C:/project/')
sys.path.append('C:/project/')
WINDOW_NAME = 'M2 - Menu'
UI_FILE_FULLNAME =... |
import unreal
def world_outliner():
# 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_filt... |
# 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 csv
import json
import tempfile
import unreal
from urllib import request, parse
from scripts.common.utils import get_sheet_data
from ..common.column_handler import ColumnHandler
# 상수 정의
SHEET_ID = "1jeq0WdGMsOcAEtW_p__-daOn22ZFoCm67UWgLh6p6CA"
GID = "301417934"
TABLE_PATH = "/project/"
# 고정 경로 매핑
FIX... |
import unreal
import os
import subprocess
def open_project_directory():
project_dir = unreal.SystemLibrary.get_project_directory()
print(project_dir)
subprocess.run(['explorer', os.path.realpath(project_dir)])
print('Completed')
open_project_directory()
|
import os
import json
import unreal
from ueGear import helpers, assets
import ueGear.sequencer.bindings as seq_bindings
# Dictionary containing default FBX export options
DEFAULT_SEQUENCE_FBX_EXPORT_OPTIONS = {
"ascii": True,
"level_of_detail": False,
}
def get_current_level_sequence():
"""
Returns... |
import unreal
selected_asset = unreal.EditorUtilityLibrary.get_selected_assets()[0]
|
"""Python execution commands for Unreal Engine.
This module contains commands for executing Python code in Unreal Engine.
"""
import sys
import os
from mcp.server.fastmcp import Context
# Import send_command from the parent module
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from u... |
import unreal
level_actors = unreal.EditorLevelLibrary.get_selected_level_actors()
light_function = unreal.EditorAssetLibrary.load_asset('/project/')
for i in level_actors :
i.set_light_function_material(light_function)
unreal.log('Light Function Assigned ') |
# 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 ... |
# 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
'''
Non UFUNCTION functions as we cannot call ufunctions within ufunctions unless if nested
'''
def cast_key_to_type(rig, rig_key):
"""
Given an element key and its parent hierarchy modifier, returns the object of the correct type
:param rig: The rig we are looking at
:type rig: unreal.C... |
import unreal
import json
import os
# === Use tkinter to open Windows file dialog ===
import tkinter as tk
from tkinter import filedialog
def choose_json_file():
root = tk.Tk()
root.withdraw() # Hide the root window
file_path = filedialog.askopenfilename(
title="Choose JSON File",
filetyp... |
import unreal
import json
e_util = unreal.EditorUtilityLibrary()
a_util = unreal.EditorAssetLibrary()
str_util = unreal.StringLibrary()
sys_util = unreal.SystemLibrary()
l_util = unreal.EditorLevelLibrary()
result_dict = {}
actors = l_util.get_selected_level_actors()
# des = unreal.DataLayerEditorSubsystem()
layers... |
import unreal
selected_assets = unreal.EditorUtilityLibrary.get_selected_assets()
asset_tools = unreal.AssetToolsHelpers.get_asset_tools()
loaded_subsystem = unreal.get_editor_subsystem(unreal.EditorAssetSubsystem)
asset_registry = unreal.AssetRegistryHelpers.get_asset_registry()
counter = 0
deleted_assets = ""
for a... |
import unreal
from pathlib import Path
import os
""" 常用功能/通用functions"""
sys_lib = unreal.SystemLibrary()
string_lib = unreal.StringLibrary()
editor_lib = unreal.EditorUtilityLibrary
staticmesh_subsys = unreal.get_editor_subsystem(unreal.StaticMeshEditorSubsystem)
subobject_subsys = unreal.get_engine_subsystem(unre... |
"""
查看Unreal Engine中所有可用的菜单
"""
import unreal
def list_menu(num=1000):
menu_list = set()
for i in range(num):
obj = unreal.find_object(None,"/project/.ToolMenus_0:RegisteredMenu_%s" % i)
if not obj:
obj = unreal.find_object(None,f"/project/.ToolMenus_0:ToolMenu_{i}")
... |
import unreal
from Lib import __lib_topaz__ as topaz
assets = topaz.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 :
static_mesh : unr... |
# -*- coding: utf-8 -*-
import logging
import unreal
import inspect
import types
import Utilities
from collections import Counter
class attr_detail(object):
def __init__(self, obj, name:str):
self.name = name
attr = None
self.bCallable = None
self.bCallable_builtin = None
... |
from mca.ue import pyunreal as pue
from mca.ue.pyunreal import general
from mca.ue.tools.scripteditor import script_editor_ui
import unreal
reload(script_editor_ui)
reload(script_editor_ui)
reload(pue)
reload(general)
sk_skel = pue.selected()
skel_mesh = sk_skel[0]
print(skel_mesh)
print(skel_mesh.get_class())
prin... |
import unreal
# Get all actors in the current level
actors = unreal.EditorLevelLibrary.get_all_level_actors()
# Dictionary to store unique stencil values per class
class_stencil_map = {}
stencil_counter = 1 # Start stencil values from 1
# Store results for printing
results = []
# Loop through each actor
for actor ... |
import unreal
import csv
import os
# Настройки секвенции
SEQUENCE_PATH = "/project/" # Путь к секвенции в UE
FPS = 60 # Кадров в секунду
NUM_LIGHTS = 64 # Количество светильников
FIRST_LIGHT_INDEX = 0 # Начальный индекс светильников
# Получаем абсолютный путь к файлам
SCRIPT_DIR = os.path.dirname(os.path.abspath(_... |
# 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 ... |
# 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 os
from Utilities.Utils import Singleton
from Utilities.Utils import cast
import Utilities
import QueryTools
import re
import types
import collections
from .import Utils
global _r
COLUMN_COUNT = 2
class DetailData(object):
def __init__(self):
self.filter_str ... |
# 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 time
current_time = time.time()
editor_actor_subsystem = unreal.get_editor_subsystem(unreal.EditorActorSubsystem)
actors = editor_actor_subsystem.get_all_level_actors()
camera_actors = {}
for actor in actors:
if "camera" in actor.get_actor_label():
camera_actors[actor.get_actor_label(... |
"""Provides base helper functionality for asset processing."""
import unreal
from ...utils.logging_config import logger
from ...utils.constants import SKELETAL_MESH_MAPPING
class BaseHelper:
"""Base helper class for asset processing operations."""
def __init__(self):
"""Initialize the helper with sk... |
"""
@Author: Ihimu Ukpo
@License: MIT
@Email: user@example.com
@Description: This Python script removes invalid static meshes from actors in an Unreal Engine level.
@Version: 1.0
@Planned future updates: error handling for library opening, etc. Update script (if necessary) to Python 3.
"""
import unreal
# Get instanc... |
import unreal
level_lib = unreal.EditorLevelLibrary()
level_subsys = unreal.get_editor_subsystem(unreal.LevelEditorSubsystem)
actor_subsys = unreal.get_editor_subsystem(unreal.EditorActorSubsystem)
editor_subsys = unreal.get_editor_subsystem(unreal.UnrealEditorSubsystem)
layers_subsys = unreal.get_editor_subsystem(un... |
# /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... |
import unreal
def set_screen_percentage(enable=True, value=200.0):
"""Set screen percentage for runtime performance scaling (affects PIE and builds)
Args:
enable (bool): Whether to enable custom screen percentage
value (float): Screen percentage value (10-400, where 100 = native resolution)
... |
# Copyright 2018 Epic Games, Inc.
import unreal
import re
import sys
"""
Functions to import FBX into Unreal
"""
def _sanitize_name(name):
# Remove the default Shotgun versioning number if found (of the form '.v001')
name_no_version = re.sub(r'.v[0-9]{3}', '', name)
# Replace any remaining '.' with '_'... |
# 本脚本用于导出当前场景中每个component下面所有body 的 relative transform和 basecolor 到 json文件中
import unreal
import json
def export_relative_trans_with_color(saved_json_folder : str):
actors = unreal.get_editor_subsystem(unreal.EditorActorSubsystem).get_all_level_actors()
transform_data = []
parent_actor = None
par... |
"""
Unreal Engine 5.6 Asset Import Script for Terminal Grounds
Imports generated art assets and sets up materials/settings
"""
import unreal
import os
import json
from pathlib import Path
from datetime import datetime
class TGAssetImporter:
def __init__(self):
self.editor_asset_lib = unreal.EditorAssetLib... |
# This script describes the different ways of setting variant thumbnails via the Python API
import unreal
def import_texture(filename, contentpath):
task = unreal.AssetImportTask()
task.set_editor_property('filename', filename)
task.set_editor_property('destination_path', contentpath)
task.automated =... |
import unreal
from Lib import __lib_topaz__ as topaz
selected_actors: list[unreal.Actor] = topaz.get_selected_level_actors()
for actor in selected_actors:
if len(selected_actors) > 0:
actor_class = actor.__class__
if actor_class == unreal.RectLight or unreal.SpotLight or unreal.PointLight:
... |
# Copyright Epic Games, Inc. All Rights Reserved.
import os
import unreal
import subprocess as sp
#-------------------------------------------------------------------------------
class _PlatformBase(unreal.Platform):
def _read_env(self):
yield from ()
def _get_version_ue4(self):
import re
... |
"""
Updated validate_queue.py using common utilities
"""
import sys
import os
import unreal
# Add the common directory to Python path
script_dir = os.path.dirname(os.path.abspath(__file__))
common_dir = os.path.join(script_dir, 'lib')
if common_dir not in sys.path:
sys.path.append(common_dir)
# Import from comm... |
import unreal
import xml.etree.ElementTree as ET
from xml.etree.ElementTree import ParseError
import sys
import os
# need to run the Deltagen_Import_look_variants
#get all variant set's names, variant's names and their ID
def getVariantSetsAndVariantFromFile():
print("Lising all variants")
variant_sets_dict = dict()... |
import unreal
""" Should be used with internal UE Python API
Auto generate LODs for static meshes"""
asset_reg = unreal.AssetRegistryHelpers.get_asset_registry()
asset_root_dir = '/project/'
assets = asset_reg.get_assets_by_path(asset_root_dir, recursive=True)
def generate_lods(static_mesh):
number_of_vertices... |
#!/project/ python3
"""
String Handling Test for MCP Server
This script tests string handling in the MCP Server.
It connects to the server, sends Python code with various string formats,
and verifies they are handled correctly.
"""
import socket
import json
import sys
def main():
"""Connect to the MCP Server and... |
import unreal
import re
ar_asset_lists = []
ar_asset_lists = unreal.EditorUtilityLibrary.get_selected_assets()
print (ar_asset_lists[0])
str_selected_asset = ''
if len(ar_asset_lists) > 0 :
str_selected_asset = unreal.EditorAssetLibrary.get_path_name_for_loaded_asset(ar_asset_lists[0])
#str_selected_asset... |
import unreal
import os
# Get the list of props from ADACA_extract
props_dir = "C:/project/"
props = [p.replace(".uasset", "") for p in os.listdir(props_dir) if p.startswith("Prop_") and p.endswith(".uasset")]
print(f"Weapons found: {props}")
package_path = "/project/"
factory = unreal.BlueprintFactory()
factory.s... |
import unreal
""" Should be used with internal UE Python API
Auto generate LODs for static meshes"""
asset_reg = unreal.AssetRegistryHelpers.get_asset_registry()
asset_root_dir = '/project/'
assets = asset_reg.get_assets_by_path(asset_root_dir, recursive=True)
def generate_lods(static_mesh):
number_of_vertices... |
import unreal
cad_file_path = "c:/project/.3dxml"
directory_name = "/project/"
datasmith_scene = unreal.DatasmithSceneElement.construct_datasmith_scene_from_file(cad_file_path)
# set CAD import options
import_options = datasmith_scene.get_options()
import_options.base_options.scene_handling = unreal.DatasmithIm... |
import unreal
import numpy as np
import ParametersClass as pc
import CaptureImages as ci
import pandas as pd
import os
import airsim
import time
from multiprocessing import Process
TEST_MODE = 2
# SEARCH_MODE = "HIGH_FIDELITY"
SEARCH_MODE = "LOW_FIDELITY"
RESULTS_FILE_PATH = r"/project/"
CAMERA_NAME = "bottom_for... |
import unreal
actorSubsystem = unreal.get_editor_subsystem(unreal.EditorActorSubsystem)
gl_level_actors = actorSubsystem.get_all_level_actors()
def getActor(actorName):
filtered_list = unreal.EditorFilterLibrary.by_actor_label(
gl_level_actors,
actorName,
unreal.EditorScriptingStringMa... |
import socket
import unreal # Unreal Engine Python API (requires Unreal Engine to be running)
# Simulated RTX API placeholder (can be replaced with actual RTX integrations)
class RTXGraphics:
@staticmethod
def initialize():
print("Initializing RTX Graphics...")
@staticmethod
def render_scene(... |
# /project/
# @CBgameDev Optimisation Script - Log Skel Mesh Missing Physics Asset
# /project/
import unreal
import os
EditAssetLib = unreal.EditorAssetLibrary()
SystemsLib = unreal.SystemLibrary
workingPath = "/Game/" # Using the root directory
notepadFilePath = os.path.dirname(__file__) + "//PythonOptimiseLog.txt"
... |
# 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.
from collections import namedtuple, defaultdict
import copy
import os
import unreal
import sgtk
# A named tuple to store Le... |
import os
import subprocess
CRY_ENGINE_OUTPUT_FOLDER_ROOT = "D:/project/"
LEVEL_ROOT_FOLDER = "data/levels" # Removed leading slash for consistency
LEVEL_LAYERS_FOLDER = "layers"
LEVEL_EDITOR_XML = "level.editor_xml"
PREFAB_ROOT_FOLDER = 'prefabs'
LEVEL_NAME = "rataje"
def convert_meshes_from_list(file_path):
"... |
import unreal
# Instances of Unreal classes
editor_asset_lib = unreal.EditorAssetLibrary()
# Set source dir and options
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_folder=True)
fo... |
import unreal
import os
import scripts.utils.popUp as popUp
#########################################################################################################
# UEFileManager #
###############################################... |
import unreal
from Lib import __lib_topaz__ as topaz
desired_triangle_percentage : float # UI Binded Value
assets = topaz.get_selected_assets()
## execution here ##
for each in assets :
if each.__class__ == unreal.Blueprint :
comps = topaz.get_component_by_class(each, unreal.StaticMeshComponent)
... |
import unreal
from pathlib import Path
import sys
# import os
# import shutil
# sys.path.append(str(Path(__file__).parent.parent.parent.parent.parent.resolve()))
# from importlib import *
# reloads = []
# for k, v in sys.modules.items():
# if k.startswith("pamux_unreal_tools"):
# reloads.append(v)
# f... |
# 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... |
# 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 -*-
"""
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
def import_asset(filename, game_path, asset_name, im... |
# 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 neo4j import GraphDatabase
class MazePopulator:
def __init__(self, uri, user, password):
self.driver = GraphDatabase.driver(uri, auth=(user, password), database="world")
def close(self):
self.driver.close()
def create_cube(self, name, location, scale):
# Load th... |
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
import yaml
import unreal
from typing import Any
from deadline.unreal_submitter.unreal_open_job.unreal_open_job import (
UnrealOpenJobParameterDefinition,
)
from deadline.unreal_submitter.unreal_open_job.unreal_open_job_step import (
UnrealO... |
import unreal
import json
import os
proj_path = os.path.dirname(__file__)
with open(proj_path + r"/project/.json") as f:
data = json.load(f)
unreal.get_editor_subsystem(unreal.LevelEditorSubsystem).load_level("/project/")
unreal.log("Headlessly Running file")
for info in data["Scene_Data"]:
asset_name = ... |
# 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... |
# -*- coding: utf-8 -*-
import os
import sys
import subprocess
import unreal
from Utilities.Utils import Singleton
import random
import re
if sys.platform == "darwin":
import webbrowser
class ChameleonGallery(metaclass=Singleton):
def __init__(self, jsonPath):
self.jsonPath = jsonPath
self.da... |
from tqdm import tqdm
import json
import os
import random
import numpy as np
import math
import time
import unreal
import re
# for name in list(globals().keys()):
# if not name.startswith('_'):
# del globals()[name]
# import unreal
def natural_sort_key(s):
return [int(text) if text.isdigit()... |
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 :
... |
import unreal
def get_selected_assets():
"""Get selected assets from the Content Browser."""
editor_utility = unreal.EditorUtilityLibrary()
return editor_utility.get_selected_assets()
def get_selected_actors():
"""Get selected actors in the level."""
editor_level_library = unreal.EditorLevelLibrar... |
import unreal
from Utilities.Utils import Singleton
import json
import os
from .DataObject import DataObject, DataSubscriber
class BaseWizard(DataSubscriber):
def __init__(self, jsonPath, config_path):
self.jsonPath = jsonPath
self.data = unreal.PythonBPLib.get_chameleon_data(self.jsonPath)
... |
import time
import unreal
from Utilities.Utils import Singleton
from Utilities.ChameleonTaskExecutor import ChameleonTaskExecutor
class MinimalAsyncTaskExample(metaclass=Singleton):
def __init__(self, json_path:str):
self.json_path = json_path
self.data:unreal.ChameleonData = unreal.PythonBPLib.... |
# 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/ python3
"""
Fix Script for Animations and Level Issues
- Recreates corrupted flipbook animations
- Fixes level lighting
- Ensures character blueprint works
"""
import unreal
import sys
def log_message(message, error=False):
"""Print and log message"""
print(message)
if error:
unreal... |
import unreal
import csv
def get_static_mesh_data(asset):
if isinstance(asset, unreal.StaticMesh):
name = asset.get_name()
path = "StaticMesh\'" + asset.get_path_name() + "\'"
bound = asset.get_bounding_box()
box = bound.max - bound.min
height = max( box.z / 100.0, 0.01 )
... |
#!/project/
# -*- coding: utf-8 -*-
import unreal
file = open('/project/.txt')
lines = file.readlines()
locatorClass = unreal.EditorAssetLibrary.load_blueprint_class('/project/')
tree = unreal.EditorAssetLibrary.load_blueprint_class('/project/')
treelittle = unreal.EditorAssetLibrary.load_blueprint_class('/project/')... |
# -*- 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... |
from typing import Dict, Any, Optional
import unreal
import json
def create_object(
object_class: str,
object_name: str,
location: Optional[Dict[str, float]] = None,
rotation: Optional[Dict[str, float]] = None,
scale: Optional[Dict[str, float]] = None,
properties: Optional[Dict[str, Any]] = No... |
# Copyright Epic Games, Inc. All Rights Reserved.
import unreal
import random
#
# USAGE:
# - Requires the "Python Editor Script Plugin" to be enabled in your project.
#
# Open the Python interactive console and use:
# import MoviePipelineMiscExamples
# MoviePipelineMiscExamples.ExampleResolveOutputPat... |
import unreal
accepted_classes = []
exclude_folders = []
combo_box = unreal.ComboBoxString()
file_paths = []
def FillCombo(combo_box, excluded_folders, excluded_classes, excluded_names) -> list[str]:
combo_box.clear_options()
assetReg = unreal.AssetRegistryHelpers.get_asset_registry()
allAssetsData = as... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.