- added back Shift+Tab to toggle snap

- added curve tilt and shrink/fatten buttons into the toolbar
- fix typo in last commit for view3d snap header button
This commit is contained in:
Campbell Barton 2009-11-21 13:01:28 +00:00
parent 3d4fff3bc2
commit 455866ecf9
4 changed files with 21 additions and 6 deletions

@ -171,6 +171,10 @@ class VIEW3D_PT_tools_curveedit(View3DPanel):
col.itemO("tfm.translate")
col.itemO("tfm.rotate")
col.itemO("tfm.resize", text="Scale")
col = layout.column(align=True)
col.item_enumO("tfm.transform", "mode", 'TILT')
col.item_enumO("tfm.transform", "mode", 'CURVE_SHRINKFATTEN')
col = layout.column(align=True)
col.itemL(text="Curve:")
@ -182,10 +186,12 @@ class VIEW3D_PT_tools_curveedit(View3DPanel):
col = layout.column(align=True)
col.itemL(text="Handles:")
col.item_enumO("curve.handle_type_set", "type", 'AUTOMATIC')
col.item_enumO("curve.handle_type_set", "type", 'VECTOR')
col.item_enumO("curve.handle_type_set", "type", 'ALIGN')
col.item_enumO("curve.handle_type_set", "type", 'FREE_ALIGN')
row = col.row()
row.item_enumO("curve.handle_type_set", "type", 'AUTOMATIC', text="Auto")
row.item_enumO("curve.handle_type_set", "type", 'VECTOR')
row = col.row()
row.item_enumO("curve.handle_type_set", "type", 'ALIGN')
row.item_enumO("curve.handle_type_set", "type", 'FREE_ALIGN', text="Free")
col = layout.column(align=True)
col.itemL(text="Modeling:")

@ -323,6 +323,10 @@ void ED_object_generic_keymap(struct wmKeyConfig *keyconf, struct wmKeyMap *keym
{
wmKeyMapItem *km;
/* snap */
km = WM_keymap_add_item(keymap, "WM_OT_context_toggle", TABKEY, KM_PRESS, KM_SHIFT, 0);
RNA_string_set(km->ptr, "path", "scene.tool_settings.snap");
/* used by mesh, curve & lattice only */
if(do_pet) {
/* context ops */
@ -339,6 +343,5 @@ void ED_object_generic_keymap(struct wmKeyConfig *keyconf, struct wmKeyMap *keym
RNA_string_set(km->ptr, "value_1", "DISABLED");
RNA_string_set(km->ptr, "value_2", "CONNECTED");
}
}

@ -2185,7 +2185,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
if (ts->snap_flag & SCE_SNAP) {
uiDefIconButBitS(block, TOG, SCE_SNAP, B_REDR, ICON_SNAP_GEO,xco,yco,XIC,YIC, &ts->snap_flag, 0, 0, 0, 0, "Snap with Ctrl during transform (Shift Tab)");
xco+= XIC;
if(v3d->modeselect = OB_MODE_OBJECT) {
if(v3d->modeselect == OB_MODE_OBJECT) {
uiDefIconButBitS(block, TOG, SCE_SNAP_ROTATE, B_REDR, ICON_SNAP_NORMAL,xco,yco,XIC,YIC, &ts->snap_flag, 0, 0, 0, 0, "Align rotation with the snapping target");
xco+= XIC;
}

@ -649,31 +649,37 @@ static void rna_def_tool_settings(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP);
RNA_def_property_ui_text(prop, "Snap", "Snap while Ctrl is held during transform.");
RNA_def_property_ui_icon(prop, ICON_SNAP_GEAR, 1);
RNA_def_property_update(prop, NC_SCENE|ND_MODE, NULL); /* header redraw */
prop= RNA_def_property(srna, "snap_align_rotation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_ROTATE);
RNA_def_property_ui_text(prop, "Snap Align Rotation", "Align rotation with the snapping target.");
RNA_def_property_ui_icon(prop, ICON_SNAP_NORMAL, 0);
RNA_def_property_update(prop, NC_SCENE|ND_MODE, NULL); /* header redraw */
prop= RNA_def_property(srna, "snap_element", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "snap_mode");
RNA_def_property_enum_items(prop, snap_element_items);
RNA_def_property_ui_text(prop, "Snap Element", "Type of element to snap to.");
RNA_def_property_update(prop, NC_SCENE|ND_MODE, NULL); /* header redraw */
prop= RNA_def_property(srna, "snap_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "snap_target");
RNA_def_property_enum_items(prop, snap_mode_items);
RNA_def_property_ui_text(prop, "Snap Mode", "Which part to snap onto the target.");
RNA_def_property_update(prop, NC_SCENE|ND_MODE, NULL); /* header redraw */
prop= RNA_def_property(srna, "snap_peel_object", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_PEEL_OBJECT);
RNA_def_property_ui_text(prop, "Snap Peel Object", "Consider objects as whole when finding volume center.");
RNA_def_property_ui_icon(prop, ICON_SNAP_PEEL_OBJECT, 0);
RNA_def_property_update(prop, NC_SCENE|ND_MODE, NULL); /* header redraw */
prop= RNA_def_property(srna, "snap_project", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_PROJECT);
RNA_def_property_ui_text(prop, "Project Individual Elements", "DOC_BROKEN");
RNA_def_property_ui_icon(prop, ICON_RETOPO, 0);
RNA_def_property_update(prop, NC_SCENE|ND_MODE, NULL); /* header redraw */
/* Auto Keying */
prop= RNA_def_property(srna, "enable_auto_key", PROP_BOOLEAN, PROP_NONE);