Page Menu
Home
Search
Configure Global Search
Log In
Files
F19164
show_backgroundimage.diff
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Dalai Felinto (dfelinto)
Nov 13 2013, 4:14 PM
Size
2 KB
Subscribers
None
show_backgroundimage.diff
View Options
Index: release/scripts/startup/bl_ui/space_view3d.py
===================================================================
--- release/scripts/startup/bl_ui/space_view3d.py (revision 42161)
+++ release/scripts/startup/bl_ui/space_view3d.py (working copy)
@@ -2301,6 +2301,7 @@
else:
row.label(text="Not Set")
row.operator("view3d.background_image_remove", text="", emboss=False, icon='X').index = i
+ row.prop(bg, "show_background_image")
box.prop(bg, "view_axis", text="Axis")
Index: source/blender/makesdna/DNA_view3d_types.h
===================================================================
--- source/blender/makesdna/DNA_view3d_types.h (revision 42161)
+++ source/blender/makesdna/DNA_view3d_types.h (working copy)
@@ -308,6 +308,7 @@
/* may want to use 1 for select ?*/
#define V3D_BGPIC_EXPANDED 2
#define V3D_BGPIC_CAMERACLIP 4
+#define V3D_BGPIC_DISABLED 8
/* BGPic->source */
/* may want to use 1 for select ?*/
Index: source/blender/makesrna/intern/rna_space.c
===================================================================
--- source/blender/makesrna/intern/rna_space.c (revision 42161)
+++ source/blender/makesrna/intern/rna_space.c (working copy)
@@ -1311,6 +1311,11 @@
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_BGPIC_CAMERACLIP);
RNA_def_property_ui_text(prop, "Camera Clip", "Use movie clip from active scene camera");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+
+ prop= RNA_def_property(srna, "show_background_image", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", V3D_BGPIC_DISABLED);
+ RNA_def_property_ui_text(prop, "", "Show this image as background");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
}
static void rna_def_backgroundImages(BlenderRNA *brna, PropertyRNA *cprop)
Index: source/blender/editors/space_view3d/view3d_draw.c
===================================================================
--- source/blender/editors/space_view3d/view3d_draw.c (revision 42161)
+++ source/blender/editors/space_view3d/view3d_draw.c (working copy)
@@ -1506,6 +1506,10 @@
(bgpic->view & (1<<rv3d->view)) || /* check agaist flags */
(rv3d->persp==RV3D_CAMOB && bgpic->view == (1<<RV3D_VIEW_CAMERA))
) {
+ /* disable individual images */
+ if((bgpic->flag&V3D_BGPIC_DISABLED))
+ continue;
+
freeibuf= NULL;
if(bgpic->source==V3D_BGPIC_IMAGE) {
ima= bgpic->ima;
File Metadata
Details
Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
2d/ce/05c4e396e82becd1b1a9754e5067
Event Timeline
Log In to Comment