From 70e647076418d114111aa76b5d3639a5b4271e94 Mon Sep 17 00:00:00 2001 From: Owl Date: Fri, 26 Sep 2025 14:32:34 -0400 Subject: bcsv and other stuff --- basic_settings.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'basic_settings.py') diff --git a/basic_settings.py b/basic_settings.py index c1036ef..2a33eb0 100644 --- a/basic_settings.py +++ b/basic_settings.py @@ -1,4 +1,5 @@ import bpy +from . import blender_funcs # SMG was made under the centimeter unit # SuperBMD assumes everything is in meters so @@ -10,6 +11,7 @@ import bpy # register func @bpy.app.handlers.persistent def register(dummy): + # the holy variable scene = bpy.context.scene print("Setting length/rotation units...") @@ -36,15 +38,16 @@ def register(dummy): break # import Mario's model from DAE file included in the template - # get blenxy template location for that and select it - # but first delete all objects in scene so it is clean - bpy.ops.object.select_all(action = "SELECT") - bpy.ops.object.delete() + # get blenxy's template location for that + bpy.ops.object.select_all(action = "DESELECT") + # remove the default cube if present + if ("Cube" in bpy.data.objects): + bpy.data.objects.remove(bpy.data.objects["Cube"]) print("Importing Mario's Model...") blenxy_path = bpy.utils.user_resource("SCRIPTS", "startup/bl_app_templates_user/blenxy/") bpy.ops.wm.collada_import(filepath = blenxy_path + "Mario.dae") Mario = bpy.data.objects.get("Mario") - Mario.select = True + blender_funcs.select_obj(Mario, False, "OBJECT") # set a SMG axis for reference when doing models # it is just a visual queue to get how the model will appear on game @@ -86,11 +89,11 @@ def register(dummy): scene.frame_preview_end = 100 # ~ bpy.context.user_preferences.view.use_mouse_depth_navigate = True # ~ bpy.context.user_preferences.view.use_zoom_to_mouse = True + # ~ bpy.context.user_preferences.view.show_developer_ui = True + bpy.context.user_preferences.system.use_international_fonts = True + bpy.context.user_preferences.system.select_method = "GL_QUERY" print("Done with the basic settings!\n") # unregister func def unregister(): - # the holy variable again - scene = bpy.context.scene - # remove the galaxy unit - bpy.ops.scene.units_length_preset_add(remove_active = True) + return -- cgit v1.2.3-70-g09d2