Skip to content

Commit

Permalink
♻️ riistudio_blender: Misc cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
riidefi committed Mar 18, 2021
1 parent 3572730 commit f892cdc
Showing 1 changed file with 9 additions and 23 deletions.
32 changes: 9 additions & 23 deletions source/blender/riistudio_blender.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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')
Expand All @@ -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')
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f892cdc

Please sign in to comment.