Finish renaming job in Set Center operator to use Origin instead of Center.
Also replace ObData by Geometry and Object Geometry after talk with Matt.
This commit is contained in:
@@ -147,9 +147,9 @@ class VIEW3D_MT_transform(bpy.types.Menu):
|
||||
|
||||
layout.operator_context = 'EXEC_AREA'
|
||||
|
||||
layout.operator("object.center_set", text="Object Data to Origin").type = 'CENTER'
|
||||
layout.operator("object.center_set", text="Origin to Object Data").type = 'CENTER_NEW'
|
||||
layout.operator("object.center_set", text="Origin to 3D Cursor").type = 'CENTER_CURSOR'
|
||||
layout.operator("object.origin_set", text="Geometry to Origin").type = 'GEOMETRY_ORIGIN'
|
||||
layout.operator("object.origin_set", text="Origin to Geometry").type = 'ORIGIN_GEOMETRY'
|
||||
layout.operator("object.origin_set", text="Origin to 3D Cursor").type = 'ORIGIN_CURSOR'
|
||||
|
||||
|
||||
class VIEW3D_MT_mirror(bpy.types.Menu):
|
||||
|
||||
@@ -53,7 +53,7 @@ void OBJECT_OT_visual_transform_apply(struct wmOperatorType *ot);
|
||||
void OBJECT_OT_location_apply(struct wmOperatorType *ot);
|
||||
void OBJECT_OT_scale_apply(struct wmOperatorType *ot);
|
||||
void OBJECT_OT_rotation_apply(struct wmOperatorType *ot);
|
||||
void OBJECT_OT_center_set(struct wmOperatorType *ot);
|
||||
void OBJECT_OT_origin_set(struct wmOperatorType *ot);
|
||||
|
||||
/* object_relations.c */
|
||||
void OBJECT_OT_parent_set(struct wmOperatorType *ot);
|
||||
|
||||
@@ -71,7 +71,7 @@ void ED_operatortypes_object(void)
|
||||
WM_operatortype_append(OBJECT_OT_location_apply);
|
||||
WM_operatortype_append(OBJECT_OT_scale_apply);
|
||||
WM_operatortype_append(OBJECT_OT_rotation_apply);
|
||||
WM_operatortype_append(OBJECT_OT_center_set);
|
||||
WM_operatortype_append(OBJECT_OT_origin_set);
|
||||
|
||||
WM_operatortype_append(OBJECT_OT_mode_set);
|
||||
WM_operatortype_append(OBJECT_OT_editmode_toggle);
|
||||
@@ -251,7 +251,7 @@ void ED_keymap_object(wmKeyConfig *keyconf)
|
||||
RNA_enum_set(kmi->ptr, "mode", OB_MODE_WEIGHT_PAINT);
|
||||
RNA_boolean_set(kmi->ptr, "toggle", 1);
|
||||
|
||||
WM_keymap_add_item(keymap, "OBJECT_OT_center_set", CKEY, KM_PRESS, KM_ALT|KM_SHIFT|KM_CTRL, 0);
|
||||
WM_keymap_add_item(keymap, "OBJECT_OT_origin_set", CKEY, KM_PRESS, KM_ALT|KM_SHIFT|KM_CTRL, 0);
|
||||
|
||||
/* Object Mode ---------------------------------------------------------------- */
|
||||
/* Note: this keymap gets disabled in non-objectmode, */
|
||||
|
||||
@@ -695,14 +695,14 @@ void texspace_edit(Scene *scene, View3D *v3d)
|
||||
/********************* Set Object Center ************************/
|
||||
|
||||
static EnumPropertyItem prop_set_center_types[] = {
|
||||
{0, "CENTER", 0, "ObData to Centroi", "Move object data to Object centroid"},
|
||||
{1, "CENTER_NEW", 0, "Centroid to ObData", "Move Object centroid to center of object data"},
|
||||
{2, "CENTER_CURSOR", 0, "Centroid to 3D Cursor", "Move Object centroid to position of the 3d cursor"},
|
||||
{0, "GEOMETRY_ORIGIN", 0, "Geometry to Origin", "Move object geometry to object origin"},
|
||||
{1, "ORIGIN_GEOMETRY", 0, "Origin to Geometry", "Move object origin to center of object geometry"},
|
||||
{2, "ORIGIN_CURSOR", 0, "Origin to 3D Cursor", "Move object origin to position of the 3d cursor"},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
|
||||
/* 0 == do center, 1 == center new, 2 == center cursor */
|
||||
static int object_center_set_exec(bContext *C, wmOperator *op)
|
||||
static int object_origin_set_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Main *bmain= CTX_data_main(C);
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
@@ -1026,16 +1026,16 @@ static int object_center_set_exec(bContext *C, wmOperator *op)
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void OBJECT_OT_center_set(wmOperatorType *ot)
|
||||
void OBJECT_OT_origin_set(wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name= "Set Center";
|
||||
ot->description = "Set the object's center, by either moving the data, or set to center of data, or use 3d cursor";
|
||||
ot->idname= "OBJECT_OT_center_set";
|
||||
ot->name= "Set Origin";
|
||||
ot->description = "Set the object's origin, by either moving the data, or set to center of data, or use 3d cursor";
|
||||
ot->idname= "OBJECT_OT_origin_set";
|
||||
|
||||
/* api callbacks */
|
||||
ot->invoke= WM_menu_invoke;
|
||||
ot->exec= object_center_set_exec;
|
||||
ot->exec= object_origin_set_exec;
|
||||
|
||||
ot->poll= ED_operator_view3d_active;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user