This is a sample script for changing scene unit (1 to 0.01) and scaling objects (100x)
- Write script in blender Text Editor
- Text editor -> Text -> Make internal
- File -> Defaults -> Save Startup File
import bpy
#import mathutils
bpy.context.scene.unit_settings.scale_length = 0.01
bpy.ops.object.select_all(action='SELECT')
bpy.context.scene.cursor.location = (0.0, 0.0, 0.0)
bpy.context.scene.tool_settings.transform_pivot_point = 'CURSOR'
bpy.ops.transform.resize(value=(100, 100, 100), orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', mirror=False, use_proportional_edit=False, proportional_edit_falloff='SMOOTH', proportional_size=1, use_proportional_connected=False, use_proportional_projected=False, snap=False, snap_elements={'INCREMENT'}, use_snap_project=False, snap_target='CLOSEST', use_snap_self=True, use_snap_edit=True, use_snap_nonedit=True, use_snap_selectable=False, alt_navigation=True)
Leave a Reply