Patch #3126
authorTon Roosendaal <ton@blender.org>
Mon, 19 Mar 2007 15:48:24 +0000 (15:48 +0000)
committerTon Roosendaal <ton@blender.org>
Mon, 19 Mar 2007 15:48:24 +0000 (15:48 +0000)
Option to draw object name in 3d window corner, now also displays for
meshes the (pinned) shape key name.

Threads: warning fix, added (void) for function declaration.

source/blender/blenlib/intern/threads.c
source/blender/src/drawview.c

index 5300d11feb6aa07493bc69971699094d92bd60d1..cb10185386adc36c7c1ea624bf49a86640fd9c07 100644 (file)
@@ -99,12 +99,12 @@ typedef struct ThreadSlot {
        int avail;
 } ThreadSlot;
 
-static void BLI_lock_malloc_thread()
+static void BLI_lock_malloc_thread(void)
 {
        pthread_mutex_lock(&_malloc_lock);
 }
 
-static void BLI_unlock_malloc_thread()
+static void BLI_unlock_malloc_thread(void)
 {
        pthread_mutex_unlock(&_malloc_lock);
 }
index 8970a4d9b7c85a33b66c71eea0856560108da4b5..5c4e0e827a9363bd7b7c68f247c8ef863d59d0ca 100644 (file)
@@ -65,6 +65,7 @@
 #include "DNA_curve_types.h"
 #include "DNA_group_types.h"
 #include "DNA_image_types.h"
+#include "DNA_key_types.h"
 #include "DNA_lattice_types.h"
 #include "DNA_mesh_types.h"
 #include "DNA_meshdata_types.h"
@@ -1342,6 +1343,24 @@ static void draw_selected_name(Object *ob)
                else
                        sprintf(info, "(%d) %s", CFRA, ob->id.name+2);
        }
+       if(ob->type==OB_MESH) {
+               Key *key= NULL;
+               KeyBlock *kb = NULL;
+               char shapes[75];
+               
+               shapes[0] = NULL;
+               key = ob_get_key(ob);
+               if(key){
+                       kb = BLI_findlink(&key->block, ob->shapenr-1);
+                       if(kb){
+                               sprintf(shapes, ": %s ", kb->name);             
+                               if(ob->shapeflag == OB_SHAPE_LOCK){
+                                       sprintf(shapes, "%s (Pinned)",shapes);
+                               }
+                       }
+               }
+               sprintf(info, "(%d) %s %s", CFRA, ob->id.name+2, shapes);
+       }
        else sprintf(info, "(%d) %s", CFRA, ob->id.name+2);
 
        BIF_ThemeColor(TH_TEXT_HI);