From f892cdc6436e949cd2ababbe988f02b98a5ca9df Mon Sep 17 00:00:00 2001 From: riidefi <34194588+riidefi@users.noreply.github.com> Date: Thu, 18 Mar 2021 17:35:55 -0400 Subject: [PATCH] :recycle: riistudio_blender: Misc cleanup --- source/blender/riistudio_blender.py | 32 ++++++++--------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/source/blender/riistudio_blender.py b/source/blender/riistudio_blender.py index 2dc7ee99e..0ab71054b 100644 --- a/source/blender/riistudio_blender.py +++ b/source/blender/riistudio_blender.py @@ -8,35 +8,26 @@ "location": "File > Export", "description": "Export to BRRES/BMD files.", "warning": "Experimental Build", - "wiki_url": "", + "wiki_url": "https://github.com/riidefi/RiiStudio", "tracker_url": "", "category": "Export" } # src\imports.py -from os.path import dirname, basename - import struct import bpy, bmesh -import json import os, shutil -import math, mathutils -import hashlib +import mathutils from bpy_extras.io_utils import axis_conversion -# ExportHelper is a helper class, defines filename and -# invoke() function which calls the file selector. -# noinspection PyUnresolvedReferences from bpy_extras.io_utils import ExportHelper -# noinspection PyUnresolvedReferences from bpy.props import StringProperty, BoolProperty, EnumProperty, FloatProperty, IntProperty -# noinspection PyUnresolvedReferences from bpy.types import Operator - from collections import OrderedDict - from time import perf_counter import subprocess +import mmap +import cProfile BLENDER_28 = bpy.app.version[1] >= 80 @@ -66,9 +57,6 @@ def invoke_converter(context, source, dest): RHST_DATA_S32 = 8 RHST_DATA_F32 = 9 -import mmap -import cProfile - DEBUG = False class Timer: @@ -700,7 +688,7 @@ def export_jres(context, params : RHSTExportParams): ] ], "bones": [{ - "name": "blender_root", + "name": "riistudio_blender%s" % bpy.app.version[1], "parent": -1, "child": -1, "scale": params.root_transform.s, @@ -900,11 +888,8 @@ def draw_rhst_options(self, context): box.prop(self, "mesh_conversion_mode") box.prop(self, 'add_dummy_colors') box.prop(self, 'ignore_cache') + box.prop(self, 'keep_build_artifacts') - # # CT Integrations - # box = layout.box() - # box.label("CT Integrations", icon='LINK_BLEND') - # box.prop(self, "rspm_build_debug") # Quantization box = layout.box() box.label(text="Quantization", icon='LINENUMBERS_ON') @@ -913,6 +898,7 @@ def draw_rhst_options(self, context): col.prop(self, "normal_quantize") col.prop(self, "uv_quantize") col.prop(self, "color_quantize") + # Root Transform box = layout.box() box.label(text="Root Transform", icon='FULLSCREEN_ENTER' if BLENDER_28 else 'MANIPUL') @@ -1037,9 +1023,9 @@ def execute(self, context): # Only needed if you want to add into a dynamic menu def brres_menu_func_export(self, context): - self.layout.operator(ExportBRRES.bl_idname, text="BRRES") + self.layout.operator(ExportBRRES.bl_idname, text="BRRES (RiiStudio)") def bmd_menu_func_export(self, context): - self.layout.operator(ExportBMD.bl_idname, text="BMD") + self.layout.operator(ExportBMD.bl_idname, text="BMD (RiiStudio)") # src\preferences.py