text stringlengths 15 267k |
|---|
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 = "EPIC_leg_3jnt_01"
mgear_component = "EPIC_leg_3jnt_01"
... |
"""
This script is used to fix physics collision properties of prop physics actors in a game level.
Usage:
- Call the `fix_physics_props_collision()` function to fix physics
collision for prop physics actors in the current level.
Functions:
- `fix_physics_props_collision()`: Fixes the physics collision properties... |
# 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
import unreal
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-vrm")
parser.add_argument("-rig")
parser.add_argument("-meta")
args = parser.parse_args()
print(args.vrm)
#print(dummy[3])
humanoidBoneList = [
"hips",
"leftUpperLeg",
"rightUpperLeg",
"leftLowerLeg",
"rightL... |
import unreal
import sys
sys.path.append("C:/project/-packages")
from PySide import QtCore, QtGui, QtUiTools
def rename_assets(search_pattern, replace_pattern, use_case):
# instances of unreal classes
system_lib = unreal.SystemLibrary()
editor_util = unreal.EditorUtilityLibrary()
string_lib = unreal.S... |
# _
# (_)
# _ __ ___ __ _ _ __ ___ ___ _ __ _ ___ _ __ ___
# | '_ ` _ \ / _` | '_ ` _ \ / _ \| '_ \| |/ _ \ '_ ` _ \
# | | | | | | (_| | | | | | | (_) | | | | | __/ | | | | |
# |_| |_| |_|\__,_|_| |_| |_|\___/|_| |_|_|\___|_| |_| |_|
# www.mamoniem.com
# www.ue4u.xyz
#Copyright 20... |
import unreal
OUTPUT_FILENAME = r"/project/.usda"
INPUT_ASSET_CONTENT_PATH = r"/project/"
asset = unreal.load_asset(INPUT_ASSET_CONTENT_PATH)
options = unreal.StaticMeshExporterUSDOptions()
options.stage_options.meters_per_unit = 0.02
options.mesh_asset_options.use_payload = True
options.mesh_asset_options.payload_f... |
# -*- 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,... |
# 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 re
import unreal
# content folder where to put merged geometry
content_folder = "/project/"
# utility function to get the full hierarchy of an actor
def get_actor_hierarchy(actor):
result = []
list = actor.get_attached_actors()
while list:
a = list.pop()
result.append(a)
for... |
# 本脚本用于导出当前场景中所有actor的世界transform为json
# 初始脚本
import unreal
import json
def get_static_mesh_actors_transforms():
actors = unreal.get_editor_subsystem(unreal.EditorActorSubsystem).get_all_level_actors()
static_mesh_actors = [actor for actor in actors if isinstance(actor, unreal.StaticMeshActor)]
trans... |
import unreal
if __name__ == "__main__":
imp_pct = 90
size_ratio = 100
imp_res_file = f"/project/{imp_pct}percent_markers/project/.txt"
case_type = f"Pct{imp_pct}Marker"
prefix = f"tag{case_type}"
holder_prefix = f"holder{case_type}"
print(f"Marker prefix: {prefix}")
# marker poses from... |
# Copyright Epic Games, Inc. All Rights Reserved.
import os
import unreal
import flow.cmd
#-------------------------------------------------------------------------------
class Change(flow.cmd.Cmd):
""" Changes this session's active project. The 'nameorpath' argument can be
one of following;
.project My... |
# 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 cast(obj, cls):
# unreal._ObjectBase
# https://api.unrealengine.com/project/.html
try:
return cls.cast(obj)
except:
return None
def getActors(isSelected=False, aClass=None, tag=None):
# unreal.EditorLevelLibrary
# https://api.unrealengine.com/project/.html
... |
# -*- coding: utf-8 -*-
"""Load Alembic Animation."""
import os
from ayon_core.lib import EnumDef
from ayon_core.pipeline import AYON_CONTAINER_ID
from ayon_unreal.api import plugin
from ayon_unreal.api import pipeline as unreal_pipeline
from ayon_core.settings import get_current_project_settings
import unreal # noqa... |
from asyncio.windows_events import NULL
import unreal
def get_selected_asset_dir() -> str :
ar_asset_lists = unreal.EditorUtilityLibrary.get_selected_assets()
if len(ar_asset_lists) > 0 :
str_selected_asset = unreal.EditorAssetLibrary.get_path_name_for_loaded_asset(ar_asset_lists[0])
path = s... |
import unreal
# load a CAD files multiple times with different tessellation settings
# to generate the LODs of the static meshes.
# THIS IS NOT OPTIMIZED (many file IO)
actorSubsystem = unreal.get_editor_subsystem(unreal.EditorActorSubsystem)
staticmeshsubsystem = unreal.get_editor_subsystem(unreal.StaticMeshEditor... |
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 unreal
blueprintName = "MyEpicBPActorClass"
#define path
blueprintPath = "/project/"
factory = unreal.BlueprintFactory()
factory.set_editor_property("ParentClass", unreal.Actor)
# AseetToolsHelper Create
assetTools = unreal.AssetToolsHelpers.get_asset_tools()
myFancyNewAssetFile = assetTools.create_asset(b... |
import unreal
## This tool is intended to create an asset validation process that runs through a variety of checks based on the type of asset presented
# get all selected assets in browser
def get_selected_content_browser_assets():
editor_utility = unreal.EditorUtilityLibrary()
selected_assets = editor_utili... |
# 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... |
# coding: utf-8
from asyncio.windows_events import NULL
from platform import java_ver
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_... |
# /project/
# @CBgameDev Optimisation Script - Log Materials Using Two Sided
# /project/
import unreal
import os
EditAssetLib = unreal.EditorAssetLibrary()
SystemsLib = unreal.SystemLibrary
workingPath = "/Game/" # Using the root directory
notepadFilePath = os.path.dirname(__file__) + "//PythonOptimiseLog.txt"
allAss... |
import unreal
import os
import json
import sys
#from unreal import DataTableFunctionLibrary as DataTableFunctionLibrary
class ImportAssetTool:
import_path: str
destination_path: str
def __init__(self, import_path, destination_path):
self.import_path = import_path
self.destination_pa... |
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_... |
import unreal
import sys
alpha_brush_path = sys.argv[1]
alpha_brush_name = sys.argv[2]
heightmap_directory = sys.argv[3]
alpha_brush_template_path = sys.argv[4]
alpha_textures = sys.argv[5]
heightmap_property = sys.argv[6]
stamp_tool = sys.argv[7]
alpha_textures_path = alpha_brush_path + alpha_textures
# Import known... |
from datetime import datetime
#
# This file runs on an infinite loop and waits until the
# mutex file is created which "gives it permission" to
# take and image using pyautogui to manually press "f9"
# to take an image in the unreal editor
#
#
import os
from pathlib import Path
import platform
from subprocess impo... |
# 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... |
# Copyright (C) 2024 Louis Vottero [email protected] All rights reserved.
from collections import OrderedDict
import functools
from .. import util
from .. import util_file
in_maya = util.in_maya
in_unreal = util.in_unreal
in_houdini = util.in_houdini
if in_maya:
import maya.cmds as cmds
from .. maya_lib 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 ... |
from . import shelf_main as _main
from . import (
shelf_core,
shelf_utl,
shelf_utl_widgets,
)
import importlib
import os
import unreal
UMGWIDGET = None
os.environ["tw_debug"] = "False"
shelf_utl.extend_python_path()
def start(show=True):
global UMGWI... |
# 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
AssetTools = unreal.AssetToolsHelpers.get_asset_tools()
MaterialEditLibrary = unreal.MaterialEditingLibrary
EditorAssetLibrary = unreal.EditorAssetLibrary
masterMaterial = AssetTools.create_asset("M_Master", "/project/", unreal.Material, unreal.MaterialFactoryNew())
#Create 2D Texture Param and Connect... |
"""
This module is meant for miscellaneous utilities that I found useful
"""
import json
from pathlib import Path
import unreal
from recipebook.unreal_systems import EditorAssetLibrary
# module caches to store asset / class information
# this will save us from repeatedly searching for or loading unreal data
asset_... |
import unreal
# Define the actor class you want to spawn
# actor_class_name = '/project/.AStaticMeshActor_C'
# actor_class = unreal.EditorAssetLibrary.load_blueprint_class(actor_class_name)
# void FloorTiler(UObject Outer, int Radius, int TileSizeX, int TileSizeY)
# {
# for (int i = -Radius; i < Radius; i++) {
# ... |
import unreal
asset_lib = unreal.EditorAssetLibrary()
for asset_path in asset_lib.list_assets(u'/project/'):
path = asset_path.replace(u'/project/',u'/project/')
asset = unreal.load_asset(asset_path)
match_asset = unreal.load_asset(path)
# print(asset)
# print(match_asset)
asset_lib.cons... |
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 json
import os
import re
import pandas as pd
from export_datasmith_actor_json_2 import get_actor_base_color
import time
# ---------------- lib.py ----------------
def get_relative_transform(A : unreal.Actor, C : unreal.Actor):
# 获取世界坐标
A_transform = A.get_actor_transform()
C_transform ... |
import unreal
import os
from .BaseWizard import BaseWizard
class BossWizard(BaseWizard):
def __init__(self, jsonPath):
super().__init__(jsonPath, "config_template_boss.json")
def create_class(self):
asset_tools = unreal.AssetToolsHelpers.get_asset_tools()
parent_class = unreal.EditorA... |
# Should be used with internal UE API in later versions of UE
"""
Automatically create material instances based on mesh names
(as they are similar to material names and texture names)
"""
import unreal
import os
OVERWRITE_EXISTING = False
def set_material_instance_texture(material_instance_asset, material_paramete... |
# SM Actor 및 내부 ISM comp, Decal Actor, BP 내 SM Comp, ISM comp 대응
import unreal
selected_assets = unreal.EditorLevelLibrary.get_selected_level_actors()
source_path = source_path
editor_asset_library = unreal.EditorAssetLibrary()
# MI Copy
def copy_material_instance(material_instance, source_path):
material_i... |
# 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 threading
import sys
# Function to handle socket operations
def send_world_bounds(center, extents, port):
try:
# Create a socket and set it up to listen for connections
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# Connect to the server
... |
# Bastian Developer. MIT license. 2023
import unreal
import numpy as np # needs Plugin "Python Foundation Packages"
from enum import Enum, auto
@unreal.uclass()
class GetEditorUtility(unreal.GlobalEditorUtilityBase):
pass
@unreal.uclass()
class GetEditorAssetLibrary(unreal.EditorAssetLibrary):
pass
@unreal.... |
import unreal
# Get the current editor world
editor_world = unreal.EditorLevelLibrary.get_editor_world()
# Define the location and rotation for the PostProcessVolume
location = unreal.Vector(0, 0, 0)
rotation = unreal.Rotator(0, 0, 0)
# Spawn the PostProcessVolume
post_process_volume = unreal.EditorLevelLibrary.spaw... |
# -*- coding: utf-8 -*-
# region Import
from waapi import connect, CannotConnectToWaapiException
from P4 import P4, P4Exception
import sys
# endregion
# region WwiseConnection
url = None
try:
client = connect(url)
except CannotConnectToWaapiException as e:
print(e)
exit()
# endregion
# region P4 Instanc... |
# References:
# http://developer.download.nvidia.com/project/.html
# https://github.com/project/-Fluid-Simulation
# https://www.bilibili.com/project/?p=4
# https://github.com/project/
import argparse
import numpy as np
import taichi as ti
import unreal
from Utilities.Utils import Singleton
# How to run:
# `python ... |
# Copyright Epic Games, Inc. All Rights Reserved
# Third-party
import unreal
@unreal.uclass()
class BaseActionMenuEntry(unreal.ToolMenuEntryScript):
"""
This is a custom Unreal Class that adds executable python menus to the
Editor
"""
def __init__(self, callable_method, parent=None):
"""... |
import unreal
selected_assets = unreal.EditorUtilityLibrary.get_selected_assets()
material_editor = unreal.MaterialEditingLibrary
editor_asset = unreal.EditorAssetLibrary
for asset in selected_assets:
if isinstance(asset, unreal.MaterialInstance):
loaded_material = editor_asset.load_asset(asset.get_path... |
import unreal
eal = unreal.EditorAssetLibrary
animBP = '/project/'
animBPAsset = eal.load_asset(animBP)
animGraph = animBPAsset.get_editor_property("animation_graph")
|
from typing import Callable, Optional
import unreal
import utils
from data.config import CfgNode
from GLOBAL_VARS import MATERIAL_PATHS, PLUGIN_ROOT
# define the post process material to the render_pass
material_paths = MATERIAL_PATHS
material_path_keys = [key.lower() for key in material_paths.keys()]
class Custom... |
# from cgl.plugins.unreal import alchemy as alc
from cgl.core.utils.general import save_json
import time
import glob
import os
import sys
import unreal
from PySide2 import QtWidgets, QtGui, QtUiTools, QtCore
from cgl.plugins.unreal_engine.ui.dialogs import ResourceDialog
def handle_static_meshes(filepath):
import... |
import unreal
import sys
fbx_path = sys.argv[1]
uasset_name = unreal.Paths.get_base_filename(fbx_path)
# FBXインポート時の設定
fbx_import_options = unreal.FbxImportUI()
fbx_import_options.import_materials = True
fbx_import_options.reset_to_fbx_on_material_conflict = False
fbx_import_options.automated_import_should_detect_type ... |
import unreal
n_max = 10
unreal.log("Count till {}".format(n_max))
for n in range(n_max+1):
unreal.log("{}".format(n)) |
"""
UEMCP Helper Functions
Convenient functions for managing the UEMCP listener
"""
import os
import sys
# import importlib
import time
import unreal
def restart_listener():
"""Restart the listener using safe scheduled restart"""
try:
import uemcp_listener
# Check if running
if has... |
import random
import unreal
from utils.utils import control_json, control_json_filter
def clip(key_name, value):
if control_json[key_name]['type'] == 'float':
new_value = max(value, control_json[key_name]['min'])
new_value = min(value, control_json[key_name]['max'])
return(new_value)
e... |
import unreal
import os
import json
class MIDAImporter:
def __init__(self, folder_path: str, b_unique_folder: bool) -> None:
self.folder_path = folder_path
info_name = f"{__file__.split('/')[-1].split('_')[0]}_info.cfg"
self.config = json.load(open(self.folder_path + f"/{info_name}"))
... |
"""
UE5 Connector - Seamless Unreal Engine 5 integration
====================================================
Handles automatic import of generated assets into UE5, including texture setup,
material creation, metadata tagging, and asset organization within the UE5
content browser. Supports both Python scripting and co... |
# Nguyen Phi Hung @ 2020
# [email protected]
import hashlib
import unreal
import subprocess
class AssetRegistryPostLoad:
_callbacks = {}
@classmethod
def register_callback(cls, func, *args, **kws):
cls._callbacks[hashlib.md5(str((func, args, kws)).encode()).hexdigest()] = (
func,
... |
"""
Static Mesh Import Script for Unreal Engine
-----------------------------------------
This script is the seventh step in the Undini procedural generation pipeline:
1. Export splines from Unreal Engine (000_export_splines_as_json.py)
2. Export GenZone meshes from UE (010_export_gz_to_mod.py)
3. Process building dat... |
# Copyright Epic Games, Inc. All Rights Reserved.
import os
import unreal
import subprocess
from pathlib import Path
#-------------------------------------------------------------------------------
class Debugger(unreal.Debugger):
name = "Visual Studio"
def _debug(self, exec_context, cmd, *args):
cmd... |
#!/project/ python3
"""
Sprite Sheet Processor Test Script
==================================
Simple test script to verify the Python sprite sheet processor functionality.
This script can be run directly from the Unreal Editor's Python console.
Usage in Unreal Editor Python Console:
exec(open('PythonScript/test_s... |
# -*- 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... |
"""
Hook for exporting assets from Unreal Engine.
"""
import sgtk
import unreal
HookBaseClass = sgtk.get_hook_baseclass()
class UnrealExporter(HookBaseClass):
"""
Hook for exporting assets from Unreal Engine.
"""
@property
def item_filters(self):
"""
List of item types that this p... |
import importlib
import subprocess
import pkg_resources
import material_tools
import material_instance_tools
import unreal
# Description: This function is used to reload the script
def reload(scriptname):
print("Script " + str(scriptname) + " reloaded")
importlib.reload(scriptname)
# Description: With this ... |
import unreal
print("=== PLACING CHARACTER IN LEVEL ===")
try:
# Load the test level
print("Loading TestLevel...")
level_loaded = unreal.EditorLevelLibrary.load_level('/project/')
if level_loaded:
print("✓ TestLevel loaded")
# Load the character Blueprint
print("L... |
import unreal
level_lib = unreal.EditorLevelLibrary()
actor_subsys = unreal.get_editor_subsystem(unreal.EditorActorSubsystem)
selected_actors = actor_subsys.get_selected_level_actors()
# def collapse_folder_actors(actors):
# """ 折叠选中的actors """
# success_num = 0
# for actor in actors:
... |
import os
import re
import unreal
from Utilities.Utils import Singleton
import Utilities
import json
class ChameleonMaterial(metaclass=Singleton):
def __init__(self, jsonPath:str):
self.jsonPath = jsonPath
self.init_re()
def init_re(self):
self.linearColor_re = re.compile(r"\(R=([-\d.... |
import unreal
from typing import Tuple, List, Union, Optional
def to_unreal_vector(vector_data: Union[List[float], Tuple[float, float, float]]) -> unreal.Vector:
"""
Convert a list or tuple of 3 floats to an Unreal Vector
Args:
vector_data: A list or tuple containing 3 floats [x, y, z]
... |
# -*- coding: utf-8 -*-
"""
"""
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
__author__ = "timmyliang"
__email__ = "[email protected]"
__date__ = "2021-08-09 15:36:57"
import unreal
red_lib = unreal.RedArtToolkitBPLibrary
(physic,) = unreal.EditorUtili... |
# 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 pandas as pd
# Define the enum type mapping
TYPE_MAPPING = {
'bool': 'BoolProperty',
'string': 'StringProperty',
'int': 'IntProperty'
}
def process_file(file_path):
# Check if the file path is valid
if not file_path:
unreal.log_error("Invalid file path.")
retur... |
# Template for showing a progress bar while performing slow tasks
import unreal
total_frames = 100
text_label = "Working!"
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):
... |
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... |
# 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... |
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
import sys
import unreal
from typing import Any, Tuple
import threading
from botocore.client import BaseClient
import boto3
import deadline.client.config as config
from deadline.client import api
from deadline.client.api import AwsCredentialsSource,... |
from domain.foliage_service import FoliageService
from infrastructure.configuration.path_manager import PathManager
from infrastructure.configuration.message import LogFoliageWithNoMaxDrawDistanceMessage
from infrastructure.data.base_repository import BaseRepository
from infrastructure.logging.base_logging import BaseL... |
from pathlib import Path
import os
import sys
from importlib import reload
abs_path = Path(__file__).parent.absolute()
abs_path = os.path.join(abs_path, '')
os.environ["abs_path"] = abs_path
if abs_path not in sys.path:
sys.path.append(abs_path)
import json
from unreal_engine.utils import prepare_editor
prepare_... |
import unreal
import json
""" Should be used with internal UE API in later versions of UE
Auto assign materials to the corresponding meshes according to data from materials_props.json,
which was collected by ReferencesCollectorMaterial.py"""
with open("C:/project/ Projects/project/"
"MaterialAutoAssign/pr... |
import unreal
class WAHTypes:
NONE = 0
CUBE = 1
PLANE = 2
SPHERE = 3
CYLINDER = 4
CAPSULE = 5
def import_wah_scene(file_path):
with open(file_path, 'r') as file:
lines = file.readlines()
current_object = {}
folder_path = "SpawnedObjectsFolder"
index = 0
for l... |
import unreal
obj = unreal.MediaPlayer()
with unreal.ScopedEditorTransaction('My Transaction Test') as trans: # 支持undo, redo
obj.set_editor_property('play_on_open', True)
obj.set_editor_property('vertical_field_of_view', 60)
print(obj.play_on_open)
# print(obj.vertical_field_of_view)
# LogPython: ... |
# AdvancedSkeleton To ControlRig
# Copyright (C) Animation Studios
# email: [email protected]
# 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 ... |
# 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 unreal
import unrealcmd
import subprocess
#-------------------------------------------------------------------------------
class _Impl(unrealcmd.Cmd):
target = unrealcmd.Arg(str, "Cooked target to stage")
platform = unrealcmd.Arg("", "Platform whose c... |
import unreal
import threading
import requests # or whatever you use
import os
from datetime import datetime
from scripts.utils.logger import RecordingLog, RecordingLogSingleAnim
import shutil
_log = RecordingLog()
def export_animation(animation_asset_path : str, export_path : str, name : str = "animation", ascii : b... |
import unreal
import sys
heightmap_directory = sys.argv[1]
heightmap_file_name = sys.argv[2]
heightmap_textures_path = sys.argv[3]
# # Import known images as a list of Texture2D objects
heightmap_texture_png = heightmap_directory + "\\" + heightmap_file_name
data = unreal.AutomatedAssetImportData()
data.set_editor_pr... |
# 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 logging
import unreal
import traceback
asset_tools = unreal.AssetToolsHelpers.get_asset_tools()
asset_registry: unreal.AssetRegistry = unreal.AssetRegistryHelpers.get_asset_registry()
actor_system: unreal.EditorActorSubsystem = unreal.get_editor_subsystem(unreal.EditorActorSubsystem)
asset_system = unreal.get_e... |
# /project/
# @CBgameDev Optimisation Script - Log Sound Cues Missing Attenuation Assets
# /project/
import unreal
import os
EditAssetLib = unreal.EditorAssetLibrary()
SystemsLib = unreal.SystemLibrary
workingPath = "/Game/" # Using the root directory
notepadFilePath = os.path.dirname(__file__) + "//PythonOptimiseLog... |
import unreal
import sys
if len(sys.argv) > 1:
unreal.log_warning(sys.argv[1:])
else:
unreal.log_warning("No custom arguments passed.")
# 获取所有自定义参数
data = str(sys.argv[0])
unreal.TookitBPLibrary.call_from_python(data)
unreal.TookitBPLibrary.call_from_python("----------asdfasdfaasdfasdfsadfasd----------")
# lo... |
import unreal
import utils_sequencer
from GLOBAL_VARS import PLUGIN_ROOT
from data.config import CfgNode
from utils import loader_func, log_msg_with_socket
from custom_movie_pipeline import CustomMoviePipeline
@loader_func
def main(render_config_path: str = str(PLUGIN_ROOT / 'misc/render_config_common.yaml')):
... |
# 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)
humanoidBoneList = [
"hips",
"leftUpperLeg",
"rightUpperLeg",
"leftLowerLeg",
"rightLowerLeg",
"leftF... |
# -*- coding: utf-8 -*-
import requests
import asyncio
import json
import unreal
from Utilities.Utils import Singleton
from .config import API_KEY
import os
import ast
import openai
openai.api_key = API_KEY
# chameleon_chat
class ChatGPT35:
def __init__(self, max_his:int):
self.history = []
sel... |
import os
import ast
from typing import Optional
import unreal
from ayon_core.settings import get_project_settings
from ayon_core.pipeline import Anatomy
from ayon_unreal.api import pipeline
from ayon_core.tools.utils import show_message_dialog
queue = None
executor = None
SUPPORTED_EXTENSION_MAP = {
"png": un... |
import unreal
import os
def get_asset_from_path(path):
return unreal.load_asset(path)
def get_path_from_asset(asset):
assetSubsystem = unreal.get_editor_subsystem(unreal.EditorAssetSubsystem)
fullpath = assetSubsystem.get_path_name_for_loaded_asset(asset)
index = fullpath.find(".")
return f... |
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
AssetMatTools = unreal.AssetToolsHelpers.get_asset_tools()
MaterialEditingLibrary = unreal.MaterialEditingLibrary
EditorAssetLibrary = unreal.EditorAssetLibrary
masterMaterial = AssetMatTools.create_asset("masterMat", "/project/", unreal.Material, unreal.MaterialFactoryNew())
diffuseTextureParameter =... |
# 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):
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.