pedantic warning cleanup, also remove texspace_edit() since its been added using a different method.

This commit is contained in:
Campbell Barton 2011-02-27 08:31:10 +00:00
parent f73c993b16
commit 2e5eb41522
50 changed files with 101 additions and 137 deletions

View File

@ -44,12 +44,12 @@ void cdf_free(CDataFile *cdf);
int cdf_read_open(CDataFile *cdf, char *filename);
int cdf_read_layer(CDataFile *cdf, CDataFileLayer *blay);
int cdf_read_data(CDataFile *cdf, int size, void *data);
int cdf_read_data(CDataFile *cdf, unsigned int size, void *data);
void cdf_read_close(CDataFile *cdf);
int cdf_write_open(CDataFile *cdf, char *filename);
int cdf_write_layer(CDataFile *cdf, CDataFileLayer *blay);
int cdf_write_data(CDataFile *cdf, int size, void *data);
int cdf_write_data(CDataFile *cdf, unsigned int size, void *data);
void cdf_write_close(CDataFile *cdf);
void cdf_remove(char *filename);

View File

@ -156,7 +156,7 @@ int mesh_center_bounds(struct Mesh *me, float cent[3]);
void mesh_translate(struct Mesh *me, float offset[3], int do_keys);
/* mesh_validate.c */
int BKE_mesh_validate_arrays(struct Mesh *me, struct MVert *mverts, int totvert, struct MEdge *medges, int totedge, struct MFace *mfaces, int totface, const short do_verbose, const short do_fixes);
int BKE_mesh_validate_arrays(struct Mesh *me, struct MVert *mverts, unsigned int totvert, struct MEdge *medges, unsigned int totedge, struct MFace *mfaces, unsigned int totface, const short do_verbose, const short do_fixes);
int BKE_mesh_validate(struct Mesh *me, int do_verbose);
int BKE_mesh_validate_dm(struct DerivedMesh *dm);

View File

@ -305,7 +305,7 @@ int modifier_sameTopology(ModifierData *md);
int modifier_isEnabled(struct Scene *scene, struct ModifierData *md, int required_mode);
void modifier_setError(struct ModifierData *md, const char *format, ...)
#ifdef __GNUC__
__attribute__ ((format (printf, 2, 3)));
__attribute__ ((format (printf, 2, 3)))
#endif
;

View File

@ -51,7 +51,7 @@ void BKE_reports_clear(ReportList *reports);
void BKE_report(ReportList *reports, ReportType type, const char *message);
void BKE_reportf(ReportList *reports, ReportType type, const char *format, ...)
#ifdef __GNUC__
__attribute__ ((format (printf, 3, 4)));
__attribute__ ((format (printf, 3, 4)))
#endif
;

View File

@ -78,7 +78,7 @@ int scene_camera_switch_update(struct Scene *scene);
char *scene_find_marker_name(struct Scene *scene, int frame);
char *scene_find_last_marker_name(struct Scene *scene, int frame);
int scene_marker_tfm_translate(struct Scene *scene, int delta, int flag);
int scene_marker_tfm_translate(struct Scene *scene, int delta, unsigned int flag);
int scene_marker_tfm_extend(struct Scene *scene, int delta, int flag, int frame, char side);
int scene_marker_tfm_scale(struct Scene *scene, float value, int flag);

View File

@ -1066,7 +1066,7 @@ void copy_pose_result(bPose *to, bPose *from)
bPoseChannel *pchanto, *pchanfrom;
if(to==NULL || from==NULL) {
printf("pose result copy error to:%p from:%p\n", to, from); // debug temp
printf("pose result copy error to:%p from:%p\n", (void *)to, (void *)from); // debug temp
return;
}

View File

@ -304,7 +304,7 @@ void action_move_fcurves_by_basepath (bAction *srcAct, bAction *dstAct, const ch
if ELEM3(NULL, srcAct, dstAct, basepath) {
if (G.f & G_DEBUG) {
printf("ERROR: action_partition_fcurves_by_basepath(%p, %p, %p) has insufficient info to work with\n",
srcAct, dstAct, basepath);
(void *)srcAct, (void *)dstAct, (void *)basepath);
}
return;
}

View File

@ -310,11 +310,11 @@ int cdf_read_layer(CDataFile *cdf, CDataFileLayer *blay)
return (fseek(cdf->readf, offset, SEEK_SET) == 0);
}
int cdf_read_data(CDataFile *cdf, int size, void *data)
int cdf_read_data(CDataFile *cdf, unsigned int size, void *data)
{
float *fdata;
int a;
unsigned int a;
/* read data */
if(!fread(data, size, 1, cdf->readf))
return 0;
@ -385,7 +385,7 @@ int cdf_write_layer(CDataFile *UNUSED(cdf), CDataFileLayer *UNUSED(blay))
return 1;
}
int cdf_write_data(CDataFile *cdf, int size, void *data)
int cdf_write_data(CDataFile *cdf, unsigned int size, void *data)
{
/* write data */
if(!fwrite(data, size, 1, cdf->writef))

View File

@ -112,7 +112,7 @@ static int search_face_cmp(const void *v1, const void *v2)
}
int BKE_mesh_validate_arrays(Mesh *me, MVert *UNUSED(mverts), int totvert, MEdge *medges, int totedge, MFace *mfaces, int totface, const short do_verbose, const short do_fixes)
int BKE_mesh_validate_arrays(Mesh *me, MVert *UNUSED(mverts), unsigned int totvert, MEdge *medges, unsigned int totedge, MFace *mfaces, unsigned int totface, const short do_verbose, const short do_fixes)
{
# define PRINT if(do_verbose) printf
# define REMOVE_EDGE_TAG(_med) { _med->v2= _med->v1; do_edge_free= 1; }
@ -122,7 +122,7 @@ int BKE_mesh_validate_arrays(Mesh *me, MVert *UNUSED(mverts), int totvert, MEdge
MEdge *med;
MFace *mf;
MFace *mf_prev;
int i;
unsigned int i;
int do_face_free= FALSE;
int do_edge_free= FALSE;
@ -134,7 +134,7 @@ int BKE_mesh_validate_arrays(Mesh *me, MVert *UNUSED(mverts), int totvert, MEdge
SortFace *sort_faces= MEM_callocN(sizeof(SortFace) * totface, "search faces");
SortFace *sf;
SortFace *sf_prev;
int totsortface= 0;
unsigned int totsortface= 0;
BLI_assert(!(do_fixes && me == NULL));

View File

@ -1494,7 +1494,7 @@ short BKE_nla_tweakmode_enter (AnimData *adt)
if ELEM3(NULL, activeTrack, activeStrip, activeStrip->act) {
if (G.f & G_DEBUG) {
printf("NLA tweakmode enter - neither active requirement found \n");
printf("\tactiveTrack = %p, activeStrip = %p \n", activeTrack, activeStrip);
printf("\tactiveTrack = %p, activeStrip = %p \n", (void *)activeTrack, (void *)activeStrip);
}
return 0;
}

View File

@ -829,7 +829,7 @@ char *scene_find_last_marker_name(Scene *scene, int frame)
/* markers need transforming from different parts of the code so have
* a generic function to do this */
int scene_marker_tfm_translate(Scene *scene, int delta, int flag)
int scene_marker_tfm_translate(Scene *scene, int delta, unsigned int flag)
{
TimeMarker *marker;
int tot= 0;

View File

@ -44,7 +44,7 @@ void BLI_bpathIterator_free (struct BPathIterator *bpi);
const char* BLI_bpathIterator_getLib (struct BPathIterator *bpi);
const char* BLI_bpathIterator_getName (struct BPathIterator *bpi);
int BLI_bpathIterator_getType (struct BPathIterator *bpi);
int BLI_bpathIterator_getPathMaxLen (struct BPathIterator *bpi);
unsigned int BLI_bpathIterator_getPathMaxLen (struct BPathIterator *bpi);
const char* BLI_bpathIterator_getBasePath (struct BPathIterator *bpi);
void BLI_bpathIterator_step (struct BPathIterator *bpi);
int BLI_bpathIterator_isDone (struct BPathIterator *bpi);

View File

@ -79,7 +79,7 @@ void BLI_dynstr_nappend (DynStr *ds, const char *cstr, int len);
*/
void BLI_dynstr_appendf (DynStr *ds, const char *format, ...)
#ifdef __GNUC__
__attribute__ ((format (printf, 2, 3)));
__attribute__ ((format (printf, 2, 3)))
#endif
;
void BLI_dynstr_vappendf (DynStr *ds, const char *format, va_list args);

View File

@ -122,7 +122,7 @@ void BLI_pbvh_update(PBVH *bvh, int flags, float (*face_nors)[3]);
void BLI_pbvh_redraw_BB(PBVH *bvh, float bb_min[3], float bb_max[3]);
void BLI_pbvh_get_grid_updates(PBVH *bvh, int clear, void ***gridfaces, int *totface);
void BLI_pbvh_grids_update(PBVH *bvh, struct DMGridData **grids,
struct DMGridAdjacency *gridadj, void **gridfaces);;
struct DMGridAdjacency *gridadj, void **gridfaces);
/* vertex deformer */
float (*BLI_pbvh_get_vertCos(struct PBVH *pbvh))[3];

View File

@ -108,7 +108,7 @@ char *BLI_replacestr(char *str, const char *oldText, const char *newText);
*/
int BLI_snprintf(char *buffer, size_t count, const char *format, ...)
#ifdef __GNUC__
__attribute__ ((format (printf, 3, 4)));
__attribute__ ((format (printf, 3, 4)))
#endif
;
@ -118,7 +118,7 @@ __attribute__ ((format (printf, 3, 4)));
*/
char *BLI_sprintfN(const char *format, ...)
#ifdef __GNUC__
__attribute__ ((format (printf, 1, 2)));
__attribute__ ((format (printf, 1, 2)))
#endif
;

View File

@ -194,7 +194,7 @@ const char* BLI_bpathIterator_getName(struct BPathIterator *bpi) {
int BLI_bpathIterator_getType(struct BPathIterator *bpi) {
return bpi->type;
}
int BLI_bpathIterator_getPathMaxLen(struct BPathIterator *bpi) {
unsigned int BLI_bpathIterator_getPathMaxLen(struct BPathIterator *bpi) {
return bpi->len;
}
const char* BLI_bpathIterator_getBasePath(struct BPathIterator *bpi) {

View File

@ -53,8 +53,10 @@
#if defined WIN32 && !defined _LIBC
# include "BLI_fnmatch.h" /* use fnmatch included in blenlib */
#else
# define _GNU_SOURCE
# include <fnmatch.h>
# ifndef _GNU_SOURCE
# define _GNU_SOURCE
# endif
# include <fnmatch.h>
#endif
#ifdef WIN32

View File

@ -465,7 +465,7 @@ void ANIM_unit_mapping_apply_fcurve (Scene *scene, ID *id, FCurve *fcu, short fl
// TODO: only sel?
if (fcu->fpt) {
FPoint *fpt;
int i;
unsigned int i;
for (i=0, fpt=fcu->fpt; i < fcu->totvert; i++, fpt++) {
/* apply unit mapping */

View File

@ -281,7 +281,7 @@ void debug_markers_print_list(ListBase *markers)
printf("List of markers follows: -----\n");
for (marker = markers->first; marker; marker = marker->next) {
printf("\t'%s' on %d at %p with %d\n", marker->name, marker->frame, marker, marker->flag);
printf("\t'%s' on %d at %p with %d\n", marker->name, marker->frame, (void *)marker, marker->flag);
}
printf("End of list ------------------\n");

View File

@ -902,8 +902,8 @@ void fcurve_to_keylist(AnimData *adt, FCurve *fcu, DLRBT_Tree *keys, DLRBT_Tree
{
DLRBT_Tree *beztTree = NULL;
BezTriple *bezt;
int v;
unsigned int v;
if (fcu && fcu->totvert && fcu->bezt) {
/* apply NLA-mapping (if applicable) */
if (adt)

View File

@ -90,7 +90,7 @@ short ANIM_fcurve_keyframes_loop(KeyframeEditData *ked, FCurve *fcu, KeyframeEdi
{
BezTriple *bezt;
short ok = 0;
int i;
unsigned int i;
/* sanity check */
if (ELEM(NULL, fcu, fcu->bezt))

View File

@ -295,7 +295,7 @@ int insert_bezt_fcurve (FCurve *fcu, BezTriple *bezt, short flag)
int insert_vert_fcurve (FCurve *fcu, float x, float y, short flag)
{
BezTriple beztr= {{{0}}};
int oldTot = fcu->totvert;
unsigned int oldTot = fcu->totvert;
int a;
/* set all three points, for nicer start position

View File

@ -160,5 +160,9 @@ void RIG_freeRigGraph(BGraph *rg);
/* UNUSED */
void BIF_retargetArmature(bContext *C);
void BIF_adjustRetarget(bContext *C);
/* UNUSED / print funcs */
void RIG_printArc(struct RigGraph *rg, struct RigArc *arc);
void RIG_printGraph(struct RigGraph *rg);
void RIG_printArcBones(struct RigArc *arc);
#endif /* BIF_RETARGET_H */

View File

@ -1429,7 +1429,7 @@ static void RIG_printNode(RigNode *node, const char name[])
}
}
static void RIG_printArcBones(RigArc *arc)
void RIG_printArcBones(RigArc *arc)
{
RigEdge *edge;
@ -1480,7 +1480,7 @@ static void RIG_printLinkedCtrl(RigGraph *rg, EditBone *bone, int tabs)
}
}
static void RIG_printArc(RigGraph *rg, RigArc *arc)
void RIG_printArc(RigGraph *rg, RigArc *arc)
{
RigEdge *edge;
@ -1502,7 +1502,7 @@ static void RIG_printArc(RigGraph *rg, RigArc *arc)
RIG_printNode((RigNode*)arc->tail, "tail");
}
static void RIG_printGraph(RigGraph *rg)
void RIG_printGraph(RigGraph *rg)
{
RigArc *arc;

View File

@ -531,7 +531,7 @@ static int poselib_remove_exec (bContext *C, wmOperator *op)
/* remove relevant keyframes */
for (fcu= act->curves.first; fcu; fcu= fcu->next) {
BezTriple *bezt;
int i;
unsigned int i;
if (fcu->bezt) {
for (i=0, bezt=fcu->bezt; i < fcu->totvert; i++, bezt++) {

View File

@ -1482,7 +1482,7 @@ static int ui_textedit_copypaste(uiBut *but, uiHandleButtonData *data, int paste
{
char buf[UI_MAX_DRAW_STR]={0};
char *str, *p, *pbuf;
int len, x, y, i, changed= 0;
int len, x, i, changed= 0;
str= data->str;
len= strlen(str);
@ -1493,6 +1493,7 @@ static int ui_textedit_copypaste(uiBut *but, uiHandleButtonData *data, int paste
p = pbuf= WM_clipboard_text_get(0);
if(p && p[0]) {
unsigned int y;
i= 0;
while (*p && *p!='\r' && *p!='\n' && i<UI_MAX_DRAW_STR-1) {
buf[i++]=*p;

View File

@ -46,7 +46,7 @@ int edgetag_shortest_path(Scene *scene, EditMesh *em, EditEdge *source, EditEdge
extern void free_editvert(EditMesh *em, EditVert *eve);
extern void free_editedge(EditMesh *em, EditEdge *eed);
extern void free_editface(EditMesh *em, EditFace *efa);;
extern void free_editface(EditMesh *em, EditFace *efa);
extern void free_vertlist(EditMesh *em, ListBase *edve);
extern void free_edgelist(EditMesh *em, ListBase *lb);

View File

@ -561,8 +561,8 @@ static bConstraint *edit_constraint_property_get(wmOperator *op, Object *ob, int
}
con = constraints_findByName(list, constraint_name);
printf("constraint found = %p, %s\n", con, (con)?con->name:"<Not found>");
printf("constraint found = %p, %s\n", (void *)con, (con)?con->name:"<Not found>");
if (con && (type != 0) && (con->type != type))
con = NULL;

View File

@ -648,53 +648,6 @@ void OBJECT_OT_rotation_apply(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
/************************ Texture Space Transform ****************************/
static void texspace_edit(Scene *scene, View3D *v3d)
{
Base *base;
int nr=0;
/* first test if from visible and selected objects
* texspacedraw is set:
*/
if(scene->obedit) return; // XXX get from context
for(base= FIRSTBASE; base; base= base->next) {
if(TESTBASELIB(v3d, base)) {
break;
}
}
if(base==0) {
return;
}
nr= 0; // XXX pupmenu("Texture Space %t|Grab/Move%x1|Size%x2");
if(nr<1) return;
for(base= FIRSTBASE; base; base= base->next) {
if(TESTBASELIB(v3d, base)) {
base->object->dtx |= OB_TEXSPACE;
}
}
if(nr==1) {
// XXX initTransform(TFM_TRANSLATION, CTX_TEXTURE);
// XXX Transform();
}
else if(nr==2) {
// XXX initTransform(TFM_RESIZE, CTX_TEXTURE);
// XXX Transform();
}
else if(nr==3) {
// XXX initTransform(TFM_ROTATION, CTX_TEXTURE);
// XXX Transform();
}
}
/********************* Set Object Center ************************/
enum {

View File

@ -3805,7 +3805,7 @@ static void get_PTCacheUndo(PTCacheEdit *edit, PTCacheUndo *undo)
LOOP_POINTS {
LOOP_KEYS {
if((int)key->ftime == pm->frame) {
if((int)key->ftime == (int)pm->frame) {
key->co = pm->cur[BPHYS_DATA_LOCATION];
key->vel = pm->cur[BPHYS_DATA_VELOCITY];
key->rot = pm->cur[BPHYS_DATA_ROTATION];
@ -4029,7 +4029,7 @@ static void PE_create_particle_edit(Scene *scene, Object *ob, PointCache *cache,
return;
if(!edit) {
totpoint = psys ? psys->totpart : ((PTCacheMem*)cache->mem_cache.first)->totpoint;
totpoint = psys ? psys->totpart : (int)((PTCacheMem*)cache->mem_cache.first)->totpoint;
edit= MEM_callocN(sizeof(PTCacheEdit), "PE_create_particle_edit");
edit->points=MEM_callocN(totpoint*sizeof(PTCacheEditPoint),"PTCacheEditPoints");

View File

@ -1070,10 +1070,6 @@ static int fluidsimBake(bContext *UNUSED(C), ReportList *UNUSED(reports), Object
return 0;
}
static void fluidsimFreeBake(Object *UNUSED(ob))
{
}
#endif /* DISABLE_ELBEEM */
/***************************** Operators ******************************/

View File

@ -942,7 +942,7 @@ static int check_seam(const ProjPaintState *ps, const int orig_face, const int o
{
LinkNode *node;
int face_index;
int i1, i2;
unsigned int i1, i2;
int i1_fidx = -1, i2_fidx = -1; /* index in face */
MFace *mf;
MTFace *tf;

View File

@ -144,7 +144,7 @@ static void imapaint_tri_weights(Object *ob, float *v1, float *v2, float *v3, fl
void imapaint_pick_uv(Scene *scene, Object *ob, unsigned int faceindex, int *xy, float *uv)
{
DerivedMesh *dm = mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH);
int *index = dm->getFaceDataArray(dm, CD_ORIGINDEX);
const int *index = dm->getFaceDataArray(dm, CD_ORIGINDEX);
MTFace *tface = dm->getFaceDataArray(dm, CD_MTFACE), *tf;
int numfaces = dm->getNumFaces(dm), a, findex;
float p[2], w[3], absw, minabsw;
@ -156,7 +156,7 @@ void imapaint_pick_uv(Scene *scene, Object *ob, unsigned int faceindex, int *xy,
/* test all faces in the derivedmesh with the original index of the picked face */
for(a = 0; a < numfaces; a++) {
findex= (index)? index[a]: a;
findex= index ? index[a]: a;
if(findex == faceindex) {
dm->getFace(dm, a, &mf);

View File

@ -225,6 +225,8 @@ void ED_region_draw_cb_draw(const bContext *C, ARegion *ar, int type)
/* ********************* space template *********************** */
/* forward declare */
void ED_spacetype_xxx(void);
/* allocate and init some vars */
static SpaceLink *xxx_new(const bContext *UNUSED(C))
@ -266,7 +268,7 @@ static void xxx_keymap(wmKeyConfig *UNUSED(keyconf))
}
/* only called once, from screen/spacetypes.c */
static void ED_spacetype_xxx(void)
void ED_spacetype_xxx(void)
{
static SpaceType st;

View File

@ -206,11 +206,11 @@ void NLA_OT_select_all_toggle (wmOperatorType *ot)
*/
/* defines for borderselect mode */
static enum {
enum {
NLA_BORDERSEL_ALLSTRIPS = 0,
NLA_BORDERSEL_FRAMERANGE,
NLA_BORDERSEL_CHANNELS,
} eNLAEDIT_BorderSelect_Mode;
} /* eNLAEDIT_BorderSelect_Mode */;
static void borderselect_nla_strips (bAnimContext *ac, rcti rect, short mode, short selectmode)

View File

@ -56,7 +56,9 @@
#if defined WIN32 && !defined _LIBC
# include "BLI_fnmatch.h" /* use fnmatch included in blenlib */
#else
# define _GNU_SOURCE
# ifndef _GNU_SOURCE
# define _GNU_SOURCE
# endif
# include <fnmatch.h>
#endif

View File

@ -466,7 +466,8 @@ static struct ImBuf *make_histogram_view_from_ibuf_byte(
struct ImBuf * ibuf)
{
struct ImBuf * rval = IMB_allocImBuf(515, 128, 32, IB_rect);
int n,c,x,y;
int c,x,y;
unsigned int n;
unsigned char* src = (unsigned char*) ibuf->rect;
unsigned int bins[3][256];

View File

@ -835,7 +835,8 @@ static void select_linked(Scene *scene, Image *ima, EditMesh *em, float limit[2]
MTFace *tf;
UvVertMap *vmap;
UvMapVert *vlist, *iterv, *startv;
int a, i, nverts, stacksize= 0, *stack;
int i, nverts, stacksize= 0, *stack;
unsigned int a;
char *flag;
EM_init_index_arrays(em, 0, 0, 1); /* we can use this too */
@ -2022,7 +2023,7 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje
UvMapVert *start_vlist=NULL, *vlist_iter;
struct UvVertMap *vmap;
float limit[2];
int efa_index;
unsigned int efa_index;
//EditVert *eve; /* removed vert counting for now */
//int a;

View File

@ -260,7 +260,7 @@ static int phash_size(PHash *ph)
static void phash_insert(PHash *ph, PHashLink *link)
{
int size = ph->cursize;
int hash = PHASH_hash(ph, link->key);
uintptr_t hash = PHASH_hash(ph, link->key);
PHashLink *lookup = ph->buckets[hash];
if (lookup == NULL) {
@ -296,7 +296,7 @@ static void phash_insert(PHash *ph, PHashLink *link)
static PHashLink *phash_lookup(PHash *ph, PHashKey key)
{
PHashLink *link;
int hash = PHASH_hash(ph, key);
uintptr_t hash = PHASH_hash(ph, key);
for (link = ph->buckets[hash]; link; link = link->next)
if (link->key == key)
@ -309,7 +309,7 @@ static PHashLink *phash_lookup(PHash *ph, PHashKey key)
static PHashLink *phash_next(PHash *ph, PHashKey key, PHashLink *link)
{
int hash = PHASH_hash(ph, key);
uintptr_t hash = PHASH_hash(ph, key);
for (link = link->next; link; link = link->next)
if (link->key == key)

View File

@ -938,12 +938,12 @@ int RNA_function_call_lookup(struct bContext *C, struct ReportList *reports, Poi
int RNA_function_call_direct(struct bContext *C, struct ReportList *reports, PointerRNA *ptr, FunctionRNA *func, const char *format, ...)
#ifdef __GNUC__
__attribute__ ((format (printf, 5, 6)));
__attribute__ ((format (printf, 5, 6)))
#endif
;
int RNA_function_call_direct_lookup(struct bContext *C, struct ReportList *reports, PointerRNA *ptr, const char *identifier, const char *format, ...)
#ifdef __GNUC__
__attribute__ ((format (printf, 5, 6)));
__attribute__ ((format (printf, 5, 6)))
#endif
;
int RNA_function_call_direct_va(struct bContext *C, struct ReportList *reports, PointerRNA *ptr, FunctionRNA *func, const char *format, va_list args);

View File

@ -170,7 +170,7 @@ static void node_composit_exec_chroma_matte(void *data, bNode *node, bNodeStack
if(cbuf!=in[0]->data)
free_compbuf(cbuf);
};
}
static void node_composit_init_chroma_matte(bNode *node)
@ -182,7 +182,7 @@ static void node_composit_init_chroma_matte(bNode *node)
c->t3= 0.0f;
c->fsize= 0.0f;
c->fstrength= 1.0f;
};
}
void register_node_type_cmp_chroma_matte(ListBase *lb)
{

View File

@ -99,7 +99,7 @@ static void node_composit_exec_color_matte(void *data, bNode *node, bNodeStack *
if(cbuf!=in[0]->data)
free_compbuf(cbuf);
};
}
static void node_composit_init_color_matte(bNode *node)
{
@ -110,7 +110,7 @@ static void node_composit_init_color_matte(bNode *node)
c->t3= 0.1f;
c->fsize= 0.0f;
c->fstrength= 1.0f;
};
}
void register_node_type_cmp_color_matte(ListBase *lb)
{

View File

@ -93,12 +93,12 @@ static void node_composit_exec_curve_vec(void *UNUSED(data), bNode *node, bNodeS
/* stack order output: vec */
curvemapping_evaluate_premulRGBF(node->storage, out[0]->vec, in[0]->vec);
};
}
static void node_composit_init_curve_vec(bNode* node)
{
node->storage= curvemapping_add(3, -1.0f, -1.0f, 1.0f, 1.0f);
};
}
void register_node_type_cmp_curve_vec(ListBase *lb)
{
@ -180,12 +180,12 @@ static void node_composit_exec_curve_rgb(void *UNUSED(data), bNode *node, bNodeS
out[0]->data= stackbuf;
}
};
}
static void node_composit_init_curve_rgb(bNode* node)
{
node->storage= curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f);
};
}
void register_node_type_cmp_curve_rgb(ListBase *lb)
{

View File

@ -136,7 +136,7 @@ static CompBuf *node_composit_get_image(RenderData *rd, Image *ima, ImageUser *i
}
*/
return stackbuf;
};
}
static CompBuf *node_composit_get_zimage(bNode *node, RenderData *rd)
{
@ -153,7 +153,7 @@ static CompBuf *node_composit_get_zimage(bNode *node, RenderData *rd)
}
}
return zbuf;
};
}
/* check if layer is available, returns pass buffer */
static CompBuf *compbuf_multilayer_get(RenderData *rd, RenderLayer *rl, Image *ima, ImageUser *iuser, int passtype)
@ -175,7 +175,7 @@ static CompBuf *compbuf_multilayer_get(RenderData *rd, RenderLayer *rl, Image *i
return cbuf;
}
return NULL;
};
}
static void outputs_multilayer_get(RenderData *rd, RenderLayer *rl, bNodeStack **out, Image *ima, ImageUser *iuser)
{
@ -212,7 +212,7 @@ static void outputs_multilayer_get(RenderData *rd, RenderLayer *rl, bNodeStack *
out[RRES_OUT_EMIT]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_EMIT);
if(out[RRES_OUT_ENV]->hasoutput)
out[RRES_OUT_ENV]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_ENVIRONMENT);
};
}
static void node_composit_exec_image(void *data, bNode *node, bNodeStack **UNUSED(in), bNodeStack **out)
@ -285,7 +285,7 @@ static void node_composit_exec_image(void *data, bNode *node, bNodeStack **UNUSE
generate_preview(data, node, stackbuf);
}
}
};
}
static void node_composit_init_image(bNode* node)
{
@ -337,7 +337,7 @@ static CompBuf *compbuf_from_pass(RenderData *rd, RenderLayer *rl, int rectx, in
return buf;
}
return NULL;
};
}
static void node_composit_rlayers_out(RenderData *rd, RenderLayer *rl, bNodeStack **out, int rectx, int recty)
{
@ -374,7 +374,7 @@ static void node_composit_rlayers_out(RenderData *rd, RenderLayer *rl, bNodeStac
out[RRES_OUT_EMIT]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_EMIT);
if(out[RRES_OUT_ENV]->hasoutput)
out[RRES_OUT_ENV]->data= compbuf_from_pass(rd, rl, rectx, recty, SCE_PASS_ENVIRONMENT);
};
}
static void node_composit_exec_rlayers(void *data, bNode *node, bNodeStack **UNUSED(in), bNodeStack **out)
{
@ -423,7 +423,7 @@ static void node_composit_exec_rlayers(void *data, bNode *node, bNodeStack **UNU
if(re)
RE_ReleaseResult(re);
};
}
void register_node_type_cmp_rlayers(ListBase *lb)

View File

@ -101,7 +101,7 @@ static void node_composit_init_luma_matte(bNode *node)
node->storage=c;
c->t1= 1.0f;
c->t2= 0.0f;
};
}
void register_node_type_cmp_luma_matte(ListBase *lb)
{

View File

@ -107,7 +107,7 @@ static void node_composit_exec_scale(void *data, bNode *node, bNodeStack **in, b
if(cbuf!=in[0]->data)
free_compbuf(cbuf);
}
};
}
void register_node_type_cmp_scale(ListBase *lb)
{

View File

@ -88,7 +88,7 @@ static void node_composit_init_vecblur(bNode* node)
node->storage= nbd;
nbd->samples= 32;
nbd->fac= 1.0f;
};
}
/* custom1: itterations, custom2: maxspeed (0 = nolimit) */
void register_node_type_cmp_vecblur(ListBase *lb)

View File

@ -118,7 +118,7 @@ void free_compbuf(CompBuf *cbuf)
void print_compbuf(char *str, CompBuf *cbuf)
{
printf("Compbuf %s %d %d %p\n", str, cbuf->x, cbuf->y, cbuf->rect);
printf("Compbuf %s %d %d %p\n", str, cbuf->x, cbuf->y, (void *)cbuf->rect);
}

View File

@ -306,13 +306,13 @@ void register_node_type_tex_proc_##name(ListBase *lb) \
#define C outputs_color_only
#define CV outputs_both
TexDef(TEX_VORONOI, CV, voronoi, "Voronoi" );
TexDef(TEX_BLEND, C, blend, "Blend" );
TexDef(TEX_MAGIC, C, magic, "Magic" );
TexDef(TEX_MARBLE, CV, marble, "Marble" );
TexDef(TEX_CLOUDS, CV, clouds, "Clouds" );
TexDef(TEX_WOOD, CV, wood, "Wood" );
TexDef(TEX_MUSGRAVE, CV, musgrave, "Musgrave" );
TexDef(TEX_NOISE, C, noise, "Noise" );
TexDef(TEX_STUCCI, CV, stucci, "Stucci" );
TexDef(TEX_DISTNOISE, CV, distnoise, "Distorted Noise" );
TexDef(TEX_VORONOI, CV, voronoi, "Voronoi" )
TexDef(TEX_BLEND, C, blend, "Blend" )
TexDef(TEX_MAGIC, C, magic, "Magic" )
TexDef(TEX_MARBLE, CV, marble, "Marble" )
TexDef(TEX_CLOUDS, CV, clouds, "Clouds" )
TexDef(TEX_WOOD, CV, wood, "Wood" )
TexDef(TEX_MUSGRAVE, CV, musgrave, "Musgrave" )
TexDef(TEX_NOISE, C, noise, "Noise" )
TexDef(TEX_STUCCI, CV, stucci, "Stucci" )
TexDef(TEX_DISTNOISE, CV, distnoise, "Distorted Noise" )

View File

@ -233,6 +233,8 @@ static char *copy_values(PyObject *seq, PointerRNA *ptr, PropertyRNA *prop, int
int totdim= RNA_property_array_dimension(ptr, prop, NULL);
const int seq_size= PySequence_Size(seq);
assert(seq_size != -1);
for (i= 0; i < seq_size; i++) {
PyObject *item= PySequence_GetItem(seq, i);