fix for warnings from Sparse static source code checker, mostly BKE/BLI and python functions.

- use NULL rather then 0 where possible (makes code & function calls more readable IMHO).
- set static variables and functions (exposed some unused vars/funcs).
- use func(void) rather then func() for definitions.
This commit is contained in:
Campbell Barton 2011-02-13 10:52:18 +00:00
parent f3bd89b1b7
commit 0955c664aa
125 changed files with 948 additions and 928 deletions

View File

@ -205,7 +205,7 @@ GlyphBLF *blf_glyph_search(GlyphCacheBLF *gc, unsigned int c)
return(NULL);
}
GlyphBLF *blf_glyph_add(FontBLF *font, FT_UInt index, unsigned int c)
GlyphBLF *blf_glyph_add(FontBLF *font, unsigned int index, unsigned int c)
{
FT_GlyphSlot slot;
GlyphBLF *g;
@ -220,9 +220,9 @@ GlyphBLF *blf_glyph_add(FontBLF *font, FT_UInt index, unsigned int c)
return(g);
if (sharp)
err = FT_Load_Glyph(font->face, index, FT_LOAD_TARGET_MONO);
err = FT_Load_Glyph(font->face, (FT_UInt)index, FT_LOAD_TARGET_MONO);
else
err = FT_Load_Glyph(font->face, index, FT_LOAD_TARGET_NORMAL | FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP); /* Sure about NO_* flags? */
err = FT_Load_Glyph(font->face, (FT_UInt)index, FT_LOAD_TARGET_NORMAL | FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP); /* Sure about NO_* flags? */
if (err)
return(NULL);
@ -249,7 +249,7 @@ GlyphBLF *blf_glyph_add(FontBLF *font, FT_UInt index, unsigned int c)
g->next= NULL;
g->prev= NULL;
g->c= c;
g->idx= index;
g->idx= (FT_UInt)index;
g->tex= 0;
g->build_tex= 0;
g->bitmap= NULL;

View File

@ -28,6 +28,11 @@
#ifndef BLF_INTERNAL_H
#define BLF_INTERNAL_H
struct FontBLF;
struct GlyphBLF;
struct GlyphCacheBLF;
struct rctf;
unsigned int blf_next_p2(unsigned int x);
unsigned int blf_hash(unsigned int val);
int blf_utf8_next(unsigned char *buf, int *iindex);
@ -39,30 +44,30 @@ int blf_dir_split(const char *str, char *file, int *size);
int blf_font_init(void);
void blf_font_exit(void);
FontBLF *blf_font_new(const char *name, const char *filename);
FontBLF *blf_font_new_from_mem(const char *name, unsigned char *mem, int mem_size);
void blf_font_attach_from_mem(FontBLF *font, const unsigned char *mem, int mem_size);
struct FontBLF *blf_font_new(const char *name, const char *filename);
struct FontBLF *blf_font_new_from_mem(const char *name, unsigned char *mem, int mem_size);
void blf_font_attach_from_mem(struct FontBLF *font, const unsigned char *mem, int mem_size);
void blf_font_size(FontBLF *font, int size, int dpi);
void blf_font_draw(FontBLF *font, const char *str, unsigned int len);
void blf_font_draw_ascii(FontBLF *font, const char *str, unsigned int len);
void blf_font_buffer(FontBLF *font, const char *str);
void blf_font_boundbox(FontBLF *font, const char *str, rctf *box);
void blf_font_width_and_height(FontBLF *font, const char *str, float *width, float *height);
float blf_font_width(FontBLF *font, const char *str);
float blf_font_height(FontBLF *font, const char *str);
float blf_font_fixed_width(FontBLF *font);
void blf_font_free(FontBLF *font);
void blf_font_size(struct FontBLF *font, int size, int dpi);
void blf_font_draw(struct FontBLF *font, const char *str, unsigned int len);
void blf_font_draw_ascii(struct FontBLF *font, const char *str, unsigned int len);
void blf_font_buffer(struct FontBLF *font, const char *str);
void blf_font_boundbox(struct FontBLF *font, const char *str, struct rctf *box);
void blf_font_width_and_height(struct FontBLF *font, const char *str, float *width, float *height);
float blf_font_width(struct FontBLF *font, const char *str);
float blf_font_height(struct FontBLF *font, const char *str);
float blf_font_fixed_width(struct FontBLF *font);
void blf_font_free(struct FontBLF *font);
GlyphCacheBLF *blf_glyph_cache_find(FontBLF *font, int size, int dpi);
GlyphCacheBLF *blf_glyph_cache_new(FontBLF *font);
void blf_glyph_cache_clear(FontBLF *font);
void blf_glyph_cache_free(GlyphCacheBLF *gc);
struct GlyphCacheBLF *blf_glyph_cache_find(struct FontBLF *font, int size, int dpi);
struct GlyphCacheBLF *blf_glyph_cache_new(struct FontBLF *font);
void blf_glyph_cache_clear(struct FontBLF *font);
void blf_glyph_cache_free(struct GlyphCacheBLF *gc);
GlyphBLF *blf_glyph_search(GlyphCacheBLF *gc, unsigned int c);
GlyphBLF *blf_glyph_add(FontBLF *font, FT_UInt index, unsigned int c);
struct GlyphBLF *blf_glyph_search(struct GlyphCacheBLF *gc, unsigned int c);
struct GlyphBLF *blf_glyph_add(struct FontBLF *font, unsigned int index, unsigned int c);
void blf_glyph_free(GlyphBLF *g);
int blf_glyph_render(FontBLF *font, GlyphBLF *g, float x, float y);
void blf_glyph_free(struct GlyphBLF *g);
int blf_glyph_render(struct FontBLF *font, struct GlyphBLF *g, float x, float y);
#endif /* BLF_INTERNAL_H */

View File

@ -29,6 +29,8 @@
#include <stdlib.h>
#include <string.h>
#include "BLF_api.h"
#ifdef INTERNATIONAL
#include <locale.h>
@ -54,9 +56,9 @@
#define FONT_SIZE_DEFAULT 12
/* locale options. */
char global_messagepath[1024];
char global_language[32];
char global_encoding_name[32];
static char global_messagepath[1024];
static char global_language[32];
static char global_encoding_name[32];
void BLF_lang_init(void)
@ -97,7 +99,7 @@ void BLF_lang_set(const char *str)
BLI_strncpy(global_language, str, sizeof(global_language));
}
void BLF_lang_encoding(const char *str)
static void BLF_lang_encoding(const char *str)
{
BLI_strncpy(global_encoding_name, str, sizeof(global_encoding_name));
/* bind_textdomain_codeset(DOMAIN_NAME, encoding_name); */
@ -110,7 +112,7 @@ void BLF_lang_init(void)
return;
}
void BLF_lang_encoding(const char *str)
static void BLF_lang_encoding(const char *str)
{
(void)str;
return;

View File

@ -30,6 +30,7 @@
#include <stdlib.h>
#include <string.h>
#include "blf_internal.h"
unsigned int blf_next_p2(unsigned int x)
{

View File

@ -79,9 +79,11 @@ float (*key_to_vertcos(struct Object *ob, struct KeyBlock *kb))[3];
void vertcos_to_key(struct Object *ob, struct KeyBlock *kb, float (*vertCos)[3]);
void offset_to_key(struct Object *ob, struct KeyBlock *kb, float (*ofs)[3]);
/* key.c */
extern int slurph_opt;
#ifdef __cplusplus
};
#endif
#endif
#endif // BKE_KEY_H

View File

@ -397,7 +397,7 @@ static CCGEdge *_vert_findEdgeTo(CCGVert *v, CCGVert *vQ) {
(e->v1==v && e->v0==vQ))
return e;
}
return 0;
return NULL;
}
static int _vert_isBoundary(CCGVert *v) {
int i;
@ -599,7 +599,7 @@ static CCG_INLINE void *_face_getIFCoEdge(CCGFace *f, CCGEdge *e, int lvl, int e
static float *_face_getIFNoEdge(CCGFace *f, CCGEdge *e, int lvl, int eX, int eY, int levels, int dataSize, int normalDataOffset) {
return (float*) ((byte*) _face_getIFCoEdge(f, e, lvl, eX, eY, levels, dataSize) + normalDataOffset);
}
void _face_calcIFNo(CCGFace *f, int lvl, int S, int x, int y, float *no, int levels, int dataSize) {
static void _face_calcIFNo(CCGFace *f, int lvl, int S, int x, int y, float *no, int levels, int dataSize) {
float *a = _face_getIFCo(f, lvl, S, x+0, y+0, levels, dataSize);
float *b = _face_getIFCo(f, lvl, S, x+1, y+0, levels, dataSize);
float *c = _face_getIFCo(f, lvl, S, x+1, y+1, levels, dataSize);

View File

@ -93,11 +93,11 @@ void make_local_action(bAction *act)
bAction *actn;
int local=0, lib=0;
if (act->id.lib==0) return;
if (act->id.lib==NULL) return;
if (act->id.us==1) {
act->id.lib= 0;
act->id.lib= NULL;
act->id.flag= LIB_LOCAL;
new_id(0, (ID *)act, 0);
new_id(NULL, (ID *)act, NULL);
return;
}
@ -113,10 +113,10 @@ void make_local_action(bAction *act)
#endif
if(local && lib==0) {
act->id.lib= 0;
act->id.lib= NULL;
act->id.flag= LIB_LOCAL;
//make_local_action_channels(act);
new_id(0, (ID *)act, 0);
new_id(NULL, (ID *)act, NULL);
}
else if(local && lib) {
actn= copy_action(act);
@ -1144,7 +1144,7 @@ void what_does_obaction (Scene *UNUSED(scene), Object *ob, Object *workob, bPose
animsys_evaluate_action_group(&id_ptr, act, agrp, NULL, cframe);
}
else {
AnimData adt= {0};
AnimData adt= {NULL};
/* init animdata, and attach to workob */
workob->adt= &adt;

View File

@ -64,6 +64,7 @@
#include "BKE_scene.h"
#include "BKE_utildefines.h"
#include "BKE_depsgraph.h"
#include "BKE_anim.h"
// XXX bad level call...
@ -1159,12 +1160,12 @@ static void face_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, floa
static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, float par_space_mat[][4], ParticleSystem *psys, int level, int animated)
{
GroupObject *go;
Object *ob=0, **oblist=0, obcopy, *obcopylist=0;
Object *ob=NULL, **oblist=NULL, obcopy, *obcopylist=NULL;
DupliObject *dob;
ParticleDupliWeight *dw;
ParticleSettings *part;
ParticleData *pa;
ChildParticle *cpa=0;
ChildParticle *cpa=NULL;
ParticleKey state;
ParticleCacheKey *cache;
float ctime, pa_time, scale = 1.0f;
@ -1175,14 +1176,14 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
int no_draw_flag = PARS_UNEXIST;
if(psys==0) return;
if(psys==NULL) return;
/* simple preventing of too deep nested groups */
if(level>MAX_DUPLI_RECUR) return;
part=psys->part;
if(part==0)
if(part==NULL)
return;
if(!psys_check_enabled(par, psys))
@ -1199,7 +1200,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
BLI_srandom(31415926 + psys->seed);
if((psys->renderdata || part->draw_as==PART_DRAW_REND) && ELEM(part->ren_as, PART_DRAW_OB, PART_DRAW_GR)) {
ParticleSimulationData sim= {0};
ParticleSimulationData sim= {NULL};
sim.scene= scene;
sim.ob= par;
sim.psys= psys;
@ -1298,7 +1299,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
pa_num = a;
pa_time = psys->particles[cpa->parent].time;
size = psys_get_child_size(psys, cpa, ctime, 0);
size = psys_get_child_size(psys, cpa, ctime, NULL);
}
/* some hair paths might be non-existent so they can't be used for duplication */
@ -1329,11 +1330,11 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
/* hair we handle separate and compute transform based on hair keys */
if(a < totpart) {
cache = psys->pathcache[a];
psys_get_dupli_path_transform(&sim, pa, 0, cache, pamat, &scale);
psys_get_dupli_path_transform(&sim, pa, NULL, cache, pamat, &scale);
}
else {
cache = psys->childcache[a-totpart];
psys_get_dupli_path_transform(&sim, 0, cpa, cache, pamat, &scale);
psys_get_dupli_path_transform(&sim, NULL, cpa, cache, pamat, &scale);
}
VECCOPY(pamat[3], cache->co);
@ -1449,7 +1450,7 @@ static Object *find_family_object(Object **obar, char *family, char ch)
static void font_duplilist(ListBase *lb, Scene *scene, Object *par, int level, int animated)
{
Object *ob, *obar[256]= {0};
Object *ob, *obar[256]= {NULL};
Curve *cu;
struct chartrans *ct, *chartransdata;
float vec[3], obmat[4][4], pmat[4][4], fsize, xof, yof;
@ -1463,7 +1464,7 @@ static void font_duplilist(ListBase *lb, Scene *scene, Object *par, int level, i
/* in par the family name is stored, use this to find the other objects */
chartransdata= BKE_text_to_curve(scene, par, FO_DUPLI);
if(chartransdata==0) return;
if(chartransdata==NULL) return;
cu= par->data;
slen= strlen(cu->str);

View File

@ -809,7 +809,7 @@ KS_Path *BKE_keyingset_find_path (KeyingSet *ks, ID *id, const char group_name[]
eq_id= 0;
/* path */
if ((ksp->rna_path==0) || strcmp(rna_path, ksp->rna_path))
if ((ksp->rna_path==NULL) || strcmp(rna_path, ksp->rna_path))
eq_path= 0;
/* index - need to compare whole-array setting too... */
@ -1856,7 +1856,7 @@ static void animsys_evaluate_nla (PointerRNA *ptr, AnimData *adt, float ctime)
/* if there are strips, evaluate action as per NLA rules */
if ((has_strips) || (adt->actstrip)) {
/* make dummy NLA strip, and add that to the stack */
NlaStrip dummy_strip= {0};
NlaStrip dummy_strip= {NULL};
ListBase dummy_trackslist;
dummy_trackslist.first= dummy_trackslist.last= &dummy_strip;
@ -1915,11 +1915,13 @@ static void animsys_evaluate_nla (PointerRNA *ptr, AnimData *adt, float ctime)
/* Clear all overides */
/* Add or get existing Override for given setting */
#if 0
AnimOverride *BKE_animsys_validate_override (PointerRNA *UNUSED(ptr), char *UNUSED(path), int UNUSED(array_index))
{
// FIXME: need to define how to get overrides
return NULL;
}
#endif
/* -------------------- */

View File

@ -136,19 +136,19 @@ void make_local_armature(bArmature *arm)
Object *ob;
bArmature *newArm;
if (arm->id.lib==0)
if (arm->id.lib==NULL)
return;
if (arm->id.us==1) {
arm->id.lib= 0;
arm->id.lib= NULL;
arm->id.flag= LIB_LOCAL;
new_id(0, (ID*)arm, 0);
new_id(NULL, (ID*)arm, NULL);
return;
}
if(local && lib==0) {
arm->id.lib= 0;
arm->id.lib= NULL;
arm->id.flag= LIB_LOCAL;
new_id(0, (ID *)arm, 0);
new_id(NULL, (ID *)arm, NULL);
}
else if(local && lib) {
newArm= copy_armature(arm);
@ -158,7 +158,7 @@ void make_local_armature(bArmature *arm)
while(ob) {
if(ob->data==arm) {
if(ob->id.lib==0) {
if(ob->id.lib==NULL) {
ob->data= newArm;
newArm->id.us++;
arm->id.us--;

View File

@ -88,10 +88,10 @@
Global G;
UserDef U;
ListBase WMlist= {NULL, NULL};
/* ListBase = {NULL, NULL}; */
short ENDIAN_ORDER;
char versionstr[48]= "";
static char versionstr[48]= "";
/* ********** free ********** */
@ -350,7 +350,7 @@ int BKE_read_file(bContext *C, const char *dir, ReportList *reports)
BlendFileData *bfd;
int retval= 1;
if(strstr(dir, BLENDER_STARTUP_FILE)==0) /* dont print user-pref loading */
if(strstr(dir, BLENDER_STARTUP_FILE)==NULL) /* dont print user-pref loading */
printf("read blend: %s\n", dir);
bfd= BLO_read_from_file(dir, reports);

View File

@ -54,6 +54,7 @@
#include "BKE_global.h"
#include "IMB_imbuf_types.h"
#include "BKE_bmfont.h"
#include "BKE_bmfont_types.h"
void printfGlyph(bmGlyph * glyph)

View File

@ -186,13 +186,13 @@ void make_local_brush(Brush *brush)
Scene *scene;
int local= 0, lib= 0;
if(brush->id.lib==0) return;
if(brush->id.lib==NULL) return;
if(brush->clone.image) {
/* special case: ima always local immediately */
brush->clone.image->id.lib= 0;
brush->clone.image->id.lib= NULL;
brush->clone.image->id.flag= LIB_LOCAL;
new_id(0, (ID *)brush->clone.image, 0);
new_id(NULL, (ID *)brush->clone.image, NULL);
}
for(scene= G.main->scene.first; scene; scene=scene->id.next)
@ -202,9 +202,9 @@ void make_local_brush(Brush *brush)
}
if(local && lib==0) {
brush->id.lib= 0;
brush->id.lib= NULL;
brush->id.flag= LIB_LOCAL;
new_id(0, (ID *)brush, 0);
new_id(NULL, (ID *)brush, NULL);
/* enable fake user by default */
if (!(brush->id.flag & LIB_FAKEUSER)) {
@ -219,7 +219,7 @@ void make_local_brush(Brush *brush)
for(scene= G.main->scene.first; scene; scene=scene->id.next)
if(paint_brush(&scene->toolsettings->imapaint.paint)==brush)
if(scene->id.lib==0) {
if(scene->id.lib==NULL) {
paint_brush_set(&scene->toolsettings->imapaint.paint, brushn);
brushn->id.us++;
brush->id.us--;
@ -227,10 +227,10 @@ void make_local_brush(Brush *brush)
}
}
void brush_debug_print_state(Brush *br)
static void brush_debug_print_state(Brush *br)
{
/* create a fake brush and set it to the defaults */
Brush def= {{0}};
Brush def= {{NULL}};
brush_set_defaults(&def);
#define BR_TEST(field, t) \
@ -424,7 +424,7 @@ int brush_texture_set_nr(Brush *brush, int nr)
id= (ID *)brush->mtex.tex;
idtest= (ID*)BLI_findlink(&G.main->tex, nr-1);
if(idtest==0) { /* new tex */
if(idtest==NULL) { /* new tex */
if(id) idtest= (ID *)copy_texture((Tex *)id);
else idtest= (ID *)add_texture("Tex");
idtest->us--;

View File

@ -729,7 +729,7 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm,
GPU_vertex_setup( dm );
GPU_normal_setup( dm );
GPU_uv_setup( dm );
if( col != 0 ) {
if( col != NULL ) {
/*if( realcol && dm->drawObject->colType == CD_TEXTURE_MCOL ) {
col = 0;
} else if( mcol && dm->drawObject->colType == CD_MCOL ) {
@ -983,7 +983,7 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, vo
glShadeModel(GL_SMOOTH);
if( GPU_buffer_legacy(dm) || setDrawOptions != 0 ) {
if( GPU_buffer_legacy(dm) || setDrawOptions != NULL ) {
DEBUG_VBO( "Using legacy code. cdDM_drawMappedFacesGLSL\n" );
memset(&attribs, 0, sizeof(attribs));
@ -1086,8 +1086,8 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, vo
glEnd();
}
else {
GPUBuffer *buffer = 0;
char *varray = 0;
GPUBuffer *buffer = NULL;
char *varray = NULL;
int numdata = 0, elementsize = 0, offset;
int start = 0, numfaces = 0, prevdraw = 0, curface = 0;
int i;
@ -1124,9 +1124,9 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, vo
if( numdata != 0 ) {
GPU_buffer_free(buffer,0);
GPU_buffer_free(buffer, NULL);
buffer = 0;
buffer = NULL;
}
}
@ -1164,16 +1164,16 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, vo
}
if( numdata != 0 ) {
elementsize = GPU_attrib_element_size( datatypes, numdata );
buffer = GPU_buffer_alloc( elementsize*dm->drawObject->nelements, 0 );
if( buffer == 0 ) {
buffer = GPU_buffer_alloc( elementsize*dm->drawObject->nelements, NULL );
if( buffer == NULL ) {
GPU_buffer_unbind();
dm->drawObject->legacy = 1;
return;
}
varray = GPU_buffer_lock_stream(buffer);
if( varray == 0 ) {
if( varray == NULL ) {
GPU_buffer_unbind();
GPU_buffer_free(buffer, 0);
GPU_buffer_free(buffer, NULL);
dm->drawObject->legacy = 1;
return;
}
@ -1312,7 +1312,7 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, vo
}
GPU_buffer_unbind();
}
GPU_buffer_free( buffer, 0 );
GPU_buffer_free( buffer, NULL );
}
glShadeModel(GL_FLAT);

View File

@ -164,8 +164,8 @@ Collision modifier code end
*/
#define mySWAP(a,b) do { double tmp = b ; b = a ; a = tmp ; } while(0)
int
#if 0 /* UNUSED */
static int
gsl_poly_solve_cubic (double a, double b, double c,
double *x0, double *x1, double *x2)
{
@ -255,7 +255,7 @@ gsl_poly_solve_cubic (double a, double b, double c,
*
* copied from GSL
*/
int
static int
gsl_poly_solve_quadratic (double a, double b, double c,
double *x0, double *x1)
{
@ -313,7 +313,7 @@ gsl_poly_solve_quadratic (double a, double b, double c,
return 0;
}
}
#endif /* UNUSED */

View File

@ -3469,7 +3469,7 @@ static void shrinkwrap_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstr
BVHTreeRayHit hit;
BVHTreeNearest nearest;
BVHTreeFromMesh treeData= {0};
BVHTreeFromMesh treeData= {NULL};
nearest.index = -1;
nearest.dist = FLT_MAX;

View File

@ -85,7 +85,7 @@ struct bContext {
/* context */
bContext *CTX_create()
bContext *CTX_create(void)
{
bContext *C;
@ -788,7 +788,7 @@ static const char *data_mode_strings[] = {
"texturepaint",
"particlemode",
"objectmode",
0
NULL
};
const char *CTX_data_mode_string(const bContext *C)
{

View File

@ -174,7 +174,7 @@ Curve *copy_curve(Curve *cu)
int a;
cun= copy_libblock(cu);
cun->nurb.first= cun->nurb.last= 0;
cun->nurb.first= cun->nurb.last= NULL;
duplicateNurblist( &(cun->nurb), &(cu->nurb));
cun->mat= MEM_dupallocN(cu->mat);
@ -190,9 +190,9 @@ Curve *copy_curve(Curve *cu)
cun->key= copy_key(cu->key);
if(cun->key) cun->key->from= (ID *)cun;
cun->disp.first= cun->disp.last= 0;
cun->bev.first= cun->bev.last= 0;
cun->path= 0;
cun->disp.first= cun->disp.last= NULL;
cun->bev.first= cun->bev.last= NULL;
cun->path= NULL;
cun->editnurb= NULL;
cun->editfont= NULL;
@ -212,7 +212,7 @@ Curve *copy_curve(Curve *cu)
void make_local_curve(Curve *cu)
{
Object *ob = 0;
Object *ob = NULL;
Curve *cun;
int local=0, lib=0;
@ -221,7 +221,7 @@ void make_local_curve(Curve *cu)
* - mixed: do a copy
*/
if(cu->id.lib==0) return;
if(cu->id.lib==NULL) return;
if(cu->vfont) cu->vfont->id.lib= NULL;
if(cu->vfontb) cu->vfontb->id.lib= NULL;
@ -229,9 +229,9 @@ void make_local_curve(Curve *cu)
if(cu->vfontbi) cu->vfontbi->id.lib= NULL;
if(cu->id.us==1) {
cu->id.lib= 0;
cu->id.lib= NULL;
cu->id.flag= LIB_LOCAL;
new_id(0, (ID *)cu, 0);
new_id(NULL, (ID *)cu, NULL);
return;
}
@ -245,9 +245,9 @@ void make_local_curve(Curve *cu)
}
if(local && lib==0) {
cu->id.lib= 0;
cu->id.lib= NULL;
cu->id.flag= LIB_LOCAL;
new_id(0, (ID *)cu, 0);
new_id(NULL, (ID *)cu, NULL);
}
else if(local && lib) {
cun= copy_curve(cu);
@ -257,7 +257,7 @@ void make_local_curve(Curve *cu)
while(ob) {
if(ob->data==cu) {
if(ob->id.lib==0) {
if(ob->id.lib==NULL) {
ob->data= cun;
cun->id.us++;
cu->id.us--;
@ -381,12 +381,12 @@ int count_curveverts_without_handles(ListBase *nurb)
void freeNurb(Nurb *nu)
{
if(nu==0) return;
if(nu==NULL) return;
if(nu->bezt) MEM_freeN(nu->bezt);
nu->bezt= 0;
nu->bezt= NULL;
if(nu->bp) MEM_freeN(nu->bp);
nu->bp= 0;
nu->bp= NULL;
if(nu->knotsu) MEM_freeN(nu->knotsu);
nu->knotsu= NULL;
if(nu->knotsv) MEM_freeN(nu->knotsv);
@ -402,7 +402,7 @@ void freeNurblist(ListBase *lb)
{
Nurb *nu, *next;
if(lb==0) return;
if(lb==NULL) return;
nu= lb->first;
while(nu) {
@ -410,7 +410,7 @@ void freeNurblist(ListBase *lb)
freeNurb(nu);
nu= next;
}
lb->first= lb->last= 0;
lb->first= lb->last= NULL;
}
Nurb *duplicateNurb(Nurb *nu)
@ -419,7 +419,7 @@ Nurb *duplicateNurb(Nurb *nu)
int len;
newnu= (Nurb*)MEM_mallocN(sizeof(Nurb),"duplicateNurb");
if(newnu==0) return 0;
if(newnu==NULL) return NULL;
memcpy(newnu, nu, sizeof(Nurb));
if(nu->bezt) {
@ -615,7 +615,7 @@ static void makecyclicknots(float *knots, short pnts, short order)
{
int a, b, order2, c;
if(knots==0) return;
if(knots==NULL) return;
order2=order-1;
@ -918,7 +918,7 @@ void makeNurbcurve(Nurb *nu, float *coord_array, float *tilt_array, float *radiu
if(nu->knotsu==NULL) return;
if(nu->orderu>nu->pntsu) return;
if(coord_array==0) return;
if(coord_array==NULL) return;
/* allocate and initialize */
len= nu->pntsu;
@ -1269,7 +1269,7 @@ void makebevelcurve(Scene *scene, Object *ob, ListBase *disp, int forRender)
dl= bevdisp.first;
} else {
dl= cu->bevobj->disp.first;
if(dl==0) {
if(dl==NULL) {
makeDispListCurveTypes(scene, cu->bevobj, 0);
dl= cu->bevobj->disp.first;
}
@ -1811,8 +1811,6 @@ static void make_bevel_list_3D_minimum_twist(BevList *bl)
int nr;
float q[4];
float cross_tmp[3];
bevel_list_calc_bisect(bl);
bevp2= (BevPoint *)(bl+1);
@ -1829,6 +1827,7 @@ static void make_bevel_list_3D_minimum_twist(BevList *bl)
float angle= angle_normalized_v3v3(bevp0->dir, bevp1->dir);
if(angle > 0.0f) { /* otherwise we can keep as is */
float cross_tmp[3];
cross_v3_v3v3(cross_tmp, bevp0->dir, bevp1->dir);
axis_angle_to_quat(q, cross_tmp, angle);
mul_qt_qtqt(bevp1->quat, q, bevp0->quat);
@ -2426,7 +2425,7 @@ void calchandleNurb(BezTriple *bezt, BezTriple *prev, BezTriple *next, int mode)
p2= bezt->vec[1];
if(prev==0) {
if(prev==NULL) {
p3= next->vec[1];
pt[0]= 2*p2[0]- p3[0];
pt[1]= 2*p2[1]- p3[1];
@ -2435,7 +2434,7 @@ void calchandleNurb(BezTriple *bezt, BezTriple *prev, BezTriple *next, int mode)
}
else p1= prev->vec[1];
if(next==0) {
if(next==NULL) {
pt[0]= 2*p2[0]- p1[0];
pt[1]= 2*p2[1]- p1[1];
pt[2]= 2*p2[2]- p1[2];
@ -2616,7 +2615,7 @@ void calchandlesNurb(Nurb *nu) /* first, if needed, set handle flags */
a= nu->pntsu;
bezt= nu->bezt;
if(nu->flagu & CU_NURB_CYCLIC) prev= bezt+(a-1);
else prev= 0;
else prev= NULL;
next= bezt+1;
while(a--) {
@ -2624,7 +2623,7 @@ void calchandlesNurb(Nurb *nu) /* first, if needed, set handle flags */
prev= bezt;
if(a==1) {
if(nu->flagu & CU_NURB_CYCLIC) next= nu->bezt;
else next= 0;
else next= NULL;
}
else next++;
@ -2683,7 +2682,7 @@ void autocalchandlesNurb(Nurb *nu, int flag)
BezTriple *bezt2, *bezt1, *bezt0;
int i, align, leftsmall, rightsmall;
if(nu==0 || nu->bezt==0) return;
if(nu==NULL || nu->bezt==NULL) return;
bezt2 = nu->bezt;
bezt1 = bezt2 + (nu->pntsu-1);

View File

@ -469,19 +469,19 @@ static void layerInterp_mdisps(void **sources, float *UNUSED(weights),
vindex[x] = y;
for(i = 0; i < 2; i++) {
float sw[4][4] = {{0}};
float sw_m4[4][4] = {{0}};
int a = 7 & ~(1 << vindex[i*2] | 1 << vindex[i*2+1]);
sw[0][vindex[i*2+1]] = 1;
sw[1][vindex[i*2]] = 1;
sw_m4[0][vindex[i*2+1]] = 1;
sw_m4[1][vindex[i*2]] = 1;
for(x = 0; x < 3; x++)
if(a & (1 << x))
sw[2][x] = 1;
sw_m4[2][x] = 1;
tris[i] = *((MDisps*)sources[i]);
tris[i].disps = MEM_dupallocN(tris[i].disps);
layerInterp_mdisps(&sources[i], NULL, (float*)sw, 1, &tris[i]);
layerInterp_mdisps(&sources[i], NULL, (float*)sw_m4, 1, &tris[i]);
}
mdisp_join_tris(d, &tris[0], &tris[1]);
@ -803,7 +803,7 @@ static void layerDefault_mcol(void *data, int count)
const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = {
static const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = {
{sizeof(MVert), "MVert", 1, NULL, NULL, NULL, NULL, NULL, NULL},
{sizeof(MSticky), "MSticky", 1, NULL, NULL, NULL, layerInterp_msticky, NULL,
NULL},
@ -842,7 +842,7 @@ const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = {
{sizeof(float)*3, "", 0, NULL, NULL, NULL, NULL, NULL, NULL}
};
const char *LAYERTYPENAMES[CD_NUMTYPES] = {
static const char *LAYERTYPENAMES[CD_NUMTYPES] = {
/* 0-4 */ "CDMVert", "CDMSticky", "CDMDeformVert", "CDMEdge", "CDMFace",
/* 5-9 */ "CDMTFace", "CDMCol", "CDOrigIndex", "CDNormal", "CDFlags",
/* 10-14 */ "CDMFloatProperty", "CDMIntProperty","CDMStringProperty", "CDOrigSpace", "CDOrco",

View File

@ -50,7 +50,7 @@ void defgroup_copy_list (ListBase *outbase, ListBase *inbase)
{
bDeformGroup *defgroup, *defgroupn;
outbase->first= outbase->last= 0;
outbase->first= outbase->last= NULL;
for (defgroup = inbase->first; defgroup; defgroup=defgroup->next){
defgroupn= defgroup_duplicate(defgroup);

View File

@ -278,7 +278,7 @@ int queue_count(struct DagNodeQueue *queue){
}
DagForest * dag_init()
DagForest *dag_init(void)
{
DagForest *forest;
/* use callocN to init all zero */

View File

@ -121,7 +121,7 @@ DispList *find_displist(ListBase *lb, int type)
dl= dl->next;
}
return 0;
return NULL;
}
int displist_has_faces(ListBase *lb)
@ -930,13 +930,13 @@ void filldisplist(ListBase *dispbase, ListBase *to, int flipnormal)
{
EditVert *eve, *v1, *vlast;
EditFace *efa;
DispList *dlnew=0, *dl;
DispList *dlnew=NULL, *dl;
float *f1;
int colnr=0, charidx=0, cont=1, tot, a, *index, nextcol= 0;
intptr_t totvert;
if(dispbase==0) return;
if(dispbase->first==0) return;
if(dispbase==NULL) return;
if(dispbase->first==NULL) return;
while(cont) {
cont= 0;
@ -953,7 +953,7 @@ void filldisplist(ListBase *dispbase, ListBase *to, int flipnormal)
/* make editverts and edges */
f1= dl->verts;
a= dl->nr;
eve= v1= 0;
eve= v1= NULL;
while(a--) {
vlast= eve;
@ -961,14 +961,14 @@ void filldisplist(ListBase *dispbase, ListBase *to, int flipnormal)
eve= BLI_addfillvert(f1);
totvert++;
if(vlast==0) v1= eve;
if(vlast==NULL) v1= eve;
else {
BLI_addfilledge(vlast, eve);
}
f1+=3;
}
if(eve!=0 && v1!=0) {
if(eve!=NULL && v1!=NULL) {
BLI_addfilledge(eve, v1);
}
} else if (colnr<dl->col) {
@ -1058,7 +1058,7 @@ static void bevels_to_filledpoly(Curve *cu, ListBase *dispbase)
float *fp, *fp1;
int a, dpoly;
front.first= front.last= back.first= back.last= 0;
front.first= front.last= back.first= back.last= NULL;
dl= dispbase->first;
while(dl) {
@ -1944,7 +1944,7 @@ void imagestodisplist(void)
/* this is confusing, there's also min_max_object, appplying the obmat... */
static void boundbox_displist(Object *ob)
{
BoundBox *bb=0;
BoundBox *bb=NULL;
float min[3], max[3];
DispList *dl;
float *vert;
@ -1956,7 +1956,7 @@ static void boundbox_displist(Object *ob)
Curve *cu= ob->data;
int doit= 0;
if(cu->bb==0) cu->bb= MEM_callocN(sizeof(BoundBox), "boundbox");
if(cu->bb==NULL) cu->bb= MEM_callocN(sizeof(BoundBox), "boundbox");
bb= cu->bb;
dl= ob->disp.first;

View File

@ -166,7 +166,7 @@ PartEff *give_parteff(Object *ob)
if(paf->type==EFF_PARTICLE) return paf;
paf= paf->next;
}
return 0;
return NULL;
}
void free_effect(Effect *eff)
@ -636,7 +636,7 @@ int get_effector_data(EffectorCache *eff, EffectorData *efd, EffectedPoint *poin
if(eff->psys == point->psys && *efd->index == point->index)
;
else {
ParticleSimulationData sim= {0};
ParticleSimulationData sim= {NULL};
sim.scene= eff->scene;
sim.ob= eff->ob;
sim.psys= eff->psys;
@ -781,7 +781,7 @@ static void do_texture_effector(EffectorCache *eff, EffectorData *efd, EffectedP
if(!eff->pd->tex)
return;
result[0].nor = result[1].nor = result[2].nor = result[3].nor = 0;
result[0].nor = result[1].nor = result[2].nor = result[3].nor = NULL;
strength= eff->pd->f_strength * efd->falloff;
@ -845,7 +845,7 @@ static void do_texture_effector(EffectorCache *eff, EffectorData *efd, EffectedP
add_v3_v3(total_force, force);
}
void do_physical_effector(EffectorCache *eff, EffectorData *efd, EffectedPoint *point, float *total_force)
static void do_physical_effector(EffectorCache *eff, EffectorData *efd, EffectedPoint *point, float *total_force)
{
PartDeflect *pd = eff->pd;
RNG *rng = pd->rng;

View File

@ -513,9 +513,6 @@ int BKE_read_exotic(Scene *scene, const char *name)
/* ************************ WRITE ************************** */
char temp_dir[160]= {0, 0};
static void write_vert_stl(Object *ob, MVert *verts, int index, FILE *fpSTL)
{
float vert[3];
@ -588,7 +585,6 @@ void write_stl(Scene *scene, char *str)
BKE_reportf(reports, RPT_ERROR, "Can't open file: %s.", strerror(errno));
return;
}
strcpy(temp_dir, str);
//XXX waitcursor(1);
@ -874,7 +870,6 @@ void write_dxf(struct Scene *scene, char *str)
//XXX error("Can't write file");
return;
}
strcpy(temp_dir, str);
//XXX waitcursor(1);
@ -1134,7 +1129,7 @@ static void dxf_add_mat (Object *ob, Mesh *me, float color[3], char *layer)
ma= G.main->mat.first;
while(ma) {
if(ma->mtex[0]==0) {
if(ma->mtex[0]==NULL) {
if(color[0]==ma->r && color[1]==ma->g && color[2]==ma->b) {
me->mat[0]= ma;
ma->id.us++;
@ -1143,7 +1138,7 @@ static void dxf_add_mat (Object *ob, Mesh *me, float color[3], char *layer)
}
ma= ma->id.next;
}
if(ma==0) {
if(ma==NULL) {
ma= add_material("ext");
me->mat[0]= ma;
ma->r= color[0];

View File

@ -1202,7 +1202,7 @@ static float dvar_eval_transChan (ChannelDriver *driver, DriverVar *dvar)
/* ......... */
/* Table of Driver Varaiable Type Info Data */
DriverVarTypeInfo dvar_types[MAX_DVAR_TYPES] = {
static DriverVarTypeInfo dvar_types[MAX_DVAR_TYPES] = {
BEGIN_DVAR_TYPEDEF(DVAR_TYPE_SINGLE_PROP)
dvar_eval_singleProp, /* eval callback */
1, /* number of targets used */
@ -1233,7 +1233,7 @@ DriverVarTypeInfo dvar_types[MAX_DVAR_TYPES] = {
};
/* Get driver variable typeinfo */
DriverVarTypeInfo *get_dvar_typeinfo (int type)
static DriverVarTypeInfo *get_dvar_typeinfo (int type)
{
/* check if valid type */
if ((type >= 0) && (type < MAX_DVAR_TYPES))

View File

@ -208,7 +208,7 @@ int utf8towchar(wchar_t *w, char *c)
/* The vfont code */
void free_vfont(struct VFont *vf)
{
if (vf == 0) return;
if (vf == NULL) return;
if (vf->data) {
while(vf->data->characters.first)
@ -476,7 +476,7 @@ static void build_underline(Curve *cu, float x1, float y1, float x2, float y2, i
nu2->flagu = CU_NURB_CYCLIC;
bp = (BPoint*)MEM_callocN(4 * sizeof(BPoint),"underline_bp");
if (bp == 0){
if (bp == NULL){
MEM_freeN(nu2);
return;
}
@ -544,10 +544,10 @@ static void buildchar(Curve *cu, unsigned long character, CharInfo *info, float
bezt1 = nu1->bezt;
if (bezt1){
nu2 =(Nurb*) MEM_mallocN(sizeof(Nurb),"duplichar_nurb");
if (nu2 == 0) break;
if (nu2 == NULL) break;
memcpy(nu2, nu1, sizeof(struct Nurb));
nu2->resolu= cu->resolu;
nu2->bp = 0;
nu2->bp = NULL;
nu2->knotsu = nu2->knotsv = NULL;
nu2->flag= CU_SMOOTH;
nu2->charidx = charidx;
@ -562,7 +562,7 @@ static void buildchar(Curve *cu, unsigned long character, CharInfo *info, float
i = nu2->pntsu;
bezt2 = (BezTriple*)MEM_mallocN(i * sizeof(BezTriple),"duplichar_bezt2");
if (bezt2 == 0){
if (bezt2 == NULL){
MEM_freeN(nu2);
break;
}
@ -686,14 +686,14 @@ struct chartrans *BKE_text_to_curve(Scene *scene, Object *ob, int mode)
/* renark: do calculations including the trailing '\0' of a string
because the cursor can be at that location */
if(ob->type!=OB_FONT) return 0;
if(ob->type!=OB_FONT) return NULL;
// Set font data
cu= (Curve *) ob->data;
vfont= cu->vfont;
if(cu->str == NULL) return 0;
if(vfont == NULL) return 0;
if(cu->str == NULL) return NULL;
if(vfont == NULL) return NULL;
// Create unicode string
utf8len = utf8slen(cu->str);
@ -723,7 +723,7 @@ struct chartrans *BKE_text_to_curve(Scene *scene, Object *ob, int mode)
if(!vfd) {
if(mem)
MEM_freeN(mem);
return 0;
return NULL;
}
/* calc offset and rotation of each char */
@ -787,11 +787,11 @@ struct chartrans *BKE_text_to_curve(Scene *scene, Object *ob, int mode)
che= find_vfont_char(vfd, ascii);
/* No VFont found */
if (vfont==0) {
if (vfont==NULL) {
if(mem)
MEM_freeN(mem);
MEM_freeN(chartransdata);
return 0;
return NULL;
}
if (vfont != oldvfont) {
@ -804,7 +804,7 @@ struct chartrans *BKE_text_to_curve(Scene *scene, Object *ob, int mode)
if(mem)
MEM_freeN(mem);
MEM_freeN(chartransdata);
return 0;
return NULL;
}
twidth = char_width(cu, che, info);
@ -1219,7 +1219,5 @@ struct chartrans *BKE_text_to_curve(Scene *scene, Object *ob, int mode)
MEM_freeN(mem);
MEM_freeN(chartransdata);
return 0;
return NULL;
}

View File

@ -106,14 +106,14 @@ void BKE_icons_init(int first_dyn_id)
gIcons = BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp, "icons_init gh");
}
void BKE_icons_free()
void BKE_icons_free(void)
{
if(gIcons)
BLI_ghash_free(gIcons, 0, icon_free);
BLI_ghash_free(gIcons, NULL, icon_free);
gIcons = NULL;
}
struct PreviewImage* BKE_previewimg_create()
struct PreviewImage* BKE_previewimg_create(void)
{
PreviewImage* prv_img = NULL;
int i;
@ -219,7 +219,7 @@ PreviewImage* BKE_previewimg_get(ID *id)
void BKE_icon_changed(int id)
{
Icon* icon = 0;
Icon* icon = NULL;
if (!id || G.background) return;
@ -242,7 +242,7 @@ void BKE_icon_changed(int id)
int BKE_icon_getid(struct ID* id)
{
Icon* new_icon = 0;
Icon* new_icon = NULL;
if (!id || G.background)
return 0;
@ -263,8 +263,8 @@ int BKE_icon_getid(struct ID* id)
new_icon->type = GS(id->name);
/* next two lines make sure image gets created */
new_icon->drawinfo = 0;
new_icon->drawinfo_free = 0;
new_icon->drawinfo = NULL;
new_icon->drawinfo_free = NULL;
BLI_ghash_insert(gIcons, SET_INT_IN_POINTER(id->icon_id), new_icon);
@ -273,13 +273,13 @@ int BKE_icon_getid(struct ID* id)
Icon* BKE_icon_get(int icon_id)
{
Icon* icon = 0;
Icon* icon = NULL;
icon = BLI_ghash_lookup(gIcons, SET_INT_IN_POINTER(icon_id));
if (!icon) {
printf("BKE_icon_get: Internal error, no icon for icon ID: %d\n", icon_id);
return 0;
return NULL;
}
return icon;
@ -287,7 +287,7 @@ Icon* BKE_icon_get(int icon_id)
void BKE_icon_set(int icon_id, struct Icon* icon)
{
Icon* old_icon = 0;
Icon* old_icon = NULL;
old_icon = BLI_ghash_lookup(gIcons, SET_INT_IN_POINTER(icon_id));
@ -305,6 +305,6 @@ void BKE_icon_delete(struct ID* id)
if (!id->icon_id) return; /* no icon defined for library object */
BLI_ghash_remove(gIcons, SET_INT_IN_POINTER(id->icon_id), 0, icon_free);
BLI_ghash_remove(gIcons, SET_INT_IN_POINTER(id->icon_id), NULL, icon_free);
id->icon_id = 0;
}

View File

@ -33,6 +33,8 @@
#include "DNA_ID.h"
#include "BKE_idcode.h"
typedef struct {
unsigned short code;
const char *name, *plural;

View File

@ -266,7 +266,7 @@ void IDP_FreeArray(IDProperty *prop)
return newp;
}
IDProperty *IDP_CopyArray(IDProperty *prop)
static IDProperty *IDP_CopyArray(IDProperty *prop)
{
IDProperty *newp = idp_generic_copy(prop);
@ -328,7 +328,7 @@ IDProperty *IDP_NewString(const char *st, const char *name, int maxlen)
return prop;
}
IDProperty *IDP_CopyString(IDProperty *prop)
static IDProperty *IDP_CopyString(IDProperty *prop)
{
IDProperty *newp = idp_generic_copy(prop);
@ -402,7 +402,7 @@ void IDP_UnlinkID(IDProperty *prop)
/*-------- Group Functions -------*/
/*checks if a property with the same name as prop exists, and if so replaces it.*/
IDProperty *IDP_CopyGroup(IDProperty *prop)
static IDProperty *IDP_CopyGroup(IDProperty *prop)
{
IDProperty *newp = idp_generic_copy(prop), *link;
newp->len = prop->len;

View File

@ -100,7 +100,7 @@ static void de_interlace_ng(struct ImBuf *ibuf) /* neogeo fields */
{
struct ImBuf * tbuf1, * tbuf2;
if (ibuf == 0) return;
if (ibuf == NULL) return;
if (ibuf->flags & IB_fields) return;
ibuf->flags |= IB_fields;
@ -128,7 +128,7 @@ static void de_interlace_st(struct ImBuf *ibuf) /* standard fields */
{
struct ImBuf * tbuf1, * tbuf2;
if (ibuf == 0) return;
if (ibuf == NULL) return;
if (ibuf->flags & IB_fields) return;
ibuf->flags |= IB_fields;
@ -514,7 +514,7 @@ static void tag_all_images_time()
}
#endif
void free_old_images()
void free_old_images(void)
{
Image *ima;
static int lasttime = 0;
@ -1359,7 +1359,7 @@ struct anim *openanim(char *name, int flags)
struct ImBuf *ibuf;
anim = IMB_open_anim(name, flags);
if (anim == NULL) return(0);
if (anim == NULL) return NULL;
ibuf = IMB_anim_absolute(anim, 0);
if (ibuf == NULL) {
@ -1368,7 +1368,7 @@ struct anim *openanim(char *name, int flags)
else
printf("anim file doesn't exist: %s\n", name);
IMB_free_anim(anim);
return(0);
return NULL;
}
IMB_freeImBuf(ibuf);

View File

@ -25,6 +25,8 @@
#include <math.h>
#include <stdlib.h>
#include "BKE_image.h"
#include "BLI_math_color.h"
#include "BLF_api.h"

View File

@ -62,7 +62,7 @@
#include "BLI_utildefines.h"
#include "BKE_ipo.h"
#include "BKE_animsys.h"
#include "BKE_action.h"
#include "BKE_fcurve.h"

View File

@ -150,7 +150,7 @@ Key *copy_key(Key *key)
Key *keyn;
KeyBlock *kbn, *kb;
if(key==0) return 0;
if(key==NULL) return NULL;
keyn= copy_libblock(key);
@ -177,10 +177,10 @@ void make_local_key(Key *key)
* - only local users: set flag
* - mixed: make copy
*/
if(key==0) return;
if(key==NULL) return;
key->id.lib= 0;
new_id(0, (ID *)key, 0);
key->id.lib= NULL;
new_id(NULL, (ID *)key, NULL);
}
/* Sort shape keys and Ipo curves after a change. This assumes that at most
@ -365,14 +365,14 @@ static int setkeys(float fac, ListBase *lb, KeyBlock *k[], float *t, int cycl)
/* if(fac<0.0 || fac>1.0) return 1; */
if(k1->next==0) return 1;
if(k1->next==NULL) return 1;
if(cycl) { /* pre-sort */
k[2]= k1->next;
k[3]= k[2]->next;
if(k[3]==0) k[3]=k1;
if(k[3]==NULL) k[3]=k1;
while(k1) {
if(k1->next==0) k[0]=k1;
if(k1->next==NULL) k[0]=k1;
k1=k1->next;
}
k1= k[1];
@ -393,13 +393,13 @@ static int setkeys(float fac, ListBase *lb, KeyBlock *k[], float *t, int cycl)
k[2]= k1->next;
t[2]= k[2]->pos;
k[3]= k[2]->next;
if(k[3]==0) k[3]= k[2];
if(k[3]==NULL) k[3]= k[2];
t[3]= k[3]->pos;
k1= k[3];
}
while( t[2]<fac ) { /* find correct location */
if(k1->next==0) {
if(k1->next==NULL) {
if(cycl) {
k1= firstkey;
ofs+= dpos;
@ -1081,7 +1081,7 @@ static void do_mesh_key(Scene *scene, Object *ob, Key *key, char *out, const int
for(a=0; a<tot; a+=step, cfra+= delta) {
ctime= bsystem_time(scene, 0, cfra, 0.0); // xxx ugly cruft!
ctime= bsystem_time(scene, NULL, cfra, 0.0); // xxx ugly cruft!
#if 0 // XXX old animation system
if(calc_ipo_spec(key->ipo, KEY_SPEED, &ctime)==0) {
ctime /= 100.0;
@ -1213,7 +1213,7 @@ static void do_curve_key(Scene *scene, Object *ob, Key *key, char *out, const in
while (a < estep) {
if (remain <= 0) {
cfra+= delta;
ctime= bsystem_time(scene, 0, cfra, 0.0f); // XXX old cruft
ctime= bsystem_time(scene, NULL, cfra, 0.0f); // XXX old cruft
ctime /= 100.0f;
CLAMP(ctime, 0.0f, 1.0f); // XXX for compat, we use this, but this clamping was confusing
@ -1276,7 +1276,7 @@ static void do_latt_key(Scene *scene, Object *ob, Key *key, char *out, const int
for(a=0; a<tot; a++, cfra+= delta) {
ctime= bsystem_time(scene, 0, cfra, 0.0); // XXX old cruft
ctime= bsystem_time(scene, NULL, cfra, 0.0); // XXX old cruft
#if 0 // XXX old animation system
if(calc_ipo_spec(key->ipo, KEY_SPEED, &ctime)==0) {
ctime /= 100.0;

View File

@ -251,11 +251,11 @@ void make_local_lattice(Lattice *lt)
* - mixed: make copy
*/
if(lt->id.lib==0) return;
if(lt->id.lib==NULL) return;
if(lt->id.us==1) {
lt->id.lib= 0;
lt->id.lib= NULL;
lt->id.flag= LIB_LOCAL;
new_id(0, (ID *)lt, 0);
new_id(NULL, (ID *)lt, NULL);
return;
}
@ -269,9 +269,9 @@ void make_local_lattice(Lattice *lt)
}
if(local && lib==0) {
lt->id.lib= 0;
lt->id.lib= NULL;
lt->id.flag= LIB_LOCAL;
new_id(0, (ID *)lt, 0);
new_id(NULL, (ID *)lt, NULL);
}
else if(local && lib) {
ltn= copy_lattice(lt);
@ -281,7 +281,7 @@ void make_local_lattice(Lattice *lt)
while(ob) {
if(ob->data==lt) {
if(ob->id.lib==0) {
if(ob->id.lib==NULL) {
ob->data= ltn;
ltn->id.us++;
lt->id.us--;

View File

@ -419,7 +419,7 @@ ListBase *which_libbase(Main *mainlib, short type)
case ID_GD:
return &(mainlib->gpencil);
}
return 0;
return NULL;
}
/* Flag all ids in listbase */
@ -688,7 +688,7 @@ void set_free_windowmanager_cb(void (*func)(bContext *C, wmWindowManager *) )
free_windowmanager_cb= func;
}
void animdata_dtar_clear_cb(ID *UNUSED(id), AnimData *adt, void *userdata)
static void animdata_dtar_clear_cb(ID *UNUSED(id), AnimData *adt, void *userdata)
{
ChannelDriver *driver;
FCurve *fcu;
@ -1007,7 +1007,7 @@ static void sort_alpha_id(ListBase *lb, ID *id)
idtest= idtest->next;
}
/* as last */
if(idtest==0) {
if(idtest==NULL) {
BLI_addtail(lb, id);
}
}
@ -1189,7 +1189,7 @@ int new_id(ListBase *lb, ID *id, const char *tname)
}
/* next to indirect usage in read/writefile also in editobject.c scene.c */
void clear_id_newpoins()
void clear_id_newpoins(void)
{
ListBase *lbarray[MAX_LIBARRAY];
ID *id;
@ -1199,7 +1199,7 @@ void clear_id_newpoins()
while(a--) {
id= lbarray[a]->first;
while(id) {
id->newid= 0;
id->newid= NULL;
id->flag &= ~LIB_NEW;
id= id->next;
}
@ -1293,7 +1293,7 @@ void tag_main(struct Main *mainvar, const short tag)
/* if lib!=NULL, only all from lib local */
void all_local(Library *lib, int untagged_only)
{
ListBase *lbarray[MAX_LIBARRAY], tempbase={0, 0};
ListBase *lbarray[MAX_LIBARRAY], tempbase={NULL, NULL};
ID *id, *idn;
int a;
@ -1322,7 +1322,7 @@ void all_local(Library *lib, int untagged_only)
image_fix_relative_path((Image *)id);
id->lib= NULL;
new_id(lbarray[a], id, 0); /* new_id only does it with double names */
new_id(lbarray[a], id, NULL); /* new_id only does it with double names */
sort_alpha_id(lbarray[a], id);
}
}
@ -1334,7 +1334,7 @@ void all_local(Library *lib, int untagged_only)
while( (id=tempbase.first) ) {
BLI_remlink(&tempbase, id);
BLI_addtail(lbarray[a], id);
new_id(lbarray[a], id, 0);
new_id(lbarray[a], id, NULL);
}
}
@ -1355,7 +1355,7 @@ void test_idbutton(char *name)
lb= which_libbase(G.main, GS(name-2) );
if(lb==0) return;
if(lb==NULL) return;
/* search for id */
idtest= BLI_findstring(lb, name, offsetof(ID, name) + 2);

View File

@ -278,11 +278,11 @@ void make_local_material(Material *ma)
* - mixed: make copy
*/
if(ma->id.lib==0) return;
if(ma->id.lib==NULL) return;
if(ma->id.us==1) {
ma->id.lib= 0;
ma->id.lib= NULL;
ma->id.flag= LIB_LOCAL;
new_id(0, (ID *)ma, 0);
new_id(NULL, (ID *)ma, NULL);
for(a=0; a<MAX_MTEX; a++) {
if(ma->mtex[a]) id_lib_extern((ID *)ma->mtex[a]->tex);
}
@ -344,14 +344,14 @@ void make_local_material(Material *ma)
}
if(local && lib==0) {
ma->id.lib= 0;
ma->id.lib= NULL;
ma->id.flag= LIB_LOCAL;
for(a=0; a<MAX_MTEX; a++) {
if(ma->mtex[a]) id_lib_extern((ID *)ma->mtex[a]->tex);
}
new_id(0, (ID *)ma, 0);
new_id(NULL, (ID *)ma, NULL);
}
else if(local && lib) {
@ -364,7 +364,7 @@ void make_local_material(Material *ma)
if(ob->mat) {
for(a=0; a<ob->totcol; a++) {
if(ob->mat[a]==ma) {
if(ob->id.lib==0) {
if(ob->id.lib==NULL) {
ob->mat[a]= man;
man->id.us++;
ma->id.us--;
@ -380,7 +380,7 @@ void make_local_material(Material *ma)
if(me->mat) {
for(a=0; a<me->totcol; a++) {
if(me->mat[a]==ma) {
if(me->id.lib==0) {
if(me->id.lib==NULL) {
me->mat[a]= man;
man->id.us++;
ma->id.us--;
@ -396,7 +396,7 @@ void make_local_material(Material *ma)
if(cu->mat) {
for(a=0; a<cu->totcol; a++) {
if(cu->mat[a]==ma) {
if(cu->id.lib==0) {
if(cu->id.lib==NULL) {
cu->mat[a]= man;
man->id.us++;
ma->id.us--;
@ -412,7 +412,7 @@ void make_local_material(Material *ma)
if(mb->mat) {
for(a=0; a<mb->totcol; a++) {
if(mb->mat[a]==ma) {
if(mb->id.lib==0) {
if(mb->id.lib==NULL) {
mb->mat[a]= man;
man->id.us++;
ma->id.us--;
@ -583,7 +583,7 @@ Material *give_current_material(Object *ob, int act)
matarar= give_matarar(ob);
if(matarar && *matarar) ma= (*matarar)[act-1];
else ma= 0;
else ma= NULL;
}
@ -593,7 +593,7 @@ Material *give_current_material(Object *ob, int act)
ID *material_from(Object *ob, int act)
{
if(ob==0) return 0;
if(ob==NULL) return NULL;
if(ob->totcol==0) return ob->data;
if(act==0) act= 1;
@ -688,7 +688,7 @@ void assign_material(Object *ob, Material *ma, int act)
totcolp= give_totcolp(ob);
matarar= give_matarar(ob);
if(totcolp==0 || matarar==0) return;
if(totcolp==NULL || matarar==NULL) return;
if(act > *totcolp) {
matar= MEM_callocN(sizeof(void *)*act, "matarray1");
@ -782,7 +782,7 @@ int object_add_material_slot(Object *ob)
{
Material *ma;
if(ob==0) return FALSE;
if(ob==NULL) return FALSE;
if(ob->totcol>=MAXMAT) return FALSE;
ma= give_current_material(ob, ob->actcol);
@ -964,7 +964,7 @@ int material_in_material(Material *parmat, Material *mat)
/* ****************** */
char colname_array[125][20]= {
static char colname_array[125][20]= {
"Black","DarkRed","HalfRed","Red","Red",
"DarkGreen","DarkOlive","Brown","Chocolate","OrangeRed",
"HalfGreen","GreenOlive","DryOlive","Goldenrod","DarkOrange",
@ -997,7 +997,7 @@ void automatname(Material *ma)
int nr, r, g, b;
float ref;
if(ma==0) return;
if(ma==NULL) return;
if(ma->mode & MA_SHLESS) ref= 1.0;
else ref= ma->ref;
@ -1045,7 +1045,7 @@ int object_remove_material_slot(Object *ob)
if(*totcolp==0) {
MEM_freeN(*matarar);
*matarar= 0;
*matarar= NULL;
}
actcol= ob->actcol;
@ -1068,7 +1068,7 @@ int object_remove_material_slot(Object *ob)
if(obt->totcol==0) {
MEM_freeN(obt->mat);
MEM_freeN(obt->matbits);
obt->mat= 0;
obt->mat= NULL;
obt->matbits= NULL;
}
}
@ -1349,7 +1349,7 @@ void ramp_blend(int type, float *r, float *g, float *b, float fac, float *col)
/* copy/paste buffer, if we had a propper py api that would be better */
Material matcopybuf;
static short matcopied=0;
static short matcopied= 0;
void clear_matcopybuf(void)
{

View File

@ -77,7 +77,7 @@ void unlink_mball(MetaBall *mb)
for(a=0; a<mb->totcol; a++) {
if(mb->mat[a]) mb->mat[a]->id.us--;
mb->mat[a]= 0;
mb->mat[a]= NULL;
}
}
@ -142,9 +142,9 @@ void make_local_mball(MetaBall *mb)
* - mixed: make copy
*/
if(mb->id.lib==0) return;
if(mb->id.lib==NULL) return;
if(mb->id.us==1) {
mb->id.lib= 0;
mb->id.lib= NULL;
mb->id.flag= LIB_LOCAL;
return;
}
@ -159,7 +159,7 @@ void make_local_mball(MetaBall *mb)
}
if(local && lib==0) {
mb->id.lib= 0;
mb->id.lib= NULL;
mb->id.flag= LIB_LOCAL;
}
else if(local && lib) {
@ -170,7 +170,7 @@ void make_local_mball(MetaBall *mb)
while(ob) {
if(ob->data==mb) {
if(ob->id.lib==0) {
if(ob->id.lib==NULL) {
ob->data= mbn;
mbn->id.us++;
mb->id.us--;
@ -242,7 +242,7 @@ void tex_space_mball(Object *ob)
float *data, min[3], max[3], loc[3], size[3];
int tot, doit=0;
if(ob->bb==0) ob->bb= MEM_callocN(sizeof(BoundBox), "mb boundbox");
if(ob->bb==NULL) ob->bb= MEM_callocN(sizeof(BoundBox), "mb boundbox");
bb= ob->bb;
/* Weird one, this. */
@ -372,7 +372,7 @@ void copy_mball_properties(Scene *scene, Object *active_object)
BLI_split_name_num(basisname, &basisnr, active_object->id.name+2, '.');
/* XXX recursion check, see scene.c, just too simple code this next_object() */
if(F_ERROR==next_object(&sce_iter, 0, 0, 0))
if(F_ERROR==next_object(&sce_iter, 0, NULL, NULL))
return;
while(next_object(&sce_iter, 1, &base, &ob)) {
@ -418,7 +418,7 @@ Object *find_basis_mball(Scene *scene, Object *basis)
totelem= 0;
/* XXX recursion check, see scene.c, just too simple code this next_object() */
if(F_ERROR==next_object(&sce_iter, 0, 0, 0))
if(F_ERROR==next_object(&sce_iter, 0, NULL, NULL))
return NULL;
while(next_object(&sce_iter, 1, &base, &ob)) {
@ -698,8 +698,8 @@ float metaball(float x, float y, float z)
/* ******************************************** */
int *indices=NULL;
int totindex, curindex;
static int *indices=NULL;
static int totindex, curindex;
void accum_mballfaces(int i1, int i2, int i3, int i4)
@ -742,8 +742,8 @@ void *new_pgn_element(int size)
*/
int blocksize= 16384;
static int offs= 0; /* the current free address */
static struct pgn_elements *cur= 0;
static ListBase lb= {0, 0};
static struct pgn_elements *cur= NULL;
static ListBase lb= {NULL, NULL};
void *adr;
if(size>10000 || size==0) {
@ -925,14 +925,14 @@ void testface(int i, int j, int k, CUBE* old, int bit, int c1, int c2, int c3, i
newc.corners[FLIP(c3, bit)] = corn3;
newc.corners[FLIP(c4, bit)] = corn4;
if(newc.corners[0]==0) newc.corners[0] = setcorner(p, i, j, k);
if(newc.corners[1]==0) newc.corners[1] = setcorner(p, i, j, k+1);
if(newc.corners[2]==0) newc.corners[2] = setcorner(p, i, j+1, k);
if(newc.corners[3]==0) newc.corners[3] = setcorner(p, i, j+1, k+1);
if(newc.corners[4]==0) newc.corners[4] = setcorner(p, i+1, j, k);
if(newc.corners[5]==0) newc.corners[5] = setcorner(p, i+1, j, k+1);
if(newc.corners[6]==0) newc.corners[6] = setcorner(p, i+1, j+1, k);
if(newc.corners[7]==0) newc.corners[7] = setcorner(p, i+1, j+1, k+1);
if(newc.corners[0]==NULL) newc.corners[0] = setcorner(p, i, j, k);
if(newc.corners[1]==NULL) newc.corners[1] = setcorner(p, i, j, k+1);
if(newc.corners[2]==NULL) newc.corners[2] = setcorner(p, i, j+1, k);
if(newc.corners[3]==NULL) newc.corners[3] = setcorner(p, i, j+1, k+1);
if(newc.corners[4]==NULL) newc.corners[4] = setcorner(p, i+1, j, k);
if(newc.corners[5]==NULL) newc.corners[5] = setcorner(p, i+1, j, k+1);
if(newc.corners[6]==NULL) newc.corners[6] = setcorner(p, i+1, j+1, k);
if(newc.corners[7]==NULL) newc.corners[7] = setcorner(p, i+1, j+1, k+1);
p->cubes->cube= newc;
}
@ -1031,7 +1031,7 @@ void makecubetable (void)
for (c = 0; c < 8; c++) pos[c] = MB_BIT(i, c);
for (e = 0; e < 12; e++)
if (!done[e] && (pos[corner1[e]] != pos[corner2[e]])) {
INTLIST *ints = 0;
INTLIST *ints = NULL;
INTLISTS *lists = (INTLISTS *) MEM_callocN(sizeof(INTLISTS), "mball_intlist");
int start = e, edge = e;
@ -1080,7 +1080,7 @@ void BKE_freecubetable(void)
MEM_freeN(lists);
lists= nlists;
}
cubetable[i]= 0;
cubetable[i]= NULL;
}
}
@ -1594,7 +1594,7 @@ float init_meta(Scene *scene, Object *ob) /* return totsize */
BLI_split_name_num(obname, &obnr, ob->id.name+2, '.');
/* make main array */
next_object(&sce_iter, 0, 0, 0);
next_object(&sce_iter, 0, NULL, NULL);
while(next_object(&sce_iter, 1, &base, &bob)) {
if(bob->type==OB_MBALL) {
@ -2174,7 +2174,7 @@ void metaball_polygonize(Scene *scene, Object *ob, ListBase *dispbase)
if(G.moving && mb->flag==MB_UPDATE_FAST) return;
curindex= totindex= 0;
indices= 0;
indices= NULL;
thresh= mb->thresh;
/* total number of MetaElems (totelem) is precomputed in find_basis_mball() function */
@ -2229,7 +2229,7 @@ void metaball_polygonize(Scene *scene, Object *ob, ListBase *dispbase)
mbproc.function = metaball;
mbproc.size = width;
mbproc.bounds = nr_cubes;
mbproc.cubes= 0;
mbproc.cubes= NULL;
mbproc.delta = width/(float)(RES*RES);
polygonize(&mbproc, mb);
@ -2251,7 +2251,7 @@ void metaball_polygonize(Scene *scene, Object *ob, ListBase *dispbase)
dl->parts= curindex;
dl->index= indices;
indices= 0;
indices= NULL;
a= mbproc.vertices.count;
dl->verts= ve= MEM_mallocN(sizeof(float)*3*a, "mballverts");

View File

@ -98,11 +98,11 @@ void unlink_mesh(Mesh *me)
{
int a;
if(me==0) return;
if(me==NULL) return;
for(a=0; a<me->totcol; a++) {
if(me->mat[a]) me->mat[a]->id.us--;
me->mat[a]= 0;
me->mat[a]= NULL;
}
if(me->key) {
@ -110,9 +110,9 @@ void unlink_mesh(Mesh *me)
if (me->key->id.us == 0 && me->key->ipo )
me->key->ipo->id.us--;
}
me->key= 0;
me->key= NULL;
if(me->texcomesh) me->texcomesh= 0;
if(me->texcomesh) me->texcomesh= NULL;
}
@ -255,9 +255,9 @@ void make_local_tface(Mesh *me)
if(tface->tpage) {
ima= tface->tpage;
if(ima->id.lib) {
ima->id.lib= 0;
ima->id.lib= NULL;
ima->id.flag= LIB_LOCAL;
new_id(0, (ID *)ima, 0);
new_id(NULL, (ID *)ima, NULL);
}
}
}
@ -277,11 +277,11 @@ void make_local_mesh(Mesh *me)
* - mixed: make copy
*/
if(me->id.lib==0) return;
if(me->id.lib==NULL) return;
if(me->id.us==1) {
me->id.lib= 0;
me->id.lib= NULL;
me->id.flag= LIB_LOCAL;
new_id(0, (ID *)me, 0);
new_id(NULL, (ID *)me, NULL);
if(me->mtface) make_local_tface(me);
@ -298,9 +298,9 @@ void make_local_mesh(Mesh *me)
}
if(local && lib==0) {
me->id.lib= 0;
me->id.lib= NULL;
me->id.flag= LIB_LOCAL;
new_id(0, (ID *)me, 0);
new_id(NULL, (ID *)me, NULL);
if(me->mtface) make_local_tface(me);
@ -312,7 +312,7 @@ void make_local_mesh(Mesh *me)
ob= bmain->object.first;
while(ob) {
if( me==get_mesh(ob) ) {
if(ob->id.lib==0) {
if(ob->id.lib==NULL) {
set_mesh(ob, men);
}
}
@ -327,7 +327,7 @@ void boundbox_mesh(Mesh *me, float *loc, float *size)
float min[3], max[3];
float mloc[3], msize[3];
if(me->bb==0) me->bb= MEM_callocN(sizeof(BoundBox), "boundbox");
if(me->bb==NULL) me->bb= MEM_callocN(sizeof(BoundBox), "boundbox");
bb= me->bb;
if (!loc) loc= mloc;
@ -512,18 +512,18 @@ int test_index_face(MFace *mface, CustomData *fdata, int mfindex, int nr)
Mesh *get_mesh(Object *ob)
{
if(ob==0) return 0;
if(ob==NULL) return NULL;
if(ob->type==OB_MESH) return ob->data;
else return 0;
else return NULL;
}
void set_mesh(Object *ob, Mesh *me)
{
Mesh *old=0;
Mesh *old=NULL;
multires_force_update(ob);
if(ob==0) return;
if(ob==NULL) return;
if(ob->type==OB_MESH) {
old= ob->data;
@ -730,7 +730,7 @@ void mball_to_mesh(ListBase *lb, Mesh *me)
int a, *index;
dl= lb->first;
if(dl==0) return;
if(dl==NULL) return;
if(dl->type==DL_INDEX4) {
me->totvert= dl->nr;
@ -1023,7 +1023,7 @@ void nurbs_to_mesh(Object *ob)
tex_space_mesh(me);
cu->mat= 0;
cu->mat= NULL;
cu->totcol= 0;
if(ob->data) {

View File

@ -57,7 +57,7 @@
ModifierTypeInfo *modifierType_getInfo(ModifierType type)
{
static ModifierTypeInfo *types[NUM_MODIFIER_TYPES]= {0};
static ModifierTypeInfo *types[NUM_MODIFIER_TYPES]= {NULL};
static int types_init = 1;
if (types_init) {

View File

@ -449,7 +449,7 @@ void multiresModifier_del_levels(MultiresModifierData *mmd, Object *ob, int dire
static DerivedMesh *multires_dm_create_local(Object *ob, DerivedMesh *dm, int lvl, int totlvl, int simple)
{
MultiresModifierData mmd= {{0}};
MultiresModifierData mmd= {{NULL}};
mmd.lvl = lvl;
mmd.sculptlvl = lvl;
@ -462,7 +462,7 @@ static DerivedMesh *multires_dm_create_local(Object *ob, DerivedMesh *dm, int lv
static DerivedMesh *subsurf_dm_create_local(Object *UNUSED(ob), DerivedMesh *dm, int lvl, int simple, int optimal)
{
SubsurfModifierData smd= {{0}};
SubsurfModifierData smd= {{NULL}};
smd.levels = smd.renderLevels = lvl;
smd.flags |= eSubsurfModifierFlag_SubsurfUv;
@ -596,7 +596,7 @@ void multiresModifier_base_apply(MultiresModifierData *mmd, Object *ob)
dispdm->release(dispdm);
}
void multires_subdivide(MultiresModifierData *mmd, Object *ob, int totlvl, int updateblock, int simple)
static void multires_subdivide(MultiresModifierData *mmd, Object *ob, int totlvl, int updateblock, int simple)
{
Mesh *me = ob->data;
MDisps *mdisps;
@ -1591,7 +1591,7 @@ static void multires_sync_levels(Scene *scene, Object *ob, Object *to_ob)
else multires_subdivide(mmd, ob, to_mmd->totlvl, 0, mmd->simple);
}
void multires_apply_smat(Scene *scene, Object *ob, float smat[3][3])
static void multires_apply_smat(Scene *scene, Object *ob, float smat[3][3])
{
DerivedMesh *dm= NULL, *cddm= NULL, *subdm= NULL;
DMGridData **gridData, **subGridData;

View File

@ -1320,7 +1320,7 @@ static void nlastrip_get_endpoint_overlaps (NlaStrip *strip, NlaTrack *track, fl
}
/* Determine auto-blending for the given strip */
void BKE_nlastrip_validate_autoblends (NlaTrack *nlt, NlaStrip *nls)
static void BKE_nlastrip_validate_autoblends (NlaTrack *nlt, NlaStrip *nls)
{
float *ps=NULL, *pe=NULL;
float *ns=NULL, *ne=NULL;
@ -1576,7 +1576,7 @@ void BKE_nla_tweakmode_exit (AnimData *adt)
/* Baking Tools ------------------------------------------- */
void BKE_nla_bake (Scene *scene, ID *UNUSED(id), AnimData *adt, int UNUSED(flag))
static void BKE_nla_bake (Scene *scene, ID *UNUSED(id), AnimData *adt, int UNUSED(flag))
{
/* verify that data is valid

View File

@ -1499,9 +1499,9 @@ void ntreeMakeLocal(bNodeTree *ntree)
if(ntree->id.lib==NULL) return;
if(ntree->id.us==1) {
ntree->id.lib= 0;
ntree->id.lib= NULL;
ntree->id.flag= LIB_LOCAL;
new_id(0, (ID *)ntree, 0);
new_id(NULL, (ID *)ntree, NULL);
return;
}
@ -1559,7 +1559,7 @@ void ntreeMakeLocal(bNodeTree *ntree)
if(local && lib==0) {
ntree->id.lib= NULL;
ntree->id.flag= LIB_LOCAL;
new_id(0, (ID *)ntree, 0);
new_id(NULL, (ID *)ntree, NULL);
}
else if(local && lib) {
/* this is the mixed case, we copy the tree and assign it to local users */
@ -2437,7 +2437,7 @@ static void *exec_composite_node(void *node_v)
}
node->exec |= NODE_READY;
return 0;
return NULL;
}
/* return total of executable nodes, for timecursor */

View File

@ -273,7 +273,7 @@ void free_object(Object *ob)
else if(ob->type==OB_CURVE) unlink_curve(ob->data);
else if(ob->type==OB_MBALL) unlink_mball(ob->data);
}
ob->data= 0;
ob->data= NULL;
}
for(a=0; a<ob->totcol; a++) {
@ -281,12 +281,12 @@ void free_object(Object *ob)
}
if(ob->mat) MEM_freeN(ob->mat);
if(ob->matbits) MEM_freeN(ob->matbits);
ob->mat= 0;
ob->matbits= 0;
ob->mat= NULL;
ob->matbits= NULL;
if(ob->bb) MEM_freeN(ob->bb);
ob->bb= 0;
ob->bb= NULL;
if(ob->path) free_path(ob->path);
ob->path= 0;
ob->path= NULL;
if(ob->adt) BKE_free_animdata((ID *)ob);
if(ob->poselib) ob->poselib->id.us--;
if(ob->gpd) ((ID *)ob->gpd)->us--;
@ -739,11 +739,11 @@ void make_local_camera(Camera *cam)
* - mixed: make copy
*/
if(cam->id.lib==0) return;
if(cam->id.lib==NULL) return;
if(cam->id.us==1) {
cam->id.lib= 0;
cam->id.lib= NULL;
cam->id.flag= LIB_LOCAL;
new_id(0, (ID *)cam, 0);
new_id(NULL, (ID *)cam, NULL);
return;
}
@ -757,9 +757,9 @@ void make_local_camera(Camera *cam)
}
if(local && lib==0) {
cam->id.lib= 0;
cam->id.lib= NULL;
cam->id.flag= LIB_LOCAL;
new_id(0, (ID *)cam, 0);
new_id(NULL, (ID *)cam, NULL);
}
else if(local && lib) {
camn= copy_camera(cam);
@ -769,7 +769,7 @@ void make_local_camera(Camera *cam)
while(ob) {
if(ob->data==cam) {
if(ob->id.lib==0) {
if(ob->id.lib==NULL) {
ob->data= camn;
camn->id.us++;
cam->id.us--;
@ -888,11 +888,11 @@ void make_local_lamp(Lamp *la)
* - mixed: make copy
*/
if(la->id.lib==0) return;
if(la->id.lib==NULL) return;
if(la->id.us==1) {
la->id.lib= 0;
la->id.lib= NULL;
la->id.flag= LIB_LOCAL;
new_id(0, (ID *)la, 0);
new_id(NULL, (ID *)la, NULL);
return;
}
@ -906,9 +906,9 @@ void make_local_lamp(Lamp *la)
}
if(local && lib==0) {
la->id.lib= 0;
la->id.lib= NULL;
la->id.flag= LIB_LOCAL;
new_id(0, (ID *)la, 0);
new_id(NULL, (ID *)la, NULL);
}
else if(local && lib) {
lan= copy_lamp(la);
@ -918,7 +918,7 @@ void make_local_lamp(Lamp *la)
while(ob) {
if(ob->data==la) {
if(ob->id.lib==0) {
if(ob->id.lib==NULL) {
ob->data= lan;
lan->id.us++;
la->id.us--;
@ -1127,7 +1127,7 @@ BulletSoftBody *copy_bulletsoftbody(BulletSoftBody *bsb)
return bsbn;
}
ParticleSystem *copy_particlesystem(ParticleSystem *psys)
static ParticleSystem *copy_particlesystem(ParticleSystem *psys)
{
ParticleSystem *psysn;
ParticleData *pa;
@ -2262,7 +2262,7 @@ void what_does_parent(Scene *scene, Object *ob, Object *workob)
where_is_object(scene, workob);
}
BoundBox *unit_boundbox()
BoundBox *unit_boundbox(void)
{
BoundBox *bb;
float min[3] = {-1.0f,-1.0f,-1.0f}, max[3] = {-1.0f,-1.0f,-1.0f};

View File

@ -459,7 +459,7 @@ int unpackVFont(ReportList *reports, VFont *vfont, int how)
if (newname != NULL) {
ret_value = RET_OK;
freePackedFile(vfont->packedfile);
vfont->packedfile = 0;
vfont->packedfile = NULL;
strcpy(vfont->name, newname);
MEM_freeN(newname);
}
@ -485,7 +485,7 @@ int unpackSound(Main *bmain, ReportList *reports, bSound *sound, int how)
MEM_freeN(newname);
freePackedFile(sound->packedfile);
sound->packedfile = 0;
sound->packedfile = NULL;
sound_load(bmain, sound);

View File

@ -157,21 +157,21 @@ static void psys_free_path_cache_buffers(ParticleCacheKey **cache, ListBase *buf
ParticleSystem *psys_get_current(Object *ob)
{
ParticleSystem *psys;
if(ob==0) return 0;
if(ob==NULL) return NULL;
for(psys=ob->particlesystem.first; psys; psys=psys->next){
if(psys->flag & PSYS_CURRENT)
return psys;
}
return 0;
return NULL;
}
short psys_get_current_num(Object *ob)
{
ParticleSystem *psys;
short i;
if(ob==0) return 0;
if(ob==NULL) return 0;
for(psys=ob->particlesystem.first, i=0; psys; psys=psys->next, i++)
if(psys->flag & PSYS_CURRENT)
@ -184,7 +184,7 @@ void psys_set_current_num(Object *ob, int index)
ParticleSystem *psys;
short i;
if(ob==0) return;
if(ob==NULL) return;
for(psys=ob->particlesystem.first, i=0; psys; psys=psys->next, i++) {
if(i == index)
@ -209,7 +209,7 @@ Object *psys_find_object(Scene *scene, ParticleSystem *psys)
}
Object *psys_get_lattice(ParticleSimulationData *sim)
{
Object *lattice=0;
Object *lattice=NULL;
if(psys_in_edit_mode(sim->scene, sim->psys)==0){
@ -223,7 +223,7 @@ Object *psys_get_lattice(ParticleSimulationData *sim)
}
}
if(lattice)
init_latt_deform(lattice,0);
init_latt_deform(lattice, NULL);
}
return lattice;
@ -358,7 +358,7 @@ int psys_uses_gravity(ParticleSimulationData *sim)
/************************************************/
/* Freeing stuff */
/************************************************/
void fluid_free_settings(SPHFluidSettings *fluid)
static void fluid_free_settings(SPHFluidSettings *fluid)
{
if(fluid)
MEM_freeN(fluid);
@ -459,7 +459,7 @@ void psys_free_children(ParticleSystem *psys)
{
if(psys->child) {
MEM_freeN(psys->child);
psys->child=0;
psys->child= NULL;
psys->totchild=0;
}
@ -529,7 +529,7 @@ void psys_free(Object *ob, ParticleSystem * psys)
if(psys->child){
MEM_freeN(psys->child);
psys->child = 0;
psys->child = NULL;
psys->totchild = 0;
}
@ -550,7 +550,7 @@ void psys_free(Object *ob, ParticleSystem * psys)
if(psys->part){
psys->part->id.us--;
psys->part=0;
psys->part=NULL;
}
BKE_ptcache_free_list(&psys->ptcaches);

View File

@ -120,7 +120,8 @@ static int particles_are_dynamic(ParticleSystem *psys) {
else
return ELEM3(psys->part->phystype, PART_PHYS_NEWTON, PART_PHYS_BOIDS, PART_PHYS_FLUID);
}
int psys_get_current_display_percentage(ParticleSystem *psys)
static int psys_get_current_display_percentage(ParticleSystem *psys)
{
ParticleSettings *part=psys->part;
@ -173,7 +174,7 @@ void psys_reset(ParticleSystem *psys, int mode)
/* reset children */
if(psys->child) {
MEM_freeN(psys->child);
psys->child= 0;
psys->child= NULL;
}
psys->totchild= 0;
@ -277,7 +278,7 @@ static void realloc_particles(ParticleSimulationData *sim, int new_totpart)
if(psys->child) {
MEM_freeN(psys->child);
psys->child=0;
psys->child=NULL;
psys->totchild=0;
}
}
@ -312,7 +313,7 @@ static void alloc_child_particles(ParticleSystem *psys, int tot)
}
MEM_freeN(psys->child);
psys->child=0;
psys->child=NULL;
psys->totchild=0;
}
@ -401,7 +402,7 @@ void psys_calc_dmcache(Object *ob, DerivedMesh *dm, ParticleSystem *psys)
static void distribute_particles_in_grid(DerivedMesh *dm, ParticleSystem *psys)
{
ParticleData *pa=0;
ParticleData *pa=NULL;
float min[3], max[3], delta[3], d;
MVert *mv, *mvert = dm->getVertDataArray(dm,0);
int totvert=dm->getNumVerts(dm), from=psys->part->from;

View File

@ -43,6 +43,8 @@
#include "BLI_blenlib.h"
#include "BKE_property.h"
void free_property(bProperty *prop)
{
@ -93,7 +95,7 @@ void init_property(bProperty *prop)
/* also use when property changes type */
if(prop->poin && prop->poin != &prop->data) MEM_freeN(prop->poin);
prop->poin= 0;
prop->poin= NULL;
prop->data= 0;

View File

@ -86,7 +86,7 @@ void copy_sensors(ListBase *lbn, ListBase *lbo)
{
bSensor *sens, *sensn;
lbn->first= lbn->last= 0;
lbn->first= lbn->last= NULL;
sens= lbo->first;
while(sens) {
sensn= copy_sensor(sens);
@ -253,7 +253,7 @@ void copy_controllers(ListBase *lbn, ListBase *lbo)
{
bController *cont, *contn;
lbn->first= lbn->last= 0;
lbn->first= lbn->last= NULL;
cont= lbo->first;
while(cont) {
contn= copy_controller(cont);
@ -267,7 +267,7 @@ void init_controller(bController *cont)
/* also use when controller changes type, leave actuators... */
if(cont->data) MEM_freeN(cont->data);
cont->data= 0;
cont->data= NULL;
switch(cont->type) {
case CONT_EXPRESSION:
@ -375,7 +375,7 @@ void copy_actuators(ListBase *lbn, ListBase *lbo)
{
bActuator *act, *actn;
lbn->first= lbn->last= 0;
lbn->first= lbn->last= NULL;
act= lbo->first;
while(act) {
actn= copy_actuator(act);
@ -393,7 +393,7 @@ void init_actuator(bActuator *act)
bSoundActuator *sa;
if(act->data) MEM_freeN(act->data);
act->data= 0;
act->data= NULL;
switch(act->type) {
case ACT_ACTION:
@ -512,7 +512,7 @@ void clear_sca_new_poins_ob(Object *ob)
}
}
void clear_sca_new_poins()
void clear_sca_new_poins(void)
{
Object *ob;
@ -595,7 +595,7 @@ void set_sca_new_poins_ob(Object *ob)
}
void set_sca_new_poins()
void set_sca_new_poins(void)
{
Object *ob;

View File

@ -109,7 +109,7 @@ ARegionType *BKE_regiontype_from_id(SpaceType *st, int regionid)
}
const ListBase *BKE_spacetypes_list()
const ListBase *BKE_spacetypes_list(void)
{
return &spacetypes;
}

View File

@ -54,10 +54,10 @@ typedef struct seqCacheEntry
MEM_CacheLimiterHandleC * c_handle;
} seqCacheEntry;
static GHash * hash = 0;
static MEM_CacheLimiterC * limitor = 0;
static struct BLI_mempool * entrypool = 0;
static struct BLI_mempool * keypool = 0;
static GHash * hash = NULL;
static MEM_CacheLimiterC * limitor = NULL;
static struct BLI_mempool * entrypool = NULL;
static struct BLI_mempool * keypool = NULL;
static int ibufs_in = 0;
static int ibufs_rem = 0;
@ -119,8 +119,8 @@ static void HashValFree(void *val)
ibufs_rem++;
}
e->ibuf = 0;
e->c_handle = 0;
e->ibuf = NULL;
e->c_handle = NULL;
BLI_mempool_free(entrypool, e);
}
@ -135,12 +135,12 @@ static void IMB_seq_cache_destructor(void * p)
IMB_freeImBuf(e->ibuf);
ibufs_rem++;
e->ibuf = 0;
e->c_handle = 0;
e->ibuf = NULL;
e->c_handle = NULL;
}
}
void seq_stripelem_cache_init()
void seq_stripelem_cache_init(void)
{
hash = BLI_ghash_new(HashHash, HashCmp, "seq stripelem cache hash");
limitor = new_MEM_CacheLimiter( IMB_seq_cache_destructor );
@ -149,7 +149,7 @@ void seq_stripelem_cache_init()
keypool = BLI_mempool_create(sizeof(seqCacheKey), 64, 64, 0);
}
void seq_stripelem_cache_destruct()
void seq_stripelem_cache_destruct(void)
{
if (!entrypool) {
return;
@ -160,7 +160,7 @@ void seq_stripelem_cache_destruct()
BLI_mempool_destroy(keypool);
}
void seq_stripelem_cache_cleanup()
void seq_stripelem_cache_cleanup(void)
{
if (!entrypool) {
seq_stripelem_cache_init();
@ -185,7 +185,7 @@ struct ImBuf * seq_stripelem_cache_get(
seqCacheEntry * e;
if (!seq) {
return 0;
return NULL;
}
if (!entrypool) {
@ -205,7 +205,7 @@ struct ImBuf * seq_stripelem_cache_get(
MEM_CacheLimiter_touch(e->c_handle);
return e->ibuf;
}
return 0;
return NULL;
}
void seq_stripelem_cache_put(
@ -239,7 +239,7 @@ void seq_stripelem_cache_put(
e = (seqCacheEntry*) BLI_mempool_alloc(entrypool);
e->ibuf = i;
e->c_handle = 0;
e->c_handle = NULL;
BLI_ghash_remove(hash, key, HashKeyFree, HashValFree);
BLI_ghash_insert(hash, key, e);

View File

@ -125,12 +125,12 @@ static void open_plugin_seq(PluginSeq *pis, const char *seqname)
char *cp;
/* to be sure: (is tested for) */
pis->doit= 0;
pis->pname= 0;
pis->varstr= 0;
pis->cfra= 0;
pis->doit= NULL;
pis->pname= NULL;
pis->varstr= NULL;
pis->cfra= NULL;
pis->version= 0;
pis->instance_private_data = 0;
pis->instance_private_data = NULL;
/* clear the error list */
PIL_dynlib_get_error_as_string(NULL);
@ -142,12 +142,12 @@ static void open_plugin_seq(PluginSeq *pis, const char *seqname)
pis->handle= PIL_dynlib_open(pis->name);
if(test_dlerr(pis->name, pis->name)) return;
if (pis->handle != 0) {
if (pis->handle != NULL) {
/* find the address of the version function */
version= (int (*)(void))PIL_dynlib_find_symbol(pis->handle, "plugin_seq_getversion");
if (test_dlerr(pis->name, "plugin_seq_getversion")) return;
if (version != 0) {
if (version != NULL) {
pis->version= version();
if (pis->version >= 2 && pis->version <= 6) {
int (*info_func)(PluginInfo *);
@ -201,11 +201,11 @@ static PluginSeq *add_plugin_seq(const char *str, const char *seqname)
strncpy(pis->name, str, FILE_MAXDIR+FILE_MAXFILE);
open_plugin_seq(pis, seqname);
if(pis->doit==0) {
if(pis->handle==0) error("no plugin: %s", str);
if(pis->doit==NULL) {
if(pis->handle==NULL) error("no plugin: %s", str);
else error("in plugin: %s", str);
MEM_freeN(pis);
return 0;
return NULL;
}
/* default values */
@ -222,7 +222,7 @@ static PluginSeq *add_plugin_seq(const char *str, const char *seqname)
static void free_plugin_seq(PluginSeq *pis)
{
if(pis==0) return;
if(pis==NULL) return;
/* no PIL_dynlib_close: same plugin can be opened multiple times with 1 handle */
@ -270,7 +270,7 @@ static void copy_plugin(Sequence * dst, Sequence * src)
static ImBuf * IMB_cast_away_list(ImBuf * i)
{
if (!i) {
return 0;
return NULL;
}
return (ImBuf*) (((void**) i) + 2);
}
@ -383,7 +383,7 @@ static int do_plugin_early_out(struct Sequence *UNUSED(seq),
static void free_plugin(struct Sequence * seq)
{
free_plugin_seq(seq->plugin);
seq->plugin = 0;
seq->plugin = NULL;
}
/* **********************************************************************
@ -554,7 +554,7 @@ static struct ImBuf * do_alphaover_effect(
ALPHA UNDER
********************************************************************** */
void do_alphaunder_effect_byte(
static void do_alphaunder_effect_byte(
float facf0, float facf1, int x, int y, char *rect1,
char *rect2, char *out)
{
@ -726,7 +726,7 @@ static struct ImBuf* do_alphaunder_effect(
CROSS
********************************************************************** */
void do_cross_effect_byte(float facf0, float facf1, int x, int y,
static void do_cross_effect_byte(float facf0, float facf1, int x, int y,
char *rect1, char *rect2,
char *out)
{
@ -774,7 +774,7 @@ void do_cross_effect_byte(float facf0, float facf1, int x, int y,
}
}
void do_cross_effect_float(float facf0, float facf1, int x, int y,
static void do_cross_effect_float(float facf0, float facf1, int x, int y,
float *rect1, float *rect2, float *out)
{
float fac1, fac2, fac3, fac4;
@ -1864,7 +1864,7 @@ static int num_inputs_wipe(void)
static void free_wipe_effect(Sequence *seq)
{
if(seq->effectdata)MEM_freeN(seq->effectdata);
seq->effectdata = 0;
seq->effectdata = NULL;
}
static void copy_wipe_effect(Sequence *dst, Sequence *src)
@ -2048,7 +2048,7 @@ static int num_inputs_transform(void)
static void free_transform_effect(Sequence *seq)
{
if(seq->effectdata)MEM_freeN(seq->effectdata);
seq->effectdata = 0;
seq->effectdata = NULL;
}
static void copy_transform_effect(Sequence *dst, Sequence *src)
@ -2617,7 +2617,7 @@ static int num_inputs_glow(void)
static void free_glow_effect(Sequence *seq)
{
if(seq->effectdata)MEM_freeN(seq->effectdata);
seq->effectdata = 0;
seq->effectdata = NULL;
}
static void copy_glow_effect(Sequence *dst, Sequence *src)
@ -2704,7 +2704,7 @@ static int num_inputs_color(void)
static void free_solid_color(Sequence *seq)
{
if(seq->effectdata)MEM_freeN(seq->effectdata);
seq->effectdata = 0;
seq->effectdata = NULL;
}
static void copy_solid_color(Sequence *dst, Sequence *src)
@ -2827,21 +2827,21 @@ static struct ImBuf * do_multicam(
ListBase * seqbasep;
if (seq->multicam_source == 0 || seq->multicam_source >= seq->machine) {
return 0;
return NULL;
}
ed = context.scene->ed;
if (!ed) {
return 0;
return NULL;
}
seqbasep = seq_seqbase(&ed->seqbase, seq);
if (!seqbasep) {
return 0;
return NULL;
}
i = give_ibuf_seqbase(context, cfra, seq->multicam_source, seqbasep);
if (!i) {
return 0;
return NULL;
}
if (input_have_to_preprocess(context, seq, cfra)) {
@ -2867,7 +2867,7 @@ static void init_speed_effect(Sequence *seq)
v = (SpeedControlVars *)seq->effectdata;
v->globalSpeed = 1.0;
v->frameMap = 0;
v->frameMap = NULL;
v->flags |= SEQ_SPEED_INTEGRATE; /* should be default behavior */
v->length = 0;
}
@ -2876,7 +2876,7 @@ static void load_speed_effect(Sequence * seq)
{
SpeedControlVars * v = (SpeedControlVars *)seq->effectdata;
v->frameMap = 0;
v->frameMap = NULL;
v->length = 0;
}
@ -2890,7 +2890,7 @@ static void free_speed_effect(Sequence *seq)
SpeedControlVars * v = (SpeedControlVars *)seq->effectdata;
if(v->frameMap) MEM_freeN(v->frameMap);
if(seq->effectdata) MEM_freeN(seq->effectdata);
seq->effectdata = 0;
seq->effectdata = NULL;
}
static void copy_speed_effect(Sequence *dst, Sequence *src)
@ -2898,7 +2898,7 @@ static void copy_speed_effect(Sequence *dst, Sequence *src)
SpeedControlVars * v;
dst->effectdata = MEM_dupallocN(src->effectdata);
v = (SpeedControlVars *)dst->effectdata;
v->frameMap = 0;
v->frameMap = NULL;
v->length = 0;
}
@ -3260,7 +3260,7 @@ static struct SeqEffectHandle get_sequence_effect_impl(int seq_type)
struct SeqEffectHandle get_sequence_effect(Sequence * seq)
{
struct SeqEffectHandle rval= {0};
struct SeqEffectHandle rval= {NULL};
if (seq->type & SEQ_EFFECT) {
rval = get_sequence_effect_impl(seq->type);
@ -3275,7 +3275,7 @@ struct SeqEffectHandle get_sequence_effect(Sequence * seq)
struct SeqEffectHandle get_sequence_blend(Sequence * seq)
{
struct SeqEffectHandle rval= {0};
struct SeqEffectHandle rval= {NULL};
if (seq->blend_mode != 0) {
rval = get_sequence_effect_impl(seq->blend_mode);

View File

@ -135,7 +135,7 @@ static void free_proxy_seq(Sequence *seq)
{
if (seq->strip && seq->strip->proxy && seq->strip->proxy->anim) {
IMB_free_anim(seq->strip->proxy->anim);
seq->strip->proxy->anim = 0;
seq->strip->proxy->anim = NULL;
}
}
@ -429,7 +429,7 @@ void seq_end(SeqIterator *iter)
* in metastrips!)
**********************************************************************
*/
#if 0 /* UNUSED */
static void do_seq_count(ListBase *seqbase, int *totseq)
{
Sequence *seq;
@ -456,7 +456,7 @@ static void do_build_seqar(ListBase *seqbase, Sequence ***seqar, int depth)
}
}
void build_seqar(ListBase *seqbase, Sequence ***seqar, int *totseq)
static void build_seqar(ListBase *seqbase, Sequence ***seqar, int *totseq)
{
Sequence **tseqar;
@ -473,6 +473,7 @@ void build_seqar(ListBase *seqbase, Sequence ***seqar, int *totseq)
do_build_seqar(seqbase, seqar, 0);
*seqar= tseqar;
}
#endif /* UNUSED */
static void do_seq_count_cb(ListBase *seqbase, int *totseq,
int (*test_func)(Sequence * seq))
@ -762,8 +763,8 @@ void sort_seq(Scene *scene)
if(ed==NULL) return;
seqbase.first= seqbase.last= 0;
effbase.first= effbase.last= 0;
seqbase.first= seqbase.last= NULL;
effbase.first= effbase.last= NULL;
while( (seq= ed->seqbasep->first) ) {
BLI_remlink(ed->seqbasep, seq);
@ -777,7 +778,7 @@ void sort_seq(Scene *scene)
}
seqt= seqt->next;
}
if(seqt==0) BLI_addtail(&effbase, seq);
if(seqt==NULL) BLI_addtail(&effbase, seq);
}
else {
seqt= seqbase.first;
@ -788,7 +789,7 @@ void sort_seq(Scene *scene)
}
seqt= seqt->next;
}
if(seqt==0) BLI_addtail(&seqbase, seq);
if(seqt==NULL) BLI_addtail(&seqbase, seq);
}
}
@ -933,7 +934,7 @@ static void make_black_ibuf(ImBuf *ibuf)
float *rect_float;
int tot;
if(ibuf==0 || (ibuf->rect==0 && ibuf->rect_float==0)) return;
if(ibuf==NULL || (ibuf->rect==NULL && ibuf->rect_float==NULL)) return;
tot= ibuf->x*ibuf->y;
@ -1024,7 +1025,7 @@ StripElem *give_stripelem(Sequence *seq, int cfra)
if(seq->type != SEQ_MOVIE) { /* movie use the first */
int nr = (int) give_stripelem_index(seq, cfra);
if (nr == -1 || se == 0) return 0;
if (nr == -1 || se == NULL) return NULL;
se += nr + seq->anim_startofs;
}
@ -1076,7 +1077,7 @@ static int get_shown_sequences( ListBase * seqbasep, int cfra, int chanshown, Se
if(evaluate_seq_frame_gen(seq_arr, seqbasep, cfra)) {
if (b > 0) {
if (seq_arr[b] == 0) {
if (seq_arr[b] == NULL) {
return 0;
}
} else {
@ -1173,38 +1174,38 @@ static struct ImBuf * seq_proxy_fetch(SeqRenderData context, Sequence * seq, int
char name[PROXY_MAXFILE];
if (!(seq->flag & SEQ_USE_PROXY)) {
return 0;
return NULL;
}
/* rendering at 100% ? No real sense in proxy-ing, right? */
if (context.preview_render_size == 100) {
return 0;
return NULL;
}
if (seq->flag & SEQ_USE_PROXY_CUSTOM_FILE) {
int frameno = (int) give_stripelem_index(seq, cfra) + seq->anim_startofs;
if (seq->strip->proxy->anim == NULL) {
if (seq_proxy_get_fname(context, seq, cfra, name)==0) {
return 0;
return NULL;
}
seq->strip->proxy->anim = openanim(name, IB_rect);
}
if (seq->strip->proxy->anim==NULL) {
return 0;
return NULL;
}
return IMB_anim_absolute(seq->strip->proxy->anim, frameno);
}
if (seq_proxy_get_fname(context, seq, cfra, name) == 0) {
return 0;
return NULL;
}
if (BLI_exists(name)) {
return IMB_loadiffname(name, IB_rect);
} else {
return 0;
return NULL;
}
}
@ -1659,7 +1660,7 @@ static ImBuf * input_preprocess(
}
if(seq->flag & SEQ_MAKE_PREMUL) {
if(ibuf->depth == 32 && ibuf->zbuf == 0) {
if(ibuf->depth == 32 && ibuf->zbuf == NULL) {
IMB_premultiply_alpha(ibuf);
}
}
@ -1678,8 +1679,8 @@ static ImBuf * input_preprocess(
static ImBuf * copy_from_ibuf_still(SeqRenderData context, Sequence * seq,
float nr)
{
ImBuf * rval = 0;
ImBuf * ibuf = 0;
ImBuf * rval = NULL;
ImBuf * ibuf = NULL;
if (nr == 0) {
ibuf = seq_stripelem_cache_get(
@ -1828,7 +1829,7 @@ static ImBuf* seq_render_effect_strip_impl(
static ImBuf * seq_render_scene_strip_impl(
SeqRenderData context, Sequence * seq, float nr)
{
ImBuf * ibuf = 0;
ImBuf * ibuf = NULL;
float frame= seq->sfra + nr + seq->anim_startofs;
float oldcfra;
Object *oldcamera;
@ -2065,7 +2066,7 @@ static ImBuf * seq_render_strip(SeqRenderData context, Sequence * seq, float cfr
}
case SEQ_MOVIE:
{
if(seq->anim==0) {
if(seq->anim==NULL) {
BLI_join_dirfile(name, sizeof(name), seq->strip->dir, seq->strip->stripdata->name);
BLI_path_abs(name, G.main->name);
@ -2248,11 +2249,11 @@ static ImBuf* seq_render_strip_stack(
if (swap_input) {
out = sh.execute(context, seq, cfra,
facf, facf,
ibuf2, ibuf1, 0);
ibuf2, ibuf1, NULL);
} else {
out = sh.execute(context, seq, cfra,
facf, facf,
ibuf1, ibuf2, 0);
ibuf1, ibuf2, NULL);
}
IMB_freeImBuf(ibuf1);
@ -2641,7 +2642,7 @@ ImBuf *give_ibuf_seq_threaded(SeqRenderData context, float cfra, int chanshown)
}
}
return e ? e->ibuf : 0;
return e ? e->ibuf : NULL;
}
/* Functions to free imbuf and anim data on changes */
@ -2650,7 +2651,7 @@ static void free_anim_seq(Sequence *seq)
{
if(seq->anim) {
IMB_free_anim(seq->anim);
seq->anim = 0;
seq->anim = NULL;
}
}
@ -3541,7 +3542,7 @@ static Sequence *seq_dupli(struct Scene *scene, struct Scene *scene_to, Sequence
if (seq->strip->proxy) {
seqn->strip->proxy = MEM_dupallocN(seq->strip->proxy);
seqn->strip->proxy->anim = 0;
seqn->strip->proxy->anim = NULL;
}
if (seq->strip->color_balance) {
@ -3550,19 +3551,19 @@ static Sequence *seq_dupli(struct Scene *scene, struct Scene *scene_to, Sequence
}
if(seq->type==SEQ_META) {
seqn->strip->stripdata = 0;
seqn->strip->stripdata = NULL;
seqn->seqbase.first= seqn->seqbase.last= 0;
seqn->seqbase.first= seqn->seqbase.last= NULL;
/* WATCH OUT!!! - This metastrip is not recursively duplicated here - do this after!!! */
/* - seq_dupli_recursive(&seq->seqbase,&seqn->seqbase);*/
} else if(seq->type == SEQ_SCENE) {
seqn->strip->stripdata = 0;
seqn->strip->stripdata = NULL;
if(seq->scene_sound)
seqn->scene_sound = sound_scene_add_scene_sound(sce_audio, seqn, seq->startdisp, seq->enddisp, seq->startofs + seq->anim_startofs);
} else if(seq->type == SEQ_MOVIE) {
seqn->strip->stripdata =
MEM_dupallocN(seq->strip->stripdata);
seqn->anim= 0;
seqn->anim= NULL;
} else if(seq->type == SEQ_SOUND) {
seqn->strip->stripdata =
MEM_dupallocN(seq->strip->stripdata);
@ -3585,7 +3586,7 @@ static Sequence *seq_dupli(struct Scene *scene, struct Scene *scene_to, Sequence
sh.copy(seq, seqn);
}
seqn->strip->stripdata = 0;
seqn->strip->stripdata = NULL;
} else {
fprintf(stderr, "Aiiiiekkk! sequence type not "
@ -3620,7 +3621,7 @@ Sequence * seq_dupli_recursive(struct Scene *scene, struct Scene *scene_to, Sequ
void seqbase_dupli_recursive(Scene *scene, Scene *scene_to, ListBase *nseqbase, ListBase *seqbase, int dupe_flag)
{
Sequence *seq;
Sequence *seqn = 0;
Sequence *seqn = NULL;
Sequence *last_seq = seq_active_get(scene);
for(seq= seqbase->first; seq; seq= seq->next) {

View File

@ -102,7 +102,7 @@ void space_transform_from_matrixs(SpaceTransform *data, float local[4][4], float
{
float itarget[4][4];
invert_m4_m4(itarget, target);
mul_serie_m4(data->local2target, itarget, local, 0, 0, 0, 0, 0, 0);
mul_serie_m4(data->local2target, itarget, local, NULL, NULL, NULL, NULL, NULL, NULL);
invert_m4_m4(data->target2local, data->local2target);
}

View File

@ -54,7 +54,7 @@ void freeSketch(SK_Sketch *sketch)
MEM_freeN(sketch);
}
SK_Sketch* createSketch()
SK_Sketch* createSketch(void)
{
SK_Sketch *sketch;
@ -102,7 +102,7 @@ void sk_freeStroke(SK_Stroke *stk)
MEM_freeN(stk);
}
SK_Stroke* sk_createStroke()
SK_Stroke* sk_createStroke(void)
{
SK_Stroke *stk;

View File

@ -161,7 +161,7 @@ typedef struct SB_thread_context {
#define BFF_CLOSEVERT 2 /* collider vertex repulses face */
float SoftHeunTol = 1.0f; /* humm .. this should be calculated from sb parameters and sizes */
static float SoftHeunTol = 1.0f; /* humm .. this should be calculated from sb parameters and sizes */
/* local prototypes */
static void free_softbody_intern(SoftBody *sb);
@ -261,7 +261,7 @@ float operations still
/* just an ID here to reduce the prob for killing objects
** ob->sumohandle points to we should not kill :)
*/
const int CCD_SAVETY = 190561;
static const int CCD_SAVETY = 190561;
typedef struct ccdf_minmax{
float minx,miny,minz,maxx,maxy,maxz;
@ -549,7 +549,7 @@ static void ccd_build_deflector_hash(Scene *scene, Object *vertexowner, GHash *h
}
/*+++ only with deflecting set */
if(ob->pd && ob->pd->deflect && BLI_ghash_lookup(hash, ob) == 0) {
if(ob->pd && ob->pd->deflect && BLI_ghash_lookup(hash, ob) == NULL) {
DerivedMesh *dm= NULL;
if(ob->softflag & OB_SB_COLLFINAL) /* so maybe someone wants overkill to collide with subsurfed */
@ -1655,7 +1655,7 @@ static void *exec_scan_for_ext_spring_forces(void *data)
{
SB_thread_context *pctx = (SB_thread_context*)data;
_scan_for_ext_spring_forces(pctx->scene, pctx->ob, pctx->timenow, pctx->ifirst, pctx->ilast, pctx->do_effector);
return 0;
return NULL;
}
static void sb_sfesf_threads_run(Scene *scene, struct Object *ob, float timenow,int totsprings,int *UNUSED(ptr_to_break_func(void)))
@ -2382,7 +2382,7 @@ static void *exec_softbody_calc_forces(void *data)
{
SB_thread_context *pctx = (SB_thread_context*)data;
_softbody_calc_forces_slice_in_a_thread(pctx->scene, pctx->ob, pctx->forcetime, pctx->timenow, pctx->ifirst, pctx->ilast, NULL, pctx->do_effector,pctx->do_deflector,pctx->fieldfactor,pctx->windfactor);
return 0;
return NULL;
}
static void sb_cf_threads_run(Scene *scene, Object *ob, float forcetime, float timenow,int totpoint,int *UNUSED(ptr_to_break_func(void)),struct ListBase *do_effector,int do_deflector,float fieldfactor, float windfactor)
@ -3822,7 +3822,7 @@ void SB_estimate_transform(Object *ob,float lloc[3],float lrot[3][3],float lscal
{
BodyPoint *bp;
ReferenceVert *rp;
SoftBody *sb = 0;
SoftBody *sb = NULL;
float (*opos)[3];
float (*rpos)[3];
float com[3],rcom[3];

View File

@ -74,7 +74,7 @@ void sound_force_device(int device)
force_device = device;
}
void sound_init_once()
void sound_init_once(void)
{
AUD_initOnce();
}
@ -115,7 +115,7 @@ void sound_init(struct Main *bmain)
#endif
}
void sound_exit()
void sound_exit(void)
{
AUD_exit();
}
@ -382,7 +382,7 @@ void sound_move_scene_sound(struct Scene *scene, void* handle, int startframe, i
AUD_moveSequencer(scene->sound_scene, handle, startframe / FPS, endframe / FPS, frameskip / FPS);
}
void sound_start_play_scene(struct Scene *scene)
static void sound_start_play_scene(struct Scene *scene)
{
scene->sound_scene_handle = AUD_play(scene->sound_scene, 1);
AUD_setLoop(scene->sound_scene_handle, -1);

View File

@ -77,7 +77,7 @@ static void txttl_free_docs(void) {
/* General tool functions */
/**************************/
void free_texttools() {
void free_texttools(void) {
txttl_free_suggest();
txttl_free_docs();
}
@ -191,15 +191,15 @@ void texttool_suggest_prefix(const char *prefix) {
}
}
void texttool_suggest_clear() {
void texttool_suggest_clear(void) {
txttl_free_suggest();
}
SuggItem *texttool_suggest_first() {
SuggItem *texttool_suggest_first(void) {
return suggestions.firstmatch;
}
SuggItem *texttool_suggest_last() {
SuggItem *texttool_suggest_last(void) {
return suggestions.lastmatch;
}
@ -207,11 +207,11 @@ void texttool_suggest_select(SuggItem *sel) {
suggestions.selected = sel;
}
SuggItem *texttool_suggest_selected() {
SuggItem *texttool_suggest_selected(void) {
return suggestions.selected;
}
int *texttool_suggest_top() {
int *texttool_suggest_top(void) {
return &suggestions.top;
}
@ -243,10 +243,10 @@ void texttool_docs_show(const char *docs) {
documentation[len] = '\0';
}
char *texttool_docs_get() {
char *texttool_docs_get(void) {
return documentation;
}
void texttool_docs_clear() {
void texttool_docs_clear(void) {
txttl_free_docs();
}

View File

@ -93,14 +93,14 @@ void open_plugin_tex(PluginTex *pit)
int (*version)(void);
/* init all the happy variables */
pit->doit= 0;
pit->pname= 0;
pit->stnames= 0;
pit->varstr= 0;
pit->result= 0;
pit->cfra= 0;
pit->doit= NULL;
pit->pname= NULL;
pit->stnames= NULL;
pit->varstr= NULL;
pit->result= NULL;
pit->cfra= NULL;
pit->version= 0;
pit->instance_init= 0;
pit->instance_init= NULL;
/* clear the error list */
PIL_dynlib_get_error_as_string(NULL);
@ -113,12 +113,12 @@ void open_plugin_tex(PluginTex *pit)
pit->handle= PIL_dynlib_open(pit->name);
if(test_dlerr(pit->name, pit->name)) return;
if (pit->handle != 0) {
if (pit->handle != NULL) {
/* find the address of the version function */
version= (int (*)(void)) PIL_dynlib_find_symbol(pit->handle, "plugin_tex_getversion");
if (test_dlerr(pit->name, "plugin_tex_getversion")) return;
if (version != 0) {
if (version != NULL) {
pit->version= version();
if( pit->version >= 2 && pit->version <=6) {
int (*info_func)(PluginInfo *);
@ -168,8 +168,8 @@ PluginTex *add_plugin_tex(char *str)
strcpy(pit->name, str);
open_plugin_tex(pit);
if(pit->doit==0) {
if(pit->handle==0) {;} //XXX error("no plugin: %s", str);
if(pit->doit==NULL) {
if(pit->handle==NULL) {;} //XXX error("no plugin: %s", str);
else {;} //XXX error("in plugin: %s", str);
MEM_freeN(pit);
return NULL;
@ -193,7 +193,7 @@ PluginTex *add_plugin_tex(char *str)
void free_plugin_tex(PluginTex *pit)
{
if(pit==0) return;
if(pit==NULL) return;
/* no PIL_dynlib_close: same plugin can be opened multiple times, 1 handle */
MEM_freeN(pit);
@ -619,7 +619,7 @@ void default_mtex(MTex *mtex)
{
mtex->texco= TEXCO_ORCO;
mtex->mapto= MAP_COL;
mtex->object= 0;
mtex->object= NULL;
mtex->projx= PROJ_X;
mtex->projy= PROJ_Y;
mtex->projz= PROJ_Z;
@ -630,7 +630,7 @@ void default_mtex(MTex *mtex)
mtex->size[0]= 1.0;
mtex->size[1]= 1.0;
mtex->size[2]= 1.0;
mtex->tex= 0;
mtex->tex= NULL;
mtex->texflag= MTEX_3TAP_BUMP | MTEX_BUMP_OBJECTSPACE;
mtex->colormodel= 0;
mtex->r= 1.0;
@ -681,7 +681,7 @@ void default_mtex(MTex *mtex)
/* ------------------------------------------------------------------------- */
MTex *add_mtex()
MTex *add_mtex(void)
{
MTex *mtex;
@ -743,7 +743,7 @@ Tex *copy_texture(Tex *tex)
texn= copy_libblock(tex);
if(texn->type==TEX_IMAGE) id_us_plus((ID *)texn->ima);
else texn->ima= 0;
else texn->ima= NULL;
#if 0 // XXX old animation system
id_us_plus((ID *)texn->ipo);
@ -786,19 +786,19 @@ void make_local_texture(Tex *tex)
* - mixed: make copy
*/
if(tex->id.lib==0) return;
if(tex->id.lib==NULL) return;
/* special case: ima always local immediately */
if(tex->ima) {
tex->ima->id.lib= 0;
tex->ima->id.lib= NULL;
tex->ima->id.flag= LIB_LOCAL;
new_id(0, (ID *)tex->ima, 0);
new_id(NULL, (ID *)tex->ima, NULL);
}
if(tex->id.us==1) {
tex->id.lib= 0;
tex->id.lib= NULL;
tex->id.flag= LIB_LOCAL;
new_id(0, (ID *)tex, 0);
new_id(NULL, (ID *)tex, NULL);
return;
}
@ -843,9 +843,9 @@ void make_local_texture(Tex *tex)
}
if(local && lib==0) {
tex->id.lib= 0;
tex->id.lib= NULL;
tex->id.flag= LIB_LOCAL;
new_id(0, (ID *)tex, 0);
new_id(NULL, (ID *)tex, NULL);
}
else if(local && lib) {
texn= copy_texture(tex);
@ -855,7 +855,7 @@ void make_local_texture(Tex *tex)
while(ma) {
for(a=0; a<MAX_MTEX; a++) {
if(ma->mtex[a] && ma->mtex[a]->tex==tex) {
if(ma->id.lib==0) {
if(ma->id.lib==NULL) {
ma->mtex[a]->tex= texn;
texn->id.us++;
tex->id.us--;
@ -868,7 +868,7 @@ void make_local_texture(Tex *tex)
while(la) {
for(a=0; a<MAX_MTEX; a++) {
if(la->mtex[a] && la->mtex[a]->tex==tex) {
if(la->id.lib==0) {
if(la->id.lib==NULL) {
la->mtex[a]->tex= texn;
texn->id.us++;
tex->id.us--;
@ -881,7 +881,7 @@ void make_local_texture(Tex *tex)
while(wrld) {
for(a=0; a<MAX_MTEX; a++) {
if(wrld->mtex[a] && wrld->mtex[a]->tex==tex) {
if(wrld->id.lib==0) {
if(wrld->id.lib==NULL) {
wrld->mtex[a]->tex= texn;
texn->id.us++;
tex->id.us--;
@ -893,7 +893,7 @@ void make_local_texture(Tex *tex)
br= bmain->brush.first;
while(br) {
if(br->mtex.tex==tex) {
if(br->id.lib==0) {
if(br->id.lib==NULL) {
br->mtex.tex= texn;
texn->id.us++;
tex->id.us--;
@ -943,8 +943,8 @@ Tex *give_current_object_texture(Object *ob)
Material *ma;
Tex *tex= NULL;
if(ob==0) return 0;
if(ob->totcol==0 && !(ob->type==OB_LAMP)) return 0;
if(ob==NULL) return NULL;
if(ob->totcol==0 && !(ob->type==OB_LAMP)) return NULL;
if(ob->type==OB_LAMP) {
tex= give_current_lamp_texture(ob->data);
@ -1124,7 +1124,7 @@ Tex *give_current_world_texture(World *world)
MTex *mtex= NULL;
Tex *tex= NULL;
if(!world) return 0;
if(!world) return NULL;
mtex= world->mtex[(int)(world->texact)];
if(mtex) tex= mtex->tex;
@ -1175,7 +1175,7 @@ Tex *give_current_particle_texture(ParticleSettings *part)
MTex *mtex= NULL;
Tex *tex= NULL;
if(!part) return 0;
if(!part) return NULL;
mtex= part->mtex[(int)(part->texact)];
if(mtex) tex= mtex->tex;

View File

@ -264,10 +264,10 @@ static struct bUnitCollection buNaturalRotCollection = {buNaturalRotDef, 0, 0, s
#define UNIT_SYSTEM_TOT (((sizeof(bUnitSystems) / 9) / sizeof(void *)) - 1)
static struct bUnitCollection *bUnitSystems[][9] = {
{0, 0, 0, 0, 0, &buNaturalRotCollection, &buNaturalTimeCollecton, 0, 0},
{0, &buMetricLenCollecton, &buMetricAreaCollecton, &buMetricVolCollecton, &buMetricMassCollecton, &buNaturalRotCollection, &buNaturalTimeCollecton, &buMetricVelCollecton, &buMetricAclCollecton}, /* metric */
{0, &buImperialLenCollecton, &buImperialAreaCollecton, &buImperialVolCollecton, &buImperialMassCollecton, &buNaturalRotCollection, &buNaturalTimeCollecton, &buImperialVelCollecton, &buImperialAclCollecton}, /* imperial */
{0, 0, 0, 0, 0, 0, 0, 0, 0}
{NULL, NULL, NULL, NULL, NULL, &buNaturalRotCollection, &buNaturalTimeCollecton, NULL, NULL},
{NULL, &buMetricLenCollecton, &buMetricAreaCollecton, &buMetricVolCollecton, &buMetricMassCollecton, &buNaturalRotCollection, &buNaturalTimeCollecton, &buMetricVelCollecton, &buMetricAclCollecton}, /* metric */
{NULL, &buImperialLenCollecton, &buImperialAreaCollecton, &buImperialVolCollecton, &buImperialMassCollecton, &buNaturalRotCollection, &buNaturalTimeCollecton, &buImperialVelCollecton, &buImperialAclCollecton}, /* imperial */
{NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
};

View File

@ -38,6 +38,7 @@
#include "DNA_scene_types.h"
#include "DNA_texture_types.h"
#include "BKE_world.h"
#include "BKE_library.h"
#include "BKE_animsys.h"
#include "BKE_global.h"
@ -136,11 +137,11 @@ void make_local_world(World *wrld)
* - mixed: make copy
*/
if(wrld->id.lib==0) return;
if(wrld->id.lib==NULL) return;
if(wrld->id.us==1) {
wrld->id.lib= 0;
wrld->id.lib= NULL;
wrld->id.flag= LIB_LOCAL;
new_id(0, (ID *)wrld, 0);
new_id(NULL, (ID *)wrld, NULL);
return;
}
@ -156,7 +157,7 @@ void make_local_world(World *wrld)
if(local && lib==0) {
wrld->id.lib= 0;
wrld->id.flag= LIB_LOCAL;
new_id(0, (ID *)wrld, 0);
new_id(NULL, (ID *)wrld, NULL);
}
else if(local && lib) {
wrldn= copy_world(wrld);
@ -165,7 +166,7 @@ void make_local_world(World *wrld)
sce= bmain->scene.first;
while(sce) {
if(sce->world==wrld) {
if(sce->id.lib==0) {
if(sce->id.lib==NULL) {
sce->world= wrldn;
wrldn->id.us++;
wrld->id.us--;

View File

@ -228,7 +228,7 @@ BM_INLINE int BLI_ghash_remove (GHash *gh, void *key, GHashKeyFreeFP keyfreefp,
{
unsigned int hash= gh->hashfp(key)%gh->nbuckets;
Entry *e;
Entry *p = 0;
Entry *p = NULL;
for (e= gh->buckets[hash]; e; e= e->next) {
if (gh->cmpfp(key, e->key)==0) {

View File

@ -39,7 +39,7 @@
#include "BLI_args.h"
#include "BLI_ghash.h"
char NO_DOCS[] = "NO DOCUMENTATION SPECIFIED";
static char NO_DOCS[] = "NO DOCUMENTATION SPECIFIED";
struct bArgDoc;
typedef struct bArgDoc {

View File

@ -90,7 +90,7 @@ void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreef
MEM_freeN(gh->buckets);
BLI_mempool_destroy(gh->entrypool);
gh->buckets = 0;
gh->buckets = NULL;
gh->nentries = 0;
gh->nbuckets = 0;
MEM_freeN(gh);

View File

@ -64,7 +64,7 @@ struct Heap {
/***/
Heap *BLI_heap_new()
Heap *BLI_heap_new(void)
{
Heap *heap = (Heap*)MEM_callocN(sizeof(Heap), "BLIHeap");
heap->bufsize = 1;

View File

@ -161,7 +161,7 @@ static float KDOP_AXES[13][3] =
heap[parent] = element; \
}
int ADJUST_MEMORY(void *local_memblock, void **memblock, int new_size, int *max_size, int size_per_item)
static int ADJUST_MEMORY(void *local_memblock, void **memblock, int new_size, int *max_size, int size_per_item)
{
int new_max_size = *max_size * 2;
void *new_memblock = NULL;
@ -1137,11 +1137,11 @@ BVHTreeOverlap *BLI_bvhtree_overlap(BVHTree *tree1, BVHTree *tree2, unsigned int
// check for compatibility of both trees (can't compare 14-DOP with 18-DOP)
if((tree1->axis != tree2->axis) && (tree1->axis == 14 || tree2->axis == 14) && (tree1->axis == 18 || tree2->axis == 18))
return 0;
return NULL;
// fast check root nodes for collision before doing big splitting + traversal
if(!tree_overlap(tree1->nodes[tree1->totleaf], tree2->nodes[tree2->totleaf], MIN2(tree1->start_axis, tree2->start_axis), MIN2(tree1->stop_axis, tree2->stop_axis)))
return 0;
return NULL;
data = MEM_callocN(sizeof(BVHOverlapData *)* tree1->tree_type, "BVHOverlapData_star");

View File

@ -255,7 +255,7 @@ static void add_nearest(KDTreeNearest *ptn, int *found, int n, int index, float
/* finds the nearest n entries in tree to specified coordinates */
int BLI_kdtree_find_n_nearest(KDTree *tree, int n, float *co, float *nor, KDTreeNearest *nearest)
{
KDTreeNode *root, *node=0;
KDTreeNode *root, *node= NULL;
KDTreeNode **stack, *defaultstack[100];
float cur_dist;
int i, totstack, cur=0, found=0;
@ -370,7 +370,7 @@ static void add_in_range(KDTreeNearest **ptn, int found, int *totfoundstack, int
}
int BLI_kdtree_range_search(KDTree *tree, float range, float *co, float *nor, KDTreeNearest **nearest)
{
KDTreeNode *root, *node=0;
KDTreeNode *root, *node= NULL;
KDTreeNode **stack, *defaultstack[100];
KDTreeNearest *foundstack=NULL;
float range2 = range*range, dist2;

View File

@ -141,7 +141,7 @@ void BLI_bpathIterator_init(struct BPathIterator **bpi_pt, Main *bmain, const ch
BLI_bpathIterator_step(bpi);
}
void BLI_bpathIterator_alloc(struct BPathIterator **bpi) {
static void BLI_bpathIterator_alloc(struct BPathIterator **bpi) {
*bpi= MEM_mallocN(sizeof(BPathIterator), "BLI_bpathIterator_alloc");
}
@ -797,7 +797,7 @@ static int findFileRecursive(char *filename_new, const char *dirname, const char
dir= opendir(dirname);
if (dir==0)
if (dir==NULL)
return 0;
if (*filesize == -1)

View File

@ -367,7 +367,7 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile * pf)
// No charmap found from the ttf so we need to figure it out
if(glyph_index == 0)
{
FT_CharMap found = 0;
FT_CharMap found = NULL;
FT_CharMap charmap;
int n;
@ -477,7 +477,7 @@ VFontData *BLI_vfontdata_from_freetypefont(PackedFile *pf)
err = FT_Init_FreeType( &library);
if(err) {
//XXX error("Failed to load the Freetype font library");
return 0;
return NULL;
}
success = check_freetypefont(pf);

View File

@ -296,7 +296,7 @@ BNode * BLI_FindNodeByPosition(BGraph *graph, float *p, float limit)
}
/************************************* SUBGRAPH DETECTION **********************************************/
void flagSubgraph(BNode *node, int subgraph)
static void flagSubgraph(BNode *node, int subgraph)
{
if (node->subgraph_index == 0)
{
@ -425,7 +425,7 @@ BArc * BLI_findConnectedArc(BGraph *graph, BArc *arc, BNode *v)
/*********************************** GRAPH AS TREE FUNCTIONS *******************************************/
int subtreeShape(BNode *node, BArc *rootArc, int include_root)
static int subtreeShape(BNode *node, BArc *rootArc, int include_root)
{
int depth = 0;

View File

@ -48,9 +48,9 @@
/* Ripped this from blender.c */
void BLI_movelisttolist(ListBase *dst, ListBase *src)
{
if (src->first==0) return;
if (src->first==NULL) return;
if (dst->first==0) {
if (dst->first==NULL) {
dst->first= src->first;
dst->last= src->last;
}
@ -59,7 +59,7 @@ void BLI_movelisttolist(ListBase *dst, ListBase *src)
((Link *)src->first)->prev= dst->last;
dst->last= src->last;
}
src->first= src->last= 0;
src->first= src->last= NULL;
}
void BLI_addhead(ListBase *listbase, void *vlink)
@ -89,7 +89,7 @@ void BLI_addtail(ListBase *listbase, void *vlink)
link->prev = listbase->last;
if (listbase->last) ((Link *)listbase->last)->next = link;
if (listbase->first == 0) listbase->first = link;
if (listbase->first == NULL) listbase->first = link;
listbase->last = link;
}
@ -152,7 +152,7 @@ void BLI_insertlink(ListBase *listbase, void *vprevlink, void *vnewlink)
/* insert before first element */
if (prevlink == NULL) {
newlink->next= listbase->first;
newlink->prev= 0;
newlink->prev= NULL;
newlink->next->prev= newlink;
listbase->first= newlink;
return;
@ -251,7 +251,7 @@ void BLI_insertlinkbefore(ListBase *listbase, void *vnextlink, void *vnewlink)
/* insert at end of list */
if (nextlink == NULL) {
newlink->prev= listbase->last;
newlink->next= 0;
newlink->next= NULL;
((Link *)listbase->last)->next= newlink;
listbase->last= newlink;
return;
@ -422,7 +422,7 @@ void BLI_duplicatelist(ListBase *dst, const ListBase *src)
/* in this order, to ensure it works if dst == src */
src_link= src->first;
dst->first= dst->last= 0;
dst->first= dst->last= NULL;
while(src_link) {
dst_link= MEM_dupallocN(src_link);

View File

@ -2080,7 +2080,7 @@ pointers may be NULL if not needed
*/
/* can't believe there is none in math utils */
float _det_m3(float m2[3][3])
static float _det_m3(float m2[3][3])
{
float det = 0.f;
if (m2){

View File

@ -242,7 +242,7 @@ void mul_serie_m3(float answ[][3],
{
float temp[3][3];
if(m1==0 || m2==0) return;
if(m1==NULL || m2==NULL) return;
mul_m3_m3m3(answ, m2, m1);
if(m3) {
@ -275,7 +275,7 @@ void mul_serie_m4(float answ[][4], float m1[][4],
{
float temp[4][4];
if(m1==0 || m2==0) return;
if(m1==NULL || m2==NULL) return;
mul_m4_m4m4(answ, m2, m1);
if(m3) {
@ -1708,5 +1708,5 @@ void pseudoinverse_m4_m4(float Ainv[4][4], float A[4][4], float epsilon)
transpose_m4(V);
mul_serie_m4(Ainv, U, Wm, V, 0, 0, 0, 0, 0);
mul_serie_m4(Ainv, U, Wm, V, NULL, NULL, NULL, NULL, NULL);
}

View File

@ -1431,7 +1431,7 @@ void mat4_to_dquat(DualQuat *dq,float basemat[][4], float mat[][4])
mul_m4_m4m4(S, baseRS, baseRinv);
/* set scaling part */
mul_serie_m4(dq->scale, basemat, S, baseinv, 0, 0, 0, 0, 0);
mul_serie_m4(dq->scale, basemat, S, baseinv, NULL, NULL, NULL, NULL, NULL);
dq->scale_weight= 1.0f;
}
else {

View File

@ -422,7 +422,7 @@ static void split_libdata(ListBase *lb, Main *first)
}
mainvar= mainvar->next;
}
if(mainvar==0) printf("error split_libdata\n");
if(mainvar==NULL) printf("error split_libdata\n");
}
id= idnext;
}
@ -589,7 +589,7 @@ static void bh8_from_bh4(BHead *bhead, BHead4 *bhead4)
static BHeadN *get_bhead(FileData *fd)
{
BHeadN *new_bhead = 0;
BHeadN *new_bhead = NULL;
int readsize;
if (fd) {
@ -654,7 +654,7 @@ static BHeadN *get_bhead(FileData *fd)
if ( ! fd->eof) {
new_bhead = MEM_mallocN(sizeof(BHeadN) + bhead.len, "new_bhead");
if (new_bhead) {
new_bhead->next = new_bhead->prev = 0;
new_bhead->next = new_bhead->prev = NULL;
new_bhead->bhead = bhead;
readsize = fd->read(fd, new_bhead + 1, bhead.len);
@ -662,7 +662,7 @@ static BHeadN *get_bhead(FileData *fd)
if (readsize != bhead.len) {
fd->eof = 1;
MEM_freeN(new_bhead);
new_bhead = 0;
new_bhead = NULL;
}
} else {
fd->eof = 1;
@ -684,13 +684,13 @@ static BHeadN *get_bhead(FileData *fd)
BHead *blo_firstbhead(FileData *fd)
{
BHeadN *new_bhead;
BHead *bhead = 0;
BHead *bhead = NULL;
// Rewind the file
// Read in a new block if necessary
new_bhead = fd->listbase.first;
if (new_bhead == 0) {
if (new_bhead == NULL) {
new_bhead = get_bhead(fd);
}
@ -721,7 +721,7 @@ BHead *blo_nextbhead(FileData *fd, BHead *thisblock)
// get the next BHeadN. If it doesn't exist we read in the next one
new_bhead = new_bhead->next;
if (new_bhead == 0) {
if (new_bhead == NULL) {
new_bhead = get_bhead(fd);
}
}
@ -944,7 +944,7 @@ FileData *blo_openblenderfile(const char *name, ReportList *reports)
errno= 0;
gzfile= gzopen(name, "rb");
if (gzfile == Z_NULL) {
if (gzfile == (gzFile)Z_NULL) {
BKE_reportf(reports, RPT_ERROR, "Unable to open \"%s\": %s.", name, errno ? strerror(errno) : "Unknown erro reading file");
return NULL;
} else {
@ -1007,7 +1007,7 @@ void blo_freefiledata(FileData *fd)
if (fd->buffer && !(fd->flags & FD_FLAGS_NOT_MY_BUFFER)) {
MEM_freeN(fd->buffer);
fd->buffer = 0;
fd->buffer = NULL;
}
// Free all BHeadN data blocks
@ -1061,7 +1061,7 @@ int BLO_is_a_library(const char *path, char *dir, char *group)
/* Find the last slash */
fd= BLI_last_slash(dir);
if(fd==0) return 0;
if(fd==NULL) return 0;
*fd= 0;
if(BLO_has_bfile_extension(fd+1)) {
/* the last part of the dir is a .blend file, no group follows */
@ -1310,7 +1310,7 @@ static void link_glob_list(FileData *fd, ListBase *lb) /* for glob data */
Link *ln, *prev;
void *poin;
if(lb->first==0) return;
if(lb->first==NULL) return;
poin= newdataadr(fd, lb->first);
if(lb->first) {
oldnewmap_insert(fd->globmap, lb->first, poin, 0);
@ -1318,7 +1318,7 @@ static void link_glob_list(FileData *fd, ListBase *lb) /* for glob data */
lb->first= poin;
ln= lb->first;
prev= 0;
prev= NULL;
while(ln) {
poin= newdataadr(fd, ln->next);
if(ln->next) {
@ -1459,7 +1459,7 @@ static void IDP_DirectLinkGroup(IDProperty *prop, int switch_endian, FileData *f
}
}
void IDP_DirectLinkProperty(IDProperty *prop, int switch_endian, FileData *fd)
static void IDP_DirectLinkProperty(IDProperty *prop, int switch_endian, FileData *fd)
{
switch (prop->type) {
case IDP_GROUP:
@ -1496,7 +1496,7 @@ void IDP_DirectLinkProperty(IDProperty *prop, int switch_endian, FileData *fd)
}
/*stub function*/
void IDP_LibLinkProperty(IDProperty *UNUSED(prop), int UNUSED(switch_endian), FileData *UNUSED(fd))
static void IDP_LibLinkProperty(IDProperty *UNUSED(prop), int UNUSED(switch_endian), FileData *UNUSED(fd))
{
}
@ -2755,7 +2755,7 @@ static void direct_link_curve(FileData *fd, Curve *cu)
if(cu->vfont == NULL) link_list(fd, &(cu->nurb));
else {
cu->nurb.first=cu->nurb.last= 0;
cu->nurb.first=cu->nurb.last= NULL;
tb= MEM_callocN(MAXTEXTBOX*sizeof(TextBox), "TextBoxread");
if (cu->tb) {
@ -2829,7 +2829,7 @@ static void direct_link_texture(FileData *fd, Tex *tex)
tex->plugin= newdataadr(fd, tex->plugin);
if(tex->plugin) {
tex->plugin->handle= 0;
tex->plugin->handle= NULL;
open_plugin_tex(tex->plugin);
/* initialize data for this instance, if an initialization
* function exists.
@ -3007,7 +3007,7 @@ static void direct_link_pointcache_list(FileData *fd, ListBase *ptcaches, PointC
}
}
void lib_link_partdeflect(FileData *fd, ID *id, PartDeflect *pd)
static void lib_link_partdeflect(FileData *fd, ID *id, PartDeflect *pd)
{
if(pd && pd->tex)
pd->tex=newlibadr_us(fd, id->lib, pd->tex);
@ -3813,7 +3813,7 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
if (md->type==eModifierType_Subsurf) {
SubsurfModifierData *smd = (SubsurfModifierData*) md;
smd->emCache = smd->mCache = 0;
smd->emCache = smd->mCache = NULL;
}
else if (md->type==eModifierType_Armature) {
ArmatureModifierData *amd = (ArmatureModifierData*) md;
@ -3848,7 +3848,7 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
fluidmd->fss= newdataadr(fd, fluidmd->fss);
fluidmd->fss->fmd= fluidmd;
fluidmd->fss->meshSurfNormals = 0;
fluidmd->fss->meshSurfNormals = NULL;
}
else if (md->type==eModifierType_Smoke) {
SmokeModifierData *smd = (SmokeModifierData*) md;
@ -3959,7 +3959,7 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
} else if (md->type==eModifierType_Explode) {
ExplodeModifierData *psmd = (ExplodeModifierData*) md;
psmd->facepa=0;
psmd->facepa=NULL;
}
else if (md->type==eModifierType_MeshDeform) {
MeshDeformModifierData *mmd = (MeshDeformModifierData*) md;
@ -4126,7 +4126,7 @@ static void direct_link_object(FileData *fd, Object *ob)
prop= ob->prop.first;
while(prop) {
prop->poin= newdataadr(fd, prop->poin);
if(prop->poin==0) prop->poin= &prop->data;
if(prop->poin==NULL) prop->poin= &prop->data;
prop= prop->next;
}
@ -4273,7 +4273,7 @@ static void lib_link_scene(FileData *fd, Main *main)
BKE_reportf(fd->reports, RPT_ERROR, "LIB ERROR: Object lost from scene:'%s\'\n", sce->id.name+2);
if(G.background==0) printf("LIB ERROR: base removed from scene:'%s\'\n", sce->id.name+2);
BLI_remlink(&sce->base, base);
if(base==sce->basact) sce->basact= 0;
if(base==sce->basact) sce->basact= NULL;
MEM_freeN(base);
}
}
@ -4296,7 +4296,7 @@ static void lib_link_scene(FileData *fd, Main *main)
seq->scene_sound = sound_add_scene_sound(sce, seq, seq->startdisp, seq->enddisp, seq->startofs + seq->anim_startofs);
}
}
seq->anim= 0;
seq->anim= NULL;
}
SEQ_END
@ -4356,7 +4356,7 @@ static void direct_link_scene(FileData *fd, Scene *sce)
sce->theDag = NULL;
sce->dagisvalid = 0;
sce->obedit= NULL;
sce->stats= 0;
sce->stats= NULL;
sce->fps_info= NULL;
sound_create_scene(sce);
@ -4399,7 +4399,7 @@ static void direct_link_scene(FileData *fd, Scene *sce)
seq->seq2= newdataadr(fd, seq->seq2);
seq->seq3= newdataadr(fd, seq->seq3);
/* a patch: after introduction of effects with 3 input strips */
if(seq->seq3==0) seq->seq3= seq->seq2;
if(seq->seq3==NULL) seq->seq3= seq->seq2;
seq->plugin= newdataadr(fd, seq->plugin);
seq->effectdata= newdataadr(fd, seq->effectdata);
@ -4423,32 +4423,32 @@ static void direct_link_scene(FileData *fd, Scene *sce)
seq->strip->stripdata = newdataadr(
fd, seq->strip->stripdata);
} else {
seq->strip->stripdata = 0;
seq->strip->stripdata = NULL;
}
if (seq->flag & SEQ_USE_CROP) {
seq->strip->crop = newdataadr(
fd, seq->strip->crop);
} else {
seq->strip->crop = 0;
seq->strip->crop = NULL;
}
if (seq->flag & SEQ_USE_TRANSFORM) {
seq->strip->transform = newdataadr(
fd, seq->strip->transform);
} else {
seq->strip->transform = 0;
seq->strip->transform = NULL;
}
if (seq->flag & SEQ_USE_PROXY) {
seq->strip->proxy = newdataadr(
fd, seq->strip->proxy);
seq->strip->proxy->anim = 0;
seq->strip->proxy->anim = NULL;
} else {
seq->strip->proxy = 0;
seq->strip->proxy = NULL;
}
if (seq->flag & SEQ_USE_COLOR_BALANCE) {
seq->strip->color_balance = newdataadr(
fd, seq->strip->color_balance);
} else {
seq->strip->color_balance = 0;
seq->strip->color_balance = NULL;
}
if (seq->strip->color_balance) {
// seq->strip->color_balance->gui = 0; // XXX - peter, is this relevant in 2.5?

View File

@ -214,8 +214,6 @@ static void writedata_free(WriteData *wd)
/***/
int mywfile;
/**
* Low level WRITE(2) wrapper that buffers data
* @param adr Pointer to new chunk of data
@ -343,7 +341,7 @@ static void writedata(WriteData *wd, int filecode, int len, void *adr) /* do not
{
BHead bh;
if(adr==0) return;
if(adr==NULL) return;
if(len==0) return;
len+= 3;

View File

@ -464,7 +464,7 @@ static void *acf_summary_setting_ptr(bAnimListElem *ale, int setting, short *typ
else {
/* can't return anything useful - unsupported */
*type= 0;
return 0;
return NULL;
}
}
@ -565,7 +565,7 @@ static void *acf_scene_setting_ptr(bAnimListElem *ale, int setting, short *type)
return NULL;
default: /* unsupported */
return 0;
return NULL;
}
}
@ -709,7 +709,7 @@ static void *acf_object_setting_ptr(bAnimListElem *ale, int setting, short *type
return NULL;
default: /* unsupported */
return 0;
return NULL;
}
}
@ -990,13 +990,13 @@ static void *acf_fillactd_setting_ptr(bAnimListElem *ale, int setting, short *ty
GET_ACF_FLAG_PTR(adt->flag);
}
else
return 0;
return NULL;
case ACHANNEL_SETTING_EXPAND: /* expanded */
GET_ACF_FLAG_PTR(act->flag);
default: /* unsupported */
return 0;
return NULL;
}
}
@ -1074,7 +1074,7 @@ static void *acf_filldrivers_setting_ptr(bAnimListElem *ale, int setting, short
GET_ACF_FLAG_PTR(adt->flag);
default: /* unsupported */
return 0;
return NULL;
}
}
@ -2564,7 +2564,7 @@ static bAnimChannelType *animchannelTypeInfo[ANIMTYPE_NUM_TYPES];
static short ACF_INIT= 1; /* when non-zero, the list needs to be updated */
/* Initialise type info definitions */
void ANIM_init_channel_typeinfo_data (void)
static void ANIM_init_channel_typeinfo_data (void)
{
int type= 0;

View File

@ -527,7 +527,7 @@ void ANIM_fcurve_delete_from_animdata (bAnimContext *ac, AnimData *adt, FCurve *
/* ****************** Operator Utilities ********************************** */
/* poll callback for being in an Animation Editor channels list region */
int animedit_poll_channels_active (bContext *C)
static int animedit_poll_channels_active (bContext *C)
{
ScrArea *sa= CTX_wm_area(C);
@ -543,7 +543,7 @@ int animedit_poll_channels_active (bContext *C)
}
/* poll callback for Animation Editor channels list region + not in NLA-tweakmode for NLA */
int animedit_poll_channels_nla_tweakmode_off (bContext *C)
static int animedit_poll_channels_nla_tweakmode_off (bContext *C)
{
ScrArea *sa= CTX_wm_area(C);
Scene *scene = CTX_data_scene(C);
@ -1067,7 +1067,7 @@ static int animchannels_rearrange_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
void ANIM_OT_channels_move (wmOperatorType *ot)
static void ANIM_OT_channels_move (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Move Channels";
@ -1170,7 +1170,7 @@ static int animchannels_delete_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
}
void ANIM_OT_channels_delete (wmOperatorType *ot)
static void ANIM_OT_channels_delete (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Delete Channels";
@ -1247,7 +1247,7 @@ static int animchannels_visibility_set_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
}
void ANIM_OT_channels_visibility_set (wmOperatorType *ot)
static void ANIM_OT_channels_visibility_set (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Set Visibility";
@ -1320,7 +1320,7 @@ static int animchannels_visibility_toggle_exec(bContext *C, wmOperator *UNUSED(o
return OPERATOR_FINISHED;
}
void ANIM_OT_channels_visibility_toggle (wmOperatorType *ot)
static void ANIM_OT_channels_visibility_toggle (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Toggle Visibility";
@ -1452,7 +1452,7 @@ static int animchannels_setflag_exec(bContext *C, wmOperator *op)
}
void ANIM_OT_channels_setting_enable (wmOperatorType *ot)
static void ANIM_OT_channels_setting_enable (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Enable Channel Setting";
@ -1474,7 +1474,7 @@ void ANIM_OT_channels_setting_enable (wmOperatorType *ot)
ot->prop= RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, 0, "Type", "");
}
void ANIM_OT_channels_setting_disable (wmOperatorType *ot)
static void ANIM_OT_channels_setting_disable (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Disable Channel Setting";
@ -1496,7 +1496,7 @@ void ANIM_OT_channels_setting_disable (wmOperatorType *ot)
ot->prop= RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, 0, "Type", "");
}
void ANIM_OT_channels_setting_invert (wmOperatorType *ot)
static void ANIM_OT_channels_setting_invert (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Invert Channel Setting";
@ -1518,7 +1518,7 @@ void ANIM_OT_channels_setting_invert (wmOperatorType *ot)
ot->prop= RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, 0, "Type", "");
}
void ANIM_OT_channels_setting_toggle (wmOperatorType *ot)
static void ANIM_OT_channels_setting_toggle (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Toggle Channel Setting";
@ -1540,7 +1540,7 @@ void ANIM_OT_channels_setting_toggle (wmOperatorType *ot)
ot->prop= RNA_def_enum(ot->srna, "type", prop_animchannel_settings_types, 0, "Type", "");
}
void ANIM_OT_channels_editable_toggle (wmOperatorType *ot)
static void ANIM_OT_channels_editable_toggle (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Toggle Channel Editability";
@ -1585,7 +1585,7 @@ static int animchannels_expand_exec (bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
void ANIM_OT_channels_expand (wmOperatorType *ot)
static void ANIM_OT_channels_expand (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Expand Channels";
@ -1627,7 +1627,7 @@ static int animchannels_collapse_exec (bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
void ANIM_OT_channels_collapse (wmOperatorType *ot)
static void ANIM_OT_channels_collapse (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Collapse Channels";
@ -1694,7 +1694,7 @@ static int animchannels_enable_exec (bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
}
void ANIM_OT_channels_fcurves_enable (wmOperatorType *ot)
static void ANIM_OT_channels_fcurves_enable (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Revive Disabled F-Curves";
@ -1731,7 +1731,7 @@ static int animchannels_deselectall_exec (bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
void ANIM_OT_channels_select_all_toggle (wmOperatorType *ot)
static void ANIM_OT_channels_select_all_toggle (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Select All";
@ -1856,7 +1856,7 @@ static int animchannels_borderselect_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
void ANIM_OT_channels_select_border(wmOperatorType *ot)
static void ANIM_OT_channels_select_border(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Border Select";
@ -2177,7 +2177,7 @@ static int animchannels_mouseclick_invoke(bContext *C, wmOperator *op, wmEvent *
return OPERATOR_FINISHED;
}
void ANIM_OT_channels_click (wmOperatorType *ot)
static void ANIM_OT_channels_click (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Mouse Click on Channels";

View File

@ -232,7 +232,7 @@ void ANIM_draw_cfra (const bContext *C, View2D *v2d, short flag)
/* Draw dark green line if slow-parenting/time-offset is enabled */
if (flag & DRAWCFRA_SHOW_TIMEOFS) {
Object *ob= (scene->basact) ? (scene->basact->object) : 0;
Object *ob= OBACT;
if(ob) {
float timeoffset= give_timeoffset(ob);
// XXX ob->ipoflag is depreceated!
@ -352,7 +352,7 @@ static short bezt_nlamapping_apply(KeyframeEditData *ked, BezTriple *bezt)
*/
void ANIM_nla_mapping_apply_fcurve (AnimData *adt, FCurve *fcu, short restore, short only_keys)
{
KeyframeEditData ked= {{0}};
KeyframeEditData ked= {{NULL}};
KeyframeEditFunc map_cb;
/* init edit data

View File

@ -427,7 +427,7 @@ short ANIM_animdata_get_context (const bContext *C, bAnimContext *ac)
/* this function allocates memory for a new bAnimListElem struct for the
* provided animation channel-data.
*/
bAnimListElem *make_new_animlistelem (void *data, short datatype, void *owner, short ownertype, ID *owner_id)
static bAnimListElem *make_new_animlistelem (void *data, short datatype, void *owner, short ownertype, ID *owner_id)
{
bAnimListElem *ale= NULL;

View File

@ -41,10 +41,10 @@
#include "DNA_anim_types.h"
#include "RNA_access.h"
#include "ED_anim_api.h"
/* ----------------------- Getter functions ----------------------- */
/* Write into "name" buffer, the name of the property (retrieved using RNA from the curve's settings),

View File

@ -205,7 +205,7 @@ void ED_markers_get_minmax (ListBase *markers, short sel, float *first, float *l
/* --------------------------------- */
/* Adds a marker to list of cfra elems */
void add_marker_to_cfra_elem(ListBase *lb, TimeMarker *marker, short only_sel)
static void add_marker_to_cfra_elem(ListBase *lb, TimeMarker *marker, short only_sel)
{
CfraElem *ce, *cen;
@ -269,7 +269,7 @@ TimeMarker *ED_markers_get_first_selected(ListBase *markers)
/* Print debugging prints of list of markers
* BSI's: do NOT make static or put in if-defs as "unused code". That's too much trouble when we need to use for quick debuggging!
*/
void debug_markers_print_list(ListBase *markers)
static void debug_markers_print_list(ListBase *markers)
{
TimeMarker *marker;

View File

@ -47,6 +47,7 @@
#include "WM_api.h"
#include "WM_types.h"
#include "ED_anim_api.h"
#include "ED_screen.h"
#include "anim_intern.h"
@ -153,7 +154,7 @@ static int change_frame_modal(bContext *C, wmOperator *op, wmEvent *event)
return OPERATOR_RUNNING_MODAL;
}
void ANIM_OT_change_frame(wmOperatorType *ot)
static void ANIM_OT_change_frame(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Change frame";
@ -208,7 +209,7 @@ static int previewrange_define_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
void ANIM_OT_previewrange_set(wmOperatorType *ot)
static void ANIM_OT_previewrange_set(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Set Preview Range";
@ -255,7 +256,7 @@ static int previewrange_clear_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
}
void ANIM_OT_previewrange_clear(wmOperatorType *ot)
static void ANIM_OT_previewrange_clear(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Clear Preview Range";
@ -323,7 +324,7 @@ static int toggle_time_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
}
void ANIM_OT_time_toggle(wmOperatorType *ot)
static void ANIM_OT_time_toggle(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Toggle Frames/Seconds";

View File

@ -60,6 +60,11 @@
#include "RNA_access.h"
#include "RNA_define.h"
#include "anim_intern.h"
/* called by WM */
void free_anim_drivers_copybuf (void);
/* ************************************************** */
/* Animation Data Validation */
@ -475,7 +480,7 @@ static char *get_driver_path_hack (bContext *C, PointerRNA *ptr, PropertyRNA *pr
static int add_driver_button_exec (bContext *C, wmOperator *op)
{
PointerRNA ptr= {{0}};
PointerRNA ptr= {{NULL}};
PropertyRNA *prop= NULL;
short success= 0;
int index, all= RNA_boolean_get(op->ptr, "all");
@ -531,7 +536,7 @@ void ANIM_OT_driver_button_add (wmOperatorType *ot)
static int remove_driver_button_exec (bContext *C, wmOperator *op)
{
PointerRNA ptr= {{0}};
PointerRNA ptr= {{NULL}};
PropertyRNA *prop= NULL;
short success= 0;
int index, all= RNA_boolean_get(op->ptr, "all");
@ -583,7 +588,7 @@ void ANIM_OT_driver_button_remove (wmOperatorType *ot)
static int copy_driver_button_exec (bContext *C, wmOperator *op)
{
PointerRNA ptr= {{0}};
PointerRNA ptr= {{NULL}};
PropertyRNA *prop= NULL;
short success= 0;
int index;
@ -627,7 +632,7 @@ void ANIM_OT_copy_driver_button (wmOperatorType *ot)
static int paste_driver_button_exec (bContext *C, wmOperator *op)
{
PointerRNA ptr= {{0}};
PointerRNA ptr= {{NULL}};
PropertyRNA *prop= NULL;
short success= 0;
int index;

View File

@ -1367,7 +1367,7 @@ static int insert_key_button_exec (bContext *C, wmOperator *op)
{
Main *bmain= CTX_data_main(C);
Scene *scene= CTX_data_scene(C);
PointerRNA ptr= {{0}};
PointerRNA ptr= {{NULL}};
PropertyRNA *prop= NULL;
char *path;
float cfra= (float)CFRA; // XXX for now, don't bother about all the yucky offset crap
@ -1456,7 +1456,7 @@ static int delete_key_button_exec (bContext *C, wmOperator *op)
{
Main *bmain= CTX_data_main(C);
Scene *scene= CTX_data_scene(C);
PointerRNA ptr= {{0}};
PointerRNA ptr= {{NULL}};
PropertyRNA *prop= NULL;
char *path;
float cfra= (float)CFRA; // XXX for now, don't bother about all the yucky offset crap

View File

@ -288,7 +288,7 @@ static int add_keyingset_button_exec (bContext *C, wmOperator *op)
Scene *scene= CTX_data_scene(C);
KeyingSet *ks = NULL;
PropertyRNA *prop= NULL;
PointerRNA ptr= {{0}};
PointerRNA ptr= {{NULL}};
char *path = NULL;
short success= 0;
int index=0, pflag=0;
@ -388,7 +388,7 @@ static int remove_keyingset_button_exec (bContext *C, wmOperator *op)
Scene *scene= CTX_data_scene(C);
KeyingSet *ks = NULL;
PropertyRNA *prop= NULL;
PointerRNA ptr= {{0}};
PointerRNA ptr= {{NULL}};
char *path = NULL;
short success= 0;
int index=0;

View File

@ -4714,7 +4714,7 @@ static void envelope_bone_weighting(Object *ob, Mesh *mesh, float (*verts)[3], i
}
}
void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob, Object *par, int heat, int mirror)
static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob, Object *par, int heat, int mirror)
{
/* This functions implements the automatic computation of vertex group
* weights, either through envelopes or using a heat equilibrium.
@ -5434,7 +5434,7 @@ static int bone_unique_check(void *arg, const char *name)
return get_named_bone((bArmature *)arg, name) != NULL;
}
void unique_bone_name(bArmature *arm, char *name)
static void unique_bone_name(bArmature *arm, char *name)
{
BLI_uniquename_cb(bone_unique_check, (void *)arm, "Bone", '.', name, sizeof(((Bone *)NULL)->name));
}

View File

@ -112,7 +112,7 @@ float rollBoneByQuat(EditBone *bone, float old_up_axis[3], float qrot[4]);
/*********************************** EDITBONE UTILS ****************************************************/
int countEditBoneChildren(ListBase *list, EditBone *parent)
static int countEditBoneChildren(ListBase *list, EditBone *parent)
{
EditBone *ebone;
int count = 0;
@ -128,7 +128,7 @@ int countEditBoneChildren(ListBase *list, EditBone *parent)
return count;
}
EditBone* nextEditBoneChild(ListBase *list, EditBone *parent, int n)
static EditBone* nextEditBoneChild(ListBase *list, EditBone *parent, int n)
{
EditBone *ebone;
@ -147,7 +147,7 @@ EditBone* nextEditBoneChild(ListBase *list, EditBone *parent, int n)
return NULL;
}
void getEditBoneRollUpAxis(EditBone *bone, float roll, float up_axis[3])
static void getEditBoneRollUpAxis(EditBone *bone, float roll, float up_axis[3])
{
float mat[3][3], nor[3];
@ -195,7 +195,7 @@ float rollBoneByQuatAligned(EditBone *bone, float old_up_axis[3], float qrot[4],
}
}
float rollBoneByQuatJoint(RigEdge *edge, RigEdge *previous, float qrot[4], float qroll[4], float up_axis[3])
static float rollBoneByQuatJoint(RigEdge *edge, RigEdge *previous, float qrot[4], float qroll[4], float up_axis[3])
{
if (previous == NULL)
{
@ -257,7 +257,7 @@ float rollBoneByQuat(EditBone *bone, float old_up_axis[3], float qrot[4])
/************************************ DESTRUCTORS ******************************************************/
void RIG_freeRigArc(BArc *arc)
static void RIG_freeRigArc(BArc *arc)
{
BLI_freelistN(&((RigArc*)arc)->edges);
}

View File

@ -1122,7 +1122,6 @@ static void curve_rename_fcurves(Object *obedit, ListBase *orig_curves)
/* remove pathes for removed control points
need this to make further step with copying non-cv related curves copying
not touching cv's f-cruves */
fcu= orig_curves->first;
for(fcu= orig_curves->first; fcu; fcu= next) {
next= fcu->next;

View File

@ -40,8 +40,8 @@
#define YIC 20
/* proposal = put scene pointers on function calls? */
#define BASACT (scene->basact)
#define OBACT (BASACT? BASACT->object: 0)
// #define BASACT (scene->basact)
// #define OBACT (BASACT? BASACT->object: NULL)

View File

@ -744,9 +744,9 @@ void special_editmenu(Scene *scene, View3D *v3d)
MTFace *tface;
MFace *mface;
int a;
if(me==0 || me->mtface==0) return;
if(me==NULL || me->mtface==NULL) return;
nr= pupmenu("Specials%t|Set Tex%x1| Shared%x2| Light%x3| Invisible%x4| Collision%x5| TwoSide%x6|Clr Tex%x7| Shared%x8| Light%x9| Invisible%x10| Collision%x11| TwoSide%x12");
tface= me->mtface;
@ -768,7 +768,7 @@ void special_editmenu(Scene *scene, View3D *v3d)
tface->mode |= TF_TWOSIDE; break;
case 7:
tface->mode &= ~TF_TEX;
tface->tpage= 0;
tface->tpage= NULL;
break;
case 8:
tface->mode &= ~TF_SHAREDCOL; break;
@ -788,7 +788,7 @@ void special_editmenu(Scene *scene, View3D *v3d)
else if(ob->mode & OB_MODE_VERTEX_PAINT) {
Mesh *me= get_mesh(ob);
if(me==0 || (me->mcol==NULL && me->mtface==NULL) ) return;
if(me==NULL || (me->mcol==NULL && me->mtface==NULL) ) return;
nr= pupmenu("Specials%t|Shared VertexCol%x1");
if(nr==1) {

View File

@ -64,6 +64,8 @@
#include "WM_api.h"
#include "WM_types.h"
#include "ED_sculpt.h"
#include "ED_screen.h"
#include "ED_view3d.h"
#include "ED_util.h" /* for crazyspace correction */
@ -2377,13 +2379,13 @@ static void sculpt_combine_proxies(Sculpt *sd, SculptSession *ss)
{
Brush *brush= paint_brush(&sd->paint);
PBVHNode** nodes;
int use_orco, totnode, n;
int totnode, n;
BLI_pbvh_gather_proxies(ss->pbvh, &nodes, &totnode);
if(!ELEM(brush->sculpt_tool, SCULPT_TOOL_SMOOTH, SCULPT_TOOL_LAYER)) {
/* these brushes start from original coordinates */
use_orco = (ELEM3(brush->sculpt_tool, SCULPT_TOOL_GRAB,
const int use_orco = (ELEM3(brush->sculpt_tool, SCULPT_TOOL_GRAB,
SCULPT_TOOL_ROTATE, SCULPT_TOOL_THUMB));
#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)

View File

@ -188,12 +188,12 @@ static int console_textview_line_color(struct TextViewContext *tvc, unsigned cha
static int console_textview_main__internal(struct SpaceConsole *sc, struct ARegion *ar, int draw, int mval[2], void **mouse_pick, int *pos_pick)
{
ConsoleLine cl_dummy= {0};
ConsoleLine cl_dummy= {NULL};
int ret= 0;
View2D *v2d= &ar->v2d;
TextViewContext tvc= {0};
TextViewContext tvc= {NULL};
tvc.begin= console_textview_begin;
tvc.end= console_textview_end;

View File

@ -78,10 +78,10 @@ static uiBlock *dummy_viewmenu(bContext *C, ARegion *ar, void *UNUSED(arg))
return block;
}
static void do_script_buttons(bContext *UNUSED(C), void *UNUSED(arg), int event)
static void do_script_buttons(bContext *UNUSED(C), void *UNUSED(arg), int UNUSED(event))
{
switch(event) {
}
//switch(event) {
//}
}

View File

@ -573,7 +573,7 @@ typedef struct ViewCachedString {
/* str is allocated past the end */
} ViewCachedString;
void view3d_cached_text_draw_begin()
void view3d_cached_text_draw_begin(void)
{
ListBase *strings= &CachedText[CachedTextLevel];
strings->first= strings->last= NULL;
@ -5368,7 +5368,7 @@ static void draw_bb_quadric(BoundBox *bb, short type)
static void draw_bounding_volume(Scene *scene, Object *ob)
{
BoundBox *bb=0;
BoundBox *bb= NULL;
if(ob->type==OB_MESH) {
bb= mesh_get_bb(ob);
@ -5379,7 +5379,7 @@ static void draw_bounding_volume(Scene *scene, Object *ob)
else if(ob->type==OB_MBALL) {
if(is_basis_mball(ob)) {
bb= ob->bb;
if(bb==0) {
if(bb==NULL) {
makeDispListMBall(scene, ob);
bb= ob->bb;
}
@ -5390,7 +5390,7 @@ static void draw_bounding_volume(Scene *scene, Object *ob)
return;
}
if(bb==0) return;
if(bb==NULL) return;
if(ob->boundtype==OB_BOUND_BOX) draw_box(bb->vec);
else draw_bb_quadric(bb, ob->boundtype);

View File

@ -376,7 +376,7 @@ static void viewRedrawPost(bContext *C, TransInfo *t)
/* ************************** TRANSFORMATIONS **************************** */
void BIF_selectOrientation() {
void BIF_selectOrientation(void) {
#if 0 // TRANSFORM_FIX_ME
short val;
char *str_menu = BIF_menustringTransformOrientation("Orientation");
@ -1373,7 +1373,7 @@ static void drawHelpline(bContext *UNUSED(C), int x, int y, void *customdata)
}
}
void drawTransformView(const struct bContext *C, struct ARegion *UNUSED(ar), void *arg)
static void drawTransformView(const struct bContext *C, struct ARegion *UNUSED(ar), void *arg)
{
TransInfo *t = arg;
@ -1382,7 +1382,7 @@ void drawTransformView(const struct bContext *C, struct ARegion *UNUSED(ar), voi
drawSnapping(C, t);
}
void drawTransformPixel(const struct bContext *UNUSED(C), struct ARegion *UNUSED(ar), void *UNUSED(arg))
static void drawTransformPixel(const struct bContext *UNUSED(C), struct ARegion *UNUSED(ar), void *UNUSED(arg))
{
// TransInfo *t = arg;
//
@ -2925,7 +2925,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
if(td->flag & TD_USEQUAT) {
mul_serie_m3(fmat, td->mtx, mat, td->smtx, 0, 0, 0, 0, 0);
mul_serie_m3(fmat, td->mtx, mat, td->smtx, NULL, NULL, NULL, NULL, NULL);
mat3_to_quat( quat,fmat); // Actual transform
if(td->ext->quat){
@ -2992,7 +2992,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
if ((t->flag & T_V3D_ALIGN)==0) { // align mode doesn't rotate objects itself
/* euler or quaternion/axis-angle? */
if (td->ext->rotOrder == ROT_MODE_QUAT) {
mul_serie_m3(fmat, td->mtx, mat, td->smtx, 0, 0, 0, 0, 0);
mul_serie_m3(fmat, td->mtx, mat, td->smtx, NULL, NULL, NULL, NULL, NULL);
mat3_to_quat( quat,fmat); // Actual transform
@ -3007,7 +3007,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
axis_angle_to_quat(iquat, td->ext->irotAxis, td->ext->irotAngle);
mul_serie_m3(fmat, td->mtx, mat, td->smtx, 0, 0, 0, 0, 0);
mul_serie_m3(fmat, td->mtx, mat, td->smtx, NULL, NULL, NULL, NULL, NULL);
mat3_to_quat( quat,fmat); // Actual transform
mul_qt_qtqt(tquat, quat, iquat);
@ -3062,7 +3062,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
if ((t->flag & T_V3D_ALIGN)==0) { // align mode doesn't rotate objects itself
/* euler or quaternion? */
if ((td->ext->rotOrder == ROT_MODE_QUAT) || (td->flag & TD_USEQUAT)) {
mul_serie_m3(fmat, td->mtx, mat, td->smtx, 0, 0, 0, 0, 0);
mul_serie_m3(fmat, td->mtx, mat, td->smtx, NULL, NULL, NULL, NULL, NULL);
mat3_to_quat( quat,fmat); // Actual transform
mul_qt_qtqt(td->ext->quat, quat, td->ext->iquat);
@ -3075,7 +3075,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
axis_angle_to_quat(iquat, td->ext->irotAxis, td->ext->irotAngle);
mul_serie_m3(fmat, td->mtx, mat, td->smtx, 0, 0, 0, 0, 0);
mul_serie_m3(fmat, td->mtx, mat, td->smtx, NULL, NULL, NULL, NULL, NULL);
mat3_to_quat( quat,fmat); // Actual transform
mul_qt_qtqt(tquat, quat, iquat);

View File

@ -574,16 +574,16 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
if (constraints_list_needinv(t, &pchan->constraints)) {
copy_m3_m4(tmat, pchan->constinv);
invert_m3_m3(cmat, tmat);
mul_serie_m3(td->mtx, bmat, pmat, omat, cmat, 0,0,0,0); // dang mulserie swaps args
mul_serie_m3(td->mtx, bmat, pmat, omat, cmat, NULL,NULL,NULL,NULL); // dang mulserie swaps args
}
else
mul_serie_m3(td->mtx, bmat, pmat, omat, 0,0,0,0,0); // dang mulserie swaps args
mul_serie_m3(td->mtx, bmat, pmat, omat, NULL,NULL,NULL,NULL,NULL); // dang mulserie swaps args
}
else {
if (constraints_list_needinv(t, &pchan->constraints)) {
copy_m3_m4(tmat, pchan->constinv);
invert_m3_m3(cmat, tmat);
mul_serie_m3(td->mtx, bmat, omat, cmat, 0,0,0,0,0); // dang mulserie swaps args
mul_serie_m3(td->mtx, bmat, omat, cmat, NULL,NULL,NULL,NULL,NULL); // dang mulserie swaps args
}
else
mul_m3_m3m3(td->mtx, omat, bmat); // Mat3MulMat3 has swapped args!

View File

@ -1042,7 +1042,7 @@ typedef struct Scene {
#define FIRSTBASE scene->base.first
#define LASTBASE scene->base.last
#define BASACT (scene->basact)
#define OBACT (BASACT? BASACT->object: 0)
#define OBACT (BASACT? BASACT->object: NULL)
#define ID_NEW(a) if( (a) && (a)->id.newid ) (a)= (void *)(a)->id.newid
#define ID_NEW_US(a) if( (a)->id.newid) {(a)= (void *)(a)->id.newid; (a)->id.us++;}

View File

@ -1838,7 +1838,7 @@ static void rna_def_object(BlenderRNA *brna)
prop= RNA_def_property(srna, "material_slots", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "mat", "totcol");
RNA_def_property_struct_type(prop, "MaterialSlot");
RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, "rna_iterator_array_get", 0, 0, 0); /* don't dereference pointer! */
RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, "rna_iterator_array_get", NULL, NULL, NULL); /* don't dereference pointer! */
RNA_def_property_ui_text(prop, "Material Slots", "Material slots in the object");
prop= RNA_def_property(srna, "active_material", PROP_POINTER, PROP_NONE);

View File

@ -128,20 +128,20 @@ ModifierTypeInfo modifierType_ShapeKey = {
/* flags */ eModifierTypeFlag_AcceptsCVs
| eModifierTypeFlag_SupportsEditmode,
/* copyData */ 0,
/* copyData */ NULL,
/* deformVerts */ deformVerts,
/* deformMatrices */ deformMatrices,
/* deformVertsEM */ deformVertsEM,
/* deformMatricesEM */ deformMatricesEM,
/* applyModifier */ 0,
/* applyModifierEM */ 0,
/* initData */ 0,
/* requiredDataMask */ 0,
/* freeData */ 0,
/* isDisabled */ 0,
/* updateDepgraph */ 0,
/* dependsOnTime */ 0,
/* dependsOnNormals */ 0,
/* foreachObjectLink */ 0,
/* foreachIDLink */ 0,
/* applyModifier */ NULL,
/* applyModifierEM */ NULL,
/* initData */ NULL,
/* requiredDataMask */ NULL,
/* freeData */ NULL,
/* isDisabled */ NULL,
/* updateDepgraph */ NULL,
/* dependsOnTime */ NULL,
/* dependsOnNormals */ NULL,
/* foreachObjectLink */ NULL,
/* foreachIDLink */ NULL
};

View File

@ -177,7 +177,7 @@ static CompBuf *compbuf_multilayer_get(RenderData *rd, RenderLayer *rl, Image *i
return NULL;
};
void outputs_multilayer_get(RenderData *rd, RenderLayer *rl, bNodeStack **out, Image *ima, ImageUser *iuser)
static void outputs_multilayer_get(RenderData *rd, RenderLayer *rl, bNodeStack **out, Image *ima, ImageUser *iuser)
{
if(out[RRES_OUT_Z]->hasoutput)
out[RRES_OUT_Z]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_Z);

Some files were not shown because too many files have changed in this diff Show More