[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55746] trunk/blender: fix [#34825] Transparent background of Empty Images clips objects behind them away when Empty is not selected
Campbell Barton
ideasman42 at gmail.com
Wed Apr 3 07:16:15 CEST 2013
Revision: 55746
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55746
Author: campbellbarton
Date: 2013-04-03 05:16:15 +0000 (Wed, 03 Apr 2013)
Log Message:
-----------
fix [#34825] Transparent background of Empty Images clips objects behind them away when Empty is not selected
allow 'Transparency' option to be used on empty-images.
Modified Paths:
--------------
trunk/blender/release/scripts/startup/bl_ui/properties_object.py
trunk/blender/source/blender/editors/space_view3d/drawobject.c
Modified: trunk/blender/release/scripts/startup/bl_ui/properties_object.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_object.py 2013-04-03 05:02:33 UTC (rev 55745)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_object.py 2013-04-03 05:16:15 UTC (rev 55746)
@@ -204,36 +204,40 @@
def draw(self, context):
layout = self.layout
- ob = context.object
+ obj = context.object
split = layout.split()
col = split.column()
- col.prop(ob, "draw_type", text="Type")
+ col.prop(obj, "draw_type", text="Type")
col = split.column()
row = col.row()
- row.prop(ob, "show_bounds", text="Bounds")
+ row.prop(obj, "show_bounds", text="Bounds")
sub = row.row()
- sub.active = ob.show_bounds
- sub.prop(ob, "draw_bounds_type", text="")
+ sub.active = obj.show_bounds
+ sub.prop(obj, "draw_bounds_type", text="")
split = layout.split()
col = split.column()
- col.prop(ob, "show_name", text="Name")
- col.prop(ob, "show_axis", text="Axis")
- if ob.type in {'MESH', 'CURVE', 'SURFACE', 'META', 'FONT'}:
+ col.prop(obj, "show_name", text="Name")
+ col.prop(obj, "show_axis", text="Axis")
+
+ obj_type = obj.type
+
+ if obj_type in {'MESH', 'CURVE', 'SURFACE', 'META', 'FONT'}:
# Makes no sense for cameras, armtures, etc.!
- col.prop(ob, "show_wire", text="Wire")
+ col.prop(obj, "show_wire", text="Wire")
# Only useful with object having faces/materials...
- col.prop(ob, "color", text="Object Color")
+ col.prop(obj, "color", text="Object Color")
col = split.column()
- col.prop(ob, "show_texture_space", text="Texture Space")
- col.prop(ob, "show_x_ray", text="X-Ray")
- if ob.type == 'MESH':
- col.prop(ob, "show_transparent", text="Transparency")
- col.prop(ob, "show_all_edges")
+ col.prop(obj, "show_texture_space", text="Texture Space")
+ col.prop(obj, "show_x_ray", text="X-Ray")
+ if obj_type == 'MESH' or (obj_type == 'EMPTY' and obj.empty_draw_type == 'IMAGE'):
+ col.prop(obj, "show_transparent", text="Transparency")
+ if obj_type == 'MESH':
+ col.prop(obj, "show_all_edges")
class OBJECT_PT_duplication(ObjectButtonsPanel, Panel):
Modified: trunk/blender/source/blender/editors/space_view3d/drawobject.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/drawobject.c 2013-04-03 05:02:33 UTC (rev 55745)
+++ trunk/blender/source/blender/editors/space_view3d/drawobject.c 2013-04-03 05:16:15 UTC (rev 55746)
@@ -6363,6 +6363,14 @@
ED_view3d_after_add(&v3d->afterdraw_xray, base, dflag);
return;
}
+
+ /* allow transp option for empty images */
+ if (ob->type == OB_EMPTY && ob->empty_drawtype == OB_EMPTY_IMAGE) {
+ if (!v3d->xray && !v3d->transp && !(ob->dtx & OB_DRAWXRAY) && (ob->dtx & OB_DRAWTRANSP)) {
+ ED_view3d_after_add(&v3d->afterdraw_transp, base, dflag);
+ return;
+ }
+ }
}
}
More information about the Bf-blender-cvs
mailing list