From 4339caf7cb95340dcdc7c050af46916ed1b34811 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 5 Feb 2015 03:54:32 +1100 Subject: [PATCH] Cleanup: name flip x/y --- release/scripts/startup/bl_ui/space_view3d.py | 4 ++-- source/blender/editors/space_view3d/view3d_draw.c | 10 +++++----- source/blender/makesdna/DNA_view3d_types.h | 4 ++-- source/blender/makesrna/intern/rna_space.c | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 265163d225a..d2c95715a7e 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3183,8 +3183,8 @@ class VIEW3D_PT_background_image(Panel): row.prop(bg, "offset_y", text="Y") row = box.row() - row.prop(bg, "flip_h") - row.prop(bg, "flip_v") + row.prop(bg, "use_flip_x") + row.prop(bg, "use_flip_y") row = box.row() if bg.view_axis != 'CAMERA': diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 49cb24f7c2c..ac1c075e8d6 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1833,14 +1833,14 @@ static void view3d_draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d, glRotatef(RAD2DEGF(-bgpic->rotation), 0.0f, 0.0f, 1.0f); } - if(bgpic->flag & V3D_BGPIC_FLIP_V) { - zoomy *= -1.0f; - y1 = y2; - } - if(bgpic->flag & V3D_BGPIC_FLIP_H) { + if(bgpic->flag & V3D_BGPIC_FLIP_X) { zoomx *= -1.0f; x1 = x2; } + if(bgpic->flag & V3D_BGPIC_FLIP_Y) { + zoomy *= -1.0f; + y1 = y2; + } glPixelZoom(zoomx, zoomy); glColor4f(1.0f, 1.0f, 1.0f, 1.0f - bgpic->blend); diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 0c290ab8435..543a95cc120 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -344,8 +344,8 @@ enum { V3D_BGPIC_CAMERA_CROP = (1 << 6), /* crop out the image */ /* Axis flip options */ - V3D_BGPIC_FLIP_H = (1 << 7), - V3D_BGPIC_FLIP_V = (1 << 8) + V3D_BGPIC_FLIP_X = (1 << 7), + V3D_BGPIC_FLIP_Y = (1 << 8), }; #define V3D_BGPIC_EXPANDED (V3D_BGPIC_EXPANDED | V3D_BGPIC_CAMERACLIP) diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 7eaf7376a4b..fffddc267cf 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -1706,13 +1706,13 @@ static void rna_def_background_image(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Rotation", "Rotation for the background image"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); - prop = RNA_def_property(srna, "flip_h", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_BGPIC_FLIP_H); + prop = RNA_def_property(srna, "use_flip_x", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_BGPIC_FLIP_X); RNA_def_property_ui_text(prop, "Flip Horizontally", "Flip the background image horizontally"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); - prop = RNA_def_property(srna, "flip_v", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_BGPIC_FLIP_V); + prop = RNA_def_property(srna, "use_flip_y", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_BGPIC_FLIP_Y); RNA_def_property_ui_text(prop, "Flip Vertically", "Flip the background image vertically"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);