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:
authorCampbell Barton <ideasman42@gmail.com>2011-11-14 20:05:44 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-14 20:05:44 +0400
commit49ccf975f25c11d217e6db462986998991383291 (patch)
tree2d6119e1c59bf6cb11ab530d1e2ddcaa8ec88819
parent5b5f776eae79811b7c807b4a7eabfc7727d764cf (diff)
minor cleanup
- use NULL rather then 0 for pointers - use static functions where possible - add own includes to ensure func's and their declarations don't get out of sync.
-rw-r--r--source/blender/blenfont/intern/blf_lang.c2
-rw-r--r--source/blender/blenfont/intern/blf_translation.c2
-rw-r--r--source/blender/blenkernel/BKE_blender.h2
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c2
-rw-r--r--source/blender/blenkernel/intern/mesh_validate.c2
-rw-r--r--source/blender/blenlib/intern/bpath.c6
-rw-r--r--source/blender/blenlib/intern/path_util.c2
-rw-r--r--source/blender/editors/interface/interface.c2
-rw-r--r--source/blender/editors/interface/interface_ops.c2
-rw-r--r--source/blender/editors/object/object_constraint.c2
-rw-r--r--source/blender/editors/object/object_vgroup.c2
-rw-r--r--source/blender/editors/physics/dynamicpaint_ops.c12
-rw-r--r--source/blender/editors/space_clip/clip_toolbar.c2
-rw-r--r--source/blender/editors/space_info/info_stats.c2
-rw-r--r--source/blender/makesdna/intern/makesdna.c10
-rw-r--r--source/blender/makesrna/intern/rna_context.c2
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c68
-rw-r--r--source/blender/makesrna/intern/rna_wm.c58
-rw-r--r--source/blender/modifiers/intern/MOD_dynamicpaint.c16
-rw-r--r--source/blender/modifiers/intern/MOD_ocean.c20
-rw-r--r--source/blender/nodes/NOD_socket.h3
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_moviedistortion.c2
-rw-r--r--source/blender/render/intern/source/shadeoutput.c2
-rw-r--r--source/blenderplayer/bad_level_call_stubs/stubs.c2
24 files changed, 122 insertions, 103 deletions
diff --git a/source/blender/blenfont/intern/blf_lang.c b/source/blender/blenfont/intern/blf_lang.c
index 3bce3878d72..e8c6ff76934 100644
--- a/source/blender/blenfont/intern/blf_lang.c
+++ b/source/blender/blenfont/intern/blf_lang.c
@@ -34,6 +34,8 @@
#include "BLF_api.h"
+#include "BLF_translation.h" /* own include */
+
#ifdef WITH_INTERNATIONAL
#include <locale.h>
diff --git a/source/blender/blenfont/intern/blf_translation.c b/source/blender/blenfont/intern/blf_translation.c
index 8688249732f..fe14f5d4d1c 100644
--- a/source/blender/blenfont/intern/blf_translation.c
+++ b/source/blender/blenfont/intern/blf_translation.c
@@ -47,7 +47,7 @@
#include "DNA_userdef_types.h" /* For user settings. */
#ifdef WITH_INTERNATIONAL
-const char unifont_filename[]="droidsans.ttf.gz";
+static const char unifont_filename[]="droidsans.ttf.gz";
static unsigned char *unifont_ttf= NULL;
static int unifont_size= 0;
diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h
index 7be1252b9c2..34b674fcb4a 100644
--- a/source/blender/blenkernel/BKE_blender.h
+++ b/source/blender/blenkernel/BKE_blender.h
@@ -53,6 +53,8 @@ extern "C" {
/* alpha/beta/rc/release, docs use this */
#define BLENDER_VERSION_CYCLE beta
+extern char versionstr[]; /* from blender.c */
+
struct ListBase;
struct MemFile;
struct bContext;
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index 13eb59695b9..532e6f797dd 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -317,7 +317,7 @@ static int surface_duplicateOutputExists(void *arg, const char *name)
return 0;
}
-void surface_setUniqueOutputName(DynamicPaintSurface *surface, char *basename, int output)
+static void surface_setUniqueOutputName(DynamicPaintSurface *surface, char *basename, int output)
{
char name[64];
BLI_strncpy(name, basename, sizeof(name)); /* in case basename is surface->name use a copy */
diff --git a/source/blender/blenkernel/intern/mesh_validate.c b/source/blender/blenkernel/intern/mesh_validate.c
index 0dac4b8cd80..ec24f72874d 100644
--- a/source/blender/blenkernel/intern/mesh_validate.c
+++ b/source/blender/blenkernel/intern/mesh_validate.c
@@ -331,7 +331,7 @@ static int mesh_validate_customdata(CustomData *data, short do_verbose, const sh
#undef PRINT
-int BKE_mesh_validate_all_customdata(CustomData *vdata, CustomData *edata, CustomData *fdata, short do_verbose, const short do_fixes)
+static int BKE_mesh_validate_all_customdata(CustomData *vdata, CustomData *edata, CustomData *fdata, short do_verbose, const short do_fixes)
{
int vfixed= 0, efixed= 0, ffixed= 0;
diff --git a/source/blender/blenlib/intern/bpath.c b/source/blender/blenlib/intern/bpath.c
index ce5927cf3cc..8ad6cfc7cdf 100644
--- a/source/blender/blenlib/intern/bpath.c
+++ b/source/blender/blenlib/intern/bpath.c
@@ -131,7 +131,7 @@ static int makeFilesRelative_visit_cb(void *userdata, char *path_dst, const char
void makeFilesRelative(Main *bmain, const char *basedir, ReportList *reports)
{
- BPathRemap_Data data= {0};
+ BPathRemap_Data data= {NULL};
if(basedir[0] == '\0') {
printf("%s: basedir='', this is a bug\n", __func__);
@@ -174,7 +174,7 @@ static int makeFilesAbsolute_visit_cb(void *userdata, char *path_dst, const char
/* similar to makeFilesRelative - keep in sync! */
void makeFilesAbsolute(Main *bmain, const char *basedir, ReportList *reports)
{
- BPathRemap_Data data= {0};
+ BPathRemap_Data data= {NULL};
if(basedir[0] == '\0') {
printf("%s: basedir='', this is a bug\n", __func__);
@@ -280,7 +280,7 @@ static int findMissingFiles_visit_cb(void *userdata, char *path_dst, const char
void findMissingFiles(Main *bmain, const char *searchpath, ReportList *reports)
{
- struct BPathFind_Data data= {0};
+ struct BPathFind_Data data= {NULL};
data.reports= reports;
BLI_split_dir_part(searchpath, data.searchdir, sizeof(data.searchdir));
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index 7aa84523e9d..7c7d51e5907 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -1841,7 +1841,7 @@ const char *BLI_program_dir(void)
* @param fullname The full path to the temp directory
* @param userdir Directory specified in user preferences
*/
-void BLI_where_is_temp(char *fullname, const size_t maxlen, char *userdir)
+static void BLI_where_is_temp(char *fullname, const size_t maxlen, char *userdir)
{
fullname[0] = '\0';
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index ce4e052bd53..be8bee7452d 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -3582,7 +3582,7 @@ void UI_init_userdef(void)
uiStyleInit();
}
-void UI_reinit_font()
+void UI_reinit_font(void)
{
uiStyleInit();
}
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c
index 5803054caa7..2a75c2a26c1 100644
--- a/source/blender/editors/interface/interface_ops.c
+++ b/source/blender/editors/interface/interface_ops.c
@@ -494,7 +494,7 @@ struct uiEditSourceButStore {
} uiEditSourceButStore;
/* should only ever be set while the edit source operator is running */
-struct uiEditSourceStore *ui_editsource_info= NULL;
+static struct uiEditSourceStore *ui_editsource_info= NULL;
int UI_editsource_enable_check(void)
{
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index 0fbf5a8bd92..3c84b2df1d2 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -736,7 +736,7 @@ static int childof_set_inverse_exec (bContext *C, wmOperator *op)
where_is_pose(scene, ob);
}
else if (ob) {
- Object workob = {{0}};
+ Object workob = {{NULL}};
/* use what_does_parent to find inverse - just like for normal parenting */
what_does_parent(scene, ob, &workob);
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index 0d210fa83eb..936da90e8b7 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -799,7 +799,7 @@ static int* getSurroundingVerts(Mesh *me, int vert, int *count)
}
}
if(!length) {
- return 0;
+ return NULL;
}
tverts = MEM_mallocN(sizeof(int)*length, "tempSurroundingVerts");
mf = me->mface;
diff --git a/source/blender/editors/physics/dynamicpaint_ops.c b/source/blender/editors/physics/dynamicpaint_ops.c
index f30ff9c08e9..6739e297309 100644
--- a/source/blender/editors/physics/dynamicpaint_ops.c
+++ b/source/blender/editors/physics/dynamicpaint_ops.c
@@ -53,9 +53,11 @@
#include "WM_types.h"
#include "WM_api.h"
+#include "physics_intern.h" /* own include */
+
static int surface_slot_add_exec(bContext *C, wmOperator *UNUSED(op))
{
- DynamicPaintModifierData *pmd = 0;
+ DynamicPaintModifierData *pmd = NULL;
Object *cObject = CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
DynamicPaintCanvasSettings *canvas;
DynamicPaintSurface *surface;
@@ -97,7 +99,7 @@ void DPAINT_OT_surface_slot_add(wmOperatorType *ot)
static int surface_slot_remove_exec(bContext *C, wmOperator *UNUSED(op))
{
- DynamicPaintModifierData *pmd = 0;
+ DynamicPaintModifierData *pmd = NULL;
Object *cObject = CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
DynamicPaintCanvasSettings *canvas;
DynamicPaintSurface *surface;
@@ -336,9 +338,9 @@ static int dynamicPaint_bakeImageSequence(bContext *C, DynamicPaintSurface *surf
/*
-* Bake Dynamic Paint image sequence surface
-*/
-int dynamicPaint_initBake(struct bContext *C, struct wmOperator *op)
+ * Bake Dynamic Paint image sequence surface
+ */
+static int dynamicPaint_initBake(struct bContext *C, struct wmOperator *op)
{
DynamicPaintModifierData *pmd = NULL;
DynamicPaintCanvasSettings *canvas;
diff --git a/source/blender/editors/space_clip/clip_toolbar.c b/source/blender/editors/space_clip/clip_toolbar.c
index c8113c5ea7b..fe09c5cd829 100644
--- a/source/blender/editors/space_clip/clip_toolbar.c
+++ b/source/blender/editors/space_clip/clip_toolbar.c
@@ -50,6 +50,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
+#include "clip_intern.h" /* own include */
+
/* ************************ header area region *********************** */
/************************** properties ******************************/
diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c
index 25e1d2f2816..52e6a8808ae 100644
--- a/source/blender/editors/space_info/info_stats.c
+++ b/source/blender/editors/space_info/info_stats.c
@@ -40,6 +40,7 @@
#include "BLI_utildefines.h"
#include "BKE_anim.h"
+#include "BKE_blender.h"
#include "BKE_curve.h"
#include "BKE_displist.h"
#include "BKE_DerivedMesh.h"
@@ -362,7 +363,6 @@ static void stats_update(Scene *scene)
static void stats_string(Scene *scene)
{
- extern char versionstr[]; /* from blender.c */
SceneStats *stats= scene->stats;
Object *ob= (scene->basact)? scene->basact->object: NULL;
uintptr_t mem_in_use, mmap_in_use;
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
index c060eb186c9..ebd51d1c102 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -64,7 +64,7 @@
/* Included the path relative from /source/blender/ here, so we can move */
/* headers around with more freedom. */
-const char *includefiles[] = {
+static const char *includefiles[] = {
// if you add files here, please add them at the end
// of makesdna.c (this file) as well
@@ -224,7 +224,7 @@ void printStructLenghts(void);
/* ************************* MAKEN DNA ********************** */
-int add_type(const char *str, int len)
+static int add_type(const char *str, int len)
{
int nr;
char *cp;
@@ -399,7 +399,7 @@ static int add_name(const char *str)
return nr_names-1;
}
-short *add_struct(int namecode)
+static short *add_struct(int namecode)
{
int len;
short *sp;
@@ -522,7 +522,7 @@ static void *read_file_data(char *filename, int *len_r)
return data;
}
-int convert_include(char *filename)
+static int convert_include(char *filename)
{
/* read include file, skip structs with a '#' before it.
store all data in temporal arrays.
@@ -659,7 +659,7 @@ int convert_include(char *filename)
return 0;
}
-int arraysize(char *astr, int len)
+static int arraysize(char *astr, int len)
{
int a, mul=1;
char str[100], *cp=NULL;
diff --git a/source/blender/makesrna/intern/rna_context.c b/source/blender/makesrna/intern/rna_context.c
index f041d3efde4..043645aaf57 100644
--- a/source/blender/makesrna/intern/rna_context.c
+++ b/source/blender/makesrna/intern/rna_context.c
@@ -35,6 +35,8 @@
#include "BKE_context.h"
+#include "rna_internal.h" /* own include */
+
#ifdef RNA_RUNTIME
static PointerRNA rna_Context_manager_get(PointerRNA *ptr)
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 35ba9984c79..170cfcb103e 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -70,43 +70,43 @@ EnumPropertyItem node_socket_type_items[] = {
{0, NULL, 0, NULL, NULL}};
EnumPropertyItem node_math_items[] = {
-{ 0, "ADD", 0, "Add", ""},
-{ 1, "SUBTRACT", 0, "Subtract", ""},
-{ 2, "MULTIPLY", 0, "Multiply", ""},
-{ 3, "DIVIDE", 0, "Divide", ""},
-{ 4, "SINE", 0, "Sine", ""},
-{ 5, "COSINE", 0, "Cosine", ""},
-{ 6, "TANGENT", 0, "Tangent", ""},
-{ 7, "ARCSINE", 0, "Arcsine", ""},
-{ 8, "ARCCOSINE", 0, "Arccosine", ""},
-{ 9, "ARCTANGENT", 0, "Arctangent", ""},
-{10, "POWER", 0, "Power", ""},
-{11, "LOGARITHM", 0, "Logarithm", ""},
-{12, "MINIMUM", 0, "Minimum", ""},
-{13, "MAXIMUM", 0, "Maximum", ""},
-{14, "ROUND", 0, "Round", ""},
-{15, "LESS_THAN", 0, "Less Than", ""},
-{16, "GREATER_THAN", 0, "Greater Than", ""},
-{0, NULL, 0, NULL, NULL}};
+ { 0, "ADD", 0, "Add", ""},
+ { 1, "SUBTRACT", 0, "Subtract", ""},
+ { 2, "MULTIPLY", 0, "Multiply", ""},
+ { 3, "DIVIDE", 0, "Divide", ""},
+ { 4, "SINE", 0, "Sine", ""},
+ { 5, "COSINE", 0, "Cosine", ""},
+ { 6, "TANGENT", 0, "Tangent", ""},
+ { 7, "ARCSINE", 0, "Arcsine", ""},
+ { 8, "ARCCOSINE", 0, "Arccosine", ""},
+ { 9, "ARCTANGENT", 0, "Arctangent", ""},
+ {10, "POWER", 0, "Power", ""},
+ {11, "LOGARITHM", 0, "Logarithm", ""},
+ {12, "MINIMUM", 0, "Minimum", ""},
+ {13, "MAXIMUM", 0, "Maximum", ""},
+ {14, "ROUND", 0, "Round", ""},
+ {15, "LESS_THAN", 0, "Less Than", ""},
+ {16, "GREATER_THAN", 0, "Greater Than", ""},
+ {0, NULL, 0, NULL, NULL}};
EnumPropertyItem node_vec_math_items[] = {
-{0, "ADD", 0, "Add", ""},
-{1, "SUBTRACT", 0, "Subtract", ""},
-{2, "AVERAGE", 0, "Average", ""},
-{3, "DOT_PRODUCT", 0, "Dot Product", ""},
-{4, "CROSS_PRODUCT", 0, "Cross Product", ""},
-{5, "NORMALIZE", 0, "Normalize", ""},
-{0, NULL, 0, NULL, NULL}};
+ {0, "ADD", 0, "Add", ""},
+ {1, "SUBTRACT", 0, "Subtract", ""},
+ {2, "AVERAGE", 0, "Average", ""},
+ {3, "DOT_PRODUCT", 0, "Dot Product", ""},
+ {4, "CROSS_PRODUCT", 0, "Cross Product", ""},
+ {5, "NORMALIZE", 0, "Normalize", ""},
+ {0, NULL, 0, NULL, NULL}};
EnumPropertyItem node_filter_items[] = {
-{0, "SOFTEN", 0, "Soften", ""},
-{1, "SHARPEN", 0, "Sharpen", ""},
-{2, "LAPLACE", 0, "Laplace", ""},
-{3, "SOBEL", 0, "Sobel", ""},
-{4, "PREWITT", 0, "Prewitt", ""},
-{5, "KIRSCH", 0, "Kirsch", ""},
-{6, "SHADOW", 0, "Shadow", ""},
-{0, NULL, 0, NULL, NULL}};
+ {0, "SOFTEN", 0, "Soften", ""},
+ {1, "SHARPEN", 0, "Sharpen", ""},
+ {2, "LAPLACE", 0, "Laplace", ""},
+ {3, "SOBEL", 0, "Sobel", ""},
+ {4, "PREWITT", 0, "Prewitt", ""},
+ {5, "KIRSCH", 0, "Kirsch", ""},
+ {6, "SHADOW", 0, "Shadow", ""},
+ {0, NULL, 0, NULL, NULL}};
EnumPropertyItem prop_noise_basis_items[] = {
{SHD_NOISE_PERLIN, "PERLIN", 0, "Perlin", ""},
@@ -124,11 +124,13 @@ EnumPropertyItem prop_noise_type_items[] = {
{SHD_NOISE_HARD, "HARD", 0, "Hard", ""},
{0, NULL, 0, NULL, NULL}};
+#if 0
EnumPropertyItem prop_wave_items[] = {
{SHD_WAVE_SINE, "SINE", 0, "Sine", "Uses a sine wave to produce bands"},
{SHD_WAVE_SAW, "SAW", 0, "Saw", "Uses a saw wave to produce bands"},
{SHD_WAVE_TRI, "TRI", 0, "Tri", "Uses a triangle wave to produce bands"},
{0, NULL, 0, NULL, NULL}};
+#endif
/* Add any new socket value subtype here.
* When adding a new subtype here, make sure you also add it
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index dfbdafd7d18..77ae7095454 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -338,41 +338,43 @@ EnumPropertyItem keymap_propvalue_items[] = {
{0, "NONE", 0, "", ""},
{0, NULL, 0, NULL, NULL}};
-EnumPropertyItem keymap_modifiers_items[] = {
- {KM_ANY, "ANY", 0, "Any", ""},
- {0, "NONE", 0, "None", ""},
- {1, "FIRST", 0, "First", ""},
- {2, "SECOND", 0, "Second", ""},
- {0, NULL, 0, NULL, NULL}};
+#if 0
+static EnumPropertyItem keymap_modifiers_items[] = {
+ {KM_ANY, "ANY", 0, "Any", ""},
+ {0, "NONE", 0, "None", ""},
+ {1, "FIRST", 0, "First", ""},
+ {2, "SECOND", 0, "Second", ""},
+ {0, NULL, 0, NULL, NULL}};
+#endif
EnumPropertyItem operator_flag_items[] = {
- {OPTYPE_REGISTER, "REGISTER", 0, "Register", "Display in the info window and support the redo toolbar panel"},
- {OPTYPE_UNDO, "UNDO", 0, "Undo", "Push an undo event (needed for operator redo)"},
- {OPTYPE_BLOCKING, "BLOCKING", 0, "Blocking", "Block anything else from using the cursor"},
- {OPTYPE_MACRO, "MACRO", 0, "Macro", "Use to check if an operator is a macro"},
- {OPTYPE_GRAB_POINTER, "GRAB_POINTER", 0, "Grab Pointer", "Use so the operator grabs the mouse focus, enables wrapping when continuous grab is enabled"},
- {OPTYPE_PRESET, "PRESET", 0, "Preset", "Display a preset button with the operators settings"},
- {OPTYPE_INTERNAL, "INTERNAL", 0, "Internal", "Removes the operator from search results"},
- {0, NULL, 0, NULL, NULL}};
+ {OPTYPE_REGISTER, "REGISTER", 0, "Register", "Display in the info window and support the redo toolbar panel"},
+ {OPTYPE_UNDO, "UNDO", 0, "Undo", "Push an undo event (needed for operator redo)"},
+ {OPTYPE_BLOCKING, "BLOCKING", 0, "Blocking", "Block anything else from using the cursor"},
+ {OPTYPE_MACRO, "MACRO", 0, "Macro", "Use to check if an operator is a macro"},
+ {OPTYPE_GRAB_POINTER, "GRAB_POINTER", 0, "Grab Pointer", "Use so the operator grabs the mouse focus, enables wrapping when continuous grab is enabled"},
+ {OPTYPE_PRESET, "PRESET", 0, "Preset", "Display a preset button with the operators settings"},
+ {OPTYPE_INTERNAL, "INTERNAL", 0, "Internal", "Removes the operator from search results"},
+ {0, NULL, 0, NULL, NULL}};
EnumPropertyItem operator_return_items[] = {
- {OPERATOR_RUNNING_MODAL, "RUNNING_MODAL", 0, "Running Modal", "Keep the operator running with blender"},
- {OPERATOR_CANCELLED, "CANCELLED", 0, "Cancelled", "When no action has been taken, operator exits"},
- {OPERATOR_FINISHED, "FINISHED", 0, "Finished", "When the operator is complete, operator exits"},
- {OPERATOR_PASS_THROUGH, "PASS_THROUGH", 0, "Pass Through", "Do nothing and pass the event on"}, // used as a flag
- {0, NULL, 0, NULL, NULL}};
+ {OPERATOR_RUNNING_MODAL, "RUNNING_MODAL", 0, "Running Modal", "Keep the operator running with blender"},
+ {OPERATOR_CANCELLED, "CANCELLED", 0, "Cancelled", "When no action has been taken, operator exits"},
+ {OPERATOR_FINISHED, "FINISHED", 0, "Finished", "When the operator is complete, operator exits"},
+ {OPERATOR_PASS_THROUGH, "PASS_THROUGH", 0, "Pass Through", "Do nothing and pass the event on"}, // used as a flag
+ {0, NULL, 0, NULL, NULL}};
/* flag/enum */
EnumPropertyItem wm_report_items[] = {
- {RPT_DEBUG, "DEBUG", 0, "Debug", ""},
- {RPT_INFO, "INFO", 0, "Info", ""},
- {RPT_OPERATOR, "OPERATOR", 0, "Operator", ""},
- {RPT_WARNING, "WARNING", 0, "Warning", ""},
- {RPT_ERROR, "ERROR", 0, "Error", ""},
- {RPT_ERROR_INVALID_INPUT, "ERROR_INVALID_INPUT", 0, "Invalid Input", ""},\
- {RPT_ERROR_INVALID_CONTEXT, "ERROR_INVALID_CONTEXT", 0, "Invalid Context", ""},
- {RPT_ERROR_OUT_OF_MEMORY, "ERROR_OUT_OF_MEMORY", 0, "Out of Memory", ""},
- {0, NULL, 0, NULL, NULL}};
+ {RPT_DEBUG, "DEBUG", 0, "Debug", ""},
+ {RPT_INFO, "INFO", 0, "Info", ""},
+ {RPT_OPERATOR, "OPERATOR", 0, "Operator", ""},
+ {RPT_WARNING, "WARNING", 0, "Warning", ""},
+ {RPT_ERROR, "ERROR", 0, "Error", ""},
+ {RPT_ERROR_INVALID_INPUT, "ERROR_INVALID_INPUT", 0, "Invalid Input", ""},\
+ {RPT_ERROR_INVALID_CONTEXT, "ERROR_INVALID_CONTEXT", 0, "Invalid Context", ""},
+ {RPT_ERROR_OUT_OF_MEMORY, "ERROR_OUT_OF_MEMORY", 0, "Out of Memory", ""},
+ {0, NULL, 0, NULL, NULL}};
#define KMI_TYPE_KEYBOARD 0
#define KMI_TYPE_MOUSE 1
diff --git a/source/blender/modifiers/intern/MOD_dynamicpaint.c b/source/blender/modifiers/intern/MOD_dynamicpaint.c
index c6b9e5752e0..29ff5975e85 100644
--- a/source/blender/modifiers/intern/MOD_dynamicpaint.c
+++ b/source/blender/modifiers/intern/MOD_dynamicpaint.c
@@ -161,20 +161,20 @@ ModifierTypeInfo modifierType_DynamicPaint = {
| eModifierTypeFlag_Single,
/* copyData */ copyData,
- /* deformVerts */ 0,
- /* deformMatrices */ 0,
- /* deformVertsEM */ 0,
- /* deformMatricesEM */ 0,
+ /* deformVerts */ NULL,
+ /* deformMatrices */ NULL,
+ /* deformVertsEM */ NULL,
+ /* deformMatricesEM */ NULL,
/* applyModifier */ applyModifier,
- /* applyModifierEM */ 0,
+ /* applyModifierEM */ NULL,
/* initData */ initData,
/* requiredDataMask */ requiredDataMask,
/* freeData */ freeData,
- /* isDisabled */ 0,
+ /* isDisabled */ NULL,
/* updateDepgraph */ updateDepgraph,
/* dependsOnTime */ dependsOnTime,
- /* dependsOnNormals */ 0,
- /* foreachObjectLink */ 0,
+ /* dependsOnNormals */ NULL,
+ /* foreachObjectLink */ NULL,
/* foreachIDLink */ foreachIDLink,
/* foreachTexLink */ foreachTexLink,
};
diff --git a/source/blender/modifiers/intern/MOD_ocean.c b/source/blender/modifiers/intern/MOD_ocean.c
index 9cc2d367d66..e0ccb1f908e 100644
--- a/source/blender/modifiers/intern/MOD_ocean.c
+++ b/source/blender/modifiers/intern/MOD_ocean.c
@@ -542,19 +542,19 @@ ModifierTypeInfo modifierType_Ocean = {
| eModifierTypeFlag_EnableInEditmode,
/* copyData */ copyData,
- /* deformMatrices */ 0,
- /* deformVerts */ 0,
- /* deformVertsEM */ 0,
- /* deformMatricesEM */ 0,
+ /* deformMatrices */ NULL,
+ /* deformVerts */ NULL,
+ /* deformVertsEM */ NULL,
+ /* deformMatricesEM */ NULL,
/* applyModifier */ applyModifier,
/* applyModifierEM */ applyModifierEM,
/* initData */ initData,
/* requiredDataMask */ requiredDataMask,
/* freeData */ freeData,
- /* isDisabled */ 0,
- /* updateDepgraph */ 0,
- /* dependsOnTime */ 0,
- /* dependsOnNormals */ 0,
- /* foreachObjectLink */ 0,
- /* foreachIDLink */ 0,
+ /* isDisabled */ NULL,
+ /* updateDepgraph */ NULL,
+ /* dependsOnTime */ NULL,
+ /* dependsOnNormals */ NULL,
+ /* foreachObjectLink */ NULL,
+ /* foreachIDLink */ NULL,
};
diff --git a/source/blender/nodes/NOD_socket.h b/source/blender/nodes/NOD_socket.h
index 22efc99dfe8..6a6413d508f 100644
--- a/source/blender/nodes/NOD_socket.h
+++ b/source/blender/nodes/NOD_socket.h
@@ -62,6 +62,9 @@ struct bNodeSocket *nodeAddOutputVector(struct bNodeTree *ntree, struct bNode *n
struct bNodeSocket *nodeAddInputRGBA(struct bNodeTree *ntree, struct bNode *node, const char *name, float r, float g, float b, float a);
struct bNodeSocket *nodeAddOutputRGBA(struct bNodeTree *ntree, struct bNode *node, const char *name);
+struct bNodeSocket *nodeAddInputShader(struct bNodeTree *ntree, struct bNode *node, const char *name);
+struct bNodeSocket *nodeAddOutputShader(struct bNodeTree *ntree, struct bNode *node, const char *name);
+
struct bNodeSocket *nodeAddInputMesh(struct bNodeTree *ntree, struct bNode *node, const char *name);
struct bNodeSocket *nodeAddOutputMesh(struct bNodeTree *ntree, struct bNode *node, const char *name);
diff --git a/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c b/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c
index 8411de39353..05d13f346f3 100644
--- a/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c
+++ b/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c
@@ -118,7 +118,7 @@ static void storage_free(bNode *node)
node->storage= NULL;
}
-void storage_copy(bNode *orig_node, bNode *new_node)
+static void storage_copy(bNode *orig_node, bNode *new_node)
{
if(orig_node->storage)
new_node->storage= BKE_tracking_distortion_copy(orig_node->storage);
diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c
index e1f521db066..b58a6695fd6 100644
--- a/source/blender/render/intern/source/shadeoutput.c
+++ b/source/blender/render/intern/source/shadeoutput.c
@@ -55,6 +55,8 @@
#include "sss.h"
#include "texture.h"
+#include "shading.h" /* own include */
+
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* defined in pipeline.c, is hardcopy of active dynamic allocated Render */
/* only to be used here in this file, it's for speed */
diff --git a/source/blenderplayer/bad_level_call_stubs/stubs.c b/source/blenderplayer/bad_level_call_stubs/stubs.c
index 48dcf8a1c7f..abc5307b9f6 100644
--- a/source/blenderplayer/bad_level_call_stubs/stubs.c
+++ b/source/blenderplayer/bad_level_call_stubs/stubs.c
@@ -351,7 +351,7 @@ void uiItemS(struct uiLayout *layout){}
void uiItemFullR(struct uiLayout *layout, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, int value, int flag, char *name, int icon){}
void uiLayoutSetContextPointer(struct uiLayout *layout, char *name, struct PointerRNA *ptr){}
char *uiLayoutIntrospect(struct uiLayout *layout){return (char *)NULL;}
-void UI_reinit_font() {}
+void UI_reinit_font(void) {}
/* rna template */
void uiTemplateAnyID(struct uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname, char *text){}