summaryrefslogtreecommitdiff
path: root/basic_settings.py
diff options
context:
space:
mode:
Diffstat (limited to 'basic_settings.py')
-rw-r--r--basic_settings.py21
1 files changed, 12 insertions, 9 deletions
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