From 33752f29ddfdc38e379021f7328bea2281ff80bd Mon Sep 17 00:00:00 2001 From: Mino <38447110+MINOMINOMI@users.noreply.github.com> Date: Wed, 6 Apr 2022 11:04:45 +0900 Subject: [PATCH] commit from split --- Exporter/TheExporter.ms | 6 +++--- .../WIP/wraped_bp_class.py | 16 +++++----------- .../components/get_HLOD_enabled.py | 9 +++++++++ .../components/texture_cutoff.py | 16 ++++++++++++++++ 4 files changed, 33 insertions(+), 14 deletions(-) create mode 100644 Python/PyUnreal/PyUnreal/runs_with_editorUtility/components/get_HLOD_enabled.py create mode 100644 Python/PyUnreal/PyUnreal/runs_with_editorUtility/components/texture_cutoff.py diff --git a/Exporter/TheExporter.ms b/Exporter/TheExporter.ms index c963994..2719dbf 100644 --- a/Exporter/TheExporter.ms +++ b/Exporter/TheExporter.ms @@ -783,7 +783,7 @@ Try(closeRolloutFloater theFloater) Catch() rollout 'Exporter' "Exporter" width:505 height:723 ( button 'btn_selectFiles' "Select Files" pos:[19,21] width:158 height:90 align:#left - button 'eveLogo' "11" pos:[195,21] width:90 height:90 images:#(eveLogoBMP, eveLogoBMP,1, 1,1,1,1,1) + button 'eveLogo' "11" pos:[195,21] width:90 height:90 images:#(eveLogoBMP, eveLogoBMP,1, 1,1,1,1,1) tooltip:"pls use JIRA" --button 'eveLogo' "11" pos:[195,21] width:90 height:90 images:#(underConstructionPNG, underConstructionPNG,1, 1,1,1,1,1) listBox 'mlb_FileNames' "File List" pos:[28,139] width:433 height:16 align:#left button 'btn_FilePath' "Select Export Path" pos:[24,394] width:93 height:34 align:#left @@ -833,8 +833,8 @@ rollout 'Exporter' "Exporter" width:505 height:723 ) on eveLogo pressed do ( - --ShellLaunch "http://dev.shiftup.co.kr/jira" "" - fileIn (projectDir + "\\CharacterChange\\CharacterChange.ms") + ShellLaunch "http://dev.shiftup.co.kr/jira" "" + --fileIn (projectDir + "\\CharacterChange\\CharacterChange.ms") ) on chk_leftWeaponAnim changed state do ( diff --git a/Python/PyUnreal/PyUnreal/runs_with_editorUtility/WIP/wraped_bp_class.py b/Python/PyUnreal/PyUnreal/runs_with_editorUtility/WIP/wraped_bp_class.py index e6297c2..4db2a90 100644 --- a/Python/PyUnreal/PyUnreal/runs_with_editorUtility/WIP/wraped_bp_class.py +++ b/Python/PyUnreal/PyUnreal/runs_with_editorUtility/WIP/wraped_bp_class.py @@ -1,13 +1,13 @@ +#from typing_extensions import Self from typing_extensions import Self import unreal class wrapped_sb_bp : - dir : str = "" - bp_class = '' - loaded_bp = '' - - ue_assetlib = unreal.EditorAssetLibrary() + dir :str + bp_class :object + loaded_bp :object + name :str def get_selected_asset_dir() -> str : selected_asset = unreal.EditorUtilityLibrary.get_selected_assets()[0] @@ -41,9 +41,3 @@ def get_bp_comp_by_name (__bp_c: str, __seek: str) : bp_c_obj = unreal.get_default_object(loaded_bp_c) loaded_comp = bp_c_obj.get_editor_property(__seek) return loaded_comp - - -bp_to_edit = wrapped_sb_bp() -bp_to_edit.dir = bp_to_edit.get_selected_asset_dir() -bp_to_edit.loaded_bp = bp_to_edit.get_bp_c_by_name(bp_to_edit.dir) - diff --git a/Python/PyUnreal/PyUnreal/runs_with_editorUtility/components/get_HLOD_enabled.py b/Python/PyUnreal/PyUnreal/runs_with_editorUtility/components/get_HLOD_enabled.py new file mode 100644 index 0000000..85d251d --- /dev/null +++ b/Python/PyUnreal/PyUnreal/runs_with_editorUtility/components/get_HLOD_enabled.py @@ -0,0 +1,9 @@ +import unreal +#from typing import List + +world_setting :object = unreal.EditorLevelLibrary.get_editor_world().get_world_settings() +is_HLOD_enabled :bool = world_setting.get_editor_property('enable_hierarchical_lod_system') + +need_to_print :str = 'HLOD enabled = ' + str(is_HLOD_enabled) + +unreal.log_warning(need_to_print) \ No newline at end of file diff --git a/Python/PyUnreal/PyUnreal/runs_with_editorUtility/components/texture_cutoff.py b/Python/PyUnreal/PyUnreal/runs_with_editorUtility/components/texture_cutoff.py new file mode 100644 index 0000000..cdd6f6a --- /dev/null +++ b/Python/PyUnreal/PyUnreal/runs_with_editorUtility/components/texture_cutoff.py @@ -0,0 +1,16 @@ +import unreal as ue +from typing import List + +new_size :int +#input from editor + +asset_lib :object = ue.EditorAssetLibrary +util_lib :object = ue.EditorUtilityLibrary +##init +asset_list :List[object] = util_lib.get_selected_assets() + +for each in asset_list : + each.set_editor_property('max_texture_size', new_size) + print(each.get_full_name()) + asset_lib.save_asset(each.get_full_name()) + #asset_lib.save_asset(each) \ No newline at end of file