2.5:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 16 Apr 2009 13:01:50 +0000 (13:01 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 16 Apr 2009 13:01:50 +0000 (13:01 +0000)
* Also look in ./release for scripts instead of next to executable.
* Some warning fixes.

source/blender/blenlib/intern/util.c
source/blender/makesdna/DNA_anim_types.h
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_nodetree.c

index 78fc78f67f76a64822f32e24e083890fa4cfb5c6..040b2d4027c48a21a65edd7113b06686a804cf15 100644 (file)
@@ -832,7 +832,8 @@ char *BLI_gethome(void) {
  *
  * $HOME/.blender/folder_name
  * path_to_executable/.blender/folder_name
- * release/folder_name (in svn)
+ * path_to_executable/release/folder_name (in svn)
+ * ./release/folder_name (in svn)
  *
  * returns NULL if none is found. */
 
@@ -911,7 +912,7 @@ char *BLI_gethome_folder(char *folder_name)
                else return homedir;
        }
 
-       /* last try for folder_name dir: blender in svn dir, folder_name/ inside release/: */
+       /* try path_to_executable/release/folder_name (in svn) */
        if (folder_name) {
                BLI_snprintf(tmpdir, sizeof(tmpdir), "release/%s", folder_name);
                BLI_make_file_string("/", fulldir, bprogdir, tmpdir);
@@ -919,6 +920,13 @@ char *BLI_gethome_folder(char *folder_name)
                else fulldir[0] = '\0';
        }
 
+       /* try ./release/folder_name (in svn) */
+       if(folder_name) {
+               BLI_snprintf(fulldir, sizeof(fulldir), "./release/%s", folder_name);
+               if (BLI_exists(fulldir)) return fulldir;
+               else fulldir[0] = '\0';
+       }
+
        return NULL;
 }
 
index e63c30faed062dcac0cf932d2ef050e1b8f2ed43..d015d703309ccd56923cd3a4c53202cf3c7fb4f1 100644 (file)
@@ -74,7 +74,7 @@ typedef struct FMod_Generator {
        float *coefficients;            /* coefficients array */
        unsigned int arraysize;         /* size of the coefficients array */
        
-       unsigned short poly_order;      /* order of polynomial generated (i.e. 1 for linear, 2 for quadratic) */
+       short poly_order;                       /* order of polynomial generated (i.e. 1 for linear, 2 for quadratic) */
        short func_type;                        /* builtin math function eFMod_Generator_Functions */
        
        int pad;
index 7b42d4afa60424d128bbcea363964e760e2c394c..ebe434377ee9644ed83ae28840c9d42c637def61 100644 (file)
@@ -2571,7 +2571,7 @@ int RNA_function_call_direct_va(PointerRNA *ptr, FunctionRNA *func, const char *
                        }
                case PROP_FLOAT:
                        {
-                               float arg= va_arg(args, float);
+                               double arg= va_arg(args, double);
                                err= rna_function_parameter_parse(&funcptr, parm, type, ftype, len, iter.data, &arg, NULL, tid, fid, pid);
                                break;
                        }
index 1b73ae9a1cf2578b4a70ecc38e513bc0217cfbe9..be3e429c1a26b7102e125b1fd1b0eaeecb08679e 100644 (file)
@@ -512,7 +512,7 @@ void RNA_def_nodetree(BlenderRNA *brna)
        rna_def_texture_node(brna);
        
        #define DefNode(Category, ID, DefFunc, EnumName, StructName, UIName, UIDesc) \
-               define_specific_node(brna, ID, DefFunc ? DefFunc : define_simple_node);
+               define_specific_node(brna, ID, DefFunc != 0 ? DefFunc : define_simple_node);
                
        #include "rna_nodetree_types.h"