[Bf-blender-cvs] [4339caf] master: Cleanup: name flip x/y
Campbell Barton
noreply at git.blender.org
Wed Feb 4 17:56:48 CET 2015
Commit: 4339caf7cb95340dcdc7c050af46916ed1b34811
Author: Campbell Barton
Date: Thu Feb 5 03:54:32 2015 +1100
Branches: master
https://developer.blender.org/rB4339caf7cb95340dcdc7c050af46916ed1b34811
Cleanup: name flip x/y
===================================================================
M release/scripts/startup/bl_ui/space_view3d.py
M source/blender/editors/space_view3d/view3d_draw.c
M source/blender/makesdna/DNA_view3d_types.h
M source/blender/makesrna/intern/rna_space.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 265163d..d2c9571 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 49cb24f..ac1c075 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 0c290ab..543a95c 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 7eaf737..fffddc2 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);
More information about the Bf-blender-cvs
mailing list