[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39489] trunk/blender/source/blender/ editors/space_view3d/view3d_header.c: Fix #28194, #28269: proxy object was not showing pose mode as available in

Brecht Van Lommel brechtvanlommel at pandora.be
Wed Aug 17 14:09:02 CEST 2011


Revision: 39489
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39489
Author:   blendix
Date:     2011-08-17 12:09:02 +0000 (Wed, 17 Aug 2011)
Log Message:
-----------
Fix #28194, #28269: proxy object was not showing pose mode as available in
3d view header mode menu.

A recent bugfix was incorrectly hiding pose and particle mode when the object
data was library linked, but these modes edit object level settings so should
be available.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_view3d/view3d_header.c

Modified: trunk/blender/source/blender/editors/space_view3d/view3d_header.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/view3d_header.c	2011-08-17 11:17:18 UTC (rev 39488)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_header.c	2011-08-17 12:09:02 UTC (rev 39489)
@@ -281,31 +281,32 @@
 	str += sprintf(str, formatstr, "Object Mode", OB_MODE_OBJECT, ICON_OBJECT_DATA);
 	
 	if(ob==NULL || ob->data==NULL) return string;
-	if(ob->id.lib || ((ID *)ob->data)->lib) return string;
+	if(ob->id.lib) return string;
 	
-	/* if active object is editable */
-	if ( ((ob->type == OB_MESH)
-		|| (ob->type == OB_CURVE) || (ob->type == OB_SURF) || (ob->type == OB_FONT)
-		|| (ob->type == OB_MBALL) || (ob->type == OB_LATTICE))) {
-		
-		str += sprintf(str, formatstr, "Edit Mode", OB_MODE_EDIT, ICON_EDITMODE_HLT);
-	}
-	else if (ob->type == OB_ARMATURE) {
-		if (ob->mode & OB_MODE_POSE)
-			str += sprintf(str, formatstr, "Edit Mode", OB_MODE_EDIT|OB_MODE_POSE, ICON_EDITMODE_HLT);
-		else
+	if(!((ID *)ob->data)->lib) {
+		/* if active object is editable */
+		if ( ((ob->type == OB_MESH)
+			|| (ob->type == OB_CURVE) || (ob->type == OB_SURF) || (ob->type == OB_FONT)
+			|| (ob->type == OB_MBALL) || (ob->type == OB_LATTICE))) {
+			
 			str += sprintf(str, formatstr, "Edit Mode", OB_MODE_EDIT, ICON_EDITMODE_HLT);
-	}
+		}
+		else if (ob->type == OB_ARMATURE) {
+			if (ob->mode & OB_MODE_POSE)
+				str += sprintf(str, formatstr, "Edit Mode", OB_MODE_EDIT|OB_MODE_POSE, ICON_EDITMODE_HLT);
+			else
+				str += sprintf(str, formatstr, "Edit Mode", OB_MODE_EDIT, ICON_EDITMODE_HLT);
+		}
 
-	if (ob->type == OB_MESH) {
+		if (ob->type == OB_MESH) {
 
-		str += sprintf(str, formatstr, "Sculpt Mode", OB_MODE_SCULPT, ICON_SCULPTMODE_HLT);
-		str += sprintf(str, formatstr, "Vertex Paint", OB_MODE_VERTEX_PAINT, ICON_VPAINT_HLT);
-		str += sprintf(str, formatstr, "Texture Paint", OB_MODE_TEXTURE_PAINT, ICON_TPAINT_HLT);
-		str += sprintf(str, formatstr, "Weight Paint", OB_MODE_WEIGHT_PAINT, ICON_WPAINT_HLT);
+			str += sprintf(str, formatstr, "Sculpt Mode", OB_MODE_SCULPT, ICON_SCULPTMODE_HLT);
+			str += sprintf(str, formatstr, "Vertex Paint", OB_MODE_VERTEX_PAINT, ICON_VPAINT_HLT);
+			str += sprintf(str, formatstr, "Texture Paint", OB_MODE_TEXTURE_PAINT, ICON_TPAINT_HLT);
+			str += sprintf(str, formatstr, "Weight Paint", OB_MODE_WEIGHT_PAINT, ICON_WPAINT_HLT);
+		}
 	}
-
-	
+		
 	/* if active object is an armature */
 	if (ob->type==OB_ARMATURE) {
 		str += sprintf(str, formatstr, "Pose Mode", OB_MODE_POSE, ICON_POSE_HLT);




More information about the Bf-blender-cvs mailing list