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_linestyle.h2
-rw-r--r--source/blender/blenkernel/intern/linestyle.c4
-rw-r--r--source/blender/blenloader/intern/readfile.c2
-rw-r--r--source/blender/blenloader/intern/writefile.c8
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c4
-rw-r--r--source/blender/editors/render/render_shading.c4
-rw-r--r--source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp2
-rw-r--r--source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp4
-rwxr-xr-xsource/blender/freestyle/intern/geometry/FitCurve.cpp16
-rwxr-xr-xsource/blender/freestyle/intern/geometry/Grid.cpp2
-rwxr-xr-xsource/blender/freestyle/intern/geometry/Noise.cpp4
-rw-r--r--source/blender/freestyle/intern/python/BPy_Id.cpp4
-rw-r--r--source/blender/freestyle/intern/python/Director.cpp18
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp6
-rw-r--r--source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp2
-rw-r--r--source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp14
-rw-r--r--source/blender/freestyle/intern/scene_graph/NodeCamera.cpp2
-rwxr-xr-xsource/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp2
-rwxr-xr-xsource/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp2
-rwxr-xr-xsource/blender/freestyle/intern/stroke/Operators.cpp10
-rwxr-xr-xsource/blender/freestyle/intern/stroke/StrokeRep.cpp4
-rwxr-xr-xsource/blender/freestyle/intern/system/PseudoNoise.cpp2
-rwxr-xr-xsource/blender/freestyle/intern/view_map/ViewMap.cpp2
-rwxr-xr-xsource/blender/freestyle/intern/view_map/ViewMapIO.cpp20
-rw-r--r--source/blender/makesrna/intern/rna_scene.c10
25 files changed, 75 insertions, 75 deletions
diff --git a/source/blender/blenkernel/BKE_linestyle.h b/source/blender/blenkernel/BKE_linestyle.h
index bb763f4e6b3..20e2039c488 100644
--- a/source/blender/blenkernel/BKE_linestyle.h
+++ b/source/blender/blenkernel/BKE_linestyle.h
@@ -42,7 +42,7 @@
struct Main;
struct Object;
-FreestyleLineStyle *FRS_new_linestyle(char *name, struct Main *main);
+FreestyleLineStyle *FRS_new_linestyle(const char *name, struct Main *main);
void FRS_free_linestyle(FreestyleLineStyle *linestyle);
FreestyleLineStyle *FRS_copy_linestyle(FreestyleLineStyle *linestyle);
diff --git a/source/blender/blenkernel/intern/linestyle.c b/source/blender/blenkernel/intern/linestyle.c
index 0ed1b02d3c9..43a0daef80c 100644
--- a/source/blender/blenkernel/intern/linestyle.c
+++ b/source/blender/blenkernel/intern/linestyle.c
@@ -48,7 +48,7 @@
#include "BLI_blenlib.h"
-static char *modifier_name[LS_MODIFIER_NUM] = {
+static const char *modifier_name[LS_MODIFIER_NUM] = {
NULL,
"Along Stroke",
"Distance from Camera",
@@ -95,7 +95,7 @@ static void default_linestyle_settings(FreestyleLineStyle *linestyle)
linestyle->caps = LS_CAPS_BUTT;
}
-FreestyleLineStyle *FRS_new_linestyle(char *name, struct Main *main)
+FreestyleLineStyle *FRS_new_linestyle(const char *name, struct Main *main)
{
FreestyleLineStyle *linestyle;
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 55ae56ac4e8..bad884b9025 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -6550,7 +6550,7 @@ static void direct_link_linestyle_thickness_modifier(FileData *fd, LineStyleModi
}
}
-static void direct_link_linestyle_geometry_modifier(FileData *fd, LineStyleModifier *modifier)
+static void direct_link_linestyle_geometry_modifier(FileData *UNUSED(fd), LineStyleModifier *UNUSED(modifier))
{
}
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 5cfbf809d04..c6da59354c4 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2876,7 +2876,7 @@ static void write_masks(WriteData *wd, ListBase *idbase)
static void write_linestyle_color_modifiers(WriteData *wd, ListBase *modifiers)
{
LineStyleModifier *m;
- char *struct_name;
+ const char *struct_name;
for (m = modifiers->first; m; m = m->next) {
switch (m->type) {
@@ -2918,7 +2918,7 @@ static void write_linestyle_color_modifiers(WriteData *wd, ListBase *modifiers)
static void write_linestyle_alpha_modifiers(WriteData *wd, ListBase *modifiers)
{
LineStyleModifier *m;
- char *struct_name;
+ const char *struct_name;
for (m = modifiers->first; m; m = m->next) {
switch (m->type) {
@@ -2960,7 +2960,7 @@ static void write_linestyle_alpha_modifiers(WriteData *wd, ListBase *modifiers)
static void write_linestyle_thickness_modifiers(WriteData *wd, ListBase *modifiers)
{
LineStyleModifier *m;
- char *struct_name;
+ const char *struct_name;
for (m = modifiers->first; m; m = m->next) {
switch (m->type) {
@@ -3005,7 +3005,7 @@ static void write_linestyle_thickness_modifiers(WriteData *wd, ListBase *modifie
static void write_linestyle_geometry_modifiers(WriteData *wd, ListBase *modifiers)
{
LineStyleModifier *m;
- char *struct_name;
+ const char *struct_name;
for (m = modifiers->first; m; m = m->next) {
switch (m->type) {
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index c353b64607d..3153cc72562 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -2014,13 +2014,13 @@ static bAnimChannelType ACF_DSNTREE =
/* LineStyle Expander ------------------------------------------- */
// TODO: just get this from RNA?
-static int acf_dslinestyle_icon(bAnimListElem *ale)
+static int acf_dslinestyle_icon(bAnimListElem *UNUSED(ale))
{
return ICON_BRUSH_DATA; /* FIXME */
}
/* get the appropriate flag(s) for the setting when it is valid */
-static int acf_dslinestyle_setting_flag(bAnimContext *ac, int setting, short *neg)
+static int acf_dslinestyle_setting_flag(bAnimContext *UNUSED(ac), int setting, short *neg)
{
/* clear extra return data first */
*neg= 0;
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index 34677650f80..5e23015f194 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -703,7 +703,7 @@ static int freestyle_active_lineset_poll(bContext *C)
return FRS_get_active_lineset(&srl->freestyleConfig) != NULL;
}
-static int freestyle_lineset_copy_exec(bContext *C, wmOperator *op)
+static int freestyle_lineset_copy_exec(bContext *C, wmOperator *UNUSED(op))
{
Scene *scene= CTX_data_scene(C);
SceneRenderLayer *srl = (SceneRenderLayer*) BLI_findlink(&scene->r.layers, scene->r.actlay);
@@ -730,7 +730,7 @@ void SCENE_OT_freestyle_lineset_copy(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
-static int freestyle_lineset_paste_exec(bContext *C, wmOperator *op)
+static int freestyle_lineset_paste_exec(bContext *C, wmOperator *UNUSED(op))
{
Scene *scene= CTX_data_scene(C);
SceneRenderLayer *srl = (SceneRenderLayer*) BLI_findlink(&scene->r.layers, scene->r.actlay);
diff --git a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
index 2b2e92f57dd..8f2c00bf0f7 100644
--- a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
+++ b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
@@ -630,7 +630,7 @@ void BlenderFileLoader::insertShapeNode(ObjectInstanceRen *obi, int id)
cleanVertices[detri.viP+2] += 1e-5 * detri.v.z();
}
}
- printf("Warning: Object %s contains %d degenerate triangle%s (strokes may be incorrect)\n",
+ printf("Warning: Object %s contains %lu degenerated triangle%s (strokes may be incorrect)\n",
name, detriList.size(), (detriList.size() > 1) ? "s" : "");
}
diff --git a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
index 369418cb07a..656d7a23659 100644
--- a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
+++ b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
@@ -56,8 +56,8 @@ BlenderStrokeRenderer::BlenderStrokeRenderer(Render* re, int render_count)
freestyle_scene->r.ysch= re->recty; // old_scene->r.ysch
freestyle_scene->r.xasp= 1.f; // old_scene->r.xasp;
freestyle_scene->r.yasp= 1.f; // old_scene->r.yasp;
- freestyle_scene->r.xparts= old_scene->r.xparts;
- freestyle_scene->r.yparts= old_scene->r.yparts;
+ freestyle_scene->r.tilex= old_scene->r.tilex;
+ freestyle_scene->r.tiley= old_scene->r.tiley;
freestyle_scene->r.size= 100; // old_scene->r.size
freestyle_scene->r.maximsize= old_scene->r.maximsize;
freestyle_scene->r.ocres = old_scene->r.ocres;
diff --git a/source/blender/freestyle/intern/geometry/FitCurve.cpp b/source/blender/freestyle/intern/geometry/FitCurve.cpp
index 7754fcda32b..f71af130d7f 100755
--- a/source/blender/freestyle/intern/geometry/FitCurve.cpp
+++ b/source/blender/freestyle/intern/geometry/FitCurve.cpp
@@ -55,17 +55,17 @@ static Vector2 V2SubII(Vector2 a, Vector2 b);
#define MAXPOINTS 1000 /* The most points you can have */
/* returns squared length of input vector */
-double V2SquaredLength(Vector2 *a)
+static double V2SquaredLength(Vector2 *a)
{ return(((*a)[0] * (*a)[0])+((*a)[1] * (*a)[1]));
}
/* returns length of input vector */
-double V2Length(Vector2 *a)
+static double V2Length(Vector2 *a)
{
return(sqrt(V2SquaredLength(a)));
}
-Vector2 *V2Scale(Vector2 *v, double newlen)
+static Vector2 *V2Scale(Vector2 *v, double newlen)
{
double len = V2Length(v);
if (len != 0.0) { (*v)[0] *= newlen/len; (*v)[1] *= newlen/len; }
@@ -73,13 +73,13 @@ Vector2 *V2Scale(Vector2 *v, double newlen)
}
/* return the dot product of vectors a and b */
-double V2Dot(Vector2 *a, Vector2 *b)
+static double V2Dot(Vector2 *a, Vector2 *b)
{
return(((*a)[0]*(*b)[0])+((*a)[1]*(*b)[1]));
}
/* return the distance between two points */
-double V2DistanceBetween2Points(Vector2 *a, Vector2 *b)
+static double V2DistanceBetween2Points(Vector2 *a, Vector2 *b)
{
double dx = (*a)[0] - (*b)[0];
double dy = (*a)[1] - (*b)[1];
@@ -87,14 +87,14 @@ double dy = (*a)[1] - (*b)[1];
}
/* return vector sum c = a+b */
-Vector2 *V2Add(Vector2 *a, Vector2 *b, Vector2 *c)
+static Vector2 *V2Add(Vector2 *a, Vector2 *b, Vector2 *c)
{
(*c)[0] = (*a)[0]+(*b)[0]; (*c)[1] = (*a)[1]+(*b)[1];
return(c);
}
/* normalizes the input vector and returns it */
-Vector2 *V2Normalize(Vector2 *v)
+static Vector2 *V2Normalize(Vector2 *v)
{
double len = V2Length(v);
if (len != 0.0) { (*v)[0] /= len; (*v)[1] /= len; }
@@ -102,7 +102,7 @@ double len = V2Length(v);
}
/* negates the input vector and returns it */
-Vector2 *V2Negate(Vector2 *v)
+static Vector2 *V2Negate(Vector2 *v)
{
(*v)[0] = -(*v)[0]; (*v)[1] = -(*v)[1];
return(v);
diff --git a/source/blender/freestyle/intern/geometry/Grid.cpp b/source/blender/freestyle/intern/geometry/Grid.cpp
index 0096297f48b..bb0b3d80c30 100755
--- a/source/blender/freestyle/intern/geometry/Grid.cpp
+++ b/source/blender/freestyle/intern/geometry/Grid.cpp
@@ -30,7 +30,7 @@ void allOccludersGridVisitor::examineOccluder(Polygon3r *occ){
occluders_.push_back(occ);
}
-bool inBox(const Vec3r& inter, const Vec3r& box_min, const Vec3r& box_max){
+static bool inBox(const Vec3r& inter, const Vec3r& box_min, const Vec3r& box_max){
if(((inter.x()>=box_min.x()) && (inter.x() <box_max.x()))
&& ((inter.y()>=box_min.y()) && (inter.y() <box_max.y()))
&& ((inter.z()>=box_min.z()) && (inter.z() <box_max.z()))
diff --git a/source/blender/freestyle/intern/geometry/Noise.cpp b/source/blender/freestyle/intern/geometry/Noise.cpp
index c9a80adc5ee..ede8c434d9d 100755
--- a/source/blender/freestyle/intern/geometry/Noise.cpp
+++ b/source/blender/freestyle/intern/geometry/Noise.cpp
@@ -58,7 +58,7 @@
r0 = t - (int)t;\
r1 = r0 - 1.;
-void normalize2(float v[2])
+static void normalize2(float v[2])
{
float s;
@@ -67,7 +67,7 @@ void normalize2(float v[2])
v[1] = v[1] / s;
}
-void normalize3(float v[3])
+static void normalize3(float v[3])
{
float s;
diff --git a/source/blender/freestyle/intern/python/BPy_Id.cpp b/source/blender/freestyle/intern/python/BPy_Id.cpp
index 9254badd95d..8f8336f6c17 100644
--- a/source/blender/freestyle/intern/python/BPy_Id.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Id.cpp
@@ -55,9 +55,9 @@ static char Id___doc__[] =
static int Id___init__(BPy_Id *self, PyObject *args, PyObject *kwds)
{
int first = 0, second = 0;
- static char *kwlist[] = {"first", "second", NULL};
+ static const char *kwlist[] = {"first", "second", NULL};
- if (! PyArg_ParseTupleAndKeywords(args, kwds, "|ii", kwlist, &first, &second) )
+ if (! PyArg_ParseTupleAndKeywords(args, kwds, "|ii", (char**)kwlist, &first, &second) )
return -1;
self->id = new Id( first, second );
diff --git a/source/blender/freestyle/intern/python/Director.cpp b/source/blender/freestyle/intern/python/Director.cpp
index 1948da2b6b0..7471edea07c 100644
--- a/source/blender/freestyle/intern/python/Director.cpp
+++ b/source/blender/freestyle/intern/python/Director.cpp
@@ -50,7 +50,7 @@ int Director_BPy_BinaryPredicate0D___call__( BinaryPredicate0D *bp0D, Interface0
Py_XDECREF(arg2);
return -1;
}
- PyObject *result = PyObject_CallMethod( bp0D->py_bp0D, "__call__", "OO", arg1, arg2 );
+ PyObject *result = PyObject_CallMethod( bp0D->py_bp0D, (char*)"__call__", (char*)"OO", arg1, arg2 );
Py_DECREF(arg1);
Py_DECREF(arg2);
if (!result)
@@ -77,7 +77,7 @@ int Director_BPy_BinaryPredicate1D___call__( BinaryPredicate1D *bp1D, Interface1
Py_XDECREF(arg2);
return -1;
}
- PyObject *result = PyObject_CallMethod( bp1D->py_bp1D, "__call__", "OO", arg1, arg2 );
+ PyObject *result = PyObject_CallMethod( bp1D->py_bp1D, (char*)"__call__", (char*)"OO", arg1, arg2 );
Py_DECREF(arg1);
Py_DECREF(arg2);
if (!result)
@@ -100,7 +100,7 @@ int Director_BPy_UnaryPredicate0D___call__( UnaryPredicate0D *up0D, Interface0DI
PyObject *arg = BPy_Interface0DIterator_from_Interface0DIterator(if0D_it, 0);
if (!arg)
return -1;
- PyObject *result = PyObject_CallMethod( up0D->py_up0D, "__call__", "O", arg );
+ PyObject *result = PyObject_CallMethod( up0D->py_up0D, (char*)"__call__", (char*)"O", arg );
Py_DECREF(arg);
if (!result)
return -1;
@@ -122,7 +122,7 @@ int Director_BPy_UnaryPredicate1D___call__( UnaryPredicate1D *up1D, Interface1D&
PyObject *arg = Any_BPy_Interface1D_from_Interface1D(if1D);
if (!arg)
return -1;
- PyObject *result = PyObject_CallMethod( up1D->py_up1D, "__call__", "O", arg );
+ PyObject *result = PyObject_CallMethod( up1D->py_up1D, (char*)"__call__", (char*)"O", arg );
Py_DECREF(arg);
if (!result)
return -1;
@@ -144,7 +144,7 @@ int Director_BPy_StrokeShader_shade( StrokeShader *ss, Stroke& s ) {
PyObject *arg = BPy_Stroke_from_Stroke(s);
if (!arg)
return -1;
- PyObject *result = PyObject_CallMethod( ss->py_ss, "shade", "O", arg );
+ PyObject *result = PyObject_CallMethod( ss->py_ss, (char*)"shade", (char*)"O", arg );
Py_DECREF(arg);
if (!result)
return -1;
@@ -158,7 +158,7 @@ int Director_BPy_ChainingIterator_init( ChainingIterator *c_it ) {
PyErr_SetString(PyExc_RuntimeError, "Reference to Python object (py_c_it) not initialized");
return -1;
}
- PyObject *result = PyObject_CallMethod( c_it->py_c_it, "init", "");
+ PyObject *result = PyObject_CallMethod( c_it->py_c_it, (char*)"init", NULL);
if (!result)
return -1;
Py_DECREF(result);
@@ -173,7 +173,7 @@ int Director_BPy_ChainingIterator_traverse( ChainingIterator *c_it, AdjacencyIte
PyObject *arg = BPy_AdjacencyIterator_from_AdjacencyIterator(a_it);
if (!arg)
return -1;
- PyObject *result = PyObject_CallMethod( c_it->py_c_it, "traverse", "O", arg );
+ PyObject *result = PyObject_CallMethod( c_it->py_c_it, (char*)"traverse", (char*)"O", arg );
Py_DECREF(arg);
if (!result)
return -1;
@@ -201,7 +201,7 @@ int Director_BPy_UnaryFunction0D___call__( void *uf0D, PyObject *obj, Interface0
PyObject *arg = BPy_Interface0DIterator_from_Interface0DIterator(if0D_it, 0);
if (!arg)
return -1;
- PyObject *result = PyObject_CallMethod( obj, "__call__", "O", arg );
+ PyObject *result = PyObject_CallMethod( obj, (char*)"__call__", (char*)"O", arg );
Py_DECREF(arg);
if (!result)
return -1;
@@ -261,7 +261,7 @@ int Director_BPy_UnaryFunction1D___call__( void *uf1D, PyObject *obj, Interface1
PyObject *arg = Any_BPy_Interface1D_from_Interface1D(if1D);
if (!arg)
return -1;
- PyObject *result = PyObject_CallMethod( obj, "__call__", "O", arg );
+ PyObject *result = PyObject_CallMethod( obj, (char*)"__call__", (char*)"O", arg );
Py_DECREF(arg);
if (!result)
return -1;
diff --git a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp
index c85134f71d5..343e65e9fe6 100644
--- a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.cpp
@@ -37,7 +37,7 @@ static char Chain___doc__[] =
" :arg id: An Id object.\n"
" :type id: :class:`Id`\n";
-int Chain___init__(BPy_Chain *self, PyObject *args, PyObject *kwds)
+static int Chain___init__(BPy_Chain *self, PyObject *args, PyObject *kwds)
{
PyObject *obj = 0;
@@ -77,7 +77,7 @@ static char Chain_push_viewedge_back___doc__[] =
" processed.\n"
" :type orientation: bool\n";
-PyObject * Chain_push_viewedge_back( BPy_Chain *self, PyObject *args ) {
+static PyObject * Chain_push_viewedge_back( BPy_Chain *self, PyObject *args ) {
PyObject *obj1 = 0, *obj2 = 0;
if(!( PyArg_ParseTuple(args, "O!O", &ViewEdge_Type, &obj1, &obj2) ))
@@ -101,7 +101,7 @@ static char Chain_push_viewedge_front___doc__[] =
" processed.\n"
" :type orientation: bool\n";
-PyObject * Chain_push_viewedge_front( BPy_Chain *self, PyObject *args ) {
+static PyObject * Chain_push_viewedge_front( BPy_Chain *self, PyObject *args ) {
PyObject *obj1 = 0, *obj2 = 0;
if(!( PyArg_ParseTuple(args, "O!O", &ViewEdge_Type, &obj1, &obj2) ))
diff --git a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
index d1a8fbef6b9..f66d95b3a39 100644
--- a/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
+++ b/source/blender/freestyle/intern/python/Iterator/BPy_CurvePointIterator.cpp
@@ -68,7 +68,7 @@ static char CurvePointIterator_t___doc__[] =
" :return: The curvilinear abscissa.\n"
" :rtype: float\n";
-PyObject * CurvePointIterator_t( BPy_CurvePointIterator *self ) {
+static PyObject * CurvePointIterator_t( BPy_CurvePointIterator *self ) {
return PyFloat_FromDouble( self->cp_it->t() );
}
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp
index 67a7955f0d5..6d50a1ed437 100644
--- a/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp
+++ b/source/blender/freestyle/intern/python/UnaryFunction1D/BPy_UnaryFunction1DVec3f.cpp
@@ -52,7 +52,7 @@ static char UnaryFunction1DVec3f___doc__[] =
" :arg integration: An integration method.\n"
" :type integration: :class:`IntegrationType`\n";
-int UnaryFunction1DVec3f___init__(BPy_UnaryFunction1DVec3f* self, PyObject *args)
+static int UnaryFunction1DVec3f___init__(BPy_UnaryFunction1DVec3f* self, PyObject *args)
{
PyObject *obj = 0;
@@ -69,7 +69,7 @@ int UnaryFunction1DVec3f___init__(BPy_UnaryFunction1DVec3f* self, PyObject *args
return 0;
}
-void UnaryFunction1DVec3f___dealloc__(BPy_UnaryFunction1DVec3f* self)
+static void UnaryFunction1DVec3f___dealloc__(BPy_UnaryFunction1DVec3f* self)
{
if (self->uf1D_vec3f)
delete self->uf1D_vec3f;
@@ -77,7 +77,7 @@ void UnaryFunction1DVec3f___dealloc__(BPy_UnaryFunction1DVec3f* self)
}
-PyObject * UnaryFunction1DVec3f___repr__(BPy_UnaryFunction1DVec3f* self)
+static PyObject * UnaryFunction1DVec3f___repr__(BPy_UnaryFunction1DVec3f* self)
{
return PyUnicode_FromFormat("type: %s - address: %p", self->uf1D_vec3f->getName().c_str(), self->uf1D_vec3f );
}
@@ -90,12 +90,12 @@ static char UnaryFunction1DVec3f_getName___doc__[] =
" :return: The name of the unary 1D function.\n"
" :rtype: str\n";
-PyObject * UnaryFunction1DVec3f_getName( BPy_UnaryFunction1DVec3f *self )
+static PyObject * UnaryFunction1DVec3f_getName( BPy_UnaryFunction1DVec3f *self )
{
return PyUnicode_FromString( self->uf1D_vec3f->getName().c_str() );
}
-PyObject * UnaryFunction1DVec3f___call__( BPy_UnaryFunction1DVec3f *self, PyObject *args, PyObject *kwds)
+static PyObject * UnaryFunction1DVec3f___call__( BPy_UnaryFunction1DVec3f *self, PyObject *args, PyObject *kwds)
{
PyObject *obj;
@@ -129,7 +129,7 @@ static char UnaryFunction1DVec3f_setIntegrationType___doc__[] =
" :arg integration: An integration method.\n"
" :type integration: :class:`IntegrationType`\n";
-PyObject * UnaryFunction1DVec3f_setIntegrationType(BPy_UnaryFunction1DVec3f* self, PyObject *args)
+static PyObject * UnaryFunction1DVec3f_setIntegrationType(BPy_UnaryFunction1DVec3f* self, PyObject *args)
{
PyObject *obj;
@@ -148,7 +148,7 @@ static char UnaryFunction1DVec3f_getIntegrationType___doc__[] =
" :return: The integration method.\n"
" :rtype: :class:`IntegrationType`\n";
-PyObject * UnaryFunction1DVec3f_getIntegrationType(BPy_UnaryFunction1DVec3f* self) {
+static PyObject * UnaryFunction1DVec3f_getIntegrationType(BPy_UnaryFunction1DVec3f* self) {
return BPy_IntegrationType_from_IntegrationType( self->uf1D_vec3f->getIntegrationType() );
}
diff --git a/source/blender/freestyle/intern/scene_graph/NodeCamera.cpp b/source/blender/freestyle/intern/scene_graph/NodeCamera.cpp
index 1d095b35a0d..f299c44de40 100644
--- a/source/blender/freestyle/intern/scene_graph/NodeCamera.cpp
+++ b/source/blender/freestyle/intern/scene_graph/NodeCamera.cpp
@@ -2,7 +2,7 @@
#include "NodeCamera.h"
#include <math.h>
-void loadIdentity(double * matrix){
+static void loadIdentity(double * matrix){
int i;
// Build Identity matrix
diff --git a/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp b/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp
index 697531b383f..7ee5762a70f 100755
--- a/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp
+++ b/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp
@@ -245,7 +245,7 @@ void Smoother::smooth(int nbIteration, real iFactorPoint, real ifactorCurvature,
copyVertices();
}
-real edgeStopping (real x, real sigma)
+static real edgeStopping (real x, real sigma)
{
if (sigma==0.0) return 1.0;
return exp(-x*x/(sigma*sigma));
diff --git a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp
index 321dd5fe41f..eea6da40c9f 100755
--- a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp
+++ b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp
@@ -50,7 +50,7 @@ extern "C" {
// (*oArray)[i] = ((float)qBlue(rgb))/255.f;
// }
// }
-void convert(ImBuf *imBuf, float **oArray, unsigned &oSize) {
+static void convert(ImBuf *imBuf, float **oArray, unsigned &oSize) {
oSize = imBuf->x;
*oArray = new float[oSize];
diff --git a/source/blender/freestyle/intern/stroke/Operators.cpp b/source/blender/freestyle/intern/stroke/Operators.cpp
index 09833bf4b4a..80562e104d2 100755
--- a/source/blender/freestyle/intern/stroke/Operators.cpp
+++ b/source/blender/freestyle/intern/stroke/Operators.cpp
@@ -643,8 +643,8 @@ error:
#include "CurveIterators.h"
// Internal function
-int __recursiveSplit(Chain *_curve, UnaryFunction0D<double>& func, UnaryPredicate1D& pred, float sampling,
- Operators::I1DContainer& newChains, Operators::I1DContainer& splitted_chains)
+static int __recursiveSplit(Chain *_curve, UnaryFunction0D<double>& func, UnaryPredicate1D& pred, float sampling,
+ Operators::I1DContainer& newChains, Operators::I1DContainer& splitted_chains)
{
if(((_curve->nSegments() == 1) && (sampling == 0)) || (_curve->getLength2D() <= sampling)){
newChains.push_back(_curve);
@@ -796,8 +796,8 @@ int Operators::recursiveSplit(UnaryFunction0D<double>& func, UnaryPredicate1D& p
// recursive split with pred 0D
-int __recursiveSplit(Chain *_curve, UnaryFunction0D<double>& func, UnaryPredicate0D& pred0d, UnaryPredicate1D& pred, float sampling,
- Operators::I1DContainer& newChains, Operators::I1DContainer& splitted_chains)
+static int __recursiveSplit(Chain *_curve, UnaryFunction0D<double>& func, UnaryPredicate0D& pred0d, UnaryPredicate1D& pred, float sampling,
+ Operators::I1DContainer& newChains, Operators::I1DContainer& splitted_chains)
{
if(((_curve->nSegments() == 1) && (sampling == 0)) || (_curve->getLength2D() <= sampling)){
newChains.push_back(_curve);
@@ -992,7 +992,7 @@ int Operators::sort(BinaryPredicate1D& pred) {
return 0;
}
-Stroke* createStroke(Interface1D& inter) {
+static Stroke* createStroke(Interface1D& inter) {
Stroke* stroke = new Stroke;
stroke->setId(inter.getId());
diff --git a/source/blender/freestyle/intern/stroke/StrokeRep.cpp b/source/blender/freestyle/intern/stroke/StrokeRep.cpp
index 18142233672..91f9d866c86 100755
--- a/source/blender/freestyle/intern/stroke/StrokeRep.cpp
+++ b/source/blender/freestyle/intern/stroke/StrokeRep.cpp
@@ -78,13 +78,13 @@ Strip::~Strip(){
#define MAX_RATIO_LENGTH_SINGU 2
#define HUGE_COORD 1e4
-bool notValid (Vec2r p)
+static bool notValid (Vec2r p)
{
return (p[0]!=p[0]) || (p[1]!=p[1]) || (fabs(p[0])>HUGE_COORD) || (fabs(p[1])>HUGE_COORD)
|| (p[0] <-HUGE_COORD) || (p[1]<-HUGE_COORD);
}
-real crossP(const Vec2r& A, const Vec2r& B){
+static real crossP(const Vec2r& A, const Vec2r& B){
return A[0]*B[1] - A[1]*B[0];
}
diff --git a/source/blender/freestyle/intern/system/PseudoNoise.cpp b/source/blender/freestyle/intern/system/PseudoNoise.cpp
index 7a5fee2da4f..069027ed3e0 100755
--- a/source/blender/freestyle/intern/system/PseudoNoise.cpp
+++ b/source/blender/freestyle/intern/system/PseudoNoise.cpp
@@ -50,7 +50,7 @@ PseudoNoise::linearNoise (real x)
return x1*(1-t)+x2*t;
}
-real
+static real
LanczosWindowed(real t)
{
if (fabs(t)>2) return 0;
diff --git a/source/blender/freestyle/intern/view_map/ViewMap.cpp b/source/blender/freestyle/intern/view_map/ViewMap.cpp
index 87624669204..e6c5d55f765 100755
--- a/source/blender/freestyle/intern/view_map/ViewMap.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewMap.cpp
@@ -262,7 +262,7 @@ ViewVertex * ViewMap::InsertViewVertex(SVertex *iVertex,
/**********************************/
// is dve1 before dve2 ? (does it have a smaller angle ?)
-bool ViewEdgeComp(ViewVertex::directedViewEdge& dve1, ViewVertex::directedViewEdge& dve2){
+static bool ViewEdgeComp(ViewVertex::directedViewEdge& dve1, ViewVertex::directedViewEdge& dve2){
FEdge *fe1;
if(dve1.second)
fe1 = dve1.first->fedgeB();
diff --git a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
index f99a574766b..210bb3b8750 100755
--- a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
@@ -124,7 +124,7 @@ namespace ViewMapIO {
}
- int load(istream& in, ViewShape* vs) {
+ static int load(istream& in, ViewShape* vs) {
if (!vs || !vs->sshape())
return 1;
@@ -203,7 +203,7 @@ namespace ViewMapIO {
}
- int load(istream& in, FEdge* fe) {
+ static int load(istream& in, FEdge* fe) {
if (!fe)
return 1;
@@ -317,7 +317,7 @@ namespace ViewMapIO {
}
- int load(istream& in, SVertex* sv) {
+ static int load(istream& in, SVertex* sv) {
if (!sv)
return 1;
@@ -371,7 +371,7 @@ namespace ViewMapIO {
}
- int load(istream& in, ViewEdge* ve) {
+ static int load(istream& in, ViewEdge* ve) {
if (!ve)
return 1;
@@ -438,7 +438,7 @@ namespace ViewMapIO {
}
- int load(istream& in, ViewVertex* vv) {
+ static int load(istream& in, ViewVertex* vv) {
if (!vv)
return 1;
@@ -597,7 +597,7 @@ namespace ViewMapIO {
}
- int save(ostream& out, ViewShape* vs) {
+ static int save(ostream& out, ViewShape* vs) {
if (!vs || !vs->sshape()) {
cerr << "Warning: null ViewShape" << endl;
@@ -667,7 +667,7 @@ namespace ViewMapIO {
}
- int save(ostream& out, FEdge* fe) {
+ static int save(ostream& out, FEdge* fe) {
if (!fe) {
cerr << "Warning: null FEdge" << endl;
@@ -752,7 +752,7 @@ namespace ViewMapIO {
}
- int save(ostream& out, SVertex* sv) {
+ static int save(ostream& out, SVertex* sv) {
if (!sv) {
cerr << "Warning: null SVertex" << endl;
@@ -805,7 +805,7 @@ namespace ViewMapIO {
}
- int save(ostream& out, ViewEdge* ve) {
+ static int save(ostream& out, ViewEdge* ve) {
if (!ve) {
cerr << "Warning: null ViewEdge" << endl;
@@ -859,7 +859,7 @@ namespace ViewMapIO {
}
- int save(ostream& out, ViewVertex* vv) {
+ static int save(ostream& out, ViewVertex* vv) {
if (!vv) {
cerr << "Warning: null ViewVertex" << endl;
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 6527fe29263..0e9b6a7d9a2 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -1466,12 +1466,12 @@ static PointerRNA rna_FreestyleSettings_active_lineset_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, &RNA_FreestyleLineSet, lineset);
}
-static void rna_FreestyleSettings_active_lineset_index_range(PointerRNA *ptr, int *min, int *max)
+static void rna_FreestyleSettings_active_lineset_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
{
- FreestyleConfig *config= (FreestyleConfig *)ptr->data;
- *min= 0;
- *max= BLI_countlist(&config->linesets)-1;
- *max= MAX2(0, *max);
+ FreestyleConfig *config = (FreestyleConfig *)ptr->data;
+
+ *min = 0;
+ *max = max_ii(0, BLI_countlist(&config->linesets) - 1);
}
static int rna_FreestyleSettings_active_lineset_index_get(PointerRNA *ptr)