While you are it.. in camera view all BG images take the full camera
space, that's fine exept when it isnt :p ie: for multiple references
in camera view. Maybe this can be an optional full view togle?

Daniel Salazar
3Developer.com



On Tue, Nov 29, 2011 at 3:05 PM, Dalai Felinto <[email protected]> wrote:
> Revision: 42272
>          
> http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42272
> Author:   dfelinto
> Date:     2011-11-29 21:05:18 +0000 (Tue, 29 Nov 2011)
> Log Message:
> -----------
> option to disable/enable individual background images
>
> *** use-case:
> "I have 10 reference images that overlap each other and every time I want to 
> see one, I need to change the transparency of all the others.
> therefore it would be nice to have a little button by each menu to allow 
> enable/disabling individual background images"
>
> To avoid subversioning bump I created a define that is negative (DISABLED) 
> and of course a rna that is a boolean_negative.
> Talked with Campbell and he actually prefers this way over do_version, so 
> there it goes.
>
> Modified Paths:
> --------------
>    trunk/blender/release/scripts/startup/bl_ui/space_view3d.py
>    trunk/blender/source/blender/editors/space_view3d/view3d_draw.c
>    trunk/blender/source/blender/makesdna/DNA_view3d_types.h
>    trunk/blender/source/blender/makesrna/intern/rna_space.c
>
> Modified: trunk/blender/release/scripts/startup/bl_ui/space_view3d.py
> ===================================================================
> --- trunk/blender/release/scripts/startup/bl_ui/space_view3d.py 2011-11-29 
> 20:36:34 UTC (rev 42271)
> +++ trunk/blender/release/scripts/startup/bl_ui/space_view3d.py 2011-11-29 
> 21:05:18 UTC (rev 42272)
> @@ -2300,6 +2300,12 @@
>                 row.prop(bg.clip, "name", text="", emboss=False)
>             else:
>                 row.label(text="Not Set")
> +
> +            if bg.show_background_image:
> +                row.prop(bg, "show_background_image", text="", emboss=False, 
> icon='RESTRICT_VIEW_OFF')
> +            else:
> +                row.prop(bg, "show_background_image", text="", emboss=False, 
> icon='RESTRICT_VIEW_ON')
> +
>             row.operator("view3d.background_image_remove", text="", 
> emboss=False, icon='X').index = i
>
>             box.prop(bg, "view_axis", text="Axis")
>
> Modified: trunk/blender/source/blender/editors/space_view3d/view3d_draw.c
> ===================================================================
> --- trunk/blender/source/blender/editors/space_view3d/view3d_draw.c     
> 2011-11-29 20:36:34 UTC (rev 42271)
> +++ trunk/blender/source/blender/editors/space_view3d/view3d_draw.c     
> 2011-11-29 21:05:18 UTC (rev 42272)
> @@ -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;
>
> Modified: trunk/blender/source/blender/makesdna/DNA_view3d_types.h
> ===================================================================
> --- trunk/blender/source/blender/makesdna/DNA_view3d_types.h    2011-11-29 
> 20:36:34 UTC (rev 42271)
> +++ trunk/blender/source/blender/makesdna/DNA_view3d_types.h    2011-11-29 
> 21:05:18 UTC (rev 42272)
> @@ -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 ?*/
>
> Modified: trunk/blender/source/blender/makesrna/intern/rna_space.c
> ===================================================================
> --- trunk/blender/source/blender/makesrna/intern/rna_space.c    2011-11-29 
> 20:36:34 UTC (rev 42271)
> +++ trunk/blender/source/blender/makesrna/intern/rna_space.c    2011-11-29 
> 21:05:18 UTC (rev 42272)
> @@ -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 Background Image", "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)
>
> _______________________________________________
> Bf-blender-cvs mailing list
> [email protected]
> http://lists.blender.org/mailman/listinfo/bf-blender-cvs
>
_______________________________________________
Bf-committers mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-committers

Reply via email to