text stringlengths 15 267k |
|---|
import unreal
import json
from typing import Dict, Any, List, Tuple, Union
from utils import unreal_conversions as uc
from utils import logging as log
def handle_modify_object(command: Dict[str, Any]) -> Dict[str, Any]:
"""
Handle a modify_object command
Args:
command: The command dictionary... |
import unreal
def get_da_list(da:unreal.PrimaryDataAsset, property_name:str) -> list[unreal.Object]:
return unreal.PrimaryDataAsset.get_editor_property(da, property_name)
def get_da_item(da:unreal.PrimaryDataAsset, property_name:str) -> unreal.SkeletalMesh:
return unreal.PrimaryDataAsset.get_editor_property(d... |
# Copyright Epic Games, Inc. All Rights Reserved.
import unreal
import os
import sys
# Display source control state of specified file and return state object
def _sc_test_state(file_str):
unreal.log("Getting source control state fo/project/ {0}".format(file_str))
state = unreal.SourceControl.query_file_stat... |
# -*- 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/ python
# format_test.py - Tests different command formats for MCP Server
import socket
import json
import sys
import time
# Configuration
HOST = '127.0.0.1'
PORT = 13377
TIMEOUT = 5 # seconds
# Simple Python code to execute
PYTHON_CODE = """
import unreal
return "Hello from Python!"
"""
def send_comman... |
# coding: utf-8
import unreal
import argparse
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.get_all_assets();
for aa in a:
if (aa.get_ed... |
# Copyright Epic Games, Inc. All Rights Reserved.
# These examples showcase how to use scripting with movie render graph
import unreal
import MovieGraphCreateConfigExample as graph_helper
import MovieGraphEditorExampleHelpers
# USAGE:
# - Requires the "Python Editor Script Plugin" to be enabled in your project.
# ... |
# 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
# ue4 asset functions
import unreal
def build_import_task(filename, dest_path, options=None):
# unreal.AssetImportTask https://api.unrealengine.com/project/.html
task = unreal.AssetImportTask()
task.set_editor_property('automated', True)
task.set_editor_property('destination_name', ... |
# -*- 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-11 23:17:48"
import unreal
from functools import partial
from Qt import QtCore
from unreal import ... |
import unreal
tempSkeleton = '/project/'
tempSkeleton = unreal.EditorAssetLibrary.load_asset(tempSkeleton)
unreal.AssetTools.create_asset('BS','/project/')
BP = '/project/'
BP1 = unreal.EditorAssetLibrary.load_asset(BP)
unreal.EditorAssetLibrary.get_editor_property(BP1) |
import unreal
def process_modols_assets():
"""
Processes Modols assets, iterating through them and placing them in the level.
This function will contain the core logic for asset processing.
"""
unreal.log("Processing Modols assets...")
static_mesh_assets_info = []
try:
asset_registr... |
import unreal
from ueGear.controlrig.paths import CONTROL_RIG_FUNCTION_PATH
from ueGear.controlrig.components import base_component, EPIC_control_01
from ueGear.controlrig.helpers import controls
class Component(base_component.UEComponent):
name = "test_Spine"
mgear_component = "EPIC_spine_01"
def __init... |
# coding=utf-8
import os
import re
from functools import reduce
import unreal
from UnrealUtils import (
editor_utility_subsystem,
editor_actor_subsystem
)
from EditorAssetUtils import open_assets_in_editor
from UnrealStructure import WidgetAMStructure
Category = 'Actor Manager Editor BP Function Library'
@u... |
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... |
# 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 unreal
import urllib.request
import json
import os
import stat
def check_unreal_environment():
"""언리얼 환경에서 실행 중인지 확인"""
try:
engine_version = unreal.SystemLibrary.get_engine_version()
print(f"언리얼 엔진 버전: {engine_version}")
return True
except Exception as e:
print(f"오류:... |
"""
this startup code is used to add a script editor button to the unreal tool bar.
ignore this file when using this script editor widget outside Unreal
"""
import os
import sys
import unreal
MODULE_PATH = os.path.dirname(os.path.abspath(__file__))
UPPER_PATH = os.path.join(MODULE_PATH, '../../tools')
sys.path.app... |
# -*- coding: utf-8 -*-
"""
自动重启引擎
"""
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
__author__ = "timmyliang"
__email__ = "user@example.com"
__date__ = "2020-09-18 15:53:10"
import sys
import subprocess
import unreal
from ue_util import error_log, toast... |
"""
This script describes how the metadata from USD prims can be collected and manipulated on
the Unreal side, after fully importing a stage or opening one with a stage actor. Just
remember to set the desired metadata options on the stage actor itself if using one, as
it will not collect metadata by default (e.g. `stag... |
# 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 Lib import __lib_topaz__ as topaz
import importlib
importlib.reload(topaz)
actors = topaz.get_selected_level_actors()
for actor in actors :
components = actor.get_components_by_class(unreal.StaticMeshComponent)
for component in components :
asset = component.static_mesh
... |
# Should be used with internal UE API in later versions of UE
"""
Automatically create material instances based on texture names
(as they are similar to material names)
"""
import unreal
import os
OVERWRITE_EXISTING = False
def set_material_instance_texture(material_instance_asset, material_parameter, texture_path... |
import unreal_uiutils
import unreal_utils
import unreal
def extend_editor_example():
# declare menu entry
me_reloadbutton = unreal_uiutils.create_python_tool_menu_entry(
name="ReloadScriptsBtn",
label="Reload Script",
command_string="import importlib; import unreal_startup; importlib.re... |
def update_meta_human_face(asset_path: str, dna_file_path: str, head_material_name: str, face_control_rig_asset_path: str, face_anim_bp_asset_path: str, blueprint_asset_path: str, unreal_level_sequence_asset_path: str, copy_assets: bool, material_slot_to_instance_mapping: dict): # type: ignore
import unreal
fro... |
import unreal
def load_assets(folder_path, does_hard_load):
asset_registry = unreal.AssetRegistryHelpers.get_asset_registry()
assets = asset_registry.get_assets_by_path(folder_path, recursive=True)
error_message: str
if assets is not None:
static_meshes = []
for asset_data in assets:
... |
# 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... |
# -*- 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... |
# -*- coding: utf-8 -*-
"""
Created on Mon Feb 26 09:26:32 2024
@author: WillQuantique
"""
import random as rd
import unreal
def create_sequence_from_selection(sequence_name, length_frames = 1, package_path = '/project/', target_camera = unreal.Object):
'''
Args:
sequence_name(str): The name of the s... |
from webbrowser import get
from pkg_resources import normalize_path
import unreal
from pathlib import Path
from CommonFunctions import get_asset_dir
# selected_assets = unreal.EditorUtilityLibrary.get_selected_assets()
# selected_folders = unreal.EditorUtilityLibrary.get_selected_folder_paths()
string_lib = unreal.St... |
import sys
import unreal
import os
# Get the Unreal project directory
project_dir = unreal.SystemLibrary.get_project_directory()
# Build the path to your tools folder relative to the project directory
tools_path = os.path.join(project_dir, "Python")
# Add to sys.path if not already present
if tools_path not in sys.p... |
# -*- coding: utf-8 -*-
"""
Created on Mon Feb 26 09:43:45 2024
@author: WillQuantique
"""
import unreal
# Access the Editor Actor Utilities Subsystem
editor_actor_subsystem = unreal.get_editor_subsystem(unreal.EditorActorSubsystem)
# Get all actors in the scene
all_actors = editor_actor_subsystem.get_all_level_act... |
import unreal
import os
import time
import uuid
import shutil
from pathlib import Path
"""
纹理通道迁移工具 (Texture Channel Transfer Tool)
版本: 1.0
功能说明:
本脚本用于将一组M(Mask)纹理的蓝色通道(B)自动迁移到对应D(Diffuse/Albedo)纹理的Alpha通道(A)中。
主要用于批量处理材质纹理,简化美术工作流程,优化纹理通道的使用。
具体功能:
1. 自动识别同一目录下的配对M和D纹理(基于命名规则: 基础名称+"_m"和"_d")
2. 将M纹理中的B通道提取并替换到D纹理的... |
import unreal
def get_selected_content_browser_assets():
editor_utility = unreal.EditorUtilityLibrary()
selected_assets = editor_utility.get_selected_assets()
return selected_assets
def log_asset_types(assets):
for asset in assets:
unreal.log(f"Asset Name: {asset.get_name()} is a {type(asse... |
import unreal
# 삭제할 블루프린트 액터의 경로
blueprint_path = '/project/.BP_RefBall'
# 삭제할 액터 클래스의 레퍼런스 얻기
actor_class_ref = unreal.EditorAssetLibrary.load_blueprint_class(blueprint_path)
# 레벨의 모든 액터를 가져오기
actors = unreal.EditorLevelLibrary.get_all_level_actors()
# 액터들을 반복 처리하며, 특정 액터 찾기
for actor in actors:
# 액터의 클래스를 가져옴... |
# py automise script by Minomi
## run with python 2.7 in UE4
#######################################import modules from here#################################
from pyclbr import Class
import unreal
import re
from typing import List
#######################################import modules end#############################... |
# Should be used with internal UE API in later versions of UE
"""
Automatically create material instances based on texture names
(as they are similar to material names)
"""
import unreal
import os
OVERWRITE_EXISTING = False
def set_material_instance_texture(material_instance_asset, material_parameter, texture_path... |
import unreal
# 현재 레벨에 있는 모든 액터 가져오기
actors = unreal.EditorLevelLibrary.get_all_level_actors()
for actor in actors:
print(f"Actor found: {actor.get_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")
parser.add_argument("-meta")
args = parser.parse_args()
print(args.vrm)
#print(dummy[3])
humanoidBoneList = [
"hips",
"leftUpperLeg... |
# -*- coding: utf-8 -*-
"""
Documentation:
"""
import unreal
import socket
import traceback
from threading import Thread
from queue import Queue
class Timer():
handle = None
def __init__(self, fn, delay=0.0, repeat=False):
self.fn = fn
self.delay = delay
self.repeat = repeat
... |
# 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... |
import unreal
from logger.base import Logger
class UnrealLogger(Logger):
def debug(self, msg: str):
unreal.log(msg)
def info(self, msg: str):
unreal.log(msg)
def warning(self, msg: str):
unreal.log_warning(msg)
def error(self, msg: str):
unreal.log_error(msg)
d... |
import unreal
def get_mesh_type_string(actor):
"""Returns the PRIMITIVE_* string based on the actor's static mesh."""
static_mesh_component = actor.get_component_by_class(unreal.StaticMeshComponent)
if not static_mesh_component:
return "PRIMITIVE_NONE"
static_mesh = static_mesh_component.stati... |
import unreal
import time
def set_comp_mobility(Comp, Cull):
# unreal.log("setCompMobility() : " + Comp.static_mesh.get_name())
current_actor = unreal.EditorLevelLibrary.get_selected_level_actors()[0]
comps = current_actor.get_components_by_class(unreal.InstancedStaticMeshComponent)
fo... |
from application.shared.result import Result
from domain.entity.asset_data import StaticMeshAssetData
from infrastructure.utils.unreal_extensions import UnrealEditorAssetLibrary, UnrealEditorStaticMeshLibrary
import unreal
class StaticMeshService():
def __init__(self, _editorAssetLibrary: UnrealEditorAssetLibrary,... |
import re
from dataclasses import dataclass
from typing import Set
import unreal
from Common import get_component_by_class
@dataclass
class MaterialDesc:
pattern: re.Pattern
material: unreal.PhysicalMaterial
@staticmethod
def load_phys_material(name: str) -> unreal.PhysicalMaterial:
base_ph... |
"""
UEMCP Asset Operations - All asset and content browser operations
Enhanced with improved error handling framework to eliminate try/catch boilerplate.
"""
import os
from typing import Any, Dict, List, Optional
import unreal
from utils import asset_exists, log_error
# Enhanced error handling framework
from utils... |
# -*- coding: utf-8 -*-
import unreal
import sys
import pydoc
import inspect
import os
import json
from enum import IntFlag
class Singleton(type):
_instances = {}
def __call__(cls, *args, **kwargs):
if cls not in cls._instances:
cls._instances[cls] = super(Singleton, cls).__call__(*args, *... |
from cgl.plugins.preflight.preflight_check import PreflightCheck
# there is typically a alchemy.py, and utils.py file in the plugins directory.
# look here for pre-built, useful functions
# from cgl.plugins.unreal import alchemy as alc
import unreal
class Levelselected(PreflightCheck):
def getName(self):
... |
# unreal 5.6
import os
import warnings
import unreal
asset_registry = unreal.AssetRegistryHelpers.get_asset_registry()
static_mesh_editor_subsystem = unreal.get_editor_subsystem(unreal.StaticMeshEditorSubsystem)
def export_usd_mesh(static_mesh, output_file):
task = unreal.AssetExportTask()
task.object = stat... |
# -*- 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... |
# 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
"""
This script handles processing jobs and shots in the current loaded queue
"""
import unreal
from .utils import (
movie_pipeline_queue,
execute_render,
setup_remote_render_jobs,
update_render_output
)
def setup_render_parser(subparser):
"""
... |
import unreal
@unreal.uenum()
class MyPythonEnum(unreal.EnumBase):
FIRST = unreal.uvalue(0)
SECOND = unreal.uvalue(1)
FOURTH = unreal.uvalue(3)
@unreal.ustruct()
class PythonUnrealStruct(unreal.StructBase):
some_string = unreal.uproperty(str)
some_number = unreal.uproperty(float)
array_of_stri... |
# /project/
# @CBgameDev Optimisation Script - Log No LODs On Skeletal Meshes
# /project/
import unreal
import os
EditAssetLib = unreal.EditorAssetLibrary()
SkelMeshLib = unreal.EditorSkeletalMeshLibrary()
workingPath = "/Game/" # Using the root directory
notepadFilePath = os.path.dirname(__file__) + "//PythonOptimis... |
import unreal
projectPath = unreal.Paths.project_dir()
content_path = unreal.Paths.project_content_dir()
path_split = projectPath.split('/')
wip_folder_name = path_split[len(path_split)-3] + '_WIP'
path_split[len(path_split)-3] = wip_folder_name
wip_path = '/'.join(path_split)
wip_folder = wip_path
source_folder = c... |
import unreal
import torch
from unreal import EditorLevelLibrary
editor_subsystem = unreal.get_editor_subsystem(unreal.UnrealEditorSubsystem)
# Use the new method to get the editor world
editor_world = editor_subsystem.get_editor_world()
# Now you can continue with your operations using editor_world
print(editor_wo... |
"""Test file so I can run quick code snippet inside unreal
> Use py /project/ in the cmd inside unreal.
"""
import os
import opentimelineio as otio
#import path_utils
import unreal
def export_sequencer_data_as_otio():
"""Export out of unreal folder"""
# Get the output folder for the out usd data
out_dir =... |
# 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 Utilities.Utils import Singleton
class ModalWindowExample(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)
|
# 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 socket
import traceback
from threading import Thread
from queue import Queue
syslib = unreal.SystemLibrary()
class MyTimer:
_hndl = None
def __init__(self, *w, **kw):
if w:self.start(*w, **kw)
def start(self, foo, delay=0.0, repeat=False):
self.stop()
assert callable(foo)
self._foo ... |
import unreal
class GallaryWidgetFactory:
export = True
def create(self) -> unreal.Widget:
...
def with_content(self):
return "Example" |
# -*- coding: utf-8 -*-
"""Loader for Static Mesh alembics."""
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,
UNREAL_VERSION,
get_dir_from_existing_asset
)
from ayon_core.s... |
# unreal.SystemLibrary
# https://api.unrealengine.com/project/.html
import unreal
import random
# active_viewport_only: bool : If True, will only affect the active viewport
# actor: obj unreal.Actor : The actor you want to snap to
def focusViewportOnActor(active_viewport_only=True, actor=None):
command = 'CAME... |
# HEADER :
# File : folder_mat.py
# Create : 2024/project/
# Author : LiDanyang
# Branch : develop
# Descript : 替换迁移材质引用
# UPDATE: 2024/project/ 16:24 -> 完成所有材质修改,包含所有工位/AO下SM的材质实例的迁移,以及材质实例的父级材质的迁移
# 我发现如果当前路径下static mesh 的 同名文件夹时,使用list_assets获取文件夹中的所有asset的路径时,会优先获取static mesh
# 所... |
# -*- coding: utf-8 -*-
import os
import json
import math
import unreal
from unreal import EditorLevelLibrary as ell
from unreal import EditorAssetLibrary as eal
import ayon_api
from ayon_core.pipeline import publish
class ExtractLayout(publish.Extractor):
"""Extract a layout."""
label = "Extract Layout"
... |
import unreal
from ueGear.controlrig.paths import CONTROL_RIG_FUNCTION_PATH
import ueGear.controlrig.manager as ueMan
from ueGear.controlrig.components import base_component, EPIC_control_01
from ueGear.controlrig.helpers import controls
# TODO:
# [ ] Multiple joints can be generated by the component
# [ ] The start ... |
# code in init_unreal.py wil run on startup if the plugin is enabled
import unreal
section_name = "Plugins"
se_command = 'print("Test")'
label = "LcL-Tools2"
tooltip = "my tooltip"
@unreal.uclass()
class Test(unreal.ToolMenuEntryScript):
def __init__(self):
super().__init__()
self.data: unreal.... |
# 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
info = dir(unreal)
for i in info:
unreal.log("unreal" + str(i))
|
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... |
import unreal
# instances of unreal classes
editor_asset_lib = unreal.EditorAssetLibrary()
string_lib = unreal.StringLibrary()
# get all assets in source dir
source_dir = "/Game/"
include_subfolders = True
set_textures = 0
assets = editor_asset_lib.list_assets(source_dir, recursive = include_subfolders)
color_patter... |
# 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
# 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)
removed = 0
# instantly delete assets or move to Trash folde... |
"""Spawn actors on the map based on map export data produced by MapExport.py. Should be used with internal UE API"""
import os.path
import unreal
import json
import re
# Change me!
map_data_filepath = "C:/project/ Projects/project/" \
"MapData/project/.json"
EXCLUDE_ENGINE_ASSETS = True
level_l... |
#!/project/ python3
"""
Script to update the character blueprint with all 8 animations
"""
import unreal
def log_message(message):
"""Print and log message"""
print(message)
unreal.log(message)
def update_character_blueprint_with_all_animations():
"""Update character blueprint to be consistent with ... |
# Copyright Epic Games, Inc. All Rights Reserved.
import os
import re
import unreal
import tempfile
import flow.cmd
import unrealcmd
import prettyprinter
#-------------------------------------------------------------------------------
def _fuzzy_find_code(prompt):
import fzf
import subprocess as sp
rg_ar... |
# Copyright (c) <2021> Side Effects Software Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list ... |
# SPDX-FileCopyrightText: 2018-2025 Xavier Loux (BleuRaven)
#
# SPDX-License-Identifier: GPL-3.0-or-later
# ----------------------------------------------
# Blender For UnrealEngine
# https://github.com/project/-For-UnrealEngine-Addons
# ----------------------------------------------
from pathlib import Path
from t... |
##########################################################################################
# these code is test against UE 5.0. It doesn't guarantee to be functional in other versions
##########################################################################################
import os
import unreal
from importlib impo... |
import unreal
def is_camera(binding:unreal.MovieSceneBindingProxy):
"""
Check to see if binding is a Camera
:return: True if binding is a Camera
:rtype: Bool
"""
return binding.get_possessed_object_class() == unreal.CineCameraActor.static_class()
def is_instanced_camera(binding:unreal.MovieS... |
import unreal
level_editor_subsystem:unreal.LevelEditorSubsystem = unreal.get_editor_subsystem(unreal.LevelEditorSubsystem)
unreal_editor_subsystem:unreal.UnrealEditorSubsystem = unreal.get_editor_subsystem(unreal.UnrealEditorSubsystem)
editor_actor_subsystem:unreal.EditorActorSubsystem = unreal.get_editor_subsystem(u... |
# Copyright Epic Games, Inc. All Rights Reserved.
import os
import unreal
#-------------------------------------------------------------------------------
class PlatformBase(unreal.Platform):
name = "Linux"
autosdk_name = "Linux_x64"
env_var = "LINUX_MULTIARCH_ROOT"
def _get_version_ue4(self):
... |
import unreal
import re
throwable_sm_assets = []
throwable_bp_assets = []
# output = False
output = True
def logit0(info):
unreal.log(info)
def logit1(info):
if output:
unreal.log_warning(info)
def logit2(info):
unreal.log_error(info)
all_level_actors = unreal.EditorLevelLibrary.get_al... |
import unreal
from typing import Any
from pamux_unreal_tools.generated.material_expression_wrappers import *
from pamux_unreal_tools.base.material_expression.material_expression_container_builder_base import MaterialExpressionContainerBuilderBase
from pamux_unreal_tools.utils.asset_cache import AssetCache
class Laye... |
import unreal
AssetTools = unreal.AssetToolsHelpers.get_asset_tools()
MaterialEditLibrary = unreal.MaterialEditingLibrary
EditorAssetLibrary = unreal.EditorAssetLibrary
#Create New Material
MeshPaintMaterial = AssetTools.create_asset("M_MeshPaint", "/project/", unreal.Material, unreal.MaterialFactoryNew())
#Add text... |
import unreal
import AssetFunctions
import EditorFunctions
import PythonHelpers
import QtFunctions
import WorldFunctions
def showAssetsInContentBrowser_EXAMPLE():
paths = ['/project/', '/project/', '/project/']
AssetFunctions.showAssetsInContentBrowser(paths)
def openAssets_EXAMPLE():
paths = ['/project... |
# 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... |
import unreal
import json
# instances of unreal classes
editor_util = unreal.EditorUtilityLibrary()
system_lib = unreal.SystemLibrary()
# prefix mapping
prefix_mapping = {}
with open("/project/.json","r") as json_file:
prefix_mapping = json.loads(json_file.read())
# get the selected assets
selected_assets = edi... |
# Copyright Epic Games, Inc. All Rights Reserved.
import os
import sys
import unreal
import unrealcmd
import unreal.cmdline
from pathlib import Path
#-------------------------------------------------------------------------------
def _get_ip():
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_DGRA... |
# Copyright Epic Games, Inc. All Rights Reserved.
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 -*-
"""
Created on Mon Feb 26 10:05:01 2024
@author: WillQuantique
"""
import unreal
def associate_control_rig_with_metahuman_in_sequence(control_rig_path, metahuman_mesh_path, sequence_path, spawn_location, spawn_rotation):
# Load the assets
control_rig_asset = unreal.load_asset(control... |
# Package import
import unreal
# Utility import
import control_rig_utils
@unreal.uclass()
class ControlRigBPExt(unreal.BlueprintFunctionLibrary):
@unreal.ufunction(params = [unreal.ControlRigBlueprint], ret=unreal.Array(unreal.RigElementKey), static = True, meta=dict(Category="Control Rig Blueprint Ext"))
d... |
# coding: utf-8
import sys as __sys
try:
import unreal
# /project/ Files\Epic Games\UE_4.26\Engine\Plugins\Experimental\PythonScriptPlugin\Content\Python
import debugpy_unreal
import remote_execution
# command
# https://docs.unrealengine.com/project/.html
@unreal.uclass()
class Edito... |
# Copyright (c) <2021> Side Effects Software Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list ... |
# SPDX-FileCopyrightText: 2018-2025 Xavier Loux (BleuRaven)
#
# SPDX-License-Identifier: GPL-3.0-or-later
# ----------------------------------------------
# Blender For UnrealEngine
# https://github.com/project/-For-UnrealEngine-Addons
# ----------------------------------------------
import unreal
from typing impor... |
# 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 typing import Dict, Any, List, Tuple
import base64
import os
import mss
import time
import tempfile # Used to find the OS's temporary folder
from utils import unreal_conversions as uc
from utils import logging as log
def handle_spawn(command: Dict[str, Any]) -> Dict[str, Any]:
"""
Handle a... |
#!/project/ python
# -*- coding: utf-8 -*-
"""
Module that contains installer related functions for Autodesk Maya
"""
# System global imports
# software specific imports
import unreal
# mca python imports
from mca.common.utils import fileio
def rename_asset(new_name=None):
"""
Renames a selected asset
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.