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.
This commit is contained in:
Ton Roosendaal
2007-03-19 15:48:24 +00:00
parent 4aa556e9af
commit 6f3fb5525e
2 changed files with 21 additions and 2 deletions

View 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);
}

View 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);