Cleanup: name flip x/y

This commit is contained in:
Campbell Barton 2015-02-05 03:54:32 +11:00
parent 292444e3f5
commit 4339caf7cb
4 changed files with 13 additions and 13 deletions

@ -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':

@ -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);

@ -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)

@ -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);