Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_view3d.py
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 6,790 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| col.label(text="Snap To") | col.label(text="Snap To") | ||||
| col.prop(tool_settings, "snap_elements", expand=True) | col.prop(tool_settings, "snap_elements", expand=True) | ||||
| col.separator() | col.separator() | ||||
| if 'INCREMENT' in snap_elements: | if 'INCREMENT' in snap_elements: | ||||
| col.prop(tool_settings, "use_snap_grid_absolute") | col.prop(tool_settings, "use_snap_grid_absolute") | ||||
| if snap_elements != {'INCREMENT'}: | if snap_elements != {'INCREMENT'}: | ||||
| if snap_elements != {'FACE_NEAREST'}: | |||||
| col.label(text="Snap With") | col.label(text="Snap With") | ||||
| row = col.row(align=True) | row = col.row(align=True) | ||||
| row.prop(tool_settings, "snap_target", expand=True) | row.prop(tool_settings, "snap_target", expand=True) | ||||
| col.prop(tool_settings, "use_snap_backface_culling") | |||||
| if obj: | if obj: | ||||
| col.label(text="Target Selection") | |||||
| col_targetsel = col.column(align=True) | |||||
campbellbarton: Prefer a name that uses col as a prefix `col_targetsel` for eg. | |||||
Done Inline Actionsdone gfxcoder: done | |||||
| if object_mode == 'EDIT' and obj.type not in {'LATTICE', 'META', 'FONT'}: | if object_mode == 'EDIT' and obj.type not in {'LATTICE', 'META', 'FONT'}: | ||||
| sub = col.column() | col_targetsel.prop( | ||||
| sub.active = not (tool_settings.use_proportional_edit and obj.type == 'MESH') | tool_settings, | ||||
| sub.prop(tool_settings, "use_snap_self") | "use_snap_self", | ||||
| text="Include Active", | |||||
| icon='EDITMODE_HLT', | |||||
| ) | |||||
| col_targetsel.prop( | |||||
| tool_settings, | |||||
| "use_snap_edit", | |||||
| text="Include Edited", | |||||
| icon='OUTLINER_DATA_MESH', | |||||
| ) | |||||
| col_targetsel.prop( | |||||
| tool_settings, | |||||
| "use_snap_nonedit", | |||||
| text="Include Non-Edited", | |||||
| icon='OUTLINER_OB_MESH', | |||||
| ) | |||||
| col_targetsel.prop( | |||||
| tool_settings, | |||||
| "use_snap_selectable", | |||||
| text="Exclude Non-Selectable", | |||||
| icon='RESTRICT_SELECT_OFF', | |||||
| ) | |||||
| if object_mode in {'OBJECT', 'POSE', 'EDIT', 'WEIGHT_PAINT'}: | if object_mode in {'OBJECT', 'POSE', 'EDIT', 'WEIGHT_PAINT'}: | ||||
Not Done Inline ActionsThis can be removed. campbellbarton: This can be removed. | |||||
| col.prop(tool_settings, "use_snap_align_rotation") | col.prop(tool_settings, "use_snap_align_rotation") | ||||
| col.prop(tool_settings, "use_snap_backface_culling") | |||||
| if 'FACE' in snap_elements: | if 'FACE' in snap_elements: | ||||
| col.prop(tool_settings, "use_snap_project") | col.prop(tool_settings, "use_snap_project") | ||||
| if 'FACE_NEAREST' in snap_elements: | |||||
| col.prop(tool_settings, 'use_snap_to_same_target') | |||||
| if object_mode == 'EDIT': | |||||
| col.prop(tool_settings, 'snap_face_nearest_steps') | |||||
| if 'VOLUME' in snap_elements: | if 'VOLUME' in snap_elements: | ||||
| col.prop(tool_settings, "use_snap_peel_object") | col.prop(tool_settings, "use_snap_peel_object") | ||||
| col.label(text="Affect") | col.label(text="Affect") | ||||
| row = col.row(align=True) | row = col.row(align=True) | ||||
| row.prop(tool_settings, "use_snap_translate", text="Move", toggle=True) | row.prop(tool_settings, "use_snap_translate", text="Move", toggle=True) | ||||
| row.prop(tool_settings, "use_snap_rotate", text="Rotate", toggle=True) | row.prop(tool_settings, "use_snap_rotate", text="Rotate", toggle=True) | ||||
| row.prop(tool_settings, "use_snap_scale", text="Scale", toggle=True) | row.prop(tool_settings, "use_snap_scale", text="Scale", toggle=True) | ||||
| ▲ Show 20 Lines • Show All 1,139 Lines • Show Last 20 Lines | |||||
Prefer a name that uses col as a prefix col_targetsel for eg.