Page Menu
Home
Search
Configure Global Search
Log In
Files
F19166
show_backgroundimage_doversion.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
4 KB
Subscribers
None
show_backgroundimage_doversion.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_ENABLED 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_sdna(prop, NULL, "flag", V3D_BGPIC_ENABLED);
+ 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_ENABLED)==0)
+ continue;
+
freeibuf= NULL;
if(bgpic->source==V3D_BGPIC_IMAGE) {
ima= bgpic->ima;
Index: source/blender/editors/space_view3d/view3d_edit.c
===================================================================
--- source/blender/editors/space_view3d/view3d_edit.c (revision 42161)
+++ source/blender/editors/space_view3d/view3d_edit.c (working copy)
@@ -3540,7 +3540,7 @@
bgpic->iuser.fie_ima= 2;
bgpic->iuser.ok= 1;
bgpic->view= 0; /* 0 for all */
- bgpic->flag |= V3D_BGPIC_EXPANDED;
+ bgpic->flag |= V3D_BGPIC_EXPANDED|V3D_BGPIC_ENABLED;
BLI_addtail(&v3d->bgpicbase, bgpic);
Index: source/blender/blenloader/intern/readfile.c
===================================================================
--- source/blender/blenloader/intern/readfile.c (revision 42161)
+++ source/blender/blenloader/intern/readfile.c (working copy)
@@ -12611,6 +12611,35 @@
do_versions_image_settings_2_60(sce);
}
}
+
+ {
+ /* view3d background: option to disable individual ones */
+ bScreen *sc;
+ for(sc= main->screen.first; sc; sc= sc->id.next) {
+ ScrArea *sa;
+ for(sa= sc->areabase.first; sa; sa= sa->next) {
+ SpaceLink *sl;
+ for (sl= sa->spacedata.first; sl; sl= sl->next) {
+ if(sl->spacetype==SPACE_VIEW3D) {
+ View3D *v3d= (View3D*) sl;
+ BGpic *bgpic = NULL;
+
+ v3d->camera= newlibadr(fd, sc->id.lib, v3d->camera);
+ v3d->ob_centre= newlibadr(fd, sc->id.lib, v3d->ob_centre);
+
+ if(v3d->bgpic) {
+ v3d->bgpic= newlibadr(fd, sc->id.lib, v3d->bgpic);
+ BLI_addtail(&v3d->bgpicbase, bgpic);
+ v3d->bgpic= NULL;
+ }
+
+ for(bgpic= v3d->bgpicbase.first; bgpic; bgpic= bgpic->next)
+ bgpic->flag|=V3D_BGPIC_ENABLED;
+ }
+ }
+ }
+ }
+ }
}
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
File Metadata
Details
Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
73/0b/c0aa6e88a3c45fcde3b7ac6ba78c
Event Timeline
Log In to Comment