Cleanup: name flip x/y
authorCampbell Barton <ideasman42@gmail.com>
Wed, 4 Feb 2015 16:54:32 +0000 (03:54 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 4 Feb 2015 16:56:24 +0000 (03:56 +1100)
release/scripts/startup/bl_ui/space_view3d.py
source/blender/editors/space_view3d/view3d_draw.c
source/blender/makesdna/DNA_view3d_types.h
source/blender/makesrna/intern/rna_space.c

index 265163d225a06dc0fef192e7ac23ff16dbef3717..d2c95715a7ec04613b0cd86e213ff76c98513169 100644 (file)
@@ -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':
index 49cb24f7c2c98927b0722a12806e054957549fa6..ac1c075e8d6dfc92a24be06cb7ca26bd94d85226 100644 (file)
@@ -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);
 
index 0c290ab843549b97eabb9e189a56e4b3fc63ba23..543a95cc1208c8125e866197c0e9a55661540597 100644 (file)
@@ -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)
index 7eaf7376a4b1a8fb9a246a3d2d5853c1f8d11bcd..fffddc267cf9c01f432ef759a14c3b084dac0d2a 100644 (file)
@@ -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);