Home

option to disable/enable individual background images
Closed, ArchivedPublic

Description
This patch was made to help a friend in his projects with Blender.
If more developers/users think this is good to have in trunk I wouldn't mind committing it. The patch is trunk ready [*].

*** user need:
"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. This is the show_backgroundimage.diff that is been used in production. For trunk, the non-inverted option may be better: show_backgroundimage_doversion.diff
cassola (Vagner Cassola) added a comment.Via Old WorldNov 26 2011, 11:37 PM
Dalai,

I think you need change the positon of buttons "remove" and "show", and deactive the box whem you unselect show:


Index: release/scripts/startup/bl_ui/space_view3d.py
===================================================================
--- release/scripts/startup/bl_ui/space_view3d.py (revision 42174)
+++ release/scripts/startup/bl_ui/space_view3d.py (working copy)
@@ -2300,8 +2300,12 @@
row.prop(bg.clip, "name", text="", emboss=False)
else:
row.label(text="Not Set")
+ row.prop(bg, "show_background_image")
row.operator("view3d.background_image_remove", text="", emboss=False, icon='X').index = i

+ if view.show_background_images:
+ box.active = bg.show_background_image
+
box.prop(bg, "view_axis", text="Axis")

if bg.show_expanded:
dfelinto (Dalai Felinto) added a comment.Via Old WorldNov 28 2011, 1:31 AM
Campbell suggested to use the eye icon and use the negative boolean instead of the doversion version.
cassola (Vagner Cassola) added a comment.Via Old WorldNov 28 2011, 5:05 AM
I made the change and makes more sense use eye icon instead check box, and also I changed embos to default value.


===================================================================
--- release/scripts/startup/bl_ui/space_view3d.py (revisão 42174)
+++ release/scripts/startup/bl_ui/space_view3d.py (working copy)
@@ -2300,8 +2300,18 @@
row.prop(bg.clip, "name", text="", emboss=False)
else:
row.label(text="Not Set")
- row.operator("view3d.background_image_remove", text="", emboss=False, icon='X').index = i
+
+ if bg.show_background_image:
+ row.prop(bg, "show_background_image", icon='RESTRICT_VIEW_OFF')
+ else:
+ row.prop(bg, "show_background_image", icon='RESTRICT_VIEW_ON')
+
+ row.operator("view3d.background_image_remove", text="", icon='X').index = i
+

+ if view.show_background_images:
+ box.active = bg.show_background_image
+
box.prop(bg, "view_axis", text="Axis")

if bg.show_expanded:
dfelinto (Dalai Felinto) added a comment.Via Old WorldNov 29 2011, 10:08 PM
committed on 42272.
I didn't include the disable ui code. I don't think it's really necessary, and ideally we would need a solution that deactivate everything but the activate button.
I don't think it's even possible. I will look at that with Thomas if it's necessary
dfelinto (Dalai Felinto) closed this task as "Archived".Via Old WorldNov 29 2011, 10:08 PM

Add Comment