[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28166] branches/render25/source/blender: dupligroup no_draw option was using layers but not restrict view/ render setting.

Campbell Barton ideasman42 at gmail.com
Tue Apr 13 18:24:24 CEST 2010


Revision: 28166
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28166
Author:   campbellbarton
Date:     2010-04-13 18:24:22 +0200 (Tue, 13 Apr 2010)

Log Message:
-----------
dupligroup no_draw option was using layers but not restrict view/render setting.
(not a bugfix exactly but would do display list context switching while drawing for no reason).

Modified Paths:
--------------
    branches/render25/source/blender/blenkernel/intern/anim.c
    branches/render25/source/blender/editors/space_view3d/drawobject.c
    branches/render25/source/blender/modifiers/SConscript

Modified: branches/render25/source/blender/blenkernel/intern/anim.c
===================================================================
--- branches/render25/source/blender/blenkernel/intern/anim.c	2010-04-13 16:19:04 UTC (rev 28165)
+++ branches/render25/source/blender/blenkernel/intern/anim.c	2010-04-13 16:24:22 UTC (rev 28166)
@@ -646,8 +646,18 @@
 			}
 			
 			dob= new_dupli_object(lb, go->ob, mat, ob->lay, 0, OB_DUPLIGROUP, animated);
-			dob->no_draw= (dob->origlay & group->layer)==0;
-			
+
+			/* check the group instance and object layers match, also that the object visible flags are ok. */
+			if(	(dob->origlay & group->layer)==0 ||
+				(G.rendering==0 && dob->ob->restrictflag & OB_RESTRICT_VIEW) ||
+				(G.rendering && dob->ob->restrictflag & OB_RESTRICT_RENDER)
+			) {
+				dob->no_draw= 1;
+			}
+			else {
+				dob->no_draw= 0;
+			}
+
 			if(go->ob->transflag & OB_DUPLI) {
 				copy_m4_m4(dob->ob->obmat, dob->mat);
 				object_duplilist_recursive((ID *)group, scene, go->ob, lb, ob->obmat, level+1, animated);

Modified: branches/render25/source/blender/editors/space_view3d/drawobject.c
===================================================================
--- branches/render25/source/blender/editors/space_view3d/drawobject.c	2010-04-13 16:19:04 UTC (rev 28165)
+++ branches/render25/source/blender/editors/space_view3d/drawobject.c	2010-04-13 16:24:22 UTC (rev 28166)
@@ -941,7 +941,7 @@
 			return la->dist;
 
 		case LA_AREA:
-			if(!la->mode & LA_MULTI_SHADE)
+			if((la->mode & LA_MULTI_SHADE) == 0)
 				return sqrtf(1.0f/cutoff);
 			
 			/* fall through */

Modified: branches/render25/source/blender/modifiers/SConscript
===================================================================
--- branches/render25/source/blender/modifiers/SConscript	2010-04-13 16:19:04 UTC (rev 28165)
+++ branches/render25/source/blender/modifiers/SConscript	2010-04-13 16:24:22 UTC (rev 28166)
@@ -10,8 +10,11 @@
 
 incs += ' ' + env['BF_ZLIB_INC']
 
-defs = ''
+defs = []
 
+if env['BF_NO_ELBEEM']:
+	defs.append('DISABLE_ELBEEM')
+
 env.BlenderLib ( libname = 'modifiers', sources = sources,
-                 includes = Split(incs), defines = Split(defs),
+                 includes = Split(incs), defines=defs,
                  libtype=['core','player'], priority = [180, 20] )
\ No newline at end of file





More information about the Bf-blender-cvs mailing list