style cleanup

This commit is contained in:
2012-05-27 19:40:36 +00:00
parent 295aa880e9
commit b33f0ef0e3
55 changed files with 177 additions and 168 deletions

View File

@@ -656,7 +656,8 @@ typedef struct {
int size[2]; int size[2];
} ExtraWindow; } ExtraWindow;
static void extrawindow_do_draw(ExtraWindow *ew) { static void extrawindow_do_draw(ExtraWindow *ew)
{
GHOST_ActivateWindowDrawingContext(ew->win); GHOST_ActivateWindowDrawingContext(ew->win);
glClearColor(1, 1, 1, 1); glClearColor(1, 1, 1, 1);
@@ -668,7 +669,8 @@ static void extrawindow_do_draw(ExtraWindow *ew) {
GHOST_SwapWindowBuffers(ew->win); GHOST_SwapWindowBuffers(ew->win);
} }
static void extrawindow_do_reshape(ExtraWindow *ew) { static void extrawindow_do_reshape(ExtraWindow *ew)
{
GHOST_RectangleHandle bounds = GHOST_GetClientBounds(ew->win); GHOST_RectangleHandle bounds = GHOST_GetClientBounds(ew->win);
GHOST_ActivateWindowDrawingContext(ew->win); GHOST_ActivateWindowDrawingContext(ew->win);
@@ -687,7 +689,8 @@ static void extrawindow_do_reshape(ExtraWindow *ew) {
glLoadIdentity(); glLoadIdentity();
} }
static void extrawindow_do_key(ExtraWindow *ew, GHOST_TKey key, int press) { static void extrawindow_do_key(ExtraWindow *ew, GHOST_TKey key, int press)
{
switch (key) { switch (key) {
case GHOST_kKeyE: case GHOST_kKeyE:
if (press) if (press)
@@ -696,7 +699,8 @@ static void extrawindow_do_key(ExtraWindow *ew, GHOST_TKey key, int press) {
} }
} }
static void extrawindow_spin_cursor(ExtraWindow *ew, GHOST_TUns64 time) { static void extrawindow_spin_cursor(ExtraWindow *ew, GHOST_TUns64 time)
{
GHOST_TUns8 bitmap[16][2]; GHOST_TUns8 bitmap[16][2];
GHOST_TUns8 mask[16][2]; GHOST_TUns8 mask[16][2];
double ftime = (double) ((GHOST_TInt64) time) / 1000; double ftime = (double) ((GHOST_TInt64) time) / 1000;
@@ -728,7 +732,8 @@ static void extrawindow_spin_cursor(ExtraWindow *ew, GHOST_TUns64 time) {
GHOST_SetCustomCursorShape(ew->win, bitmap, mask, 0, 0); GHOST_SetCustomCursorShape(ew->win, bitmap, mask, 0, 0);
} }
static void extrawindow_handle(void *priv, GHOST_EventHandle evt) { static void extrawindow_handle(void *priv, GHOST_EventHandle evt)
{
ExtraWindow *ew = priv; ExtraWindow *ew = priv;
GHOST_TEventType type = GHOST_GetEventType(evt); GHOST_TEventType type = GHOST_GetEventType(evt);
char buf[256]; char buf[256];
@@ -785,7 +790,8 @@ ExtraWindow *extrawindow_new(MultiTestApp *app) {
} }
} }
void extrawindow_free(ExtraWindow *ew) { void extrawindow_free(ExtraWindow *ew)
{
GHOST_SystemHandle sys = multitestapp_get_system(ew->app); GHOST_SystemHandle sys = multitestapp_get_system(ew->app);
windowdata_free(GHOST_GetWindowUserData(ew->win)); windowdata_free(GHOST_GetWindowUserData(ew->win));
@@ -806,7 +812,8 @@ struct _MultiTestApp {
int exit; int exit;
}; };
static int multitest_event_handler(GHOST_EventHandle evt, GHOST_TUserDataPtr data) { static int multitest_event_handler(GHOST_EventHandle evt, GHOST_TUserDataPtr data)
{
MultiTestApp *app = data; MultiTestApp *app = data;
GHOST_WindowHandle win; GHOST_WindowHandle win;
@@ -876,12 +883,14 @@ GHOST_SystemHandle multitestapp_get_system(MultiTestApp *app) {
return app->sys; return app->sys;
} }
void multitestapp_free_extrawindow(MultiTestApp *app) { void multitestapp_free_extrawindow(MultiTestApp *app)
{
extrawindow_free(app->extra); extrawindow_free(app->extra);
app->extra = NULL; app->extra = NULL;
} }
void multitestapp_toggle_extra_window(MultiTestApp *app) { void multitestapp_toggle_extra_window(MultiTestApp *app)
{
if (app->extra) { if (app->extra) {
multitestapp_free_extrawindow(app); multitestapp_free_extrawindow(app);
} }

View File

@@ -176,8 +176,8 @@ void plugin_seq_doit(Cast *cast, float facf0, float facf1, int width,
o[l]=CLAMP(i[l],0.f,1.f); o[l]=CLAMP(i[l],0.f,1.f);
o[3]=1.0; o[3]=1.0;
} }
i+=4; i += 4;
o+=4; o += 4;
} }
} }
} }

View File

@@ -154,7 +154,7 @@ int BLF_load(const char *name)
/* check if we already load this font. */ /* check if we already load this font. */
i = blf_search(name); i = blf_search(name);
if (i >= 0) { if (i >= 0) {
/*font= global_font[i];*/ /*UNUSED*/ /*font = global_font[i];*/ /*UNUSED*/
return i; return i;
} }
@@ -237,7 +237,7 @@ int BLF_load_mem(const char *name, unsigned char *mem, int mem_size)
i = blf_search(name); i = blf_search(name);
if (i >= 0) { if (i >= 0) {
/*font= global_font[i];*/ /*UNUSED*/ /*font = global_font[i];*/ /*UNUSED*/
return i; return i;
} }

View File

@@ -1577,7 +1577,7 @@ static NlaEvalChannel *nlaevalchan_verify(PointerRNA *ptr, ListBase *channels, N
PropertyRNA *prop; PropertyRNA *prop;
PointerRNA new_ptr; PointerRNA new_ptr;
char *path = NULL; char *path = NULL;
/* short free_path=0; */ /* short free_path = 0; */
/* sanity checks */ /* sanity checks */
if (channels == NULL) if (channels == NULL)
@@ -1585,7 +1585,7 @@ static NlaEvalChannel *nlaevalchan_verify(PointerRNA *ptr, ListBase *channels, N
/* get RNA pointer+property info from F-Curve for more convenient handling */ /* get RNA pointer+property info from F-Curve for more convenient handling */
/* get path, remapped as appropriate to work in its new environment */ /* get path, remapped as appropriate to work in its new environment */
/* free_path= */ /* UNUSED */ animsys_remap_path(strip->remap, fcu->rna_path, &path); /* free_path = */ /* UNUSED */ animsys_remap_path(strip->remap, fcu->rna_path, &path);
/* a valid property must be available, and it must be animatable */ /* a valid property must be available, and it must be animatable */
if (RNA_path_resolve(ptr, path, &new_ptr, &prop) == 0) { if (RNA_path_resolve(ptr, path, &new_ptr, &prop) == 0) {

View File

@@ -518,7 +518,7 @@ void BKE_write_undo(bContext *C, const char *name)
if ( (U.uiflag & USER_GLOBALUNDO) == 0) return; if ( (U.uiflag & USER_GLOBALUNDO) == 0) return;
if (U.undosteps == 0) return; if (U.undosteps == 0) return;
/* remove all undos after (also when curundo==NULL) */ /* remove all undos after (also when curundo == NULL) */
while (undobase.last != curundo) { while (undobase.last != curundo) {
uel = undobase.last; uel = undobase.last;
BLI_remlink(&undobase, uel); BLI_remlink(&undobase, uel);
@@ -564,7 +564,7 @@ void BKE_write_undo(bContext *C, const char *name)
BLI_snprintf(numstr, sizeof(numstr), "%d.blend", counter); BLI_snprintf(numstr, sizeof(numstr), "%d.blend", counter);
BLI_make_file_string("/", filepath, BLI_temporary_dir(), numstr); BLI_make_file_string("/", filepath, BLI_temporary_dir(), numstr);
/* success= */ /* UNUSED */ BLO_write_file(CTX_data_main(C), filepath, fileflags, NULL, NULL); /* success = */ /* UNUSED */ BLO_write_file(CTX_data_main(C), filepath, fileflags, NULL, NULL);
BLI_strncpy(curundo->str, filepath, sizeof(curundo->str)); BLI_strncpy(curundo->str, filepath, sizeof(curundo->str));
} }
@@ -574,7 +574,7 @@ void BKE_write_undo(bContext *C, const char *name)
if (curundo->prev) prevfile = &(curundo->prev->memfile); if (curundo->prev) prevfile = &(curundo->prev->memfile);
memused = MEM_get_memory_in_use(); memused = MEM_get_memory_in_use();
/* success= */ /* UNUSED */ BLO_write_file_mem(CTX_data_main(C), prevfile, &curundo->memfile, G.fileflags); /* success = */ /* UNUSED */ BLO_write_file_mem(CTX_data_main(C), prevfile, &curundo->memfile, G.fileflags);
curundo->undosize = MEM_get_memory_in_use() - memused; curundo->undosize = MEM_get_memory_in_use() - memused;
} }

View File

@@ -45,7 +45,7 @@ BulletSoftBody *bsbNew(void)
{ {
BulletSoftBody *bsb; BulletSoftBody *bsb;
bsb= MEM_callocN(sizeof(BulletSoftBody), "bulletsoftbody"); bsb = MEM_callocN(sizeof(BulletSoftBody), "bulletsoftbody");
bsb->flag = OB_BSB_BENDING_CONSTRAINTS | OB_BSB_SHAPE_MATCHING | OB_BSB_AERO_VPOINT; bsb->flag = OB_BSB_BENDING_CONSTRAINTS | OB_BSB_SHAPE_MATCHING | OB_BSB_AERO_VPOINT;
bsb->linStiff = 0.5f; bsb->linStiff = 0.5f;

View File

@@ -927,7 +927,7 @@ static void cdDM_drawMappedFaces(DerivedMesh *dm,
//int actualFace = dm->drawObject->triangle_to_mface[i]; //int actualFace = dm->drawObject->triangle_to_mface[i];
int actualFace = next_actualFace; int actualFace = next_actualFace;
MFace *mface = mf + actualFace; MFace *mface = mf + actualFace;
/*int drawSmooth= (flag & DM_DRAW_ALWAYS_SMOOTH) ? 1 : (mface->flag & ME_SMOOTH);*/ /* UNUSED */ /*int drawSmooth = (flag & DM_DRAW_ALWAYS_SMOOTH) ? 1 : (mface->flag & ME_SMOOTH);*/ /* UNUSED */
DMDrawOption draw_option = DM_DRAW_OPTION_NORMAL; DMDrawOption draw_option = DM_DRAW_OPTION_NORMAL;
int flush = 0; int flush = 0;
@@ -1208,7 +1208,7 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm,
else { else {
/* if the buffer was set, don't use it again. /* if the buffer was set, don't use it again.
* prevdraw was assumed true but didnt run so set to false - [#21036] */ * prevdraw was assumed true but didnt run so set to false - [#21036] */
/* prevdraw= 0; */ /* UNUSED */ /* prevdraw = 0; */ /* UNUSED */
buffer = NULL; buffer = NULL;
} }
} }

View File

@@ -267,7 +267,7 @@ static int ctx_data_get(bContext *C, const char *member, bContextDataResult *res
* loops requesting data from ourselfs in a context callback */ * loops requesting data from ourselfs in a context callback */
/* Ok, this looks evil... /* Ok, this looks evil...
* if (ret) done= -(-ret | -done); * if (ret) done = -(-ret | -done);
* *
* Values in order of importance * Values in order of importance
* (0, -1, 1) - Where 1 is highest priority * (0, -1, 1) - Where 1 is highest priority

View File

@@ -2938,7 +2938,7 @@ void DAG_pose_sort(Object *ob)
queue_delete(nqueue); queue_delete(nqueue);
// printf("\nordered\n"); // printf("\nordered\n");
// for (pchan = pose->chanbase.first; pchan; pchan= pchan->next) { // for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) {
// printf(" %s\n", pchan->name); // printf(" %s\n", pchan->name);
// } // }

View File

@@ -594,7 +594,7 @@ static void emDM_drawMappedFaces(DerivedMesh *dm,
float (*vertexCos)[3] = bmdm->vertexCos; float (*vertexCos)[3] = bmdm->vertexCos;
float (*vertexNos)[3] = bmdm->vertexNos; float (*vertexNos)[3] = bmdm->vertexNos;
float (*polyNos)[3] = bmdm->polyNos; float (*polyNos)[3] = bmdm->polyNos;
// int *triPolyMap= bmdm->triPolyMap; // int *triPolyMap = bmdm->triPolyMap;
BM_mesh_elem_index_ensure(bmdm->tc->bm, BM_VERT | BM_FACE); BM_mesh_elem_index_ensure(bmdm->tc->bm, BM_VERT | BM_FACE);
@@ -802,7 +802,7 @@ static void emDM_drawFacesTex_common(DerivedMesh *dm,
BMLoop **ls = em->looptris[i]; BMLoop **ls = em->looptris[i];
MTexPoly *tp = has_uv ? CustomData_bmesh_get(&bm->pdata, ls[0]->f->head.data, CD_MTEXPOLY) : NULL; MTexPoly *tp = has_uv ? CustomData_bmesh_get(&bm->pdata, ls[0]->f->head.data, CD_MTEXPOLY) : NULL;
MTFace mtf = {{{0}}}; MTFace mtf = {{{0}}};
/*unsigned char *cp= NULL;*/ /*UNUSED*/ /*unsigned char *cp = NULL;*/ /*UNUSED*/
int drawSmooth = BM_elem_flag_test(ls[0]->f, BM_ELEM_SMOOTH); int drawSmooth = BM_elem_flag_test(ls[0]->f, BM_ELEM_SMOOTH);
DMDrawOption draw_option; DMDrawOption draw_option;
@@ -874,7 +874,7 @@ static void emDM_drawFacesTex_common(DerivedMesh *dm,
BMLoop **ls = em->looptris[i]; BMLoop **ls = em->looptris[i];
MTexPoly *tp = has_uv ? CustomData_bmesh_get(&bm->pdata, ls[0]->f->head.data, CD_MTEXPOLY) : NULL; MTexPoly *tp = has_uv ? CustomData_bmesh_get(&bm->pdata, ls[0]->f->head.data, CD_MTEXPOLY) : NULL;
MTFace mtf = {{{0}}}; MTFace mtf = {{{0}}};
/*unsigned char *cp= NULL;*/ /*UNUSED*/ /*unsigned char *cp = NULL;*/ /*UNUSED*/
int drawSmooth = BM_elem_flag_test(ls[0]->f, BM_ELEM_SMOOTH); int drawSmooth = BM_elem_flag_test(ls[0]->f, BM_ELEM_SMOOTH);
DMDrawOption draw_option; DMDrawOption draw_option;

View File

@@ -613,7 +613,7 @@ static float fcm_cycles_time(FCurve *fcu, FModifier *fcm, float UNUSED(cvalue),
/* check that cyclic is still enabled for the specified time */ /* check that cyclic is still enabled for the specified time */
if (cycles == 0) { if (cycles == 0) {
/* catch this case so that we don't exit when we have cycles=0 /* catch this case so that we don't exit when we have (cycles = 0)
* as this indicates infinite cycles... * as this indicates infinite cycles...
*/ */
} }
@@ -810,7 +810,7 @@ static void fcm_python_copy(FModifier *fcm, FModifier *src)
static void fcm_python_evaluate(FCurve *UNUSED(fcu), FModifier *UNUSED(fcm), float *UNUSED(cvalue), float UNUSED(evaltime)) static void fcm_python_evaluate(FCurve *UNUSED(fcu), FModifier *UNUSED(fcm), float *UNUSED(cvalue), float UNUSED(evaltime))
{ {
#ifdef WITH_PYTHON #ifdef WITH_PYTHON
//FMod_Python *data= (FMod_Python *)fcm->data; //FMod_Python *data = (FMod_Python *)fcm->data;
/* FIXME... need to implement this modifier... /* FIXME... need to implement this modifier...
* It will need it execute a script using the custom properties * It will need it execute a script using the custom properties

View File

@@ -196,7 +196,7 @@ int add_to_group(Group *group, Object *object, Scene *scene, Base *base)
} }
} }
/* also used for ob==NULL */ /* also used for (ob == NULL) */
static int rem_from_group_internal(Group *group, Object *ob) static int rem_from_group_internal(Group *group, Object *ob)
{ {
GroupObject *go, *gon; GroupObject *go, *gon;

View File

@@ -290,7 +290,7 @@ static void image_assign_ibuf(Image *ima, ImBuf *ibuf, int index, int frame)
else else
ibuf->flags &= ~IB_cm_predivide; ibuf->flags &= ~IB_cm_predivide;
/* this function accepts link==NULL */ /* this function accepts (link == NULL) */
BLI_insertlinkbefore(&ima->ibufs, link, ibuf); BLI_insertlinkbefore(&ima->ibufs, link, ibuf);
/* now we don't want copies? */ /* now we don't want copies? */
@@ -802,7 +802,7 @@ void BKE_image_free_all_textures(void)
{ {
Tex *tex; Tex *tex;
Image *ima; Image *ima;
/* unsigned int totsize= 0; */ /* unsigned int totsize = 0; */
for (ima = G.main->image.first; ima; ima = ima->id.next) for (ima = G.main->image.first; ima; ima = ima->id.next)
ima->id.flag &= ~LIB_DOIT; ima->id.flag &= ~LIB_DOIT;

View File

@@ -305,7 +305,7 @@ void init_latt_deform(Object *oblatt, Object *ob)
fp = lt->latticedata = MEM_mallocN(sizeof(float) * 3 * lt->pntsu * lt->pntsv * lt->pntsw, "latticedata"); fp = lt->latticedata = MEM_mallocN(sizeof(float) * 3 * lt->pntsu * lt->pntsv * lt->pntsw, "latticedata");
/* for example with a particle system: ob==0 */ /* for example with a particle system: (ob == NULL) */
if (ob == NULL) { if (ob == NULL) {
/* in deformspace, calc matrix */ /* in deformspace, calc matrix */
invert_m4_m4(lt->latmat, oblatt->obmat); invert_m4_m4(lt->latmat, oblatt->obmat);

View File

@@ -645,7 +645,7 @@ static ID *alloc_libblock_notest(short type)
id = MEM_callocN(sizeof(Text), "text"); id = MEM_callocN(sizeof(Text), "text");
break; break;
case ID_SCRIPT: case ID_SCRIPT:
//XXX id= MEM_callocN(sizeof(Script), "script"); //XXX id = MEM_callocN(sizeof(Script), "script");
break; break;
case ID_SPK: case ID_SPK:
id = MEM_callocN(sizeof(Speaker), "speaker"); id = MEM_callocN(sizeof(Speaker), "speaker");
@@ -1032,7 +1032,7 @@ static void IDnames_to_dyn_pupstring(DynStr *pupds, ListBase *lb, ID *link, shor
/* used by headerbuttons.c buttons.c editobject.c editseq.c */ /* used by headerbuttons.c buttons.c editobject.c editseq.c */
/* if nr==NULL no MAX_IDPUP, this for non-header browsing */ /* if (nr == NULL) no MAX_IDPUP, this for non-header browsing */
void IDnames_to_pupstring(const char **str, const char *title, const char *extraops, ListBase *lb, ID *link, short *nr) void IDnames_to_pupstring(const char **str, const char *title, const char *extraops, ListBase *lb, ID *link, short *nr)
{ {
DynStr *pupds = BLI_dynstr_new(); DynStr *pupds = BLI_dynstr_new();

View File

@@ -607,7 +607,7 @@ Material *give_current_material(Object *ob, short act)
if (ob == NULL) return NULL; if (ob == NULL) return NULL;
/* if object cannot have material, totcolp==NULL */ /* if object cannot have material, (totcolp == NULL) */
totcolp = give_totcolp(ob); totcolp = give_totcolp(ob);
if (totcolp == NULL || ob->totcol == 0) return NULL; if (totcolp == NULL || ob->totcol == 0) return NULL;
@@ -1179,7 +1179,7 @@ int object_remove_material_slot(Object *ob)
} }
/* r_col = current value, col = new value, fac==0 is no change */ /* r_col = current value, col = new value, (fac == 0) is no change */
void ramp_blend(int type, float r_col[3], const float fac, const float col[3]) void ramp_blend(int type, float r_col[3], const float fac, const float col[3])
{ {
float tmp, facm = 1.0f - fac; float tmp, facm = 1.0f - fac;

View File

@@ -816,7 +816,7 @@ static int totindex, curindex;
static void accum_mballfaces(int i1, int i2, int i3, int i4) static void accum_mballfaces(int i1, int i2, int i3, int i4)
{ {
int *newi, *cur; int *newi, *cur;
/* static int i=0; I would like to delete altogether, but I don't dare to, yet */ /* static int i = 0; I would like to delete altogether, but I don't dare to, yet */
if (totindex == curindex) { if (totindex == curindex) {
totindex += 256; totindex += 256;
@@ -1701,7 +1701,7 @@ static float init_meta(Scene *scene, Object *ob) /* return totsize */
MetaBall *mb; MetaBall *mb;
MetaElem *ml; MetaElem *ml;
float size, totsize, obinv[4][4], obmat[4][4], vec[3]; float size, totsize, obinv[4][4], obmat[4][4], vec[3];
//float max=0.0; //float max = 0.0f;
int a, obnr, zero_size = 0; int a, obnr, zero_size = 0;
char obname[MAX_ID_NAME]; char obname[MAX_ID_NAME];

View File

@@ -1823,7 +1823,7 @@ void BKE_mesh_calc_normals_mapping_ex(MVert *mverts, int numVerts,
} }
if (origIndexFace && if (origIndexFace &&
/* fnors==faceNors_r */ /* NO NEED TO ALLOC YET */ /* fnors == faceNors_r */ /* NO NEED TO ALLOC YET */
fnors != NULL && fnors != NULL &&
numFaces) numFaces)
{ {
@@ -2004,7 +2004,7 @@ static void bm_corners_to_loops(Mesh *me, int findex, int loopstart, int numTex,
if (corners == 0) { if (corners == 0) {
/* Empty MDisp layers appear in at least one of the sintel.blend files. /* Empty MDisp layers appear in at least one of the sintel.blend files.
* Not sure why this happens, but it seems fine to just ignore them here. * Not sure why this happens, but it seems fine to just ignore them here.
* If corners==0 for a non-empty layer though, something went wrong. */ * If (corners == 0) for a non-empty layer though, something went wrong. */
BLI_assert(fd->totdisp == 0); BLI_assert(fd->totdisp == 0);
} }
else { else {

View File

@@ -685,7 +685,7 @@ static void multires_del_higher(MultiresModifierData *mmd, Object *ob, int lvl)
multires_set_tot_level(ob, mmd, lvl); multires_set_tot_level(ob, mmd, lvl);
} }
/* direction=1 for delete higher, direction=0 for lower (not implemented yet) */ /* (direction = 1) for delete higher, (direction = 0) for lower (not implemented yet) */
void multiresModifier_del_levels(MultiresModifierData *mmd, Object *ob, int direction) void multiresModifier_del_levels(MultiresModifierData *mmd, Object *ob, int direction)
{ {
Mesh *me = BKE_mesh_from_object(ob); Mesh *me = BKE_mesh_from_object(ob);

View File

@@ -2411,7 +2411,7 @@ static void get_strand_normal(Material *ma, const float surfnor[3], float surfdi
static int psys_threads_init_path(ParticleThread *threads, Scene *scene, float cfra, int editupdate) static int psys_threads_init_path(ParticleThread *threads, Scene *scene, float cfra, int editupdate)
{ {
ParticleThreadContext *ctx = threads[0].ctx; ParticleThreadContext *ctx = threads[0].ctx;
/* Object *ob= ctx->sim.ob; */ /* Object *ob = ctx->sim.ob; */
ParticleSystem *psys = ctx->sim.psys; ParticleSystem *psys = ctx->sim.psys;
ParticleSettings *part = psys->part; ParticleSettings *part = psys->part;
/* ParticleEditSettings *pset = &scene->toolsettings->particle; */ /* ParticleEditSettings *pset = &scene->toolsettings->particle; */

View File

@@ -604,7 +604,7 @@ void BKE_scene_set_background(Main *bmain, Scene *scene)
base->flag |= flag; base->flag |= flag;
/* not too nice... for recovering objects with lost data */ /* not too nice... for recovering objects with lost data */
//if (ob->pose==NULL) base->flag &= ~OB_POSEMODE; //if (ob->pose == NULL) base->flag &= ~OB_POSEMODE;
ob->flag = base->flag; ob->flag = base->flag;
ob->ctime = -1234567.0; /* force ipo to be calculated later */ ob->ctime = -1234567.0; /* force ipo to be calculated later */

View File

@@ -143,7 +143,7 @@ static void open_plugin_seq(PluginSeq *pis, const char *seqname)
BLI_dynlib_get_error_as_string(NULL); BLI_dynlib_get_error_as_string(NULL);
/* if (pis->handle) BLI_dynlib_close(pis->handle); */ /* if (pis->handle) BLI_dynlib_close(pis->handle); */
/* pis->handle= 0; */ /* pis->handle = 0; */
/* open the needed object */ /* open the needed object */
pis->handle = BLI_dynlib_open(pis->name); pis->handle = BLI_dynlib_open(pis->name);
@@ -1480,8 +1480,8 @@ static void do_mul_effect_byte(float facf0, float facf1, int x, int y,
fac3 = (int)(256.0f * facf1); fac3 = (int)(256.0f * facf1);
/* formula: /* formula:
* fac*(a*b) + (1-fac)*a => fac*a*(b-1)+axaux= c*px + py*s ;//+centx * fac * (a * b) + (1-fac)*a => fac * a * (b - 1) + axaux = c * px + py * s; //+centx
* yaux= -s*px + c*py;//+centy * yaux = -s * px + c * py; //+centy
*/ */
while (y--) { while (y--) {
@@ -2339,7 +2339,7 @@ static void RVBlurBitmap2_byte(unsigned char *map, int width, int height,
/* Swap buffers */ /* Swap buffers */
swap = temp; temp = map; /* map=swap; */ /* UNUSED */ swap = temp; temp = map; /* map = swap; */ /* UNUSED */
/* Tidy up */ /* Tidy up */
MEM_freeN(filter); MEM_freeN(filter);
@@ -2509,7 +2509,7 @@ static void RVBlurBitmap2_float(float *map, int width, int height,
/* Swap buffers */ /* Swap buffers */
swap = temp; temp = map; /* map=swap; */ /* UNUSED */ swap = temp; temp = map; /* map = swap; */ /* UNUSED */
/* Tidy up */ /* Tidy up */
MEM_freeN(filter); MEM_freeN(filter);

View File

@@ -612,8 +612,8 @@ void calc_sequence(Scene *scene, Sequence *seq)
/* we take the largest start and smallest end */ /* we take the largest start and smallest end */
// seq->start= seq->startdisp= MAX2(seq->seq1->startdisp, seq->seq2->startdisp); // seq->start = seq->startdisp = MAX2(seq->seq1->startdisp, seq->seq2->startdisp);
// seq->enddisp= MIN2(seq->seq1->enddisp, seq->seq2->enddisp); // seq->enddisp = MIN2(seq->seq1->enddisp, seq->seq2->enddisp);
if (seq->seq1) { if (seq->seq1) {
/* XXX These resets should not be necessary, but users used to be able to /* XXX These resets should not be necessary, but users used to be able to

View File

@@ -125,7 +125,7 @@ static CCGSubSurf *_getSubSurf(CCGSubSurf *prevSS, int subdivLevels,
int useArena = flags & CCG_USE_ARENA; int useArena = flags & CCG_USE_ARENA;
int normalOffset = 0; int normalOffset = 0;
/* subdivLevels==0 is not allowed */ /* (subdivLevels == 0) is not allowed */
subdivLevels = MAX2(subdivLevels, 1); subdivLevels = MAX2(subdivLevels, 1);
if (prevSS) { if (prevSS) {

View File

@@ -813,7 +813,7 @@ void txt_move_up(Text *text, short sel)
if (sel) txt_curs_sel(text, &linep, &charp); if (sel) txt_curs_sel(text, &linep, &charp);
else { txt_pop_first(text); txt_curs_cur(text, &linep, &charp); } else { txt_pop_first(text); txt_curs_cur(text, &linep, &charp); }
if (!*linep) return; if (!*linep) return;
/* old= *charp; */ /* UNUSED */ /* old = *charp; */ /* UNUSED */
if ((*linep)->prev) { if ((*linep)->prev) {
int index = txt_utf8_offset_to_index((*linep)->line, *charp); int index = txt_utf8_offset_to_index((*linep)->line, *charp);
@@ -841,7 +841,7 @@ void txt_move_down(Text *text, short sel)
if (sel) txt_curs_sel(text, &linep, &charp); if (sel) txt_curs_sel(text, &linep, &charp);
else { txt_pop_last(text); txt_curs_cur(text, &linep, &charp); } else { txt_pop_last(text); txt_curs_cur(text, &linep, &charp); }
if (!*linep) return; if (!*linep) return;
/* old= *charp; */ /* UNUSED */ /* old = *charp; */ /* UNUSED */
if ((*linep)->next) { if ((*linep)->next) {
int index = txt_utf8_offset_to_index((*linep)->line, *charp); int index = txt_utf8_offset_to_index((*linep)->line, *charp);
@@ -3226,8 +3226,8 @@ short txt_clear_marker_region(Text *text, TextLine *line, int start, int end, in
} }
/* Clears all markers in the specified group (if given) with at least the /* Clears all markers in the specified group (if given) with at least the
* specified flags set. Useful for clearing temporary markers (group=0, * specified flags set. Useful for clearing temporary markers (group = 0,
* flags=TMARK_TEMP) */ * flags = TMARK_TEMP) */
short txt_clear_markers(Text *text, int group, int flags) short txt_clear_markers(Text *text, int group, int flags)
{ {
TextMarker *marker, *next; TextMarker *marker, *next;
@@ -3276,7 +3276,7 @@ TextMarker *txt_prev_marker(Text *text, TextMarker *marker)
if (tmp->group == marker->group) if (tmp->group == marker->group)
return tmp; return tmp;
} }
return NULL; /* Only if marker==NULL */ return NULL; /* Only if (marker == NULL) */
} }
/* Finds the next marker in the same group. If no other is found, the same /* Finds the next marker in the same group. If no other is found, the same
@@ -3290,7 +3290,7 @@ TextMarker *txt_next_marker(Text *text, TextMarker *marker)
if (tmp->group == marker->group) if (tmp->group == marker->group)
return tmp; return tmp;
} }
return NULL; /* Only if marker==NULL */ return NULL; /* Only if (marker == NULL) */
} }

View File

@@ -71,8 +71,8 @@ static void *thread_tls_data;
* A sample loop can look like this (pseudo c); * A sample loop can look like this (pseudo c);
* *
* ListBase lb; * ListBase lb;
* int maxthreads= 2; * int maxthreads = 2;
* int cont= 1; * int cont = 1;
* *
* BLI_init_threads(&lb, do_something_func, maxthreads); * BLI_init_threads(&lb, do_something_func, maxthreads);
* *
@@ -85,14 +85,14 @@ static void *thread_tls_data;
* else PIL_sleep_ms(50); * else PIL_sleep_ms(50);
* *
* // find if a job is ready, this the do_something_func() should write in job somewhere * // find if a job is ready, this the do_something_func() should write in job somewhere
* cont= 0; * cont = 0;
* for (go over all jobs) * for (go over all jobs)
* if (job is ready) { * if (job is ready) {
* if (job was not removed) { * if (job was not removed) {
* BLI_remove_thread(&lb, job); * BLI_remove_thread(&lb, job);
* } * }
* } * }
* else cont= 1; * else cont = 1;
* } * }
* // conditions to exit loop * // conditions to exit loop
* if (if escape loop event) { * if (if escape loop event) {

View File

@@ -63,33 +63,33 @@ static int handle_read_msb_int(int handle)
if (read(handle, buf, 4) != 4) if (read(handle, buf, 4) != 4)
return -1; return -1;
return (buf[0]<<24) + (buf[1]<<16) + (buf[2]<<8) + (buf[3]<<0); return (buf[0] << 24) + (buf[1] << 16) + (buf[2] << 8) + (buf[3] << 0);
} }
int BLO_is_a_runtime(const char *path) int BLO_is_a_runtime(const char *path)
{ {
int res= 0, fd= BLI_open(path, O_BINARY|O_RDONLY, 0); int res = 0, fd = BLI_open(path, O_BINARY | O_RDONLY, 0);
int datastart; int datastart;
char buf[8]; char buf[8];
if (fd==-1) if (fd == -1)
goto cleanup; goto cleanup;
lseek(fd, -12, SEEK_END); lseek(fd, -12, SEEK_END);
datastart= handle_read_msb_int(fd); datastart = handle_read_msb_int(fd);
if (datastart==-1) if (datastart == -1)
goto cleanup; goto cleanup;
else if (read(fd, buf, 8)!=8) else if (read(fd, buf, 8) != 8)
goto cleanup; goto cleanup;
else if (memcmp(buf, "BRUNTIME", 8)!=0) else if (memcmp(buf, "BRUNTIME", 8) != 0)
goto cleanup; goto cleanup;
else else
res= 1; res = 1;
cleanup: cleanup:
if (fd!=-1) if (fd != -1)
close(fd); close(fd);
return res; return res;
@@ -97,45 +97,45 @@ cleanup:
BlendFileData *BLO_read_runtime(const char *path, ReportList *reports) BlendFileData *BLO_read_runtime(const char *path, ReportList *reports)
{ {
BlendFileData *bfd= NULL; BlendFileData *bfd = NULL;
size_t actualsize; size_t actualsize;
int fd, datastart; int fd, datastart;
char buf[8]; char buf[8];
fd= BLI_open(path, O_BINARY|O_RDONLY, 0); fd = BLI_open(path, O_BINARY | O_RDONLY, 0);
if (fd==-1) { if (fd == -1) {
BKE_reportf(reports, RPT_ERROR, "Unable to open \"%s\": %s.", path, strerror(errno)); BKE_reportf(reports, RPT_ERROR, "Unable to open \"%s\": %s.", path, strerror(errno));
goto cleanup; goto cleanup;
} }
actualsize= BLI_file_descriptor_size(fd); actualsize = BLI_file_descriptor_size(fd);
lseek(fd, -12, SEEK_END); lseek(fd, -12, SEEK_END);
datastart= handle_read_msb_int(fd); datastart = handle_read_msb_int(fd);
if (datastart==-1) { if (datastart == -1) {
BKE_reportf(reports, RPT_ERROR, "Unable to read \"%s\" (problem seeking)", path); BKE_reportf(reports, RPT_ERROR, "Unable to read \"%s\" (problem seeking)", path);
goto cleanup; goto cleanup;
} }
else if (read(fd, buf, 8)!=8) { else if (read(fd, buf, 8) != 8) {
BKE_reportf(reports, RPT_ERROR, "Unable to read \"%s\" (truncated header)", path); BKE_reportf(reports, RPT_ERROR, "Unable to read \"%s\" (truncated header)", path);
goto cleanup; goto cleanup;
} }
else if (memcmp(buf, "BRUNTIME", 8)!=0) { else if (memcmp(buf, "BRUNTIME", 8) != 0) {
BKE_reportf(reports, RPT_ERROR, "Unable to read \"%s\" (not a blend file)", path); BKE_reportf(reports, RPT_ERROR, "Unable to read \"%s\" (not a blend file)", path);
goto cleanup; goto cleanup;
} }
else { else {
//printf("starting to read runtime from %s at datastart %d\n", path, datastart); //printf("starting to read runtime from %s at datastart %d\n", path, datastart);
lseek(fd, datastart, SEEK_SET); lseek(fd, datastart, SEEK_SET);
bfd = blo_read_blendafterruntime(fd, path, actualsize-datastart, reports); bfd = blo_read_blendafterruntime(fd, path, actualsize - datastart, reports);
fd= -1; // file was closed in blo_read_blendafterruntime() fd = -1; // file was closed in blo_read_blendafterruntime()
} }
cleanup: cleanup:
if (fd!=-1) if (fd != -1)
close(fd); close(fd);
return bfd; return bfd;

View File

@@ -92,7 +92,7 @@ BMVert *BM_vert_create(BMesh *bm, const float co[3], const BMVert *example)
* \brief Main function for creating a new edge. * \brief Main function for creating a new edge.
* *
* \note Duplicate edges are supported by the API however users should _never_ see them. * \note Duplicate edges are supported by the API however users should _never_ see them.
* so unless you need a unique edge or know the edge won't exist, you should call wih \a nodouble=TRUE * so unless you need a unique edge or know the edge won't exist, you should call wih \a nodouble = TRUE
*/ */
BMEdge *BM_edge_create(BMesh *bm, BMVert *v1, BMVert *v2, const BMEdge *example, int nodouble) BMEdge *BM_edge_create(BMesh *bm, BMVert *v1, BMVert *v2, const BMEdge *example, int nodouble)
{ {

View File

@@ -850,7 +850,7 @@ static int acf_group_setting_flag(bAnimContext *ac, int setting, short *neg)
return AGRP_MUTED; return AGRP_MUTED;
case ACHANNEL_SETTING_PROTECT: /* protected */ case ACHANNEL_SETTING_PROTECT: /* protected */
// *neg= 1; - if we change this to edtiability // *neg = 1; - if we change this to edtiability
return AGRP_PROTECTED; return AGRP_PROTECTED;
case ACHANNEL_SETTING_VISIBLE: /* visiblity - graph editor */ case ACHANNEL_SETTING_VISIBLE: /* visiblity - graph editor */
@@ -938,7 +938,7 @@ static int acf_fcurve_setting_flag(bAnimContext *UNUSED(ac), int setting, short
return FCURVE_MUTED; return FCURVE_MUTED;
case ACHANNEL_SETTING_PROTECT: /* protected */ case ACHANNEL_SETTING_PROTECT: /* protected */
// *neg= 1; - if we change this to edtiability // *neg = 1; - if we change this to edtiability
return FCURVE_PROTECTED; return FCURVE_PROTECTED;
case ACHANNEL_SETTING_VISIBLE: /* visiblity - graph editor */ case ACHANNEL_SETTING_VISIBLE: /* visiblity - graph editor */
@@ -2483,7 +2483,7 @@ static int acf_gpl_setting_flag(bAnimContext *UNUSED(ac), int setting, short *ne
return GP_LAYER_HIDE; return GP_LAYER_HIDE;
case ACHANNEL_SETTING_PROTECT: /* protected */ case ACHANNEL_SETTING_PROTECT: /* protected */
// *neg= 1; - if we change this to edtiability // *neg = 1; - if we change this to edtiability
return GP_LAYER_LOCKED; return GP_LAYER_LOCKED;
default: /* unsupported */ default: /* unsupported */
@@ -3096,7 +3096,7 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, bAnimChann
/* get the base icon for the setting */ /* get the base icon for the setting */
switch (setting) { switch (setting) {
case ACHANNEL_SETTING_VISIBLE: /* visibility eyes */ case ACHANNEL_SETTING_VISIBLE: /* visibility eyes */
//icon= ((enabled)? ICON_VISIBLE_IPO_ON : ICON_VISIBLE_IPO_OFF); //icon = ((enabled) ? ICON_VISIBLE_IPO_ON : ICON_VISIBLE_IPO_OFF);
icon = ICON_VISIBLE_IPO_OFF; icon = ICON_VISIBLE_IPO_OFF;
if (ale->type == ANIMTYPE_FCURVE) if (ale->type == ANIMTYPE_FCURVE)

View File

@@ -496,7 +496,7 @@ void ANIM_flush_setting_anim_channels(bAnimContext *ac, ListBase *anim_data, bAn
break; break;
/* store this level as the 'old' level now */ /* store this level as the 'old' level now */
// prevLevel= level; // XXX: prevLevel is unused // prevLevel = level; // XXX: prevLevel is unused
} }
} }
} }
@@ -2017,7 +2017,7 @@ static int animchannels_rename_invoke(bContext *C, wmOperator *UNUSED(op), wmEve
v2d = &ar->v2d; v2d = &ar->v2d;
/* figure out which channel user clicked in /* figure out which channel user clicked in
* Note: although channels technically start at y= ACHANNEL_FIRST, we need to adjust by half a channel's height * Note: although channels technically start at (y = ACHANNEL_FIRST), we need to adjust by half a channel's height
* so that the tops of channels get caught ok. Since ACHANNEL_FIRST is really ACHANNEL_HEIGHT, we simply use * so that the tops of channels get caught ok. Since ACHANNEL_FIRST is really ACHANNEL_HEIGHT, we simply use
* ACHANNEL_HEIGHT_HALF. * ACHANNEL_HEIGHT_HALF.
*/ */
@@ -2330,7 +2330,7 @@ static int animchannels_mouseclick_invoke(bContext *C, wmOperator *op, wmEvent *
selectmode = SELECT_REPLACE; selectmode = SELECT_REPLACE;
/* figure out which channel user clicked in /* figure out which channel user clicked in
* Note: although channels technically start at y= ACHANNEL_FIRST, we need to adjust by half a channel's height * Note: although channels technically start at (y = ACHANNEL_FIRST), we need to adjust by half a channel's height
* so that the tops of channels get caught ok. Since ACHANNEL_FIRST is really ACHANNEL_HEIGHT, we simply use * so that the tops of channels get caught ok. Since ACHANNEL_FIRST is really ACHANNEL_HEIGHT, we simply use
* ACHANNEL_HEIGHT_HALF. * ACHANNEL_HEIGHT_HALF.
*/ */

View File

@@ -521,7 +521,7 @@ void ANIM_OT_driver_button_add(wmOperatorType *ot)
/* callbacks */ /* callbacks */
ot->exec = add_driver_button_exec; ot->exec = add_driver_button_exec;
//op->poll= ??? // TODO: need to have some animatable property to do this //op->poll = ??? // TODO: need to have some animatable property to do this
/* flags */ /* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -573,7 +573,7 @@ void ANIM_OT_driver_button_remove(wmOperatorType *ot)
/* callbacks */ /* callbacks */
ot->exec = remove_driver_button_exec; ot->exec = remove_driver_button_exec;
//op->poll= ??? // TODO: need to have some driver to be able to do this... //op->poll = ??? // TODO: need to have some driver to be able to do this...
/* flags */ /* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -620,7 +620,7 @@ void ANIM_OT_copy_driver_button(wmOperatorType *ot)
/* callbacks */ /* callbacks */
ot->exec = copy_driver_button_exec; ot->exec = copy_driver_button_exec;
//op->poll= ??? // TODO: need to have some driver to be able to do this... //op->poll = ??? // TODO: need to have some driver to be able to do this...
/* flags */ /* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -664,7 +664,7 @@ void ANIM_OT_paste_driver_button(wmOperatorType *ot)
/* callbacks */ /* callbacks */
ot->exec = paste_driver_button_exec; ot->exec = paste_driver_button_exec;
//op->poll= ??? // TODO: need to have some driver to be able to do this... //op->poll = ??? // TODO: need to have some driver to be able to do this...
/* flags */ /* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;

View File

@@ -1236,7 +1236,7 @@ static int poselib_preview_handle_event(bContext *UNUSED(C), wmOperator *op, wmE
case PAD5: case PAD6: case PAD7: case PAD8: case PAD9: case PAD5: case PAD6: case PAD7: case PAD8: case PAD9:
case PADPLUSKEY: case PADMINUS: case PADPLUSKEY: case PADMINUS:
case MIDDLEMOUSE: case MOUSEMOVE: case MIDDLEMOUSE: case MOUSEMOVE:
//pld->redraw= PL_PREVIEW_REDRAWHEADER; //pld->redraw = PL_PREVIEW_REDRAWHEADER;
ret = OPERATOR_PASS_THROUGH; ret = OPERATOR_PASS_THROUGH;
break; break;
@@ -1365,7 +1365,7 @@ static int poselib_preview_handle_event(bContext *UNUSED(C), wmOperator *op, wmE
* even though we still maintain control (as RUNNING_MODAL flag is still set too) * even though we still maintain control (as RUNNING_MODAL flag is still set too)
*/ */
case MIDDLEMOUSE: case MOUSEMOVE: case MIDDLEMOUSE: case MOUSEMOVE:
//pld->redraw= PL_PREVIEW_REDRAWHEADER; //pld->redraw = PL_PREVIEW_REDRAWHEADER;
ret = OPERATOR_PASS_THROUGH; ret = OPERATOR_PASS_THROUGH;
break; break;
@@ -1379,7 +1379,7 @@ static int poselib_preview_handle_event(bContext *UNUSED(C), wmOperator *op, wmE
} }
else { else {
/* view manipulation (see above) */ /* view manipulation (see above) */
//pld->redraw= PL_PREVIEW_REDRAWHEADER; //pld->redraw = PL_PREVIEW_REDRAWHEADER;
ret = OPERATOR_PASS_THROUGH; ret = OPERATOR_PASS_THROUGH;
} }
break; break;

View File

@@ -119,8 +119,8 @@ void ED_armature_exit_posemode(bContext *C, Base *base)
} }
} }
/* if a selected or active bone is protected, throw error (oonly if warn==1) and return 1 */ /* if a selected or active bone is protected, throw error (oonly if warn == 1) and return 1 */
/* only_selected==1 : the active bone is allowed to be protected */ /* only_selected == 1: the active bone is allowed to be protected */
#if 0 /* UNUSED 2.5 */ #if 0 /* UNUSED 2.5 */
static short pose_has_protected_selected(Object *ob, short warn) static short pose_has_protected_selected(Object *ob, short warn)
{ {
@@ -571,7 +571,7 @@ static short pose_select_same_group(bContext *C, Object *ob, short extend)
/* alloc a small array to keep track of the groups to use /* alloc a small array to keep track of the groups to use
* - each cell stores on/off state for whether group should be used * - each cell stores on/off state for whether group should be used
* - size is numGroups + 1, since index=0 is used for no-group * - size is (numGroups + 1), since (index = 0) is used for no-group
*/ */
group_flags = MEM_callocN(numGroups + 1, "pose_select_same_group"); group_flags = MEM_callocN(numGroups + 1, "pose_select_same_group");

View File

@@ -1448,7 +1448,7 @@ static short isNurbselUV(Nurb *nu, int *u, int *v, int flag)
if (*u == -1) *u = b; if (*u == -1) *u = b;
else return 0; else return 0;
} }
else if (sel > 1) return 0; /* because sel==1 is still ok */ else if (sel > 1) return 0; /* because sel == 1 is still ok */
} }
for (a = 0; a < nu->pntsu; a++) { for (a = 0; a < nu->pntsu; a++) {
@@ -2965,7 +2965,7 @@ static void subdividenurb(Object *obedit, int number_cuts)
BKE_nurb_knot_calc_u(nu); BKE_nurb_knot_calc_u(nu);
} }
} }
} /* End of 'else if (nu->pntsv==1)' */ } /* End of 'else if (nu->pntsv == 1)' */
else if (nu->type == CU_NURBS) { else if (nu->type == CU_NURBS) {
/* This is a very strange test ... */ /* This is a very strange test ... */
/** /**
@@ -3085,7 +3085,7 @@ static void subdividenurb(Object *obedit, int number_cuts)
nu->pntsv = (number_cuts + 1) * nu->pntsv - number_cuts; nu->pntsv = (number_cuts + 1) * nu->pntsv - number_cuts;
BKE_nurb_knot_calc_u(nu); BKE_nurb_knot_calc_u(nu);
BKE_nurb_knot_calc_v(nu); BKE_nurb_knot_calc_v(nu);
} /* End of 'if (sel== nu->pntsu*nu->pntsv)' (subdivide entire NURB) */ } /* End of 'if (sel == nu->pntsu*nu->pntsv)' (subdivide entire NURB) */
else { else {
/* subdivide in v direction? */ /* subdivide in v direction? */
sel = 0; sel = 0;
@@ -3258,7 +3258,7 @@ static void findnearestNurbvert__doClosest(void *userData, Nurb *nu, BPoint *bp,
static short findnearestNurbvert(ViewContext *vc, short sel, const int mval[2], Nurb **nurb, BezTriple **bezt, BPoint **bp) static short findnearestNurbvert(ViewContext *vc, short sel, const int mval[2], Nurb **nurb, BezTriple **bezt, BPoint **bp)
{ {
/* sel==1: selected gets a disadvantage */ /* (sel == 1): selected gets a disadvantage */
/* in nurb and bezt or bp the nearest is written */ /* in nurb and bezt or bp the nearest is written */
/* return 0 1 2: handlepunt */ /* return 0 1 2: handlepunt */
struct { BPoint *bp; BezTriple *bezt; Nurb *nurb; int dist, hpoint, select, mval[2]; } data = {NULL}; struct { BPoint *bp; BezTriple *bezt; Nurb *nurb; int dist, hpoint, select, mval[2]; } data = {NULL};
@@ -3765,8 +3765,8 @@ static void merge_2_nurb(wmOperator *op, ListBase *editnurb, Nurb *nu1, Nurb *nu
if (is_u_selected(nu1, nu1->pntsu - 1) ) ; if (is_u_selected(nu1, nu1->pntsu - 1) ) ;
else { else {
/* For 2D curves blender uses orderv=0. It doesn't make any sense mathematically. */ /* For 2D curves blender uses (orderv = 0). It doesn't make any sense mathematically. */
/* but after rotating orderu=0 will be confusing. */ /* but after rotating (orderu = 0) will be confusing. */
if (nu1->orderv == 0) nu1->orderv = 1; if (nu1->orderv == 0) nu1->orderv = 1;
rotate_direction_nurb(nu1); rotate_direction_nurb(nu1);

View File

@@ -30,8 +30,8 @@
* \brief DataToC output of file <Bfont> * \brief DataToC output of file <Bfont>
*/ */
int datatoc_Bfont_size= 25181; int datatoc_Bfont_size = 25181;
char datatoc_Bfont[25181]= { char datatoc_Bfont[25181] = {
128, 1, 228, 1, 0, 0, 37, 33, 80, 83, 45, 65, 100, 111, 98, 101, 128, 1, 228, 1, 0, 0, 37, 33, 80, 83, 45, 65, 100, 111, 98, 101,
70, 111, 110, 116, 45, 49, 46, 48, 58, 32, 66, 102, 111, 110, 116, 32, 70, 111, 110, 116, 45, 49, 46, 48, 58, 32, 66, 102, 111, 110, 116, 32,
48, 48, 49, 46, 48, 48, 49, 10, 49, 49, 32, 100, 105, 99, 116, 32, 48, 48, 49, 46, 48, 48, 49, 10, 49, 49, 32, 100, 105, 99, 116, 32,

View File

@@ -932,7 +932,7 @@ static void check_panel_overlap(ARegion *ar, Panel *panel)
{ {
Panel *pa; Panel *pa;
/* also called with panel==NULL for clear */ /* also called with (panel == NULL) for clear */
for (pa = ar->panels.first; pa; pa = pa->next) { for (pa = ar->panels.first; pa; pa = pa->next) {
pa->flag &= ~PNL_OVERLAP; pa->flag &= ~PNL_OVERLAP;
@@ -1024,7 +1024,7 @@ static void ui_handle_panel_header(const bContext *C, uiBlock *block, int mx, in
else if (block->panel->control & UI_PNL_CLOSE) { else if (block->panel->control & UI_PNL_CLOSE) {
/* whole of header can be used to collapse panel (except top-right corner) */ /* whole of header can be used to collapse panel (except top-right corner) */
if (mx <= block->maxx - 8 - PNL_ICON) button = 2; if (mx <= block->maxx - 8 - PNL_ICON) button = 2;
//else if (mx <= block->minx+10+2*PNL_ICON+2) button= 1; //else if (mx <= block->minx + 10 + 2 * PNL_ICON + 2) button = 1;
} }
else if (mx <= block->maxx - PNL_ICON - 12) { else if (mx <= block->maxx - PNL_ICON - 12) {
button = 1; button = 1;

View File

@@ -1304,16 +1304,16 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but,
} }
} }
/*aspect= (float)(block->maxx - block->minx + 4);*/ /*UNUSED*/ /* aspect = (float)(block->maxx - block->minx + 4);*/ /*UNUSED*/
ui_block_to_window_fl(butregion, but->block, &block->minx, &block->miny); ui_block_to_window_fl(butregion, but->block, &block->minx, &block->miny);
ui_block_to_window_fl(butregion, but->block, &block->maxx, &block->maxy); ui_block_to_window_fl(butregion, but->block, &block->maxx, &block->maxy);
//block->minx-= 2.0; block->miny-= 2.0; //block->minx -= 2.0; block->miny -= 2.0;
//block->maxx+= 2.0; block->maxy+= 2.0; //block->maxx += 2.0; block->maxy += 2.0;
xsize = block->maxx - block->minx + 4; // 4 for shadow xsize = block->maxx - block->minx + 4; // 4 for shadow
ysize = block->maxy - block->miny + 4; ysize = block->maxy - block->miny + 4;
/*aspect/= (float)xsize;*/ /*UNUSED*/ /* aspect /= (float)xsize;*/ /*UNUSED*/
{ {
int left = 0, right = 0, top = 0, down = 0; int left = 0, right = 0, top = 0, down = 0;
@@ -2706,7 +2706,7 @@ void uiPupBlockEx(bContext *C, uiBlockCreateFunc func, uiBlockHandleFunc popup_f
handle->popup_arg = arg; handle->popup_arg = arg;
handle->popup_func = popup_func; handle->popup_func = popup_func;
handle->cancel_func = cancel_func; handle->cancel_func = cancel_func;
// handle->opcontext= opcontext; // handle->opcontext = opcontext;
UI_add_popup_handlers(C, &window->modalhandlers, handle); UI_add_popup_handlers(C, &window->modalhandlers, handle);
WM_event_add_mousemove(C); WM_event_add_mousemove(C);

View File

@@ -350,7 +350,7 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
idptr = RNA_property_pointer_get(&template->ptr, template->prop); idptr = RNA_property_pointer_get(&template->ptr, template->prop);
id = idptr.data; id = idptr.data;
idfrom = template->ptr.id.data; idfrom = template->ptr.id.data;
// lb= template->idlb; // lb = template->idlb;
block = uiLayoutGetBlock(layout); block = uiLayoutGetBlock(layout);
uiBlockBeginAlign(block); uiBlockBeginAlign(block);
@@ -2299,7 +2299,7 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, PointerRNA *activeptr, const char *activepropname, const char *prop_list, int rows, int maxrows, int listtype) void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, PointerRNA *activeptr, const char *activepropname, const char *prop_list, int rows, int maxrows, int listtype)
{ {
//Scene *scene= CTX_data_scene(C); //Scene *scene = CTX_data_scene(C);
PropertyRNA *prop = NULL, *activeprop; PropertyRNA *prop = NULL, *activeprop;
PropertyType type, activetype; PropertyType type, activetype;
StructRNA *ptype; StructRNA *ptype;

View File

@@ -2245,7 +2245,7 @@ void ui_draw_link_bezier(rcti *rect)
if (ui_link_bezier_points(rect, coord_array, LINK_RESOL)) { if (ui_link_bezier_points(rect, coord_array, LINK_RESOL)) {
/* we can reuse the dist variable here to increment the GL curve eval amount*/ /* we can reuse the dist variable here to increment the GL curve eval amount*/
// const float dist= 1.0f/(float)LINK_RESOL; // UNUSED // const float dist = 1.0f/(float)LINK_RESOL; // UNUSED
glEnable(GL_BLEND); glEnable(GL_BLEND);
glEnable(GL_LINE_SMOOTH); glEnable(GL_LINE_SMOOTH);

View File

@@ -1265,7 +1265,7 @@ void init_userdef_do_versions(void)
if (U.undosteps == 0) U.undosteps = 32; if (U.undosteps == 0) U.undosteps = 32;
for (btheme = U.themes.first; btheme; btheme = btheme->next) { for (btheme = U.themes.first; btheme; btheme = btheme->next) {
/* check for alpha==0 is safe, then color was never set */ /* check for (alpha == 0) is safe, then color was never set */
if (btheme->tv3d.edge_seam[3] == 0) { if (btheme->tv3d.edge_seam[3] == 0) {
rgba_char_args_set(btheme->tv3d.edge_seam, 230, 150, 50, 255); rgba_char_args_set(btheme->tv3d.edge_seam, 230, 150, 50, 255);
} }
@@ -1290,7 +1290,7 @@ void init_userdef_do_versions(void)
bTheme *btheme; bTheme *btheme;
/* new space type */ /* new space type */
for (btheme = U.themes.first; btheme; btheme = btheme->next) { for (btheme = U.themes.first; btheme; btheme = btheme->next) {
/* check for alpha==0 is safe, then color was never set */ /* check for (alpha == 0) is safe, then color was never set */
if (btheme->ttime.back[3] == 0) { if (btheme->ttime.back[3] == 0) {
// copied from ui_theme_init_default // copied from ui_theme_init_default
btheme->ttime = btheme->tv3d; btheme->ttime = btheme->tv3d;

View File

@@ -272,7 +272,7 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
v2d->keepzoom = (V2D_KEEPASPECT | V2D_LIMITZOOM | V2D_KEEPZOOM); v2d->keepzoom = (V2D_KEEPASPECT | V2D_LIMITZOOM | V2D_KEEPZOOM);
v2d->minzoom = 0.5f; v2d->minzoom = 0.5f;
v2d->maxzoom = 2.0f; v2d->maxzoom = 2.0f;
//tot_changed= 1; //tot_changed = 1;
v2d->align = (V2D_ALIGN_NO_NEG_X | V2D_ALIGN_NO_POS_Y); v2d->align = (V2D_ALIGN_NO_NEG_X | V2D_ALIGN_NO_POS_Y);
v2d->keeptot = V2D_KEEPTOT_BOUNDS; v2d->keeptot = V2D_KEEPTOT_BOUNDS;
@@ -428,7 +428,7 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
if (winx != v2d->oldwinx) do_x = TRUE; if (winx != v2d->oldwinx) do_x = TRUE;
if (winy != v2d->oldwiny) do_y = TRUE; if (winy != v2d->oldwiny) do_y = TRUE;
/* curRatio= height / width; */ /* UNUSED */ /* curRatio = height / width; */ /* UNUSED */
winRatio = winy / winx; winRatio = winy / winx;
/* both sizes change (area/region maximised) */ /* both sizes change (area/region maximised) */
@@ -442,7 +442,7 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
else do_x = TRUE; else do_x = TRUE;
} }
do_cur = do_x; do_cur = do_x;
/* do_win= do_y; */ /* UNUSED */ /* do_win = do_y; */ /* UNUSED */
if (do_cur) { if (do_cur) {
if ((v2d->keeptot == V2D_KEEPTOT_STRICT) && (winx != v2d->oldwinx)) { if ((v2d->keeptot == V2D_KEEPTOT_STRICT) && (winx != v2d->oldwinx)) {
@@ -806,7 +806,7 @@ void UI_view2d_curRect_reset(View2D *v2d)
v2d->cur.xmax = (float)width; v2d->cur.xmax = (float)width;
} }
else { else {
/* width is centered around x==0 */ /* width is centered around (x == 0) */
const float dx = (float)width / 2.0f; const float dx = (float)width / 2.0f;
v2d->cur.xmin = -dx; v2d->cur.xmin = -dx;
@@ -825,7 +825,7 @@ void UI_view2d_curRect_reset(View2D *v2d)
v2d->cur.ymax = (float)height; v2d->cur.ymax = (float)height;
} }
else { else {
/* height is centered around y==0 */ /* height is centered around (y == 0) */
const float dy = (float)height / 2.0f; const float dy = (float)height / 2.0f;
v2d->cur.ymin = -dy; v2d->cur.ymin = -dy;
@@ -869,7 +869,7 @@ void UI_view2d_totRect_set_resize(View2D *v2d, int width, int height, int resize
v2d->tot.xmax = (float)width; v2d->tot.xmax = (float)width;
} }
else { else {
/* width is centered around x==0 */ /* width is centered around (x == 0) */
const float dx = (float)width / 2.0f; const float dx = (float)width / 2.0f;
v2d->tot.xmin = -dx; v2d->tot.xmin = -dx;
@@ -888,7 +888,7 @@ void UI_view2d_totRect_set_resize(View2D *v2d, int width, int height, int resize
v2d->tot.ymax = (float)height; v2d->tot.ymax = (float)height;
} }
else { else {
/* height is centered around y==0 */ /* height is centered around (y == 0) */
const float dy = (float)height / 2.0f; const float dy = (float)height / 2.0f;
v2d->tot.ymin = -dy; v2d->tot.ymin = -dy;

View File

@@ -2242,11 +2242,11 @@ static void project_bucket_clip_face(
* *
* i = l * i = l
* while i < len(me.verts): * while i < len(me.verts):
* ii = i+1 * ii = i + 1
* if ii==len(me.verts): * if ii == len(me.verts):
* ii = l * ii = l
* me.edges.extend([i, ii]) * me.edges.extend([i, ii])
* i+=1 * i += 1
* *
* if __name__ == '__main__': * if __name__ == '__main__':
* main() * main()

View File

@@ -345,7 +345,7 @@ static void cinema_parameters(opj_cparameters_t *parameters)
parameters->image_offset_x0 = 0; parameters->image_offset_x0 = 0;
parameters->image_offset_y0 = 0; parameters->image_offset_y0 = 0;
/*Codeblock size= 32*32*/ /*Codeblock size = 32 * 32*/
parameters->cblockw_init = 32; parameters->cblockw_init = 32;
parameters->cblockh_init = 32; parameters->cblockh_init = 32;
parameters->csty |= 0x01; parameters->csty |= 0x01;

View File

@@ -549,7 +549,7 @@ ImBuf *imb_loadtarga(unsigned char *mem, size_t mem_size, int flags)
TARGA tga; TARGA tga;
struct ImBuf *ibuf; struct ImBuf *ibuf;
int col, count, size; int col, count, size;
unsigned int *rect, *cmap = NULL /*, mincol= 0*/, maxcol = 0; unsigned int *rect, *cmap = NULL /*, mincol = 0*/, maxcol = 0;
uchar *cp = (uchar *) &col; uchar *cp = (uchar *) &col;
if (checktarga(&tga, mem) == 0) return(NULL); if (checktarga(&tga, mem) == 0) return(NULL);

View File

@@ -93,7 +93,7 @@ typedef long long __int64;
* !!Remember to read/write integer and short aligned!! * !!Remember to read/write integer and short aligned!!
* *
* While writing a file, the names of a struct is indicated with a type number, * While writing a file, the names of a struct is indicated with a type number,
* to be found with: type= findstruct_nr(SDNA *, char *) * to be found with: type = findstruct_nr(SDNA *, char *)
* The value of 'type' corresponds with the the index within the structs array * The value of 'type' corresponds with the the index within the structs array
* *
* For the moment: the complete DNA file is included in a .blend file. For * For the moment: the complete DNA file is included in a .blend file. For

View File

@@ -145,7 +145,7 @@ static char **names, *namedata; /* at address names[a] is string a */
static char **types, *typedata; /* at address types[a] is string a */ static char **types, *typedata; /* at address types[a] is string a */
static short *typelens; /* at typelens[a] is de length of type a */ static short *typelens; /* at typelens[a] is de length of type a */
static short *alphalens; /* contains sizes as they are calculated on the DEC Alpha (64 bits), in fact any 64bit system */ static short *alphalens; /* contains sizes as they are calculated on the DEC Alpha (64 bits), in fact any 64bit system */
static short **structs, *structdata; /* at sp= structs[a] is the first address of a struct definition static short **structs, *structdata; /* at sp = structs[a] is the first address of a struct definition
* sp[0] is type number * sp[0] is type number
* sp[1] is amount of elements * sp[1] is amount of elements
* sp[2] sp[3] is typenr, namenr (etc) */ * sp[2] sp[3] is typenr, namenr (etc) */
@@ -909,7 +909,7 @@ void printStructLengths(void)
printf("\n\n*** All detected structs:\n"); printf("\n\n*** All detected structs:\n");
while (unknown) { while (unknown) {
/*lastunknown= unknown;*/ /*UNUSED*/ /*lastunknown = unknown;*/ /*UNUSED*/
unknown = 0; unknown = 0;
/* check all structs... */ /* check all structs... */
@@ -1170,7 +1170,7 @@ int main(int argc, char **argv)
} }
else { else {
fprintf(file, "};\n"); fprintf(file, "};\n");
fprintf(file, "int DNAlen= sizeof(DNAstr);\n"); fprintf(file, "int DNAlen = sizeof(DNAstr);\n");
fclose(file); fclose(file);
} }

View File

@@ -627,31 +627,31 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
if (dp->dnaarraylength == 1) { if (dp->dnaarraylength == 1) {
if (prop->type == PROP_BOOLEAN && dp->booleanbit) { if (prop->type == PROP_BOOLEAN && dp->booleanbit) {
fprintf(f, " values[i]= %s((data->%s & (%d<<i)) != 0);\n", fprintf(f, " values[i] = %s((data->%s & (%d<<i)) != 0);\n",
(dp->booleannegative) ? "!" : "", dp->dnaname, dp->booleanbit); (dp->booleannegative) ? "!" : "", dp->dnaname, dp->booleanbit);
} }
else { else {
fprintf(f, " values[i]= (%s)%s((&data->%s)[i]);\n", fprintf(f, " values[i] = (%s)%s((&data->%s)[i]);\n",
rna_type_type(prop), (dp->booleannegative) ? "!" : "", dp->dnaname); rna_type_type(prop), (dp->booleannegative) ? "!" : "", dp->dnaname);
} }
} }
else { else {
if (prop->type == PROP_BOOLEAN && dp->booleanbit) { if (prop->type == PROP_BOOLEAN && dp->booleanbit) {
fprintf(f, " values[i]= %s((data->%s[i] & ", (dp->booleannegative) ? "!" : "", fprintf(f, " values[i] = %s((data->%s[i] & ", (dp->booleannegative) ? "!" : "",
dp->dnaname); dp->dnaname);
rna_int_print(f, dp->booleanbit); rna_int_print(f, dp->booleanbit);
fprintf(f, ") != 0);\n"); fprintf(f, ") != 0);\n");
} }
else if (rna_color_quantize(prop, dp)) { else if (rna_color_quantize(prop, dp)) {
fprintf(f, " values[i]= (%s)(data->%s[i]*(1.0f/255.0f));\n", fprintf(f, " values[i] = (%s)(data->%s[i]*(1.0f/255.0f));\n",
rna_type_type(prop), dp->dnaname); rna_type_type(prop), dp->dnaname);
} }
else if (dp->dnatype) { else if (dp->dnatype) {
fprintf(f, " values[i]= (%s)%s(((%s*)data->%s)[i]);\n", fprintf(f, " values[i] = (%s)%s(((%s*)data->%s)[i]);\n",
rna_type_type(prop), (dp->booleannegative) ? "!" : "", dp->dnatype, dp->dnaname); rna_type_type(prop), (dp->booleannegative) ? "!" : "", dp->dnatype, dp->dnaname);
} }
else { else {
fprintf(f, " values[i]= (%s)%s((data->%s)[i]);\n", fprintf(f, " values[i] = (%s)%s((data->%s)[i]);\n",
rna_type_type(prop), (dp->booleannegative) ? "!" : "", dp->dnaname); rna_type_type(prop), (dp->booleannegative) ? "!" : "", dp->dnaname);
} }
} }
@@ -839,7 +839,7 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
} }
} }
fprintf(f, " data->%s= value.data;\n", dp->dnaname); fprintf(f, " data->%s = value.data;\n", dp->dnaname);
} }
fprintf(f, "}\n\n"); fprintf(f, "}\n\n");
@@ -882,7 +882,7 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
fprintf(f, " else data->%s &= ~(%d<<i);\n", dp->dnaname, dp->booleanbit); fprintf(f, " else data->%s &= ~(%d<<i);\n", dp->dnaname, dp->booleanbit);
} }
else { else {
fprintf(f, " (&data->%s)[i]= %s", dp->dnaname, (dp->booleannegative) ? "!" : ""); fprintf(f, " (&data->%s)[i] = %s", dp->dnaname, (dp->booleannegative) ? "!" : "");
rna_clamp_value(f, prop, 1); rna_clamp_value(f, prop, 1);
} }
} }
@@ -897,14 +897,14 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
fprintf(f, ";\n"); fprintf(f, ";\n");
} }
else if (rna_color_quantize(prop, dp)) { else if (rna_color_quantize(prop, dp)) {
fprintf(f, " data->%s[i]= FTOCHAR(values[i]);\n", dp->dnaname); fprintf(f, " data->%s[i] = FTOCHAR(values[i]);\n", dp->dnaname);
} }
else { else {
if (dp->dnatype) if (dp->dnatype)
fprintf(f, " ((%s*)data->%s)[i]= %s", dp->dnatype, dp->dnaname, fprintf(f, " ((%s*)data->%s)[i] = %s", dp->dnatype, dp->dnaname,
(dp->booleannegative) ? "!" : ""); (dp->booleannegative) ? "!" : "");
else else
fprintf(f, " (data->%s)[i]= %s", dp->dnaname, (dp->booleannegative) ? "!" : ""); fprintf(f, " (data->%s)[i] = %s", dp->dnaname, (dp->booleannegative) ? "!" : "");
rna_clamp_value(f, prop, 1); rna_clamp_value(f, prop, 1);
} }
} }
@@ -937,7 +937,7 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
} }
else { else {
rna_clamp_value_range(f, prop); rna_clamp_value_range(f, prop);
fprintf(f, " data->%s= %s", dp->dnaname, (dp->booleannegative) ? "!" : ""); fprintf(f, " data->%s = %s", dp->dnaname, (dp->booleannegative) ? "!" : "");
rna_clamp_value(f, prop, 0); rna_clamp_value(f, prop, 0);
} }
} }
@@ -1775,7 +1775,7 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
else { else {
data_str = "_data"; data_str = "_data";
} }
fprintf(f, "\t%s= ", dparm->prop->identifier); fprintf(f, "\t%s = ", dparm->prop->identifier);
if (!pout) if (!pout)
fprintf(f, "%s", valstr); fprintf(f, "%s", valstr);
@@ -1785,13 +1785,13 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
} }
if (dparm->next) if (dparm->next)
fprintf(f, "\t_data+= %d;\n", rna_parameter_size_alloc(dparm->prop)); fprintf(f, "\t_data += %d;\n", rna_parameter_size_alloc(dparm->prop));
} }
if (dfunc->call) { if (dfunc->call) {
fprintf(f, "\t\n"); fprintf(f, "\t\n");
fprintf(f, "\t"); fprintf(f, "\t");
if (func->c_ret) fprintf(f, "%s= ", func->c_ret->identifier); if (func->c_ret) fprintf(f, "%s = ", func->c_ret->identifier);
fprintf(f, "%s(", dfunc->call); fprintf(f, "%s(", dfunc->call);
first = 1; first = 1;
@@ -1845,7 +1845,7 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
dparm = rna_find_parameter_def(func->c_ret); dparm = rna_find_parameter_def(func->c_ret);
ptrstr = (((dparm->prop->type == PROP_POINTER) && !(dparm->prop->flag & PROP_RNAPTR)) || ptrstr = (((dparm->prop->type == PROP_POINTER) && !(dparm->prop->flag & PROP_RNAPTR)) ||
(dparm->prop->arraydimension)) ? "*" : ""; (dparm->prop->arraydimension)) ? "*" : "";
fprintf(f, "\t*((%s%s%s*)_retdata)= %s;\n", rna_type_struct(dparm->prop), fprintf(f, "\t*((%s%s%s*)_retdata) = %s;\n", rna_type_struct(dparm->prop),
rna_parameter_type_name(dparm->prop), ptrstr, func->c_ret->identifier); rna_parameter_type_name(dparm->prop), ptrstr, func->c_ret->identifier);
} }
} }

View File

@@ -642,7 +642,7 @@ int RNA_struct_contains_property(PointerRNA *ptr, PropertyRNA *prop_test)
RNA_PROP_BEGIN(ptr, itemptr, iterprop) RNA_PROP_BEGIN(ptr, itemptr, iterprop)
{ {
/* PropertyRNA *prop= itemptr.data; */ /* PropertyRNA *prop = itemptr.data; */
if (prop_test == (PropertyRNA *)itemptr.data) { if (prop_test == (PropertyRNA *)itemptr.data) {
found = TRUE; found = TRUE;
break; break;
@@ -2561,7 +2561,7 @@ void RNA_property_pointer_set(PointerRNA *ptr, PropertyRNA *prop, PointerRNA ptr
BLI_assert(RNA_property_type(prop) == PROP_POINTER); BLI_assert(RNA_property_type(prop) == PROP_POINTER);
if ((/*idprop=*/ rna_idproperty_check(&prop, ptr))) { if ((/*idprop = */ rna_idproperty_check(&prop, ptr))) {
/* not supported */ /* not supported */
/* rna_idproperty_touch(idprop); */ /* rna_idproperty_touch(idprop); */
} }
@@ -2579,7 +2579,7 @@ void RNA_property_pointer_set(PointerRNA *ptr, PropertyRNA *prop, PointerRNA ptr
PointerRNA RNA_property_pointer_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop)) PointerRNA RNA_property_pointer_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop))
{ {
/*PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop; */ /*PointerPropertyRNA *pprop = (PointerPropertyRNA*)prop; */
/* BLI_assert(RNA_property_type(prop) == PROP_POINTER); */ /* BLI_assert(RNA_property_type(prop) == PROP_POINTER); */
@@ -2718,7 +2718,7 @@ int RNA_property_collection_length(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *r_ptr) void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *r_ptr)
{ {
IDProperty *idprop; IDProperty *idprop;
/* CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop; */ /* CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)prop; */
BLI_assert(RNA_property_type(prop) == PROP_COLLECTION); BLI_assert(RNA_property_type(prop) == PROP_COLLECTION);
@@ -2777,7 +2777,7 @@ void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA
int RNA_property_collection_remove(PointerRNA *ptr, PropertyRNA *prop, int key) int RNA_property_collection_remove(PointerRNA *ptr, PropertyRNA *prop, int key)
{ {
IDProperty *idprop; IDProperty *idprop;
/* CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop; */ /* CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)prop; */
BLI_assert(RNA_property_type(prop) == PROP_COLLECTION); BLI_assert(RNA_property_type(prop) == PROP_COLLECTION);

View File

@@ -293,8 +293,8 @@ int node_group_ungroup(bNodeTree *ntree, bNode *gnode)
BLI_remlink(&wgroup->nodes, node); BLI_remlink(&wgroup->nodes, node);
BLI_addtail(&ntree->nodes, node); BLI_addtail(&ntree->nodes, node);
node->locx+= gnode->locx; node->locx += gnode->locx;
node->locy+= gnode->locy; node->locy += gnode->locy;
node->flag |= NODE_SELECT; node->flag |= NODE_SELECT;
} }

View File

@@ -300,7 +300,7 @@ void WM_timecursor(wmWindow *win, int nr)
* (3 bytes = 17 bits rounded up to nearest whole byte). Pad extra bits * (3 bytes = 17 bits rounded up to nearest whole byte). Pad extra bits
* in mask with 0's. * in mask with 0's.
* *
* Setting big_bm=NULL disables the large version of the cursor. * Setting big_bm = NULL disables the large version of the cursor.
* *
* ******************************************************************* * *******************************************************************
* *

View File

@@ -831,7 +831,7 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P
return WM_operator_poll(C, ot); return WM_operator_poll(C, ot);
if (WM_operator_poll(C, ot)) { if (WM_operator_poll(C, ot)) {
wmOperator *op = wm_operator_create(wm, ot, properties, reports); /* if reports==NULL, theyll be initialized */ wmOperator *op = wm_operator_create(wm, ot, properties, reports); /* if reports == NULL, they'll be initialized */
const short is_nested_call = (wm->op_undo_depth != 0); const short is_nested_call = (wm->op_undo_depth != 0);
/* initialize setting from previous run */ /* initialize setting from previous run */

View File

@@ -331,7 +331,7 @@ void wm_gesture_draw(wmWindow *win)
if (gt->type == WM_GESTURE_RECT) if (gt->type == WM_GESTURE_RECT)
wm_gesture_draw_rect(gt); wm_gesture_draw_rect(gt);
// else if (gt->type==WM_GESTURE_TWEAK) // else if (gt->type == WM_GESTURE_TWEAK)
// wm_gesture_draw_line(gt); // wm_gesture_draw_line(gt);
else if (gt->type == WM_GESTURE_CIRCLE) else if (gt->type == WM_GESTURE_CIRCLE)
wm_gesture_draw_circle(gt); wm_gesture_draw_circle(gt);

View File

@@ -1015,8 +1015,8 @@ static void dialog_exec_cb(bContext *C, void *arg1, void *arg2)
WM_operator_call(C, data->op); WM_operator_call(C, data->op);
/* let execute handle freeing it */ /* let execute handle freeing it */
//data->free_op= FALSE; //data->free_op = FALSE;
//data->op= NULL; //data->op = NULL;
/* in this case, wm_operator_ui_popup_cancel wont run */ /* in this case, wm_operator_ui_popup_cancel wont run */
MEM_freeN(data); MEM_freeN(data);
@@ -1314,7 +1314,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
menu.type = mt; menu.type = mt;
mt->draw(C, &menu); mt->draw(C, &menu);
// wmWindowManager *wm= CTX_wm_manager(C); // wmWindowManager *wm = CTX_wm_manager(C);
// uiItemM(layout, C, "USERPREF_MT_keyconfigs", U.keyconfigstr, ICON_NONE); // uiItemM(layout, C, "USERPREF_MT_keyconfigs", U.keyconfigstr, ICON_NONE);
} }

View File

@@ -149,7 +149,7 @@ void wm_subwindow_getmatrix(wmWindow *win, int swinid, float mat[][4])
} }
/* always sets pixel-precise 2D window/view matrices */ /* always sets pixel-precise 2D window/view matrices */
/* coords is in whole pixels. xmin = 15, xmax= 16: means window is 2 pix big */ /* coords is in whole pixels. xmin = 15, xmax = 16: means window is 2 pix big */
int wm_subwindow_open(wmWindow *win, rcti *winrct) int wm_subwindow_open(wmWindow *win, rcti *winrct)
{ {
wmSubWindow *swin; wmSubWindow *swin;

View File

@@ -622,7 +622,7 @@ void wm_window_make_drawable(bContext *C, wmWindow *win)
wmWindowManager *wm = CTX_wm_manager(C); wmWindowManager *wm = CTX_wm_manager(C);
if (win != wm->windrawable && win->ghostwin) { if (win != wm->windrawable && win->ghostwin) {
// win->lmbut= 0; /* keeps hanging when mousepressed while other window opened */ // win->lmbut = 0; /* keeps hanging when mousepressed while other window opened */
wm->windrawable = win; wm->windrawable = win;
if (G.debug & G_DEBUG_EVENTS) { if (G.debug & G_DEBUG_EVENTS) {