Merging r40615 through r40652 from trunk into soc-2011-tomato

This commit is contained in:
Sergey Sharybin 2011-09-28 10:45:39 +00:00
commit 78c7ec6401
74 changed files with 584 additions and 377 deletions

@ -565,25 +565,26 @@ def AppIt(target=None, source=None, env=None):
cmd = 'cp %s/%s %s/%s.app/Contents/MacOS/%s'%(builddir, binary,installdir, binary, binary)
commands.getoutput(cmd)
cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/'%(installdir, binary, VERSION)
# print cmd
commands.getoutput(cmd)
cmd = installdir + '/%s.app/Contents/MacOS/%s'%(binary,VERSION)
cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/datafiles'%(installdir, binary, VERSION)
commands.getoutput(cmd)
cmd = 'cp -R %s/release/bin/.blender/locale %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
commands.getoutput(cmd)
cmd = 'cp -R %s/release/bin/.blender/fonts %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
commands.getoutput(cmd)
cmd = 'cp %s/release/bin/%s/.Blanguages %s/%s.app/Contents/Resources/'%(bldroot,VERSION,installdir,binary)
commands.getoutput(cmd)
# blenderplayer doesn't need all the files
if binary == 'blender':
cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/datafiles'%(installdir, binary, VERSION)
commands.getoutput(cmd)
cmd = 'cp -R %s/release/bin/.blender/locale %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
commands.getoutput(cmd)
cmd = 'cp -R %s/release/bin/.blender/fonts %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
commands.getoutput(cmd)
cmd = 'cp %s/release/bin/%s/.Blanguages %s/%s.app/Contents/Resources/'%(bldroot,VERSION,installdir,binary)
commands.getoutput(cmd)
cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION)
commands.getoutput(cmd)
if env['WITH_OSX_STATICPYTHON']:
cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/python/'%(installdir,binary, VERSION)
commands.getoutput(cmd)
cmd = 'unzip -q %s/release/%s -d %s/%s.app/Contents/MacOS/%s/python/'%(libdir,python_zip,installdir,binary,VERSION)
commands.getoutput(cmd)
if binary == 'blender':#not copy everything for blenderplayer
cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION)
commands.getoutput(cmd)
cmd = 'chmod +x %s/%s.app/Contents/MacOS/%s'%(installdir,binary, binary)

@ -132,8 +132,14 @@ void AUD_SequencerReader::read(int& length, bool& eos, sample_t* buffer)
while(eit != m_factory->m_entries.end())
{
handle = new AUD_SequencerHandle(*eit, m_device);
handles.push_front(handle);
try
{
handle = new AUD_SequencerHandle(*eit, m_device);
handles.push_front(handle);
}
catch(AUD_Exception&)
{
}
eit++;
}

@ -1,6 +1,5 @@
release/scripts/modules/rna_prop_ui.py
release/scripts/startup/bl_operators/animsys_update.py
release/scripts/startup/bl_operators/object.py
release/scripts/startup/bl_operators/object_align.py
release/scripts/startup/bl_operators/object_quick_effects.py

61
po/README.txt Normal file

@ -0,0 +1,61 @@
Blender translation HOWTO
=========================
I'll try briefly explain how translation works and how to update translation files.
1. How it works
---------------
This folder contains source files for translation system. This source files have
got .po extension and they've got pretty simple syntax:
msgid "some message id"
msgstr "translation for this message"
This means when string "some message id" is used as operator name, tooltip, menu
and so it'll be displayed on the screen as "translation for this message".
Pretty simple.
This source files are pre-compiled into ../relese/dbin/.blender/locale/<language>/LC_MESSAGES/blender.mo,
so they aren't getting compiled every time Blender is compiling to same some time and prevent
failure on systems which doesn't have needed tools for compiling .po files.
2. How to update translations
-----------------------------
It's also pretty simple. If you can find string you want to translate in <language>.po
file as msgid, just write correct msgstr string for it. If msgid is marked as fuzzy,
i.e.
#, fuzzy
msgid "some message id"
msgstr "translation for this message"
it means translation used to exist for this message, but message was changed, so translation
also have to be updated (it's easier to make new translation based on previos translation).
When translation was updated, remove line with '#, fuzzy' and it'll work.
If there's no message in .po file you want to translate, probably .po file should be updated.
Use the following steps for this:
- With newly compiled blender run `blender --background --python update_msg.py` to update
messages.txt file (this file contains strings collected automatically from RNA system and
python UI scripts)
- Run update_pot.py script which will update blender.pot file. This file contains all
strings which should be transated.
- Run update_po.py script to merge all .po files with blender.pot (so all .po files
will contain all msgid-s declared in blender.pot) or update_po.py <language> to
update only needed .po file(s) to save time when you're busy with translation.
But before ocmmit all .po files better be updated.
When you've finished with translation, you should re-compile .po file into .mo file.
It's also pretty simple: just run update_mo.py script to recompile all languages or
just update_mo.py <language> to re-compile only needed language(s).
NOTE: msgfmt, msgmerge and xgettext tools should be available in your PATH.
This steps to update template, translation files and compile them can be made in "batch" mode
using GNUMakefile:
make -f GNUMakefile translations
NOTE: Blender has to be compiled using GNUMakefile first.

@ -25,6 +25,7 @@
import subprocess
import os
import sys
CURRENT_DIR = os.path.dirname(__file__)
SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.join(CURRENT_DIR, "..")))
@ -33,21 +34,33 @@ LOCALE_DIR = os.path.join(SOURCE_DIR, "release", "bin", ".blender", "locale")
DOMAIN = "blender"
def main():
for po in os.listdir(CURRENT_DIR):
if po.endswith(".po"):
lang = po[:-3]
# show stats
cmd = ("msgfmt",
"--statistics",
os.path.join(CURRENT_DIR, "%s.po" % lang),
"-o",
os.path.join(LOCALE_DIR, lang, "LC_MESSAGES", "%s.mo" % DOMAIN),
)
def process_po(po):
lang = os.path.basename(po)[:-3]
print(" ".join(cmd))
process = subprocess.Popen(cmd)
process.wait()
# show stats
cmd = ("msgfmt",
"--statistics",
os.path.join(CURRENT_DIR, "%s.po" % lang),
"-o",
os.path.join(LOCALE_DIR, lang, "LC_MESSAGES", "%s.mo" % DOMAIN),
)
print(" ".join(cmd))
process = subprocess.Popen(cmd)
process.wait()
def main():
if len(sys.argv) > 1:
for lang in sys.argv[1:]:
po = os.path.join(CURRENT_DIR, lang + '.po')
if os.path.exists(po):
process_po(po)
else:
for po in os.listdir(CURRENT_DIR):
if po.endswith(".po"):
process_po(po)
if __name__ == "__main__":
print("\n\n *** Running %r *** \n" % __file__)

@ -25,27 +25,39 @@
import subprocess
import os
import sys
CURRENT_DIR = os.path.dirname(__file__)
DOMAIN = "blender"
def process_po(po):
lang = os.path.basename(po)[:-3]
# update po file
cmd = ("msgmerge",
"--update",
"--lang=%s" % lang,
os.path.join(CURRENT_DIR, "%s.po" % lang),
os.path.join(CURRENT_DIR, "%s.pot" % DOMAIN),
)
print(" ".join(cmd))
process = subprocess.Popen(cmd)
process.wait()
def main():
for po in os.listdir(CURRENT_DIR):
if po.endswith(".po"):
lang = po[:-3]
if len(sys.argv) > 1:
for lang in sys.argv[1:]:
po = os.path.join(CURRENT_DIR, lang + '.po')
# update po file
cmd = ("msgmerge",
"--update",
"--lang=%s" % lang,
os.path.join(CURRENT_DIR, "%s.po" % lang),
os.path.join(CURRENT_DIR, "%s.pot" % DOMAIN),
)
print(" ".join(cmd))
process = subprocess.Popen(cmd)
process.wait()
if os.path.exists(po):
process_po(po)
else:
for po in os.listdir(CURRENT_DIR):
if po.endswith(".po"):
process_po(po)
if __name__ == "__main__":

@ -407,7 +407,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
return strip.type in {'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER',
'CROSS', 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP',
'PLUGIN',
'WIPE', 'GLOW', 'TRANSFORM', 'COLOR', 'SPEED',
'WIPE', 'GLOW', 'TRANSFORM', 'SPEED',
'MULTICAM', 'ADJUSTMENT'}
def draw(self, context):

@ -44,7 +44,8 @@
/* implementation */
void *avi_converter_from_avi_rgb (AviMovie *movie, int stream, unsigned char *buffer, int *size) {
void *avi_converter_from_avi_rgb (AviMovie *movie, int stream, unsigned char *buffer, int *size)
{
int x, y,i, rowstride;
unsigned char *buf;
AviBitmapInfoHeader *bi;
@ -116,7 +117,8 @@ void *avi_converter_from_avi_rgb (AviMovie *movie, int stream, unsigned char *bu
}
}
void *avi_converter_to_avi_rgb (AviMovie *movie, int stream, unsigned char *buffer, int *size) {
void *avi_converter_to_avi_rgb (AviMovie *movie, int stream, unsigned char *buffer, int *size)
{
int y, x, i, rowstride;
unsigned char *buf;

@ -908,7 +908,8 @@ static int apply_boid_rule(BoidBrainData *bbd, BoidRule *rule, BoidValues *val,
else
return 0;
}
static BoidState *get_boid_state(BoidSettings *boids, ParticleData *pa) {
static BoidState *get_boid_state(BoidSettings *boids, ParticleData *pa)
{
BoidState *state = boids->states.first;
BoidParticle *bpa = pa->boid;

@ -1374,7 +1374,8 @@ static CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2, BVHTree
return collpair;
}
static void machine_epsilon_offset(Cloth *cloth) {
static void machine_epsilon_offset(Cloth *cloth)
{
ClothVertex *cv;
int i, j;

@ -4156,7 +4156,8 @@ static bConstraintTypeInfo *constraintsTypeInfo[NUM_CONSTRAINT_TYPES];
static short CTI_INIT= 1; /* when non-zero, the list needs to be updated */
/* This function only gets called when CTI_INIT is non-zero */
static void constraints_init_typeinfo (void) {
static void constraints_init_typeinfo (void)
{
constraintsTypeInfo[0]= NULL; /* 'Null' Constraint */
constraintsTypeInfo[1]= &CTI_CHILDOF; /* ChildOf Constraint */
constraintsTypeInfo[2]= &CTI_TRACKTO; /* TrackTo Constraint */

@ -1406,7 +1406,8 @@ void makeDispListCurveTypes_forOrco(struct Scene *scene, struct Object *ob, stru
}
/* add Orco layer to the displist object which has got derived mesh and return orco */
float *makeOrcoDispList(Scene *scene, Object *ob, DerivedMesh *derivedFinal, int forRender) {
float *makeOrcoDispList(Scene *scene, Object *ob, DerivedMesh *derivedFinal, int forRender)
{
float *orco;
if (derivedFinal == NULL)

@ -110,7 +110,8 @@ int BKE_idcode_is_valid(int code)
return idtype_from_code(code)?1:0;
}
int BKE_idcode_is_linkable(int code) {
int BKE_idcode_is_linkable(int code)
{
IDType *idt= idtype_from_code(code);
return idt?(idt->flags&IDTYPE_FLAGS_ISLINKABLE):0;
}

@ -2864,7 +2864,8 @@ void object_sculpt_modifiers_changed(Object *ob)
}
}
float give_timeoffset(Object *ob) {
float give_timeoffset(Object *ob)
{
if ((ob->ipoflag & OB_OFFS_PARENTADD) && ob->parent) {
return ob->sf + give_timeoffset(ob->parent);
} else {
@ -2872,7 +2873,8 @@ float give_timeoffset(Object *ob) {
}
}
int give_obdata_texspace(Object *ob, short **texflag, float **loc, float **size, float **rot) {
int give_obdata_texspace(Object *ob, short **texflag, float **loc, float **size, float **rot)
{
if (ob->data==NULL)
return 0;

@ -2544,7 +2544,8 @@ static void ptcache_dt_to_str(char *str, double dtime)
sprintf(str, "%is", ((int)dtime) % 60);
}
static void *ptcache_bake_thread(void *ptr) {
static void *ptcache_bake_thread(void *ptr)
{
int usetimer = 0, sfra, efra;
double stime, ptime, ctime, fetd;
char run[32], cur[32], etd[32];

@ -641,6 +641,8 @@ void sca_remove_ob_poin(Object *obt, Object *ob)
bMessageActuator *ma;
bParentActuator *para;
bArmatureActuator *aa;
bSteeringActuator *sta;
sens= obt->sensors.first;
while(sens) {
@ -688,6 +690,10 @@ void sca_remove_ob_poin(Object *obt, Object *ob)
if (aa->target == ob) aa->target = NULL;
if (aa->subtarget == ob) aa->subtarget = NULL;
break;
case ACT_STEERING:
sta = act->data;
if (sta->navmesh == ob) sta->navmesh = NULL;
if (sta->target == ob) sta->target = NULL;
}
act= act->next;
}

@ -2856,7 +2856,8 @@ void update_changed_seq_and_deps(Scene *scene, Sequence *changed_seq, int len_ch
left and right are the bounds at which the sequence is rendered,
start and end are from the start and fixed length of the sequence.
*/
int seq_tx_get_start(Sequence *seq) {
int seq_tx_get_start(Sequence *seq)
{
return seq->start;
}
int seq_tx_get_end(Sequence *seq)

@ -2792,7 +2792,8 @@ int setcurr_tab_spaces (Text *text, int space)
/*********************************/
/* Creates and adds a marker to the list maintaining sorted order */
void txt_add_marker(Text *text, TextLine *line, int start, int end, const unsigned char color[4], int group, int flags) {
void txt_add_marker(Text *text, TextLine *line, int start, int end, const unsigned char color[4], int group, int flags)
{
TextMarker *tmp, *marker;
marker= MEM_mallocN(sizeof(TextMarker), "text_marker");
@ -2841,7 +2842,8 @@ TextMarker *txt_find_marker_region(Text *text, TextLine *line, int start, int en
/* Clears all markers on the specified line between two points. If the group or
flags fields are non-zero the returned flag must be in the specified group
and have at least the specified flags set. */
short txt_clear_marker_region(Text *text, TextLine *line, int start, int end, int group, int flags) {
short txt_clear_marker_region(Text *text, TextLine *line, int start, int end, int group, int flags)
{
TextMarker *marker, *next;
int lineno= txt_get_span(text->lines.first, line);
short cleared= 0;
@ -2866,7 +2868,8 @@ short txt_clear_marker_region(Text *text, TextLine *line, int start, int end, in
/* Clears all markers in the specified group (if given) with at least the
specified flags set. Useful for clearing temporary markers (group=0,
flags=TMARK_TEMP) */
short txt_clear_markers(Text *text, int group, int flags) {
short txt_clear_markers(Text *text, int group, int flags)
{
TextMarker *marker, *next;
short cleared= 0;

@ -808,7 +808,8 @@ void flush_ffmpeg(void)
********************************************************************** */
/* Get the output filename-- similar to the other output formats */
void filepath_ffmpeg(char* string, RenderData* rd) {
void filepath_ffmpeg(char* string, RenderData* rd)
{
char autosplit[20];
const char ** exts = get_file_extensions(rd->ffcodecdata.type);

@ -76,7 +76,8 @@ struct bArgs {
int *passes;
};
static unsigned int case_strhash(const void *ptr) {
static unsigned int case_strhash(const void *ptr)
{
const char *s= ptr;
unsigned int i= 0;
unsigned char c;

@ -70,7 +70,8 @@ struct DynStr {
/***/
DynStr *BLI_dynstr_new(void) {
DynStr *BLI_dynstr_new(void)
{
DynStr *ds= MEM_mallocN(sizeof(*ds), "DynStr");
ds->elems= ds->last= NULL;
ds->curlen= 0;
@ -78,7 +79,8 @@ DynStr *BLI_dynstr_new(void) {
return ds;
}
void BLI_dynstr_append(DynStr *ds, const char *cstr) {
void BLI_dynstr_append(DynStr *ds, const char *cstr)
{
DynStrElem *dse= malloc(sizeof(*dse));
int cstrlen= strlen(cstr);
@ -220,7 +222,8 @@ void BLI_dynstr_appendf(DynStr *ds, const char *format, ...)
}
}
int BLI_dynstr_get_len(DynStr *ds) {
int BLI_dynstr_get_len(DynStr *ds)
{
return ds->curlen;
}

@ -350,7 +350,8 @@ static void sort_along_axis(BVHTree *tree, int start, int end, int axis)
//after a call to this function you can expect one of:
// every node to left of a[n] are smaller or equal to it
// every node to the right of a[n] are greater or equal to it
static int partition_nth_element(BVHNode **a, int _begin, int _end, int n, int axis){
static int partition_nth_element(BVHNode **a, int _begin, int _end, int n, int axis)
{
int begin = _begin, end = _end, cut;
while(end-begin > 3)
{

@ -644,7 +644,8 @@ void BLI_bpathIterator_step(struct BPathIterator *bpi)
}
}
int BLI_bpathIterator_isDone( struct BPathIterator *bpi) {
int BLI_bpathIterator_isDone( struct BPathIterator *bpi)
{
return bpi->type==BPATH_DONE;
}
@ -699,7 +700,8 @@ static void bpath_as_report(struct BPathIterator *bpi, const char *message, Repo
}
/* high level function */
void checkMissingFiles(Main *bmain, ReportList *reports) {
void checkMissingFiles(Main *bmain, ReportList *reports)
{
struct BPathIterator *bpi;
/* be sure there is low chance of the path being too short */
@ -718,7 +720,8 @@ void checkMissingFiles(Main *bmain, ReportList *reports) {
}
/* dont log any errors at the moment, should probably do this */
void makeFilesRelative(Main *bmain, const char *basedir, ReportList *reports) {
void makeFilesRelative(Main *bmain, const char *basedir, ReportList *reports)
{
int tot= 0, changed= 0, failed= 0, linked= 0;
struct BPathIterator *bpi;
char filepath[FILE_MAX];
@ -886,7 +889,8 @@ static int findFileRecursive(char *filename_new, const char *dirname, const char
}
/* high level function - call from fileselector */
void findMissingFiles(Main *bmain, const char *str) {
void findMissingFiles(Main *bmain, const char *str)
{
struct BPathIterator *bpi;
/* be sure there is low chance of the path being too short */

@ -64,7 +64,8 @@ double round(double x);
/* from python 3.1 floatobject.c
* ndigits must be between 0 and 21 */
double double_round(double x, int ndigits) {
double double_round(double x, int ndigits)
{
double pow1, pow2, y, z;
if (ndigits >= 0) {
pow1 = pow(10.0, (double)ndigits);

@ -785,7 +785,8 @@ void BLI_getlastdir(const char* dir, char *last, const size_t maxlen)
/* This is now only used to really get the user's default document folder */
/* On Windows I chose the 'Users/<MyUserName>/Documents' since it's used
as default location to save documents */
const char *BLI_getDefaultDocumentFolder(void) {
const char *BLI_getDefaultDocumentFolder(void)
{
#if !defined(WIN32)
return getenv("HOME");
@ -1206,7 +1207,8 @@ void BLI_char_switch(char *string, char from, char to)
}
}
void BLI_make_exist(char *dir) {
void BLI_make_exist(char *dir)
{
int a;
BLI_char_switch(dir, ALTSEP, SEP);
@ -1550,7 +1552,8 @@ int BKE_rebase_path(char *abs, size_t abs_len, char *rel, size_t rel_len, const
return 1;
}
char *BLI_first_slash(char *string) {
char *BLI_first_slash(char *string)
{
char *ffslash, *fbslash;
ffslash= strchr(string, '/');
@ -1563,7 +1566,8 @@ char *BLI_first_slash(char *string) {
else return fbslash;
}
char *BLI_last_slash(const char *string) {
char *BLI_last_slash(const char *string)
{
char *lfslash, *lbslash;
lfslash= strrchr(string, '/');
@ -1577,7 +1581,8 @@ char *BLI_last_slash(const char *string) {
}
/* adds a slash if there isnt one there already */
int BLI_add_slash(char *string) {
int BLI_add_slash(char *string)
{
int len = strlen(string);
#ifdef WIN32
if (len==0 || string[len-1]!='\\') {
@ -1596,7 +1601,8 @@ int BLI_add_slash(char *string) {
}
/* removes a slash if there is one */
void BLI_del_slash(char *string) {
void BLI_del_slash(char *string)
{
int len = strlen(string);
while (len) {
#ifdef WIN32

@ -469,7 +469,8 @@ int BLI_exist(const char *name)
}
/* would be better in fileops.c except that it needs stat.h so add here */
int BLI_is_dir(const char *file) {
int BLI_is_dir(const char *file)
{
return S_ISDIR(BLI_exist(file));
}

@ -43,14 +43,16 @@
#include "BLI_dynstr.h"
#include "BLI_string.h"
char *BLI_strdupn(const char *str, const size_t len) {
char *BLI_strdupn(const char *str, const size_t len)
{
char *n= MEM_mallocN(len+1, "strdup");
memcpy(n, str, len);
n[len]= '\0';
return n;
}
char *BLI_strdup(const char *str) {
char *BLI_strdup(const char *str)
{
return BLI_strdupn(str, strlen(str));
}
@ -67,7 +69,8 @@ char *BLI_strdupcat(const char *str1, const char *str2)
return n;
}
char *BLI_strncpy(char *dst, const char *src, const size_t maxncpy) {
char *BLI_strncpy(char *dst, const char *src, const size_t maxncpy)
{
size_t srclen= strlen(src);
size_t cpylen= (srclen>(maxncpy-1))?(maxncpy-1):srclen;
@ -87,7 +90,8 @@ size_t BLI_snprintf(char *buffer, size_t count, const char *format, ...)
if (n != -1 && n < count) {
buffer[n] = '\0';
} else {
}
else {
buffer[count-1] = '\0';
}
@ -280,7 +284,8 @@ char *BLI_strcasestr(const char *s, const char *find)
}
int BLI_strcasecmp(const char *s1, const char *s2) {
int BLI_strcasecmp(const char *s1, const char *s2)
{
int i;
for (i=0; ; i++) {
@ -299,7 +304,8 @@ int BLI_strcasecmp(const char *s1, const char *s2) {
return 0;
}
int BLI_strncasecmp(const char *s1, const char *s2, size_t len) {
int BLI_strncasecmp(const char *s1, const char *s2, size_t len)
{
int i;
for (i=0; i<len; i++) {

@ -219,7 +219,8 @@ static void *tslot_thread_start(void *tslot_p)
return tslot->do_thread(tslot->callerdata);
}
int BLI_thread_is_main(void) {
int BLI_thread_is_main(void)
{
return pthread_equal(pthread_self(), mainid);
}

@ -240,7 +240,8 @@ LinkNode *BLO_blendhandle_get_linkable_groups(BlendHandle *bh)
return names;
}
void BLO_blendhandle_close(BlendHandle *bh) {
void BLO_blendhandle_close(BlendHandle *bh)
{
FileData *fd= (FileData*) bh;
blo_freefiledata(fd);

@ -426,7 +426,7 @@ virtual void AnimationImporter::change_eul_to_quat(Object *ob, bAction *act)
//sets the rna_path and array index to curve
void AnimationImporter::modify_fcurve(std::vector<FCurve*>* curves , char* rna_path , int array_index )
void AnimationImporter::modify_fcurve(std::vector<FCurve*>* curves , const char* rna_path , int array_index )
{
std::vector<FCurve*>::iterator it;
int i;

@ -164,7 +164,7 @@ public:
int setAnimType ( const COLLADAFW::Animatable * prop , int type, int addition);
void modify_fcurve(std::vector<FCurve*>* curves , char* rna_path , int array_index );
void modify_fcurve(std::vector<FCurve*>* curves , const char* rna_path , int array_index );
// prerequisites:
// animlist_map - map animlist id -> animlist
// curve_map - map anim id -> curve(s)

@ -6537,8 +6537,8 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
return nu;
}
static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf) {
static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf)
{
Object *obedit= CTX_data_edit_object(C);
ListBase *editnurb;
Nurb *nu;
@ -6607,11 +6607,13 @@ static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf)
return OPERATOR_FINISHED;
}
static int curve_prim_add(bContext *C, wmOperator *op, int type) {
static int curve_prim_add(bContext *C, wmOperator *op, int type)
{
return curvesurf_prim_add(C, op, type, 0);
}
static int surf_prim_add(bContext *C, wmOperator *op, int type) {
static int surf_prim_add(bContext *C, wmOperator *op, int type)
{
return curvesurf_prim_add(C, op, type, 1);
}

@ -2804,7 +2804,8 @@ uiBut *uiDefBut(uiBlock *block, int type, int retval, const char *str, int x1, i
* otherwise return -1.
* (1<<findBitIndex(x))==x for powers of two.
*/
static int findBitIndex(unsigned int x) {
static int findBitIndex(unsigned int x)
{
if (!x || (x&(x-1))!=0) { /* x&(x-1) strips lowest bit */
return -1;
} else {

@ -1695,7 +1695,7 @@ static void ui_textedit_end(bContext *C, uiBut *but, uiHandleButtonData *data)
/* not a file?, strip non utf-8 chars */
if(strip) {
/* wont happen often so isnt that annoying to keep it here for a while */
printf("invalid utf8 - stripped chars %d\n", strip);
printf("%s: invalid utf8 - stripped chars %d\n", __func__, strip);
}
}
@ -6010,7 +6010,7 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle
ui_handle_button_activate(C, ar, but, BUTTON_ACTIVATE);
}
else {
printf("Error, but->menu_key type: %d\n", but->type);
printf("%s: error, but->menu_key type: %d\n", __func__, but->type);
}
break;

@ -752,7 +752,7 @@ int UI_icon_get_width(int icon_id)
if (icon==NULL) {
if (G.f & G_DEBUG)
printf("UI_icon_get_width: Internal error, no icon for icon ID: %d\n", icon_id);
printf("%s: Internal error, no icon for icon ID: %d\n", __func__, icon_id);
return 0;
}
@ -777,7 +777,7 @@ int UI_icon_get_height(int icon_id)
if (icon==NULL) {
if (G.f & G_DEBUG)
printf("UI_icon_get_height: Internal error, no icon for icon ID: %d\n", icon_id);
printf("%s: Internal error, no icon for icon ID: %d\n", __func__, icon_id);
return 0;
}
@ -825,7 +825,7 @@ static void icon_create_rect(struct PreviewImage* prv_img, enum eIconSizes size)
if (!prv_img) {
if (G.f & G_DEBUG)
printf("Error: requested preview image does not exist");
printf("%s, error: requested preview image does not exist", __func__);
}
if (!prv_img->rect[size]) {
prv_img->w[size] = render_size;
@ -842,7 +842,7 @@ static void icon_set_image(bContext *C, ID *id, PreviewImage* prv_img, enum eIco
{
if (!prv_img) {
if (G.f & G_DEBUG)
printf("No preview image for this ID: %s\n", id->name);
printf("%s: no preview image for this ID: %s\n", __func__, id->name);
return;
}
@ -858,7 +858,7 @@ static void icon_draw_rect(float x, float y, int w, int h, float UNUSED(aspect),
/* sanity check */
if(w<=0 || h<=0 || w>2000 || h>2000) {
printf("icon_draw_rect: icons are %i x %i pixels?\n", w, h);
printf("%s: icons are %i x %i pixels?\n", __func__, w, h);
BLI_assert(!"invalid icon size");
return;
}
@ -948,19 +948,19 @@ static int get_draw_size(enum eIconSizes size)
return 0;
}
static void icon_draw_size(float x, float y, int icon_id, float aspect, float alpha, float *rgb, enum eIconSizes size, int draw_size, int UNUSED(nocreate), int is_preview)
static void icon_draw_size(float x, float y, int icon_id, float aspect, float alpha, float *rgb, enum eIconSizes size, int draw_size, int UNUSED(nocreate), short is_preview)
{
Icon *icon = NULL;
DrawInfo *di = NULL;
IconImage *iimg;
float fdraw_size= UI_DPI_ICON_FAC*draw_size;
float fdraw_size= is_preview ? draw_size : (draw_size * UI_DPI_ICON_FAC);
int w, h;
icon = BKE_icon_get(icon_id);
if (icon==NULL) {
if (G.f & G_DEBUG)
printf("icon_draw_mipmap: Internal error, no icon for icon ID: %d\n", icon_id);
printf("%s: Internal error, no icon for icon ID: %d\n", __func__, icon_id);
return;
}

@ -174,7 +174,7 @@ static MenuData *decompose_menu_string(const char *str)
*s= '\0';
s++;
} else if (s[1]=='t') {
nitem_is_title= 1;
nitem_is_title= (s != instr); /* check for empty title */
*s= '\0';
s++;
@ -213,11 +213,13 @@ static MenuData *decompose_menu_string(const char *str)
nicon= 0;
}
if (c=='\0')
if (c=='\0') {
break;
} else if (!nitem)
}
} else if (!nitem) {
nitem= s;
}
s++;
}
@ -233,6 +235,7 @@ void ui_set_name_menu(uiBut *but, int value)
for (i=0; i<md->nitems; i++) {
if (md->items[i].retval==value) {
BLI_strncpy(but->drawstr, md->items[i].str, sizeof(but->drawstr));
break;
}
}
@ -1647,11 +1650,12 @@ static void ui_block_func_MENUSTR(bContext *UNUSED(C), uiLayout *layout, void *a
}
/* inconsistent, but menus with labels do not look good flipped */
for(a=0, b=0; a<md->nitems; a++, b++) {
entry= &md->items[a];
if(entry->sepr && entry->str[0])
entry= md->items;
for(a=0; a<md->nitems; a++, entry++) {
if(entry->sepr && entry->str[0]) {
block->flag |= UI_BLOCK_NO_FLIP;
break;
}
}
/* create items */
@ -2555,7 +2559,7 @@ void uiPupMenuInvoke(bContext *C, const char *idname)
MenuType *mt= WM_menutype_find(idname, TRUE);
if(mt==NULL) {
printf("uiPupMenuInvoke: named menu \"%s\" not found\n", idname);
printf("%s: named menu \"%s\" not found\n", __func__, idname);
return;
}

@ -42,6 +42,7 @@
#include "BLI_listbase.h"
#include "BLI_rect.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "BKE_global.h"
@ -357,7 +358,7 @@ void uiStyleInit(void)
if (font->blf_id == -1) {
if (G.f & G_DEBUG)
printf("uiStyleInit error, no fonts available\n");
printf("%s: error, no fonts available\n", __func__);
}
else {
/* ? just for speed to initialize?

@ -422,11 +422,11 @@ static Object* createRepresentation(bContext *C, struct recast_polyMesh *pmesh,
static int create_navmesh_exec(bContext *C, wmOperator *UNUSED(op))
{
Scene* scene= CTX_data_scene(C);
int nverts, ntris;
float* verts;
int* tris;
struct recast_polyMesh *pmesh;
struct recast_polyMeshDetail *dmesh;
int nverts= 0, ntris= 0;
float *verts= NULL;
int *tris= 0;
struct recast_polyMesh *pmesh= NULL;
struct recast_polyMeshDetail *dmesh= NULL;
LinkNode* obs= NULL;
Base* navmeshBase= NULL;

@ -883,7 +883,8 @@ static void multiresbake_start(MultiresBakeRender *bkr)
finish_images(bkr);
}
static int multiresbake_check(bContext *C, wmOperator *op) {
static int multiresbake_check(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
Object *ob;
Mesh *me;

@ -756,7 +756,8 @@ static void vgroup_normalize(Object *ob)
It returns the number that it added (0-2)
It relies on verts having -1 for unassigned indices
*/
static int tryToAddVerts(int *verts, int length, int a, int b) {
static int tryToAddVerts(int *verts, int length, int a, int b)
{
char containsA = FALSE;
char containsB = FALSE;
int added = 0;
@ -786,7 +787,8 @@ and returns an array of indices of size count
count is an int passed by reference so it can be assigned the value of the length here.
*/
static int* getSurroundingVerts(Mesh *me, int vert, int *count) {
static int* getSurroundingVerts(Mesh *me, int vert, int *count)
{
int length = 0;
int *tverts;
int *verts = NULL;
@ -848,7 +850,8 @@ static int* getSurroundingVerts(Mesh *me, int vert, int *count) {
/* get a single point in space by averaging a point cloud (vectors of size 3)
coord is the place the average is stored, points is the point cloud, count is the number of points in the cloud
*/
static void getSingleCoordinate(MVert *points, int count, float coord[3]) {
static void getSingleCoordinate(MVert *points, int count, float coord[3])
{
int i;
zero_v3(coord);
for(i = 0; i < count; i++) {
@ -875,7 +878,8 @@ static void getNearestPointOnPlane(const float norm[3], const float coord[3], co
}
/* distance of two vectors a and b of size length */
static float distance(float* a, float *b, int length) {
static float distance(float* a, float *b, int length)
{
int i;
float sum = 0;
for(i = 0; i < length; i++) {
@ -888,7 +892,8 @@ static float distance(float* a, float *b, int length) {
compute the amount of vertical distance relative to the plane and store it in dists,
then get the horizontal and vertical change and store them in changes
*/
static void getVerticalAndHorizontalChange(float *norm, float d, float *coord, float *start, float distToStart, float *end, float (*changes)[2], float *dists, int index) {
static void getVerticalAndHorizontalChange(float *norm, float d, float *coord, float *start, float distToStart, float *end, float (*changes)[2], float *dists, int index)
{
// A=Q-((Q-P).N)N
// D = (a*x0 + b*y0 +c*z0 +d)
float projA[3] = {0}, projB[3] = {0};
@ -906,7 +911,8 @@ static void getVerticalAndHorizontalChange(float *norm, float d, float *coord, f
}
// I need the derived mesh to be forgotten so the positions are recalculated with weight changes (see dm_deform_recalc)
static void dm_deform_clear(DerivedMesh *dm, Object *ob) {
static void dm_deform_clear(DerivedMesh *dm, Object *ob)
{
if(ob->derivedDeform && (ob->derivedDeform)==dm) {
ob->derivedDeform->needsFree = 1;
ob->derivedDeform->release(ob->derivedDeform);
@ -919,7 +925,8 @@ static void dm_deform_clear(DerivedMesh *dm, Object *ob) {
}
// recalculate the deformation
static DerivedMesh* dm_deform_recalc(Scene *scene, Object *ob) {
static DerivedMesh* dm_deform_recalc(Scene *scene, Object *ob)
{
return mesh_get_derived_deform(scene, ob, CD_MASK_BAREMESH);
}
@ -931,7 +938,8 @@ index is the index of the vertex being moved
norm and d are the plane's properties for the equation: ax + by + cz + d = 0
coord is a point on the plane
*/
static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, int index, float norm[3], float coord[3], float d, float distToBe, float strength, float cp) {
static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, int index, float norm[3], float coord[3], float d, float distToBe, float strength, float cp)
{
DerivedMesh *dm;
MDeformWeight *dw;
MVert m;

@ -844,7 +844,7 @@ static void fluidsim_delete_until_lastframe(FluidsimSettings *fss)
return;
}
static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain)
static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, short do_job)
{
Scene *scene= CTX_data_scene(C);
int i;
@ -871,12 +871,10 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain)
ListBase *fobjects = MEM_callocN(sizeof(ListBase), "fluid objects");
FluidsimModifierData *fluidmd = NULL;
Mesh *mesh = NULL;
wmJob *steve;
FluidBakeJob *fb;
elbeemSimulationSettings *fsset= MEM_callocN(sizeof(elbeemSimulationSettings), "Fluid sim settings");
steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, "Fluid Simulation", WM_JOB_PROGRESS);
fb= MEM_callocN(sizeof(FluidBakeJob), "fluid bake job");
if(getenv(strEnvName)) {
@ -1083,12 +1081,25 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain)
/* custom data for fluid bake job */
fb->settings = fsset;
/* setup job */
WM_jobs_customdata(steve, fb, fluidbake_free);
WM_jobs_timer(steve, 0.1, NC_SCENE|ND_FRAME, NC_SCENE|ND_FRAME);
WM_jobs_callbacks(steve, fluidbake_startjob, NULL, NULL, fluidbake_endjob);
WM_jobs_start(CTX_wm_manager(C), steve);
if(do_job) {
wmJob *steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, "Fluid Simulation", WM_JOB_PROGRESS);
/* setup job */
WM_jobs_customdata(steve, fb, fluidbake_free);
WM_jobs_timer(steve, 0.1, NC_SCENE|ND_FRAME, NC_SCENE|ND_FRAME);
WM_jobs_callbacks(steve, fluidbake_startjob, NULL, NULL, fluidbake_endjob);
WM_jobs_start(CTX_wm_manager(C), steve);
}
else {
short dummy_stop, dummy_do_update;
float dummy_progress;
/* blocking, use with exec() */
fluidbake_startjob((void *)fb, &dummy_stop, &dummy_do_update, &dummy_progress);
fluidbake_endjob((void *)fb);
fluidbake_free((void *)fb);
}
/* ******** free stored animation data ******** */
fluidbake_free_data(channels, fobjects, NULL, NULL);
@ -1121,7 +1132,7 @@ FluidsimSettings* fluidsimSettingsCopy(FluidsimSettings *UNUSED(fss))
}
/* only compile dummy functions */
static int fluidsimBake(bContext *UNUSED(C), ReportList *UNUSED(reports), Object *UNUSED(ob))
static int fluidsimBake(bContext *UNUSED(C), ReportList *UNUSED(reports), Object *UNUSED(ob), short UNUSED(do_job))
{
return 0;
}
@ -1130,13 +1141,21 @@ static int fluidsimBake(bContext *UNUSED(C), ReportList *UNUSED(reports), Object
/***************************** Operators ******************************/
static int fluid_bake_exec(bContext *C, wmOperator *op)
static int fluid_bake_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
/* only one bake job at a time */
if(WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C)))
return 0;
return OPERATOR_CANCELLED;
if(!fluidsimBake(C, op->reports, CTX_data_active_object(C)))
if(!fluidsimBake(C, op->reports, CTX_data_active_object(C), TRUE))
return OPERATOR_CANCELLED;
return OPERATOR_FINISHED;
}
static int fluid_bake_exec(bContext *C, wmOperator *op)
{
if(!fluidsimBake(C, op->reports, CTX_data_active_object(C), FALSE))
return OPERATOR_CANCELLED;
return OPERATOR_FINISHED;
@ -1150,6 +1169,7 @@ void FLUID_OT_bake(wmOperatorType *ot)
ot->idname= "FLUID_OT_bake";
/* api callbacks */
ot->invoke= fluid_bake_invoke;
ot->exec= fluid_bake_exec;
ot->poll= ED_operator_object_active_editable;
}

@ -364,7 +364,8 @@ void fdrawXORcirc(float xofs, float yofs, float rad)
set_inverted_drawing(0);
}
void glutil_draw_filled_arc(float start, float angle, float radius, int nsegments) {
void glutil_draw_filled_arc(float start, float angle, float radius, int nsegments)
{
int i;
glBegin(GL_TRIANGLE_FAN);
@ -378,7 +379,8 @@ void glutil_draw_filled_arc(float start, float angle, float radius, int nsegment
glEnd();
}
void glutil_draw_lined_arc(float start, float angle, float radius, int nsegments) {
void glutil_draw_lined_arc(float start, float angle, float radius, int nsegments)
{
int i;
glBegin(GL_LINE_STRIP);
@ -797,7 +799,8 @@ void bglBegin(int mode)
}
}
int bglPointHack(void) {
int bglPointHack(void)
{
float value[4];
int pointhack_px;
glGetFloatv(GL_POINT_SIZE_RANGE, value);

@ -1857,11 +1857,13 @@ static int IsectPT2Df_limit(float pt[2], float v1[2], float v2[2], float v3[2],
/* Clip the face by a bucket and set the uv-space bucket_bounds_uv
* so we have the clipped UV's to do pixel intersection tests with
* */
static int float_z_sort_flip(const void *p1, const void *p2) {
static int float_z_sort_flip(const void *p1, const void *p2)
{
return (((float *)p1)[2] < ((float *)p2)[2] ? 1:-1);
}
static int float_z_sort(const void *p1, const void *p2) {
static int float_z_sort(const void *p1, const void *p2)
{
return (((float *)p1)[2] < ((float *)p2)[2] ?-1:1);
}
@ -3686,7 +3688,8 @@ static void do_projectpaint_draw(ProjPaintState *ps, ProjPixel *projPixel, float
}
}
static void do_projectpaint_draw_f(ProjPaintState *ps, ProjPixel *projPixel, float *rgba, float alpha, float mask, int use_color_correction) {
static void do_projectpaint_draw_f(ProjPaintState *ps, ProjPixel *projPixel, float *rgba, float alpha, float mask, int use_color_correction)
{
if (ps->is_texbrush) {
/* rgba already holds a texture result here from higher level function */
float rgba_br[3];

@ -244,7 +244,8 @@ static int compare_size(const void *a1, const void *a2)
else return BLI_natstrcmp(entry1->relname,entry2->relname);
}
static int compare_extension(const void *a1, const void *a2) {
static int compare_extension(const void *a1, const void *a2)
{
const struct direntry *entry1=a1, *entry2=a2;
const char *sufix1, *sufix2;
const char *nil="";

@ -1747,6 +1747,7 @@ static int get_col_actuator(int type)
case ACT_CONSTRAINT: return TH_PANEL;
case ACT_STATE: return TH_PANEL;
case ACT_ARMATURE: return TH_PANEL;
case ACT_STEERING: return TH_PANEL;
default: return TH_PANEL;
}
}

@ -3266,7 +3266,8 @@ void NODE_OT_delete(wmOperatorType *ot)
}
/* ****************** Delete with reconnect ******************* */
static int is_connected_to_input_socket(bNode* node, bNodeLink* link) {
static int is_connected_to_input_socket(bNode* node, bNodeLink* link)
{
bNodeSocket *sock;
if (link->tonode == node) {
for(sock= node->inputs.first; sock; sock= sock->next) {

@ -165,7 +165,7 @@ void sequencer_keymap(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "SEQUENCER_OT_meta_toggle", TABKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "SEQUENCER_OT_meta_make", GKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "SEQUENCER_OT_meta_make", GKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "SEQUENCER_OT_meta_separate", GKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "SEQUENCER_OT_view_all", HOMEKEY, KM_PRESS, 0, 0);

@ -530,7 +530,8 @@ void SEQUENCER_OT_select(wmOperatorType *ot)
/* run recursivly to select linked */
static int select_more_less_seq__internal(Scene *scene, int sel, int linked) {
static int select_more_less_seq__internal(Scene *scene, int sel, int linked)
{
Editing *ed= seq_give_editing(scene, FALSE);
Sequence *seq, *neighbor;
int change=0;

@ -1985,7 +1985,8 @@ static void drawSelectedVertices__mapFunc(void *userData, int index, float *co,
}
}
static void drawSelectedVertices(DerivedMesh *dm, Mesh *me) {
static void drawSelectedVertices(DerivedMesh *dm, Mesh *me)
{
glBegin(GL_POINTS);
dm->foreachMappedVert(dm, drawSelectedVertices__mapFunc, me->mvert);
glEnd();

@ -2201,6 +2201,12 @@ void flushTransNodes(TransInfo *t)
}
/* *** SEQUENCE EDITOR *** */
/* commented _only_ because the meta may have animaion data which
* needs moving too [#28158] */
#define SEQ_TX_NESTED_METAS
void flushTransSeq(TransInfo *t)
{
ListBase *seqbasep= seq_give_editing(t->scene, FALSE)->seqbasep; /* Editing null check already done */
@ -2226,9 +2232,13 @@ void flushTransSeq(TransInfo *t)
switch (tdsq->sel_flag) {
case SELECT:
#ifdef SEQ_TX_NESTED_METAS
if ((seq->depth != 0 || seq_tx_test(seq))) /* for meta's, their children move */
seq->start= new_frame - tdsq->start_offset;
#else
if (seq->type != SEQ_META && (seq->depth != 0 || seq_tx_test(seq))) /* for meta's, their children move */
seq->start= new_frame - tdsq->start_offset;
#endif
if (seq->depth==0) {
seq->machine= (int)floor(td2d->loc[1] + 0.5f);
CLAMP(seq->machine, 1, MAXSEQ);
@ -2283,7 +2293,7 @@ void flushTransSeq(TransInfo *t)
seq_prev= seq;
}
if (t->mode == TFM_TIME_TRANSLATE) { /* originally TFM_TIME_EXTEND, transform changes */
if (t->mode == TFM_SEQ_SLIDE) { /* originally TFM_TIME_EXTEND, transform changes */
/* Special annoying case here, need to calc metas with TFM_TIME_EXTEND only */
seq= seqbasep->first;
@ -3835,6 +3845,11 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count
else {
/* Nested, different rules apply */
#ifdef SEQ_TX_NESTED_METAS
*flag= (seq->flag | SELECT) & ~(SEQ_LEFTSEL|SEQ_RIGHTSEL);
*count= 1; /* ignore the selection for nested */
*recursive = (seq->type == SEQ_META );
#else
if (seq->type == SEQ_META) {
/* Meta's can only directly be moved between channels since they
* dont have their start and length set directly (children affect that)
@ -3849,6 +3864,7 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count
*count= 1; /* ignore the selection for nested */
*recursive = 0;
}
#endif
}
}
}

@ -1315,7 +1315,8 @@ void applyTransObjects(TransInfo *t)
recalcData(t);
}
static void restoreElement(TransData *td) {
static void restoreElement(TransData *td)
{
/* TransData for crease has no loc */
if (td->loc) {
copy_v3_v3(td->loc, td->iloc);

@ -118,7 +118,8 @@ static void InputTrackBall(TransInfo *UNUSED(t), MouseInput *mi, const int mval[
output[1] *= mi->factor;
}
static void InputHorizontalRatio(TransInfo *t, MouseInput *mi, const int mval[2], float output[3]) {
static void InputHorizontalRatio(TransInfo *t, MouseInput *mi, const int mval[2], float output[3])
{
float x, pad;
pad = t->ar->winx / 10;
@ -135,7 +136,8 @@ static void InputHorizontalRatio(TransInfo *t, MouseInput *mi, const int mval[2]
output[0] = (x - pad) / (t->ar->winx - 2 * pad);
}
static void InputHorizontalAbsolute(TransInfo *t, MouseInput *mi, const int mval[2], float output[3]) {
static void InputHorizontalAbsolute(TransInfo *t, MouseInput *mi, const int mval[2], float output[3])
{
float vec[3];
InputVector(t, mi, mval, vec);
@ -144,7 +146,8 @@ static void InputHorizontalAbsolute(TransInfo *t, MouseInput *mi, const int mval
output[0] = dot_v3v3(t->viewinv[0], vec) * 2.0f;
}
static void InputVerticalRatio(TransInfo *t, MouseInput *mi, const int mval[2], float output[3]) {
static void InputVerticalRatio(TransInfo *t, MouseInput *mi, const int mval[2], float output[3])
{
float y, pad;
pad = t->ar->winy / 10;
@ -160,7 +163,8 @@ static void InputVerticalRatio(TransInfo *t, MouseInput *mi, const int mval[2],
output[0] = (y - pad) / (t->ar->winy - 2 * pad);
}
static void InputVerticalAbsolute(TransInfo *t, MouseInput *mi, const int mval[2], float output[3]) {
static void InputVerticalAbsolute(TransInfo *t, MouseInput *mi, const int mval[2], float output[3])
{
float vec[3];
InputVector(t, mi, mval, vec);

@ -1584,7 +1584,8 @@ static int snapObject(Scene *scene, ARegion *ar, Object *ob, int editobject, flo
return retval;
}
static int snapObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, float mval[2], int *dist, float *loc, float *no, SnapMode mode) {
static int snapObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, float mval[2], int *dist, float *loc, float *no, SnapMode mode)
{
Base *base;
float depth = FLT_MAX;
int retval = 0;
@ -1914,7 +1915,8 @@ int peelObjectsContext(bContext *C, ListBase *depth_peels, float mval[2])
static void applyGrid(TransInfo *t, float *val, int max_index, float fac[3], GearsType action);
void snapGridAction(TransInfo *t, float *val, GearsType action) {
void snapGridAction(TransInfo *t, float *val, GearsType action)
{
float fac[3];
fac[NO_GEARS] = t->snap[0];
@ -1925,7 +1927,8 @@ void snapGridAction(TransInfo *t, float *val, GearsType action) {
}
void snapGrid(TransInfo *t, float *val) {
void snapGrid(TransInfo *t, float *val)
{
GearsType action;
// Only do something if using Snap to Grid

@ -1058,7 +1058,8 @@ void GPU_uvedge_setup(DerivedMesh *dm)
GLStates |= GPU_BUFFER_VERTEX_STATE;
}
static int GPU_typesize(int type) {
static int GPU_typesize(int type)
{
switch(type) {
case GL_FLOAT:
return sizeof(float);
@ -1075,7 +1076,8 @@ static int GPU_typesize(int type) {
}
}
int GPU_attrib_element_size(GPUAttrib data[], int numdata) {
int GPU_attrib_element_size(GPUAttrib data[], int numdata)
{
int i, elementsize = 0;
for(i = 0; i < numdata; i++) {
@ -1086,7 +1088,8 @@ int GPU_attrib_element_size(GPUAttrib data[], int numdata) {
return elementsize;
}
void GPU_interleaved_attrib_setup(GPUBuffer *buffer, GPUAttrib data[], int numdata) {
void GPU_interleaved_attrib_setup(GPUBuffer *buffer, GPUAttrib data[], int numdata)
{
int i;
int elementsize;
intptr_t offset = 0;

@ -101,8 +101,8 @@ static int checkbmp(unsigned char *mem)
return(ret_val);
}
int imb_is_a_bmp(unsigned char *buf) {
int imb_is_a_bmp(unsigned char *buf)
{
return checkbmp(buf);
}
@ -200,8 +200,8 @@ static int putShortLSB(unsigned short us,FILE *ofile) {
}
/* Found write info at http://users.ece.gatech.edu/~slabaugh/personal/c/bitmapUnix.c */
int imb_savebmp(struct ImBuf *ibuf, const char *name, int flags) {
int imb_savebmp(struct ImBuf *ibuf, const char *name, int flags)
{
BMPINFOHEADER infoheader;
int bytesize, extrabytes, x, y, t, ptr;
uchar *data;

@ -111,7 +111,8 @@ static void pixel_from_buffer(struct ImBuf *ibuf, unsigned char **outI, float **
*/
/* function assumes out to be zero'ed, only does RGBA */
static float P(float k){
static float P(float k)
{
float p1, p2, p3, p4;
p1 = MAX2(k+2.0f,0);
p2 = MAX2(k+1.0f,0);
@ -123,7 +124,8 @@ static float P(float k){
#if 0
/* older, slower function, works the same as above */
static float P(float k){
static float P(float k)
{
return (float)(1.0f/6.0f)*( pow( MAX2(k+2.0f,0) , 3.0f ) - 4.0f * pow( MAX2(k+1.0f,0) , 3.0f ) + 6.0f * pow( MAX2(k,0) , 3.0f ) - 4.0f * pow( MAX2(k-1.0f,0) , 3.0f));
}
#endif

@ -56,7 +56,8 @@ static unsigned long bitstream_get_bits(indexer_dv_bitstream * This, int num)
return rval;
}
static int parse_num(indexer_dv_bitstream * b, int numbits) {
static int parse_num(indexer_dv_bitstream * b, int numbits)
{
return bitstream_get_bits(b, numbits);
}

@ -84,8 +84,8 @@ type 3 is unsupported as of jul 05 2000 Frank.
static int jpeg_default_quality;
static int ibuf_ftype;
int imb_is_a_jpeg(unsigned char *mem) {
int imb_is_a_jpeg(unsigned char *mem)
{
if ((mem[0]== 0xFF) && (mem[1] == 0xD8))return 1;
return 0;
}

@ -338,7 +338,8 @@ static int checktarga(TARGA *tga, unsigned char *mem)
return(1);
}
int imb_is_a_targa(unsigned char *buf) {
int imb_is_a_targa(unsigned char *buf)
{
TARGA tga;
return checktarga(&tga, buf);

@ -1111,7 +1111,7 @@ int RNA_property_pointer_poll(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *va
return 1;
}
printf("RNA_property_pointer_poll %s: is not a pointer property.\n", prop->identifier);
printf("%s %s: is not a pointer property.\n", __func__, prop->identifier);
return 0;
}
@ -2511,7 +2511,7 @@ void RNA_property_pointer_add(PointerRNA *ptr, PropertyRNA *prop)
IDP_AddToGroup(group, IDP_New(IDP_GROUP, val, (char*)prop->identifier));
}
else
printf("RNA_property_pointer_add %s.%s: only supported for id properties.\n", ptr->type->identifier, prop->identifier);
printf("%s %s.%s: only supported for id properties.\n", __func__, ptr->type->identifier, prop->identifier);
}
void RNA_property_pointer_remove(PointerRNA *ptr, PropertyRNA *prop)
@ -2530,7 +2530,7 @@ void RNA_property_pointer_remove(PointerRNA *ptr, PropertyRNA *prop)
}
}
else
printf("RNA_property_pointer_remove %s.%s: only supported for id properties.\n", ptr->type->identifier, prop->identifier);
printf("%s %s.%s: only supported for id properties.\n", __func__, ptr->type->identifier, prop->identifier);
}
static void rna_property_collection_get_idp(CollectionPropertyIterator *iter)
@ -2663,7 +2663,7 @@ void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA
}
}
/*else
printf("RNA_property_collection_add %s.%s: not implemented for this property.\n", ptr->type->identifier, prop->identifier);*/
printf("%s %s.%s: not implemented for this property.\n", __func__, ptr->type->identifier, prop->identifier);*/
#endif
if(r_ptr) {
@ -2722,7 +2722,7 @@ int RNA_property_collection_remove(PointerRNA *ptr, PropertyRNA *prop, int key)
return 0;
}
/*else
printf("RNA_property_collection_remove %s.%s: only supported for id properties.\n", ptr->type->identifier, prop->identifier);*/
printf("%s %s.%s: only supported for id properties.\n", __func__, ptr->type->identifier, prop->identifier);*/
#endif
return 0;
}
@ -3999,7 +3999,7 @@ int RNA_boolean_get(PointerRNA *ptr, const char *name)
return RNA_property_boolean_get(ptr, prop);
}
else {
printf("RNA_boolean_get: %s.%s not found.\n", ptr->type->identifier, name);
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
return 0;
}
}
@ -4011,7 +4011,7 @@ void RNA_boolean_set(PointerRNA *ptr, const char *name, int value)
if(prop)
RNA_property_boolean_set(ptr, prop, value);
else
printf("RNA_boolean_set: %s.%s not found.\n", ptr->type->identifier, name);
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
}
void RNA_boolean_get_array(PointerRNA *ptr, const char *name, int *values)
@ -4021,7 +4021,7 @@ void RNA_boolean_get_array(PointerRNA *ptr, const char *name, int *values)
if(prop)
RNA_property_boolean_get_array(ptr, prop, values);
else
printf("RNA_boolean_get_array: %s.%s not found.\n", ptr->type->identifier, name);
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
}
void RNA_boolean_set_array(PointerRNA *ptr, const char *name, const int *values)
@ -4031,7 +4031,7 @@ void RNA_boolean_set_array(PointerRNA *ptr, const char *name, const int *values)
if(prop)
RNA_property_boolean_set_array(ptr, prop, values);
else
printf("RNA_boolean_set_array: %s.%s not found.\n", ptr->type->identifier, name);
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
}
int RNA_int_get(PointerRNA *ptr, const char *name)
@ -4042,7 +4042,7 @@ int RNA_int_get(PointerRNA *ptr, const char *name)
return RNA_property_int_get(ptr, prop);
}
else {
printf("RNA_int_get: %s.%s not found.\n", ptr->type->identifier, name);
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
return 0;
}
}
@ -4054,7 +4054,7 @@ void RNA_int_set(PointerRNA *ptr, const char *name, int value)
if(prop)
RNA_property_int_set(ptr, prop, value);
else
printf("RNA_int_set: %s.%s not found.\n", ptr->type->identifier, name);
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
}
void RNA_int_get_array(PointerRNA *ptr, const char *name, int *values)
@ -4064,7 +4064,7 @@ void RNA_int_get_array(PointerRNA *ptr, const char *name, int *values)
if(prop)
RNA_property_int_get_array(ptr, prop, values);
else
printf("RNA_int_get_array: %s.%s not found.\n", ptr->type->identifier, name);
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
}
void RNA_int_set_array(PointerRNA *ptr, const char *name, const int *values)
@ -4074,7 +4074,7 @@ void RNA_int_set_array(PointerRNA *ptr, const char *name, const int *values)
if(prop)
RNA_property_int_set_array(ptr, prop, values);
else
printf("RNA_int_set_array: %s.%s not found.\n", ptr->type->identifier, name);
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
}
float RNA_float_get(PointerRNA *ptr, const char *name)
@ -4085,7 +4085,7 @@ float RNA_float_get(PointerRNA *ptr, const char *name)
return RNA_property_float_get(ptr, prop);
}
else {
printf("RNA_float_get: %s.%s not found.\n", ptr->type->identifier, name);
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
return 0;
}
}
@ -4097,7 +4097,7 @@ void RNA_float_set(PointerRNA *ptr, const char *name, float value)
if(prop)
RNA_property_float_set(ptr, prop, value);
else
printf("RNA_float_set: %s.%s not found.\n", ptr->type->identifier, name);
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
}
void RNA_float_get_array(PointerRNA *ptr, const char *name, float *values)
@ -4107,7 +4107,7 @@ void RNA_float_get_array(PointerRNA *ptr, const char *name, float *values)
if(prop)
RNA_property_float_get_array(ptr, prop, values);
else
printf("RNA_float_get_array: %s.%s not found.\n", ptr->type->identifier, name);
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
}
void RNA_float_set_array(PointerRNA *ptr, const char *name, const float *values)
@ -4117,7 +4117,7 @@ void RNA_float_set_array(PointerRNA *ptr, const char *name, const float *values)
if(prop)
RNA_property_float_set_array(ptr, prop, values);
else
printf("RNA_float_set_array: %s.%s not found.\n", ptr->type->identifier, name);
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
}
int RNA_enum_get(PointerRNA *ptr, const char *name)
@ -4128,7 +4128,7 @@ int RNA_enum_get(PointerRNA *ptr, const char *name)
return RNA_property_enum_get(ptr, prop);
}
else {
printf("RNA_enum_get: %s.%s not found.\n", ptr->type->identifier, name);
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
return 0;
}
}
@ -4140,7 +4140,7 @@ void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
if(prop)
RNA_property_enum_set(ptr, prop, value);
else
printf("RNA_enum_set: %s.%s not found.\n", ptr->type->identifier, name);
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
}
void RNA_enum_set_identifier(PointerRNA *ptr, const char *name, const char *id)
@ -4152,9 +4152,11 @@ void RNA_enum_set_identifier(PointerRNA *ptr, const char *name, const char *id)
if(RNA_property_enum_value(NULL, ptr, prop, id, &value))
RNA_property_enum_set(ptr, prop, value);
else
printf("RNA_enum_set_identifier: %s.%s has no enum id '%s'.\n", ptr->type->identifier, name, id);
} else
printf("RNA_enum_set_identifier: %s.%s not found.\n", ptr->type->identifier, name);
printf("%s: %s.%s has no enum id '%s'.\n", __func__, ptr->type->identifier, name, id);
}
else {
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
}
}
int RNA_enum_is_equal(bContext *C, PointerRNA *ptr, const char *name, const char *enumname)
@ -4173,11 +4175,11 @@ int RNA_enum_is_equal(bContext *C, PointerRNA *ptr, const char *name, const char
if(free)
MEM_freeN(item);
printf("RNA_enum_is_equal: %s.%s item %s not found.\n", ptr->type->identifier, name, enumname);
printf("%s: %s.%s item %s not found.\n", __func__, ptr->type->identifier, name, enumname);
return 0;
}
else {
printf("RNA_enum_is_equal: %s.%s not found.\n", ptr->type->identifier, name);
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
return 0;
}
}
@ -4226,7 +4228,7 @@ void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
RNA_property_string_get(ptr, prop, value);
}
else {
printf("RNA_string_get: %s.%s not found.\n", ptr->type->identifier, name);
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
value[0]= '\0';
}
}
@ -4239,7 +4241,7 @@ char *RNA_string_get_alloc(PointerRNA *ptr, const char *name, char *fixedbuf, in
return RNA_property_string_get_alloc(ptr, prop, fixedbuf, fixedlen);
}
else {
printf("RNA_string_get_alloc: %s.%s not found.\n", ptr->type->identifier, name);
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
return NULL;
}
}
@ -4252,7 +4254,7 @@ int RNA_string_length(PointerRNA *ptr, const char *name)
return RNA_property_string_length(ptr, prop);
}
else {
printf("RNA_string_length: %s.%s not found.\n", ptr->type->identifier, name);
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
return 0;
}
}
@ -4264,7 +4266,7 @@ void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
if(prop)
RNA_property_string_set(ptr, prop, value);
else
printf("RNA_string_set: %s.%s not found.\n", ptr->type->identifier, name);
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
}
PointerRNA RNA_pointer_get(PointerRNA *ptr, const char *name)
@ -4275,7 +4277,7 @@ PointerRNA RNA_pointer_get(PointerRNA *ptr, const char *name)
return RNA_property_pointer_get(ptr, prop);
}
else {
printf("RNA_pointer_get: %s.%s not found.\n", ptr->type->identifier, name);
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
return PointerRNA_NULL;
}
@ -4289,7 +4291,7 @@ void RNA_pointer_set(PointerRNA *ptr, const char *name, PointerRNA ptr_value)
RNA_property_pointer_set(ptr, prop, ptr_value);
}
else {
printf("RNA_pointer_set: %s.%s not found.\n", ptr->type->identifier, name);
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
}
}
@ -4300,7 +4302,7 @@ void RNA_pointer_add(PointerRNA *ptr, const char *name)
if(prop)
RNA_property_pointer_add(ptr, prop);
else
printf("RNA_pointer_set: %s.%s not found.\n", ptr->type->identifier, name);
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
}
void RNA_collection_begin(PointerRNA *ptr, const char *name, CollectionPropertyIterator *iter)
@ -4310,7 +4312,7 @@ void RNA_collection_begin(PointerRNA *ptr, const char *name, CollectionPropertyI
if(prop)
RNA_property_collection_begin(ptr, prop, iter);
else
printf("RNA_collection_begin: %s.%s not found.\n", ptr->type->identifier, name);
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
}
void RNA_collection_add(PointerRNA *ptr, const char *name, PointerRNA *r_value)
@ -4320,7 +4322,7 @@ void RNA_collection_add(PointerRNA *ptr, const char *name, PointerRNA *r_value)
if(prop)
RNA_property_collection_add(ptr, prop, r_value);
else
printf("RNA_collection_add: %s.%s not found.\n", ptr->type->identifier, name);
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
}
void RNA_collection_clear(PointerRNA *ptr, const char *name)
@ -4330,7 +4332,7 @@ void RNA_collection_clear(PointerRNA *ptr, const char *name)
if(prop)
RNA_property_collection_clear(ptr, prop);
else
printf("RNA_collection_clear: %s.%s not found.\n", ptr->type->identifier, name);
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
}
int RNA_collection_length(PointerRNA *ptr, const char *name)
@ -4341,7 +4343,7 @@ int RNA_collection_length(PointerRNA *ptr, const char *name)
return RNA_property_collection_length(ptr, prop);
}
else {
printf("RNA_collection_length: %s.%s not found.\n", ptr->type->identifier, name);
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
return 0;
}
}
@ -4358,7 +4360,7 @@ int RNA_property_is_set(PointerRNA *ptr, const char *name)
}
else {
/* python raises an error */
/* printf("RNA_property_is_set: %s.%s not found.\n", ptr->type->identifier, name); */
/* printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name); */
return 0;
}
}

@ -272,7 +272,7 @@ static void rna_ksPath_RnaPath_set(PointerRNA *ptr, const char *value)
if (ksp->rna_path)
MEM_freeN(ksp->rna_path);
if (strlen(value))
if (value[0])
ksp->rna_path= BLI_strdup(value);
else
ksp->rna_path= NULL;

@ -134,7 +134,7 @@ StructDefRNA *rna_find_struct_def(StructRNA *srna)
if(!DefRNA.preprocess) {
/* we should never get here */
fprintf(stderr, "rna_find_struct_def: only at preprocess time.\n");
fprintf(stderr, "%s: only at preprocess time.\n", __func__);
return NULL;
}
@ -153,7 +153,7 @@ PropertyDefRNA *rna_find_struct_property_def(StructRNA *srna, PropertyRNA *prop)
if(!DefRNA.preprocess) {
/* we should never get here */
fprintf(stderr, "rna_find_struct_property_def: only at preprocess time.\n");
fprintf(stderr, "%s: only at preprocess time.\n", __func__);
return NULL;
}
@ -181,7 +181,7 @@ static PropertyDefRNA *rna_find_property_def(PropertyRNA *prop)
if(!DefRNA.preprocess) {
/* we should never get here */
fprintf(stderr, "rna_find_property_def: only at preprocess time.\n");
fprintf(stderr, "%s: only at preprocess time.\n", __func__);
return NULL;
}
@ -204,7 +204,7 @@ FunctionDefRNA *rna_find_function_def(FunctionRNA *func)
if(!DefRNA.preprocess) {
/* we should never get here */
fprintf(stderr, "rna_find_function_def: only at preprocess time.\n");
fprintf(stderr, "%s: only at preprocess time.\n", __func__);
return NULL;
}
@ -233,7 +233,7 @@ PropertyDefRNA *rna_find_parameter_def(PropertyRNA *parm)
if(!DefRNA.preprocess) {
/* we should never get here */
fprintf(stderr, "rna_find_parameter_def: only at preprocess time.\n");
fprintf(stderr, "%s: only at preprocess time.\n", __func__);
return NULL;
}
@ -267,7 +267,7 @@ static ContainerDefRNA *rna_find_container_def(ContainerRNA *cont)
if(!DefRNA.preprocess) {
/* we should never get here */
fprintf(stderr, "rna_find_container_def: only at preprocess time.\n");
fprintf(stderr, "%s: only at preprocess time.\n", __func__);
return NULL;
}
@ -513,7 +513,7 @@ void RNA_struct_free(BlenderRNA *brna, StructRNA *srna)
/*
if(srna->flag & STRUCT_RUNTIME) {
if(RNA_struct_py_type_get(srna)) {
fprintf(stderr, "RNA_struct_free '%s' freed while holding a python reference\n", srna->identifier);
fprintf(stderr, "%s '%s' freed while holding a python reference\n", __func__, srna->identifier);
}
} */
@ -617,7 +617,7 @@ StructRNA *RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *
char error[512];
if (rna_validate_identifier(identifier, error, 0) == 0) {
fprintf(stderr, "RNA_def_struct: struct identifier \"%s\" error - %s\n", identifier, error);
fprintf(stderr, "%s: struct identifier \"%s\" error - %s\n", __func__, identifier, error);
DefRNA.error= 1;
}
}
@ -629,7 +629,7 @@ StructRNA *RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *
break;
if(!srnafrom) {
fprintf(stderr, "RNA_def_struct: struct %s not found to define %s.\n", from, identifier);
fprintf(stderr, "%s: struct %s not found to define %s.\n", __func__, from, identifier);
DefRNA.error= 1;
}
}
@ -726,7 +726,7 @@ void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
StructDefRNA *ds;
if(!DefRNA.preprocess) {
fprintf(stderr, "RNA_def_struct_sdna: only during preprocessing.\n");
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
@ -734,7 +734,7 @@ void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
if(!DNA_struct_find_nr(DefRNA.sdna, structname)) {
if(!DefRNA.silent) {
fprintf(stderr, "RNA_def_struct_sdna: %s not found.\n", structname);
fprintf(stderr, "%s: %s not found.\n", __func__, structname);
DefRNA.error= 1;
}
return;
@ -748,20 +748,20 @@ void RNA_def_struct_sdna_from(StructRNA *srna, const char *structname, const cha
StructDefRNA *ds;
if(!DefRNA.preprocess) {
fprintf(stderr, "RNA_def_struct_sdna_from: only during preprocessing.\n");
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
ds= rna_find_def_struct(srna);
if(!ds->dnaname) {
fprintf(stderr, "RNA_def_struct_sdna_from: %s base struct must know DNA already.\n", structname);
fprintf(stderr, "%s: %s base struct must know DNA already.\n", __func__, structname);
return;
}
if(!DNA_struct_find_nr(DefRNA.sdna, structname)) {
if(!DefRNA.silent) {
fprintf(stderr, "RNA_def_struct_sdna_from: %s not found.\n", structname);
fprintf(stderr, "%s: %s not found.\n", __func__, structname);
DefRNA.error= 1;
}
return;
@ -774,7 +774,7 @@ void RNA_def_struct_sdna_from(StructRNA *srna, const char *structname, const cha
void RNA_def_struct_name_property(struct StructRNA *srna, struct PropertyRNA *prop)
{
if(prop->type != PROP_STRING) {
fprintf(stderr, "RNA_def_struct_name_property: \"%s.%s\", must be a string property.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", must be a string property.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
}
else
@ -791,7 +791,7 @@ void RNA_def_struct_nested(BlenderRNA *brna, StructRNA *srna, const char *struct
break;
if(!srnafrom) {
fprintf(stderr, "RNA_def_struct_nested: struct %s not found for %s.\n", structname, srna->identifier);
fprintf(stderr, "%s: struct %s not found for %s.\n", __func__, structname, srna->identifier);
DefRNA.error= 1;
}
@ -811,7 +811,7 @@ void RNA_def_struct_clear_flag(StructRNA *srna, int flag)
void RNA_def_struct_refine_func(StructRNA *srna, const char *refine)
{
if(!DefRNA.preprocess) {
fprintf(stderr, "RNA_def_struct_refine_func: only during preprocessing.\n");
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
@ -821,7 +821,7 @@ void RNA_def_struct_refine_func(StructRNA *srna, const char *refine)
void RNA_def_struct_idprops_func(StructRNA *srna, const char *idproperties)
{
if(!DefRNA.preprocess) {
fprintf(stderr, "RNA_def_struct_idprops_func: only during preprocessing.\n");
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
@ -831,7 +831,7 @@ void RNA_def_struct_idprops_func(StructRNA *srna, const char *idproperties)
void RNA_def_struct_register_funcs(StructRNA *srna, const char *reg, const char *unreg, const char *instance)
{
if(!DefRNA.preprocess) {
fprintf(stderr, "RNA_def_struct_register_funcs: only during preprocessing.\n");
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
@ -843,7 +843,7 @@ void RNA_def_struct_register_funcs(StructRNA *srna, const char *reg, const char
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
{
if(!DefRNA.preprocess) {
fprintf(stderr, "RNA_def_struct_path_func: only during preprocessing.\n");
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
@ -853,7 +853,7 @@ void RNA_def_struct_path_func(StructRNA *srna, const char *path)
void RNA_def_struct_identifier(StructRNA *srna, const char *identifier)
{
if(DefRNA.preprocess) {
fprintf(stderr, "RNA_def_struct_name_runtime: only at runtime.\n");
fprintf(stderr, "%s: only at runtime.\n", __func__);
return;
}
@ -887,7 +887,7 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier
char error[512];
if (rna_validate_identifier(identifier, error, 1) == 0) {
fprintf(stderr, "RNA_def_property: property identifier \"%s.%s\" - %s\n", CONTAINER_RNA_ID(cont), identifier, error);
fprintf(stderr, "%s: property identifier \"%s.%s\" - %s\n", __func__, CONTAINER_RNA_ID(cont), identifier, error);
DefRNA.error= 1;
}
@ -895,7 +895,7 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier
/* XXX - toto, detect supertype collisions */
if(rna_findlink(&dcont->properties, identifier)) {
fprintf(stderr, "RNA_def_property: duplicate identifier \"%s.%s\"\n", CONTAINER_RNA_ID(cont), identifier);
fprintf(stderr, "%s: duplicate identifier \"%s.%s\"\n", __func__, CONTAINER_RNA_ID(cont), identifier);
DefRNA.error= 1;
}
@ -953,7 +953,7 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier
case PROP_COLLECTION:
break;
default:
fprintf(stderr, "RNA_def_property: \"%s.%s\", invalid property type.\n", CONTAINER_RNA_ID(cont), identifier);
fprintf(stderr, "%s: \"%s.%s\", invalid property type.\n", __func__, CONTAINER_RNA_ID(cont), identifier);
DefRNA.error= 1;
return NULL;
}
@ -1054,19 +1054,19 @@ void RNA_def_property_array(PropertyRNA *prop, int length)
StructRNA *srna= DefRNA.laststruct;
if(length<0) {
fprintf(stderr, "RNA_def_property_array: \"%s.%s\", array length must be zero of greater.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", array length must be zero of greater.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
return;
}
if(length>RNA_MAX_ARRAY_LENGTH) {
fprintf(stderr, "RNA_def_property_array: \"%s.%s\", array length must be smaller than %d.\n", srna->identifier, prop->identifier, RNA_MAX_ARRAY_LENGTH);
fprintf(stderr, "%s: \"%s.%s\", array length must be smaller than %d.\n", __func__, srna->identifier, prop->identifier, RNA_MAX_ARRAY_LENGTH);
DefRNA.error= 1;
return;
}
if(prop->arraydimension > 1) {
fprintf(stderr, "RNA_def_property_array: \"%s.%s\", array dimensions has been set to %u but would be overwritten as 1.\n", srna->identifier, prop->identifier, prop->arraydimension);
fprintf(stderr, "%s: \"%s.%s\", array dimensions has been set to %u but would be overwritten as 1.\n", __func__, srna->identifier, prop->identifier, prop->arraydimension);
DefRNA.error= 1;
return;
}
@ -1080,7 +1080,7 @@ void RNA_def_property_array(PropertyRNA *prop, int length)
prop->arraydimension= 1;
break;
default:
fprintf(stderr, "RNA_def_property_array: \"%s.%s\", only boolean/int/float can be array.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", only boolean/int/float can be array.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
break;
}
@ -1092,7 +1092,7 @@ void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, const int le
int i;
if (dimension < 1 || dimension > RNA_MAX_ARRAY_DIMENSION) {
fprintf(stderr, "RNA_def_property_multi_array: \"%s.%s\", array dimension must be between 1 and %d.\n", srna->identifier, prop->identifier, RNA_MAX_ARRAY_DIMENSION);
fprintf(stderr, "%s: \"%s.%s\", array dimension must be between 1 and %d.\n", __func__, srna->identifier, prop->identifier, RNA_MAX_ARRAY_DIMENSION);
DefRNA.error= 1;
return;
}
@ -1103,7 +1103,7 @@ void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, const int le
case PROP_FLOAT:
break;
default:
fprintf(stderr, "RNA_def_property_multi_array: \"%s.%s\", only boolean/int/float can be array.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", only boolean/int/float can be array.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
break;
}
@ -1160,7 +1160,7 @@ void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double
break;
}
default:
fprintf(stderr, "RNA_def_property_ui_range: \"%s.%s\", invalid type for ui range.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", invalid type for ui range.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
break;
}
@ -1188,7 +1188,7 @@ void RNA_def_property_range(PropertyRNA *prop, double min, double max)
break;
}
default:
fprintf(stderr, "RNA_def_property_range: \"%s.%s\", invalid type for range.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", invalid type for range.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
break;
}
@ -1199,7 +1199,7 @@ void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
StructRNA *srna= DefRNA.laststruct;
if(!DefRNA.preprocess) {
fprintf(stderr, "RNA_def_property_struct_type \"%s.%s\": only during preprocessing.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s \"%s.%s\": only during preprocessing.\n", __func__, srna->identifier, prop->identifier);
return;
}
@ -1215,7 +1215,7 @@ void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
break;
}
default:
fprintf(stderr, "RNA_def_property_struct_type: \"%s.%s\", invalid type for struct type.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", invalid type for struct type.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
break;
}
@ -1226,7 +1226,7 @@ void RNA_def_property_struct_runtime(PropertyRNA *prop, StructRNA *type)
StructRNA *srna= DefRNA.laststruct;
if(DefRNA.preprocess) {
fprintf(stderr, "RNA_def_property_struct_runtime: only at runtime.\n");
fprintf(stderr, "%s: only at runtime.\n", __func__);
return;
}
@ -1246,7 +1246,7 @@ void RNA_def_property_struct_runtime(PropertyRNA *prop, StructRNA *type)
break;
}
default:
fprintf(stderr, "RNA_def_property_struct_runtime: \"%s.%s\", invalid type for struct type.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", invalid type for struct type.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
break;
}
@ -1281,7 +1281,7 @@ void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item
break;
}
default:
fprintf(stderr, "RNA_def_property_enum_items: \"%s.%s\", invalid type for struct type.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", invalid type for struct type.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
break;
}
@ -1298,7 +1298,7 @@ void RNA_def_property_string_maxlength(PropertyRNA *prop, int maxlength)
break;
}
default:
fprintf(stderr, "RNA_def_property_string_maxlength: \"%s.%s\", type is not string.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", type is not string.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
break;
}
@ -1315,7 +1315,7 @@ void RNA_def_property_boolean_default(PropertyRNA *prop, int value)
break;
}
default:
fprintf(stderr, "RNA_def_property_boolean_default: \"%s.%s\", type is not boolean.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", type is not boolean.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
break;
}
@ -1332,7 +1332,7 @@ void RNA_def_property_boolean_array_default(PropertyRNA *prop, const int *array)
break;
}
default:
fprintf(stderr, "RNA_def_property_boolean_default: \"%s.%s\", type is not boolean.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", type is not boolean.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
break;
}
@ -1349,7 +1349,7 @@ void RNA_def_property_int_default(PropertyRNA *prop, int value)
break;
}
default:
fprintf(stderr, "RNA_def_property_int_default: \"%s.%s\", type is not int.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", type is not int.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
break;
}
@ -1366,7 +1366,7 @@ void RNA_def_property_int_array_default(PropertyRNA *prop, const int *array)
break;
}
default:
fprintf(stderr, "RNA_def_property_int_default: \"%s.%s\", type is not int.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", type is not int.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
break;
}
@ -1383,7 +1383,7 @@ void RNA_def_property_float_default(PropertyRNA *prop, float value)
break;
}
default:
fprintf(stderr, "RNA_def_property_float_default: \"%s.%s\", type is not float.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", type is not float.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
break;
}
@ -1400,7 +1400,7 @@ void RNA_def_property_float_array_default(PropertyRNA *prop, const float *array)
break;
}
default:
fprintf(stderr, "RNA_def_property_float_default: \"%s.%s\", type is not float.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", type is not float.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
break;
}
@ -1417,7 +1417,7 @@ void RNA_def_property_string_default(PropertyRNA *prop, const char *value)
break;
}
default:
fprintf(stderr, "RNA_def_property_string_default: \"%s.%s\", type is not string.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", type is not string.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
break;
}
@ -1443,7 +1443,7 @@ void RNA_def_property_enum_default(PropertyRNA *prop, int value)
}
if(eprop->defaultvalue & ~totflag) {
fprintf(stderr, "RNA_def_property_enum_default: \"%s.%s\", default includes unused bits (%d).\n", srna->identifier, prop->identifier, eprop->defaultvalue & ~totflag);
fprintf(stderr, "%s: \"%s.%s\", default includes unused bits (%d).\n", __func__, srna->identifier, prop->identifier, eprop->defaultvalue & ~totflag);
DefRNA.error= 1;
}
}
@ -1458,7 +1458,7 @@ void RNA_def_property_enum_default(PropertyRNA *prop, int value)
eprop->defaultvalue= eprop->item[0].value;
}
else {
fprintf(stderr, "RNA_def_property_enum_default: \"%s.%s\", default is not in items.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", default is not in items.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
}
}
@ -1467,7 +1467,7 @@ void RNA_def_property_enum_default(PropertyRNA *prop, int value)
break;
}
default:
fprintf(stderr, "RNA_def_property_enum_default: \"%s.%s\", type is not enum.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", type is not enum.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
break;
}
@ -1506,7 +1506,7 @@ static PropertyDefRNA *rna_def_property_sdna(PropertyRNA *prop, const char *stru
return dp;
}
else {
fprintf(stderr, "rna_def_property_sdna: \"%s.%s\" not found.\n", structname, propname);
fprintf(stderr, "%s: \"%s.%s\" not found.\n", __func__, structname, propname);
DefRNA.error= 1;
return NULL;
}
@ -1539,12 +1539,12 @@ void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, co
StructRNA *srna= DefRNA.laststruct;
if(!DefRNA.preprocess) {
fprintf(stderr, "RNA_def_property_*_sdna: only during preprocessing.\n");
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
if(prop->type != PROP_BOOLEAN) {
fprintf(stderr, "RNA_def_property_boolean_sdna: \"%s.%s\", type is not boolean.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", type is not boolean.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
return;
}
@ -1554,7 +1554,7 @@ void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, co
if(DefRNA.silent == 0) {
/* error check to ensure floats are not wrapped as ints/bools */
if(dp->dnatype && *dp->dnatype && IS_DNATYPE_INT_COMPAT(dp->dnatype) == 0) {
fprintf(stderr, "RNA_def_property_boolean_sdna: %s.%s is a '%s' but wrapped as type '%s'.\n", srna->identifier, prop->identifier, dp->dnatype, RNA_property_typename(prop->type));
fprintf(stderr, "%s: %s.%s is a '%s' but wrapped as type '%s'.\n", __func__, srna->identifier, prop->identifier, dp->dnatype, RNA_property_typename(prop->type));
DefRNA.error= 1;
return;
}
@ -1583,12 +1583,12 @@ void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const
StructRNA *srna= DefRNA.laststruct;
if(!DefRNA.preprocess) {
fprintf(stderr, "RNA_def_property_*_sdna: only during preprocessing.\n");
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
if(prop->type != PROP_INT) {
fprintf(stderr, "RNA_def_property_int_sdna: \"%s.%s\", type is not int.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", type is not int.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
return;
}
@ -1598,7 +1598,7 @@ void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const
/* error check to ensure floats are not wrapped as ints/bools */
if(DefRNA.silent == 0) {
if(dp->dnatype && *dp->dnatype && IS_DNATYPE_INT_COMPAT(dp->dnatype) == 0) {
fprintf(stderr, "RNA_def_property_int_sdna: %s.%s is a '%s' but wrapped as type '%s'.\n", srna->identifier, prop->identifier, dp->dnatype, RNA_property_typename(prop->type));
fprintf(stderr, "%s: %s.%s is a '%s' but wrapped as type '%s'.\n", __func__, srna->identifier, prop->identifier, dp->dnatype, RNA_property_typename(prop->type));
DefRNA.error= 1;
return;
}
@ -1632,12 +1632,12 @@ void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, cons
StructRNA *srna= DefRNA.laststruct;
if(!DefRNA.preprocess) {
fprintf(stderr, "RNA_def_property_*_sdna: only during preprocessing.\n");
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
if(prop->type != PROP_FLOAT) {
fprintf(stderr, "RNA_def_property_float_sdna: \"%s.%s\", type is not float.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", type is not float.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
return;
}
@ -1647,7 +1647,7 @@ void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, cons
if(DefRNA.silent == 0) {
if(dp->dnatype && *dp->dnatype && IS_DNATYPE_FLOAT_COMPAT(dp->dnatype) == 0) {
if(prop->subtype != PROP_COLOR_GAMMA) { /* colors are an exception. these get translated */
fprintf(stderr, "RNA_def_property_float_sdna: %s.%s is a '%s' but wrapped as type '%s'.\n", srna->identifier, prop->identifier, dp->dnatype, RNA_property_typename(prop->type));
fprintf(stderr, "%s: %s.%s is a '%s' but wrapped as type '%s'.\n", __func__, srna->identifier, prop->identifier, dp->dnatype, RNA_property_typename(prop->type));
DefRNA.error= 1;
return;
}
@ -1664,12 +1664,12 @@ void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const
StructRNA *srna= DefRNA.laststruct;
if(!DefRNA.preprocess) {
fprintf(stderr, "RNA_def_property_*_sdna: only during preprocessing.\n");
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
if(prop->type != PROP_ENUM) {
fprintf(stderr, "RNA_def_property_enum_sdna: \"%s.%s\", type is not enum.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", type is not enum.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
return;
}
@ -1680,7 +1680,7 @@ void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const
prop->totarraylength= 0;
if(!DefRNA.silent) {
fprintf(stderr, "RNA_def_property_enum_sdna: \"%s.%s\", array not supported for enum type.\n", structname, propname);
fprintf(stderr, "%s: \"%s.%s\", array not supported for enum type.\n", __func__, structname, propname);
DefRNA.error= 1;
}
}
@ -1706,12 +1706,12 @@ void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, con
StructRNA *srna= DefRNA.laststruct;
if(!DefRNA.preprocess) {
fprintf(stderr, "RNA_def_property_*_sdna: only during preprocessing.\n");
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
if(prop->type != PROP_STRING) {
fprintf(stderr, "RNA_def_property_string_sdna: \"%s.%s\", type is not string.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", type is not string.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
return;
}
@ -1731,12 +1731,12 @@ void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, co
StructRNA *srna= DefRNA.laststruct;
if(!DefRNA.preprocess) {
fprintf(stderr, "RNA_def_property_*_sdna: only during preprocessing.\n");
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
if(prop->type != PROP_POINTER) {
fprintf(stderr, "RNA_def_property_pointer_sdna: \"%s.%s\", type is not pointer.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", type is not pointer.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
return;
}
@ -1747,7 +1747,7 @@ void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, co
prop->totarraylength= 0;
if(!DefRNA.silent) {
fprintf(stderr, "RNA_def_property_pointer_sdna: \"%s.%s\", array not supported for pointer type.\n", structname, propname);
fprintf(stderr, "%s: \"%s.%s\", array not supported for pointer type.\n", __func__, structname, propname);
DefRNA.error= 1;
}
}
@ -1761,12 +1761,12 @@ void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname,
StructRNA *srna= DefRNA.laststruct;
if(!DefRNA.preprocess) {
fprintf(stderr, "RNA_def_property_*_sdna: only during preprocessing.\n");
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
if(prop->type != PROP_COLLECTION) {
fprintf(stderr, "RNA_def_property_collection_sdna: \"%s.%s\", type is not collection.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", type is not collection.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
return;
}
@ -1777,7 +1777,7 @@ void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname,
prop->totarraylength= 0;
if(!DefRNA.silent) {
fprintf(stderr, "RNA_def_property_collection_sdna: \"%s.%s\", array of collections not supported.\n", structname, propname);
fprintf(stderr, "%s: \"%s.%s\", array of collections not supported.\n", __func__, structname, propname);
DefRNA.error= 1;
}
}
@ -1818,7 +1818,7 @@ void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname,
}
else {
if(!DefRNA.silent) {
fprintf(stderr, "RNA_def_property_collection_sdna: \"%s.%s\" not found.\n", structname, lengthpropname);
fprintf(stderr, "%s: \"%s.%s\" not found.\n", __func__, structname, lengthpropname);
DefRNA.error= 1;
}
}
@ -1830,7 +1830,7 @@ void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname,
void RNA_def_property_editable_func(PropertyRNA *prop, const char *editable)
{
if(!DefRNA.preprocess) {
fprintf(stderr, "RNA_def_property_editable_func: only during preprocessing.\n");
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
@ -1840,7 +1840,7 @@ void RNA_def_property_editable_func(PropertyRNA *prop, const char *editable)
void RNA_def_property_editable_array_func(PropertyRNA *prop, const char *editable)
{
if(!DefRNA.preprocess) {
fprintf(stderr, "RNA_def_property_editable_array_func: only during preprocessing.\n");
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
@ -1850,7 +1850,7 @@ void RNA_def_property_editable_array_func(PropertyRNA *prop, const char *editabl
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
{
if(!DefRNA.preprocess) {
fprintf(stderr, "RNA_def_property_update: only during preprocessing.\n");
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
@ -1866,12 +1866,12 @@ void RNA_def_property_update_runtime(PropertyRNA *prop, void *func)
void RNA_def_property_dynamic_array_funcs(PropertyRNA *prop, const char *getlength)
{
if(!DefRNA.preprocess) {
fprintf(stderr, "RNA_def_property_*_funcs: only during preprocessing.\n");
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
if (!(prop->flag & PROP_DYNAMIC)) {
fprintf(stderr, "RNA_def_property_dynamic_array_funcs: property is a not dynamic array.\n");
fprintf(stderr, "%s: property is a not dynamic array.\n", __func__);
DefRNA.error= 1;
return;
}
@ -1884,7 +1884,7 @@ void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const ch
StructRNA *srna= DefRNA.laststruct;
if(!DefRNA.preprocess) {
fprintf(stderr, "RNA_def_property_*_funcs: only during preprocessing.\n");
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
@ -1903,7 +1903,7 @@ void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const ch
break;
}
default:
fprintf(stderr, "RNA_def_property_boolean_funcs: \"%s.%s\", type is not boolean.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", type is not boolean.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
break;
}
@ -1914,7 +1914,7 @@ void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *
StructRNA *srna= DefRNA.laststruct;
if(!DefRNA.preprocess) {
fprintf(stderr, "RNA_def_property_*_funcs: only during preprocessing.\n");
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
@ -1934,7 +1934,7 @@ void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *
break;
}
default:
fprintf(stderr, "RNA_def_property_int_funcs: \"%s.%s\", type is not int.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", type is not int.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
break;
}
@ -1945,7 +1945,7 @@ void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char
StructRNA *srna= DefRNA.laststruct;
if(!DefRNA.preprocess) {
fprintf(stderr, "RNA_def_property_*_funcs: only during preprocessing.\n");
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
@ -1965,7 +1965,7 @@ void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char
break;
}
default:
fprintf(stderr, "RNA_def_property_float_funcs: \"%s.%s\", type is not float.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", type is not float.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
break;
}
@ -1976,7 +1976,7 @@ void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char
StructRNA *srna= DefRNA.laststruct;
if(!DefRNA.preprocess) {
fprintf(stderr, "RNA_def_property_*_funcs: only during preprocessing.\n");
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
@ -1990,7 +1990,7 @@ void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char
break;
}
default:
fprintf(stderr, "RNA_def_property_enum_funcs: \"%s.%s\", type is not enum.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", type is not enum.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
break;
}
@ -2001,7 +2001,7 @@ void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const cha
StructRNA *srna= DefRNA.laststruct;
if(!DefRNA.preprocess) {
fprintf(stderr, "RNA_def_property_*_funcs: only during preprocessing.\n");
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
@ -2015,7 +2015,7 @@ void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const cha
break;
}
default:
fprintf(stderr, "RNA_def_property_string_funcs: \"%s.%s\", type is not string.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", type is not string.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
break;
}
@ -2026,7 +2026,7 @@ void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const ch
StructRNA *srna= DefRNA.laststruct;
if(!DefRNA.preprocess) {
fprintf(stderr, "RNA_def_property_*_funcs: only during preprocessing.\n");
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
@ -2041,7 +2041,7 @@ void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const ch
break;
}
default:
fprintf(stderr, "RNA_def_property_pointer_funcs: \"%s.%s\", type is not pointer.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", type is not pointer.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
break;
}
@ -2052,7 +2052,7 @@ void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, con
StructRNA *srna= DefRNA.laststruct;
if(!DefRNA.preprocess) {
fprintf(stderr, "RNA_def_property_*_funcs: only during preprocessing.\n");
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
@ -2070,7 +2070,7 @@ void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, con
break;
}
default:
fprintf(stderr, "RNA_def_property_collection_funcs: \"%s.%s\", type is not collection.\n", srna->identifier, prop->identifier);
fprintf(stderr, "%s: \"%s.%s\", type is not collection.\n", __func__, srna->identifier, prop->identifier);
DefRNA.error= 1;
break;
}
@ -2280,7 +2280,7 @@ PropertyRNA *RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, co
PropertyRNA *prop;
if(!items) {
printf("RNA_def_enum: items not allowed to be NULL.\n");
printf("%s: items not allowed to be NULL.\n", __func__);
return NULL;
}
@ -2300,7 +2300,7 @@ PropertyRNA *RNA_def_enum_flag(StructOrFunctionRNA *cont_, const char *identifie
PropertyRNA *prop;
if(!items) {
printf("RNA_def_enum_flag: items not allowed to be NULL.\n");
printf("%s: items not allowed to be NULL.\n", __func__);
return NULL;
}
@ -2530,7 +2530,7 @@ static FunctionRNA *rna_def_function(StructRNA *srna, const char *identifier)
char error[512];
if (rna_validate_identifier(identifier, error, 0) == 0) {
fprintf(stderr, "RNA_def_function: function identifier \"%s\" - %s\n", identifier, error);
fprintf(stderr, "%s: function identifier \"%s\" - %s\n", __func__, identifier, error);
DefRNA.error= 1;
}
}
@ -2561,7 +2561,7 @@ FunctionRNA *RNA_def_function(StructRNA *srna, const char *identifier, const cha
func= rna_def_function(srna, identifier);
if(!DefRNA.preprocess) {
fprintf(stderr, "RNA_def_function: only at preprocess time.\n");
fprintf(stderr, "%s: only at preprocess time.\n", __func__);
return func;
}
@ -2578,7 +2578,7 @@ FunctionRNA *RNA_def_function_runtime(StructRNA *srna, const char *identifier, C
func= rna_def_function(srna, identifier);
if(DefRNA.preprocess) {
fprintf(stderr, "RNA_def_function_call_runtime: only at runtime.\n");
fprintf(stderr, "%s: only at runtime.\n", __func__);
return func;
}
@ -2592,11 +2592,11 @@ FunctionRNA *RNA_def_function_runtime(StructRNA *srna, const char *identifier, C
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
{
if (ret->flag & PROP_DYNAMIC) {
fprintf(stderr, "RNA_def_function_return: \"%s.%s\", dynamic values are not allowed as strict returns, use RNA_def_function_output instead.\n", func->identifier, ret->identifier);
fprintf(stderr, "%s: \"%s.%s\", dynamic values are not allowed as strict returns, use RNA_def_function_output instead.\n", __func__, func->identifier, ret->identifier);
return;
}
else if (ret->arraydimension) {
fprintf(stderr, "RNA_def_function_return: \"%s.%s\", arrays are not allowed as strict returns, use RNA_def_function_output instead.\n", func->identifier, ret->identifier);
fprintf(stderr, "%s: \"%s.%s\", arrays are not allowed as strict returns, use RNA_def_function_output instead.\n", __func__, func->identifier, ret->identifier);
return;
}

@ -236,7 +236,7 @@ static void rna_DriverTarget_RnaPath_set(PointerRNA *ptr, const char *value)
if (dtar->rna_path)
MEM_freeN(dtar->rna_path);
if (strlen(value))
if (value[0])
dtar->rna_path= BLI_strdup(value);
else
dtar->rna_path= NULL;
@ -329,7 +329,7 @@ static void rna_FCurve_RnaPath_set(PointerRNA *ptr, const char *value)
if (fcu->rna_path)
MEM_freeN(fcu->rna_path);
if (strlen(value)) {
if (value[0]) {
fcu->rna_path= BLI_strdup(value);
fcu->flag &= ~FCURVE_DISABLED;
}

@ -463,10 +463,8 @@ static void rna_Sequence_filepath_set(PointerRNA *ptr, const char *value)
static void rna_Sequence_filepath_get(PointerRNA *ptr, char *value)
{
Sequence *seq= (Sequence*)(ptr->data);
char path[FILE_MAX];
BLI_join_dirfile(path, sizeof(path), seq->strip->dir, seq->strip->stripdata->name);
BLI_strncpy(value, path, strlen(path)+1);
BLI_join_dirfile(value, FILE_MAX, seq->strip->dir, seq->strip->stripdata->name);
}
static int rna_Sequence_filepath_length(PointerRNA *ptr)
@ -475,7 +473,7 @@ static int rna_Sequence_filepath_length(PointerRNA *ptr)
char path[FILE_MAX];
BLI_join_dirfile(path, sizeof(path), seq->strip->dir, seq->strip->stripdata->name);
return strlen(path)+1;
return strlen(path);
}
static void rna_Sequence_proxy_filepath_set(PointerRNA *ptr, const char *value)
@ -491,10 +489,8 @@ static void rna_Sequence_proxy_filepath_set(PointerRNA *ptr, const char *value)
static void rna_Sequence_proxy_filepath_get(PointerRNA *ptr, char *value)
{
StripProxy *proxy= (StripProxy*)(ptr->data);
char path[FILE_MAX];
BLI_join_dirfile(path, sizeof(path), proxy->dir, proxy->file);
BLI_strncpy(value, path, strlen(path)+1);
BLI_join_dirfile(value, FILE_MAX, proxy->dir, proxy->file);
}
static int rna_Sequence_proxy_filepath_length(PointerRNA *ptr)
@ -503,7 +499,7 @@ static int rna_Sequence_proxy_filepath_length(PointerRNA *ptr)
char path[FILE_MAX];
BLI_join_dirfile(path, sizeof(path), proxy->dir, proxy->file);
return strlen(path)+1;
return strlen(path);
}
static void rna_Sequence_volume_set(PointerRNA *ptr, float value)
@ -563,7 +559,8 @@ static void rna_Sequence_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *p
{
Editing *ed= seq_give_editing(scene, FALSE);
free_imbuf_seq(scene, &ed->seqbase, FALSE, TRUE);
if(ed)
free_imbuf_seq(scene, &ed->seqbase, FALSE, TRUE);
}
static void rna_Sequence_update_reopen_files(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)

@ -69,7 +69,7 @@ static void rna_Text_filename_set(PointerRNA *ptr, const char *value)
if(text->name)
MEM_freeN(text->name);
if(strlen(value))
if(value[0])
text->name= BLI_strdup(value);
else
text->name= NULL;

@ -543,7 +543,8 @@ static void remap_uvs_23(DerivedMesh *dm, DerivedMesh *split, int numlayer, int
}
}
static DerivedMesh * cutEdges(ExplodeModifierData *emd, DerivedMesh *dm){
static DerivedMesh * cutEdges(ExplodeModifierData *emd, DerivedMesh *dm)
{
DerivedMesh *splitdm;
MFace *mf=NULL,*df1=NULL;
MFace *mface=dm->getFaceArray(dm);

@ -225,7 +225,8 @@ void weightvg_do_mask(int num, const int *indices, float *org_w, const float *ne
}
/* Adds the given vertex to the specified vertex group, with given weight. */
static void defvert_add_to_group(MDeformVert *dv, int defgrp_idx, const float weight) {
static void defvert_add_to_group(MDeformVert *dv, int defgrp_idx, const float weight)
{
/* TODO, move into deform.c as a generic function. This assumes the vertex
* groups have already been checked, so this has to remain low level. */
MDeformWeight *newdw;
@ -244,7 +245,8 @@ static void defvert_add_to_group(MDeformVert *dv, int defgrp_idx, const float we
/* Removes the given vertex from the vertex group, specified either by its defgrp_idx,
* or directly by its MDeformWeight pointer, if dw is not NULL.
* WARNING: This function frees the given MDeformWeight, do not use it afterward! */
static void defvert_remove_from_group(MDeformVert *dv, int defgrp_idx, MDeformWeight *dw) {
static void defvert_remove_from_group(MDeformVert *dv, int defgrp_idx, MDeformWeight *dw)
{
/* TODO, move this into deform.c as a generic function. */
MDeformWeight *newdw;
int i;

@ -174,7 +174,8 @@ static void group_move_outputs(bNode *node, bNodeStack **out, bNodeStack *gstack
}
/* Free internal buffers */
static void group_free_internal(bNodeTreeExec *gexec) {
static void group_free_internal(bNodeTreeExec *gexec)
{
bNodeStack *ns;
int i;

@ -107,7 +107,8 @@ int PyC_AsArray(void *array, PyObject *value, const int length, const PyTypeObje
/* for debugging */
void PyC_ObSpit(const char *name, PyObject *var) {
void PyC_ObSpit(const char *name, PyObject *var)
{
fprintf(stderr, "<%s> : ", name);
if (var==NULL) {
fprintf(stderr, "<NIL>");
@ -126,7 +127,8 @@ void PyC_ObSpit(const char *name, PyObject *var) {
fprintf(stderr, "\n");
}
void PyC_LineSpit(void) {
void PyC_LineSpit(void)
{
const char *filename;
int lineno;

@ -267,6 +267,18 @@ static int bpy_prop_callback_assign(struct PropertyRNA *prop, PyObject *update_c
return 0;
}
/* utility function we need for parsing int's in an if statement */
static int py_long_as_int(PyObject *py_long, int *r_int)
{
if(PyLong_CheckExact(py_long)) {
*r_int= (int)PyLong_AS_LONG(py_long);
return 0;
}
else {
return -1;
}
}
/* this define runs at the start of each function and deals with
* returning a deferred property (to be registered later) */
#define BPY_PROPDEF_HEAD(_func) \
@ -914,6 +926,7 @@ static EnumPropertyItem *enum_items_from_py(PyObject *seq_fast, PyObject *def, i
for(i=0; i<seq_len; i++) {
EnumPropertyItem tmp= {0, "", 0, "", ""};
Py_ssize_t item_size;
Py_ssize_t id_str_size;
Py_ssize_t name_str_size;
Py_ssize_t desc_str_size;
@ -921,13 +934,17 @@ static EnumPropertyItem *enum_items_from_py(PyObject *seq_fast, PyObject *def, i
item= PySequence_Fast_GET_ITEM(seq_fast, i);
if( (PyTuple_CheckExact(item)) &&
(PyTuple_GET_SIZE(item) == 3) &&
(item_size= PyTuple_GET_SIZE(item)) &&
(item_size == 3 || item_size == 4) &&
(tmp.identifier= _PyUnicode_AsStringAndSize(PyTuple_GET_ITEM(item, 0), &id_str_size)) &&
(tmp.name= _PyUnicode_AsStringAndSize(PyTuple_GET_ITEM(item, 1), &name_str_size)) &&
(tmp.description= _PyUnicode_AsStringAndSize(PyTuple_GET_ITEM(item, 2), &desc_str_size))
(tmp.description= _PyUnicode_AsStringAndSize(PyTuple_GET_ITEM(item, 2), &desc_str_size)) &&
(item_size < 4 || py_long_as_int(PyTuple_GET_ITEM(item, 3), &tmp.value) != -1) /* TODO, number isnt ensured to be unique from the script author */
) {
if(is_enum_flag) {
tmp.value= 1<<i;
if(item_size < 4) {
tmp.value= 1<<i;
}
if(def && PySet_Contains(def, PyTuple_GET_ITEM(item, 0))) {
*defvalue |= tmp.value;
@ -935,7 +952,9 @@ static EnumPropertyItem *enum_items_from_py(PyObject *seq_fast, PyObject *def, i
}
}
else {
tmp.value= i;
if(item_size < 4) {
tmp.value= i;
}
if(def && def_used == 0 && strcmp(def_cmp, tmp.identifier)==0) {
*defvalue= tmp.value;
@ -950,7 +969,10 @@ static EnumPropertyItem *enum_items_from_py(PyObject *seq_fast, PyObject *def, i
}
else {
MEM_freeN(items);
PyErr_SetString(PyExc_TypeError, "EnumProperty(...): expected an tuple containing (identifier, name description)");
PyErr_SetString(PyExc_TypeError,
"EnumProperty(...): expected an tuple containing "
"(identifier, name description) and optionally a "
"unique number");
return NULL;
}
@ -973,7 +995,7 @@ static EnumPropertyItem *enum_items_from_py(PyObject *seq_fast, PyObject *def, i
PyErr_Format(PyExc_TypeError,
"EnumProperty(..., default=\'%s\'): not found in enum members",
def);
def_cmp);
return NULL;
}
}
@ -1081,8 +1103,9 @@ BPY_PROPDEF_DESC_DOC
" :arg options: Enumerator in ['HIDDEN', 'SKIP_SAVE', 'ANIMATABLE', 'ENUM_FLAG'].\n"
" :type options: set\n"
" :arg items: sequence of enum items formatted:\n"
" [(identifier, name, description), ...] where the identifier is used\n"
" [(identifier, name, description, number), ...] where the identifier is used\n"
" for python access and other values are used for the interface.\n"
" Note the item is optional.\n"
" For dynamic values a callback can be passed which returns a list in\n"
" the same format as the static list.\n"
" This function must take 2 arguments (self, context)\n"

@ -4140,8 +4140,8 @@ static PyObject *pyrna_struct_new(PyTypeObject *type, PyObject *args, PyObject *
/* only needed for subtyping, so a new class gets a valid BPy_StructRNA
* todo - also accept useful args */
static PyObject *pyrna_prop_new(PyTypeObject *type, PyObject *args, PyObject *UNUSED(kwds)) {
static PyObject *pyrna_prop_new(PyTypeObject *type, PyObject *args, PyObject *UNUSED(kwds))
{
BPy_PropertyRNA *base;
if (!PyArg_ParseTuple(args, "O!:bpy_prop.__new__", &pyrna_prop_Type, &base))

@ -317,8 +317,8 @@ are for */
#define BEGIN_CURSOR_BLOCK {
#define END_CURSOR_BLOCK }
void wm_init_cursor_data(void){
void wm_init_cursor_data(void)
{
/********************** NW_ARROW Cursor **************************/
BEGIN_CURSOR_BLOCK
static char nw_sbm[]={

@ -863,7 +863,8 @@ void WM_operator_properties_filesel(wmOperatorType *ot, int filter, short type,
RNA_def_boolean(ot->srna, "relative_path", (U.flag & USER_RELPATHS) ? 1:0, "Relative Path", "Select the file relative to the blend file");
}
void WM_operator_properties_select_all(wmOperatorType *ot) {
void WM_operator_properties_select_all(wmOperatorType *ot)
{
static EnumPropertyItem select_all_actions[] = {
{SEL_TOGGLE, "TOGGLE", 0, N_("Toggle"), "Toggle selection for all elements"},
{SEL_SELECT, "SELECT", 0, N_("Select"), "Select all elements"},

@ -728,24 +728,6 @@ elseif(APPLE)
CODE
"file(REMOVE_RECURSE ${PLAYER_TARGETDIR_VER})"
)
# handy install macro to exclude files, we use \$ escape for the "to"
# argument when calling so ${BUILD_TYPE} does not get expanded
macro(install_dir from to)
install(
DIRECTORY ${from}
DESTINATION ${to}
PATTERN ".svn" EXCLUDE
PATTERN "*.pyc" EXCLUDE
PATTERN "*.pyo" EXCLUDE
PATTERN "*.orig" EXCLUDE
PATTERN "*.rej" EXCLUDE
PATTERN "__pycache__" EXCLUDE
PATTERN "__MACOSX" EXCLUDE
PATTERN ".DS_Store" EXCLUDE
)
endmacro()
install(
FILES ${PLAYER_SOURCEDIR}/Contents/PkgInfo
@ -757,27 +739,6 @@ elseif(APPLE)
\${TARGETDIR}/blenderplayer.app/Contents/
)
install(
FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.bfont.ttf
DESTINATION ${PLAYER_TARGETDIR_VER}
)
# localization
if(WITH_INTERNATIONAL)
install(
FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.Blanguages
DESTINATION ${PLAYER_TARGETDIR_VER}/datafiles
)
install(
DIRECTORY
${CMAKE_SOURCE_DIR}/release/bin/.blender/fonts
${CMAKE_SOURCE_DIR}/release/bin/.blender/locale
DESTINATION ${PLAYER_TARGETDIR_VER}/datafiles
PATTERN ".svn" EXCLUDE
)
endif()
# python
if(WITH_PYTHON)
add_custom_command(