Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/blenkernel/BKE_dynamicpaint.h4
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c36
-rw-r--r--source/blender/blenkernel/intern/pointcache.c10
-rw-r--r--source/blender/editors/physics/dynamicpaint_ops.c7
-rw-r--r--source/blender/editors/space_view3d/drawmesh.c2
-rw-r--r--source/blender/makesdna/DNA_dynamicpaint_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_dynamicpaint.c2
-rw-r--r--source/blender/modifiers/intern/MOD_dynamicpaint.c16
8 files changed, 47 insertions, 32 deletions
diff --git a/source/blender/blenkernel/BKE_dynamicpaint.h b/source/blender/blenkernel/BKE_dynamicpaint.h
index 75b1f74a403..14094cb2ac6 100644
--- a/source/blender/blenkernel/BKE_dynamicpaint.h
+++ b/source/blender/blenkernel/BKE_dynamicpaint.h
@@ -6,7 +6,7 @@
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
- * Contributor(s): Miika Hämäläinen
+ * Contributor(s): Miika Hämäläinen
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -66,7 +66,7 @@ void dynamicPaint_cacheUpdateFrames(struct DynamicPaintSurface *surface);
int dynamicPaint_surfaceHasColorPreview(struct DynamicPaintSurface *surface);
int dynamicPaint_outputLayerExists(struct DynamicPaintSurface *surface, struct Object *ob, int index);
void dynamicPaintSurface_updateType(struct DynamicPaintSurface *surface);
-void dynamicPaintSurface_setUniqueName(struct DynamicPaintSurface *surface, char *basename);
+void dynamicPaintSurface_setUniqueName(struct DynamicPaintSurface *surface, const char *basename);
void dynamicPaint_resetPreview(struct DynamicPaintCanvasSettings *canvas);
struct DynamicPaintSurface *get_activeSurface(struct DynamicPaintCanvasSettings *canvas);
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index 9d1401acdfc..55b8b045509 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -6,7 +6,7 @@
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
- * Contributor(s): Miika Hämäläinen
+ * Contributor(s): Miika Hämäläinen
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -204,7 +204,7 @@ typedef struct PaintAdjData {
/***************************** General Utils ******************************/
/* Set canvas error string to display at the bake report */
-static int setError(DynamicPaintCanvasSettings *canvas, char *string)
+static int setError(DynamicPaintCanvasSettings *canvas, const char *string)
{
/* Add error to canvas ui info label */
BLI_snprintf(canvas->error, sizeof(canvas->error), string);
@@ -339,7 +339,7 @@ static int surface_duplicateNameExists(void *arg, const char *name)
return 0;
}
-void dynamicPaintSurface_setUniqueName(DynamicPaintSurface *surface, char *basename)
+void dynamicPaintSurface_setUniqueName(DynamicPaintSurface *surface, const char *basename)
{
char name[64];
BLI_strncpy(name, basename, sizeof(name)); /* in case basename is surface->name use a copy */
@@ -488,7 +488,7 @@ static void scene_setSubframe(Scene *scene, float subframe)
#define BRUSH_USES_VELOCITY (1<<0)
-static int surface_getBrushFlags(DynamicPaintSurface *surface, Scene *scene, Object *ob)
+static int surface_getBrushFlags(DynamicPaintSurface *surface, Scene *scene, Object *UNUSED(ob))
{
Base *base = NULL;
GroupObject *go = NULL;
@@ -1516,7 +1516,10 @@ static void dynamicPaint_applySurfaceDisplace(DynamicPaintSurface *surface, Deri
/*
* Apply canvas data to the object derived mesh
*/
-static struct DerivedMesh *dynamicPaint_Modifier_apply(DynamicPaintModifierData *pmd, Scene *scene, Object *ob, DerivedMesh *dm)
+static struct DerivedMesh *dynamicPaint_Modifier_apply(DynamicPaintModifierData *pmd,
+ Scene *UNUSED(scene),
+ Object *ob,
+ DerivedMesh *dm)
{
DerivedMesh *result = CDDM_copy(dm);
@@ -2068,7 +2071,7 @@ int dynamicPaint_createUVSurface(DynamicPaintSurface *surface)
PaintUVPoint *tempPoints = NULL;
Vec3f *tempWeights = NULL;
- MVert *mvert = NULL;
+ /* MVert *mvert = NULL; */ /* UNUSED */
MFace *mface = NULL;
MTFace *tface = NULL;
Bounds2D *faceBB = NULL;
@@ -2079,7 +2082,7 @@ int dynamicPaint_createUVSurface(DynamicPaintSurface *surface)
if (surface->format != MOD_DPAINT_SURFACE_F_IMAGESEQ) return setError(canvas, "Can't bake non-\"image sequence\" formats.");
numOfFaces = dm->getNumFaces(dm);
- mvert = dm->getVertArray(dm);
+ /* mvert = dm->getVertArray(dm); */ /* UNUSED */
mface = dm->getFaceArray(dm);
/* get uv layer */
@@ -3039,7 +3042,7 @@ static void dynamicPaint_brushMeshCalculateVelocity(Scene *scene, Object *ob, Dy
}
/* calculate velocity for object center point */
-static void dynamicPaint_brushObjectCalculateVelocity(Scene *scene, Object *ob, DynamicPaintBrushSettings *brush, Vec3f *brushVel, float timescale)
+static void dynamicPaint_brushObjectCalculateVelocity(Scene *scene, Object *ob, DynamicPaintBrushSettings *UNUSED(brush), Vec3f *brushVel, float timescale)
{
float prev_obmat[4][4];
float cur_loc[3] = {0.0f}, prev_loc[3] = {0.0f};
@@ -3076,7 +3079,13 @@ static void dynamicPaint_brushObjectCalculateVelocity(Scene *scene, Object *ob,
/*
* Paint a brush object mesh to the surface
*/
-static int dynamicPaint_paintMesh(DynamicPaintSurface *surface, DynamicPaintBrushSettings *brush, Object *canvasOb, Object *brushOb, BrushMaterials *bMats, Scene *scene, float timescale)
+static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
+ DynamicPaintBrushSettings *brush,
+ Object *UNUSED(canvasOb),
+ Object *brushOb,
+ BrushMaterials *bMats,
+ Scene *scene,
+ float timescale)
{
PaintSurfaceData *sData = surface->data;
PaintBakeData *bData = sData->bData;
@@ -3449,7 +3458,10 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface, DynamicPaintBrus
/*
* Paint a particle system to the surface
*/
-static int dynamicPaint_paintParticles(DynamicPaintSurface *surface, ParticleSystem *psys, DynamicPaintBrushSettings *brush, Object *canvasOb, float timescale)
+static int dynamicPaint_paintParticles(DynamicPaintSurface *surface,
+ ParticleSystem *psys,
+ DynamicPaintBrushSettings *brush,
+ Object *UNUSED(canvasOb), float timescale)
{
ParticleSettings *part=psys->part;
ParticleData *pa = NULL;
@@ -3686,7 +3698,7 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface, ParticleSys
/* paint a single point of defined proximity radius to the surface */
static int dynamicPaint_paintSinglePoint(DynamicPaintSurface *surface, float *pointCoord, DynamicPaintBrushSettings *brush,
- Object *canvasOb, Object *brushOb, BrushMaterials *bMats, Scene *scene, float timescale)
+ Object *UNUSED(canvasOb), Object *brushOb, BrushMaterials *bMats, Scene *scene, float timescale)
{
int index;
PaintSurfaceData *sData = surface->data;
@@ -4878,4 +4890,4 @@ int dynamicPaint_calculateFrame(DynamicPaintSurface *surface, Scene *scene, Obje
}
return dynamicPaint_doStep(scene, cObject, surface, timescale, 0.0f);
-} \ No newline at end of file
+}
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index c256e99cd24..d5460a4e6ce 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -122,7 +122,7 @@ static int ptcache_extra_datasize[] = {
/* forward declerations */
static int ptcache_file_compressed_read(PTCacheFile *pf, unsigned char *result, unsigned int len);
static int ptcache_file_compressed_write(PTCacheFile *pf, unsigned char *in, unsigned int in_len, unsigned char *out, int mode);
-static int ptcache_file_write(PTCacheFile *pf, void *f, unsigned int tot, unsigned int size);
+static int ptcache_file_write(PTCacheFile *pf, const void *f, unsigned int tot, unsigned int size);
static int ptcache_file_read(PTCacheFile *pf, void *f, unsigned int tot, unsigned int size);
/* Common functions */
@@ -657,11 +657,11 @@ static int ptcache_smoke_read(PTCacheFile *pf, void *smoke_v)
}
#else // WITH_SMOKE
static int ptcache_smoke_totpoint(void *UNUSED(smoke_v), int UNUSED(cfra)) { return 0; };
-static void ptcache_smoke_read(PTCacheFile *UNUSED(pf), void *UNUSED(smoke_v)) {}
+static int ptcache_smoke_read(PTCacheFile *UNUSED(pf), void *UNUSED(smoke_v)) { return 0; }
static int ptcache_smoke_write(PTCacheFile *UNUSED(pf), void *UNUSED(smoke_v)) { return 0; }
#endif // WITH_SMOKE
-static int ptcache_dynamicpaint_totpoint(void *sd, int cfra)
+static int ptcache_dynamicpaint_totpoint(void *sd, int UNUSED(cfra))
{
DynamicPaintSurface *surface = (DynamicPaintSurface*)sd;
@@ -677,7 +677,7 @@ static int ptcache_dynamicpaint_write(PTCacheFile *pf, void *dp_v)
int cache_compress = 1;
/* version header */
- ptcache_file_write(pf, DPAINT_CACHE_VERSION, 1, sizeof(char)*4);
+ ptcache_file_write(pf, (void *)DPAINT_CACHE_VERSION, 1, sizeof(char)*4);
if(surface->format != MOD_DPAINT_SURFACE_F_IMAGESEQ && surface->data) {
unsigned int total_points=surface->data->total_points;
@@ -1261,7 +1261,7 @@ static int ptcache_file_read(PTCacheFile *pf, void *f, unsigned int tot, unsigne
{
return (fread(f, size, tot, pf->fp) == tot);
}
-static int ptcache_file_write(PTCacheFile *pf, void *f, unsigned int tot, unsigned int size)
+static int ptcache_file_write(PTCacheFile *pf, const void *f, unsigned int tot, unsigned int size)
{
return (fwrite(f, size, tot, pf->fp) == tot);
}
diff --git a/source/blender/editors/physics/dynamicpaint_ops.c b/source/blender/editors/physics/dynamicpaint_ops.c
index 888b5af01bb..550da63d7aa 100644
--- a/source/blender/editors/physics/dynamicpaint_ops.c
+++ b/source/blender/editors/physics/dynamicpaint_ops.c
@@ -24,6 +24,7 @@
#include "BLI_blenlib.h"
#include "BLI_string.h"
+#include "BLI_utildefines.h"
#include "DNA_dynamicpaint_types.h"
#include "DNA_modifier_types.h"
@@ -52,7 +53,7 @@
#include "WM_types.h"
#include "WM_api.h"
-static int surface_slot_add_exec(bContext *C, wmOperator *op)
+static int surface_slot_add_exec(bContext *C, wmOperator *UNUSED(op))
{
DynamicPaintModifierData *pmd = 0;
Object *cObject = CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
@@ -94,7 +95,7 @@ void DPAINT_OT_surface_slot_add(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
-static int surface_slot_remove_exec(bContext *C, wmOperator *op)
+static int surface_slot_remove_exec(bContext *C, wmOperator *UNUSED(op))
{
DynamicPaintModifierData *pmd = 0;
Object *cObject = CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
@@ -418,4 +419,4 @@ void DPAINT_OT_bake(wmOperatorType *ot)
/* api callbacks */
ot->exec= dynamicpaint_bake_exec;
ot->poll= ED_operator_object_active_editable;
-} \ No newline at end of file
+}
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index ade3a65054f..1bc55b8d73f 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -403,7 +403,7 @@ static int draw_tface__set_draw_legacy(MTFace *tface, int has_mcol, int matnr)
}
}
-static int draw_mcol__set_draw_legacy(MTFace *tface, int has_mcol, int matnr)
+static int draw_mcol__set_draw_legacy(MTFace *UNUSED(tface), int has_mcol, int UNUSED(matnr))
{
if (has_mcol) return 1;
else return 2;
diff --git a/source/blender/makesdna/DNA_dynamicpaint_types.h b/source/blender/makesdna/DNA_dynamicpaint_types.h
index c8dfdf83a57..04d50c78652 100644
--- a/source/blender/makesdna/DNA_dynamicpaint_types.h
+++ b/source/blender/makesdna/DNA_dynamicpaint_types.h
@@ -6,7 +6,7 @@
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
-* Contributor(s): Miika Hämäläinen
+* Contributor(s): Miika Hämäläinen
*
* ***** END GPL LICENSE BLOCK *****
*/
diff --git a/source/blender/makesrna/intern/rna_dynamicpaint.c b/source/blender/makesrna/intern/rna_dynamicpaint.c
index 1f678faf421..754ed82e010 100644
--- a/source/blender/makesrna/intern/rna_dynamicpaint.c
+++ b/source/blender/makesrna/intern/rna_dynamicpaint.c
@@ -6,7 +6,7 @@
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
- * Contributor(s): Miika Hämäläinen
+ * Contributor(s): Miika Hämäläinen
*
* ***** END GPL LICENSE BLOCK *****
*/
diff --git a/source/blender/modifiers/intern/MOD_dynamicpaint.c b/source/blender/modifiers/intern/MOD_dynamicpaint.c
index f697f149ce4..c6b9e5752e0 100644
--- a/source/blender/modifiers/intern/MOD_dynamicpaint.c
+++ b/source/blender/modifiers/intern/MOD_dynamicpaint.c
@@ -6,7 +6,7 @@
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
-* Contributor(s): Miika Hämäläinen
+* Contributor(s): Miika Hämäläinen
*
* ***** END GPL LICENSE BLOCK *****
*
@@ -21,6 +21,8 @@
#include "MEM_guardedalloc.h"
+#include "BLI_utildefines.h"
+
#include "BKE_cdderivedmesh.h"
#include "BKE_dynamicpaint.h"
#include "BKE_modifier.h"
@@ -53,7 +55,7 @@ static void freeData(ModifierData *md)
dynamicPaint_Modifier_free(pmd);
}
-static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
+static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
{
DynamicPaintModifierData *pmd = (DynamicPaintModifierData*)md;
CustomDataMask dataMask = 0;
@@ -88,8 +90,8 @@ static CustomDataMask requiredDataMask(Object *ob, ModifierData *md)
static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
DerivedMesh *dm,
- int useRenderParams,
- int isFinalCalc)
+ int UNUSED(useRenderParams),
+ int UNUSED(isFinalCalc))
{
DynamicPaintModifierData *pmd = (DynamicPaintModifierData*) md;
@@ -120,7 +122,7 @@ static void updateDepgraph(ModifierData *md, DagForest *forest,
}
}
-static int dependsOnTime(ModifierData *md)
+static int dependsOnTime(ModifierData *UNUSED(md))
{
return 1;
}
@@ -143,8 +145,8 @@ static void foreachIDLink(ModifierData *md, Object *ob,
}
}
-static void foreachTexLink(ModifierData *md, Object *ob,
- TexWalkFunc walk, void *userData)
+static void foreachTexLink(ModifierData *UNUSED(md), Object *UNUSED(ob),
+ TexWalkFunc UNUSED(walk), void *UNUSED(userData))
{
//walk(userData, ob, md, ""); /* re-enable when possible */
}