diff --git a/release/scripts/modules/bpy_ops.py b/release/scripts/modules/bpy_ops.py index 022c0581a81..0360964be3f 100644 --- a/release/scripts/modules/bpy_ops.py +++ b/release/scripts/modules/bpy_ops.py @@ -157,9 +157,6 @@ class WM_OT_context_set(bpy.types.Operator): '''Set a context value.''' __idname__ = "wm.context_set" __label__ = "Context Set" - __register__ = True - __undo__ = True - __props__ = [ bpy.props.StringProperty(attr="path", name="Context Attributes", description="rna context string", maxlen= 1024, default= ""), bpy.props.StringProperty(attr="value", name="Value", description="Assignment value (as a string)", maxlen= 1024, default= "") @@ -173,9 +170,6 @@ class WM_OT_context_toggle(bpy.types.Operator): '''Toggle a context value.''' __idname__ = "wm.context_toggle" __label__ = "Context Toggle" - __register__ = True - __undo__ = True - __props__ = [ bpy.props.StringProperty(attr="path", name="Context Attributes", description="rna context string", maxlen= 1024, default= ""), ] @@ -188,9 +182,6 @@ class WM_OT_context_toggle_values(bpy.types.Operator): '''Toggle a context value.''' __idname__ = "wm.context_toggle_values" __label__ = "Context Toggle Values" - __register__ = True - __undo__ = True - __props__ = [ bpy.props.StringProperty(attr="path", name="Context Attributes", description="rna context string", maxlen= 1024, default= ""), bpy.props.StringProperty(attr="value_1", name="Value", description="Toggle value (as a string)", maxlen= 1024, default= ""), @@ -205,9 +196,6 @@ class WM_OT_context_cycle_enum(bpy.types.Operator): '''Toggle a context value.''' __idname__ = "wm.context_cycle_enum" __label__ = "Context Enum Cycle" - __register__ = True - __undo__ = True - __props__ = [ bpy.props.StringProperty(attr="path", name="Context Attributes", description="rna context string", maxlen= 1024, default= ""), bpy.props.BoolProperty(attr="reverse", name="Reverse", description="Cycle backwards", default= False) diff --git a/release/scripts/ui/buttons_data_mesh.py b/release/scripts/ui/buttons_data_mesh.py index 055cbb02e3f..78c675e618f 100644 --- a/release/scripts/ui/buttons_data_mesh.py +++ b/release/scripts/ui/buttons_data_mesh.py @@ -60,6 +60,9 @@ class DATA_PT_settings(DataButtonsPanel): col = split.column() col.itemR(mesh, "texture_mesh") + + col = split.column() + col.itemR(mesh, "use_mirror_x") class DATA_PT_vertex_groups(DataButtonsPanel): __label__ = "Vertex Groups" diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index ed8d366ab8b..50411c9d998 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -66,7 +66,7 @@ struct Object; #define B_AUTOFGON 0x20 #define B_KNIFE 0x80 #define B_PERCENTSUBD 0x40 -#define B_MESH_X_MIRROR 0x100 +//#define B_MESH_X_MIRROR 0x100 // deprecated, use mesh #define B_JOINTRIA_UV 0x200 #define B_JOINTRIA_VCOL 0X400 #define B_JOINTRIA_SHARP 0X800 diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c index c4f4cd48d53..288af7f7874 100644 --- a/source/blender/editors/mesh/editmesh_mods.c +++ b/source/blender/editors/mesh/editmesh_mods.c @@ -4291,7 +4291,7 @@ static int smooth_vertex(bContext *C, wmOperator *op) if(eve->f & SELECT) { if(eve->f1) { - if (ts->editbutflag & B_MESH_X_MIRROR) { + if (((Mesh *)obedit->data)->editflag & ME_EDIT_MIRROR_X) { eve_mir= editmesh_get_x_mirror_vert(obedit, em, eve->co); } diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 11789651d01..47f76aab4ca 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -974,7 +974,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event) // Need stuff to take it from edit mesh or whatnot here else { - if (t->obedit && t->obedit->type == OB_MESH && ts->editbutflag & B_MESH_X_MIRROR) + if (t->obedit && t->obedit->type == OB_MESH && (((Mesh *)t->obedit->data)->editflag & ME_EDIT_MIRROR_X)) { t->flag |= T_MIRROR; } diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index f7f1d3b53bd..0f4dbaa8218 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -82,7 +82,7 @@ typedef struct Mesh { * the face does not need to be selected, -1 is inactive */ int act_face; - int texflag; + short texflag, editflag; /* texture space, copied as one block in editobject.c */ float loc[3]; @@ -116,6 +116,11 @@ typedef struct TFace { /* texflag */ #define AUTOSPACE 1 +/* me->editflag */ +#define ME_EDIT_MIRROR_X (1 << 0) +#define ME_EDIT_MIRROR_Y (1 << 1) // unused so far +#define ME_EDIT_MIRROR_Z (1 << 2) // unused so far + /* me->flag */ #define ME_ISDONE 1 #define ME_NOPUNOFLIP 2 diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index 046f1ea1030..039109f75a1 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -1600,6 +1600,21 @@ static void rna_def_mesh(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Face Area", "Displays the area of selected faces"); RNA_def_property_update(prop, 0, "rna_Mesh_update_draw"); + /* editflag */ + prop= RNA_def_property(srna, "use_mirror_x", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "editflag", ME_EDIT_MIRROR_X); + RNA_def_property_ui_text(prop, "X Mirror", "X Axis mirror editing"); + + /* + prop= RNA_def_property(srna, "use_mirror_y", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "editflag", ME_EDIT_MIRROR_Y); + RNA_def_property_ui_text(prop, "Y Mirror", "Y Axis mirror editing"); + + prop= RNA_def_property(srna, "use_mirror_x", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "editflag", ME_EDIT_MIRROR_Z); + RNA_def_property_ui_text(prop, "Z Mirror", "Z Axis mirror editing"); + */ + rna_def_texmat_common(srna, "rna_Mesh_texspace_editable"); RNA_api_mesh(srna);