[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56184] trunk/blender/source/blender: revert own change from 56177, game bounds can be useful to see in editmode ,

Campbell Barton ideasman42 at gmail.com
Sat Apr 20 19:24:40 CEST 2013


Revision: 56184
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56184
Author:   campbellbarton
Date:     2013-04-20 17:24:40 +0000 (Sat, 20 Apr 2013)
Log Message:
-----------
revert own change from 56177, game bounds can be useful to see in editmode,
also use gcc attributes for smallhash header and some style edits to recent commit.

Modified Paths:
--------------
    trunk/blender/source/blender/blenlib/BLI_smallhash.h
    trunk/blender/source/blender/editors/space_node/node_group.c
    trunk/blender/source/blender/editors/space_view3d/drawobject.c

Modified: trunk/blender/source/blender/blenlib/BLI_smallhash.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_smallhash.h	2013-04-20 16:50:05 UTC (rev 56183)
+++ trunk/blender/source/blender/blenlib/BLI_smallhash.h	2013-04-20 17:24:40 UTC (rev 56184)
@@ -59,15 +59,27 @@
 	int i;
 } SmallHashIter;
 
-void    BLI_smallhash_init(SmallHash *hash);
-void    BLI_smallhash_release(SmallHash *hash);
-void    BLI_smallhash_insert(SmallHash *hash, uintptr_t key, void *item);
-void    BLI_smallhash_remove(SmallHash *hash, uintptr_t key);
-void   *BLI_smallhash_lookup(SmallHash *hash, uintptr_t key);
-int     BLI_smallhash_haskey(SmallHash *hash, uintptr_t key);
-int     BLI_smallhash_count(SmallHash *hash);
-void   *BLI_smallhash_iternext(SmallHashIter *iter, uintptr_t *key);
-void   *BLI_smallhash_iternew(SmallHash *hash, SmallHashIter *iter, uintptr_t *key);
+#ifdef __GNUC__
+#  define ATTR_NONULL_FIRST  __attribute__((nonnull(1)))
+#  define ATTR_UNUSED_RESULT __attribute__((warn_unused_result))
+#else
+#  define ATTR_NONULL_FIRST
+#  define ATTR_UNUSED_RESULT
+#endif
+
+
+void    BLI_smallhash_init(SmallHash *hash)  ATTR_NONULL_FIRST;
+void    BLI_smallhash_release(SmallHash *hash)  ATTR_NONULL_FIRST;
+void    BLI_smallhash_insert(SmallHash *hash, uintptr_t key, void *item)  ATTR_NONULL_FIRST;
+void    BLI_smallhash_remove(SmallHash *hash, uintptr_t key)  ATTR_NONULL_FIRST;
+void   *BLI_smallhash_lookup(SmallHash *hash, uintptr_t key)  ATTR_NONULL_FIRST ATTR_UNUSED_RESULT;
+int     BLI_smallhash_haskey(SmallHash *hash, uintptr_t key)  ATTR_NONULL_FIRST;
+int     BLI_smallhash_count(SmallHash *hash)  ATTR_NONULL_FIRST;
+void   *BLI_smallhash_iternext(SmallHashIter *iter, uintptr_t *key)  ATTR_NONULL_FIRST ATTR_UNUSED_RESULT;
+void   *BLI_smallhash_iternew(SmallHash *hash, SmallHashIter *iter, uintptr_t *key)  ATTR_NONULL_FIRST ATTR_UNUSED_RESULT;
 /* void BLI_smallhash_print(SmallHash *hash); */ /* UNUSED */
 
+#undef ATTR_NONULL_FIRST
+#undef ATTR_UNUSED_RESULT
+
 #endif /* __BLI_SMALLHASH_H__ */

Modified: trunk/blender/source/blender/editors/space_node/node_group.c
===================================================================
--- trunk/blender/source/blender/editors/space_node/node_group.c	2013-04-20 16:50:05 UTC (rev 56183)
+++ trunk/blender/source/blender/editors/space_node/node_group.c	2013-04-20 17:24:40 UTC (rev 56184)
@@ -78,10 +78,12 @@
 		 * Disabled otherwise to allow pynodes define their own operators
 		 * with same keymap.
 		 */
-		if (STREQ(snode->tree_idname, "ShaderNodeTree")
-		    || STREQ(snode->tree_idname, "CompositorNodeTree")
-		    || STREQ(snode->tree_idname, "TextureNodeTree"))
+		if (STREQ(snode->tree_idname, "ShaderNodeTree") ||
+		    STREQ(snode->tree_idname, "CompositorNodeTree") ||
+		    STREQ(snode->tree_idname, "TextureNodeTree"))
+		{
 			return true;
+		}
 	}
 	return false;
 }

Modified: trunk/blender/source/blender/editors/space_view3d/drawobject.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/drawobject.c	2013-04-20 16:50:05 UTC (rev 56183)
+++ trunk/blender/source/blender/editors/space_view3d/drawobject.c	2013-04-20 17:24:40 UTC (rev 56184)
@@ -6975,8 +6975,7 @@
 	}
 
 	if ((dt <= OB_SOLID) &&
-	    ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) &&
-		(ob->mode == OB_MODE_OBJECT))
+	    ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0))
 	{
 		if (((ob->gameflag & OB_DYNAMIC) &&
 		     !ELEM(ob->collision_boundtype, OB_BOUND_TRIANGLE_MESH, OB_BOUND_CONVEX_HULL)) ||
@@ -6988,6 +6987,11 @@
 
 			invert_m4_m4(imat, rv3d->viewmatob);
 
+			if ((dflag & DRAW_CONSTCOLOR) == 0) {
+				/* prevent random colors being used */
+				glColor3ubv(ob_wire_col);
+			}
+
 			setlinestyle(2);
 			drawcircball(GL_LINE_LOOP, vec, ob->inertia, imat);
 			setlinestyle(0);




More information about the Bf-blender-cvs mailing list