minor cleanup
authorCampbell Barton <ideasman42@gmail.com>
Mon, 14 Nov 2011 16:05:44 +0000 (16:05 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 14 Nov 2011 16:05:44 +0000 (16:05 +0000)
- 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.

24 files changed:
source/blender/blenfont/intern/blf_lang.c
source/blender/blenfont/intern/blf_translation.c
source/blender/blenkernel/BKE_blender.h
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/mesh_validate.c
source/blender/blenlib/intern/bpath.c
source/blender/blenlib/intern/path_util.c
source/blender/editors/interface/interface.c
source/blender/editors/interface/interface_ops.c
source/blender/editors/object/object_constraint.c
source/blender/editors/object/object_vgroup.c
source/blender/editors/physics/dynamicpaint_ops.c
source/blender/editors/space_clip/clip_toolbar.c
source/blender/editors/space_info/info_stats.c
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/intern/rna_context.c
source/blender/makesrna/intern/rna_nodetree.c
source/blender/makesrna/intern/rna_wm.c
source/blender/modifiers/intern/MOD_dynamicpaint.c
source/blender/modifiers/intern/MOD_ocean.c
source/blender/nodes/NOD_socket.h
source/blender/nodes/composite/nodes/node_composite_moviedistortion.c
source/blender/render/intern/source/shadeoutput.c
source/blenderplayer/bad_level_call_stubs/stubs.c

index 3bce3878d72e195974b0a459db33ca5d497fa5ad..e8c6ff7693456300d03ad830099e7e2368d4c9cd 100644 (file)
@@ -34,6 +34,8 @@
 
 #include "BLF_api.h"
 
+#include "BLF_translation.h" /* own include */
+
 #ifdef WITH_INTERNATIONAL
 
 #include <locale.h>
index 8688249732fa724a4efe368616a6455986bbb68a..fe14f5d4d1c6e1d66c56087571a21ec38bb9819a 100644 (file)
@@ -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;
 
index 7be1252b9c2dd1e305f404e1b3ebdc781be7e285..34b674fcb4ab4c3fd41c48ab195375b27db668ad 100644 (file)
@@ -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;
index 13eb59695b9e275ded43e9bd453807042a58bb4b..532e6f797ddf6da94437a125af7345958107bf59 100644 (file)
@@ -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 */
index 0dac4b8cd808c251cba3d0c45d73e94942ee3b59..ec24f72874dd9ecca8eeb3f91e3367a74500fd40 100644 (file)
@@ -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;
 
index ce5927cf3cc70a007e7996d3ea6a41b86ad0f7de..8ad6cfc7cdf2929399ad44e75de154d3d3fa6c32 100644 (file)
@@ -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));
index 7aa84523e9d0c396b77f811c29f9e123a4833f85..7c7d51e5907b52aa2bf40635b5be589ebdd0383a 100644 (file)
@@ -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';
        
index ce4e052bd53e9d6815f86745812811c0c428c197..be8bee7452dd87e11ae52bfda3d0e91ef2cf4b43 100644 (file)
@@ -3582,7 +3582,7 @@ void UI_init_userdef(void)
        uiStyleInit();
 }
 
-void UI_reinit_font()
+void UI_reinit_font(void)
 {
        uiStyleInit();
 }
index 5803054caa71d80d37bbdd62b997b1e95f51bf04..2a75c2a26c15885eb04f0663e6069df19370c763 100644 (file)
@@ -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)
 {
index 0fbf5a8bd92a495864d25d2856d0a95539b39745..3c84b2df1d2b61730880cf5d4610e3342f0b428a 100644 (file)
@@ -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);
index 0d210fa83ebc2633a2f5b994831f7ee5c86f5af4..936da90e8b76acb6af1822a8c5d28ad6f85da7f3 100644 (file)
@@ -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;
index f30ff9c08e979c73b8c957396a72bb2e5c8a1042..6739e2973094e5cc305ff5d861c281e614aeaba7 100644 (file)
 #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;
index c8113c5ea7bf828dba554eabb72e827372da5d0b..fe09c5cd8292d3f1a391a09b6f6570790e3e66f8 100644 (file)
@@ -50,6 +50,8 @@
 #include "UI_interface.h"
 #include "UI_resources.h"
 
+#include "clip_intern.h" /* own include */
+
 /* ************************ header area region *********************** */
 
 /************************** properties ******************************/
index 25e1d2f2816295179743b42bebb6546b77a0dcd4..52e6a8808ae356606ef847859d4dfc0d531e9fdf 100644 (file)
@@ -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;
index c060eb186c9c1066529cddcc5a84704f052ae1d2..ebd51d1c1021bbe23881ce3dbda71e70dafbe205 100644 (file)
@@ -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;
index f041d3efde4accdef47cdf14658a1f7095d13a67..043645aaf573df81fa51e9cc068e67d0d17521ed 100644 (file)
@@ -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)
index 35ba9984c791bbc0fd93e1601c7c276332952232..170cfcb103eb923af575088831733663c23d25aa 100644 (file)
@@ -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
index dfbdafd7d18c90c19d40faa8e12013eea03be2ee..77ae70954543154ebda1e5adc37ffa5974bb6b90 100644 (file)
@@ -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
index c6b9e5752e0c5ee37673665abddda586fd3c26e7..29ff5975e859f5bd192241eff9ea8da168d262c3 100644 (file)
@@ -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,
 };
index 9cc2d367d665894ee05c27dfaad34318d00e892e..e0ccb1f908ea7c9c518d5d7354b29d868f624e4e 100644 (file)
@@ -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,
 };
index 22efc99dfe82992e4f4c92fd4b0d76b1805830d7..6a6413d508f95daffbff50fb5eee7246701b91d5 100644 (file)
@@ -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);
 
index 8411de39353bd9b2bccf4193ec2166c7f658e94f..05d13f346f30ec1f8d2a28a55aba3db7462bec3a 100644 (file)
@@ -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);
index e1f521db06685674d823e823b829c4a775b81ab4..b58a6695fd68de78e985ba9a314096ae2865d885 100644 (file)
@@ -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 */
index 48dcf8a1c7f029c06d52ea2334283eb8f927841d..abc5307b9f62bcffc230e0093e7e5db3c68d8a23 100644 (file)
@@ -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){}