From ef4d0e08b2d312bcf3034aa3ae48436f5d8b56a5 Mon Sep 17 00:00:00 2001 From: Owl Date: Thu, 21 Aug 2025 20:07:13 -0400 Subject: all the stuff --- basic_settings.py | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'basic_settings.py') diff --git a/basic_settings.py b/basic_settings.py index 1b16e45..96b9b07 100644 --- a/basic_settings.py +++ b/basic_settings.py @@ -3,12 +3,13 @@ import bpy # SMG was made under the centimeter unit # SuperBMD assumes everything is in meters so I will scale down the models when being imported +# the holy variable scene = bpy.context.scene print("Setting length/rotation units...") -scene.unit_settings.system = 'METRIC' +scene.unit_settings.system = "METRIC" scene.unit_settings.scale_length = 0.01 -bpy.ops.scene.units_length_preset_add(name="Galaxy Unit") +bpy.ops.scene.units_length_preset_add(name = "Galaxy Unit") scene.unit_settings.system_rotation = 'DEGREES' scene.unit_settings.use_separate = False @@ -19,7 +20,7 @@ scene.unit_settings.use_separate = False print("Scaling 3D View grid...") for area in bpy.context.screen.areas: - if (area.type == 'VIEW_3D'): + if (area.type == "VIEW_3D"): view_3d_area = area.spaces.active view_3d_area.grid_scale = 0.01 view_3d_area.grid_lines = 400 @@ -34,11 +35,11 @@ for area in bpy.context.screen.areas: # 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.select_all(action = "SELECT") bpy.ops.object.delete() print("Importing Mario's Model...") -blenxy_path = bpy.utils.user_resource('SCRIPTS', "startup/bl_app_templates_user/blenxy/") +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 @@ -58,9 +59,9 @@ Mario.select = True override = bpy.context.copy() override['area'] = area bpy.ops.transform.create_orientation(override, name = "SMG Axis", use = True) -bpy.context.scene.orientations[-1].matrix = [[ 1.0, 0.0, 0.0], - [ 0.0, 0.0, 1.0], - [ 0.0, -1.0, 0.0]] +scene.orientations[-1].matrix = [[ 1.0, 0.0, 0.0], + [ 0.0, 0.0, 1.0], + [ 0.0, -1.0, 0.0]] # set initial 3d viewport camera location @@ -76,12 +77,17 @@ view_3d_area.region_3d.view_distance = 4 print("Extra stuff to set...") # set environment lightnning (material display suggestion) -bpy.context.scene.world.light_settings.use_environment_light = True +scene.world.light_settings.use_environment_light = True # set framerate (SMG runs at 59.94 fps in THP videos) -bpy.context.scene.render.fps = 60 -bpy.context.scene.render.fps_base = 1.001 -# set start frame at 0 -bpy.data.scenes["Scene"].frame_start = 0 -bpy.data.scenes["Scene"].frame_current = 0 +scene.render.fps = 60 +scene.render.fps_base = 1.001 +# set frames to be able to go negative and allow them to be shown in scene +bpy.context.user_preferences.edit.use_negative_frames = True +scene.use_preview_range = True +scene.frame_preview_start = 0 +scene.frame_current = 0 +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 print("Done with the basic settings!\n") -- cgit v1.2.3-70-g09d2