use unsigned int for all layers.

This commit is contained in:
Campbell Barton 2010-10-19 01:21:22 +00:00
parent b743454ce1
commit 106867910e
8 changed files with 13 additions and 10 deletions

@ -64,8 +64,8 @@ typedef struct DagNode
void * ob; void * ob;
void * first_ancestor; void * first_ancestor;
int ancestor_count; int ancestor_count;
int lay; // accumulated layers of its relations + itself unsigned int lay; // accumulated layers of its relations + itself
int scelay; // layers due to being in scene unsigned int scelay; // layers due to being in scene
int lasttime; // if lasttime != DagForest->time, this node was not evaluated yet for flushing int lasttime; // if lasttime != DagForest->time, this node was not evaluated yet for flushing
int BFS_dist; // BFS distance int BFS_dist; // BFS distance
int DFS_dist; // DFS distance int DFS_dist; // DFS distance

@ -843,7 +843,8 @@ static void vertex_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, fl
GroupObject * go = NULL; GroupObject * go = NULL;
EditMesh *em; EditMesh *em;
float vec[3], no[3], pmat[4][4]; float vec[3], no[3], pmat[4][4];
int lay, totvert, a, oblay; int totvert, a, oblay;
unsigned int lay;
copy_m4_m4(pmat, par->obmat); copy_m4_m4(pmat, par->obmat);
@ -1153,8 +1154,9 @@ static void new_particle_duplilist(ListBase *lb, ID *UNUSED(id), Scene *scene, O
float ctime, pa_time, scale = 1.0f; float ctime, pa_time, scale = 1.0f;
float tmat[4][4], mat[4][4], pamat[4][4], vec[3], size=0.0; float tmat[4][4], mat[4][4], pamat[4][4], vec[3], size=0.0;
float (*obmat)[4], (*oldobmat)[4]; float (*obmat)[4], (*oldobmat)[4];
int lay, a, b, counter, hair = 0; int a, b, counter, hair = 0;
int totpart, totchild, totgroup=0, pa_num; int totpart, totchild, totgroup=0, pa_num;
unsigned int lay;
if(psys==0) return; if(psys==0) return;

@ -1476,7 +1476,7 @@ static void armature_set_id_extern(Object *ob)
{ {
bArmature *arm= ob->data; bArmature *arm= ob->data;
bPoseChannel *pchan; bPoseChannel *pchan;
int lay= arm->layer_protected; unsigned int lay= arm->layer_protected;
for (pchan = ob->pose->chanbase.first; pchan; pchan=pchan->next) { for (pchan = ob->pose->chanbase.first; pchan; pchan=pchan->next) {
if(!(pchan->bone->layer & lay)) if(!(pchan->bone->layer & lay))

@ -401,7 +401,7 @@ static int screen_render_exec(bContext *C, wmOperator *op)
Image *ima; Image *ima;
View3D *v3d= CTX_wm_view3d(C); View3D *v3d= CTX_wm_view3d(C);
Main *mainp= CTX_data_main(C); Main *mainp= CTX_data_main(C);
int lay= (v3d)? v3d->lay: scene->lay; unsigned int lay= (v3d)? v3d->lay: scene->lay;
if(re==NULL) { if(re==NULL) {
re= RE_NewRender(scene->id.name); re= RE_NewRender(scene->id.name);

@ -915,7 +915,7 @@ static int view3d_context(const bContext *C, const char *member, bContextDataRes
View3D *v3d= CTX_wm_view3d(C); View3D *v3d= CTX_wm_view3d(C);
Scene *scene= CTX_data_scene(C); Scene *scene= CTX_data_scene(C);
Base *base; Base *base;
int lay = v3d ? v3d->lay:scene->lay; /* fallback to the scene layer, allows duplicate and other oject operators to run outside the 3d view */ unsigned int lay = v3d ? v3d->lay:scene->lay; /* fallback to the scene layer, allows duplicate and other oject operators to run outside the 3d view */
if(CTX_data_dir(member)) { if(CTX_data_dir(member)) {
static const char *dir[] = { static const char *dir[] = {

@ -511,7 +511,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
} }
if(obedit==NULL && v3d->localvd==NULL) { if(obedit==NULL && v3d->localvd==NULL) {
int ob_lay = ob ? ob->lay : 0; unsigned int ob_lay = ob ? ob->lay : 0;
/* Layers */ /* Layers */
if (v3d->scenelock) if (v3d->scenelock)

@ -91,7 +91,7 @@ typedef struct bArmature {
int pad; int pad;
int layer, layer_protected; /* for buttons to work, both variables in this order together */ unsigned int layer, layer_protected; /* for buttons to work, both variables in this order together */
// XXX depreceated... old animaton system (armature only viz) --- // XXX depreceated... old animaton system (armature only viz) ---
short ghostep, ghostsize; /* number of frames to ghosts to show, and step between them */ short ghostep, ghostsize; /* number of frames to ghosts to show, and step between them */

@ -153,7 +153,8 @@ typedef struct View3D {
char ob_centre_bone[32]; /* optional string for armature bone to define center */ char ob_centre_bone[32]; /* optional string for armature bone to define center */
int lay, layact; unsigned int lay;
int layact;
/** /**
* The drawing mode for the 3d display. Set to OB_WIRE, OB_SOLID, * The drawing mode for the 3d display. Set to OB_WIRE, OB_SOLID,