text stringlengths 15 267k |
|---|
import unreal
""" Should be used with internal UE Python API
Auto generate LODs for static meshes. 5.3 API"""
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(skeletal_mesh):
unreal.... |
import unreal
def initialize_project():
unreal.log("Python 초기화 스크립트가 실행되었습니다.")
initialize_project() |
import unreal
import traceback
from typing import Any
def log_info(message: str) -> None:
"""
Log an informational message to the Unreal log
Args:
message: The message to log
"""
unreal.log(f"[AI Plugin] {message}")
def log_warning(message: str) -> None:
"""
Log a warning me... |
# 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... |
"""
Common utilities for UE5 level data extraction
Shared functions for extracting floor, room, and panorama point data
"""
import unreal
import os, sys
import json
import tkinter as tk
from tkinter import filedialog
common_dir = os.path.dirname(os.path.abspath(__file__))
if common_dir not in sys.path:
sys.path.a... |
import unreal
#import pathlib
def IsNaniteMesh(staticMesh):
if not staticMesh:
return False
return staticMesh.get_nanite_setting_enable() and staticMesh.has_valid_nanite_data()
Folders = ["/project/",
"/project/"]
NaniteResult = "E:/project/.txt"
NaniteMeshes = []
class NaniteMesh(o... |
import unreal
from unreal import EditorLevelLibrary as lib
meshPath = "StaticMesh'/project/.Aset_rock_sandstone_M_rjApI_LOD0'"
exists = unreal.EditorAssetLibrary.does_asset_exist(meshPath)
if exists:
#load once
asset = unreal.EditorAssetLibrary.load_asset(meshPath)
offset_m = 75
grid_size_x = 10
... |
# -*- 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.") |
# 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
def set_material_instance_property(material_instance_path : str, property_index : int, new_value):
"""
:修改材质实例的属性值【向量】
:param material_instance_path: 材质实例的路径
:param property_index: 第几个属性
:param new_value: 新的属性值
"""
material_instance = unreal.load_asset(material_i... |
import unreal
bp_gc = unreal.load_object(None, "/project/.BP_Property_C")
bp_cdo = unreal.get_default_object(bp_gc)
#here we assume there is a BP_Property blueprint with the following float and boolean variables
bp_cdo.set_editor_property("FloatProp", 1.0)
bp_cdo.set_editor_property("bBoolProp", True) |
# -*- 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
... |
import unreal
import sys
from PySide2 import QtWidgets, QtUiTools, QtGui
#Import UE python lib
import m2_unreal.observer as observer
import m2_unreal.set_shot as set_shot
#RELOAD MODULE
import importlib
importlib.reload(observer)
importlib.reload(set_shot)
WINDOW_NAME = 'M2 - Set Shots'
UI_FILE_FULLNAME = __file__... |
# This script describes a generic use case for the variant manager
import unreal
# Create all assets and objects we'll use
lvs = unreal.VariantManagerLibrary.create_level_variant_sets_asset("LVS", "/Game/")
lvs_actor = unreal.VariantManagerLibrary.create_level_variant_sets_actor(lvs)
if lvs is None or lvs_actor is No... |
# 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 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().... |
#!/project/ python3
"""
Test script to verify character animation assignment is working
"""
import unreal
def log_message(message):
"""Print and log message"""
print(message)
unreal.log(message)
def test_animation_loading():
"""Test that all animations can be loaded from their paths"""
log_messa... |
import unreal
def delete_empty_folders():
"""
Deletes empty folders in the Unreal Engine 5 scene outliner.
An empty folder is defined as a folder containing no actors or only other empty folders.
"""
world = unreal.EditorLevelLibrary.get_editor_world()
if not world:
unreal.log_warning("... |
# -*- coding: utf-8 -*-
"""
"""
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
__author__ = 'timmyliang'
__email__ = 'user@example.com'
__date__ = '2021-08-10 21:06:49'
import unreal
level_lib = unreal.EditorLevelLibrary
world = level_lib.get_editor_worl... |
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... |
# Copyright Epic Games, Inc. All Rights Reserved
# Built-in
import sys
from pathlib import Path
from deadline_utils import get_editor_deadline_globals
from deadline_service import DeadlineService
# Third-party
import unreal
plugin_name = "DeadlineService"
# Add the actions path to sys path
actions_path = Path(__f... |
#
# Copyright(c) 2025 The SPEAR Development Team. Licensed under the MIT License <http://opensource.org/project/>.
# Copyright(c) 2022 Intel. Licensed under the MIT License <http://opensource.org/project/>.
#
import argparse
import os
import pathlib
import posixpath
import shutil
import spear
import spear.utils.editor... |
# 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
loaded_subsystem = unreal.get_editor_subsystem(unreal.EditorAssetSubsystem)
selected_assets: list[unreal.Object] = unreal.EditorUtilityLibrary.get_selected_assets()
selected_sm:unreal.SkeletalMesh = selected_assets[0]
duplicate_this_outline = '/project/'
loaded_be_duplicated = unreal.load_asset(duplica... |
import unreal
class doodle_lve:
def __init__(self, ass_lev_name, ass_lev_path, ass_name, ass_path):
# super().__init__()
self.ass_lev_name = ass_lev_name
self.ass_lev_path = ass_lev_path
self.ass_name = ass_name
self.ass_path = ass_path
self.fps = 25
self.st... |
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 12 14:42:18 2024
@author: WillQuantique
"""
import unreal
def local_transform_from_pose(local_transform):
loc_x= local_transform.translation.x
loc_y =local_transform.translation.y
loc_z= local_transform.translation.z
rot_x = local_transform.rotation.x
... |
# 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 ... |
from typing import Any, Optional
import unreal
from unreal import PrimalDinoStatusComponent, PrimalDinoCharacter
from consts import TAMING_OVERRIDES
from clean_numbers import clean_float as cf, clean_double as cd
def gather_taming_data(bp_short: str, char: PrimalDinoCharacter, dcsc: PrimalDinoStatusComponent) -> dic... |
"""
tools_build_lookdev_levels.py
Create four biome look-dev maps with basic lighting, decal walls, and empty VFX lanes.
Biomes: IEZ, TechWastes, SkyBastion, BlackVault
Creates two variants per biome: _Day and _Night (simple light intensity/color change)
"""
import os
from datetime import date
import unreal
ROOT = unr... |
# SPDX-License-Identifier: Apache-2.0
# Copyright Contributors to the OpenTimelineIO project
"""
NOTE: This is an example `otio_ue_post_export_clip` hook, providing
a pipeline-specific UE-to-OTIO media reference mapping
implementation.
"""
import os
import unreal
import opentimelineio as otio
import otio... |
import unreal
# instaces of unreal classes
editor_asset_lib = unreal.EditorAssetLibrary()
#set source dir and options
### TODO Need to find a way to analyze just desired folder instead of all the folder in the game to avoid errors
source_dir = "/project/"
include_subfolders = True
deleted = 0
# get all assets in s... |
import unreal
import sys
from unreal import Vector
# Get a class for spawning
my_class = unreal.EditorAssetLibrary.load_blueprint_class('/project/.BP_SimplerSky')
# Get the editor actor subsystem
actor_subsys = unreal.get_editor_subsystem(unreal.EditorActorSubsystem)
lst_actors = unreal.EditorLevelLibrary.get_all_le... |
# 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... |
import unreal
import json
import os
def export_splines_to_json(iteration_number=0, output_dir=None):
"""
Finds all BP_CityKit_spline actors in the current Unreal level, extracts their spline data,
and saves everything as a JSON file for use in Houdini or other tools.
This is the first step in our... |
import unreal
import json
import random
import time
scene_data = {}
def get_arrary_from_vector(input_vector):
return [input_vector.x, input_vector.y, input_vector.z]
def get_hism_instance_transforms(hism_component):
instance_transforms = {}
static_mesh = hism_component.static_mesh
static_mesh_name ... |
import json
import unreal
path = r"/project/.json"
def read_json(path):
with open(path, "r") as f:
data = json.load(f)
return data
def main():
actors = unreal.EditorLevelLibrary.get_selected_level_actors()
if not actors:
unreal.log_error("Please Select Actor")
return
tr... |
# Copyright Epic Games, Inc. All Rights Reserved.
import os
import unreal
import unrealcmd
#-------------------------------------------------------------------------------
def _find_autosdk_llvm(autosdk_path):
path = f"{autosdk_path}/Host{unreal.Platform.get_host()}/project/"
best_version = None
if os.pa... |
import unreal
def set_stencil_for_specific_actor(actor_name, stencil_value=1):
editor_actor_subsystem = unreal.get_editor_subsystem(unreal.EditorActorSubsystem)
all_actors = editor_actor_subsystem.get_all_level_actors()
for actor in all_actors:
if actor.get_name() == actor_name:
mesh_c... |
# 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
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 os
import unreal
import json
assets_to_ignore = [
"VFX/project/.uasset",
"VFX/project/.uasset",
"Maps/project/.umap",
"StarterContent/project/.uasset",
"Maps/project/.umap",
"Maps/project/.umap"
]
asset_root_dir = "/Game/"
json_progress_path = "C:/project/ Projects/project/.json"
asset... |
# 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... |
import os
import hashlib
import requests
import unreal
class LLMManager:
"""Handles LLM Model Setup, Download, and Management."""
MODEL_URL = "https://huggingface.co/project/-1.1B-Chat-v1.0-GGUF/project/-1.1b-chat-v1.0.Q4_K_M.gguf"
TARGET_FILENAME = "tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf"
EXPECTED_SHA2... |
# 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 ... |
"""Handles processing of animation assets."""
import unreal
from ..base.base_processor import BaseProcessor
from .body_helper import AnimationHelper
from ...utils.logging_config import logger
class AnimationProcessor(BaseProcessor):
"""Manages processing of animation assets."""
def __init__(self):
"... |
# /project/
# @CBgameDev Optimisation Script - Log Static Mesh UV Channel Count For LOD 0
# /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 the r... |
import unreal
import json
# CONFIG
SCENE_JSON_PATH = "/project/.json"
LEVEL_PATH = "/project/"
BASIC_CUBE = "/project/.Cube"
BASIC_PLANE = "/project/.Plane"
BASIC_CYLINDER = "/project/.Cylinder"
# LOAD SCENE JSON
with open(SCENE_JSON_PATH, 'r') as f:
scene_data = json.load(f)
# FIX 1: Check if level exists fir... |
# 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(... |
# Copyright Epic Games, Inc. All Rights Reserved
# Built-In
import os
import re
import json
import traceback
from collections import OrderedDict
# External
import unreal
from deadline_service import get_global_deadline_service_instance
from deadline_job import DeadlineJob
from deadline_utils import get_deadline_info... |
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
from ayon_core.pipeline import InventoryAction
from ayon_unreal.api.lib import (
update_skeletal_mesh,
import_animation_sequence,
import_camera_to_level_sequence
)
from ayon_unreal.api.pipeline import (
get_frame_range_from_folder_attributes
)
class ConnectFbxAnimation(InventoryAction):
... |
import os
import unreal
def import_binding_cam_fbx(fbx, u_binding):
"""
Import .fbx animation on camera binding track
:param fbx: str. camera .fbx path
:param u_binding: unreal.SequencerBindingProxy
"""
settings = unreal.MovieSceneUserImportFBXSettings()
settings.set_editor_property('cre... |
# -*- 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-08-09 10:43:39'
import unreal
def create_asset(asset_path='', unique_name=True, asset_class=None, as... |
# Copyright Epic Games, Inc. All Rights Reserved.
import os
import json
import time
import sys
import inspect
from xmlrpc.client import ProtocolError
from http.client import RemoteDisconnected
sys.path.append(os.path.dirname(__file__))
import rpc.factory
import remote_execution
try:
import unreal
except ModuleNo... |
import unreal
import time
# https://docs.unrealengine.com/5.0/en-US/project/.html?highlight=scopedslowtask#unreal.ScopedSlowTask
def show_example_progress_bar():
step_count = 200
with unreal.ScopedSlowTask(step_count) as progress_bar:
progress_bar.make_dialog(True)
for i in range(step_count)... |
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
import time
import os
def main():
"""Take screenshots before and after plugin test execution"""
# Ensure we have a stable editor state by loading a template map
try:
unreal.EditorLevelLibrary.load_level('/project/')
except Exception as e:
unreal.log_warning(f"CI_SHOT: load_level failed: {e}")
... |
# 4.25 +
import unreal
# @unreal.uclass()
class EditorToolbarMenuEntry(unreal.ToolMenuEntryScript):
def __init__(
self,
menu="None",
section="None",
name="None",
label="",
tool_tip="",
icon=["None", "None", "None"],
owner_name="None",
insert_... |
import unreal
selected_assets = unreal.EditorUtilityLibrary.get_selected_assets()
seletected_asset = selected_assets[0] if selected_assets else None
if selected_assets and isinstance(seletected_asset, unreal.Texture):
texture: unreal.Texture = seletected_asset
texture.set_editor_property('compression_settings', unre... |
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
file_a = "/project/.fbx"
file_b = "/project/.fbx"
imported_scenes_path = "/project/"
print 'Preparing import options...'
advanced_mesh_options = unreal.DatasmithStaticMeshImportOptions()
advanced_mesh_options.set_editor_property('max_lightmap_resolution', unreal.DatasmithImportLightmapMax.LIGHTMAP_512)
... |
# coding: utf-8
import unreal
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 ... |
# Unreal Python script
# Attempts to fix various issues in Source engine Datasmith
# imports into Unreal
from collections import Counter, defaultdict, OrderedDict
import sys
import unreal
import re
import traceback
import os
import json
import csv
import posixpath
import math
from glob import glob
def actor_contain... |
# 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... |
import unreal
EAL = unreal.EditorAssetLibrary
class AssetCache:
__items = {}
@staticmethod
def get(key):
if isinstance(AssetCache.__items[key], str):
AssetCache.__items[key] = EAL.load_asset(AssetCache.__items[key])
return AssetCache.__items[key]
@staticmethod
def ... |
import unreal
assetPath = "/project/"
bsNames = ["IdleRun_BS_Peaceful", "IdleRun_BS_Battle", "Down_BS", "Groggy_BS", "LieDown_BS", "LockOn_BS", "Airborne_BS"]
animNames = ['Result_State_KnockDown_L']
Base1D = assetPath + "Base_BS_1D"
Base2D = assetPath + "Base_BS_2D"
#공용 BlendSample 제작
defaultSamplingVector = unre... |
# -*- coding: utf-8 -*-
import unreal
import sys
import pydoc
import inspect
import os
import json
from enum import IntFlag
class Singleton(type):
_instances = {}
def __call__(cls, *args, **kwargs):
if cls not in cls._instances:
cls._instances[cls] = super(Singleton, cls).__call__(*args, *... |
"""
Improved multi-job render script using common utilities
"""
import sys
import os
import time
import json
import tkinter as tk
from tkinter import filedialog
import unreal
# Add the common directory to Python path
common_dir = os.path.dirname(os.path.abspath(__file__))
if common_dir not in sys.path:
sys.path.a... |
# 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 fzf
import unreal
import p4utils
import flow.cmd
import subprocess
from peafour import P4
#-------------------------------------------------------------------------------
class _RestorePoint(object):
def __init__(self):
self._files = {}
... |
# Copyright Epic Games, Inc. All Rights Reserved
"""
This script handles processing manifest files for rendering in MRQ
"""
import unreal
from getpass import getuser
from pathlib import Path
from .render_queue_jobs import render_jobs
from .utils import movie_pipeline_queue
def setup_manifest_parser(subparser):
... |
# /project/
# @CBgameDev Optimisation Script - Log Redirects
# /project/
import unreal
import os
EditAssetLib = unreal.EditorAssetLibrary()
workingPath = "/Game/" # Using the root directory
notepadFilePath = os.path.dirname(__file__) + "//PythonOptimiseLog.txt"
allAssets = EditAssetLib.list_assets(workingPath, True, ... |
import unreal
def get_selected_content_browser_assets():
# https://docs.unrealengine.com/5.0/en-US/project/.html?highlight=editorutilitylibrary#unreal.EditorUtilityLibrary
editor_utility = unreal.EditorUtilityLibrary()
selected_assets = editor_utility.get_selected_assets()
return selected_assets
glob... |
# -*- 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 ... |
# /project/
# @CBgameDev Optimisation Script - Log Textures That Are Not Power Of Two
# /project/
import unreal
import os
import math
EditAssetLib = unreal.EditorAssetLibrary()
workingPath = "/Game/" # Using the root directory
notepadFilePath = os.path.dirname(__file__) + "//PythonOptimiseLog.txt"
allAssets = EditAss... |
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):... |
import os.path
import unreal
importing_directory = "Importing"
fixups_directory = "Fixups"
project_path = unreal.SystemLibrary.get_project_directory()
fixups_path = os.path.join(project_path, importing_directory, fixups_directory)
fixups_ext = "txt"
|
import subprocess
from threading import Thread
import re
import json
import time
import unreal
import os
parsed_entries = {}
buffered_lines = []
extracted_data = [0, 0, 0, 0, 0, 0, 0, 0]
process = None
def executeTerminal(command):
os.system(command)
def parse_console_output(process):
global parsed_entries, ... |
# -*- coding: utf-8 -*-
"""
"""
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
__author__ = 'timmyliang'
__email__ = 'user@example.com'
__date__ = '2021-08-17 19:02:48'
import unreal
render_lib = unreal.RenderingLibrary
level_lib = unreal.EditorLevelLibr... |
## Code for FBX export
import unreal
file_to_import = "/project/ assembly.SLDASM"
final_fbx_file = "/project/.fbx"
asset_folder = '/project/'
merge_actor_name = 'NEW_MESH_actor'
fbx_destination = '/project/'
# clear anything existing in the level.
actorSubsystem = unreal.get_editor_subsystem(unreal.EditorActorSubsy... |
import unreal
import unreallibrary
from PySide6.QtCore import Qt, QPointF, QRectF, QPoint, QRect
from PySide6.QtGui import QPen, QPainter, QFont, QIntValidator
from PySide6.QtWidgets import QWidget, QLabel, QVBoxLayout, QHBoxLayout, QLineEdit, QSlider, QStyle
class InfoWidget(QWidget):
def __init__(self, gridView)... |
# Copyright (c) 2013 Shotgun Software Inc.
#
# CONFIDENTIAL AND PROPRIETARY
#
# This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit
# Source Code License included in this distribution package. See LICENSE.
# By accessing, using, copying or modifying this work you indicate your
# agreement to the S... |
# Copyright Epic Games, Inc. All Rights Reserved.
import unreal
# ----------------------------------------------------------------------------------------------------------------------------------------------------
# This example shows how to do a Quick Render of a specific level sequence, using some aspects of the v... |
"""
This module provides examples of running python code during Unreal startup and shutdown
There are three events handled in this module:
1) pre_startup: run immediately on module load
2) post_startup: run once the UE Asset Registry has loaded
3) shutdown: run on Editor shutdown
"""
import unreal
from recipe... |
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
from ayon_unreal.api.tools_ui import qt_app_context
from ayon_unreal.api.pipeline import delete_asset_if_unused
from ayon_core.pipeline import InventoryAction
class DeleteUnusedAssets(InventoryAction):
"""Delete all the assets that are not used in any level.
"""
label = "Delete Unused Asse... |
"""
Unreal Engine Connection management for unreal-blender-mcp.
This module provides functionality to communicate with the Unreal Engine plugin.
"""
import logging
import json
import requests
from typing import Dict, Any, Optional, Union
logger = logging.getLogger(__name__)
class UnrealConnection:
"""Class for ... |
# Copyright (c) 2023 Max Planck Society
# License: https://bedlam.is.tuebingen.mpg.de/license.html
#
# Generate Material Instances for selected textures
#
import os
from pathlib import Path
import sys
import time
import unreal
data_root_unreal = "/project/"
master_material_name = f"/project/"
def create_material(mas... |
# -*- coding: utf-8 -*-
import os
import unreal
from Utilities.Utils import Singleton
import random
class ChameleonGallery(metaclass=Singleton):
def __init__(self, jsonPath):
self.jsonPath = jsonPath
self.data = unreal.PythonBPLib.get_chameleon_data(self.jsonPath)
self.ui_crumbname = "SBrea... |
# 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 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
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.") |
# 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... |
# Spawn a point light for every actor that has "Lamp" in its label
import unreal
actor_list = unreal.EditorLevelLibrary.get_all_level_actors()
for i in range(0, len(actor_list)):
if "Lamp" in actor_list[i].get_actor_label():
loc = unreal.Actor.get_actor_location(actor_list[i])
print actor_list[i].get_actor_bo... |
# Copyright Epic Games, Inc. All Rights Reserved.
import unreal
import time
import sys
import glob
life_idx = 1
rain_alpha = 0.0
max_rain = 9000000.0
if (len(sys.argv) > 1):
life_idx = int(sys.argv[1])
if life_idx >= 1 and life_idx <= 100:
life_group = (life_idx - 1) // 10
rain_alpha = life_group / 10.0
... |
# -*- 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
... |
# /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"
... |
# -*- 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... |
#
# Copyright(c) 2025 The SPEAR Development Team. Licensed under the MIT License <http://opensource.org/project/>.
# Copyright(c) 2022 Intel. Licensed under the MIT License <http://opensource.org/project/>.
#
import argparse
import posixpath
import spear
import spear.utils.editor_utils
import unreal
blueprint_desc =... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.