From 60063d538389d4ad2e4a268da2ba058baf768807 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 6 Dec 2010 00:52:30 +0000 Subject: [PATCH 001/236] - converted path cleaning on file load to use bPath Iterator functions - image & font and sequence paths were being cleaned but not multires, voxel & sound paths. - skip fixing file paths on undo. - simplify bpath alloc and free functions, also pass Main structure so as not to rely on G.main, (needed for file load). --- source/blender/blenkernel/intern/blender.c | 61 +++----- source/blender/blenlib/BLI_bpath.h | 14 +- source/blender/blenlib/intern/bpath.c | 156 ++++++++++--------- source/blender/blenloader/intern/writefile.c | 4 +- source/blender/editors/space_info/info_ops.c | 16 +- source/blender/python/intern/bpy.c | 6 +- 6 files changed, 128 insertions(+), 129 deletions(-) diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index 6911e7fd581..6ceb75f2f83 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -55,6 +55,7 @@ #include "DNA_sound_types.h" #include "BLI_blenlib.h" +#include "BLI_bpath.h" #include "BLI_dynstr.h" #include "BLI_path_util.h" @@ -154,49 +155,32 @@ static void clear_global(void) /* make sure path names are correct for OS */ static void clean_paths(Main *main) { - Image *image= main->image.first; - bSound *sound= main->sound.first; - Scene *scene= main->scene.first; - Editing *ed; - Sequence *seq; - Strip *strip; - - while(image) { - BLI_clean(image->name); - image= image->id.next; + struct BPathIterator *bpi; + char filepath_expanded[1024]; + Scene *scene; + + for(BLI_bpathIterator_init(&bpi, main, main->name); !BLI_bpathIterator_isDone(bpi); BLI_bpathIterator_step(bpi)) { + BLI_bpathIterator_getPath(bpi, filepath_expanded); + + BLI_clean(filepath_expanded); + + BLI_bpathIterator_setPath(bpi, filepath_expanded); } - - while(sound) { - BLI_clean(sound->name); - sound= sound->id.next; - } - - while(scene) { - ed= seq_give_editing(scene, 0); - if(ed) { - seq= ed->seqbasep->first; - while(seq) { - if(seq->plugin) { - BLI_clean(seq->plugin->name); - } - strip= seq->strip; - while(strip) { - BLI_clean(strip->dir); - strip= strip->next; - } - seq= seq->next; - } - } + + BLI_bpathIterator_free(bpi); + + for(scene= main->scene.first; scene; scene= scene->id.next) { BLI_clean(scene->r.backbuf); BLI_clean(scene->r.pic); - - scene= scene->id.next; } } /* context matching */ /* handle no-ui case */ +/* note, this is called on Undo so any slow conversion functions here + * should be avoided or check (mode!='u') */ + static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filename) { bScreen *curscreen= NULL; @@ -210,9 +194,12 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filename else mode= 0; recover= (G.fileflags & G_FILE_RECOVER); - - clean_paths(bfd->main); - + + /* Only make filepaths compatible when loading for real (not undo) */ + if(mode != 'u') { + clean_paths(bfd->main); + } + /* XXX here the complex windowmanager matching */ /* no load screens? */ diff --git a/source/blender/blenlib/BLI_bpath.h b/source/blender/blenlib/BLI_bpath.h index 34ccb0ca1f9..ff0050649ed 100644 --- a/source/blender/blenlib/BLI_bpath.h +++ b/source/blender/blenlib/BLI_bpath.h @@ -33,10 +33,10 @@ #define BLI_BPATH_H struct BPathIterator; +struct ReportList; +struct Main; - -void BLI_bpathIterator_init (struct BPathIterator *bpi, const char *base_path); -void BLI_bpathIterator_alloc (struct BPathIterator **bpi); +void BLI_bpathIterator_init (struct BPathIterator **bpi, struct Main *bmain, const char *basedir); void BLI_bpathIterator_free (struct BPathIterator *bpi); const char* BLI_bpathIterator_getLib (struct BPathIterator *bpi); const char* BLI_bpathIterator_getName (struct BPathIterator *bpi); @@ -52,9 +52,9 @@ void BLI_bpathIterator_setPath (struct BPathIterator *bpi, const char *path) /* high level funcs */ /* creates a text file with missing files if there are any */ -void checkMissingFiles(const char *basepath, ReportList *reports); -void makeFilesRelative(const char *basepath, ReportList *reports); -void makeFilesAbsolute(const char *basepath, ReportList *reports); -void findMissingFiles(const char *basepath, const char *str); +void checkMissingFiles(struct Main *bmain, struct ReportList *reports); +void makeFilesRelative(struct Main *bmain, const char *basedir, struct ReportList *reports); +void makeFilesAbsolute(struct Main *bmain, const char *basedir, struct ReportList *reports); +void findMissingFiles(struct Main *bmain, const char *str); #endif // BLI_BPATH_H diff --git a/source/blender/blenlib/intern/bpath.c b/source/blender/blenlib/intern/bpath.c index ab25f9f8982..f8421fa7e7a 100644 --- a/source/blender/blenlib/intern/bpath.c +++ b/source/blender/blenlib/intern/bpath.c @@ -57,8 +57,8 @@ #include "BKE_global.h" #include "BKE_image.h" /* so we can check the image's type */ -#include "BKE_main.h" /* so we can access G.main->*.first */ #include "BKE_sequencer.h" +#include "BKE_main.h" #include "BKE_utildefines.h" #include "BKE_report.h" @@ -87,7 +87,9 @@ typedef struct BPathIterator { void (*setpath_callback)(struct BPathIterator *, const char *); void (*getpath_callback)(struct BPathIterator *, char *); - const char* base_path; /* base path, the directry the blend file is in - normally G.main->name */ + const char* base_path; /* base path, the directry the blend file is in - normally bmain->name */ + + Main *bmain; /* only for seq data */ struct BPathIteratorSeqData seqdata; @@ -110,7 +112,12 @@ enum BPathTypes { BPATH_DONE }; -void BLI_bpathIterator_init( struct BPathIterator *bpi, const char *base_path ) { +void BLI_bpathIterator_init(struct BPathIterator **bpi_pt, Main *bmain, const char *basedir) { + BPathIterator *bpi; + + bpi= MEM_mallocN(sizeof(BPathIterator), "BLI_bpathIterator_init"); + *bpi_pt= bpi; + bpi->type= BPATH_IMAGE; bpi->data= NULL; @@ -123,7 +130,8 @@ void BLI_bpathIterator_init( struct BPathIterator *bpi, const char *base_path ) bpi->seqdata.seqar= NULL; bpi->seqdata.scene= NULL; - bpi->base_path= base_path ? base_path : G.main->name; + bpi->base_path= basedir; /* normally bmain->name */ + bpi->bmain= bmain; BLI_bpathIterator_step(bpi); } @@ -132,30 +140,32 @@ void BLI_bpathIterator_alloc(struct BPathIterator **bpi) { *bpi= MEM_mallocN(sizeof(BPathIterator), "BLI_bpathIterator_alloc"); } -void BLI_bpathIterator_free( struct BPathIterator *bpi ) { +void BLI_bpathIterator_free(struct BPathIterator *bpi) { if (bpi->seqdata.seqar) MEM_freeN((void *)bpi->seqdata.seqar); bpi->seqdata.seqar= NULL; bpi->seqdata.scene= NULL; + + MEM_freeN(bpi); } -void BLI_bpathIterator_getPath( struct BPathIterator *bpi, char *path) { +void BLI_bpathIterator_getPath(struct BPathIterator *bpi, char *path) { if (bpi->getpath_callback) { - bpi->getpath_callback( bpi, path ); + bpi->getpath_callback(bpi, path); } else { strcpy(path, bpi->_path); /* warning, we assume 'path' are long enough */ } } -void BLI_bpathIterator_setPath( struct BPathIterator *bpi, const char *path) { +void BLI_bpathIterator_setPath(struct BPathIterator *bpi, const char *path) { if (bpi->setpath_callback) { - bpi->setpath_callback( bpi, path ); + bpi->setpath_callback(bpi, path); } else { strcpy(bpi->_path, path); /* warning, we assume 'path' are long enough */ } } -void BLI_bpathIterator_getPathExpanded( struct BPathIterator *bpi, char *path_expanded) { +void BLI_bpathIterator_getPathExpanded(struct BPathIterator *bpi, char *path_expanded) { const char *libpath; BLI_bpathIterator_getPath(bpi, path_expanded); @@ -168,19 +178,19 @@ void BLI_bpathIterator_getPathExpanded( struct BPathIterator *bpi, char *path_ex } BLI_cleanup_file(NULL, path_expanded); } -const char* BLI_bpathIterator_getLib( struct BPathIterator *bpi) { +const char* BLI_bpathIterator_getLib(struct BPathIterator *bpi) { return bpi->_lib; } -const char* BLI_bpathIterator_getName( struct BPathIterator *bpi) { +const char* BLI_bpathIterator_getName(struct BPathIterator *bpi) { return bpi->_name; } -int BLI_bpathIterator_getType( struct BPathIterator *bpi) { +int BLI_bpathIterator_getType(struct BPathIterator *bpi) { return bpi->type; } -int BLI_bpathIterator_getPathMaxLen( struct BPathIterator *bpi) { +int BLI_bpathIterator_getPathMaxLen(struct BPathIterator *bpi) { return bpi->len; } -const char* BLI_bpathIterator_getBasePath( struct BPathIterator *bpi) { +const char* BLI_bpathIterator_getBasePath(struct BPathIterator *bpi) { return bpi->base_path; } @@ -276,7 +286,7 @@ static struct Sequence *seq_stepdata__internal(struct BPathIterator *bpi, int st /* Initializing */ if (bpi->seqdata.scene==NULL) { - bpi->seqdata.scene= G.main->scene.first; + bpi->seqdata.scene= bpi->bmain->scene.first; } if (step_next) { @@ -403,7 +413,7 @@ static struct Mesh *cdata_stepdata__internal(struct Mesh *me, int step_next) { return me; } -static void bpi_type_step__internal( struct BPathIterator *bpi) { +static void bpi_type_step__internal(struct BPathIterator *bpi) { bpi->type++; /* advance to the next type */ bpi->data= NULL; @@ -423,13 +433,13 @@ static void bpi_type_step__internal( struct BPathIterator *bpi) { } } -void BLI_bpathIterator_step( struct BPathIterator *bpi) { +void BLI_bpathIterator_step(struct BPathIterator *bpi) { while (bpi->type != BPATH_DONE) { if ((bpi->type) == BPATH_IMAGE) { /*if (bpi->data) bpi->data= ((ID *)bpi->data)->next;*/ if (bpi->data) bpi->data= ima_stepdata__internal( (Image *)bpi->data, 1 ); /* must skip images that have no path */ - else bpi->data= ima_stepdata__internal(G.main->image.first, 0); + else bpi->data= ima_stepdata__internal(bpi->bmain->image.first, 0); if (bpi->data) { /* get the path info from this datatype */ @@ -451,7 +461,7 @@ void BLI_bpathIterator_step( struct BPathIterator *bpi) { if ((bpi->type) == BPATH_TEXTURE) { /*if (bpi->data) bpi->data= ((ID *)bpi->data)->next;*/ if (bpi->data) bpi->data= tex_stepdata__internal( (Tex *)bpi->data, 1 ); /* must skip images that have no path */ - else bpi->data= tex_stepdata__internal(G.main->tex.first, 0); + else bpi->data= tex_stepdata__internal(bpi->bmain->tex.first, 0); if (bpi->data) { /* get the path info from this datatype */ @@ -478,7 +488,7 @@ void BLI_bpathIterator_step( struct BPathIterator *bpi) { if ((bpi->type) == BPATH_TEXT) { /*if (bpi->data) bpi->data= ((ID *)bpi->data)->next;*/ if (bpi->data) bpi->data= text_stepdata__internal( (Text *)bpi->data, 1 ); /* must skip images that have no path */ - else bpi->data= text_stepdata__internal(G.main->text.first, 0); + else bpi->data= text_stepdata__internal(bpi->bmain->text.first, 0); if (bpi->data) { /* get the path info from this datatype */ @@ -499,7 +509,7 @@ void BLI_bpathIterator_step( struct BPathIterator *bpi) { else if ((bpi->type) == BPATH_SOUND) { if (bpi->data) bpi->data= snd_stepdata__internal( (bSound *)bpi->data, 1 ); /* must skip images that have no path */ - else bpi->data= snd_stepdata__internal(G.main->sound.first, 0); + else bpi->data= snd_stepdata__internal(bpi->bmain->sound.first, 0); if (bpi->data) { /* get the path info from this datatype */ @@ -520,7 +530,7 @@ void BLI_bpathIterator_step( struct BPathIterator *bpi) { } else if ((bpi->type) == BPATH_FONT) { if (bpi->data) bpi->data= vf_stepdata__internal( (VFont *)bpi->data, 1 ); - else bpi->data= vf_stepdata__internal( G.main->vfont.first, 0 ); + else bpi->data= vf_stepdata__internal( bpi->bmain->vfont.first, 0 ); if (bpi->data) { /* get the path info from this datatype */ @@ -539,7 +549,7 @@ void BLI_bpathIterator_step( struct BPathIterator *bpi) { } else if ((bpi->type) == BPATH_LIB) { if (bpi->data) bpi->data= ((ID *)bpi->data)->next; - else bpi->data= G.main->library.first; + else bpi->data= bpi->bmain->library.first; if (bpi->data) { /* get the path info from this datatype */ @@ -569,7 +579,7 @@ void BLI_bpathIterator_step( struct BPathIterator *bpi) { } } else if ((bpi->type) == BPATH_CDATA) { if (bpi->data) bpi->data= cdata_stepdata__internal( bpi->data, 1 ); - else bpi->data= cdata_stepdata__internal( G.main->mesh.first, 0 ); + else bpi->data= cdata_stepdata__internal( bpi->bmain->mesh.first, 0 ); if (bpi->data) { Mesh *me= (Mesh *)bpi->data; @@ -640,38 +650,38 @@ static void bpath_as_report(struct BPathIterator *bpi, const char *message, Repo } /* high level function */ -void checkMissingFiles(const char *basepath, ReportList *reports) { - struct BPathIterator bpi; +void checkMissingFiles(Main *bmain, ReportList *reports) { + struct BPathIterator *bpi; /* be sure there is low chance of the path being too short */ char filepath_expanded[FILE_MAXDIR*2]; - BLI_bpathIterator_init(&bpi, basepath); - while (!BLI_bpathIterator_isDone(&bpi)) { - BLI_bpathIterator_getPathExpanded( &bpi, filepath_expanded ); + BLI_bpathIterator_init(&bpi, bmain, bmain->name); + while (!BLI_bpathIterator_isDone(bpi)) { + BLI_bpathIterator_getPathExpanded(bpi, filepath_expanded); if (!BLI_exists(filepath_expanded)) - bpath_as_report(&bpi, "file not found", reports); + bpath_as_report(bpi, "file not found", reports); - BLI_bpathIterator_step(&bpi); + BLI_bpathIterator_step(bpi); } - BLI_bpathIterator_free(&bpi); + BLI_bpathIterator_free(bpi); } /* dont log any errors at the moment, should probably do this */ -void makeFilesRelative(const char *basepath, ReportList *reports) { +void makeFilesRelative(Main *bmain, const char *basedir, ReportList *reports) { int tot= 0, changed= 0, failed= 0, linked= 0; - struct BPathIterator bpi; + struct BPathIterator *bpi; char filepath[FILE_MAX]; const char *libpath; /* be sure there is low chance of the path being too short */ char filepath_relative[(FILE_MAXDIR * 2) + FILE_MAXFILE]; - BLI_bpathIterator_init(&bpi, basepath); - while (!BLI_bpathIterator_isDone(&bpi)) { - BLI_bpathIterator_getPath(&bpi, filepath); - libpath= BLI_bpathIterator_getLib(&bpi); + BLI_bpathIterator_init(&bpi, bmain, basedir); + while (!BLI_bpathIterator_isDone(bpi)) { + BLI_bpathIterator_getPath(bpi, filepath); + libpath= BLI_bpathIterator_getLib(bpi); if(strncmp(filepath, "//", 2)) { if (libpath) { /* cant make relative if we are library - TODO, LOG THIS */ @@ -680,27 +690,27 @@ void makeFilesRelative(const char *basepath, ReportList *reports) { BLI_strncpy(filepath_relative, filepath, sizeof(filepath_relative)); /* Important BLI_cleanup_dir runs before the path is made relative * because it wont work for paths that start with "//../" */ - BLI_cleanup_file(bpi.base_path, filepath_relative); /* fix any /foo/../foo/ */ - BLI_path_rel(filepath_relative, bpi.base_path); + BLI_cleanup_file(bpi->base_path, filepath_relative); /* fix any /foo/../foo/ */ + BLI_path_rel(filepath_relative, bpi->base_path); /* be safe and check the length */ - if (BLI_bpathIterator_getPathMaxLen(&bpi) <= strlen(filepath_relative)) { - bpath_as_report(&bpi, "couldn't make path relative (too long)", reports); + if (BLI_bpathIterator_getPathMaxLen(bpi) <= strlen(filepath_relative)) { + bpath_as_report(bpi, "couldn't make path relative (too long)", reports); failed++; } else { if(strncmp(filepath_relative, "//", 2)==0) { - BLI_bpathIterator_setPath(&bpi, filepath_relative); + BLI_bpathIterator_setPath(bpi, filepath_relative); changed++; } else { - bpath_as_report(&bpi, "couldn't make path relative", reports); + bpath_as_report(bpi, "couldn't make path relative", reports); failed++; } } } } - BLI_bpathIterator_step(&bpi); + BLI_bpathIterator_step(bpi); tot++; } - BLI_bpathIterator_free(&bpi); + BLI_bpathIterator_free(bpi); if(reports) BKE_reportf(reports, failed ? RPT_ERROR : RPT_INFO, "Total files %i|Changed %i|Failed %i|Linked %i", tot, changed, failed, linked); @@ -708,47 +718,47 @@ void makeFilesRelative(const char *basepath, ReportList *reports) { /* dont log any errors at the moment, should probably do this - * Verry similar to makeFilesRelative - keep in sync! */ -void makeFilesAbsolute(const char *basepath, ReportList *reports) +void makeFilesAbsolute(Main *bmain, const char *basedir, ReportList *reports) { int tot= 0, changed= 0, failed= 0, linked= 0; - struct BPathIterator bpi; + struct BPathIterator *bpi; char filepath[FILE_MAX]; const char *libpath; /* be sure there is low chance of the path being too short */ char filepath_absolute[(FILE_MAXDIR * 2) + FILE_MAXFILE]; - BLI_bpathIterator_init(&bpi, basepath); - while (!BLI_bpathIterator_isDone(&bpi)) { - BLI_bpathIterator_getPath(&bpi, filepath); - libpath= BLI_bpathIterator_getLib(&bpi); + BLI_bpathIterator_init(&bpi, bmain, basedir); + while (!BLI_bpathIterator_isDone(bpi)) { + BLI_bpathIterator_getPath(bpi, filepath); + libpath= BLI_bpathIterator_getLib(bpi); if(strncmp(filepath, "//", 2)==0) { if (libpath) { /* cant make absolute if we are library - TODO, LOG THIS */ linked++; } else { /* get the expanded path and check it is relative or too long */ - BLI_bpathIterator_getPathExpanded( &bpi, filepath_absolute ); - BLI_cleanup_file(bpi.base_path, filepath_absolute); /* fix any /foo/../foo/ */ + BLI_bpathIterator_getPathExpanded(bpi, filepath_absolute); + BLI_cleanup_file(bpi->base_path, filepath_absolute); /* fix any /foo/../foo/ */ /* to be safe, check the length */ - if (BLI_bpathIterator_getPathMaxLen(&bpi) <= strlen(filepath_absolute)) { - bpath_as_report(&bpi, "couldn't make absolute (too long)", reports); + if (BLI_bpathIterator_getPathMaxLen(bpi) <= strlen(filepath_absolute)) { + bpath_as_report(bpi, "couldn't make absolute (too long)", reports); failed++; } else { if(strncmp(filepath_absolute, "//", 2)) { - BLI_bpathIterator_setPath(&bpi, filepath_absolute); + BLI_bpathIterator_setPath(bpi, filepath_absolute); changed++; } else { - bpath_as_report(&bpi, "couldn't make absolute", reports); + bpath_as_report(bpi, "couldn't make absolute", reports); failed++; } } } } - BLI_bpathIterator_step(&bpi); + BLI_bpathIterator_step(bpi); tot++; } - BLI_bpathIterator_free(&bpi); + BLI_bpathIterator_free(bpi); if(reports) BKE_reportf(reports, failed ? RPT_ERROR : RPT_INFO, "Total files %i|Changed %i|Failed %i|Linked %i", tot, changed, failed, linked); @@ -810,8 +820,8 @@ static int findFileRecursive(char *filename_new, const char *dirname, const char } /* high level function - call from fileselector */ -void findMissingFiles(const char *basepath, const char *str) { - struct BPathIterator bpi; +void findMissingFiles(Main *bmain, const char *str) { + struct BPathIterator *bpi; /* be sure there is low chance of the path being too short */ char filepath_expanded[FILE_MAXDIR*2]; @@ -825,11 +835,11 @@ void findMissingFiles(const char *basepath, const char *str) { BLI_split_dirfile(str, dirname, NULL); - BLI_bpathIterator_init(&bpi, basepath); + BLI_bpathIterator_init(&bpi, bmain, bmain->name); - while (!BLI_bpathIterator_isDone(&bpi)) { - BLI_bpathIterator_getPath(&bpi, filepath); - libpath= BLI_bpathIterator_getLib(&bpi); + while (!BLI_bpathIterator_isDone(bpi)) { + BLI_bpathIterator_getPath(bpi, filepath); + libpath= BLI_bpathIterator_getLib(bpi); /* Check if esc was pressed because searching files can be slow */ /*XXX if (blender_test_break()) { @@ -838,7 +848,7 @@ void findMissingFiles(const char *basepath, const char *str) { if (libpath==NULL) { - BLI_bpathIterator_getPathExpanded( &bpi, filepath_expanded ); + BLI_bpathIterator_getPathExpanded(bpi, filepath_expanded); if (!BLI_exists(filepath_expanded)) { /* can the dir be opened? */ @@ -853,21 +863,21 @@ void findMissingFiles(const char *basepath, const char *str) { if (filesize > 0) { - if (BLI_bpathIterator_getPathMaxLen( &bpi ) < strlen(filename_new)) { + if (BLI_bpathIterator_getPathMaxLen(bpi) < strlen(filename_new)) { printf("cannot set path \"%s\" too long!", filename_new); } else { /* copy the found path into the old one */ if (G.relbase_valid) - BLI_path_rel(filename_new, bpi.base_path); + BLI_path_rel(filename_new, bpi->base_path); - BLI_bpathIterator_setPath( &bpi, filename_new ); + BLI_bpathIterator_setPath(bpi, filename_new); } } } } - BLI_bpathIterator_step(&bpi); + BLI_bpathIterator_step(bpi); } - BLI_bpathIterator_free(&bpi); + BLI_bpathIterator_free(bpi); //XXX waitcursor( 0 ); } diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index fd549adbdfc..9d990d3ea30 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -2471,14 +2471,14 @@ int BLO_write_file(Main *mainvar, char *dir, int write_flags, ReportList *report if(strcmp(dir1, dir2)==0) write_flags &= ~G_FILE_RELATIVE_REMAP; else - makeFilesAbsolute(G.main->name, NULL); + makeFilesAbsolute(mainvar, G.main->name, NULL); } BLI_make_file_string(G.main->name, userfilename, BLI_get_folder_create(BLENDER_USER_CONFIG, NULL), BLENDER_STARTUP_FILE); write_user_block= BLI_streq(dir, userfilename); if(write_flags & G_FILE_RELATIVE_REMAP) - makeFilesRelative(dir, NULL); /* note, making relative to something OTHER then G.main->name */ + makeFilesRelative(mainvar, dir, NULL); /* note, making relative to something OTHER then G.main->name */ /* actual file writing */ err= write_file_handle(mainvar, file, NULL,NULL, write_user_block, write_flags, thumb); diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c index c45e4d3acf0..a5e47e7bb1d 100644 --- a/source/blender/editors/space_info/info_ops.c +++ b/source/blender/editors/space_info/info_ops.c @@ -184,14 +184,16 @@ void FILE_OT_unpack_all(wmOperatorType *ot) /********************* make paths relative operator *********************/ -static int make_paths_relative_exec(bContext *UNUSED(C), wmOperator *op) +static int make_paths_relative_exec(bContext *C, wmOperator *op) { + Main *bmain= CTX_data_main(C); + if(!G.relbase_valid) { BKE_report(op->reports, RPT_WARNING, "Can't set relative paths with an unsaved blend file."); return OPERATOR_CANCELLED; } - makeFilesRelative(G.main->name, op->reports); + makeFilesRelative(bmain, bmain->name, op->reports); /* redraw everything so any changed paths register */ WM_main_add_notifier(NC_WINDOW, NULL); @@ -214,14 +216,16 @@ void FILE_OT_make_paths_relative(wmOperatorType *ot) /********************* make paths absolute operator *********************/ -static int make_paths_absolute_exec(bContext *UNUSED(C), wmOperator *op) +static int make_paths_absolute_exec(bContext *C, wmOperator *op) { + Main *bmain= CTX_data_main(C); + if(!G.relbase_valid) { BKE_report(op->reports, RPT_WARNING, "Can't set absolute paths with an unsaved blend file."); return OPERATOR_CANCELLED; } - makeFilesAbsolute(G.main->name, op->reports); + makeFilesAbsolute(bmain, bmain->name, op->reports); /* redraw everything so any changed paths register */ WM_main_add_notifier(NC_WINDOW, NULL); @@ -251,7 +255,7 @@ static int report_missing_files_exec(bContext *UNUSED(C), wmOperator *op) txtname[0] = '\0'; /* run the missing file check */ - checkMissingFiles(G.main->name, op->reports); + checkMissingFiles(G.main, op->reports); return OPERATOR_FINISHED; } @@ -276,7 +280,7 @@ static int find_missing_files_exec(bContext *UNUSED(C), wmOperator *op) char *path; path= RNA_string_get_alloc(op->ptr, "filepath", NULL, 0); - findMissingFiles(G.main->name, path); + findMissingFiles(G.main, path); MEM_freeN(path); return OPERATOR_FINISHED; diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c index 2c4ccaa1509..770640f577d 100644 --- a/source/blender/python/intern/bpy.c +++ b/source/blender/python/intern/bpy.c @@ -37,6 +37,7 @@ #include "BLI_bpath.h" #include "BKE_utildefines.h" +#include "BKE_global.h" /* XXX, G.main only */ #include "MEM_guardedalloc.h" @@ -92,11 +93,9 @@ static PyObject *bpy_blend_paths(PyObject *UNUSED(self), PyObject *args, PyObjec if (!PyArg_ParseTupleAndKeywords(args, kw, "|i:blend_paths", (char **)kwlist, &absolute)) return NULL; - BLI_bpathIterator_alloc(&bpi); - list= PyList_New(0); - for(BLI_bpathIterator_init(bpi, NULL); !BLI_bpathIterator_isDone(bpi); BLI_bpathIterator_step(bpi)) { + for(BLI_bpathIterator_init(&bpi, G.main, NULL); !BLI_bpathIterator_isDone(bpi); BLI_bpathIterator_step(bpi)) { /* build the list */ if (absolute) { BLI_bpathIterator_getPathExpanded(bpi, filepath_expanded); @@ -117,7 +116,6 @@ static PyObject *bpy_blend_paths(PyObject *UNUSED(self), PyObject *args, PyObjec } BLI_bpathIterator_free(bpi); - MEM_freeN((void *)bpi); return list; } From a724918cf3997cbd1fc33c663d1a76441c2deeb0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 6 Dec 2010 02:32:16 +0000 Subject: [PATCH 002/236] bugfix [#22663] object material slots not updated for library data --- source/blender/blenkernel/BKE_material.h | 1 + source/blender/blenkernel/intern/material.c | 86 +++++++++------------ source/blender/blenloader/intern/readfile.c | 14 +++- 3 files changed, 50 insertions(+), 51 deletions(-) diff --git a/source/blender/blenkernel/BKE_material.h b/source/blender/blenkernel/BKE_material.h index 5687fcb4c01..53bb95cb8be 100644 --- a/source/blender/blenkernel/BKE_material.h +++ b/source/blender/blenkernel/BKE_material.h @@ -45,6 +45,7 @@ struct Object; void init_def_material(void); void free_material(struct Material *sc); void test_object_materials(struct ID *id); +void resize_object_material(struct Object *ob, const short totcol); void init_material(struct Material *ma); struct Material *add_material(const char *name); struct Material *copy_material(struct Material *ma); diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index ac61acac56a..90017ba3d5b 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -590,67 +590,53 @@ Material *give_node_material(Material *ma) /* from misc_util: flip the bytes from x */ /* #define GS(x) (((unsigned char *)(x))[0] << 8 | ((unsigned char *)(x))[1]) */ +void resize_object_material(Object *ob, const short totcol) +{ + Material **newmatar; + char *newmatbits; + + if(totcol==0) { + if(ob->totcol) { + MEM_freeN(ob->mat); + MEM_freeN(ob->matbits); + ob->mat= NULL; + ob->matbits= NULL; + } + } + else if(ob->totcoltotcol) { + memcpy(newmatar, ob->mat, sizeof(void *)*ob->totcol); + memcpy(newmatbits, ob->matbits, sizeof(char)*ob->totcol); + MEM_freeN(ob->mat); + MEM_freeN(ob->matbits); + } + ob->mat= newmatar; + ob->matbits= newmatbits; + } + ob->totcol= totcol; + if(ob->totcol && ob->actcol==0) ob->actcol= 1; + if(ob->actcol>ob->totcol) ob->actcol= ob->totcol; +} + void test_object_materials(ID *id) { /* make the ob mat-array same size as 'ob->data' mat-array */ Object *ob; - Mesh *me; - Curve *cu; - MetaBall *mb; - Material **newmatar; - char *newmatbits; - int totcol=0; + short *totcol; - if(id==0) return; + if(id || (totcol=give_totcolp_id(id))==NULL) { + return; + } - if( GS(id->name)==ID_ME ) { - me= (Mesh *)id; - totcol= me->totcol; - } - else if( GS(id->name)==ID_CU ) { - cu= (Curve *)id; - totcol= cu->totcol; - } - else if( GS(id->name)==ID_MB ) { - mb= (MetaBall *)id; - totcol= mb->totcol; - } - else return; - - ob= G.main->object.first; - while(ob) { - + for(ob= G.main->object.first; ob; ob= ob->id.next) { if(ob->data==id) { - - if(totcol==0) { - if(ob->totcol) { - MEM_freeN(ob->mat); - MEM_freeN(ob->matbits); - ob->mat= NULL; - ob->matbits= NULL; - } - } - else if(ob->totcoltotcol) { - memcpy(newmatar, ob->mat, sizeof(void *)*ob->totcol); - memcpy(newmatbits, ob->matbits, sizeof(char)*ob->totcol); - MEM_freeN(ob->mat); - MEM_freeN(ob->matbits); - } - ob->mat= newmatar; - ob->matbits= newmatbits; - } - ob->totcol= totcol; - if(ob->totcol && ob->actcol==0) ob->actcol= 1; - if(ob->actcol>ob->totcol) ob->actcol= ob->totcol; + resize_object_material(ob, *totcol); } - ob= ob->id.next; } } - void assign_material(Object *ob, Material *ma, int act) { Material *mao, **matar, ***matarar; diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 20ef7f04daf..1fcbb95156b 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -106,6 +106,7 @@ #include "BKE_lattice.h" #include "BKE_library.h" // for which_libbase #include "BKE_idcode.h" +#include "BKE_material.h" #include "BKE_main.h" // for Main #include "BKE_mesh.h" // for ME_ defines (patching) #include "BKE_modifier.h" @@ -3507,7 +3508,7 @@ static void lib_link_object(FileData *fd, Main *main) poin= ob->data; ob->data= newlibadr_us(fd, ob->id.lib, ob->data); - + if(ob->data==NULL && poin!=NULL) { if(ob->id.lib) printf("Can't find obdata of %s lib %s\n", ob->id.name+2, ob->id.lib->name); @@ -3525,6 +3526,17 @@ static void lib_link_object(FileData *fd, Main *main) } for(a=0; atotcol; a++) ob->mat[a]= newlibadr_us(fd, ob->id.lib, ob->mat[a]); + /* When the object is local and the data is library its possible + * the material list size gets out of sync. [#22663] */ + if(ob->data && ob->id.lib != ((ID *)ob->data)->lib) { + short *totcol_data= give_totcolp(ob); + /* Only expand so as not to loose any object materials that might be set. */ + if(totcol_data && *totcol_data > ob->totcol) { + /* printf("'%s' %d -> %d\n", ob->id.name, ob->totcol, *totcol_data); */ + resize_object_material(ob, *totcol_data); + } + } + ob->gpd= newlibadr_us(fd, ob->id.lib, ob->gpd); ob->duplilist= NULL; From a1fed1e268aa3bd6ad32acf751022e5f12db0233 Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Mon, 6 Dec 2010 02:42:59 +0000 Subject: [PATCH 003/236] [#25047] Deletion of any custom key map item remove always first one keymap item id for user defined keymaps wasn't defined properly. This is really old, I'm surprised with didn't catch this before. --- release/scripts/ui/space_userpref_keymap.py | 16 +++++++++--- .../makesdna/DNA_windowmanager_types.h | 2 +- source/blender/makesrna/intern/rna_wm.c | 11 ++++++++ .../blender/windowmanager/intern/wm_keymap.c | 25 ++++++++++--------- 4 files changed, 38 insertions(+), 16 deletions(-) diff --git a/release/scripts/ui/space_userpref_keymap.py b/release/scripts/ui/space_userpref_keymap.py index 70fb2c57e9b..4569020efd9 100644 --- a/release/scripts/ui/space_userpref_keymap.py +++ b/release/scripts/ui/space_userpref_keymap.py @@ -279,7 +279,7 @@ class InputKeyMapPanel(bpy.types.Panel): else: row.label() - if kmi.id: + if not kmi.is_user_defined: op = row.operator("wm.keyitem_restore", text="", icon='BACK') op.item_id = kmi.id op = row.operator("wm.keyitem_remove", text="", icon='X') @@ -708,12 +708,18 @@ class WM_OT_keyitem_restore(bpy.types.Operator): item_id = IntProperty(name="Item Identifier", description="Identifier of the item to remove") + @classmethod + def poll(cls, context): + km = context.keymap + return km.is_user_defined + def execute(self, context): wm = context.window_manager km = context.keymap kmi = km.items.from_id(self.item_id) - km.restore_item_to_default(kmi) + if not kmi.is_user_defined: + km.restore_item_to_default(kmi) return {'FINISHED'} @@ -749,8 +755,12 @@ class WM_OT_keyitem_remove(bpy.types.Operator): item_id = IntProperty(name="Item Identifier", description="Identifier of the item to remove") + @classmethod + def poll(cls, context): + km = context.keymap + return km.is_user_defined + def execute(self, context): - wm = context.window_manager km = context.keymap kmi = km.items.from_id(self.item_id) km.items.remove(kmi) diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index 78acd1327e7..e2eba140a55 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -228,7 +228,7 @@ typedef struct wmKeyMapItem { /* runtime */ short maptype; /* keymap editor */ - short id; /* unique identifier */ + short id; /* unique identifier. Positive for kmi that override builtins, negative otherwise */ short pad; struct PointerRNA *ptr; /* rna pointer to access properties */ } wmKeyMapItem; diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index bf00f625f42..11aed2127a8 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -612,6 +612,12 @@ static int rna_wmKeyMapItem_name_length(PointerRNA *ptr) return 0; } +static int rna_KeyMapItem_userdefined_get(PointerRNA *ptr) +{ + wmKeyMapItem *kmi= ptr->data; + return kmi->id < 0; +} + static void rna_wmClipboard_get(PointerRNA *ptr, char *value) { char *pbuf; @@ -1679,6 +1685,11 @@ static void rna_def_keyconfig(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Active", "Activate or deactivate item"); RNA_def_property_ui_icon(prop, ICON_CHECKBOX_DEHLT, 1); + prop= RNA_def_property(srna, "is_user_defined", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "User Defined", "Is this keymap item user defined (doesn't just override a builtin item)"); + RNA_def_property_boolean_funcs(prop, "rna_KeyMapItem_userdefined_get", NULL); + RNA_api_keymapitem(srna); } diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c index 24aeaae4a0e..df635c0ccb2 100644 --- a/source/blender/windowmanager/intern/wm_keymap.c +++ b/source/blender/windowmanager/intern/wm_keymap.c @@ -196,6 +196,16 @@ static void keymap_event_set(wmKeyMapItem *kmi, short type, short val, int modif } } +static void keymap_item_set_id(wmKeyMap *keymap, wmKeyMapItem *kmi) +{ + keymap->kmi_id++; + if ((keymap->flag & KEYMAP_USER) == 0) { + kmi->id = keymap->kmi_id; + } else { + kmi->id = -keymap->kmi_id; // User defined keymap entries have negative ids + } +} + /* if item was added, then bail out */ wmKeyMapItem *WM_keymap_verify_item(wmKeyMap *keymap, const char *idname, int type, int val, int modifier, int keymodifier) { @@ -210,10 +220,7 @@ wmKeyMapItem *WM_keymap_verify_item(wmKeyMap *keymap, const char *idname, int ty BLI_addtail(&keymap->items, kmi); BLI_strncpy(kmi->idname, idname, OP_MAX_TYPENAME); - if ((keymap->flag & KEYMAP_USER) == 0) { - keymap->kmi_id++; - kmi->id = keymap->kmi_id; - } + keymap_item_set_id(keymap, kmi); keymap_event_set(kmi, type, val, modifier, keymodifier); keymap_properties_set(kmi); @@ -232,10 +239,7 @@ wmKeyMapItem *WM_keymap_add_item(wmKeyMap *keymap, const char *idname, int type, keymap_event_set(kmi, type, val, modifier, keymodifier); keymap_properties_set(kmi); - if ((keymap->flag & KEYMAP_USER) == 0) { - keymap->kmi_id++; - kmi->id = keymap->kmi_id; - } + keymap_item_set_id(keymap, kmi); return kmi; } @@ -354,10 +358,7 @@ wmKeyMapItem *WM_modalkeymap_add_item(wmKeyMap *km, int type, int val, int modif keymap_event_set(kmi, type, val, modifier, keymodifier); - if ((km->flag & KEYMAP_USER) == 0) { - km->kmi_id++; - kmi->id = km->kmi_id; - } + keymap_item_set_id(km, kmi); return kmi; } From 7613d36b2afed5f3dd460fd817b443b5645be234 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 6 Dec 2010 04:05:34 +0000 Subject: [PATCH 004/236] bugfix [#25046] Bold and Italics checkboxes for Text objects seem to do nothing - Part of this report is a misunderstanding, but there was no access to bold/italic fonts. - Added rna access and changed the operators to use only rna properties. --- release/scripts/ui/properties_data_curve.py | 13 ++- source/blender/editors/curve/editfont.c | 95 +++++++------------ .../editors/interface/interface_templates.c | 2 + source/blender/makesrna/intern/rna_curve.c | 20 +++- 4 files changed, 67 insertions(+), 63 deletions(-) diff --git a/release/scripts/ui/properties_data_curve.py b/release/scripts/ui/properties_data_curve.py index adb0d5aa6f0..821f815ed5e 100644 --- a/release/scripts/ui/properties_data_curve.py +++ b/release/scripts/ui/properties_data_curve.py @@ -270,7 +270,18 @@ class DATA_PT_font(CurveButtonsPanel, bpy.types.Panel): text = context.curve char = context.curve.edit_format - layout.template_ID(text, "font", open="font.open", unlink="font.unlink") + row = layout.split(percentage=0.25) + row.label(text="Regular") + row.template_ID(text, "font", open="font.open", unlink="font.unlink") + row = layout.split(percentage=0.25) + row.label(text="Bold") + row.template_ID(text, "font_bold", open="font.open", unlink="font.unlink") + row = layout.split(percentage=0.25) + row.label(text="Italic") + row.template_ID(text, "font_italic", open="font.open", unlink="font.unlink") + row = layout.split(percentage=0.25) + row.label(text="Bold & Italic") + row.template_ID(text, "font_bold_italic", open="font.open", unlink="font.unlink") #layout.prop(text, "font") diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index b23cc8bf3a3..ef49abd4dbd 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -1625,7 +1625,7 @@ void FONT_OT_case_toggle(wmOperatorType *ot) /* **************** Open Font ************** */ -static void open_init(bContext *C, wmOperator *op) +static void font_ui_template_init(bContext *C, wmOperator *op) { PropertyPointerRNA *pprop; @@ -1642,68 +1642,63 @@ static int open_cancel(bContext *UNUSED(C), wmOperator *op) static int open_exec(bContext *C, wmOperator *op) { - Object *ob = CTX_data_active_object(C); - Curve *cu; VFont *font; PropertyPointerRNA *pprop; PointerRNA idptr; char str[FILE_MAX]; - RNA_string_get(op->ptr, "filepath", str); font = load_vfont(str); - + if(!font) { if(op->customdata) MEM_freeN(op->customdata); return OPERATOR_CANCELLED; } - + if(!op->customdata) - open_init(C, op); + font_ui_template_init(C, op); /* hook into UI */ pprop= op->customdata; - + if(pprop->prop) { /* when creating new ID blocks, use is already 1, but RNA * pointer se also increases user, so this compensates it */ font->id.us--; - + RNA_id_pointer_create(&font->id, &idptr); RNA_property_pointer_set(&pprop->ptr, pprop->prop, idptr); RNA_property_update(C, &pprop->ptr, pprop->prop); - } else if(ob && ob->type == OB_FONT) { - cu = ob->data; - id_us_min(&cu->vfont->id); - cu->vfont = font; } - - DAG_id_tag_update(ob->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA|NA_EDITED, ob->data); - + MEM_freeN(op->customdata); - + return OPERATOR_FINISHED; } static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - Object *ob = CTX_data_active_object(C); - Curve *cu; VFont *font=NULL; char *path; - if (ob && ob->type == OB_FONT) { - cu = ob->data; - font = cu->vfont; + + PointerRNA idptr; + PropertyPointerRNA *pprop; + + font_ui_template_init(C, op); + + /* hook into UI */ + pprop= op->customdata; + + if(pprop->prop) { + idptr= RNA_property_pointer_get((PointerRNA *)pprop, pprop->prop); + font= idptr.id.data; } path = (font && strcmp(font->name, FO_BUILTIN_NAME) != 0)? font->name: U.fontdir; - + if(RNA_property_is_set(op->ptr, "filepath")) return open_exec(C, op); - - open_init(C, op); - + RNA_string_set(op->ptr, "filepath", path); WM_event_add_fileselect(C, op); @@ -1729,48 +1724,27 @@ void FONT_OT_open(wmOperatorType *ot) } /******************* delete operator *********************/ -static int font_unlink_poll(bContext *C) -{ - Object *ob = CTX_data_active_object(C); - Curve *cu; - - if (!ED_operator_object_active_editable(C) ) return 0; - if (ob->type != OB_FONT) return 0; - - cu = ob->data; - if (cu && strcmp(cu->vfont->name, FO_BUILTIN_NAME)==0) return 0; - return 1; -} static int font_unlink_exec(bContext *C, wmOperator *op) { - Object *ob = CTX_data_active_object(C); - Curve *cu; - VFont *font, *builtin_font; - - cu = ob->data; - font = cu->vfont; + VFont *builtin_font; + + PointerRNA idptr; + PropertyPointerRNA pprop; + + uiIDContextProperty(C, &pprop.ptr, &pprop.prop); - if (!font) { - BKE_report(op->reports, RPT_ERROR, "No font datablock available to unlink."); + if(pprop.prop==NULL) { + BKE_report(op->reports, RPT_ERROR, "Incorrect context for running font unlink"); return OPERATOR_CANCELLED; } - - if (strcmp(font->name, FO_BUILTIN_NAME)==0) { - BKE_report(op->reports, RPT_WARNING, "Can't unlink the default builtin font."); - return OPERATOR_FINISHED; - } - /* revert back to builtin font */ builtin_font = get_builtin_font(); - cu->vfont = builtin_font; - id_us_plus(&cu->vfont->id); - id_us_min(&font->id); - - DAG_id_tag_update(ob->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA|NA_EDITED, ob->data); - + RNA_id_pointer_create(&builtin_font->id, &idptr); + RNA_property_pointer_set(&pprop.ptr, pprop.prop, idptr); + RNA_property_update(C, &pprop.ptr, pprop.prop); + return OPERATOR_FINISHED; } @@ -1783,7 +1757,6 @@ void FONT_OT_unlink(wmOperatorType *ot) /* api callbacks */ ot->exec= font_unlink_exec; - ot->poll= font_unlink_poll; } diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 83acf254346..3e04a6fe232 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -421,6 +421,8 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str if(id && (flag & UI_ID_DELETE)) { if(unlinkop) { but= uiDefIconButO(block, BUT, unlinkop, WM_OP_INVOKE_REGION_WIN, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL); + /* so we can access the template from operators, font unlinking needs this */ + uiButSetNFunc(but, NULL, MEM_dupallocN(template), 0); } else { but= uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Unlink datablock, Shift + Click to force removal on save"); diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index 9b0b96b9058..ccb032cd1c6 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -964,11 +964,29 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna) RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); + prop= RNA_def_property(srna, "font_bold", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "vfontb"); + RNA_def_property_ui_text(prop, "Font", ""); + RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_update(prop, 0, "rna_Curve_update_data"); + + prop= RNA_def_property(srna, "font_italic", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "vfonti"); + RNA_def_property_ui_text(prop, "Font", ""); + RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_update(prop, 0, "rna_Curve_update_data"); + + prop= RNA_def_property(srna, "font_bold_italic", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "vfontbi"); + RNA_def_property_ui_text(prop, "Font", ""); + RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_update(prop, 0, "rna_Curve_update_data"); + prop= RNA_def_property(srna, "edit_format", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "curinfo"); RNA_def_property_ui_text(prop, "Edit Format", "Editing settings character formatting"); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); - + /* flags */ prop= RNA_def_property(srna, "use_fast_edit", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_FAST); From 0198b85ab97647c044f8bf0e6e2cceed87bd5ec2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 6 Dec 2010 05:31:27 +0000 Subject: [PATCH 005/236] [#25030] Grease Pencil active_frame_delete() deletes wrong layer move buttons to the header since they only operate on the active layer. --- source/blender/editors/gpencil/gpencil_buttons.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/source/blender/editors/gpencil/gpencil_buttons.c b/source/blender/editors/gpencil/gpencil_buttons.c index 87a9c3cd52f..f0b2f960a8d 100644 --- a/source/blender/editors/gpencil/gpencil_buttons.c +++ b/source/blender/editors/gpencil/gpencil_buttons.c @@ -210,10 +210,6 @@ static void gp_drawui_layer (uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl) uiItemR(subcol, &ptr, "use_onion_skinning", 0, "Onion Skinning", 0); uiItemR(subcol, &ptr, "ghost_range_max", 0, "Frames", 0); // XXX shorter name here? i.e. GStep - /* additional options... */ - subcol= uiLayoutColumn(col, 1); - uiItemO(subcol, "Delete Frame", 0, "GPENCIL_OT_active_frame_delete"); - uiItemO(subcol, "Convert...", 0, "GPENCIL_OT_convert"); } } @@ -242,8 +238,11 @@ static void draw_gpencil_panel (bContext *C, uiLayout *layout, bGPdata *gpd, Poi uiTemplateID(col, C, ctx_ptr, "grease_pencil", "GPENCIL_OT_data_add", NULL, "GPENCIL_OT_data_unlink"); /* add new layer button - can be used even when no data, since it can add a new block too */ - uiItemO(col, NULL, 0, "GPENCIL_OT_layer_add"); - + uiItemO(col, "New Layer", 0, "GPENCIL_OT_layer_add"); + row= uiLayoutRow(col, 1); + uiItemO(row, "Delete Frame", 0, "GPENCIL_OT_active_frame_delete"); + uiItemO(row, "Convert", 0, "GPENCIL_OT_convert"); + /* sanity checks... */ if (gpd == NULL) return; From 5c8dfc1d519076140a9decba576a965e01fbd5a2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 6 Dec 2010 06:26:47 +0000 Subject: [PATCH 006/236] bugfix [#25057] Vertex paint - Cannot select or paint vertices of obscured vertices, even when obscuring faces are hiddden --- source/blender/editors/space_view3d/drawobject.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index e489edb5f16..97813642b17 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -6436,12 +6436,11 @@ static void bbs_mesh_solid(Scene *scene, View3D *v3d, Object *ob) { DerivedMesh *dm = mesh_get_derived_final(scene, ob, v3d->customdata_mask); Mesh *me = (Mesh*)ob->data; - int face_sel_mode = (me->flag & ME_EDIT_PAINT_MASK) ? 1:0; glColor3ub(0, 0, 0); - if(face_sel_mode) dm->drawMappedFaces(dm, bbs_mesh_solid_hide__setDrawOpts, me, 0, GPU_enable_material); - else dm->drawMappedFaces(dm, bbs_mesh_solid__setDrawOpts, me, 0, GPU_enable_material); + if((me->editflag & ME_EDIT_PAINT_MASK)) dm->drawMappedFaces(dm, bbs_mesh_solid_hide__setDrawOpts, me, 0, GPU_enable_material); + else dm->drawMappedFaces(dm, bbs_mesh_solid__setDrawOpts, me, 0, GPU_enable_material); dm->release(dm); } From 4dceafc928ff2fdb0fcf609759cdd02401bedfd5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 6 Dec 2010 07:45:07 +0000 Subject: [PATCH 007/236] bugfix [#24995] Object rotation seems to be applied incorrectly - Object actuator rotation was being scaled by: (1/0.02)*2*PI/360 == 0.872, since revision 2. - Remove scaling and use do_versions to adjust existing files. --- source/blender/blenloader/intern/readfile.c | 30 +++++++++++++------ source/blender/makesdna/DNA_actuator_types.h | 2 +- .../Converter/KX_ConvertActuators.cpp | 9 ------ 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 1fcbb95156b..c22cdb21899 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -11155,24 +11155,22 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } /* put compatibility code here until next subversion bump */ - { + if (main->versionfile < 255 || (main->versionfile == 255 && main->subversionfile < 1)) { Brush *br; + ParticleSettings *part; + bScreen *sc; + Object *ob; + for(br= main->brush.first; br; br= br->id.next) { if(br->ob_mode==0) br->ob_mode= OB_MODE_ALL_PAINT; } - - } - { - ParticleSettings *part; + for(part = main->particle.first; part; part = part->id.next) { if(part->boids) part->boids->pitch = 1.0f; } - } - { - bScreen *sc; for (sc= main->screen.first; sc; sc= sc->id.next) { ScrArea *sa; for (sa= sc->areabase.first; sa; sa= sa->next) { @@ -11198,8 +11196,22 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } } + + /* fix rotation actuators for objects so they use real angles (radians) + * since before blender went opensource this strange scalar was used: (1 / 0.02) * 2 * math.pi/360 */ + for(ob= main->object.first; ob; ob= ob->id.next) { + bActuator *act= ob->actuators.first; + while(act) { + if (act->type==ACT_OBJECT) { + /* multiply velocity with 50 in old files */ + bObjectActuator *oa= act->data; + mul_v3_fl(oa->drot, 0.8726646259971648f); + } + act= act->next; + } + } } - + /* WATCH IT!!!: pointers from libdata have not been converted yet here! */ /* WATCH IT 2!: Userdef struct init has to be in editors/interface/resources.c! */ diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index 76bb9a5f96f..077c62943e0 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -112,7 +112,7 @@ typedef struct bObjectActuator { short damping; float forceloc[3], forcerot[3]; float pad[3], pad1[3]; - float dloc[3], drot[3]; + float dloc[3], drot[3]; /* angle in radians */ float linearvelocity[3], angularvelocity[3]; struct Object *reference; } bObjectActuator; diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp index d9d3d7c185d..2bd992037c5 100644 --- a/source/gameengine/Converter/KX_ConvertActuators.cpp +++ b/source/gameengine/Converter/KX_ConvertActuators.cpp @@ -32,8 +32,6 @@ #pragma warning (disable : 4786) #endif //WIN32 -#define BLENDER_HACK_DTIME 0.02 - #include "MEM_guardedalloc.h" #include "KX_BlenderSceneConverter.h" @@ -151,13 +149,6 @@ void BL_ConvertActuators(char* maggiename, KX_BLENDERTRUNC(obact->angularvelocity[2])); short damping = obact->damping; - drotvec /= BLENDER_HACK_DTIME; - //drotvec /= BLENDER_HACK_DTIME; - drotvec *= MT_2_PI/360.0; - //dlocvec /= BLENDER_HACK_DTIME; - //linvelvec /= BLENDER_HACK_DTIME; - //angvelvec /= BLENDER_HACK_DTIME; - /* Blender uses a bit vector internally for the local-flags. In */ /* KX, we have four bools. The compiler should be smart enough */ /* to do the right thing. We need to explicitly convert here! */ From 357826aa6e18c3af1625223656d748b92db86696 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 6 Dec 2010 08:29:41 +0000 Subject: [PATCH 008/236] bugfix [#24967] bge.KX_GameObject.worldAngularVelocity does not work, breaks mathutils somehow - Exceptions from reading vector values in the game engine where not being caught. - Also wrote specific KX_GameObject exceptions, without these the errors are quite confusing. --- source/gameengine/Ketsji/KX_GameObject.cpp | 16 ++++++++++------ source/gameengine/Ketsji/KX_PyMath.h | 12 +++++++++--- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 6b1c36a1589..1de7eee134e 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -1266,7 +1266,9 @@ static int mathutils_kxgameob_vector_get(BaseMathObject *bmo, int subtype) KX_GameObject* self= static_castBGE_PROXY_REF(bmo->cb_user); if(self==NULL) return 0; - + +#define PHYS_ERR(attr) PyErr_SetString(PyExc_AttributeError, "KX_GameObject." attr ", is missing a physics controller") + switch(subtype) { case MATHUTILS_VEC_CB_POS_LOCAL: self->NodeGetLocalPosition().getValue(bmo->data); @@ -1281,31 +1283,33 @@ static int mathutils_kxgameob_vector_get(BaseMathObject *bmo, int subtype) self->NodeGetWorldScaling().getValue(bmo->data); break; case MATHUTILS_VEC_CB_INERTIA_LOCAL: - if(!self->GetPhysicsController()) return 0; + if(!self->GetPhysicsController()) return PHYS_ERR("localInertia"), 0; self->GetPhysicsController()->GetLocalInertia().getValue(bmo->data); break; case MATHUTILS_VEC_CB_OBJECT_COLOR: self->GetObjectColor().getValue(bmo->data); break; case MATHUTILS_VEC_CB_LINVEL_LOCAL: - if(!self->GetPhysicsController()) return 0; + if(!self->GetPhysicsController()) return PHYS_ERR("localLinearVelocity"), 0; self->GetLinearVelocity(true).getValue(bmo->data); break; case MATHUTILS_VEC_CB_LINVEL_GLOBAL: - if(!self->GetPhysicsController()) return 0; + if(!self->GetPhysicsController()) return PHYS_ERR("worldLinearVelocity"), 0; self->GetLinearVelocity(false).getValue(bmo->data); break; case MATHUTILS_VEC_CB_ANGVEL_LOCAL: - if(!self->GetPhysicsController()) return 0; + if(!self->GetPhysicsController()) return PHYS_ERR("localLinearVelocity"), 0; self->GetAngularVelocity(true).getValue(bmo->data); break; case MATHUTILS_VEC_CB_ANGVEL_GLOBAL: - if(!self->GetPhysicsController()) return 0; + if(!self->GetPhysicsController()) return PHYS_ERR("worldLinearVelocity"), 0; self->GetAngularVelocity(false).getValue(bmo->data); break; } +#undef PHYS_ERR + return 1; } diff --git a/source/gameengine/Ketsji/KX_PyMath.h b/source/gameengine/Ketsji/KX_PyMath.h index 589bd72c760..282e9a8f1f6 100644 --- a/source/gameengine/Ketsji/KX_PyMath.h +++ b/source/gameengine/Ketsji/KX_PyMath.h @@ -110,7 +110,9 @@ bool PyVecTo(PyObject* pyval, T& vec) if(VectorObject_Check(pyval)) { VectorObject *pyvec= (VectorObject *)pyval; - BaseMath_ReadCallback(pyvec); + if(!BaseMath_ReadCallback(pyvec)) { + return false; /* exception raised */ + } if (pyvec->size != Size(vec)) { PyErr_Format(PyExc_AttributeError, "error setting vector, %d args, should be %d", pyvec->size, Size(vec)); return false; @@ -120,7 +122,9 @@ bool PyVecTo(PyObject* pyval, T& vec) } else if(QuaternionObject_Check(pyval)) { QuaternionObject *pyquat= (QuaternionObject *)pyval; - BaseMath_ReadCallback(pyquat); + if(!BaseMath_ReadCallback(pyquat)) { + return false; /* exception raised */ + } if (4 != Size(vec)) { PyErr_Format(PyExc_AttributeError, "error setting vector, %d args, should be %d", 4, Size(vec)); return false; @@ -131,7 +135,9 @@ bool PyVecTo(PyObject* pyval, T& vec) } else if(EulerObject_Check(pyval)) { EulerObject *pyeul= (EulerObject *)pyval; - BaseMath_ReadCallback(pyeul); + if(!BaseMath_ReadCallback(pyeul)) { + return false; /* exception raised */ + } if (3 != Size(vec)) { PyErr_Format(PyExc_AttributeError, "error setting vector, %d args, should be %d", 3, Size(vec)); return false; From d64f46e0bbdd390b2b5487f09638402e7bdfe0e4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 6 Dec 2010 10:56:37 +0000 Subject: [PATCH 009/236] CMake: use a global list to store libraries built rather then cmake_blender_libs.txt file. --- CMakeLists.txt | 2 +- build_files/cmake/macros.cmake | 4 ++-- source/blenderplayer/CMakeLists.txt | 14 +++++++++----- source/creator/CMakeLists.txt | 2 +- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index acfcd820cc9..1540e54f694 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -992,7 +992,7 @@ ENDIF(WITH_CXX_GUARDEDALLOC) #----------------------------------------------------------------------------- # Libraries -FILE(WRITE ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt "") + ADD_SUBDIRECTORY(source) ADD_SUBDIRECTORY(intern) ADD_SUBDIRECTORY(extern) diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index 2cac2658104..cb201c53a22 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -41,8 +41,8 @@ MACRO(BLENDERLIB BLENDERLIB_NOLIST(${name} "${sources}" "${includes}") - # Add to blender's list of libraries - FILE(APPEND ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt "${name};") + SET_PROPERTY(GLOBAL APPEND PROPERTY BLENDER_LINK_LIBS ${name}) + ENDMACRO(BLENDERLIB) MACRO(SETUP_LIBDIRS) diff --git a/source/blenderplayer/CMakeLists.txt b/source/blenderplayer/CMakeLists.txt index f2b7b72ac9a..fa6521e7f8d 100644 --- a/source/blenderplayer/CMakeLists.txt +++ b/source/blenderplayer/CMakeLists.txt @@ -51,12 +51,16 @@ ENDIF(WIN32 AND NOT UNIX) ADD_DEPENDENCIES(blenderplayer makesdna) -FILE(READ ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt BLENDER_LINK_LIBS) +GET_PROPERTY(BLENDER_LINK_LIBS GLOBAL PROPERTY BLENDER_LINK_LIBS) -SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} ge_player_common ge_player_ghost blenkernel_blc) +LIST(APPEND BLENDER_LINK_LIBS + ge_player_common + ge_player_ghost + blenkernel_blc +) IF(CMAKE_SYSTEM_NAME MATCHES "Linux") - SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} extern_binreloc) + LIST(APPEND BLENDER_LINK_LIBS extern_binreloc) ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux") IF(UNIX) @@ -120,11 +124,11 @@ IF(UNIX) ) IF(WITH_CODEC_QUICKTIME) - SET(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} bf_quicktime) + LIST(APPEND BLENDER_SORTED_LIBS bf_quicktime) ENDIF(WITH_CODEC_QUICKTIME) IF(WITH_CXX_GUARDEDALLOC) - SET(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} bf_intern_guardedalloc_cpp) + LIST(APPEND BLENDER_SORTED_LIBS bf_intern_guardedalloc_cpp) ENDIF(WITH_CXX_GUARDEDALLOC) FOREACH(SORTLIB ${BLENDER_SORTED_LIBS}) diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 9a94b49c5c2..7b9d8421aa5 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -457,7 +457,7 @@ ENDIF(WITH_INSTALL) ADD_DEPENDENCIES(blender makesdna) -FILE(READ ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt BLENDER_LINK_LIBS) +GET_PROPERTY(BLENDER_LINK_LIBS GLOBAL PROPERTY BLENDER_LINK_LIBS) SET(BLENDER_LINK_LIBS bf_nodes ${BLENDER_LINK_LIBS} bf_windowmanager bf_render) From 25bd57b0a1512037070d9e6c85694ab8fa82ec1b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 6 Dec 2010 12:36:55 +0000 Subject: [PATCH 010/236] include getset's for generating module docs. used for bpy.debug/tempdir/driver_namespace which were previously undocumented. --- doc/python_api/sphinx_doc_gen.py | 10 ++++++++++ source/blender/python/intern/bpy_app.c | 8 ++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index c1e614aa23f..1353dcf70d7 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -224,6 +224,16 @@ def pymodule2sphinx(BASEPATH, module_name, module, title): # write members of the module # only tested with PyStructs which are not exactly modules for key, descr in sorted(type(module).__dict__.items()): + if key.startswith("__"): + continue + # naughty, we also add getset's into PyStructs, this is not typical py but also not incorrect. + if type(descr) == types.GetSetDescriptorType: # 'bpy_app_type' name is only used for examples and messages + py_descr2sphinx("", fw, descr, module_name, "bpy_app_type", key) + attribute_set.add(key) + for key, descr in sorted(type(module).__dict__.items()): + if key.startswith("__"): + continue + if type(descr) == types.MemberDescriptorType: if descr.__doc__: fw(".. data:: %s\n\n" % key) diff --git a/source/blender/python/intern/bpy_app.c b/source/blender/python/intern/bpy_app.c index 21a97462dda..bbcfef4cd30 100644 --- a/source/blender/python/intern/bpy_app.c +++ b/source/blender/python/intern/bpy_app.c @@ -59,10 +59,10 @@ static PyStructSequence_Field app_info_fields[] = { {(char *)"build_revision", (char *)"The subversion revision this blender instance was built with"}, {(char *)"build_platform", (char *)"The platform this blender instance was built for"}, {(char *)"build_type", (char *)"The type of build (Release, Debug)"}, - {(char *)"build_cflags", (char *)""}, - {(char *)"build_cxxflags", (char *)""}, - {(char *)"build_linkflags", (char *)""}, - {(char *)"build_system", (char *)""}, + {(char *)"build_cflags", (char *)"C compiler flags"}, + {(char *)"build_cxxflags", (char *)"C++ compiler flags"}, + {(char *)"build_linkflags", (char *)"Binary linking flags"}, + {(char *)"build_system", (char *)"Build system used"}, {0} }; From 997338b5cb0eac243438e53539f6c91913f2e52a Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 6 Dec 2010 13:44:36 +0000 Subject: [PATCH 011/236] Curves shape keys: fixed memory corruption after creating new CVs and switching direction --- source/blender/editors/curve/editcurve.c | 25 ++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 57c614336a4..2f87e1b4650 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -490,8 +490,8 @@ static void keyIndex_swap(EditNurb *editnurb, void *a, void *b) BLI_ghash_remove(editnurb->keyindex, a, NULL, NULL); BLI_ghash_remove(editnurb->keyindex, b, NULL, NULL); - BLI_ghash_insert(editnurb->keyindex, a, index2); - BLI_ghash_insert(editnurb->keyindex, b, index1); + if(index2) BLI_ghash_insert(editnurb->keyindex, a, index2); + if(index1) BLI_ghash_insert(editnurb->keyindex, b, index1); } static void keyIndex_switchDirection(EditNurb *editnurb, Nurb *nu) @@ -563,7 +563,8 @@ static void keyIndex_switchDirection(EditNurb *editnurb, Nurb *nu) static void switch_keys_direction(Curve *cu, Nurb *actnu) { KeyBlock *currkey; - ListBase *nubase= &cu->editnurb->nurbs; + EditNurb *editnurb= cu->editnurb; + ListBase *nubase= &editnurb->nurbs; Nurb *nu; float *fp; int a; @@ -575,20 +576,28 @@ static void switch_keys_direction(Curve *cu, Nurb *actnu) nu= nubase->first; while (nu) { if (nu->bezt) { + BezTriple *bezt= nu->bezt; a= nu->pntsu; if (nu == actnu) { while (a--) { - swap_v3_v3(fp, fp + 6); - *(fp+9) = -*(fp+9); - fp += 12; + if(getKeyIndexOrig_bezt(editnurb, bezt)) { + swap_v3_v3(fp, fp + 6); + *(fp+9) = -*(fp+9); + fp += 12; + } + bezt++; } } else fp += a * 12; } else { + BPoint *bp= nu->bp; a= nu->pntsu * nu->pntsv; if (nu == actnu) { while (a--) { - *(fp+3) = -*(fp+3); - fp += 4; + if(getKeyIndexOrig_bp(editnurb, bp)) { + *(fp+3) = -*(fp+3); + fp += 4; + } + bp++; } } else fp += a * 4; } From 9d636334e95cfbeb79692265a07ea5c2536627e0 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Mon, 6 Dec 2010 15:44:06 +0000 Subject: [PATCH 012/236] Bugfix #25023 (additional remark, not report itself) Adding Cone didn't set default 'fill end cap', as tooltip promised it would be. --- source/blender/editors/mesh/editmesh_add.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index c150255d10e..f8c33b60b4a 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -1555,7 +1555,7 @@ void MESH_OT_primitive_cone_add(wmOperatorType *ot) RNA_def_int(ot->srna, "vertices", 32, INT_MIN, INT_MAX, "Vertices", "", 2, 500); RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, "Radius", "", 0.001, 100.00); RNA_def_float(ot->srna, "depth", 2.0f, 0.0, FLT_MAX, "Depth", "", 0.001, 100.00); - RNA_def_boolean(ot->srna, "cap_end", 0, "Cap End", ""); + RNA_def_boolean(ot->srna, "cap_end", 1, "Cap End", ""); ED_object_add_generic_props(ot, TRUE); } From 14ec2d91228596adc466a898b97c4093f5694243 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 6 Dec 2010 17:20:22 +0000 Subject: [PATCH 013/236] Curves CV animation =================== Update fcurves RNA pathes after making changes to curve topology, so animation will no longer lost after edit and wouldn't lead to crash. Will be very useful for RotoBezier addon. Also NodeKeyIndex renamed to CVNodeIndex due to node is an entity from another module and better not used in others. --- source/blender/editors/curve/editcurve.c | 303 ++++++++++++++++++---- source/blender/editors/include/ED_curve.h | 2 + source/blender/makesdna/DNA_curve_types.h | 4 + 3 files changed, 253 insertions(+), 56 deletions(-) diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 2f87e1b4650..86cc4f2dd9d 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -40,6 +40,7 @@ #include "DNA_key_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" +#include "DNA_anim_types.h" #include "MEM_guardedalloc.h" @@ -58,6 +59,7 @@ #include "BKE_library.h" #include "BKE_main.h" #include "BKE_report.h" +#include "BKE_animsys.h" #include "WM_api.h" #include "WM_types.h" @@ -85,9 +87,11 @@ typedef struct { /* Definitions needed for shape keys */ typedef struct { - void *origNode; - int index; -} NodeKeyIndex; + void *orig_cv; + int key_index, nu_index, pt_index; + int switched; + Nurb *orig_nu; +} CVKeyIndex; void selectend_nurb(Object *obedit, short selfirst, short doswap, short selstatus); static void select_adjacent_cp(ListBase *editnurb, short next, short cont, short selstatus); @@ -271,17 +275,21 @@ void printknots(Object *obedit) /* ********************* Shape keys *************** */ -static NodeKeyIndex *init_nodeKeyIndex(void *node, int index) +static CVKeyIndex *init_cvKeyIndex(void *cv, int key_index, int nu_index, int pt_index, Nurb *orig_nu) { - NodeKeyIndex *nodeIndex = MEM_callocN(sizeof(NodeKeyIndex), "init_nodeKeyIndex"); + CVKeyIndex *cvIndex = MEM_callocN(sizeof(CVKeyIndex), "init_cvKeyIndex"); - nodeIndex->origNode= node; - nodeIndex->index= index; + cvIndex->orig_cv= cv; + cvIndex->key_index= key_index; + cvIndex->nu_index= nu_index; + cvIndex->pt_index= pt_index; + cvIndex->switched= 0; + cvIndex->orig_nu= orig_nu; - return nodeIndex; + return cvIndex; } -static void free_nodeKeyIndex(NodeKeyIndex *pointIndex) +static void free_cvKeyIndex(CVKeyIndex *pointIndex) { MEM_freeN(pointIndex); } @@ -293,7 +301,10 @@ static void init_editNurb_keyIndex(EditNurb *editnurb, ListBase *origBase) GHash *gh; BezTriple *bezt, *origbezt; BPoint *bp, *origbp; - int a, keyindex= 0; + CVKeyIndex *keyIndex; + int a, key_index= 0, nu_index= 0, pt_index= 0; + + if(editnurb->keyindex) return; gh= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "editNurb keyIndex"); @@ -302,26 +313,33 @@ static void init_editNurb_keyIndex(EditNurb *editnurb, ListBase *origBase) a= orignu->pntsu; bezt= nu->bezt; origbezt= orignu->bezt; + pt_index= 0; while (a--) { - BLI_ghash_insert(gh, bezt, init_nodeKeyIndex(origbezt, keyindex)); - keyindex+= 12; + keyIndex= init_cvKeyIndex(origbezt, key_index, nu_index, pt_index, orignu); + BLI_ghash_insert(gh, bezt, keyIndex); + key_index+= 12; bezt++; origbezt++; + pt_index++; } } else { a= orignu->pntsu * orignu->pntsv; bp= nu->bp; origbp= orignu->bp; + pt_index= 0; while (a--) { - BLI_ghash_insert(gh, bp, init_nodeKeyIndex(origbp, keyindex)); - keyindex+= 4; + keyIndex= init_cvKeyIndex(origbp, key_index, nu_index, pt_index, orignu); + BLI_ghash_insert(gh, bp, keyIndex); + key_index+= 4; bp++; origbp++; + pt_index++; } } nu= nu->next; orignu= orignu->next; + nu_index++; } editnurb->keyindex= gh; @@ -332,64 +350,65 @@ static void free_editNurb_keyIndex(EditNurb *editnurb) if (!editnurb->keyindex) { return; } - BLI_ghash_free(editnurb->keyindex, NULL, (GHashValFreeFP)free_nodeKeyIndex); + BLI_ghash_free(editnurb->keyindex, NULL, (GHashValFreeFP)free_cvKeyIndex); + editnurb->keyindex= NULL; } -static NodeKeyIndex *getNodeKeyIndex(EditNurb *editnurb, void *node) +static CVKeyIndex *getCVKeyIndex(EditNurb *editnurb, void *cv) { - return BLI_ghash_lookup(editnurb->keyindex, node); + return BLI_ghash_lookup(editnurb->keyindex, cv); } -static BezTriple *getKeyIndexOrig_bezt(EditNurb *editnurb, void *node) +static BezTriple *getKeyIndexOrig_bezt(EditNurb *editnurb, BezTriple *bezt) { - NodeKeyIndex *index= getNodeKeyIndex(editnurb, node); + CVKeyIndex *index= getCVKeyIndex(editnurb, bezt); if (!index) { return NULL; } - return (BezTriple*)index->origNode; + return (BezTriple*)index->orig_cv; } -static BPoint *getKeyIndexOrig_bp(EditNurb *editnurb, void *node) +static BPoint *getKeyIndexOrig_bp(EditNurb *editnurb, BPoint *bp) { - NodeKeyIndex *index= getNodeKeyIndex(editnurb, node); + CVKeyIndex *index= getCVKeyIndex(editnurb, bp); if (!index) { return NULL; } - return (BPoint*)index->origNode; + return (BPoint*)index->orig_cv; } -static int getKeyIndexOrig_index(EditNurb *editnurb, void *node) +static int getKeyIndexOrig_keyIndex(EditNurb *editnurb, void *cv) { - NodeKeyIndex *index= getNodeKeyIndex(editnurb, node); + CVKeyIndex *index= getCVKeyIndex(editnurb, cv); if (!index) { return -1; } - return index->index; + return index->key_index; } -static void keyIndex_delNode(EditNurb *editnurb, void *node) +static void keyIndex_delCV(EditNurb *editnurb, void *cv) { if (!editnurb->keyindex) { return; } - BLI_ghash_remove(editnurb->keyindex, node, NULL, (GHashValFreeFP)free_nodeKeyIndex); + BLI_ghash_remove(editnurb->keyindex, cv, NULL, (GHashValFreeFP)free_cvKeyIndex); } static void keyIndex_delBezt(EditNurb *editnurb, BezTriple *bezt) { - keyIndex_delNode(editnurb, bezt); + keyIndex_delCV(editnurb, bezt); } static void keyIndex_delBP(EditNurb *editnurb, BPoint *bp) { - keyIndex_delNode(editnurb, bp); + keyIndex_delCV(editnurb, bp); } static void keyIndex_delNurb(EditNurb *editnurb, Nurb *nu) @@ -405,7 +424,7 @@ static void keyIndex_delNurb(EditNurb *editnurb, Nurb *nu) a= nu->pntsu; while (a--) { - BLI_ghash_remove(editnurb->keyindex, bezt, NULL, (GHashValFreeFP)free_nodeKeyIndex); + BLI_ghash_remove(editnurb->keyindex, bezt, NULL, (GHashValFreeFP)free_cvKeyIndex); ++bezt; } } else { @@ -413,7 +432,7 @@ static void keyIndex_delNurb(EditNurb *editnurb, Nurb *nu) a= nu->pntsu * nu->pntsv; while (a--) { - BLI_ghash_remove(editnurb->keyindex, bp, NULL, (GHashValFreeFP)free_nodeKeyIndex); + BLI_ghash_remove(editnurb->keyindex, bp, NULL, (GHashValFreeFP)free_cvKeyIndex); ++bp; } } @@ -430,11 +449,11 @@ static void keyIndex_delNurbList(EditNurb *editnurb, ListBase *nubase) } } -static void keyIndex_updateNode(EditNurb *editnurb, char *node, - char *newnode, int count, int size, int search) +static void keyIndex_updateCV(EditNurb *editnurb, char *cv, + char *newcv, int count, int size, int search) { int i; - NodeKeyIndex *index; + CVKeyIndex *index; if (editnurb->keyindex == NULL) { /* No shape keys - updating not needed */ @@ -443,34 +462,34 @@ static void keyIndex_updateNode(EditNurb *editnurb, char *node, for (i = 0; i < count; i++) { for (;;) { - index= getNodeKeyIndex(editnurb, node); + index= getCVKeyIndex(editnurb, cv); if (!search || index) { break; } - node += size; + cv += size; } - BLI_ghash_remove(editnurb->keyindex, node, NULL, NULL); + BLI_ghash_remove(editnurb->keyindex, cv, NULL, NULL); if (index) { - BLI_ghash_insert(editnurb->keyindex, newnode, index); + BLI_ghash_insert(editnurb->keyindex, newcv, index); } - newnode += size; - node += size; + newcv += size; + cv += size; } } static void keyIndex_updateBezt(EditNurb *editnurb, BezTriple *bezt, BezTriple *newbezt, int count, int search) { - keyIndex_updateNode(editnurb, (char*)bezt, (char*)newbezt, count, sizeof(BezTriple), search); + keyIndex_updateCV(editnurb, (char*)bezt, (char*)newbezt, count, sizeof(BezTriple), search); } static void keyIndex_updateBP(EditNurb *editnurb, BPoint *bp, BPoint *newbp, int count, int search) { - keyIndex_updateNode(editnurb, (char*)bp, (char*)newbp, count, sizeof(BPoint), search); + keyIndex_updateCV(editnurb, (char*)bp, (char*)newbp, count, sizeof(BPoint), search); } static void keyIndex_updateNurb(EditNurb *editnurb, Nurb *nu, Nurb *newnu) @@ -484,8 +503,8 @@ static void keyIndex_updateNurb(EditNurb *editnurb, Nurb *nu, Nurb *newnu) static void keyIndex_swap(EditNurb *editnurb, void *a, void *b) { - NodeKeyIndex *index1= getNodeKeyIndex(editnurb, a); - NodeKeyIndex *index2= getNodeKeyIndex(editnurb, b); + CVKeyIndex *index1= getCVKeyIndex(editnurb, a); + CVKeyIndex *index2= getCVKeyIndex(editnurb, b); BLI_ghash_remove(editnurb->keyindex, a, NULL, NULL); BLI_ghash_remove(editnurb->keyindex, b, NULL, NULL); @@ -497,6 +516,7 @@ static void keyIndex_swap(EditNurb *editnurb, void *a, void *b) static void keyIndex_switchDirection(EditNurb *editnurb, Nurb *nu) { int a; + CVKeyIndex *index1, *index2; if (nu->bezt) { BezTriple *bezt1, *bezt2; @@ -511,8 +531,15 @@ static void keyIndex_switchDirection(EditNurb *editnurb, Nurb *nu) a/=2; while (a--) { + index1= getCVKeyIndex(editnurb, bezt1); + index2= getCVKeyIndex(editnurb, bezt2); + + if(index1) index1->switched= !index1->switched; + if (bezt1 != bezt2) { keyIndex_swap(editnurb, bezt1, bezt2); + + if(index2) index2->switched= !index2->switched; } bezt1++; @@ -527,7 +554,14 @@ static void keyIndex_switchDirection(EditNurb *editnurb, Nurb *nu) bp2= bp1+(a-1); a/= 2; while(bp1!=bp2 && a>0) { + index1= getCVKeyIndex(editnurb, bp1); + index2= getCVKeyIndex(editnurb, bp2); + + if(index1) index1->switched= !index1->switched; + if (bp1 != bp2) { + if(index2) index2->switched= !index2->switched; + keyIndex_swap(editnurb, bp1, bp2); } @@ -546,7 +580,14 @@ static void keyIndex_switchDirection(EditNurb *editnurb, Nurb *nu) a/= 2; while(bp1!=bp2 && a>0) { + index1= getCVKeyIndex(editnurb, bp1); + index2= getCVKeyIndex(editnurb, bp2); + + if(index1) index1->switched= !index1->switched; + if (bp1 != bp2) { + if(index2) index2->switched= !index2->switched; + keyIndex_swap(editnurb, bp1, bp2); } @@ -619,7 +660,8 @@ static void keyData_switchDirectionNurb(Curve *cu, Nurb *nu) } keyIndex_switchDirection(editnurb, nu); - switch_keys_direction(cu, nu); + if(cu->key) + switch_keys_direction(cu, nu); } static GHash *dupli_keyIndexHash(GHash *keyindex) @@ -632,13 +674,13 @@ static GHash *dupli_keyIndexHash(GHash *keyindex) for(hashIter = BLI_ghashIterator_new(keyindex); !BLI_ghashIterator_isDone(hashIter); BLI_ghashIterator_step(hashIter)) { - void *node = BLI_ghashIterator_getKey(hashIter); - NodeKeyIndex *index = BLI_ghashIterator_getValue(hashIter); - NodeKeyIndex *newIndex = MEM_callocN(sizeof(NodeKeyIndex), "dupli_keyIndexHash index"); + void *cv = BLI_ghashIterator_getKey(hashIter); + CVKeyIndex *index = BLI_ghashIterator_getValue(hashIter); + CVKeyIndex *newIndex = MEM_callocN(sizeof(CVKeyIndex), "dupli_keyIndexHash index"); - memcpy(newIndex, index, sizeof(NodeKeyIndex)); + memcpy(newIndex, index, sizeof(CVKeyIndex)); - BLI_ghash_insert(gh, node, newIndex); + BLI_ghash_insert(gh, cv, newIndex); } BLI_ghashIterator_free(hashIter); @@ -881,7 +923,7 @@ static void calc_shapeKeys(Object *obedit) a= nu->pntsu; while(a--) { - index= getKeyIndexOrig_index(editnurb, bezt); + index= getKeyIndexOrig_keyIndex(editnurb, bezt); if (index >= 0) { curofp= ofp + index; @@ -919,7 +961,7 @@ static void calc_shapeKeys(Object *obedit) bp= nu->bp; a= nu->pntsu*nu->pntsv; while(a--) { - index= getKeyIndexOrig_index(editnurb, bp); + index= getKeyIndexOrig_keyIndex(editnurb, bp); if (index >= 0) { curofp= ofp + index; @@ -962,6 +1004,121 @@ static void calc_shapeKeys(Object *obedit) } } +/* ********************* Amimation data *************** */ + +static int curve_is_animated(Object *ob) +{ + Curve *cu= (Curve*)ob->data; + AnimData *ad= BKE_animdata_from_id(&cu->id); + + return ad && ad->action; +} + +static void fcurve_path_rename(char *orig_rna_path, char *rna_path, ListBase *orig_curves, ListBase *curves) +{ + FCurve *fcu, *nfcu, *nextfcu; + int len= strlen(orig_rna_path); + + fcu= orig_curves->first; + while (fcu) { + nextfcu= fcu->next; + if(!strncmp(fcu->rna_path, orig_rna_path, len)) { + char *spath, *suffix= fcu->rna_path + len; + nfcu= copy_fcurve(fcu); + spath= nfcu->rna_path; + nfcu->rna_path= BLI_sprintfN("%s%s", rna_path, suffix); + BLI_addtail(curves, nfcu); + + BLI_remlink(orig_curves, fcu); + free_fcurve(fcu); + + MEM_freeN(spath); + } + fcu= nextfcu; + } +} + +void ED_curve_updateAnimPaths(Object *obedit) +{ + int nu_index= 0, a, pt_index; + Curve *cu= (Curve*)obedit->data; + EditNurb *editnurb= cu->editnurb; + Nurb *nu= editnurb->nurbs.first; + CVKeyIndex *keyIndex; + char rna_path[64], orig_rna_path[64]; + ListBase orig_curves= {0, 0}; + ListBase curves= {0, 0}; + AnimData *ad= BKE_animdata_from_id(&cu->id); + + if(!curve_is_animated(obedit)) return; + + copy_fcurves(&orig_curves, &editnurb->fcurves); + + while(nu) { + if(nu->bezt) { + BezTriple *bezt= nu->bezt; + a= nu->pntsu; + pt_index= 0; + + while (a--) { + keyIndex= getCVKeyIndex(editnurb, bezt); + if(keyIndex) { + sprintf(rna_path, "splines[%d].bezier_points[%d]", nu_index, pt_index); + sprintf(orig_rna_path, "splines[%d].bezier_points[%d]", keyIndex->nu_index, keyIndex->pt_index); + + if(keyIndex->switched) { + char handle_path[64], orig_handle_path[64]; + sprintf(orig_handle_path, "%s.handle_left", orig_rna_path); + sprintf(handle_path, "%s.handle_right", rna_path); + fcurve_path_rename(orig_handle_path, handle_path, &orig_curves, &curves); + + sprintf(orig_handle_path, "%s.handle_right", orig_rna_path); + sprintf(handle_path, "%s.handle_left", rna_path); + fcurve_path_rename(orig_handle_path, handle_path, &orig_curves, &curves); + } + + fcurve_path_rename(orig_rna_path, rna_path, &orig_curves, &curves); + } + + bezt++; + pt_index++; + } + } else { + BPoint *bp= nu->bp; + a= nu->pntsu * nu->pntsv; + pt_index= 0; + + while (a--) { + keyIndex= getCVKeyIndex(editnurb, bp); + if(keyIndex) { + sprintf(rna_path, "splines[%d].points[%d]", nu_index, pt_index); + sprintf(orig_rna_path, "splines[%d].points[%d]", keyIndex->nu_index, keyIndex->pt_index); + fcurve_path_rename(orig_rna_path, rna_path, &orig_curves, &curves); + } + + bp++; + pt_index++; + } + } + nu= nu->next; + nu_index++; + } + + nu_index= 0; + while(nu) { + if(keyIndex) { + sprintf(rna_path, "splines[%d]", nu_index); + sprintf(orig_rna_path, "splines[%d]", keyIndex->nu_index); + fcurve_path_rename(orig_rna_path, rna_path, &ad->action->curves, &curves); + } + nu_index++; + } + + free_fcurves(&ad->action->curves); + free_fcurves(&orig_curves); + ad->action->curves= curves; +} + /* ********************* LOAD and MAKE *************** */ /* load editNurb in object */ @@ -990,6 +1147,7 @@ void load_editNurb(Object *obedit) cu->nurb= newnurb; calc_shapeKeys(obedit); + ED_curve_updateAnimPaths(obedit); freeNurblist(&oldnurb); } @@ -1004,19 +1162,26 @@ void make_editNurb(Object *obedit) EditNurb *editnurb= cu->editnurb; Nurb *nu, *newnu, *nu_act= NULL; KeyBlock *actkey; + int is_anim; if(obedit==NULL) return; set_actNurb(obedit, NULL); if (ELEM(obedit->type, OB_CURVE, OB_SURF)) { - actkey = ob_get_keyblock(obedit); + actkey= ob_get_keyblock(obedit); + is_anim= curve_is_animated(obedit); + if(actkey) { // XXX strcpy(G.editModeTitleExtra, "(Key) "); undo_editmode_clear(); key_to_curve(actkey, cu, &cu->nurb); } + if (is_anim) { + undo_editmode_clear(); + } + if(editnurb) { freeNurblist(&editnurb->nurbs); free_editNurb_keyIndex(editnurb); @@ -1046,6 +1211,13 @@ void make_editNurb(Object *obedit) editnurb->shapenr= obedit->shapenr; init_editNurb_keyIndex(editnurb, &cu->nurb); } + + if(is_anim) { + AnimData *ad= BKE_animdata_from_id(&cu->id); + + init_editNurb_keyIndex(editnurb, &cu->nurb); + copy_fcurves(&editnurb->fcurves, &ad->action->curves); + } } } @@ -1054,6 +1226,7 @@ void free_curve_editNurb (Curve *cu) if(cu->editnurb) { freeNurblist(&cu->editnurb->nurbs); free_editNurb_keyIndex(cu->editnurb); + free_fcurves(&cu->editnurb->fcurves); MEM_freeN(cu->editnurb); cu->editnurb= NULL; } @@ -1475,6 +1648,8 @@ static int deleteflagNurb(bContext *C, wmOperator *UNUSED(op), int flag) nu= next; } + ED_curve_updateAnimPaths(obedit); + return OPERATOR_FINISHED; } @@ -1785,6 +1960,7 @@ static int switch_direction_exec(bContext *C, wmOperator *UNUSED(op)) keyData_switchDirectionNurb(cu, nu); } + ED_curve_updateAnimPaths(obedit); DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); @@ -3007,6 +3183,8 @@ static int subdivide_exec(bContext *C, wmOperator *op) subdividenurb(obedit, number_cuts); + ED_curve_updateAnimPaths(obedit); + WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); DAG_id_tag_update(obedit->data, OB_RECALC_DATA); @@ -3309,6 +3487,8 @@ static int set_spline_type_exec(bContext *C, wmOperator *op) } if(changed) { + ED_curve_updateAnimPaths(obedit); + DAG_id_tag_update(obedit->data, OB_RECALC_DATA); WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); @@ -3889,6 +4069,8 @@ static int make_segment_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } + ED_curve_updateAnimPaths(obedit); + WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); DAG_id_tag_update(obedit->data, OB_RECALC_DATA); @@ -4094,6 +4276,8 @@ static int spin_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } + ED_curve_updateAnimPaths(obedit); + WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); DAG_id_tag_update(obedit->data, OB_RECALC_DATA); @@ -4249,6 +4433,8 @@ static int addvert_Nurb(bContext *C, short mode, float location[3]) test2DNurb(nu); + ED_curve_updateAnimPaths(obedit); + WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); DAG_id_tag_update(obedit->data, OB_RECALC_DATA); @@ -4320,6 +4506,8 @@ static int extrude_exec(bContext *C, wmOperator *UNUSED(op)) } else { if(extrudeflagNurb(editnurb, 1)) { /* '1'= flag */ + ED_curve_updateAnimPaths(obedit); + WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); DAG_id_tag_update(obedit->data, OB_RECALC_DATA); } @@ -5249,6 +5437,7 @@ static int delete_exec(bContext *C, wmOperator *op) } else { keyIndex_delNurbList(editnurb, nubase); freeNurblist(nubase); + ED_curve_updateAnimPaths(obedit); } WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); @@ -5520,6 +5709,8 @@ static int delete_exec(bContext *C, wmOperator *op) freeNurblist(nubase); } + ED_curve_updateAnimPaths(obedit); + WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); DAG_id_tag_update(obedit->data, OB_RECALC_DATA); @@ -6517,7 +6708,7 @@ static void undoCurve_to_editCurve(void *ucu, void *cue) freeNurblist(editbase); if (undoCurve->undoIndex) { - BLI_ghash_free(editnurb->keyindex, NULL, (GHashValFreeFP)free_nodeKeyIndex); + BLI_ghash_free(editnurb->keyindex, NULL, (GHashValFreeFP)free_cvKeyIndex); editnurb->keyindex= dupli_keyIndexHash(undoCurve->undoIndex); } @@ -6582,7 +6773,7 @@ static void free_undoCurve(void *ucv) freeNurblist(&undoCurve->nubase); if (undoCurve->undoIndex) { - BLI_ghash_free(undoCurve->undoIndex, NULL, (GHashValFreeFP)free_nodeKeyIndex); + BLI_ghash_free(undoCurve->undoIndex, NULL, (GHashValFreeFP)free_cvKeyIndex); } MEM_freeN(undoCurve); diff --git a/source/blender/editors/include/ED_curve.h b/source/blender/editors/include/ED_curve.h index 55d4c2db3f6..666b11c7c0f 100644 --- a/source/blender/editors/include/ED_curve.h +++ b/source/blender/editors/include/ED_curve.h @@ -83,5 +83,7 @@ ListBase *ED_curve_editnurbs(struct Curve *cu); void ED_curve_beztcpy(struct EditNurb *editnurb, struct BezTriple *dst, struct BezTriple *src, int count); void ED_curve_bpcpy(struct EditNurb *editnurb, struct BPoint *dst, struct BPoint *src, int count); +void ED_curve_updateAnimPaths(struct Object *obedit); + #endif /* ED_CURVE_H */ diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index de6416e4488..61acdd79da4 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -155,6 +155,10 @@ typedef struct EditNurb { /* base of nurbs' list (old Curve->editnurb) */ ListBase nurbs; + /* copy of animation curves to keep them in consistent state */ + /* when changing curve topology */ + ListBase fcurves; + /* index data for shape keys */ struct GHash *keyindex; From 2c7a2a6a419f5d73baa958238f64a91d51ee7fae Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Mon, 6 Dec 2010 17:41:12 +0000 Subject: [PATCH 014/236] Sync fix with render branch. Solves crash with ob->bb not found. --- source/blender/blenkernel/intern/displist.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index 979bd13a35d..a6957d6ead1 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -1203,6 +1203,8 @@ void makeDispListMBall(Scene *scene, Object *ob) void makeDispListMBall_forRender(Scene *scene, Object *ob, ListBase *dispbase) { metaball_polygonize(scene, ob, dispbase); + tex_space_mball(ob); + object_deform_mball(ob, dispbase); } From 59268ca715bf605554002952173bc5e691c0ea04 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 6 Dec 2010 17:49:57 +0000 Subject: [PATCH 015/236] Update curve animation data when loading UndoCurve -- fixes memory corruption when starting playback after undo-ing topology changes The simpliest way was to change data at which undoCurve_to_editCurve and editCurve_to_undoCurve works from curve to object. Maybe it's not very cool, but still better than moving curve animation handlers outside of editcurve module. --- source/blender/editors/curve/editcurve.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 86cc4f2dd9d..07a588ad0da 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -6695,9 +6695,10 @@ static void *undo_check_lastsel(void *lastsel, Nurb *nu, Nurb *newnu) return NULL; } -static void undoCurve_to_editCurve(void *ucu, void *cue) +static void undoCurve_to_editCurve(void *ucu, void *obe) { - Curve *cu= cue; + Object *obedit= obe; + Curve *cu= (Curve*)obedit->data; UndoCurve *undoCurve= ucu; ListBase *undobase= &undoCurve->nubase; ListBase *editbase= ED_curve_editnurbs(cu); @@ -6728,11 +6729,14 @@ static void undoCurve_to_editCurve(void *ucu, void *cue) } cu->lastsel= lastsel; + + ED_curve_updateAnimPaths(obedit); } -static void *editCurve_to_undoCurve(void *cue) +static void *editCurve_to_undoCurve(void *obe) { - Curve *cu= cue; + Object *obedit= obe; + Curve *cu= (Curve*)obedit->data; ListBase *nubase= ED_curve_editnurbs(cu); UndoCurve *undoCurve; EditNurb *editnurb= cu->editnurb, tmpEditnurb; @@ -6782,7 +6786,7 @@ static void free_undoCurve(void *ucv) static void *get_data(bContext *C) { Object *obedit= CTX_data_edit_object(C); - return obedit->data; + return obedit; } /* and this is all the undo system needs to know */ From e779e3b08af31f0cb5f19ebc0267dd32868cc4c4 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Mon, 6 Dec 2010 18:10:08 +0000 Subject: [PATCH 016/236] Bugfix #25003 Pose mode: "Paste flipped" failed on not-normalized quaternions (for example ones you edited with buttons) --- source/blender/editors/armature/poseobject.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c index fbc0e4929ee..55d24550167 100644 --- a/source/blender/editors/armature/poseobject.c +++ b/source/blender/editors/armature/poseobject.c @@ -1015,6 +1015,7 @@ static int pose_paste_exec (bContext *C, wmOperator *op) else { float eul[3]; + normalize_qt(pchan->quat); quat_to_eul(eul, pchan->quat); eul[1]*= -1; eul[2]*= -1; From 79ac49e2909bd6e09bbdd7b84c6b818b9137d57f Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Mon, 6 Dec 2010 18:58:04 +0000 Subject: [PATCH 017/236] Bugfix #25060 Edit mesh: CTRL+Click added vertices in edge/face select mode, but doesn't draw them. Better disable it then. Also removed dangling event print. --- source/blender/editors/mesh/editmesh_add.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index f8c33b60b4a..c601a583d02 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -114,7 +114,7 @@ static int dupli_extrude_cursor(bContext *C, wmOperator *op, wmEvent *event) float min[3], max[3]; int done= 0; short use_proj; -printf("%d\n", event->val); + em_setup_viewcontext(C, &vc); use_proj= (vc.scene->toolsettings->snap_flag & SCE_SNAP) && (vc.scene->toolsettings->snap_mode==SCE_SNAP_MODE_FACE); @@ -237,7 +237,8 @@ printf("%d\n", event->val); recalc_editnormals(vc.em); } - else { + else if(vc.em->selectmode & SCE_SELECT_VERTEX) { + float mat[3][3],imat[3][3]; float *curs= give_cursor(vc.scene, vc.v3d); From 8e8b07cc07048f4445e6ff4f07fa12d0c89d4ff0 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 6 Dec 2010 21:18:08 +0000 Subject: [PATCH 018/236] Got rid of old-school searching CVs for index update. No more infinity loops could happen -- only keyIndex data loose. But it's smaller harm and actually could be easily fixed and it's more correct way. --- source/blender/editors/curve/editcurve.c | 50 +++++++++++------------- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 07a588ad0da..1a700868a96 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -450,7 +450,7 @@ static void keyIndex_delNurbList(EditNurb *editnurb, ListBase *nubase) } static void keyIndex_updateCV(EditNurb *editnurb, char *cv, - char *newcv, int count, int size, int search) + char *newcv, int count, int size) { int i; CVKeyIndex *index; @@ -461,13 +461,7 @@ static void keyIndex_updateCV(EditNurb *editnurb, char *cv, } for (i = 0; i < count; i++) { - for (;;) { - index= getCVKeyIndex(editnurb, cv); - if (!search || index) { - break; - } - cv += size; - } + index= getCVKeyIndex(editnurb, cv); BLI_ghash_remove(editnurb->keyindex, cv, NULL, NULL); @@ -481,23 +475,23 @@ static void keyIndex_updateCV(EditNurb *editnurb, char *cv, } static void keyIndex_updateBezt(EditNurb *editnurb, BezTriple *bezt, - BezTriple *newbezt, int count, int search) + BezTriple *newbezt, int count) { - keyIndex_updateCV(editnurb, (char*)bezt, (char*)newbezt, count, sizeof(BezTriple), search); + keyIndex_updateCV(editnurb, (char*)bezt, (char*)newbezt, count, sizeof(BezTriple)); } static void keyIndex_updateBP(EditNurb *editnurb, BPoint *bp, - BPoint *newbp, int count, int search) + BPoint *newbp, int count) { - keyIndex_updateCV(editnurb, (char*)bp, (char*)newbp, count, sizeof(BPoint), search); + keyIndex_updateCV(editnurb, (char*)bp, (char*)newbp, count, sizeof(BPoint)); } static void keyIndex_updateNurb(EditNurb *editnurb, Nurb *nu, Nurb *newnu) { if (nu->bezt) { - keyIndex_updateBezt(editnurb, nu->bezt, newnu->bezt, newnu->pntsu, 0); + keyIndex_updateBezt(editnurb, nu->bezt, newnu->bezt, newnu->pntsu); } else { - keyIndex_updateBP(editnurb, nu->bp, newnu->bp, newnu->pntsu * newnu->pntsv, 0); + keyIndex_updateBP(editnurb, nu->bp, newnu->bp, newnu->pntsu * newnu->pntsv); } } @@ -1580,6 +1574,7 @@ static int deleteflagNurb(bContext *C, wmOperator *UNUSED(op), int flag) for(b=0; bpntsv; b++) { if((bp->f1 & flag)==0) { memcpy(bpn, bp, nu->pntsu*sizeof(BPoint)); + keyIndex_updateBP(cu->editnurb, bp, bpn, nu->pntsu); bpn+= nu->pntsu; } else { keyIndex_delBP(cu->editnurb, bp); @@ -1587,7 +1582,6 @@ static int deleteflagNurb(bContext *C, wmOperator *UNUSED(op), int flag) bp+= nu->pntsu; } nu->pntsv= newv; - keyIndex_updateBP(cu->editnurb, nu->bp, newbp, newv * nu->pntsu, 1); MEM_freeN(nu->bp); nu->bp= newbp; clamp_nurb_order_v(nu); @@ -1620,13 +1614,13 @@ static int deleteflagNurb(bContext *C, wmOperator *UNUSED(op), int flag) for(a=0; apntsu; a++, bp++) { if((bp->f1 & flag)==0) { *bpn= *bp; + keyIndex_updateBP(cu->editnurb, bp, bpn, 1); bpn++; } else { keyIndex_delBP(cu->editnurb, bp); } } } - keyIndex_updateBP(cu->editnurb, nu->bp, newbp, newu * nu->pntsv, 1); MEM_freeN(nu->bp); nu->bp= newbp; if(newu==1 && nu->pntsv>1) { /* make a U spline */ @@ -2832,7 +2826,7 @@ static void subdividenurb(Object *obedit, int number_cuts) } while(a--) { memcpy(beztn, prevbezt, sizeof(BezTriple)); - keyIndex_updateBezt(editnurb, prevbezt, beztn, 1, 0); + keyIndex_updateBezt(editnurb, prevbezt, beztn, 1); beztn++; if( BEZSELECTED_HIDDENHANDLES(cu, prevbezt) && BEZSELECTED_HIDDENHANDLES(cu, bezt) ) { @@ -2877,7 +2871,7 @@ static void subdividenurb(Object *obedit, int number_cuts) /* last point */ if((nu->flagu & CU_NURB_CYCLIC)==0) { memcpy(beztn, prevbezt, sizeof(BezTriple)); - keyIndex_updateBezt(editnurb, prevbezt, beztn, 1, 0); + keyIndex_updateBezt(editnurb, prevbezt, beztn, 1); } MEM_freeN(nu->bezt); @@ -2929,7 +2923,7 @@ static void subdividenurb(Object *obedit, int number_cuts) } while(a--) { memcpy(bpn, prevbp, sizeof(BPoint)); - keyIndex_updateBP(editnurb, prevbp, bpn, 1, 0); + keyIndex_updateBP(editnurb, prevbp, bpn, 1); bpn++; if( (bp->f1 & SELECT) && (prevbp->f1 & SELECT) ) { @@ -2948,7 +2942,7 @@ static void subdividenurb(Object *obedit, int number_cuts) } if((nu->flagu & CU_NURB_CYCLIC)==0) { /* last point */ memcpy(bpn, prevbp, sizeof(BPoint)); - keyIndex_updateBP(editnurb, prevbp, bpn, 1, 0); + keyIndex_updateBP(editnurb, prevbp, bpn, 1); } MEM_freeN(nu->bp); @@ -3036,7 +3030,7 @@ static void subdividenurb(Object *obedit, int number_cuts) for(a=0; apntsv; a++) { for(b=0; bpntsu; b++) { *bpn= *bp; - keyIndex_updateBP(editnurb, bp, bpn, 1, 0); + keyIndex_updateBP(editnurb, bp, bpn, 1); bpn++; bp++; if(bpntsu-1) { @@ -3093,7 +3087,7 @@ static void subdividenurb(Object *obedit, int number_cuts) for(a=0; apntsv; a++) { for(b=0; bpntsu; b++) { *bpn= *bp; - keyIndex_updateBP(editnurb, bp, bpn, 1, 0); + keyIndex_updateBP(editnurb, bp, bpn, 1); bpn++; bp++; } @@ -3140,7 +3134,7 @@ static void subdividenurb(Object *obedit, int number_cuts) for(a=0; apntsv; a++) { for(b=0; bpntsu; b++) { *bpn= *bp; - keyIndex_updateBP(editnurb, bp, bpn, 1, 0); + keyIndex_updateBP(editnurb, bp, bpn, 1); bpn++; bp++; if( (bpntsu-1) && usel[b]==nu->pntsv && usel[b+1]==nu->pntsv ) { @@ -5507,6 +5501,7 @@ static int delete_exec(bContext *C, wmOperator *op) if( BEZSELECTED_HIDDENHANDLES(cu, bezt) ) { memmove(bezt, bezt+1, (nu->pntsu-a-1)*sizeof(BezTriple)); keyIndex_delBezt(editnurb, bezt + delta); + keyIndex_updateBezt(editnurb, bezt + 1, bezt, nu->pntsu-a-1); nu->pntsu--; a--; type= 1; @@ -5518,7 +5513,7 @@ static int delete_exec(bContext *C, wmOperator *op) bezt1 = (BezTriple*)MEM_mallocN((nu->pntsu) * sizeof(BezTriple), "delNurb"); memcpy(bezt1, nu->bezt, (nu->pntsu)*sizeof(BezTriple) ); - keyIndex_updateBezt(editnurb, nu->bezt, bezt1, nu->pntsu, 1); + keyIndex_updateBezt(editnurb, nu->bezt, bezt1, nu->pntsu); MEM_freeN(nu->bezt); nu->bezt= bezt1; calchandlesNurb(nu); @@ -5532,6 +5527,7 @@ static int delete_exec(bContext *C, wmOperator *op) if( bp->f1 & SELECT ) { memmove(bp, bp+1, (nu->pntsu-a-1)*sizeof(BPoint)); keyIndex_delBP(editnurb, bp + delta); + keyIndex_updateBP(editnurb, bp+1, bp, nu->pntsu-a-1); nu->pntsu--; a--; type= 1; @@ -5544,7 +5540,7 @@ static int delete_exec(bContext *C, wmOperator *op) if(type) { bp1 = (BPoint*)MEM_mallocN(nu->pntsu * sizeof(BPoint), "delNurb2"); memcpy(bp1, nu->bp, (nu->pntsu)*sizeof(BPoint) ); - keyIndex_updateBP(editnurb, nu->bp, bp1, nu->pntsu, 1); + keyIndex_updateBP(editnurb, nu->bp, bp1, nu->pntsu); MEM_freeN(nu->bp); nu->bp= bp1; @@ -6807,11 +6803,11 @@ ListBase *ED_curve_editnurbs(Curve *cu) void ED_curve_beztcpy(EditNurb *editnurb, BezTriple *dst, BezTriple *src, int count) { memcpy(dst, src, count*sizeof(BezTriple)); - keyIndex_updateBezt(editnurb, src, dst, count, 0); + keyIndex_updateBezt(editnurb, src, dst, count); } void ED_curve_bpcpy(EditNurb *editnurb, BPoint *dst, BPoint *src, int count) { memcpy(dst, src, count*sizeof(BPoint)); - keyIndex_updateBP(editnurb, src, dst, count, 0); + keyIndex_updateBP(editnurb, src, dst, count); } From 4425331729fe2fc5fbca28c706df8e081f4577ee Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 7 Dec 2010 00:48:36 +0000 Subject: [PATCH 019/236] fix for crash on missing NULL check, Brecht, changed this to update the duplicate objects data rather then the old ones incase they are not linked. --- source/blender/editors/object/object_add.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 58985a97a72..5a4bbaf480c 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -1658,8 +1658,10 @@ static int duplicate_exec(bContext *C, wmOperator *op) /* new object becomes active */ if(BASACT==base) ED_base_object_activate(C, basen); - - DAG_id_tag_update(base->object->data, 0); + + if(basen->object->data) { + DAG_id_tag_update(basen->object->data, 0); + } } CTX_DATA_END; From 8bd5425a71420a4ff2a3bcc241795abb8d64b5e3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 7 Dec 2010 01:30:14 +0000 Subject: [PATCH 020/236] incorrect paranoid check for drawing texture face mode with no faces, it would crash in this case anyway. instead check for faces from the caller. --- source/blender/editors/space_view3d/drawmesh.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c index 67372821631..e38e9309611 100644 --- a/source/blender/editors/space_view3d/drawmesh.c +++ b/source/blender/editors/space_view3d/drawmesh.c @@ -526,10 +526,10 @@ static int draw_tface_mapped__set_draw(void *userData, int index) { Mesh *me = (Mesh*)userData; MTFace *tface = (me->mtface)? &me->mtface[index]: NULL; - MFace *mface = (me->mface)? &me->mface[index]: NULL; + MFace *mface = &me->mface[index]; MCol *mcol = (me->mcol)? &me->mcol[index]: NULL; - int matnr = me->mface[index].mat_nr; - if (mface && mface->flag&ME_HIDE) return 0; + const int matnr = mface->mat_nr; + if (mface->flag & ME_HIDE) return 0; return draw_tface__set_draw(tface, mcol, matnr); } @@ -669,7 +669,7 @@ void draw_mesh_textured(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *o if(ob->mode & OB_MODE_WEIGHT_PAINT) dm->drawMappedFaces(dm, wpaint__setSolidDrawOptions, me, 1, GPU_enable_material); else - dm->drawMappedFacesTex(dm, draw_tface_mapped__set_draw, me); + dm->drawMappedFacesTex(dm, me->mface ? draw_tface_mapped__set_draw : NULL, me); } else { if( GPU_buffer_legacy(dm) ) From 7b39a7cdb9a1fd6dc08b3098800e0edce9d8a28e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 7 Dec 2010 01:38:42 +0000 Subject: [PATCH 021/236] mathutils quaternion axis/angle access was broken for non unit lenth quats, would return NAN's in simple cases. now normalize upon conversion, when setting the quat axis/ange, maintain length by scaling back to the original size afterwards. --- .../blender/python/generic/mathutils_quat.c | 36 ++++++++++++++----- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/source/blender/python/generic/mathutils_quat.c b/source/blender/python/generic/mathutils_quat.c index c5a2591e396..733e2b902c4 100644 --- a/source/blender/python/generic/mathutils_quat.c +++ b/source/blender/python/generic/mathutils_quat.c @@ -71,6 +71,7 @@ static char Quaternion_ToEuler_doc[] = static PyObject *Quaternion_ToEuler(QuaternionObject * self, PyObject *args) { + float tquat[4]; float eul[3]; char *order_str= NULL; short order= EULER_ORDER_XYZ; @@ -88,6 +89,8 @@ static PyObject *Quaternion_ToEuler(QuaternionObject * self, PyObject *args) if(order == -1) return NULL; } + + normalize_qt_qt(tquat, self->quat); if(eul_compat) { float mat[3][3]; @@ -95,14 +98,14 @@ static PyObject *Quaternion_ToEuler(QuaternionObject * self, PyObject *args) if(!BaseMath_ReadCallback(eul_compat)) return NULL; - quat_to_mat3(mat, self->quat); + quat_to_mat3(mat, tquat); if(order == EULER_ORDER_XYZ) mat3_to_compatible_eul(eul, eul_compat->eul, mat); else mat3_to_compatible_eulO(eul, eul_compat->eul, order, mat); } else { - if(order == EULER_ORDER_XYZ) quat_to_eul(eul, self->quat); - else quat_to_eulO(eul, order, self->quat); + if(order == EULER_ORDER_XYZ) quat_to_eul(eul, tquat); + else quat_to_eulO(eul, order, tquat); } return newEulerObject(eul, order, Py_NEW, NULL); @@ -765,21 +768,28 @@ static PyObject *Quaternion_getMagnitude(QuaternionObject * self, void *UNUSED(c static PyObject *Quaternion_getAngle(QuaternionObject * self, void *UNUSED(closure)) { + float tquat[4]; + if(!BaseMath_ReadCallback(self)) return NULL; - return PyFloat_FromDouble(2.0 * (saacos(self->quat[0]))); + normalize_qt_qt(tquat, self->quat); + return PyFloat_FromDouble(2.0 * (saacos(tquat[0]))); } static int Quaternion_setAngle(QuaternionObject * self, PyObject * value, void *UNUSED(closure)) { + float tquat[4]; + float len; + float axis[3]; float angle; if(!BaseMath_ReadCallback(self)) return -1; - quat_to_axis_angle(axis, &angle, self->quat); + len= normalize_qt_qt(tquat, self->quat); + quat_to_axis_angle(axis, &angle, tquat); angle = PyFloat_AsDouble(value); @@ -797,6 +807,7 @@ static int Quaternion_setAngle(QuaternionObject * self, PyObject * value, void * } axis_angle_to_quat(self->quat, axis, angle); + mul_qt_fl(self->quat, len); if(!BaseMath_WriteCallback(self)) return -1; @@ -806,13 +817,16 @@ static int Quaternion_setAngle(QuaternionObject * self, PyObject * value, void * static PyObject *Quaternion_getAxisVec(QuaternionObject *self, void *UNUSED(closure)) { + float tquat[4]; + float axis[3]; float angle; if(!BaseMath_ReadCallback(self)) return NULL; - - quat_to_axis_angle(axis, &angle, self->quat); + + normalize_qt_qt(tquat, self->quat); + quat_to_axis_angle(axis, &angle, tquat); /* If the axis of rotation is 0,0,0 set it to 1,0,0 - for zero-degree rotations */ if( EXPP_FloatsAreEqual(axis[0], 0.0f, 10) && @@ -827,15 +841,20 @@ static PyObject *Quaternion_getAxisVec(QuaternionObject *self, void *UNUSED(clos static int Quaternion_setAxisVec(QuaternionObject *self, PyObject *value, void *UNUSED(closure)) { + float tquat[4]; + float len; + float axis[3]; float angle; VectorObject *vec; + if(!BaseMath_ReadCallback(self)) return -1; - quat_to_axis_angle(axis, &angle, self->quat); + len= normalize_qt_qt(tquat, self->quat); + quat_to_axis_angle(axis, &angle, tquat); if(!VectorObject_Check(value)) { PyErr_SetString(PyExc_TypeError, "quaternion.axis = value: expected a 3D Vector"); @@ -847,6 +866,7 @@ static int Quaternion_setAxisVec(QuaternionObject *self, PyObject *value, void * return -1; axis_angle_to_quat(self->quat, vec->vec, angle); + mul_qt_fl(self->quat, len); if(!BaseMath_WriteCallback(self)) return -1; From fe0f78a66978f52eac94199baffc577cbf7c1123 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Tue, 7 Dec 2010 01:54:25 +0000 Subject: [PATCH 022/236] BGE BugFix: [#21246] Some values for ipoactuator.frameEnd and frameStart make ipo not play the first time This is a bug as old as the ability to change the actuator values through Python. For the records: although Blender supports floats as frame values BGE doesn't. It could but it doesn't. So only integers (longs) will be valid start/end frames. --- source/gameengine/Ketsji/KX_IpoActuator.cpp | 57 +++++++++++++++++++-- source/gameengine/Ketsji/KX_IpoActuator.h | 8 +++ 2 files changed, 60 insertions(+), 5 deletions(-) diff --git a/source/gameengine/Ketsji/KX_IpoActuator.cpp b/source/gameengine/Ketsji/KX_IpoActuator.cpp index 605aea5f592..7bc85f5f262 100644 --- a/source/gameengine/Ketsji/KX_IpoActuator.cpp +++ b/source/gameengine/Ketsji/KX_IpoActuator.cpp @@ -81,7 +81,7 @@ KX_IpoActuator::KX_IpoActuator(SCA_IObject* gameobj, m_ipo_local(ipo_local), m_type(acttype) { - m_starttime = -2.0*fabs(m_endframe - m_startframe) - 1.0; + this->ResetStartTime(); m_bIpoPlaying = false; } @@ -176,7 +176,7 @@ bool KX_IpoActuator::Update(double curtime, bool frame) bool result=true; if (!bNegativeEvent) { - if (m_starttime < -2.0f*start_smaller_then_end*(m_endframe - m_startframe)) + if (m_starttime < -2.0f*fabs(m_endframe - m_startframe)) { // start for all Ipo, initial start for LOOP_STOP m_starttime = curtime; @@ -371,13 +371,18 @@ bool KX_IpoActuator::Update(double curtime, bool frame) if (!result) { if (m_type != KX_ACT_IPO_LOOPSTOP) - m_starttime = -2.0*start_smaller_then_end*(m_endframe - m_startframe) - 1.0; + this->ResetStartTime(); m_bIpoPlaying = false; } return result; } +void KX_IpoActuator::ResetStartTime() +{ + this->m_starttime = -2.0*fabs(this->m_endframe - this->m_startframe) - 1.0; +} + int KX_IpoActuator::string2mode(char* modename) { IpoActType res = KX_ACT_IPO_NODEF; @@ -435,8 +440,8 @@ PyMethodDef KX_IpoActuator::Methods[] = { }; PyAttributeDef KX_IpoActuator::Attributes[] = { - KX_PYATTRIBUTE_FLOAT_RW("frameStart", 0, 300000, KX_IpoActuator, m_startframe), - KX_PYATTRIBUTE_FLOAT_RW("frameEnd", 0, 300000, KX_IpoActuator, m_endframe), + KX_PYATTRIBUTE_RW_FUNCTION("frameStart", KX_IpoActuator, pyattr_get_frame_start, pyattr_set_frame_start), + KX_PYATTRIBUTE_RW_FUNCTION("frameEnd", KX_IpoActuator, pyattr_get_frame_end, pyattr_set_frame_end), KX_PYATTRIBUTE_STRING_RW("propName", 0, 64, false, KX_IpoActuator, m_propname), KX_PYATTRIBUTE_STRING_RW("framePropName", 0, 64, false, KX_IpoActuator, m_framepropname), KX_PYATTRIBUTE_INT_RW("mode", KX_ACT_IPO_NODEF+1, KX_ACT_IPO_MAX-1, true, KX_IpoActuator, m_type), @@ -448,6 +453,48 @@ PyAttributeDef KX_IpoActuator::Attributes[] = { { NULL } //Sentinel }; +PyObject* KX_IpoActuator::pyattr_get_frame_start(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +{ + KX_IpoActuator* self= static_cast(self_v); + return PyLong_FromDouble(self->m_startframe); +} + +int KX_IpoActuator::pyattr_set_frame_start(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value) +{ + KX_IpoActuator* self= static_cast(self_v); + float param = PyLong_AsDouble(value); + + if (PyErr_Occurred()) { + PyErr_SetString(PyExc_AttributeError, "frameStart = integer: KX_IpoActuator, expected an integer value"); + return PY_SET_ATTR_FAIL; + } + + self->m_startframe = param; + self->ResetStartTime(); + return PY_SET_ATTR_SUCCESS; +} + +PyObject* KX_IpoActuator::pyattr_get_frame_end(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +{ + KX_IpoActuator* self= static_cast(self_v); + return PyLong_FromDouble(self->m_endframe); +} + +int KX_IpoActuator::pyattr_set_frame_end(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value) +{ + KX_IpoActuator* self= static_cast(self_v); + float param = PyLong_AsDouble(value); + + if (PyErr_Occurred()) { + PyErr_SetString(PyExc_AttributeError, "frameEnd = integer: KX_IpoActuator, expected an integer value"); + return PY_SET_ATTR_FAIL; + } + + self->m_endframe = param; + self->ResetStartTime(); + return PY_SET_ATTR_SUCCESS; +} + #endif // WITH_PYTHON /* eof */ diff --git a/source/gameengine/Ketsji/KX_IpoActuator.h b/source/gameengine/Ketsji/KX_IpoActuator.h index cefd00c4ae3..dc3ff5543f9 100644 --- a/source/gameengine/Ketsji/KX_IpoActuator.h +++ b/source/gameengine/Ketsji/KX_IpoActuator.h @@ -86,6 +86,9 @@ protected: bool m_bIpoPlaying; + /** Reset/Update the start time*/ + void ResetStartTime(); + public: enum IpoActType { @@ -100,6 +103,11 @@ public: KX_ACT_IPO_MAX }; + static PyObject* pyattr_get_frame_start(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); + static int pyattr_set_frame_start(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); + static PyObject* pyattr_get_frame_end(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); + static int pyattr_set_frame_end(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); + static const char *S_KX_ACT_IPO_PLAY_STRING; static const char *S_KX_ACT_IPO_PINGPONG_STRING; static const char *S_KX_ACT_IPO_FLIPPER_STRING; From 48614fbc2af024d613845b03d632e544f8127261 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 7 Dec 2010 01:56:32 +0000 Subject: [PATCH 023/236] Added an assert() check for normalized quats which exposed a number of bugs where normalized quat was incorrectly assumed. This would have made bug #25003 very simple to find. - Objects had their quats normalized when calculating their matrix, this is inconstant with pose bones and isn't useful for animation. Also it wasn't normalizing the delta rotation so these would give bad rotations. - Converting between rotation modes BKE_rotMode_change_values() assumed normal length quat. changing quat to euler rotation for eg could change the bone. - Clear rotation and transform were not normalizing the quat when 4d loc was disabled on quat rotation, corrected and also made it so the quat scale is restored after conversion so animations curves dont jump. There is 1 case in mat3_to_quat_is_ok() where quat_to_mat3 on an unnormalized quat is needed, for this I had to add an ugly static function quat_to_mat3_no_assert(), but overall its worthwhile IMHO to be able to find incorrect use of rotation conversion. --- source/blender/blenkernel/intern/anim.c | 14 ++++--- source/blender/blenkernel/intern/armature.c | 5 ++- source/blender/blenkernel/intern/object.c | 14 ++++--- source/blender/blenlib/BLI_math_rotation.h | 5 ++- source/blender/blenlib/intern/math_rotation.c | 38 ++++++++++++++++--- .../blender/editors/armature/editarmature.c | 14 ++++--- source/blender/editors/transform/transform.c | 25 +++++++----- 7 files changed, 81 insertions(+), 34 deletions(-) diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c index b58bd8c7f3e..b479bd5ef28 100644 --- a/source/blender/blenkernel/intern/anim.c +++ b/source/blender/blenkernel/intern/anim.c @@ -1339,12 +1339,16 @@ static void new_particle_duplilist(ListBase *lb, ID *UNUSED(id), Scene *scene, O else { /* first key */ state.time = ctime; - if(psys_get_particle_state(&sim, a, &state, 0) == 0) + if(psys_get_particle_state(&sim, a, &state, 0) == 0) { continue; - - quat_to_mat4( pamat,state.rot); - VECCOPY(pamat[3], state.co); - pamat[3][3]= 1.0f; + } + else { + float tquat[4]; + normalize_qt_qt(tquat, state.rot); + quat_to_mat4(pamat, tquat); + copy_v3_v3(pamat[3], state.co); + pamat[3][3]= 1.0f; + } } if(part->ren_as==PART_DRAW_GR && psys->part->draw & PART_DRAW_WHOLE_GR) { diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index b4bdb516ab3..0d1d08af44c 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -1248,6 +1248,7 @@ void BKE_rotMode_change_values (float quat[4], float eul[3], float axis[3], floa } else if (oldMode == ROT_MODE_QUAT) { /* quat to euler */ + normalize_qt(quat); quat_to_eulO( eul, newMode,quat); } /* else { no conversion needed } */ @@ -1270,6 +1271,7 @@ void BKE_rotMode_change_values (float quat[4], float eul[3], float axis[3], floa } else if (oldMode == ROT_MODE_QUAT) { /* quat to axis angle */ + normalize_qt(quat); quat_to_axis_angle( axis, angle,quat); } @@ -2092,8 +2094,7 @@ void pchan_to_mat4(bPoseChannel *pchan, float chan_mat[4][4]) * but if this proves to be too problematic, switch back to the old system of operating directly on * the stored copy */ - QUATCOPY(quat, pchan->quat); - normalize_qt(quat); + normalize_qt_qt(quat, pchan->quat); quat_to_mat3(rmat, quat); } diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 5f2a10c0b3e..b98927db877 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1668,9 +1668,13 @@ void object_rot_to_mat3(Object *ob, float mat[][3]) } else { /* quats are normalised before use to eliminate scaling issues */ - normalize_qt(ob->quat); - quat_to_mat3( rmat,ob->quat); - quat_to_mat3( dmat,ob->dquat); + float tquat[4]; + + normalize_qt_qt(tquat, ob->quat); + quat_to_mat3(rmat, tquat); + + normalize_qt_qt(tquat, ob->quat); + quat_to_mat3(dmat, tquat); } /* combine these rotations */ @@ -1818,8 +1822,8 @@ static void ob_parcurve(Scene *scene, Object *ob, Object *par, float mat[][4]) #else quat_apply_track(quat, ob->trackflag, ob->upflag); #endif - - quat_to_mat4(mat,quat); + normalize_qt(quat); + quat_to_mat4(mat, quat); } if(cu->flag & CU_PATH_RADIUS) { diff --git a/source/blender/blenlib/BLI_math_rotation.h b/source/blender/blenlib/BLI_math_rotation.h index 19ecce1040b..72147962316 100644 --- a/source/blender/blenlib/BLI_math_rotation.h +++ b/source/blender/blenlib/BLI_math_rotation.h @@ -51,10 +51,11 @@ void mul_fac_qt_fl(float q[4], const float f); void sub_qt_qtqt(float q[4], const float a[4], const float b[4]); void invert_qt(float q[4]); -void invert_qt_qt(float *q1, const float *q2); +void invert_qt_qt(float q1[4], const float q2[4]); void conjugate_qt(float q[4]); float dot_qtqt(const float a[4], const float b[4]); -void normalize_qt(float q[4]); +float normalize_qt(float q[4]); +float normalize_qt_qt(float q1[4], const float q2[4]); /* comparison */ int is_zero_qt(float q[4]); diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c index 5f6f7ac54d9..a3e57605ad4 100644 --- a/source/blender/blenlib/intern/math_rotation.c +++ b/source/blender/blenlib/intern/math_rotation.c @@ -31,6 +31,9 @@ /******************************** Quaternions ********************************/ +/* used to test is a quat is not normalized */ +#define QUAT_EPSILON 0.00001 + void unit_qt(float *q) { q[0]= 1.0f; @@ -144,7 +147,8 @@ void mul_fac_qt_fl(float *q, const float fac) mul_v3_fl(q+1, si); } -void quat_to_mat3(float m[][3], const float q[4]) +/* skip error check, currently only needed by mat3_to_quat_is_ok */ +static void quat_to_mat3_no_assert(float m[][3], const float q[4]) { double q0, q1, q2, q3, qda,qdb,qdc,qaa,qab,qac,qbb,qbc,qcc; @@ -176,10 +180,23 @@ void quat_to_mat3(float m[][3], const float q[4]) m[2][2]= (float)(1.0-qaa-qbb); } + +void quat_to_mat3(float m[][3], const float q[4]) +{ + /* throw an error if the quat isn't normalized */ + float f; + assert((f=dot_qtqt(q, q))==0.0 || (fabs(f-1.0) < QUAT_EPSILON)); + + quat_to_mat3_no_assert(m, q); +} + void quat_to_mat4(float m[][4], const float q[4]) { double q0, q1, q2, q3, qda,qdb,qdc,qaa,qab,qac,qbb,qbc,qcc; + /* throw an error if the quat isn't normalized */ + assert((q0=dot_qtqt(q, q))==0.0 || (fabs(q0-1.0) < QUAT_EPSILON)); + q0= M_SQRT2 * q[0]; q1= M_SQRT2 * q[1]; q2= M_SQRT2 * q[2]; @@ -300,7 +317,7 @@ void mat3_to_quat_is_ok(float q[4], float wmat[3][3]) q1[3]= -nor[2]*si; /* rotate back x-axis from mat, using inverse q1 */ - quat_to_mat3( matr,q1); + quat_to_mat3_no_assert( matr,q1); invert_m3_m3(matn, matr); mul_m3_v3(matn, mat[0]); @@ -318,7 +335,7 @@ void mat3_to_quat_is_ok(float q[4], float wmat[3][3]) } -void normalize_qt(float *q) +float normalize_qt(float *q) { float len; @@ -330,6 +347,14 @@ void normalize_qt(float *q) q[1]= 1.0f; q[0]= q[2]= q[3]= 0.0f; } + + return len; +} + +float normalize_qt_qt(float r[4], const float q[4]) +{ + copy_qt_qt(r, q); + return normalize_qt(r); } /* note: expects vectors to be normalized */ @@ -619,7 +644,10 @@ void axis_angle_to_quat(float q[4], const float axis[3], float angle) void quat_to_axis_angle(float axis[3], float *angle, const float q[4]) { float ha, si; - + + /* throw an error if the quat isn't normalized */ + assert((ha=dot_qtqt(q, q))==0.0 || (fabs(ha-1.0) < QUAT_EPSILON)); + /* calculate angle/2, and sin(angle/2) */ ha= (float)acos(q[0]); si= (float)sin(ha); @@ -925,7 +953,7 @@ void mat4_to_eul(float *eul,float tmat[][4]) void quat_to_eul(float *eul, const float quat[4]) { float mat[3][3]; - + quat_to_mat3(mat,quat); mat3_to_eul(eul,mat); } diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 2e251a67a34..36544bcb086 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -5026,10 +5026,11 @@ static int pose_clear_rot_exec(bContext *C, wmOperator *UNUSED(op)) else { /* perform clamping using euler form (3-components) */ float eul[3], oldeul[3], quat1[4] = {0}; + float qlen; if (pchan->rotmode == ROT_MODE_QUAT) { - copy_qt_qt(quat1, pchan->quat); - quat_to_eul( oldeul,pchan->quat); + qlen= normalize_qt_qt(quat1, pchan->quat); + quat_to_eul(oldeul, quat1); } else if (pchan->rotmode == ROT_MODE_AXISANGLE) { axis_angle_to_eulO( oldeul, EULER_ORDER_DEFAULT,pchan->rotAxis, pchan->rotAngle); @@ -5048,7 +5049,11 @@ static int pose_clear_rot_exec(bContext *C, wmOperator *UNUSED(op)) eul[2]= oldeul[2]; if (pchan->rotmode == ROT_MODE_QUAT) { - eul_to_quat( pchan->quat,eul); + eul_to_quat(pchan->quat, eul); + + /* restore original quat size */ + mul_qt_fl(pchan->quat, qlen); + /* quaternions flip w sign to accumulate rotations correctly */ if ((quat1[0]<0.0f && pchan->quat[0]>0.0f) || (quat1[0]>0.0f && pchan->quat[0]<0.0f)) { mul_qt_fl(pchan->quat, -1.0f); @@ -5064,8 +5069,7 @@ static int pose_clear_rot_exec(bContext *C, wmOperator *UNUSED(op)) } // Duplicated in source/blender/editors/object/object_transform.c else { if (pchan->rotmode == ROT_MODE_QUAT) { - pchan->quat[1]=pchan->quat[2]=pchan->quat[3]= 0.0f; - pchan->quat[0]= 1.0f; + unit_qt(pchan->quat); } else if (pchan->rotmode == ROT_MODE_AXISANGLE) { /* by default, make rotation of 0 radians around y-axis (roll) */ diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 36438712d09..4b6079001ff 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -1917,23 +1917,29 @@ static void protectedQuaternionBits(short protectflag, float *quat, float *oldqu } else { /* quaternions get limited with euler... (compatability mode) */ - float eul[3], oldeul[3], quat1[4]; - - QUATCOPY(quat1, quat); - quat_to_eul( eul,quat); - quat_to_eul( oldeul,oldquat); - + float eul[3], oldeul[3], nquat[4], noldquat[4]; + float qlen; + + qlen= normalize_qt_qt(nquat, quat); + normalize_qt_qt(noldquat, oldquat); + + quat_to_eul(eul, nquat); + quat_to_eul(oldeul, noldquat); + if (protectflag & OB_LOCK_ROTX) eul[0]= oldeul[0]; if (protectflag & OB_LOCK_ROTY) eul[1]= oldeul[1]; if (protectflag & OB_LOCK_ROTZ) eul[2]= oldeul[2]; - + eul_to_quat( quat,eul); + + /* restore original quat size */ + mul_qt_fl(quat, qlen); /* quaternions flip w sign to accumulate rotations correctly */ - if ( (quat1[0]<0.0f && quat[0]>0.0f) || (quat1[0]>0.0f && quat[0]<0.0f) ) { + if ( (nquat[0]<0.0f && quat[0]>0.0f) || (nquat[0]>0.0f && quat[0]<0.0f) ) { mul_qt_fl(quat, -1.0f); } } @@ -2013,8 +2019,7 @@ static void constraintob_from_transdata(bConstraintOb *cob, TransData *td) we don't necessarily end up with a rotation matrix, and then conversion back to quat gives a different result */ float quat[4]; - copy_qt_qt(quat, td->ext->quat); - normalize_qt(quat); + normalize_qt_qt(quat, td->ext->quat); quat_to_mat4(cob->matrix, quat); } else if (td->ext->rotOrder == ROT_MODE_AXISANGLE) { From d624d1cbddf9ee51108e7eb89a6cfd7044fd57c0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 7 Dec 2010 04:12:15 +0000 Subject: [PATCH 024/236] pass along the context to extension functions, this was already being done in all cases except for the render engine. this allows python to NULL its internal context while scripts are not running. --- source/blender/blenkernel/BKE_context.h | 2 +- source/blender/blenkernel/intern/context.c | 2 +- source/blender/makesrna/RNA_types.h | 10 ++++----- source/blender/makesrna/intern/rna_ID.c | 2 +- .../blender/makesrna/intern/rna_animation.c | 8 +++---- source/blender/makesrna/intern/rna_internal.h | 2 +- source/blender/makesrna/intern/rna_render.c | 4 ++-- source/blender/makesrna/intern/rna_ui.c | 18 ++++++++-------- source/blender/makesrna/intern/rna_wm.c | 16 +++++++------- source/blender/python/intern/bpy.c | 2 +- source/blender/python/intern/bpy_operator.c | 21 ++++++++++++++++--- source/blender/python/intern/bpy_rna.c | 3 +-- 12 files changed, 52 insertions(+), 38 deletions(-) diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h index 1b103890e06..3acc08a76b6 100644 --- a/source/blender/blenkernel/BKE_context.h +++ b/source/blender/blenkernel/BKE_context.h @@ -124,7 +124,7 @@ void CTX_store_free_list(ListBase *contexts); int CTX_py_init_get(bContext *C); void CTX_py_init_set(bContext *C, int value); -void *CTX_py_dict_get(bContext *C); +void *CTX_py_dict_get(const bContext *C); void CTX_py_dict_set(bContext *C, void *value); /* Window Manager Context */ diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c index 96dbe727505..9740c969ec7 100644 --- a/source/blender/blenkernel/intern/context.c +++ b/source/blender/blenkernel/intern/context.c @@ -179,7 +179,7 @@ void CTX_py_init_set(bContext *C, int value) C->data.py_init= value; } -void *CTX_py_dict_get(bContext *C) +void *CTX_py_dict_get(const bContext *C) { return C->data.py_context; } diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h index 11105ad1451..b3077f01baf 100644 --- a/source/blender/makesrna/RNA_types.h +++ b/source/blender/makesrna/RNA_types.h @@ -311,9 +311,9 @@ typedef enum StructFlag { } StructFlag; typedef int (*StructValidateFunc)(struct PointerRNA *ptr, void *data, int *have_function); -typedef int (*StructCallbackFunc)(struct PointerRNA *ptr, struct FunctionRNA *func, ParameterList *list); +typedef int (*StructCallbackFunc)(struct bContext *C, struct PointerRNA *ptr, struct FunctionRNA *func, ParameterList *list); typedef void (*StructFreeFunc)(void *data); -typedef struct StructRNA *(*StructRegisterFunc)(const struct bContext *C, struct ReportList *reports, void *data, +typedef struct StructRNA *(*StructRegisterFunc)(struct bContext *C, struct ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free); typedef void (*StructUnregisterFunc)(const struct bContext *C, struct StructRNA *type); @@ -333,9 +333,9 @@ typedef struct BlenderRNA BlenderRNA; typedef struct ExtensionRNA { void *data; StructRNA *srna; - - int (*call)(PointerRNA *, FunctionRNA *, ParameterList *); - void (*free)(void *data); + StructCallbackFunc call; + StructFreeFunc free; + } ExtensionRNA; /* fake struct definitions, needed otherwise collections end up owning the C diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index 076669fc1ec..91c6fcdf40a 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -208,7 +208,7 @@ void rna_IDPropertyGroup_unregister(const bContext *C, StructRNA *type) RNA_struct_free(&BLENDER_RNA, type); } -StructRNA *rna_IDPropertyGroup_register(const bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free) +StructRNA *rna_IDPropertyGroup_register(bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free) { PointerRNA dummyptr; diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c index 203f84118d8..fbc4593437b 100644 --- a/source/blender/makesrna/intern/rna_animation.c +++ b/source/blender/makesrna/intern/rna_animation.c @@ -80,7 +80,7 @@ static int RKS_POLL_rna_internal(KeyingSetInfo *ksi, bContext *C) RNA_parameter_set_lookup(&list, "context", &C); /* execute the function */ - ksi->ext.call(&ptr, func, &list); + ksi->ext.call(C, &ptr, func, &list); /* read the result */ RNA_parameter_get_lookup(&list, "ok", &ret); @@ -107,7 +107,7 @@ static void RKS_ITER_rna_internal(KeyingSetInfo *ksi, bContext *C, KeyingSet *ks RNA_parameter_set_lookup(&list, "ks", &ks); /* execute the function */ - ksi->ext.call(&ptr, func, &list); + ksi->ext.call(C, &ptr, func, &list); RNA_parameter_list_free(&list); } @@ -129,7 +129,7 @@ static void RKS_GEN_rna_internal(KeyingSetInfo *ksi, bContext *C, KeyingSet *ks, RNA_parameter_set_lookup(&list, "data", data); /* execute the function */ - ksi->ext.call(&ptr, func, &list); + ksi->ext.call(C, &ptr, func, &list); RNA_parameter_list_free(&list); } @@ -157,7 +157,7 @@ static void rna_KeyingSetInfo_unregister(const bContext *C, StructRNA *type) ANIM_keyingset_info_unregister(C, ksi); } -static StructRNA *rna_KeyingSetInfo_register(const bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free) +static StructRNA *rna_KeyingSetInfo_register(bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free) { KeyingSetInfo dummyksi = {0}; KeyingSetInfo *ksi; diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h index cae9e5bb974..cc1771adf8d 100644 --- a/source/blender/makesrna/intern/rna_internal.h +++ b/source/blender/makesrna/intern/rna_internal.h @@ -193,7 +193,7 @@ struct IDProperty *rna_ID_idprops(struct PointerRNA *ptr, int create); void rna_ID_fake_user_set(struct PointerRNA *ptr, int value); struct IDProperty *rna_IDPropertyGroup_idprops(struct PointerRNA *ptr, int create); void rna_IDPropertyGroup_unregister(const struct bContext *C, struct StructRNA *type); -struct StructRNA *rna_IDPropertyGroup_register(const struct bContext *C, struct ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free); +struct StructRNA *rna_IDPropertyGroup_register(struct bContext *C, struct ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free); struct StructRNA* rna_IDPropertyGroup_refine(struct PointerRNA *ptr); void rna_object_vgroup_name_index_get(struct PointerRNA *ptr, char *value, int index); diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c index 800947ac881..29e8b2ed31a 100644 --- a/source/blender/makesrna/intern/rna_render.c +++ b/source/blender/makesrna/intern/rna_render.c @@ -91,7 +91,7 @@ static void engine_render(RenderEngine *engine, struct Scene *scene) RNA_parameter_list_create(&list, &ptr, func); RNA_parameter_set_lookup(&list, "scene", &scene); - engine->type->ext.call(&ptr, func, &list); + engine->type->ext.call(NULL, &ptr, func, &list); RNA_parameter_list_free(&list); } @@ -108,7 +108,7 @@ static void rna_RenderEngine_unregister(const bContext *C, StructRNA *type) RNA_struct_free(&BLENDER_RNA, type); } -static StructRNA *rna_RenderEngine_register(const bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free) +static StructRNA *rna_RenderEngine_register(bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free) { RenderEngineType *et, dummyet = {0}; RenderEngine dummyengine= {0}; diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index 1275c435158..6b53082c095 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -101,7 +101,7 @@ static int panel_poll(const bContext *C, PanelType *pt) RNA_parameter_list_create(&list, &ptr, func); RNA_parameter_set_lookup(&list, "context", &C); - pt->ext.call(&ptr, func, &list); + pt->ext.call((bContext *)C, &ptr, func, &list); RNA_parameter_get_lookup(&list, "visible", &ret); visible= *(int*)ret; @@ -122,7 +122,7 @@ static void panel_draw(const bContext *C, Panel *pnl) RNA_parameter_list_create(&list, &ptr, func); RNA_parameter_set_lookup(&list, "context", &C); - pnl->type->ext.call(&ptr, func, &list); + pnl->type->ext.call((bContext *)C, &ptr, func, &list); RNA_parameter_list_free(&list); } @@ -138,7 +138,7 @@ static void panel_draw_header(const bContext *C, Panel *pnl) RNA_parameter_list_create(&list, &ptr, func); RNA_parameter_set_lookup(&list, "context", &C); - pnl->type->ext.call(&ptr, func, &list); + pnl->type->ext.call((bContext *)C, &ptr, func, &list); RNA_parameter_list_free(&list); } @@ -163,7 +163,7 @@ static void rna_Panel_unregister(const bContext *C, StructRNA *type) WM_main_add_notifier(NC_SCREEN|NA_EDITED, NULL); } -static StructRNA *rna_Panel_register(const bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free) +static StructRNA *rna_Panel_register(bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free) { ARegionType *art; PanelType *pt, dummypt = {0}; @@ -241,7 +241,7 @@ static void header_draw(const bContext *C, Header *hdr) RNA_parameter_list_create(&list, &htr, func); RNA_parameter_set_lookup(&list, "context", &C); - hdr->type->ext.call(&htr, func, &list); + hdr->type->ext.call((bContext *)C, &htr, func, &list); RNA_parameter_list_free(&list); } @@ -266,7 +266,7 @@ static void rna_Header_unregister(const bContext *C, StructRNA *type) WM_main_add_notifier(NC_SCREEN|NA_EDITED, NULL); } -static StructRNA *rna_Header_register(const bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free) +static StructRNA *rna_Header_register(bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free) { ARegionType *art; HeaderType *ht, dummyht = {0}; @@ -341,7 +341,7 @@ static int menu_poll(const bContext *C, MenuType *pt) RNA_parameter_list_create(&list, &ptr, func); RNA_parameter_set_lookup(&list, "context", &C); - pt->ext.call(&ptr, func, &list); + pt->ext.call((bContext *)C, &ptr, func, &list); RNA_parameter_get_lookup(&list, "visible", &ret); visible= *(int*)ret; @@ -362,7 +362,7 @@ static void menu_draw(const bContext *C, Menu *hdr) RNA_parameter_list_create(&list, &mtr, func); RNA_parameter_set_lookup(&list, "context", &C); - hdr->type->ext.call(&mtr, func, &list); + hdr->type->ext.call((bContext *)C, &mtr, func, &list); RNA_parameter_list_free(&list); } @@ -385,7 +385,7 @@ static void rna_Menu_unregister(const bContext *C, StructRNA *type) WM_main_add_notifier(NC_SCREEN|NA_EDITED, NULL); } -static StructRNA *rna_Menu_register(const bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free) +static StructRNA *rna_Menu_register(bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free) { MenuType *mt, dummymt = {0}; Menu dummymenu= {0}; diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 11aed2127a8..aeb95fa3069 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -693,7 +693,7 @@ static int operator_poll(bContext *C, wmOperatorType *ot) RNA_parameter_list_create(&list, &ptr, func); RNA_parameter_set_lookup(&list, "context", &C); - ot->ext.call(&ptr, func, &list); + ot->ext.call(C, &ptr, func, &list); RNA_parameter_get_lookup(&list, "visible", &ret); visible= *(int*)ret; @@ -716,7 +716,7 @@ static int operator_execute(bContext *C, wmOperator *op) RNA_parameter_list_create(&list, &opr, func); RNA_parameter_set_lookup(&list, "context", &C); - op->type->ext.call(&opr, func, &list); + op->type->ext.call(C, &opr, func, &list); RNA_parameter_get_lookup(&list, "result", &ret); result= *(int*)ret; @@ -740,7 +740,7 @@ static int operator_check(bContext *C, wmOperator *op) RNA_parameter_list_create(&list, &opr, func); RNA_parameter_set_lookup(&list, "context", &C); - op->type->ext.call(&opr, func, &list); + op->type->ext.call(C, &opr, func, &list); RNA_parameter_get_lookup(&list, "result", &ret); result= *(int*)ret; @@ -764,7 +764,7 @@ static int operator_invoke(bContext *C, wmOperator *op, wmEvent *event) RNA_parameter_list_create(&list, &opr, func); RNA_parameter_set_lookup(&list, "context", &C); RNA_parameter_set_lookup(&list, "event", &event); - op->type->ext.call(&opr, func, &list); + op->type->ext.call(C, &opr, func, &list); RNA_parameter_get_lookup(&list, "result", &ret); result= *(int*)ret; @@ -789,7 +789,7 @@ static int operator_modal(bContext *C, wmOperator *op, wmEvent *event) RNA_parameter_list_create(&list, &opr, func); RNA_parameter_set_lookup(&list, "context", &C); RNA_parameter_set_lookup(&list, "event", &event); - op->type->ext.call(&opr, func, &list); + op->type->ext.call(C, &opr, func, &list); RNA_parameter_get_lookup(&list, "result", &ret); result= *(int*)ret; @@ -810,7 +810,7 @@ static void operator_draw(bContext *C, wmOperator *op) RNA_parameter_list_create(&list, &opr, func); RNA_parameter_set_lookup(&list, "context", &C); - op->type->ext.call(&opr, func, &list); + op->type->ext.call(C, &opr, func, &list); RNA_parameter_list_free(&list); } @@ -821,7 +821,7 @@ void macro_wrapper(wmOperatorType *ot, void *userdata); static char _operator_idname[OP_MAX_TYPENAME]; static char _operator_name[OP_MAX_TYPENAME]; static char _operator_descr[1024]; -static StructRNA *rna_Operator_register(const bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free) +static StructRNA *rna_Operator_register(bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free) { wmOperatorType dummyot = {0}; wmOperator dummyop= {0}; @@ -894,7 +894,7 @@ static StructRNA *rna_Operator_register(const bContext *C, ReportList *reports, } -static StructRNA *rna_MacroOperator_register(const bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free) +static StructRNA *rna_MacroOperator_register(bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free) { wmOperatorType dummyot = {0}; wmOperator dummyop= {0}; diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c index 770640f577d..2b6fbd7aaa5 100644 --- a/source/blender/python/intern/bpy.c +++ b/source/blender/python/intern/bpy.c @@ -223,7 +223,7 @@ void BPy_init_modules( void ) PyModule_AddObject( mod, "app", BPY_app_struct() ); /* bpy context */ - RNA_pointer_create(NULL, &RNA_Context, BPy_GetContext(), &ctx_ptr); + RNA_pointer_create(NULL, &RNA_Context, (void *)BPy_GetContext(), &ctx_ptr); bpy_context_module= (BPy_StructRNA *)pyrna_struct_CreatePyObject(&ctx_ptr); /* odd that this is needed, 1 ref on creation and another for the module * but without we get a crash on exit */ diff --git a/source/blender/python/intern/bpy_operator.c b/source/blender/python/intern/bpy_operator.c index ea8d39806db..ef7c1cc369a 100644 --- a/source/blender/python/intern/bpy_operator.c +++ b/source/blender/python/intern/bpy_operator.c @@ -52,8 +52,13 @@ static PyObject *pyop_poll(PyObject *UNUSED(self), PyObject *args) int context= WM_OP_EXEC_DEFAULT; // XXX Todo, work out a better solution for passing on context, could make a tuple from self and pack the name and Context into it... - bContext *C = BPy_GetContext(); + bContext *C= (bContext *)BPy_GetContext(); + if(C==NULL) { + PyErr_SetString(PyExc_SystemError, "Context is None, cant poll any operators"); + return NULL; + } + if (!PyArg_ParseTuple(args, "s|Os:_bpy.ops.poll", &opname, &context_dict, &context_str)) return NULL; @@ -114,7 +119,12 @@ static PyObject *pyop_call(PyObject *UNUSED(self), PyObject *args) int context= WM_OP_EXEC_DEFAULT; // XXX Todo, work out a better solution for passing on context, could make a tuple from self and pack the name and Context into it... - bContext *C = BPy_GetContext(); + bContext *C = (bContext *)BPy_GetContext(); + + if(C==NULL) { + PyErr_SetString(PyExc_SystemError, "Context is None, cant poll any operators"); + return NULL; + } if (!PyArg_ParseTuple(args, "sO|O!s:_bpy.ops.call", &opname, &context_dict, &PyDict_Type, &kw, &context_str)) return NULL; @@ -232,8 +242,13 @@ static PyObject *pyop_as_string(PyObject *UNUSED(self), PyObject *args) char *buf = NULL; PyObject *pybuf; - bContext *C = BPy_GetContext(); + bContext *C = (bContext *)BPy_GetContext(); + if(C==NULL) { + PyErr_SetString(PyExc_SystemError, "Context is None, cant get the string representation of this object."); + return NULL; + } + if (!PyArg_ParseTuple(args, "s|O!i:_bpy.ops.as_string", &opname, &PyDict_Type, &kw, &all_args)) return NULL; diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index cda20348a9d..b95dc520526 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -5125,7 +5125,7 @@ static int bpy_class_validate(PointerRNA *dummyptr, void *py_data, int *have_fun extern void BPY_update_modules( void ); //XXX temp solution /* TODO - multiple return values like with rna functions */ -static int bpy_class_call(PointerRNA *ptr, FunctionRNA *func, ParameterList *parms) +static int bpy_class_call(bContext *C, PointerRNA *ptr, FunctionRNA *func, ParameterList *parms) { PyObject *args; PyObject *ret= NULL, *py_srna= NULL, *py_class, *py_class_instance= NULL, *parmitem; @@ -5141,7 +5141,6 @@ static int bpy_class_call(PointerRNA *ptr, FunctionRNA *func, ParameterList *par PyGILState_STATE gilstate; - bContext *C= BPy_GetContext(); // XXX - NEEDS FIXING, QUITE BAD. #ifdef USE_PEDANTIC_WRITE /* testing, for correctness, not operator and not draw function */ const short is_readonly= strstr("draw", RNA_function_identifier(func)) || !RNA_struct_is_a(ptr->type, &RNA_Operator); From 1e57d8c4e7c37b09b761a538d408056f512afd0b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 7 Dec 2010 05:39:14 +0000 Subject: [PATCH 025/236] bugfix [#25073] Rendered image goes dim when saved from python batch script --- source/blender/blenkernel/intern/image.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 5c48569575e..6cd0c89157a 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -1983,6 +1983,9 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser, void **lock_ ibuf->flags &= ~IB_zbuffloat; } + /* since its possible to access the buffer from the image directly, set the profile [#25073] */ + ibuf->profile= (iuser->scene->r.color_mgt_flag & R_COLOR_MANAGEMENT) ? IB_PROFILE_LINEAR_RGB : IB_PROFILE_NONE; + ibuf->dither= dither; ima->ok= IMA_OK_LOADED; From 612936954ac67cacee8d13f48ed1bd8b5ff386c7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 7 Dec 2010 06:47:40 +0000 Subject: [PATCH 026/236] minor internal python api change - pass the context rather then getting from BPy_GetContext() again. --- source/blender/python/BPY_extern.h | 2 +- source/blender/python/intern/bpy_interface.c | 6 +++--- source/blender/python/intern/bpy_rna.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/blender/python/BPY_extern.h b/source/blender/python/BPY_extern.h index 323682b99aa..98e160525f8 100644 --- a/source/blender/python/BPY_extern.h +++ b/source/blender/python/BPY_extern.h @@ -100,7 +100,7 @@ extern "C" { int BPY_run_python_script( struct bContext *C, const char *filename, struct Text *text, struct ReportList *reports ); // 2.5 working int BPY_run_script_space_draw(const struct bContext *C, struct SpaceScript * sc); // 2.5 working // int BPY_run_script_space_listener(struct bContext *C, struct SpaceScript * sc, struct ARegion *ar, struct wmNotifier *wmn); // 2.5 working - void BPY_update_modules( void ); // XXX - annoying, need this for pointers that get out of date + void BPY_update_modules(struct bContext *C); // XXX - annoying, need this for pointers that get out of date // int BPY_context_get(struct bContext *C, const char *member, struct bContextDataResult *result); // diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index 3a049e89031..7b31f77a0c9 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -88,7 +88,7 @@ void bpy_context_set(bContext *C, PyGILState_STATE *gilstate) fprintf(stderr, "ERROR: Python context called with a NULL Context. this should not happen!\n"); } - BPY_update_modules(); /* can give really bad results if this isnt here */ + BPY_update_modules(C); /* can give really bad results if this isnt here */ #ifdef TIME_PY_RUN if(bpy_timer_count==0) { @@ -136,7 +136,7 @@ void BPY_free_compiled_text( struct Text *text ) } } -void BPY_update_modules( void ) +void BPY_update_modules(bContext *C) { #if 0 // slow, this runs all the time poll, draw etc 100's of time a sec. PyObject *mod= PyImport_ImportModuleLevel("bpy", NULL, NULL, NULL, 0); @@ -146,7 +146,7 @@ void BPY_update_modules( void ) /* refreshes the main struct */ BPY_update_rna_module(); - bpy_context_module->ptr.data= (void *)BPy_GetContext(); + bpy_context_module->ptr.data= (void *)C; } /* must be called before Py_Initialize */ diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index b95dc520526..ee393c5fe15 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -5122,7 +5122,7 @@ static int bpy_class_validate(PointerRNA *dummyptr, void *py_data, int *have_fun return 0; } -extern void BPY_update_modules( void ); //XXX temp solution +extern void BPY_update_modules(bContext *C); //XXX temp solution /* TODO - multiple return values like with rna functions */ static int bpy_class_call(bContext *C, PointerRNA *ptr, FunctionRNA *func, ParameterList *parms) From d620ff838053b58cc571913e6a1f68fa4f6a1d73 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 7 Dec 2010 07:02:47 +0000 Subject: [PATCH 027/236] 2D text drawing - with the NLA on a small strip text was drawn under the scroll bar, now draw with same alignment as rectangle constrained text. - single alloc per text item. - was using opengl context rather then passing color value. --- source/blender/editors/include/UI_view2d.h | 4 +- source/blender/editors/interface/view2d.c | 52 +++++++++++-------- source/blender/editors/space_nla/nla_draw.c | 17 +++--- .../editors/space_sequencer/sequencer_draw.c | 16 +++--- 4 files changed, 52 insertions(+), 37 deletions(-) diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h index d44e74ff54d..7cad1d82d50 100644 --- a/source/blender/editors/include/UI_view2d.h +++ b/source/blender/editors/include/UI_view2d.h @@ -191,8 +191,8 @@ void UI_view2d_getscale(struct View2D *v2d, float *x, float *y); short UI_view2d_mouse_in_scrollers(const struct bContext *C, struct View2D *v2d, int x, int y); /* cached text drawing in v2d, to allow pixel-aligned draw as post process */ -void UI_view2d_text_cache_add(struct View2D *v2d, float x, float y, char *str); -void UI_view2d_text_cache_rectf(struct View2D *v2d, struct rctf *rect, char *str); +void UI_view2d_text_cache_add(struct View2D *v2d, float x, float y, const char *str, const char col[4]); +void UI_view2d_text_cache_rectf(struct View2D *v2d, struct rctf *rect, const char *str, const char col[4]); void UI_view2d_text_cache_draw(struct ARegion *ar); /* operators */ diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index 0cd4518fe85..21146dc8cec 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -2006,42 +2006,48 @@ static ListBase strings= {NULL, NULL}; typedef struct View2DString { struct View2DString *next, *prev; - float col[4]; - char str[128]; + GLbyte col[4]; short mval[2]; rcti rect; } View2DString; -void UI_view2d_text_cache_add(View2D *v2d, float x, float y, char *str) +void UI_view2d_text_cache_add(View2D *v2d, float x, float y, const char *str, const char col[4]) { int mval[2]; UI_view2d_view_to_region(v2d, x, y, mval, mval+1); if(mval[0]!=V2D_IS_CLIPPED && mval[1]!=V2D_IS_CLIPPED) { + int len= strlen(str)+1; /* use calloc, rect has to be zeroe'd */ - View2DString *v2s= MEM_callocN(sizeof(View2DString), "View2DString"); - + View2DString *v2s= MEM_callocN(sizeof(View2DString)+len, "View2DString"); + char *v2s_str= (char *)(v2s+1); + memcpy(v2s_str, str, len); + BLI_addtail(&strings, v2s); - BLI_strncpy(v2s->str, str, 128); v2s->mval[0]= mval[0]; v2s->mval[1]= mval[1]; - glGetFloatv(GL_CURRENT_COLOR, v2s->col); + QUATCOPY(v2s->col, col); } } /* no clip (yet) */ -void UI_view2d_text_cache_rectf(View2D *v2d, rctf *rect, char *str) +void UI_view2d_text_cache_rectf(View2D *v2d, rctf *rect, const char *str, const char col[4]) { - View2DString *v2s= MEM_callocN(sizeof(View2DString), "View2DString"); - + int len= strlen(str)+1; + View2DString *v2s= MEM_callocN(sizeof(View2DString)+len, "View2DString"); + char *v2s_str= (char *)(v2s+1); + memcpy(v2s_str, str, len); + UI_view2d_to_region_no_clip(v2d, rect->xmin, rect->ymin, &v2s->rect.xmin, &v2s->rect.ymin); UI_view2d_to_region_no_clip(v2d, rect->xmax, rect->ymax, &v2s->rect.xmax, &v2s->rect.ymax); - + + v2s->mval[0]= v2s->rect.xmin; + v2s->mval[1]= v2s->rect.ymin; + BLI_addtail(&strings, v2s); - BLI_strncpy(v2s->str, str, 128); - glGetFloatv(GL_CURRENT_COLOR, v2s->col); + QUATCOPY(v2s->col, col); } @@ -2056,18 +2062,20 @@ void UI_view2d_text_cache_draw(ARegion *ar) ED_region_pixelspace(ar); for(v2s= strings.first; v2s; v2s= v2s->next) { - glColor3fv(v2s->col); - if(v2s->rect.xmin==v2s->rect.xmax) - BLF_draw_default((float)v2s->mval[0], (float)v2s->mval[1], 0.0, v2s->str, sizeof(v2s->str)-1); + const char *str= (const char *)(v2s+1); + int xofs=0, yofs; + + yofs= ceil( 0.5f*(v2s->rect.ymax - v2s->rect.ymin - BLF_height_default("28"))); + if(yofs<1) yofs= 1; + + glColor3bv(v2s->col); + + if(v2s->rect.xmin >= v2s->rect.xmax) + BLF_draw_default((float)v2s->mval[0]+xofs, (float)v2s->mval[1]+yofs, 0.0, str, 65535); else { - int xofs=0, yofs; - - yofs= ceil( 0.5f*(v2s->rect.ymax - v2s->rect.ymin - BLF_height_default("28"))); - if(yofs<1) yofs= 1; - BLF_clipping_default(v2s->rect.xmin-4, v2s->rect.ymin-4, v2s->rect.xmax+4, v2s->rect.ymax+4); BLF_enable_default(BLF_CLIPPING); - BLF_draw_default(v2s->rect.xmin+xofs, v2s->rect.ymin+yofs, 0.0f, v2s->str, sizeof(v2s->str)-1); + BLF_draw_default(v2s->rect.xmin+xofs, v2s->rect.ymin+yofs, 0.0f, str, 65535); BLF_disable_default(BLF_CLIPPING); } } diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c index d5a007fd506..e6028735d52 100644 --- a/source/blender/editors/space_nla/nla_draw.c +++ b/source/blender/editors/space_nla/nla_draw.c @@ -417,6 +417,7 @@ static void nla_draw_strip (SpaceNla *snla, AnimData *adt, NlaTrack *UNUSED(nlt) static void nla_draw_strip_text (NlaTrack *UNUSED(nlt), NlaStrip *strip, int UNUSED(index), View2D *v2d, float yminc, float ymaxc) { char str[256], dir[3]; + char col[4]; rctf rect; /* 'dir' - direction that strip is played in */ @@ -432,11 +433,14 @@ static void nla_draw_strip_text (NlaTrack *UNUSED(nlt), NlaStrip *strip, int UNU sprintf(str, "%s | %.2f %s %.2f", strip->name, strip->start, dir, strip->end); /* set text color - if colors (see above) are light, draw black text, otherwise draw white */ - if (strip->flag & (NLASTRIP_FLAG_ACTIVE|NLASTRIP_FLAG_SELECT|NLASTRIP_FLAG_TWEAKUSER)) - glColor3f(0.0f, 0.0f, 0.0f); - else - glColor3f(1.0f, 1.0f, 1.0f); - + if (strip->flag & (NLASTRIP_FLAG_ACTIVE|NLASTRIP_FLAG_SELECT|NLASTRIP_FLAG_TWEAKUSER)) { + col[0]= col[1]= col[2]= 0; + } + else { + col[0]= col[1]= col[2]= 255; + } + col[3]= 1.0; + /* set bounding-box for text * - padding of 2 'units' on either side */ @@ -447,7 +451,8 @@ static void nla_draw_strip_text (NlaTrack *UNUSED(nlt), NlaStrip *strip, int UNU rect.ymax= ymaxc; /* add this string to the cache of texts to draw*/ - UI_view2d_text_cache_rectf(v2d, &rect, str); + + UI_view2d_text_cache_rectf(v2d, &rect, str, col); } /* ---------------------- */ diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 49d7e6a2f33..087b0b7dcd7 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -343,7 +343,7 @@ static void draw_seq_handle(View2D *v2d, Sequence *seq, float pixelx, short dire } if(G.moving || (seq->flag & whichsel)) { - cpack(0xFFFFFF); + const char col[4]= {255, 255, 255, 255}; if (direction == SEQ_LEFTHANDLE) { sprintf(str, "%d", seq->startdisp); x1= rx1; @@ -353,7 +353,7 @@ static void draw_seq_handle(View2D *v2d, Sequence *seq, float pixelx, short dire x1= x2 - handsize*0.75; y1= y2 + 0.05; } - UI_view2d_text_cache_add(v2d, x1, y1, str); + UI_view2d_text_cache_add(v2d, x1, y1, str, col); } } @@ -467,6 +467,7 @@ static void draw_seq_text(View2D *v2d, Sequence *seq, float x1, float x2, float rctf rect; char str[32 + FILE_MAXDIR+FILE_MAXFILE]; const char *name= seq->name+2; + char col[4]; if(name[0]=='\0') name= give_seqname(seq); @@ -511,18 +512,19 @@ static void draw_seq_text(View2D *v2d, Sequence *seq, float x1, float x2, float } if(seq->flag & SELECT){ - cpack(0xFFFFFF); + col[0]= col[1]= col[2]= 255; }else if ((((int)background_col[0] + (int)background_col[1] + (int)background_col[2]) / 3) < 50){ - cpack(0x505050); /* use lighter text color for dark background */ + col[0]= col[1]= col[2]= 80; /* use lighter text color for dark background */ }else{ - cpack(0); + col[0]= col[1]= col[2]= 0; } - + col[3]= 255; + rect.xmin= x1; rect.ymin= y1; rect.xmax= x2; rect.ymax= y2; - UI_view2d_text_cache_rectf(v2d, &rect, str); + UI_view2d_text_cache_rectf(v2d, &rect, str, col); } /* draws a shaded strip, made from gradient + flat color + gradient */ From 8d284b7d028812b1935c8533f3bdddeea7a8c79e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 7 Dec 2010 08:27:20 +0000 Subject: [PATCH 028/236] error checking for setting operator string values for python operators, and get rid of annoying warnings (cmake/linux now builds without warnings again, except for extern libs). --- source/blender/makesrna/intern/rna_wm.c | 33 +++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index aeb95fa3069..b6b73b9885d 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -294,6 +294,8 @@ EnumPropertyItem wm_report_items[] = { #ifdef RNA_RUNTIME +#include + #include "WM_api.h" #include "BKE_idprop.h" @@ -1056,6 +1058,31 @@ static wmKeyMap *rna_keymap_find_modal(wmKeyConfig *keyconf, const char *idname) return ot->modalkeymap; } +/* just to work around 'const char *' warning and to ensure this is a python op */ +static void rna_Operator_bl_idname_set(PointerRNA *ptr, const char *value) +{ + wmOperator *data= (wmOperator*)(ptr->data); + char *str= (char *)data->type->idname; + if(!str[0]) strcpy(str, value); + else assert(!"setting the bl_idname on a non-builtin operator"); +} + +static void rna_Operator_bl_label_set(PointerRNA *ptr, const char *value) +{ + wmOperator *data= (wmOperator*)(ptr->data); + char *str= (char *)data->type->name; + if(!str[0]) strcpy(str, value); + else assert(!"setting the bl_label on a non-builtin operator"); +} + +static void rna_Operator_bl_description_set(PointerRNA *ptr, const char *value) +{ + wmOperator *data= (wmOperator*)(ptr->data); + char *str= (char *)data->type->description; + if(!str[0]) strcpy(str, value); + else assert(!"setting the bl_description on a non-builtin operator"); +} + #else /* RNA_RUNTIME */ static void rna_def_operator(BlenderRNA *brna) @@ -1094,6 +1121,7 @@ static void rna_def_operator(BlenderRNA *brna) prop= RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->idname"); RNA_def_property_string_maxlength(prop, OP_MAX_TYPENAME); /* else it uses the pointer size! */ + RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Operator_bl_idname_set"); // RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_flag(prop, PROP_REGISTER); RNA_def_struct_name_property(srna, prop); @@ -1101,12 +1129,14 @@ static void rna_def_operator(BlenderRNA *brna) prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->name"); RNA_def_property_string_maxlength(prop, 1024); /* else it uses the pointer size! */ + RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Operator_bl_label_set"); // RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_flag(prop, PROP_REGISTER); prop= RNA_def_property(srna, "bl_description", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->description"); RNA_def_property_string_maxlength(prop, 1024); /* else it uses the pointer size! */ + RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Operator_bl_description_set"); // RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); @@ -1152,6 +1182,7 @@ static void rna_def_macro_operator(BlenderRNA *brna) prop= RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->idname"); RNA_def_property_string_maxlength(prop, OP_MAX_TYPENAME); /* else it uses the pointer size! */ + RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Operator_bl_idname_set"); // RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_flag(prop, PROP_REGISTER); RNA_def_struct_name_property(srna, prop); @@ -1159,12 +1190,14 @@ static void rna_def_macro_operator(BlenderRNA *brna) prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->name"); RNA_def_property_string_maxlength(prop, 1024); /* else it uses the pointer size! */ + RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Operator_bl_label_set"); // RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_flag(prop, PROP_REGISTER); prop= RNA_def_property(srna, "bl_description", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->description"); RNA_def_property_string_maxlength(prop, 1024); /* else it uses the pointer size! */ + RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Operator_bl_description_set"); // RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); From c5613de2d5664bd37ef0ceb2343050f314d6345a Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Tue, 7 Dec 2010 08:37:00 +0000 Subject: [PATCH 029/236] Remove redundant VC_REDIST code, since it's not used anymore. --- build_files/scons/tools/btools.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py index bc0beb422f0..1d716f9a093 100644 --- a/build_files/scons/tools/btools.py +++ b/build_files/scons/tools/btools.py @@ -92,8 +92,7 @@ def validate_arguments(args, bc): 'WITH_BF_RAYOPTIMIZATION', 'BF_RAYOPTIMIZATION_SSE_FLAGS', 'BF_NO_ELBEEM', - 'WITH_BF_CXX_GUARDEDALLOC', - 'BF_VCREDIST' # Windows-only, and useful only when creating installer + 'WITH_BF_CXX_GUARDEDALLOC' ] # Have options here that scons expects to be lists @@ -454,8 +453,7 @@ def read_opts(env, cfg, args): (BoolVariable('WITH_BF_RAYOPTIMIZATION', 'Enable raytracer SSE/SIMD optimization.', False)), ('BF_RAYOPTIMIZATION_SSE_FLAGS', 'SSE flags', ''), - (BoolVariable('WITH_BF_CXX_GUARDEDALLOC', 'Enable GuardedAlloc for C++ memory allocation tracking.', False)), - ('BF_VCREDIST', 'Full path to vcredist', '') + (BoolVariable('WITH_BF_CXX_GUARDEDALLOC', 'Enable GuardedAlloc for C++ memory allocation tracking.', False)) ) # end of opts.AddOptions() return localopts @@ -547,12 +545,6 @@ def NSIS_Installer(target=None, source=None, env=None): ns_cnt = string.replace(ns_cnt, "[DODATAFILES]", datafiles) - # Setup vcredist part - vcredist = "File \""+env['BF_VCREDIST'] + "\"\n" - vcredist += " ExecWait '\"$TEMP\\" + os.path.basename(env['BF_VCREDIST']) + "\" /q'\n" - vcredist += " Delete \"$TEMP\\" + os.path.basename(env['BF_VCREDIST'])+"\"" - ns_cnt = string.replace(ns_cnt, "[VCREDIST]", vcredist) - tmpnsi = os.path.normpath(install_base_dir+os.sep+env['BF_BUILDDIR']+os.sep+"00.blender_tmp.nsi") new_nsis = open(tmpnsi, 'w') new_nsis.write(ns_cnt) From 46990b49045d52278cdc082b9ef577ffcee5619f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 7 Dec 2010 08:52:12 +0000 Subject: [PATCH 030/236] fix for own mistake, reported [#25076] Creating new empty crashes Blender --- source/blender/blenkernel/intern/material.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index 90017ba3d5b..2af7fc3b70a 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -626,7 +626,7 @@ void test_object_materials(ID *id) Object *ob; short *totcol; - if(id || (totcol=give_totcolp_id(id))==NULL) { + if(id==NULL || (totcol=give_totcolp_id(id))==NULL) { return; } From 15d37747b3cebb7fbadc09f9ee546d3deedd0019 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 7 Dec 2010 09:22:14 +0000 Subject: [PATCH 031/236] bugfix [#25074] visible, selectable and render toggles in outliner not available outliner added UI buttons which exceeded the range of a short, use ints for x/y button positioning. --- source/blender/editors/include/UI_interface.h | 92 +++++++-------- source/blender/editors/interface/interface.c | 106 +++++++++--------- .../blender/editors/space_outliner/outliner.c | 32 +++--- 3 files changed, 115 insertions(+), 115 deletions(-) diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 12ca1bc9a7a..a60354a085f 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -385,58 +385,58 @@ int uiButActiveOnly (const struct bContext *C, uiBlock *block, uiBut *but); uiBut *uiDefBut(uiBlock *block, int type, int retval, const char *str, - short x1, short y1, + int x1, int y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefButF(uiBlock *block, int type, int retval, const char *str, short x1, short y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefButBitF(uiBlock *block, int type, int bit, int retval, const char *str, short x1, short y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefButI(uiBlock *block, int type, int retval, const char *str, short x1, short y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefButBitI(uiBlock *block, int type, int bit, int retval, const char *str, short x1, short y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefButS(uiBlock *block, int type, int retval, const char *str, short x1, short y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefButBitS(uiBlock *block, int type, int bit, int retval, const char *str, short x1, short y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefButC(uiBlock *block, int type, int retval, const char *str, short x1, short y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefButBitC(uiBlock *block, int type, int bit, int retval, const char *str, short x1, short y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefButR(uiBlock *block, int type, int retval, const char *str, short x1, short y1, short x2, short y2, struct PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefButO(uiBlock *block, int type, const char *opname, int opcontext, const char *str, short x1, short y1, short x2, short y2, const char *tip); -uiBut *uiDefButTextO(uiBlock *block, int type, const char *opname, int opcontext, const char *str, short x1, short y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip); +uiBut *uiDefButF(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip); +uiBut *uiDefButBitF(uiBlock *block, int type, int bit, int retval, const char *str, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip); +uiBut *uiDefButI(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip); +uiBut *uiDefButBitI(uiBlock *block, int type, int bit, int retval, const char *str, int x1, int y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip); +uiBut *uiDefButS(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip); +uiBut *uiDefButBitS(uiBlock *block, int type, int bit, int retval, const char *str, int x1, int y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip); +uiBut *uiDefButC(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip); +uiBut *uiDefButBitC(uiBlock *block, int type, int bit, int retval, const char *str, int x1, int y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip); +uiBut *uiDefButR(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, struct PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2, const char *tip); +uiBut *uiDefButO(uiBlock *block, int type, const char *opname, int opcontext, const char *str, int x1, int y1, short x2, short y2, const char *tip); +uiBut *uiDefButTextO(uiBlock *block, int type, const char *opname, int opcontext, const char *str, int x1, int y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip); uiBut *uiDefIconBut(uiBlock *block, int type, int retval, int icon, - short x1, short y1, + int x1, int y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefIconButF(uiBlock *block, int type, int retval, int icon, short x1, short y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefIconButBitF(uiBlock *block, int type, int bit, int retval, int icon, short x1, short y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefIconButI(uiBlock *block, int type, int retval, int icon, short x1, short y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefIconButBitI(uiBlock *block, int type, int bit, int retval, int icon, short x1, short y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefIconButS(uiBlock *block, int type, int retval, int icon, short x1, short y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefIconButBitS(uiBlock *block, int type, int bit, int retval, int icon, short x1, short y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefIconButC(uiBlock *block, int type, int retval, int icon, short x1, short y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefIconButBitC(uiBlock *block, int type, int bit, int retval, int icon, short x1, short y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefIconButR(uiBlock *block, int type, int retval, int icon, short x1, short y1, short x2, short y2, struct PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefIconButO(uiBlock *block, int type, const char *opname, int opcontext, int icon, short x1, short y1, short x2, short y2, const char *tip); +uiBut *uiDefIconButF(uiBlock *block, int type, int retval, int icon, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip); +uiBut *uiDefIconButBitF(uiBlock *block, int type, int bit, int retval, int icon, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip); +uiBut *uiDefIconButI(uiBlock *block, int type, int retval, int icon, int x1, int y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip); +uiBut *uiDefIconButBitI(uiBlock *block, int type, int bit, int retval, int icon, int x1, int y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip); +uiBut *uiDefIconButS(uiBlock *block, int type, int retval, int icon, int x1, int y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip); +uiBut *uiDefIconButBitS(uiBlock *block, int type, int bit, int retval, int icon, int x1, int y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip); +uiBut *uiDefIconButC(uiBlock *block, int type, int retval, int icon, int x1, int y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip); +uiBut *uiDefIconButBitC(uiBlock *block, int type, int bit, int retval, int icon, int x1, int y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip); +uiBut *uiDefIconButR(uiBlock *block, int type, int retval, int icon, int x1, int y1, short x2, short y2, struct PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2, const char *tip); +uiBut *uiDefIconButO(uiBlock *block, int type, const char *opname, int opcontext, int icon, int x1, int y1, short x2, short y2, const char *tip); uiBut *uiDefIconTextBut(uiBlock *block, int type, int retval, int icon, const char *str, - short x1, short y1, + int x1, int y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefIconTextButF(uiBlock *block, int type, int retval, int icon, const char *str, short x1, short y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefIconTextButBitF(uiBlock *block, int type, int bit, int retval, int icon, const char *str, short x1, short y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefIconTextButI(uiBlock *block, int type, int retval, int icon, const char *str, short x1, short y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefIconTextButBitI(uiBlock *block, int type, int bit, int retval, int icon, const char *str, short x1, short y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefIconTextButS(uiBlock *block, int type, int retval, int icon, const char *str, short x1, short y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefIconTextButBitS(uiBlock *block, int type, int bit, int retval, int icon, const char *str, short x1, short y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefIconTextButC(uiBlock *block, int type, int retval, int icon, const char *str, short x1, short y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefIconTextButBitC(uiBlock *block, int type, int bit, int retval, int icon, const char *str, short x1, short y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefIconTextButR(uiBlock *block, int type, int retval, int icon, const char *str, short x1, short y1, short x2, short y2, struct PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2, const char *tip); -uiBut *uiDefIconTextButO(uiBlock *block, int type, const char *opname, int opcontext, int icon, const char *str, short x1, short y1, short x2, short y2, const char *tip); +uiBut *uiDefIconTextButF(uiBlock *block, int type, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip); +uiBut *uiDefIconTextButBitF(uiBlock *block, int type, int bit, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip); +uiBut *uiDefIconTextButI(uiBlock *block, int type, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip); +uiBut *uiDefIconTextButBitI(uiBlock *block, int type, int bit, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip); +uiBut *uiDefIconTextButS(uiBlock *block, int type, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip); +uiBut *uiDefIconTextButBitS(uiBlock *block, int type, int bit, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip); +uiBut *uiDefIconTextButC(uiBlock *block, int type, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip); +uiBut *uiDefIconTextButBitC(uiBlock *block, int type, int bit, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip); +uiBut *uiDefIconTextButR(uiBlock *block, int type, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, struct PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2, const char *tip); +uiBut *uiDefIconTextButO(uiBlock *block, int type, const char *opname, int opcontext, int icon, const char *str, int x1, int y1, short x2, short y2, const char *tip); /* for passing inputs to ButO buttons */ struct PointerRNA *uiButGetOperatorPtrRNA(uiBut *but); @@ -470,25 +470,25 @@ typedef void (*uiIDPoinFuncFP)(struct bContext *C, const char *str, struct ID ** typedef void (*uiIDPoinFunc)(struct bContext *C, struct ID *id, int event); uiBut *uiDefIDPoinBut(uiBlock *block, uiIDPoinFuncFP func, short blocktype, int retval, const char *str, - short x1, short y1, short x2, short y2, void *idpp, const char *tip); + int x1, int y1, short x2, short y2, void *idpp, const char *tip); int uiIconFromID(struct ID *id); -uiBut *uiDefPulldownBut(uiBlock *block, uiBlockCreateFunc func, void *arg, const char *str, short x1, short y1, short x2, short y2, const char *tip); -uiBut *uiDefMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, const char *str, short x1, short y1, short x2, short y2, const char *tip); -uiBut *uiDefIconTextMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, const char *str, short x1, short y1, short x2, short y2, const char *tip); -uiBut *uiDefIconMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, short x1, short y1, short x2, short y2, const char *tip); +uiBut *uiDefPulldownBut(uiBlock *block, uiBlockCreateFunc func, void *arg, const char *str, int x1, int y1, short x2, short y2, const char *tip); +uiBut *uiDefMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, const char *str, int x1, int y1, short x2, short y2, const char *tip); +uiBut *uiDefIconTextMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, const char *str, int x1, int y1, short x2, short y2, const char *tip); +uiBut *uiDefIconMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, int x1, int y1, short x2, short y2, const char *tip); -uiBut *uiDefBlockBut(uiBlock *block, uiBlockCreateFunc func, void *func_arg1, const char *str, short x1, short y1, short x2, short y2, const char *tip); -uiBut *uiDefBlockButN(uiBlock *block, uiBlockCreateFunc func, void *argN, const char *str, short x1, short y1, short x2, short y2, const char *tip); +uiBut *uiDefBlockBut(uiBlock *block, uiBlockCreateFunc func, void *func_arg1, const char *str, int x1, int y1, short x2, short y2, const char *tip); +uiBut *uiDefBlockButN(uiBlock *block, uiBlockCreateFunc func, void *argN, const char *str, int x1, int y1, short x2, short y2, const char *tip); -uiBut *uiDefIconBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int retval, int icon, short x1, short y1, short x2, short y2, const char *tip); -uiBut *uiDefIconTextBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int icon, const char *str, short x1, short y1, short x2, short y2, const char *tip); +uiBut *uiDefIconBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int retval, int icon, int x1, int y1, short x2, short y2, const char *tip); +uiBut *uiDefIconTextBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int icon, const char *str, int x1, int y1, short x2, short y2, const char *tip); -uiBut *uiDefKeyevtButS(uiBlock *block, int retval, const char *str, short x1, short y1, short x2, short y2, short *spoin, const char *tip); -uiBut *uiDefHotKeyevtButS(uiBlock *block, int retval, const char *str, short x1, short y1, short x2, short y2, short *keypoin, short *modkeypoin, const char *tip); +uiBut *uiDefKeyevtButS(uiBlock *block, int retval, const char *str, int x1, int y1, short x2, short y2, short *spoin, const char *tip); +uiBut *uiDefHotKeyevtButS(uiBlock *block, int retval, const char *str, int x1, int y1, short x2, short y2, short *keypoin, short *modkeypoin, const char *tip); -uiBut *uiDefSearchBut(uiBlock *block, void *arg, int retval, int icon, int maxlen, short x1, short y1, short x2, short y2, float a1, float a2, const char *tip); +uiBut *uiDefSearchBut(uiBlock *block, void *arg, int retval, int icon, int maxlen, int x1, int y1, short x2, short y2, float a1, float a2, const char *tip); void uiBlockPickerButtons(struct uiBlock *block, float *col, float *hsv, float *old, char *hexcol, char mode, short retval); diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index ab0ee09fb4e..deec9927d61 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -2354,7 +2354,7 @@ for float buttons: all greater values will be clamped to 4. */ -static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str, short x1, short y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip) +static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip) { uiBut *but; int slen; @@ -2451,7 +2451,7 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str, return but; } -static uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, const char *str, short x1, short y1, short x2, short y2, PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2, const char *tip) +static uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2, const char *tip) { uiBut *but; PropertyRNA *prop; @@ -2623,7 +2623,7 @@ static uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, const char *s return but; } -static uiBut *ui_def_but_operator(uiBlock *block, int type, const char *opname, int opcontext, const char *str, short x1, short y1, short x2, short y2, const char *tip) +static uiBut *ui_def_but_operator(uiBlock *block, int type, const char *opname, int opcontext, const char *str, int x1, int y1, short x2, short y2, const char *tip) { uiBut *but; wmOperatorType *ot; @@ -2652,7 +2652,7 @@ static uiBut *ui_def_but_operator(uiBlock *block, int type, const char *opname, return but; } -static uiBut *ui_def_but_operator_text(uiBlock *block, int type, const char *opname, int opcontext, const char *str, short x1, short y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip) +static uiBut *ui_def_but_operator_text(uiBlock *block, int type, const char *opname, int opcontext, const char *str, int x1, int y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip) { uiBut *but; wmOperatorType *ot; @@ -2681,7 +2681,7 @@ static uiBut *ui_def_but_operator_text(uiBlock *block, int type, const char *opn return but; } -uiBut *uiDefBut(uiBlock *block, int type, int retval, const char *str, short x1, short y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefBut(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip) { uiBut *but= ui_def_but(block, type, retval, str, x1, y1, x2, y2, poin, min, max, a1, a2, tip); @@ -2790,7 +2790,7 @@ static void autocomplete_id(bContext *C, char *str, void *arg_v) } } -static uiBut *uiDefButBit(uiBlock *block, int type, int bit, int retval, const char *str, short x1, short y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip) +static uiBut *uiDefButBit(uiBlock *block, int type, int bit, int retval, const char *str, int x1, int y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip) { int bitIdx= findBitIndex(bit); if (bitIdx==-1) { @@ -2799,39 +2799,39 @@ static uiBut *uiDefButBit(uiBlock *block, int type, int bit, int retval, const c return uiDefBut(block, type|BIT|bitIdx, retval, str, x1, y1, x2, y2, poin, min, max, a1, a2, tip); } } -uiBut *uiDefButF(uiBlock *block, int type, int retval, const char *str, short x1, short y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefButF(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip) { return uiDefBut(block, type|FLO, retval, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); } -uiBut *uiDefButBitF(uiBlock *block, int type, int bit, int retval, const char *str, short x1, short y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefButBitF(uiBlock *block, int type, int bit, int retval, const char *str, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip) { return uiDefButBit(block, type|FLO, bit, retval, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); } -uiBut *uiDefButI(uiBlock *block, int type, int retval, const char *str, short x1, short y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefButI(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip) { return uiDefBut(block, type|INT, retval, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); } -uiBut *uiDefButBitI(uiBlock *block, int type, int bit, int retval, const char *str, short x1, short y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefButBitI(uiBlock *block, int type, int bit, int retval, const char *str, int x1, int y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip) { return uiDefButBit(block, type|INT, bit, retval, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); } -uiBut *uiDefButS(uiBlock *block, int type, int retval, const char *str, short x1, short y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefButS(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip) { return uiDefBut(block, type|SHO, retval, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); } -uiBut *uiDefButBitS(uiBlock *block, int type, int bit, int retval, const char *str, short x1, short y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefButBitS(uiBlock *block, int type, int bit, int retval, const char *str, int x1, int y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip) { return uiDefButBit(block, type|SHO, bit, retval, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); } -uiBut *uiDefButC(uiBlock *block, int type, int retval, const char *str, short x1, short y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefButC(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip) { return uiDefBut(block, type|CHA, retval, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); } -uiBut *uiDefButBitC(uiBlock *block, int type, int bit, int retval, const char *str, short x1, short y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefButBitC(uiBlock *block, int type, int bit, int retval, const char *str, int x1, int y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip) { return uiDefButBit(block, type|CHA, bit, retval, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); } -uiBut *uiDefButR(uiBlock *block, int type, int retval, const char *str, short x1, short y1, short x2, short y2, PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefButR(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2, const char *tip) { uiBut *but; @@ -2841,7 +2841,7 @@ uiBut *uiDefButR(uiBlock *block, int type, int retval, const char *str, short x1 return but; } -uiBut *uiDefButO(uiBlock *block, int type, const char *opname, int opcontext, const char *str, short x1, short y1, short x2, short y2, const char *tip) +uiBut *uiDefButO(uiBlock *block, int type, const char *opname, int opcontext, const char *str, int x1, int y1, short x2, short y2, const char *tip) { uiBut *but; @@ -2852,7 +2852,7 @@ uiBut *uiDefButO(uiBlock *block, int type, const char *opname, int opcontext, co return but; } -uiBut *uiDefButTextO(uiBlock *block, int type, const char *opname, int opcontext, const char *str, short x1, short y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefButTextO(uiBlock *block, int type, const char *opname, int opcontext, const char *str, int x1, int y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip) { uiBut *but= ui_def_but_operator_text(block, type, opname, opcontext, str, x1, y1, x2, y2, poin, min, max, a1, a2, tip); @@ -2863,7 +2863,7 @@ uiBut *uiDefButTextO(uiBlock *block, int type, const char *opname, int opcontext } /* if a1==1.0 then a2 is an extra icon blending factor (alpha 0.0 - 1.0) */ -uiBut *uiDefIconBut(uiBlock *block, int type, int retval, int icon, short x1, short y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefIconBut(uiBlock *block, int type, int retval, int icon, int x1, int y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip) { uiBut *but= ui_def_but(block, type, retval, "", x1, y1, x2, y2, poin, min, max, a1, a2, tip); @@ -2874,7 +2874,7 @@ uiBut *uiDefIconBut(uiBlock *block, int type, int retval, int icon, short x1, sh return but; } -static uiBut *uiDefIconButBit(uiBlock *block, int type, int bit, int retval, int icon, short x1, short y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip) +static uiBut *uiDefIconButBit(uiBlock *block, int type, int bit, int retval, int icon, int x1, int y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip) { int bitIdx= findBitIndex(bit); if (bitIdx==-1) { @@ -2884,39 +2884,39 @@ static uiBut *uiDefIconButBit(uiBlock *block, int type, int bit, int retval, int } } -uiBut *uiDefIconButF(uiBlock *block, int type, int retval, int icon, short x1, short y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefIconButF(uiBlock *block, int type, int retval, int icon, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip) { return uiDefIconBut(block, type|FLO, retval, icon, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); } -uiBut *uiDefIconButBitF(uiBlock *block, int type, int bit, int retval, int icon, short x1, short y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefIconButBitF(uiBlock *block, int type, int bit, int retval, int icon, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip) { return uiDefIconButBit(block, type|FLO, bit, retval, icon, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); } -uiBut *uiDefIconButI(uiBlock *block, int type, int retval, int icon, short x1, short y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefIconButI(uiBlock *block, int type, int retval, int icon, int x1, int y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip) { return uiDefIconBut(block, type|INT, retval, icon, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); } -uiBut *uiDefIconButBitI(uiBlock *block, int type, int bit, int retval, int icon, short x1, short y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefIconButBitI(uiBlock *block, int type, int bit, int retval, int icon, int x1, int y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip) { return uiDefIconButBit(block, type|INT, bit, retval, icon, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); } -uiBut *uiDefIconButS(uiBlock *block, int type, int retval, int icon, short x1, short y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefIconButS(uiBlock *block, int type, int retval, int icon, int x1, int y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip) { return uiDefIconBut(block, type|SHO, retval, icon, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); } -uiBut *uiDefIconButBitS(uiBlock *block, int type, int bit, int retval, int icon, short x1, short y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefIconButBitS(uiBlock *block, int type, int bit, int retval, int icon, int x1, int y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip) { return uiDefIconButBit(block, type|SHO, bit, retval, icon, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); } -uiBut *uiDefIconButC(uiBlock *block, int type, int retval, int icon, short x1, short y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefIconButC(uiBlock *block, int type, int retval, int icon, int x1, int y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip) { return uiDefIconBut(block, type|CHA, retval, icon, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); } -uiBut *uiDefIconButBitC(uiBlock *block, int type, int bit, int retval, int icon, short x1, short y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefIconButBitC(uiBlock *block, int type, int bit, int retval, int icon, int x1, int y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip) { return uiDefIconButBit(block, type|CHA, bit, retval, icon, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); } -uiBut *uiDefIconButR(uiBlock *block, int type, int retval, int icon, short x1, short y1, short x2, short y2, PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefIconButR(uiBlock *block, int type, int retval, int icon, int x1, int y1, short x2, short y2, PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2, const char *tip) { uiBut *but; @@ -2931,7 +2931,7 @@ uiBut *uiDefIconButR(uiBlock *block, int type, int retval, int icon, short x1, s return but; } -uiBut *uiDefIconButO(uiBlock *block, int type, const char *opname, int opcontext, int icon, short x1, short y1, short x2, short y2, const char *tip) +uiBut *uiDefIconButO(uiBlock *block, int type, const char *opname, int opcontext, int icon, int x1, int y1, short x2, short y2, const char *tip) { uiBut *but; @@ -2946,7 +2946,7 @@ uiBut *uiDefIconButO(uiBlock *block, int type, const char *opname, int opcontext } /* Button containing both string label and icon */ -uiBut *uiDefIconTextBut(uiBlock *block, int type, int retval, int icon, const char *str, short x1, short y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefIconTextBut(uiBlock *block, int type, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip) { uiBut *but= ui_def_but(block, type, retval, str, x1, y1, x2, y2, poin, min, max, a1, a2, tip); @@ -2959,7 +2959,7 @@ uiBut *uiDefIconTextBut(uiBlock *block, int type, int retval, int icon, const ch return but; } -static uiBut *uiDefIconTextButBit(uiBlock *block, int type, int bit, int retval, int icon, const char *str, short x1, short y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip) +static uiBut *uiDefIconTextButBit(uiBlock *block, int type, int bit, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip) { int bitIdx= findBitIndex(bit); if (bitIdx==-1) { @@ -2969,39 +2969,39 @@ static uiBut *uiDefIconTextButBit(uiBlock *block, int type, int bit, int retval, } } -uiBut *uiDefIconTextButF(uiBlock *block, int type, int retval, int icon, const char *str, short x1, short y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefIconTextButF(uiBlock *block, int type, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip) { return uiDefIconTextBut(block, type|FLO, retval, icon, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); } -uiBut *uiDefIconTextButBitF(uiBlock *block, int type, int bit, int retval, int icon, const char *str, short x1, short y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefIconTextButBitF(uiBlock *block, int type, int bit, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip) { return uiDefIconTextButBit(block, type|FLO, bit, retval, icon, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); } -uiBut *uiDefIconTextButI(uiBlock *block, int type, int retval, int icon, const char *str, short x1, short y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefIconTextButI(uiBlock *block, int type, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip) { return uiDefIconTextBut(block, type|INT, retval, icon, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); } -uiBut *uiDefIconTextButBitI(uiBlock *block, int type, int bit, int retval, int icon, const char *str, short x1, short y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefIconTextButBitI(uiBlock *block, int type, int bit, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip) { return uiDefIconTextButBit(block, type|INT, bit, retval, icon, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); } -uiBut *uiDefIconTextButS(uiBlock *block, int type, int retval, int icon, const char *str, short x1, short y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefIconTextButS(uiBlock *block, int type, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip) { return uiDefIconTextBut(block, type|SHO, retval, icon, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); } -uiBut *uiDefIconTextButBitS(uiBlock *block, int type, int bit, int retval, int icon, const char *str, short x1, short y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefIconTextButBitS(uiBlock *block, int type, int bit, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip) { return uiDefIconTextButBit(block, type|SHO, bit, retval, icon, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); } -uiBut *uiDefIconTextButC(uiBlock *block, int type, int retval, int icon, const char *str, short x1, short y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefIconTextButC(uiBlock *block, int type, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip) { return uiDefIconTextBut(block, type|CHA, retval, icon, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); } -uiBut *uiDefIconTextButBitC(uiBlock *block, int type, int bit, int retval, int icon, const char *str, short x1, short y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefIconTextButBitC(uiBlock *block, int type, int bit, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip) { return uiDefIconTextButBit(block, type|CHA, bit, retval, icon, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); } -uiBut *uiDefIconTextButR(uiBlock *block, int type, int retval, int icon, const char *str, short x1, short y1, short x2, short y2, PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2, const char *tip) +uiBut *uiDefIconTextButR(uiBlock *block, int type, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2, const char *tip) { uiBut *but; @@ -3017,7 +3017,7 @@ uiBut *uiDefIconTextButR(uiBlock *block, int type, int retval, int icon, const c return but; } -uiBut *uiDefIconTextButO(uiBlock *block, int type, const char *opname, int opcontext, int icon, const char *str, short x1, short y1, short x2, short y2, const char *tip) +uiBut *uiDefIconTextButO(uiBlock *block, int type, const char *opname, int opcontext, int icon, const char *str, int x1, int y1, short x2, short y2, const char *tip) { uiBut *but; @@ -3248,7 +3248,7 @@ void uiButSetCompleteFunc(uiBut *but, uiButCompleteFunc func, void *arg) but->autofunc_arg= arg; } -uiBut *uiDefIDPoinBut(uiBlock *block, uiIDPoinFuncFP func, short blocktype, int retval, const char *str, short x1, short y1, short x2, short y2, void *idpp, const char *tip) +uiBut *uiDefIDPoinBut(uiBlock *block, uiIDPoinFuncFP func, short blocktype, int retval, const char *str, int x1, int y1, short x2, short y2, void *idpp, const char *tip) { uiBut *but= ui_def_but(block, IDPOIN, retval, str, x1, y1, x2, y2, NULL, 0.0, 0.0, 0.0, 0.0, tip); but->idpoin_func= func; @@ -3261,7 +3261,7 @@ uiBut *uiDefIDPoinBut(uiBlock *block, uiIDPoinFuncFP func, short blocktype, int return but; } -uiBut *uiDefBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, const char *str, short x1, short y1, short x2, short y2, const char *tip) +uiBut *uiDefBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, const char *str, int x1, int y1, short x2, short y2, const char *tip) { uiBut *but= ui_def_but(block, BLOCK, 0, str, x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip); but->block_create_func= func; @@ -3269,7 +3269,7 @@ uiBut *uiDefBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, const ch return but; } -uiBut *uiDefBlockButN(uiBlock *block, uiBlockCreateFunc func, void *argN, const char *str, short x1, short y1, short x2, short y2, const char *tip) +uiBut *uiDefBlockButN(uiBlock *block, uiBlockCreateFunc func, void *argN, const char *str, int x1, int y1, short x2, short y2, const char *tip) { uiBut *but= ui_def_but(block, BLOCK, 0, str, x1, y1, x2, y2, NULL, 0.0, 0.0, 0.0, 0.0, tip); but->block_create_func= func; @@ -3281,7 +3281,7 @@ uiBut *uiDefBlockButN(uiBlock *block, uiBlockCreateFunc func, void *argN, const } -uiBut *uiDefPulldownBut(uiBlock *block, uiBlockCreateFunc func, void *arg, const char *str, short x1, short y1, short x2, short y2, const char *tip) +uiBut *uiDefPulldownBut(uiBlock *block, uiBlockCreateFunc func, void *arg, const char *str, int x1, int y1, short x2, short y2, const char *tip) { uiBut *but= ui_def_but(block, PULLDOWN, 0, str, x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip); but->block_create_func= func; @@ -3289,7 +3289,7 @@ uiBut *uiDefPulldownBut(uiBlock *block, uiBlockCreateFunc func, void *arg, const return but; } -uiBut *uiDefMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, const char *str, short x1, short y1, short x2, short y2, const char *tip) +uiBut *uiDefMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, const char *str, int x1, int y1, short x2, short y2, const char *tip) { uiBut *but= ui_def_but(block, PULLDOWN, 0, str, x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip); but->menu_create_func= func; @@ -3297,7 +3297,7 @@ uiBut *uiDefMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, const char return but; } -uiBut *uiDefIconTextMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, const char *str, short x1, short y1, short x2, short y2, const char *tip) +uiBut *uiDefIconTextMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, const char *str, int x1, int y1, short x2, short y2, const char *tip) { uiBut *but= ui_def_but(block, PULLDOWN, 0, str, x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip); @@ -3313,7 +3313,7 @@ uiBut *uiDefIconTextMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, in return but; } -uiBut *uiDefIconMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, short x1, short y1, short x2, short y2, const char *tip) +uiBut *uiDefIconMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, int x1, int y1, short x2, short y2, const char *tip) { uiBut *but= ui_def_but(block, PULLDOWN, 0, "", x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip); @@ -3328,7 +3328,7 @@ uiBut *uiDefIconMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int ic } /* Block button containing both string label and icon */ -uiBut *uiDefIconTextBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int icon, const char *str, short x1, short y1, short x2, short y2, const char *tip) +uiBut *uiDefIconTextBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int icon, const char *str, int x1, int y1, short x2, short y2, const char *tip) { uiBut *but= ui_def_but(block, BLOCK, 0, str, x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip); @@ -3347,7 +3347,7 @@ uiBut *uiDefIconTextBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, } /* Block button containing icon */ -uiBut *uiDefIconBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int retval, int icon, short x1, short y1, short x2, short y2, const char *tip) +uiBut *uiDefIconBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int retval, int icon, int x1, int y1, short x2, short y2, const char *tip) { uiBut *but= ui_def_but(block, BLOCK, retval, "", x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip); @@ -3362,7 +3362,7 @@ uiBut *uiDefIconBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int return but; } -uiBut *uiDefKeyevtButS(uiBlock *block, int retval, const char *str, short x1, short y1, short x2, short y2, short *spoin, const char *tip) +uiBut *uiDefKeyevtButS(uiBlock *block, int retval, const char *str, int x1, int y1, short x2, short y2, short *spoin, const char *tip) { uiBut *but= ui_def_but(block, KEYEVT|SHO, retval, str, x1, y1, x2, y2, spoin, 0.0, 0.0, 0.0, 0.0, tip); ui_check_but(but); @@ -3371,7 +3371,7 @@ uiBut *uiDefKeyevtButS(uiBlock *block, int retval, const char *str, short x1, sh /* short pointers hardcoded */ /* modkeypoin will be set to KM_SHIFT, KM_ALT, KM_CTRL, KM_OSKEY bits */ -uiBut *uiDefHotKeyevtButS(uiBlock *block, int retval, const char *str, short x1, short y1, short x2, short y2, short *keypoin, short *modkeypoin, const char *tip) +uiBut *uiDefHotKeyevtButS(uiBlock *block, int retval, const char *str, int x1, int y1, short x2, short y2, short *keypoin, short *modkeypoin, const char *tip) { uiBut *but= ui_def_but(block, HOTKEYEVT|SHO, retval, str, x1, y1, x2, y2, keypoin, 0.0, 0.0, 0.0, 0.0, tip); but->modifier_key= *modkeypoin; @@ -3382,7 +3382,7 @@ uiBut *uiDefHotKeyevtButS(uiBlock *block, int retval, const char *str, short x1, /* arg is pointer to string/name, use uiButSetSearchFunc() below to make this work */ /* here a1 and a2, if set, control thumbnail preview rows/cols */ -uiBut *uiDefSearchBut(uiBlock *block, void *arg, int retval, int icon, int maxlen, short x1, short y1, short x2, short y2, float a1, float a2, const char *tip) +uiBut *uiDefSearchBut(uiBlock *block, void *arg, int retval, int icon, int maxlen, int x1, int y1, short x2, short y2, float a1, float a2, const char *tip) { uiBut *but= ui_def_but(block, SEARCH_MENU, retval, "", x1, y1, x2, y2, arg, 0.0, maxlen, a1, a2, tip); diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index 63127360fcd..6583d287cf8 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -5136,17 +5136,17 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar uiBlockSetEmboss(block, UI_EMBOSSN); bt= uiDefIconButR(block, ICONTOG, 0, ICON_RESTRICT_VIEW_OFF, - (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, + (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (int)te->ys, 17, OL_H-1, &ptr, "hide", -1, 0, 0, -1, -1, NULL); uiButSetFunc(bt, restrictbutton_view_cb, scene, ob); bt= uiDefIconButR(block, ICONTOG, 0, ICON_RESTRICT_SELECT_OFF, - (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (short)te->ys, 17, OL_H-1, + (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (int)te->ys, 17, OL_H-1, &ptr, "hide_select", -1, 0, 0, -1, -1, NULL); uiButSetFunc(bt, restrictbutton_sel_cb, scene, ob); bt= uiDefIconButR(block, ICONTOG, 0, ICON_RESTRICT_RENDER_OFF, - (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX, (short)te->ys, 17, OL_H-1, + (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX, (int)te->ys, 17, OL_H-1, &ptr, "hide_render", -1, 0, 0, -1, -1, NULL); uiButSetFunc(bt, restrictbutton_rend_cb, scene, ob); @@ -5160,15 +5160,15 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar uiBlockSetEmboss(block, UI_EMBOSSN); restrict_bool= group_restrict_flag(gr, OB_RESTRICT_VIEW); - bt = uiDefIconBut(block, BUT, 0, restrict_bool ? ICON_RESTRICT_VIEW_ON : ICON_RESTRICT_VIEW_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, 0, 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View"); + bt = uiDefIconBut(block, BUT, 0, restrict_bool ? ICON_RESTRICT_VIEW_ON : ICON_RESTRICT_VIEW_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (int)te->ys, 17, OL_H-1, 0, 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View"); uiButSetFunc(bt, restrictbutton_gr_restrict_view, scene, gr); restrict_bool= group_restrict_flag(gr, OB_RESTRICT_SELECT); - bt = uiDefIconBut(block, BUT, 0, restrict_bool ? ICON_RESTRICT_SELECT_ON : ICON_RESTRICT_SELECT_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (short)te->ys, 17, OL_H-1, 0, 0, 0, 0, 0, "Restrict/Allow selection in the 3D View"); + bt = uiDefIconBut(block, BUT, 0, restrict_bool ? ICON_RESTRICT_SELECT_ON : ICON_RESTRICT_SELECT_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (int)te->ys, 17, OL_H-1, 0, 0, 0, 0, 0, "Restrict/Allow selection in the 3D View"); uiButSetFunc(bt, restrictbutton_gr_restrict_select, scene, gr); restrict_bool= group_restrict_flag(gr, OB_RESTRICT_RENDER); - bt = uiDefIconBut(block, BUT, 0, restrict_bool ? ICON_RESTRICT_RENDER_ON : ICON_RESTRICT_RENDER_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX, (short)te->ys, 17, OL_H-1, 0, 0, 0, 0, 0, "Restrict/Allow renderability"); + bt = uiDefIconBut(block, BUT, 0, restrict_bool ? ICON_RESTRICT_RENDER_ON : ICON_RESTRICT_RENDER_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX, (int)te->ys, 17, OL_H-1, 0, 0, 0, 0, 0, "Restrict/Allow renderability"); uiButSetFunc(bt, restrictbutton_gr_restrict_render, scene, gr); uiBlockSetEmboss(block, UI_EMBOSS); @@ -5178,7 +5178,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar uiBlockSetEmboss(block, UI_EMBOSSN); bt= uiDefIconButBitI(block, ICONTOGN, SCE_LAY_DISABLE, 0, ICON_CHECKBOX_HLT-1, - (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, te->directdata, 0, 0, 0, 0, "Render this RenderLayer"); + (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (int)te->ys, 17, OL_H-1, te->directdata, 0, 0, 0, 0, "Render this RenderLayer"); uiButSetFunc(bt, restrictbutton_r_lay_cb, tselem->id, NULL); uiBlockSetEmboss(block, UI_EMBOSS); @@ -5191,13 +5191,13 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar bt= uiDefIconButBitI(block, ICONTOG, passflag, 0, ICON_CHECKBOX_HLT-1, - (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, layflag, 0, 0, 0, 0, "Render this Pass"); + (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (int)te->ys, 17, OL_H-1, layflag, 0, 0, 0, 0, "Render this Pass"); uiButSetFunc(bt, restrictbutton_r_lay_cb, tselem->id, NULL); layflag++; /* is lay_xor */ if(ELEM8(passflag, SCE_PASS_SPEC, SCE_PASS_SHADOW, SCE_PASS_AO, SCE_PASS_REFLECT, SCE_PASS_REFRACT, SCE_PASS_INDIRECT, SCE_PASS_EMIT, SCE_PASS_ENVIRONMENT)) bt= uiDefIconButBitI(block, TOG, passflag, 0, (*layflag & passflag)?ICON_DOT:ICON_BLANK1, - (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (short)te->ys, 17, OL_H-1, layflag, 0, 0, 0, 0, "Exclude this Pass from Combined"); + (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (int)te->ys, 17, OL_H-1, layflag, 0, 0, 0, 0, "Exclude this Pass from Combined"); uiButSetFunc(bt, restrictbutton_r_lay_cb, tselem->id, NULL); uiBlockSetEmboss(block, UI_EMBOSS); @@ -5208,11 +5208,11 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar uiBlockSetEmboss(block, UI_EMBOSSN); bt= uiDefIconButBitI(block, ICONTOGN, eModifierMode_Realtime, 0, ICON_RESTRICT_VIEW_OFF, - (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, &(md->mode), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View"); + (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (int)te->ys, 17, OL_H-1, &(md->mode), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View"); uiButSetFunc(bt, restrictbutton_modifier_cb, scene, ob); bt= uiDefIconButBitI(block, ICONTOGN, eModifierMode_Render, 0, ICON_RESTRICT_RENDER_OFF, - (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX, (short)te->ys, 17, OL_H-1, &(md->mode), 0, 0, 0, 0, "Restrict/Allow renderability"); + (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX, (int)te->ys, 17, OL_H-1, &(md->mode), 0, 0, 0, 0, "Restrict/Allow renderability"); uiButSetFunc(bt, restrictbutton_modifier_cb, scene, ob); } else if(tselem->type==TSE_POSE_CHANNEL) { @@ -5221,11 +5221,11 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar uiBlockSetEmboss(block, UI_EMBOSSN); bt= uiDefIconButBitI(block, ICONTOG, BONE_HIDDEN_P, 0, ICON_RESTRICT_VIEW_OFF, - (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, &(bone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View"); + (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (int)te->ys, 17, OL_H-1, &(bone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View"); uiButSetFunc(bt, restrictbutton_bone_cb, NULL, bone); bt= uiDefIconButBitI(block, ICONTOG, BONE_UNSELECTABLE, 0, ICON_RESTRICT_SELECT_OFF, - (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (short)te->ys, 17, OL_H-1, &(bone->flag), 0, 0, 0, 0, "Restrict/Allow selection in the 3D View"); + (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (int)te->ys, 17, OL_H-1, &(bone->flag), 0, 0, 0, 0, "Restrict/Allow selection in the 3D View"); uiButSetFunc(bt, restrictbutton_bone_cb, NULL, NULL); } else if(tselem->type==TSE_EBONE) { @@ -5233,11 +5233,11 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar uiBlockSetEmboss(block, UI_EMBOSSN); bt= uiDefIconButBitI(block, ICONTOG, BONE_HIDDEN_A, 0, ICON_RESTRICT_VIEW_OFF, - (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (short)te->ys, 17, OL_H-1, &(ebone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View"); + (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (int)te->ys, 17, OL_H-1, &(ebone->flag), 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View"); uiButSetFunc(bt, restrictbutton_ebone_cb, NULL, ebone); bt= uiDefIconButBitI(block, ICONTOG, BONE_UNSELECTABLE, 0, ICON_RESTRICT_SELECT_OFF, - (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (short)te->ys, 17, OL_H-1, &(ebone->flag), 0, 0, 0, 0, "Restrict/Allow selection in the 3D View"); + (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (int)te->ys, 17, OL_H-1, &(ebone->flag), 0, 0, 0, 0, "Restrict/Allow selection in the 3D View"); uiButSetFunc(bt, restrictbutton_ebone_cb, NULL, NULL); } } @@ -5582,7 +5582,7 @@ static void outliner_buttons(const bContext *C, uiBlock *block, ARegion *ar, Spa spx=te->xs+2*OL_X-4; if(spx+dx+10>ar->v2d.cur.xmax) dx = ar->v2d.cur.xmax-spx-10; - bt= uiDefBut(block, TEX, OL_NAMEBUTTON, "", spx, (short)te->ys, dx+10, OL_H-1, (void *)te->name, 1.0, (float)len, 0, 0, ""); + bt= uiDefBut(block, TEX, OL_NAMEBUTTON, "", spx, (int)te->ys, dx+10, OL_H-1, (void *)te->name, 1.0, (float)len, 0, 0, ""); uiButSetRenameFunc(bt, namebutton_cb, tselem); /* returns false if button got removed */ From d3f9b0d05ad6faffd440bab6efc0345cc0f5d32c Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Tue, 7 Dec 2010 10:15:09 +0000 Subject: [PATCH 032/236] Bugfix #25049: Compositing Nodes not Keyframable An error seems to have been introduced to the node-tree building at some point, which means that the ID-type for data-attached node trees was incorrect (i.e. scene->nodetree->id.name = NTREE_COMPOSIT instead of ID_NT). This in turn meant that the ID AnimData availability poll would fail, as the ID-type could not be determined. --- source/blender/blenkernel/intern/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 8db64e190a2..4b158f4b405 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -1045,7 +1045,7 @@ bNodeTree *ntreeAddTree(const char *name, int type, const short is_group) ntree= alloc_libblock(&G.main->nodetree, ID_NT, name); else { ntree= MEM_callocN(sizeof(bNodeTree), "new node tree"); - *( (short *)ntree->id.name )= type; + *( (short *)ntree->id.name )= ID_NT; /* not "type", as that is ntree->type */ BLI_strncpy(ntree->id.name+2, name, sizeof(ntree->id.name)); } From 6c32bffab0e9f6f3816c54a222e2deb1148f1300 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Tue, 7 Dec 2010 11:03:53 +0000 Subject: [PATCH 033/236] Bugfix #24163a: Unable to animate INSIDE a group node in the compositor (This commit doesn't fix the original bug reported in the report, but does fix one that was discovered while investigating that one) Trying to insert keyframes for nodes within group nodes was failing. This was caused by the ID-block for those UI widgets being set to the Node Editor's current ID-block (i.e. NodeTree) vs the NodeTree that those nodes lived in. The net result was that the paths couldn't be resolved, as the paths obtained for those widgets could only work up to the group's nodetree. --- source/blender/editors/space_node/node_draw.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index ab1b83f60ae..4b703e60358 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -630,7 +630,7 @@ static void node_draw_preview(bNodePreview *preview, rctf *prv) } -static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bNode *node) +static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeTree *ntree, bNode *node) { bNodeSocket *sock; uiBut *bt; @@ -639,7 +639,6 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN int /*ofs,*/ color_id= node_get_colorid(node); char showname[128]; /* 128 used below */ View2D *v2d = &ar->v2d; - bNodeTree *ntree = snode->nodetree; PointerRNA ptr; /* hurmf... another candidate for callback, have to see how this works first */ @@ -943,7 +942,7 @@ static void node_draw_nodetree(const bContext *C, ARegion *ar, SpaceNode *snode, else if(node->flag & NODE_HIDDEN) node_draw_hidden(C, ar, snode, node); else - node_draw_basis(C, ar, snode, node); + node_draw_basis(C, ar, snode, ntree, node); } } @@ -954,7 +953,7 @@ static void node_draw_nodetree(const bContext *C, ARegion *ar, SpaceNode *snode, else if(node->flag & NODE_HIDDEN) node_draw_hidden(C, ar, snode, node); else - node_draw_basis(C, ar, snode, node); + node_draw_basis(C, ar, snode, ntree, node); } } } From 3e7469cd01dd177b8eeae904216e5c4d1c3c09ec Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 7 Dec 2010 11:57:34 +0000 Subject: [PATCH 034/236] Added WITH_CXX_GUARDEDALLOC support for GHOST, disabled by default. --- intern/ghost/GHOST_IEvent.h | 6 ++++++ intern/ghost/GHOST_IEventConsumer.h | 6 ++++++ intern/ghost/GHOST_ISystem.h | 6 ++++++ intern/ghost/GHOST_ITimerTask.h | 6 ++++++ intern/ghost/GHOST_IWindow.h | 5 +++++ intern/ghost/GHOST_Rect.h | 6 ++++++ intern/ghost/GHOST_Types.h | 4 ++++ intern/ghost/intern/GHOST_WindowManager.h | 7 +++++++ 8 files changed, 46 insertions(+) diff --git a/intern/ghost/GHOST_IEvent.h b/intern/ghost/GHOST_IEvent.h index dae645c8943..a80407e8368 100644 --- a/intern/ghost/GHOST_IEvent.h +++ b/intern/ghost/GHOST_IEvent.h @@ -83,6 +83,12 @@ public: * @return The event data. */ virtual GHOST_TEventDataPtr getData() = 0; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GHOST:GHOST_IEvent"); } + void operator delete( void *mem ) { MEM_freeN(mem); } +#endif }; #endif // _GHOST_IEVENT_H_ diff --git a/intern/ghost/GHOST_IEventConsumer.h b/intern/ghost/GHOST_IEventConsumer.h index 38ad2ec424b..4d6d063fbf5 100644 --- a/intern/ghost/GHOST_IEventConsumer.h +++ b/intern/ghost/GHOST_IEventConsumer.h @@ -62,6 +62,12 @@ public: * @return Indication as to whether the event was handled. */ virtual bool processEvent(GHOST_IEvent* event) = 0; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GHOST:GHOST_IEventConsumer"); } + void operator delete( void *mem ) { MEM_freeN(mem); } +#endif }; #endif // _GHOST_EVENT_CONSUMER_H_ diff --git a/intern/ghost/GHOST_ISystem.h b/intern/ghost/GHOST_ISystem.h index 47f142e4c8a..227ba4448c3 100644 --- a/intern/ghost/GHOST_ISystem.h +++ b/intern/ghost/GHOST_ISystem.h @@ -404,6 +404,12 @@ protected: /** The one and only system */ static GHOST_ISystem* m_system; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GHOST:GHOST_ISystem"); } + void operator delete( void *mem ) { MEM_freeN(mem); } +#endif }; #endif // _GHOST_ISYSTEM_H_ diff --git a/intern/ghost/GHOST_ITimerTask.h b/intern/ghost/GHOST_ITimerTask.h index b97ae3417c6..bb80e4670fe 100644 --- a/intern/ghost/GHOST_ITimerTask.h +++ b/intern/ghost/GHOST_ITimerTask.h @@ -83,6 +83,12 @@ public: * @param data The timer user data. */ virtual void setUserData(const GHOST_TUserDataPtr userData) = 0; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GHOST:GHOST_ITimerTask"); } + void operator delete( void *mem ) { MEM_freeN(mem); } +#endif }; #endif // _GHOST_ITIMER_TASK_H_ diff --git a/intern/ghost/GHOST_IWindow.h b/intern/ghost/GHOST_IWindow.h index 83757b17e8b..2eeee621495 100644 --- a/intern/ghost/GHOST_IWindow.h +++ b/intern/ghost/GHOST_IWindow.h @@ -305,6 +305,11 @@ public: */ virtual GHOST_TSuccess setCursorGrab(GHOST_TGrabCursorMode mode, GHOST_Rect *bounds) { return GHOST_kSuccess; }; +#ifdef WITH_CXX_GUARDEDALLOC +public: + void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GHOST:GHOST_IWindow"); } + void operator delete( void *mem ) { MEM_freeN(mem); } +#endif }; #endif // _GHOST_IWINDOW_H_ diff --git a/intern/ghost/GHOST_Rect.h b/intern/ghost/GHOST_Rect.h index e3d056dd467..b2833eb2c28 100644 --- a/intern/ghost/GHOST_Rect.h +++ b/intern/ghost/GHOST_Rect.h @@ -185,6 +185,12 @@ public: GHOST_TInt32 m_r; /** Bottom coordinate of the rectangle */ GHOST_TInt32 m_b; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GHOST:GHOST_Rect"); } + void operator delete( void *mem ) { MEM_freeN(mem); } +#endif }; diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index 3770bbde425..dd7b0527bf8 100644 --- a/intern/ghost/GHOST_Types.h +++ b/intern/ghost/GHOST_Types.h @@ -29,6 +29,10 @@ #ifndef _GHOST_TYPES_H_ #define _GHOST_TYPES_H_ +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + typedef char GHOST_TInt8; typedef unsigned char GHOST_TUns8; typedef short GHOST_TInt16; diff --git a/intern/ghost/intern/GHOST_WindowManager.h b/intern/ghost/intern/GHOST_WindowManager.h index 07f95d57ef3..06996059b82 100644 --- a/intern/ghost/intern/GHOST_WindowManager.h +++ b/intern/ghost/intern/GHOST_WindowManager.h @@ -160,6 +160,13 @@ protected: /** Window that was active before entering fullscreen state. */ GHOST_IWindow* m_activeWindowBeforeFullScreen; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GHOST:GHOST_WindowManager"); } + void operator delete( void *mem ) { MEM_freeN(mem); } +#endif + }; #endif // _GHOST_WINDOW_MANAGER_H_ From b5c2f9df95a0115de85dab9233082e98aff254c3 Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Tue, 7 Dec 2010 12:29:51 +0000 Subject: [PATCH 035/236] Bug fix: Halos didn't use texture alpha --- source/blender/render/intern/source/renderdatabase.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/source/blender/render/intern/source/renderdatabase.c b/source/blender/render/intern/source/renderdatabase.c index 91d58b7943e..9c2a3c143af 100644 --- a/source/blender/render/intern/source/renderdatabase.c +++ b/source/blender/render/intern/source/renderdatabase.c @@ -1048,7 +1048,7 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater MTex *mtex; float tin, tr, tg, tb, ta; float xn, yn, zn, texvec[3], hoco[4], hoco1[4], in[3],tex[3],out[3]; - int i; + int i, hasrgb; if(hasize==0.0) return NULL; @@ -1151,7 +1151,7 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater VECCOPY(texvec, orco); } - externtex(mtex, texvec, &tin, &tr, &tg, &tb, &ta, 0); + hasrgb = externtex(mtex, texvec, &tin, &tr, &tg, &tb, &ta, 0); //yn= tin*mtex->colfac; //zn= tin*mtex->alphafac; @@ -1172,6 +1172,11 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater har->g= in[1]; har->b= in[2]; } + + /* alpha returned, so let's use it instead of intensity */ + if(hasrgb) + tin = ta; + if(mtex->mapto & MAP_ALPHA) har->alfa = texture_value_blend(mtex->def_var,har->alfa,tin,mtex->alphafac,mtex->blendtype); if(mtex->mapto & MAP_HAR) From a98fc7500dec62b5ade17453b0277ce3be87762b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 7 Dec 2010 12:51:03 +0000 Subject: [PATCH 036/236] - fix for crash with constraint UI when using with a pinner object, with None active. - fix for material UI when the pinned data was not a material. - fix an error axis-angle drot label. --- release/scripts/ui/properties_object.py | 2 +- release/scripts/ui/properties_texture.py | 11 ++++++++--- .../blender/editors/interface/interface_templates.c | 6 +++--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/release/scripts/ui/properties_object.py b/release/scripts/ui/properties_object.py index 40a1edafe87..6390f13b668 100644 --- a/release/scripts/ui/properties_object.py +++ b/release/scripts/ui/properties_object.py @@ -88,7 +88,7 @@ class OBJECT_PT_delta_transform(ObjectButtonsPanel, bpy.types.Panel): #row.column().prop(pchan, "delta_rotation_angle", text="Angle") #row.column().prop(pchan, "delta_rotation_axis", text="Axis") #row.column().prop(ob, "delta_rotation_axis_angle", text="Rotation") - row.column().label(ob, text="Not for Axis-Angle") + row.column().label(text="Not for Axis-Angle") else: row.column().prop(ob, "delta_rotation_euler", text="Rotation") diff --git a/release/scripts/ui/properties_texture.py b/release/scripts/ui/properties_texture.py index f106902cb81..32736b78b76 100644 --- a/release/scripts/ui/properties_texture.py +++ b/release/scripts/ui/properties_texture.py @@ -94,11 +94,16 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel, bpy.types.Panel): space = context.space_data tex = context.texture idblock = context_tex_datablock(context) - tex_collection = space.pin_id is None and type(idblock) != bpy.types.Brush and not node + pin_id = space.pin_id + + if type(pin_id) != bpy.types.Material: + pin_id = None + + tex_collection = pin_id is None and type(idblock) != bpy.types.Brush and not node if tex_collection: row = layout.row() - + row.template_list(idblock, "texture_slots", idblock, "active_texture_index", rows=2) col = row.column(align=True) @@ -116,7 +121,7 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel, bpy.types.Panel): elif idblock: col.template_ID(idblock, "texture", new="texture.new") - if space.pin_id: + if pin_id: col.template_ID(space, "pin_id") col = split.column() diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 3e04a6fe232..f776ee54a1c 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -825,11 +825,11 @@ uiLayout *uiTemplateModifier(uiLayout *layout, bContext *C, PointerRNA *ptr) #define REMAKEIPO 8 #define B_DIFF 9 -void do_constraint_panels(bContext *C, void *UNUSED(arg), int event) +void do_constraint_panels(bContext *C, void *ob_pt, int event) { Main *bmain= CTX_data_main(C); Scene *scene= CTX_data_scene(C); - Object *ob= CTX_data_active_object(C); + Object *ob= (Object *)ob_pt; switch(event) { case B_CONSTRAINT_TEST: @@ -898,7 +898,7 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con) /* unless button has own callback, it adds this callback to button */ block= uiLayoutGetBlock(layout); - uiBlockSetHandleFunc(block, do_constraint_panels, NULL); + uiBlockSetHandleFunc(block, do_constraint_panels, ob); uiBlockSetFunc(block, constraint_active_func, ob, con); RNA_pointer_create(&ob->id, &RNA_Constraint, con, &ptr); From 9c76ff3f2ebd72e7c0c369407508bf39261b62c6 Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Tue, 7 Dec 2010 12:58:25 +0000 Subject: [PATCH 037/236] "Particle" texture coordinates for halo materials: * Particle age can now be used as the texture x-coordinate, and location in a particle trail as the y-coordinate. * This finally enables particles in 2.5 to change their color (or any other texturable material property) by their age. * In 2.4x this was accomplished with the "100 frames == particle age", but this was both non-intuitive and slow as the animation system had to be recalculated for every particle. * Currently these are 2d coordinates (age/lifetime == x-coordinate, trail particle index/number of trail particles == y-coordinate), but other particle properties or possibly even a user definable property can be added as coordinates in the future. * On the code side this uses the same coordinate definition number (for halo materials) as strand coordinates (for surface materials). This is also nice as they intuitively mean nearly the same thing, i.e. along strand or during particle life. --- source/blender/makesdna/DNA_material_types.h | 1 + source/blender/makesrna/intern/rna_material.c | 2 +- .../render/intern/include/renderdatabase.h | 2 +- .../render/intern/source/convertblender.c | 58 ++++++------------- .../render/intern/source/renderdatabase.c | 8 ++- 5 files changed, 28 insertions(+), 43 deletions(-) diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h index f8eb6e76693..5a117d59f8a 100644 --- a/source/blender/makesdna/DNA_material_types.h +++ b/source/blender/makesdna/DNA_material_types.h @@ -300,6 +300,7 @@ typedef struct Material { #define TEXCO_TANGENT 4096 /* still stored in vertex->accum, 1 D */ #define TEXCO_STRAND 8192 +#define TEXCO_PARTICLE 8192 /* strand is used for normal materials, particle for halo materials */ #define TEXCO_STRESS 16384 #define TEXCO_SPEED 32768 diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index ec2e34fa0b6..a964a07ac16 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -40,7 +40,7 @@ static EnumPropertyItem prop_texture_coordinates_items[] = { {TEXCO_OBJECT, "OBJECT", 0, "Object", "Uses linked object's coordinates for texture coordinates"}, {TEXCO_UV, "UV", 0, "UV", "Uses UV coordinates for texture coordinates"}, {TEXCO_ORCO, "ORCO", 0, "Generated", "Uses the original undeformed coordinates of the object"}, -{TEXCO_STRAND, "STRAND", 0, "Strand", "Uses normalized strand texture coordinate (1D)"}, +{TEXCO_STRAND, "STRAND", 0, "Strand / Particle", "Uses normalized strand texture coordinate (1D) or particle age (X) and trail position (Y)"}, {TEXCO_STICKY, "STICKY", 0, "Sticky", "Uses mesh's sticky coordinates for the texture coordinates"}, {TEXCO_WINDOW, "WINDOW", 0, "Window", "Uses screen coordinates as texture coordinates"}, {TEXCO_NORM, "NORMAL", 0, "Normal", "Uses normal vector as texture coordinates"}, diff --git a/source/blender/render/intern/include/renderdatabase.h b/source/blender/render/intern/include/renderdatabase.h index 4c80616665d..8ef68d4a5c1 100644 --- a/source/blender/render/intern/include/renderdatabase.h +++ b/source/blender/render/intern/include/renderdatabase.h @@ -96,7 +96,7 @@ struct VertRen *RE_findOrAddVert(struct ObjectRen *obr, int nr); struct StrandRen *RE_findOrAddStrand(struct ObjectRen *obr, int nr); struct HaloRen *RE_findOrAddHalo(struct ObjectRen *obr, int nr); struct HaloRen *RE_inithalo(struct Render *re, struct ObjectRen *obr, struct Material *ma, float *vec, float *vec1, float *orco, float hasize, float vectsize, int seed); -struct HaloRen *RE_inithalo_particle(struct Render *re, struct ObjectRen *obr, struct DerivedMesh *dm, struct Material *ma, float *vec, float *vec1, float *orco, float *uvco, float hasize, float vectsize, int seed); +struct HaloRen *RE_inithalo_particle(struct Render *re, struct ObjectRen *obr, struct DerivedMesh *dm, struct Material *ma, float *vec, float *vec1, float *orco, float *uvco, float hasize, float vectsize, int seed, float *pa_co); struct StrandBuffer *RE_addStrandBuffer(struct ObjectRen *obr, int totvert); struct ObjectRen *RE_addRenderObject(struct Render *re, struct Object *ob, struct Object *par, int index, int psysindex, int lay); diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index 6fec75c5e42..e22e916fe86 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -1252,14 +1252,14 @@ static void static_particle_wire(ObjectRen *obr, Material *ma, float *vec, float } -static void particle_curve(Render *re, ObjectRen *obr, DerivedMesh *dm, Material *ma, ParticleStrandData *sd, float *loc, float *loc1, int seed) +static void particle_curve(Render *re, ObjectRen *obr, DerivedMesh *dm, Material *ma, ParticleStrandData *sd, float *loc, float *loc1, int seed, float *pa_co) { HaloRen *har=0; if(ma->material_type == MA_TYPE_WIRE) static_particle_wire(obr, ma, loc, loc1, sd->first, sd->line); else if(ma->material_type == MA_TYPE_HALO) { - har= RE_inithalo_particle(re, obr, dm, ma, loc, loc1, sd->orco, sd->uvco, sd->size, 1.0, seed); + har= RE_inithalo_particle(re, obr, dm, ma, loc, loc1, sd->orco, sd->uvco, sd->size, 1.0, seed, pa_co); if(har) har->lay= obr->ob->lay; } else @@ -1387,7 +1387,7 @@ static void particle_billboard(Render *re, ObjectRen *obr, Material *ma, Particl mtf->uv[3][1] = uvy; } } -static void particle_normal_ren(short ren_as, ParticleSettings *part, Render *re, ObjectRen *obr, DerivedMesh *dm, Material *ma, ParticleStrandData *sd, ParticleBillboardData *bb, ParticleKey *state, int seed, float hasize) +static void particle_normal_ren(short ren_as, ParticleSettings *part, Render *re, ObjectRen *obr, DerivedMesh *dm, Material *ma, ParticleStrandData *sd, ParticleBillboardData *bb, ParticleKey *state, int seed, float hasize, float *pa_co) { float loc[3], loc0[3], loc1[3], vel[3]; @@ -1412,7 +1412,7 @@ static void particle_normal_ren(short ren_as, ParticleSettings *part, Render *re VECADDFAC(loc0, loc, vel, -part->draw_line[0]); VECADDFAC(loc1, loc, vel, part->draw_line[1]); - particle_curve(re, obr, dm, ma, sd, loc0, loc1, seed); + particle_curve(re, obr, dm, ma, sd, loc0, loc1, seed, pa_co); break; @@ -1429,7 +1429,7 @@ static void particle_normal_ren(short ren_as, ParticleSettings *part, Render *re { HaloRen *har=0; - har = RE_inithalo_particle(re, obr, dm, ma, loc, NULL, sd->orco, sd->uvco, hasize, 0.0, seed); + har = RE_inithalo_particle(re, obr, dm, ma, loc, NULL, sd->orco, sd->uvco, hasize, 0.0, seed, pa_co); if(har) har->lay= obr->ob->lay; @@ -1497,7 +1497,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem float strandlen=0.0f, curlen=0.0f; float hasize, pa_size, r_tilt, r_length, cfra= BKE_curframe(re->scene); float pa_time, pa_birthtime, pa_dietime; - float random, simplify[2]; + float random, simplify[2], pa_co[3]; int i, a, k, max_k=0, totpart, dosimplify = 0, dosurfacecache = 0; int totchild=0; int seed, path_nbr=0, orco1=0, num; @@ -1718,20 +1718,6 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem pa_time=(cfra-pa->time)/pa->lifetime; pa_birthtime = pa->time; pa_dietime = pa->dietime; -#if 0 // XXX old animation system - if((part->flag&PART_ABS_TIME) == 0){ - if(ma->ipo) { - /* correction for lifetime */ - calc_ipo(ma->ipo, 100.0f * pa_time); - execute_ipo((ID *)ma, ma->ipo); - } - if(part->ipo){ - /* correction for lifetime */ - calc_ipo(part->ipo, 100.0f*pa_time); - execute_ipo((ID *)part, part->ipo); - } - } -#endif // XXX old animation system hasize = ma->hasize; @@ -1779,22 +1765,6 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem } pa_time = psys_get_child_time(psys, cpa, cfra, &pa_birthtime, &pa_dietime); - -#if 0 // XXX old animation system - if((part->flag & PART_ABS_TIME) == 0) { - if(ma->ipo){ - /* correction for lifetime */ - calc_ipo(ma->ipo, 100.0f * pa_time); - execute_ipo((ID *)ma, ma->ipo); - } - if(part->ipo) { - /* correction for lifetime */ - calc_ipo(part->ipo, 100.0f * pa_time); - execute_ipo((ID *)part, part->ipo); - } - } -#endif // XXX old animation system - pa_size = psys_get_child_size(psys, cpa, cfra, &pa_time); r_tilt = 2.0f*(PSYS_FRAND(a + 21) - 0.5f); @@ -1842,6 +1812,11 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem } } + /* TEXCO_PARTICLE */ + pa_co[0] = pa_time; + pa_co[1] = 0.f; + pa_co[2] = 0.f; + /* surface normal shading setup */ if(ma->mode_l & MA_STR_SURFDIFF) { mul_m3_v3(nmat, nor); @@ -1934,14 +1909,14 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem VECSUB(loc0,loc1,loc); VECADD(loc0,loc1,loc0); - particle_curve(re, obr, psmd->dm, ma, &sd, loc1, loc0, seed); + particle_curve(re, obr, psmd->dm, ma, &sd, loc1, loc0, seed, pa_co); } sd.first = 0; sd.time = time; if(k) - particle_curve(re, obr, psmd->dm, ma, &sd, loc, loc1, seed); + particle_curve(re, obr, psmd->dm, ma, &sd, loc, loc1, seed, pa_co); VECCOPY(loc1,loc); } @@ -1978,7 +1953,10 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem bb.num = a; } - particle_normal_ren(part->ren_as, part, re, obr, psmd->dm, ma, &sd, &bb, &state, seed, hasize); + pa_co[0] = (part->draw & PART_ABS_PATH_TIME) ? (ct-pa_birthtime)/(pa_dietime-pa_birthtime) : ct; + pa_co[1] = (float)i/(float)(trail_count-1); + + particle_normal_ren(part->ren_as, part, re, obr, psmd->dm, ma, &sd, &bb, &state, seed, hasize, pa_co); } } else { @@ -1998,7 +1976,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem bb.num = a; } - particle_normal_ren(part->ren_as, part, re, obr, psmd->dm, ma, &sd, &bb, &state, seed, hasize); + particle_normal_ren(part->ren_as, part, re, obr, psmd->dm, ma, &sd, &bb, &state, seed, hasize, pa_co); } } diff --git a/source/blender/render/intern/source/renderdatabase.c b/source/blender/render/intern/source/renderdatabase.c index 9c2a3c143af..979d221dae0 100644 --- a/source/blender/render/intern/source/renderdatabase.c +++ b/source/blender/render/intern/source/renderdatabase.c @@ -1042,7 +1042,7 @@ HaloRen *RE_inithalo(Render *re, ObjectRen *obr, Material *ma, float *vec, f } HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Material *ma, float *vec, float *vec1, - float *orco, float *uvco, float hasize, float vectsize, int seed) + float *orco, float *uvco, float hasize, float vectsize, int seed, float *pa_co) { HaloRen *har; MTex *mtex; @@ -1147,6 +1147,12 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater texvec[1]=2.0f*uvco[2*uv_index+1]-1.0f; texvec[2]=0.0f; } + else if(mtex->texco & TEXCO_PARTICLE) { + /* particle coordinates in range [0,1] */ + texvec[0] = 2.f * pa_co[0] - 1.f; + texvec[1] = 2.f * pa_co[1] - 1.f; + texvec[2] = pa_co[2]; + } else if(orco) { VECCOPY(texvec, orco); } From b5ab3980e8e1f84f380314b877ff5bfe2599cc29 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 7 Dec 2010 20:22:35 +0000 Subject: [PATCH 038/236] Fix #25085: Enabling "Show Cone" on dupliverted buffer spots crashes Blender Cone can't be drawn for duplicated lamps, because lamps with cone are drawn after main draw function (from view3d_draw_transp) and list of duplicated object gets freed to this moment. Disable cone draw for lamps which are from dupli. --- source/blender/editors/space_view3d/drawobject.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 97813642b17..8b5b08b8a5a 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -908,7 +908,11 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, float imat[4][4], curcol[4]; char col[4]; int drawcone= (dt>OB_WIRE && !(G.f & G_PICKSEL) && la->type == LA_SPOT && (la->mode & LA_SHOW_CONE)); - + + /* cone can't be drawn for duplicated lamps, because duplilist would be freed to */ + /* the moment of view3d_draw_transp() call */ + drawcone&= (base->flag & OB_FROMDUPLI)==0; + if(drawcone && !v3d->transp) { /* in this case we need to draw delayed */ add_view3d_after(&v3d->afterdraw_transp, base, flag); From 1a8665ac4551913e25138109ad10196c2958b6d3 Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Tue, 7 Dec 2010 22:17:58 +0000 Subject: [PATCH 039/236] Fix for [#25079] Duplicating object with particles system on it make Blender crashs * pointcache->cached_frames wasn't set to NULL when copying pointcaches * also set pointcache->edit to null just in case --- source/blender/blenkernel/intern/pointcache.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index cd45a39f2c9..4e804cf14f7 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -2380,6 +2380,8 @@ static PointCache *ptcache_copy(PointCache *cache) /* hmm, should these be copied over instead? */ ncache->mem_cache.first = NULL; ncache->mem_cache.last = NULL; + ncache->cached_frames = NULL; + ncache->edit = NULL; ncache->flag= 0; ncache->simframe= 0; From 47d6166adb7a5100e04c645e7d6284c5c1b95c9d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 8 Dec 2010 00:58:15 +0000 Subject: [PATCH 040/236] fix [#25088] Add spot lamp causing crash this is actually an assert not a crash, when the lamp and view axis were aligned, the quat could not correctly be converted into a matrix. Now fallback to the X axis in this case. --- source/blender/editors/space_view3d/drawobject.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 8b5b08b8a5a..b28be7bad86 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -789,7 +789,9 @@ static void spotvolume(float *lvec, float *vvec, float inp) cross_v3_v3v3(temp,vvec,lvec); /* equation for a plane through vvec en lvec */ cross_v3_v3v3(plane,lvec,temp); /* a plane perpendicular to this, parrallel with lvec */ - normalize_v3(plane); + /* vectors are exactly aligned, use the X axis, this is arbitrary */ + if(normalize_v3(plane) == 0.0f) + plane[1]= 1.0f; /* now we've got two equations: one of a cone and one of a plane, but we have three unknowns. We remove one unkown by rotating the plane to z=0 (the plane normal) */ From 2e667e45fc02c5de285df836e59248a82b45dff9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 8 Dec 2010 03:05:46 +0000 Subject: [PATCH 041/236] Changed armature active bone so it is separate from selection this is consistent with active object, mesh editmode, curves & metaballs. - active is no longer assumed to be selected. this fixes a simple bug - eg: Adding a new armature, entering pose mode and toggling selection failed. - outliner editbone selection now works like object and pose mode. - mouse selection sets the bone active even when the tip is selected. - active, unselected bones draw as wire color with a 15% tint of the selected color. --- .../blender/editors/armature/editarmature.c | 91 ++++++++----------- source/blender/editors/armature/poselib.c | 2 +- source/blender/editors/armature/poseobject.c | 14 ++- .../blender/editors/screen/screen_context.c | 2 +- .../blender/editors/space_outliner/outliner.c | 62 ++++++++----- .../editors/space_view3d/drawarmature.c | 31 ++++--- .../editors/space_view3d/view3d_select.c | 4 - source/blender/makesdna/DNA_armature_types.h | 6 ++ 8 files changed, 113 insertions(+), 99 deletions(-) diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 36544bcb086..66af2f34f0f 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -119,7 +119,7 @@ void ED_armature_validate_active(struct bArmature *arm) EditBone *ebone= arm->act_edbone; if(ebone) { - if(ebone->flag & BONE_HIDDEN_A || (ebone->flag & BONE_SELECTED)==0) + if(ebone->flag & BONE_HIDDEN_A) arm->act_edbone= NULL; } } @@ -1875,8 +1875,7 @@ void ARMATURE_OT_delete(wmOperatorType *ot) /* toggle==0: deselect * toggle==1: swap (based on test) - * toggle==2: only active tag - * toggle==3: swap (no test) + * toggle==2: swap (no test), CURRENTLY UNUSED */ void ED_armature_deselect_all(Object *obedit, int toggle) { @@ -1898,34 +1897,30 @@ void ED_armature_deselect_all(Object *obedit, int toggle) } else sel= toggle; - if(sel==2) { - arm->act_edbone= NULL; - } else { - /* Set the flags */ - for (eBone=arm->edbo->first;eBone;eBone=eBone->next) { - if (sel==3) { - /* invert selection of bone */ - if(EBONE_VISIBLE(arm, eBone)) { - eBone->flag ^= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); - if(arm->act_edbone==eBone) - arm->act_edbone= NULL; - } - } - else if (sel==1) { - /* select bone */ - if(EBONE_VISIBLE(arm, eBone)) { - eBone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); - if(eBone->parent) - eBone->parent->flag |= (BONE_TIPSEL); - } - } - else { - /* deselect bone */ - eBone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); + /* Set the flags */ + for (eBone=arm->edbo->first;eBone;eBone=eBone->next) { + if (sel==2) { + /* invert selection of bone */ + if(EBONE_VISIBLE(arm, eBone)) { + eBone->flag ^= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); if(arm->act_edbone==eBone) arm->act_edbone= NULL; } } + else if (sel==1) { + /* select bone */ + if(EBONE_VISIBLE(arm, eBone)) { + eBone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); + if(eBone->parent) + eBone->parent->flag |= (BONE_TIPSEL); + } + } + else { + /* deselect bone */ + eBone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); + if(arm->act_edbone==eBone) + arm->act_edbone= NULL; + } } ED_armature_sync_selection(arm->edbo); @@ -1946,6 +1941,17 @@ void ED_armature_deselect_all_visible(Object *obedit) ED_armature_sync_selection(arm->edbo); } +/* accounts for connected parents */ +static int ebone_select_flag(EditBone *ebone) +{ + if(ebone->parent && (ebone->flag & BONE_CONNECTED)) { + return ((ebone->parent->flag & BONE_TIPSEL) ? BONE_ROOTSEL : 0) | (ebone->flag & (BONE_SELECTED|BONE_TIPSEL)); + } + else { + return ebone->flag & (BONE_SELECTED|BONE_ROOTSEL|BONE_TIPSEL); + } +} + /* context: editmode armature in view3d */ int mouse_armature(bContext *C, short mval[2], int extend) { @@ -2014,7 +2020,9 @@ int mouse_armature(bContext *C, short mval[2], int extend) if(nearBone) { /* then now check for active status */ - if(nearBone->flag & BONE_SELECTED) arm->act_edbone= nearBone; + if(ebone_select_flag(nearBone)) { + arm->act_edbone= nearBone; + } } WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, vc.obedit); @@ -3098,13 +3106,13 @@ static void bones_merge(Object *obedit, EditBone *start, EditBone *end, EditBone * - tail = head/tail of end (default tail) * - parent = parent of start */ - if ((start->flag & BONE_TIPSEL) && ((start->flag & BONE_SELECTED) || start==arm->act_edbone)==0) { + if ((start->flag & BONE_TIPSEL) && (start->flag & BONE_SELECTED)==0) { copy_v3_v3(head, start->tail); } else { copy_v3_v3(head, start->head); } - if ((end->flag & BONE_ROOTSEL) && ((end->flag & BONE_SELECTED) || end==arm->act_edbone)==0) { + if ((end->flag & BONE_ROOTSEL) && (end->flag & BONE_SELECTED)==0) { copy_v3_v3(tail, end->head); } else { @@ -3188,7 +3196,7 @@ static int armature_merge_exec (bContext *C, wmOperator *op) /* check if visible + selected */ if ( EBONE_VISIBLE(arm, ebo) && ((ebo->flag & BONE_CONNECTED) || (ebo->parent==NULL)) && - ((ebo->flag & BONE_SELECTED) || (ebo==arm->act_edbone)) ) + (ebo->flag & BONE_SELECTED) ) { /* set either end or start (end gets priority, unless it is already set) */ if (bend == NULL) { @@ -3518,9 +3526,6 @@ static int armature_extrude_exec(bContext *C, wmOperator *op) if (totbone==1 && first) arm->act_edbone= first; if (totbone==0) return OPERATOR_CANCELLED; - - if(arm->act_edbone && (((EditBone *)arm->act_edbone)->flag & BONE_SELECTED)==0) - arm->act_edbone= NULL; /* Transform the endpoints */ ED_armature_sync_selection(arm->edbo); @@ -4465,9 +4470,6 @@ void ED_pose_deselectall (Object *ob, int test) } } } - - if(arm->act_bone && (arm->act_bone->flag & BONE_SELECTED)==0) - arm->act_bone= NULL; } static int bone_skinnable_cb(Object *ob, Bone *bone, void *datap) @@ -5174,20 +5176,7 @@ static int pose_de_select_all_exec(bContext *C, wmOperator *op) int action = RNA_enum_get(op->ptr, "action"); if (action == SEL_TOGGLE) { - bPoseChannel *pchan= CTX_data_active_pose_bone(C); - int num_sel = CTX_DATA_COUNT(C, selected_pose_bones); - - /* cases for deselect: - * 1) there's only one bone selected, and that is the active one - * 2) there's more than one bone selected - */ - if ( ((num_sel == 1) && (pchan) && (pchan->bone->flag & BONE_SELECTED)) || - (num_sel > 1) ) - { - action = SEL_DESELECT; - } - else - action = SEL_SELECT; + action= CTX_DATA_COUNT(C, selected_pose_bones) ? SEL_DESELECT : SEL_SELECT; } /* Set the flags */ diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c index 5636b67df9a..e143425036e 100644 --- a/source/blender/editors/armature/poselib.c +++ b/source/blender/editors/armature/poselib.c @@ -740,7 +740,7 @@ static void poselib_apply_pose (tPoseLib_PreviewData *pld) } else if (pchan->bone) { /* only ok if bone is visible and selected */ - if ( (pchan->bone->flag & BONE_SELECTED || pchan->bone == arm->act_bone) && + if ( (pchan->bone->flag & BONE_SELECTED) && (pchan->bone->flag & BONE_HIDDEN_P)==0 && (pchan->bone->layer & arm->layer) ) ok = 1; diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c index 55d24550167..f1bace1201f 100644 --- a/source/blender/editors/armature/poseobject.c +++ b/source/blender/editors/armature/poseobject.c @@ -164,7 +164,7 @@ void ED_armature_exit_posemode(bContext *C, Base *base) /* if a selected or active bone is protected, throw error (oonly if warn==1) and return 1 */ /* only_selected==1 : the active bone is allowed to be protected */ -static short pose_has_protected_selected(Object *ob, short only_selected, short warn) +static short pose_has_protected_selected(Object *ob, short warn) { /* check protection */ if (ob->proxy) { @@ -174,8 +174,7 @@ static short pose_has_protected_selected(Object *ob, short only_selected, short for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { if (pchan->bone && (pchan->bone->layer & arm->layer)) { if (pchan->bone->layer & arm->layer_protected) { - if (only_selected && (pchan->bone == arm->act_bone)); - else if (pchan->bone->flag & BONE_SELECTED || pchan->bone == arm->act_bone) + if (pchan->bone->flag & BONE_SELECTED) break; } } @@ -363,13 +362,12 @@ void POSE_OT_paths_clear (wmOperatorType *ot) static int pose_select_constraint_target_exec(bContext *C, wmOperator *UNUSED(op)) { Object *ob= ED_object_pose_armature(CTX_data_active_object(C)); - bArmature *arm= ob->data; bConstraint *con; int found= 0; CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones) { - if ((pchan->bone->flag & BONE_SELECTED) || (pchan->bone == arm->act_bone)) { + if (pchan->bone->flag & BONE_SELECTED) { for (con= pchan->constraints.first; con; con= con->next) { bConstraintTypeInfo *cti= constraint_get_typeinfo(con); ListBase targets = {NULL, NULL}; @@ -527,7 +525,7 @@ static short pose_select_same_group (bContext *C, Object *ob, short extend) CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones) { /* keep track of group as group to use later? */ - if ((pchan->bone->flag & BONE_SELECTED) || (pchan->bone == arm->act_bone)) { + if (pchan->bone->flag & BONE_SELECTED) { group_flags[pchan->agrp_index] = 1; tagged= 1; } @@ -574,7 +572,7 @@ static short pose_select_same_layer (bContext *C, Object *ob, short extend) CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones) { /* keep track of layers to use later? */ - if ((pchan->bone->flag & BONE_SELECTED) || (pchan->bone == arm->act_bone)) + if (pchan->bone->flag & BONE_SELECTED) layers |= pchan->bone->layer; /* deselect all bones before selecting new ones? */ @@ -681,7 +679,7 @@ void pose_copy_menu(Scene *scene) /* if proxy-protected bones selected, some things (such as locks + displays) shouldn't be changable, * but for constraints (just add local constraints) */ - if (pose_has_protected_selected(ob, 1, 0)) { + if (pose_has_protected_selected(ob, 0)) { i= BLI_countlist(&(pchanact->constraints)); /* if there are 24 or less, allow for the user to select constraints */ if (i < 25) nr= pupmenu("Copy Pose Attributes %t|Local Location%x1|Local Rotation%x2|Local Size%x3|%l|Visual Location %x9|Visual Rotation%x10|Visual Size%x11|%l|Constraints (All)%x4|Constraints...%x5"); diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c index 9803f5716c2..82f5f2597dd 100644 --- a/source/blender/editors/screen/screen_context.c +++ b/source/blender/editors/screen/screen_context.c @@ -253,7 +253,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult for (pchan= obpose->pose->chanbase.first; pchan; pchan= pchan->next) { /* ensure that PoseChannel is on visible layer and is not hidden in PoseMode */ if (PBONE_VISIBLE(arm, pchan->bone)) { - if (pchan->bone->flag & BONE_SELECTED || pchan->bone == arm->act_bone) + if (pchan->bone->flag & BONE_SELECTED) CTX_data_list_add(result, &obpose->id, &RNA_PoseBone, pchan); } } diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index 6583d287cf8..7426fca844e 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -2151,8 +2151,6 @@ static int tree_element_active_posechannel(bContext *C, Scene *scene, TreeElemen if(set==2 && (pchan->bone->flag & BONE_SELECTED)) { pchan->bone->flag &= ~BONE_SELECTED; - if(arm->act_bone==pchan->bone) - arm->act_bone= NULL; } else { pchan->bone->flag |= BONE_SELECTED; arm->act_bone= pchan->bone; @@ -2182,8 +2180,6 @@ static int tree_element_active_bone(bContext *C, Scene *scene, TreeElement *te, if(set==2 && (bone->flag & BONE_SELECTED)) { bone->flag &= ~BONE_SELECTED; - if(arm->act_bone==bone) - arm->act_bone= NULL; } else { bone->flag |= BONE_SELECTED; arm->act_bone= bone; @@ -2204,27 +2200,49 @@ static int tree_element_active_bone(bContext *C, Scene *scene, TreeElement *te, /* ebones only draw in editmode armature */ -static int tree_element_active_ebone(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tselem), int set) +static void tree_element_active_ebone__sel(bContext *C, Scene *scene, bArmature *arm, EditBone *ebone, short sel) { - EditBone *ebone= te->directdata; - - if(set) { - if(!(ebone->flag & BONE_HIDDEN_A)) { - bArmature *arm= scene->obedit->data; - if(set==2) ED_armature_deselect_all(scene->obedit, 2); // only clear active tag - else ED_armature_deselect_all(scene->obedit, 0); // deselect - - ebone->flag |= BONE_SELECTED|BONE_ROOTSEL|BONE_TIPSEL; - arm->act_edbone= ebone; - - // flush to parent? - if(ebone->parent && (ebone->flag & BONE_CONNECTED)) ebone->parent->flag |= BONE_TIPSEL; - - WM_event_add_notifier(C, NC_OBJECT|ND_BONE_ACTIVE, scene->obedit); - } + if(sel) { + ebone->flag |= BONE_SELECTED|BONE_ROOTSEL|BONE_TIPSEL; + arm->act_edbone= ebone; + // flush to parent? + if(ebone->parent && (ebone->flag & BONE_CONNECTED)) ebone->parent->flag |= BONE_TIPSEL; } else { - if (ebone->flag & BONE_SELECTED) return 1; + ebone->flag &= ~(BONE_SELECTED|BONE_ROOTSEL|BONE_TIPSEL); + // flush to parent? + if(ebone->parent && (ebone->flag & BONE_CONNECTED)) ebone->parent->flag &= ~BONE_TIPSEL; + } + + WM_event_add_notifier(C, NC_OBJECT|ND_BONE_ACTIVE, scene->obedit); +} +static int tree_element_active_ebone(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tselem), int set) +{ + bArmature *arm= scene->obedit->data; + EditBone *ebone= te->directdata; + + if(set==1) { + if(!(ebone->flag & BONE_HIDDEN_A)) { + ED_armature_deselect_all(scene->obedit, 0); // deselect + tree_element_active_ebone__sel(C, scene, arm, ebone, TRUE); + return 1; + } + } + else if (set==2) { + if(!(ebone->flag & BONE_HIDDEN_A)) { + if(!(ebone->flag & BONE_SELECTED)) { + tree_element_active_ebone__sel(C, scene, arm, ebone, TRUE); + return 1; + } + else { + /* entirely selected, so de-select */ + tree_element_active_ebone__sel(C, scene, arm, ebone, FALSE); + return 0; + } + } + } + else if (ebone->flag & BONE_SELECTED) { + return 1; } return 0; } diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c index 52a2cd24254..c0db86b46f9 100644 --- a/source/blender/editors/space_view3d/drawarmature.c +++ b/source/blender/editors/space_view3d/drawarmature.c @@ -150,6 +150,9 @@ static short set_pchan_glColor (short colCode, int boneflag, int constflag) if (boneflag & BONE_DRAW_ACTIVE) { VECCOPY(cp, bcolor->active); + if(!(boneflag & BONE_SELECTED)) { + cp_shade_color3ub(cp, -80); + } } else if (boneflag & BONE_SELECTED) { VECCOPY(cp, bcolor->select); @@ -163,7 +166,8 @@ static short set_pchan_glColor (short colCode, int boneflag, int constflag) glColor3ub(cp[0], cp[1], cp[2]); } else { - if (boneflag & BONE_DRAW_ACTIVE) UI_ThemeColorShade(TH_BONE_POSE, 40); + if (boneflag & BONE_DRAW_ACTIVE && boneflag & BONE_SELECTED) UI_ThemeColorShade(TH_BONE_POSE, 40); + else if (boneflag & BONE_DRAW_ACTIVE) UI_ThemeColorBlend(TH_WIRE, TH_BONE_POSE, 0.15f); /* unselected active */ else if (boneflag & BONE_SELECTED) UI_ThemeColor(TH_BONE_POSE); else UI_ThemeColor(TH_WIRE); } @@ -284,6 +288,13 @@ static short set_pchan_glColor (short colCode, int boneflag, int constflag) return 0; } +static void set_ebone_glColor(const unsigned int boneflag) +{ + if (boneflag & BONE_DRAW_ACTIVE && boneflag & BONE_SELECTED) UI_ThemeColor(TH_EDGE_SELECT); + else if (boneflag & BONE_DRAW_ACTIVE) UI_ThemeColorBlend(TH_WIRE, TH_EDGE_SELECT, 0.15f); /* unselected active */ + else if (boneflag & BONE_SELECTED) UI_ThemeColorShade(TH_EDGE_SELECT, -20); + else UI_ThemeColor(TH_WIRE); +} /* *************** Armature drawing, helper calls for parts ******************* */ @@ -1153,9 +1164,7 @@ static void draw_b_bone(int dt, int armflag, int boneflag, int constflag, unsign } else if (armflag & ARM_EDITMODE) { if (dt==OB_WIRE) { - if (boneflag & BONE_DRAW_ACTIVE) UI_ThemeColor(TH_EDGE_SELECT); - else if (boneflag & BONE_SELECTED) UI_ThemeColorShade(TH_EDGE_SELECT, -20); - else UI_ThemeColor(TH_WIRE); + set_ebone_glColor(boneflag); } else UI_ThemeColor(TH_BONE_SOLID); @@ -1238,9 +1247,7 @@ static void draw_bone(int dt, int armflag, int boneflag, int constflag, unsigned if (dt <= OB_WIRE) { /* colors */ if (armflag & ARM_EDITMODE) { - if (boneflag & BONE_DRAW_ACTIVE) UI_ThemeColor(TH_EDGE_SELECT); - else if (boneflag & BONE_SELECTED) UI_ThemeColorShade(TH_EDGE_SELECT, -20); - else UI_ThemeColor(TH_WIRE); + set_ebone_glColor(boneflag); } else if (armflag & ARM_POSEMODE) { if (constflag) { @@ -1642,7 +1649,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, flag &= ~BONE_CONNECTED; /* set temporary flag for drawing bone as active, but only if selected */ - if ((bone == arm->act_bone) && (bone->flag & BONE_SELECTED)) + if (bone == arm->act_bone) flag |= BONE_DRAW_ACTIVE; /* set color-set to use */ @@ -1728,7 +1735,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, flag &= ~BONE_CONNECTED; /* set temporary flag for drawing bone as active, but only if selected */ - if ((bone == arm->act_bone) && (bone->flag & BONE_SELECTED)) + if (bone == arm->act_bone) flag |= BONE_DRAW_ACTIVE; draw_custom_bone(scene, v3d, rv3d, pchan->custom, OB_WIRE, arm->flag, flag, index, bone->length); @@ -1823,7 +1830,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, flag &= ~BONE_CONNECTED; /* set temporary flag for drawing bone as active, but only if selected */ - if ((bone == arm->act_bone) && (bone->flag & BONE_SELECTED)) + if (bone == arm->act_bone) flag |= BONE_DRAW_ACTIVE; /* extra draw service for pose mode */ @@ -1983,7 +1990,7 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt) flag &= ~BONE_CONNECTED; /* set temporary flag for drawing bone as active, but only if selected */ - if ((eBone == arm->act_edbone) && (eBone->flag & BONE_SELECTED)) + if (eBone == arm->act_edbone) flag |= BONE_DRAW_ACTIVE; if (arm->drawtype==ARM_ENVELOPE) @@ -2022,7 +2029,7 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt) flag &= ~BONE_CONNECTED; /* set temporary flag for drawing bone as active, but only if selected */ - if ((eBone == arm->act_edbone) && (eBone->flag & BONE_SELECTED)) + if (eBone == arm->act_edbone) flag |= BONE_DRAW_ACTIVE; if (arm->drawtype == ARM_ENVELOPE) { diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index a3289c4cdc0..69096843aa1 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -364,10 +364,6 @@ static void do_lasso_select_pose(ViewContext *vc, Object *ob, short mcords[][2], } } } - - if(arm->act_bone && (arm->act_bone->flag & BONE_SELECTED)==0) { - arm->act_bone= NULL; - } } static void object_deselect_all_visible(Scene *scene, View3D *v3d) diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h index effa5e34a91..f6b61d5f2ba 100644 --- a/source/blender/makesdna/DNA_armature_types.h +++ b/source/blender/makesdna/DNA_armature_types.h @@ -79,6 +79,12 @@ typedef struct bArmature { ListBase chainbase; ListBase *edbo; /* editbone listbase, we use pointer so we can check state */ + /* active bones should work like active object where possible + * - active and selection are unrelated + * - active & hidden is not allowed + * - from the user perspective active == last selected + * - active should be ignored when not visible (hidden layer) */ + Bone *act_bone; /* active bone (when not in editmode) */ void *act_edbone; /* active editbone (in editmode) */ From 23a49334ed3a8d1749728c358c8b1e2aed3c6473 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 8 Dec 2010 03:25:31 +0000 Subject: [PATCH 042/236] fix for own change r33524, at the moment the context always has to be valid, noted with XXX. reported by Doug Hammond. --- source/blender/python/intern/bpy_rna.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index ee393c5fe15..e4c54f86ea9 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -5154,6 +5154,11 @@ static int bpy_class_call(bContext *C, PointerRNA *ptr, FunctionRNA *func, Param return -1; } + /* XXX, this is needed because render engine calls without a context + * this should be supported at some point but at the moment its not! */ + if(C==NULL) + C= BPy_GetContext(); + bpy_context_set(C, &gilstate); if (!is_static) { From 1f16e68af9b1be88232eef44b2d3206884d12449 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 8 Dec 2010 04:40:20 +0000 Subject: [PATCH 043/236] bug [#25081] changes to pose bone selection state via python have no effect. Remove pose channel select, this is for internal use on read/write only. Its possible to have a convenience attribute but rather not fake bone data being in the pose channel. just access pose_bone.bone.select --- source/blender/makesdna/DNA_action_types.h | 2 +- source/blender/makesrna/intern/rna_pose.c | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index bfc413d6cc2..ee4c90e0354 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -188,7 +188,7 @@ typedef struct bPoseChannel { short flag; /* dynamic, for detecting transform changes */ short constflag; /* for quick detecting which constraints affect this channel */ short ikflag; /* settings for IK bones */ - short selectflag; /* copy of bone flag, so you can work with library armatures */ + short selectflag; /* copy of bone flag, so you can work with library armatures, not for runtime use */ short protectflag; /* protect channels from being transformed */ short agrp_index; /* index of action-group this bone belongs to (0 = default/no group) */ diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c index be14556cb41..3b0d3e1eb1e 100644 --- a/source/blender/makesrna/intern/rna_pose.c +++ b/source/blender/makesrna/intern/rna_pose.c @@ -708,10 +708,6 @@ static void rna_def_pose_channel(BlenderRNA *brna) RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable"); RNA_def_struct_name_property(srna, prop); - prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "selectflag", BONE_SELECTED); - RNA_def_property_ui_text(prop, "Select", ""); - /* Baked Bone Path cache data */ rna_def_motionpath_common(srna); From 2692dc55619905b504b7273ea9eaa9f7350acf9b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 8 Dec 2010 05:51:16 +0000 Subject: [PATCH 044/236] bugfix [#25082] minor bug. RGB to Intensity doesn't works for Lamps - This is working correctly but confusing, made more confusing by UI problems, corrected these and updated tooltop for 'tex.use_rgb_to_intensity' - bad RNA arguments used for lamps (left over from RNA renaming). - use isinstance(...), rather then comparing type() directly, this failed with lamp type checks. - removed redundant argument to internal texture UI function factor_but(). - the texture color was drawn inactive when it was used in some cases. Note. AFAIK its not possible to do a general check to see if a texture is colored or not, eg: its possible a plugin texture returns color in some cases and greyscale in others. so for now always have color button active. --- release/scripts/op/uv.py | 2 +- release/scripts/ui/properties_texture.py | 89 ++++++++++++------------ 2 files changed, 47 insertions(+), 44 deletions(-) diff --git a/release/scripts/op/uv.py b/release/scripts/op/uv.py index 79ce5fe5a1e..f1155513ac3 100644 --- a/release/scripts/op/uv.py +++ b/release/scripts/op/uv.py @@ -269,7 +269,7 @@ class ExportUVLayout(bpy.types.Operator): def _space_image(self, context): space_data = context.space_data - if type(space_data) == bpy.types.SpaceImageEditor: + if isinstance(space_data, bpy.types.SpaceImageEditor): return space_data else: return None diff --git a/release/scripts/ui/properties_texture.py b/release/scripts/ui/properties_texture.py index 32736b78b76..f5b7d5fa32c 100644 --- a/release/scripts/ui/properties_texture.py +++ b/release/scripts/ui/properties_texture.py @@ -96,10 +96,10 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel, bpy.types.Panel): idblock = context_tex_datablock(context) pin_id = space.pin_id - if type(pin_id) != bpy.types.Material: + if not isinstance(pin_id, bpy.types.Material): pin_id = None - tex_collection = pin_id is None and type(idblock) != bpy.types.Brush and not node + tex_collection = (pin_id is None) and (node is None) and (not isinstance(idblock, bpy.types.Brush)) if tex_collection: row = layout.row() @@ -774,7 +774,7 @@ class TEXTURE_PT_mapping(TextureSlotPanel, bpy.types.Panel): @classmethod def poll(cls, context): idblock = context_tex_datablock(context) - if type(idblock) == bpy.types.Brush and not context.sculpt_object: + if isinstance(idblock, bpy.types.Brush) and not context.sculpt_object: return False if not getattr(context, "texture_slot", None): @@ -791,7 +791,7 @@ class TEXTURE_PT_mapping(TextureSlotPanel, bpy.types.Panel): tex = context.texture_slot # textype = context.texture - if type(idblock) != bpy.types.Brush: + if not isinstance(idblock, bpy.types.Brush): split = layout.split(percentage=0.3) col = split.column() col.label(text="Coordinates:") @@ -820,7 +820,7 @@ class TEXTURE_PT_mapping(TextureSlotPanel, bpy.types.Panel): split.label(text="Object:") split.prop(tex, "object", text="") - if type(idblock) == bpy.types.Brush: + if isinstance(idblock, bpy.types.Brush): if context.sculpt_object: layout.label(text="Brush Mapping:") layout.prop(tex, "map_mode", expand=True) @@ -829,7 +829,7 @@ class TEXTURE_PT_mapping(TextureSlotPanel, bpy.types.Panel): row.active = tex.map_mode in ('FIXED', 'TILED') row.prop(tex, "angle") else: - if type(idblock) == bpy.types.Material: + if isinstance(idblock, bpy.types.Material): split = layout.split(percentage=0.3) split.label(text="Projection:") split.prop(tex, "mapping", text="") @@ -867,7 +867,7 @@ class TEXTURE_PT_influence(TextureSlotPanel, bpy.types.Panel): @classmethod def poll(cls, context): idblock = context_tex_datablock(context) - if type(idblock) == bpy.types.Brush: + if isinstance(idblock, bpy.types.Brush): return False if not getattr(context, "texture_slot", None): @@ -885,41 +885,45 @@ class TEXTURE_PT_influence(TextureSlotPanel, bpy.types.Panel): # textype = context.texture tex = context.texture_slot - def factor_but(layout, active, toggle, factor, name): + def factor_but(layout, toggle, factor, name): row = layout.row(align=True) row.prop(tex, toggle, text="") sub = row.row() - sub.active = active + sub.active = getattr(tex, toggle) sub.prop(tex, factor, text=name, slider=True) + return sub # XXX, temp. use_map_normal needs to override. - if type(idblock) == bpy.types.Material: + if isinstance(idblock, bpy.types.Material): if idblock.type in ('SURFACE', 'HALO', 'WIRE'): split = layout.split() col = split.column() col.label(text="Diffuse:") - factor_but(col, tex.use_map_diffuse, "use_map_diffuse", "diffuse_factor", "Intensity") - factor_but(col, tex.use_map_color_diffuse, "use_map_color_diffuse", "diffuse_color_factor", "Color") - factor_but(col, tex.use_map_alpha, "use_map_alpha", "alpha_factor", "Alpha") - factor_but(col, tex.use_map_translucency, "use_map_translucency", "translucency_factor", "Translucency") + factor_but(col, "use_map_diffuse", "diffuse_factor", "Intensity") + factor_but(col, "use_map_color_diffuse", "diffuse_color_factor", "Color") + factor_but(col, "use_map_alpha", "alpha_factor", "Alpha") + factor_but(col, "use_map_translucency", "translucency_factor", "Translucency") col.label(text="Specular:") - factor_but(col, tex.use_map_specular, "use_map_specular", "specular_factor", "Intensity") - factor_but(col, tex.use_map_color_spec, "use_map_color_spec", "specular_color_factor", "Color") - factor_but(col, tex.use_map_hardness, "use_map_hardness", "hardness_factor", "Hardness") + factor_but(col, "use_map_specular", "specular_factor", "Intensity") + factor_but(col, "use_map_color_spec", "specular_color_factor", "Color") + factor_but(col, "use_map_hardness", "hardness_factor", "Hardness") col = split.column() col.label(text="Shading:") - factor_but(col, tex.use_map_ambient, "use_map_ambient", "ambient_factor", "Ambient") - factor_but(col, tex.use_map_emit, "use_map_emit", "emit_factor", "Emit") - factor_but(col, tex.use_map_mirror, "use_map_mirror", "mirror_factor", "Mirror") - factor_but(col, tex.use_map_raymir, "use_map_raymir", "raymir_factor", "Ray Mirror") + factor_but(col, "use_map_ambient", "ambient_factor", "Ambient") + factor_but(col, "use_map_emit", "emit_factor", "Emit") + factor_but(col, "use_map_mirror", "mirror_factor", "Mirror") + factor_but(col, "use_map_raymir", "raymir_factor", "Ray Mirror") col.label(text="Geometry:") # XXX replace 'or' when displacement is fixed to not rely on normal influence value. - factor_but(col, (tex.use_map_normal or tex.use_map_displacement), "use_map_normal", "normal_factor", "Normal") - factor_but(col, tex.use_map_warp, "use_map_warp", "warp_factor", "Warp") - factor_but(col, tex.use_map_displacement, "use_map_displacement", "displacement_factor", "Displace") + sub_tmp = factor_but(col, "use_map_normal", "normal_factor", "Normal") + sub_tmp.active = (tex.use_map_normal or tex.use_map_displacement) + # END XXX + + factor_but(col, "use_map_warp", "warp_factor", "Warp") + factor_but(col, "use_map_displacement", "displacement_factor", "Displace") #sub = col.column() #sub.active = tex.use_map_translucency or tex.map_emit or tex.map_alpha or tex.map_raymir or tex.map_hardness or tex.map_ambient or tex.map_specularity or tex.map_reflection or tex.map_mirror @@ -928,36 +932,36 @@ class TEXTURE_PT_influence(TextureSlotPanel, bpy.types.Panel): split = layout.split() col = split.column() - factor_but(col, tex.use_map_density, "use_map_density", "density_factor", "Density") - factor_but(col, tex.use_map_emission, "use_map_emission", "emission_factor", "Emission") - factor_but(col, tex.use_map_scatter, "use_map_scatter", "scattering_factor", "Scattering") - factor_but(col, tex.use_map_reflect, "use_map_reflect", "reflection_factor", "Reflection") + factor_but(col, "use_map_density", "density_factor", "Density") + factor_but(col, "use_map_emission", "emission_factor", "Emission") + factor_but(col, "use_map_scatter", "scattering_factor", "Scattering") + factor_but(col, "use_map_reflect", "reflection_factor", "Reflection") col = split.column() col.label(text=" ") - factor_but(col, tex.use_map_color_emission, "use_map_color_emission", "emission_color_factor", "Emission Color") - factor_but(col, tex.use_map_color_transmission, "use_map_color_transmission", "transmission_color_factor", "Transmission Color") - factor_but(col, tex.use_map_color_reflection, "use_map_color_reflection", "reflection_color_factor", "Reflection Color") + factor_but(col, "use_map_color_emission", "emission_color_factor", "Emission Color") + factor_but(col, "use_map_color_transmission", "transmission_color_factor", "Transmission Color") + factor_but(col, "use_map_color_reflection", "reflection_color_factor", "Reflection Color") - elif type(idblock) == bpy.types.Lamp: + elif isinstance(idblock, bpy.types.Lamp): split = layout.split() col = split.column() - factor_but(col, tex.use_map_color, "map_color", "color_factor", "Color") + factor_but(col, "use_map_color", "color_factor", "Color") col = split.column() - factor_but(col, tex.use_map_shadow, "map_shadow", "shadow_factor", "Shadow") + factor_but(col, "use_map_shadow", "shadow_factor", "Shadow") - elif type(idblock) == bpy.types.World: + elif isinstance(idblock, bpy.types.World): split = layout.split() col = split.column() - factor_but(col, tex.use_map_blend, "use_map_blend", "blend_factor", "Blend") - factor_but(col, tex.use_map_horizon, "use_map_horizon", "horizon_factor", "Horizon") + factor_but(col, "use_map_blend", "blend_factor", "Blend") + factor_but(col, "use_map_horizon", "horizon_factor", "Horizon") col = split.column() - factor_but(col, tex.use_map_zenith_up, "use_map_zenith_up", "zenith_up_factor", "Zenith Up") - factor_but(col, tex.use_map_zenith_down, "use_map_zenith_down", "zenith_down_factor", "Zenith Down") + factor_but(col, "use_map_zenith_up", "zenith_up_factor", "Zenith Up") + factor_but(col, "use_map_zenith_down", "zenith_down_factor", "Zenith Down") layout.separator() @@ -966,15 +970,14 @@ class TEXTURE_PT_influence(TextureSlotPanel, bpy.types.Panel): col = split.column() col.prop(tex, "blend_type", text="Blend") col.prop(tex, "use_rgb_to_intensity") - sub = col.column() - sub.active = tex.use_rgb_to_intensity - sub.prop(tex, "color", text="") + # color is used on grayscale textures even when use_rgb_to_intensity is disabled. + col.prop(tex, "color", text="") col = split.column() col.prop(tex, "invert", text="Negative") col.prop(tex, "use_stencil") - if type(idblock) in (bpy.types.Material, bpy.types.World): + if isinstance(idblock, bpy.types.Material) or isinstance(idblock, bpy.types.World): col.prop(tex, "default_value", text="DVar", slider=True) From 70df57df0f82be3966a09c8548bfde23fd5c17c4 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Wed, 8 Dec 2010 06:59:13 +0000 Subject: [PATCH 045/236] BGE BugFix: [#24052] Can't change dynamic object's orientation using python (fix by Benoit) from the tracker: """The required functionality is provided by the localOrientation property: setting this value will change the dynamic object orientation. This is because dynamic object have no parent and thus the local and world orientation are identical. However, setting worldOrientation will only change the scenegraph node, which has no effect as the physics controller will reset the orientation on next physics synchronization.""" --- source/gameengine/Ketsji/KX_GameObject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 1de7eee134e..7bd7fb8026f 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -1022,7 +1022,7 @@ void KX_GameObject::NodeSetGlobalOrientation(const MT_Matrix3x3& rot) if (GetSGNode()->GetSGParent()) GetSGNode()->SetLocalOrientation(GetSGNode()->GetSGParent()->GetWorldOrientation().inverse()*rot); else - GetSGNode()->SetLocalOrientation(rot); + NodeSetLocalOrientation(rot); } void KX_GameObject::NodeSetLocalScale(const MT_Vector3& scale) From afacd184982e58a9c830a3d5366e25983939a7ba Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 8 Dec 2010 08:43:06 +0000 Subject: [PATCH 046/236] use lowercase for cmake builtin names and macros, remove contents in else() and endif() which is no longer needed. --- CMakeLists.txt | 1390 ++++++++--------- build_files/cmake/macros.cmake | 466 +++--- extern/CMakeLists.txt | 40 +- extern/binreloc/CMakeLists.txt | 8 +- extern/bullet2/CMakeLists.txt | 6 +- .../src/BulletCollision/CMakeLists.txt | 48 +- .../bullet2/src/BulletDynamics/CMakeLists.txt | 44 +- .../bullet2/src/BulletSoftBody/CMakeLists.txt | 26 +- extern/bullet2/src/CMakeLists.txt | 8 +- extern/bullet2/src/LinearMath/CMakeLists.txt | 20 +- extern/glew/CMakeLists.txt | 14 +- extern/libopenjpeg/CMakeLists.txt | 6 +- extern/libredcode/CMakeLists.txt | 6 +- extern/lzma/CMakeLists.txt | 6 +- extern/lzo/CMakeLists.txt | 6 +- intern/CMakeLists.txt | 46 +- intern/audaspace/CMakeLists.txt | 86 +- intern/boolop/CMakeLists.txt | 6 +- intern/bsp/CMakeLists.txt | 6 +- intern/container/CMakeLists.txt | 6 +- intern/decimation/CMakeLists.txt | 6 +- intern/elbeem/CMakeLists.txt | 20 +- intern/ghost/CMakeLists.txt | 46 +- intern/guardedalloc/CMakeLists.txt | 20 +- intern/iksolver/CMakeLists.txt | 6 +- intern/itasc/CMakeLists.txt | 6 +- intern/memutil/CMakeLists.txt | 6 +- intern/moto/CMakeLists.txt | 6 +- intern/opennl/CMakeLists.txt | 8 +- intern/smoke/CMakeLists.txt | 20 +- intern/string/CMakeLists.txt | 6 +- source/CMakeLists.txt | 16 +- source/blender/CMakeLists.txt | 70 +- source/blender/avi/CMakeLists.txt | 6 +- source/blender/blenfont/CMakeLists.txt | 20 +- source/blender/blenkernel/CMakeLists.txt | 124 +- source/blender/blenlib/CMakeLists.txt | 18 +- source/blender/blenloader/CMakeLists.txt | 6 +- source/blender/blenpluginapi/CMakeLists.txt | 14 +- source/blender/collada/CMakeLists.txt | 24 +- source/blender/editors/CMakeLists.txt | 72 +- .../blender/editors/animation/CMakeLists.txt | 6 +- .../blender/editors/armature/CMakeLists.txt | 6 +- source/blender/editors/curve/CMakeLists.txt | 6 +- .../blender/editors/datafiles/CMakeLists.txt | 6 +- source/blender/editors/gpencil/CMakeLists.txt | 6 +- .../blender/editors/interface/CMakeLists.txt | 18 +- source/blender/editors/mesh/CMakeLists.txt | 6 +- .../blender/editors/metaball/CMakeLists.txt | 6 +- source/blender/editors/object/CMakeLists.txt | 12 +- source/blender/editors/physics/CMakeLists.txt | 18 +- source/blender/editors/render/CMakeLists.txt | 20 +- source/blender/editors/screen/CMakeLists.txt | 6 +- .../editors/sculpt_paint/CMakeLists.txt | 6 +- source/blender/editors/sound/CMakeLists.txt | 6 +- .../editors/space_action/CMakeLists.txt | 6 +- .../blender/editors/space_api/CMakeLists.txt | 6 +- .../editors/space_buttons/CMakeLists.txt | 6 +- .../editors/space_console/CMakeLists.txt | 12 +- .../blender/editors/space_file/CMakeLists.txt | 42 +- .../editors/space_graph/CMakeLists.txt | 6 +- .../editors/space_image/CMakeLists.txt | 38 +- .../blender/editors/space_info/CMakeLists.txt | 6 +- .../editors/space_logic/CMakeLists.txt | 12 +- .../blender/editors/space_nla/CMakeLists.txt | 6 +- .../blender/editors/space_node/CMakeLists.txt | 6 +- .../editors/space_outliner/CMakeLists.txt | 6 +- .../editors/space_script/CMakeLists.txt | 14 +- .../editors/space_sequencer/CMakeLists.txt | 6 +- .../editors/space_sound/CMakeLists.txt | 6 +- .../blender/editors/space_text/CMakeLists.txt | 14 +- .../blender/editors/space_time/CMakeLists.txt | 6 +- .../editors/space_userpref/CMakeLists.txt | 6 +- .../editors/space_view3d/CMakeLists.txt | 16 +- .../blender/editors/transform/CMakeLists.txt | 6 +- source/blender/editors/util/CMakeLists.txt | 6 +- source/blender/editors/uvedit/CMakeLists.txt | 6 +- source/blender/gpu/CMakeLists.txt | 8 +- source/blender/ikplugin/CMakeLists.txt | 18 +- source/blender/imbuf/CMakeLists.txt | 70 +- .../imbuf/intern/cineon/CMakeLists.txt | 6 +- .../blender/imbuf/intern/dds/CMakeLists.txt | 10 +- .../imbuf/intern/openexr/CMakeLists.txt | 12 +- source/blender/makesdna/CMakeLists.txt | 2 +- source/blender/makesdna/intern/CMakeLists.txt | 22 +- source/blender/makesrna/CMakeLists.txt | 2 +- source/blender/makesrna/intern/CMakeLists.txt | 140 +- source/blender/makesrna/intern/rna_texture.c | 2 +- source/blender/modifiers/CMakeLists.txt | 30 +- source/blender/nodes/CMakeLists.txt | 14 +- source/blender/python/CMakeLists.txt | 4 +- source/blender/python/generic/CMakeLists.txt | 6 +- source/blender/python/intern/CMakeLists.txt | 12 +- source/blender/quicktime/CMakeLists.txt | 16 +- source/blender/readblenfile/CMakeLists.txt | 6 +- source/blender/render/CMakeLists.txt | 34 +- source/blender/windowmanager/CMakeLists.txt | 62 +- source/blenderplayer/CMakeLists.txt | 98 +- .../bad_level_call_stubs/CMakeLists.txt | 28 +- source/creator/CMakeLists.txt | 358 ++--- .../gameengine/BlenderRoutines/CMakeLists.txt | 14 +- source/gameengine/CMakeLists.txt | 52 +- source/gameengine/Converter/CMakeLists.txt | 12 +- source/gameengine/Expressions/CMakeLists.txt | 6 +- source/gameengine/GameLogic/CMakeLists.txt | 16 +- source/gameengine/GamePlayer/CMakeLists.txt | 10 +- .../GamePlayer/common/CMakeLists.txt | 8 +- .../GamePlayer/ghost/CMakeLists.txt | 14 +- source/gameengine/Ketsji/CMakeLists.txt | 34 +- .../Ketsji/KXNetwork/CMakeLists.txt | 6 +- source/gameengine/Network/CMakeLists.txt | 6 +- .../Network/LoopBackNetwork/CMakeLists.txt | 6 +- .../gameengine/Physics/Bullet/CMakeLists.txt | 14 +- .../gameengine/Physics/Dummy/CMakeLists.txt | 6 +- .../gameengine/Physics/common/CMakeLists.txt | 6 +- source/gameengine/Rasterizer/CMakeLists.txt | 8 +- .../RAS_OpenGLRasterizer/CMakeLists.txt | 8 +- source/gameengine/SceneGraph/CMakeLists.txt | 6 +- source/gameengine/VideoTexture/CMakeLists.txt | 16 +- source/kernel/CMakeLists.txt | 6 +- 120 files changed, 2172 insertions(+), 2172 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1540e54f694..0bbb8c6804c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,8 +30,8 @@ # build the libs and objects in it. It will also conflict with the current # Makefile system for Blender -IF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) -MESSAGE(FATAL_ERROR "CMake generation for blender is not allowed within the source directory! +if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) +message(FATAL_ERROR "CMake generation for blender is not allowed within the source directory! Remove the CMakeCache.txt file and try again from another folder, e.g.: rm CMakeCache.txt @@ -40,120 +40,120 @@ Remove the CMakeCache.txt file and try again from another folder, e.g.: cd cmake-make cmake -G \"Unix Makefiles\" ../blender ") -ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) +endif() -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) +cmake_minimum_required(VERSION 2.6) # quiet output for Makefiles, 'make -s' helps too -# SET_PROPERTY(GLOBAL PROPERTY RULE_MESSAGES OFF) +# set_property(GLOBAL PROPERTY RULE_MESSAGES OFF) -PROJECT(Blender) +project(Blender) #----------------------------------------------------------------------------- # Redirect output files -SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) -SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) +set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) +set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) #----------------------------------------------------------------------------- # Load some macros. -INCLUDE(build_files/cmake/macros.cmake) +include(build_files/cmake/macros.cmake) #----------------------------------------------------------------------------- # Set default config options -GET_BLENDER_VERSION() +get_blender_version() # Blender internal features -OPTION(WITH_INTERNATIONAL "Enable I18N (International fonts and text)" ON) -OPTION(WITH_PYTHON "Enable Embedded Python API" ON) -OPTION(WITH_BUILDINFO "Include extra build details" ON) -OPTION(WITH_IK_ITASC "Enable ITASC IK solver" ON) -OPTION(WITH_FFTW3 "Enable FFTW3 support (Used for smoke and audio effects)" OFF) -OPTION(WITH_BULLET "Enable Bullet (Physics Engine)" ON) -OPTION(WITH_GAMEENGINE "Enable Game Engine" ON) -OPTION(WITH_PLAYER "Build Player" OFF) +option(WITH_INTERNATIONAL "Enable I18N (International fonts and text)" ON) +option(WITH_PYTHON "Enable Embedded Python API" ON) +option(WITH_BUILDINFO "Include extra build details" ON) +option(WITH_IK_ITASC "Enable ITASC IK solver" ON) +option(WITH_FFTW3 "Enable FFTW3 support (Used for smoke and audio effects)" OFF) +option(WITH_BULLET "Enable Bullet (Physics Engine)" ON) +option(WITH_GAMEENGINE "Enable Game Engine" ON) +option(WITH_PLAYER "Build Player" OFF) # (unix defaults to OpenMP On) -IF(UNIX AND NOT APPLE) - OPTION(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)" ON) -ELSE() - OPTION(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)" OFF) -ENDIF() +if(UNIX AND NOT APPLE) + option(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)" ON) +else() + option(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)" OFF) +endif() # Modifiers -OPTION(WITH_MOD_FLUID "Enable Elbeem Modifier (Fluid Simulation)" ON) -OPTION(WITH_MOD_DECIMATE "Enable Decimate Modifier" ON) -OPTION(WITH_MOD_BOOLEAN "Enable Boolean Modifier" ON) +option(WITH_MOD_FLUID "Enable Elbeem Modifier (Fluid Simulation)" ON) +option(WITH_MOD_DECIMATE "Enable Decimate Modifier" ON) +option(WITH_MOD_BOOLEAN "Enable Boolean Modifier" ON) # Image format support -OPTION(WITH_IMAGE_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" ON) -OPTION(WITH_IMAGE_OPENJPEG "Enable OpenJpeg Support (http://www.openjpeg.org)" ON) -OPTION(WITH_IMAGE_TIFF "Enable LibTIFF Support" ON) -OPTION(WITH_IMAGE_DDS "Enable DDS Image Support" ON) -OPTION(WITH_IMAGE_CINEON "Enable CINEON and DPX Image Support" ON) -OPTION(WITH_IMAGE_HDR "Enable HDR Image Support" ON) -OPTION(WITH_IMAGE_REDCODE "Enable RedCode Image Support" OFF) +option(WITH_IMAGE_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" ON) +option(WITH_IMAGE_OPENJPEG "Enable OpenJpeg Support (http://www.openjpeg.org)" ON) +option(WITH_IMAGE_TIFF "Enable LibTIFF Support" ON) +option(WITH_IMAGE_DDS "Enable DDS Image Support" ON) +option(WITH_IMAGE_CINEON "Enable CINEON and DPX Image Support" ON) +option(WITH_IMAGE_HDR "Enable HDR Image Support" ON) +option(WITH_IMAGE_REDCODE "Enable RedCode Image Support" OFF) # Audio/Video format support -OPTION(WITH_CODEC_FFMPEG "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu)" OFF) -OPTION(WITH_CODEC_SNDFILE "Enable libsndfile Support (http://www.mega-nerd.com/libsndfile)" OFF) -IF(APPLE OR (WIN32 AND NOT UNIX)) - OPTION(WITH_CODEC_QUICKTIME "Enable Quicktime Support" OFF) -ENDIF(APPLE OR (WIN32 AND NOT UNIX)) +option(WITH_CODEC_FFMPEG "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu)" OFF) +option(WITH_CODEC_SNDFILE "Enable libsndfile Support (http://www.mega-nerd.com/libsndfile)" OFF) +if(APPLE OR (WIN32 AND NOT UNIX)) + option(WITH_CODEC_QUICKTIME "Enable Quicktime Support" OFF) +endif() # 3D format support # disable opencollada on non-apple unix because opencollada has no package for debian -IF(UNIX AND NOT APPLE) - OPTION(WITH_OPENCOLLADA "Enable OpenCollada Support (http://www.opencollada.org)" OFF) -ELSE() - OPTION(WITH_OPENCOLLADA "Enable OpenCollada Support (http://www.opencollada.org)" OFF) -ENDIF() +if(UNIX AND NOT APPLE) + option(WITH_OPENCOLLADA "Enable OpenCollada Support (http://www.opencollada.org)" OFF) +else() + option(WITH_OPENCOLLADA "Enable OpenCollada Support (http://www.opencollada.org)" OFF) +endif() # Sound output -OPTION(WITH_SDL "Enable SDL for sound and joystick support" ON) -OPTION(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON) -OPTION(WITH_JACK "Enable Jack Support (http://www.jackaudio.org)" OFF) -OPTION(WITH_SAMPLERATE "Enable samplerate conversion" ON) +option(WITH_SDL "Enable SDL for sound and joystick support" ON) +option(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON) +option(WITH_JACK "Enable Jack Support (http://www.jackaudio.org)" OFF) +option(WITH_SAMPLERATE "Enable samplerate conversion" ON) # Compression -OPTION(WITH_LZO "Enable fast LZO compression (used for pointcache)" ON) -OPTION(WITH_LZMA "Enable best LZMA compression, (used for pointcache)" ON) +option(WITH_LZO "Enable fast LZO compression (used for pointcache)" ON) +option(WITH_LZMA "Enable best LZMA compression, (used for pointcache)" ON) # Misc -OPTION(WITH_RAYOPTIMIZATION "Enable use of SIMD (SSE) optimizations for the raytracer" ON) -OPTION(WITH_CXX_GUARDEDALLOC "Enable GuardedAlloc for C++ memory allocation tracking" OFF) -OPTION(WITH_INSTALL "Install accompanying scripts and language files needed to run blender" ON) -OPTION(WITH_PYTHON_INSTALL "Copy system python into the blender install folder" ON) +option(WITH_RAYOPTIMIZATION "Enable use of SIMD (SSE) optimizations for the raytracer" ON) +option(WITH_CXX_GUARDEDALLOC "Enable GuardedAlloc for C++ memory allocation tracking" OFF) +option(WITH_INSTALL "Install accompanying scripts and language files needed to run blender" ON) +option(WITH_PYTHON_INSTALL "Copy system python into the blender install folder" ON) -IF(APPLE) - OPTION(WITH_COCOA "Use Cocoa framework instead of deprecated Carbon" ON) - OPTION(USE_QTKIT "Use QtKit instead of Carbon quicktime (needed for having partial quicktime for 64bit)" OFF) - OPTION(WITH_LIBS10.5 "Use 10.5 libs (needed for 64bit builds)" OFF) -ENDIF(APPLE) +if(APPLE) + option(WITH_COCOA "Use Cocoa framework instead of deprecated Carbon" ON) + option(USE_QTKIT "Use QtKit instead of Carbon quicktime (needed for having partial quicktime for 64bit)" OFF) + option(WITH_LIBS10.5 "Use 10.5 libs (needed for 64bit builds)" OFF) +endif() # only for developers who want to make this functional -# OPTION(WITH_LCMS "Enable color correction with lcms" OFF) +# option(WITH_LCMS "Enable color correction with lcms" OFF) -IF(NOT WITH_GAMEENGINE AND WITH_PLAYER) - MESSAGE(FATAL_ERROR "WITH_PLAYER requires WITH_GAMEENGINE") -ENDIF(NOT WITH_GAMEENGINE AND WITH_PLAYER) +if(NOT WITH_GAMEENGINE AND WITH_PLAYER) + message(FATAL_ERROR "WITH_PLAYER requires WITH_GAMEENGINE") +endif() -IF(NOT WITH_INSTALL AND WITH_PYTHON_INSTALL) - MESSAGE("WARNING: WITH_PYTHON_INSTALL requires WITH_INSTALL") -ENDIF(NOT WITH_INSTALL AND WITH_PYTHON_INSTALL) +if(NOT WITH_INSTALL AND WITH_PYTHON_INSTALL) + message("WARNING: WITH_PYTHON_INSTALL requires WITH_INSTALL") +endif() -IF(NOT WITH_SAMPLERATE AND (WITH_OPENAL OR WITH_SDL OR WITH_JACK)) - MESSAGE(FATAL_ERROR "WITH_OPENAL/WITH_SDL/WITH_JACK require WITH_SAMPLERATE") -ENDIF(NOT WITH_SAMPLERATE AND (WITH_OPENAL OR WITH_SDL OR WITH_JACK)) +if(NOT WITH_SAMPLERATE AND (WITH_OPENAL OR WITH_SDL OR WITH_JACK)) + message(FATAL_ERROR "WITH_OPENAL/WITH_SDL/WITH_JACK require WITH_SAMPLERATE") +endif() -IF(NOT WITH_IMAGE_OPENJPEG AND WITH_IMAGE_REDCODE) - MESSAGE(FATAL_ERROR "WITH_IMAGE_REDCODE requires WITH_IMAGE_OPENJPEG") -ENDIF(NOT WITH_IMAGE_OPENJPEG AND WITH_IMAGE_REDCODE) +if(NOT WITH_IMAGE_OPENJPEG AND WITH_IMAGE_REDCODE) + message(FATAL_ERROR "WITH_IMAGE_REDCODE requires WITH_IMAGE_OPENJPEG") +endif() TEST_SSE_SUPPORT() # disabled for now, not supported -# OPTION(WITH_WEBPLUGIN "Enable Web Plugin (Unix only)" OFF) +# option(WITH_WEBPLUGIN "Enable Web Plugin (Unix only)" OFF) # For alternate Python locations the commandline can be used to override detected/default cache settings, e.g: # On Unix: @@ -166,78 +166,78 @@ TEST_SSE_SUPPORT() #----------------------------------------------------------------------------- #Platform specifics -IF(UNIX AND NOT APPLE) +if(UNIX AND NOT APPLE) - IF(WITH_OPENAL) - FIND_PACKAGE(OpenAL) - IF(NOT OPENAL_FOUND) - SET(WITH_OPENAL OFF) - ENDIF(NOT OPENAL_FOUND) - ENDIF(WITH_OPENAL) + if(WITH_OPENAL) + find_package(OpenAL) + if(NOT OPENAL_FOUND) + set(WITH_OPENAL OFF) + endif() + endif() - IF(WITH_JACK) - SET(JACK /usr) - SET(JACK_INC ${JACK}/include/jack) - SET(JACK_LIB jack) - SET(JACK_LIBPATH ${JACK}/lib) - ENDIF(WITH_JACK) + if(WITH_JACK) + set(JACK /usr) + set(JACK_INC ${JACK}/include/jack) + set(JACK_LIB jack) + set(JACK_LIBPATH ${JACK}/lib) + endif() - IF(WITH_CODEC_SNDFILE) - SET(SNDFILE /usr) - SET(SNDFILE_INC ${SNDFILE}/include) - SET(SNDFILE_LIB sndfile) - SET(SNDFILE_LIBPATH ${SNDFILE}/lib) - ENDIF(WITH_CODEC_SNDFILE) + if(WITH_CODEC_SNDFILE) + set(SNDFILE /usr) + set(SNDFILE_INC ${SNDFILE}/include) + set(SNDFILE_LIB sndfile) + set(SNDFILE_LIBPATH ${SNDFILE}/lib) + endif() - IF(WITH_INTERNATIONAL) - FIND_LIBRARY(INTL_LIBRARY + if(WITH_INTERNATIONAL) + find_library(INTL_LIBRARY NAMES intl PATHS /sw/lib ) - FIND_LIBRARY(ICONV_LIBRARY + find_library(ICONV_LIBRARY NAMES iconv PATHS /sw/lib ) - IF(INTL_LIBRARY AND ICONV_LIBRARY) - SET(GETTEXT_LIB ${INTL_LIBRARY} ${ICONV_LIBRARY}) - ENDIF(INTL_LIBRARY AND ICONV_LIBRARY) - ENDIF(WITH_INTERNATIONAL) + if(INTL_LIBRARY AND ICONV_LIBRARY) + set(GETTEXT_LIB ${INTL_LIBRARY} ${ICONV_LIBRARY}) + endif() + endif() - FIND_PACKAGE(Freetype) - # UNSET(FREETYPE_INCLUDE_DIRS CACHE) # cant use + find_package(Freetype) + # unset(FREETYPE_INCLUDE_DIRS CACHE) # cant use - IF(WITH_PYTHON) + if(WITH_PYTHON) # No way to set py31. remove for now. - # FIND_PACKAGE(PythonLibs) - SET(PYTHON /usr) - SET(PYTHON_VERSION 3.1) - SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}" CACHE STRING "") - # SET(PYTHON_BINARY python) # not used yet - SET(PYTHON_LIB python${PYTHON_VERSION} CACHE STRING "") - SET(PYTHON_LIBPATH ${PYTHON}/lib CACHE STRING "") + # find_package(PythonLibs) + set(PYTHON /usr) + set(PYTHON_VERSION 3.1) + set(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}" CACHE STRING "") + # set(PYTHON_BINARY python) # not used yet + set(PYTHON_LIB python${PYTHON_VERSION} CACHE STRING "") + set(PYTHON_LIBPATH ${PYTHON}/lib CACHE STRING "") - # FIND_PACKAGE(PythonInterp) # not used yet - # SET(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "") + # find_package(PythonInterp) # not used yet + # set(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "") - SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic") - ENDIF(WITH_PYTHON) + set(PYTHON_LINKFLAGS "-Xlinker -export-dynamic") + endif() - IF(WITH_SDL) - FIND_PACKAGE(SDL) - # UNSET(SDLMAIN_LIBRARY CACHE) - IF(NOT SDL_FOUND) - SET(WITH_SDL OFF) - ENDIF(NOT SDL_FOUND) - ENDIF(WITH_SDL) + if(WITH_SDL) + find_package(SDL) + # unset(SDLMAIN_LIBRARY CACHE) + if(NOT SDL_FOUND) + set(WITH_SDL OFF) + endif() + endif() - IF(WITH_IMAGE_OPENEXR) - SET(OPENEXR /usr CACHE FILEPATH "OPENEXR Directory") - FIND_PATH(OPENEXR_INC + if(WITH_IMAGE_OPENEXR) + set(OPENEXR /usr CACHE FILEPATH "OPENEXR Directory") + find_path(OPENEXR_INC ImfXdr.h PATHS ${OPENEXR}/include/OpenEXR @@ -247,764 +247,764 @@ IF(UNIX AND NOT APPLE) /opt/csw/include/OpenEXR /opt/include/OpenEXR ) - SET(OPENEXR_LIB Half IlmImf Iex Imath) + set(OPENEXR_LIB Half IlmImf Iex Imath) - IF(NOT OPENEXR_INC) - SET(WITH_IMAGE_OPENEXR OFF) - ENDIF(NOT OPENEXR_INC) - ENDIF(WITH_IMAGE_OPENEXR) + if(NOT OPENEXR_INC) + set(WITH_IMAGE_OPENEXR OFF) + endif() + endif() - IF(WITH_IMAGE_TIFF) - FIND_PACKAGE(TIFF) - IF(NOT TIFF_FOUND) - SET(WITH_IMAGE_TIFF OFF) - ENDIF(NOT TIFF_FOUND) - ENDIF(WITH_IMAGE_TIFF) + if(WITH_IMAGE_TIFF) + find_package(TIFF) + if(NOT TIFF_FOUND) + set(WITH_IMAGE_TIFF OFF) + endif() + endif() - FIND_PACKAGE(JPEG REQUIRED) + find_package(JPEG REQUIRED) - FIND_PACKAGE(PNG REQUIRED) + find_package(PNG REQUIRED) - FIND_PACKAGE(ZLIB REQUIRED) + find_package(ZLIB REQUIRED) - IF(WITH_LCMS) - SET(LCMS /usr CACHE FILEPATH "LCMS directory") - SET(LCMS_INCLUDE_DIR ${LCMS}/include) - SET(LCMS_LIBRARY lcms) - SET(LCMS_LIBPATH ${LCMS}/lib) - ENDIF(WITH_LCMS) + if(WITH_LCMS) + set(LCMS /usr CACHE FILEPATH "LCMS directory") + set(LCMS_INCLUDE_DIR ${LCMS}/include) + set(LCMS_LIBRARY lcms) + set(LCMS_LIBPATH ${LCMS}/lib) + endif() - IF(WITH_CODEC_FFMPEG) - SET(FFMPEG /usr CACHE FILEPATH "FFMPEG Directory") - SET(FFMPEG_INC ${FFMPEG}/include) - SET(FFMPEG_LIB avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries") - SET(FFMPEG_LIBPATH ${FFMPEG}/lib) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_CONSTANT_MACROS") - ENDIF(WITH_CODEC_FFMPEG) + if(WITH_CODEC_FFMPEG) + set(FFMPEG /usr CACHE FILEPATH "FFMPEG Directory") + set(FFMPEG_INC ${FFMPEG}/include) + set(FFMPEG_LIB avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries") + set(FFMPEG_LIBPATH ${FFMPEG}/lib) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_CONSTANT_MACROS") + endif() - IF(WITH_FFTW3) - SET(FFTW3 /usr) - SET(FFTW3_INC ${FFTW3}/include) - SET(FFTW3_LIB fftw3) - SET(FFTW3_LIBPATH ${FFTW3}/lib) - ENDIF(WITH_FFTW3) + if(WITH_FFTW3) + set(FFTW3 /usr) + set(FFTW3_INC ${FFTW3}/include) + set(FFTW3_LIB fftw3) + set(FFTW3_LIBPATH ${FFTW3}/lib) + endif() - IF(WITH_SAMPLERATE) - SET(LIBSAMPLERATE /usr) - SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include) - SET(LIBSAMPLERATE_LIB samplerate) - SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib) - ENDIF(WITH_SAMPLERATE) + if(WITH_SAMPLERATE) + set(LIBSAMPLERATE /usr) + set(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include) + set(LIBSAMPLERATE_LIB samplerate) + set(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib) + endif() - IF (WITH_OPENCOLLADA) - SET(OPENCOLLADA /usr/local/opencollada CACHE FILEPATH "OpenCollada Directory") - SET(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib) - SET(OPENCOLLADA_LIB OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre ftoa buffer xml2) - SET(OPENCOLLADA_INC ${OPENCOLLADA}) - SET(PCRE /usr CACHE FILEPATH "PCRE Directory") - SET(PCRE_LIBPATH ${PCRE}/lib) - SET(PCRE_LIB pcre) - SET(EXPAT /usr CACHE FILEPATH "Expat Directory") - SET(EXPAT_LIBPATH ${EXPAT}/lib) - SET(EXPAT_LIB expat) - ENDIF (WITH_OPENCOLLADA) + if(WITH_OPENCOLLADA) + set(OPENCOLLADA /usr/local/opencollada CACHE FILEPATH "OpenCollada Directory") + set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib) + set(OPENCOLLADA_LIB OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre ftoa buffer xml2) + set(OPENCOLLADA_INC ${OPENCOLLADA}) + set(PCRE /usr CACHE FILEPATH "PCRE Directory") + set(PCRE_LIBPATH ${PCRE}/lib) + set(PCRE_LIB pcre) + set(EXPAT /usr CACHE FILEPATH "Expat Directory") + set(EXPAT_LIBPATH ${EXPAT}/lib) + set(EXPAT_LIB expat) + endif() - FIND_PACKAGE(X11 REQUIRED) + find_package(X11 REQUIRED) # OpenSuse needs lutil, ArchLinux not, for now keep, can avoid by using --as-needed - SET(LLIBS "-lutil -lc -lm -lpthread -lstdc++ ${X11_X11_LIB} ${X11_Xinput_LIB}") + set(LLIBS "-lutil -lc -lm -lpthread -lstdc++ ${X11_X11_LIB} ${X11_Xinput_LIB}") - IF(CMAKE_SYSTEM_NAME MATCHES "Linux") + if(CMAKE_SYSTEM_NAME MATCHES "Linux") # BSD's dont use libdl.so - LIST(APPEND LLIBS -ldl) + list(APPEND LLIBS -ldl) # binreloc is linux only - SET(BINRELOC ${CMAKE_SOURCE_DIR}/extern/binreloc) - SET(BINRELOC_INC ${BINRELOC}/include) - ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux") + set(BINRELOC ${CMAKE_SOURCE_DIR}/extern/binreloc) + set(BINRELOC_INC ${BINRELOC}/include) + endif() - SET(PLATFORM_LINKFLAGS "-pthread") + set(PLATFORM_LINKFLAGS "-pthread") - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE") # GNU Compiler - IF(CMAKE_COMPILER_IS_GNUCC) - SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing") + if(CMAKE_COMPILER_IS_GNUCC) + set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing") # Better warnings # note: -Wunused-parameter is added below for all GCC compilers - SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -Wno-unknown-pragmas") - SET(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare") + set(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -Wno-unknown-pragmas") + set(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare") # Intel C++ Compiler - ELSEIF(CMAKE_C_COMPILER_ID MATCHES "Intel") + elseif(CMAKE_C_COMPILER_ID MATCHES "Intel") # think these next two are broken - FIND_PROGRAM(XIAR xiar) - IF(XIAR) - SET(CMAKE_AR "${XIAR}") - ENDIF(XIAR) - MARK_AS_ADVANCED(XIAR) + find_program(XIAR xiar) + if(XIAR) + set(CMAKE_AR "${XIAR}") + endif() + mark_as_advanced(XIAR) - FIND_PROGRAM(XILD xild) - IF(XILD) - SET(CMAKE_LINKER "${XILD}") - ENDIF(XILD) - MARK_AS_ADVANCED(XILD) + find_program(XILD xild) + if(XILD) + set(CMAKE_LINKER "${XILD}") + endif() + mark_as_advanced(XILD) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fp-model precise -prec_div -parallel") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fp-model precise -prec_div -parallel") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fp-model precise -prec_div -parallel") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fp-model precise -prec_div -parallel") - SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing") + set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing") - # SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -diag-enable sc3") + # set(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -diag-enable sc3") - SET(C_WARNINGS "-Wall -Wpointer-arith -Wno-unknown-pragmas") - SET(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare") + set(C_WARNINGS "-Wall -Wpointer-arith -Wno-unknown-pragmas") + set(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare") - SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -static-intel") - ENDIF(CMAKE_COMPILER_IS_GNUCC) + set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -static-intel") + endif() -ELSEIF(WIN32) +elseif(WIN32) # this file is included anyway when building under Windows with cl.exe - # INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake) + # include(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake) - SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/windows) + set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/windows) # Setup 64bit and 64bit windows systems - IF(CMAKE_CL_64) - MESSAGE("64 bit compiler detected.") - SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64) - ENDIF(CMAKE_CL_64) + if(CMAKE_CL_64) + message("64 bit compiler detected.") + set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64) + endif() - ADD_DEFINITIONS(-DWIN32) + add_definitions(-DWIN32) - IF(WITH_INTERNATIONAL) - SET(ICONV ${LIBDIR}/iconv) - SET(ICONV_INC ${ICONV}/include) - SET(ICONV_LIB iconv) - SET(ICONV_LIBPATH ${ICONV}/lib) - ENDIF(WITH_INTERNATIONAL) + if(WITH_INTERNATIONAL) + set(ICONV ${LIBDIR}/iconv) + set(ICONV_INC ${ICONV}/include) + set(ICONV_LIB iconv) + set(ICONV_LIBPATH ${ICONV}/lib) + endif() - IF(WITH_SAMPLERATE) - SET(LIBSAMPLERATE ${LIBDIR}/samplerate) - SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include) - SET(LIBSAMPLERATE_LIB libsamplerate) - SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib) - ENDIF(WITH_SAMPLERATE) + if(WITH_SAMPLERATE) + set(LIBSAMPLERATE ${LIBDIR}/samplerate) + set(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include) + set(LIBSAMPLERATE_LIB libsamplerate) + set(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib) + endif() - SET(PNG "${LIBDIR}/png") - SET(PNG_INC "${PNG}/include") - SET(PNG_LIBPATH ${PNG}/lib) + set(PNG "${LIBDIR}/png") + set(PNG_INC "${PNG}/include") + set(PNG_LIBPATH ${PNG}/lib) - SET(JPEG "${LIBDIR}/jpeg") - SET(JPEG_INC "${JPEG}/include") - SET(JPEG_LIBPATH ${JPEG}/lib) + set(JPEG "${LIBDIR}/jpeg") + set(JPEG_INC "${JPEG}/include") + set(JPEG_LIBPATH ${JPEG}/lib) - SET(WINTAB_INC ${LIBDIR}/wintab/include) + set(WINTAB_INC ${LIBDIR}/wintab/include) - IF(WITH_OPENAL) - SET(OPENAL ${LIBDIR}/openal) - SET(OPENAL_INCLUDE_DIR ${OPENAL}/include) - SET(OPENAL_LIBRARY wrap_oal) - SET(OPENAL_LIBPATH ${OPENAL}/lib) - ENDIF(WITH_OPENAL) + if(WITH_OPENAL) + set(OPENAL ${LIBDIR}/openal) + set(OPENAL_INCLUDE_DIR ${OPENAL}/include) + set(OPENAL_LIBRARY wrap_oal) + set(OPENAL_LIBPATH ${OPENAL}/lib) + endif() - IF(WITH_CODEC_SNDFILE) - SET(SNDFILE ${LIBDIR}/sndfile) - SET(SNDFILE_INC ${SNDFILE}/include) - SET(SNDFILE_LIB libsndfile-1) - SET(SNDFILE_LIBPATH ${SNDFILE}/lib) - ENDIF(WITH_CODEC_SNDFILE) + if(WITH_CODEC_SNDFILE) + set(SNDFILE ${LIBDIR}/sndfile) + set(SNDFILE_INC ${SNDFILE}/include) + set(SNDFILE_LIB libsndfile-1) + set(SNDFILE_LIBPATH ${SNDFILE}/lib) + endif() - IF(WITH_SDL) - SET(SDL ${LIBDIR}/sdl) - SET(SDL_INCLUDE_DIR ${SDL}/include) - SET(SDL_LIBRARY SDL) - SET(SDL_LIBPATH ${SDL}/lib) - ENDIF(WITH_SDL) + if(WITH_SDL) + set(SDL ${LIBDIR}/sdl) + set(SDL_INCLUDE_DIR ${SDL}/include) + set(SDL_LIBRARY SDL) + set(SDL_LIBPATH ${SDL}/lib) + endif() - IF(WITH_CODEC_QUICKTIME) - SET(QUICKTIME ${LIBDIR}/QTDevWin) - SET(QUICKTIME_INC ${QUICKTIME}/CIncludes) - SET(QUICKTIME_LIB qtmlClient) - SET(QUICKTIME_LIBPATH ${QUICKTIME}/Libraries) - ENDIF(WITH_CODEC_QUICKTIME) + if(WITH_CODEC_QUICKTIME) + set(QUICKTIME ${LIBDIR}/QTDevWin) + set(QUICKTIME_INC ${QUICKTIME}/CIncludes) + set(QUICKTIME_LIB qtmlClient) + set(QUICKTIME_LIBPATH ${QUICKTIME}/Libraries) + endif() - IF(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD) - ADD_DEFINITIONS(-D__SSE__ -D__MMX__) - ENDIF(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD) + if(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD) + add_definitions(-D__SSE__ -D__MMX__) + endif() - IF(MSVC) - IF(CMAKE_CL_64) - SET(LLIBS kernel32 user32 vfw32 winmm ws2_32 ) - ELSE(CMAKE_CL_64) - SET(LLIBS kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 uuid ws2_32 vfw32 winmm) - ENDIF(CMAKE_CL_64) + if(MSVC) + if(CMAKE_CL_64) + set(LLIBS kernel32 user32 vfw32 winmm ws2_32 ) + else() + set(LLIBS kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 uuid ws2_32 vfw32 winmm) + endif() - SET(CMAKE_CXX_FLAGS "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /we4013 /wd4018 /wd4800 /wd4244 /wd4305 /wd4065 /wd4267" CACHE STRING "MSVC MT C++ flags " FORCE) - SET(CMAKE_C_FLAGS "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /we4013 /wd4018 /wd4800 /wd4244 /wd4305 /wd4065 /wd4267" CACHE STRING "MSVC MT C++ flags " FORCE) + set(CMAKE_CXX_FLAGS "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /we4013 /wd4018 /wd4800 /wd4244 /wd4305 /wd4065 /wd4267" CACHE STRING "MSVC MT C++ flags " FORCE) + set(CMAKE_C_FLAGS "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /we4013 /wd4018 /wd4800 /wd4244 /wd4305 /wd4065 /wd4267" CACHE STRING "MSVC MT C++ flags " FORCE) - IF(CMAKE_CL_64) - SET(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE) - ELSE(CMAKE_CL_64) - SET(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE) - ENDIF(CMAKE_CL_64) - SET(CMAKE_CXX_FLAGS_RELEASE "/O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE) - SET(CMAKE_CXX_FLAGS_MINSIZEREL "/O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE) - SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE) - IF(CMAKE_CL_64) - SET(CMAKE_C_FLAGS_DEBUG "/D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE) - ELSE(CMAKE_CL_64) - SET(CMAKE_C_FLAGS_DEBUG "/D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE) - ENDIF(CMAKE_CL_64) - SET(CMAKE_C_FLAGS_RELEASE "/O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE) - SET(CMAKE_C_FLAGS_MINSIZEREL "/O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE) - SET(CMAKE_C_FLAGS_RELWITHDEBINFO "/O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE) + if(CMAKE_CL_64) + set(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE) + else() + set(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE) + endif() + set(CMAKE_CXX_FLAGS_RELEASE "/O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE) + set(CMAKE_CXX_FLAGS_MINSIZEREL "/O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE) + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE) + if(CMAKE_CL_64) + set(CMAKE_C_FLAGS_DEBUG "/D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE) + else() + set(CMAKE_C_FLAGS_DEBUG "/D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE) + endif() + set(CMAKE_C_FLAGS_RELEASE "/O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE) + set(CMAKE_C_FLAGS_MINSIZEREL "/O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE) + set(CMAKE_C_FLAGS_RELWITHDEBINFO "/O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE) - IF(WITH_INTERNATIONAL) - SET(GETTEXT ${LIBDIR}/gettext) - SET(GETTEXT_INC ${GETTEXT}/include) - SET(GETTEXT_LIBPATH ${GETTEXT}/lib) - IF(CMAKE_CL_64) - SET(GETTEXT_LIB gettext) - ELSE(CMAKE_CL_64) - SET(GETTEXT_LIB gnu_gettext) - ENDIF(CMAKE_CL_64) - ENDIF(WITH_INTERNATIONAL) + if(WITH_INTERNATIONAL) + set(GETTEXT ${LIBDIR}/gettext) + set(GETTEXT_INC ${GETTEXT}/include) + set(GETTEXT_LIBPATH ${GETTEXT}/lib) + if(CMAKE_CL_64) + set(GETTEXT_LIB gettext) + else() + set(GETTEXT_LIB gnu_gettext) + endif() + endif() - IF(CMAKE_CL_64) - SET(PNG_LIBRARIES libpng) - ELSE(CMAKE_CL_64) - SET(PNG_LIBRARIES libpng_st) - ENDIF(CMAKE_CL_64) - SET(JPEG_LIBRARY libjpeg) + if(CMAKE_CL_64) + set(PNG_LIBRARIES libpng) + else() + set(PNG_LIBRARIES libpng_st) + endif() + set(JPEG_LIBRARY libjpeg) - SET(ZLIB ${LIBDIR}/zlib) - SET(ZLIB_INC ${ZLIB}/include) - SET(ZLIB_LIBPATH ${ZLIB}/lib) - IF(CMAKE_CL_64) - SET(ZLIB_LIBRARIES libz) - ELSE(CMAKE_CL_64) - SET(ZLIB_LIBRARIES zlib) - ENDIF(CMAKE_CL_64) + set(ZLIB ${LIBDIR}/zlib) + set(ZLIB_INC ${ZLIB}/include) + set(ZLIB_LIBPATH ${ZLIB}/lib) + if(CMAKE_CL_64) + set(ZLIB_LIBRARIES libz) + else() + set(ZLIB_LIBRARIES zlib) + endif() - SET(PTHREADS ${LIBDIR}/pthreads) - SET(PTHREADS_INC ${PTHREADS}/include) - SET(PTHREADS_LIBPATH ${PTHREADS}/lib) - SET(PTHREADS_LIB pthreadVC2) + set(PTHREADS ${LIBDIR}/pthreads) + set(PTHREADS_INC ${PTHREADS}/include) + set(PTHREADS_LIBPATH ${PTHREADS}/lib) + set(PTHREADS_LIB pthreadVC2) - SET(FREETYPE ${LIBDIR}/freetype) - SET(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2) - SET(FREETYPE_LIBPATH ${FREETYPE}/lib) - SET(FREETYPE_LIBRARY freetype2ST) + set(FREETYPE ${LIBDIR}/freetype) + set(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2) + set(FREETYPE_LIBPATH ${FREETYPE}/lib) + set(FREETYPE_LIBRARY freetype2ST) - IF(WITH_FFTW3) - SET(FFTW3 ${LIBDIR}/fftw3) - SET(FFTW3_LIB libfftw) - SET(FFTW3_INC ${FFTW3}/include) - SET(FFTW3_LIBPATH ${FFTW3}/lib) - ENDIF(WITH_FFTW3) + if(WITH_FFTW3) + set(FFTW3 ${LIBDIR}/fftw3) + set(FFTW3_LIB libfftw) + set(FFTW3_INC ${FFTW3}/include) + set(FFTW3_LIBPATH ${FFTW3}/lib) + endif() - IF(WITH_OPENCOLLADA) - SET(OPENCOLLADA ${LIBDIR}/opencollada) - SET(OPENCOLLADA_INC ${OPENCOLLADA}/include) - SET(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib) - SET(OPENCOLLADA_LIB OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils OpenCOLLADAStreamWriter MathMLSolver GeneratedSaxParser xml2 buffer ftoa) - SET(PCRE_LIB pcre) - ENDIF(WITH_OPENCOLLADA) + if(WITH_OPENCOLLADA) + set(OPENCOLLADA ${LIBDIR}/opencollada) + set(OPENCOLLADA_INC ${OPENCOLLADA}/include) + set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib) + set(OPENCOLLADA_LIB OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils OpenCOLLADAStreamWriter MathMLSolver GeneratedSaxParser xml2 buffer ftoa) + set(PCRE_LIB pcre) + endif() - IF(WITH_LCMS) - SET(LCMS ${LIBDIR}/lcms) - SET(LCMS_INCLUDE_DIR ${LCMS}/include) - SET(LCMS_LIBPATH ${LCMS}/lib) - SET(LCMS_LIB lcms) - ENDIF(WITH_LCMS) + if(WITH_LCMS) + set(LCMS ${LIBDIR}/lcms) + set(LCMS_INCLUDE_DIR ${LCMS}/include) + set(LCMS_LIBPATH ${LCMS}/lib) + set(LCMS_LIB lcms) + endif() - IF(WITH_CODEC_FFMPEG) - SET(FFMPEG ${LIBDIR}/ffmpeg) - SET(FFMPEG_INC ${FFMPEG}/include ${FFMPEG}/include/msvc) - SET(FFMPEG_LIB avcodec-52 avformat-52 avdevice-52 avutil-50 swscale-0) - SET(FFMPEG_LIBPATH ${FFMPEG}/lib) - ENDIF(WITH_CODEC_FFMPEG) + if(WITH_CODEC_FFMPEG) + set(FFMPEG ${LIBDIR}/ffmpeg) + set(FFMPEG_INC ${FFMPEG}/include ${FFMPEG}/include/msvc) + set(FFMPEG_LIB avcodec-52 avformat-52 avdevice-52 avutil-50 swscale-0) + set(FFMPEG_LIBPATH ${FFMPEG}/lib) + endif() - IF(WITH_IMAGE_OPENEXR) - SET(OPENEXR ${LIBDIR}/openexr) - SET(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/IlmImf ${OPENEXR}/include/Iex ${OPENEXR}/include/Imath) - SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread) - IF (MSVC80) - SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2005) - ELSE (MSVC80) - SET(OPENEXR_LIBPATH ${OPENEXR}/lib_msvc) - ENDIF(MSVC80) - IF (MSVC90) - SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2008) - ENDIF(MSVC90) - ENDIF(WITH_IMAGE_OPENEXR) + if(WITH_IMAGE_OPENEXR) + set(OPENEXR ${LIBDIR}/openexr) + set(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/IlmImf ${OPENEXR}/include/Iex ${OPENEXR}/include/Imath) + set(OPENEXR_LIB Iex Half IlmImf Imath IlmThread) + if(MSVC80) + set(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2005) + else() + set(OPENEXR_LIBPATH ${OPENEXR}/lib_msvc) + endif() + if(MSVC90) + set(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2008) + endif() + endif() - IF(WITH_IMAGE_TIFF) - SET(TIFF ${LIBDIR}/tiff) - SET(TIFF_LIBRARY libtiff) - SET(TIFF_INCLUDE_DIR ${TIFF}/include) - SET(TIFF_LIBPATH ${TIFF}/lib) - ENDIF(WITH_IMAGE_TIFF) + if(WITH_IMAGE_TIFF) + set(TIFF ${LIBDIR}/tiff) + set(TIFF_LIBRARY libtiff) + set(TIFF_INCLUDE_DIR ${TIFF}/include) + set(TIFF_LIBPATH ${TIFF}/lib) + endif() - IF(WITH_JACK) - SET(JACK ${LIBDIR}/jack) - SET(JACK_INC ${JACK}/include/jack ${JACK}/include) - SET(JACK_LIB libjack) - SET(JACK_LIBPATH ${JACK}/lib) - ENDIF(WITH_JACK) + if(WITH_JACK) + set(JACK ${LIBDIR}/jack) + set(JACK_INC ${JACK}/include/jack ${JACK}/include) + set(JACK_LIB libjack) + set(JACK_LIBPATH ${JACK}/lib) + endif() - IF(WITH_PYTHON) - SET(PYTHON ${LIBDIR}/python) - SET(PYTHON_VERSION 3.1) - SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}") - # SET(PYTHON_BINARY python) # not used yet - SET(PYTHON_LIB python31) - SET(PYTHON_LIBPATH ${PYTHON}/lib) - ENDIF(WITH_PYTHON) + if(WITH_PYTHON) + set(PYTHON ${LIBDIR}/python) + set(PYTHON_VERSION 3.1) + set(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}") + # set(PYTHON_BINARY python) # not used yet + set(PYTHON_LIB python31) + set(PYTHON_LIBPATH ${PYTHON}/lib) + endif() # MSVC only, Mingw doesnt need - IF(CMAKE_CL_64) - SET(PLATFORM_LINKFLAGS "/MACHINE:X64 /NODEFAULTLIB:libc.lib ") - ELSE(CMAKE_CL_64) - SET(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib ") - ENDIF(CMAKE_CL_64) + if(CMAKE_CL_64) + set(PLATFORM_LINKFLAGS "/MACHINE:X64 /NODEFAULTLIB:libc.lib ") + else() + set(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib ") + endif() - SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libcmt.lib;libc.lib ") + set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libcmt.lib;libc.lib ") - ELSE(MSVC) + else() # keep GCC spesific stuff here - IF(CMAKE_COMPILER_IS_GNUCC) - SET(LLIBS "-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid") - SET(PLATFORM_CFLAGS "-pipe -funsigned-char -fno-strict-aliasing") + if(CMAKE_COMPILER_IS_GNUCC) + set(LLIBS "-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid") + set(PLATFORM_CFLAGS "-pipe -funsigned-char -fno-strict-aliasing") # Better warnings - SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -Wno-unknown-pragmas") - SET(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare") + set(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -Wno-unknown-pragmas") + set(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare") - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE") - ENDIF(CMAKE_COMPILER_IS_GNUCC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE") + endif() - ADD_DEFINITIONS(-DFREE_WINDOWS) + add_definitions(-DFREE_WINDOWS) - SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG") - SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG") + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG") + set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG") - IF(WITH_INTERNATIONAL) - SET(GETTEXT ${LIBDIR}/gcc/gettext) - SET(GETTEXT_INC ${GETTEXT}/include) - SET(GETTEXT_LIBPATH ${GETTEXT}/lib) - SET(GETTEXT_LIB intl) - ENDIF(WITH_INTERNATIONAL) + if(WITH_INTERNATIONAL) + set(GETTEXT ${LIBDIR}/gcc/gettext) + set(GETTEXT_INC ${GETTEXT}/include) + set(GETTEXT_LIBPATH ${GETTEXT}/lib) + set(GETTEXT_LIB intl) + endif() - SET(JPEG_LIBRARY libjpeg) - SET(PNG_LIBRARIES png) + set(JPEG_LIBRARY libjpeg) + set(PNG_LIBRARIES png) - SET(ZLIB ${LIBDIR}/zlib) - SET(ZLIB_INC ${ZLIB}/include) - SET(ZLIB_LIBPATH ${ZLIB}/lib) - SET(ZLIB_LIBRARIES z) + set(ZLIB ${LIBDIR}/zlib) + set(ZLIB_INC ${ZLIB}/include) + set(ZLIB_LIBPATH ${ZLIB}/lib) + set(ZLIB_LIBRARIES z) - SET(PTHREADS ${LIBDIR}/pthreads) - SET(PTHREADS_INC ${PTHREADS}/include) - SET(PTHREADS_LIBPATH ${PTHREADS}/lib) - SET(PTHREADS_LIB pthreadGC2) + set(PTHREADS ${LIBDIR}/pthreads) + set(PTHREADS_INC ${PTHREADS}/include) + set(PTHREADS_LIBPATH ${PTHREADS}/lib) + set(PTHREADS_LIB pthreadGC2) - SET(FREETYPE ${LIBDIR}/gcc/freetype) - SET(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2) - SET(FREETYPE_LIBPATH ${FREETYPE}/lib) - SET(FREETYPE_LIBRARY freetype) + set(FREETYPE ${LIBDIR}/gcc/freetype) + set(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2) + set(FREETYPE_LIBPATH ${FREETYPE}/lib) + set(FREETYPE_LIBRARY freetype) - IF(WITH_FFTW3) - SET(FFTW3 ${LIBDIR}/gcc/fftw3) - SET(FFTW3_LIB fftw3) - SET(FFTW3_INC ${FFTW3}/include) - SET(FFTW3_LIBPATH ${FFTW3}/lib) - ENDIF(WITH_FFTW3) + if(WITH_FFTW3) + set(FFTW3 ${LIBDIR}/gcc/fftw3) + set(FFTW3_LIB fftw3) + set(FFTW3_INC ${FFTW3}/include) + set(FFTW3_LIBPATH ${FFTW3}/lib) + endif() - IF(WITH_OPENCOLLADA) - SET(OPENCOLLADA ${LIBDIR}/gcc/opencollada) - SET(OPENCOLLADA_INC ${OPENCOLLADA}/include) - SET(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib ${OPENCOLLADA}/lib) - SET(OPENCOLLADA_LIB OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver expat pcre buffer ftoa) - SET(PCRE_LIB pcre) - ENDIF(WITH_OPENCOLLADA) + if(WITH_OPENCOLLADA) + set(OPENCOLLADA ${LIBDIR}/gcc/opencollada) + set(OPENCOLLADA_INC ${OPENCOLLADA}/include) + set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib ${OPENCOLLADA}/lib) + set(OPENCOLLADA_LIB OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver expat pcre buffer ftoa) + set(PCRE_LIB pcre) + endif() - IF(WITH_CODEC_FFMPEG) - SET(FFMPEG ${LIBDIR}/ffmpeg) - SET(FFMPEG_INC ${FFMPEG}/include ${FFMPEG}/include) - SET(FFMPEG_LIB avcodec-52 avformat-52 avdevice-52 avutil-50 swscale-0) - SET(FFMPEG_LIBPATH ${FFMPEG}/lib) - ENDIF(WITH_CODEC_FFMPEG) + if(WITH_CODEC_FFMPEG) + set(FFMPEG ${LIBDIR}/ffmpeg) + set(FFMPEG_INC ${FFMPEG}/include ${FFMPEG}/include) + set(FFMPEG_LIB avcodec-52 avformat-52 avdevice-52 avutil-50 swscale-0) + set(FFMPEG_LIBPATH ${FFMPEG}/lib) + endif() - IF(WITH_IMAGE_OPENEXR) - SET(OPENEXR ${LIBDIR}/gcc/openexr) - SET(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/OpenEXR) - SET(OPENEXR_LIB Half IlmImf Imath IlmThread) - SET(OPENEXR_LIBPATH ${OPENEXR}/lib) + if(WITH_IMAGE_OPENEXR) + set(OPENEXR ${LIBDIR}/gcc/openexr) + set(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/OpenEXR) + set(OPENEXR_LIB Half IlmImf Imath IlmThread) + set(OPENEXR_LIBPATH ${OPENEXR}/lib) # TODO, gives linking errors, force off - SET(WITH_IMAGE_OPENEXR OFF) - ENDIF(WITH_IMAGE_OPENEXR) + set(WITH_IMAGE_OPENEXR OFF) + endif() - IF(WITH_IMAGE_TIFF) - SET(TIFF ${LIBDIR}/gcc/tiff) - SET(TIFF_LIBRARY tiff) - SET(TIFF_INCLUDE_DIR ${TIFF}/include) - SET(TIFF_LIBPATH ${TIFF}/lib) - ENDIF(WITH_IMAGE_TIFF) + if(WITH_IMAGE_TIFF) + set(TIFF ${LIBDIR}/gcc/tiff) + set(TIFF_LIBRARY tiff) + set(TIFF_INCLUDE_DIR ${TIFF}/include) + set(TIFF_LIBPATH ${TIFF}/lib) + endif() - IF(WITH_JACK) - SET(JACK ${LIBDIR}/jack) - SET(JACK_INC ${JACK}/include/jack ${JACK}/include) - SET(JACK_LIB jack) - SET(JACK_LIBPATH ${JACK}/lib) + if(WITH_JACK) + set(JACK ${LIBDIR}/jack) + set(JACK_INC ${JACK}/include/jack ${JACK}/include) + set(JACK_LIB jack) + set(JACK_LIBPATH ${JACK}/lib) # TODO, gives linking errors, force off - SET(WITH_JACK OFF) - ENDIF(WITH_JACK) + set(WITH_JACK OFF) + endif() - IF(WITH_PYTHON) - SET(PYTHON ${LIBDIR}/python) - SET(PYTHON_VERSION 3.1) - SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}") - # SET(PYTHON_BINARY python) # not used yet - SET(PYTHON_LIB python31mw) - SET(PYTHON_LIBPATH ${PYTHON}/lib) - ENDIF(WITH_PYTHON) + if(WITH_PYTHON) + set(PYTHON ${LIBDIR}/python) + set(PYTHON_VERSION 3.1) + set(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}") + # set(PYTHON_BINARY python) # not used yet + set(PYTHON_LIB python31mw) + set(PYTHON_LIBPATH ${PYTHON}/lib) + endif() - ENDIF(MSVC) + endif() # used in many places so include globally, like OpenGL - INCLUDE_DIRECTORIES(${PTHREADS_INC}) + include_directories(${PTHREADS_INC}) -ELSEIF(APPLE) +elseif(APPLE) - IF(WITH_LIBS10.5) - SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-9.x.universal) - ELSE(WITH_LIBS10.5) - IF(CMAKE_OSX_ARCHITECTURES MATCHES i386) - SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-8.x.i386) - ELSE(CMAKE_OSX_ARCHITECTURES MATCHES i386) - SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-8.0.0-powerpc) - ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES i386) - ENDIF(WITH_LIBS10.5) + if(WITH_LIBS10.5) + set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-9.x.universal) + else() + if(CMAKE_OSX_ARCHITECTURES MATCHES i386) + set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-8.x.i386) + else() + set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-8.0.0-powerpc) + endif() + endif() - IF(WITH_OPENAL) - FIND_PACKAGE(OpenAL) - IF(OPENAL_FOUND) - SET(WITH_OPENAL ON) - SET(OPENAL_INCLUDE_DIR "${LIBDIR}/openal/include") - ELSE(OPENAL_FOUND) - SET(WITH_OPENAL OFF) - ENDIF(OPENAL_FOUND) - ENDIF(WITH_OPENAL) + if(WITH_OPENAL) + find_package(OpenAL) + if(OPENAL_FOUND) + set(WITH_OPENAL ON) + set(OPENAL_INCLUDE_DIR "${LIBDIR}/openal/include") + else() + set(WITH_OPENAL OFF) + endif() + endif() - IF(WITH_JACK) - SET(JACK /usr) - SET(JACK_INC ${JACK}/include/jack) - SET(JACK_LIB jack) - SET(JACK_LIBPATH ${JACK}/lib) - ENDIF(WITH_JACK) + if(WITH_JACK) + set(JACK /usr) + set(JACK_INC ${JACK}/include/jack) + set(JACK_LIB jack) + set(JACK_LIBPATH ${JACK}/lib) + endif() - IF(WITH_CODEC_SNDFILE) - SET(SNDFILE ${LIBDIR}/sndfile) - SET(SNDFILE_INC ${SNDFILE}/include) - SET(SNDFILE_LIB sndfile FLAC ogg vorbis vorbisenc) - SET(SNDFILE_LIBPATH ${SNDFILE}/lib ${FFMPEG}/lib) - ENDIF(WITH_CODEC_SNDFILE) + if(WITH_CODEC_SNDFILE) + set(SNDFILE ${LIBDIR}/sndfile) + set(SNDFILE_INC ${SNDFILE}/include) + set(SNDFILE_LIB sndfile FLAC ogg vorbis vorbisenc) + set(SNDFILE_LIBPATH ${SNDFILE}/lib ${FFMPEG}/lib) + endif() - SET(PYTHON_VERSION 3.1) + set(PYTHON_VERSION 3.1) - IF(PYTHON_VERSION MATCHES 3.1) + if(PYTHON_VERSION MATCHES 3.1) # we use precompiled libraries for py 3.1 and up by default - SET(PYTHON ${LIBDIR}/python) - SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}") - # SET(PYTHON_BINARY "${PYTHON}/bin/python${PYTHON_VERSION}") # not used yet - SET(PYTHON_LIB python${PYTHON_VERSION}) - SET(PYTHON_LIBPATH "${PYTHON}/lib/python${PYTHON_VERSION}") - # SET(PYTHON_LINKFLAGS "-u _PyMac_Error") # won't build with this enabled - ELSE(PYTHON_VERSION MATCHES 3.1) + set(PYTHON ${LIBDIR}/python) + set(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}") + # set(PYTHON_BINARY "${PYTHON}/bin/python${PYTHON_VERSION}") # not used yet + set(PYTHON_LIB python${PYTHON_VERSION}) + set(PYTHON_LIBPATH "${PYTHON}/lib/python${PYTHON_VERSION}") + # set(PYTHON_LINKFLAGS "-u _PyMac_Error") # won't build with this enabled + else() # otherwise, use custom system framework - SET(PYTHON /System/Library/Frameworks/Python.framework/Versions/) - SET(PYTHON_VERSION 3.1) - SET(PYTHON_INC "${PYTHON}${PYTHON_VERSION}/include/python${PYTHON_VERSION}") - # SET(PYTHON_BINARY ${PYTHON}${PYTHON_VERSION}/bin/python${PYTHON_VERSION}) # not used yet - SET(PYTHON_LIB "") - SET(PYTHON_LIBPATH ${PYTHON}${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config) - SET(PYTHON_LINKFLAGS "-u _PyMac_Error -framework System -framework Python") - ENDIF(PYTHON_VERSION MATCHES 3.1) + set(PYTHON /System/Library/Frameworks/Python.framework/Versions/) + set(PYTHON_VERSION 3.1) + set(PYTHON_INC "${PYTHON}${PYTHON_VERSION}/include/python${PYTHON_VERSION}") + # set(PYTHON_BINARY ${PYTHON}${PYTHON_VERSION}/bin/python${PYTHON_VERSION}) # not used yet + set(PYTHON_LIB "") + set(PYTHON_LIBPATH ${PYTHON}${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config) + set(PYTHON_LINKFLAGS "-u _PyMac_Error -framework System -framework Python") + endif() - IF(WITH_INTERNATIONAL) - SET(GETTEXT ${LIBDIR}/gettext) - SET(GETTEXT_INC "${GETTEXT}/include") - SET(GETTEXT_LIB intl iconv) - SET(GETTEXT_LIBPATH ${GETTEXT}/lib) - ENDIF(WITH_INTERNATIONAL) + if(WITH_INTERNATIONAL) + set(GETTEXT ${LIBDIR}/gettext) + set(GETTEXT_INC "${GETTEXT}/include") + set(GETTEXT_LIB intl iconv) + set(GETTEXT_LIBPATH ${GETTEXT}/lib) + endif() - IF(WITH_FFTW3) - SET(FFTW3 ${LIBDIR}/fftw3) - SET(FFTW3_INC ${FFTW3}/include) - SET(FFTW3_LIB fftw3) - SET(FFTW3_LIBPATH ${FFTW3}/lib) - ENDIF(WITH_FFTW3) + if(WITH_FFTW3) + set(FFTW3 ${LIBDIR}/fftw3) + set(FFTW3_INC ${FFTW3}/include) + set(FFTW3_LIB fftw3) + set(FFTW3_LIBPATH ${FFTW3}/lib) + endif() - SET(PNG_LIBRARIES png) - SET(JPEG_LIBRARY jpeg) + set(PNG_LIBRARIES png) + set(JPEG_LIBRARY jpeg) - SET(ZLIB /usr) - SET(ZLIB_INC "${ZLIB}/include") - SET(ZLIB_LIBRARIES z bz2) + set(ZLIB /usr) + set(ZLIB_INC "${ZLIB}/include") + set(ZLIB_LIBRARIES z bz2) - SET(FREETYPE ${LIBDIR}/freetype) - SET(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2) - SET(FREETYPE_LIBPATH ${FREETYPE}/lib) - SET(FREETYPE_LIBRARY freetype) + set(FREETYPE ${LIBDIR}/freetype) + set(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2) + set(FREETYPE_LIBPATH ${FREETYPE}/lib) + set(FREETYPE_LIBRARY freetype) - IF(WITH_IMAGE_OPENEXR) - SET(OPENEXR ${LIBDIR}/openexr) - SET(OPENEXR_INC ${OPENEXR}/include/OpenEXR ${OPENEXR}/include) - SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread) - SET(OPENEXR_LIBPATH ${OPENEXR}/lib) - ENDIF(WITH_IMAGE_OPENEXR) + if(WITH_IMAGE_OPENEXR) + set(OPENEXR ${LIBDIR}/openexr) + set(OPENEXR_INC ${OPENEXR}/include/OpenEXR ${OPENEXR}/include) + set(OPENEXR_LIB Iex Half IlmImf Imath IlmThread) + set(OPENEXR_LIBPATH ${OPENEXR}/lib) + endif() - IF(WITH_LCMS) - SET(LCMS ${LIBDIR}/lcms) - SET(LCMS_INCLUDE_DIR ${LCMS}/include) - SET(LCMS_LIBRARY lcms) - SET(LCMS_LIBPATH ${LCMS}/lib) - ENDIF(WITH_LCMS) + if(WITH_LCMS) + set(LCMS ${LIBDIR}/lcms) + set(LCMS_INCLUDE_DIR ${LCMS}/include) + set(LCMS_LIBRARY lcms) + set(LCMS_LIBPATH ${LCMS}/lib) + endif() - IF(WITH_CODEC_FFMPEG) - SET(FFMPEG ${LIBDIR}/ffmpeg) - SET(FFMPEG_INC ${FFMPEG}/include) - SET(FFMPEG_LIB avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg) - SET(FFMPEG_LIBPATH ${FFMPEG}/lib) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_CONSTANT_MACROS") - ENDIF(WITH_CODEC_FFMPEG) + if(WITH_CODEC_FFMPEG) + set(FFMPEG ${LIBDIR}/ffmpeg) + set(FFMPEG_INC ${FFMPEG}/include) + set(FFMPEG_LIB avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg) + set(FFMPEG_LIBPATH ${FFMPEG}/lib) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_CONSTANT_MACROS") + endif() - IF(WITH_SAMPLERATE) - SET(LIBSAMPLERATE ${LIBDIR}/samplerate) - SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include) - SET(LIBSAMPLERATE_LIB samplerate) - SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib) - ENDIF(WITH_SAMPLERATE) + if(WITH_SAMPLERATE) + set(LIBSAMPLERATE ${LIBDIR}/samplerate) + set(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include) + set(LIBSAMPLERATE_LIB samplerate) + set(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib) + endif() - SET(LLIBS stdc++ SystemStubs) + set(LLIBS stdc++ SystemStubs) - IF (WITH_COCOA) - SET(PLATFORM_CFLAGS "-pipe -funsigned-char -DGHOST_COCOA") - SET(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox -framework CoreAudio") - IF(USE_QTKIT) - SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -DUSE_QTKIT") - SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework QTKit") - IF(CMAKE_OSX_ARCHITECTURES MATCHES i386) - SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework QuickTime") + if(WITH_COCOA) + set(PLATFORM_CFLAGS "-pipe -funsigned-char -DGHOST_COCOA") + set(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox -framework CoreAudio") + if(USE_QTKIT) + set(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -DUSE_QTKIT") + set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework QTKit") + if(CMAKE_OSX_ARCHITECTURES MATCHES i386) + set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework QuickTime") #libSDL still needs 32bit carbon quicktime - ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES i386) - ELSEIF(WITH_CODEC_QUICKTIME) - SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework QuickTime") - ENDIF(USE_QTKIT) - ELSE (WITH_COCOA) - SET(PLATFORM_CFLAGS "-pipe -funsigned-char") - SET(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime") - ENDIF (WITH_COCOA) + endif() + elseif(WITH_CODEC_QUICKTIME) + set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework QuickTime") + endif() + else() + set(PLATFORM_CFLAGS "-pipe -funsigned-char") + set(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime") + endif() - IF (WITH_OPENCOLLADA) - SET(OPENCOLLADA ${LIBDIR}/opencollada) - SET(OPENCOLLADA_INC ${OPENCOLLADA}/include) - SET(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib) - SET(OPENCOLLADA_LIB "OpenCOLLADASaxFrameworkLoader -lOpenCOLLADAFramework -lOpenCOLLADABaseUtils -lOpenCOLLADAStreamWriter -lMathMLSolver -lGeneratedSaxParser -lUTF -lxml2 -lbuffer -lftoa" ) + if(WITH_OPENCOLLADA) + set(OPENCOLLADA ${LIBDIR}/opencollada) + set(OPENCOLLADA_INC ${OPENCOLLADA}/include) + set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib) + set(OPENCOLLADA_LIB "OpenCOLLADASaxFrameworkLoader -lOpenCOLLADAFramework -lOpenCOLLADABaseUtils -lOpenCOLLADAStreamWriter -lMathMLSolver -lGeneratedSaxParser -lUTF -lxml2 -lbuffer -lftoa" ) #pcre is bundled with openCollada - #SET(PCRE ${LIBDIR}/pcre) - #SET(PCRE_LIBPATH ${PCRE}/lib) - SET(PCRE_LIB pcre) + #set(PCRE ${LIBDIR}/pcre) + #set(PCRE_LIBPATH ${PCRE}/lib) + set(PCRE_LIB pcre) #libxml2 is used - #SET(EXPAT ${LIBDIR}/expat) - #SET(EXPAT_LIBPATH ${EXPAT}/lib) - SET(EXPAT_LIB) - ENDIF (WITH_OPENCOLLADA) + #set(EXPAT ${LIBDIR}/expat) + #set(EXPAT_LIBPATH ${EXPAT}/lib) + set(EXPAT_LIB) + endif() - IF(WITH_SDL) - SET(SDL ${LIBDIR}/sdl) - SET(SDL_INCLUDE_DIR ${SDL}/include) - SET(SDL_LIBRARY SDL) - SET(SDL_LIBPATH ${SDL}/lib) - ENDIF(WITH_SDL) + if(WITH_SDL) + set(SDL ${LIBDIR}/sdl) + set(SDL_INCLUDE_DIR ${SDL}/include) + set(SDL_LIBRARY SDL) + set(SDL_LIBPATH ${SDL}/lib) + endif() - SET(PNG "${LIBDIR}/png") - SET(PNG_INC "${PNG}/include") - SET(PNG_LIBPATH ${PNG}/lib) + set(PNG "${LIBDIR}/png") + set(PNG_INC "${PNG}/include") + set(PNG_LIBPATH ${PNG}/lib) - SET(JPEG "${LIBDIR}/jpeg") - SET(JPEG_INC "${JPEG}/include") - SET(JPEG_LIBPATH ${JPEG}/lib) + set(JPEG "${LIBDIR}/jpeg") + set(JPEG_INC "${JPEG}/include") + set(JPEG_LIBPATH ${JPEG}/lib) - IF(WITH_IMAGE_TIFF) - SET(TIFF ${LIBDIR}/tiff) - SET(TIFF_INCLUDE_DIR ${TIFF}/include) - SET(TIFF_LIBRARY tiff) - SET(TIFF_LIBPATH ${TIFF}/lib) - ENDIF(WITH_IMAGE_TIFF) + if(WITH_IMAGE_TIFF) + set(TIFF ${LIBDIR}/tiff) + set(TIFF_INCLUDE_DIR ${TIFF}/include) + set(TIFF_LIBRARY tiff) + set(TIFF_LIBPATH ${TIFF}/lib) + endif() - SET(EXETYPE MACOSX_BUNDLE) + set(EXETYPE MACOSX_BUNDLE) - SET(CMAKE_C_FLAGS_DEBUG "-fno-strict-aliasing -g") - SET(CMAKE_CXX_FLAGS_DEBUG "-fno-strict-aliasing -g") - IF(CMAKE_OSX_ARCHITECTURES MATCHES "i386") - SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -mdynamic-no-pic -ftree-vectorize -msse -msse2 -fvariable-expansion-in-unroller") - SET(CMAKE_C_FLAGS_RELEASE "-O3 -mdynamic-no-pic -ftree-vectorize -msse -msse2 -fvariable-expansion-in-unroller") - ELSEIF(CMAKE_OSX_ARCHITECTURES MATCHES "x86_64") - SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -mdynamic-no-pic -ftree-vectorize -msse -msse2 -msse3 -mssse3 -fvariable-expansion-in-unroller") - SET(CMAKE_C_FLAGS_RELEASE "-O3 -mdynamic-no-pic -ftree-vectorize -msse -msse2 -msse3 -mssse3 -fvariable-expansion-in-unroller") - ELSE(CMAKE_OSX_ARCHITECTURES MATCHES "x86_64") - SET(CMAKE_C_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing") - SET(CMAKE_CXX_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing") - ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES "i386") + set(CMAKE_C_FLAGS_DEBUG "-fno-strict-aliasing -g") + set(CMAKE_CXX_FLAGS_DEBUG "-fno-strict-aliasing -g") + if(CMAKE_OSX_ARCHITECTURES MATCHES "i386") + set(CMAKE_CXX_FLAGS_RELEASE "-O3 -mdynamic-no-pic -ftree-vectorize -msse -msse2 -fvariable-expansion-in-unroller") + set(CMAKE_C_FLAGS_RELEASE "-O3 -mdynamic-no-pic -ftree-vectorize -msse -msse2 -fvariable-expansion-in-unroller") + elseif(CMAKE_OSX_ARCHITECTURES MATCHES "x86_64") + set(CMAKE_CXX_FLAGS_RELEASE "-O3 -mdynamic-no-pic -ftree-vectorize -msse -msse2 -msse3 -mssse3 -fvariable-expansion-in-unroller") + set(CMAKE_C_FLAGS_RELEASE "-O3 -mdynamic-no-pic -ftree-vectorize -msse -msse2 -msse3 -mssse3 -fvariable-expansion-in-unroller") + else() + set(CMAKE_C_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing") + set(CMAKE_CXX_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing") + endif() # Better warnings - SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -Wno-unknown-pragmas") - SET(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare") + set(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -Wno-unknown-pragmas") + set(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare") -ENDIF(UNIX AND NOT APPLE) +endif() # buildinfo -IF(WITH_BUILDINFO) +if(WITH_BUILDINFO) # BUILD_PLATFORM and BUILD_PLATFORM are taken from CMake - IF(UNIX) + if(UNIX) EXEC_PROGRAM("date \"+%Y-%m-%d\"" OUTPUT_VARIABLE BUILD_DATE) EXEC_PROGRAM("date \"+%H:%M:%S\"" OUTPUT_VARIABLE BUILD_TIME) EXEC_PROGRAM("svnversion ${CMAKE_SOURCE_DIR}" OUTPUT_VARIABLE BUILD_REV RETURN_VALUE BUILD_REV_RETURN) - IF(BUILD_REV_RETURN) - SET(BUILD_REV "unknown") - ENDIF(BUILD_REV_RETURN) - ENDIF(UNIX) + if(BUILD_REV_RETURN) + set(BUILD_REV "unknown") + endif() + endif() - IF(WIN32) + if(WIN32) EXEC_PROGRAM("cmd /c date /t" OUTPUT_VARIABLE BUILD_DATE) EXEC_PROGRAM("cmd /c time /t" OUTPUT_VARIABLE BUILD_TIME) EXEC_PROGRAM("svnversion ${CMAKE_SOURCE_DIR}" OUTPUT_VARIABLE BUILD_REV RETURN_VALUE BUILD_REV_RETURN) - IF(BUILD_REV_RETURN) - SET(BUILD_REV "unknown") - ENDIF(BUILD_REV_RETURN) - ENDIF(WIN32) -ENDIF(WITH_BUILDINFO) + if(BUILD_REV_RETURN) + set(BUILD_REV "unknown") + endif() + endif() +endif() #----------------------------------------------------------------------------- # Common. -IF(WITH_RAYOPTIMIZATION) - IF(CMAKE_COMPILER_IS_GNUCC) - IF(SUPPORT_SSE_BUILD) - SET(PLATFORM_CFLAGS " -msse ${PLATFORM_CFLAGS}") - ADD_DEFINITIONS(-D__SSE__ -D__MMX__) - ENDIF(SUPPORT_SSE_BUILD) - IF(SUPPORT_SSE2_BUILD) - SET(PLATFORM_CFLAGS " -msse2 ${PLATFORM_CFLAGS}") - ADD_DEFINITIONS(-D__SSE2__) - IF(NOT SUPPORT_SSE_BUILD) # dont double up - ADD_DEFINITIONS(-D__MMX__) - ENDIF(NOT SUPPORT_SSE_BUILD) - ENDIF(SUPPORT_SSE2_BUILD) - ENDIF(CMAKE_COMPILER_IS_GNUCC) -ENDIF(WITH_RAYOPTIMIZATION) +if(WITH_RAYOPTIMIZATION) + if(CMAKE_COMPILER_IS_GNUCC) + if(SUPPORT_SSE_BUILD) + set(PLATFORM_CFLAGS " -msse ${PLATFORM_CFLAGS}") + add_definitions(-D__SSE__ -D__MMX__) + endif() + if(SUPPORT_SSE2_BUILD) + set(PLATFORM_CFLAGS " -msse2 ${PLATFORM_CFLAGS}") + add_definitions(-D__SSE2__) + if(NOT SUPPORT_SSE_BUILD) # dont double up + add_definitions(-D__MMX__) + endif() + endif() + endif() +endif() -IF(WITH_IMAGE_OPENJPEG) +if(WITH_IMAGE_OPENJPEG) set(OPENJPEG ${CMAKE_SOURCE_DIR}/extern/libopenjpeg) set(OPENJPEG_INC ${OPENJPEG}) -ENDIF(WITH_IMAGE_OPENJPEG) +endif() -IF(WITH_IMAGE_REDCODE) +if(WITH_IMAGE_REDCODE) set(REDCODE ${CMAKE_SOURCE_DIR}/extern) set(REDCODE_INC ${REDCODE}) -ENDIF(WITH_IMAGE_REDCODE) +endif() #----------------------------------------------------------------------------- # Blender WebPlugin -IF(WITH_WEBPLUGIN) - SET(GECKO_DIR "${CMAKE_SOURCE_DIR}/../gecko-sdk/" CACHE PATH "Gecko SDK path") - SET(WEBPLUGIN_SANDBOX_MODE "apparmor" CACHE STRING "WEB Plugin sandbox mode, can be apparmor, privsep, none") +if(WITH_WEBPLUGIN) + set(GECKO_DIR "${CMAKE_SOURCE_DIR}/../gecko-sdk/" CACHE PATH "Gecko SDK path") + set(WEBPLUGIN_SANDBOX_MODE "apparmor" CACHE STRING "WEB Plugin sandbox mode, can be apparmor, privsep, none") - SET(WITH_PLAYER ON) -ENDIF(WITH_WEBPLUGIN) + set(WITH_PLAYER ON) +endif() #----------------------------------------------------------------------------- # Configure OpenGL. -FIND_PACKAGE(OpenGL) -INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) -# UNSET(OPENGL_LIBRARIES CACHE) # not compat with older cmake -# UNSET(OPENGL_xmesa_INCLUDE_DIR CACHE) # not compat with older cmake +find_package(OpenGL) +include_directories(${OPENGL_INCLUDE_DIR}) +# unset(OPENGL_LIBRARIES CACHE) # not compat with older cmake +# unset(OPENGL_xmesa_INCLUDE_DIR CACHE) # not compat with older cmake #----------------------------------------------------------------------------- # Configure OpenMP. -IF(WITH_OPENMP) - FIND_PACKAGE(OpenMP) - IF(OPENMP_FOUND) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") +if(WITH_OPENMP) + find_package(OpenMP) + if(OPENMP_FOUND) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") - IF(APPLE AND ${CMAKE_GENERATOR} MATCHES "Xcode") - SET(CMAKE_XCODE_ATTRIBUTE_ENABLE_OPENMP_SUPPORT "YES") - ENDIF(APPLE AND ${CMAKE_GENERATOR} MATCHES "Xcode") - ELSE(OPENMP_FOUND) - SET(WITH_OPENMP OFF) - ENDIF(OPENMP_FOUND) -ENDIF(WITH_OPENMP) + if(APPLE AND ${CMAKE_GENERATOR} MATCHES "Xcode") + set(CMAKE_XCODE_ATTRIBUTE_ENABLE_OPENMP_SUPPORT "YES") + endif() + else() + set(WITH_OPENMP OFF) + endif() +endif() #----------------------------------------------------------------------------- # Extra compile flags -IF((NOT WIN32) AND (NOT MSVC)) +if((NOT WIN32) AND (NOT MSVC)) # used for internal debug checks - SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") - SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG") + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") + set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG") # assert() checks for this. - SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG") - SET(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -DNDEBUG") - SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DNDEBUG") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG") + set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -DNDEBUG") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DNDEBUG") - SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNDEBUG") - SET(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -DNDEBUG") - SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -DNDEBUG") -ENDIF((NOT WIN32) AND (NOT MSVC)) + set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNDEBUG") + set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -DNDEBUG") + set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -DNDEBUG") +endif() -IF(CMAKE_COMPILER_IS_GNUCC) - SET(C_WARNINGS "${C_WARNINGS} -Wunused-parameter -Wwrite-strings -Werror=strict-prototypes -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=return-type") -ENDIF(CMAKE_COMPILER_IS_GNUCC) +if(CMAKE_COMPILER_IS_GNUCC) + set(C_WARNINGS "${C_WARNINGS} -Wunused-parameter -Wwrite-strings -Werror=strict-prototypes -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=return-type") +endif() -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS} ${C_WARNINGS}") -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PLATFORM_CFLAGS} ${CXX_WARNINGS}") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS} ${C_WARNINGS}") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PLATFORM_CFLAGS} ${CXX_WARNINGS}") # better not define flags here but this is a debugging option thats off by default. -IF(WITH_CXX_GUARDEDALLOC) - SET(CMAKE_CXX_FLAGS " -DWITH_CXX_GUARDEDALLOC -I${CMAKE_SOURCE_DIR}/intern/guardedalloc ${CMAKE_CXX_FLAGS}") -ENDIF(WITH_CXX_GUARDEDALLOC) +if(WITH_CXX_GUARDEDALLOC) + set(CMAKE_CXX_FLAGS " -DWITH_CXX_GUARDEDALLOC -I${CMAKE_SOURCE_DIR}/intern/guardedalloc ${CMAKE_CXX_FLAGS}") +endif() #----------------------------------------------------------------------------- # Libraries -ADD_SUBDIRECTORY(source) -ADD_SUBDIRECTORY(intern) -ADD_SUBDIRECTORY(extern) +add_subdirectory(source) +add_subdirectory(intern) +add_subdirectory(extern) #----------------------------------------------------------------------------- # Blender Application -ADD_SUBDIRECTORY(source/creator) +add_subdirectory(source/creator) #----------------------------------------------------------------------------- # Blender Player -IF(WITH_PLAYER) - ADD_SUBDIRECTORY(source/blenderplayer) -ENDIF(WITH_PLAYER) +if(WITH_PLAYER) + add_subdirectory(source/blenderplayer) +endif() diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index cb201c53a22..7f7ddc9d258 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -1,311 +1,311 @@ # only MSVC uses SOURCE_GROUP -MACRO(BLENDERLIB_NOLIST +macro(blenderlib_nolist name sources includes) - MESSAGE(STATUS "Configuring library ${name}") + message(STATUS "Configuring library ${name}") - INCLUDE_DIRECTORIES(${includes}) - ADD_LIBRARY(${name} ${sources}) + include_directories(${includes}) + add_library(${name} ${sources}) # Group by location on disk - SOURCE_GROUP("Source Files" FILES CMakeLists.txt) - FOREACH(SRC ${sources}) - GET_FILENAME_COMPONENT(SRC_EXT ${SRC} EXT) - IF(${SRC_EXT} MATCHES ".h" OR ${SRC_EXT} MATCHES ".hpp") - SOURCE_GROUP("Header Files" FILES ${SRC}) - ELSE() - SOURCE_GROUP("Source Files" FILES ${SRC}) - ENDIF() - ENDFOREACH(SRC) -ENDMACRO(BLENDERLIB_NOLIST) + source_group("Source Files" FILES CMakeLists.txt) + foreach(SRC ${sources}) + get_filename_component(SRC_EXT ${SRC} EXT) + if(${SRC_EXT} MATCHES ".h" OR ${SRC_EXT} MATCHES ".hpp") + source_group("Header Files" FILES ${SRC}) + else() + source_group("Source Files" FILES ${SRC}) + endif() + endforeach() +endmacro() # # works fine but having the includes listed is helpful for IDE's (QtCreator/MSVC) -# MACRO(BLENDERLIB_NOLIST +# macro(blenderlib_nolist # name # sources # includes) # -# MESSAGE(STATUS "Configuring library ${name}") -# INCLUDE_DIRECTORIES(${includes}) -# ADD_LIBRARY(${name} ${sources}) -# ENDMACRO(BLENDERLIB_NOLIST) +# message(STATUS "Configuring library ${name}") +# include_directories(${includes}) +# add_library(${name} ${sources}) +# endmacro() -MACRO(BLENDERLIB +macro(blenderlib name sources includes) - BLENDERLIB_NOLIST(${name} "${sources}" "${includes}") + blenderlib_nolist(${name} "${sources}" "${includes}") - SET_PROPERTY(GLOBAL APPEND PROPERTY BLENDER_LINK_LIBS ${name}) + set_property(GLOBAL APPEND PROPERTY BLENDER_LINK_LIBS ${name}) -ENDMACRO(BLENDERLIB) +endmacro() -MACRO(SETUP_LIBDIRS) +macro(SETUP_LIBDIRS) # see "cmake --help-policy CMP0003" if(COMMAND cmake_policy) - CMAKE_POLICY(SET CMP0003 NEW) - endif(COMMAND cmake_policy) + cmake_policy(SET CMP0003 NEW) + endif() - LINK_DIRECTORIES(${JPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH} ${FREETYPE_LIBPATH}) + link_directories(${JPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH} ${FREETYPE_LIBPATH}) - IF(WITH_PYTHON) - LINK_DIRECTORIES(${PYTHON_LIBPATH}) - ENDIF(WITH_PYTHON) - IF(WITH_INTERNATIONAL) - LINK_DIRECTORIES(${ICONV_LIBPATH}) - LINK_DIRECTORIES(${GETTEXT_LIBPATH}) - ENDIF(WITH_INTERNATIONAL) - IF(WITH_SDL) - LINK_DIRECTORIES(${SDL_LIBPATH}) - ENDIF(WITH_SDL) - IF(WITH_CODEC_FFMPEG) - LINK_DIRECTORIES(${FFMPEG_LIBPATH}) - ENDIF(WITH_CODEC_FFMPEG) - IF(WITH_IMAGE_OPENEXR) - LINK_DIRECTORIES(${OPENEXR_LIBPATH}) - ENDIF(WITH_IMAGE_OPENEXR) - IF(WITH_IMAGE_TIFF) - LINK_DIRECTORIES(${TIFF_LIBPATH}) - ENDIF(WITH_IMAGE_TIFF) - IF(WITH_LCMS) - LINK_DIRECTORIES(${LCMS_LIBPATH}) - ENDIF(WITH_LCMS) - IF(WITH_CODEC_QUICKTIME) - LINK_DIRECTORIES(${QUICKTIME_LIBPATH}) - ENDIF(WITH_CODEC_QUICKTIME) - IF(WITH_OPENAL) - LINK_DIRECTORIES(${OPENAL_LIBPATH}) - ENDIF(WITH_OPENAL) - IF(WITH_JACK) - LINK_DIRECTORIES(${JACK_LIBPATH}) - ENDIF(WITH_JACK) - IF(WITH_CODEC_SNDFILE) - LINK_DIRECTORIES(${SNDFILE_LIBPATH}) - ENDIF(WITH_CODEC_SNDFILE) - IF(WITH_SAMPLERATE) - LINK_DIRECTORIES(${LIBSAMPLERATE_LIBPATH}) - ENDIF(WITH_SAMPLERATE) - IF(WITH_FFTW3) - LINK_DIRECTORIES(${FFTW3_LIBPATH}) - ENDIF(WITH_FFTW3) - IF(WITH_OPENCOLLADA) - LINK_DIRECTORIES(${OPENCOLLADA_LIBPATH}) - LINK_DIRECTORIES(${PCRE_LIBPATH}) - LINK_DIRECTORIES(${EXPAT_LIBPATH}) - ENDIF(WITH_OPENCOLLADA) + if(WITH_PYTHON) + link_directories(${PYTHON_LIBPATH}) + endif() + if(WITH_INTERNATIONAL) + link_directories(${ICONV_LIBPATH}) + link_directories(${GETTEXT_LIBPATH}) + endif() + if(WITH_SDL) + link_directories(${SDL_LIBPATH}) + endif() + if(WITH_CODEC_FFMPEG) + link_directories(${FFMPEG_LIBPATH}) + endif() + if(WITH_IMAGE_OPENEXR) + link_directories(${OPENEXR_LIBPATH}) + endif() + if(WITH_IMAGE_TIFF) + link_directories(${TIFF_LIBPATH}) + endif() + if(WITH_LCMS) + link_directories(${LCMS_LIBPATH}) + endif() + if(WITH_CODEC_QUICKTIME) + link_directories(${QUICKTIME_LIBPATH}) + endif() + if(WITH_OPENAL) + link_directories(${OPENAL_LIBPATH}) + endif() + if(WITH_JACK) + link_directories(${JACK_LIBPATH}) + endif() + if(WITH_CODEC_SNDFILE) + link_directories(${SNDFILE_LIBPATH}) + endif() + if(WITH_SAMPLERATE) + link_directories(${LIBSAMPLERATE_LIBPATH}) + endif() + if(WITH_FFTW3) + link_directories(${FFTW3_LIBPATH}) + endif() + if(WITH_OPENCOLLADA) + link_directories(${OPENCOLLADA_LIBPATH}) + link_directories(${PCRE_LIBPATH}) + link_directories(${EXPAT_LIBPATH}) + endif() - IF(WIN32 AND NOT UNIX) - LINK_DIRECTORIES(${PTHREADS_LIBPATH}) - ENDIF(WIN32 AND NOT UNIX) -ENDMACRO(SETUP_LIBDIRS) + if(WIN32 AND NOT UNIX) + link_directories(${PTHREADS_LIBPATH}) + endif() +endmacro() -MACRO(SETUP_LIBLINKS +macro(setup_liblinks target) - SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS} ") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS} ") - TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${JPEG_LIBRARY} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${LLIBS}) + target_link_libraries(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${JPEG_LIBRARY} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${LLIBS}) # since we are using the local libs for python when compiling msvc projects, we need to add _d when compiling debug versions - IF(WITH_PYTHON) - TARGET_LINK_LIBRARIES(${target} ${PYTHON_LINKFLAGS}) + if(WITH_PYTHON) + target_link_libraries(${target} ${PYTHON_LINKFLAGS}) - IF(WIN32 AND NOT UNIX) - TARGET_LINK_LIBRARIES(${target} debug ${PYTHON_LIB}_d) - TARGET_LINK_LIBRARIES(${target} optimized ${PYTHON_LIB}) - ELSE(WIN32 AND NOT UNIX) - TARGET_LINK_LIBRARIES(${target} ${PYTHON_LIB}) - ENDIF(WIN32 AND NOT UNIX) - ENDIF(WITH_PYTHON) + if(WIN32 AND NOT UNIX) + target_link_libraries(${target} debug ${PYTHON_LIB}_d) + target_link_libraries(${target} optimized ${PYTHON_LIB}) + else() + target_link_libraries(${target} ${PYTHON_LIB}) + endif() + endif() - TARGET_LINK_LIBRARIES(${target} ${OPENGL_glu_LIBRARY} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB}) - TARGET_LINK_LIBRARIES(${target} ${FREETYPE_LIBRARY}) + target_link_libraries(${target} ${OPENGL_glu_LIBRARY} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB}) + target_link_libraries(${target} ${FREETYPE_LIBRARY}) - IF(WITH_INTERNATIONAL) - TARGET_LINK_LIBRARIES(${target} ${GETTEXT_LIB}) + if(WITH_INTERNATIONAL) + target_link_libraries(${target} ${GETTEXT_LIB}) - IF(WIN32 AND NOT UNIX) - TARGET_LINK_LIBRARIES(${target} ${ICONV_LIB}) - ENDIF(WIN32 AND NOT UNIX) - ENDIF(WITH_INTERNATIONAL) + if(WIN32 AND NOT UNIX) + target_link_libraries(${target} ${ICONV_LIB}) + endif() + endif() - IF(WITH_OPENAL) - TARGET_LINK_LIBRARIES(${target} ${OPENAL_LIBRARY}) - ENDIF(WITH_OPENAL) - IF(WITH_FFTW3) - TARGET_LINK_LIBRARIES(${target} ${FFTW3_LIB}) - ENDIF(WITH_FFTW3) - IF(WITH_JACK) - TARGET_LINK_LIBRARIES(${target} ${JACK_LIB}) - ENDIF(WITH_JACK) - IF(WITH_CODEC_SNDFILE) - TARGET_LINK_LIBRARIES(${target} ${SNDFILE_LIB}) - ENDIF(WITH_CODEC_SNDFILE) - IF(WITH_SAMPLERATE) - TARGET_LINK_LIBRARIES(${target} ${LIBSAMPLERATE_LIB}) - ENDIF(WITH_SAMPLERATE) - IF(WITH_SDL) - TARGET_LINK_LIBRARIES(${target} ${SDL_LIBRARY}) - ENDIF(WITH_SDL) - IF(WITH_CODEC_QUICKTIME) - TARGET_LINK_LIBRARIES(${target} ${QUICKTIME_LIB}) - ENDIF(WITH_CODEC_QUICKTIME) - IF(WITH_IMAGE_TIFF) - TARGET_LINK_LIBRARIES(${target} ${TIFF_LIBRARY}) - ENDIF(WITH_IMAGE_TIFF) - IF(WITH_IMAGE_OPENEXR) - IF(WIN32 AND NOT UNIX) - FOREACH(loop_var ${OPENEXR_LIB}) - TARGET_LINK_LIBRARIES(${target} debug ${loop_var}_d) - TARGET_LINK_LIBRARIES(${target} optimized ${loop_var}) - ENDFOREACH(loop_var) - ELSE(WIN32 AND NOT UNIX) - TARGET_LINK_LIBRARIES(${target} ${OPENEXR_LIB}) - ENDIF(WIN32 AND NOT UNIX) - ENDIF(WITH_IMAGE_OPENEXR) - IF(WITH_LCMS) - TARGET_LINK_LIBRARIES(${target} ${LCMS_LIBRARY}) - ENDIF(WITH_LCMS) - IF(WITH_CODEC_FFMPEG) - TARGET_LINK_LIBRARIES(${target} ${FFMPEG_LIB}) - ENDIF(WITH_CODEC_FFMPEG) - IF(WITH_OPENCOLLADA) - IF(WIN32 AND NOT UNIX) - FOREACH(loop_var ${OPENCOLLADA_LIB}) - TARGET_LINK_LIBRARIES(${target} debug ${loop_var}_d) - TARGET_LINK_LIBRARIES(${target} optimized ${loop_var}) - ENDFOREACH(loop_var) - TARGET_LINK_LIBRARIES(${target} debug ${PCRE_LIB}_d) - TARGET_LINK_LIBRARIES(${target} optimized ${PCRE_LIB}) - IF(EXPAT_LIB) - TARGET_LINK_LIBRARIES(${target} debug ${EXPAT_LIB}_d) - TARGET_LINK_LIBRARIES(${target} optimized ${EXPAT_LIB}) - ENDIF(EXPAT_LIB) - ELSE(WIN32 AND NOT UNIX) - TARGET_LINK_LIBRARIES(${target} ${OPENCOLLADA_LIB}) - TARGET_LINK_LIBRARIES(${target} ${PCRE_LIB}) - TARGET_LINK_LIBRARIES(${target} ${EXPAT_LIB}) - ENDIF(WIN32 AND NOT UNIX) - ENDIF(WITH_OPENCOLLADA) - IF(WITH_LCMS) - IF(WIN32 AND NOT UNIX) - TARGET_LINK_LIBRARIES(${target} debug ${LCMS_LIB}_d) - TARGET_LINK_LIBRARIES(${target} optimized ${LCMS_LIB}) - ENDIF(WIN32 AND NOT UNIX) - ENDIF(WITH_LCMS) - IF(WIN32 AND NOT UNIX) - TARGET_LINK_LIBRARIES(${target} ${PTHREADS_LIB}) - ENDIF(WIN32 AND NOT UNIX) -ENDMACRO(SETUP_LIBLINKS) + if(WITH_OPENAL) + target_link_libraries(${target} ${OPENAL_LIBRARY}) + endif() + if(WITH_FFTW3) + target_link_libraries(${target} ${FFTW3_LIB}) + endif() + if(WITH_JACK) + target_link_libraries(${target} ${JACK_LIB}) + endif() + if(WITH_CODEC_SNDFILE) + target_link_libraries(${target} ${SNDFILE_LIB}) + endif() + if(WITH_SAMPLERATE) + target_link_libraries(${target} ${LIBSAMPLERATE_LIB}) + endif() + if(WITH_SDL) + target_link_libraries(${target} ${SDL_LIBRARY}) + endif() + if(WITH_CODEC_QUICKTIME) + target_link_libraries(${target} ${QUICKTIME_LIB}) + endif() + if(WITH_IMAGE_TIFF) + target_link_libraries(${target} ${TIFF_LIBRARY}) + endif() + if(WITH_IMAGE_OPENEXR) + if(WIN32 AND NOT UNIX) + foreach(loop_var ${OPENEXR_LIB}) + target_link_libraries(${target} debug ${loop_var}_d) + target_link_libraries(${target} optimized ${loop_var}) + endforeach() + else() + target_link_libraries(${target} ${OPENEXR_LIB}) + endif() + endif() + if(WITH_LCMS) + target_link_libraries(${target} ${LCMS_LIBRARY}) + endif() + if(WITH_CODEC_FFMPEG) + target_link_libraries(${target} ${FFMPEG_LIB}) + endif() + if(WITH_OPENCOLLADA) + if(WIN32 AND NOT UNIX) + foreach(loop_var ${OPENCOLLADA_LIB}) + target_link_libraries(${target} debug ${loop_var}_d) + target_link_libraries(${target} optimized ${loop_var}) + endforeach() + target_link_libraries(${target} debug ${PCRE_LIB}_d) + target_link_libraries(${target} optimized ${PCRE_LIB}) + if(EXPAT_LIB) + target_link_libraries(${target} debug ${EXPAT_LIB}_d) + target_link_libraries(${target} optimized ${EXPAT_LIB}) + endif() + else() + target_link_libraries(${target} ${OPENCOLLADA_LIB}) + target_link_libraries(${target} ${PCRE_LIB}) + target_link_libraries(${target} ${EXPAT_LIB}) + endif() + endif() + if(WITH_LCMS) + if(WIN32 AND NOT UNIX) + target_link_libraries(${target} debug ${LCMS_LIB}_d) + target_link_libraries(${target} optimized ${LCMS_LIB}) + endif() + endif() + if(WIN32 AND NOT UNIX) + target_link_libraries(${target} ${PTHREADS_LIB}) + endif() +endmacro() -MACRO(TEST_SSE_SUPPORT) - INCLUDE(CheckCSourceRuns) +macro(TEST_SSE_SUPPORT) + include(CheckCSourceRuns) - MESSAGE(STATUS "Detecting SSE support") - IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) - SET(CMAKE_REQUIRED_FLAGS "-msse -msse2") - ELSEIF(MSVC) - SET(CMAKE_REQUIRED_FLAGS "/arch:SSE2") # TODO, SSE 1 ? - ENDIF() + message(STATUS "Detecting SSE support") + if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) + set(CMAKE_REQUIRED_FLAGS "-msse -msse2") + elseif(MSVC) + set(CMAKE_REQUIRED_FLAGS "/arch:SSE2") # TODO, SSE 1 ? + endif() - CHECK_C_SOURCE_RUNS(" + check_c_source_runs(" #include int main() { __m128 v = _mm_setzero_ps(); return 0; }" SUPPORT_SSE_BUILD) - CHECK_C_SOURCE_RUNS(" + check_c_source_runs(" #include int main() { __m128d v = _mm_setzero_pd(); return 0; }" SUPPORT_SSE2_BUILD) - MESSAGE(STATUS "Detecting SSE support") + message(STATUS "Detecting SSE support") - IF(SUPPORT_SSE_BUILD) - MESSAGE(STATUS " ...SSE support found.") - ELSE(SUPPORT_SSE_BUILD) - MESSAGE(STATUS " ...SSE support missing.") - ENDIF(SUPPORT_SSE_BUILD) + if(SUPPORT_SSE_BUILD) + message(STATUS " ...SSE support found.") + else() + message(STATUS " ...SSE support missing.") + endif() - IF(SUPPORT_SSE2_BUILD) - MESSAGE(STATUS " ...SSE2 support found.") - ELSE(SUPPORT_SSE2_BUILD) - MESSAGE(STATUS " ...SSE2 support missing.") - ENDIF(SUPPORT_SSE2_BUILD) + if(SUPPORT_SSE2_BUILD) + message(STATUS " ...SSE2 support found.") + else() + message(STATUS " ...SSE2 support missing.") + endif() -ENDMACRO(TEST_SSE_SUPPORT) +endmacro() # when we have warnings as errors applied globally this # needs to be removed for some external libs which we dont maintain. # utility macro -MACRO(_REMOVE_STRICT_FLAGS +macro(_remove_strict_flags flag) - STRING(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") - STRING(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}") - STRING(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") - STRING(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL}") - STRING(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}") + string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") + string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}") + string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") + string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL}") + string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}") - STRING(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - STRING(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") - STRING(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}") - STRING(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL}") - STRING(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") + string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") + string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}") + string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL}") + string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") -ENDMACRO(_REMOVE_STRICT_FLAGS) +endmacro() -MACRO(REMOVE_STRICT_FLAGS) +macro(remove_strict_flags) - IF(CMAKE_COMPILER_IS_GNUCC) - _REMOVE_STRICT_FLAGS("-Wstrict-prototypes") - _REMOVE_STRICT_FLAGS("-Wunused-parameter") - _REMOVE_STRICT_FLAGS("-Wwrite-strings") - _REMOVE_STRICT_FLAGS("-Wshadow") - _REMOVE_STRICT_FLAGS("-Werror=[^ ]+") - _REMOVE_STRICT_FLAGS("-Werror") - ENDIF(CMAKE_COMPILER_IS_GNUCC) + if(CMAKE_COMPILER_IS_GNUCC) + _remove_strict_flags("-Wstrict-prototypes") + _remove_strict_flags("-Wunused-parameter") + _remove_strict_flags("-Wwrite-strings") + _remove_strict_flags("-Wshadow") + _remove_strict_flags("-Werror=[^ ]+") + _remove_strict_flags("-Werror") + endif() - IF(MSVC) + if(MSVC) # TODO - ENDIF(MSVC) + endif() -ENDMACRO(REMOVE_STRICT_FLAGS) +endmacro() -MACRO(GET_BLENDER_VERSION) - FILE(READ ${CMAKE_SOURCE_DIR}/source/blender/blenkernel/BKE_blender.h CONTENT) - STRING(REGEX REPLACE "\n" ";" CONTENT "${CONTENT}") - STRING(REGEX REPLACE "\t" ";" CONTENT "${CONTENT}") - STRING(REGEX REPLACE " " ";" CONTENT "${CONTENT}") +macro(get_blender_version) + file(READ ${CMAKE_SOURCE_DIR}/source/blender/blenkernel/BKE_blender.h CONTENT) + string(REGEX REPLACE "\n" ";" CONTENT "${CONTENT}") + string(REGEX REPLACE "\t" ";" CONTENT "${CONTENT}") + string(REGEX REPLACE " " ";" CONTENT "${CONTENT}") - FOREACH(ITEM ${CONTENT}) - IF(LASTITEM MATCHES "BLENDER_VERSION") + foreach(ITEM ${CONTENT}) + if(LASTITEM MATCHES "BLENDER_VERSION") MATH(EXPR BLENDER_VERSION_MAJOR "${ITEM} / 100") MATH(EXPR BLENDER_VERSION_MINOR "${ITEM} % 100") - SET(BLENDER_VERSION "${BLENDER_VERSION_MAJOR}.${BLENDER_VERSION_MINOR}") - ENDIF(LASTITEM MATCHES "BLENDER_VERSION") + set(BLENDER_VERSION "${BLENDER_VERSION_MAJOR}.${BLENDER_VERSION_MINOR}") + endif() - IF(LASTITEM MATCHES "BLENDER_SUBVERSION") - SET(BLENDER_SUBVERSION ${ITEM}) - ENDIF(LASTITEM MATCHES "BLENDER_SUBVERSION") + if(LASTITEM MATCHES "BLENDER_SUBVERSION") + set(BLENDER_SUBVERSION ${ITEM}) + endif() - IF(LASTITEM MATCHES "BLENDER_MINVERSION") + if(LASTITEM MATCHES "BLENDER_MINVERSION") MATH(EXPR BLENDER_MINVERSION_MAJOR "${ITEM} / 100") MATH(EXPR BLENDER_MINVERSION_MINOR "${ITEM} % 100") - SET(BLENDER_MINVERSION "${BLENDER_MINVERSION_MAJOR}.${BLENDER_MINVERSION_MINOR}") - ENDIF(LASTITEM MATCHES "BLENDER_MINVERSION") + set(BLENDER_MINVERSION "${BLENDER_MINVERSION_MAJOR}.${BLENDER_MINVERSION_MINOR}") + endif() - IF(LASTITEM MATCHES "BLENDER_MINSUBVERSION") - SET(BLENDER_MINSUBVERSION ${ITEM}) - ENDIF(LASTITEM MATCHES "BLENDER_MINSUBVERSION") + if(LASTITEM MATCHES "BLENDER_MINSUBVERSION") + set(BLENDER_MINSUBVERSION ${ITEM}) + endif() - SET(LASTITEM ${ITEM}) - ENDFOREACH(ITEM ${CONTENT}) + set(LASTITEM ${ITEM}) + endforeach() - MESSAGE(STATUS "Version major: ${BLENDER_VERSION_MAJOR}, Version minor: ${BLENDER_VERSION_MINOR}, Subversion: ${BLENDER_SUBVERSION}, Version: ${BLENDER_VERSION}") - MESSAGE(STATUS "Minversion major: ${BLENDER_MINVERSION_MAJOR}, Minversion minor: ${BLENDER_MINVERSION_MINOR}, MinSubversion: ${BLENDER_MINSUBVERSION}, Minversion: ${BLENDER_MINVERSION}") -ENDMACRO(GET_BLENDER_VERSION) + message(STATUS "Version major: ${BLENDER_VERSION_MAJOR}, Version minor: ${BLENDER_VERSION_MINOR}, Subversion: ${BLENDER_SUBVERSION}, Version: ${BLENDER_VERSION}") + message(STATUS "Minversion major: ${BLENDER_MINVERSION_MAJOR}, Minversion minor: ${BLENDER_MINVERSION_MINOR}, MinSubversion: ${BLENDER_MINSUBVERSION}, Minversion: ${BLENDER_MINVERSION}") +endmacro() diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index 72a290d4e10..cdbfa3e0dff 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -25,30 +25,30 @@ # ***** END GPL LICENSE BLOCK ***** # Otherwise we get warnings here that we cant fix in external projects -REMOVE_STRICT_FLAGS() +remove_strict_flags() -IF(WITH_BULLET) - ADD_SUBDIRECTORY(bullet2) -ENDIF(WITH_BULLET) +if(WITH_BULLET) + add_subdirectory(bullet2) +endif() -IF(CMAKE_SYSTEM_NAME MATCHES "Linux") - ADD_SUBDIRECTORY(binreloc) -ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux") +if(CMAKE_SYSTEM_NAME MATCHES "Linux") + add_subdirectory(binreloc) +endif() -ADD_SUBDIRECTORY(glew) +add_subdirectory(glew) -IF(WITH_IMAGE_OPENJPEG) - ADD_SUBDIRECTORY(libopenjpeg) -ENDIF(WITH_IMAGE_OPENJPEG) +if(WITH_IMAGE_OPENJPEG) + add_subdirectory(libopenjpeg) +endif() -IF(WITH_IMAGE_REDCODE) - ADD_SUBDIRECTORY(libredcode) -ENDIF(WITH_IMAGE_REDCODE) +if(WITH_IMAGE_REDCODE) + add_subdirectory(libredcode) +endif() -IF(WITH_LZO) - ADD_SUBDIRECTORY(lzo) -ENDIF(WITH_LZO) +if(WITH_LZO) + add_subdirectory(lzo) +endif() -IF(WITH_LZMA) - ADD_SUBDIRECTORY(lzma) -ENDIF(WITH_LZMA) +if(WITH_LZMA) + add_subdirectory(lzma) +endif() diff --git a/extern/binreloc/CMakeLists.txt b/extern/binreloc/CMakeLists.txt index a8d5ecd8a77..d0bba4c3cf9 100644 --- a/extern/binreloc/CMakeLists.txt +++ b/extern/binreloc/CMakeLists.txt @@ -18,17 +18,17 @@ # All rights reserved. # -SET(SRC +set(SRC binreloc.c include/binreloc.h ) -SET(INC +set(INC ./include ) -ADD_DEFINITIONS(-DENABLE_BINRELOC) +add_definitions(-DENABLE_BINRELOC) -BLENDERLIB(extern_binreloc "${SRC}" "${INC}") +blenderlib(extern_binreloc "${SRC}" "${INC}") diff --git a/extern/bullet2/CMakeLists.txt b/extern/bullet2/CMakeLists.txt index ace5e988123..278a7d46e54 100644 --- a/extern/bullet2/CMakeLists.txt +++ b/extern/bullet2/CMakeLists.txt @@ -24,12 +24,12 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . src ) -SET(SRC +set(SRC src/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp @@ -319,4 +319,4 @@ SET(SRC src/btBulletDynamicsCommon.h ) -BLENDERLIB(extern_bullet "${SRC}" "${INC}") +blenderlib(extern_bullet "${SRC}" "${INC}") diff --git a/extern/bullet2/src/BulletCollision/CMakeLists.txt b/extern/bullet2/src/BulletCollision/CMakeLists.txt index ddc806a3e6a..c3c0224c8a3 100644 --- a/extern/bullet2/src/BulletCollision/CMakeLists.txt +++ b/extern/bullet2/src/BulletCollision/CMakeLists.txt @@ -1,6 +1,6 @@ -INCLUDE_DIRECTORIES( ${BULLET_PHYSICS_SOURCE_DIR}/src } ) +include_directories( ${BULLET_PHYSICS_SOURCE_DIR}/src } ) -SET(BulletCollision_SRCS +set(BulletCollision_SRCS BroadphaseCollision/btAxisSweep3.cpp BroadphaseCollision/btBroadphaseProxy.cpp BroadphaseCollision/btCollisionAlgorithm.cpp @@ -88,10 +88,10 @@ SET(BulletCollision_SRCS NarrowPhaseCollision/btVoronoiSimplexSolver.cpp ) -SET(Root_HDRS +set(Root_HDRS ../btBulletCollisionCommon.h ) -SET(BroadphaseCollision_HDRS +set(BroadphaseCollision_HDRS BroadphaseCollision/btAxisSweep3.h BroadphaseCollision/btBroadphaseInterface.h BroadphaseCollision/btBroadphaseProxy.h @@ -105,7 +105,7 @@ SET(BroadphaseCollision_HDRS BroadphaseCollision/btQuantizedBvh.h BroadphaseCollision/btSimpleBroadphase.h ) -SET(CollisionDispatch_HDRS +set(CollisionDispatch_HDRS CollisionDispatch/btActivatingCollisionAlgorithm.h CollisionDispatch/btCollisionConfiguration.h CollisionDispatch/btCollisionCreateFunc.h @@ -129,7 +129,7 @@ SET(CollisionDispatch_HDRS CollisionDispatch/btUnionFind.h CollisionDispatch/SphereTriangleDetector.h ) -SET(CollisionShapes_HDRS +set(CollisionShapes_HDRS CollisionShapes/btBoxShape.h CollisionShapes/btBvhTriangleMeshShape.h CollisionShapes/btCapsuleShape.h @@ -166,7 +166,7 @@ SET(CollisionShapes_HDRS CollisionShapes/btTriangleMeshShape.h CollisionShapes/btUniformScalingShape.h ) -SET(Gimpact_HDRS +set(Gimpact_HDRS Gimpact/btGImpactShape.h Gimpact/gim_contact.h Gimpact/btGImpactBvh.h @@ -178,7 +178,7 @@ SET(Gimpact_HDRS Gimpact/btGImpactQuantizedBvh.h Gimpact/gim_box_set.h ) -SET(NarrowPhaseCollision_HDRS +set(NarrowPhaseCollision_HDRS NarrowPhaseCollision/btContinuousConvexCollision.h NarrowPhaseCollision/btConvexCast.h NarrowPhaseCollision/btConvexPenetrationDepthSolver.h @@ -197,7 +197,7 @@ SET(NarrowPhaseCollision_HDRS NarrowPhaseCollision/btVoronoiSimplexSolver.h ) -SET(BulletCollision_HDRS +set(BulletCollision_HDRS ${Root_HDRS} ${BroadphaseCollision_HDRS} ${CollisionDispatch_HDRS} @@ -207,28 +207,28 @@ SET(BulletCollision_HDRS ) -ADD_LIBRARY(BulletCollision ${BulletCollision_SRCS} ${BulletCollision_HDRS}) +add_library(BulletCollision ${BulletCollision_SRCS} ${BulletCollision_HDRS}) SET_TARGET_PROPERTIES(BulletCollision PROPERTIES VERSION ${BULLET_VERSION}) SET_TARGET_PROPERTIES(BulletCollision PROPERTIES SOVERSION ${BULLET_VERSION}) -IF (BUILD_SHARED_LIBS) - TARGET_LINK_LIBRARIES(BulletCollision LinearMath) -ENDIF (BUILD_SHARED_LIBS) +if(BUILD_SHARED_LIBS) + target_link_libraries(BulletCollision LinearMath) +endif() #INSTALL of other files requires CMake 2.6 -IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) - INSTALL(TARGETS BulletCollision DESTINATION lib) - INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h") -ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) +if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + install(TARGETS BulletCollision DESTINATION lib) + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h") +endif() -IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +if(APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) SET_TARGET_PROPERTIES(BulletCollision PROPERTIES FRAMEWORK true) SET_TARGET_PROPERTIES(BulletCollision PROPERTIES PUBLIC_HEADER "${Root_HDRS}") # Have to list out sub-directories manually: - SET_PROPERTY(SOURCE ${BroadphaseCollision_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/BroadphaseCollision) - SET_PROPERTY(SOURCE ${CollisionDispatch_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/CollisionDispatch) - SET_PROPERTY(SOURCE ${CollisionShapes_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/CollisionShapes) - SET_PROPERTY(SOURCE ${Gimpact_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/Gimpact) - SET_PROPERTY(SOURCE ${NarrowPhaseCollision_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/NarrowPhaseCollision) + set_property(SOURCE ${BroadphaseCollision_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/BroadphaseCollision) + set_property(SOURCE ${CollisionDispatch_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/CollisionDispatch) + set_property(SOURCE ${CollisionShapes_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/CollisionShapes) + set_property(SOURCE ${Gimpact_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/Gimpact) + set_property(SOURCE ${NarrowPhaseCollision_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/NarrowPhaseCollision) -ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +endif() diff --git a/extern/bullet2/src/BulletDynamics/CMakeLists.txt b/extern/bullet2/src/BulletDynamics/CMakeLists.txt index ecfcbfef929..f605e6272f3 100644 --- a/extern/bullet2/src/BulletDynamics/CMakeLists.txt +++ b/extern/bullet2/src/BulletDynamics/CMakeLists.txt @@ -1,6 +1,6 @@ -INCLUDE_DIRECTORIES( ${BULLET_PHYSICS_SOURCE_DIR}/src } ) +include_directories( ${BULLET_PHYSICS_SOURCE_DIR}/src } ) -SET(BulletDynamics_SRCS +set(BulletDynamics_SRCS ConstraintSolver/btContactConstraint.cpp ConstraintSolver/btConeTwistConstraint.cpp ConstraintSolver/btGeneric6DofConstraint.cpp @@ -19,11 +19,11 @@ SET(BulletDynamics_SRCS Character/btKinematicCharacterController.cpp ) -SET(Root_HDRS +set(Root_HDRS ../btBulletDynamicsCommon.h ../btBulletCollisionCommon.h ) -SET(ConstraintSolver_HDRS +set(ConstraintSolver_HDRS ConstraintSolver/btConstraintSolver.h ConstraintSolver/btContactConstraint.h ConstraintSolver/btContactSolverInfo.h @@ -39,27 +39,27 @@ SET(ConstraintSolver_HDRS ConstraintSolver/btSolverConstraint.h ConstraintSolver/btTypedConstraint.h ) -SET(Dynamics_HDRS +set(Dynamics_HDRS Dynamics/btContinuousDynamicsWorld.h Dynamics/btDiscreteDynamicsWorld.h Dynamics/btDynamicsWorld.h Dynamics/btSimpleDynamicsWorld.h Dynamics/btRigidBody.h ) -SET(Vehicle_HDRS +set(Vehicle_HDRS Vehicle/btRaycastVehicle.h Vehicle/btVehicleRaycaster.h Vehicle/btWheelInfo.h ) -SET(Character_HDRS +set(Character_HDRS Character/btCharacterControllerInterface.h Character/btKinematicCharacterController.h ) -SET(BulletDynamics_HDRS +set(BulletDynamics_HDRS ${Root_HDRS} ${ConstraintSolver_HDRS} ${Dynamics_HDRS} @@ -68,26 +68,26 @@ SET(BulletDynamics_HDRS ) -ADD_LIBRARY(BulletDynamics ${BulletDynamics_SRCS} ${BulletDynamics_HDRS}) +add_library(BulletDynamics ${BulletDynamics_SRCS} ${BulletDynamics_HDRS}) SET_TARGET_PROPERTIES(BulletDynamics PROPERTIES VERSION ${BULLET_VERSION}) SET_TARGET_PROPERTIES(BulletDynamics PROPERTIES SOVERSION ${BULLET_VERSION}) -IF (BUILD_SHARED_LIBS) - TARGET_LINK_LIBRARIES(BulletDynamics BulletCollision LinearMath) -ENDIF (BUILD_SHARED_LIBS) +if(BUILD_SHARED_LIBS) + target_link_libraries(BulletDynamics BulletCollision LinearMath) +endif() -IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) - INSTALL(TARGETS BulletDynamics DESTINATION lib) - INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h") -ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) +if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + install(TARGETS BulletDynamics DESTINATION lib) + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h") +endif() -IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +if(APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) SET_TARGET_PROPERTIES(BulletDynamics PROPERTIES FRAMEWORK true) SET_TARGET_PROPERTIES(BulletDynamics PROPERTIES PUBLIC_HEADER "${Root_HDRS}") # Have to list out sub-directories manually: - SET_PROPERTY(SOURCE ${ConstraintSolver_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/ConstraintSolver) - SET_PROPERTY(SOURCE ${Dynamics_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/Dynamics) - SET_PROPERTY(SOURCE ${Vehicle_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/Vehicle) - SET_PROPERTY(SOURCE ${Character_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/Character) + set_property(SOURCE ${ConstraintSolver_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/ConstraintSolver) + set_property(SOURCE ${Dynamics_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/Dynamics) + set_property(SOURCE ${Vehicle_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/Vehicle) + set_property(SOURCE ${Character_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/Character) -ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +endif() diff --git a/extern/bullet2/src/BulletSoftBody/CMakeLists.txt b/extern/bullet2/src/BulletSoftBody/CMakeLists.txt index fe31d2bee71..16fc86f4c56 100644 --- a/extern/bullet2/src/BulletSoftBody/CMakeLists.txt +++ b/extern/bullet2/src/BulletSoftBody/CMakeLists.txt @@ -1,9 +1,9 @@ -INCLUDE_DIRECTORIES( +include_directories( ${BULLET_PHYSICS_SOURCE_DIR}/src } ) -SET(BulletSoftBody_SRCS +set(BulletSoftBody_SRCS btSoftBody.cpp btSoftBodyHelpers.cpp btSoftBodyRigidBodyCollisionConfiguration.cpp @@ -13,7 +13,7 @@ SET(BulletSoftBody_SRCS btSoftRigidDynamicsWorld.cpp ) -SET(BulletSoftBody_HDRS +set(BulletSoftBody_HDRS btSoftBody.h btSparseSDF.h btSoftBodyHelpers.h @@ -25,19 +25,19 @@ SET(BulletSoftBody_HDRS -ADD_LIBRARY(BulletSoftBody ${BulletSoftBody_SRCS} ${BulletSoftBody_HDRS}) +add_library(BulletSoftBody ${BulletSoftBody_SRCS} ${BulletSoftBody_HDRS}) SET_TARGET_PROPERTIES(BulletSoftBody PROPERTIES VERSION ${BULLET_VERSION}) SET_TARGET_PROPERTIES(BulletSoftBody PROPERTIES SOVERSION ${BULLET_VERSION}) -IF (BUILD_SHARED_LIBS) - TARGET_LINK_LIBRARIES(BulletSoftBody BulletDynamics) -ENDIF (BUILD_SHARED_LIBS) +if(BUILD_SHARED_LIBS) + target_link_libraries(BulletSoftBody BulletDynamics) +endif() -IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) - INSTALL(TARGETS BulletSoftBody DESTINATION lib) - INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h") -ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) +if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + install(TARGETS BulletSoftBody DESTINATION lib) + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h") +endif() -IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +if(APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) SET_TARGET_PROPERTIES(BulletSoftBody PROPERTIES FRAMEWORK true) SET_TARGET_PROPERTIES(BulletSoftBody PROPERTIES PUBLIC_HEADER "${BulletSoftBody_HDRS}") -ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +endif() diff --git a/extern/bullet2/src/CMakeLists.txt b/extern/bullet2/src/CMakeLists.txt index 9b8a5a7e00e..6c9b6b0127b 100644 --- a/extern/bullet2/src/CMakeLists.txt +++ b/extern/bullet2/src/CMakeLists.txt @@ -1,4 +1,4 @@ -ADD_SUBDIRECTORY(BulletCollision) -ADD_SUBDIRECTORY(BulletDynamics) -ADD_SUBDIRECTORY(LinearMath) -ADD_SUBDIRECTORY(BulletSoftBody ) +add_subdirectory(BulletCollision) +add_subdirectory(BulletDynamics) +add_subdirectory(LinearMath) +add_subdirectory(BulletSoftBody ) diff --git a/extern/bullet2/src/LinearMath/CMakeLists.txt b/extern/bullet2/src/LinearMath/CMakeLists.txt index 99d5a6a2fef..acd3dbc406d 100644 --- a/extern/bullet2/src/LinearMath/CMakeLists.txt +++ b/extern/bullet2/src/LinearMath/CMakeLists.txt @@ -1,16 +1,16 @@ -INCLUDE_DIRECTORIES( +include_directories( ${BULLET_PHYSICS_SOURCE_DIR}/src } ) -SET(LinearMath_SRCS +set(LinearMath_SRCS btConvexHull.cpp btQuickprof.cpp btGeometryUtil.cpp btAlignedAllocator.cpp ) -SET(LinearMath_HDRS +set(LinearMath_HDRS btAlignedObjectArray.h btList.h btPoolAllocator.h @@ -35,17 +35,17 @@ SET(LinearMath_HDRS btTransformUtil.h ) -ADD_LIBRARY(LinearMath ${LinearMath_SRCS} ${LinearMath_HDRS}) +add_library(LinearMath ${LinearMath_SRCS} ${LinearMath_HDRS}) SET_TARGET_PROPERTIES(LinearMath PROPERTIES VERSION ${BULLET_VERSION}) SET_TARGET_PROPERTIES(LinearMath PROPERTIES SOVERSION ${BULLET_VERSION}) #FILES_MATCHING requires CMake 2.6 -IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) - INSTALL(TARGETS LinearMath DESTINATION lib) - INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h") -ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) +if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + install(TARGETS LinearMath DESTINATION lib) + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h") +endif() -IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +if(APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) SET_TARGET_PROPERTIES(LinearMath PROPERTIES FRAMEWORK true) SET_TARGET_PROPERTIES(LinearMath PROPERTIES PUBLIC_HEADER "${LinearMath_HDRS}") -ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +endif() diff --git a/extern/glew/CMakeLists.txt b/extern/glew/CMakeLists.txt index 7bd766d465d..82778fd13fb 100644 --- a/extern/glew/CMakeLists.txt +++ b/extern/glew/CMakeLists.txt @@ -24,15 +24,15 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ./include ) -IF(UNIX) - LIST(APPEND INC ${X11_X11_INCLUDE_PATH}) -ENDIF(UNIX) +if(UNIX) + list(APPEND INC ${X11_X11_INCLUDE_PATH}) +endif() -SET(SRC +set(SRC src/glew.c include/GL/glew.h @@ -40,6 +40,6 @@ SET(SRC include/GL/wglew.h ) -ADD_DEFINITIONS(-DGLEW_STATIC) +add_definitions(-DGLEW_STATIC) -BLENDERLIB(extern_glew "${SRC}" "${INC}") +blenderlib(extern_glew "${SRC}" "${INC}") diff --git a/extern/libopenjpeg/CMakeLists.txt b/extern/libopenjpeg/CMakeLists.txt index d6e98e9a390..f52c48264b6 100644 --- a/extern/libopenjpeg/CMakeLists.txt +++ b/extern/libopenjpeg/CMakeLists.txt @@ -24,11 +24,11 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ) -SET(SRC +set(SRC bio.c cio.c dwt.c @@ -73,4 +73,4 @@ SET(SRC tgt.h ) -BLENDERLIB(extern_openjpeg "${SRC}" "${INC}") +blenderlib(extern_openjpeg "${SRC}" "${INC}") diff --git a/extern/libredcode/CMakeLists.txt b/extern/libredcode/CMakeLists.txt index b094a359b03..269de031f90 100644 --- a/extern/libredcode/CMakeLists.txt +++ b/extern/libredcode/CMakeLists.txt @@ -24,12 +24,12 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ../libopenjpeg ) -SET(SRC +set(SRC codec.c debayer.c format.c @@ -39,4 +39,4 @@ SET(SRC format.h ) -BLENDERLIB(extern_redcode "${SRC}" "${INC}") +blenderlib(extern_redcode "${SRC}" "${INC}") diff --git a/extern/lzma/CMakeLists.txt b/extern/lzma/CMakeLists.txt index e04d3e1bd3b..8a4cf166b2d 100644 --- a/extern/lzma/CMakeLists.txt +++ b/extern/lzma/CMakeLists.txt @@ -24,11 +24,11 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ) -SET(SRC +set(SRC Alloc.c LzFind.c LzmaDec.c @@ -44,4 +44,4 @@ SET(SRC Types.h ) -BLENDERLIB(extern_lzma "${SRC}" "${INC}") +blenderlib(extern_lzma "${SRC}" "${INC}") diff --git a/extern/lzo/CMakeLists.txt b/extern/lzo/CMakeLists.txt index 7724711a3e5..3c68d64d181 100644 --- a/extern/lzo/CMakeLists.txt +++ b/extern/lzo/CMakeLists.txt @@ -24,11 +24,11 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC include ) -SET(SRC +set(SRC minilzo/minilzo.c minilzo/lzoconf.h @@ -36,4 +36,4 @@ SET(SRC minilzo/minilzo.h ) -BLENDERLIB(extern_minilzo "${SRC}" "${INC}") +blenderlib(extern_minilzo "${SRC}" "${INC}") diff --git a/intern/CMakeLists.txt b/intern/CMakeLists.txt index a497d8f2078..3eed1ef54d2 100644 --- a/intern/CMakeLists.txt +++ b/intern/CMakeLists.txt @@ -24,30 +24,30 @@ # # ***** END GPL LICENSE BLOCK ***** -ADD_SUBDIRECTORY(audaspace) -ADD_SUBDIRECTORY(string) -ADD_SUBDIRECTORY(ghost) -ADD_SUBDIRECTORY(guardedalloc) -ADD_SUBDIRECTORY(moto) -ADD_SUBDIRECTORY(memutil) -ADD_SUBDIRECTORY(iksolver) -ADD_SUBDIRECTORY(opennl) -ADD_SUBDIRECTORY(smoke) +add_subdirectory(audaspace) +add_subdirectory(string) +add_subdirectory(ghost) +add_subdirectory(guardedalloc) +add_subdirectory(moto) +add_subdirectory(memutil) +add_subdirectory(iksolver) +add_subdirectory(opennl) +add_subdirectory(smoke) -IF(WITH_MOD_FLUID) - ADD_SUBDIRECTORY(elbeem) -ENDIF(WITH_MOD_FLUID) +if(WITH_MOD_FLUID) + add_subdirectory(elbeem) +endif() -IF(WITH_MOD_DECIMATE) - ADD_SUBDIRECTORY(container) - ADD_SUBDIRECTORY(decimation) -ENDIF(WITH_MOD_DECIMATE) +if(WITH_MOD_DECIMATE) + add_subdirectory(container) + add_subdirectory(decimation) +endif() -IF(WITH_MOD_BOOLEAN) - ADD_SUBDIRECTORY(boolop) - ADD_SUBDIRECTORY(bsp) -ENDIF(WITH_MOD_BOOLEAN) +if(WITH_MOD_BOOLEAN) + add_subdirectory(boolop) + add_subdirectory(bsp) +endif() -IF(WITH_IK_ITASC) - ADD_SUBDIRECTORY(itasc) -ENDIF(WITH_IK_ITASC) +if(WITH_IK_ITASC) + add_subdirectory(itasc) +endif() diff --git a/intern/audaspace/CMakeLists.txt b/intern/audaspace/CMakeLists.txt index 440233eacbc..1805e7ed494 100644 --- a/intern/audaspace/CMakeLists.txt +++ b/intern/audaspace/CMakeLists.txt @@ -20,7 +20,7 @@ # # ***** END LGPL LICENSE BLOCK ***** -SET(INC +set(INC . intern FX SRC @@ -28,7 +28,7 @@ SET(INC ${LIBSAMPLERATE_INC} ) -SET(SRC +set(SRC FX/AUD_AccumulatorFactory.cpp FX/AUD_BaseIIRFilterReader.cpp FX/AUD_ButterworthFactory.cpp @@ -153,94 +153,94 @@ SET(SRC FX/AUD_VolumeFactory.h ) -IF(WITH_CODEC_FFMPEG) - ADD_DEFINITIONS(-DWITH_FFMPEG) - LIST(APPEND INC ffmpeg ${FFMPEG_INC}) - SET(FFMPEGSRC +if(WITH_CODEC_FFMPEG) + add_definitions(-DWITH_FFMPEG) + list(APPEND INC ffmpeg ${FFMPEG_INC}) + set(FFMPEGSRC ffmpeg/AUD_FFMPEGFactory.cpp ffmpeg/AUD_FFMPEGReader.cpp ffmpeg/AUD_FFMPEGFactory.h ffmpeg/AUD_FFMPEGReader.h ) -ENDIF(WITH_CODEC_FFMPEG) +endif() -IF(WITH_SDL) - ADD_DEFINITIONS(-DWITH_SDL) - LIST(APPEND INC SDL ${SDL_INCLUDE_DIR}) - SET(SDLSRC +if(WITH_SDL) + add_definitions(-DWITH_SDL) + list(APPEND INC SDL ${SDL_INCLUDE_DIR}) + set(SDLSRC SDL/AUD_SDLDevice.cpp SDL/AUD_SDLDevice.h ) -ENDIF(WITH_SDL) +endif() -IF(WITH_OPENAL) - ADD_DEFINITIONS(-DWITH_OPENAL) - LIST(APPEND INC OpenAL ${OPENAL_INCLUDE_DIR}) - SET(OPENALSRC +if(WITH_OPENAL) + add_definitions(-DWITH_OPENAL) + list(APPEND INC OpenAL ${OPENAL_INCLUDE_DIR}) + set(OPENALSRC OpenAL/AUD_OpenALDevice.cpp OpenAL/AUD_OpenALDevice.h ) -ENDIF(WITH_OPENAL) +endif() -IF(WITH_JACK) - ADD_DEFINITIONS(-DWITH_JACK) - LIST(APPEND INC jack ${JACK_INC}) - SET(JACKSRC +if(WITH_JACK) + add_definitions(-DWITH_JACK) + list(APPEND INC jack ${JACK_INC}) + set(JACKSRC jack/AUD_JackDevice.cpp jack/AUD_JackDevice.h ) -ENDIF(WITH_JACK) +endif() -IF(WITH_CODEC_SNDFILE) - ADD_DEFINITIONS(-DWITH_SNDFILE) - LIST(APPEND INC sndfile ${SNDFILE_INC}) - SET(SNDFILESRC +if(WITH_CODEC_SNDFILE) + add_definitions(-DWITH_SNDFILE) + list(APPEND INC sndfile ${SNDFILE_INC}) + set(SNDFILESRC sndfile/AUD_SndFileFactory.cpp sndfile/AUD_SndFileReader.cpp sndfile/AUD_SndFileFactory.h sndfile/AUD_SndFileReader.h ) -ENDIF(WITH_CODEC_SNDFILE) +endif() -IF(WITH_SAMPLERATE) - ADD_DEFINITIONS(-DWITH_SAMPLERATE) - SET(SRCFILESRC +if(WITH_SAMPLERATE) + add_definitions(-DWITH_SAMPLERATE) + set(SRCFILESRC SRC/AUD_SRCResampleFactory.cpp SRC/AUD_SRCResampleReader.cpp SRC/AUD_SRCResampleFactory.h SRC/AUD_SRCResampleReader.h ) -ENDIF(WITH_SAMPLERATE) +endif() -IF(WITH_FFTW3 AND FALSE) - ADD_DEFINITIONS(-DWITH_FFTW3) - LIST(APPEND INC fftw ${FFTW3_INC}) - SET(FFTW3SRC +if(WITH_FFTW3 AND FALSE) + add_definitions(-DWITH_FFTW3) + list(APPEND INC fftw ${FFTW3_INC}) + set(FFTW3SRC fftw/AUD_BandPassFactory.cpp fftw/AUD_BandPassReader.cpp fftw/AUD_BandPassFactory.h fftw/AUD_BandPassReader.h ) -ENDIF(WITH_FFTW3 AND FALSE) +endif() -IF(WITH_PYTHON) - LIST(APPEND INC Python ${PYTHON_INC}) - SET(PYTHONSRC +if(WITH_PYTHON) + list(APPEND INC Python ${PYTHON_INC}) + set(PYTHONSRC Python/AUD_PyAPI.cpp Python/AUD_PyAPI.h ) - ADD_DEFINITIONS(-DWITH_PYTHON) -ENDIF(WITH_PYTHON) + add_definitions(-DWITH_PYTHON) +endif() -SET(SRC +set(SRC ${SRC} ${FFMPEGSRC} ${SNDFILESRC} @@ -252,4 +252,4 @@ SET(SRC ${PYTHONSRC} ) -BLENDERLIB(bf_intern_audaspace "${SRC}" "${INC}") +blenderlib(bf_intern_audaspace "${SRC}" "${INC}") diff --git a/intern/boolop/CMakeLists.txt b/intern/boolop/CMakeLists.txt index ae570505235..dcc152531c4 100644 --- a/intern/boolop/CMakeLists.txt +++ b/intern/boolop/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ./intern ./extern @@ -36,7 +36,7 @@ SET(INC ../../source/blender/makesdna ) -SET(SRC +set(SRC intern/BOP_BBox.cpp intern/BOP_BSPNode.cpp intern/BOP_BSPTree.cpp @@ -75,4 +75,4 @@ SET(SRC intern/BOP_Vertex.h ) -BLENDERLIB(bf_intern_bop "${SRC}" "${INC}") +blenderlib(bf_intern_bop "${SRC}" "${INC}") diff --git a/intern/bsp/CMakeLists.txt b/intern/bsp/CMakeLists.txt index 6799ba563e9..82abcf86a34 100644 --- a/intern/bsp/CMakeLists.txt +++ b/intern/bsp/CMakeLists.txt @@ -24,14 +24,14 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ./intern ../container ../moto/include ../memutil ) -SET(SRC +set(SRC intern/BSP_CSGMesh.cpp intern/BSP_MeshPrimitives.cpp intern/CSG_BooleanOps.cpp @@ -43,4 +43,4 @@ SET(SRC intern/BSP_MeshPrimitives.h ) -BLENDERLIB(bf_intern_bsp "${SRC}" "${INC}") +blenderlib(bf_intern_bsp "${SRC}" "${INC}") diff --git a/intern/container/CMakeLists.txt b/intern/container/CMakeLists.txt index 207271fcb7c..e603e2701eb 100644 --- a/intern/container/CMakeLists.txt +++ b/intern/container/CMakeLists.txt @@ -24,11 +24,11 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ) -SET(SRC +set(SRC intern/CTR_List.cpp CTR_List.h @@ -38,4 +38,4 @@ SET(SRC CTR_UHeap.h ) -BLENDERLIB(bf_intern_ctr "${SRC}" "${INC}") +blenderlib(bf_intern_ctr "${SRC}" "${INC}") diff --git a/intern/decimation/CMakeLists.txt b/intern/decimation/CMakeLists.txt index 934624e1f04..14998415031 100644 --- a/intern/decimation/CMakeLists.txt +++ b/intern/decimation/CMakeLists.txt @@ -24,14 +24,14 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ../container ../memutil ../moto/include ) -SET(SRC +set(SRC intern/LOD_EdgeCollapser.cpp intern/LOD_ExternNormalEditor.cpp intern/LOD_FaceNormalEditor.cpp @@ -56,4 +56,4 @@ SET(SRC intern/LOD_QuadricEditor.h ) -BLENDERLIB(bf_intern_decimate "${SRC}" "${INC}") +blenderlib(bf_intern_decimate "${SRC}" "${INC}") diff --git a/intern/elbeem/CMakeLists.txt b/intern/elbeem/CMakeLists.txt index dcbc15f2cde..8d6f3fa0a9f 100644 --- a/intern/elbeem/CMakeLists.txt +++ b/intern/elbeem/CMakeLists.txt @@ -24,13 +24,13 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC extern ${PNG_INC} ${ZLIB_INC} ) -SET(SRC +set(SRC intern/attributes.cpp intern/controlparticles.cpp intern/elbeem.cpp @@ -86,13 +86,13 @@ SET(SRC intern/utilities.h ) -ADD_DEFINITIONS(-DNOGUI -DELBEEM_BLENDER=1) -IF(WINDOWS) - ADD_DEFINITIONS(-DUSE_MSVC6FIXES) -ENDIF(WINDOWS) +add_definitions(-DNOGUI -DELBEEM_BLENDER=1) +if(WINDOWS) + add_definitions(-DUSE_MSVC6FIXES) +endif() -IF(WITH_OPENMP) - ADD_DEFINITIONS(-DPARALLEL=1) -ENDIF(WITH_OPENMP) +if(WITH_OPENMP) + add_definitions(-DPARALLEL=1) +endif() -BLENDERLIB_NOLIST(bf_intern_elbeem "${SRC}" "${INC}") +blenderlib_nolist(bf_intern_elbeem "${SRC}" "${INC}") diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index fa0a3eea393..509741092c5 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ../string ../../extern/glew/include @@ -32,7 +32,7 @@ SET(INC ../../source/blender/makesdna ) -SET(SRC +set(SRC intern/GHOST_Buttons.cpp intern/GHOST_CallbackEventConsumer.cpp intern/GHOST_C-api.cpp @@ -82,9 +82,9 @@ SET(SRC intern/GHOST_WindowManager.h ) -IF(APPLE) - IF(WITH_COCOA) - LIST(APPEND SRC +if(APPLE) + if(WITH_COCOA) + list(APPEND SRC intern/GHOST_DisplayManagerCocoa.mm intern/GHOST_SystemCocoa.mm intern/GHOST_WindowCocoa.mm @@ -93,8 +93,8 @@ IF(APPLE) intern/GHOST_SystemCocoa.h intern/GHOST_WindowCocoa.h ) - ELSE(WITH_COCOA) - LIST(APPEND SRC + else() + list(APPEND SRC intern/GHOST_DisplayManagerCarbon.cpp intern/GHOST_SystemCarbon.cpp intern/GHOST_WindowCarbon.cpp @@ -103,16 +103,16 @@ IF(APPLE) intern/GHOST_SystemCarbon.h intern/GHOST_WindowCarbon.h ) - ENDIF(WITH_COCOA) + endif() - IF(WITH_CODEC_QUICKTIME) - ADD_DEFINITIONS(-DWITH_QUICKTIME) - ENDIF(WITH_CODEC_QUICKTIME) + if(WITH_CODEC_QUICKTIME) + add_definitions(-DWITH_QUICKTIME) + endif() -ELSEIF(UNIX) - LIST(APPEND INC ${X11_X11_INCLUDE_PATH}) +elseif(UNIX) + list(APPEND INC ${X11_X11_INCLUDE_PATH}) - LIST(APPEND SRC + list(APPEND SRC intern/GHOST_DisplayManagerX11.cpp intern/GHOST_SystemX11.cpp intern/GHOST_WindowX11.cpp @@ -122,16 +122,16 @@ ELSEIF(UNIX) intern/GHOST_WindowX11.h ) - ADD_DEFINITIONS(-DPREFIX="${CMAKE_INSTALL_PREFIX}") + add_definitions(-DPREFIX="${CMAKE_INSTALL_PREFIX}") -ELSEIF(WIN32) - IF(MSVC) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX") - ENDIF(MSVC) +elseif(WIN32) + if(MSVC) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX") + endif() - LIST(APPEND INC ${WINTAB_INC}) + list(APPEND INC ${WINTAB_INC}) - LIST(APPEND SRC + list(APPEND SRC intern/GHOST_DisplayManagerWin32.cpp intern/GHOST_SystemWin32.cpp intern/GHOST_WindowWin32.cpp @@ -142,7 +142,7 @@ ELSEIF(WIN32) intern/GHOST_SystemWin32.h intern/GHOST_WindowWin32.h ) -ENDIF(APPLE) +endif() -BLENDERLIB(bf_intern_ghost "${SRC}" "${INC}") +blenderlib(bf_intern_ghost "${SRC}" "${INC}") diff --git a/intern/guardedalloc/CMakeLists.txt b/intern/guardedalloc/CMakeLists.txt index a095f050659..4ae0b17575b 100644 --- a/intern/guardedalloc/CMakeLists.txt +++ b/intern/guardedalloc/CMakeLists.txt @@ -24,29 +24,29 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC .) +set(INC .) -SET(SRC +set(SRC ./intern/mallocn.c BLO_sys_types.h MEM_guardedalloc.h ) -IF(WIN32 AND NOT UNIX) - LIST(APPEND SRC +if(WIN32 AND NOT UNIX) + list(APPEND SRC intern/mmap_win.c mmap_win.h ) -ENDIF(WIN32 AND NOT UNIX) +endif() -BLENDERLIB(bf_intern_guardedalloc "${SRC}" "${INC}") +blenderlib(bf_intern_guardedalloc "${SRC}" "${INC}") # Override C++ alloc, optional. -IF(WITH_CXX_GUARDEDALLOC) - SET(SRC +if(WITH_CXX_GUARDEDALLOC) + set(SRC cpp/mallocn.cpp ) - BLENDERLIB(bf_intern_guardedalloc_cpp "${SRC}" "${INC}") -ENDIF(WITH_CXX_GUARDEDALLOC) + blenderlib(bf_intern_guardedalloc_cpp "${SRC}" "${INC}") +endif() diff --git a/intern/iksolver/CMakeLists.txt b/intern/iksolver/CMakeLists.txt index 94adf8c19df..e2cd389e849 100644 --- a/intern/iksolver/CMakeLists.txt +++ b/intern/iksolver/CMakeLists.txt @@ -24,13 +24,13 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC intern ../memutil ../moto/include ) -SET(SRC +set(SRC intern/IK_QJacobian.cpp intern/IK_QJacobianSolver.cpp intern/IK_QSegment.cpp @@ -70,4 +70,4 @@ SET(SRC intern/TNT/version.h ) -BLENDERLIB(bf_intern_ik "${SRC}" "${INC}") +blenderlib(bf_intern_ik "${SRC}" "${INC}") diff --git a/intern/itasc/CMakeLists.txt b/intern/itasc/CMakeLists.txt index b3e49cca274..3a42cd4a64f 100644 --- a/intern/itasc/CMakeLists.txt +++ b/intern/itasc/CMakeLists.txt @@ -24,11 +24,11 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../../extern/Eigen2 ) -SET(SRC +set(SRC Armature.cpp Cache.cpp ConstraintSet.cpp @@ -222,4 +222,4 @@ SET(SRC ../../extern/Eigen2/Eigen/src/Sparse/UmfPackSupport.h ) -BLENDERLIB(bf_intern_itasc "${SRC}" "${INC}") +blenderlib(bf_intern_itasc "${SRC}" "${INC}") diff --git a/intern/memutil/CMakeLists.txt b/intern/memutil/CMakeLists.txt index 79a38a75304..03b9192f71a 100644 --- a/intern/memutil/CMakeLists.txt +++ b/intern/memutil/CMakeLists.txt @@ -24,12 +24,12 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . .. ) -SET(SRC +set(SRC intern/MEM_CacheLimiterC-Api.cpp intern/MEM_RefCountedC-Api.cpp @@ -43,4 +43,4 @@ SET(SRC MEM_SmartPtr.h ) -BLENDERLIB(bf_intern_memutil "${SRC}" "${INC}") +blenderlib(bf_intern_memutil "${SRC}" "${INC}") diff --git a/intern/moto/CMakeLists.txt b/intern/moto/CMakeLists.txt index 57baa5dfbb3..54d59e4e32d 100644 --- a/intern/moto/CMakeLists.txt +++ b/intern/moto/CMakeLists.txt @@ -24,11 +24,11 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC include ) -SET(SRC +set(SRC intern/MT_Assert.cpp intern/MT_CmMatrix4x4.cpp intern/MT_Matrix3x3.cpp @@ -67,4 +67,4 @@ SET(SRC include/NM_Scalar.h ) -BLENDERLIB(bf_intern_moto "${SRC}" "${INC}") +blenderlib(bf_intern_moto "${SRC}" "${INC}") diff --git a/intern/opennl/CMakeLists.txt b/intern/opennl/CMakeLists.txt index 46a22650f4b..b7253a241fe 100644 --- a/intern/opennl/CMakeLists.txt +++ b/intern/opennl/CMakeLists.txt @@ -25,14 +25,14 @@ # ***** END GPL LICENSE BLOCK ***** # External project, better not fix warnings. -REMOVE_STRICT_FLAGS() +remove_strict_flags() -SET(INC +set(INC extern superlu ) -SET(SRC +set(SRC intern/opennl.c superlu/colamd.c superlu/get_perm_c.c @@ -75,4 +75,4 @@ SET(SRC superlu/util.h ) -BLENDERLIB(bf_intern_opennl "${SRC}" "${INC}") +blenderlib(bf_intern_opennl "${SRC}" "${INC}") diff --git a/intern/smoke/CMakeLists.txt b/intern/smoke/CMakeLists.txt index 1944ee51054..3505cd2c05d 100644 --- a/intern/smoke/CMakeLists.txt +++ b/intern/smoke/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC intern ../memutil ../../extern/bullet2/src @@ -32,7 +32,7 @@ SET(INC ${ZLIB_INC} ) -SET(SRC +set(SRC intern/EIGENVALUE_HELPER.cpp intern/FLUID_3D.cpp intern/FLUID_3D_SOLVERS.cpp @@ -80,14 +80,14 @@ SET(SRC intern/tnt/tnt_version.h ) -IF(WITH_OPENMP) - ADD_DEFINITIONS(-DPARALLEL=1) -ENDIF(WITH_OPENMP) +if(WITH_OPENMP) + add_definitions(-DPARALLEL=1) +endif() -IF(WITH_FFTW3) - ADD_DEFINITIONS(-DFFTW3=1) - LIST(APPEND INC ${FFTW3_INC}) -ENDIF(WITH_FFTW3) +if(WITH_FFTW3) + add_definitions(-DFFTW3=1) + list(APPEND INC ${FFTW3_INC}) +endif() -BLENDERLIB(bf_intern_smoke "${SRC}" "${INC}") +blenderlib(bf_intern_smoke "${SRC}" "${INC}") diff --git a/intern/string/CMakeLists.txt b/intern/string/CMakeLists.txt index b7bb8d9c106..5aef036e55a 100644 --- a/intern/string/CMakeLists.txt +++ b/intern/string/CMakeLists.txt @@ -24,15 +24,15 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ) -SET(SRC +set(SRC intern/STR_String.cpp STR_HashedString.h STR_String.h ) -BLENDERLIB(bf_intern_string "${SRC}" "${INC}") +blenderlib(bf_intern_string "${SRC}" "${INC}") diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index a043dbad3b8..c13abb862b7 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -24,13 +24,13 @@ # # ***** END GPL LICENSE BLOCK ***** -ADD_SUBDIRECTORY(blender) +add_subdirectory(blender) -IF(WITH_GAMEENGINE) - ADD_SUBDIRECTORY(kernel) - ADD_SUBDIRECTORY(gameengine) -ENDIF(WITH_GAMEENGINE) +if(WITH_GAMEENGINE) + add_subdirectory(kernel) + add_subdirectory(gameengine) +endif() -IF(WINDOWS) - ADD_SUBDIRECTORY(icons) -ENDIF(WINDOWS) +if(WINDOWS) + add_subdirectory(icons) +endif() diff --git a/source/blender/CMakeLists.txt b/source/blender/CMakeLists.txt index 470f395353c..c1696b14232 100644 --- a/source/blender/CMakeLists.txt +++ b/source/blender/CMakeLists.txt @@ -24,45 +24,45 @@ # # ***** END GPL LICENSE BLOCK ***** -ADD_SUBDIRECTORY(editors) -ADD_SUBDIRECTORY(windowmanager) -ADD_SUBDIRECTORY(blenkernel) -ADD_SUBDIRECTORY(blenlib) -ADD_SUBDIRECTORY(render) -ADD_SUBDIRECTORY(blenfont) -ADD_SUBDIRECTORY(blenloader) -ADD_SUBDIRECTORY(readblenfile) -ADD_SUBDIRECTORY(blenpluginapi) -ADD_SUBDIRECTORY(ikplugin) -ADD_SUBDIRECTORY(gpu) -ADD_SUBDIRECTORY(imbuf) -ADD_SUBDIRECTORY(avi) -ADD_SUBDIRECTORY(nodes) -ADD_SUBDIRECTORY(modifiers) -ADD_SUBDIRECTORY(makesdna) -ADD_SUBDIRECTORY(makesrna) +add_subdirectory(editors) +add_subdirectory(windowmanager) +add_subdirectory(blenkernel) +add_subdirectory(blenlib) +add_subdirectory(render) +add_subdirectory(blenfont) +add_subdirectory(blenloader) +add_subdirectory(readblenfile) +add_subdirectory(blenpluginapi) +add_subdirectory(ikplugin) +add_subdirectory(gpu) +add_subdirectory(imbuf) +add_subdirectory(avi) +add_subdirectory(nodes) +add_subdirectory(modifiers) +add_subdirectory(makesdna) +add_subdirectory(makesrna) -IF(WITH_IMAGE_OPENEXR) - ADD_SUBDIRECTORY(imbuf/intern/openexr) -ENDIF(WITH_IMAGE_OPENEXR) +if(WITH_IMAGE_OPENEXR) + add_subdirectory(imbuf/intern/openexr) +endif() -IF(WITH_IMAGE_DDS) - ADD_SUBDIRECTORY(imbuf/intern/dds) -ENDIF(WITH_IMAGE_DDS) +if(WITH_IMAGE_DDS) + add_subdirectory(imbuf/intern/dds) +endif() -IF(WITH_IMAGE_CINEON) - ADD_SUBDIRECTORY(imbuf/intern/cineon) -ENDIF(WITH_IMAGE_CINEON) +if(WITH_IMAGE_CINEON) + add_subdirectory(imbuf/intern/cineon) +endif() -IF(WITH_CODEC_QUICKTIME) - ADD_SUBDIRECTORY(quicktime) -ENDIF(WITH_CODEC_QUICKTIME) +if(WITH_CODEC_QUICKTIME) + add_subdirectory(quicktime) +endif() -IF(WITH_PYTHON) - ADD_SUBDIRECTORY(python) -ENDIF(WITH_PYTHON) +if(WITH_PYTHON) + add_subdirectory(python) +endif() -IF(WITH_OPENCOLLADA) - ADD_SUBDIRECTORY(collada) -ENDIF(WITH_OPENCOLLADA) +if(WITH_OPENCOLLADA) + add_subdirectory(collada) +endif() diff --git a/source/blender/avi/CMakeLists.txt b/source/blender/avi/CMakeLists.txt index 917b2a8e3b0..376c1147a71 100644 --- a/source/blender/avi/CMakeLists.txt +++ b/source/blender/avi/CMakeLists.txt @@ -24,13 +24,13 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ../../../intern/guardedalloc ${JPEG_INC} ) -SET(SRC +set(SRC intern/avi.c intern/avirgb.c intern/codecs.c @@ -47,4 +47,4 @@ SET(SRC intern/rgb32.h ) -BLENDERLIB(bf_avi "${SRC}" "${INC}") +blenderlib(bf_avi "${SRC}" "${INC}") diff --git a/source/blender/blenfont/CMakeLists.txt b/source/blender/blenfont/CMakeLists.txt index 202a8de687f..1dc546bd6d5 100644 --- a/source/blender/blenfont/CMakeLists.txt +++ b/source/blender/blenfont/CMakeLists.txt @@ -22,7 +22,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ../blenlib ../makesdna @@ -33,7 +33,7 @@ SET(INC ${FREETYPE_INCLUDE_DIRS} ) -SET(SRC +set(SRC intern/blf.c intern/blf_dir.c intern/blf_font.c @@ -47,14 +47,14 @@ SET(SRC intern/blf_internal_types.h ) -IF(WITH_INTERNATIONAL) - LIST(APPEND INC ${GETTEXT_INC}) - ADD_DEFINITIONS(-DINTERNATIONAL) -ENDIF(WITH_INTERNATIONAL) +if(WITH_INTERNATIONAL) + list(APPEND INC ${GETTEXT_INC}) + add_definitions(-DINTERNATIONAL) +endif() -IF(WIN32 AND NOT UNIX) - ADD_DEFINITIONS(-DUSE_GETTEXT_DLL) -ENDIF(WIN32 AND NOT UNIX) +if(WIN32 AND NOT UNIX) + add_definitions(-DUSE_GETTEXT_DLL) +endif() -BLENDERLIB(bf_blenfont "${SRC}" "${INC}") +blenderlib(bf_blenfont "${SRC}" "${INC}") diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index 583f0327e07..feeda03773b 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ../avi ../blenlib @@ -52,7 +52,7 @@ SET(INC ${ZLIB_INC} ) -SET(SRC +set(SRC intern/BME_Customdata.c intern/BME_conversions.c intern/BME_eulers.c @@ -225,81 +225,81 @@ SET(SRC nla_private.h ) -ADD_DEFINITIONS(-DGLEW_STATIC) +add_definitions(-DGLEW_STATIC) -IF(WITH_BULLET) - LIST(APPEND INC ../../../extern/bullet2/src) - ADD_DEFINITIONS(-DUSE_BULLET) -ENDIF(WITH_BULLET) +if(WITH_BULLET) + list(APPEND INC ../../../extern/bullet2/src) + add_definitions(-DUSE_BULLET) +endif() -IF(WITH_IMAGE_OPENEXR) - ADD_DEFINITIONS(-DWITH_OPENEXR) -ENDIF(WITH_IMAGE_OPENEXR) +if(WITH_IMAGE_OPENEXR) + add_definitions(-DWITH_OPENEXR) +endif() -IF(WITH_IMAGE_TIFF) - ADD_DEFINITIONS(-DWITH_TIFF) -ENDIF(WITH_IMAGE_TIFF) +if(WITH_IMAGE_TIFF) + add_definitions(-DWITH_TIFF) +endif() -IF(WITH_IMAGE_OPENJPEG) - ADD_DEFINITIONS(-DWITH_OPENJPEG) -ENDIF(WITH_IMAGE_OPENJPEG) +if(WITH_IMAGE_OPENJPEG) + add_definitions(-DWITH_OPENJPEG) +endif() -IF(WITH_IMAGE_DDS) - ADD_DEFINITIONS(-DWITH_DDS) -ENDIF(WITH_IMAGE_DDS) +if(WITH_IMAGE_DDS) + add_definitions(-DWITH_DDS) +endif() -IF(WITH_IMAGE_CINEON) - ADD_DEFINITIONS(-DWITH_CINEON) -ENDIF(WITH_IMAGE_CINEON) +if(WITH_IMAGE_CINEON) + add_definitions(-DWITH_CINEON) +endif() -IF(WITH_IMAGE_HDR) - ADD_DEFINITIONS(-DWITH_HDR) -ENDIF(WITH_IMAGE_HDR) +if(WITH_IMAGE_HDR) + add_definitions(-DWITH_HDR) +endif() -IF(WITH_CODEC_QUICKTIME) - LIST(APPEND INC ../quicktime ${QUICKTIME_INC}) - ADD_DEFINITIONS(-DWITH_QUICKTIME) -ENDIF(WITH_CODEC_QUICKTIME) +if(WITH_CODEC_QUICKTIME) + list(APPEND INC ../quicktime ${QUICKTIME_INC}) + add_definitions(-DWITH_QUICKTIME) +endif() -IF(WITH_CODEC_FFMPEG) - LIST(APPEND INC ${FFMPEG_INC}) - ADD_DEFINITIONS(-DWITH_FFMPEG) -ENDIF(WITH_CODEC_FFMPEG) +if(WITH_CODEC_FFMPEG) + list(APPEND INC ${FFMPEG_INC}) + add_definitions(-DWITH_FFMPEG) +endif() -IF(WITH_LCMS) - LIST(APPEND INC ${LCMS_INCLUDE_DIR}) - ADD_DEFINITIONS(-DWITH_LCMS) -ENDIF(WITH_LCMS) +if(WITH_LCMS) + list(APPEND INC ${LCMS_INCLUDE_DIR}) + add_definitions(-DWITH_LCMS) +endif() -IF(WITH_PYTHON) - LIST(APPEND INC ../python ${PYTHON_INC}) - ADD_DEFINITIONS(-DWITH_PYTHON) -ENDIF(WITH_PYTHON) +if(WITH_PYTHON) + list(APPEND INC ../python ${PYTHON_INC}) + add_definitions(-DWITH_PYTHON) +endif() -IF(WITH_OPENMP) - ADD_DEFINITIONS(-DPARALLEL=1) -ENDIF(WITH_OPENMP) +if(WITH_OPENMP) + add_definitions(-DPARALLEL=1) +endif() -IF(NOT WITH_MOD_FLUID) - ADD_DEFINITIONS(-DDISABLE_ELBEEM) -ENDIF(NOT WITH_MOD_FLUID) +if(NOT WITH_MOD_FLUID) + add_definitions(-DDISABLE_ELBEEM) +endif() -IF(WITH_JACK) - ADD_DEFINITIONS(-DWITH_JACK) -ENDIF(WITH_JACK) +if(WITH_JACK) + add_definitions(-DWITH_JACK) +endif() -IF(WITH_LZO) - LIST(APPEND INC ../../../extern/lzo/minilzo) - ADD_DEFINITIONS(-DWITH_LZO) -ENDIF(WITH_LZO) +if(WITH_LZO) + list(APPEND INC ../../../extern/lzo/minilzo) + add_definitions(-DWITH_LZO) +endif() -IF(WITH_LZMA) - LIST(APPEND INC ../../../extern/lzma) - ADD_DEFINITIONS(-DWITH_LZMA) -ENDIF(WITH_LZMA) +if(WITH_LZMA) + list(APPEND INC ../../../extern/lzma) + add_definitions(-DWITH_LZMA) +endif() -IF(MSVC) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX") -ENDIF(MSVC) +if(MSVC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX") +endif() -BLENDERLIB(bf_blenkernel "${SRC}" "${INC}") +blenderlib(bf_blenkernel "${SRC}" "${INC}") diff --git a/source/blender/blenlib/CMakeLists.txt b/source/blender/blenlib/CMakeLists.txt index a30cbebb539..a827c7879e1 100644 --- a/source/blender/blenlib/CMakeLists.txt +++ b/source/blender/blenlib/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ../makesdna ../blenkernel @@ -35,7 +35,7 @@ SET(INC ${FREETYPE_INCLUDE_DIRS} ) -SET(SRC +set(SRC intern/BLI_args.c intern/BLI_dynstr.c intern/BLI_ghash.c @@ -131,12 +131,12 @@ SET(SRC intern/dynamiclist.h ) -IF(CMAKE_SYSTEM_NAME MATCHES "Linux") - LIST(APPEND INC "${BINRELOC_INC}") -ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux") +if(CMAKE_SYSTEM_NAME MATCHES "Linux") + list(APPEND INC "${BINRELOC_INC}") +endif() -IF(WITH_OPENMP) - ADD_DEFINITIONS(-DPARALLEL=1) -ENDIF(WITH_OPENMP) +if(WITH_OPENMP) + add_definitions(-DPARALLEL=1) +endif() -BLENDERLIB(bf_blenlib "${SRC}" "${INC}") +blenderlib(bf_blenlib "${SRC}" "${INC}") diff --git a/source/blender/blenloader/CMakeLists.txt b/source/blender/blenloader/CMakeLists.txt index b84ee1df08d..2d80d565af1 100644 --- a/source/blender/blenloader/CMakeLists.txt +++ b/source/blender/blenloader/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ../blenlib ../blenkernel @@ -36,7 +36,7 @@ SET(INC ${ZLIB_INC} ) -SET(SRC +set(SRC intern/readblenentry.c intern/readfile.c intern/undofile.c @@ -50,4 +50,4 @@ SET(SRC intern/readfile.h ) -BLENDERLIB(bf_blenloader "${SRC}" "${INC}") +blenderlib(bf_blenloader "${SRC}" "${INC}") diff --git a/source/blender/blenpluginapi/CMakeLists.txt b/source/blender/blenpluginapi/CMakeLists.txt index 0e2e8526747..8005afc5615 100644 --- a/source/blender/blenpluginapi/CMakeLists.txt +++ b/source/blender/blenpluginapi/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . .. ../blenlib @@ -33,7 +33,7 @@ SET(INC ../../../intern/guardedalloc ) -SET(SRC +set(SRC intern/pluginapi.c documentation.h @@ -44,9 +44,9 @@ SET(SRC util.h ) -IF(WITH_CODEC_QUICKTIME) - LIST(APPEND INC ${QUICKTIME_INC}) - ADD_DEFINITIONS(-DWITH_QUICKTIME) -ENDIF(WITH_CODEC_QUICKTIME) +if(WITH_CODEC_QUICKTIME) + list(APPEND INC ${QUICKTIME_INC}) + add_definitions(-DWITH_QUICKTIME) +endif() -BLENDERLIB(bf_blenpluginapi "${SRC}" "${INC}") +blenderlib(bf_blenpluginapi "${SRC}" "${INC}") diff --git a/source/blender/collada/CMakeLists.txt b/source/blender/collada/CMakeLists.txt index 9d33885eb59..e0d53d2c2e4 100644 --- a/source/blender/collada/CMakeLists.txt +++ b/source/blender/collada/CMakeLists.txt @@ -24,9 +24,9 @@ # # ***** END GPL LICENSE BLOCK ***** -REMOVE_STRICT_FLAGS() +remove_strict_flags() -SET(INC +set(INC . ../blenlib ../blenkernel @@ -37,23 +37,23 @@ SET(INC ../../../intern/guardedalloc ) -IF(APPLE) - LIST(APPEND INC +if(APPLE) + list(APPEND INC ${OPENCOLLADA_INC}/COLLADAStreamWriter ${OPENCOLLADA_INC}/COLLADABaseUtils ${OPENCOLLADA_INC}/COLLADAFramework ${OPENCOLLADA_INC}/COLLADASaxFrameworkLoader ) -ELSE(APPLE) - LIST(APPEND INC +else() + list(APPEND INC ${OPENCOLLADA_INC}/COLLADAStreamWriter/include ${OPENCOLLADA_INC}/COLLADABaseUtils/include ${OPENCOLLADA_INC}/COLLADAFramework/include ${OPENCOLLADA_INC}/COLLADASaxFrameworkLoader/include ) -ENDIF(APPLE) +endif() -SET(SRC +set(SRC AnimationImporter.cpp ArmatureExporter.cpp ArmatureImporter.cpp @@ -95,8 +95,8 @@ SET(SRC collada_utils.h ) -IF(WITH_BUILDINFO) - ADD_DEFINITIONS(-DNAN_BUILDINFO) -ENDIF(WITH_BUILDINFO) +if(WITH_BUILDINFO) + add_definitions(-DNAN_BUILDINFO) +endif() -BLENDERLIB(bf_collada "${SRC}" "${INC}") +blenderlib(bf_collada "${SRC}" "${INC}") diff --git a/source/blender/editors/CMakeLists.txt b/source/blender/editors/CMakeLists.txt index 5d3cee9a7a5..651cb66833d 100644 --- a/source/blender/editors/CMakeLists.txt +++ b/source/blender/editors/CMakeLists.txt @@ -19,39 +19,39 @@ # # ***** END GPL LICENSE BLOCK ***** -ADD_SUBDIRECTORY(animation) -ADD_SUBDIRECTORY(armature) -ADD_SUBDIRECTORY(curve) -ADD_SUBDIRECTORY(datafiles) -ADD_SUBDIRECTORY(gpencil) -ADD_SUBDIRECTORY(interface) -ADD_SUBDIRECTORY(mesh) -ADD_SUBDIRECTORY(metaball) -ADD_SUBDIRECTORY(object) -ADD_SUBDIRECTORY(physics) -ADD_SUBDIRECTORY(render) -ADD_SUBDIRECTORY(screen) -ADD_SUBDIRECTORY(sculpt_paint) -ADD_SUBDIRECTORY(sound) -ADD_SUBDIRECTORY(space_action) -ADD_SUBDIRECTORY(space_api) -ADD_SUBDIRECTORY(space_buttons) -ADD_SUBDIRECTORY(space_console) -ADD_SUBDIRECTORY(space_file) -ADD_SUBDIRECTORY(space_graph) -ADD_SUBDIRECTORY(space_image) -ADD_SUBDIRECTORY(space_info) -ADD_SUBDIRECTORY(space_logic) -ADD_SUBDIRECTORY(space_nla) -ADD_SUBDIRECTORY(space_node) -ADD_SUBDIRECTORY(space_outliner) -ADD_SUBDIRECTORY(space_script) -ADD_SUBDIRECTORY(space_sequencer) -ADD_SUBDIRECTORY(space_sound) -ADD_SUBDIRECTORY(space_text) -ADD_SUBDIRECTORY(space_time) -ADD_SUBDIRECTORY(space_userpref) -ADD_SUBDIRECTORY(space_view3d) -ADD_SUBDIRECTORY(transform) -ADD_SUBDIRECTORY(util) -ADD_SUBDIRECTORY(uvedit) +add_subdirectory(animation) +add_subdirectory(armature) +add_subdirectory(curve) +add_subdirectory(datafiles) +add_subdirectory(gpencil) +add_subdirectory(interface) +add_subdirectory(mesh) +add_subdirectory(metaball) +add_subdirectory(object) +add_subdirectory(physics) +add_subdirectory(render) +add_subdirectory(screen) +add_subdirectory(sculpt_paint) +add_subdirectory(sound) +add_subdirectory(space_action) +add_subdirectory(space_api) +add_subdirectory(space_buttons) +add_subdirectory(space_console) +add_subdirectory(space_file) +add_subdirectory(space_graph) +add_subdirectory(space_image) +add_subdirectory(space_info) +add_subdirectory(space_logic) +add_subdirectory(space_nla) +add_subdirectory(space_node) +add_subdirectory(space_outliner) +add_subdirectory(space_script) +add_subdirectory(space_sequencer) +add_subdirectory(space_sound) +add_subdirectory(space_text) +add_subdirectory(space_time) +add_subdirectory(space_userpref) +add_subdirectory(space_view3d) +add_subdirectory(transform) +add_subdirectory(util) +add_subdirectory(uvedit) diff --git a/source/blender/editors/animation/CMakeLists.txt b/source/blender/editors/animation/CMakeLists.txt index 1e0a42fcd4e..64677282bf5 100644 --- a/source/blender/editors/animation/CMakeLists.txt +++ b/source/blender/editors/animation/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenkernel ../../blenlib @@ -29,7 +29,7 @@ SET(INC ../../../../intern/guardedalloc ) -SET(SRC +set(SRC anim_channels_defines.c anim_channels_edit.c anim_deps.c @@ -49,4 +49,4 @@ SET(SRC anim_intern.h ) -BLENDERLIB(bf_editor_animation "${SRC}" "${INC}") +blenderlib(bf_editor_animation "${SRC}" "${INC}") diff --git a/source/blender/editors/armature/CMakeLists.txt b/source/blender/editors/armature/CMakeLists.txt index e4243f77074..8db4d3b2d73 100644 --- a/source/blender/editors/armature/CMakeLists.txt +++ b/source/blender/editors/armature/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenkernel ../../blenlib @@ -30,7 +30,7 @@ SET(INC ../../../../intern/opennl/extern ) -SET(SRC +set(SRC armature_ops.c editarmature.c editarmature_generate.c @@ -50,4 +50,4 @@ SET(SRC reeb.h ) -BLENDERLIB(bf_editor_armature "${SRC}" "${INC}") +blenderlib(bf_editor_armature "${SRC}" "${INC}") diff --git a/source/blender/editors/curve/CMakeLists.txt b/source/blender/editors/curve/CMakeLists.txt index 577a144805f..c828ed87497 100644 --- a/source/blender/editors/curve/CMakeLists.txt +++ b/source/blender/editors/curve/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenkernel ../../blenlib @@ -29,7 +29,7 @@ SET(INC ../../../../intern/guardedalloc ) -SET(SRC +set(SRC curve_ops.c editcurve.c editfont.c @@ -38,4 +38,4 @@ SET(SRC curve_intern.h ) -BLENDERLIB(bf_editor_curve "${SRC}" "${INC}") +blenderlib(bf_editor_curve "${SRC}" "${INC}") diff --git a/source/blender/editors/datafiles/CMakeLists.txt b/source/blender/editors/datafiles/CMakeLists.txt index 7683db8ab7a..df0c4331195 100644 --- a/source/blender/editors/datafiles/CMakeLists.txt +++ b/source/blender/editors/datafiles/CMakeLists.txt @@ -19,9 +19,9 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC "") +set(INC "") -SET(SRC +set(SRC Bfont.c add.png.c bfont.ttf.c @@ -60,4 +60,4 @@ SET(SRC vertexdraw.png.c ) -BLENDERLIB(bf_editor_datafiles "${SRC}" "${INC}") +blenderlib(bf_editor_datafiles "${SRC}" "${INC}") diff --git a/source/blender/editors/gpencil/CMakeLists.txt b/source/blender/editors/gpencil/CMakeLists.txt index 8e884149bb8..544ee83b83d 100644 --- a/source/blender/editors/gpencil/CMakeLists.txt +++ b/source/blender/editors/gpencil/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenkernel ../../blenlib @@ -30,7 +30,7 @@ SET(INC ../../../../intern/guardedalloc ) -SET(SRC +set(SRC drawgpencil.c editaction_gpencil.c gpencil_buttons.c @@ -41,4 +41,4 @@ SET(SRC gpencil_intern.h ) -BLENDERLIB(bf_editor_gpencil "${SRC}" "${INC}") +blenderlib(bf_editor_gpencil "${SRC}" "${INC}") diff --git a/source/blender/editors/interface/CMakeLists.txt b/source/blender/editors/interface/CMakeLists.txt index 80eddcfc08d..79fd3cc3b8e 100644 --- a/source/blender/editors/interface/CMakeLists.txt +++ b/source/blender/editors/interface/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenfont ../../blenkernel @@ -33,7 +33,7 @@ SET(INC ../../../../intern/guardedalloc ) -SET(SRC +set(SRC interface.c interface_anim.c interface_draw.c @@ -54,12 +54,12 @@ SET(SRC interface_intern.h ) -IF(WITH_INTERNATIONAL) - ADD_DEFINITIONS(-DINTERNATIONAL) -ENDIF(WITH_INTERNATIONAL) +if(WITH_INTERNATIONAL) + add_definitions(-DINTERNATIONAL) +endif() -IF(WITH_PYTHON) - ADD_DEFINITIONS(-DWITH_PYTHON) -ENDIF(WITH_PYTHON) +if(WITH_PYTHON) + add_definitions(-DWITH_PYTHON) +endif() -BLENDERLIB(bf_editor_interface "${SRC}" "${INC}") +blenderlib(bf_editor_interface "${SRC}" "${INC}") diff --git a/source/blender/editors/mesh/CMakeLists.txt b/source/blender/editors/mesh/CMakeLists.txt index 977cbb79b7f..7a15d3a9edb 100644 --- a/source/blender/editors/mesh/CMakeLists.txt +++ b/source/blender/editors/mesh/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenkernel ../../blenlib @@ -31,7 +31,7 @@ SET(INC ../../../../intern/guardedalloc ) -SET(SRC +set(SRC editface.c editmesh.c editmesh_add.c @@ -47,4 +47,4 @@ SET(SRC mesh_intern.h ) -BLENDERLIB(bf_editor_mesh "${SRC}" "${INC}") +blenderlib(bf_editor_mesh "${SRC}" "${INC}") diff --git a/source/blender/editors/metaball/CMakeLists.txt b/source/blender/editors/metaball/CMakeLists.txt index 82e287c3e69..f6a58f7812e 100644 --- a/source/blender/editors/metaball/CMakeLists.txt +++ b/source/blender/editors/metaball/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenkernel ../../blenlib @@ -30,11 +30,11 @@ SET(INC ../../../../intern/guardedalloc ) -SET(SRC +set(SRC mball_edit.c mball_ops.c mball_intern.h ) -BLENDERLIB(bf_editor_metaball "${SRC}" "${INC}") +blenderlib(bf_editor_metaball "${SRC}" "${INC}") diff --git a/source/blender/editors/object/CMakeLists.txt b/source/blender/editors/object/CMakeLists.txt index 6fc06ab20c6..8aad3a1f6db 100644 --- a/source/blender/editors/object/CMakeLists.txt +++ b/source/blender/editors/object/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenkernel ../../blenlib @@ -34,7 +34,7 @@ SET(INC ../../../../intern/guardedalloc ) -SET(SRC +set(SRC object_add.c object_bake.c object_constraint.c @@ -53,8 +53,8 @@ SET(SRC object_intern.h ) -IF(WITH_PYTHON) - ADD_DEFINITIONS(-DWITH_PYTHON) -ENDIF(WITH_PYTHON) +if(WITH_PYTHON) + add_definitions(-DWITH_PYTHON) +endif() -BLENDERLIB(bf_editor_object "${SRC}" "${INC}") +blenderlib(bf_editor_object "${SRC}" "${INC}") diff --git a/source/blender/editors/physics/CMakeLists.txt b/source/blender/editors/physics/CMakeLists.txt index da7247e264a..911d1e90458 100644 --- a/source/blender/editors/physics/CMakeLists.txt +++ b/source/blender/editors/physics/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenkernel ../../blenlib @@ -30,7 +30,7 @@ SET(INC ../../../../intern/guardedalloc ) -SET(SRC +set(SRC particle_boids.c particle_edit.c particle_object.c @@ -41,12 +41,12 @@ SET(SRC physics_intern.h ) -IF(NOT WITH_MOD_FLUID) - ADD_DEFINITIONS(-DDISABLE_ELBEEM) -ENDIF(NOT WITH_MOD_FLUID) +if(NOT WITH_MOD_FLUID) + add_definitions(-DDISABLE_ELBEEM) +endif() -IF(WITH_OPENMP) - ADD_DEFINITIONS(-DPARALLEL=1) -ENDIF(WITH_OPENMP) +if(WITH_OPENMP) + add_definitions(-DPARALLEL=1) +endif() -BLENDERLIB(bf_editor_physics "${SRC}" "${INC}") +blenderlib(bf_editor_physics "${SRC}" "${INC}") diff --git a/source/blender/editors/render/CMakeLists.txt b/source/blender/editors/render/CMakeLists.txt index 670fa55d998..2c3f4a78c8f 100644 --- a/source/blender/editors/render/CMakeLists.txt +++ b/source/blender/editors/render/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenfont ../../blenkernel @@ -35,7 +35,7 @@ SET(INC ../../../../extern/glew/include ) -SET(SRC +set(SRC render_internal.c render_opengl.c render_ops.c @@ -45,13 +45,13 @@ SET(SRC render_intern.h ) -IF(WITH_CODEC_QUICKTIME) - LIST(APPEND INC ../../quicktime ${QUICKTIME_INC}) - ADD_DEFINITIONS(-DWITH_QUICKTIME) -ENDIF(WITH_CODEC_QUICKTIME) +if(WITH_CODEC_QUICKTIME) + list(APPEND INC ../../quicktime ${QUICKTIME_INC}) + add_definitions(-DWITH_QUICKTIME) +endif() -IF(WITH_OPENMP) - ADD_DEFINITIONS(-DPARALLEL=1) -ENDIF(WITH_OPENMP) +if(WITH_OPENMP) + add_definitions(-DPARALLEL=1) +endif() -BLENDERLIB(bf_editor_render "${SRC}" "${INC}") +blenderlib(bf_editor_render "${SRC}" "${INC}") diff --git a/source/blender/editors/screen/CMakeLists.txt b/source/blender/editors/screen/CMakeLists.txt index a7483c60c85..0f81d4fb382 100644 --- a/source/blender/editors/screen/CMakeLists.txt +++ b/source/blender/editors/screen/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenfont ../../blenkernel @@ -31,7 +31,7 @@ SET(INC ../../../../intern/guardedalloc ) -SET(SRC +set(SRC area.c glutil.c screen_context.c @@ -42,4 +42,4 @@ SET(SRC screen_intern.h ) -BLENDERLIB(bf_editor_screen "${SRC}" "${INC}") +blenderlib(bf_editor_screen "${SRC}" "${INC}") diff --git a/source/blender/editors/sculpt_paint/CMakeLists.txt b/source/blender/editors/sculpt_paint/CMakeLists.txt index 5f5211368f2..bb6901288ff 100644 --- a/source/blender/editors/sculpt_paint/CMakeLists.txt +++ b/source/blender/editors/sculpt_paint/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenkernel ../../imbuf @@ -32,7 +32,7 @@ SET(INC ../../../../intern/guardedalloc ) -SET(SRC +set(SRC paint_image.c paint_ops.c paint_stroke.c @@ -46,4 +46,4 @@ SET(SRC sculpt_intern.h ) -BLENDERLIB(bf_editor_sculpt_paint "${SRC}" "${INC}") +blenderlib(bf_editor_sculpt_paint "${SRC}" "${INC}") diff --git a/source/blender/editors/sound/CMakeLists.txt b/source/blender/editors/sound/CMakeLists.txt index d1314f649ee..927632f5a98 100644 --- a/source/blender/editors/sound/CMakeLists.txt +++ b/source/blender/editors/sound/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenkernel ../../blenlib @@ -30,10 +30,10 @@ SET(INC ../../../../intern/audaspace/intern ) -SET(SRC +set(SRC sound_ops.c sound_intern.h ) -BLENDERLIB(bf_editor_sound "${SRC}" "${INC}") +blenderlib(bf_editor_sound "${SRC}" "${INC}") diff --git a/source/blender/editors/space_action/CMakeLists.txt b/source/blender/editors/space_action/CMakeLists.txt index 44981a3177b..5bfd01d461c 100644 --- a/source/blender/editors/space_action/CMakeLists.txt +++ b/source/blender/editors/space_action/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenkernel ../../blenlib @@ -29,7 +29,7 @@ SET(INC ../../../../intern/guardedalloc ) -SET(SRC +set(SRC action_draw.c action_edit.c action_ops.c @@ -39,4 +39,4 @@ SET(SRC action_intern.h ) -BLENDERLIB(bf_editor_space_action "${SRC}" "${INC}") +blenderlib(bf_editor_space_action "${SRC}" "${INC}") diff --git a/source/blender/editors/space_api/CMakeLists.txt b/source/blender/editors/space_api/CMakeLists.txt index 5436d8207c5..fc20f8f9895 100644 --- a/source/blender/editors/space_api/CMakeLists.txt +++ b/source/blender/editors/space_api/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenkernel ../../blenlib @@ -29,9 +29,9 @@ SET(INC ../../../../intern/guardedalloc ) -SET(SRC +set(SRC space.c spacetypes.c ) -BLENDERLIB(bf_editor_space_api "${SRC}" "${INC}") +blenderlib(bf_editor_space_api "${SRC}" "${INC}") diff --git a/source/blender/editors/space_buttons/CMakeLists.txt b/source/blender/editors/space_buttons/CMakeLists.txt index 47152bea9f0..767536e3814 100644 --- a/source/blender/editors/space_buttons/CMakeLists.txt +++ b/source/blender/editors/space_buttons/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenkernel ../../blenlib @@ -29,7 +29,7 @@ SET(INC ../../../../intern/guardedalloc ) -SET(SRC +set(SRC buttons_context.c buttons_header.c buttons_ops.c @@ -38,4 +38,4 @@ SET(SRC buttons_intern.h ) -BLENDERLIB(bf_editor_space_buttons "${SRC}" "${INC}") +blenderlib(bf_editor_space_buttons "${SRC}" "${INC}") diff --git a/source/blender/editors/space_console/CMakeLists.txt b/source/blender/editors/space_console/CMakeLists.txt index 75eb20dfdc1..fe475b88092 100644 --- a/source/blender/editors/space_console/CMakeLists.txt +++ b/source/blender/editors/space_console/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenfont ../../blenkernel @@ -31,7 +31,7 @@ SET(INC ../../../../intern/guardedalloc ) -SET(SRC +set(SRC console_draw.c console_ops.c space_console.c @@ -39,8 +39,8 @@ SET(SRC console_intern.h ) -IF(WITH_PYTHON) - ADD_DEFINITIONS(-DWITH_PYTHON) -ENDIF(WITH_PYTHON) +if(WITH_PYTHON) + add_definitions(-DWITH_PYTHON) +endif() -BLENDERLIB(bf_editor_space_console "${SRC}" "${INC}") +blenderlib(bf_editor_space_console "${SRC}" "${INC}") diff --git a/source/blender/editors/space_file/CMakeLists.txt b/source/blender/editors/space_file/CMakeLists.txt index d4e5d599c52..b4a70917ca8 100644 --- a/source/blender/editors/space_file/CMakeLists.txt +++ b/source/blender/editors/space_file/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenfont ../../blenkernel @@ -33,7 +33,7 @@ SET(INC ../../../../intern/guardedalloc ) -SET(SRC +set(SRC file_draw.c file_ops.c file_panels.c @@ -47,28 +47,28 @@ SET(SRC fsmenu.h ) -IF(WITH_IMAGE_OPENEXR) - ADD_DEFINITIONS(-DWITH_OPENEXR) -ENDIF(WITH_IMAGE_OPENEXR) +if(WITH_IMAGE_OPENEXR) + add_definitions(-DWITH_OPENEXR) +endif() -IF(WITH_IMAGE_TIFF) - ADD_DEFINITIONS(-DWITH_TIFF) -ENDIF(WITH_IMAGE_TIFF) +if(WITH_IMAGE_TIFF) + add_definitions(-DWITH_TIFF) +endif() -IF(WITH_IMAGE_OPENJPEG) - ADD_DEFINITIONS(-DWITH_OPENJPEG) -ENDIF(WITH_IMAGE_OPENJPEG) +if(WITH_IMAGE_OPENJPEG) + add_definitions(-DWITH_OPENJPEG) +endif() -IF(WITH_IMAGE_DDS) - ADD_DEFINITIONS(-DWITH_DDS) -ENDIF(WITH_IMAGE_DDS) +if(WITH_IMAGE_DDS) + add_definitions(-DWITH_DDS) +endif() -IF(WITH_IMAGE_CINEON) - ADD_DEFINITIONS(-DWITH_CINEON) -ENDIF(WITH_IMAGE_CINEON) +if(WITH_IMAGE_CINEON) + add_definitions(-DWITH_CINEON) +endif() -IF(WITH_IMAGE_HDR) - ADD_DEFINITIONS(-DWITH_HDR) -ENDIF(WITH_IMAGE_HDR) +if(WITH_IMAGE_HDR) + add_definitions(-DWITH_HDR) +endif() -BLENDERLIB(bf_editor_space_file "${SRC}" "${INC}") +blenderlib(bf_editor_space_file "${SRC}" "${INC}") diff --git a/source/blender/editors/space_graph/CMakeLists.txt b/source/blender/editors/space_graph/CMakeLists.txt index 2c1bdbed210..248bc9c76c5 100644 --- a/source/blender/editors/space_graph/CMakeLists.txt +++ b/source/blender/editors/space_graph/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenkernel ../../blenlib @@ -30,7 +30,7 @@ SET(INC ../../../../intern/audaspace/intern ) -SET(SRC +set(SRC graph_buttons.c graph_draw.c graph_edit.c @@ -42,4 +42,4 @@ SET(SRC graph_intern.h ) -BLENDERLIB(bf_editor_space_graph "${SRC}" "${INC}") +blenderlib(bf_editor_space_graph "${SRC}" "${INC}") diff --git a/source/blender/editors/space_image/CMakeLists.txt b/source/blender/editors/space_image/CMakeLists.txt index 67639539c40..31c2e9568ae 100644 --- a/source/blender/editors/space_image/CMakeLists.txt +++ b/source/blender/editors/space_image/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenfont ../../blenkernel @@ -32,7 +32,7 @@ SET(INC ../../../../intern/guardedalloc ) -SET(SRC +set(SRC image_buttons.c image_draw.c image_header.c @@ -43,25 +43,25 @@ SET(SRC image_intern.h ) -IF(WITH_IMAGE_OPENJPEG) - ADD_DEFINITIONS(-DWITH_OPENJPEG) -ENDIF(WITH_IMAGE_OPENJPEG) +if(WITH_IMAGE_OPENJPEG) + add_definitions(-DWITH_OPENJPEG) +endif() -IF(WITH_IMAGE_OPENEXR) - ADD_DEFINITIONS(-DWITH_OPENEXR) -ENDIF(WITH_IMAGE_OPENEXR) +if(WITH_IMAGE_OPENEXR) + add_definitions(-DWITH_OPENEXR) +endif() -IF(WITH_IMAGE_TIFF) - ADD_DEFINITIONS(-DWITH_TIFF) -ENDIF(WITH_IMAGE_TIFF) +if(WITH_IMAGE_TIFF) + add_definitions(-DWITH_TIFF) +endif() -IF(WITH_IMAGE_CINEON) - ADD_DEFINITIONS(-DWITH_CINEON) -ENDIF(WITH_IMAGE_CINEON) +if(WITH_IMAGE_CINEON) + add_definitions(-DWITH_CINEON) +endif() -IF(WITH_LCMS) - SET(INC ${INC} ${LCMS_INCLUDE_DIR}) - ADD_DEFINITIONS(-DWITH_LCMS) -ENDIF(WITH_LCMS) +if(WITH_LCMS) + set(INC ${INC} ${LCMS_INCLUDE_DIR}) + add_definitions(-DWITH_LCMS) +endif() -BLENDERLIB(bf_editor_space_image "${SRC}" "${INC}") +blenderlib(bf_editor_space_image "${SRC}" "${INC}") diff --git a/source/blender/editors/space_info/CMakeLists.txt b/source/blender/editors/space_info/CMakeLists.txt index 4592a07ed85..69748041996 100644 --- a/source/blender/editors/space_info/CMakeLists.txt +++ b/source/blender/editors/space_info/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenfont ../../blenkernel @@ -31,7 +31,7 @@ SET(INC ../../../../intern/guardedalloc ) -SET(SRC +set(SRC info_ops.c info_stats.c info_draw.c @@ -43,4 +43,4 @@ SET(SRC textview.h ) -BLENDERLIB(bf_editor_space_info "${SRC}" "${INC}") +blenderlib(bf_editor_space_info "${SRC}" "${INC}") diff --git a/source/blender/editors/space_logic/CMakeLists.txt b/source/blender/editors/space_logic/CMakeLists.txt index 7fcacb393af..18e546a61f5 100644 --- a/source/blender/editors/space_logic/CMakeLists.txt +++ b/source/blender/editors/space_logic/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenkernel ../../blenlib @@ -30,7 +30,7 @@ SET(INC ../../../../intern/guardedalloc ) -SET(SRC +set(SRC logic_buttons.c logic_ops.c logic_window.c @@ -39,8 +39,8 @@ SET(SRC logic_intern.h ) -IF(WITH_GAMEENGINE) - ADD_DEFINITIONS(-DWITH_GAMEENGINE) -ENDIF(WITH_GAMEENGINE) +if(WITH_GAMEENGINE) + add_definitions(-DWITH_GAMEENGINE) +endif() -BLENDERLIB(bf_editor_space_logic "${SRC}" "${INC}") +blenderlib(bf_editor_space_logic "${SRC}" "${INC}") diff --git a/source/blender/editors/space_nla/CMakeLists.txt b/source/blender/editors/space_nla/CMakeLists.txt index 82d32d80442..dcb09a1a654 100644 --- a/source/blender/editors/space_nla/CMakeLists.txt +++ b/source/blender/editors/space_nla/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenkernel ../../blenlib @@ -29,7 +29,7 @@ SET(INC ../../../../intern/guardedalloc ) -SET(SRC +set(SRC nla_buttons.c nla_channels.c nla_draw.c @@ -41,4 +41,4 @@ SET(SRC nla_intern.h ) -BLENDERLIB(bf_editor_space_nla "${SRC}" "${INC}") +blenderlib(bf_editor_space_nla "${SRC}" "${INC}") diff --git a/source/blender/editors/space_node/CMakeLists.txt b/source/blender/editors/space_node/CMakeLists.txt index 1513f688e2c..45b4341c99d 100644 --- a/source/blender/editors/space_node/CMakeLists.txt +++ b/source/blender/editors/space_node/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenkernel ../../blenlib @@ -33,7 +33,7 @@ SET(INC ../../../../intern/opennl/extern ) -SET(SRC +set(SRC drawnode.c node_buttons.c node_draw.c @@ -47,4 +47,4 @@ SET(SRC node_intern.h ) -BLENDERLIB(bf_editor_space_node "${SRC}" "${INC}") +blenderlib(bf_editor_space_node "${SRC}" "${INC}") diff --git a/source/blender/editors/space_outliner/CMakeLists.txt b/source/blender/editors/space_outliner/CMakeLists.txt index b9383ef6388..dc8e944dbca 100644 --- a/source/blender/editors/space_outliner/CMakeLists.txt +++ b/source/blender/editors/space_outliner/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenkernel ../../blenlib @@ -31,7 +31,7 @@ SET(INC ../../../../intern/opennl/extern ) -SET(SRC +set(SRC outliner.c outliner_ops.c space_outliner.c @@ -39,4 +39,4 @@ SET(SRC outliner_intern.h ) -BLENDERLIB(bf_editor_space_outliner "${SRC}" "${INC}") +blenderlib(bf_editor_space_outliner "${SRC}" "${INC}") diff --git a/source/blender/editors/space_script/CMakeLists.txt b/source/blender/editors/space_script/CMakeLists.txt index da4f90a103f..849c4ee4dcd 100644 --- a/source/blender/editors/space_script/CMakeLists.txt +++ b/source/blender/editors/space_script/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenkernel ../../blenlib @@ -29,7 +29,7 @@ SET(INC ../../../../intern/guardedalloc ) -SET(SRC +set(SRC script_edit.c script_header.c script_ops.c @@ -38,9 +38,9 @@ SET(SRC script_intern.h ) -IF(WITH_PYTHON) - LIST(APPEND INC ${PYTHON_INC} ../../python) - ADD_DEFINITIONS(-DWITH_PYTHON) -ENDIF(WITH_PYTHON) +if(WITH_PYTHON) + list(APPEND INC ${PYTHON_INC} ../../python) + add_definitions(-DWITH_PYTHON) +endif() -BLENDERLIB(bf_editor_space_script "${SRC}" "${INC}") +blenderlib(bf_editor_space_script "${SRC}" "${INC}") diff --git a/source/blender/editors/space_sequencer/CMakeLists.txt b/source/blender/editors/space_sequencer/CMakeLists.txt index 0fe9cc3580b..721d19a37cf 100644 --- a/source/blender/editors/space_sequencer/CMakeLists.txt +++ b/source/blender/editors/space_sequencer/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenkernel ../../blenlib @@ -31,7 +31,7 @@ SET(INC ../../../../intern/audaspace/intern ) -SET(SRC +set(SRC sequencer_add.c sequencer_buttons.c sequencer_draw.c @@ -44,4 +44,4 @@ SET(SRC sequencer_intern.h ) -BLENDERLIB(bf_editor_space_sequencer "${SRC}" "${INC}") +blenderlib(bf_editor_space_sequencer "${SRC}" "${INC}") diff --git a/source/blender/editors/space_sound/CMakeLists.txt b/source/blender/editors/space_sound/CMakeLists.txt index 90a522b8f3f..bd60c0feb01 100644 --- a/source/blender/editors/space_sound/CMakeLists.txt +++ b/source/blender/editors/space_sound/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenkernel ../../blenlib @@ -29,11 +29,11 @@ SET(INC ../../../../intern/guardedalloc ) -SET(SRC +set(SRC sound_header.c space_sound.c sound_intern.h ) -BLENDERLIB(bf_editor_space_sound "${SRC}" "${INC}") +blenderlib(bf_editor_space_sound "${SRC}" "${INC}") diff --git a/source/blender/editors/space_text/CMakeLists.txt b/source/blender/editors/space_text/CMakeLists.txt index acfb2f315f8..86e2f3f3ac5 100644 --- a/source/blender/editors/space_text/CMakeLists.txt +++ b/source/blender/editors/space_text/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenfont ../../blenkernel @@ -30,7 +30,7 @@ SET(INC ../../../../intern/guardedalloc ) -SET(SRC +set(SRC space_text.c text_draw.c text_header.c @@ -40,9 +40,9 @@ SET(SRC text_intern.h ) -IF(WITH_PYTHON) - LIST(APPEND INC ${PYTHON_INC} ../../python) - ADD_DEFINITIONS(-DWITH_PYTHON) -ENDIF(WITH_PYTHON) +if(WITH_PYTHON) + list(APPEND INC ${PYTHON_INC} ../../python) + add_definitions(-DWITH_PYTHON) +endif() -BLENDERLIB(bf_editor_text "${SRC}" "${INC}") +blenderlib(bf_editor_text "${SRC}" "${INC}") diff --git a/source/blender/editors/space_time/CMakeLists.txt b/source/blender/editors/space_time/CMakeLists.txt index ad1df116081..cbfce4c5cc2 100644 --- a/source/blender/editors/space_time/CMakeLists.txt +++ b/source/blender/editors/space_time/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenkernel ../../blenlib @@ -29,11 +29,11 @@ SET(INC ../../../../intern/guardedalloc ) -SET(SRC +set(SRC space_time.c time_ops.c time_intern.h ) -BLENDERLIB(bf_editor_space_time "${SRC}" "${INC}") +blenderlib(bf_editor_space_time "${SRC}" "${INC}") diff --git a/source/blender/editors/space_userpref/CMakeLists.txt b/source/blender/editors/space_userpref/CMakeLists.txt index d90092f75d0..15ae90056b1 100644 --- a/source/blender/editors/space_userpref/CMakeLists.txt +++ b/source/blender/editors/space_userpref/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenkernel ../../blenlib @@ -29,11 +29,11 @@ SET(INC ../../../../intern/guardedalloc ) -SET(SRC +set(SRC space_userpref.c userpref_ops.c userpref_intern.h ) -BLENDERLIB(bf_editor_space_userpref "${SRC}" "${INC}") +blenderlib(bf_editor_space_userpref "${SRC}" "${INC}") diff --git a/source/blender/editors/space_view3d/CMakeLists.txt b/source/blender/editors/space_view3d/CMakeLists.txt index 36bc9c037a8..0e4c9ca6aa3 100644 --- a/source/blender/editors/space_view3d/CMakeLists.txt +++ b/source/blender/editors/space_view3d/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenfont ../../blenkernel @@ -34,7 +34,7 @@ SET(INC ../../../../intern/smoke/extern ) -SET(SRC +set(SRC drawanimviz.c drawarmature.c drawmesh.c @@ -55,11 +55,11 @@ SET(SRC view3d_intern.h ) -IF(WITH_GAMEENGINE) - LIST(APPEND INC ../../../kernel/gen_system) - ADD_DEFINITIONS(-DWITH_GAMEENGINE) -ENDIF(WITH_GAMEENGINE) +if(WITH_GAMEENGINE) + list(APPEND INC ../../../kernel/gen_system) + add_definitions(-DWITH_GAMEENGINE) +endif() -ADD_DEFINITIONS(-DGLEW_STATIC) +add_definitions(-DGLEW_STATIC) -BLENDERLIB(bf_editor_space_view3d "${SRC}" "${INC}") +blenderlib(bf_editor_space_view3d "${SRC}" "${INC}") diff --git a/source/blender/editors/transform/CMakeLists.txt b/source/blender/editors/transform/CMakeLists.txt index 6f4d1ff3aaa..5e759bf1ee0 100644 --- a/source/blender/editors/transform/CMakeLists.txt +++ b/source/blender/editors/transform/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenkernel ../../blenlib @@ -29,7 +29,7 @@ SET(INC ../../../../intern/guardedalloc ) -SET(SRC +set(SRC transform.c transform_constraints.c transform_conversions.c @@ -44,4 +44,4 @@ SET(SRC transform.h ) -BLENDERLIB(bf_editor_transform "${SRC}" "${INC}") +blenderlib(bf_editor_transform "${SRC}" "${INC}") diff --git a/source/blender/editors/util/CMakeLists.txt b/source/blender/editors/util/CMakeLists.txt index 65b52b876fa..61ba1bb6c74 100644 --- a/source/blender/editors/util/CMakeLists.txt +++ b/source/blender/editors/util/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenkernel ../../blenlib @@ -29,7 +29,7 @@ SET(INC ../../../../intern/guardedalloc ) -SET(SRC +set(SRC ed_util.c editmode_undo.c numinput.c @@ -82,4 +82,4 @@ SET(SRC ../include/UI_view2d.h ) -BLENDERLIB(bf_editor_util "${SRC}" "${INC}") +blenderlib(bf_editor_util "${SRC}" "${INC}") diff --git a/source/blender/editors/uvedit/CMakeLists.txt b/source/blender/editors/uvedit/CMakeLists.txt index 1cec055eb7f..92ee3bea8d5 100644 --- a/source/blender/editors/uvedit/CMakeLists.txt +++ b/source/blender/editors/uvedit/CMakeLists.txt @@ -19,7 +19,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../include ../../blenkernel ../../blenlib @@ -30,7 +30,7 @@ SET(INC ../../../../intern/opennl/extern ) -SET(SRC +set(SRC uvedit_draw.c uvedit_ops.c uvedit_parametrizer.c @@ -40,4 +40,4 @@ SET(SRC uvedit_parametrizer.h ) -BLENDERLIB(bf_editor_uvedit "${SRC}" "${INC}") +blenderlib(bf_editor_uvedit "${SRC}" "${INC}") diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt index 63dedc75226..54257af6ea9 100644 --- a/source/blender/gpu/CMakeLists.txt +++ b/source/blender/gpu/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ../blenlib ../blenkernel @@ -36,7 +36,7 @@ SET(INC ../../../intern/smoke/extern ) -SET(SRC +set(SRC intern/gpu_buffers.c intern/gpu_codegen.c intern/gpu_draw.c @@ -52,7 +52,7 @@ SET(SRC intern/gpu_codegen.h ) -ADD_DEFINITIONS(-DGLEW_STATIC) +add_definitions(-DGLEW_STATIC) -BLENDERLIB(bf_gpu "${SRC}" "${INC}") +blenderlib(bf_gpu "${SRC}" "${INC}") diff --git a/source/blender/ikplugin/CMakeLists.txt b/source/blender/ikplugin/CMakeLists.txt index 17e09b460af..78f362be117 100644 --- a/source/blender/ikplugin/CMakeLists.txt +++ b/source/blender/ikplugin/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../blenlib ../makesdna ../blenkernel @@ -33,7 +33,7 @@ SET(INC ../../../intern/iksolver/extern ) -SET(SRC +set(SRC intern/ikplugin_api.c intern/iksolver_plugin.c @@ -43,13 +43,13 @@ SET(SRC intern/itasc_plugin.h ) -IF(WITH_IK_ITASC) - ADD_DEFINITIONS(-DWITH_IK_ITASC) - LIST(APPEND INC ../../../extern/Eigen2) - LIST(APPEND INC ../../../intern/itasc) - LIST(APPEND SRC +if(WITH_IK_ITASC) + add_definitions(-DWITH_IK_ITASC) + list(APPEND INC ../../../extern/Eigen2) + list(APPEND INC ../../../intern/itasc) + list(APPEND SRC ./intern/itasc_plugin.cpp ) -ENDIF(WITH_IK_ITASC) +endif() -BLENDERLIB(bf_ikplugin "${SRC}" "${INC}") +blenderlib(bf_ikplugin "${SRC}" "${INC}") diff --git a/source/blender/imbuf/CMakeLists.txt b/source/blender/imbuf/CMakeLists.txt index e68b2d20fa3..866a702e43f 100644 --- a/source/blender/imbuf/CMakeLists.txt +++ b/source/blender/imbuf/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ../avi ../blenlib @@ -37,7 +37,7 @@ SET(INC ${ZLIB_INC} ) -SET(SRC +set(SRC intern/allocimbuf.c intern/anim_movie.c intern/bmp.c @@ -96,48 +96,48 @@ SET(SRC intern/openexr/openexr_multi.h ) -IF(WITH_IMAGE_OPENEXR) - ADD_DEFINITIONS(-DWITH_OPENEXR) -ENDIF(WITH_IMAGE_OPENEXR) +if(WITH_IMAGE_OPENEXR) + add_definitions(-DWITH_OPENEXR) +endif() -IF(WITH_IMAGE_TIFF) - LIST(APPEND INC ${TIFF_INCLUDE_DIR}) - ADD_DEFINITIONS(-DWITH_TIFF) -ENDIF(WITH_IMAGE_TIFF) +if(WITH_IMAGE_TIFF) + list(APPEND INC ${TIFF_INCLUDE_DIR}) + add_definitions(-DWITH_TIFF) +endif() -IF(WITH_IMAGE_OPENJPEG) - LIST(APPEND INC ${OPENJPEG_INC}) - ADD_DEFINITIONS(-DWITH_OPENJPEG) -ENDIF(WITH_IMAGE_OPENJPEG) +if(WITH_IMAGE_OPENJPEG) + list(APPEND INC ${OPENJPEG_INC}) + add_definitions(-DWITH_OPENJPEG) +endif() -IF(WITH_IMAGE_REDCODE) - LIST(APPEND INC ${REDCODE_INC}) - ADD_DEFINITIONS(-DWITH_REDCODE) -ENDIF(WITH_IMAGE_REDCODE) +if(WITH_IMAGE_REDCODE) + list(APPEND INC ${REDCODE_INC}) + add_definitions(-DWITH_REDCODE) +endif() -IF(WITH_CODEC_QUICKTIME) - LIST(APPEND INC +if(WITH_CODEC_QUICKTIME) + list(APPEND INC ../quicktime ${QUICKTIME_INC} ) - ADD_DEFINITIONS(-DWITH_QUICKTIME) -ENDIF(WITH_CODEC_QUICKTIME) + add_definitions(-DWITH_QUICKTIME) +endif() -IF(WITH_CODEC_FFMPEG) - LIST(APPEND INC ${FFMPEG_INC}) - ADD_DEFINITIONS(-DWITH_FFMPEG) -ENDIF(WITH_CODEC_FFMPEG) +if(WITH_CODEC_FFMPEG) + list(APPEND INC ${FFMPEG_INC}) + add_definitions(-DWITH_FFMPEG) +endif() -IF(WITH_IMAGE_DDS) - ADD_DEFINITIONS(-DWITH_DDS) -ENDIF(WITH_IMAGE_DDS) +if(WITH_IMAGE_DDS) + add_definitions(-DWITH_DDS) +endif() -IF(WITH_IMAGE_CINEON) - ADD_DEFINITIONS(-DWITH_CINEON) -ENDIF(WITH_IMAGE_CINEON) +if(WITH_IMAGE_CINEON) + add_definitions(-DWITH_CINEON) +endif() -IF(WITH_IMAGE_HDR) - ADD_DEFINITIONS(-DWITH_HDR) -ENDIF(WITH_IMAGE_HDR) +if(WITH_IMAGE_HDR) + add_definitions(-DWITH_HDR) +endif() -BLENDERLIB(bf_imbuf "${SRC}" "${INC}") +blenderlib(bf_imbuf "${SRC}" "${INC}") diff --git a/source/blender/imbuf/intern/cineon/CMakeLists.txt b/source/blender/imbuf/intern/cineon/CMakeLists.txt index f4754719761..d9cfc04cf8d 100644 --- a/source/blender/imbuf/intern/cineon/CMakeLists.txt +++ b/source/blender/imbuf/intern/cineon/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . .. ../../ @@ -34,7 +34,7 @@ SET(INC ../../../../../intern/guardedalloc ) -SET(SRC +set(SRC cineon_dpx.c cineonlib.c dpxlib.c @@ -43,4 +43,4 @@ SET(SRC logmemfile.c ) -BLENDERLIB(bf_imbuf_cineon "${SRC}" "${INC}") +blenderlib(bf_imbuf_cineon "${SRC}" "${INC}") diff --git a/source/blender/imbuf/intern/dds/CMakeLists.txt b/source/blender/imbuf/intern/dds/CMakeLists.txt index 5634368383d..44341c7e861 100644 --- a/source/blender/imbuf/intern/dds/CMakeLists.txt +++ b/source/blender/imbuf/intern/dds/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . .. ./intern/include @@ -35,7 +35,7 @@ SET(INC ../../../../../intern/guardedalloc ) -SET(SRC +set(SRC BlockDXT.cpp ColorBlock.cpp DirectDrawSurface.cpp @@ -45,7 +45,7 @@ SET(SRC ) if(WITH_IMAGE_DDS) - ADD_DEFINITIONS(-DWITH_DDS) -ENDIF(WITH_IMAGE_DDS) + add_definitions(-DWITH_DDS) +endif() -BLENDERLIB(bf_imbuf_dds "${SRC}" "${INC}") +blenderlib(bf_imbuf_dds "${SRC}" "${INC}") diff --git a/source/blender/imbuf/intern/openexr/CMakeLists.txt b/source/blender/imbuf/intern/openexr/CMakeLists.txt index edea033bb3a..958abc4d1f6 100644 --- a/source/blender/imbuf/intern/openexr/CMakeLists.txt +++ b/source/blender/imbuf/intern/openexr/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ../../../blenkernel ../../ @@ -36,12 +36,12 @@ SET(INC ${OPENEXR_INC} ) -SET(SRC +set(SRC openexr_api.cpp ) -IF(WITH_IMAGE_OPENEXR) - ADD_DEFINITIONS(-DWITH_OPENEXR) -ENDIF(WITH_IMAGE_OPENEXR) +if(WITH_IMAGE_OPENEXR) + add_definitions(-DWITH_OPENEXR) +endif() -BLENDERLIB(bf_imbuf_openexr "${SRC}" "${INC}") +blenderlib(bf_imbuf_openexr "${SRC}" "${INC}") diff --git a/source/blender/makesdna/CMakeLists.txt b/source/blender/makesdna/CMakeLists.txt index cb61082000d..e02b33b92c1 100644 --- a/source/blender/makesdna/CMakeLists.txt +++ b/source/blender/makesdna/CMakeLists.txt @@ -24,4 +24,4 @@ # # ***** END GPL LICENSE BLOCK ***** -ADD_SUBDIRECTORY(intern) +add_subdirectory(intern) diff --git a/source/blender/makesdna/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt index ca01b231982..8329c28d42e 100644 --- a/source/blender/makesdna/intern/CMakeLists.txt +++ b/source/blender/makesdna/intern/CMakeLists.txt @@ -24,21 +24,21 @@ # # ***** END GPL LICENSE BLOCK ***** -INCLUDE_DIRECTORIES(../../../../intern/guardedalloc ..) +include_directories(../../../../intern/guardedalloc ..) # Build makesdna executable -SET(SRC +set(SRC makesdna.c ../../../../intern/guardedalloc/intern/mallocn.c ) -IF(WIN32 AND NOT UNIX) - LIST(APPEND SRC +if(WIN32 AND NOT UNIX) + list(APPEND SRC ../../../../intern/guardedalloc/intern/mmap_win.c ) -ENDIF(WIN32 AND NOT UNIX) +endif() -SET(SRC_DNA_INC +set(SRC_DNA_INC ../DNA_ID.h ../DNA_action_types.h ../DNA_actuator_types.h @@ -98,22 +98,22 @@ SET(SRC_DNA_INC ../DNA_world_types.h ) -ADD_EXECUTABLE(makesdna ${SRC} ${SRC_DNA_INC}) +add_executable(makesdna ${SRC} ${SRC_DNA_INC}) # Output dna.c -ADD_CUSTOM_COMMAND( +add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dna.c COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna ${CMAKE_CURRENT_BINARY_DIR}/dna.c ${CMAKE_SOURCE_DIR}/source/blender/makesdna/ DEPENDS makesdna ) # Build bf_dna library -SET(SRC +set(SRC dna_genfile.c dna.c ${SRC_DNA_INC} ) -BLENDERLIB(bf_dna "${SRC}" "${INC}") +blenderlib(bf_dna "${SRC}" "${INC}") -MESSAGE(STATUS "Configuring makesdna") +message(STATUS "Configuring makesdna") diff --git a/source/blender/makesrna/CMakeLists.txt b/source/blender/makesrna/CMakeLists.txt index ec48240bfc5..540597da578 100644 --- a/source/blender/makesrna/CMakeLists.txt +++ b/source/blender/makesrna/CMakeLists.txt @@ -24,4 +24,4 @@ # # ***** END GPL LICENSE BLOCK ***** -ADD_SUBDIRECTORY(intern) +add_subdirectory(intern) diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index bf9ba2dcc70..3d189edb2f2 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -25,20 +25,20 @@ # ***** END GPL LICENSE BLOCK ***** # Generated code has some unused vars we can ignore. -REMOVE_STRICT_FLAGS() +remove_strict_flags() -MESSAGE(STATUS "Configuring makesrna") +message(STATUS "Configuring makesrna") -FILE(GLOB DEFSRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.c") -FILE(GLOB APISRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*_api.c") -LIST(REMOVE_ITEM DEFSRC rna_access.c rna_define.c makesrna.c) -LIST(REMOVE_ITEM DEFSRC ${APISRC}) +file(GLOB DEFSRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.c") +file(GLOB APISRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*_api.c") +list(REMOVE_ITEM DEFSRC rna_access.c rna_define.c makesrna.c) +list(REMOVE_ITEM DEFSRC ${APISRC}) -STRING(REGEX REPLACE "rna_([a-zA-Z0-9_-]*).c" "${CMAKE_CURRENT_BINARY_DIR}/rna_\\1_gen.c" GENSRC "${DEFSRC}") -SET_SOURCE_FILES_PROPERTIES(GENSRC PROPERTIES GENERATED true) +string(REGEX REPLACE "rna_([a-zA-Z0-9_-]*).c" "${CMAKE_CURRENT_BINARY_DIR}/rna_\\1_gen.c" GENSRC "${DEFSRC}") +set_source_files_properties(GENSRC PROPERTIES GENERATED true) -SET(SRC +set(SRC makesrna.c rna_define.c ${DEFSRC} @@ -47,7 +47,7 @@ SET(SRC ../../../../intern/guardedalloc/intern/mmap_win.c ) -INCLUDE_DIRECTORIES( +include_directories( ../../../../intern/audaspace/intern ../../../../intern/guardedalloc ../../../../intern/memutil @@ -66,93 +66,93 @@ INCLUDE_DIRECTORIES( . ) -FILE(GLOB INC_FILES ../*.h ../../makesdna/*.h) +file(GLOB INC_FILES ../*.h ../../makesdna/*.h) -IF(WITH_PYTHON) - ADD_DEFINITIONS(-DWITH_PYTHON) -ENDIF(WITH_PYTHON) +if(WITH_PYTHON) + add_definitions(-DWITH_PYTHON) +endif() -IF(WITH_GAMEENGINE) - ADD_DEFINITIONS(-DWITH_GAMEENGINE) -ENDIF(WITH_GAMEENGINE) +if(WITH_GAMEENGINE) + add_definitions(-DWITH_GAMEENGINE) +endif() -IF(WITH_IMAGE_OPENEXR) - ADD_DEFINITIONS(-DWITH_OPENEXR) -ENDIF(WITH_IMAGE_OPENEXR) +if(WITH_IMAGE_OPENEXR) + add_definitions(-DWITH_OPENEXR) +endif() -IF(WITH_IMAGE_TIFF) - ADD_DEFINITIONS(-DWITH_TIFF) -ENDIF(WITH_IMAGE_TIFF) +if(WITH_IMAGE_TIFF) + add_definitions(-DWITH_TIFF) +endif() -IF(WITH_IMAGE_OPENJPEG) - ADD_DEFINITIONS(-DWITH_OPENJPEG) -ENDIF(WITH_IMAGE_OPENJPEG) +if(WITH_IMAGE_OPENJPEG) + add_definitions(-DWITH_OPENJPEG) +endif() -IF(WITH_IMAGE_DDS) - ADD_DEFINITIONS(-DWITH_DDS) -ENDIF(WITH_IMAGE_DDS) +if(WITH_IMAGE_DDS) + add_definitions(-DWITH_DDS) +endif() -IF(WITH_IMAGE_CINEON) - ADD_DEFINITIONS(-DWITH_CINEON) -ENDIF(WITH_IMAGE_CINEON) +if(WITH_IMAGE_CINEON) + add_definitions(-DWITH_CINEON) +endif() -IF(WITH_IMAGE_HDR) - ADD_DEFINITIONS(-DWITH_HDR) -ENDIF(WITH_IMAGE_HDR) +if(WITH_IMAGE_HDR) + add_definitions(-DWITH_HDR) +endif() -IF(WITH_CODEC_QUICKTIME) - LIST(APPEND INC ../../quicktime) - ADD_DEFINITIONS(-DWITH_QUICKTIME) -ENDIF(WITH_CODEC_QUICKTIME) +if(WITH_CODEC_QUICKTIME) + list(APPEND INC ../../quicktime) + add_definitions(-DWITH_QUICKTIME) +endif() -IF(WITH_CODEC_FFMPEG) - LIST(APPEND INC ${FFMPEG_INC}) - ADD_DEFINITIONS(-DWITH_FFMPEG) -ENDIF(WITH_CODEC_FFMPEG) +if(WITH_CODEC_FFMPEG) + list(APPEND INC ${FFMPEG_INC}) + add_definitions(-DWITH_FFMPEG) +endif() -IF(WITH_LCMS) - LIST(APPEND INC ${LCMS_INCLUDE_DIR}) - ADD_DEFINITIONS(-DWITH_LCMS) -ENDIF(WITH_LCMS) +if(WITH_LCMS) + list(APPEND INC ${LCMS_INCLUDE_DIR}) + add_definitions(-DWITH_LCMS) +endif() -IF(NOT WITH_MOD_FLUID) - ADD_DEFINITIONS(-DDISABLE_ELBEEM) -ENDIF(NOT WITH_MOD_FLUID) +if(NOT WITH_MOD_FLUID) + add_definitions(-DDISABLE_ELBEEM) +endif() -IF(WITH_FFTW3) - ADD_DEFINITIONS(-DFFTW3=1) -ENDIF(WITH_FFTW3) +if(WITH_FFTW3) + add_definitions(-DFFTW3=1) +endif() -IF(WITH_SDL) - ADD_DEFINITIONS(-DWITH_SDL) -ENDIF(WITH_SDL) +if(WITH_SDL) + add_definitions(-DWITH_SDL) +endif() -IF(WITH_OPENAL) - ADD_DEFINITIONS(-DWITH_OPENAL) -ENDIF(WITH_OPENAL) +if(WITH_OPENAL) + add_definitions(-DWITH_OPENAL) +endif() -IF(WITH_JACK) - ADD_DEFINITIONS(-DWITH_JACK) -ENDIF(WITH_JACK) +if(WITH_JACK) + add_definitions(-DWITH_JACK) +endif() -IF(WITH_OPENCOLLADA) - ADD_DEFINITIONS(-DWITH_COLLADA) -ENDIF(WITH_OPENCOLLADA) +if(WITH_OPENCOLLADA) + add_definitions(-DWITH_COLLADA) +endif() # Build makesrna executable -ADD_EXECUTABLE(makesrna ${SRC} ${INC_FILES}) -TARGET_LINK_LIBRARIES(makesrna bf_dna) +add_executable(makesrna ${SRC} ${INC_FILES}) +target_link_libraries(makesrna bf_dna) # Output rna_*_gen.c # note (linux only): with crashes try add this after COMMAND: valgrind --leak-check=full --track-origins=yes -ADD_CUSTOM_COMMAND( +add_custom_command( OUTPUT ${GENSRC} COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesrna ${CMAKE_CURRENT_BINARY_DIR}/ DEPENDS makesrna ) # Build bf_rna -SET(SRC +set(SRC rna_access.c ${GENSRC} @@ -166,4 +166,4 @@ SET(SRC rna_nodetree_types.h ) -BLENDERLIB(bf_rna "${SRC}" "${INC}") +blenderlib(bf_rna "${SRC}" "${INC}") diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c index 6bdb3fbc738..9748fadf1d2 100644 --- a/source/blender/makesrna/intern/rna_texture.c +++ b/source/blender/makesrna/intern/rna_texture.c @@ -473,7 +473,7 @@ static void rna_def_mtex(BlenderRNA *brna) prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR); RNA_def_property_float_sdna(prop, NULL, "r"); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Color", "The default color for textures that don't return RGB"); + RNA_def_property_ui_text(prop, "Color", "The default color for textures that don't return RGB or when RGB to intensity is enabled"); RNA_def_property_update(prop, 0, "rna_TextureSlot_update"); prop= RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE); diff --git a/source/blender/modifiers/CMakeLists.txt b/source/blender/modifiers/CMakeLists.txt index c14787aeae7..5948c0cca91 100644 --- a/source/blender/modifiers/CMakeLists.txt +++ b/source/blender/modifiers/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ./intern ../blenlib ../makesdna @@ -36,7 +36,7 @@ SET(INC ${ZLIB_INC} ) -SET(SRC +set(SRC intern/MOD_armature.c intern/MOD_array.c intern/MOD_bevel.c @@ -81,21 +81,21 @@ SET(SRC intern/MOD_util.h ) -IF(WITH_MOD_BOOLEAN) - ADD_DEFINITIONS(-DWITH_MOD_BOOLEAN) - LIST(APPEND SRC +if(WITH_MOD_BOOLEAN) + add_definitions(-DWITH_MOD_BOOLEAN) + list(APPEND SRC intern/MOD_boolean_util.c ) - LIST(APPEND INC ../../../intern/bsp/extern) -ENDIF(WITH_MOD_BOOLEAN) + list(APPEND INC ../../../intern/bsp/extern) +endif() -IF(WITH_MOD_DECIMATE) - ADD_DEFINITIONS(-DWITH_MOD_DECIMATE) - LIST(APPEND INC ../../../intern/decimation/extern) -ENDIF(WITH_MOD_DECIMATE) +if(WITH_MOD_DECIMATE) + add_definitions(-DWITH_MOD_DECIMATE) + list(APPEND INC ../../../intern/decimation/extern) +endif() -IF(NOT WITH_MOD_FLUID) - ADD_DEFINITIONS(-DDISABLE_ELBEEM) -ENDIF(NOT WITH_MOD_FLUID) +if(NOT WITH_MOD_FLUID) + add_definitions(-DDISABLE_ELBEEM) +endif() -BLENDERLIB(bf_modifiers "${SRC}" "${INC}") +blenderlib(bf_modifiers "${SRC}" "${INC}") diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt index 3628cb4f748..57c8f7bcad4 100644 --- a/source/blender/nodes/CMakeLists.txt +++ b/source/blender/nodes/CMakeLists.txt @@ -23,7 +23,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ../blenkernel ../blenlib @@ -37,7 +37,7 @@ SET(INC ../../../extern/glew/include ) -SET(SRC +set(SRC intern/CMP_nodes/CMP_alphaOver.c intern/CMP_nodes/CMP_bilateralblur.c intern/CMP_nodes/CMP_blur.c @@ -148,10 +148,10 @@ SET(SRC intern/node_util.h ) -IF(WITH_PYTHON) - SET(INC ${INC} ../python ${PYTHON_INC}) - ADD_DEFINITIONS(-DWITH_PYTHON) -ENDIF(WITH_PYTHON) +if(WITH_PYTHON) + set(INC ${INC} ../python ${PYTHON_INC}) + add_definitions(-DWITH_PYTHON) +endif() -BLENDERLIB(bf_nodes "${SRC}" "${INC}") +blenderlib(bf_nodes "${SRC}" "${INC}") diff --git a/source/blender/python/CMakeLists.txt b/source/blender/python/CMakeLists.txt index b006e7b0be6..fe9e0307703 100644 --- a/source/blender/python/CMakeLists.txt +++ b/source/blender/python/CMakeLists.txt @@ -16,5 +16,5 @@ # # ***** END GPL LICENSE BLOCK ***** -ADD_SUBDIRECTORY(intern) -ADD_SUBDIRECTORY(generic) +add_subdirectory(intern) +add_subdirectory(generic) diff --git a/source/blender/python/generic/CMakeLists.txt b/source/blender/python/generic/CMakeLists.txt index 5f5575f206b..5569dda2ce6 100644 --- a/source/blender/python/generic/CMakeLists.txt +++ b/source/blender/python/generic/CMakeLists.txt @@ -18,7 +18,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ../../blenlib ../../makesdna @@ -28,7 +28,7 @@ SET(INC ${PYTHON_INC} ) -SET(SRC +set(SRC IDProp.c bgl.c blf_api.c @@ -57,4 +57,4 @@ SET(SRC py_capi_utils.h ) -BLENDERLIB(bf_python_ext "${SRC}" "${INC}") +blenderlib(bf_python_ext "${SRC}" "${INC}") diff --git a/source/blender/python/intern/CMakeLists.txt b/source/blender/python/intern/CMakeLists.txt index b0ef6efb7d4..86b2e0deb04 100644 --- a/source/blender/python/intern/CMakeLists.txt +++ b/source/blender/python/intern/CMakeLists.txt @@ -23,7 +23,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../ ../../blenlib ../../makesdna @@ -36,7 +36,7 @@ SET(INC ${PYTHON_INC} ) -SET(SRC +set(SRC bpy.c bpy_app.c bpy_driver.c @@ -62,8 +62,8 @@ SET(SRC ) # only to check if buildinfo is available -IF(WITH_BUILDINFO) - ADD_DEFINITIONS(-DBUILD_DATE) -ENDIF(WITH_BUILDINFO) +if(WITH_BUILDINFO) + add_definitions(-DBUILD_DATE) +endif() -BLENDERLIB(bf_python "${SRC}" "${INC}") +blenderlib(bf_python "${SRC}" "${INC}") diff --git a/source/blender/quicktime/CMakeLists.txt b/source/blender/quicktime/CMakeLists.txt index ebb6949e2ce..f5565153a01 100644 --- a/source/blender/quicktime/CMakeLists.txt +++ b/source/blender/quicktime/CMakeLists.txt @@ -24,25 +24,25 @@ # # ***** END GPL LICENSE BLOCK ***** -IF(USE_QTKIT) - SET(SRC +if(USE_QTKIT) + set(SRC apple/qtkit_import.m apple/qtkit_export.m quicktime_export.h quicktime_import.h ) -ELSE(USE_QTKIT) - SET(SRC +else() + set(SRC apple/quicktime_import.c apple/quicktime_export.c quicktime_export.h quicktime_import.h ) -ENDIF(USE_QTKIT) +endif() -SET(INC +set(INC . ../quicktime ../makesdna @@ -61,6 +61,6 @@ SET(INC ${QUICKTIME_INC} ) -ADD_DEFINITIONS(-DWITH_QUICKTIME) +add_definitions(-DWITH_QUICKTIME) -BLENDERLIB(bf_quicktime "${SRC}" "${INC}") +blenderlib(bf_quicktime "${SRC}" "${INC}") diff --git a/source/blender/readblenfile/CMakeLists.txt b/source/blender/readblenfile/CMakeLists.txt index 11128274e20..b6549338fbb 100644 --- a/source/blender/readblenfile/CMakeLists.txt +++ b/source/blender/readblenfile/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ../blenloader ../blenloader/intern @@ -34,10 +34,10 @@ SET(INC ../../kernel/gen_messaging ) -SET(SRC +set(SRC intern/BLO_readblenfile.c BLO_readblenfile.h ) -BLENDERLIB(bf_readblenfile "${SRC}" "${INC}") +blenderlib(bf_readblenfile "${SRC}" "${INC}") diff --git a/source/blender/render/CMakeLists.txt b/source/blender/render/CMakeLists.txt index fd3621a4cf8..779d8982926 100644 --- a/source/blender/render/CMakeLists.txt +++ b/source/blender/render/CMakeLists.txt @@ -25,9 +25,9 @@ # ***** END GPL LICENSE BLOCK ***** # remove warning until render branch merged. -REMOVE_STRICT_FLAGS() +remove_strict_flags() -SET(INC +set(INC intern/include extern/include ../blenlib @@ -41,7 +41,7 @@ SET(INC ../../../intern/guardedalloc ) -SET(SRC +set(SRC intern/raytrace/rayobject.cpp intern/raytrace/rayobject_qbvh.cpp intern/raytrace/rayobject_rtbuild.cpp @@ -111,20 +111,20 @@ SET(SRC intern/raytrace/vbvh.h ) -IF(WITH_IMAGE_OPENEXR) - ADD_DEFINITIONS(-DWITH_OPENEXR) -ENDIF(WITH_IMAGE_OPENEXR) +if(WITH_IMAGE_OPENEXR) + add_definitions(-DWITH_OPENEXR) +endif() -IF(WITH_CODEC_QUICKTIME) - LIST(APPEND INC ../quicktime ${QUICKTIME_INC}) - ADD_DEFINITIONS(-DWITH_QUICKTIME) -ENDIF(WITH_CODEC_QUICKTIME) +if(WITH_CODEC_QUICKTIME) + list(APPEND INC ../quicktime ${QUICKTIME_INC}) + add_definitions(-DWITH_QUICKTIME) +endif() -IF(APPLE) - IF(CMAKE_OSX_ARCHITECTURES MATCHES "i386" OR CMAKE_OSX_ARCHITECTURES MATCHES "x86_64") - SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -mfpmath=sse") - SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -mfpmath=sse") - ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES "i386" OR CMAKE_OSX_ARCHITECTURES MATCHES "x86_64") -ENDIF(APPLE) +if(APPLE) + if(CMAKE_OSX_ARCHITECTURES MATCHES "i386" OR CMAKE_OSX_ARCHITECTURES MATCHES "x86_64") + set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -mfpmath=sse") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -mfpmath=sse") + endif() +endif() -BLENDERLIB_NOLIST(bf_render "${SRC}" "${INC}") +blenderlib_nolist(bf_render "${SRC}" "${INC}") diff --git a/source/blender/windowmanager/CMakeLists.txt b/source/blender/windowmanager/CMakeLists.txt index b6920a02bfa..8f91011b210 100644 --- a/source/blender/windowmanager/CMakeLists.txt +++ b/source/blender/windowmanager/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ../nodes ../gpu @@ -47,7 +47,7 @@ SET(INC ${OPENGL_INCLUDE_DIR} ) -SET(SRC +set(SRC intern/wm.c intern/wm_apple.c intern/wm_cursors.c @@ -75,41 +75,41 @@ SET(SRC wm_window.h ) -ADD_DEFINITIONS(-DGLEW_STATIC) +add_definitions(-DGLEW_STATIC) -IF(WITH_INTERNATIONAL) - ADD_DEFINITIONS(-DINTERNATIONAL) -ENDIF(WITH_INTERNATIONAL) +if(WITH_INTERNATIONAL) + add_definitions(-DINTERNATIONAL) +endif() -IF(WITH_OPENCOLLADA) - ADD_DEFINITIONS(-DWITH_COLLADA) -ENDIF(WITH_OPENCOLLADA) +if(WITH_OPENCOLLADA) + add_definitions(-DWITH_COLLADA) +endif() -IF(WITH_CODEC_QUICKTIME) - LIST(APPEND INC ../quicktime ${QUICKTIME_INC}) - ADD_DEFINITIONS(-DWITH_QUICKTIME) -ENDIF(WITH_CODEC_QUICKTIME) +if(WITH_CODEC_QUICKTIME) + list(APPEND INC ../quicktime ${QUICKTIME_INC}) + add_definitions(-DWITH_QUICKTIME) +endif() -IF(WITH_CODEC_FFMPEG) - LIST(APPEND INC ${FFMPEG_INC}) - ADD_DEFINITIONS(-DWITH_FFMPEG) -ENDIF(WITH_CODEC_FFMPEG) +if(WITH_CODEC_FFMPEG) + list(APPEND INC ${FFMPEG_INC}) + add_definitions(-DWITH_FFMPEG) +endif() -IF(WITH_PYTHON) - LIST(APPEND INC ../python ${PYTHON_INC}) - ADD_DEFINITIONS(-DWITH_PYTHON) -ENDIF(WITH_PYTHON) +if(WITH_PYTHON) + list(APPEND INC ../python ${PYTHON_INC}) + add_definitions(-DWITH_PYTHON) +endif() -IF(WITH_GAMEENGINE) - ADD_DEFINITIONS(-DWITH_GAMEENGINE) -ENDIF(WITH_GAMEENGINE) +if(WITH_GAMEENGINE) + add_definitions(-DWITH_GAMEENGINE) +endif() -IF(WITH_COCOA) - LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/wm_apple.c") -ENDIF(WITH_COCOA) +if(WITH_COCOA) + list(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/wm_apple.c") +endif() -IF(WITH_BUILDINFO) - ADD_DEFINITIONS(-DNAN_BUILDINFO) -ENDIF(WITH_BUILDINFO) +if(WITH_BUILDINFO) + add_definitions(-DNAN_BUILDINFO) +endif() -BLENDERLIB_NOLIST(bf_windowmanager "${SRC}" "${INC}") +blenderlib_nolist(bf_windowmanager "${SRC}" "${INC}") diff --git a/source/blenderplayer/CMakeLists.txt b/source/blenderplayer/CMakeLists.txt index fa6521e7f8d..46a1d41d098 100644 --- a/source/blenderplayer/CMakeLists.txt +++ b/source/blenderplayer/CMakeLists.txt @@ -24,48 +24,48 @@ # # ***** END GPL LICENSE BLOCK ***** -MESSAGE(STATUS "Configuring blenderplayer") +message(STATUS "Configuring blenderplayer") -SETUP_LIBDIRS() +setup_libdirs() -IF(WITH_CODEC_QUICKTIME) - ADD_DEFINITIONS(-DWITH_QUICKTIME) -ENDIF(WITH_CODEC_QUICKTIME) +if(WITH_CODEC_QUICKTIME) + add_definitions(-DWITH_QUICKTIME) +endif() -IF(CMAKE_SYSTEM_NAME MATCHES "Linux") - ADD_DEFINITIONS(-DWITH_BINRELOC) - INCLUDE_DIRECTORIES(${BINRELOC_INC}) -ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux") +if(CMAKE_SYSTEM_NAME MATCHES "Linux") + add_definitions(-DWITH_BINRELOC) + include_directories(${BINRELOC_INC}) +endif() -ADD_CUSTOM_COMMAND( +add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dna.c COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna ${CMAKE_CURRENT_BINARY_DIR}/dna.c ${CMAKE_SOURCE_DIR}/source/blender/makesdna/ DEPENDS ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna ) -IF(WIN32 AND NOT UNIX) - ADD_EXECUTABLE(blenderplayer ${EXETYPE} ${CMAKE_CURRENT_BINARY_DIR}/dna.c ../icons/winblender.rc) -ELSE(WIN32 AND NOT UNIX) - ADD_EXECUTABLE(blenderplayer ${CMAKE_CURRENT_BINARY_DIR}/dna.c) -ENDIF(WIN32 AND NOT UNIX) +if(WIN32 AND NOT UNIX) + add_executable(blenderplayer ${EXETYPE} ${CMAKE_CURRENT_BINARY_DIR}/dna.c ../icons/winblender.rc) +else() + add_executable(blenderplayer ${CMAKE_CURRENT_BINARY_DIR}/dna.c) +endif() -ADD_DEPENDENCIES(blenderplayer makesdna) +add_dependencies(blenderplayer makesdna) -GET_PROPERTY(BLENDER_LINK_LIBS GLOBAL PROPERTY BLENDER_LINK_LIBS) +get_property(BLENDER_LINK_LIBS GLOBAL PROPERTY BLENDER_LINK_LIBS) -LIST(APPEND BLENDER_LINK_LIBS +list(APPEND BLENDER_LINK_LIBS ge_player_common ge_player_ghost blenkernel_blc ) -IF(CMAKE_SYSTEM_NAME MATCHES "Linux") - LIST(APPEND BLENDER_LINK_LIBS extern_binreloc) -ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux") +if(CMAKE_SYSTEM_NAME MATCHES "Linux") + list(APPEND BLENDER_LINK_LIBS extern_binreloc) +endif() -IF(UNIX) +if(UNIX) # Sort libraries - SET(BLENDER_SORTED_LIBS + set(BLENDER_SORTED_LIBS ge_player_ghost ge_player_common bf_intern_string @@ -123,34 +123,34 @@ IF(UNIX) bf_blenkernel # duplicate for linking ) - IF(WITH_CODEC_QUICKTIME) - LIST(APPEND BLENDER_SORTED_LIBS bf_quicktime) - ENDIF(WITH_CODEC_QUICKTIME) + if(WITH_CODEC_QUICKTIME) + list(APPEND BLENDER_SORTED_LIBS bf_quicktime) + endif() - IF(WITH_CXX_GUARDEDALLOC) - LIST(APPEND BLENDER_SORTED_LIBS bf_intern_guardedalloc_cpp) - ENDIF(WITH_CXX_GUARDEDALLOC) + if(WITH_CXX_GUARDEDALLOC) + list(APPEND BLENDER_SORTED_LIBS bf_intern_guardedalloc_cpp) + endif() - FOREACH(SORTLIB ${BLENDER_SORTED_LIBS}) - SET(REMLIB ${SORTLIB}) - FOREACH(SEARCHLIB ${BLENDER_LINK_LIBS}) - IF(${SEARCHLIB} STREQUAL ${SORTLIB}) - SET(REMLIB "") - ENDIF(${SEARCHLIB} STREQUAL ${SORTLIB}) - ENDFOREACH(SEARCHLIB) - IF(REMLIB) - MESSAGE(STATUS "Removing library ${REMLIB} from blenderplayer linking because: not configured") - LIST(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB}) - ENDIF(REMLIB) - ENDFOREACH(SORTLIB) + foreach(SORTLIB ${BLENDER_SORTED_LIBS}) + set(REMLIB ${SORTLIB}) + foreach(SEARCHLIB ${BLENDER_LINK_LIBS}) + if(${SEARCHLIB} STREQUAL ${SORTLIB}) + set(REMLIB "") + endif() + endforeach() + if(REMLIB) + message(STATUS "Removing library ${REMLIB} from blenderplayer linking because: not configured") + list(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB}) + endif() + endforeach() - TARGET_LINK_LIBRARIES(blenderplayer ${BLENDER_SORTED_LIBS}) -ELSE(UNIX) - TARGET_LINK_LIBRARIES(blenderplayer ${BLENDER_LINK_LIBS}) -ENDIF(UNIX) + target_link_libraries(blenderplayer ${BLENDER_SORTED_LIBS}) +else() + target_link_libraries(blenderplayer ${BLENDER_LINK_LIBS}) +endif() -IF(WITH_PLAYER) - ADD_SUBDIRECTORY(bad_level_call_stubs) -ENDIF(WITH_PLAYER) +if(WITH_PLAYER) + add_subdirectory(bad_level_call_stubs) +endif() -SETUP_LIBLINKS(blenderplayer) +setup_liblinks(blenderplayer) diff --git a/source/blenderplayer/bad_level_call_stubs/CMakeLists.txt b/source/blenderplayer/bad_level_call_stubs/CMakeLists.txt index 28510b0a113..0974438c272 100644 --- a/source/blenderplayer/bad_level_call_stubs/CMakeLists.txt +++ b/source/blenderplayer/bad_level_call_stubs/CMakeLists.txt @@ -25,9 +25,9 @@ # ***** END GPL LICENSE BLOCK ***** # this warning on generated files gets annoying -REMOVE_STRICT_FLAGS() +remove_strict_flags() -SET(INC +set(INC . .. ../../../intern/guardedalloc @@ -36,23 +36,23 @@ SET(INC ../../../source/blender/blenkernel ) -SET(SRC +set(SRC stubs.c ) -IF(WITH_BUILDINFO) - ADD_DEFINITIONS(-DBUILD_DATE) - LIST(APPEND SRC +if(WITH_BUILDINFO) + add_definitions(-DBUILD_DATE) + list(APPEND SRC ../../creator/buildinfo.c ) -ENDIF(WITH_BUILDINFO) +endif() -IF(WITH_GAMEENGINE) - ADD_DEFINITIONS(-DWITH_GAMEENGINE) -ENDIF(WITH_GAMEENGINE) +if(WITH_GAMEENGINE) + add_definitions(-DWITH_GAMEENGINE) +endif() -IF(WITH_INTERNATIONAL) - ADD_DEFINITIONS(-DWITH_FREETYPE2) -ENDIF(WITH_INTERNATIONAL) +if(WITH_INTERNATIONAL) + add_definitions(-DWITH_FREETYPE2) +endif() -BLENDERLIB_NOLIST(blenkernel_blc "${SRC}" "${INC}") +blenderlib_nolist(blenkernel_blc "${SRC}" "${INC}") diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 7b9d8421aa5..9561cd4831c 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -25,11 +25,11 @@ # ***** END GPL LICENSE BLOCK ***** # So BUILDINFO and BLENDERPATH strings are automatically quoted -CMAKE_POLICY(SET CMP0005 NEW) +cmake_policy(SET CMP0005 NEW) -SETUP_LIBDIRS() +setup_libdirs() -INCLUDE_DIRECTORIES( +include_directories( ../../intern/guardedalloc ../blender/blenlib ../blender/blenkernel @@ -42,69 +42,69 @@ INCLUDE_DIRECTORIES( ../blender/windowmanager ) -IF(WITH_CODEC_QUICKTIME) - ADD_DEFINITIONS(-DWITH_QUICKTIME) -ENDIF(WITH_CODEC_QUICKTIME) +if(WITH_CODEC_QUICKTIME) + add_definitions(-DWITH_QUICKTIME) +endif() -IF(WITH_IMAGE_OPENEXR) - ADD_DEFINITIONS(-DWITH_OPENEXR) -ENDIF(WITH_IMAGE_OPENEXR) +if(WITH_IMAGE_OPENEXR) + add_definitions(-DWITH_OPENEXR) +endif() -IF(WITH_IMAGE_TIFF) - ADD_DEFINITIONS(-DWITH_TIFF) -ENDIF(WITH_IMAGE_TIFF) +if(WITH_IMAGE_TIFF) + add_definitions(-DWITH_TIFF) +endif() -IF(WITH_IMAGE_DDS) - ADD_DEFINITIONS(-DWITH_DDS) -ENDIF(WITH_IMAGE_DDS) +if(WITH_IMAGE_DDS) + add_definitions(-DWITH_DDS) +endif() -IF(WITH_IMAGE_CINEON) - ADD_DEFINITIONS(-DWITH_CINEON) -ENDIF(WITH_IMAGE_CINEON) +if(WITH_IMAGE_CINEON) + add_definitions(-DWITH_CINEON) +endif() -IF(WITH_IMAGE_HDR) - ADD_DEFINITIONS(-DWITH_HDR) -ENDIF(WITH_IMAGE_HDR) +if(WITH_IMAGE_HDR) + add_definitions(-DWITH_HDR) +endif() -IF(WITH_PYTHON) - INCLUDE_DIRECTORIES(../blender/python) - ADD_DEFINITIONS(-DWITH_PYTHON) -ENDIF(WITH_PYTHON) +if(WITH_PYTHON) + include_directories(../blender/python) + add_definitions(-DWITH_PYTHON) +endif() -IF(WITH_GAMEENGINE) - INCLUDE_DIRECTORIES( +if(WITH_GAMEENGINE) + include_directories( ../kernel/gen_messaging ../kernel/gen_system ) - ADD_DEFINITIONS(-DWITH_GAMEENGINE) -ENDIF(WITH_GAMEENGINE) + add_definitions(-DWITH_GAMEENGINE) +endif() -IF(NOT WITH_SDL) - ADD_DEFINITIONS(-DDISABLE_SDL) -ENDIF(NOT WITH_SDL) +if(NOT WITH_SDL) + add_definitions(-DDISABLE_SDL) +endif() -IF(CMAKE_SYSTEM_NAME MATCHES "Linux") - ADD_DEFINITIONS(-DWITH_BINRELOC) - INCLUDE_DIRECTORIES(${BINRELOC_INC}) -ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux") +if(CMAKE_SYSTEM_NAME MATCHES "Linux") + add_definitions(-DWITH_BINRELOC) + include_directories(${BINRELOC_INC}) +endif() # Setup the exe sources and buildinfo -SET(SRC +set(SRC creator.c ) -IF(WIN32 AND NOT UNIX) - LIST(APPEND SRC +if(WIN32 AND NOT UNIX) + list(APPEND SRC ../icons/winblender.rc ) -ENDIF(WIN32 AND NOT UNIX) +endif() -IF(WITH_BUILDINFO) - STRING(REPLACE " " "\ " BUILDINFO_CFLAGS "${CMAKE_C_FLAGS}") - STRING(REPLACE " " "\ " BUILDINFO_CXXFLAGS "${CMAKE_CXX_FLAGS}") - STRING(REPLACE " " "\ " BUILDINFO_LINKFLAGS "${PLATFORM_LINKFLAGS}") - ADD_DEFINITIONS( +if(WITH_BUILDINFO) + string(REPLACE " " "\ " BUILDINFO_CFLAGS "${CMAKE_C_FLAGS}") + string(REPLACE " " "\ " BUILDINFO_CXXFLAGS "${CMAKE_CXX_FLAGS}") + string(REPLACE " " "\ " BUILDINFO_LINKFLAGS "${PLATFORM_LINKFLAGS}") + add_definitions( -DBUILD_DATE="${BUILD_DATE}" -DBUILD_TIME="${BUILD_TIME}" -DBUILD_REV="${BUILD_REV}" @@ -116,60 +116,60 @@ IF(WITH_BUILDINFO) -DBUILD_SYSTEM="CMake" ) - LIST(APPEND SRC + list(APPEND SRC buildinfo.c ) -ENDIF(WITH_BUILDINFO) +endif() -MESSAGE(STATUS "Configuring blender") +message(STATUS "Configuring blender") -ADD_EXECUTABLE(blender ${EXETYPE} ${SRC}) +add_executable(blender ${EXETYPE} ${SRC}) # Post build steps for bundling/packaging. -SET(TARGETDIR ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}) +set(TARGETDIR ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}) -IF(WITH_INSTALL) +if(WITH_INSTALL) - IF(UNIX) - ADD_CUSTOM_COMMAND(TARGET blender + if(UNIX) + add_custom_command(TARGET blender POST_BUILD MAIN_DEPENDENCY blender #COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/plugins ${TARGETDIR}/ #COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/text/* ${TARGETDIR}/ ) - ENDIF(UNIX) + endif() - IF(UNIX AND NOT APPLE) + if(UNIX AND NOT APPLE) # Local installation, "make install" can be done after this optionally - ADD_CUSTOM_COMMAND( + add_custom_command( TARGET blender POST_BUILD MAIN_DEPENDENCY blender COMMAND rm -Rf ${TARGETDIR}/${BLENDER_VERSION} COMMAND mkdir ${TARGETDIR}/${BLENDER_VERSION}/ COMMAND cp ${CMAKE_SOURCE_DIR}/release/bin/.blender/.bfont.ttf ${TARGETDIR}/${BLENDER_VERSION}/ ) - IF(WITH_INTERNATIONAL) - ADD_CUSTOM_COMMAND( + if(WITH_INTERNATIONAL) + add_custom_command( TARGET blender POST_BUILD MAIN_DEPENDENCY blender COMMAND cp ${CMAKE_SOURCE_DIR}/release/bin/.blender/.Blanguages ${TARGETDIR}/${BLENDER_VERSION}/ COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale ${TARGETDIR}/${BLENDER_VERSION}/ ) - ENDIF(WITH_INTERNATIONAL) + endif() - IF(WITH_PYTHON) - ADD_CUSTOM_COMMAND( + if(WITH_PYTHON) + add_custom_command( TARGET blender POST_BUILD MAIN_DEPENDENCY blender COMMENT "copying blender scripts..." COMMAND cp -R ${CMAKE_SOURCE_DIR}/release/scripts ${TARGETDIR}/${BLENDER_VERSION}/ COMMAND find ${TARGETDIR} -name "*.py?" -prune -exec rm -rf {} "\;" ) - IF(WITH_PYTHON_INSTALL) + if(WITH_PYTHON_INSTALL) # Copy the systems python into the install directory # Scons copy in tools/Blender.py - ADD_CUSTOM_COMMAND( + add_custom_command( TARGET blender POST_BUILD MAIN_DEPENDENCY blender COMMENT "copying a subset of the systems python..." @@ -191,10 +191,10 @@ IF(WITH_INSTALL) COMMAND find ${TARGETDIR}/${BLENDER_VERSION}/python/lib/python${PYTHON_VERSION} -name "*.py?" -exec rm -rf {} "\;" COMMAND find ${TARGETDIR}/${BLENDER_VERSION}/python/lib/python${PYTHON_VERSION} -name "*.so"-exec strip -s {} "\;" ) - ENDIF(WITH_PYTHON_INSTALL) - ENDIF(WITH_PYTHON) + endif() + endif() - ADD_CUSTOM_COMMAND( + add_custom_command( TARGET blender POST_BUILD MAIN_DEPENDENCY blender COMMAND find ${TARGETDIR} -name .svn -prune -exec rm -rf {} "\;" ) @@ -202,63 +202,63 @@ IF(WITH_INSTALL) # Above we bundle a portable distribution in ./bin # This is an optional "make install" which installs blender on the system. - INSTALL( + install( PROGRAMS ${TARGETDIR}/blender DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ) - IF(WITH_GAMEENGINE AND WITH_PLAYER) - INSTALL( + if(WITH_GAMEENGINE AND WITH_PLAYER) + install( PROGRAMS ${TARGETDIR}/blenderplayer DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ) - ENDIF(WITH_GAMEENGINE AND WITH_PLAYER) + endif() - INSTALL( + install( FILES ${CMAKE_SOURCE_DIR}/release/freedesktop/blender.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications ) - INSTALL( + install( FILES ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/scalable/blender.svg DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps ) - INSTALL( + install( PROGRAMS ${CMAKE_SOURCE_DIR}/release/bin/blender-thumbnailer.py DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ) - INSTALL( + install( FILES ${CMAKE_SOURCE_DIR}/doc/manpage/blender.1 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1 ) - INSTALL( + install( DIRECTORY ${CMAKE_SOURCE_DIR}/release/text/ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/blender PATTERN ".svn" EXCLUDE ) - INSTALL( + install( DIRECTORY ${CMAKE_SOURCE_DIR}/release/scripts/ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/blender/${BLENDER_VERSION}/scripts PATTERN ".svn" EXCLUDE PATTERN "*.pyc" EXCLUDE ) - INSTALL( + install( DIRECTORY ${CMAKE_SOURCE_DIR}/release/datafiles/brushicons/ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/blender/${BLENDER_VERSION}/datafiles/brushicons PATTERN ".svn" EXCLUDE ) - IF(WITH_INTERNATIONAL) - INSTALL( + if(WITH_INTERNATIONAL) + install( DIRECTORY ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale/ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/blender/${BLENDER_VERSION}/datafiles/locale PATTERN ".svn" EXCLUDE ) - ENDIF(WITH_INTERNATIONAL) + endif() # end "make install" - ELSEIF(WIN32) + elseif(WIN32) # notice 'xcopy /Y /H' on .bfont.ttf, this is needed when building over samba - ADD_CUSTOM_COMMAND(TARGET blender + add_custom_command(TARGET blender POST_BUILD MAIN_DEPENDENCY blender COMMAND if not exist \"${TARGETDIR}\\${BLENDER_VERSION}\" mkdir \"${TARGETDIR}\\${BLENDER_VERSION}\" @@ -271,41 +271,41 @@ IF(WITH_INSTALL) COMMAND copy /Y \"${CMAKE_SOURCE_DIR}\\release\\text\\*.*\" \"${TARGETDIR}\\\" ) - IF(CMAKE_CL_64) + if(CMAKE_CL_64) # gettext and png are statically linked on win64 - ADD_CUSTOM_COMMAND(TARGET blender + add_custom_command(TARGET blender POST_BUILD MAIN_DEPENDENCY blender COMMAND copy /Y \"${LIBDIR}\\zlib\\lib\\zlib.dll\" \"${TARGETDIR}\\\" ) - ELSE(CMAKE_CL_64) - ADD_CUSTOM_COMMAND(TARGET blender + else() + add_custom_command(TARGET blender POST_BUILD MAIN_DEPENDENCY blender COMMAND copy /Y \"${LIBDIR}\\gettext\\lib\\gnu_gettext.dll\" \"${TARGETDIR}\\\" COMMAND copy /Y \"${LIBDIR}\\png\\lib\\libpng.dll\" \"${TARGETDIR}\\\" COMMAND copy /Y \"${LIBDIR}\\zlib\\lib\\zlib.dll\" \"${TARGETDIR}\\\" ) - ENDIF(CMAKE_CL_64) + endif() - IF(MSVC) - ADD_CUSTOM_COMMAND(TARGET blender + if(MSVC) + add_custom_command(TARGET blender POST_BUILD MAIN_DEPENDENCY blender COMMAND copy /Y \"${LIBDIR}\\pthreads\\lib\\pthreadVC2.dll\" \"${TARGETDIR}\\\" ) - ELSE(MSVC) - ADD_CUSTOM_COMMAND(TARGET blender + else() + add_custom_command(TARGET blender POST_BUILD MAIN_DEPENDENCY blender COMMAND copy /Y \"${LIBDIR}\\pthreads\\lib\\pthreadGC2.dll\" \"${TARGETDIR}\\\" ) - ENDIF(MSVC) + endif() - IF(WITH_PYTHON) - IF(NOT CMAKE_BUILD_TYPE) # hack: with multi-configuration generator this is "", so for now copy both python31.dll/zip and python31_d.dll/zip - ADD_CUSTOM_COMMAND(TARGET blender + if(WITH_PYTHON) + if(NOT CMAKE_BUILD_TYPE) # hack: with multi-configuration generator this is "", so for now copy both python31.dll/zip and python31_d.dll/zip + add_custom_command(TARGET blender POST_BUILD MAIN_DEPENDENCY blender COMMAND if not exist \"${TARGETDIR}\\${BLENDER_VERSION}\\python\\lib\" mkdir \"${TARGETDIR}\\${BLENDER_VERSION}\\python\\lib\" @@ -320,37 +320,37 @@ IF(WITH_INSTALL) COMMAND if \"$(ConfigurationName)\" == \"MinSizeRel\" copy /Y \"${LIBDIR}\\python\\lib\\python31.dll\" \"${TARGETDIR}\\\" COMMAND if \"$(ConfigurationName)\" == \"MinSizeRel\" xcopy /E /Y \"${LIBDIR}\\release\\python31\\*.*\" \"${TARGETDIR}\\${BLENDER_VERSION}\\python\\lib\\\" ) - ELSE(NOT CMAKE_BUILD_TYPE) - IF(CMAKE_BUILD_TYPE STREQUAL Debug OR CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo) - ADD_CUSTOM_COMMAND(TARGET blender + else() + if(CMAKE_BUILD_TYPE STREQUAL Debug OR CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo) + add_custom_command(TARGET blender POST_BUILD MAIN_DEPENDENCY blender COMMAND copy /Y \"${LIBDIR}\\python\\lib\\python31_d.dll\" \"${TARGETDIR}\\\" COMMAND xcopy /E /Y \"${LIBDIR}\\release\\python31_d\\*.*\" \"${TARGETDIR}\\${BLENDER_VERSION}\\python\\lib\\\" ) - ELSE(CMAKE_BUILD_TYPE STREQUAL Debug OR CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo) - ADD_CUSTOM_COMMAND(TARGET blender + else() + add_custom_command(TARGET blender POST_BUILD MAIN_DEPENDENCY blender COMMAND copy /Y \"${LIBDIR}\\python\\lib\\python31.dll\" \"${TARGETDIR}\\\" COMMAND xcopy /E /Y \"${LIBDIR}\\release\\python31\\*.*\" \"${TARGETDIR}\\${BLENDER_VERSION}\\python\\lib\\\" ) - ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug OR CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo) - ENDIF(NOT CMAKE_BUILD_TYPE) - ENDIF(WITH_PYTHON) + endif() + endif() + endif() - IF(WITH_INTERNATIONAL) - IF(CMAKE_CL_64) + if(WITH_INTERNATIONAL) + if(CMAKE_CL_64) # iconv is statically linked on win64 - ADD_CUSTOM_COMMAND(TARGET blender + add_custom_command(TARGET blender POST_BUILD MAIN_DEPENDENCY blender COMMAND if not exist \"${TARGETDIR}\\${BLENDER_VERSION}\\config\\locale\" mkdir \"${TARGETDIR}\\${BLENDER_VERSION}\\config\\locale\" COMMAND copy /Y \"${CMAKE_SOURCE_DIR}\\release\\bin\\.blender\\.Blanguages\" \"${TARGETDIR}\\${BLENDER_VERSION}\\config\\\" COMMAND xcopy /E /Y \"${CMAKE_SOURCE_DIR}\\release\\bin\\.blender\\locale\\*.*\" \"${TARGETDIR}\\${BLENDER_VERSION}\\config\\locale\\\" ) - ELSE(CMAKE_CL_64) - ADD_CUSTOM_COMMAND(TARGET blender + else() + add_custom_command(TARGET blender POST_BUILD MAIN_DEPENDENCY blender COMMAND copy /Y \"${LIBDIR}\\iconv\\lib\\iconv.dll\" \"${TARGETDIR}\\\" @@ -358,11 +358,11 @@ IF(WITH_INSTALL) COMMAND copy /Y \"${CMAKE_SOURCE_DIR}\\release\\bin\\.blender\\.Blanguages\" \"${TARGETDIR}\\${BLENDER_VERSION}\\config\\\" COMMAND xcopy /E /Y \"${CMAKE_SOURCE_DIR}\\release\\bin\\.blender\\locale\\*.*\" \"${TARGETDIR}\\${BLENDER_VERSION}\\config\\locale\\\" ) - ENDIF(CMAKE_CL_64) - ENDIF(WITH_INTERNATIONAL) + endif() + endif() - IF(WITH_CODEC_FFMPEG) - ADD_CUSTOM_COMMAND(TARGET blender + if(WITH_CODEC_FFMPEG) + add_custom_command(TARGET blender POST_BUILD MAIN_DEPENDENCY blender COMMAND copy /Y \"${LIBDIR}\\ffmpeg\\lib\\avcodec-52.dll\" \"${TARGETDIR}\\\" @@ -371,50 +371,50 @@ IF(WITH_INSTALL) COMMAND copy /Y \"${LIBDIR}\\ffmpeg\\lib\\avutil-50.dll\" \"${TARGETDIR}\\\" COMMAND copy /Y \"${LIBDIR}\\ffmpeg\\lib\\swscale-0.dll\" \"${TARGETDIR}\\\" ) - ENDIF(WITH_CODEC_FFMPEG) + endif() - IF(WITH_CODEC_SNDFILE) - ADD_CUSTOM_COMMAND(TARGET blender + if(WITH_CODEC_SNDFILE) + add_custom_command(TARGET blender POST_BUILD MAIN_DEPENDENCY blender COMMAND copy /Y \"${LIBDIR}\\sndfile\\lib\\libsndfile-1.dll\" \"${TARGETDIR}\\\" ) - ENDIF(WITH_CODEC_SNDFILE) + endif() - IF(WITH_JACK) - ADD_CUSTOM_COMMAND(TARGET blender + if(WITH_JACK) + add_custom_command(TARGET blender POST_BUILD MAIN_DEPENDENCY blender COMMAND copy /Y \"${LIBDIR}\\jack\\lib\\libjack.dll\" \"${TARGETDIR}\\\" ) - ENDIF(WITH_JACK) + endif() - IF(WITH_OPENAL) - ADD_CUSTOM_COMMAND(TARGET blender + if(WITH_OPENAL) + add_custom_command(TARGET blender POST_BUILD MAIN_DEPENDENCY blender COMMAND copy /Y \"${LIBDIR}\\openal\\lib\\OpenAL32.dll\" \"${TARGETDIR}\\\" COMMAND copy /Y \"${LIBDIR}\\openal\\lib\\wrap_oal.dll\" \"${TARGETDIR}\\\" ) - ENDIF(WITH_OPENAL) + endif() - IF(WITH_SDL) - IF(NOT CMAKE_CL_64) - ADD_CUSTOM_COMMAND(TARGET blender + if(WITH_SDL) + if(NOT CMAKE_CL_64) + add_custom_command(TARGET blender POST_BUILD MAIN_DEPENDENCY blender COMMAND copy /Y \"${LIBDIR}\\sdl\\lib\\SDL.dll\" \"${TARGETDIR}\\\" ) - ENDIF(NOT CMAKE_CL_64) - ENDIF(WITH_SDL) + endif() + endif() - ELSEIF(APPLE) - SET(SOURCEDIR ${CMAKE_SOURCE_DIR}/source/darwin/blender.app) - SET(SOURCEINFO ${SOURCEDIR}/Contents/Info.plist) - SET(TARGETINFO ${TARGETDIR}/blender.app/Contents/Info.plist) + elseif(APPLE) + set(SOURCEDIR ${CMAKE_SOURCE_DIR}/source/darwin/blender.app) + set(SOURCEINFO ${SOURCEDIR}/Contents/Info.plist) + set(TARGETINFO ${TARGETDIR}/blender.app/Contents/Info.plist) - ADD_CUSTOM_COMMAND( + add_custom_command( TARGET blender POST_BUILD MAIN_DEPENDENCY blender COMMAND cp -Rf ${SOURCEINFO} ${TARGETDIR}/blender.app/Contents/ COMMAND cp -Rf ${SOURCEDIR}/Contents/PkgInfo ${TARGETDIR}/blender.app/Contents/ @@ -426,49 +426,49 @@ IF(WITH_INSTALL) COMMAND cp ${CMAKE_SOURCE_DIR}/release/bin/.blender/.bfont.ttf ${TARGETDIR}/blender.app/Contents/MacOS/${BLENDER_VERSION}/datafiles/ ) - IF(WITH_INTERNATIONAL) - ADD_CUSTOM_COMMAND( + if(WITH_INTERNATIONAL) + add_custom_command( TARGET blender POST_BUILD MAIN_DEPENDENCY blender COMMAND cp ${CMAKE_SOURCE_DIR}/release/bin/.blender/.Blanguages ${TARGETDIR}/blender.app/Contents/MacOS/${BLENDER_VERSION}/datafiles/ COMMAND cp -Rf ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale ${TARGETDIR}/blender.app/Contents/MacOS/${BLENDER_VERSION}/datafiles/ ) - ENDIF(WITH_INTERNATIONAL) + endif() - IF(WITH_PYTHON) - SET(PYTHON_ZIP "python_${CMAKE_OSX_ARCHITECTURES}.zip") - ADD_CUSTOM_COMMAND( + if(WITH_PYTHON) + set(PYTHON_ZIP "python_${CMAKE_OSX_ARCHITECTURES}.zip") + add_custom_command( TARGET blender POST_BUILD MAIN_DEPENDENCY blender COMMAND cp -Rf ${CMAKE_SOURCE_DIR}/release/scripts ${TARGETDIR}/blender.app/Contents/MacOS/${BLENDER_VERSION}/ COMMAND mkdir ${TARGETDIR}/blender.app/Contents/MacOS/${BLENDER_VERSION}/python/ COMMAND unzip -q ${LIBDIR}/release/${PYTHON_ZIP} -d ${TARGETDIR}/blender.app/Contents/MacOS/${BLENDER_VERSION}/python/ COMMAND find ${TARGETDIR}/blender.app -name "*.py?" -prune -exec rm -rf {} "\;" ) - ENDIF(WITH_PYTHON) + endif() - ADD_CUSTOM_COMMAND( + add_custom_command( TARGET blender POST_BUILD MAIN_DEPENDENCY blender COMMAND find ${TARGETDIR}/blender.app -name .DS_Store -prune -exec rm -rf {} "\;" COMMAND find ${TARGETDIR}/blender.app -name .svn -prune -exec rm -rf {} "\;" COMMAND find ${TARGETDIR}/blender.app -name __MACOSX -prune -exec rm -rf {} "\;" ) - ENDIF(UNIX AND NOT APPLE) + endif() -ENDIF(WITH_INSTALL) +endif() -ADD_DEPENDENCIES(blender makesdna) +add_dependencies(blender makesdna) -GET_PROPERTY(BLENDER_LINK_LIBS GLOBAL PROPERTY BLENDER_LINK_LIBS) +get_property(BLENDER_LINK_LIBS GLOBAL PROPERTY BLENDER_LINK_LIBS) -SET(BLENDER_LINK_LIBS bf_nodes ${BLENDER_LINK_LIBS} bf_windowmanager bf_render) +set(BLENDER_LINK_LIBS bf_nodes ${BLENDER_LINK_LIBS} bf_windowmanager bf_render) -IF(WITH_MOD_FLUID) - LIST(APPEND BLENDER_LINK_LIBS bf_intern_elbeem) -ENDIF(WITH_MOD_FLUID) +if(WITH_MOD_FLUID) + list(APPEND BLENDER_LINK_LIBS bf_intern_elbeem) +endif() -#IF(UNIX) +#if(UNIX) # Sort libraries - SET(BLENDER_SORTED_LIBS + set(BLENDER_SORTED_LIBS bf_windowmanager bf_editor_space_api @@ -570,38 +570,38 @@ ENDIF(WITH_MOD_FLUID) bf_intern_audaspace ) - IF(CMAKE_SYSTEM_NAME MATCHES "Linux") - LIST(APPEND BLENDER_SORTED_LIBS extern_binreloc) - ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux") + if(CMAKE_SYSTEM_NAME MATCHES "Linux") + list(APPEND BLENDER_SORTED_LIBS extern_binreloc) + endif() - IF(WITH_CXX_GUARDEDALLOC) - LIST(APPEND BLENDER_SORTED_LIBS bf_intern_guardedalloc_cpp) - ENDIF(WITH_CXX_GUARDEDALLOC) + if(WITH_CXX_GUARDEDALLOC) + list(APPEND BLENDER_SORTED_LIBS bf_intern_guardedalloc_cpp) + endif() - IF(WITH_IK_ITASC) - LIST(APPEND BLENDER_SORTED_LIBS bf_intern_itasc) - ENDIF(WITH_IK_ITASC) + if(WITH_IK_ITASC) + list(APPEND BLENDER_SORTED_LIBS bf_intern_itasc) + endif() - IF(WITH_CODEC_QUICKTIME) - LIST(APPEND BLENDER_SORTED_LIBS bf_quicktime) - ENDIF(WITH_CODEC_QUICKTIME) + if(WITH_CODEC_QUICKTIME) + list(APPEND BLENDER_SORTED_LIBS bf_quicktime) + endif() - FOREACH(SORTLIB ${BLENDER_SORTED_LIBS}) - SET(REMLIB ${SORTLIB}) - FOREACH(SEARCHLIB ${BLENDER_LINK_LIBS}) - IF(${SEARCHLIB} STREQUAL ${SORTLIB}) - SET(REMLIB "") - ENDIF(${SEARCHLIB} STREQUAL ${SORTLIB}) - ENDFOREACH(SEARCHLIB) - IF(REMLIB) - MESSAGE(STATUS "Removing library ${REMLIB} from blender linking because: not configured") - LIST(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB}) - ENDIF(REMLIB) - ENDFOREACH(SORTLIB) - TARGET_LINK_LIBRARIES(blender ${BLENDER_SORTED_LIBS}) -#ELSE(UNIX) -# TARGET_LINK_LIBRARIES(blender ${BLENDER_LINK_LIBS}) -#ENDIF(UNIX) + foreach(SORTLIB ${BLENDER_SORTED_LIBS}) + set(REMLIB ${SORTLIB}) + foreach(SEARCHLIB ${BLENDER_LINK_LIBS}) + if(${SEARCHLIB} STREQUAL ${SORTLIB}) + set(REMLIB "") + endif() + endforeach() + if(REMLIB) + message(STATUS "Removing library ${REMLIB} from blender linking because: not configured") + list(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB}) + endif() + endforeach() + target_link_libraries(blender ${BLENDER_SORTED_LIBS}) +#else() +# target_link_libraries(blender ${BLENDER_LINK_LIBS}) +#endif() -SETUP_LIBLINKS(blender) +setup_liblinks(blender) diff --git a/source/gameengine/BlenderRoutines/CMakeLists.txt b/source/gameengine/BlenderRoutines/CMakeLists.txt index 66a26e9ff79..098cf71ac9f 100644 --- a/source/gameengine/BlenderRoutines/CMakeLists.txt +++ b/source/gameengine/BlenderRoutines/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(INC +set(INC . ../../../source/kernel/gen_system ../../../intern/string @@ -32,7 +32,7 @@ SET(INC ../../../extern/glew/include ) -SET(SRC +set(SRC BL_KetsjiEmbedStart.cpp KX_BlenderCanvas.cpp KX_BlenderGL.cpp @@ -51,10 +51,10 @@ SET(SRC KX_BlenderSystem.h ) -ADD_DEFINITIONS(-DGLEW_STATIC) +add_definitions(-DGLEW_STATIC) -IF(WITH_CODEC_FFMPEG) - ADD_DEFINITIONS(-DWITH_FFMPEG) -ENDIF(WITH_CODEC_FFMPEG) +if(WITH_CODEC_FFMPEG) + add_definitions(-DWITH_FFMPEG) +endif() -BLENDERLIB(ge_blen_routines "${SRC}" "${INC}") +blenderlib(ge_blen_routines "${SRC}" "${INC}") diff --git a/source/gameengine/CMakeLists.txt b/source/gameengine/CMakeLists.txt index 7f8abfec8c5..686cb7cc8fa 100644 --- a/source/gameengine/CMakeLists.txt +++ b/source/gameengine/CMakeLists.txt @@ -25,33 +25,33 @@ # ***** END GPL LICENSE BLOCK ***** # there are too many inter-includes so best define here -IF(WITH_PYTHON) - INCLUDE_DIRECTORIES(${PYTHON_INC}) - ADD_DEFINITIONS(-DWITH_PYTHON) -ENDIF(WITH_PYTHON) +if(WITH_PYTHON) + include_directories(${PYTHON_INC}) + add_definitions(-DWITH_PYTHON) +endif() -ADD_SUBDIRECTORY(BlenderRoutines) -ADD_SUBDIRECTORY(Converter) -ADD_SUBDIRECTORY(Expressions) -ADD_SUBDIRECTORY(GameLogic) -ADD_SUBDIRECTORY(Ketsji) -ADD_SUBDIRECTORY(Ketsji/KXNetwork) -ADD_SUBDIRECTORY(Network) -ADD_SUBDIRECTORY(Network/LoopBackNetwork) -ADD_SUBDIRECTORY(Physics/common) -ADD_SUBDIRECTORY(Physics/Dummy) -ADD_SUBDIRECTORY(Rasterizer) -ADD_SUBDIRECTORY(Rasterizer/RAS_OpenGLRasterizer) -ADD_SUBDIRECTORY(SceneGraph) +add_subdirectory(BlenderRoutines) +add_subdirectory(Converter) +add_subdirectory(Expressions) +add_subdirectory(GameLogic) +add_subdirectory(Ketsji) +add_subdirectory(Ketsji/KXNetwork) +add_subdirectory(Network) +add_subdirectory(Network/LoopBackNetwork) +add_subdirectory(Physics/common) +add_subdirectory(Physics/Dummy) +add_subdirectory(Rasterizer) +add_subdirectory(Rasterizer/RAS_OpenGLRasterizer) +add_subdirectory(SceneGraph) -IF(WITH_BULLET) - ADD_SUBDIRECTORY(Physics/Bullet) -ENDIF(WITH_BULLET) +if(WITH_BULLET) + add_subdirectory(Physics/Bullet) +endif() -IF(WITH_PYTHON) - ADD_SUBDIRECTORY(VideoTexture) -ENDIF(WITH_PYTHON) +if(WITH_PYTHON) + add_subdirectory(VideoTexture) +endif() -IF(WITH_PLAYER) - ADD_SUBDIRECTORY(GamePlayer) -ENDIF(WITH_PLAYER) +if(WITH_PLAYER) + add_subdirectory(GamePlayer) +endif() diff --git a/source/gameengine/Converter/CMakeLists.txt b/source/gameengine/Converter/CMakeLists.txt index a930fcb0c01..efffd5d2e99 100644 --- a/source/gameengine/Converter/CMakeLists.txt +++ b/source/gameengine/Converter/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ../../../source/kernel/gen_system ../../../intern/string @@ -59,7 +59,7 @@ SET(INC ../../../extern/bullet2/src ) -SET(SRC +set(SRC BL_ActionActuator.cpp BL_ArmatureActuator.cpp BL_ArmatureChannel.cpp @@ -105,8 +105,8 @@ SET(SRC KX_SoftBodyDeformer.h ) -IF(WITH_BULLET) - ADD_DEFINITIONS(-DUSE_BULLET) -ENDIF(WITH_BULLET) +if(WITH_BULLET) + add_definitions(-DUSE_BULLET) +endif() -BLENDERLIB(ge_converter "${SRC}" "${INC}") +blenderlib(ge_converter "${SRC}" "${INC}") diff --git a/source/gameengine/Expressions/CMakeLists.txt b/source/gameengine/Expressions/CMakeLists.txt index 1197927bb87..5a445bc1f82 100644 --- a/source/gameengine/Expressions/CMakeLists.txt +++ b/source/gameengine/Expressions/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ../../../source/kernel/gen_system ../../../intern/string @@ -34,7 +34,7 @@ SET(INC ../../../source/blender/blenloader ) -SET(SRC +set(SRC BoolValue.cpp ConstExpr.cpp EXP_C-Api.cpp @@ -78,4 +78,4 @@ SET(SRC VoidValue.h ) -BLENDERLIB(ge_logic_expressions "${SRC}" "${INC}") +blenderlib(ge_logic_expressions "${SRC}" "${INC}") diff --git a/source/gameengine/GameLogic/CMakeLists.txt b/source/gameengine/GameLogic/CMakeLists.txt index e8de2ebd53c..d2c6731d530 100644 --- a/source/gameengine/GameLogic/CMakeLists.txt +++ b/source/gameengine/GameLogic/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ../../../source/kernel/gen_system ../../../intern/string @@ -34,7 +34,7 @@ SET(INC ../../../source/gameengine/Rasterizer ) -SET(SRC +set(SRC Joystick/SCA_Joystick.cpp Joystick/SCA_JoystickEvents.cpp SCA_2DFilterActuator.cpp @@ -123,10 +123,10 @@ SET(SRC SCA_XORController.h ) -IF(WITH_SDL) - SET(INC ${INC} ${SDL_INCLUDE_DIR}) -ELSE(WITH_SDL) - ADD_DEFINITIONS(-DDISABLE_SDL) -ENDIF(WITH_SDL) +if(WITH_SDL) + set(INC ${INC} ${SDL_INCLUDE_DIR}) +else() + add_definitions(-DDISABLE_SDL) +endif() -BLENDERLIB(ge_logic "${SRC}" "${INC}") +blenderlib(ge_logic "${SRC}" "${INC}") diff --git a/source/gameengine/GamePlayer/CMakeLists.txt b/source/gameengine/GamePlayer/CMakeLists.txt index f0ce3afbe10..ab89b18a09b 100644 --- a/source/gameengine/GamePlayer/CMakeLists.txt +++ b/source/gameengine/GamePlayer/CMakeLists.txt @@ -24,9 +24,9 @@ # # ***** END GPL LICENSE BLOCK ***** -ADD_SUBDIRECTORY(common) -ADD_SUBDIRECTORY(ghost) +add_subdirectory(common) +add_subdirectory(ghost) -IF(WITH_WEBPLUGIN) - ADD_SUBDIRECTORY(xembed) -ENDIF(WITH_WEBPLUGIN) +if(WITH_WEBPLUGIN) + add_subdirectory(xembed) +endif() diff --git a/source/gameengine/GamePlayer/common/CMakeLists.txt b/source/gameengine/GamePlayer/common/CMakeLists.txt index d3b053c90b1..e0338f672e0 100644 --- a/source/gameengine/GamePlayer/common/CMakeLists.txt +++ b/source/gameengine/GamePlayer/common/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ../../../../intern/string ../../../../intern/ghost @@ -56,7 +56,7 @@ SET(INC ${ZLIB_INC} ) -SET(SRC +set(SRC bmfont.cpp GPC_Canvas.cpp GPC_Engine.cpp @@ -79,6 +79,6 @@ SET(SRC GPC_System.h ) -ADD_DEFINITIONS(-DGLEW_STATIC) +add_definitions(-DGLEW_STATIC) -BLENDERLIB_NOLIST(ge_player_common "${SRC}" "${INC}") +blenderlib_nolist(ge_player_common "${SRC}" "${INC}") diff --git a/source/gameengine/GamePlayer/ghost/CMakeLists.txt b/source/gameengine/GamePlayer/ghost/CMakeLists.txt index 906ece9ded8..7078296ac32 100644 --- a/source/gameengine/GamePlayer/ghost/CMakeLists.txt +++ b/source/gameengine/GamePlayer/ghost/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ../../../../intern/string ../../../../intern/ghost @@ -57,7 +57,7 @@ SET(INC ${PYTHON_INC} ) -SET(SRC +set(SRC GPG_Application.cpp GPG_Canvas.cpp GPG_ghost.cpp @@ -70,10 +70,10 @@ SET(SRC GPG_System.h ) -ADD_DEFINITIONS(-DGLEW_STATIC) +add_definitions(-DGLEW_STATIC) -IF(WITH_CODEC_FFMPEG) - ADD_DEFINITIONS(-DWITH_FFMPEG) -ENDIF(WITH_CODEC_FFMPEG) +if(WITH_CODEC_FFMPEG) + add_definitions(-DWITH_FFMPEG) +endif() -BLENDERLIB_NOLIST(ge_player_ghost "${SRC}" "${INC}") +blenderlib_nolist(ge_player_ghost "${SRC}" "${INC}") diff --git a/source/gameengine/Ketsji/CMakeLists.txt b/source/gameengine/Ketsji/CMakeLists.txt index a7c8ad9d0dd..4931299a8e5 100644 --- a/source/gameengine/Ketsji/CMakeLists.txt +++ b/source/gameengine/Ketsji/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ../../../source/kernel/gen_system ../../../intern/string @@ -54,7 +54,7 @@ SET(INC ../../../extern/glew/include ) -SET(SRC +set(SRC BL_BlenderShader.cpp BL_Material.cpp BL_Shader.cpp @@ -200,22 +200,22 @@ SET(SRC BL_Texture.h ) -ADD_DEFINITIONS(-DGLEW_STATIC) +add_definitions(-DGLEW_STATIC) -IF(WITH_SDL) - SET(INC ${INC} ${SDL_INCLUDE_DIR}) -ELSE(WITH_SDL) - ADD_DEFINITIONS(-DDISABLE_SDL) -ENDIF(WITH_SDL) +if(WITH_SDL) + set(INC ${INC} ${SDL_INCLUDE_DIR}) +else() + add_definitions(-DDISABLE_SDL) +endif() -IF(WITH_CODEC_FFMPEG) - ADD_DEFINITIONS(-DWITH_FFMPEG) -ENDIF(WITH_CODEC_FFMPEG) +if(WITH_CODEC_FFMPEG) + add_definitions(-DWITH_FFMPEG) +endif() -IF(WITH_BULLET) - ADD_DEFINITIONS(-DUSE_BULLET) - LIST(APPEND INC ../../../extern/bullet2/src) - LIST(APPEND INC ../../../source/gameengine/Physics/Bullet ) -ENDIF(WITH_BULLET) +if(WITH_BULLET) + add_definitions(-DUSE_BULLET) + list(APPEND INC ../../../extern/bullet2/src) + list(APPEND INC ../../../source/gameengine/Physics/Bullet ) +endif() -BLENDERLIB(ge_logic_ketsji "${SRC}" "${INC}") +blenderlib(ge_logic_ketsji "${SRC}" "${INC}") diff --git a/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt b/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt index 687f19b9022..a88fe0c5252 100644 --- a/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt +++ b/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ../../../../source/kernel/gen_system ../../../../intern/string @@ -36,7 +36,7 @@ SET(INC ../../../../source/gameengine/Network ) -SET(SRC +set(SRC KX_NetworkEventManager.cpp KX_NetworkMessageActuator.cpp KX_NetworkMessageSensor.cpp @@ -50,4 +50,4 @@ SET(SRC KX_NetworkObjectSensor.h ) -BLENDERLIB(ge_logic_network "${SRC}" "${INC}") +blenderlib(ge_logic_network "${SRC}" "${INC}") diff --git a/source/gameengine/Network/CMakeLists.txt b/source/gameengine/Network/CMakeLists.txt index c337d6f48cb..dd64f0e8437 100644 --- a/source/gameengine/Network/CMakeLists.txt +++ b/source/gameengine/Network/CMakeLists.txt @@ -24,14 +24,14 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ../../../source/kernel/gen_system ../../../intern/string ../../../intern/moto/include ) -SET(SRC +set(SRC NG_NetworkMessage.cpp NG_NetworkObject.cpp NG_NetworkScene.cpp @@ -42,4 +42,4 @@ SET(SRC NG_NetworkScene.h ) -BLENDERLIB(ge_logic_ngnetwork "${SRC}" "${INC}") +blenderlib(ge_logic_ngnetwork "${SRC}" "${INC}") diff --git a/source/gameengine/Network/LoopBackNetwork/CMakeLists.txt b/source/gameengine/Network/LoopBackNetwork/CMakeLists.txt index e7a170fef98..b26a87666dc 100644 --- a/source/gameengine/Network/LoopBackNetwork/CMakeLists.txt +++ b/source/gameengine/Network/LoopBackNetwork/CMakeLists.txt @@ -24,17 +24,17 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ../../../../source/kernel/gen_system ../../../../intern/string ../../../../source/gameengine/Network ) -SET(SRC +set(SRC NG_LoopBackNetworkDeviceInterface.cpp NG_LoopBackNetworkDeviceInterface.h ) -BLENDERLIB(ge_logic_loopbacknetwork "${SRC}" "${INC}") +blenderlib(ge_logic_loopbacknetwork "${SRC}" "${INC}") diff --git a/source/gameengine/Physics/Bullet/CMakeLists.txt b/source/gameengine/Physics/Bullet/CMakeLists.txt index 7a48c774cb9..da585803783 100644 --- a/source/gameengine/Physics/Bullet/CMakeLists.txt +++ b/source/gameengine/Physics/Bullet/CMakeLists.txt @@ -25,9 +25,9 @@ # ***** END GPL LICENSE BLOCK ***** # since this includes bullet we get errors from the headers too -REMOVE_STRICT_FLAGS() +remove_strict_flags() -SET(INC +set(INC . ../common ../../../../extern/bullet2/src @@ -47,7 +47,7 @@ SET(INC ${PYTHON_INC} ) -SET(SRC +set(SRC CcdPhysicsEnvironment.cpp CcdPhysicsController.cpp CcdGraphicController.cpp @@ -57,8 +57,8 @@ SET(SRC CcdPhysicsEnvironment.h ) -IF(WITH_BULLET) - ADD_DEFINITIONS(-DUSE_BULLET) -ENDIF(WITH_BULLET) +if(WITH_BULLET) + add_definitions(-DUSE_BULLET) +endif() -BLENDERLIB(ge_phys_bullet "${SRC}" "${INC}") +blenderlib(ge_phys_bullet "${SRC}" "${INC}") diff --git a/source/gameengine/Physics/Dummy/CMakeLists.txt b/source/gameengine/Physics/Dummy/CMakeLists.txt index 0e852f50c76..ab633b807e0 100644 --- a/source/gameengine/Physics/Dummy/CMakeLists.txt +++ b/source/gameengine/Physics/Dummy/CMakeLists.txt @@ -24,15 +24,15 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ../common ) -SET(SRC +set(SRC DummyPhysicsEnvironment.cpp DummyPhysicsEnvironment.h ) -BLENDERLIB(ge_phys_dummy "${SRC}" "${INC}") +blenderlib(ge_phys_dummy "${SRC}" "${INC}") diff --git a/source/gameengine/Physics/common/CMakeLists.txt b/source/gameengine/Physics/common/CMakeLists.txt index aacb497674d..bc095822936 100644 --- a/source/gameengine/Physics/common/CMakeLists.txt +++ b/source/gameengine/Physics/common/CMakeLists.txt @@ -24,12 +24,12 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ../Dummy ) -SET(SRC +set(SRC PHY_IMotionState.cpp PHY_IController.cpp PHY_IPhysicsController.cpp @@ -47,4 +47,4 @@ SET(SRC PHY_Pro.h ) -BLENDERLIB(ge_phys_common "${SRC}" "${INC}") +blenderlib(ge_phys_common "${SRC}" "${INC}") diff --git a/source/gameengine/Rasterizer/CMakeLists.txt b/source/gameengine/Rasterizer/CMakeLists.txt index 7aeeafc5aa1..6971c74b55a 100644 --- a/source/gameengine/Rasterizer/CMakeLists.txt +++ b/source/gameengine/Rasterizer/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ../../../source/kernel/gen_system ../../../source/blender/makesdna @@ -38,7 +38,7 @@ SET(INC ${PYTHON_INC} ) -SET(SRC +set(SRC RAS_2DFilterManager.cpp RAS_BucketManager.cpp RAS_FramingManager.cpp @@ -79,6 +79,6 @@ SET(SRC RAS_OpenGLFilters/RAS_Sobel2DFilter.h ) -ADD_DEFINITIONS(-DGLEW_STATIC) +add_definitions(-DGLEW_STATIC) -BLENDERLIB(ge_rasterizer "${SRC}" "${INC}") +blenderlib(ge_rasterizer "${SRC}" "${INC}") diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt index bf0f979accf..ebdfb667443 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC ../../../../source/kernel/gen_system ../../../../intern/string ../../../../intern/moto/include @@ -39,7 +39,7 @@ SET(INC ../../../../source/blender/blenloader ) -SET(SRC +set(SRC RAS_GLExtensionManager.cpp RAS_ListRasterizer.cpp RAS_OpenGLRasterizer.cpp @@ -51,6 +51,6 @@ SET(SRC RAS_VAOpenGLRasterizer.h ) -ADD_DEFINITIONS(-DGLEW_STATIC) +add_definitions(-DGLEW_STATIC) -BLENDERLIB(ge_oglrasterizer "${SRC}" "${INC}") +blenderlib(ge_oglrasterizer "${SRC}" "${INC}") diff --git a/source/gameengine/SceneGraph/CMakeLists.txt b/source/gameengine/SceneGraph/CMakeLists.txt index 72472cb9a23..6c133af09f7 100644 --- a/source/gameengine/SceneGraph/CMakeLists.txt +++ b/source/gameengine/SceneGraph/CMakeLists.txt @@ -24,12 +24,12 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ../../../intern/moto/include ) -SET(SRC +set(SRC SG_BBox.cpp SG_Controller.cpp SG_IObject.cpp @@ -48,4 +48,4 @@ SET(SRC SG_Tree.h ) -BLENDERLIB(ge_scenegraph "${SRC}" "${INC}") +blenderlib(ge_scenegraph "${SRC}" "${INC}") diff --git a/source/gameengine/VideoTexture/CMakeLists.txt b/source/gameengine/VideoTexture/CMakeLists.txt index 10c9bf3755a..fff9ff95c25 100644 --- a/source/gameengine/VideoTexture/CMakeLists.txt +++ b/source/gameengine/VideoTexture/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC . ../../../source/gameengine/Ketsji ../../../source/gameengine/Expressions @@ -48,7 +48,7 @@ SET(INC ../../../extern/glew/include ) -SET(SRC +set(SRC Exception.cpp FilterBase.cpp FilterBlueScreen.cpp @@ -85,10 +85,10 @@ SET(SRC VideoFFmpeg.h ) -IF(WITH_CODEC_FFMPEG) - SET(INC ${INC} ${FFMPEG_INC} ${PTHREADS_INC}) - ADD_DEFINITIONS(-DWITH_FFMPEG) - ADD_DEFINITIONS(-D__STDC_CONSTANT_MACROS) -ENDIF(WITH_CODEC_FFMPEG) +if(WITH_CODEC_FFMPEG) + set(INC ${INC} ${FFMPEG_INC} ${PTHREADS_INC}) + add_definitions(-DWITH_FFMPEG) + add_definitions(-D__STDC_CONSTANT_MACROS) +endif() -BLENDERLIB(ge_videotex "${SRC}" "${INC}") +blenderlib(ge_videotex "${SRC}" "${INC}") diff --git a/source/kernel/CMakeLists.txt b/source/kernel/CMakeLists.txt index aae553b7b6d..de97d425720 100644 --- a/source/kernel/CMakeLists.txt +++ b/source/kernel/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -SET(INC +set(INC gen_messaging gen_system ../../intern/string @@ -32,7 +32,7 @@ SET(INC ../../source/blender/blenloader ) -SET(SRC +set(SRC gen_messaging/intern/messaging.c gen_system/GEN_HashedPtr.cpp gen_system/SYS_SingletonSystem.cpp @@ -45,4 +45,4 @@ SET(SRC gen_system/SYS_System.h ) -BLENDERLIB(bf_gen_system "${SRC}" "${INC}") +blenderlib(bf_gen_system "${SRC}" "${INC}") From eb26103822a451c968b9e3fb35aa26d3cc157830 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 8 Dec 2010 09:02:08 +0000 Subject: [PATCH 047/236] cmake - mark vars as advanced so they dont show up by default when configuring. --- CMakeLists.txt | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0bbb8c6804c..3e34f7f580a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,8 +52,8 @@ project(Blender) #----------------------------------------------------------------------------- # Redirect output files -set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) -set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) +set(EXECUTABLE_OUTPUT_PATH CACHE INTERNAL ${CMAKE_BINARY_DIR}/bin) +set(LIBRARY_OUTPUT_PATH CACHE INTERNAL ${CMAKE_BINARY_DIR}/lib) #----------------------------------------------------------------------------- # Load some macros. @@ -121,10 +121,13 @@ option(WITH_LZMA "Enable best LZMA compression, (used for pointcache)" # Misc option(WITH_RAYOPTIMIZATION "Enable use of SIMD (SSE) optimizations for the raytracer" ON) -option(WITH_CXX_GUARDEDALLOC "Enable GuardedAlloc for C++ memory allocation tracking" OFF) option(WITH_INSTALL "Install accompanying scripts and language files needed to run blender" ON) option(WITH_PYTHON_INSTALL "Copy system python into the blender install folder" ON) +# Debug +option(WITH_CXX_GUARDEDALLOC "Enable GuardedAlloc for C++ memory allocation tracking" OFF) +mark_as_advanced(WITH_CXX_GUARDEDALLOC) + if(APPLE) option(WITH_COCOA "Use Cocoa framework instead of deprecated Carbon" ON) option(USE_QTKIT "Use QtKit instead of Carbon quicktime (needed for having partial quicktime for 64bit)" OFF) @@ -201,6 +204,8 @@ if(UNIX AND NOT APPLE) PATHS /sw/lib ) + mark_as_advanced(ICONV_LIBRARY) + mark_as_advanced(INTL_LIBRARY) if(INTL_LIBRARY AND ICONV_LIBRARY) set(GETTEXT_LIB ${INTL_LIBRARY} ${ICONV_LIBRARY}) @@ -217,18 +222,24 @@ if(UNIX AND NOT APPLE) set(PYTHON /usr) set(PYTHON_VERSION 3.1) set(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}" CACHE STRING "") + mark_as_advanced(PYTHON_INC) # set(PYTHON_BINARY python) # not used yet set(PYTHON_LIB python${PYTHON_VERSION} CACHE STRING "") + mark_as_advanced(PYTHON_LIB) set(PYTHON_LIBPATH ${PYTHON}/lib CACHE STRING "") - + mark_as_advanced(PYTHON_LIBPATH) # find_package(PythonInterp) # not used yet # set(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "") set(PYTHON_LINKFLAGS "-Xlinker -export-dynamic") + mark_as_advanced(PYTHON_LINKFLAGS) endif() if(WITH_SDL) find_package(SDL) + mark_as_advanced(SDLMAIN_LIBRARY) + mark_as_advanced(SDL_INCLUDE_DIR) + mark_as_advanced(SDL_LIBRARY) # unset(SDLMAIN_LIBRARY CACHE) if(NOT SDL_FOUND) set(WITH_SDL OFF) @@ -237,6 +248,7 @@ if(UNIX AND NOT APPLE) if(WITH_IMAGE_OPENEXR) set(OPENEXR /usr CACHE FILEPATH "OPENEXR Directory") + mark_as_advanced(OPENEXR) find_path(OPENEXR_INC ImfXdr.h PATHS @@ -247,6 +259,8 @@ if(UNIX AND NOT APPLE) /opt/csw/include/OpenEXR /opt/include/OpenEXR ) + mark_as_advanced(OPENEXR_INC) + set(OPENEXR_LIB Half IlmImf Iex Imath) if(NOT OPENEXR_INC) @@ -276,8 +290,10 @@ if(UNIX AND NOT APPLE) if(WITH_CODEC_FFMPEG) set(FFMPEG /usr CACHE FILEPATH "FFMPEG Directory") + mark_as_advanced(FFMPEG) set(FFMPEG_INC ${FFMPEG}/include) set(FFMPEG_LIB avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries") + mark_as_advanced(FFMPEG_LIB) set(FFMPEG_LIBPATH ${FFMPEG}/lib) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_CONSTANT_MACROS") endif() @@ -298,13 +314,18 @@ if(UNIX AND NOT APPLE) if(WITH_OPENCOLLADA) set(OPENCOLLADA /usr/local/opencollada CACHE FILEPATH "OpenCollada Directory") + mark_as_advanced(OPENCOLLADA) set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib) set(OPENCOLLADA_LIB OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre ftoa buffer xml2) set(OPENCOLLADA_INC ${OPENCOLLADA}) + set(PCRE /usr CACHE FILEPATH "PCRE Directory") + mark_as_advanced(PCRE) set(PCRE_LIBPATH ${PCRE}/lib) set(PCRE_LIB pcre) + set(EXPAT /usr CACHE FILEPATH "Expat Directory") + mark_as_advanced(EXPAT) set(EXPAT_LIBPATH ${EXPAT}/lib) set(EXPAT_LIB expat) endif() From cea760ac5a2926173bdbf5f1f03776b97a930ee5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 8 Dec 2010 09:50:49 +0000 Subject: [PATCH 048/236] this change broke building. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e34f7f580a..45e45b7d744 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,8 +52,8 @@ project(Blender) #----------------------------------------------------------------------------- # Redirect output files -set(EXECUTABLE_OUTPUT_PATH CACHE INTERNAL ${CMAKE_BINARY_DIR}/bin) -set(LIBRARY_OUTPUT_PATH CACHE INTERNAL ${CMAKE_BINARY_DIR}/lib) +set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) +set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) #----------------------------------------------------------------------------- # Load some macros. From e29ac3fc76e4c20d632c9d82e0a72002752f4722 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 8 Dec 2010 09:57:21 +0000 Subject: [PATCH 049/236] use prints rather then asserts when normalized quats are expected. --- source/blender/blenlib/intern/math_rotation.c | 29 ++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c index a3e57605ad4..6799fef3b5c 100644 --- a/source/blender/blenlib/intern/math_rotation.c +++ b/source/blender/blenlib/intern/math_rotation.c @@ -32,7 +32,7 @@ /******************************** Quaternions ********************************/ /* used to test is a quat is not normalized */ -#define QUAT_EPSILON 0.00001 +#define QUAT_EPSILON 0.0001 void unit_qt(float *q) { @@ -148,7 +148,7 @@ void mul_fac_qt_fl(float *q, const float fac) } /* skip error check, currently only needed by mat3_to_quat_is_ok */ -static void quat_to_mat3_no_assert(float m[][3], const float q[4]) +static void quat_to_mat3_no_error(float m[][3], const float q[4]) { double q0, q1, q2, q3, qda,qdb,qdc,qaa,qab,qac,qbb,qbc,qcc; @@ -183,19 +183,25 @@ static void quat_to_mat3_no_assert(float m[][3], const float q[4]) void quat_to_mat3(float m[][3], const float q[4]) { - /* throw an error if the quat isn't normalized */ +#ifdef DEBUG float f; - assert((f=dot_qtqt(q, q))==0.0 || (fabs(f-1.0) < QUAT_EPSILON)); + if(!((f=dot_qtqt(q, q))==0.0 || (fabs(f-1.0) < QUAT_EPSILON))) { + fprintf(stderr, "Warning! quat_to_mat3() called with non-normalized: size %.8f *** report a bug ***\n", f); + } +#endif - quat_to_mat3_no_assert(m, q); + quat_to_mat3_no_error(m, q); } void quat_to_mat4(float m[][4], const float q[4]) { double q0, q1, q2, q3, qda,qdb,qdc,qaa,qab,qac,qbb,qbc,qcc; - /* throw an error if the quat isn't normalized */ - assert((q0=dot_qtqt(q, q))==0.0 || (fabs(q0-1.0) < QUAT_EPSILON)); +#ifdef DEBUG + if(!((q0=dot_qtqt(q, q))==0.0 || (fabs(q0-1.0) < QUAT_EPSILON))) { + fprintf(stderr, "Warning! quat_to_mat4() called with non-normalized: size %.8f *** report a bug ***\n", (float)q0); + } +#endif q0= M_SQRT2 * q[0]; q1= M_SQRT2 * q[1]; @@ -317,7 +323,7 @@ void mat3_to_quat_is_ok(float q[4], float wmat[3][3]) q1[3]= -nor[2]*si; /* rotate back x-axis from mat, using inverse q1 */ - quat_to_mat3_no_assert( matr,q1); + quat_to_mat3_no_error( matr,q1); invert_m3_m3(matn, matr); mul_m3_v3(matn, mat[0]); @@ -645,8 +651,11 @@ void quat_to_axis_angle(float axis[3], float *angle, const float q[4]) { float ha, si; - /* throw an error if the quat isn't normalized */ - assert((ha=dot_qtqt(q, q))==0.0 || (fabs(ha-1.0) < QUAT_EPSILON)); +#ifdef DEBUG + if(!((ha=dot_qtqt(q, q))==0.0 || (fabs(ha-1.0) < QUAT_EPSILON))) { + fprintf(stderr, "Warning! quat_to_axis_angle() called with non-normalized: size %.8f *** report a bug ***\n", ha); + } +#endif /* calculate angle/2, and sin(angle/2) */ ha= (float)acos(q[0]); From 40af167b0986edb02a5c151dfe785e8ab0aa6548 Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Wed, 8 Dec 2010 11:02:56 +0000 Subject: [PATCH 050/236] Bug fix: normal (from particles) child particles didn't use the rough parameters properly * Also child particles didn't do particle trail properly. --- source/blender/blenkernel/intern/particle.c | 57 +++++++++++++------ source/blender/blenkernel/intern/pointcache.c | 10 +++- 2 files changed, 48 insertions(+), 19 deletions(-) diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 6fec4775769..374d5a20b1c 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -3904,26 +3904,38 @@ static void do_child_modifiers(ParticleSimulationData *sim, ParticleTexture *pte int i = cpa - sim->psys->child; int guided = 0; + float kink_freq = part->kink_freq; + float rough1 = part->rough1; + float rough2 = part->rough2; + float rough_end = part->rough_end; + + if(ptex) { + kink_freq *= ptex->kink; + rough1 *= ptex->rough1; + rough2 *= ptex->rough2; + rough_end *= ptex->roughe; + } + if(part->flag & PART_CHILD_EFFECT) /* state is safe to cast, since only co and vel are used */ guided = do_guides(sim->psys->effectors, (ParticleKey*)state, cpa->parent, t); if(guided==0){ - if(part->kink) - do_prekink(state, par, par_rot, t, part->kink_freq * ptex->kink, part->kink_shape, + if(kink_freq > 0.f) + do_prekink(state, par, par_rot, t, kink_freq, part->kink_shape, part->kink_amp, part->kink, part->kink_axis, sim->ob->obmat); - do_clump(state, par, t, part->clumpfac, part->clumppow, ptex->clump); + do_clump(state, par, t, part->clumpfac, part->clumppow, ptex ? ptex->clump : 1.f); } - if(part->rough1 != 0.0 && ptex->rough1 != 0.0) - do_rough(orco, mat, t, ptex->rough1*part->rough1, part->rough1_size, 0.0, state); + if(rough1 > 0.f) + do_rough(orco, mat, t, rough1, part->rough1_size, 0.0, state); - if(part->rough2 != 0.0 && ptex->rough2 != 0.0) - do_rough(sim->psys->frand + ((i + 27) % (PSYS_FRAND_COUNT - 3)), mat, t, ptex->rough2*part->rough2, part->rough2_size, part->rough2_thres, state); + if(rough2 > 0.f) + do_rough(sim->psys->frand + ((i + 27) % (PSYS_FRAND_COUNT - 3)), mat, t, rough2, part->rough2_size, part->rough2_thres, state); - if(part->rough_end != 0.0 && ptex->roughe != 0.0) - do_rough_end(sim->psys->frand + ((i + 27) % (PSYS_FRAND_COUNT - 3)), mat, t, ptex->roughe*part->rough_end, part->rough_end_shape, state); + if(rough_end > 0.f) + do_rough_end(sim->psys->frand + ((i + 27) % (PSYS_FRAND_COUNT - 3)), mat, t, rough_end, part->rough_end_shape, state); } /* get's hair (or keyed) particles state at the "path time" specified in state->time */ void psys_get_particle_on_path(ParticleSimulationData *sim, int p, ParticleKey *state, int vel) @@ -4033,7 +4045,10 @@ void psys_get_particle_on_path(ParticleSimulationData *sim, int p, ParticleKey * pa = psys->particles + cpa->parent; - psys_mat_hair_to_global(sim->ob, sim->psmd->dm, psys->part->from, pa, hairmat); + if(part->type == PART_HAIR) + psys_mat_hair_to_global(sim->ob, sim->psmd->dm, psys->part->from, pa, hairmat); + else + unit_m4(hairmat); pa=0; } @@ -4049,9 +4064,16 @@ void psys_get_particle_on_path(ParticleSimulationData *sim, int p, ParticleKey * cpa_num=pa->num; cpa_fuv=pa->fuv; - psys_particle_on_emitter(psmd,cpa_from,cpa_num,DMCACHE_ISCHILD,cpa_fuv,pa->foffset,co,0,0,0,orco,0); + - psys_mat_hair_to_global(sim->ob, sim->psmd->dm, psys->part->from, pa, hairmat); + if(part->type == PART_HAIR) { + psys_particle_on_emitter(psmd,cpa_from,cpa_num,DMCACHE_ISCHILD,cpa_fuv,pa->foffset,co,0,0,0,orco,0); + psys_mat_hair_to_global(sim->ob, sim->psmd->dm, psys->part->from, pa, hairmat); + } + else { + copy_v3_v3(orco, cpa->fuv); + unit_m4(hairmat); + } } /* correct child ipo timing */ @@ -4185,18 +4207,17 @@ int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *sta } else{ if(cpa){ + float mat[4][4]; ParticleKey *key1; float t = (cfra - pa->time) / pa->lifetime; key1=&pa->state; offset_child(cpa, key1, state, part->childflat, part->childrad); - + CLAMP(t,0.0,1.0); - if(part->kink) /* TODO: part->kink_freq*pa_kink */ - do_prekink(state,key1,key1->rot,t,part->kink_freq,part->kink_shape,part->kink_amp,part->kink,part->kink_axis,sim->ob->obmat); - - /* TODO: pa_clump vgroup */ - do_clump(state,key1,t,part->clumpfac,part->clumppow,1.0); + + unit_m4(mat); + do_child_modifiers(sim, NULL, key1, key1->rot, cpa, cpa->fuv, mat, state, t); if(psys->lattice) calc_latt_deform(sim->psys->lattice, state->co,1.0f); diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 4e804cf14f7..4711e61c767 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -228,7 +228,15 @@ void BKE_ptcache_make_particle_key(ParticleKey *key, int index, void **data, flo { PTCACHE_DATA_TO(data, BPHYS_DATA_LOCATION, index, key->co); PTCACHE_DATA_TO(data, BPHYS_DATA_VELOCITY, index, key->vel); - PTCACHE_DATA_TO(data, BPHYS_DATA_ROTATION, index, key->rot); + + /* no rotation info, so make something nice up */ + if(data[BPHYS_DATA_ROTATION]==NULL) { + vec_to_quat( key->rot, key->vel, OB_NEGX, OB_POSZ); + } + else { + PTCACHE_DATA_TO(data, BPHYS_DATA_ROTATION, index, key->rot); + } + PTCACHE_DATA_TO(data, BPHYS_DATA_AVELOCITY, index, key->ave); key->time = time; } From 1622385445d86210750e0a299971454904a891c1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 8 Dec 2010 11:42:11 +0000 Subject: [PATCH 051/236] pedantic word ordering change. - wm.add_modal_handler -> modal_handler_add - wm.add_fileselect -> fileselect_add - ob.add_shape_key -> shape_key_add - VIEW3D_OT_add_background_image -> VIEW3D_OT_background_image_add (same for remove) Also made 2 internal cmake vars hidden. --- CMakeLists.txt | 4 +-- release/scripts/modules/add_object_utils.py | 2 +- release/scripts/modules/io_utils.py | 4 +-- release/scripts/op/add_mesh_torus.py | 2 +- release/scripts/op/io_shape_mdd/import_mdd.py | 4 +-- release/scripts/op/object.py | 4 +-- release/scripts/op/uv.py | 2 +- release/scripts/op/wm.py | 2 +- release/scripts/templates/operator_modal.py | 2 +- .../scripts/templates/operator_modal_draw.py | 2 +- .../templates/operator_modal_view3d.py | 2 +- release/scripts/ui/properties_scene.py | 2 +- release/scripts/ui/space_userpref.py | 2 +- release/scripts/ui/space_userpref_keymap.py | 4 +-- release/scripts/ui/space_view3d.py | 4 +-- source/blender/editors/interface/interface.c | 4 +-- .../editors/space_view3d/space_view3d.c | 2 +- .../editors/space_view3d/view3d_edit.c | 26 +++++++++---------- .../editors/space_view3d/view3d_intern.h | 4 +-- .../blender/editors/space_view3d/view3d_ops.c | 4 +-- .../blender/makesrna/intern/rna_object_api.c | 4 +-- source/blender/makesrna/intern/rna_wm_api.c | 6 ++--- 22 files changed, 46 insertions(+), 46 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 45e45b7d744..3ccfb12b7ff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,8 +52,8 @@ project(Blender) #----------------------------------------------------------------------------- # Redirect output files -set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) -set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) +set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin CACHE INTERNAL "" FORCE ) +set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib CACHE INTERNAL "" FORCE ) #----------------------------------------------------------------------------- # Load some macros. diff --git a/release/scripts/modules/add_object_utils.py b/release/scripts/modules/add_object_utils.py index 44efc8f2ada..20f0ffdbe60 100644 --- a/release/scripts/modules/add_object_utils.py +++ b/release/scripts/modules/add_object_utils.py @@ -44,7 +44,7 @@ def add_object_align_init(context, operator): return location * rotation -def add_object_data(context, obdata, operator=None): +def object_data_add(context, obdata, operator=None): scene = context.scene diff --git a/release/scripts/modules/io_utils.py b/release/scripts/modules/io_utils.py index eb9b2eaa90b..39b38669188 100644 --- a/release/scripts/modules/io_utils.py +++ b/release/scripts/modules/io_utils.py @@ -37,7 +37,7 @@ class ExportHelper: self.filepath = blend_filepath + self.filename_ext - context.window_manager.add_fileselect(self) + context.window_manager.fileselect_add(self) return {'RUNNING_MODAL'} def check(self, context): @@ -53,7 +53,7 @@ class ImportHelper: filepath = StringProperty(name="File Path", description="Filepath used for importing the file", maxlen=1024, default="", subtype='FILE_PATH') def invoke(self, context, event): - context.window_manager.add_fileselect(self) + context.window_manager.fileselect_add(self) return {'RUNNING_MODAL'} diff --git a/release/scripts/op/add_mesh_torus.py b/release/scripts/op/add_mesh_torus.py index 36baca45719..eee30dabb1d 100644 --- a/release/scripts/op/add_mesh_torus.py +++ b/release/scripts/op/add_mesh_torus.py @@ -128,7 +128,7 @@ class AddTorus(bpy.types.Operator): mesh.update() import add_object_utils - add_object_utils.add_object_data(context, mesh, operator=self) + add_object_utils.object_data_add(context, mesh, operator=self) return {'FINISHED'} diff --git a/release/scripts/op/io_shape_mdd/import_mdd.py b/release/scripts/op/io_shape_mdd/import_mdd.py index 2aa132384a7..990c1a56619 100644 --- a/release/scripts/op/io_shape_mdd/import_mdd.py +++ b/release/scripts/op/io_shape_mdd/import_mdd.py @@ -55,7 +55,7 @@ def load(operator, context, filepath, frame_start=0, frame_step=1): try: num_keys = len(obj.data.shape_keys.keys) except: - basis = obj.add_shape_key() + basis = obj.shape_key_add() basis.name = "Basis" obj.data.update() @@ -64,7 +64,7 @@ def load(operator, context, filepath, frame_start=0, frame_step=1): def UpdateMesh(ob, fr): # Insert new shape key - new_shapekey = obj.add_shape_key() + new_shapekey = obj.shape_key_add() new_shapekey.name = ("frame_%.4d" % fr) new_shapekey_name = new_shapekey.name diff --git a/release/scripts/op/object.py b/release/scripts/op/object.py index b5c46c757b3..cb6db059e9f 100644 --- a/release/scripts/op/object.py +++ b/release/scripts/op/object.py @@ -246,10 +246,10 @@ class ShapeTransfer(bpy.types.Operator): def ob_add_shape(ob, name): me = ob.data - key = ob.add_shape_key(from_mix=False) + key = ob.shape_key_add(from_mix=False) if len(me.shape_keys.keys) == 1: key.name = "Basis" - key = ob.add_shape_key(from_mix=False) # we need a rest + key = ob.shape_key_add(from_mix=False) # we need a rest key.name = name ob.active_shape_key_index = len(me.shape_keys.keys) - 1 ob.show_only_shape_key = True diff --git a/release/scripts/op/uv.py b/release/scripts/op/uv.py index f1155513ac3..e362d0932c3 100644 --- a/release/scripts/op/uv.py +++ b/release/scripts/op/uv.py @@ -365,7 +365,7 @@ class ExportUVLayout(bpy.types.Operator): self.size = self._image_size(context) self.filepath = os.path.splitext(bpy.data.filepath)[0] wm = context.window_manager - wm.add_fileselect(self) + wm.fileselect_add(self) return {'RUNNING_MODAL'} diff --git a/release/scripts/op/wm.py b/release/scripts/op/wm.py index 43181ab0dce..8879b2bbaf2 100644 --- a/release/scripts/op/wm.py +++ b/release/scripts/op/wm.py @@ -506,7 +506,7 @@ class WM_OT_context_modal_mouse(bpy.types.Operator): else: self.initial_x = event.mouse_x - context.window_manager.add_modal_handler(self) + context.window_manager.modal_handler_add(self) return {'RUNNING_MODAL'} diff --git a/release/scripts/templates/operator_modal.py b/release/scripts/templates/operator_modal.py index 522f9fea050..6283626e7b1 100644 --- a/release/scripts/templates/operator_modal.py +++ b/release/scripts/templates/operator_modal.py @@ -25,7 +25,7 @@ class ModalOperator(bpy.types.Operator): def invoke(self, context, event): if context.object: - context.window_manager.add_modal_handler(self) + context.window_manager.modal_handler_add(self) self.first_mouse_x = event.mouse_x self.first_value = context.object.location.x return {'RUNNING_MODAL'} diff --git a/release/scripts/templates/operator_modal_draw.py b/release/scripts/templates/operator_modal_draw.py index 2a3db3e3018..e159bc0f9c5 100644 --- a/release/scripts/templates/operator_modal_draw.py +++ b/release/scripts/templates/operator_modal_draw.py @@ -52,7 +52,7 @@ class ModalDrawOperator(bpy.types.Operator): def invoke(self, context, event): if context.area.type == 'VIEW_3D': - context.window_manager.add_modal_handler(self) + context.window_manager.modal_handler_add(self) # Add the region OpenGL drawing callback # draw in view space with 'POST_VIEW' and 'PRE_VIEW' diff --git a/release/scripts/templates/operator_modal_view3d.py b/release/scripts/templates/operator_modal_view3d.py index 5a7f5513992..55b58596f17 100644 --- a/release/scripts/templates/operator_modal_view3d.py +++ b/release/scripts/templates/operator_modal_view3d.py @@ -42,7 +42,7 @@ class ViewOperator(bpy.types.Operator): v3d = context.space_data rv3d = v3d.region_3d - context.window_manager.add_modal_handler(self) + context.window_manager.modal_handler_add(self) if rv3d.view_perspective == 'CAMERA': rv3d.view_perspective = 'PERSP' diff --git a/release/scripts/ui/properties_scene.py b/release/scripts/ui/properties_scene.py index b6668e19993..4855b309bf4 100644 --- a/release/scripts/ui/properties_scene.py +++ b/release/scripts/ui/properties_scene.py @@ -305,7 +305,7 @@ class ANIM_OT_keying_set_export(bpy.types.Operator): def invoke(self, context, event): wm = context.window_manager - wm.add_fileselect(self) + wm.fileselect_add(self) return {'RUNNING_MODAL'} diff --git a/release/scripts/ui/space_userpref.py b/release/scripts/ui/space_userpref.py index 6ce58344b37..53c5051e25c 100644 --- a/release/scripts/ui/space_userpref.py +++ b/release/scripts/ui/space_userpref.py @@ -1203,7 +1203,7 @@ class WM_OT_addon_install(bpy.types.Operator): def invoke(self, context, event): wm = context.window_manager - wm.add_fileselect(self) + wm.fileselect_add(self) return {'RUNNING_MODAL'} diff --git a/release/scripts/ui/space_userpref_keymap.py b/release/scripts/ui/space_userpref_keymap.py index 4569020efd9..8e34eb89af3 100644 --- a/release/scripts/ui/space_userpref_keymap.py +++ b/release/scripts/ui/space_userpref_keymap.py @@ -575,7 +575,7 @@ class WM_OT_keyconfig_import(bpy.types.Operator): def invoke(self, context, event): wm = context.window_manager - wm.add_fileselect(self) + wm.fileselect_add(self) return {'RUNNING_MODAL'} # This operator is also used by interaction presets saving - AddPresetBase @@ -665,7 +665,7 @@ class WM_OT_keyconfig_export(bpy.types.Operator): def invoke(self, context, event): wm = context.window_manager - wm.add_fileselect(self) + wm.fileselect_add(self) return {'RUNNING_MODAL'} diff --git a/release/scripts/ui/space_view3d.py b/release/scripts/ui/space_view3d.py index 1bbff0b5820..22ae16bf041 100644 --- a/release/scripts/ui/space_view3d.py +++ b/release/scripts/ui/space_view3d.py @@ -2159,7 +2159,7 @@ class VIEW3D_PT_background_image(bpy.types.Panel): view = context.space_data col = layout.column() - col.operator("view3d.add_background_image", text="Add Image") + col.operator("view3d.background_image_add", text="Add Image") for i, bg in enumerate(view.background_images): layout.active = view.show_background_images @@ -2170,7 +2170,7 @@ class VIEW3D_PT_background_image(bpy.types.Panel): row.prop(bg.image, "name", text="", emboss=False) else: row.label(text="Not Set") - row.operator("view3d.remove_background_image", text="", emboss=False, icon='X').index = i + row.operator("view3d.background_image_remove", text="", emboss=False, icon='X').index = i box.prop(bg, "view_axis", text="Axis") diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index deec9927d61..bc1133313ee 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -1357,9 +1357,9 @@ void ui_set_but_val(uiBut *but, double value) break; case PROP_INT: if(RNA_property_array_length(&but->rnapoin, prop)) - RNA_property_int_set_index(&but->rnapoin, prop, but->rnaindex, value); + RNA_property_int_set_index(&but->rnapoin, prop, but->rnaindex, (int)value); else - RNA_property_int_set(&but->rnapoin, prop, value); + RNA_property_int_set(&but->rnapoin, prop, (int)value); break; case PROP_FLOAT: if(RNA_property_array_length(&but->rnapoin, prop)) diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 5bd9e90a208..d9f0ea07cce 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -480,7 +480,7 @@ static void view3d_dropboxes(void) WM_dropbox_add(lb, "OBJECT_OT_add_named_cursor", view3d_ob_drop_poll, view3d_ob_drop_copy); WM_dropbox_add(lb, "OBJECT_OT_drop_named_material", view3d_mat_drop_poll, view3d_id_drop_copy); WM_dropbox_add(lb, "MESH_OT_drop_named_image", view3d_ima_ob_drop_poll, view3d_id_path_drop_copy); - WM_dropbox_add(lb, "VIEW3D_OT_add_background_image", view3d_ima_bg_drop_poll, view3d_id_path_drop_copy); + WM_dropbox_add(lb, "VIEW3D_OT_background_image_add", view3d_ima_bg_drop_poll, view3d_id_path_drop_copy); } diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 59453707361..cfe4dc55d17 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -2202,7 +2202,7 @@ void VIEW3D_OT_view_persportho(wmOperatorType *ot) /* ******************** add background image operator **************** */ -static BGpic *add_background_image(bContext *C) +static BGpic *background_image_add(bContext *C) { View3D *v3d= CTX_wm_view3d(C); @@ -2218,14 +2218,14 @@ static BGpic *add_background_image(bContext *C) return bgpic; } -static int add_background_image_exec(bContext *C, wmOperator *UNUSED(op)) +static int background_image_add_exec(bContext *C, wmOperator *UNUSED(op)) { - add_background_image(C); + background_image_add(C); return OPERATOR_FINISHED; } -static int add_background_image_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) +static int background_image_add_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { View3D *v3d= CTX_wm_view3d(C); Image *ima= NULL; @@ -2244,7 +2244,7 @@ static int add_background_image_invoke(bContext *C, wmOperator *op, wmEvent *UNU ima= (Image *)find_id("IM", name); } - bgpic = add_background_image(C); + bgpic = background_image_add(C); if (ima) { bgpic->ima = ima; @@ -2261,16 +2261,16 @@ static int add_background_image_invoke(bContext *C, wmOperator *op, wmEvent *UNU return OPERATOR_FINISHED; } -void VIEW3D_OT_add_background_image(wmOperatorType *ot) +void VIEW3D_OT_background_image_add(wmOperatorType *ot) { /* identifiers */ ot->name = "Add Background Image"; ot->description= "Add a new background image"; - ot->idname = "VIEW3D_OT_add_background_image"; + ot->idname = "VIEW3D_OT_background_image_add"; /* api callbacks */ - ot->invoke = add_background_image_invoke; - ot->exec = add_background_image_exec; + ot->invoke = background_image_add_invoke; + ot->exec = background_image_add_exec; ot->poll = ED_operator_view3d_active; /* flags */ @@ -2283,7 +2283,7 @@ void VIEW3D_OT_add_background_image(wmOperatorType *ot) /* ***** remove image operator ******* */ -static int remove_background_image_exec(bContext *C, wmOperator *op) +static int background_image_remove_exec(bContext *C, wmOperator *op) { BGpic *bgpic_rem = CTX_data_pointer_get_type(C, "bgpic", &RNA_BackgroundImage).data; View3D *vd = CTX_wm_view3d(C); @@ -2301,15 +2301,15 @@ static int remove_background_image_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void VIEW3D_OT_remove_background_image(wmOperatorType *ot) +void VIEW3D_OT_background_image_remove(wmOperatorType *ot) { /* identifiers */ ot->name = "Remove Background Image"; ot->description= "Remove a background image from the 3D view"; - ot->idname = "VIEW3D_OT_remove_background_image"; + ot->idname = "VIEW3D_OT_background_image_remove"; /* api callbacks */ - ot->exec = remove_background_image_exec; + ot->exec = background_image_remove_exec; ot->poll = ED_operator_view3d_active; /* flags */ diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h index 445a83b4266..83ef57cfd0f 100644 --- a/source/blender/editors/space_view3d/view3d_intern.h +++ b/source/blender/editors/space_view3d/view3d_intern.h @@ -78,8 +78,8 @@ void VIEW3D_OT_view_center_cursor(struct wmOperatorType *ot); void VIEW3D_OT_view_center_camera(struct wmOperatorType *ot); void VIEW3D_OT_view_pan(struct wmOperatorType *ot); void VIEW3D_OT_view_persportho(struct wmOperatorType *ot); -void VIEW3D_OT_add_background_image(struct wmOperatorType *ot); -void VIEW3D_OT_remove_background_image(struct wmOperatorType *ot); +void VIEW3D_OT_background_image_add(struct wmOperatorType *ot); +void VIEW3D_OT_background_image_remove(struct wmOperatorType *ot); void VIEW3D_OT_view_orbit(struct wmOperatorType *ot); void VIEW3D_OT_clip_border(struct wmOperatorType *ot); void VIEW3D_OT_cursor3d(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c index 9ee12a8ef1e..7a25d23b56b 100644 --- a/source/blender/editors/space_view3d/view3d_ops.c +++ b/source/blender/editors/space_view3d/view3d_ops.c @@ -62,8 +62,8 @@ void view3d_operatortypes(void) WM_operatortype_append(VIEW3D_OT_view_orbit); WM_operatortype_append(VIEW3D_OT_view_pan); WM_operatortype_append(VIEW3D_OT_view_persportho); - WM_operatortype_append(VIEW3D_OT_add_background_image); - WM_operatortype_append(VIEW3D_OT_remove_background_image); + WM_operatortype_append(VIEW3D_OT_background_image_add); + WM_operatortype_append(VIEW3D_OT_background_image_remove); WM_operatortype_append(VIEW3D_OT_view_selected); WM_operatortype_append(VIEW3D_OT_view_center_cursor); WM_operatortype_append(VIEW3D_OT_view_center_camera); diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index af77c55dbf9..96f24c4ecc9 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -281,7 +281,7 @@ static void rna_Object_update(Object *ob, Scene *sce, int object, int data, int DAG_id_tag_update(&ob->id, flag); } -static PointerRNA rna_Object_add_shape_key(Object *ob, bContext *C, ReportList *reports, const char *name, int from_mix) +static PointerRNA rna_Object_shape_key_add(Object *ob, bContext *C, ReportList *reports, const char *name, int from_mix) { Scene *scene= CTX_data_scene(C); KeyBlock *kb= NULL; @@ -431,7 +431,7 @@ void RNA_api_object(StructRNA *srna) RNA_def_function_return(func, parm); /* Shape key */ - func= RNA_def_function(srna, "add_shape_key", "rna_Object_add_shape_key"); + func= RNA_def_function(srna, "shape_key_add", "rna_Object_shape_key_add"); RNA_def_function_ui_description(func, "Add shape key to an object."); RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS); parm= RNA_def_string(func, "name", "Key", 0, "", "Unique name for the new keylock."); /* optional */ diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c index 5aa68bc6d4e..9c5b8d0740a 100644 --- a/source/blender/makesrna/intern/rna_wm_api.c +++ b/source/blender/makesrna/intern/rna_wm_api.c @@ -63,7 +63,7 @@ static void rna_Operator_enum_search_invoke(bContext *C, wmOperator *op) } -static int rna_event_add_modal_handler(struct bContext *C, struct wmOperator *operator) +static int rna_event_modal_handler_add(struct bContext *C, struct wmOperator *operator) { return WM_event_add_modal_handler(C, operator) != NULL; } @@ -104,11 +104,11 @@ void RNA_api_wm(StructRNA *srna) FunctionRNA *func; PropertyRNA *parm; - func= RNA_def_function(srna, "add_fileselect", "WM_event_add_fileselect"); + func= RNA_def_function(srna, "fileselect_add", "WM_event_add_fileselect"); RNA_def_function_ui_description(func, "Show up the file selector."); rna_generic_op_invoke(func, 0); - func= RNA_def_function(srna, "add_modal_handler", "rna_event_add_modal_handler"); + func= RNA_def_function(srna, "modal_handler_add", "rna_event_modal_handler_add"); RNA_def_function_flag(func, FUNC_NO_SELF|FUNC_USE_CONTEXT); parm= RNA_def_pointer(func, "operator", "Operator", "", "Operator to call."); RNA_def_property_flag(parm, PROP_REQUIRED); From b8bde683fb7133c4c36c5b83b9b2535df2e0c180 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 8 Dec 2010 11:44:38 +0000 Subject: [PATCH 052/236] remove contents from the svn cleanup file. not used now and could turn up results with source searches. --- .../makesrna/rna_cleanup/rna_properties.txt | 4607 +---------------- 1 file changed, 1 insertion(+), 4606 deletions(-) diff --git a/source/blender/makesrna/rna_cleanup/rna_properties.txt b/source/blender/makesrna/rna_cleanup/rna_properties.txt index df833d8e82b..030fecec20e 100644 --- a/source/blender/makesrna/rna_cleanup/rna_properties.txt +++ b/source/blender/makesrna/rna_cleanup/rna_properties.txt @@ -1,4606 +1 @@ - NOTE * CLASS.FROM -> TO: TYPE "DESCRIPTION" -#+ * ActionGroup.channels -> channels: collection, "(read-only) F-Curves in this group" -#+ * ActionGroup.custom_color -> custom_color: int "Index of custom color set" -#+ * ActionGroup.lock -> lock: boolean "Action Group is locked" -#+ * ActionGroup.name -> name: string "NO DESCRIPTION" -#+ * ActionGroup.select -> select: boolean "Action Group is selected" -#ActionGroup.show_expanded -> show_expanded: boolean "Action Group is expanded" -#+ * Actuator.name -> name: string "NO DESCRIPTION" -#Actuator.pin -> pin: boolean "Display when not linked to a visible states controller" -#Actuator.show_expanded -> show_expanded: boolean "Set actuator expanded in the user interface" -#+ * Actuator.type -> type: enum "NO DESCRIPTION" -#+ * Actuator|ActionActuator.action -> action: pointer "NO DESCRIPTION" -#Actuator|ActionActuator.frame_blend_in -> frame_blend_in: int "Number of frames of motion blending" -#+ * Actuator|ActionActuator.frame_end -> frame_end: int "NO DESCRIPTION" -#+ * Actuator|ActionActuator.frame_property -> frame_property: string "Assign the actions current frame number to this property" -#+ * Actuator|ActionActuator.frame_start -> frame_start: int "NO DESCRIPTION" -#Actuator|ActionActuator.play_mode -> play_mode: enum "Action playback type" -#+ * Actuator|ActionActuator.priority -> priority: int "Execution priority - lower numbers will override actions with higher numbers. With 2 or more actions at once, the overriding channels must be lower in the stack" -#+ * Actuator|ActionActuator.property -> property: string "Use this property to define the Action position" -#Actuator|ActionActuator.use_continue_last_frame -> use_continue_last_frame: boolean "Restore last frame when switching on/off, otherwise play from the start each time" -#+ * Actuator|ArmatureActuator.bone -> bone: string "Bone on which the constraint is defined" -#+ * Actuator|ArmatureActuator.constraint -> constraint: string "Name of the constraint you want to control" -#+ * Actuator|ArmatureActuator.mode -> mode: enum "NO DESCRIPTION" -#+ * Actuator|ArmatureActuator.secondary_target -> secondary_target: pointer "Set weight of this constraint" -#+ * Actuator|ArmatureActuator.target -> target: pointer "Set this object as the target of the constraint" -#+ * Actuator|ArmatureActuator.weight -> weight: float "Set weight of this constraint" -#+ * Actuator|CameraActuator.axis -> axis: enum "Specify the axis the Camera will try to get behind" -#+ * Actuator|CameraActuator.height -> height: float "NO DESCRIPTION" -#+ * Actuator|CameraActuator.max -> max: float "NO DESCRIPTION" -#+ * Actuator|CameraActuator.min -> min: float "NO DESCRIPTION" -#+ * Actuator|CameraActuator.object -> object: pointer "Look at this Object" -#Actuator|ConstraintActuator.angle_max -> angle_max: float "Maximum angle (in degree) allowed with target direction. No correction is done if angle with target direction is between min and max" -#Actuator|ConstraintActuator.angle_min -> angle_min: float "Minimum angle (in degree) to maintain with target direction. No correction is done if angle with target direction is between min and max" -#+ * Actuator|ConstraintActuator.damping -> damping: int "Damping factor: time constant (in frame) of low pass filter" -#+ * Actuator|ConstraintActuator.damping_rotation -> damping_rotation: int "Use a different damping for orientation" -#+ * Actuator|ConstraintActuator.direction -> direction: enum "Set the direction of the ray" -#+ * Actuator|ConstraintActuator.direction_axis -> direction_axis: enum "Select the axis to be aligned along the reference direction" -#+ * Actuator|ConstraintActuator.distance -> distance: float "Set the maximum length of ray" -#+ * Actuator|ConstraintActuator.fh_damping -> fh_damping: float "Damping factor of the Fh spring force" -#+ * Actuator|ConstraintActuator.fh_height -> fh_height: float "Height of the Fh area" -#+ * Actuator|ConstraintActuator.limit -> limit: enum "NO DESCRIPTION" -#+ * Actuator|ConstraintActuator.limit_max -> limit_max: float "NO DESCRIPTION" -#+ * Actuator|ConstraintActuator.limit_min -> limit_min: float "NO DESCRIPTION" -#+ * Actuator|ConstraintActuator.material -> material: string "Ray detects only Objects with this material" -#+ * Actuator|ConstraintActuator.mode -> mode: enum "The type of the constraint" -#+ * Actuator|ConstraintActuator.property -> property: string "Ray detect only Objects with this property" -#+ * Actuator|ConstraintActuator.range -> range: float "Set the maximum length of ray" -#Actuator|ConstraintActuator.rotation_max -> rotation_max: float[3] "Reference Direction" -#+ * Actuator|ConstraintActuator.spring -> spring: float "Spring force within the Fh area" -#+ * Actuator|ConstraintActuator.time -> time: int "Maximum activation time in frame, 0 for unlimited" -#Actuator|ConstraintActuator.use_fh_normal -> use_fh_normal: boolean "Add a horizontal spring force on slopes" -#Actuator|ConstraintActuator.use_fh_paralel_axis -> use_fh_paralel_axis: boolean "Keep object axis parallel to normal" -#Actuator|ConstraintActuator.use_force_distance -> use_force_distance: boolean "Force distance of object to point of impact of ray" -#Actuator|ConstraintActuator.use_local -> use_local: boolean "Set ray along objects axis or global axis" -#Actuator|ConstraintActuator.use_material_detect -> use_material_detect: boolean "Detect material instead of property" -#Actuator|ConstraintActuator.use_normal -> use_normal: boolean "Set object axis along (local axis) or parallel (global axis) to the normal at hit position" -#Actuator|ConstraintActuator.use_persistent -> use_persistent: boolean "Persistent actuator: stays active even if ray does not reach target" -#+ * Actuator|EditObjectActuator.angular_velocity -> angular_velocity: float[3] "Angular velocity upon creation" -#+ * Actuator|EditObjectActuator.dynamic_operation -> dynamic_operation: enum "NO DESCRIPTION" -#+ * Actuator|EditObjectActuator.linear_velocity -> linear_velocity: float[3] "Velocity upon creation" -#+ * Actuator|EditObjectActuator.mass -> mass: float "The mass of the object" -#+ * Actuator|EditObjectActuator.mesh -> mesh: pointer "Replace the existing, when left blank Phys will remake the existing physics mesh" -#+ * Actuator|EditObjectActuator.mode -> mode: enum "The mode of the actuator" -#+ * Actuator|EditObjectActuator.object -> object: pointer "Add this Object and all its children (cant be on an visible layer)" -#+ * Actuator|EditObjectActuator.time -> time: int "Duration the new Object lives or the track takes" -#+ * Actuator|EditObjectActuator.track_object -> track_object: pointer "Track to this Object" -#Actuator|EditObjectActuator.use_3d_tracking -> use_3d_tracking: boolean "Enable 3D tracking" -#Actuator|EditObjectActuator.use_local_angular_velocity -> use_local_angular_velocity: boolean "Apply the rotation locally" -#Actuator|EditObjectActuator.use_local_linear_velocity -> use_local_linear_velocity: boolean "Apply the transformation locally" -#Actuator|EditObjectActuator.use_replace_display_mesh -> use_replace_display_mesh: boolean "Replace the display mesh" -#Actuator|EditObjectActuator.use_replace_physics_mesh -> use_replace_physics_mesh: boolean "Replace the physics mesh (triangle bounds only - compound shapes not supported)" -#Actuator|FCurveActuator.apply_to_children -> apply_to_children: boolean "Update F-Curve on all children Objects as well" -#Actuator|FCurveActuator.frame_end -> frame_end: int "NO DESCRIPTION" -#Actuator|FCurveActuator.frame_property -> frame_property: string "Assign the actions current frame number to this property" -#Actuator|FCurveActuator.frame_start -> frame_start: int "NO DESCRIPTION" -#Actuator|FCurveActuator.play_type -> play_type: enum "Specify the way you want to play the animation" -#Actuator|FCurveActuator.property -> property: string "Use this property to define the F-Curve position" -#Actuator|FCurveActuator.use_additive -> use_additive: boolean "F-Curve is added to the current loc/rot/scale in global or local coordinate according to Local flag" -#Actuator|FCurveActuator.use_force -> use_force: boolean "Apply F-Curve as a global or local force depending on the local option (dynamic objects only)" -#Actuator|FCurveActuator.use_local -> use_local: boolean "Let the F-Curve act in local coordinates, used in Force and Add mode" -#+ * Actuator|Filter2DActuator.filter_pass -> filter_pass: int "Set filter order" -#+ * Actuator|Filter2DActuator.glsl_shader -> glsl_shader: pointer "NO DESCRIPTION" -#+ * Actuator|Filter2DActuator.mode -> mode: enum "NO DESCRIPTION" -#+ * Actuator|Filter2DActuator.motion_blur_factor -> motion_blur_factor: float "Set motion blur factor" -#Actuator|Filter2DActuator.use_motion_blur -> use_motion_blur: boolean "Enable/Disable Motion Blur" -#+ * Actuator|GameActuator.filename -> filename: string "Load this blend file, use the // prefix for a path relative to the current blend file" -#+ * Actuator|GameActuator.mode -> mode: enum "NO DESCRIPTION" -#+ * Actuator|MessageActuator.body_message -> body_message: string "Optional message body Text" -#+ * Actuator|MessageActuator.body_property -> body_property: string "The message body will be set by the Property Value" -#+ * Actuator|MessageActuator.body_type -> body_type: enum "Toggle message type: either Text or a PropertyName" -#+ * Actuator|MessageActuator.subject -> subject: string "Optional message subject. This is what can be filtered on" -#+ * Actuator|MessageActuator.to_property -> to_property: string "Optional send message to objects with this name only, or empty to broadcast" -#+ * Actuator|ObjectActuator.angular_velocity -> angular_velocity: float[3] "Sets the angular velocity" -#+ * Actuator|ObjectActuator.damping -> damping: int "Number of frames to reach the target velocity" -#+ * Actuator|ObjectActuator.derivate_coefficient -> derivate_coefficient: float "Not required, high values can cause instability" -#+ * Actuator|ObjectActuator.force -> force: float[3] "Sets the force" -#+ * Actuator|ObjectActuator.force_max_x -> force_max_x: float "Set the upper limit for force" -#+ * Actuator|ObjectActuator.force_max_y -> force_max_y: float "Set the upper limit for force" -#+ * Actuator|ObjectActuator.force_max_z -> force_max_z: float "Set the upper limit for force" -#+ * Actuator|ObjectActuator.force_min_x -> force_min_x: float "Set the lower limit for force" -#+ * Actuator|ObjectActuator.force_min_y -> force_min_y: float "Set the lower limit for force" -#+ * Actuator|ObjectActuator.force_min_z -> force_min_z: float "Set the lower limit for force" -#+ * Actuator|ObjectActuator.integral_coefficient -> integral_coefficient: float "Low value (0.01) for slow response, high value (0.5) for fast response" -#+ * Actuator|ObjectActuator.linear_velocity -> linear_velocity: float[3] "Sets the linear velocity (in Servo mode it sets the target relative linear velocity, it will be achieved by automatic application of force. Null velocity is a valid target)" -#+ * Actuator|ObjectActuator.mode -> mode: enum "Specify the motion system" -#Actuator|ObjectActuator.offset_location -> offset_location: float[3] "Sets the location" -#Actuator|ObjectActuator.offset_rotation -> offset_rotation: float[3] "Sets the rotation" -#+ * Actuator|ObjectActuator.proportional_coefficient -> proportional_coefficient: float "Typical value is 60x integral coefficient" -#+ * Actuator|ObjectActuator.reference_object -> reference_object: pointer "Reference object for velocity calculation, leave empty for world reference" -#+ * Actuator|ObjectActuator.torque -> torque: float[3] "Sets the torque" -#Actuator|ObjectActuator.use_add_linear_velocity -> use_add_linear_velocity: boolean "Toggles between ADD and SET linV" -#Actuator|ObjectActuator.use_local_angular_velocity -> use_local_angular_velocity: boolean "Angular velocity is defined in local coordinates" -#Actuator|ObjectActuator.use_local_force -> use_local_force: boolean "Force is defined in local coordinates" -#Actuator|ObjectActuator.use_local_linear_velocity -> use_local_linear_velocity: boolean "Velocity is defined in local coordinates" -#Actuator|ObjectActuator.use_local_location -> use_local_location: boolean "Location is defined in local coordinates" -#Actuator|ObjectActuator.use_local_rotation -> use_local_rotation: boolean "Rotation is defined in local coordinates" -#Actuator|ObjectActuator.use_local_torque -> use_local_torque: boolean "Torque is defined in local coordinates" -#Actuator|ObjectActuator.use_servo_limit_x -> use_servo_limit_x: boolean "Set limit to force along the X axis" -#Actuator|ObjectActuator.use_servo_limit_y -> use_servo_limit_y: boolean "Set limit to force along the Y axis" -#Actuator|ObjectActuator.use_servo_limit_z -> use_servo_limit_z: boolean "Set limit to force along the Z axis" -#+ * Actuator|ParentActuator.mode -> mode: enum "NO DESCRIPTION" -#+ * Actuator|ParentActuator.object -> object: pointer "Set this object as parent" -#Actuator|ParentActuator.use_compound -> use_compound: boolean "Add this object shape to the parent shape (only if the parent shape is already compound)" -#Actuator|ParentActuator.use_ghost -> use_ghost: boolean "Make this object ghost while parented (only if not compound)" -#+ * Actuator|PropertyActuator.mode -> mode: enum "NO DESCRIPTION" -#+ * Actuator|PropertyActuator.object -> object: pointer "Copy from this Object" -#+ * Actuator|PropertyActuator.object_property -> object_property: string "Copy this property" -#+ * Actuator|PropertyActuator.property -> property: string "The name of the property" -#+ * Actuator|PropertyActuator.value -> value: string "The value to use, use around strings" -#+ * Actuator|RandomActuator.chance -> chance: float "Pick a number between 0 and 1. Success if you stay below this value" -#+ * Actuator|RandomActuator.distribution -> distribution: enum "Choose the type of distribution" -#+ * Actuator|RandomActuator.float_max -> float_max: float "Choose a number from a range. Upper boundary of the range" -#+ * Actuator|RandomActuator.float_mean -> float_mean: float "A normal distribution. Mean of the distribution" -#+ * Actuator|RandomActuator.float_min -> float_min: float "Choose a number from a range. Lower boundary of the range" -#+ * Actuator|RandomActuator.float_value -> float_value: float "Always return this number" -#+ * Actuator|RandomActuator.half_life_time -> half_life_time: float "Negative exponential dropoff" -#+ * Actuator|RandomActuator.int_max -> int_max: int "Choose a number from a range. Upper boundary of the range" -#+ * Actuator|RandomActuator.int_mean -> int_mean: float "Expected mean value of the distribution" -#+ * Actuator|RandomActuator.int_min -> int_min: int "Choose a number from a range. Lower boundary of the range" -#+ * Actuator|RandomActuator.int_value -> int_value: int "Always return this number" -#+ * Actuator|RandomActuator.property -> property: string "Assign the random value to this property" -#+ * Actuator|RandomActuator.seed -> seed: int "Initial seed of the random generator. Use Python for more freedom (choose 0 for not random)" -#+ * Actuator|RandomActuator.standard_derivation -> standard_derivation: float "A normal distribution. Standard deviation of the distribution" -#Actuator|RandomActuator.use_always_true -> use_always_true: boolean "Always false or always true" -#+ * Actuator|SceneActuator.camera -> camera: pointer "Set this Camera. Leave empty to refer to self object" -#+ * Actuator|SceneActuator.mode -> mode: enum "NO DESCRIPTION" -#+ * Actuator|SceneActuator.scene -> scene: pointer "Set the Scene to be added/removed/paused/resumed" -#+ * Actuator|ShapeActionActuator.action -> action: pointer "NO DESCRIPTION" -#Actuator|ShapeActionActuator.frame_blend_in -> frame_blend_in: int "Number of frames of motion blending" -#+ * Actuator|ShapeActionActuator.frame_end -> frame_end: int "NO DESCRIPTION" -#+ * Actuator|ShapeActionActuator.frame_property -> frame_property: string "Assign the actions current frame number to this property" -#+ * Actuator|ShapeActionActuator.frame_start -> frame_start: int "NO DESCRIPTION" -#+ * Actuator|ShapeActionActuator.mode -> mode: enum "Action playback type" -#+ * Actuator|ShapeActionActuator.priority -> priority: int "Execution priority - lower numbers will override actions with higher numbers. With 2 or more actions at once, the overriding channels must be lower in the stack" -#+ * Actuator|ShapeActionActuator.property -> property: string "Use this property to define the Action position" -#Actuator|ShapeActionActuator.use_continue_last_frame -> use_continue_last_frame: boolean "Restore last frame when switching on/off, otherwise play from the start each time" -#+ * Actuator|SoundActuator.cone_inner_angle_3d -> cone_inner_angle_3d: float "The angle of the inner cone" -#+ * Actuator|SoundActuator.cone_outer_angle_3d -> cone_outer_angle_3d: float "The angle of the outer cone" -#+ * Actuator|SoundActuator.cone_outer_gain_3d -> cone_outer_gain_3d: float "The gain outside the outer cone. The gain in the outer cone will be interpolated between this value and the normal gain in the inner cone" -#Actuator|SoundActuator.distance_3d_max -> distance_3d_max: float "The maximum distance at which you can hear the sound" -#Actuator|SoundActuator.distance_3d_reference -> distance_3d_reference: float "The distance where the sound has a gain of 1.0" -#Actuator|SoundActuator.gain_3d_max -> gain_3d_max: float "The maximum gain of the sound, no matter how near it is" -#Actuator|SoundActuator.gain_3d_min -> gain_3d_min: float "The minimum gain of the sound, no matter how far it is away" -#+ * Actuator|SoundActuator.mode -> mode: enum "NO DESCRIPTION" -#+ * Actuator|SoundActuator.pitch -> pitch: float "Sets the pitch of the sound" -#+ * Actuator|SoundActuator.rolloff_factor_3d -> rolloff_factor_3d: float "The influence factor on volume depending on distance" -#+ * Actuator|SoundActuator.sound -> sound: pointer "NO DESCRIPTION" -#Actuator|SoundActuator.use_sound_3d -> use_sound_3d: boolean "Enable/Disable 3D Sound" -#+ * Actuator|SoundActuator.volume -> volume: float "Sets the initial volume of the sound" -#+ * Actuator|StateActuator.operation -> operation: enum "Select the bit operation on object state mask" -#Actuator|StateActuator.states -> states: boolean[30] "NO DESCRIPTION" -#Actuator|VisibilityActuator.apply_to_children -> apply_to_children: boolean "Set all the children of this object to the same visibility/occlusion recursively" -#Actuator|VisibilityActuator.use_occlusion -> use_occlusion: boolean "Set the object to occlude objects behind it. Initialized from the object type in physics button" -#Actuator|VisibilityActuator.use_visible -> use_visible: boolean "Set the objects visible. Initialized from the objects render restriction toggle (access in the outliner)" -#+ * Addon.module -> module: string "Module name" -#+ * AnimData.action -> action: pointer "Active Action for this datablock" -#AnimData.action_blend_type -> action_blend_type: enum "Method used for combining Active Actions result with result of NLA stack" -#+ * AnimData.action_extrapolation -> action_extrapolation: enum "Action to take for gaps past the Active Actions range (when evaluating with NLA)" -#+ * AnimData.action_influence -> action_influence: float "Amount the Active Action contributes to the result of the NLA stack" -#+ * AnimData.drivers -> drivers: collection, "(read-only) The Drivers/Expressions for this datablock" -#+ * AnimData.nla_tracks -> nla_tracks: collection, "(read-only) NLA Tracks (i.e. Animation Layers)" -#AnimData.use_nla -> use_nla: boolean "NLA stack is evaluated when evaluating this block" -#AnimViz.motion_path -> motion_path: pointer, "(read-only) Motion Path settings for visualisation" -#AnimViz.onion_skin_frames -> onion_skin_frames: pointer, "(read-only) Onion Skinning (ghosting) settings for visualisation" -#+ * AnimVizMotionPaths.bake_location -> bake_location: enum "When calculating Bone Paths, use Head or Tips" -#AnimVizMotionPaths.frame_after -> frame_after: int "Number of frames to show after the current frame (only for Around Current Frame Onion-skinning method)" -#AnimVizMotionPaths.frame_before -> frame_before: int "Number of frames to show before the current frame (only for Around Current Frame Onion-skinning method)" -#+ * AnimVizMotionPaths.frame_end -> frame_end: int "End frame of range of paths to display/calculate (not for Around Current Frame Onion-skinning method)" -#+ * AnimVizMotionPaths.frame_start -> frame_start: int "Starting frame of range of paths to display/calculate (not for Around Current Frame Onion-skinning method)" -#+ * AnimVizMotionPaths.frame_step -> frame_step: int "Number of frames between paths shown (not for On Keyframes Onion-skinning method)" -#+ * AnimVizMotionPaths.show_frame_numbers -> show_frame_numbers: boolean "Show frame numbers on Motion Paths" -#AnimVizMotionPaths.show_keyframe_action_all -> show_keyframe_action_all: boolean "For bone motion paths, search whole Action for keyframes instead of in group with matching name only (is slower)" -#AnimVizMotionPaths.show_keyframe_highlight -> show_keyframe_highlight: boolean "Emphasize position of keyframes on Motion Paths" -#+ * AnimVizMotionPaths.show_keyframe_numbers -> show_keyframe_numbers: boolean "Show frame numbers of Keyframes on Motion Paths" -#+ * AnimVizMotionPaths.type -> type: enum "Type of range to show for Motion Paths" -#AnimVizOnionSkinning.frame_after -> frame_after: int "Number of frames to show after the current frame (only for Around Current Frame Onion-skinning method)" -#AnimVizOnionSkinning.frame_before -> frame_before: int "Number of frames to show before the current frame (only for Around Current Frame Onion-skinning method)" -#+ * AnimVizOnionSkinning.frame_end -> frame_end: int "End frame of range of Ghosts to display (not for Around Current Frame Onion-skinning method)" -#+ * AnimVizOnionSkinning.frame_start -> frame_start: int "Starting frame of range of Ghosts to display (not for Around Current Frame Onion-skinning method)" -#+ * AnimVizOnionSkinning.frame_step -> frame_step: int "Number of frames between ghosts shown (not for On Keyframes Onion-skinning method)" -#AnimVizOnionSkinning.show_only_selected -> show_only_selected: boolean "For Pose-Mode drawing, only draw ghosts for selected bones" -#+ * AnimVizOnionSkinning.type -> type: enum "Method used for determining what ghosts get drawn" -#MAKE PROPERTY OF A COLLECTION * Area.active_space -> active_space: pointer, "(read-only) Space currently being displayed in this area" -#+ * Area.regions -> regions: collection, "(read-only) Regions this area is subdivided in" -#+ * Area.show_menus -> show_menus: boolean "Show menus in the header" -#+ * Area.spaces -> spaces: collection, "(read-only) Spaces contained in this area, the first space is active" -#+ * Area.type -> type: enum "Space type" -#+ * ArmatureBones.active -> active: pointer "Armatures active bone" -#+ * ArmatureEditBones.active -> active: pointer "Armatures active edit bone" -#+ * BackgroundImage.image -> image: pointer "Image displayed and edited in this space" -#+ * BackgroundImage.image_user -> image_user: pointer, "(read-only) Parameters defining which layer, pass and frame of the image is displayed" -#+ * BackgroundImage.offset_x -> offset_x: float "Offsets image horizontally from the world origin" -#+ * BackgroundImage.offset_y -> offset_y: float "Offsets image vertically from the world origin" -#+ * BackgroundImage.show_expanded -> show_expanded: boolean "Show the expanded in the user interface" -#+ * BackgroundImage.size -> size: float "Scaling factor for the background image" -#+ * BackgroundImage.transparency -> transparency: float "Amount to blend the image against the background color" -#+ * BackgroundImage.view_axis -> view_axis: enum "The axis to display the image on" -#+ * BezierSplinePoint.co -> co: float[3] "Coordinates of the control point" -#BezierSplinePoint.handle_left -> handle_left: float[3] "Coordinates of the first handle" -#BezierSplinePoint.handle_left_type -> handle_left_type: enum "Handle types" -#BezierSplinePoint.handle_right -> handle_right: float[3] "Coordinates of the second handle" -#BezierSplinePoint.handle_right_type -> handle_right_type: enum "Handle types" -#+ * BezierSplinePoint.hide -> hide: boolean "Visibility status" -#+ * BezierSplinePoint.radius -> radius: float, "(read-only) Radius for bevelling" -#+ * BezierSplinePoint.select_control_point -> select_control_point: boolean "Control point selection status" -#+ * BezierSplinePoint.select_left_handle -> select_left_handle: boolean "Handle 1 selection status" -#+ * BezierSplinePoint.select_right_handle -> select_right_handle: boolean "Handle 2 selection status" -#+ * BezierSplinePoint.tilt -> tilt: float "Tilt in 3D View" -#+ * BezierSplinePoint.weight -> weight: float "Softbody goal weight" -#+ * BlenderRNA.structs -> structs: collection, "(read-only)" -#+ * BoidRule.name -> name: string "Boid rule name" -#+ * BoidRule.type -> type: enum, "(read-only)" -#BoidRule.use_in_air -> use_in_air: boolean "Use rule when boid is flying" -#BoidRule.use_on_land -> use_on_land: boolean "Use rule when boid is on land" -#+ * BoidRule|BoidRuleAverageSpeed.level -> level: float "How much velocitys z-component is kept constant" -#+ * BoidRule|BoidRuleAverageSpeed.speed -> speed: float "Percentage of maximum speed" -#+ * BoidRule|BoidRuleAverageSpeed.wander -> wander: float "How fast velocitys direction is randomized" -#+ * BoidRule|BoidRuleAvoid.fear_factor -> fear_factor: float "Avoid object if danger from it is above this threshold" -#+ * BoidRule|BoidRuleAvoid.object -> object: pointer "Object to avoid" -#BoidRule|BoidRuleAvoid.use_predict -> use_predict: boolean "Predict target movement" -#+ * BoidRule|BoidRuleAvoidCollision.look_ahead -> look_ahead: float "Time to look ahead in seconds" -#BoidRule|BoidRuleAvoidCollision.use_avoid -> use_avoid: boolean "Avoid collision with other boids" -#BoidRule|BoidRuleAvoidCollision.use_avoid_collision -> use_avoid_collision: boolean "Avoid collision with deflector objects" -#+ * BoidRule|BoidRuleFight.distance -> distance: float "Attack boids at max this distance" -#+ * BoidRule|BoidRuleFight.flee_distance -> flee_distance: float "Flee to this distance" -#+ * BoidRule|BoidRuleFollowLeader.distance -> distance: float "Distance behind leader to follow" -#+ * BoidRule|BoidRuleFollowLeader.object -> object: pointer "Follow this object instead of a boid" -#BoidRule|BoidRuleFollowLeader.queue_count -> queue_count: int "How many boids in a line" -#BoidRule|BoidRuleFollowLeader.use_line -> use_line: boolean "Follow leader in a line" -#+ * BoidRule|BoidRuleGoal.object -> object: pointer "Goal object" -#BoidRule|BoidRuleGoal.use_predict -> use_predict: boolean "Predict target movement" -#+ * BoidSettings.accuracy -> accuracy: float "Accuracy of attack" -#+ * BoidSettings.active_boid_state -> active_boid_state: pointer, "(read-only)" -#+ * BoidSettings.active_boid_state_index -> active_boid_state_index: int "NO DESCRIPTION" -#+ * BoidSettings.aggression -> aggression: float "Boid will fight this times stronger enemy" -#BoidSettings.air_acc_max -> air_acc_max: float "Maximum acceleration in air (relative to maximum speed)" -#BoidSettings.air_ave_max -> air_ave_max: float "Maximum angular velocity in air (relative to 180 degrees)" -#+ * BoidSettings.air_personal_space -> air_personal_space: float "Radius of boids personal space in air (% of particle size)" -#BoidSettings.air_speed_max -> air_speed_max: float "Maximum speed in air" -#BoidSettings.air_speed_min -> air_speed_min: float "Minimum speed in air (relative to maximum speed)" -#BoidSettings.bank -> bank: float "Amount of rotation around velocity vector on turns" -#+ * BoidSettings.health -> health: float "Initial boid health when born" -#+ * BoidSettings.height -> height: float "Boid height relative to particle size" -#BoidSettings.land_acc_max -> land_acc_max: float "Maximum acceleration on land (relative to maximum speed)" -#BoidSettings.land_ave_max -> land_ave_max: float "Maximum angular velocity on land (relative to 180 degrees)" -#+ * BoidSettings.land_jump_speed -> land_jump_speed: float "Maximum speed for jumping" -#+ * BoidSettings.land_personal_space -> land_personal_space: float "Radius of boids personal space on land (% of particle size)" -#BoidSettings.land_smooth -> land_smooth: float "How smoothly the boids land" -#BoidSettings.land_speed_max -> land_speed_max: float "Maximum speed on land" -#+ * BoidSettings.land_stick_force -> land_stick_force: float "How strong a force must be to start effecting a boid on land" -#+ * BoidSettings.range -> range: float "The maximum distance from which a boid can attack" -#+ * BoidSettings.states -> states: collection, "(read-only)" -#+ * BoidSettings.strength -> strength: float "Maximum caused damage on attack per second" -#BoidSettings.use_climb -> use_climb: boolean "Allow boids to climb goal objects" -#BoidSettings.use_flight -> use_flight: boolean "Allow boids to move in air" -#BoidSettings.use_land -> use_land: boolean "Allow boids to move on land" -#+ * BoidState.active_boid_rule -> active_boid_rule: pointer, "(read-only)" -#+ * BoidState.active_boid_rule_index -> active_boid_rule_index: int "NO DESCRIPTION" -#+ * BoidState.falloff -> falloff: float "NO DESCRIPTION" -#+ * BoidState.name -> name: string "Boid state name" -#BoidState.rule_fuzzy -> rule_fuzzy: float "NO DESCRIPTION" -#+ * BoidState.rules -> rules: collection, "(read-only)" -#+ * BoidState.ruleset_type -> ruleset_type: enum "How the rules in the list are evaluated" -#+ * BoidState.volume -> volume: float "NO DESCRIPTION" -#+ * Bone.bbone_in -> bbone_in: float "Length of first Bezier Handle (for B-Bones only)" -#+ * Bone.bbone_out -> bbone_out: float "Length of second Bezier Handle (for B-Bones only)" -#+ * Bone.bbone_segments -> bbone_segments: int "Number of subdivisions of bone (for B-Bones only)" -#+ * Bone.children -> children: collection, "(read-only) Bones which are children of this bone" -#+ * Bone.envelope_distance -> envelope_distance: float "Bone deformation distance (for Envelope deform only)" -#+ * Bone.envelope_weight -> envelope_weight: float "Bone deformation weight (for Envelope deform only)" -#+ * Bone.head -> head: float[3] "Location of head end of the bone relative to its parent" -#+ * Bone.head_local -> head_local: float[3] "Location of head end of the bone relative to armature" -#+ * Bone.head_radius -> head_radius: float "Radius of head of bone (for Envelope deform only)" -#+ * Bone.hide -> hide: boolean "Bone is not visible when it is not in Edit Mode (i.e. in Object or Pose Modes)" -#+ * Bone.hide_select -> hide_select: boolean "Bone is able to be selected" -#Bone.layers -> layers: boolean[32] "Layers bone exists in" -#+ * Bone.matrix -> matrix: float[9] "3x3 bone matrix" -#+ * Bone.matrix_local -> matrix_local: float[16] "4x4 bone matrix relative to armature" -#+ * Bone.name -> name: string "NO DESCRIPTION" -#+ * Bone.parent -> parent: pointer, "(read-only) Parent bone (in same Armature)" -#+ * Bone.select -> select: boolean "NO DESCRIPTION" -#Bone.show_wire -> show_wire: boolean "Bone is always drawn as Wireframe regardless of viewport draw mode. Useful for non-obstructive custom bone shapes" -#+ * Bone.tail -> tail: float[3] "Location of tail end of the bone" -#+ * Bone.tail_local -> tail_local: float[3] "Location of tail end of the bone relative to armature" -#+ * Bone.tail_radius -> tail_radius: float "Radius of tail of bone (for Envelope deform only)" -#Bone.use_connect -> use_connect: boolean, "(read-only) When bone has a parent, bones head is struck to the parents tail" -#Bone.use_cyclic_offset -> use_cyclic_offset: boolean "When bone doesnt have a parent, it receives cyclic offset effects" -#Bone.use_deform -> use_deform: boolean "Bone does not deform any geometry" -#Bone.use_envelope_multiply -> use_envelope_multiply: boolean "When deforming bone, multiply effects of Vertex Group weights with Envelope influence" -#Bone.use_hinge -> use_hinge: boolean "Bone inherits rotation or scale from parent bone" -#Bone.use_inherit_scale -> use_inherit_scale: boolean "Bone inherits scaling from parent bone" -#Bone.use_local_location -> use_local_location: boolean "Bone location is set in local space" -#+ * BoneGroup.color_set -> color_set: enum "Custom color set to use" -#+ * BoneGroup.colors -> colors: pointer, "(read-only) Copy of the colors associated with the groups color set" -#+ * BoneGroup.name -> name: string "NO DESCRIPTION" -#BoneGroups.active -> active: pointer "Active bone group for this pose" -#+ * ClothCollisionSettings.collision_quality -> collision_quality: int "How many collision iterations should be done. (higher is better quality but slower)" -#ClothCollisionSettings.distance_min -> distance_min: float "Minimum distance between collision objects before collision response takes in" -#+ * ClothCollisionSettings.friction -> friction: float "Friction force if a collision happened. (higher = less movement)" -#+ * ClothCollisionSettings.group -> group: pointer "Limit colliders to this Group" -#+ * ClothCollisionSettings.self_collision_quality -> self_collision_quality: int "How many self collision iterations should be done. (higher is better quality but slower)" -#ClothCollisionSettings.self_distance_min -> self_distance_min: float "0.5 means no distance at all, 1.0 is maximum distance" -#+ * ClothCollisionSettings.self_friction -> self_friction: float "Friction/damping with self contact" -#ClothCollisionSettings.use_collision -> use_collision: boolean "Enable collisions with other objects" -#ClothCollisionSettings.use_self_collision -> use_self_collision: boolean "Enable self collisions" -#+ * ClothSettings.air_damping -> air_damping: float "Air has normally some thickness which slows falling things down" -#+ * ClothSettings.bending_stiffness -> bending_stiffness: float "Wrinkle coefficient. (higher = less smaller but more big wrinkles)" -#+ * ClothSettings.bending_stiffness_max -> bending_stiffness_max: float "Maximum bending stiffness value" -#+ * ClothSettings.bending_vertex_group -> bending_vertex_group: string "Vertex group for fine control over bending stiffness" -#+ * ClothSettings.collider_friction -> collider_friction: float "NO DESCRIPTION" -#+ * ClothSettings.effector_weights -> effector_weights: pointer, "(read-only)" -#+ * ClothSettings.goal_default -> goal_default: float "Default Goal (vertex target position) value, when no Vertex Group used" -#+ * ClothSettings.goal_friction -> goal_friction: float "Goal (vertex target position) friction" -#+ * ClothSettings.goal_max -> goal_max: float "Goal maximum, vertex group weights are scaled to match this range" -#+ * ClothSettings.goal_min -> goal_min: float "Goal minimum, vertex group weights are scaled to match this range" -#+ * ClothSettings.goal_spring -> goal_spring: float "Goal (vertex target position) spring stiffness" -#+ * ClothSettings.gravity -> gravity: float[3] "Gravity or external force vector" -#+ * ClothSettings.internal_friction -> internal_friction: float "NO DESCRIPTION" -#+ * ClothSettings.mass -> mass: float "Mass of cloth material" -#+ * ClothSettings.mass_vertex_group -> mass_vertex_group: string "Vertex Group for pinning of vertices" -#+ * ClothSettings.pin_stiffness -> pin_stiffness: float "Pin (vertex target position) spring stiffness" -#+ * ClothSettings.pre_roll -> pre_roll: int "Simulation starts on this frame" -#+ * ClothSettings.quality -> quality: int "Quality of the simulation in steps per frame. (higher is better quality but slower)" -#+ * ClothSettings.rest_shape_key -> rest_shape_key: pointer "Shape key to use the rest spring lengths from" -#+ * ClothSettings.spring_damping -> spring_damping: float "Damping of cloth velocity. (higher = more smooth, less jiggling)" -#+ * ClothSettings.structural_stiffness -> structural_stiffness: float "Overall stiffness of structure" -#+ * ClothSettings.structural_stiffness_max -> structural_stiffness_max: float "Maximum structural stiffness value" -#+ * ClothSettings.structural_stiffness_vertex_group -> structural_stiffness_vertex_group: string "Vertex group for fine control over structural stiffness" -#ClothSettings.use_pin_cloth -> use_pin_cloth: boolean "Enable pinning of cloth vertices to other objects/positions" -#ClothSettings.use_stiffness_scale -> use_stiffness_scale: boolean "If enabled, stiffness can be scaled along a weight painted vertex group" -#+ * CollisionSettings.absorption -> absorption: float "How much of effector force gets lost during collision with this object (in percent)" -#+ * CollisionSettings.damping -> damping: float "Amount of damping during collision" -#+ * CollisionSettings.damping_factor -> damping_factor: float "Amount of damping during particle collision" -#CollisionSettings.damping_random -> damping_random: float "Random variation of damping" -#+ * CollisionSettings.friction_factor -> friction_factor: float "Amount of friction during particle collision" -#CollisionSettings.friction_random -> friction_random: float "Random variation of friction" -#+ * CollisionSettings.permeability -> permeability: float "Chance that the particle will pass through the mesh" -#+ * CollisionSettings.stickness -> stickness: float "Amount of stickness to surface collision" -#CollisionSettings.thickness_inner -> thickness_inner: float "Inner face thickness" -#CollisionSettings.thickness_outer -> thickness_outer: float "Outer face thickness" -#+ * CollisionSettings.use -> use: boolean "Enable this objects as a collider for physics systems" -#CollisionSettings.use_particle_kill -> use_particle_kill: boolean "Kill collided particles" -#+ * ColorRamp.elements -> elements: collection, "(read-only)" -#+ * ColorRamp.interpolation -> interpolation: enum "NO DESCRIPTION" -#+ * ColorRampElement.color -> color: float[4] "NO DESCRIPTION" -#+ * ColorRampElement.position -> position: float "NO DESCRIPTION" -#ConsoleLine.body -> body: string "Text in the line" -#+ * ConsoleLine.current_character -> current_character: int "NO DESCRIPTION" -#+ * Constraint.active -> active: boolean "Constraint is the one being edited" -#Constraint.error_location -> error_location: float, "(read-only) Amount of residual error in Blender space unit for constraints that work on position" -#Constraint.error_rotation -> error_rotation: float, "(read-only) Amount of residual error in radiant for constraints that work on orientation" -#+ * Constraint.influence -> influence: float "Amount of influence constraint will have on the final solution" -#Constraint.is_proxy_local -> is_proxy_local: boolean "Constraint was added in this proxy instance (i.e. did not belong to source Armature)" -#Constraint.is_valid -> is_valid: boolean, "(read-only) Constraint has invalid settings and will not be evaluated" -#+ * Constraint.mute -> mute: boolean "Enable/Disable Constraint" -#+ * Constraint.name -> name: string "Constraint name" -#+ * Constraint.owner_space -> owner_space: enum "Space that owner is evaluated in" -#Constraint.show_expanded -> show_expanded: boolean "Constraints panel is expanded in UI" -#+ * Constraint.target_space -> target_space: enum "Space that target is evaluated in" -#+ * Constraint.type -> type: enum, "(read-only)" -#+ * ConstraintTarget.subtarget -> subtarget: string "NO DESCRIPTION" -#+ * ConstraintTarget.target -> target: pointer "Target Object" -#+ * Constraint|ActionConstraint.action -> action: pointer "NO DESCRIPTION" -#+ * Constraint|ActionConstraint.frame_end -> frame_end: int "Last frame of the Action to use" -#+ * Constraint|ActionConstraint.frame_start -> frame_start: int "First frame of the Action to use" -#Constraint|ActionConstraint.max -> max: float "Maximum value for target channel range" -#Constraint|ActionConstraint.min -> min: float "Minimum value for target channel range" -#+ * Constraint|ActionConstraint.subtarget -> subtarget: string "NO DESCRIPTION" -#+ * Constraint|ActionConstraint.target -> target: pointer "Target Object" -#+ * Constraint|ActionConstraint.transform_channel -> transform_channel: enum "Transformation channel from the target that is used to key the Action" -#+ * Constraint|ChildOfConstraint.subtarget -> subtarget: string "NO DESCRIPTION" -#+ * Constraint|ChildOfConstraint.target -> target: pointer "Target Object" -#+ * Constraint|ChildOfConstraint.use_location_x -> use_location_x: boolean "Use X Location of Parent" -#+ * Constraint|ChildOfConstraint.use_location_y -> use_location_y: boolean "Use Y Location of Parent" -#+ * Constraint|ChildOfConstraint.use_location_z -> use_location_z: boolean "Use Z Location of Parent" -#+ * Constraint|ChildOfConstraint.use_rotation_x -> use_rotation_x: boolean "Use X Rotation of Parent" -#+ * Constraint|ChildOfConstraint.use_rotation_y -> use_rotation_y: boolean "Use Y Rotation of Parent" -#+ * Constraint|ChildOfConstraint.use_rotation_z -> use_rotation_z: boolean "Use Z Rotation of Parent" -#+ * Constraint|ChildOfConstraint.use_scale_x -> use_scale_x: boolean "Use X Scale of Parent" -#+ * Constraint|ChildOfConstraint.use_scale_y -> use_scale_y: boolean "Use Y Scale of Parent" -#+ * Constraint|ChildOfConstraint.use_scale_z -> use_scale_z: boolean "Use Z Scale of Parent" -#+ * Constraint|ClampToConstraint.main_axis -> main_axis: enum "Main axis of movement" -#+ * Constraint|ClampToConstraint.target -> target: pointer "Target Object" -#Constraint|ClampToConstraint.use_cyclic -> use_cyclic: boolean "Treat curve as cyclic curve (no clamping to curve bounding box" -#+ * Constraint|CopyLocationConstraint.head_tail -> head_tail: float "Target along length of bone: Head=0, Tail=1" -#+ * Constraint|CopyLocationConstraint.invert_x -> invert_x: boolean "Invert the X location" -#+ * Constraint|CopyLocationConstraint.invert_y -> invert_y: boolean "Invert the Y location" -#+ * Constraint|CopyLocationConstraint.invert_z -> invert_z: boolean "Invert the Z location" -#+ * Constraint|CopyLocationConstraint.subtarget -> subtarget: string "NO DESCRIPTION" -#+ * Constraint|CopyLocationConstraint.target -> target: pointer "Target Object" -#+ * Constraint|CopyLocationConstraint.use_offset -> use_offset: boolean "Add original location into copied location" -#+ * Constraint|CopyLocationConstraint.use_x -> use_x: boolean "Copy the targets X location" -#+ * Constraint|CopyLocationConstraint.use_y -> use_y: boolean "Copy the targets Y location" -#+ * Constraint|CopyLocationConstraint.use_z -> use_z: boolean "Copy the targets Z location" -#+ * Constraint|CopyRotationConstraint.invert_x -> invert_x: boolean "Invert the X rotation" -#+ * Constraint|CopyRotationConstraint.invert_y -> invert_y: boolean "Invert the Y rotation" -#+ * Constraint|CopyRotationConstraint.invert_z -> invert_z: boolean "Invert the Z rotation" -#+ * Constraint|CopyRotationConstraint.subtarget -> subtarget: string "NO DESCRIPTION" -#+ * Constraint|CopyRotationConstraint.target -> target: pointer "Target Object" -#+ * Constraint|CopyRotationConstraint.use_offset -> use_offset: boolean "Add original rotation into copied rotation" -#+ * Constraint|CopyRotationConstraint.use_x -> use_x: boolean "Copy the targets X rotation" -#+ * Constraint|CopyRotationConstraint.use_y -> use_y: boolean "Copy the targets Y rotation" -#+ * Constraint|CopyRotationConstraint.use_z -> use_z: boolean "Copy the targets Z rotation" -#+ * Constraint|CopyScaleConstraint.subtarget -> subtarget: string "NO DESCRIPTION" -#+ * Constraint|CopyScaleConstraint.target -> target: pointer "Target Object" -#+ * Constraint|CopyScaleConstraint.use_offset -> use_offset: boolean "Add original scale into copied scale" -#+ * Constraint|CopyScaleConstraint.use_x -> use_x: boolean "Copy the targets X scale" -#+ * Constraint|CopyScaleConstraint.use_y -> use_y: boolean "Copy the targets Y scale" -#+ * Constraint|CopyScaleConstraint.use_z -> use_z: boolean "Copy the targets Z scale" -#+ * Constraint|CopyTransformsConstraint.head_tail -> head_tail: float "Target along length of bone: Head=0, Tail=1" -#+ * Constraint|CopyTransformsConstraint.subtarget -> subtarget: string "NO DESCRIPTION" -#+ * Constraint|CopyTransformsConstraint.target -> target: pointer "Target Object" -#+ * Constraint|DampedTrackConstraint.subtarget -> subtarget: string "NO DESCRIPTION" -#+ * Constraint|DampedTrackConstraint.target -> target: pointer "Target Object" -#Constraint|DampedTrackConstraint.track_axis -> track_axis: enum "Axis that points to the target object" -#+ * Constraint|FloorConstraint.floor_location -> floor_location: enum "Location of target that object will not pass through" -#+ * Constraint|FloorConstraint.offset -> offset: float "Offset of floor from object origin" -#+ * Constraint|FloorConstraint.subtarget -> subtarget: string "NO DESCRIPTION" -#+ * Constraint|FloorConstraint.target -> target: pointer "Target Object" -#+ * Constraint|FloorConstraint.use_rotation -> use_rotation: boolean "Use the targets rotation to determine floor" -#Constraint|FloorConstraint.use_sticky -> use_sticky: boolean "Immobilize object while constrained" -#Constraint|FollowPathConstraint.forward_axis -> forward_axis: enum "Axis that points forward along the path" -#+ * Constraint|FollowPathConstraint.offset -> offset: int "Offset from the position corresponding to the time frame" -#+ * Constraint|FollowPathConstraint.offset_factor -> offset_factor: float "Percentage value defining target position along length of bone" -#+ * Constraint|FollowPathConstraint.target -> target: pointer "Target Object" -#Constraint|FollowPathConstraint.up_axis -> up_axis: enum "Axis that points upward" -#+ * Constraint|FollowPathConstraint.use_curve_follow -> use_curve_follow: boolean "Object will follow the heading and banking of the curve" -#+ * Constraint|FollowPathConstraint.use_curve_radius -> use_curve_radius: boolean "Objects scale by the curve radius" -#Constraint|FollowPathConstraint.use_fixed_location -> use_fixed_location: boolean "Object will stay locked to a single point somewhere along the length of the curve regardless of time" -#Constraint|KinematicConstraint.chain_count -> chain_count: int "How many bones are included in the IK effect - 0 uses all bones" -#+ * Constraint|KinematicConstraint.distance -> distance: float "Radius of limiting sphere" -#+ * Constraint|KinematicConstraint.ik_type -> ik_type: enum "NO DESCRIPTION" -#+ * Constraint|KinematicConstraint.iterations -> iterations: int "Maximum number of solving iterations" -#+ * Constraint|KinematicConstraint.limit_mode -> limit_mode: enum "Distances in relation to sphere of influence to allow" -#Constraint|KinematicConstraint.lock_location_x -> lock_location_x: boolean "Constraint position along X axis" -#Constraint|KinematicConstraint.lock_location_y -> lock_location_y: boolean "Constraint position along Y axis" -#Constraint|KinematicConstraint.lock_location_z -> lock_location_z: boolean "Constraint position along Z axis" -#Constraint|KinematicConstraint.lock_rotation_x -> lock_rotation_x: boolean "Constraint rotation along X axis" -#Constraint|KinematicConstraint.lock_rotation_y -> lock_rotation_y: boolean "Constraint rotation along Y axis" -#Constraint|KinematicConstraint.lock_rotation_z -> lock_rotation_z: boolean "Constraint rotation along Z axis" -#+ * Constraint|KinematicConstraint.orient_weight -> orient_weight: float "For Tree-IK: Weight of orientation control for this target" -#+ * Constraint|KinematicConstraint.pole_angle -> pole_angle: float "Pole rotation offset" -#+ * Constraint|KinematicConstraint.pole_subtarget -> pole_subtarget: string "NO DESCRIPTION" -#+ * Constraint|KinematicConstraint.pole_target -> pole_target: pointer "Object for pole rotation" -#Constraint|KinematicConstraint.reference_axis -> reference_axis: enum "Constraint axis Lock options relative to Bone or Target reference" -#+ * Constraint|KinematicConstraint.subtarget -> subtarget: string "NO DESCRIPTION" -#+ * Constraint|KinematicConstraint.target -> target: pointer "Target Object" -#Constraint|KinematicConstraint.use_location -> use_location: boolean "Chain follows position of target" -#+ * Constraint|KinematicConstraint.use_rotation -> use_rotation: boolean "Chain follows rotation of target" -#+ * Constraint|KinematicConstraint.use_stretch -> use_stretch: boolean "Enable IK Stretching" -#+ * Constraint|KinematicConstraint.use_tail -> use_tail: boolean "Include bones tail as last element in chain" -#+ * Constraint|KinematicConstraint.use_target -> use_target: boolean "Disable for targetless IK" -#+ * Constraint|KinematicConstraint.weight -> weight: float "For Tree-IK: Weight of position control for this target" -#+ * Constraint|LimitDistanceConstraint.distance -> distance: float "Radius of limiting sphere" -#+ * Constraint|LimitDistanceConstraint.limit_mode -> limit_mode: enum "Distances in relation to sphere of influence to allow" -#+ * Constraint|LimitDistanceConstraint.subtarget -> subtarget: string "NO DESCRIPTION" -#+ * Constraint|LimitDistanceConstraint.target -> target: pointer "Target Object" -#Constraint|LimitLocationConstraint.max_x -> max_x: float "Highest X value to allow" -#Constraint|LimitLocationConstraint.max_y -> max_y: float "Highest Y value to allow" -#Constraint|LimitLocationConstraint.max_z -> max_z: float "Highest Z value to allow" -#Constraint|LimitLocationConstraint.min_x -> min_x: float "Lowest X value to allow" -#Constraint|LimitLocationConstraint.min_y -> min_y: float "Lowest Y value to allow" -#Constraint|LimitLocationConstraint.min_z -> min_z: float "Lowest Z value to allow" -#Constraint|LimitLocationConstraint.use_max_x -> use_max_x: boolean "Use the maximum X value" -#Constraint|LimitLocationConstraint.use_max_y -> use_max_y: boolean "Use the maximum Y value" -#Constraint|LimitLocationConstraint.use_max_z -> use_max_z: boolean "Use the maximum Z value" -#Constraint|LimitLocationConstraint.use_min_x -> use_min_x: boolean "Use the minimum X value" -#Constraint|LimitLocationConstraint.use_min_y -> use_min_y: boolean "Use the minimum Y value" -#Constraint|LimitLocationConstraint.use_min_z -> use_min_z: boolean "Use the minimum Z value" -#Constraint|LimitLocationConstraint.use_transform_limit -> use_transform_limit: boolean "Transforms are affected by this constraint as well" -#Constraint|LimitRotationConstraint.max_x -> max_x: float "Highest X value to allow" -#Constraint|LimitRotationConstraint.max_y -> max_y: float "Highest Y value to allow" -#Constraint|LimitRotationConstraint.max_z -> max_z: float "Highest Z value to allow" -#Constraint|LimitRotationConstraint.min_x -> min_x: float "Lowest X value to allow" -#Constraint|LimitRotationConstraint.min_y -> min_y: float "Lowest Y value to allow" -#Constraint|LimitRotationConstraint.min_z -> min_z: float "Lowest Z value to allow" -#+ * Constraint|LimitRotationConstraint.use_limit_x -> use_limit_x: boolean "Use the minimum X value" -#+ * Constraint|LimitRotationConstraint.use_limit_y -> use_limit_y: boolean "Use the minimum Y value" -#+ * Constraint|LimitRotationConstraint.use_limit_z -> use_limit_z: boolean "Use the minimum Z value" -#Constraint|LimitRotationConstraint.use_transform_limit -> use_transform_limit: boolean "Transforms are affected by this constraint as well" -#Constraint|LimitScaleConstraint.max_x -> max_x: float "Highest X value to allow" -#Constraint|LimitScaleConstraint.max_y -> max_y: float "Highest Y value to allow" -#Constraint|LimitScaleConstraint.max_z -> max_z: float "Highest Z value to allow" -#Constraint|LimitScaleConstraint.min_x -> min_x: float "Lowest X value to allow" -#Constraint|LimitScaleConstraint.min_y -> min_y: float "Lowest Y value to allow" -#Constraint|LimitScaleConstraint.min_z -> min_z: float "Lowest Z value to allow" -#Constraint|LimitScaleConstraint.use_max_x -> use_max_x: boolean "Use the maximum X value" -#Constraint|LimitScaleConstraint.use_max_y -> use_max_y: boolean "Use the maximum Y value" -#Constraint|LimitScaleConstraint.use_max_z -> use_max_z: boolean "Use the maximum Z value" -#Constraint|LimitScaleConstraint.use_min_x -> use_min_x: boolean "Use the minimum X value" -#Constraint|LimitScaleConstraint.use_min_y -> use_min_y: boolean "Use the minimum Y value" -#Constraint|LimitScaleConstraint.use_min_z -> use_min_z: boolean "Use the minimum Z value" -#Constraint|LimitScaleConstraint.use_transform_limit -> use_transform_limit: boolean "Transforms are affected by this constraint as well" -#Constraint|LockedTrackConstraint.lock_axis -> lock_axis: enum "Axis that points upward" -#+ * Constraint|LockedTrackConstraint.subtarget -> subtarget: string "NO DESCRIPTION" -#+ * Constraint|LockedTrackConstraint.target -> target: pointer "Target Object" -#Constraint|LockedTrackConstraint.track_axis -> track_axis: enum "Axis that points to the target object" -#Constraint|MaintainVolumeConstraint.free_axis -> free_axis: enum "The free scaling axis of the object" -#+ * Constraint|MaintainVolumeConstraint.volume -> volume: float "Volume of the bone at rest" -#+ * Constraint|PivotConstraint.head_tail -> head_tail: float "Target along length of bone: Head=0, Tail=1" -#+ * Constraint|PivotConstraint.offset -> offset: float[3] "Offset of pivot from target (when set), or from owners location (when Fixed Position is off), or the absolute pivot point" -#Constraint|PivotConstraint.rotation_range -> rotation_range: enum "Rotation range on which pivoting should occur" -#+ * Constraint|PivotConstraint.subtarget -> subtarget: string "NO DESCRIPTION" -#+ * Constraint|PivotConstraint.target -> target: pointer "Target Object, defining the position of the pivot when defined" -#Constraint|PivotConstraint.use_relative_location -> use_relative_location: boolean "Offset will be an absolute point in space instead of relative to the target" -#Constraint|PythonConstraint.has_script_error -> has_script_error: boolean, "(read-only) The linked Python script has thrown an error" -#Constraint|PythonConstraint.target_count -> target_count: int "Usually only 1-3 are needed" -#+ * Constraint|PythonConstraint.targets -> targets: collection, "(read-only) Target Objects" -#+ * Constraint|PythonConstraint.text -> text: pointer "The text object that contains the Python script" -#+ * Constraint|PythonConstraint.use_targets -> use_targets: boolean "Use the targets indicated in the constraint panel" -#+ * Constraint|RigidBodyJointConstraint.axis_x -> axis_x: float "Rotate pivot on X axis in degrees" -#+ * Constraint|RigidBodyJointConstraint.axis_y -> axis_y: float "Rotate pivot on Y axis in degrees" -#+ * Constraint|RigidBodyJointConstraint.axis_z -> axis_z: float "Rotate pivot on Z axis in degrees" -#+ * Constraint|RigidBodyJointConstraint.child -> child: pointer "Child object" -#+ * Constraint|RigidBodyJointConstraint.pivot_type -> pivot_type: enum "NO DESCRIPTION" -#+ * Constraint|RigidBodyJointConstraint.pivot_x -> pivot_x: float "Offset pivot on X" -#+ * Constraint|RigidBodyJointConstraint.pivot_y -> pivot_y: float "Offset pivot on Y" -#+ * Constraint|RigidBodyJointConstraint.pivot_z -> pivot_z: float "Offset pivot on Z" -#Constraint|RigidBodyJointConstraint.show_pivot -> show_pivot: boolean "Display the pivot point and rotation in 3D view" -#+ * Constraint|RigidBodyJointConstraint.target -> target: pointer "Target Object" -#Constraint|RigidBodyJointConstraint.use_linked_collision -> use_linked_collision: boolean "Disable collision between linked bodies" -#+ * Constraint|ShrinkwrapConstraint.distance -> distance: float "Distance to Target" -#+ * Constraint|ShrinkwrapConstraint.shrinkwrap_type -> shrinkwrap_type: enum "Selects type of shrinkwrap algorithm for target position" -#+ * Constraint|ShrinkwrapConstraint.target -> target: pointer "Target Object" -#+ * Constraint|ShrinkwrapConstraint.use_x -> use_x: boolean "Projection over X Axis" -#+ * Constraint|ShrinkwrapConstraint.use_y -> use_y: boolean "Projection over Y Axis" -#+ * Constraint|ShrinkwrapConstraint.use_z -> use_z: boolean "Projection over Z Axis" -#Constraint|SplineIKConstraint.chain_count -> chain_count: int "How many bones are included in the chain" -#+ * Constraint|SplineIKConstraint.joint_bindings -> joint_bindings: float[32] "(EXPERIENCED USERS ONLY) The relative positions of the joints along the chain as percentages" -#+ * Constraint|SplineIKConstraint.target -> target: pointer "Curve that controls this relationship" -#Constraint|SplineIKConstraint.use_chain_offset -> use_chain_offset: boolean "Offset the entire chain relative to the root joint" -#+ * Constraint|SplineIKConstraint.use_curve_radius -> use_curve_radius: boolean "Average radius of the endpoints is used to tweak the X and Z Scaling of the bones, on top of XZ Scale mode" -#Constraint|SplineIKConstraint.use_even_divisions -> use_even_divisions: boolean "Ignore the relative lengths of the bones when fitting to the curve" -#Constraint|SplineIKConstraint.use_y_stretch -> use_y_stretch: boolean "Stretch the Y axis of the bones to fit the curve" -#Constraint|SplineIKConstraint.xz_scale_mode -> xz_scale_mode: enum "Method used for determining the scaling of the X and Z axes of the bones" -#+ * Constraint|StretchToConstraint.bulge -> bulge: float "Factor between volume variation and stretching" -#+ * Constraint|StretchToConstraint.head_tail -> head_tail: float "Target along length of bone: Head=0, Tail=1" -#+ * Constraint|StretchToConstraint.keep_axis -> keep_axis: enum "Axis to maintain during stretch" -#Constraint|StretchToConstraint.rest_length -> rest_length: float "Length at rest position" -#+ * Constraint|StretchToConstraint.subtarget -> subtarget: string "NO DESCRIPTION" -#+ * Constraint|StretchToConstraint.target -> target: pointer "Target Object" -#+ * Constraint|StretchToConstraint.volume -> volume: enum "Maintain the objects volume as it stretches" -#+ * Constraint|TrackToConstraint.head_tail -> head_tail: float "Target along length of bone: Head=0, Tail=1" -#+ * Constraint|TrackToConstraint.subtarget -> subtarget: string "NO DESCRIPTION" -#+ * Constraint|TrackToConstraint.target -> target: pointer "Target Object" -#Constraint|TrackToConstraint.track_axis -> track_axis: enum "Axis that points to the target object" -#Constraint|TrackToConstraint.up_axis -> up_axis: enum "Axis that points upward" -#Constraint|TrackToConstraint.use_target_z -> use_target_z: boolean "Targets Z axis, not World Z axis, will constraint the Up direction" -#+ * Constraint|TransformConstraint.from_max_x -> from_max_x: float "Top range of X axis source motion" -#+ * Constraint|TransformConstraint.from_max_y -> from_max_y: float "Top range of Y axis source motion" -#+ * Constraint|TransformConstraint.from_max_z -> from_max_z: float "Top range of Z axis source motion" -#+ * Constraint|TransformConstraint.from_min_x -> from_min_x: float "Bottom range of X axis source motion" -#+ * Constraint|TransformConstraint.from_min_y -> from_min_y: float "Bottom range of Y axis source motion" -#+ * Constraint|TransformConstraint.from_min_z -> from_min_z: float "Bottom range of Z axis source motion" -#+ * Constraint|TransformConstraint.map_from -> map_from: enum "The transformation type to use from the target" -#+ * Constraint|TransformConstraint.map_to -> map_to: enum "The transformation type to affect of the constrained object" -#+ * Constraint|TransformConstraint.map_to_x_from -> map_to_x_from: enum "The source axis constrained objects X axis uses" -#+ * Constraint|TransformConstraint.map_to_y_from -> map_to_y_from: enum "The source axis constrained objects Y axis uses" -#+ * Constraint|TransformConstraint.map_to_z_from -> map_to_z_from: enum "The source axis constrained objects Z axis uses" -#+ * Constraint|TransformConstraint.subtarget -> subtarget: string "NO DESCRIPTION" -#+ * Constraint|TransformConstraint.target -> target: pointer "Target Object" -#+ * Constraint|TransformConstraint.to_max_x -> to_max_x: float "Top range of X axis destination motion" -#+ * Constraint|TransformConstraint.to_max_y -> to_max_y: float "Top range of Y axis destination motion" -#+ * Constraint|TransformConstraint.to_max_z -> to_max_z: float "Top range of Z axis destination motion" -#+ * Constraint|TransformConstraint.to_min_x -> to_min_x: float "Bottom range of X axis destination motion" -#+ * Constraint|TransformConstraint.to_min_y -> to_min_y: float "Bottom range of Y axis destination motion" -#+ * Constraint|TransformConstraint.to_min_z -> to_min_z: float "Bottom range of Z axis destination motion" -#Constraint|TransformConstraint.use_motion_extrapolate -> use_motion_extrapolate: boolean "Extrapolate ranges" -#+ * Context.area -> area: pointer, "(read-only)" -#+ * Context.main -> main: pointer, "(read-only)" -#+ * Context.mode -> mode: enum, "(read-only)" -#+ * Context.region -> region: pointer, "(read-only)" -#+ * Context.region_data -> region_data: pointer, "(read-only)" -#+ * Context.scene -> scene: pointer, "(read-only)" -#+ * Context.screen -> screen: pointer, "(read-only)" -#+ * Context.space_data -> space_data: pointer, "(read-only)" -#+ * Context.tool_settings -> tool_settings: pointer, "(read-only)" -#+ * Context.user_preferences -> user_preferences: pointer, "(read-only)" -#+ * Context.window -> window: pointer, "(read-only)" - + * Context.manager -> wm: pointer, "(read-only)" -#+ * Controller.name -> name: string "NO DESCRIPTION" -#Controller.show_expanded -> show_expanded: boolean "Set controller expanded in the user interface" -#Controller.states -> states: int "Set Controller state index (1 to 30)" -#+ * Controller.type -> type: enum "NO DESCRIPTION" -#Controller.use_priority -> use_priority: boolean "Mark controller for execution before all non-marked controllers (good for startup scripts)" -#+ * Controller|ExpressionController.expression -> expression: string "NO DESCRIPTION" -#+ * Controller|PythonController.mode -> mode: enum "Python script type (textblock or module - faster)" -#+ * Controller|PythonController.module -> module: string "Module name and function to run e.g. someModule.main. Internal texts and external python files can be used" -#+ * Controller|PythonController.text -> text: pointer "Text datablock with the python script" -#Controller|PythonController.use_debug -> use_debug: boolean "Continuously reload the module from disk for editing external modules without restarting" -#+ * CurveMap.extend -> extend: enum, "(read-only) Extrapolate the curve or extend it horizontally" -#+ * CurveMap.points -> points: collection, "(read-only)" -#+ * CurveMapPoint.handle_type -> handle_type: enum, "(read-only) Curve interpolation at this point: bezier or vector" -#+ * CurveMapPoint.location -> location: float[2], "(read-only) X/Y coordinates of the curve point" -#+ * CurveMapPoint.select -> select: boolean "Selection state of the curve point" -#+ * CurveMapping.black_level -> black_level: float[3] "For RGB curves, the color that black is mapped to" -#+ * CurveMapping.clip_max_x -> clip_max_x: float "NO DESCRIPTION" -#+ * CurveMapping.clip_max_y -> clip_max_y: float "NO DESCRIPTION" -#+ * CurveMapping.clip_min_x -> clip_min_x: float "NO DESCRIPTION" -#+ * CurveMapping.clip_min_y -> clip_min_y: float "NO DESCRIPTION" -#+ * CurveMapping.curves -> curves: collection, "(read-only)" -#CurveMapping.use_clip -> use_clip: boolean "Force the curve view to fit a defined boundary" -#+ * CurveMapping.white_level -> white_level: float[3] "For RGB curves, the color that white is mapped to" -#+ * CurveSplines.active -> active: pointer "Active curve spline" -#DopeSheet.filter_group -> filter_group: pointer "Group that included Object should be a member of" -#DopeSheet.show_armatures -> show_armatures: boolean "Include visualization of Armature related Animation data" -#DopeSheet.show_cameras -> show_cameras: boolean "Include visualization of Camera related Animation data" -#DopeSheet.show_curves -> show_curves: boolean "Include visualization of Curve related Animation data" -#DopeSheet.show_expanded_summary -> show_expanded_summary: boolean "Collapse summary when shown, so all other channels get hidden. (DopeSheet Editors Only)" -#DopeSheet.show_hidden -> show_hidden: boolean "Include channels from objects/bone that arent visible" -#DopeSheet.show_lamps -> show_lamps: boolean "Include visualization of Lamp related Animation data" -#DopeSheet.show_materials -> show_materials: boolean "Include visualization of Material related Animation data" -#DopeSheet.show_meshes -> show_meshes: boolean "Include visualization of Mesh related Animation data" -#DopeSheet.show_metaballs -> show_metaballs: boolean "Include visualization of Metaball related Animation data" -#DopeSheet.show_missing_nla -> show_missing_nla: boolean "Include Animation Data blocks with no NLA data. (NLA Editor only)" -#DopeSheet.show_nodes -> show_nodes: boolean "Include visualization of Node related Animation data" -#DopeSheet.show_only_group_objects -> show_only_group_objects: boolean "Only include channels from Objects in the specified Group" -#DopeSheet.show_only_selected -> show_only_selected: boolean "Only include channels relating to selected objects and data" -#DopeSheet.show_particles -> show_particles: boolean "Include visualization of Particle related Animation data" -#DopeSheet.show_scenes -> show_scenes: boolean "Include visualization of Scene related Animation data" -#DopeSheet.show_shapekeys -> show_shapekeys: boolean "Include visualization of ShapeKey related Animation data" -#DopeSheet.show_summary -> show_summary: boolean "Display an additional summary line. (DopeSheet Editors only)" -#DopeSheet.show_textures -> show_textures: boolean "Include visualization of Texture related Animation data" -#DopeSheet.show_transforms -> show_transforms: boolean "Include visualization of Object-level Animation data (mostly Transforms)" -#DopeSheet.show_worlds -> show_worlds: boolean "Include visualization of World related Animation data" -#+ * DopeSheet.source -> source: pointer, "(read-only) ID-Block representing source data, currently ID_SCE (for Dopesheet), and ID_SC (for Grease Pencil)" -#+ * Driver.expression -> expression: string "Expression to use for Scripted Expression" -#Driver.is_valid -> is_valid: boolean "Driver could not be evaluated in past, so should be skipped" -#+ * Driver.show_debug_info -> show_debug_info: boolean "Show intermediate values for the driver calculations to allow debugging of drivers" -#+ * Driver.type -> type: enum "Driver type" -#+ * Driver.variables -> variables: collection, "(read-only) Properties acting as inputs for this driver" -#+ * DriverTarget.bone_target -> bone_target: string "Name of PoseBone to use as target" -#+ * DriverTarget.data_path -> data_path: string "RNA Path (from ID-block) to property used" -#+ * DriverTarget.id -> id: pointer "ID-block that the specific property used can be found from (id_type property must be set first)" -#+ * DriverTarget.id_type -> id_type: enum "Type of ID-block that can be used" -#+ * DriverTarget.transform_type -> transform_type: enum "Driver variable type" -#DriverTarget.use_local_space_transform -> use_local_space_transform: boolean "Use transforms in Local Space (as opposed to the worldspace default)" -#+ * DriverVariable.name -> name: string "Name to use in scripted expressions/functions. (No spaces or dots are allowed. Also, must not start with a symbol or digit)" -#+ * DriverVariable.targets -> targets: collection, "(read-only) Sources of input data for evaluating this variable" -#+ * DriverVariable.type -> type: enum "Driver variable type" -#+ * DupliObject.matrix -> matrix: float[16] "Object duplicate transformation matrix" -#+ * DupliObject.matrix_original -> matrix_original: float[16] "The original matrix of this object before it was duplicated" -#+ * DupliObject.object -> object: pointer, "(read-only) Object being duplicated" -#+ * EditBone.bbone_in -> bbone_in: float "Length of first Bezier Handle (for B-Bones only)" -#+ * EditBone.bbone_out -> bbone_out: float "Length of second Bezier Handle (for B-Bones only)" -#+ * EditBone.bbone_segments -> bbone_segments: int "Number of subdivisions of bone (for B-Bones only)" -#+ * EditBone.envelope_distance -> envelope_distance: float "Bone deformation distance (for Envelope deform only)" -#+ * EditBone.envelope_weight -> envelope_weight: float "Bone deformation weight (for Envelope deform only)" -#+ * EditBone.head -> head: float[3] "Location of head end of the bone" -#+ * EditBone.head_radius -> head_radius: float "Radius of head of bone (for Envelope deform only)" -#+ * EditBone.hide -> hide: boolean "Bone is not visible when in Edit Mode" -#+ * EditBone.hide_select -> hide_select: boolean "Bone is able to be selected" -#EditBone.layers -> layers: boolean[32] "Layers bone exists in" -#+ * EditBone.lock -> lock: boolean "Bone is not able to be transformed when in Edit Mode" -#+ * EditBone.matrix -> matrix: float[16], "(read-only) Read-only matrix calculated from the roll (armature space)" -#+ * EditBone.name -> name: string "NO DESCRIPTION" -#+ * EditBone.parent -> parent: pointer "Parent edit bone (in same Armature)" -#+ * EditBone.roll -> roll: float "Bone rotation around head-tail axis" -#+ * EditBone.select -> select: boolean "NO DESCRIPTION" -#+ * EditBone.select_head -> select_head: boolean "NO DESCRIPTION" -#+ * EditBone.select_tail -> select_tail: boolean "NO DESCRIPTION" -#EditBone.show_wire -> show_wire: boolean "Bone is always drawn as Wireframe regardless of viewport draw mode. Useful for non-obstructive custom bone shapes" -#+ * EditBone.tail -> tail: float[3] "Location of tail end of the bone" -#+ * EditBone.tail_radius -> tail_radius: float "Radius of tail of bone (for Envelope deform only)" -#EditBone.use_connect -> use_connect: boolean "When bone has a parent, bones head is struck to the parents tail" -#EditBone.use_cyclic_offset -> use_cyclic_offset: boolean "When bone doesnt have a parent, it receives cyclic offset effects" -#EditBone.use_deform -> use_deform: boolean "Bone does not deform any geometry" -#EditBone.use_envelope_multiply -> use_envelope_multiply: boolean "When deforming bone, multiply effects of Vertex Group weights with Envelope influence" -#EditBone.use_hinge -> use_hinge: boolean "Bone inherits rotation or scale from parent bone" -#EditBone.use_inherit_scale -> use_inherit_scale: boolean "Bone inherits scaling from parent bone" -#EditBone.use_local_location -> use_local_location: boolean "Bone location is set in local space" -#+ * EffectorWeights.all -> all: float "All effectors weight" -#EffectorWeights.apply_to_hair_growing -> apply_to_hair_growing: boolean "Use force fields when growing hair" -#+ * EffectorWeights.boid -> boid: float "Boid effector weight" -#+ * EffectorWeights.charge -> charge: float "Charge effector weight" -#EffectorWeights.curve_guide -> curve_guide: float "Curve guide effector weight" -#+ * EffectorWeights.drag -> drag: float "Drag effector weight" -#+ * EffectorWeights.force -> force: float "Force effector weight" -#+ * EffectorWeights.gravity -> gravity: float "Global gravity weight" -#+ * EffectorWeights.group -> group: pointer "Limit effectors to this Group" -#+ * EffectorWeights.harmonic -> harmonic: float "Harmonic effector weight" -#+ * EffectorWeights.lennardjones -> lennardjones: float "Lennard-Jones effector weight" -#+ * EffectorWeights.magnetic -> magnetic: float "Magnetic effector weight" -#+ * EffectorWeights.texture -> texture: float "Texture effector weight" -#+ * EffectorWeights.turbulence -> turbulence: float "Turbulence effector weight" -#+ * EffectorWeights.vortex -> vortex: float "Vortex effector weight" -#+ * EffectorWeights.wind -> wind: float "Wind effector weight" -#+ * EnumPropertyItem.description -> description: string, "(read-only) Description of the items purpose" -#+ * EnumPropertyItem.identifier -> identifier: string, "(read-only) Unique name used in the code and scripting" -#+ * EnumPropertyItem.name -> name: string, "(read-only) Human readable name" -#+ * EnumPropertyItem.value -> value: int, "(read-only) Value of the item" -#+ * EnvironmentMap.clip_end -> clip_end: float "Objects further than this are not visible to map" -#+ * EnvironmentMap.clip_start -> clip_start: float "Objects nearer than this are not visible to map" -#+ * EnvironmentMap.depth -> depth: int "Number of times a map will be rendered recursively (mirror effects.)" -#EnvironmentMap.layers_ignore -> layers_ignore: boolean[20] "Hide objects on these layers when generating the Environment Map" -#+ * EnvironmentMap.mapping -> mapping: enum "NO DESCRIPTION" -#+ * EnvironmentMap.resolution -> resolution: int "Pixel resolution of the rendered environment map" -#+ * EnvironmentMap.source -> source: enum "NO DESCRIPTION" -#+ * EnvironmentMap.viewpoint_object -> viewpoint_object: pointer "Object to use as the environment maps viewpoint location" -#+ * EnvironmentMap.zoom -> zoom: float "NO DESCRIPTION" -#+ * Event.ascii -> ascii: string, "(read-only) Single ASCII character for this event" - + * Event.alt -> is_pressed_alt: boolean, "(read-only) True when the Alt/Option key is held" - + * Event.oskey -> is_pressed_cmd: boolean, "(read-only) True when the Cmd key is held" - + * Event.ctrl -> is_pressed_ctrl: boolean, "(read-only) True when the Ctrl key is held" - + * Event.shift -> is_pressed_shift: boolean, "(read-only) True when the Shift key is held" -#+ * Event.mouse_prev_x -> mouse_prev_x: int, "(read-only) The window relative vertical location of the mouse" -#+ * Event.mouse_prev_y -> mouse_prev_y: int, "(read-only) The window relative horizontal location of the mouse" -#+ * Event.mouse_region_x -> mouse_region_x: int, "(read-only) The region relative vertical location of the mouse" -#+ * Event.mouse_region_y -> mouse_region_y: int, "(read-only) The region relative horizontal location of the mouse" -#+ * Event.mouse_x -> mouse_x: int, "(read-only) The window relative vertical location of the mouse" -#+ * Event.mouse_y -> mouse_y: int, "(read-only) The window relative horizontal location of the mouse" -#+ * Event.type -> type: enum, "(read-only)" -#+ * Event.value -> value: enum, "(read-only) The type of event, only applies to some" -#+ * FCurve.array_index -> array_index: int "Index to the specific property affected by F-Curve if applicable" -#+ * FCurve.color -> color: float[3] "Color of the F-Curve in the Graph Editor" -#+ * FCurve.color_mode -> color_mode: enum "Method used to determine color of F-Curve in Graph Editor" -#+ * FCurve.data_path -> data_path: string "RNA Path to property affected by F-Curve" -#+ * FCurve.driver -> driver: pointer, "(read-only) Channel Driver (only set for Driver F-Curves)" -#+ * FCurve.extrapolation -> extrapolation: enum "NO DESCRIPTION" -#+ * FCurve.group -> group: pointer "Action Group that this F-Curve belongs to" -#+ * FCurve.hide -> hide: boolean "F-Curve and its keyframes are hidden in the Graph Editor graphs" -#+ * FCurve.is_valid -> is_valid: boolean "False when F-Curve could not be evaluated in past, so should be skipped when evaluating" -#+ * FCurve.keyframe_points -> keyframe_points: collection, "(read-only) User-editable keyframes" -#+ * FCurve.lock -> lock: boolean "F-Curves settings cannot be edited" -#+ * FCurve.modifiers -> modifiers: collection, "(read-only) Modifiers affecting the shape of the F-Curve" -#+ * FCurve.mute -> mute: boolean "F-Curve is not evaluated" -#+ * FCurve.sampled_points -> sampled_points: collection, "(read-only) Sampled animation data" -#+ * FCurve.select -> select: boolean "F-Curve is selected for editing" -#+ * FCurve.use_auto_handle_clamp -> use_auto_handle_clamp: boolean "All auto-handles for F-Curve are clamped" -#+ * FCurveModifiers.active -> active: pointer "Active F-Curve Modifier" -#+ * FCurveSample.co -> co: float[2] "Point coordinates" -#+ * FCurveSample.select -> select: boolean "Selection status" -#REMOVE * FModifier.active -> active: boolean "F-Curve Modifier is the one being edited" -#FModifier.is_valid -> is_valid: boolean, "(read-only) F-Curve Modifier has invalid settings and will not be evaluated" -#+ * FModifier.mute -> mute: boolean "F-Curve Modifier will not be evaluated" -#FModifier.show_expanded -> show_expanded: boolean "F-Curve Modifiers panel is expanded in UI" -#+ * FModifier.type -> type: enum, "(read-only) F-Curve Modifier Type" -#+ * FModifierEnvelopeControlPoint.frame -> frame: float "Frame this control-point occurs on" -#FModifierEnvelopeControlPoint.max -> max: float "Upper bound of envelope at this control-point" -#FModifierEnvelopeControlPoint.min -> min: float "Lower bound of envelope at this control-point" -#FModifier|FModifierCycles.cycles_after -> cycles_after: float "Maximum number of cycles to allow after last keyframe. (0 = infinite)" -#FModifier|FModifierCycles.cycles_before -> cycles_before: float "Maximum number of cycles to allow before first keyframe. (0 = infinite)" -#FModifier|FModifierCycles.mode_after -> mode_after: enum "Cycling mode to use after last keyframe" -#FModifier|FModifierCycles.mode_before -> mode_before: enum "Cycling mode to use before first keyframe" -#+ * FModifier|FModifierEnvelope.control_points -> control_points: collection, "(read-only) Control points defining the shape of the envelope" -#FModifier|FModifierEnvelope.default_max -> default_max: float "Upper distance from Reference Value for 1:1 default influence" -#FModifier|FModifierEnvelope.default_min -> default_min: float "Lower distance from Reference Value for 1:1 default influence" -#+ * FModifier|FModifierEnvelope.reference_value -> reference_value: float "Value that envelopes influence is centered around / based on" -#+ * FModifier|FModifierFunctionGenerator.amplitude -> amplitude: float "Scale factor determining the maximum/minimum values" -#+ * FModifier|FModifierFunctionGenerator.function_type -> function_type: enum "Type of built-in function to use" -#+ * FModifier|FModifierFunctionGenerator.phase_multiplier -> phase_multiplier: float "Scale factor determining the speed of the function" -#+ * FModifier|FModifierFunctionGenerator.phase_offset -> phase_offset: float "Constant factor to offset time by for function" -#FModifier|FModifierFunctionGenerator.use_additive -> use_additive: boolean "Values generated by this modifier are applied on top of the existing values instead of overwriting them" -#+ * FModifier|FModifierFunctionGenerator.value_offset -> value_offset: float "Constant factor to offset values by" -#+ * FModifier|FModifierGenerator.coefficients -> coefficients: float[32] "Coefficients for x (starting from lowest power of x^0)" -#+ * FModifier|FModifierGenerator.mode -> mode: enum "Type of generator to use" -#+ * FModifier|FModifierGenerator.poly_order -> poly_order: int "The highest power of x for this polynomial. (number of coefficients - 1)" -#FModifier|FModifierGenerator.use_additive -> use_additive: boolean "Values generated by this modifier are applied on top of the existing values instead of overwriting them" -#FModifier|FModifierLimits.max_x -> max_x: float "Highest X value to allow" -#FModifier|FModifierLimits.max_y -> max_y: float "Highest Y value to allow" -#FModifier|FModifierLimits.min_x -> min_x: float "Lowest X value to allow" -#FModifier|FModifierLimits.min_y -> min_y: float "Lowest Y value to allow" -#FModifier|FModifierLimits.use_max_x -> use_max_x: boolean "Use the maximum X value" -#FModifier|FModifierLimits.use_max_y -> use_max_y: boolean "Use the maximum Y value" -#FModifier|FModifierLimits.use_min_x -> use_min_x: boolean "Use the minimum X value" -#FModifier|FModifierLimits.use_min_y -> use_min_y: boolean "Use the minimum Y value" -#FModifier|FModifierNoise.blend_type -> blend_type: enum "Method of modifying the existing F-Curve" -#+ * FModifier|FModifierNoise.depth -> depth: int "Amount of fine level detail present in the noise" -#+ * FModifier|FModifierNoise.phase -> phase: float "A random seed for the noise effect" -#FModifier|FModifierNoise.scale -> scale: float "Scaling (in time) of the noise" -#+ * FModifier|FModifierNoise.strength -> strength: float "Amplitude of the noise - the amount that it modifies the underlying curve" -#+ * FModifier|FModifierStepped.frame_end -> frame_end: float "Frame that modifiers influence ends (if applicable)" -#FModifier|FModifierStepped.frame_offset -> frame_offset: float "Reference number of frames before frames get held. Use to get hold for 1-3 vs 5-7 holding patterns" -#+ * FModifier|FModifierStepped.frame_start -> frame_start: float "Frame that modifiers influence starts (if applicable)" -#FModifier|FModifierStepped.frame_step -> frame_step: float "Number of frames to hold each value" -#+ * FModifier|FModifierStepped.use_frame_end -> use_frame_end: boolean "Restrict modifier to only act before its end frame" -#+ * FModifier|FModifierStepped.use_frame_start -> use_frame_start: boolean "Restrict modifier to only act after its start frame" -#FieldSettings.apply_to_location -> apply_to_location: boolean "Effect particles location" -#FieldSettings.apply_to_rotation -> apply_to_rotation: boolean "Effect particles dynamic rotation" -#FieldSettings.distance_max -> distance_max: float "Maximum distance for the field to work" -#FieldSettings.distance_min -> distance_min: float "Minimum distance for the fields fall-off" -#+ * FieldSettings.falloff_power -> falloff_power: float "Falloff power (real gravitational falloff = 2)" -#+ * FieldSettings.falloff_type -> falloff_type: enum "Fall-off shape" -#+ * FieldSettings.flow -> flow: float "Convert effector force into air flow velocity" -#+ * FieldSettings.guide_clump_amount -> guide_clump_amount: float "Amount of clumping" -#+ * FieldSettings.guide_clump_shape -> guide_clump_shape: float "Shape of clumping" -#+ * FieldSettings.guide_free -> guide_free: float "Guide-free time from particle lifes end" -#+ * FieldSettings.guide_kink_amplitude -> guide_kink_amplitude: float "The amplitude of the offset" -#+ * FieldSettings.guide_kink_axis -> guide_kink_axis: enum "Which axis to use for offset" -#+ * FieldSettings.guide_kink_frequency -> guide_kink_frequency: float "The frequency of the offset (1/total length)" -#+ * FieldSettings.guide_kink_shape -> guide_kink_shape: float "Adjust the offset to the beginning/end" -#+ * FieldSettings.guide_kink_type -> guide_kink_type: enum "Type of periodic offset on the curve" -#+ * FieldSettings.guide_minimum -> guide_minimum: float "The distance from which particles are affected fully" -#+ * FieldSettings.harmonic_damping -> harmonic_damping: float "Damping of the harmonic force" -#+ * FieldSettings.inflow -> inflow: float "Inwards component of the vortex force" -#+ * FieldSettings.linear_drag -> linear_drag: float "Drag component proportional to velocity" -#+ * FieldSettings.noise -> noise: float "Noise of the force" -#+ * FieldSettings.quadratic_drag -> quadratic_drag: float "Drag component proportional to the square of velocity" -#+ * FieldSettings.radial_falloff -> radial_falloff: float "Radial falloff power (real gravitational falloff = 2)" -#FieldSettings.radial_max -> radial_max: float "Maximum radial distance for the field to work" -#FieldSettings.radial_min -> radial_min: float "Minimum radial distance for the fields fall-off" -#+ * FieldSettings.rest_length -> rest_length: float "Rest length of the harmonic force" -#+ * FieldSettings.seed -> seed: int "Seed of the noise" -#+ * FieldSettings.shape -> shape: enum "Which direction is used to calculate the effector force" -#+ * FieldSettings.size -> size: float "Size of the noise" -#+ * FieldSettings.strength -> strength: float "Strength of force field" -#+ * FieldSettings.texture -> texture: pointer "Texture to use as force" -#+ * FieldSettings.texture_mode -> texture_mode: enum "How the texture effect is calculated (RGB & Curl need a RGB texture else Gradient will be used instead)" -#+ * FieldSettings.texture_nabla -> texture_nabla: float "Defines size of derivative offset used for calculating gradient and curl" -#+ * FieldSettings.type -> type: enum "Type of field" -#FieldSettings.use_2d_force -> use_2d_force: boolean "Apply force only in 2d" -#FieldSettings.use_absorption -> use_absorption: boolean "Force gets absorbed by collision objects" -#FieldSettings.use_global_coords -> use_global_coords: boolean "Use effector/global coordinates for turbulence" -#FieldSettings.use_guide_path_add -> use_guide_path_add: boolean "Based on distance/falloff it adds a portion of the entire path" -#+ * FieldSettings.use_guide_path_weight -> use_guide_path_weight: boolean "Use curve weights to influence the particle influence along the curve" -#+ * FieldSettings.use_max_distance -> use_max_distance: boolean "Use a maximum distance for the field to work" -#+ * FieldSettings.use_min_distance -> use_min_distance: boolean "Use a minimum distance for the fields fall-off" -#FieldSettings.use_multiple_springs -> use_multiple_springs: boolean "Every point is effected by multiple springs" -#FieldSettings.use_object_coords -> use_object_coords: boolean "Use object/global coordinates for texture" -#+ * FieldSettings.use_radial_max -> use_radial_max: boolean "Use a maximum radial distance for the field to work" -#+ * FieldSettings.use_radial_min -> use_radial_min: boolean "Use a minimum radial distance for the fields fall-off" -#FieldSettings.use_root_coords -> use_root_coords: boolean "Texture coordinates from root particle locations" -#+ * FieldSettings.z_direction -> z_direction: enum "Effect in full or only positive/negative Z direction" -#+ * FileSelectParams.directory -> directory: string "Directory displayed in the file browser" -#FileSelectParams.display_type -> display_type: enum "Display mode for the file list" -#FileSelectParams.filename -> filename: string "Active file in the file browser" -#FileSelectParams.show_hidden -> show_hidden: boolean "Hide hidden dot files" -#FileSelectParams.sort_method -> sort_method: enum "NO DESCRIPTION" -#+ * FileSelectParams.title -> title: string, "(read-only) Title for the file browser" -#FileSelectParams.use_filter -> use_filter: boolean "Enable filtering of files" -#FileSelectParams.use_filter_blender -> use_filter_blender: boolean "Show .blend files" -#FileSelectParams.use_filter_folder -> use_filter_folder: boolean "Show folders" -#FileSelectParams.use_filter_font -> use_filter_font: boolean "Show font files" -#FileSelectParams.use_filter_image -> use_filter_image: boolean "Show image files" -#FileSelectParams.use_filter_movie -> use_filter_movie: boolean "Show movie files" -#FileSelectParams.use_filter_script -> use_filter_script: boolean "Show script files" -#FileSelectParams.use_filter_sound -> use_filter_sound: boolean "Show sound files" -#FileSelectParams.use_filter_text -> use_filter_text: boolean "Show text files" -#+ * FluidSettings.type -> type: enum "Type of participation in the fluid simulation" -#+ * FluidSettings|ControlFluidSettings.attraction_radius -> attraction_radius: float "Specifies the force field radius around the control object" -#+ * FluidSettings|ControlFluidSettings.attraction_strength -> attraction_strength: float "Force strength for directional attraction towards the control object" -#+ * FluidSettings|ControlFluidSettings.end_time -> end_time: float "Specifies time when the control particles are deactivated" -#+ * FluidSettings|ControlFluidSettings.quality -> quality: float "Specifies the quality which is used for object sampling. (higher = better but slower)" -#+ * FluidSettings|ControlFluidSettings.start_time -> start_time: float "Specifies time when the control particles are activated" -#FluidSettings|ControlFluidSettings.use -> use: boolean "Object contributes to the fluid simulation" -#FluidSettings|ControlFluidSettings.use_reverse_frames -> use_reverse_frames: boolean "Reverse control object movement" -#+ * FluidSettings|ControlFluidSettings.velocity_radius -> velocity_radius: float "Specifies the force field radius around the control object" -#+ * FluidSettings|ControlFluidSettings.velocity_strength -> velocity_strength: float "Force strength of how much of the control objects velocity is influencing the fluid velocity" -#+ * FluidSettings|DomainFluidSettings.compressibility -> compressibility: float "Allowed compressibility due to gravitational force for standing fluid. (directly affects simulation step size)" -#+ * FluidSettings|DomainFluidSettings.end_time -> end_time: float "Simulation time of the last blender frame (in seconds)" -#FluidSettings|DomainFluidSettings.filepath -> filepath: string "Directory (and/or filename prefix) to store baked fluid simulation files in" -#+ * FluidSettings|DomainFluidSettings.generate_particles -> generate_particles: float "Amount of particles to generate (0=off, 1=normal, >1=more)" -#+ * FluidSettings|DomainFluidSettings.gravity -> gravity: float[3] "Gravity in X, Y and Z direction" -#+ * FluidSettings|DomainFluidSettings.grid_levels -> grid_levels: int "Number of coarsened grids to use (-1 for automatic)" -#+ * FluidSettings|DomainFluidSettings.memory_estimate -> memory_estimate: string, "(read-only) Estimated amount of memory needed for baking the domain" -#+ * FluidSettings|DomainFluidSettings.partial_slip_factor -> partial_slip_factor: float "Amount of mixing between no- and free-slip, 0 is no slip and 1 is free slip" -#+ * FluidSettings|DomainFluidSettings.preview_resolution -> preview_resolution: int "Preview resolution in X,Y and Z direction" -#+ * FluidSettings|DomainFluidSettings.render_display_mode -> render_display_mode: enum "How to display the mesh for rendering" -#+ * FluidSettings|DomainFluidSettings.resolution -> resolution: int "Domain resolution in X,Y and Z direction" -#FluidSettings|DomainFluidSettings.simulation_scale -> simulation_scale: float "Size of the simulation domain in metres" -#+ * FluidSettings|DomainFluidSettings.slip_type -> slip_type: enum "NO DESCRIPTION" -#+ * FluidSettings|DomainFluidSettings.start_time -> start_time: float "Simulation time of the first blender frame (in seconds)" -#FluidSettings|DomainFluidSettings.surface_smooth -> surface_smooth: float "Amount of surface smoothing. A value of 0 is off, 1 is normal smoothing and more than 1 is extra smoothing" -#+ * FluidSettings|DomainFluidSettings.surface_subdivisions -> surface_subdivisions: int "Number of isosurface subdivisions. This is necessary for the inclusion of particles into the surface generation. Warning - can lead to longer computation times!" -#+ * FluidSettings|DomainFluidSettings.tracer_particles -> tracer_particles: int "Number of tracer particles to generate" -#FluidSettings|DomainFluidSettings.use_reverse_frames -> use_reverse_frames: boolean "Reverse fluid frames" -#FluidSettings|DomainFluidSettings.use_speed_vectors -> use_speed_vectors: boolean "Generate speed vectors for vector blur" -#FluidSettings|DomainFluidSettings.use_time_override -> use_time_override: boolean "Use a custom start and end time (in seconds) instead of the scenes timeline" -#+ * FluidSettings|DomainFluidSettings.viewport_display_mode -> viewport_display_mode: enum "How to display the mesh in the viewport" -#+ * FluidSettings|DomainFluidSettings.viscosity_base -> viscosity_base: float "Viscosity setting: value that is multiplied by 10 to the power of (exponent*-1)" -#+ * FluidSettings|DomainFluidSettings.viscosity_exponent -> viscosity_exponent: int "Negative exponent for the viscosity value (to simplify entering small values e.g. 5*10^-6.)" -#+ * FluidSettings|DomainFluidSettings.viscosity_preset -> viscosity_preset: enum "Set viscosity of the fluid to a preset value, or use manual input" -#+ * FluidSettings|FluidFluidSettings.initial_velocity -> initial_velocity: float[3] "Initial velocity of fluid" -#FluidSettings|FluidFluidSettings.use -> use: boolean "Object contributes to the fluid simulation" -#FluidSettings|FluidFluidSettings.use_animated_mesh -> use_animated_mesh: boolean "Export this mesh as an animated one. Slower, only use if really necessary (e.g. armatures or parented objects), animated pos/rot/scale IPOs do not require it" -#+ * FluidSettings|FluidFluidSettings.volume_initialization -> volume_initialization: enum "Volume initialization type" -#+ * FluidSettings|InflowFluidSettings.inflow_velocity -> inflow_velocity: float[3] "Initial velocity of fluid" -#FluidSettings|InflowFluidSettings.use -> use: boolean "Object contributes to the fluid simulation" -#FluidSettings|InflowFluidSettings.use_animated_mesh -> use_animated_mesh: boolean "Export this mesh as an animated one. Slower, only use if really necessary (e.g. armatures or parented objects), animated pos/rot/scale IPOs do not require it" -#FluidSettings|InflowFluidSettings.use_local_coords -> use_local_coords: boolean "Use local coordinates for inflow. (e.g. for rotating objects)" -#+ * FluidSettings|InflowFluidSettings.volume_initialization -> volume_initialization: enum "Volume initialization type" -#+ * FluidSettings|ObstacleFluidSettings.impact_factor -> impact_factor: float "This is an unphysical value for moving objects - it controls the impact an obstacle has on the fluid, =0 behaves a bit like outflow (deleting fluid), =1 is default, while >1 results in high forces. Can be used to tweak total mass" -#+ * FluidSettings|ObstacleFluidSettings.partial_slip_factor -> partial_slip_factor: float "Amount of mixing between no- and free-slip, 0 is no slip and 1 is free slip" -#+ * FluidSettings|ObstacleFluidSettings.slip_type -> slip_type: enum "NO DESCRIPTION" -#FluidSettings|ObstacleFluidSettings.use -> use: boolean "Object contributes to the fluid simulation" -#FluidSettings|ObstacleFluidSettings.use_animated_mesh -> use_animated_mesh: boolean "Export this mesh as an animated one. Slower, only use if really necessary (e.g. armatures or parented objects), animated pos/rot/scale IPOs do not require it" -#+ * FluidSettings|ObstacleFluidSettings.volume_initialization -> volume_initialization: enum "Volume initialization type" -#FluidSettings|OutflowFluidSettings.use -> use: boolean "Object contributes to the fluid simulation" -#FluidSettings|OutflowFluidSettings.use_animated_mesh -> use_animated_mesh: boolean "Export this mesh as an animated one. Slower, only use if really necessary (e.g. armatures or parented objects), animated pos/rot/scale IPOs do not require it" -#+ * FluidSettings|OutflowFluidSettings.volume_initialization -> volume_initialization: enum "Volume initialization type" -#+ * FluidSettings|ParticleFluidSettings.alpha_influence -> alpha_influence: float "Amount of particle alpha change, inverse of size influence: 0=off (all same alpha), 1=full. (large particles get lower alphas, smaller ones higher values)" -#FluidSettings|ParticleFluidSettings.filepath -> filepath: string "Directory (and/or filename prefix) to store and load particles from" -#+ * FluidSettings|ParticleFluidSettings.particle_influence -> particle_influence: float "Amount of particle size scaling: 0=off (all same size), 1=full (range 0.2-2.0), >1=stronger" -#FluidSettings|ParticleFluidSettings.show_tracer -> show_tracer: boolean "Show tracer particles" -#FluidSettings|ParticleFluidSettings.use_drops -> use_drops: boolean "Show drop particles" -#FluidSettings|ParticleFluidSettings.use_floats -> use_floats: boolean "Show floating foam particles" -#+ * Function.description -> description: string, "(read-only) Description of the Functions purpose" -#+ * Function.identifier -> identifier: string, "(read-only) Unique name used in the code and scripting" -#Function.is_registered -> is_registered: boolean, "(read-only) Function is registered as callback as part of type registration" -#Function.is_registered_optional -> is_registered_optional: boolean, "(read-only) Function is optionally registered as callback part of type registration" -#+ * Function.parameters -> parameters: collection, "(read-only) Parameters for the function" -#Function.use_self -> use_self: boolean, "(read-only) Function does not pass its self as an argument (becomes a class method in python)" -#+ * GPencilFrame.frame_number -> frame_number: int "The frame on which this sketch appears" -#GPencilFrame.is_edited -> is_edited: boolean "Frame is being edited (painted on)" -#+ * GPencilFrame.select -> select: boolean "Frame is selected for editing in the DopeSheet" -#+ * GPencilFrame.strokes -> strokes: collection, "(read-only) Freehand curves defining the sketch on this frame" -#+ * GPencilLayer.active -> active: boolean "Set active layer for editing" -#+ * GPencilLayer.active_frame -> active_frame: pointer, "(read-only) Frame currently being displayed for this layer" -#GPencilLayer.alpha -> alpha: float "Layer Opacity" -#+ * GPencilLayer.color -> color: float[3] "Color for all strokes in this layer" -#+ * GPencilLayer.frames -> frames: collection, "(read-only) Sketches for this layer on different frames" -#GPencilLayer.ghost_range_max -> ghost_range_max: int "Maximum number of frames on either side of the active frame to show (0 = show the first available sketch on either side)" -#+ * GPencilLayer.hide -> hide: boolean "Set layer Visibility" -#+ * GPencilLayer.info -> info: string "Layer name" -#GPencilLayer.line_width -> line_width: int "Thickness of strokes (in pixels)" -#+ * GPencilLayer.lock -> lock: boolean "Protect layer from further editing and/or frame changes" -#GPencilLayer.lock_frame -> lock_frame: boolean "Lock current frame displayed by layer" -#+ * GPencilLayer.select -> select: boolean "Layer is selected for editing in the DopeSheet" -#+ * GPencilLayer.show_points -> show_points: boolean "Draw the points which make up the strokes (for debugging purposes)" -#+ * GPencilLayer.use_onion_skinning -> use_onion_skinning: boolean "Ghost frames on either side of frame" -#+ * GPencilStroke.points -> points: collection, "(read-only) Stroke data points" -#+ * GPencilStrokePoint.co -> co: float[3] "NO DESCRIPTION" -#+ * GPencilStrokePoint.pressure -> pressure: float "Pressure of tablet at point when drawing it" -#+ * GameObjectSettings.actuators -> actuators: collection, "(read-only) Game engine actuators to act on events" -#GameObjectSettings.collision_bounds_type -> collision_bounds_type: enum "Selects the collision type" -#+ * GameObjectSettings.collision_margin -> collision_margin: float "Extra margin around object for collision detection, small amount required for stability" -#+ * GameObjectSettings.controllers -> controllers: collection, "(read-only) Game engine controllers to process events, connecting sensor to actuators" -#+ * GameObjectSettings.damping -> damping: float "General movement damping" -#+ * GameObjectSettings.form_factor -> form_factor: float "Form factor scales the inertia tensor" -#+ * GameObjectSettings.friction_coefficients -> friction_coefficients: float[3] "Relative friction coefficient in the in the X, Y and Z directions, when anisotropic friction is enabled" -#GameObjectSettings.lock_location_x -> lock_location_x: boolean "Disable simulation of linear motion along the X axis" -#GameObjectSettings.lock_location_y -> lock_location_y: boolean "Disable simulation of linear motion along the Y axis" -#GameObjectSettings.lock_location_z -> lock_location_z: boolean "Disable simulation of linear motion along the Z axis" -#GameObjectSettings.lock_rotation_x -> lock_rotation_x: boolean "Disable simulation of angular motion along the X axis" -#GameObjectSettings.lock_rotation_y -> lock_rotation_y: boolean "Disable simulation of angular motion along the Y axis" -#GameObjectSettings.lock_rotation_z -> lock_rotation_z: boolean "Disable simulation of angular motion along the Z axis" -#+ * GameObjectSettings.mass -> mass: float "Mass of the object" -#+ * GameObjectSettings.physics_type -> physics_type: enum "Selects the type of physical representation" -#+ * GameObjectSettings.properties -> properties: collection, "(read-only) Game engine properties" -#+ * GameObjectSettings.radius -> radius: float "Radius of bounding sphere and material physics" -#+ * GameObjectSettings.rotation_damping -> rotation_damping: float "General rotation damping" -#+ * GameObjectSettings.sensors -> sensors: collection, "(read-only) Game engine sensor to detect events" -#+ * GameObjectSettings.show_actuators -> show_actuators: boolean "Shows actuators for this object in the user interface" -#+ * GameObjectSettings.show_controllers -> show_controllers: boolean "Shows controllers for this object in the user interface" -#GameObjectSettings.show_debug_state -> show_debug_state: boolean "Print state debug info in the game engine" -#+ * GameObjectSettings.show_sensors -> show_sensors: boolean "Shows sensors for this object in the user interface" -#+ * GameObjectSettings.show_state_panel -> show_state_panel: boolean "Show state panel" -#+ * GameObjectSettings.soft_body -> soft_body: pointer, "(read-only) Settings for Bullet soft body simulation" -#GameObjectSettings.states_initial -> states_initial: boolean[30] "Initial state when the game starts" -#GameObjectSettings.states_visible -> states_visible: boolean[30] "State determining which controllers are displayed" -#+ * GameObjectSettings.use_activity_culling -> use_activity_culling: boolean "Disable simulation of angular motion along the Z axis" -#GameObjectSettings.use_actor -> use_actor: boolean "Object is detected by the Near and Radar sensor" -#GameObjectSettings.use_all_states -> use_all_states: boolean "Set all state bits" -#GameObjectSettings.use_anisotropic_friction -> use_anisotropic_friction: boolean "Enable anisotropic friction" -#+ * GameObjectSettings.use_collision_bounds -> use_collision_bounds: boolean "Specify a collision bounds type other than the default" -#GameObjectSettings.use_collision_compound -> use_collision_compound: boolean "Add children to form a compound collision object" -#GameObjectSettings.use_ghost -> use_ghost: boolean "Object does not restitute collisions, like a ghost" -#GameObjectSettings.use_material_physics -> use_material_physics: boolean "Use physics settings in materials" -#GameObjectSettings.use_rotate_from_normal -> use_rotate_from_normal: boolean "Use face normal to rotate object, so that it points away from the surface" -#GameObjectSettings.use_sleep -> use_sleep: boolean "Disable auto (de)activation in physics simulation" -#GameObjectSettings.used_states -> used_states: boolean[30], "(read-only) States which are being used by controllers" -#GameObjectSettings.velocity_max -> velocity_max: float "Clamp velocity to this maximum speed" -#GameObjectSettings.velocity_min -> velocity_min: float "Clamp velocity to this minimum speed (except when totally still)" -#+ * GameProperty.name -> name: string "Available as GameObject attributes in the game engines python API" -#GameProperty.show_debug -> show_debug: boolean "Print debug information for this property" -#+ * GameProperty.type -> type: enum "NO DESCRIPTION" -#+ * GameProperty|GameBooleanProperty.value -> value: boolean "Property value" -#+ * GameProperty|GameFloatProperty.value -> value: float "Property value" -#+ * GameProperty|GameIntProperty.value -> value: int "Property value" -#+ * GameProperty|GameStringProperty.value -> value: string "Property value" -#+ * GameProperty|GameTimerProperty.value -> value: float "Property value" -#+ * GameSoftBodySettings.cluster_iterations -> cluster_iterations: int "Specify the number of cluster iterations" -#GameSoftBodySettings.collision_margin -> collision_margin: float "Collision margin for soft body. Small value makes the algorithm unstable" -#+ * GameSoftBodySettings.dynamic_friction -> dynamic_friction: float "Dynamic Friction" -#GameSoftBodySettings.linear_stiffness -> linear_stiffness: float "Linear stiffness of the soft body links" -#GameSoftBodySettings.location_iterations -> location_iterations: int "Position solver iterations" -#GameSoftBodySettings.shape_threshold -> shape_threshold: float "Shape matching threshold" -#GameSoftBodySettings.use_bending_constraints -> use_bending_constraints: boolean "Enable bending constraints" -#GameSoftBodySettings.use_cluster_rigid_to_softbody -> use_cluster_rigid_to_softbody: boolean "Enable cluster collision between soft and rigid body" -#GameSoftBodySettings.use_cluster_soft_to_softbody -> use_cluster_soft_to_softbody: boolean "Enable cluster collision between soft and soft body" -#GameSoftBodySettings.use_shape_match -> use_shape_match: boolean "Enable soft body shape matching goal" -#GameSoftBodySettings.weld_threshold -> weld_threshold: float "Welding threshold: distance between nearby vertices to be considered equal => set to 0.0 to disable welding test and speed up scene loading (ok if the mesh has no duplicates)" -#+ * Header.bl_idname -> bl_idname: string "If this is set, the header gets a custom ID, otherwise it takes the name of the class used to define the panel. For example, if the class name is OBJECT_HT_hello, and bl_idname is not set by the script, then bl_idname = OBJECT_HT_hello" -#+ * Header.bl_space_type -> bl_space_type: enum "The space where the header is going to be used in." -#+ * Header.layout -> layout: pointer, "(read-only) Defines the structure of the header in the UI." -#+ * Histogram.mode -> mode: enum "Channels to display when drawing the histogram" -#+ * ID.library -> library: pointer, "(read-only) Library file the datablock is linked from" -#+ * ID.name -> name: string "Unique datablock ID name" -#+ * ID.tag -> tag: boolean "Tools can use this to tag data, (initial state is undefined)" -#ID.use_fake_user -> use_fake_user: boolean "Saves this datablock even if it has no users" -#+ * ID.users -> users: int, "(read-only) Number of times this datablock is referenced" -#+ * IDProperty.collection -> collection: collection, "(read-only)" -#+ * IDProperty.double -> double: float "NO DESCRIPTION" -#+ * IDProperty.double_array -> double_array: float[1] "NO DESCRIPTION" -#+ * IDProperty.float -> float: float "NO DESCRIPTION" -#+ * IDProperty.float_array -> float_array: float[1] "NO DESCRIPTION" -#+ * IDProperty.group -> group: pointer, "(read-only)" -#+ * IDProperty.int -> int: int "NO DESCRIPTION" -#+ * IDProperty.int_array -> int_array: int[1] "NO DESCRIPTION" -#+ * IDProperty.string -> string: string "NO DESCRIPTION" -#+ * IDPropertyGroup.name -> name: string "Unique name used in the code and scripting" -#+ * IDPropertyGroup|NetRenderJob.name -> name: string "NO DESCRIPTION" -#+ * IDPropertyGroup|NetRenderSettings.active_blacklisted_slave_index -> active_blacklisted_slave_index: int "NO DESCRIPTION" -#+ * IDPropertyGroup|NetRenderSettings.active_job_index -> active_job_index: int "NO DESCRIPTION" -#+ * IDPropertyGroup|NetRenderSettings.active_slave_index -> active_slave_index: int "NO DESCRIPTION" -#+ * IDPropertyGroup|NetRenderSettings.chunks -> chunks: int "Number of frame to dispatch to each slave in one chunk" -#+ * IDPropertyGroup|NetRenderSettings.job_category -> job_category: string "Category of the job" -#+ * IDPropertyGroup|NetRenderSettings.job_id -> job_id: string "id of the last sent render job" -#+ * IDPropertyGroup|NetRenderSettings.job_name -> job_name: string "Name of the job" -#+ * IDPropertyGroup|NetRenderSettings.jobs -> jobs: collection, "(read-only)" -#+ * IDPropertyGroup|NetRenderSettings.mode -> mode: enum "Mode of operation of this instance" -#+ * IDPropertyGroup|NetRenderSettings.path -> path: string "Path for temporary files" -#+ * IDPropertyGroup|NetRenderSettings.priority -> priority: int "Priority of the job" -#+ * IDPropertyGroup|NetRenderSettings.server_address -> server_address: string "IP or name of the master render server" -#+ * IDPropertyGroup|NetRenderSettings.server_port -> server_port: int "port of the master render server" -#+ * IDPropertyGroup|NetRenderSettings.slaves -> slaves: collection, "(read-only)" -#+ * IDPropertyGroup|NetRenderSettings.slaves_blacklist -> slaves_blacklist: collection, "(read-only)" -#IDPropertyGroup|NetRenderSettings.use_master_broadcast -> use_master_broadcast: boolean "broadcast master server address on local network" -#IDPropertyGroup|NetRenderSettings.use_master_clear -> use_master_clear: boolean "delete saved files on exit" -#IDPropertyGroup|NetRenderSettings.use_slave_clear -> use_slave_clear: boolean "delete downloaded files on exit" -#IDPropertyGroup|NetRenderSettings.use_slave_output_log -> use_slave_output_log: boolean "Output render text log to console as well as sending it to the master" -#IDPropertyGroup|NetRenderSettings.use_slave_thumb -> use_slave_thumb: boolean "Generate thumbnails on slaves instead of master" -#+ * IDPropertyGroup|NetRenderSlave.name -> name: string "NO DESCRIPTION" -#+ * IDPropertyGroup|OperatorFileListElement.name -> name: string "the name of a file or directory within a file list" -#+ * IDPropertyGroup|OperatorMousePath.loc -> loc: float[2] "Mouse location" -#+ * IDPropertyGroup|OperatorMousePath.time -> time: float "Time of mouse location" -#+ * IDPropertyGroup|OperatorStrokeElement.location -> location: float[3] "NO DESCRIPTION" -#+ * IDPropertyGroup|OperatorStrokeElement.mouse -> mouse: float[2] "NO DESCRIPTION" -#+ * IDPropertyGroup|OperatorStrokeElement.pen_flip -> pen_flip: boolean "NO DESCRIPTION" -#+ * IDPropertyGroup|OperatorStrokeElement.pressure -> pressure: float "Tablet pressure" -#+ * IDPropertyGroup|OperatorStrokeElement.time -> time: float "NO DESCRIPTION" -#+ * IDPropertyGroup|PoseTemplate.name -> name: string "NO DESCRIPTION" -#+ * IDPropertyGroup|PoseTemplateSettings.active_template_index -> active_template_index: int "NO DESCRIPTION" -#+ * IDPropertyGroup|PoseTemplateSettings.templates -> templates: collection, "(read-only)" -#IDPropertyGroup|PoseTemplateSettings.use_generate_deform_rig -> use_generate_deform_rig: boolean "Create a copy of the metarig, constrainted by the generated rig" -#+ * ID|Action.fcurves -> fcurves: collection, "(read-only) The individual F-Curves that make up the Action" -#+ * ID|Action.groups -> groups: collection, "(read-only) Convenient groupings of F-Curves" -#+ * ID|Action.pose_markers -> pose_markers: collection, "(read-only) Markers specific to this Action, for labeling poses" -#+ * ID|Armature.animation_data -> animation_data: pointer, "(read-only) Animation data for this datablock" -#+ * ID|Armature.bones -> bones: collection, "(read-only)" -#ID|Armature.draw_type -> draw_type: enum "NO DESCRIPTION" -#+ * ID|Armature.edit_bones -> edit_bones: collection, "(read-only)" -#+ * ID|Armature.ghost_frame_end -> ghost_frame_end: int "End frame of range of Ghosts to display (not for Around Current Frame Onion-skinning method)" -#+ * ID|Armature.ghost_frame_start -> ghost_frame_start: int "Starting frame of range of Ghosts to display (not for Around Current Frame Onion-skinning method)" -#+ * ID|Armature.ghost_size -> ghost_size: int "Frame step for Ghosts (not for On Keyframes Onion-skinning method)" -#+ * ID|Armature.ghost_step -> ghost_step: int "Number of frame steps on either side of current frame to show as ghosts (only for Around Current Frame Onion-skinning method)" -#+ * ID|Armature.ghost_type -> ghost_type: enum "Method of Onion-skinning for active Action" -#ID|Armature.layers -> layers: boolean[32] "Armature layer visibility" -#ID|Armature.layers_protected -> layers_protected: boolean[32] "Protected layers in Proxy Instances are restored to Proxy settings on file reload and undo" -#+ * ID|Armature.pose_position -> pose_position: enum "Show armature in binding pose or final posed state" -#ID|Armature.show_axes -> show_axes: boolean "Draw bone axes" -#ID|Armature.show_bone_custom_shapes -> show_bone_custom_shapes: boolean "Draw bones with their custom shapes" -#ID|Armature.show_group_colors -> show_group_colors: boolean "Draw bone group colors" -#ID|Armature.show_names -> show_names: boolean "Draw bone names" -#ID|Armature.show_only_ghost_selected -> show_only_ghost_selected: boolean "NO DESCRIPTION" -#ID|Armature.use_auto_ik -> use_auto_ik: boolean "Add temporaral IK constraints while grabbing bones in Pose Mode" -#ID|Armature.use_deform_delay -> use_deform_delay: boolean "Dont deform children when manipulating bones in Pose Mode" -#ID|Armature.use_deform_envelopes -> use_deform_envelopes: boolean "Enable Bone Envelopes when defining deform" -#ID|Armature.use_deform_preserve_volume -> use_deform_preserve_volume: boolean "Enable deform rotation with Quaternions" -#ID|Armature.use_deform_vertex_groups -> use_deform_vertex_groups: boolean "Enable Vertex Groups when defining deform" -#ID|Armature.use_mirror_x -> use_mirror_x: boolean "Apply changes to matching bone on opposite side of X-Axis" -#ID|Brush.auto_smooth_factor -> auto_smooth_factor: float "Amount of smoothing to automatically apply to each stroke" -#+ * ID|Brush.blend -> blend: enum "Brush blending mode" -#+ * ID|Brush.clone_alpha -> clone_alpha: float "Opacity of clone image display" -#+ * ID|Brush.clone_image -> clone_image: pointer "Image for clone tool" -#+ * ID|Brush.clone_offset -> clone_offset: float[2] "NO DESCRIPTION" -#+ * ID|Brush.color -> color: float[3] "NO DESCRIPTION" -#+ * ID|Brush.crease_pinch_factor -> crease_pinch_factor: float "How much the crease brush pinches" -#ID|Brush.cursor_color_add -> cursor_color_add: float[3] "Color of cursor when adding" -#ID|Brush.cursor_color_subtract -> cursor_color_subtract: float[3] "Color of cursor when subtracting" -#+ * ID|Brush.curve -> curve: pointer, "(read-only) Editable falloff curve" -#+ * ID|Brush.direction -> direction: enum "NO DESCRIPTION" -#+ * ID|Brush.icon_filepath -> icon_filepath: string "File path to brush icon" -#+ * ID|Brush.imagepaint_tool -> imagepaint_tool: enum "NO DESCRIPTION" -#+ * ID|Brush.jitter -> jitter: float "Jitter the position of the brush while painting" -#+ * ID|Brush.normal_weight -> normal_weight: float "How much grab will pull vertexes out of surface during a grab" -#+ * ID|Brush.plane_offset -> plane_offset: float "Adjusts plane on which the brush acts towards or away from the object surface" -#+ * ID|Brush.plane_trim -> plane_trim: float "If a vertex is further from offset plane than this then it is not affected" -#+ * ID|Brush.rate -> rate: float "Interval between paints for Airbrush" -#+ * ID|Brush.sculpt_plane -> sculpt_plane: enum "NO DESCRIPTION" -#+ * ID|Brush.sculpt_tool -> sculpt_tool: enum "NO DESCRIPTION" -#+ * ID|Brush.size -> size: int "Radius of the brush in pixels" -#+ * ID|Brush.smooth_stroke_factor -> smooth_stroke_factor: float "Higher values give a smoother stroke" -#+ * ID|Brush.smooth_stroke_radius -> smooth_stroke_radius: int "Minimum distance from last point before stroke continues" -#ID|Brush.spacing -> spacing: int "Spacing between brush daubs as a percentage of brush diameter" -#+ * ID|Brush.strength -> strength: float "How powerful the effect of the brush is when applied" -#+ * ID|Brush.stroke_method -> stroke_method: enum "NO DESCRIPTION" -#+ * ID|Brush.texture -> texture: pointer "NO DESCRIPTION" -#ID|Brush.texture_angle_source_no_random -> texture_angle_source_no_random: enum "NO DESCRIPTION" -#ID|Brush.texture_angle_source_random -> texture_angle_source_random: enum "NO DESCRIPTION" -#+ * ID|Brush.texture_overlay_alpha -> texture_overlay_alpha: int "NO DESCRIPTION" -#+ * ID|Brush.texture_sample_bias -> texture_sample_bias: float "Value added to texture samples" -#+ * ID|Brush.texture_slot -> texture_slot: pointer, "(read-only)" -#+ * ID|Brush.unprojected_radius -> unprojected_radius: float "Radius of brush in Blender units" -#+ * ID|Brush.use_accumulate -> use_accumulate: boolean "Accumulate stroke dabs on top of each other" -#+ * ID|Brush.use_adaptive_space -> use_adaptive_space: boolean "Space daubs according to surface orientation instead of screen space" -#+ * ID|Brush.use_airbrush -> use_airbrush: boolean "Keep applying paint effect while holding mouse (spray)" -#+ * ID|Brush.use_alpha -> use_alpha: boolean "When this is disabled, lock alpha while painting" -#+ * ID|Brush.use_anchor -> use_anchor: boolean "Keep the brush anchored to the initial location" -#+ * ID|Brush.use_custom_icon -> use_custom_icon: boolean "Set the brush icon from an image file" -#ID|Brush.use_edge_to_edge -> use_edge_to_edge: boolean "Drag anchor brush from edge-to-edge" -#+ * ID|Brush.use_frontface -> use_frontface: boolean "Brush only affects vertexes that face the viewer" -#+ * ID|Brush.use_inverse_smooth_pressure -> use_inverse_smooth_pressure: boolean "Lighter pressure causes more smoothing to be applied" -#+ * ID|Brush.use_locked_size -> use_locked_size: boolean "When locked brush stays same size relative to object; when unlocked brush size is given in pixels" -#+ * ID|Brush.use_offset_pressure -> use_offset_pressure: boolean "Enable tablet pressure sensitivity for offset" -#+ * ID|Brush.use_original_normal -> use_original_normal: boolean "When locked keep using normal of surface where stroke was initiated" -#+ * ID|Brush.use_paint_sculpt -> use_paint_sculpt: boolean "Use this brush in sculpt mode" -#+ * ID|Brush.use_paint_texture -> use_paint_texture: boolean "Use this brush in texture paint mode" -#+ * ID|Brush.use_paint_vertex -> use_paint_vertex: boolean "Use this brush in vertex paint mode" -#+ * ID|Brush.use_paint_weight -> use_paint_weight: boolean "Use this brush in weight paint mode" -#+ * ID|Brush.use_persistent -> use_persistent: boolean "Sculpts on a persistent layer of the mesh" -#+ * ID|Brush.use_plane_trim -> use_plane_trim: boolean "Enable Plane Trim" -#ID|Brush.use_pressure_jitter -> use_pressure_jitter: boolean "Enable tablet pressure sensitivity for jitter" -#ID|Brush.use_pressure_size -> use_pressure_size: boolean "Enable tablet pressure sensitivity for size" -#ID|Brush.use_pressure_spacing -> use_pressure_spacing: boolean "Enable tablet pressure sensitivity for spacing" -#ID|Brush.use_pressure_strength -> use_pressure_strength: boolean "Enable tablet pressure sensitivity for strength" -#+ * ID|Brush.use_rake -> use_rake: boolean "Rotate the brush texture to match the stroke direction" -#+ * ID|Brush.use_random_rotation -> use_random_rotation: boolean "Rotate the brush texture at random" -#ID|Brush.use_restore_mesh -> use_restore_mesh: boolean "Allows a single dot to be carefully positioned" -#+ * ID|Brush.use_smooth_stroke -> use_smooth_stroke: boolean "Brush lags behind mouse and follows a smoother path" -#+ * ID|Brush.use_space -> use_space: boolean "Limit brush application to the distance specified by spacing" -#+ * ID|Brush.use_space_atten -> use_space_atten: boolean "Automatically adjusts strength to give consistent results for different spacings" -#+ * ID|Brush.use_texture_overlay -> use_texture_overlay: boolean "Show texture in viewport" -#+ * ID|Brush.use_wrap -> use_wrap: boolean "Enable torus wrapping while painting" -#+ * ID|Brush.vertexpaint_tool -> vertexpaint_tool: enum "NO DESCRIPTION" -#+ * ID|Camera.angle -> angle: float "Perspective Camera lens field of view in degrees" -#+ * ID|Camera.animation_data -> animation_data: pointer, "(read-only) Animation data for this datablock" -#+ * ID|Camera.clip_end -> clip_end: float "Camera far clipping distance" -#+ * ID|Camera.clip_start -> clip_start: float "Camera near clipping distance" -#+ * ID|Camera.dof_distance -> dof_distance: float "Distance to the focus point for depth of field" -#+ * ID|Camera.dof_object -> dof_object: pointer "Use this object to define the depth of field focal point" -#+ * ID|Camera.draw_size -> draw_size: float "Apparent size of the Camera object in the 3D View" -#+ * ID|Camera.lens -> lens: float "Perspective Camera lens value in millimeters" -#+ * ID|Camera.lens_unit -> lens_unit: enum "Unit to edit lens in for the user interface" -#+ * ID|Camera.ortho_scale -> ortho_scale: float "Orthographic Camera scale (similar to zoom)" -#+ * ID|Camera.passepartout_alpha -> passepartout_alpha: float "Opacity (alpha) of the darkened overlay in Camera view" -#+ * ID|Camera.shift_x -> shift_x: float "Perspective Camera horizontal shift" -#+ * ID|Camera.shift_y -> shift_y: float "Perspective Camera vertical shift" -#+ * ID|Camera.show_limits -> show_limits: boolean "Draw the clipping range and focus point on the camera" -#+ * ID|Camera.show_mist -> show_mist: boolean "Draw a line from the Camera to indicate the mist area" -#+ * ID|Camera.show_name -> show_name: boolean "Show the active Cameras name in Camera view" -#+ * ID|Camera.show_passepartout -> show_passepartout: boolean "Show a darkened overlay outside the image area in Camera view" -#+ * ID|Camera.show_title_safe -> show_title_safe: boolean "Show indicators for the title safe zone in Camera view" -#+ * ID|Camera.type -> type: enum "Camera types" -#ID|Camera.use_panorama -> use_panorama: boolean "Render the scene with a cylindrical camera for pseudo-fisheye lens effects" -#+ * ID|Curve.animation_data -> animation_data: pointer, "(read-only) Animation data for this datablock" -#+ * ID|Curve.bevel_depth -> bevel_depth: float "Bevel depth when not using a bevel object" -#+ * ID|Curve.bevel_object -> bevel_object: pointer "Curve object name that defines the bevel shape" -#+ * ID|Curve.bevel_resolution -> bevel_resolution: int "Bevel resolution when depth is non-zero and no specific bevel object has been defined" -#+ * ID|Curve.dimensions -> dimensions: enum "Select 2D or 3D curve type" -#+ * ID|Curve.eval_time -> eval_time: float "Parametric position along the length of the curve that Objects following it should be at. Position is evaluated by dividing by the Path Length value" -#+ * ID|Curve.extrude -> extrude: float "Amount of curve extrusion when not using a bevel object" -#+ * ID|Curve.materials -> materials: collection, "(read-only)" -#ID|Curve.offset -> offset: float "Scale the original width (1.0) based on given factor" -#ID|Curve.path_duration -> path_duration: int "The number of frames that are needed to traverse the path, defining the maximum value for the Evaluation Time setting" -#+ * ID|Curve.render_resolution_u -> render_resolution_u: int "Surface resolution in U direction used while rendering. Zero skips this property" -#+ * ID|Curve.render_resolution_v -> render_resolution_v: int "Surface resolution in V direction used while rendering. Zero skips this property" -#+ * ID|Curve.resolution_u -> resolution_u: int "Surface resolution in U direction" -#+ * ID|Curve.resolution_v -> resolution_v: int "Surface resolution in V direction" -#+ * ID|Curve.shape_keys -> shape_keys: pointer, "(read-only)" -#ID|Curve.show_handles -> show_handles: boolean "Display bezier handles in editmode" -#ID|Curve.show_normal_face -> show_normal_face: boolean "Display 3D curve normals in editmode" -#+ * ID|Curve.splines -> splines: collection, "(read-only) Collection of splines in this curve data object" -#+ * ID|Curve.taper_object -> taper_object: pointer "Curve object name that defines the taper (width)" -#ID|Curve.texspace_location -> texspace_location: float[3] "Texture space location" -#+ * ID|Curve.texspace_size -> texspace_size: float[3] "Texture space size" -#+ * ID|Curve.twist_mode -> twist_mode: enum "The type of tilt calculation for 3D Curves" -#+ * ID|Curve.twist_smooth -> twist_smooth: float "Smoothing iteration for tangents" -#ID|Curve.use_auto_texspace -> use_auto_texspace: boolean "Adjusts active objects texture space automatically when transforming object" -#+ * ID|Curve.use_deform_bounds -> use_deform_bounds: boolean "Use the mesh bounds to clamp the deformation" -#ID|Curve.use_fill_back -> use_fill_back: boolean "Draw filled back for extruded/beveled curves" -#ID|Curve.use_fill_deform -> use_fill_deform: boolean "Fill curve after applying deformation" -#ID|Curve.use_fill_front -> use_fill_front: boolean "Draw filled front for extruded/beveled curves" -#ID|Curve.use_map_on_length -> use_map_on_length: boolean "Generate texture mapping coordinates following the curve direction, rather than the local bounding box" -#+ * ID|Curve.use_path -> use_path: boolean "Enable the curve to become a translation path" -#+ * ID|Curve.use_path_follow -> use_path_follow: boolean "Make curve path children to rotate along the path" -#+ * ID|Curve.use_radius -> use_radius: boolean "Option for paths: apply the curve radius with path following it and deforming" -#+ * ID|Curve.use_stretch -> use_stretch: boolean "Option for curve-deform: makes deformed child to stretch along entire path" -#+ * ID|Curve.use_time_offset -> use_time_offset: boolean "Children will use TimeOffs value as path distance offset" -#ID|Curve|SurfaceCurve.use_map_on_length -> use_map_on_length: boolean "Generate texture mapping coordinates following the curve direction, rather than the local bounding box" -#MAKE COLLECTION ATTR * ID|Curve|TextCurve.active_textbox -> active_textbox: int "NO DESCRIPTION" -#ID|Curve|TextCurve.align -> align: enum "Text align from the object center" -#+ * ID|Curve|TextCurve.body -> body: string "contents of this text object" -#+ * ID|Curve|TextCurve.body_format -> body_format: collection, "(read-only) Stores the style of each character" -#+ * ID|Curve|TextCurve.edit_format -> edit_format: pointer, "(read-only) Editing settings character formatting" -#+ * ID|Curve|TextCurve.family -> family: string "Use Blender Objects as font characters. Give font objects a common name followed by the character it represents, eg. familya, familyb etc, and turn on Verts Duplication" -#ID|Curve|TextCurve.follow_curve -> follow_curve: pointer "Curve deforming text object" -#+ * ID|Curve|TextCurve.font -> font: pointer "NO DESCRIPTION" -#+ * ID|Curve|TextCurve.offset_x -> offset_x: float "Horizontal offset from the object origin" -#+ * ID|Curve|TextCurve.offset_y -> offset_y: float "Vertical offset from the object origin" -#+ * ID|Curve|TextCurve.shear -> shear: float "Italic angle of the characters" -#ID|Curve|TextCurve.size -> size: float "NO DESCRIPTION" -#+ * ID|Curve|TextCurve.small_caps_scale -> small_caps_scale: float "Scale of small capitals" -#ID|Curve|TextCurve.space_character -> space_character: float "NO DESCRIPTION" -#ID|Curve|TextCurve.space_line -> space_line: float "NO DESCRIPTION" -#ID|Curve|TextCurve.space_word -> space_word: float "NO DESCRIPTION" -#ID|Curve|TextCurve.text_boxes -> text_boxes: collection, "(read-only)" -#ID|Curve|TextCurve.underline_height -> underline_height: float "NO DESCRIPTION" -#ID|Curve|TextCurve.underline_position -> underline_position: float "Vertical position of underline" -#ID|Curve|TextCurve.use_fast_edit -> use_fast_edit: boolean "Dont fill polygons while editing" -#ID|Curve|TextCurve.use_map_on_length -> use_map_on_length: boolean "Generate texture mapping coordinates following the curve direction, rather than the local bounding box" -#+ * ID|GreasePencil.draw_mode -> draw_mode: enum "NO DESCRIPTION" -#+ * ID|GreasePencil.layers -> layers: collection, "(read-only)" -#+ * ID|GreasePencil.use_stroke_endpoints -> use_stroke_endpoints: boolean "Only use the first and last parts of the stroke for snapping" -#+ * ID|Group.dupli_offset -> dupli_offset: float[3] "Offset from the origin to use when instancing as DupliGroup" -#ID|Group.layers -> layers: boolean[20] "Layers visible when this groups is instanced as a dupli" -#+ * ID|Group.objects -> objects: collection, "(read-only) A collection of this groups objects" -#+ * ID|Image.bindcode -> bindcode: int, "(read-only) OpenGL bindcode" -#+ * ID|Image.depth -> depth: int, "(read-only) Image bit depth" -#+ * ID|Image.display_aspect -> display_aspect: float[2] "Display Aspect for this image, does not affect rendering" -#+ * ID|Image.field_order -> field_order: enum "Order of video fields. Select which lines are displayed first" -#+ * ID|Image.file_format -> file_format: enum "Format used for re-saving this file" -#+ * ID|Image.filepath -> filepath: string "Image/Movie file name" -#+ * ID|Image.filepath_raw -> filepath_raw: string "Image/Movie file name (without data refreshing)" -#ID|Image.fps -> fps: int "Speed of the animation in frames per second" -#ID|Image.frame_end -> frame_end: int "End frame of an animated texture" -#ID|Image.frame_start -> frame_start: int "Start frame of an animated texture" -#+ * ID|Image.generated_height -> generated_height: int "Generated image height" -#+ * ID|Image.generated_type -> generated_type: enum "Generated image type" -#+ * ID|Image.generated_width -> generated_width: int "Generated image width" -#+ * ID|Image.has_data -> has_data: boolean, "(read-only) True if this image has data" -#ID|Image.is_dirty -> is_dirty: boolean, "(read-only) Image has changed and is not saved" -#+ * ID|Image.mapping -> mapping: enum "Mapping type to use for this image in the game engine" -#+ * ID|Image.packed_file -> packed_file: pointer, "(read-only)" -#+ * ID|Image.size -> size: int[2], "(read-only) Width and height in pixels, zero when image data cant be loaded" -#+ * ID|Image.source -> source: enum "Where the image comes from" -#+ * ID|Image.tiles_x -> tiles_x: int "Degree of repetition in the X direction" -#+ * ID|Image.tiles_y -> tiles_y: int "Degree of repetition in the Y direction" -#+ * ID|Image.type -> type: enum, "(read-only) How to generate the image" -#ID|Image.use_animation -> use_animation: boolean "Use as animated texture in the game engine" -#ID|Image.use_clamp_x -> use_clamp_x: boolean "Disable texture repeating horizontally" -#ID|Image.use_clamp_y -> use_clamp_y: boolean "Disable texture repeating vertically" -#ID|Image.use_fields -> use_fields: boolean "Use fields of the image" -#ID|Image.use_premultiply -> use_premultiply: boolean "Convert RGB from key alpha to premultiplied alpha" -#ID|Image.use_tiles -> use_tiles: boolean "Use of tilemode for faces (default shift-LMB to pick the tile for selected faces)" -#+ * ID|Key.animation_data -> animation_data: pointer, "(read-only) Animation data for this datablock" -#+ * ID|Key.keys -> keys: collection, "(read-only) Shape keys" -#+ * ID|Key.reference_key -> reference_key: pointer, "(read-only)" -#+ * ID|Key.slurph -> slurph: int "Creates a delay in amount of frames in applying keypositions, first vertex goes first" -#ID|Key.use_relative -> use_relative: boolean "Makes shape keys relative" -#+ * ID|Key.user -> user: pointer, "(read-only) Datablock using these shape keys" -#+ * ID|Lamp.active_texture -> active_texture: pointer "Active texture slot being displayed" -#+ * ID|Lamp.active_texture_index -> active_texture_index: int "Index of active texture slot" -#+ * ID|Lamp.animation_data -> animation_data: pointer, "(read-only) Animation data for this datablock" -#+ * ID|Lamp.color -> color: float[3] "Light color" -#+ * ID|Lamp.distance -> distance: float "Falloff distance - the light is at half the original intensity at this point" -#+ * ID|Lamp.energy -> energy: float "Amount of light that the lamp emits" -#+ * ID|Lamp.texture_slots -> texture_slots: collection, "(read-only) Texture slots defining the mapping and influence of textures" -#+ * ID|Lamp.type -> type: enum "Type of Lamp" -#ID|Lamp.use_diffuse -> use_diffuse: boolean "Lamp does diffuse shading" -#ID|Lamp.use_negative -> use_negative: boolean "Lamp casts negative light" -#ID|Lamp.use_own_layer -> use_own_layer: boolean "Illuminates objects only on the same layer the lamp is on" -#ID|Lamp.use_specular -> use_specular: boolean "Lamp creates specular highlights" -#+ * ID|Lamp|AreaLamp.gamma -> gamma: float "Light gamma correction value" -#+ * ID|Lamp|AreaLamp.shadow_adaptive_threshold -> shadow_adaptive_threshold: float "Threshold for Adaptive Sampling (Raytraced shadows)" -#+ * ID|Lamp|AreaLamp.shadow_color -> shadow_color: float[3] "Color of shadows cast by the lamp" -#+ * ID|Lamp|AreaLamp.shadow_method -> shadow_method: enum "Method to compute lamp shadow with" -#ID|Lamp|AreaLamp.shadow_ray_sample_method -> shadow_ray_sample_method: enum "Method for generating shadow samples: Adaptive QMC is fastest, Constant QMC is less noisy but slower" -#+ * ID|Lamp|AreaLamp.shadow_ray_samples_x -> shadow_ray_samples_x: int "Amount of samples taken extra (samples x samples)" -#+ * ID|Lamp|AreaLamp.shadow_ray_samples_y -> shadow_ray_samples_y: int "Amount of samples taken extra (samples x samples)" -#+ * ID|Lamp|AreaLamp.shadow_soft_size -> shadow_soft_size: float "Light size for ray shadow sampling (Raytraced shadows)" -#+ * ID|Lamp|AreaLamp.shape -> shape: enum "Shape of the area lamp" -#+ * ID|Lamp|AreaLamp.size -> size: float "Size of the area of the area Lamp, X direction size for Rectangle shapes" -#+ * ID|Lamp|AreaLamp.size_y -> size_y: float "Size of the area of the area Lamp in the Y direction for Rectangle shapes" -#ID|Lamp|AreaLamp.use_dither -> use_dither: boolean "Use 2x2 dithering for sampling (Constant Jittered sampling)" -#ID|Lamp|AreaLamp.use_jitter -> use_jitter: boolean "Use noise for sampling (Constant Jittered sampling)" -#ID|Lamp|AreaLamp.use_only_shadow -> use_only_shadow: boolean "Causes light to cast shadows only without illuminating objects" -#ID|Lamp|AreaLamp.use_shadow_layer -> use_shadow_layer: boolean "Causes only objects on the same layer to cast shadows" -#ID|Lamp|AreaLamp.use_umbra -> use_umbra: boolean "Emphasize parts that are fully shadowed (Constant Jittered sampling)" -#+ * ID|Lamp|PointLamp.falloff_curve -> falloff_curve: pointer, "(read-only) Custom Lamp Falloff Curve" -#+ * ID|Lamp|PointLamp.falloff_type -> falloff_type: enum "Intensity Decay with distance" -#+ * ID|Lamp|PointLamp.linear_attenuation -> linear_attenuation: float "Linear distance attenuation" -#+ * ID|Lamp|PointLamp.quadratic_attenuation -> quadratic_attenuation: float "Quadratic distance attenuation" -#+ * ID|Lamp|PointLamp.shadow_adaptive_threshold -> shadow_adaptive_threshold: float "Threshold for Adaptive Sampling (Raytraced shadows)" -#+ * ID|Lamp|PointLamp.shadow_color -> shadow_color: float[3] "Color of shadows cast by the lamp" -#+ * ID|Lamp|PointLamp.shadow_method -> shadow_method: enum "Method to compute lamp shadow with" -#ID|Lamp|PointLamp.shadow_ray_sample_method -> shadow_ray_sample_method: enum "Method for generating shadow samples: Adaptive QMC is fastest, Constant QMC is less noisy but slower" -#+ * ID|Lamp|PointLamp.shadow_ray_samples -> shadow_ray_samples: int "Amount of samples taken extra (samples x samples)" -#+ * ID|Lamp|PointLamp.shadow_soft_size -> shadow_soft_size: float "Light size for ray shadow sampling (Raytraced shadows)" -#ID|Lamp|PointLamp.use_only_shadow -> use_only_shadow: boolean "Causes light to cast shadows only without illuminating objects" -#ID|Lamp|PointLamp.use_shadow_layer -> use_shadow_layer: boolean "Causes only objects on the same layer to cast shadows" -#ID|Lamp|PointLamp.use_sphere -> use_sphere: boolean "Sets light intensity to zero beyond lamp distance" -#+ * ID|Lamp|SpotLamp.compression_threshold -> compression_threshold: float "Deep shadow map compression threshold" -#+ * ID|Lamp|SpotLamp.falloff_curve -> falloff_curve: pointer, "(read-only) Custom Lamp Falloff Curve" -#+ * ID|Lamp|SpotLamp.falloff_type -> falloff_type: enum "Intensity Decay with distance" -#+ * ID|Lamp|SpotLamp.halo_intensity -> halo_intensity: float "Brightness of the spotlights halo cone (Buffer Shadows)" -#+ * ID|Lamp|SpotLamp.halo_step -> halo_step: int "Volumetric halo sampling frequency" -#+ * ID|Lamp|SpotLamp.linear_attenuation -> linear_attenuation: float "Linear distance attenuation" -#+ * ID|Lamp|SpotLamp.quadratic_attenuation -> quadratic_attenuation: float "Quadratic distance attenuation" -#+ * ID|Lamp|SpotLamp.shadow_adaptive_threshold -> shadow_adaptive_threshold: float "Threshold for Adaptive Sampling (Raytraced shadows)" -#+ * ID|Lamp|SpotLamp.shadow_buffer_bias -> shadow_buffer_bias: float "Shadow buffer sampling bias" -#+ * ID|Lamp|SpotLamp.shadow_buffer_clip_end -> shadow_buffer_clip_end: float "Shadow map clip end beyond which objects will not generate shadows" -#+ * ID|Lamp|SpotLamp.shadow_buffer_clip_start -> shadow_buffer_clip_start: float "Shadow map clip start: objects closer will not generate shadows" -#+ * ID|Lamp|SpotLamp.shadow_buffer_samples -> shadow_buffer_samples: int "Number of shadow buffer samples" -#+ * ID|Lamp|SpotLamp.shadow_buffer_size -> shadow_buffer_size: int "Resolution of the shadow buffer, higher values give crisper shadows but use more memory" -#+ * ID|Lamp|SpotLamp.shadow_buffer_soft -> shadow_buffer_soft: float "Size of shadow buffer sampling area" -#+ * ID|Lamp|SpotLamp.shadow_buffer_type -> shadow_buffer_type: enum "Type of shadow buffer" -#+ * ID|Lamp|SpotLamp.shadow_color -> shadow_color: float[3] "Color of shadows cast by the lamp" -#+ * ID|Lamp|SpotLamp.shadow_filter_type -> shadow_filter_type: enum "Type of shadow filter (Buffer Shadows)" -#+ * ID|Lamp|SpotLamp.shadow_method -> shadow_method: enum "Method to compute lamp shadow with" -#ID|Lamp|SpotLamp.shadow_ray_sample_method -> shadow_ray_sample_method: enum "Method for generating shadow samples: Adaptive QMC is fastest, Constant QMC is less noisy but slower" -#+ * ID|Lamp|SpotLamp.shadow_ray_samples -> shadow_ray_samples: int "Amount of samples taken extra (samples x samples)" -#+ * ID|Lamp|SpotLamp.shadow_sample_buffers -> shadow_sample_buffers: enum "Number of shadow buffers to render for better AA, this increases memory usage" -#+ * ID|Lamp|SpotLamp.shadow_soft_size -> shadow_soft_size: float "Light size for ray shadow sampling (Raytraced shadows)" -#+ * ID|Lamp|SpotLamp.show_cone -> show_cone: boolean "Draw transparent cone in 3D view to visualize which objects are contained in it" -#+ * ID|Lamp|SpotLamp.spot_blend -> spot_blend: float "The softness of the spotlight edge" -#+ * ID|Lamp|SpotLamp.spot_size -> spot_size: float "Angle of the spotlight beam in degrees" -#ID|Lamp|SpotLamp.use_auto_clip_end -> use_auto_clip_end: boolean "Automatic calculation of clipping-end, based on visible vertices" -#ID|Lamp|SpotLamp.use_auto_clip_start -> use_auto_clip_start: boolean "Automatic calculation of clipping-start, based on visible vertices" -#ID|Lamp|SpotLamp.use_halo -> use_halo: boolean "Renders spotlight with a volumetric halo (Buffer Shadows)" -#ID|Lamp|SpotLamp.use_only_shadow -> use_only_shadow: boolean "Causes light to cast shadows only without illuminating objects" -#ID|Lamp|SpotLamp.use_shadow_layer -> use_shadow_layer: boolean "Causes only objects on the same layer to cast shadows" -#ID|Lamp|SpotLamp.use_sphere -> use_sphere: boolean "Sets light intensity to zero beyond lamp distance" -#ID|Lamp|SpotLamp.use_square -> use_square: boolean "Casts a square spot light shape" -#+ * ID|Lamp|SunLamp.shadow_adaptive_threshold -> shadow_adaptive_threshold: float "Threshold for Adaptive Sampling (Raytraced shadows)" -#+ * ID|Lamp|SunLamp.shadow_color -> shadow_color: float[3] "Color of shadows cast by the lamp" -#+ * ID|Lamp|SunLamp.shadow_method -> shadow_method: enum "Method to compute lamp shadow with" -#ID|Lamp|SunLamp.shadow_ray_sample_method -> shadow_ray_sample_method: enum "Method for generating shadow samples: Adaptive QMC is fastest, Constant QMC is less noisy but slower" -#+ * ID|Lamp|SunLamp.shadow_ray_samples -> shadow_ray_samples: int "Amount of samples taken extra (samples x samples)" -#+ * ID|Lamp|SunLamp.shadow_soft_size -> shadow_soft_size: float "Light size for ray shadow sampling (Raytraced shadows)" -#+ * ID|Lamp|SunLamp.sky -> sky: pointer, "(read-only) Sky related settings for sun lamps" -#ID|Lamp|SunLamp.use_only_shadow -> use_only_shadow: boolean "Causes light to cast shadows only without illuminating objects" -#ID|Lamp|SunLamp.use_shadow_layer -> use_shadow_layer: boolean "Causes only objects on the same layer to cast shadows" -#+ * ID|Lattice.interpolation_type_u -> interpolation_type_u: enum "NO DESCRIPTION" -#+ * ID|Lattice.interpolation_type_v -> interpolation_type_v: enum "NO DESCRIPTION" -#+ * ID|Lattice.interpolation_type_w -> interpolation_type_w: enum "NO DESCRIPTION" -#+ * ID|Lattice.points -> points: collection, "(read-only) Points of the lattice" -#+ * ID|Lattice.points_u -> points_u: int "Points in U direction (cant be changed when there are shape keys)" -#+ * ID|Lattice.points_v -> points_v: int "Points in V direction (cant be changed when there are shape keys)" -#+ * ID|Lattice.points_w -> points_w: int "Points in W direction (cant be changed when there are shape keys)" -#+ * ID|Lattice.shape_keys -> shape_keys: pointer, "(read-only)" -#ID|Lattice.use_outside -> use_outside: boolean "Only draw, and take into account, the outer vertices" -#+ * ID|Lattice.vertex_group -> vertex_group: string "Vertex group to apply the influence of the lattice" -#+ * ID|Library.filepath -> filepath: string "Path to the library .blend file" -#+ * ID|Library.parent -> parent: pointer, "(read-only)" -#+ * ID|Material.active_node_material -> active_node_material: pointer "Active node material" -#+ * ID|Material.active_texture -> active_texture: pointer "Active texture slot being displayed" -#+ * ID|Material.active_texture_index -> active_texture_index: int "Index of active texture slot" -#+ * ID|Material.alpha -> alpha: float "Alpha transparency of the material" -#+ * ID|Material.ambient -> ambient: float "Amount of global ambient color the material receives" -#+ * ID|Material.animation_data -> animation_data: pointer, "(read-only) Animation data for this datablock" -#+ * ID|Material.darkness -> darkness: float "Minnaert darkness" -#+ * ID|Material.diffuse_color -> diffuse_color: float[3] "NO DESCRIPTION" -#+ * ID|Material.diffuse_fresnel -> diffuse_fresnel: float "Power of Fresnel" -#+ * ID|Material.diffuse_fresnel_factor -> diffuse_fresnel_factor: float "Blending factor of Fresnel" -#+ * ID|Material.diffuse_intensity -> diffuse_intensity: float "Amount of diffuse reflection" -#+ * ID|Material.diffuse_ramp -> diffuse_ramp: pointer, "(read-only) Color ramp used to affect diffuse shading" -#+ * ID|Material.diffuse_ramp_blend -> diffuse_ramp_blend: enum "NO DESCRIPTION" -#+ * ID|Material.diffuse_ramp_factor -> diffuse_ramp_factor: float "Blending factor (also uses alpha in Colorband)" -#+ * ID|Material.diffuse_ramp_input -> diffuse_ramp_input: enum "NO DESCRIPTION" -#+ * ID|Material.diffuse_shader -> diffuse_shader: enum "NO DESCRIPTION" -#+ * ID|Material.diffuse_toon_size -> diffuse_toon_size: float "Size of diffuse toon area" -#+ * ID|Material.diffuse_toon_smooth -> diffuse_toon_smooth: float "Smoothness of diffuse toon area" -#+ * ID|Material.emit -> emit: float "Amount of light to emit" -#+ * ID|Material.halo -> halo: pointer, "(read-only) Halo settings for the material" -#+ * ID|Material.invert_z -> invert_z: boolean "Renders materials faces with an inverted Z buffer (scanline only)" -#+ * ID|Material.light_group -> light_group: pointer "Limit lighting to lamps in this Group" -#+ * ID|Material.mirror_color -> mirror_color: float[3] "Mirror color of the material" -#+ * ID|Material.node_tree -> node_tree: pointer, "(read-only) Node tree for node based materials" -#ID|Material.offset_z -> offset_z: float "Gives faces an artificial offset in the Z buffer for Z transparency" -#+ * ID|Material.physics -> physics: pointer, "(read-only) Game physics settings" -#+ * ID|Material.preview_render_type -> preview_render_type: enum "Type of preview render" -#+ * ID|Material.raytrace_mirror -> raytrace_mirror: pointer, "(read-only) Raytraced reflection settings for the material" -#+ * ID|Material.raytrace_transparency -> raytrace_transparency: pointer, "(read-only) Raytraced transparency settings for the material" -#+ * ID|Material.roughness -> roughness: float "Oren-Nayar Roughness" -#+ * ID|Material.shadow_buffer_bias -> shadow_buffer_bias: float "Factor to multiply shadow buffer bias with (0 is ignore.)" -#ID|Material.shadow_cast_alpha -> shadow_cast_alpha: float "Shadow casting alpha, in use for Irregular and Deep shadow buffer" -#+ * ID|Material.shadow_ray_bias -> shadow_ray_bias: float "Shadow raytracing bias to prevent terminator problems on shadow boundary" -#+ * ID|Material.specular_alpha -> specular_alpha: float "Alpha transparency for specular areas" -#+ * ID|Material.specular_color -> specular_color: float[3] "Specular color of the material" -#+ * ID|Material.specular_hardness -> specular_hardness: int "NO DESCRIPTION" -#+ * ID|Material.specular_intensity -> specular_intensity: float "NO DESCRIPTION" -#+ * ID|Material.specular_ior -> specular_ior: float "NO DESCRIPTION" -#+ * ID|Material.specular_ramp -> specular_ramp: pointer, "(read-only) Color ramp used to affect specular shading" -#+ * ID|Material.specular_ramp_blend -> specular_ramp_blend: enum "NO DESCRIPTION" -#+ * ID|Material.specular_ramp_factor -> specular_ramp_factor: float "Blending factor (also uses alpha in Colorband)" -#+ * ID|Material.specular_ramp_input -> specular_ramp_input: enum "NO DESCRIPTION" -#+ * ID|Material.specular_shader -> specular_shader: enum "NO DESCRIPTION" -#+ * ID|Material.specular_slope -> specular_slope: float "The standard deviation of surface slope" -#+ * ID|Material.specular_toon_size -> specular_toon_size: float "Size of specular toon area" -#+ * ID|Material.specular_toon_smooth -> specular_toon_smooth: float "Smoothness of specular toon area" -#+ * ID|Material.strand -> strand: pointer, "(read-only) Strand settings for the material" -#+ * ID|Material.subsurface_scattering -> subsurface_scattering: pointer, "(read-only) Subsurface scattering settings for the material" -#+ * ID|Material.texture_slots -> texture_slots: collection, "(read-only) Texture slots defining the mapping and influence of textures" -#+ * ID|Material.translucency -> translucency: float "Amount of diffuse shading on the back side" -#+ * ID|Material.transparency_method -> transparency_method: enum "Method to use for rendering transparency" -#+ * ID|Material.type -> type: enum "Material type defining how the object is rendered" -#ID|Material.use_cast_approximate -> use_cast_approximate: boolean "Allow this material to cast shadows when using approximate ambient occlusion." -#ID|Material.use_cast_buffer_shadows -> use_cast_buffer_shadows: boolean "Allow this material to cast shadows from shadow buffer lamps" -#ID|Material.use_cast_shadows_only -> use_cast_shadows_only: boolean "Makes objects with this material appear invisible, only casting shadows (not rendered)" -#ID|Material.use_cubic -> use_cubic: boolean "Use cubic interpolation for diffuse values, for smoother transitions" -#+ * ID|Material.use_diffuse_ramp -> use_diffuse_ramp: boolean "Toggle diffuse ramp operations" -#ID|Material.use_face_texture -> use_face_texture: boolean "Replaces the objects base color with color from face assigned image textures" -#ID|Material.use_face_texture_alpha -> use_face_texture_alpha: boolean "Replaces the objects base alpha value with alpha from face assigned image textures" -#ID|Material.use_full_oversampling -> use_full_oversampling: boolean "Force this material to render full shading/textures for all anti-aliasing samples" -#ID|Material.use_light_group_exclusive -> use_light_group_exclusive: boolean "Material uses the light group exclusively - these lamps are excluded from other scene lighting" -#ID|Material.use_mist -> use_mist: boolean "Use mist with this material (in world settings)" -#+ * ID|Material.use_nodes -> use_nodes: boolean "Use shader nodes to render the material" -#ID|Material.use_object_color -> use_object_color: boolean "Modulate the result with a per-object color" -#ID|Material.use_only_shadow -> use_only_shadow: boolean "Renders shadows as the materials alpha value, making materials transparent except for shadowed areas" -#ID|Material.use_ray_shadow_bias -> use_ray_shadow_bias: boolean "Prevents raytraced shadow errors on surfaces with smooth shaded normals (terminator problem)" -#ID|Material.use_raytrace -> use_raytrace: boolean "Include this material and geometry that uses it in ray tracing calculations" -#ID|Material.use_shadeless -> use_shadeless: boolean "Makes this material insensitive to light or shadow" -#ID|Material.use_shadows -> use_shadows: boolean "Allows this material to receive shadows" -#+ * ID|Material.use_sky -> use_sky: boolean "Renders this material with zero alpha, with sky background in place (scanline only)" -#+ * ID|Material.use_specular_ramp -> use_specular_ramp: boolean "Toggle specular ramp operations" -#ID|Material.use_tangent_shading -> use_tangent_shading: boolean "Use the materials tangent vector instead of the normal for shading - for anisotropic shading effects" -#+ * ID|Material.use_textures -> use_textures: boolean[18] "Enable/Disable each texture" -#ID|Material.use_transparency -> use_transparency: boolean "Render material as transparent" -#ID|Material.use_transparent_shadows -> use_transparent_shadows: boolean "Allow this object to receive transparent shadows casted through other objects" -#ID|Material.use_vertex_color_light -> use_vertex_color_light: boolean "Add vertex colors as additional lighting" -#ID|Material.use_vertex_color_paint -> use_vertex_color_paint: boolean "Replaces object base color with vertex colors (multiplies with texture face face assigned textures)" -#+ * ID|Material.volume -> volume: pointer, "(read-only) Volume settings for the material" -#+ * ID|Mesh.active_uv_texture_index -> active_uv_texture_index: int "Active UV texture index" -#+ * ID|Mesh.active_vertex_color_index -> active_vertex_color_index: int "Active vertex color index" -#+ * ID|Mesh.animation_data -> animation_data: pointer, "(read-only) Animation data for this datablock" -#ID|Mesh.auto_smooth_angle -> auto_smooth_angle: int "Defines maximum angle between face normals that Auto Smooth will operate on" -#+ * ID|Mesh.edges -> edges: collection, "(read-only) Edges of the mesh" -#+ * ID|Mesh.faces -> faces: collection, "(read-only) Faces of the mesh" -#ID|Mesh.layers_float -> layers_float: collection, "(read-only)" -#ID|Mesh.layers_int -> layers_int: collection, "(read-only)" -#ID|Mesh.layers_string -> layers_string: collection, "(read-only)" -#+ * ID|Mesh.materials -> materials: collection, "(read-only)" -#+ * ID|Mesh.shape_keys -> shape_keys: pointer, "(read-only)" -#ID|Mesh.show_all_edges -> show_all_edges: boolean "Displays all edges for wireframe in all view modes in the 3D view" -#ID|Mesh.show_double_sided -> show_double_sided: boolean "Render/display the mesh with double or single sided lighting" -#ID|Mesh.show_edge_bevel_weight -> show_edge_bevel_weight: boolean "Displays weights created for the Bevel modifier" -#ID|Mesh.show_edge_crease -> show_edge_crease: boolean "Displays creases created for subsurf weighting" -#ID|Mesh.show_edge_seams -> show_edge_seams: boolean "Displays UV unwrapping seams" -#ID|Mesh.show_edge_sharp -> show_edge_sharp: boolean "Displays sharp edges, used with the EdgeSplit modifier" -#ID|Mesh.show_edges -> show_edges: boolean "Displays selected edges using highlights in the 3D view and UV editor" -#ID|Mesh.show_extra_edge_angle -> show_extra_edge_angle: boolean "Displays the angles in the selected edges in degrees, Using global values when set in the transform panel" -#ID|Mesh.show_extra_edge_length -> show_extra_edge_length: boolean "Displays selected edge lengths, Using global values when set in the transform panel" -#ID|Mesh.show_extra_face_area -> show_extra_face_area: boolean "Displays the area of selected faces, Using global values when set in the transform panel" -#ID|Mesh.show_faces -> show_faces: boolean "Displays all faces as shades in the 3D view and UV editor" -#ID|Mesh.show_normal_face -> show_normal_face: boolean "Displays face normals as lines" -#ID|Mesh.show_normal_vertex -> show_normal_vertex: boolean "Displays vertex normals as lines" -#+ * ID|Mesh.sticky -> sticky: collection, "(read-only) Sticky texture coordinates" -#+ * ID|Mesh.texco_mesh -> texco_mesh: pointer "Derive texture coordinates from another mesh" -#ID|Mesh.texspace_location -> texspace_location: float[3] "Texture space location" -#+ * ID|Mesh.texspace_size -> texspace_size: float[3] "Texture space size" -#+ * ID|Mesh.texture_mesh -> texture_mesh: pointer "Use another mesh for texture indices (vertex indices must be aligned)" -#+ * ID|Mesh.total_edge_sel -> total_edge_sel: int, "(read-only) Selected edge count in editmode" -#+ * ID|Mesh.total_face_sel -> total_face_sel: int, "(read-only) Selected face count in editmode" -#+ * ID|Mesh.total_vert_sel -> total_vert_sel: int, "(read-only) Selected vertex count in editmode" -#ID|Mesh.use_auto_smooth -> use_auto_smooth: boolean "Treats all set-smoothed faces with angles less than the specified angle as smooth during render" -#ID|Mesh.use_auto_texspace -> use_auto_texspace: boolean "Adjusts active objects texture space automatically when transforming object" -#+ * ID|Mesh.use_mirror_topology -> use_mirror_topology: boolean "Use topology based mirroring" -#+ * ID|Mesh.use_mirror_x -> use_mirror_x: boolean "X Axis mirror editing" -#+ * ID|Mesh.use_paint_mask -> use_paint_mask: boolean "Face selection masking for painting" -#+ * ID|Mesh.uv_texture_clone -> uv_texture_clone: pointer "UV texture to be used as cloning source" -#+ * ID|Mesh.uv_texture_clone_index -> uv_texture_clone_index: int "Clone UV texture index" -#+ * ID|Mesh.uv_texture_stencil -> uv_texture_stencil: pointer "UV texture to mask the painted area" -#+ * ID|Mesh.uv_texture_stencil_index -> uv_texture_stencil_index: int "Mask UV texture index" -#+ * ID|Mesh.uv_textures -> uv_textures: collection, "(read-only)" -#+ * ID|Mesh.vertex_colors -> vertex_colors: collection, "(read-only)" -#ID|Mesh.vertices -> vertices: collection, "(read-only) Vertices of the mesh" -#+ * ID|MetaBall.animation_data -> animation_data: pointer, "(read-only) Animation data for this datablock" -#+ * ID|MetaBall.elements -> elements: collection, "(read-only) Meta elements" -#+ * ID|MetaBall.materials -> materials: collection, "(read-only)" -#ID|MetaBall.render_resolution -> render_resolution: float "Polygonization resolution in rendering" -#ID|MetaBall.resolution -> resolution: float "Polygonization resolution in the 3D viewport" -#ID|MetaBall.texspace_location -> texspace_location: float[3] "Texture space location" -#+ * ID|MetaBall.texspace_size -> texspace_size: float[3] "Texture space size" -#+ * ID|MetaBall.threshold -> threshold: float "Influence of meta elements" -#ID|MetaBall.update_method -> update_method: enum "Metaball edit update behavior" -#ID|MetaBall.use_auto_texspace -> use_auto_texspace: boolean "Adjusts active objects texture space automatically when transforming object" -#+ * ID|NodeTree.animation_data -> animation_data: pointer, "(read-only) Animation data for this datablock" -#+ * ID|NodeTree.grease_pencil -> grease_pencil: pointer "Grease Pencil datablock" -#+ * ID|NodeTree.nodes -> nodes: collection, "(read-only)" -#+ * ID|Object.active_material -> active_material: pointer "Active material being displayed" -#+ * ID|Object.active_material_index -> active_material_index: int "Index of active material slot" -#+ * ID|Object.active_particle_system -> active_particle_system: pointer, "(read-only) Active particle system being displayed" -#+ * ID|Object.active_particle_system_index -> active_particle_system_index: int "Index of active particle system slot" -#+ * ID|Object.active_shape_key -> active_shape_key: pointer, "(read-only) Current shape key" -#+ * ID|Object.active_shape_key_index -> active_shape_key_index: int "Current shape key index" -#+ * ID|Object.active_vertex_group -> active_vertex_group: pointer, "(read-only) Vertex groups of the object" -#+ * ID|Object.active_vertex_group_index -> active_vertex_group_index: int "Active index in vertex group array" -#+ * ID|Object.animation_data -> animation_data: pointer, "(read-only) Animation data for this datablock" -#+ * ID|Object.animation_visualisation -> animation_visualisation: pointer, "(read-only) Animation data for this datablock" -#+ * ID|Object.bound_box -> bound_box: float[24], "(read-only) Objects bound box in object-space coordinates" -#+ * ID|Object.collision -> collision: pointer, "(read-only) Settings for using the objects as a collider in physics simulation" -#+ * ID|Object.color -> color: float[4] "Object color and alpha, used when faces have the ObColor mode enabled" -#+ * ID|Object.constraints -> constraints: collection, "(read-only) Constraints affecting the transformation of the object" -#+ * ID|Object.data -> data: pointer "Object data" -#+ * ID|Object.delta_location -> delta_location: float[3] "Extra translation added to the location of the object" -#+ * ID|Object.delta_rotation_euler -> delta_rotation_euler: float[3] "Extra rotation added to the rotation of the object (when using Euler rotations)" -#+ * ID|Object.delta_rotation_quaternion -> delta_rotation_quaternion: float[4] "Extra rotation added to the rotation of the object (when using Quaternion rotations)" -#+ * ID|Object.delta_scale -> delta_scale: float[3] "Extra scaling added to the scale of the object" -#+ * ID|Object.dimensions -> dimensions: float[3] "Absolute bounding box dimensions of the object" -#+ * ID|Object.draw_bounds_type -> draw_bounds_type: enum "Object boundary display type" -#ID|Object.draw_type -> draw_type: enum "Maximum draw type to display object with in viewport" -#+ * ID|Object.dupli_faces_scale -> dupli_faces_scale: float "Scale the DupliFace objects" -#+ * ID|Object.dupli_frames_end -> dupli_frames_end: int "End frame for DupliFrames" -#+ * ID|Object.dupli_frames_off -> dupli_frames_off: int "Recurring frames to exclude from the Dupliframes" -#+ * ID|Object.dupli_frames_on -> dupli_frames_on: int "Number of frames to use between DupOff frames" -#+ * ID|Object.dupli_frames_start -> dupli_frames_start: int "Start frame for DupliFrames" -#+ * ID|Object.dupli_group -> dupli_group: pointer "Instance an existing group" -#+ * ID|Object.dupli_list -> dupli_list: collection, "(read-only) Object duplis" -#+ * ID|Object.dupli_type -> dupli_type: enum "If not None, object duplication method to use" -#+ * ID|Object.empty_draw_size -> empty_draw_size: float "Size of display for empties in the viewport" -#+ * ID|Object.empty_draw_type -> empty_draw_type: enum "Viewport display style for empties" -#+ * ID|Object.field -> field: pointer, "(read-only) Settings for using the objects as a field in physics simulation" -#+ * ID|Object.game -> game: pointer, "(read-only) Game engine related settings for the object" -#+ * ID|Object.grease_pencil -> grease_pencil: pointer "Grease Pencil datablock" -#+ * ID|Object.hide -> hide: boolean "Restrict visibility in the viewport" -#+ * ID|Object.hide_render -> hide_render: boolean "Restrict renderability" -#+ * ID|Object.hide_select -> hide_select: boolean "Restrict selection in the viewport" -#ID|Object.is_duplicator -> is_duplicator: boolean, "(read-only)" -#+ * ID|Object.layers -> layers: boolean[20] "Layers the object is on" -#+ * ID|Object.location -> location: float[3] "Location of the object" -#+ * ID|Object.lock_location -> lock_location: boolean[3] "Lock editing of location in the interface" -#+ * ID|Object.lock_rotation -> lock_rotation: boolean[3] "Lock editing of rotation in the interface" -#+ * ID|Object.lock_rotation_w -> lock_rotation_w: boolean "Lock editing of angle component of four-component rotations in the interface" -#+ * ID|Object.lock_rotations_4d -> lock_rotations_4d: boolean "Lock editing of four component rotations by components (instead of as Eulers)" -#+ * ID|Object.lock_scale -> lock_scale: boolean[3] "Lock editing of scale in the interface" -#+ * ID|Object.material_slots -> material_slots: collection, "(read-only) Material slots in the object" -#+ * ID|Object.matrix_local -> matrix_local: float[16] "Parent relative transformation matrix" -#+ * ID|Object.matrix_world -> matrix_world: float[16] "Worldspace transformation matrix" -#+ * ID|Object.mode -> mode: enum, "(read-only) Object interaction mode" -#+ * ID|Object.modifiers -> modifiers: collection, "(read-only) Modifiers affecting the geometric data of the object" -#+ * ID|Object.motion_path -> motion_path: pointer, "(read-only) Motion Path for this element" -#+ * ID|Object.parent -> parent: pointer "Parent Object" -#+ * ID|Object.parent_bone -> parent_bone: string "Name of parent bone in case of a bone parenting relation" -#+ * ID|Object.parent_type -> parent_type: enum "Type of parent relation" -#+ * ID|Object.parent_vertices -> parent_vertices: int[3], "(read-only) Indices of vertices in cases of a vertex parenting relation" -#+ * ID|Object.particle_systems -> particle_systems: collection, "(read-only) Particle systems emitted from the object" -#+ * ID|Object.pass_index -> pass_index: int "Index # for the IndexOB render pass" -#+ * ID|Object.pose -> pose: pointer, "(read-only) Current pose for armatures" -#+ * ID|Object.pose_library -> pose_library: pointer, "(read-only) Action used as a pose library for armatures" -#+ * ID|Object.proxy -> proxy: pointer, "(read-only) Library object this proxy object controls" -#+ * ID|Object.proxy_group -> proxy_group: pointer, "(read-only) Library group duplicator object this proxy object controls" -#+ * ID|Object.rotation_axis_angle -> rotation_axis_angle: float[4] "Angle of Rotation for Axis-Angle rotation representation" -#+ * ID|Object.rotation_euler -> rotation_euler: float[3] "Rotation in Eulers" -#+ * ID|Object.rotation_mode -> rotation_mode: enum "NO DESCRIPTION" -#+ * ID|Object.rotation_quaternion -> rotation_quaternion: float[4] "Rotation in Quaternions" -#+ * ID|Object.scale -> scale: float[3] "Scaling of the object" -#+ * ID|Object.select -> select: boolean "Object selection state" -#ID|Object.show_axis -> show_axis: boolean "Displays the objects origin and axis" -#ID|Object.show_bounds -> show_bounds: boolean "Displays the objects bounds" -#ID|Object.show_name -> show_name: boolean "Displays the objects name" -#ID|Object.show_shape_key -> show_shape_key: boolean "Always show the current Shape for this Object" -#ID|Object.show_texture_space -> show_texture_space: boolean "Displays the objects texture space" -#ID|Object.show_transparent -> show_transparent: boolean "Enables transparent materials for the object (Mesh only)" -#ID|Object.show_wire -> show_wire: boolean "Adds the objects wireframe over solid drawing" -#ID|Object.show_x_ray -> show_x_ray: boolean "Makes the object draw in front of others" -#+ * ID|Object.soft_body -> soft_body: pointer, "(read-only) Settings for soft body simulation" -#+ * ID|Object.time_offset -> time_offset: float "Animation offset in frames for F-Curve and dupligroup instances" -#+ * ID|Object.track_axis -> track_axis: enum "Axis that points in forward direction" -#+ * ID|Object.type -> type: enum, "(read-only) Type of Object" -#+ * ID|Object.up_axis -> up_axis: enum "Axis that points in the upward direction" -#+ * ID|Object.use_dupli_faces_scale -> use_dupli_faces_scale: boolean "Scale dupli based on face size" -#+ * ID|Object.use_dupli_frames_speed -> use_dupli_frames_speed: boolean "Set dupliframes to use the frame" -#ID|Object.use_dupli_vertices_rotation -> use_dupli_vertices_rotation: boolean "Rotate dupli according to vertex normal" -#ID|Object.use_shape_key_edit_mode -> use_shape_key_edit_mode: boolean "Apply shape keys in edit mode (for Meshes only)" -#ID|Object.use_slow_parent -> use_slow_parent: boolean "Create a delay in the parent relationship" -#ID|Object.use_time_offset_add_parent -> use_time_offset_add_parent: boolean "Add the parents time offset value" -#ID|Object.use_time_offset_edit -> use_time_offset_edit: boolean "Use time offset when inserting keys and display time offset for F-Curve and action views" -#ID|Object.use_time_offset_parent -> use_time_offset_parent: boolean "Apply the time offset to this objects parent relationship" -#ID|Object.use_time_offset_particle -> use_time_offset_particle: boolean "Let the time offset work on the particle effect" -#+ * ID|Object.vertex_groups -> vertex_groups: collection, "(read-only) Vertex groups of the object" -#+ * ID|ParticleSettings.active_dupliweight -> active_dupliweight: pointer, "(read-only)" -#+ * ID|ParticleSettings.active_dupliweight_index -> active_dupliweight_index: int "NO DESCRIPTION" -#+ * ID|ParticleSettings.adaptive_angle -> adaptive_angle: int "How many degrees path has to curve to make another render segment" -#ID|ParticleSettings.adaptive_pixel -> adaptive_pixel: int "How many pixels path has to cover to make another render segment" -#+ * ID|ParticleSettings.angular_velocity_factor -> angular_velocity_factor: float "Angular velocity amount" -#+ * ID|ParticleSettings.angular_velocity_mode -> angular_velocity_mode: enum "Particle angular velocity mode" -#+ * ID|ParticleSettings.animation_data -> animation_data: pointer, "(read-only) Animation data for this datablock" -#ID|ParticleSettings.apply_effector_to_children -> apply_effector_to_children: boolean "Apply effectors to children" -#ID|ParticleSettings.apply_guide_to_children -> apply_guide_to_children: boolean "NO DESCRIPTION" -#+ * ID|ParticleSettings.billboard_align -> billboard_align: enum "In respect to what the billboards are aligned" -#+ * ID|ParticleSettings.billboard_animation -> billboard_animation: enum "How to animate billboard textures" -#+ * ID|ParticleSettings.billboard_object -> billboard_object: pointer "Billboards face this object (default is active camera)" -#+ * ID|ParticleSettings.billboard_offset -> billboard_offset: float[2] "NO DESCRIPTION" -#ID|ParticleSettings.billboard_offset_split -> billboard_offset_split: enum "How to offset billboard textures" -#+ * ID|ParticleSettings.billboard_tilt -> billboard_tilt: float "Tilt of the billboards" -#ID|ParticleSettings.billboard_tilt_random -> billboard_tilt_random: float "Random tilt of the billboards" -#+ * ID|ParticleSettings.billboard_uv_split -> billboard_uv_split: int "Amount of rows/columns to split UV coordinates for billboards" -#+ * ID|ParticleSettings.boids -> boids: pointer, "(read-only)" -#+ * ID|ParticleSettings.branch_threshold -> branch_threshold: float "Threshold of branching" -#+ * ID|ParticleSettings.brownian_factor -> brownian_factor: float "Specify the amount of Brownian motion" -#+ * ID|ParticleSettings.child_length -> child_length: float "Length of child paths" -#ID|ParticleSettings.child_length_threshold -> child_length_threshold: float "Amount of particles left untouched by child path length" -#+ * ID|ParticleSettings.child_nbr -> child_nbr: int "Amount of children/parent" -#+ * ID|ParticleSettings.child_radius -> child_radius: float "Radius of children around parent" -#+ * ID|ParticleSettings.child_roundness -> child_roundness: float "Roundness of children around parent" -#+ * ID|ParticleSettings.child_size -> child_size: float "A multiplier for the child particle size" -#ID|ParticleSettings.child_size_random -> child_size_random: float "Random variation to the size of the child particles" -#+ * ID|ParticleSettings.child_type -> child_type: enum "Create child particles" -#+ * ID|ParticleSettings.clump_factor -> clump_factor: float "Amount of clumping" -#ID|ParticleSettings.clump_shape -> clump_shape: float "Shape of clumping" -#ID|ParticleSettings.count -> count: int "Total number of particles" -#ID|ParticleSettings.damping -> damping: float "Specify the amount of damping" -#+ * ID|ParticleSettings.distribution -> distribution: enum "How to distribute particles on selected element" -#+ * ID|ParticleSettings.drag_factor -> drag_factor: float "Specify the amount of air-drag" -#ID|ParticleSettings.draw_method -> draw_method: enum "How particles are drawn in viewport" -#ID|ParticleSettings.draw_percentage -> draw_percentage: int "Percentage of particles to display in 3D view" -#+ * ID|ParticleSettings.draw_size -> draw_size: int "Size of particles on viewport in pixels (0=default)" -#+ * ID|ParticleSettings.draw_step -> draw_step: int "How many steps paths are drawn with (power of 2)" -#+ * ID|ParticleSettings.dupli_group -> dupli_group: pointer "Show Objects in this Group in place of particles" -#+ * ID|ParticleSettings.dupli_object -> dupli_object: pointer "Show this Object in place of particles" -#ID|ParticleSettings.dupli_weights -> dupli_weights: collection, "(read-only) Weights for all of the objects in the dupli group" -#+ * ID|ParticleSettings.effect_hair -> effect_hair: float "Hair stiffness for effectors" -#+ * ID|ParticleSettings.effector_weights -> effector_weights: pointer, "(read-only)" -#+ * ID|ParticleSettings.emit_from -> emit_from: enum "Where to emit particles from" -#ID|ParticleSettings.factor_random -> factor_random: float "Give the starting speed a random variation" -#+ * ID|ParticleSettings.fluid -> fluid: pointer, "(read-only)" -#+ * ID|ParticleSettings.force_field_1 -> force_field_1: pointer, "(read-only)" -#+ * ID|ParticleSettings.force_field_2 -> force_field_2: pointer, "(read-only)" -#+ * ID|ParticleSettings.frame_end -> frame_end: float "Frame # to stop emitting particles" -#+ * ID|ParticleSettings.frame_start -> frame_start: float "Frame # to start emitting particles" -#+ * ID|ParticleSettings.grid_resolution -> grid_resolution: int "The resolution of the particle grid" -#+ * ID|ParticleSettings.hair_step -> hair_step: int "Number of hair segments" -#+ * ID|ParticleSettings.integrator -> integrator: enum "Select physics integrator type" -#ID|ParticleSettings.invert_grid -> invert_grid: boolean "Invert what is considered object and what is not" -#+ * ID|ParticleSettings.jitter_factor -> jitter_factor: float "Amount of jitter applied to the sampling" -#+ * ID|ParticleSettings.keyed_loops -> keyed_loops: int "Number of times the keys are looped" -#+ * ID|ParticleSettings.keys_step -> keys_step: int "NO DESCRIPTION" -#+ * ID|ParticleSettings.kink -> kink: enum "Type of periodic offset on the path" -#+ * ID|ParticleSettings.kink_amplitude -> kink_amplitude: float "The amplitude of the offset" -#+ * ID|ParticleSettings.kink_axis -> kink_axis: enum "Which axis to use for offset" -#+ * ID|ParticleSettings.kink_frequency -> kink_frequency: float "The frequency of the offset (1/total length)" -#+ * ID|ParticleSettings.kink_shape -> kink_shape: float "Adjust the offset to the beginning/end" -#ID|ParticleSettings.length_random -> length_random: float "Give path length a random variation" -#+ * ID|ParticleSettings.lifetime -> lifetime: float "Specify the life span of the particles" -#ID|ParticleSettings.lifetime_random -> lifetime_random: float "Give the particle life a random variation" -#+ * ID|ParticleSettings.line_length_head -> line_length_head: float "Length of the lines head" -#+ * ID|ParticleSettings.line_length_tail -> line_length_tail: float "Length of the lines tail" -#ID|ParticleSettings.lock_billboard -> lock_billboard: boolean "Lock the billboards align axis" -#ID|ParticleSettings.lock_boids_to_surface -> lock_boids_to_surface: boolean "Constrain boids to a surface" -#+ * ID|ParticleSettings.mass -> mass: float "Specify the mass of the particles" -#+ * ID|ParticleSettings.material -> material: int "Specify material used for the particles" -#+ * ID|ParticleSettings.normal_factor -> normal_factor: float "Let the surface normal give the particle a starting speed" -#ID|ParticleSettings.object_align_factor -> object_align_factor: float[3] "Let the emitter object orientation give the particle a starting speed" -#+ * ID|ParticleSettings.object_factor -> object_factor: float "Let the object give the particle a starting speed" -#+ * ID|ParticleSettings.particle_factor -> particle_factor: float "Let the target particle give the particle a starting speed" -#+ * ID|ParticleSettings.particle_size -> particle_size: float "The size of the particles" -#+ * ID|ParticleSettings.path_end -> path_end: float "End time of drawn path" -#+ * ID|ParticleSettings.path_start -> path_start: float "Starting time of drawn path" -#+ * ID|ParticleSettings.phase_factor -> phase_factor: float "Initial rotation phase" -#ID|ParticleSettings.phase_factor_random -> phase_factor_random: float "Randomize rotation phase" -#+ * ID|ParticleSettings.physics_type -> physics_type: enum "Particle physics type" -#+ * ID|ParticleSettings.react_event -> react_event: enum "The event of target particles to react on" -#+ * ID|ParticleSettings.reaction_shape -> reaction_shape: float "Power of reaction strength dependence on distance to target" -#+ * ID|ParticleSettings.reactor_factor -> reactor_factor: float "Let the vector away from the target particles location give the particle a starting speed" -#+ * ID|ParticleSettings.render_step -> render_step: int "How many steps paths are rendered with (power of 2)" -#ID|ParticleSettings.render_type -> render_type: enum "How particles are rendered" -#ID|ParticleSettings.rendered_child_count -> rendered_child_count: int "Amount of children/parent for rendering" -#ID|ParticleSettings.rotation_factor_random -> rotation_factor_random: float "Randomize rotation" -#+ * ID|ParticleSettings.rotation_mode -> rotation_mode: enum "Particles initial rotation" -#ID|ParticleSettings.roughness_1 -> roughness_1: float "Amount of location dependent rough" -#ID|ParticleSettings.roughness_1_size -> roughness_1_size: float "Size of location dependent rough" -#ID|ParticleSettings.roughness_2 -> roughness_2: float "Amount of random rough" -#ID|ParticleSettings.roughness_2_size -> roughness_2_size: float "Size of random rough" -#ID|ParticleSettings.roughness_2_threshold -> roughness_2_threshold: float "Amount of particles left untouched by random rough" -#ID|ParticleSettings.roughness_end_shape -> roughness_end_shape: float "Shape of end point rough" -#ID|ParticleSettings.roughness_endpoint -> roughness_endpoint: float "Amount of end point rough" -#ID|ParticleSettings.show_health -> show_health: boolean "Draw boid health" -#ID|ParticleSettings.show_material_color -> show_material_color: boolean "Draw particles using materials diffuse color" -#ID|ParticleSettings.show_number -> show_number: boolean "Show particle number" -#+ * ID|ParticleSettings.show_size -> show_size: boolean "Show particle size" -#ID|ParticleSettings.show_unborn -> show_unborn: boolean "Show particles before they are emitted" -#ID|ParticleSettings.show_velocity -> show_velocity: boolean "Show particle velocity" -#+ * ID|ParticleSettings.simplify_rate -> simplify_rate: float "Speed of simplification" -#+ * ID|ParticleSettings.simplify_refsize -> simplify_refsize: int "Reference size in pixels, after which simplification begins" -#+ * ID|ParticleSettings.simplify_transition -> simplify_transition: float "Transition period for fading out strands" -#+ * ID|ParticleSettings.simplify_viewport -> simplify_viewport: float "Speed of Simplification" -#ID|ParticleSettings.size_random -> size_random: float "Give the particle size a random variation" -#+ * ID|ParticleSettings.subframes -> subframes: int "Subframes to simulate for improved stability and finer granularity simulations" -#+ * ID|ParticleSettings.tangent_factor -> tangent_factor: float "Let the surface tangent give the particle a starting speed" -#+ * ID|ParticleSettings.tangent_phase -> tangent_phase: float "Rotate the surface tangent" -#+ * ID|ParticleSettings.time_tweak -> time_tweak: float "A multiplier for physics timestep (1.0 means one frame = 1/25 seconds)" -#+ * ID|ParticleSettings.trail_count -> trail_count: int "Number of trail particles" -#+ * ID|ParticleSettings.type -> type: enum "NO DESCRIPTION" -#ID|ParticleSettings.use_absolute_path_time -> use_absolute_path_time: boolean "Path timing is in absolute frames" -#ID|ParticleSettings.use_animate_branching -> use_animate_branching: boolean "Animate branching" -#ID|ParticleSettings.use_branching -> use_branching: boolean "Branch child paths from each other" -#ID|ParticleSettings.use_dead -> use_dead: boolean "Show particles after they have died" -#ID|ParticleSettings.use_die_on_collision -> use_die_on_collision: boolean "Particles die when they collide with a deflector object" -#ID|ParticleSettings.use_dynamic_rotation -> use_dynamic_rotation: boolean "Sets rotation to dynamic/constant" -#ID|ParticleSettings.use_emit_random -> use_emit_random: boolean "Emit in random order of elements" -#ID|ParticleSettings.use_even_distribution -> use_even_distribution: boolean "Use even distribution from faces based on face areas or edge lengths" -#+ * ID|ParticleSettings.use_global_dupli -> use_global_dupli: boolean "Use objects global coordinates for duplication" -#+ * ID|ParticleSettings.use_group_count -> use_group_count: boolean "Use object multiple times in the same group" -#ID|ParticleSettings.use_group_pick_random -> use_group_pick_random: boolean "Pick objects from group randomly" -#ID|ParticleSettings.use_hair_bspline -> use_hair_bspline: boolean "Interpolate hair using B-Splines" -#ID|ParticleSettings.use_multiply_size_mass -> use_multiply_size_mass: boolean "Multiply mass by particle size" -#ID|ParticleSettings.use_parent_particles -> use_parent_particles: boolean "Render parent particles" -#ID|ParticleSettings.use_react_multiple -> use_react_multiple: boolean "React multiple times" -#ID|ParticleSettings.use_react_start_end -> use_react_start_end: boolean "Give birth to unreacted particles eventually" -#ID|ParticleSettings.use_render_adaptive -> use_render_adaptive: boolean "Draw steps of the particle path" -#ID|ParticleSettings.use_render_emitter -> use_render_emitter: boolean "Render emitter Object also" -#ID|ParticleSettings.use_self_effect -> use_self_effect: boolean "Particle effectors effect themselves" -#ID|ParticleSettings.use_simplify -> use_simplify: boolean "Remove child strands as the object becomes smaller on the screen" -#ID|ParticleSettings.use_simplify_viewport -> use_simplify_viewport: boolean "NO DESCRIPTION" -#ID|ParticleSettings.use_size_deflect -> use_size_deflect: boolean "Use particles size in deflection" -#ID|ParticleSettings.use_strand_primitive -> use_strand_primitive: boolean "Use the strand primitive for rendering" -#ID|ParticleSettings.use_symmetric_branching -> use_symmetric_branching: boolean "Start and end points are the same" -#ID|ParticleSettings.use_velocity_length -> use_velocity_length: boolean "Multiply line length by particle speed" -#ID|ParticleSettings.use_whole_group -> use_whole_group: boolean "Use whole group at once" -#+ * ID|ParticleSettings.userjit -> userjit: int "Emission locations / face (0 = automatic)" -#+ * ID|ParticleSettings.virtual_parents -> virtual_parents: float "Relative amount of virtual parents" -#+ * ID|Scene.active_keying_set_index -> active_keying_set_index: int "Current Keying Set index (negative for builtin and positive for absolute)" -#+ * ID|Scene.animation_data -> animation_data: pointer, "(read-only) Animation data for this datablock" -#ID|Scene.audio_distance_model -> audio_distance_model: enum "Distance model for distance attenuation calculation" -#ID|Scene.audio_doppler_factor -> audio_doppler_factor: float "Pitch factor for Doppler effect calculation" -#ID|Scene.audio_doppler_speed -> audio_doppler_speed: float "Speed of sound for Doppler effect calculation" -#ID|Scene.background_set -> background_set: pointer "Background set scene" -#+ * ID|Scene.camera -> camera: pointer "Active camera used for rendering the scene" -#+ * ID|Scene.cursor_location -> cursor_location: float[3] "3D cursor location" -#+ * ID|Scene.frame_current -> frame_current: int "NO DESCRIPTION" -#+ * ID|Scene.frame_end -> frame_end: int "Final frame of the playback/rendering range" -#ID|Scene.frame_preview_end -> frame_preview_end: int "Alternative end frame for UI playback" -#ID|Scene.frame_preview_start -> frame_preview_start: int "Alternative start frame for UI playback" -#+ * ID|Scene.frame_start -> frame_start: int "First frame of the playback/rendering range" -#+ * ID|Scene.frame_step -> frame_step: int "Number of frames to skip forward while rendering/playing back each frame" -#ID|Scene.game_settings -> game_settings: pointer, "(read-only)" -#+ * ID|Scene.gravity -> gravity: float[3] "Constant acceleration in a given direction" -#+ * ID|Scene.grease_pencil -> grease_pencil: pointer "Grease Pencil datablock" -#ID|Scene.is_nla_tweakmode -> is_nla_tweakmode: boolean, "(read-only) Indicates whether there is any action referenced by NLA being edited. Strictly read-only" -#+ * ID|Scene.keying_sets -> keying_sets: collection, "(read-only) Absolute Keying Sets for this Scene" -#ID|Scene.keying_sets_all -> keying_sets_all: collection, "(read-only) All Keying Sets available for use (builtins and Absolute Keying Sets for this Scene)" -#+ * ID|Scene.layers -> layers: boolean[20] "Layers visible when rendering the scene" -#+ * ID|Scene.network_render -> network_render: pointer, "(read-only) Network Render Settings" -#+ * ID|Scene.nodetree -> nodetree: pointer, "(read-only) Compositing node tree" -#ID|Scene.object_bases -> object_bases: collection, "(read-only)" -#+ * ID|Scene.objects -> objects: collection, "(read-only)" -#+ * ID|Scene.orientations -> orientations: collection, "(read-only)" -#+ * ID|Scene.pose_templates -> pose_templates: pointer, "(read-only) Pose Template Settings" -#+ * ID|Scene.render -> render: pointer, "(read-only)" -#+ * ID|Scene.sequence_editor -> sequence_editor: pointer, "(read-only)" -#+ * ID|Scene.sync_mode -> sync_mode: enum "How to sync playback" -#+ * ID|Scene.timeline_markers -> timeline_markers: collection, "(read-only) Markers used in all timelines for the current scene" -#+ * ID|Scene.tool_settings -> tool_settings: pointer, "(read-only)" -#+ * ID|Scene.unit_settings -> unit_settings: pointer, "(read-only) Unit editing settings" -#ID|Scene.use_audio -> use_audio: boolean "Play back of audio from Sequence Editor will be muted" -#ID|Scene.use_audio_scrub -> use_audio_scrub: boolean "Play audio from Sequence Editor while scrubbing" -#ID|Scene.use_audio_sync -> use_audio_sync: boolean "Play back and sync with audio clock, dropping frames if frame display is too slow" -#ID|Scene.use_frame_drop -> use_frame_drop: boolean "Play back dropping frames if frame display is too slow" -#+ * ID|Scene.use_gravity -> use_gravity: boolean "Use global gravity for all dynamics" -#+ * ID|Scene.use_nodes -> use_nodes: boolean "Enable the compositing node tree" -#+ * ID|Scene.use_preview_range -> use_preview_range: boolean "Use an alternative start/end frame for UI playback, rather than the scene start/end frame" -#ID|Scene.use_stamp_note -> use_stamp_note: string "User define note for the render stamping" -#+ * ID|Scene.world -> world: pointer "World used for rendering the scene" -#+ * ID|Screen.areas -> areas: collection, "(read-only) Areas the screen is subdivided into" -#ID|Screen.is_animation_playing -> is_animation_playing: boolean, "(read-only) Animation playback is active" -#+ * ID|Screen.scene -> scene: pointer "Active scene to be edited in the screen" -#ID|Screen.show_fullscreen -> show_fullscreen: boolean, "(read-only) An area is maximised, filling this screen" -#+ * ID|Sound.filepath -> filepath: string "Sound sample file used by this Sound datablock" -#+ * ID|Sound.packed_file -> packed_file: pointer, "(read-only)" -#ID|Sound.use_memory_cache -> use_memory_cache: boolean "The sound file is decoded and loaded into RAM" -#+ * ID|Text.current_character -> current_character: int, "(read-only) Index of current character in current line, and also start index of character in selection if one exists" -#+ * ID|Text.current_line -> current_line: pointer, "(read-only) Current line, and start line of selection if one exists" -#+ * ID|Text.filepath -> filepath: string "Filename of the text file" -#ID|Text.is_dirty -> is_dirty: boolean, "(read-only) Text file has been edited since last save" -#ID|Text.is_in_memory -> is_in_memory: boolean, "(read-only) Text file is in memory, without a corresponding file on disk" -#ID|Text.is_modified -> is_modified: boolean, "(read-only) Text file on disk is different than the one in memory" -#+ * ID|Text.lines -> lines: collection, "(read-only) Lines of text" -#+ * ID|Text.markers -> markers: collection, "(read-only) Text markers highlighting part of the text" -#ID|Text.select_end_character -> select_end_character: int, "(read-only) Index of character after end of selection in the selection end line" -#ID|Text.select_end_line -> select_end_line: pointer, "(read-only) End line of selection" -#+ * ID|Text.use_module -> use_module: boolean "Register this text as a module on loading, Text name must end with .py" -#ID|Text.use_tabs_as_spaces -> use_tabs_as_spaces: boolean "Automatically converts all new tabs into spaces" -#+ * ID|Texture.animation_data -> animation_data: pointer, "(read-only) Animation data for this datablock" -#+ * ID|Texture.color_ramp -> color_ramp: pointer, "(read-only)" -#+ * ID|Texture.contrast -> contrast: float "NO DESCRIPTION" -#+TODO MAKE COLOR * ID|Texture.factor_blue -> factor_blue: float "NO DESCRIPTION" -#+TODO MAKE COLOR * ID|Texture.factor_green -> factor_green: float "NO DESCRIPTION" -#+TODO MAKE COLOR * ID|Texture.factor_red -> factor_red: float "NO DESCRIPTION" -#ID|Texture.intensity -> intensity: float "NO DESCRIPTION" -#+ * ID|Texture.node_tree -> node_tree: pointer, "(read-only) Node tree for node-based textures" -#+ * ID|Texture.saturation -> saturation: float "NO DESCRIPTION" -#+ * ID|Texture.type -> type: enum "NO DESCRIPTION" -#+ * ID|Texture.use_color_ramp -> use_color_ramp: boolean "Toggle color ramp operations" -#+ * ID|Texture.use_nodes -> use_nodes: boolean "Make this a node-based texture" -#+ * ID|Texture.use_preview_alpha -> use_preview_alpha: boolean "Show Alpha in Preview Render" -#+ * ID|Texture|BlendTexture.progression -> progression: enum "Sets the style of the color blending" -#ID|Texture|BlendTexture.use_flip_axis -> use_flip_axis: enum "Flips the textures X and Y axis" -#ID|Texture|CloudsTexture.cloud_type -> cloud_type: enum "NO DESCRIPTION" -#+ * ID|Texture|CloudsTexture.nabla -> nabla: float "Size of derivative offset used for calculating normal" -#+ * ID|Texture|CloudsTexture.noise_basis -> noise_basis: enum "Sets the noise basis used for turbulence" -#+ * ID|Texture|CloudsTexture.noise_depth -> noise_depth: int "Sets the depth of the cloud calculation" -#ID|Texture|CloudsTexture.noise_scale -> noise_scale: float "Sets scaling for noise input" -#+ * ID|Texture|CloudsTexture.noise_type -> noise_type: enum "NO DESCRIPTION" -#+ * ID|Texture|DistortedNoiseTexture.distortion -> distortion: float "NO DESCRIPTION" -#+ * ID|Texture|DistortedNoiseTexture.nabla -> nabla: float "Size of derivative offset used for calculating normal" -#+ * ID|Texture|DistortedNoiseTexture.noise_basis -> noise_basis: enum "Sets the noise basis used for turbulence" -#+ * ID|Texture|DistortedNoiseTexture.noise_distortion -> noise_distortion: enum "Sets the noise basis for the distortion" -#ID|Texture|DistortedNoiseTexture.noise_scale -> noise_scale: float "Sets scaling for noise input" -#+ * ID|Texture|EnvironmentMapTexture.environment_map -> environment_map: pointer, "(read-only) Gets the environment map associated with this texture" -#+ * ID|Texture|EnvironmentMapTexture.filter_eccentricity -> filter_eccentricity: int "Maximum eccentricity. Higher gives less blur at distant/oblique angles, but is also slower" -#+ * ID|Texture|EnvironmentMapTexture.filter_probes -> filter_probes: int "Maximum number of samples. Higher gives less blur at distant/oblique angles, but is also slower" -#+ * ID|Texture|EnvironmentMapTexture.filter_size -> filter_size: float "Multiplies the filter size used by MIP Map and Interpolation" -#ID|Texture|EnvironmentMapTexture.filter_type -> filter_type: enum "Texture filter to use for sampling image" -#+ * ID|Texture|EnvironmentMapTexture.image -> image: pointer "Source image file to read the environment map from" -#+ * ID|Texture|EnvironmentMapTexture.image_user -> image_user: pointer, "(read-only) Parameters defining which layer, pass and frame of the image is displayed" -#ID|Texture|EnvironmentMapTexture.use_filter_size_min -> use_filter_size_min: boolean "Use Filter Size as a minimal filter value in pixels" -#ID|Texture|EnvironmentMapTexture.use_mipmap -> use_mipmap: boolean "Uses auto-generated MIP maps for the image" -#ID|Texture|EnvironmentMapTexture.use_mipmap_gauss -> use_mipmap_gauss: boolean "Uses Gauss filter to sample down MIP maps" -#+ * ID|Texture|ImageTexture.checker_distance -> checker_distance: float "Sets distance between checker tiles" -#+ * ID|Texture|ImageTexture.crop_max_x -> crop_max_x: float "Sets maximum X value to crop the image" -#+ * ID|Texture|ImageTexture.crop_max_y -> crop_max_y: float "Sets maximum Y value to crop the image" -#+ * ID|Texture|ImageTexture.crop_min_x -> crop_min_x: float "Sets minimum X value to crop the image" -#+ * ID|Texture|ImageTexture.crop_min_y -> crop_min_y: float "Sets minimum Y value to crop the image" -#+ * ID|Texture|ImageTexture.extension -> extension: enum "Sets how the image is extrapolated past its original bounds" -#+ * ID|Texture|ImageTexture.filter_eccentricity -> filter_eccentricity: int "Maximum eccentricity. Higher gives less blur at distant/oblique angles, but is also slower" -#+ * ID|Texture|ImageTexture.filter_probes -> filter_probes: int "Maximum number of samples. Higher gives less blur at distant/oblique angles, but is also slower" -#+ * ID|Texture|ImageTexture.filter_size -> filter_size: float "Multiplies the filter size used by MIP Map and Interpolation" -#ID|Texture|ImageTexture.filter_type -> filter_type: enum "Texture filter to use for sampling image" -#+ * ID|Texture|ImageTexture.image -> image: pointer "NO DESCRIPTION" -#+ * ID|Texture|ImageTexture.image_user -> image_user: pointer, "(read-only) Parameters defining which layer, pass and frame of the image is displayed" -#+ * ID|Texture|ImageTexture.invert_alpha -> invert_alpha: boolean "Inverts all the alpha values in the image" -#+ * ID|Texture|ImageTexture.normal_space -> normal_space: enum "Sets space of normal map image" -#+ * ID|Texture|ImageTexture.repeat_x -> repeat_x: int "Sets a repetition multiplier in the X direction" -#+ * ID|Texture|ImageTexture.repeat_y -> repeat_y: int "Sets a repetition multiplier in the Y direction" -#+ * ID|Texture|ImageTexture.use_alpha -> use_alpha: boolean "Uses the alpha channel information in the image" -#ID|Texture|ImageTexture.use_calculate_alpha -> use_calculate_alpha: boolean "Calculates an alpha channel based on RGB values in the image" -#ID|Texture|ImageTexture.use_checker_even -> use_checker_even: boolean "Sets even checker tiles" -#ID|Texture|ImageTexture.use_checker_odd -> use_checker_odd: boolean "Sets odd checker tiles" -#ID|Texture|ImageTexture.use_filter_size_min -> use_filter_size_min: boolean "Use Filter Size as a minimal filter value in pixels" -#ID|Texture|ImageTexture.use_flip_axis -> use_flip_axis: boolean "Flips the textures X and Y axis" -#ID|Texture|ImageTexture.use_interpolation -> use_interpolation: boolean "Interpolates pixels using Area filter" -#ID|Texture|ImageTexture.use_mipmap -> use_mipmap: boolean "Uses auto-generated MIP maps for the image" -#ID|Texture|ImageTexture.use_mipmap_gauss -> use_mipmap_gauss: boolean "Uses Gauss filter to sample down MIP maps" -#ID|Texture|ImageTexture.use_mirror_x -> use_mirror_x: boolean "Mirrors the image repetition on the X direction" -#ID|Texture|ImageTexture.use_mirror_y -> use_mirror_y: boolean "Mirrors the image repetition on the Y direction" -#ID|Texture|ImageTexture.use_normal_map -> use_normal_map: boolean "Uses image RGB values for normal mapping" -#+ * ID|Texture|MagicTexture.noise_depth -> noise_depth: int "Sets the depth of the cloud calculation" -#+ * ID|Texture|MagicTexture.turbulence -> turbulence: float "Sets the turbulence of the bandnoise and ringnoise types" -#ID|Texture|MarbleTexture.marble_type -> marble_type: enum "NO DESCRIPTION" -#+ * ID|Texture|MarbleTexture.nabla -> nabla: float "Size of derivative offset used for calculating normal" -#+ * ID|Texture|MarbleTexture.noise_basis -> noise_basis: enum "Sets the noise basis used for turbulence" -#+ * ID|Texture|MarbleTexture.noise_depth -> noise_depth: int "Sets the depth of the cloud calculation" -#ID|Texture|MarbleTexture.noise_scale -> noise_scale: float "Sets scaling for noise input" -#+ * ID|Texture|MarbleTexture.noise_type -> noise_type: enum "NO DESCRIPTION" -#ID|Texture|MarbleTexture.noisebasis_2 -> noisebasis_2: enum "NO DESCRIPTION" -#+ * ID|Texture|MarbleTexture.turbulence -> turbulence: float "Sets the turbulence of the bandnoise and ringnoise types" -#ID|Texture|MusgraveTexture.dimension_max -> dimension_max: float "Highest fractal dimension" -#+ * ID|Texture|MusgraveTexture.gain -> gain: float "The gain multiplier" -#+ * ID|Texture|MusgraveTexture.lacunarity -> lacunarity: float "Gap between successive frequencies" -#+ * ID|Texture|MusgraveTexture.musgrave_type -> musgrave_type: enum "NO DESCRIPTION" -#+ * ID|Texture|MusgraveTexture.nabla -> nabla: float "Size of derivative offset used for calculating normal" -#+ * ID|Texture|MusgraveTexture.noise_basis -> noise_basis: enum "Sets the noise basis used for turbulence" -#+ * ID|Texture|MusgraveTexture.noise_intensity -> noise_intensity: float "NO DESCRIPTION" -#ID|Texture|MusgraveTexture.noise_scale -> noise_scale: float "Sets scaling for noise input" -#+ * ID|Texture|MusgraveTexture.octaves -> octaves: float "Number of frequencies used" -#+ * ID|Texture|MusgraveTexture.offset -> offset: float "The fractal offset" -#ID|Texture|PointDensityTexture.point_density -> point_density: pointer, "(read-only) The point density settings associated with this texture" -#+ * ID|Texture|StucciTexture.noise_basis -> noise_basis: enum "Sets the noise basis used for turbulence" -#ID|Texture|StucciTexture.noise_scale -> noise_scale: float "Sets scaling for noise input" -#+ * ID|Texture|StucciTexture.noise_type -> noise_type: enum "NO DESCRIPTION" -#ID|Texture|StucciTexture.stucci_type -> stucci_type: enum "NO DESCRIPTION" -#+ * ID|Texture|StucciTexture.turbulence -> turbulence: float "Sets the turbulence of the bandnoise and ringnoise types" -#ID|Texture|VoronoiTexture.color_mode -> color_mode: enum "NO DESCRIPTION" -#+ * ID|Texture|VoronoiTexture.distance_metric -> distance_metric: enum "NO DESCRIPTION" -#+ * ID|Texture|VoronoiTexture.minkovsky_exponent -> minkovsky_exponent: float "Minkovsky exponent" -#+ * ID|Texture|VoronoiTexture.nabla -> nabla: float "Size of derivative offset used for calculating normal" -#+ * ID|Texture|VoronoiTexture.noise_intensity -> noise_intensity: float "NO DESCRIPTION" -#ID|Texture|VoronoiTexture.noise_scale -> noise_scale: float "Sets scaling for noise input" -#+ * ID|Texture|VoronoiTexture.weight_1 -> weight_1: float "Voronoi feature weight 1" -#+ * ID|Texture|VoronoiTexture.weight_2 -> weight_2: float "Voronoi feature weight 2" -#+ * ID|Texture|VoronoiTexture.weight_3 -> weight_3: float "Voronoi feature weight 3" -#+ * ID|Texture|VoronoiTexture.weight_4 -> weight_4: float "Voronoi feature weight 4" -#+ * ID|Texture|VoxelDataTexture.image -> image: pointer "NO DESCRIPTION" -#+ * ID|Texture|VoxelDataTexture.image_user -> image_user: pointer, "(read-only) Parameters defining which layer, pass and frame of the image is displayed" -#ID|Texture|VoxelDataTexture.voxel_data -> voxel_data: pointer, "(read-only) The voxel data associated with this texture" -#+ * ID|Texture|WoodTexture.nabla -> nabla: float "Size of derivative offset used for calculating normal" -#+ * ID|Texture|WoodTexture.noise_basis -> noise_basis: enum "Sets the noise basis used for turbulence" -#ID|Texture|WoodTexture.noise_scale -> noise_scale: float "Sets scaling for noise input" -#+ * ID|Texture|WoodTexture.noise_type -> noise_type: enum "NO DESCRIPTION" -#ID|Texture|WoodTexture.noisebasis_2 -> noisebasis_2: enum "NO DESCRIPTION" -#+ * ID|Texture|WoodTexture.turbulence -> turbulence: float "Sets the turbulence of the bandnoise and ringnoise types" -#ID|Texture|WoodTexture.wood_type -> wood_type: enum "NO DESCRIPTION" -#+ * ID|VectorFont.filepath -> filepath: string, "(read-only)" -#+ * ID|VectorFont.packed_file -> packed_file: pointer, "(read-only)" -#+ * ID|WindowManager.keyconfigs -> keyconfigs: collection, "(read-only) Registered key configurations" -#+ * ID|WindowManager.operators -> operators: collection, "(read-only) Operator registry" -#+ * ID|WindowManager.windows -> windows: collection, "(read-only) Open windows" -#+ * ID|World.active_texture -> active_texture: pointer "Active texture slot being displayed" -#+ * ID|World.active_texture_index -> active_texture_index: int "Index of active texture slot" -#+ * ID|World.ambient_color -> ambient_color: float[3] "NO DESCRIPTION" -#+ * ID|World.animation_data -> animation_data: pointer, "(read-only) Animation data for this datablock" -#ID|World.color_range -> color_range: float "The color range that will be mapped to 0-1" -#+ * ID|World.exposure -> exposure: float "Amount of exponential color correction for light" -#+ * ID|World.horizon_color -> horizon_color: float[3] "Color at the horizon" -#ID|World.light_settings -> light_settings: pointer, "(read-only) World lighting settings" -#ID|World.mist_settings -> mist_settings: pointer, "(read-only) World mist settings" -#ID|World.star_settings -> star_settings: pointer, "(read-only) World stars settings" -#+ * ID|World.texture_slots -> texture_slots: collection, "(read-only) Texture slots defining the mapping and influence of textures" -#ID|World.use_sky_blend -> use_sky_blend: boolean "Render background with natural progression from horizon to zenith" -#ID|World.use_sky_paper -> use_sky_paper: boolean "Flatten blend or texture coordinates" -#ID|World.use_sky_real -> use_sky_real: boolean "Render background with a real horizon, relative to the camera angle" -#+ * ID|World.zenith_color -> zenith_color: float[3] "Color at the zenith" -#+ * IKParam.ik_solver -> ik_solver: enum, "(read-only) IK solver for which these parameters are defined, 0 for Legacy, 1 for iTaSC" -#IKParam|Itasc.damping_epsilon -> damping_epsilon: float "Singular value under which damping is progressively applied. Higher values=more stability, less reactivity. Default=0.1" -#IKParam|Itasc.damping_max -> damping_max: float "Maximum damping coefficient when singular value is nearly 0. Higher values=more stability, less reactivity. Default=0.5" -#+ * IKParam|Itasc.feedback -> feedback: float "Feedback coefficient for error correction. Average response time=1/feedback. Default=20" -#IKParam|Itasc.iterations -> iterations: int "Maximum number of iterations for convergence in case of reiteration" -#+ * IKParam|Itasc.mode -> mode: enum "NO DESCRIPTION" -#+ * IKParam|Itasc.precision -> precision: float "Precision of convergence in case of reiteration" -#IKParam|Itasc.reiteration_method -> reiteration_method: enum "Defines if the solver is allowed to reiterate (converges until precision is met) on none, first or all frames" -#+ * IKParam|Itasc.solver -> solver: enum "Solving method selection: Automatic damping or manual damping" -#IKParam|Itasc.step_count -> step_count: int "Divides the frame interval into this many steps" -#IKParam|Itasc.step_max -> step_max: float "Higher bound for timestep in second in case of automatic substeps" -#IKParam|Itasc.step_min -> step_min: float "Lower bound for timestep in second in case of automatic substeps" -#IKParam|Itasc.use_auto_step -> use_auto_step: boolean "Automatically determine the optimal number of steps for best performance/accuracy trade off" -#IKParam|Itasc.velocity_max -> velocity_max: float "Maximum joint velocity in rad/s. Default=50" -#+ * ImageUser.fields_per_frame -> fields_per_frame: int "The number of fields per rendered frame (2 fields is 1 image)" -#ImageUser.frame_duration -> frame_duration: int "Sets the number of images of a movie to use" -#ImageUser.frame_offset -> frame_offset: int "Offsets the number of the frame to use in the animation" -#+ * ImageUser.frame_start -> frame_start: int "Sets the global starting frame of the movie" -#+ * ImageUser.multilayer_layer -> multilayer_layer: int, "(read-only) Layer in multilayer image" -#+ * ImageUser.multilayer_pass -> multilayer_pass: int, "(read-only) Pass in multilayer image" -#ImageUser.use_auto_refresh -> use_auto_refresh: boolean "Always refresh image on frame changes" -#ImageUser.use_cyclic -> use_cyclic: boolean "Cycle the images in the movie" -#KeyConfig.is_user_defined -> is_user_defined: boolean, "(read-only) Indicates that a keyconfig was defined by the user" -#+ * KeyConfig.keymaps -> keymaps: collection, "(read-only) Key maps configured as part of this configuration" -#+ * KeyConfig.name -> name: string "Name of the key configuration" -#KeyConfigurations.active -> active: pointer "Active wm KeyConfig" -#KeyConfigurations.default -> default: pointer, "(read-only)" -#KeyMap.is_modal -> is_modal: boolean, "(read-only) Indicates that a keymap is used for translate modal events for an operator" -#KeyMap.is_user_defined -> is_user_defined: boolean "Keymap is defined by the user" -#+ * KeyMap.items -> items: collection, "(read-only) Items in the keymap, linking an operator to an input event" -#+ * KeyMap.name -> name: string, "(read-only) Name of the key map" -#+ * KeyMap.region_type -> region_type: enum, "(read-only) Optional region type keymap is associated with" -#KeyMap.show_expanded_children -> show_expanded_children: boolean "Children expanded in the user interface" -#KeyMap.show_expanded_items -> show_expanded_items: boolean "Expanded in the user interface" -#+ * KeyMap.space_type -> space_type: enum, "(read-only) Optional space type keymap is associated with" -#TODO MOVE TO COLLECTION * KeyMapItem.active -> active: boolean "Activate or deactivate item" -#+ * KeyMapItem.id -> id: int, "(read-only) ID of the item" -#+ * KeyMapItem.idname -> idname: string "Identifier of operator to call on input event" -#+ * KeyMapItem.key_modifier -> key_modifier: enum "Regular key pressed as a modifier" -#+ * KeyMapItem.map_type -> map_type: enum "Type of event mapping" -#+ * KeyMapItem.name -> name: string, "(read-only) Name of operator to call on input event" - + * KeyMapItem.alt -> pressed_alt: boolean "Alt key pressed" - + * KeyMapItem.any -> pressed_any: boolean "Any modifier keys pressed" - + * KeyMapItem.ctrl -> pressed_ctrl: boolean "Control key pressed" - + * KeyMapItem.oskey -> pressed_oskey: boolean "Operating system key pressed" - + * KeyMapItem.shift -> pressed_shift: boolean "Shift key pressed" -#+ * KeyMapItem.properties -> properties: pointer, "(read-only) Properties to set when the operator is called" -#TODO * KeyMapItem.propvalue -> propvalue: enum "The value this event translates to in a modal keymap" -#KeyMapItem.show_expanded -> show_expanded: boolean "Show key map event and property details in the user interface" -#+ * KeyMapItem.type -> type: enum "Type of event" -#+ * KeyMapItem.value -> value: enum "NO DESCRIPTION" -#+ * Keyframe.co -> co: float[2] "Coordinates of the control point" -#Keyframe.handle_left -> handle_left: float[2] "Coordinates of the first handle" -#Keyframe.handle_left_type -> handle_left_type: enum "Handle types" -#Keyframe.handle_right -> handle_right: float[2] "Coordinates of the second handle" -#Keyframe.handle_right_type -> handle_right_type: enum "Handle types" -#+ * Keyframe.interpolation -> interpolation: enum "Interpolation method to use for segment of the curve from this Keyframe until the next Keyframe" -#+ * Keyframe.select_control_point -> select_control_point: boolean "Control point selection status" -#+ * Keyframe.select_left_handle -> select_left_handle: boolean "Handle 1 selection status" -#+ * Keyframe.select_right_handle -> select_right_handle: boolean "Handle 2 selection status" -#+ * Keyframe.type -> type: enum "The type of keyframe" -#+ * KeyingSet.active_path_index -> active_path_index: int "Current Keying Set index" -#KeyingSet.is_path_absolute -> is_path_absolute: boolean, "(read-only) Keying Set defines specific paths/settings to be keyframed (i.e. is not reliant on context info)" -#+ * KeyingSet.name -> name: string "NO DESCRIPTION" -#+ * KeyingSet.paths -> paths: collection, "(read-only) Keying Set Paths to define settings that get keyframed together" -#+ * KeyingSet.type_info -> type_info: pointer, "(read-only) Callback function defines for built-in Keying Sets" -#KeyingSet.use_insertkey_needed -> use_insertkey_needed: boolean "Only insert keyframes where theyre needed in the relevant F-Curves" -#KeyingSet.use_insertkey_visual -> use_insertkey_visual: boolean "Insert keyframes based on visual transforms" -#KeyingSet.use_insertkey_xyz_to_rgb -> use_insertkey_xyz_to_rgb: boolean "Color for newly added transformation F-Curves (Location, Rotation, Scale) and also Color is based on the transform axis" -#+ * KeyingSetInfo.bl_idname -> bl_idname: string "NO DESCRIPTION" -#+ * KeyingSetInfo.bl_label -> bl_label: string "NO DESCRIPTION" -#KeyingSetInfo.use_insertkey_needed -> use_insertkey_needed: boolean "Only insert keyframes where theyre needed in the relevant F-Curves" -#KeyingSetInfo.use_insertkey_visual -> use_insertkey_visual: boolean "Insert keyframes based on visual transforms" -#KeyingSetInfo.use_insertkey_xyz_to_rgb -> use_insertkey_xyz_to_rgb: boolean "Color for newly added transformation F-Curves (Location, Rotation, Scale) and also Color is based on the transform axis" -#+ * KeyingSetPath.array_index -> array_index: int "Index to the specific setting if applicable" -#+ * KeyingSetPath.data_path -> data_path: string "Path to property setting" -#+ * KeyingSetPath.group -> group: string "Name of Action Group to assign setting(s) for this path to" -#KeyingSetPath.group_method -> group_method: enum "Method used to define which Group-name to use" -#+ * KeyingSetPath.id -> id: pointer "ID-Block that keyframes for Keying Set should be added to (for Absolute Keying Sets only)" -#+ * KeyingSetPath.id_type -> id_type: enum "Type of ID-block that can be used" -#KeyingSetPath.use_entire_array -> use_entire_array: boolean "When an array/vector type is chosen (Location, Rotation, Color, etc.), entire array is to be used" -#KeyingSetPath.use_insertkey_needed -> use_insertkey_needed: boolean "Only insert keyframes where theyre needed in the relevant F-Curves" -#KeyingSetPath.use_insertkey_visual -> use_insertkey_visual: boolean "Insert keyframes based on visual transforms" -#KeyingSetPath.use_insertkey_xyz_to_rgb -> use_insertkey_xyz_to_rgb: boolean "Color for newly added transformation F-Curves (Location, Rotation, Scale) and also Color is based on the transform axis" -#KeyingSetPaths.active -> active: pointer "Active Keying Set used to insert/delete keyframes" -#KeyingSets.active -> active: pointer "Active Keying Set used to insert/delete keyframes" -#+ * LampSkySettings.atmosphere_distance_factor -> atmosphere_distance_factor: float "Multiplier to convert blender units to physical distance" -#+ * LampSkySettings.atmosphere_extinction -> atmosphere_extinction: float "Extinction scattering contribution factor" -#+ * LampSkySettings.atmosphere_inscattering -> atmosphere_inscattering: float "Scatter contribution factor" -#+ * LampSkySettings.atmosphere_turbidity -> atmosphere_turbidity: float "Sky turbidity" -#+ * LampSkySettings.backscattered_light -> backscattered_light: float "Backscattered light" -#+ * LampSkySettings.horizon_brightness -> horizon_brightness: float "Horizon brightness" -#+ * LampSkySettings.sky_blend -> sky_blend: float "Blend factor with sky" -#+ * LampSkySettings.sky_blend_type -> sky_blend_type: enum "Blend mode for combining sun sky with world sky" -#+ * LampSkySettings.sky_color_space -> sky_color_space: enum "Color space to use for internal XYZ->RGB color conversion" -#+ * LampSkySettings.sky_exposure -> sky_exposure: float "Strength of sky shading exponential exposure correction" -#+ * LampSkySettings.spread -> spread: float "Horizon Spread" -#+ * LampSkySettings.sun_brightness -> sun_brightness: float "Sun brightness" -#+ * LampSkySettings.sun_intensity -> sun_intensity: float "Sun intensity" -#+ * LampSkySettings.sun_size -> sun_size: float "Sun size" -#+ * LampSkySettings.use_atmosphere -> use_atmosphere: boolean "Apply sun effect on atmosphere" -#+ * LampSkySettings.use_sky -> use_sky: boolean "Apply sun effect on sky" -#+ * LatticePoint.co -> co: float[3], "(read-only)" -#LatticePoint.co_deform -> co_deform: float[3] "NO DESCRIPTION" -#+ * LatticePoint.groups -> groups: collection, "(read-only) Weights for the vertex groups this point is member of" -#+ * Macro.bl_description -> bl_description: string "NO DESCRIPTION" -#+ * Macro.bl_idname -> bl_idname: string "NO DESCRIPTION" -#+ * Macro.bl_label -> bl_label: string "NO DESCRIPTION" -#+ * Macro.bl_options -> bl_options: enum "Options for this operator type" -#+ * Macro.name -> name: string, "(read-only)" -#+ * Macro.properties -> properties: pointer, "(read-only)" -#+ * Main.actions -> actions: collection, "(read-only) Action datablocks." -#+ * Main.armatures -> armatures: collection, "(read-only) Armature datablocks." -#+ * Main.brushes -> brushes: collection, "(read-only) Brush datablocks." -#+ * Main.cameras -> cameras: collection, "(read-only) Camera datablocks." -#+ * Main.curves -> curves: collection, "(read-only) Curve datablocks." -#+ * Main.filepath -> filepath: string, "(read-only) Path to the .blend file" -#+ * Main.fonts -> fonts: collection, "(read-only) Vector font datablocks." -#Main.grease_pencil -> grease_pencil: collection, "(read-only) Grease Pencil datablocks." -#+ * Main.groups -> groups: collection, "(read-only) Group datablocks." -#+ * Main.images -> images: collection, "(read-only) Image datablocks." -#Main.is_dirty -> is_dirty: boolean, "(read-only) Has the current session been saved to disk as a .blend file" -#+ * Main.lamps -> lamps: collection, "(read-only) Lamp datablocks." -#+ * Main.lattices -> lattices: collection, "(read-only) Lattice datablocks." -#+ * Main.libraries -> libraries: collection, "(read-only) Library datablocks." -#+ * Main.materials -> materials: collection, "(read-only) Material datablocks." -#+ * Main.meshes -> meshes: collection, "(read-only) Mesh datablocks." -#+ * Main.metaballs -> metaballs: collection, "(read-only) Metaball datablocks." -#+ * Main.node_groups -> node_groups: collection, "(read-only) Node group datablocks." -#+ * Main.objects -> objects: collection, "(read-only) Object datablocks." -#+ * Main.particles -> particles: collection, "(read-only) Particle datablocks." -#+ * Main.scenes -> scenes: collection, "(read-only) Scene datablocks." -#+ * Main.screens -> screens: collection, "(read-only) Screen datablocks." -#+ * Main.scripts -> scripts: collection, "(read-only) Script datablocks (DEPRECATED)." - + * Main.debug -> show_debug: boolean "Print debugging information in console" -#+ * Main.sounds -> sounds: collection, "(read-only) Sound datablocks." -#+ * Main.texts -> texts: collection, "(read-only) Text datablocks." -#+ * Main.textures -> textures: collection, "(read-only) Texture datablocks." -#+ * Main.window_managers -> window_managers: collection, "(read-only) Window manager datablocks." -#+ * Main.worlds -> worlds: collection, "(read-only) World datablocks." -#+ * MaterialHalo.add -> add: float "Sets the strength of the add effect" -#+ * MaterialHalo.flare_boost -> flare_boost: float "Gives the flare extra strength" -#+ * MaterialHalo.flare_seed -> flare_seed: int "Specifies an offset in the flare seed table" -#+ * MaterialHalo.flare_size -> flare_size: float "Sets the factor by which the flare is larger than the halo" -#MaterialHalo.flare_subflare_count -> flare_subflare_count: int "Sets the number of subflares" -#MaterialHalo.flare_subflare_size -> flare_subflare_size: float "Sets the dimension of the subflares, dots and circles" -#+ * MaterialHalo.hardness -> hardness: int "Sets the hardness of the halo" -#MaterialHalo.line_count -> line_count: int "Sets the number of star shaped lines rendered over the halo" -#MaterialHalo.ring_count -> ring_count: int "Sets the number of rings rendered over the halo" -#+ * MaterialHalo.seed -> seed: int "Randomizes ring dimension and line location" -#+ * MaterialHalo.size -> size: float "Sets the dimension of the halo" -#MaterialHalo.star_tip_count -> star_tip_count: int "Sets the number of points on the star shaped halo" -#MaterialHalo.use_extreme_alpha -> use_extreme_alpha: boolean "Uses extreme alpha" -#MaterialHalo.use_flare_mode -> use_flare_mode: boolean "Renders halo as a lensflare" -#MaterialHalo.use_lines -> use_lines: boolean "Renders star shaped lines over halo" -#MaterialHalo.use_ring -> use_ring: boolean "Renders rings over halo" -#MaterialHalo.use_shaded -> use_shaded: boolean "Lets halo receive light and shadows from external objects" -#MaterialHalo.use_soft -> use_soft: boolean "Softens the edges of halos at intersections with other geometry" -#MaterialHalo.use_star -> use_star: boolean "Renders halo as a star" -#MaterialHalo.use_texture -> use_texture: boolean "Gives halo a texture" -#MaterialHalo.use_vertex_normal -> use_vertex_normal: boolean "Uses the vertex normal to specify the dimension of the halo" -#MaterialPhysics.damping -> damping: float "Damping of the spring force, when inside the physics distance area" -#+ * MaterialPhysics.distance -> distance: float "Distance of the physics area" -#+ * MaterialPhysics.elasticity -> elasticity: float "Elasticity of collisions" -#+ * MaterialPhysics.force -> force: float "Upward spring force, when inside the physics distance area" -#+ * MaterialPhysics.friction -> friction: float "Coulomb friction coefficient, when inside the physics distance area" -#MaterialPhysics.use_normal_align -> use_normal_align: boolean "Align dynamic game objects along the surface normal, when inside the physics distance area" -#+ * MaterialRaytraceMirror.depth -> depth: int "Maximum allowed number of light inter-reflections" -#+ * MaterialRaytraceMirror.distance -> distance: float "Maximum distance of reflected rays. Reflections further than this range fade to sky color or material color" -#+ * MaterialRaytraceMirror.fade_to -> fade_to: enum "The color that rays with no intersection within the Max Distance take. Material color can be best for indoor scenes, sky color for outdoor" -#+ * MaterialRaytraceMirror.fresnel -> fresnel: float "Power of Fresnel for mirror reflection" -#+ * MaterialRaytraceMirror.fresnel_factor -> fresnel_factor: float "Blending factor for Fresnel" -#+ * MaterialRaytraceMirror.gloss_anisotropic -> gloss_anisotropic: float "The shape of the reflection, from 0.0 (circular) to 1.0 (fully stretched along the tangent" -#+ * MaterialRaytraceMirror.gloss_factor -> gloss_factor: float "The shininess of the reflection. Values < 1.0 give diffuse, blurry reflections" -#+ * MaterialRaytraceMirror.gloss_samples -> gloss_samples: int "Number of cone samples averaged for blurry reflections" -#+ * MaterialRaytraceMirror.gloss_threshold -> gloss_threshold: float "Threshold for adaptive sampling. If a sample contributes less than this amount (as a percentage), sampling is stopped" -#+ * MaterialRaytraceMirror.reflect_factor -> reflect_factor: float "Sets the amount mirror reflection for raytrace" -#+ * MaterialRaytraceMirror.use -> use: boolean "Enable raytraced reflections" -#+ * MaterialRaytraceTransparency.depth -> depth: int "Maximum allowed number of light inter-refractions" -#MaterialRaytraceTransparency.depth_max -> depth_max: float "Maximum depth for light to travel through the transparent material before becoming fully filtered (0.0 is disabled)" -#+ * MaterialRaytraceTransparency.falloff -> falloff: float "Falloff power for transmissivity filter effect (1.0 is linear)" -#+ * MaterialRaytraceTransparency.filter -> filter: float "Amount to blend in the materials diffuse color in raytraced transparency (simulating absorption)" -#+ * MaterialRaytraceTransparency.fresnel -> fresnel: float "Power of Fresnel for transparency (Ray or ZTransp)" -#+ * MaterialRaytraceTransparency.fresnel_factor -> fresnel_factor: float "Blending factor for Fresnel" -#+ * MaterialRaytraceTransparency.gloss_factor -> gloss_factor: float "The clarity of the refraction. Values < 1.0 give diffuse, blurry refractions" -#+ * MaterialRaytraceTransparency.gloss_samples -> gloss_samples: int "Number of cone samples averaged for blurry refractions" -#+ * MaterialRaytraceTransparency.gloss_threshold -> gloss_threshold: float "Threshold for adaptive sampling. If a sample contributes less than this amount (as a percentage), sampling is stopped" -#+ * MaterialRaytraceTransparency.ior -> ior: float "Sets angular index of refraction for raytraced refraction" -#+ * MaterialSlot.link -> link: enum "Link material to object or the objects data" -#+ * MaterialSlot.material -> material: pointer "Material datablock used by this material slot" -#+ * MaterialSlot.name -> name: string, "(read-only) Material slot name" -#+ * MaterialStrand.blend_distance -> blend_distance: float "Worldspace distance over which to blend in the surface normal" -#+ * MaterialStrand.root_size -> root_size: float "Start size of strands in pixels or Blender units" -#+ * MaterialStrand.shape -> shape: float "Positive values make strands rounder, negative makes strands spiky" -#MaterialStrand.size_min -> size_min: float "Minimum size of strands in pixels" -#+ * MaterialStrand.tip_size -> tip_size: float "End size of strands in pixels or Blender units" -#MaterialStrand.use_blender_units -> use_blender_units: boolean "Use Blender units for widths instead of pixels" -#MaterialStrand.use_surface_diffuse -> use_surface_diffuse: boolean "Make diffuse shading more similar to shading the surface" -#MaterialStrand.use_tangent_shading -> use_tangent_shading: boolean "Uses direction of strands as normal for tangent-shading" -#+ * MaterialStrand.uv_layer -> uv_layer: string "Name of UV layer to override" -#+ * MaterialStrand.width_fade -> width_fade: float "Transparency along the width of the strand" -#+ * MaterialSubsurfaceScattering.back -> back: float "Back scattering weight" -#+ * MaterialSubsurfaceScattering.color -> color: float[3] "Scattering color" -#+ * MaterialSubsurfaceScattering.color_factor -> color_factor: float "Blend factor for SSS colors" -#MaterialSubsurfaceScattering.error_threshold -> error_threshold: float "Error tolerance (low values are slower and higher quality)" -#+ * MaterialSubsurfaceScattering.front -> front: float "Front scattering weight" -#+ * MaterialSubsurfaceScattering.ior -> ior: float "Index of refraction (higher values are denser)" -#+ * MaterialSubsurfaceScattering.radius -> radius: float[3] "Mean red/green/blue scattering path length" -#+ * MaterialSubsurfaceScattering.scale -> scale: float "Object scale factor" -#+ * MaterialSubsurfaceScattering.texture_factor -> texture_factor: float "Texture scatting blend factor" -#+ * MaterialSubsurfaceScattering.use -> use: boolean "Enable diffuse subsurface scatting effects in a material" -#+ * MaterialVolume.asymmetry -> asymmetry: float "Back scattering (-1.0) to Forward scattering (1.0) and the range in between" -#+ * MaterialVolume.cache_resolution -> cache_resolution: int "Resolution of the voxel grid, low resolutions are faster, high resolutions use more memory" -#+ * MaterialVolume.density -> density: float "The base density of the volume" -#+ * MaterialVolume.density_scale -> density_scale: float "Multiplier for the materials density" -#MaterialVolume.depth_threshold -> depth_threshold: float "Stop ray marching early if transmission drops below this luminance - higher values give speedups in dense volumes at the expense of accuracy" -#+ * MaterialVolume.emission -> emission: float "Amount of light that gets emitted by the volume" -#+ * MaterialVolume.emission_color -> emission_color: float[3] "NO DESCRIPTION" -#MaterialVolume.light_method -> light_method: enum "Method of shading, attenuating, and scattering light through the volume" -#+ * MaterialVolume.ms_diffusion -> ms_diffusion: float "Diffusion factor, the strength of the blurring effect" -#+ * MaterialVolume.ms_intensity -> ms_intensity: float "Multiplier for multiple scattered light energy" -#+ * MaterialVolume.ms_spread -> ms_spread: float "Proportional distance over which the light is diffused" -#+ * MaterialVolume.reflection -> reflection: float "Multiplier to make out-scattered light brighter or darker (non-physically correct)" -#+ * MaterialVolume.reflection_color -> reflection_color: float[3] "Colour of light scattered out of the volume (does not affect transmission)" -#+ * MaterialVolume.scattering -> scattering: float "Amount of light that gets scattered out by the volume - the more out-scattering, the shallower the light will penetrate" -#MaterialVolume.step_method -> step_method: enum "Method of calculating the steps through the volume" -#+ * MaterialVolume.step_size -> step_size: float "Distance between subsequent volume depth samples" -#+ * MaterialVolume.transmission_color -> transmission_color: float[3] "Result color of the volume, after other light has been scattered/absorbed" -#MaterialVolume.use_external_shadows -> use_external_shadows: boolean "Receive shadows from sources outside the volume (temporary)" -#MaterialVolume.use_light_cache -> use_light_cache: boolean "Pre-calculate the shading information into a voxel grid, speeds up shading at slightly less accuracy" -#+ * Menu.bl_idname -> bl_idname: string "If this is set, the menu gets a custom ID, otherwise it takes the name of the class used to define the panel. For example, if the class name is OBJECT_MT_hello, and bl_idname is not set by the script, then bl_idname = OBJECT_MT_hello" -#+ * Menu.bl_label -> bl_label: string "The menu label" -#+ * Menu.layout -> layout: pointer, "(read-only) Defines the structure of the menu in the UI." -#+ * MeshColor.color1 -> color1: float[3] "NO DESCRIPTION" -#+ * MeshColor.color2 -> color2: float[3] "NO DESCRIPTION" -#+ * MeshColor.color3 -> color3: float[3] "NO DESCRIPTION" -#+ * MeshColor.color4 -> color4: float[3] "NO DESCRIPTION" -#+ * MeshColorLayer.active -> active: boolean "Sets the layer as active for display and editing" -#+ * MeshColorLayer.active_render -> active_render: boolean "Sets the layer as active for rendering" -#+ * MeshColorLayer.data -> data: collection, "(read-only)" -#+ * MeshColorLayer.name -> name: string "NO DESCRIPTION" -#+ * MeshEdge.bevel_weight -> bevel_weight: float "Weight used by the Bevel modifier" -#+ * MeshEdge.crease -> crease: float "Weight used by the Subsurf modifier for creasing" -#+ * MeshEdge.hide -> hide: boolean "NO DESCRIPTION" -#+ * MeshEdge.index -> index: int, "(read-only) Index number of the vertex" -#MeshEdge.is_fgon -> is_fgon: boolean "Fgon edge" -#MeshEdge.is_loose -> is_loose: boolean "Loose edge" -#+ * MeshEdge.select -> select: boolean "NO DESCRIPTION" -#MeshEdge.use_edge_sharp -> use_edge_sharp: boolean "Sharp edge for the EdgeSplit modifier" -#MeshEdge.use_seam -> use_seam: boolean "Seam edge for UV unwrapping" -#MeshEdge.vertices -> vertices: int[2] "Vertex indices" -#+ * MeshFace.area -> area: float, "(read-only) read only area of the face" -#+ * MeshFace.hide -> hide: boolean "NO DESCRIPTION" -#+ * MeshFace.index -> index: int, "(read-only) Index number of the vertex" -#+ * MeshFace.material_index -> material_index: int "NO DESCRIPTION" -#+ * MeshFace.normal -> normal: float[3], "(read-only) local space unit length normal vector for this face" -#+ * MeshFace.select -> select: boolean "NO DESCRIPTION" -#MeshFace.use_smooth -> use_smooth: boolean "NO DESCRIPTION" -#MeshFace.vertices -> vertices: int[4] "Vertex indices" -#MeshFace.vertices_raw -> vertices_raw: int[4] "Fixed size vertex indices array" -#+ * MeshFaces.active -> active: int "The active face for this mesh" -#+ * MeshFaces.active_tface -> active_tface: pointer, "(read-only) Active Texture Face" -#+ * MeshFloatProperty.value -> value: float "NO DESCRIPTION" -#+ * MeshFloatPropertyLayer.data -> data: collection, "(read-only)" -#+ * MeshFloatPropertyLayer.name -> name: string "NO DESCRIPTION" -#+ * MeshIntProperty.value -> value: int "NO DESCRIPTION" -#+ * MeshIntPropertyLayer.data -> data: collection, "(read-only)" -#+ * MeshIntPropertyLayer.name -> name: string "NO DESCRIPTION" -#+ * MeshSticky.co -> co: float[2] "Sticky texture coordinate location" -#+ * MeshStringProperty.value -> value: string "NO DESCRIPTION" -#+ * MeshStringPropertyLayer.data -> data: collection, "(read-only)" -#+ * MeshStringPropertyLayer.name -> name: string "NO DESCRIPTION" -#MeshTextureFace.blend_type -> blend_type: enum "Transparency blending mode" -#MeshTextureFace.hide -> hide: boolean "Make face invisible" -#+ * MeshTextureFace.image -> image: pointer "NO DESCRIPTION" -#MeshTextureFace.pin_uv -> pin_uv: boolean[4] "NO DESCRIPTION" -#+ * MeshTextureFace.select_uv -> select_uv: boolean[4] "NO DESCRIPTION" -#MeshTextureFace.use_alpha_sort -> use_alpha_sort: boolean "Enable sorting of faces for correct alpha drawing (slow, use Clip Alpha instead when possible)" -#MeshTextureFace.use_billboard -> use_billboard: boolean "Billboard with Z-axis constraint" -#MeshTextureFace.use_bitmap_text -> use_bitmap_text: boolean "Enable bitmap text on face" -#MeshTextureFace.use_blend_shared -> use_blend_shared: boolean "Blend vertex colors across face when vertices are shared" -#MeshTextureFace.use_collision -> use_collision: boolean "Use face for collision and ray-sensor detection" -#MeshTextureFace.use_halo -> use_halo: boolean "Screen aligned billboard" -#MeshTextureFace.use_image -> use_image: boolean "Render face with texture" -#MeshTextureFace.use_light -> use_light: boolean "Use light for face" -#MeshTextureFace.use_object_color -> use_object_color: boolean "Use ObColor instead of vertex colors" -#MeshTextureFace.use_shadow_cast -> use_shadow_cast: boolean "Face is used for shadow" -#MeshTextureFace.use_twoside -> use_twoside: boolean "Render face two-sided" -#+ * MeshTextureFace.uv -> uv: float[8] "NO DESCRIPTION" -#+ * MeshTextureFace.uv1 -> uv1: float[2] "NO DESCRIPTION" -#+ * MeshTextureFace.uv2 -> uv2: float[2] "NO DESCRIPTION" -#+ * MeshTextureFace.uv3 -> uv3: float[2] "NO DESCRIPTION" -#+ * MeshTextureFace.uv4 -> uv4: float[2] "NO DESCRIPTION" -#+ * MeshTextureFace.uv_raw -> uv_raw: float[8] "Fixed size UV coordinates array" -#+ * MeshTextureFaceLayer.active -> active: boolean "Sets the layer as active for display and editing" -#+ * MeshTextureFaceLayer.active_clone -> active_clone: boolean "Sets the layer as active for cloning" -#+ * MeshTextureFaceLayer.active_render -> active_render: boolean "Sets the layer as active for rendering" -#+ * MeshTextureFaceLayer.data -> data: collection, "(read-only)" -#+ * MeshTextureFaceLayer.name -> name: string "NO DESCRIPTION" -#+ * MeshVertex.bevel_weight -> bevel_weight: float "Weight used by the Bevel modifier Only Vertices option" -#+ * MeshVertex.co -> co: float[3] "NO DESCRIPTION" -#+ * MeshVertex.groups -> groups: collection, "(read-only) Weights for the vertex groups this vertex is member of" -#+ * MeshVertex.hide -> hide: boolean "NO DESCRIPTION" -#+ * MeshVertex.index -> index: int, "(read-only) Index number of the vertex" -#+ * MeshVertex.normal -> normal: float[3] "Vertex Normal" -#+ * MeshVertex.select -> select: boolean "NO DESCRIPTION" -#MetaBallElements.active -> active: pointer, "(read-only) Last selected element" -#MetaElement.co -> co: float[3] "NO DESCRIPTION" -#+ * MetaElement.hide -> hide: boolean "Hide element" -#+ * MetaElement.radius -> radius: float "NO DESCRIPTION" -#+ * MetaElement.rotation -> rotation: float[4] "NO DESCRIPTION" -#+ * MetaElement.size_x -> size_x: float "Size of element, use of components depends on element type" -#+ * MetaElement.size_y -> size_y: float "Size of element, use of components depends on element type" -#+ * MetaElement.size_z -> size_z: float "Size of element, use of components depends on element type" -#+ * MetaElement.stiffness -> stiffness: float "Stiffness defines how much of the element to fill" -#+ * MetaElement.type -> type: enum "Metaball types" -#MetaElement.use_negative -> use_negative: boolean "Set metaball as negative one" -#+ * Modifier.name -> name: string "Modifier name" -#Modifier.show_expanded -> show_expanded: boolean "Set modifier expanded in the user interface" -#Modifier.show_in_editmode -> show_in_editmode: boolean "Use modifier while in the edit mode" -#Modifier.show_on_cage -> show_on_cage: boolean "Enable direct editing of modifier control cage" -#Modifier.show_render -> show_render: boolean "Use modifier during rendering" -#Modifier.show_viewport -> show_viewport: boolean "Realtime display of a modifier" -#+ * Modifier.type -> type: enum, "(read-only)" -#Modifier|ArmatureModifier.invert_vertex_group -> invert_vertex_group: boolean "Invert vertex group influence" -#+ * Modifier|ArmatureModifier.object -> object: pointer "Armature object to deform with" -#+ * Modifier|ArmatureModifier.use_bone_envelopes -> use_bone_envelopes: boolean "NO DESCRIPTION" -#Modifier|ArmatureModifier.use_deform_preserve_volume -> use_deform_preserve_volume: boolean "Deform rotation interpolation with quaternions" -#Modifier|ArmatureModifier.use_multi_modifier -> use_multi_modifier: boolean "Use same input as previous modifier, and mix results using overall vgroup" -#+ * Modifier|ArmatureModifier.use_vertex_groups -> use_vertex_groups: boolean "NO DESCRIPTION" -#+ * Modifier|ArmatureModifier.vertex_group -> vertex_group: string "Vertex group name" -#Modifier|ArrayModifier.constant_offset_displace -> constant_offset_displace: float[3] "NO DESCRIPTION" -#+ * Modifier|ArrayModifier.count -> count: int "Number of duplicates to make" -#+ * Modifier|ArrayModifier.curve -> curve: pointer "Curve object to fit array length to" -#+ * Modifier|ArrayModifier.end_cap -> end_cap: pointer "Mesh object to use as an end cap" -#Modifier|ArrayModifier.fit_length -> fit_length: float "Length to fit array within" -#+ * Modifier|ArrayModifier.fit_type -> fit_type: enum "Array length calculation method" -#Modifier|ArrayModifier.merge_threshold -> merge_threshold: float "Limit below which to merge vertices" -#+ * Modifier|ArrayModifier.offset_object -> offset_object: pointer "NO DESCRIPTION" -#Modifier|ArrayModifier.relative_offset_displace -> relative_offset_displace: float[3] "NO DESCRIPTION" -#+ * Modifier|ArrayModifier.start_cap -> start_cap: pointer "Mesh object to use as a start cap" -#Modifier|ArrayModifier.use_constant_offset -> use_constant_offset: boolean "Add a constant offset" -#Modifier|ArrayModifier.use_merge_vertices -> use_merge_vertices: boolean "Merge vertices in adjacent duplicates" -#Modifier|ArrayModifier.use_merge_vertices_cap -> use_merge_vertices_cap: boolean "Merge vertices in first and last duplicates" -#Modifier|ArrayModifier.use_object_offset -> use_object_offset: boolean "Add another objects transformation to the total offset" -#Modifier|ArrayModifier.use_relative_offset -> use_relative_offset: boolean "Add an offset relative to the objects bounding box" -#Modifier|BevelModifier.angle_limit -> angle_limit: float "Angle above which to bevel edges" -#+ * Modifier|BevelModifier.edge_weight_method -> edge_weight_method: enum "What edge weight to use for weighting a vertex" -#+ * Modifier|BevelModifier.limit_method -> limit_method: enum "NO DESCRIPTION" -#Modifier|BevelModifier.use_only_vertices -> use_only_vertices: boolean "Bevel verts/corners, not edges" -#+ * Modifier|BevelModifier.width -> width: float "Bevel value/amount" -#+ * Modifier|BooleanModifier.object -> object: pointer "Mesh object to use for Boolean operation" -#+ * Modifier|BooleanModifier.operation -> operation: enum "NO DESCRIPTION" -#Modifier|BuildModifier.frame_duration -> frame_duration: float "Specify the total time the build effect requires" -#+ * Modifier|BuildModifier.frame_start -> frame_start: float "Specify the start frame of the effect" -#+ * Modifier|BuildModifier.seed -> seed: int "Specify the seed for random if used" -#Modifier|BuildModifier.use_random_order -> use_random_order: boolean "Randomize the faces or edges during build" -#+ * Modifier|CastModifier.cast_type -> cast_type: enum "NO DESCRIPTION" -#+ * Modifier|CastModifier.factor -> factor: float "NO DESCRIPTION" -#+ * Modifier|CastModifier.object -> object: pointer "Control object: if available, its location determines the center of the effect" -#+ * Modifier|CastModifier.radius -> radius: float "Only deform vertices within this distance from the center of the effect (leave as 0 for infinite.)" -#+ * Modifier|CastModifier.size -> size: float "Size of projection shape (leave as 0 for auto.)" -#Modifier|CastModifier.use_radius_as_size -> use_radius_as_size: boolean "Use radius as size of projection shape (0 = auto)" -#+ * Modifier|CastModifier.use_transform -> use_transform: boolean "Use object transform to control projection shape" -#Modifier|CastModifier.use_x -> use_x: boolean "NO DESCRIPTION" -#Modifier|CastModifier.use_y -> use_y: boolean "NO DESCRIPTION" -#Modifier|CastModifier.use_z -> use_z: boolean "NO DESCRIPTION" -#+ * Modifier|CastModifier.vertex_group -> vertex_group: string "Vertex group name" -#+ * Modifier|ClothModifier.collision_settings -> collision_settings: pointer, "(read-only)" -#+ * Modifier|ClothModifier.point_cache -> point_cache: pointer, "(read-only)" -#+ * Modifier|ClothModifier.settings -> settings: pointer, "(read-only)" -#+ * Modifier|CollisionModifier.settings -> settings: pointer, "(read-only)" -#+ * Modifier|CurveModifier.deform_axis -> deform_axis: enum "The axis that the curve deforms along" -#+ * Modifier|CurveModifier.object -> object: pointer "Curve object to deform with" -#+ * Modifier|CurveModifier.vertex_group -> vertex_group: string "Vertex group name" -#+ * Modifier|DecimateModifier.face_count -> face_count: int, "(read-only) The current number of faces in the decimated mesh" -#+ * Modifier|DecimateModifier.ratio -> ratio: float "Defines the ratio of triangles to reduce to" -#+ * Modifier|DisplaceModifier.direction -> direction: enum "NO DESCRIPTION" -#Modifier|DisplaceModifier.mid_level -> mid_level: float "Material value that gives no displacement" -#+ * Modifier|DisplaceModifier.strength -> strength: float "NO DESCRIPTION" -#+ * Modifier|DisplaceModifier.texture -> texture: pointer "NO DESCRIPTION" -#+ * Modifier|DisplaceModifier.texture_coordinate_object -> texture_coordinate_object: pointer "NO DESCRIPTION" -#Modifier|DisplaceModifier.texture_coords -> texture_coords: enum "NO DESCRIPTION" -#+ * Modifier|DisplaceModifier.uv_layer -> uv_layer: string "UV layer name" -#+ * Modifier|DisplaceModifier.vertex_group -> vertex_group: string "Vertex group name" -#+ * Modifier|EdgeSplitModifier.split_angle -> split_angle: float "Angle above which to split edges" -#+ * Modifier|EdgeSplitModifier.use_edge_angle -> use_edge_angle: boolean "Split edges with high angle between faces" -#Modifier|EdgeSplitModifier.use_edge_sharp -> use_edge_sharp: boolean "Split edges that are marked as sharp" -#+ * Modifier|ExplodeModifier.protect -> protect: float "Clean vertex group edges" -#Modifier|ExplodeModifier.show_alive -> show_alive: boolean "Show mesh when particles are alive" -#Modifier|ExplodeModifier.show_dead -> show_dead: boolean "Show mesh when particles are dead" -#Modifier|ExplodeModifier.show_unborn -> show_unborn: boolean "Show mesh when particles are unborn" -#Modifier|ExplodeModifier.use_edge_split -> use_edge_split: boolean "Split face edges for nicer shrapnel" -#Modifier|ExplodeModifier.use_size -> use_size: boolean "Use particle size for the shrapnel" -#+ * Modifier|ExplodeModifier.vertex_group -> vertex_group: string "NO DESCRIPTION" -#+ * Modifier|FluidSimulationModifier.settings -> settings: pointer, "(read-only) Settings for how this object is used in the fluid simulation" -#+ * Modifier|HookModifier.falloff -> falloff: float "If not zero, the distance from the hook where influence ends" -#+ * Modifier|HookModifier.force -> force: float "Relative force of the hook" -#+ * Modifier|HookModifier.object -> object: pointer "Parent Object for hook, also recalculates and clears offset" -#+ * Modifier|HookModifier.subtarget -> subtarget: string "Name of Parent Bone for hook (if applicable), also recalculates and clears offset" -#+ * Modifier|HookModifier.vertex_group -> vertex_group: string "Vertex group name" -#+ * Modifier|LatticeModifier.object -> object: pointer "Lattice object to deform with" -#+ * Modifier|LatticeModifier.vertex_group -> vertex_group: string "Vertex group name" -#+ * Modifier|MaskModifier.armature -> armature: pointer "Armature to use as source of bones to mask" -#Modifier|MaskModifier.invert_vertex_group -> invert_vertex_group: boolean "Use vertices that are not part of region defined" -#+ * Modifier|MaskModifier.mode -> mode: enum "NO DESCRIPTION" -#+ * Modifier|MaskModifier.vertex_group -> vertex_group: string "Vertex group name" -#Modifier|MeshDeformModifier.invert_vertex_group -> invert_vertex_group: boolean "Invert vertex group influence" -#+ * Modifier|MeshDeformModifier.is_bound -> is_bound: boolean, "(read-only) Whether geometry has been bound to control cage" -#+ * Modifier|MeshDeformModifier.object -> object: pointer "Mesh object to deform with" -#+ * Modifier|MeshDeformModifier.precision -> precision: int "The grid size for binding" -#Modifier|MeshDeformModifier.use_dynamic_bind -> use_dynamic_bind: boolean "Recompute binding dynamically on top of other deformers (slower and more memory consuming.)" -#+ * Modifier|MeshDeformModifier.vertex_group -> vertex_group: string "Vertex group name" -#Modifier|MirrorModifier.merge_threshold -> merge_threshold: float "Distance from axis within which mirrored vertices are merged" -#+ * Modifier|MirrorModifier.mirror_object -> mirror_object: pointer "Object to use as mirror" -#Modifier|MirrorModifier.use_clip -> use_clip: boolean "Prevents vertices from going through the mirror during transform" -#Modifier|MirrorModifier.use_mirror_u -> use_mirror_u: boolean "Mirror the U texture coordinate around the 0.5 point" -#Modifier|MirrorModifier.use_mirror_v -> use_mirror_v: boolean "Mirror the V texture coordinate around the 0.5 point" -#Modifier|MirrorModifier.use_mirror_vertex_groups -> use_mirror_vertex_groups: boolean "Mirror vertex groups (e.g. .R->.L)" -#Modifier|MirrorModifier.use_x -> use_x: boolean "Enable X axis mirror" -#Modifier|MirrorModifier.use_y -> use_y: boolean "Enable Y axis mirror" -#Modifier|MirrorModifier.use_z -> use_z: boolean "Enable Z axis mirror" -#+ * Modifier|MultiresModifier.filepath -> filepath: string "Path to external displacements file" -#Modifier|MultiresModifier.is_external -> is_external: boolean, "(read-only) Store multires displacements outside the .blend file, to save memory" -#+ * Modifier|MultiresModifier.levels -> levels: int "Number of subdivisions to use in the viewport" -#+ * Modifier|MultiresModifier.render_levels -> render_levels: int "NO DESCRIPTION" -#+ * Modifier|MultiresModifier.sculpt_levels -> sculpt_levels: int "Number of subdivisions to use in sculpt mode" -#Modifier|MultiresModifier.show_only_control_edges -> show_only_control_edges: boolean "Skip drawing/rendering of interior subdivided edges" -#+ * Modifier|MultiresModifier.subdivision_type -> subdivision_type: enum "Selects type of subdivision algorithm" -#+ * Modifier|MultiresModifier.total_levels -> total_levels: int, "(read-only) Number of subdivisions for which displacements are stored" -#+ * Modifier|ParticleInstanceModifier.axis -> axis: enum "Pole axis for rotation" -#+ * Modifier|ParticleInstanceModifier.object -> object: pointer "Object that has the particle system" -#Modifier|ParticleInstanceModifier.particle_system_index -> particle_system_index: int "NO DESCRIPTION" -#+ * Modifier|ParticleInstanceModifier.position -> position: float "Position along path" -#+ * Modifier|ParticleInstanceModifier.random_position -> random_position: float "Randomize position along path" -#Modifier|ParticleInstanceModifier.show_alive -> show_alive: boolean "Show instances when particles are alive" -#Modifier|ParticleInstanceModifier.show_dead -> show_dead: boolean "Show instances when particles are dead" -#Modifier|ParticleInstanceModifier.show_unborn -> show_unborn: boolean "Show instances when particles are unborn" -#Modifier|ParticleInstanceModifier.use_children -> use_children: boolean "Create instances from child particles" -#Modifier|ParticleInstanceModifier.use_normal -> use_normal: boolean "Create instances from normal particles" -#+ * Modifier|ParticleInstanceModifier.use_path -> use_path: boolean "Create instances along particle paths" -#Modifier|ParticleInstanceModifier.use_preserve_shape -> use_preserve_shape: boolean "Dont stretch the object" -#Modifier|ParticleInstanceModifier.use_size -> use_size: boolean "Use particle size to scale the instances" -#+ * Modifier|ParticleSystemModifier.particle_system -> particle_system: pointer, "(read-only) Particle System that this modifier controls" -#+ * Modifier|ScrewModifier.angle -> angle: float "Angle of revolution" -#+ * Modifier|ScrewModifier.axis -> axis: enum "Screw axis" -#+ * Modifier|ScrewModifier.iterations -> iterations: int "Number of times to apply the screw operation" -#+ * Modifier|ScrewModifier.object -> object: pointer "Object to define the screw axis" -#+ * Modifier|ScrewModifier.render_steps -> render_steps: int "Number of steps in the revolution" -#+ * Modifier|ScrewModifier.screw_offset -> screw_offset: float "Offset the revolution along its axis" -#+ * Modifier|ScrewModifier.steps -> steps: int "Number of steps in the revolution" -#+ * Modifier|ScrewModifier.use_normal_calculate -> use_normal_calculate: boolean "Calculate the order of edges (needed for meshes, but not curves)" -#+ * Modifier|ScrewModifier.use_normal_flip -> use_normal_flip: boolean "Flip normals of lathed faces" -#+ * Modifier|ScrewModifier.use_object_screw_offset -> use_object_screw_offset: boolean "Use the distance between the objects to make a screw" -#+ * Modifier|ShrinkwrapModifier.auxiliary_target -> auxiliary_target: pointer "Additional mesh target to shrink to" -#+ * Modifier|ShrinkwrapModifier.offset -> offset: float "Distance to keep from the target" -#+ * Modifier|ShrinkwrapModifier.subsurf_levels -> subsurf_levels: int "Number of subdivisions that must be performed before extracting vertices positions and normals" -#+ * Modifier|ShrinkwrapModifier.target -> target: pointer "Mesh target to shrink to" -#Modifier|ShrinkwrapModifier.use_cull_back_faces -> use_cull_back_faces: boolean "Stop vertices from projecting to a back face on the target" -#Modifier|ShrinkwrapModifier.use_cull_front_faces -> use_cull_front_faces: boolean "Stop vertices from projecting to a front face on the target" -#Modifier|ShrinkwrapModifier.use_keep_above_surface -> use_keep_above_surface: boolean "NO DESCRIPTION" -#Modifier|ShrinkwrapModifier.use_negative_direction -> use_negative_direction: boolean "Allow vertices to move in the negative direction of axis" -#Modifier|ShrinkwrapModifier.use_positive_direction -> use_positive_direction: boolean "Allow vertices to move in the positive direction of axis" -#Modifier|ShrinkwrapModifier.use_project_x -> use_project_x: boolean "NO DESCRIPTION" -#Modifier|ShrinkwrapModifier.use_project_y -> use_project_y: boolean "NO DESCRIPTION" -#Modifier|ShrinkwrapModifier.use_project_z -> use_project_z: boolean "NO DESCRIPTION" -#+ * Modifier|ShrinkwrapModifier.vertex_group -> vertex_group: string "Vertex group name" -#Modifier|ShrinkwrapModifier.wrap_method -> wrap_method: enum "NO DESCRIPTION" -#Modifier|SimpleDeformModifier.deform_method -> deform_method: enum "NO DESCRIPTION" -#+ * Modifier|SimpleDeformModifier.factor -> factor: float "NO DESCRIPTION" -#+ * Modifier|SimpleDeformModifier.limits -> limits: float[2] "Lower/Upper limits for deform" -#Modifier|SimpleDeformModifier.lock_x -> lock_x: boolean "NO DESCRIPTION" -#Modifier|SimpleDeformModifier.lock_y -> lock_y: boolean "NO DESCRIPTION" -#+ * Modifier|SimpleDeformModifier.origin -> origin: pointer "Origin of modifier space coordinates" -#Modifier|SimpleDeformModifier.use_relative -> use_relative: boolean "Sets the origin of deform space to be relative to the object" -#+ * Modifier|SimpleDeformModifier.vertex_group -> vertex_group: string "Vertex group name" -#+ * Modifier|SmokeModifier.coll_settings -> coll_settings: pointer, "(read-only)" -#+ * Modifier|SmokeModifier.domain_settings -> domain_settings: pointer, "(read-only)" -#+ * Modifier|SmokeModifier.flow_settings -> flow_settings: pointer, "(read-only)" -#Modifier|SmokeModifier.smoke_type -> smoke_type: enum "NO DESCRIPTION" -#+ * Modifier|SmoothModifier.factor -> factor: float "NO DESCRIPTION" -#Modifier|SmoothModifier.iterations -> iterations: int "NO DESCRIPTION" -#Modifier|SmoothModifier.use_x -> use_x: boolean "NO DESCRIPTION" -#Modifier|SmoothModifier.use_y -> use_y: boolean "NO DESCRIPTION" -#Modifier|SmoothModifier.use_z -> use_z: boolean "NO DESCRIPTION" -#+ * Modifier|SmoothModifier.vertex_group -> vertex_group: string "Vertex group name" -#+ * Modifier|SoftBodyModifier.point_cache -> point_cache: pointer, "(read-only)" -#+ * Modifier|SoftBodyModifier.settings -> settings: pointer, "(read-only)" -#+ * Modifier|SolidifyModifier.edge_crease_inner -> edge_crease_inner: float "Assign a crease to inner edges" -#+ * Modifier|SolidifyModifier.edge_crease_outer -> edge_crease_outer: float "Assign a crease to outer edges" -#+ * Modifier|SolidifyModifier.edge_crease_rim -> edge_crease_rim: float "Assign a crease to the edges making up the rim" -#Modifier|SolidifyModifier.invert_vertex_group -> invert_vertex_group: boolean "Invert the vertex group influence" -#+ * Modifier|SolidifyModifier.offset -> offset: float "Offset the thickness from the center" -#+ * Modifier|SolidifyModifier.thickness -> thickness: float "Thickness of the shell" -#+ * Modifier|SolidifyModifier.use_even_offset -> use_even_offset: boolean "Maintain thickness by adjusting for sharp corners (slow, disable when not needed)" -#+ * Modifier|SolidifyModifier.use_quality_normals -> use_quality_normals: boolean "Calculate normals which result in more even thickness (slow, disable when not needed)" -#+ * Modifier|SolidifyModifier.use_rim -> use_rim: boolean "Create edge loops between the inner and outer surfaces on face edges (slow, disable when not needed)" -#+ * Modifier|SolidifyModifier.use_rim_material -> use_rim_material: boolean "Use in the next material for rim faces" -#+ * Modifier|SolidifyModifier.vertex_group -> vertex_group: string "Vertex group name" -#+ * Modifier|SubsurfModifier.levels -> levels: int "Number of subdivisions to perform" -#+ * Modifier|SubsurfModifier.render_levels -> render_levels: int "Number of subdivisions to perform when rendering" -#Modifier|SubsurfModifier.show_only_control_edges -> show_only_control_edges: boolean "Skip drawing/rendering of interior subdivided edges" -#+ * Modifier|SubsurfModifier.subdivision_type -> subdivision_type: enum "Selects type of subdivision algorithm" -#Modifier|SubsurfModifier.use_subsurf_uv -> use_subsurf_uv: boolean "Use subsurf to subdivide UVs" -#+ * Modifier|UVProjectModifier.aspect_x -> aspect_x: float "NO DESCRIPTION" -#+ * Modifier|UVProjectModifier.aspect_y -> aspect_y: float "NO DESCRIPTION" -#+ * Modifier|UVProjectModifier.image -> image: pointer "NO DESCRIPTION" -#Modifier|UVProjectModifier.projector_count -> projector_count: int "Number of projectors to use" -#+ * Modifier|UVProjectModifier.projectors -> projectors: collection, "(read-only)" -#+ * Modifier|UVProjectModifier.scale_x -> scale_x: float "NO DESCRIPTION" -#+ * Modifier|UVProjectModifier.scale_y -> scale_y: float "NO DESCRIPTION" -#Modifier|UVProjectModifier.use_image_override -> use_image_override: boolean "Override faces current images with the given image" -#+ * Modifier|UVProjectModifier.uv_layer -> uv_layer: string "UV layer name" -#+ * Modifier|WaveModifier.damping_time -> damping_time: float "NO DESCRIPTION" -#+ * Modifier|WaveModifier.falloff_radius -> falloff_radius: float "NO DESCRIPTION" -#+ * Modifier|WaveModifier.height -> height: float "NO DESCRIPTION" -#+ * Modifier|WaveModifier.lifetime -> lifetime: float "NO DESCRIPTION" -#+ * Modifier|WaveModifier.narrowness -> narrowness: float "NO DESCRIPTION" -#+ * Modifier|WaveModifier.speed -> speed: float "NO DESCRIPTION" -#+ * Modifier|WaveModifier.start_position_object -> start_position_object: pointer "NO DESCRIPTION" -#+ * Modifier|WaveModifier.start_position_x -> start_position_x: float "NO DESCRIPTION" -#+ * Modifier|WaveModifier.start_position_y -> start_position_y: float "NO DESCRIPTION" -#+ * Modifier|WaveModifier.texture -> texture: pointer "Texture for modulating the wave" -#Modifier|WaveModifier.texture_coords -> texture_coords: enum "Texture coordinates used for modulating input" -#Modifier|WaveModifier.texture_coords_object -> texture_coords_object: pointer "NO DESCRIPTION" -#+ * Modifier|WaveModifier.time_offset -> time_offset: float "Either the starting frame (for positive speed) or ending frame (for negative speed.)" -#Modifier|WaveModifier.use_cyclic -> use_cyclic: boolean "Cyclic wave effect" -#Modifier|WaveModifier.use_normal -> use_normal: boolean "Displace along normals" -#Modifier|WaveModifier.use_normal_x -> use_normal_x: boolean "Enable displacement along the X normal" -#Modifier|WaveModifier.use_normal_y -> use_normal_y: boolean "Enable displacement along the Y normal" -#Modifier|WaveModifier.use_normal_z -> use_normal_z: boolean "Enable displacement along the Z normal" -#Modifier|WaveModifier.use_x -> use_x: boolean "X axis motion" -#Modifier|WaveModifier.use_y -> use_y: boolean "Y axis motion" -#+ * Modifier|WaveModifier.uv_layer -> uv_layer: string "UV layer name" -#+ * Modifier|WaveModifier.vertex_group -> vertex_group: string "Vertex group name for modulating the wave" -#+ * Modifier|WaveModifier.width -> width: float "NO DESCRIPTION" -#+ * MotionPath.frame_end -> frame_end: int, "(read-only) End frame of the stored range" -#+ * MotionPath.frame_start -> frame_start: int, "(read-only) Starting frame of the stored range" -#MotionPath.is_modified -> is_modified: boolean "Path is being edited" -#+ * MotionPath.length -> length: int, "(read-only) Number of frames cached" -#+ * MotionPath.points -> points: collection, "(read-only) Cached positions per frame" -#+ * MotionPath.use_bone_head -> use_bone_head: boolean, "(read-only) For PoseBone paths, use the bone head location when calculating this path" -#+ * MotionPathVert.co -> co: float[3] "NO DESCRIPTION" -#+ * MotionPathVert.select -> select: boolean "Path point is selected for editing" -#+ * NlaStrip.action -> action: pointer "Action referenced by this strip" -#NlaStrip.action_frame_end -> action_frame_end: float "NO DESCRIPTION" -#NlaStrip.action_frame_start -> action_frame_start: float "NO DESCRIPTION" -#+ * NlaStrip.active -> active: boolean, "(read-only) NLA Strip is active" -#+ * NlaStrip.blend_in -> blend_in: float "Number of frames at start of strip to fade in influence" -#+ * NlaStrip.blend_out -> blend_out: float "NO DESCRIPTION" -#NlaStrip.blend_type -> blend_type: enum "Method used for combining strips result with accumulated result" -#+ * NlaStrip.extrapolation -> extrapolation: enum "Action to take for gaps past the strip extents" -#+ * NlaStrip.fcurves -> fcurves: collection, "(read-only) F-Curves for controlling the strips influence and timing" -#+ * NlaStrip.frame_end -> frame_end: float "NO DESCRIPTION" -#+ * NlaStrip.frame_start -> frame_start: float "NO DESCRIPTION" -#+ * NlaStrip.influence -> influence: float "Amount the strip contributes to the current result" -#+ * NlaStrip.modifiers -> modifiers: collection, "(read-only) Modifiers affecting all the F-Curves in the referenced Action" -#+ * NlaStrip.mute -> mute: boolean "NLA Strip is not evaluated" -#+ * NlaStrip.name -> name: string "NO DESCRIPTION" -#+ * NlaStrip.repeat -> repeat: float "Number of times to repeat the action range" -#+ * NlaStrip.scale -> scale: float "Scaling factor for action" -#+ * NlaStrip.select -> select: boolean "NLA Strip is selected" -#+ * NlaStrip.strip_time -> strip_time: float "Frame of referenced Action to evaluate" -#+ * NlaStrip.strips -> strips: collection, "(read-only) NLA Strips that this strip acts as a container for (if it is of type Meta)" -#+ * NlaStrip.type -> type: enum, "(read-only) Type of NLA Strip" -#NlaStrip.use_animated_influence -> use_animated_influence: boolean "Influence setting is controlled by an F-Curve rather than automatically determined" -#NlaStrip.use_animated_time -> use_animated_time: boolean "Strip time is controlled by an F-Curve rather than automatically determined" -#NlaStrip.use_animated_time_cyclic -> use_animated_time_cyclic: boolean "Cycle the animated time within the action start & end" -#NlaStrip.use_auto_blend -> use_auto_blend: boolean "Number of frames for Blending In/Out is automatically determined from overlapping strips" -#NlaStrip.use_reverse -> use_reverse: boolean "NLA Strip is played back in reverse order (only when timing is automatically determined)" -#+ * NlaTrack.active -> active: boolean, "(read-only) NLA Track is active" -#NlaTrack.is_solo -> is_solo: boolean, "(read-only) NLA Track is evaluated itself (i.e. active Action and all other NLA Tracks in the same AnimData block are disabled)" -#+ * NlaTrack.lock -> lock: boolean "NLA Track is locked" -#+ * NlaTrack.mute -> mute: boolean "NLA Track is not evaluated" -#+ * NlaTrack.name -> name: string "NO DESCRIPTION" -#+ * NlaTrack.select -> select: boolean "NLA Track is selected" -#+ * NlaTrack.strips -> strips: collection, "(read-only) NLA Strips on this NLA-track" -#+ * Node.inputs -> inputs: collection, "(read-only)" -#+ * Node.location -> location: float[2] "NO DESCRIPTION" -#+ * Node.name -> name: string "Node name" -#+ * Node.outputs -> outputs: collection, "(read-only)" -#+ * Node|CompositorNode.type -> type: enum, "(read-only)" -#+ * Node|CompositorNode|CompositorNodeAlphaOver.premul -> premul: float "Mix Factor" -#Node|CompositorNode|CompositorNodeAlphaOver.use_premultiply -> use_premultiply: boolean "NO DESCRIPTION" -#Node|CompositorNode|CompositorNodeZcombine.use_alpha -> use_alpha: boolean "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeBilateralblur.iterations -> iterations: int "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeBilateralblur.sigma_color -> sigma_color: float "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeBilateralblur.sigma_space -> sigma_space: float "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeBlur.factor -> factor: float "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeBlur.factor_x -> factor_x: float "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeBlur.factor_y -> factor_y: float "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeBlur.filter_type -> filter_type: enum "NO DESCRIPTION" -#Node|CompositorNode|CompositorNodeBlur.size_x -> size_x: int "NO DESCRIPTION" -#Node|CompositorNode|CompositorNodeBlur.size_y -> size_y: int "NO DESCRIPTION" -#Node|CompositorNode|CompositorNodeBlur.use_bokeh -> use_bokeh: boolean "Uses circular filter (slower)" -#Node|CompositorNode|CompositorNodeBlur.use_gamma_correction -> use_gamma_correction: boolean "Applies filter on gamma corrected values" -#Node|CompositorNode|CompositorNodeBlur.use_relative -> use_relative: boolean "Use relative (percent) values to define blur radius" -#+ * Node|CompositorNode|CompositorNodeChannelMatte.color_space -> color_space: enum "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeChannelMatte.limit_channel -> limit_channel: enum "Limit by this channels value" -#Node|CompositorNode|CompositorNodeChannelMatte.limit_max -> limit_max: float "Values higher than this setting are 100% opaque" -#Node|CompositorNode|CompositorNodeChannelMatte.limit_method -> limit_method: enum "Algorithm to use to limit channel" -#Node|CompositorNode|CompositorNodeChannelMatte.limit_min -> limit_min: float "Values lower than this setting are 100% keyed" -#Node|CompositorNode|CompositorNodeChannelMatte.matte_channel -> matte_channel: enum "Channel used to determine matte" -#+ * Node|CompositorNode|CompositorNodeChromaMatte.gain -> gain: float "Alpha gain" -#+ * Node|CompositorNode|CompositorNodeChromaMatte.lift -> lift: float "Alpha lift" -#+ * Node|CompositorNode|CompositorNodeChromaMatte.shadow_adjust -> shadow_adjust: float "Adjusts the brightness of any shadows captured" -#Node|CompositorNode|CompositorNodeChromaMatte.threshold -> threshold: float "Tolerance below which colors will be considered as exact matches" -#Node|CompositorNode|CompositorNodeChromaMatte.tolerance -> tolerance: float "Tolerance for a color to be considered a keying color" -#Node|CompositorNode|CompositorNodeColorBalance.correction_method -> correction_method: enum "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeColorBalance.gain -> gain: float[3] "Correction for Highlights" -#+ * Node|CompositorNode|CompositorNodeColorBalance.gamma -> gamma: float[3] "Correction for Midtones" -#+ * Node|CompositorNode|CompositorNodeColorBalance.lift -> lift: float[3] "Correction for Shadows" -#+ * Node|CompositorNode|CompositorNodeColorBalance.offset -> offset: float[3] "Correction for Shadows" -#+ * Node|CompositorNode|CompositorNodeColorBalance.power -> power: float[3] "Correction for Midtones" -#+ * Node|CompositorNode|CompositorNodeColorBalance.slope -> slope: float[3] "Correction for Highlights" -#Node|CompositorNode|CompositorNodeColorMatte.color_hue -> color_hue: float "Hue tolerance for colors to be considered a keying color" -#Node|CompositorNode|CompositorNodeColorMatte.color_saturation -> color_saturation: float "Saturation Tolerance for the color" -#Node|CompositorNode|CompositorNodeColorMatte.color_value -> color_value: float "Value Tolerance for the color" -#+ * Node|CompositorNode|CompositorNodeColorSpill.channel -> channel: enum "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeColorSpill.limit_channel -> limit_channel: enum "NO DESCRIPTION" -#Node|CompositorNode|CompositorNodeColorSpill.limit_method -> limit_method: enum "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeColorSpill.ratio -> ratio: float "Scale limit by value" -#+ * Node|CompositorNode|CompositorNodeColorSpill.unspill_blue -> unspill_blue: float "Blue spillmap scale" -#+ * Node|CompositorNode|CompositorNodeColorSpill.unspill_green -> unspill_green: float "Green spillmap scale" -#+ * Node|CompositorNode|CompositorNodeColorSpill.unspill_red -> unspill_red: float "Red spillmap scale" -#Node|CompositorNode|CompositorNodeColorSpill.use_unspill -> use_unspill: boolean "Compensate all channels (diffenrently) by hand" -#Node|CompositorNode|CompositorNodeCrop.max_x -> max_x: int "NO DESCRIPTION" -#Node|CompositorNode|CompositorNodeCrop.max_y -> max_y: int "NO DESCRIPTION" -#Node|CompositorNode|CompositorNodeCrop.min_x -> min_x: int "NO DESCRIPTION" -#Node|CompositorNode|CompositorNodeCrop.min_y -> min_y: int "NO DESCRIPTION" -#Node|CompositorNode|CompositorNodeCrop.use_crop_size -> use_crop_size: boolean "Whether to crop the size of the input image" -#+ * Node|CompositorNode|CompositorNodeCurveRGB.mapping -> mapping: pointer, "(read-only)" -#+ * Node|CompositorNode|CompositorNodeCurveVec.mapping -> mapping: pointer, "(read-only)" -#+ * Node|CompositorNode|CompositorNodeDBlur.angle -> angle: float "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeDBlur.center_x -> center_x: float "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeDBlur.center_y -> center_y: float "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeDBlur.distance -> distance: float "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeDBlur.iterations -> iterations: int "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeDBlur.spin -> spin: float "NO DESCRIPTION" -#Node|CompositorNode|CompositorNodeDBlur.use_wrap -> use_wrap: boolean "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeDBlur.zoom -> zoom: float "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeDefocus.angle -> angle: int "Bokeh shape rotation offset in degrees" -#Node|CompositorNode|CompositorNodeDefocus.blur_max -> blur_max: float "blur limit, maximum CoC radius, 0=no limit" -#+ * Node|CompositorNode|CompositorNodeDefocus.bokeh -> bokeh: enum "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeDefocus.f_stop -> f_stop: float "Amount of focal blur, 128=infinity=perfect focus, half the value doubles the blur radius" -#+ * Node|CompositorNode|CompositorNodeDefocus.samples -> samples: int "Number of samples (16=grainy, higher=less noise)" -#+ * Node|CompositorNode|CompositorNodeDefocus.threshold -> threshold: float "CoC radius threshold, prevents background bleed on in-focus midground, 0=off" -#Node|CompositorNode|CompositorNodeDefocus.use_gamma_correction -> use_gamma_correction: boolean "Enable gamma correction before and after main process" -#Node|CompositorNode|CompositorNodeDefocus.use_preview -> use_preview: boolean "Enable sampling mode, useful for preview when using low samplecounts" -#+ * Node|CompositorNode|CompositorNodeDefocus.use_zbuffer -> use_zbuffer: boolean "Disable when using an image as input instead of actual zbuffer (auto enabled if node not image based, eg. time node)" -#+ * Node|CompositorNode|CompositorNodeDefocus.z_scale -> z_scale: float "Scales the Z input when not using a zbuffer, controls maximum blur designated by the color white or input value 1" -#+ * Node|CompositorNode|CompositorNodeDiffMatte.falloff -> falloff: float "Color distances below this additional threshold are partially keyed" -#+ * Node|CompositorNode|CompositorNodeDiffMatte.tolerance -> tolerance: float "Color distances below this threshold are keyed" -#+ * Node|CompositorNode|CompositorNodeDilateErode.distance -> distance: int "Distance to grow/shrink (number of iterations)" -#+ * Node|CompositorNode|CompositorNodeDistanceMatte.falloff -> falloff: float "Color distances below this additional threshold are partially keyed" -#+ * Node|CompositorNode|CompositorNodeDistanceMatte.tolerance -> tolerance: float "Color distances below this threshold are keyed" -#+ * Node|CompositorNode|CompositorNodeFilter.filter_type -> filter_type: enum "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeFlip.axis -> axis: enum "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeGlare.angle_offset -> angle_offset: float "Streak angle offset in degrees" -#+ * Node|CompositorNode|CompositorNodeGlare.color_modulation -> color_modulation: float "Amount of Color Modulation, modulates colors of streaks and ghosts for a spectral dispersion effect" -#+ * Node|CompositorNode|CompositorNodeGlare.fade -> fade: float "Streak fade-out factor" -#+ * Node|CompositorNode|CompositorNodeGlare.glare_type -> glare_type: enum "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeGlare.iterations -> iterations: int "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeGlare.mix -> mix: float "-1 is original image only, 0 is exact 50/50 mix, 1 is processed image only" -#+ * Node|CompositorNode|CompositorNodeGlare.quality -> quality: enum "If not set to high quality, the effect will be applied to a low-res copy of the source image" -#+ * Node|CompositorNode|CompositorNodeGlare.size -> size: int "Glow/glare size (not actual size; relative to initial size of bright area of pixels)" -#+ * Node|CompositorNode|CompositorNodeGlare.streaks -> streaks: int "Total number of streaks" -#+ * Node|CompositorNode|CompositorNodeGlare.threshold -> threshold: float "The glare filter will only be applied to pixels brighter than this value" -#Node|CompositorNode|CompositorNodeGlare.use_rotate_45 -> use_rotate_45: boolean "Simple star filter: add 45 degree rotation offset" -#+ * Node|CompositorNode|CompositorNodeHueCorrect.mapping -> mapping: pointer, "(read-only)" -#Node|CompositorNode|CompositorNodeHueSat.color_hue -> color_hue: float "NO DESCRIPTION" -#Node|CompositorNode|CompositorNodeHueSat.color_saturation -> color_saturation: float "NO DESCRIPTION" -#Node|CompositorNode|CompositorNodeHueSat.color_value -> color_value: float "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeIDMask.index -> index: int "Pass index number to convert to alpha" -#Node|CompositorNode|CompositorNodeImage.frame_duration -> frame_duration: int "Number of images used in animation" -#Node|CompositorNode|CompositorNodeImage.frame_offset -> frame_offset: int "Offsets the number of the frame to use in the animation" -#Node|CompositorNode|CompositorNodeImage.frame_start -> frame_start: int "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeImage.image -> image: pointer "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeImage.layer -> layer: enum "NO DESCRIPTION" -#Node|CompositorNode|CompositorNodeImage.use_auto_refresh -> use_auto_refresh: boolean "NO DESCRIPTION" -#Node|CompositorNode|CompositorNodeImage.use_cyclic -> use_cyclic: boolean "NO DESCRIPTION" -#Node|CompositorNode|CompositorNodeInvert.invert_alpha -> invert_alpha: boolean "NO DESCRIPTION" -#Node|CompositorNode|CompositorNodeInvert.invert_rgb -> invert_rgb: boolean "NO DESCRIPTION" -#Node|CompositorNode|CompositorNodeLensdist.use_fit -> use_fit: boolean "For positive distortion factor only: scale image such that black areas are not visible" -#Node|CompositorNode|CompositorNodeLensdist.use_jitter -> use_jitter: boolean "Enable/disable jittering; faster, but also noisier" -#Node|CompositorNode|CompositorNodeLensdist.use_projector -> use_projector: boolean "Enable/disable projector mode. Effect is applied in horizontal direction only" -#+ * Node|CompositorNode|CompositorNodeLevels.channel -> channel: enum "NO DESCRIPTION" -#Node|CompositorNode|CompositorNodeLumaMatte.limit_max -> limit_max: float "Values higher than this setting are 100% opaque" -#Node|CompositorNode|CompositorNodeLumaMatte.limit_min -> limit_min: float "Values lower than this setting are 100% keyed" -#+ * Node|CompositorNode|CompositorNodeMapUV.alpha -> alpha: int "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeMapValue.max -> max: float[1] "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeMapValue.min -> min: float[1] "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeMapValue.offset -> offset: float[1] "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeMapValue.size -> size: float[1] "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeMapValue.use_max -> use_max: boolean "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeMapValue.use_min -> use_min: boolean "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeMath.operation -> operation: enum "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeMixRGB.blend_type -> blend_type: enum "NO DESCRIPTION" -#Node|CompositorNode|CompositorNodeMixRGB.use_alpha -> use_alpha: boolean "Include alpha of second input in this operation" -#+ * Node|CompositorNode|CompositorNodeOutputFile.exr_codec -> exr_codec: enum "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeOutputFile.filepath -> filepath: string "Output path for the image, same functionality as render output." -#+ * Node|CompositorNode|CompositorNodeOutputFile.frame_end -> frame_end: int "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeOutputFile.frame_start -> frame_start: int "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeOutputFile.image_type -> image_type: enum "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeOutputFile.quality -> quality: int "NO DESCRIPTION" -#Node|CompositorNode|CompositorNodeOutputFile.use_exr_half -> use_exr_half: boolean "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodePremulKey.mapping -> mapping: enum "Conversion between premultiplied alpha and key alpha" -#+ * Node|CompositorNode|CompositorNodeRLayers.layer -> layer: enum "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeRLayers.scene -> scene: pointer "NO DESCRIPTION" -#Node|CompositorNode|CompositorNodeRotate.filter_type -> filter_type: enum "Method to use to filter rotation" -#+ * Node|CompositorNode|CompositorNodeScale.space -> space: enum "Coordinate space to scale relative to" -#+ * Node|CompositorNode|CompositorNodeSplitViewer.axis -> axis: enum "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeSplitViewer.factor -> factor: int "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeTexture.node_output -> node_output: int "For node-based textures, which output node to use" -#+ * Node|CompositorNode|CompositorNodeTexture.texture -> texture: pointer "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeTime.curve -> curve: pointer, "(read-only)" -#Node|CompositorNode|CompositorNodeTime.frame_end -> frame_end: int "NO DESCRIPTION" -#Node|CompositorNode|CompositorNodeTime.frame_start -> frame_start: int "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeTonemap.adaptation -> adaptation: float "If 0, global; if 1, based on pixel intensity" -#+ * Node|CompositorNode|CompositorNodeTonemap.contrast -> contrast: float "Set to 0 to use estimate from input image" -#+ * Node|CompositorNode|CompositorNodeTonemap.correction -> correction: float "If 0, same for all channels; if 1, each independent" -#+ * Node|CompositorNode|CompositorNodeTonemap.gamma -> gamma: float "If not used, set to 1" -#+ * Node|CompositorNode|CompositorNodeTonemap.intensity -> intensity: float "If less than zero, darkens image; otherwise, makes it brighter" -#+ * Node|CompositorNode|CompositorNodeTonemap.key -> key: float "The value the average luminance is mapped to" -#+ * Node|CompositorNode|CompositorNodeTonemap.offset -> offset: float "Normally always 1, but can be used as an extra control to alter the brightness curve" -#+ * Node|CompositorNode|CompositorNodeTonemap.tonemap_type -> tonemap_type: enum "NO DESCRIPTION" -#+ * Node|CompositorNode|CompositorNodeValToRGB.color_ramp -> color_ramp: pointer, "(read-only)" -#+ * Node|CompositorNode|CompositorNodeVecBlur.factor -> factor: float "Scaling factor for motion vectors; actually shutter speed in frames" -#+ * Node|CompositorNode|CompositorNodeVecBlur.samples -> samples: int "NO DESCRIPTION" -#Node|CompositorNode|CompositorNodeVecBlur.speed_max -> speed_max: int "Maximum speed, or zero for none" -#Node|CompositorNode|CompositorNodeVecBlur.speed_min -> speed_min: int "Minimum speed for a pixel to be blurred; used to separate background from foreground" -#Node|CompositorNode|CompositorNodeVecBlur.use_curved -> use_curved: boolean "Interpolate between frames in a bezier curve, rather than linearly" -#+ * Node|NodeGroup.nodetree -> nodetree: pointer "NO DESCRIPTION" -#+ * Node|ShaderNode.type -> type: enum, "(read-only)" -#+ * Node|ShaderNode|ShaderNodeExtendedMaterial.invert_normal -> invert_normal: boolean "Material Node uses inverted normal" -#+ * Node|ShaderNode|ShaderNodeExtendedMaterial.material -> material: pointer "NO DESCRIPTION" -#Node|ShaderNode|ShaderNodeExtendedMaterial.use_diffuse -> use_diffuse: boolean "Material Node outputs Diffuse" -#Node|ShaderNode|ShaderNodeExtendedMaterial.use_specular -> use_specular: boolean "Material Node outputs Specular" -#+ * Node|ShaderNode|ShaderNodeGeometry.color_layer -> color_layer: string "NO DESCRIPTION" -#+ * Node|ShaderNode|ShaderNodeGeometry.uv_layer -> uv_layer: string "NO DESCRIPTION" -#+ * Node|ShaderNode|ShaderNodeMapping.location -> location: float[3] "Location offset for the input coordinate" -#Node|ShaderNode|ShaderNodeMapping.max -> max: float[3] "Maximum value to clamp coordinate to" -#Node|ShaderNode|ShaderNodeMapping.min -> min: float[3] "Minimum value to clamp coordinate to" -#+ * Node|ShaderNode|ShaderNodeMapping.rotation -> rotation: float[3] "Rotation offset for the input coordinate" -#+ * Node|ShaderNode|ShaderNodeMapping.scale -> scale: float[3] "Scale adjustment for the input coordinate" -#Node|ShaderNode|ShaderNodeMapping.use_max -> use_max: boolean "Clamp the output coordinate to a maximum value" -#Node|ShaderNode|ShaderNodeMapping.use_min -> use_min: boolean "Clamp the output coordinate to a minimum value" -#+ * Node|ShaderNode|ShaderNodeMaterial.invert_normal -> invert_normal: boolean "Material Node uses inverted normal" -#+ * Node|ShaderNode|ShaderNodeMaterial.material -> material: pointer "NO DESCRIPTION" -#Node|ShaderNode|ShaderNodeMaterial.use_diffuse -> use_diffuse: boolean "Material Node outputs Diffuse" -#Node|ShaderNode|ShaderNodeMaterial.use_specular -> use_specular: boolean "Material Node outputs Specular" -#+ * Node|ShaderNode|ShaderNodeMath.operation -> operation: enum "NO DESCRIPTION" -#+ * Node|ShaderNode|ShaderNodeMixRGB.blend_type -> blend_type: enum "NO DESCRIPTION" -#Node|ShaderNode|ShaderNodeMixRGB.use_alpha -> use_alpha: boolean "Include alpha of second input in this operation" -#+ * Node|ShaderNode|ShaderNodeRGBCurve.mapping -> mapping: pointer, "(read-only)" -#+ * Node|ShaderNode|ShaderNodeTexture.node_output -> node_output: int "For node-based textures, which output node to use" -#+ * Node|ShaderNode|ShaderNodeTexture.texture -> texture: pointer "NO DESCRIPTION" -#+ * Node|ShaderNode|ShaderNodeValToRGB.color_ramp -> color_ramp: pointer, "(read-only)" -#+ * Node|ShaderNode|ShaderNodeVectorCurve.mapping -> mapping: pointer, "(read-only)" -#+ * Node|ShaderNode|ShaderNodeVectorMath.operation -> operation: enum "NO DESCRIPTION" -#+ * Node|TextureNode.type -> type: enum, "(read-only)" -#+ * Node|TextureNode|TextureNodeBricks.offset -> offset: float "NO DESCRIPTION" -#+ * Node|TextureNode|TextureNodeBricks.offset_frequency -> offset_frequency: int "Offset every N rows" -#+ * Node|TextureNode|TextureNodeBricks.squash -> squash: float "NO DESCRIPTION" -#+ * Node|TextureNode|TextureNodeBricks.squash_frequency -> squash_frequency: int "Squash every N rows" -#+ * Node|TextureNode|TextureNodeCurveRGB.mapping -> mapping: pointer, "(read-only)" -#+ * Node|TextureNode|TextureNodeCurveTime.curve -> curve: pointer, "(read-only)" -#Node|TextureNode|TextureNodeCurveTime.frame_end -> frame_end: int "NO DESCRIPTION" -#Node|TextureNode|TextureNodeCurveTime.frame_start -> frame_start: int "NO DESCRIPTION" -#+ * Node|TextureNode|TextureNodeImage.image -> image: pointer "NO DESCRIPTION" -#+ * Node|TextureNode|TextureNodeMath.operation -> operation: enum "NO DESCRIPTION" -#+ * Node|TextureNode|TextureNodeMixRGB.blend_type -> blend_type: enum "NO DESCRIPTION" -#Node|TextureNode|TextureNodeMixRGB.use_alpha -> use_alpha: boolean "Include alpha of second input in this operation" -#Node|TextureNode|TextureNodeOutput.filepath -> filepath: string "NO DESCRIPTION" -#+ * Node|TextureNode|TextureNodeTexture.node_output -> node_output: int "For node-based textures, which output node to use" -#+ * Node|TextureNode|TextureNodeTexture.texture -> texture: pointer "NO DESCRIPTION" -#+ * Node|TextureNode|TextureNodeValToRGB.color_ramp -> color_ramp: pointer, "(read-only)" -#+ * ObjectBase.layers -> layers: boolean[20] "Layers the object base is on" -#+ * ObjectBase.object -> object: pointer, "(read-only) Object this base links to" -#+ * ObjectBase.select -> select: boolean "Object base selection state" -#+ * ObjectConstraints.active -> active: pointer "Active Object constraint" -#+ * Operator.bl_description -> bl_description: string "NO DESCRIPTION" -#+ * Operator.bl_idname -> bl_idname: string "NO DESCRIPTION" -#+ * Operator.bl_label -> bl_label: string "NO DESCRIPTION" -#+ * Operator.bl_options -> bl_options: enum "Options for this operator type" -#+ * Operator.has_reports -> has_reports: boolean, "(read-only) Operator has a set of reports (warnings and errors) from last execution" -#+ * Operator.layout -> layout: pointer, "(read-only)" -#+ * Operator.name -> name: string, "(read-only)" -#+ * Operator.properties -> properties: pointer, "(read-only)" -#+ * OperatorTypeMacro.properties -> properties: pointer, "(read-only)" -#+ * PackedFile.size -> size: int, "(read-only) Size of packed file in bytes" -#+ * Paint.brush -> brush: pointer "Active Brush" -#+ * Paint.show_brush -> show_brush: boolean "NO DESCRIPTION" -#+ * Paint.show_brush_on_surface -> show_brush_on_surface: boolean "NO DESCRIPTION" -#Paint.show_low_resolution -> show_low_resolution: boolean "For multires, show low resolution while navigating the view" -#+ * Paint|ImagePaint.invert_stencil -> invert_stencil: boolean "Invert the stencil layer" -#+ * Paint|ImagePaint.normal_angle -> normal_angle: int "Paint most on faces pointing towards the view according to this angle" -#+ * Paint|ImagePaint.screen_grab_size -> screen_grab_size: int[2] "Size to capture the image for re-projecting" -#+ * Paint|ImagePaint.seam_bleed -> seam_bleed: int "Extend paint beyond the faces UVs to reduce seams (in pixels, slower)" -#+ * Paint|ImagePaint.show_brush -> show_brush: boolean "Enables brush shape while not drawing" -#+ * Paint|ImagePaint.show_brush_draw -> show_brush_draw: boolean "Enables brush shape while drawing" -#Paint|ImagePaint.use_backface_culling -> use_backface_culling: boolean "Ignore faces pointing away from the view (faster)" -#+ * Paint|ImagePaint.use_clone_layer -> use_clone_layer: boolean "Use another UV layer as clone source, otherwise use 3D the cursor as the source" -#+ * Paint|ImagePaint.use_normal_falloff -> use_normal_falloff: boolean "Paint most on faces pointing towards the view" -#+ * Paint|ImagePaint.use_occlude -> use_occlude: boolean "Only paint onto the faces directly under the brush (slower)" -#+ * Paint|ImagePaint.use_projection -> use_projection: boolean "Use projection painting for improved consistency in the brush strokes" -#+ * Paint|ImagePaint.use_stencil_layer -> use_stencil_layer: boolean "Set the mask layer from the UV layer buttons" -#+ * Paint|Sculpt.lock_x -> lock_x: boolean "Disallow changes to the X axis of vertices" -#+ * Paint|Sculpt.lock_y -> lock_y: boolean "Disallow changes to the Y axis of vertices" -#+ * Paint|Sculpt.lock_z -> lock_z: boolean "Disallow changes to the Z axis of vertices" -#Paint|Sculpt.radial_symmetry -> radial_symmetry: int[3] "Number of times to copy strokes across the surface" -#+ * Paint|Sculpt.use_symmetry_feather -> use_symmetry_feather: boolean "Reduce the strength of the brush where it overlaps symmetrical daubs" -#Paint|Sculpt.use_symmetry_x -> use_symmetry_x: boolean "Mirror brush across the X axis" -#Paint|Sculpt.use_symmetry_y -> use_symmetry_y: boolean "Mirror brush across the Y axis" -#Paint|Sculpt.use_symmetry_z -> use_symmetry_z: boolean "Mirror brush across the Z axis" -#Paint|Sculpt.use_threaded -> use_threaded: boolean "Take advantage of multiple CPU cores to improve sculpting performance" -#Paint|VertexPaint.use_all_faces -> use_all_faces: boolean "Paint on all faces inside brush" -#Paint|VertexPaint.use_normal -> use_normal: boolean "Applies the vertex normal before painting" -#Paint|VertexPaint.use_spray -> use_spray: boolean "Keep applying paint effect while holding mouse" -#+ * Panel.bl_context -> bl_context: string "The context in which the panel belongs to. (TODO: explain the possible combinations bl_context/bl_region_type/bl_space_type)" -#+ * Panel.bl_idname -> bl_idname: string "If this is set, the panel gets a custom ID, otherwise it takes the name of the class used to define the panel. For example, if the class name is OBJECT_PT_hello, and bl_idname is not set by the script, then bl_idname = OBJECT_PT_hello" -#+ * Panel.bl_label -> bl_label: string "The panel label, shows up in the panel header at the right of the triangle used to collapse the panel." -#+ * Panel.bl_region_type -> bl_region_type: enum "The region where the panel is going to be used in." -#+ * Panel.bl_show_header -> bl_show_header: boolean "If set to True, the panel shows a header, which contains a clickable arrow to collapse the panel and the label (see bl_label)." -#+ * Panel.bl_space_type -> bl_space_type: enum "The space where the panel is going to be used in." - + * Panel.bl_default_closed -> bl_use_closed: boolean "Defines if the panel has to be open or collapsed at the time of its creation. Note that once the panel has been created with bl_default_closed = True, at reload (F8) it stays open." -#+ * Panel.layout -> layout: pointer, "(read-only) Defines the structure of the panel in the UI." -#TODO SHOULD THIS BE HERE * Panel.text -> text: string "XXX todo" -#+ * Particle.alive_state -> alive_state: enum "NO DESCRIPTION" -#+ * Particle.angular_velocity -> angular_velocity: float[3] "NO DESCRIPTION" -#Particle.birth_time -> birth_time: float "NO DESCRIPTION" -#+ * Particle.die_time -> die_time: float "NO DESCRIPTION" -#Particle.is_exist -> is_exist: boolean, "(read-only)" -#Particle.is_hair -> is_hair: collection, "(read-only)" -#+ * Particle.is_visible -> is_visible: boolean, "(read-only)" -#+ * Particle.keys -> keys: collection, "(read-only)" -#+ * Particle.lifetime -> lifetime: float "NO DESCRIPTION" -#+ * Particle.location -> location: float[3] "NO DESCRIPTION" -#+ * Particle.prev_angular_velocity -> prev_angular_velocity: float[3] "NO DESCRIPTION" -#+ * Particle.prev_location -> prev_location: float[3] "NO DESCRIPTION" -#+ * Particle.prev_rotation -> prev_rotation: float[4] "NO DESCRIPTION" -#+ * Particle.prev_velocity -> prev_velocity: float[3] "NO DESCRIPTION" -#+ * Particle.rotation -> rotation: float[4] "NO DESCRIPTION" -#+ * Particle.size -> size: float "NO DESCRIPTION" -#+ * Particle.velocity -> velocity: float[3] "NO DESCRIPTION" -#+ * ParticleBrush.count -> count: int "Particle count" -#+ * ParticleBrush.curve -> curve: pointer, "(read-only)" -#+ * ParticleBrush.length_mode -> length_mode: enum "NO DESCRIPTION" -#+ * ParticleBrush.puff_mode -> puff_mode: enum "NO DESCRIPTION" -#+ * ParticleBrush.size -> size: int "Brush size" -#+ * ParticleBrush.steps -> steps: int "Brush steps" -#+ * ParticleBrush.strength -> strength: float "Brush strength" -#+ * ParticleBrush.use_puff_volume -> use_puff_volume: boolean "Apply puff to unselected end-points, (helps maintain hair volume when puffing root)" -#+ * ParticleDupliWeight.count -> count: int "The number of times this object is repeated with respect to other objects" -#+ * ParticleDupliWeight.name -> name: string, "(read-only) Particle dupliobject name" -#+ * ParticleEdit.brush -> brush: pointer, "(read-only)" -#ParticleEdit.default_key_count -> default_key_count: int "How many keys to make new particles with" -#+ * ParticleEdit.draw_step -> draw_step: int "How many steps to draw the path with" -#+ * ParticleEdit.emitter_distance -> emitter_distance: float "Distance to keep particles away from the emitter" -#+ * ParticleEdit.fade_frames -> fade_frames: int "How many frames to fade" -#ParticleEdit.is_editable -> is_editable: boolean, "(read-only) A valid edit mode exists" -#ParticleEdit.is_hair -> is_hair: boolean, "(read-only) Editing hair" -#+ * ParticleEdit.object -> object: pointer, "(read-only) The edited object" -#ParticleEdit.select_mode -> select_mode: enum "Particle select and display mode" -#ParticleEdit.show_particles -> show_particles: boolean "Draw actual particles" -#+ * ParticleEdit.tool -> tool: enum "NO DESCRIPTION" -#+ * ParticleEdit.type -> type: enum "NO DESCRIPTION" -#ParticleEdit.use_auto_velocity -> use_auto_velocity: boolean "Calculate point velocities automatically" -#ParticleEdit.use_default_interpolate -> use_default_interpolate: boolean "Interpolate new particles from the existing ones" -#ParticleEdit.use_emitter_deflect -> use_emitter_deflect: boolean "Keep paths from intersecting the emitter" -#ParticleEdit.use_fade_time -> use_fade_time: boolean "Fade paths and keys further away from current frame" -#ParticleEdit.use_preserve_length -> use_preserve_length: boolean "Keep path lengths constant" -#ParticleEdit.use_preserve_root -> use_preserve_root: boolean "Keep root keys unmodified" -#ParticleHairKey.co -> co: float[3] "Location of the hair key in object space" -#ParticleHairKey.co_hair_space -> co_hair_space: float[3] "Location of the hair key in its internal coordinate system, relative to the emitting face" -#+ * ParticleHairKey.time -> time: float "Relative time of key over hair length" -#+ * ParticleHairKey.weight -> weight: float "Weight for cloth simulation" -#+ * ParticleKey.angular_velocity -> angular_velocity: float[3] "Key angular velocity" -#+ * ParticleKey.location -> location: float[3] "Key location" -#+ * ParticleKey.rotation -> rotation: float[4] "Key rotation quaterion" -#+ * ParticleKey.time -> time: float "Time of key over the simulation" -#+ * ParticleKey.velocity -> velocity: float[3] "Key velocity" -#+ * ParticleSystem.active_particle_target -> active_particle_target: pointer, "(read-only)" -#+ * ParticleSystem.active_particle_target_index -> active_particle_target_index: int "NO DESCRIPTION" -#+ * ParticleSystem.billboard_normal_uv -> billboard_normal_uv: string "UV Layer to control billboard normals" -#+ * ParticleSystem.billboard_split_uv -> billboard_split_uv: string "UV Layer to control billboard splitting" -#+ * ParticleSystem.billboard_time_index_uv -> billboard_time_index_uv: string "UV Layer to control billboard time index (X-Y)" -#+ * ParticleSystem.child_particles -> child_particles: collection, "(read-only) Child particles generated by the particle system" -#+ * ParticleSystem.cloth -> cloth: pointer, "(read-only) Cloth dynamics for hair" -#ParticleSystem.has_multiple_caches -> has_multiple_caches: boolean, "(read-only) Particle system has multiple point caches" -#ParticleSystem.invert_vertex_group_clump -> invert_vertex_group_clump: boolean "Negate the effect of the clump vertex group" -#ParticleSystem.invert_vertex_group_density -> invert_vertex_group_density: boolean "Negate the effect of the density vertex group" -#ParticleSystem.invert_vertex_group_field -> invert_vertex_group_field: boolean "Negate the effect of the field vertex group" -#ParticleSystem.invert_vertex_group_kink -> invert_vertex_group_kink: boolean "Negate the effect of the kink vertex group" -#ParticleSystem.invert_vertex_group_length -> invert_vertex_group_length: boolean "Negate the effect of the length vertex group" -#ParticleSystem.invert_vertex_group_rotation -> invert_vertex_group_rotation: boolean "Negate the effect of the rotation vertex group" -#ParticleSystem.invert_vertex_group_roughness_1 -> invert_vertex_group_roughness_1: boolean "Negate the effect of the roughness 1 vertex group" -#ParticleSystem.invert_vertex_group_roughness_2 -> invert_vertex_group_roughness_2: boolean "Negate the effect of the roughness 2 vertex group" -#ParticleSystem.invert_vertex_group_roughness_end -> invert_vertex_group_roughness_end: boolean "Negate the effect of the roughness end vertex group" -#ParticleSystem.invert_vertex_group_size -> invert_vertex_group_size: boolean "Negate the effect of the size vertex group" -#ParticleSystem.invert_vertex_group_tangent -> invert_vertex_group_tangent: boolean "Negate the effect of the tangent vertex group" -#ParticleSystem.invert_vertex_group_velocity -> invert_vertex_group_velocity: boolean "Negate the effect of the velocity vertex group" -#ParticleSystem.is_editable -> is_editable: boolean, "(read-only) Particle system can be edited in particle mode" -#ParticleSystem.is_edited -> is_edited: boolean, "(read-only) Particle system has been edited in particle mode" -#ParticleSystem.is_global_hair -> is_global_hair: boolean, "(read-only) Hair keys are in global coordinate space" -#+ * ParticleSystem.name -> name: string "Particle system name" -#+ * ParticleSystem.parent -> parent: pointer "Use this objects coordinate system instead of global coordinate system" -#+ * ParticleSystem.particles -> particles: collection, "(read-only) Particles generated by the particle system" -#+ * ParticleSystem.point_cache -> point_cache: pointer, "(read-only)" -#+ * ParticleSystem.reactor_target_object -> reactor_target_object: pointer "For reactor systems, the object that has the target particle system (empty if same object)" -#+ * ParticleSystem.reactor_target_particle_system -> reactor_target_particle_system: int "For reactor systems, index of particle system on the target object" -#+ * ParticleSystem.seed -> seed: int "Offset in the random number table, to get a different randomized result" -#+ * ParticleSystem.settings -> settings: pointer "Particle system settings" -#+ * ParticleSystem.targets -> targets: collection, "(read-only) Target particle systems" -#ParticleSystem.use_hair_dynamics -> use_hair_dynamics: boolean "Enable hair dynamics using cloth simulation" -#ParticleSystem.use_keyed_timing -> use_keyed_timing: boolean "Use key times" -#+ * ParticleSystem.vertex_group_clump -> vertex_group_clump: string "Vertex group to control clump" -#+ * ParticleSystem.vertex_group_density -> vertex_group_density: string "Vertex group to control density" -#+ * ParticleSystem.vertex_group_field -> vertex_group_field: string "Vertex group to control field" -#+ * ParticleSystem.vertex_group_kink -> vertex_group_kink: string "Vertex group to control kink" -#+ * ParticleSystem.vertex_group_length -> vertex_group_length: string "Vertex group to control length" -#+ * ParticleSystem.vertex_group_rotation -> vertex_group_rotation: string "Vertex group to control rotation" -#ParticleSystem.vertex_group_roughness_1 -> vertex_group_roughness_1: string "Vertex group to control roughness 1" -#ParticleSystem.vertex_group_roughness_2 -> vertex_group_roughness_2: string "Vertex group to control roughness 2" -#+ * ParticleSystem.vertex_group_roughness_end -> vertex_group_roughness_end: string "Vertex group to control roughness end" -#+ * ParticleSystem.vertex_group_size -> vertex_group_size: string "Vertex group to control size" -#+ * ParticleSystem.vertex_group_tangent -> vertex_group_tangent: string "Vertex group to control tangent" -#+ * ParticleSystem.vertex_group_velocity -> vertex_group_velocity: string "Vertex group to control velocity" -#ParticleTarget.alliance -> alliance: enum "NO DESCRIPTION" -#+ * ParticleTarget.duration -> duration: float "NO DESCRIPTION" -#ParticleTarget.is_valid -> is_valid: boolean "Keyed particles target is valid" -#+ * ParticleTarget.name -> name: string, "(read-only) Particle target name" -#+ * ParticleTarget.object -> object: pointer "The object that has the target particle system (empty if same object)" -#+ * ParticleTarget.system -> system: int "The index of particle system on the target object" -#+ * ParticleTarget.time -> time: float "NO DESCRIPTION" -#+ * PointCache.active_point_cache_index -> active_point_cache_index: int "NO DESCRIPTION" -#+ * PointCache.filepath -> filepath: string "Cache file path" -#+ * PointCache.frame_end -> frame_end: int "Frame on which the simulation stops" -#+ * PointCache.frame_start -> frame_start: int "Frame on which the simulation starts" -#PointCache.frame_step -> frame_step: int "Number of frames between cached frames" -#+ * PointCache.frames_skipped -> frames_skipped: boolean, "(read-only)" -#+ * PointCache.index -> index: int "Index number of cache files" -#+ * PointCache.info -> info: string, "(read-only) Info on current cache status" -#PointCache.is_baked -> is_baked: boolean, "(read-only)" -#PointCache.is_baking -> is_baking: boolean, "(read-only)" -#PointCache.is_outdated -> is_outdated: boolean, "(read-only)" -#+ * PointCache.name -> name: string "Cache name" -#PointCache.point_caches -> point_caches: collection, "(read-only) Point cache list" -#PointCache.use_disk_cache -> use_disk_cache: boolean "Save cache files to disk (.blend file must be saved first)" -#PointCache.use_external -> use_external: boolean "Read cache from an external location" -#+ * PointCache.use_library_path -> use_library_path: boolean "Use this files path when library linked into another file." -#PointCache.use_quick_cache -> use_quick_cache: boolean "Update simulation with cache steps" -#+ * PointDensity.color_ramp -> color_ramp: pointer, "(read-only)" -#+ * PointDensity.color_source -> color_source: enum "Data to derive color results from" -#+ * PointDensity.falloff -> falloff: enum "Method of attenuating density by distance from the point" -#PointDensity.falloff_soft -> falloff_soft: float "Softness of the soft falloff option" -#+ * PointDensity.noise_basis -> noise_basis: enum "Noise formula used for turbulence" -#+ * PointDensity.object -> object: pointer "Object to take point data from" -#PointDensity.particle_cache_space -> particle_cache_space: enum "Co-ordinate system to cache particles in" -#+ * PointDensity.particle_system -> particle_system: pointer "Particle System to render as points" -#+ * PointDensity.point_source -> point_source: enum "Point data to use as renderable point density" -#+ * PointDensity.radius -> radius: float "Radius from the shaded sample to look for points within" -#+ * PointDensity.speed_scale -> speed_scale: float "Multiplier to bring particle speed within an acceptable range" -#+ * PointDensity.turbulence_depth -> turbulence_depth: int "Level of detail in the added turbulent noise" -#+ * PointDensity.turbulence_influence -> turbulence_influence: enum "Method for driving added turbulent noise" -#PointDensity.turbulence_scale -> turbulence_scale: float "Scale of the added turbulent noise" -#+ * PointDensity.turbulence_strength -> turbulence_strength: float "NO DESCRIPTION" -#PointDensity.use_turbulence -> use_turbulence: boolean "Add directed noise to the density at render-time" -#PointDensity.vertex_cache_space -> vertex_cache_space: enum "Co-ordinate system to cache vertices in" -#+ * Pose.active_bone_group_index -> active_bone_group_index: int "Active index in bone groups array" -#+ * Pose.animation_visualisation -> animation_visualisation: pointer, "(read-only) Animation data for this datablock" -#+ * Pose.bone_groups -> bone_groups: collection, "(read-only) Groups of the bones" -#+ * Pose.bones -> bones: collection, "(read-only) Individual pose bones for the armature" -#+ * Pose.ik_param -> ik_param: pointer, "(read-only) Parameters for IK solver" -#+ * Pose.ik_solver -> ik_solver: enum "Selection of IK solver for IK chain, current choice is 0 for Legacy, 1 for iTaSC" -#+ * PoseBone.bone -> bone: pointer, "(read-only) Bone associated with this PoseBone" -#+ * PoseBone.bone_group -> bone_group: pointer "Bone Group this pose channel belongs to" -#+ * PoseBone.bone_group_index -> bone_group_index: int "Bone Group this pose channel belongs to (0=no group)" -#+ * PoseBone.child -> child: pointer, "(read-only) Child of this pose bone" -#+ * PoseBone.constraints -> constraints: collection, "(read-only) Constraints that act on this PoseChannel" -#+ * PoseBone.custom_shape -> custom_shape: pointer "Object that defines custom draw type for this bone" -#+ * PoseBone.custom_shape_transform -> custom_shape_transform: pointer "Bone that defines the display transform of this custom shape" -#+ * PoseBone.head -> head: float[3], "(read-only) Location of head of the channels bone" -#PoseBone.ik_linear_weight -> ik_linear_weight: float "Weight of scale constraint for IK" -#+ * PoseBone.ik_max_x -> ik_max_x: float "Maximum angles for IK Limit" -#+ * PoseBone.ik_max_y -> ik_max_y: float "Maximum angles for IK Limit" -#+ * PoseBone.ik_max_z -> ik_max_z: float "Maximum angles for IK Limit" -#+ * PoseBone.ik_min_x -> ik_min_x: float "Minimum angles for IK Limit" -#+ * PoseBone.ik_min_y -> ik_min_y: float "Minimum angles for IK Limit" -#+ * PoseBone.ik_min_z -> ik_min_z: float "Minimum angles for IK Limit" -#PoseBone.ik_rotation_weight -> ik_rotation_weight: float "Weight of rotation constraint for IK" -#+ * PoseBone.ik_stiffness_x -> ik_stiffness_x: float "IK stiffness around the X axis" -#+ * PoseBone.ik_stiffness_y -> ik_stiffness_y: float "IK stiffness around the Y axis" -#+ * PoseBone.ik_stiffness_z -> ik_stiffness_z: float "IK stiffness around the Z axis" -#+ * PoseBone.ik_stretch -> ik_stretch: float "Allow scaling of the bone for IK" -#PoseBone.is_in_ik_chain -> is_in_ik_chain: boolean, "(read-only) Is part of an IK chain" -#+ * PoseBone.location -> location: float[3] "NO DESCRIPTION" -#PoseBone.lock_ik_x -> lock_ik_x: boolean "Disallow movement around the X axis" -#PoseBone.lock_ik_y -> lock_ik_y: boolean "Disallow movement around the Y axis" -#PoseBone.lock_ik_z -> lock_ik_z: boolean "Disallow movement around the Z axis" -#+ * PoseBone.lock_location -> lock_location: boolean[3] "Lock editing of location in the interface" -#+ * PoseBone.lock_rotation -> lock_rotation: boolean[3] "Lock editing of rotation in the interface" -#+ * PoseBone.lock_rotation_w -> lock_rotation_w: boolean "Lock editing of angle component of four-component rotations in the interface" -#+ * PoseBone.lock_rotations_4d -> lock_rotations_4d: boolean "Lock editing of four component rotations by components (instead of as Eulers)" -#+ * PoseBone.lock_scale -> lock_scale: boolean[3] "Lock editing of scale in the interface" -#+ * PoseBone.matrix -> matrix: float[16], "(read-only) Final 4x4 matrix for this channel" -#+ * PoseBone.matrix_channel -> matrix_channel: float[16], "(read-only) 4x4 matrix, before constraints" -#+ * PoseBone.matrix_local -> matrix_local: float[16] "Matrix representing the parent relative location, scale and rotation. Provides an alternative access to these properties." -#+ * PoseBone.motion_path -> motion_path: pointer, "(read-only) Motion Path for this element" -#+ * PoseBone.name -> name: string "NO DESCRIPTION" -#+ * PoseBone.parent -> parent: pointer, "(read-only) Parent of this pose bone" -#+ * PoseBone.rotation_axis_angle -> rotation_axis_angle: float[4] "Angle of Rotation for Axis-Angle rotation representation" -#+ * PoseBone.rotation_euler -> rotation_euler: float[3] "Rotation in Eulers" -#+ * PoseBone.rotation_mode -> rotation_mode: enum "NO DESCRIPTION" -#+ * PoseBone.rotation_quaternion -> rotation_quaternion: float[4] "Rotation in Quaternions" -#+ * PoseBone.scale -> scale: float[3] "NO DESCRIPTION" -#+ * PoseBone.select -> select: boolean "NO DESCRIPTION" -#+ * PoseBone.tail -> tail: float[3], "(read-only) Location of tail of the channels bone" -#PoseBone.use_ik_limit_x -> use_ik_limit_x: boolean "Limit movement around the X axis" -#PoseBone.use_ik_limit_y -> use_ik_limit_y: boolean "Limit movement around the Y axis" -#PoseBone.use_ik_limit_z -> use_ik_limit_z: boolean "Limit movement around the Z axis" -#PoseBone.use_ik_linear_control -> use_ik_linear_control: boolean "Apply channel size as IK constraint if stretching is enabled" -#PoseBone.use_ik_rotation_control -> use_ik_rotation_control: boolean "Apply channel rotation as IK constraint" -#+ * PoseBoneConstraints.active -> active: pointer "Active PoseChannel constraint" -#+ * Property.description -> description: string, "(read-only) Description of the property for tooltips" -#+ * Property.identifier -> identifier: string, "(read-only) Unique name used in the code and scripting" -#+ * Property.is_never_none -> is_never_none: boolean, "(read-only) True when this value cant be set to None" -#Property.is_output -> is_output: boolean, "(read-only) True when this property is an output value from an RNA function" -#+ * Property.is_readonly -> is_readonly: boolean, "(read-only) Property is editable through RNA" -#Property.is_registered -> is_registered: boolean, "(read-only) Property is registered as part of type registration" -#Property.is_registered_optional -> is_registered_optional: boolean, "(read-only) Property is optionally registered as part of type registration" -#+ * Property.is_required -> is_required: boolean, "(read-only) False when this property is an optional argument in an RNA function" -#+ * Property.name -> name: string, "(read-only) Human readable name" -#+ * Property.srna -> srna: pointer, "(read-only) Struct definition used for properties assigned to this item" -#+ * Property.subtype -> subtype: enum, "(read-only) Semantic interpretation of the property" -#+ * Property.type -> type: enum, "(read-only) Data type of the property" -#+ * Property.unit -> unit: enum, "(read-only) Type of units for this property" -#+ * Property|BooleanProperty.array_length -> array_length: int, "(read-only) Maximum length of the array, 0 means unlimited" -#+ * Property|BooleanProperty.default -> default: boolean, "(read-only) Default value for this number" -#+ * Property|BooleanProperty.default_array -> default_array: boolean[3], "(read-only) Default value for this array" -#+ * Property|CollectionProperty.fixed_type -> fixed_type: pointer, "(read-only) Fixed pointer type, empty if variable type" -#+ * Property|EnumProperty.default -> default: enum, "(read-only) Default value for this enum" -#+ * Property|EnumProperty.items -> items: collection, "(read-only) Possible values for the property" -#+ * Property|FloatProperty.array_length -> array_length: int, "(read-only) Maximum length of the array, 0 means unlimited" -#+ * Property|FloatProperty.default -> default: float, "(read-only) Default value for this number" -#+ * Property|FloatProperty.default_array -> default_array: float[3], "(read-only) Default value for this array" -#+ * Property|FloatProperty.hard_max -> hard_max: float, "(read-only) Maximum value used by buttons" -#+ * Property|FloatProperty.hard_min -> hard_min: float, "(read-only) Minimum value used by buttons" -#+ * Property|FloatProperty.precision -> precision: int, "(read-only) Number of digits after the dot used by buttons" -#+ * Property|FloatProperty.soft_max -> soft_max: float, "(read-only) Maximum value used by buttons" -#+ * Property|FloatProperty.soft_min -> soft_min: float, "(read-only) Minimum value used by buttons" -#+ * Property|FloatProperty.step -> step: float, "(read-only) Step size used by number buttons, for floats 1/100th of the step size" -#+ * Property|IntProperty.array_length -> array_length: int, "(read-only) Maximum length of the array, 0 means unlimited" -#+ * Property|IntProperty.default -> default: int, "(read-only) Default value for this number" -#+ * Property|IntProperty.default_array -> default_array: int[3], "(read-only) Default value for this array" -#+ * Property|IntProperty.hard_max -> hard_max: int, "(read-only) Maximum value used by buttons" -#+ * Property|IntProperty.hard_min -> hard_min: int, "(read-only) Minimum value used by buttons" -#+ * Property|IntProperty.soft_max -> soft_max: int, "(read-only) Maximum value used by buttons" -#+ * Property|IntProperty.soft_min -> soft_min: int, "(read-only) Minimum value used by buttons" -#+ * Property|IntProperty.step -> step: int, "(read-only) Step size used by number buttons, for floats 1/100th of the step size" -#+ * Property|PointerProperty.fixed_type -> fixed_type: pointer, "(read-only) Fixed pointer type, empty if variable type" -#+ * Property|StringProperty.default -> default: string, "(read-only) string default value" -#Property|StringProperty.length_max -> length_max: int, "(read-only) Maximum length of the string, 0 means unlimited" -#+ * RGBANodeSocket.default_value -> default_value: float[4] "Default value of the socket when no link is attached" -#+ * RGBANodeSocket.name -> name: string, "(read-only) Socket name" -#+ * Region.height -> height: int, "(read-only) Region height" -#+ * Region.id -> id: int, "(read-only) Unique ID for this region" -#+ * Region.type -> type: enum, "(read-only) Type of this region" -#+ * Region.width -> width: int, "(read-only) Region width" -#+ * RegionView3D.lock_rotation -> lock_rotation: boolean "Lock view rotation in side views" -#+ * RegionView3D.perspective_matrix -> perspective_matrix: float[16], "(read-only) Current perspective matrix of the 3D region" -#RegionView3D.show_sync_view -> show_sync_view: boolean "Sync view position between side views" -#RegionView3D.use_box_clip -> use_box_clip: boolean "Clip objects based on whats visible in other side views" -#+ * RegionView3D.view_distance -> view_distance: float "Distance to the view location" -#+ * RegionView3D.view_location -> view_location: float[3] "View pivot location" -#+ * RegionView3D.view_matrix -> view_matrix: float[16], "(read-only) Current view matrix of the 3D region" -#+ * RegionView3D.view_perspective -> view_perspective: enum "View Perspective" -#RegionView3D.view_rotate_method -> view_rotate_method: float[4] "Rotation in quaternions (keep normalized)" -#+ * RenderEngine.bl_idname -> bl_idname: string "NO DESCRIPTION" -#+ * RenderEngine.bl_label -> bl_label: string "NO DESCRIPTION" -#RenderEngine.bl_use_postprocess -> bl_use_postprocess: boolean "NO DESCRIPTION" -#RenderEngine.bl_use_preview -> bl_use_preview: boolean "NO DESCRIPTION" -#RenderLayer.exclude_ambient_occlusion -> exclude_ambient_occlusion: boolean, "(read-only) Exclude AO pass from combined" -#RenderLayer.exclude_emit -> exclude_emit: boolean, "(read-only) Exclude emission pass from combined" -#RenderLayer.exclude_environment -> exclude_environment: boolean, "(read-only) Exclude environment pass from combined" -#RenderLayer.exclude_indirect -> exclude_indirect: boolean, "(read-only) Exclude indirect pass from combined" -#RenderLayer.exclude_reflection -> exclude_reflection: boolean, "(read-only) Exclude raytraced reflection pass from combined" -#RenderLayer.exclude_refraction -> exclude_refraction: boolean, "(read-only) Exclude raytraced refraction pass from combined" -#RenderLayer.exclude_shadow -> exclude_shadow: boolean, "(read-only) Exclude shadow pass from combined" -#RenderLayer.exclude_specular -> exclude_specular: boolean, "(read-only) Exclude specular pass from combined" -#RenderLayer.invert_zmask -> invert_zmask: boolean, "(read-only) For Zmask, only render what is behind solid z values instead of in front" -#RenderLayer.layers -> layers: boolean[20], "(read-only) Scene layers included in this render layer" -#RenderLayer.layers_zmask -> layers_zmask: boolean[20], "(read-only) Zmask scene layers" -#+ * RenderLayer.light_override -> light_override: pointer, "(read-only) Group to override all other lights in this render layer" -#+ * RenderLayer.material_override -> material_override: pointer, "(read-only) Material to override all other materials in this render layer" -#+ * RenderLayer.name -> name: string, "(read-only) Render layer name" -#+ * RenderLayer.passes -> passes: collection, "(read-only)" -#+ * RenderLayer.rect -> rect: float "NO DESCRIPTION" -#+ * RenderLayer.use -> use: boolean, "(read-only) Disable or enable the render layer" -#RenderLayer.use_all_z -> use_all_z: boolean, "(read-only) Fill in Z values for solid faces in invisible layers, for masking" -#RenderLayer.use_edge_enhance -> use_edge_enhance: boolean, "(read-only) Render Edge-enhance in this Layer (only works for Solid faces)" -#RenderLayer.use_halo -> use_halo: boolean, "(read-only) Render Halos in this Layer (on top of Solid)" -#RenderLayer.use_pass_ambient_occlusion -> use_pass_ambient_occlusion: boolean, "(read-only) Deliver AO pass" -#RenderLayer.use_pass_color -> use_pass_color: boolean, "(read-only) Deliver shade-less color pass" -#RenderLayer.use_pass_combined -> use_pass_combined: boolean, "(read-only) Deliver full combined RGBA buffer" -#RenderLayer.use_pass_diffuse -> use_pass_diffuse: boolean, "(read-only) Deliver diffuse pass" -#RenderLayer.use_pass_emit -> use_pass_emit: boolean, "(read-only) Deliver emission pass" -#RenderLayer.use_pass_environment -> use_pass_environment: boolean, "(read-only) Deliver environment lighting pass" -#RenderLayer.use_pass_indirect -> use_pass_indirect: boolean, "(read-only) Deliver indirect lighting pass" -#RenderLayer.use_pass_mist -> use_pass_mist: boolean, "(read-only) Deliver mist factor pass (0.0-1.0)" -#RenderLayer.use_pass_normal -> use_pass_normal: boolean, "(read-only) Deliver normal pass" -#RenderLayer.use_pass_object_index -> use_pass_object_index: boolean, "(read-only) Deliver object index pass" -#RenderLayer.use_pass_reflection -> use_pass_reflection: boolean, "(read-only) Deliver raytraced reflection pass" -#RenderLayer.use_pass_refraction -> use_pass_refraction: boolean, "(read-only) Deliver raytraced refraction pass" -#RenderLayer.use_pass_shadow -> use_pass_shadow: boolean, "(read-only) Deliver shadow pass" -#RenderLayer.use_pass_specular -> use_pass_specular: boolean, "(read-only) Deliver specular pass" -#RenderLayer.use_pass_uv -> use_pass_uv: boolean, "(read-only) Deliver texture UV pass" -#RenderLayer.use_pass_vector -> use_pass_vector: boolean, "(read-only) Deliver speed vector pass" -#RenderLayer.use_pass_z -> use_pass_z: boolean, "(read-only) Deliver Z values pass" -#RenderLayer.use_sky -> use_sky: boolean, "(read-only) Render Sky in this Layer" -#RenderLayer.use_solid -> use_solid: boolean, "(read-only) Render Solid faces in this Layer" -#RenderLayer.use_strand -> use_strand: boolean, "(read-only) Render Strands in this Layer" -#RenderLayer.use_zmask -> use_zmask: boolean, "(read-only) Only render whats in front of the solid z values" -#RenderLayer.use_ztransp -> use_ztransp: boolean, "(read-only) Render Z-Transparent faces in this Layer (On top of Solid and Halos)" -#+ * RenderPass.channel_id -> channel_id: string, "(read-only)" -#+ * RenderPass.channels -> channels: int, "(read-only)" -#+ * RenderPass.name -> name: string, "(read-only)" -#+ * RenderPass.rect -> rect: float "NO DESCRIPTION" -#+ * RenderPass.type -> type: enum, "(read-only)" -#+ * RenderResult.layers -> layers: collection, "(read-only)" -#+ * RenderResult.resolution_x -> resolution_x: int, "(read-only)" -#+ * RenderResult.resolution_y -> resolution_y: int, "(read-only)" -#+ * RenderSettings.active_layer_index -> active_layer_index: int "Active index in render layer array" -#+ * RenderSettings.alpha_mode -> alpha_mode: enum "Representation of alpha information in the RGBA pixels" -#+ * RenderSettings.antialiasing_samples -> antialiasing_samples: enum "Amount of anti-aliasing samples per pixel" -#+ * RenderSettings.bake_aa_mode -> bake_aa_mode: enum "NO DESCRIPTION" -#+ * RenderSettings.bake_bias -> bake_bias: float "Bias towards faces further away from the object (in blender units)" -#+ * RenderSettings.bake_distance -> bake_distance: float "Maximum distance from active object to other object (in blender units" -#+ * RenderSettings.bake_margin -> bake_margin: int "Amount of pixels to extend the baked result with, as post process filter" -#+ * RenderSettings.bake_normal_space -> bake_normal_space: enum "Choose normal space for baking" -#+ * RenderSettings.bake_quad_split -> bake_quad_split: enum "Choose the method used to split a quad into 2 triangles for baking" -#+ * RenderSettings.bake_type -> bake_type: enum "Choose shading information to bake into the image" -#+ * RenderSettings.border_max_x -> border_max_x: float "Sets maximum X value for the render border" -#+ * RenderSettings.border_max_y -> border_max_y: float "Sets maximum Y value for the render border" -#+ * RenderSettings.border_min_x -> border_min_x: float "Sets minimum X value to for the render border" -#+ * RenderSettings.border_min_y -> border_min_y: float "Sets minimum Y value for the render border" -#+ * RenderSettings.cineon_black -> cineon_black: int "Log conversion reference blackpoint" -#+ * RenderSettings.cineon_gamma -> cineon_gamma: float "Log conversion gamma" -#+ * RenderSettings.cineon_white -> cineon_white: int "Log conversion reference whitepoint" -#+ * RenderSettings.color_mode -> color_mode: enum "Choose BW for saving greyscale images, RGB for saving red, green and blue channels, AND RGBA for saving red, green, blue + alpha channels" -#+ * RenderSettings.display_mode -> display_mode: enum "Select where rendered images will be displayed" -#+ * RenderSettings.dither_intensity -> dither_intensity: float "Amount of dithering noise added to the rendered image to break up banding" -#+ * RenderSettings.edge_color -> edge_color: float[3] "NO DESCRIPTION" -#+ * RenderSettings.edge_threshold -> edge_threshold: int "Threshold for drawing outlines on geometry edges" -#+ * RenderSettings.engine -> engine: enum "Engine to use for rendering" -#+ * RenderSettings.field_order -> field_order: enum "Order of video fields. Select which lines get rendered first, to create smooth motion for TV output" -#+ * RenderSettings.file_extension -> file_extension: string, "(read-only) The file extension used for saving renders" -#+ * RenderSettings.file_format -> file_format: enum "File format to save the rendered images as" -#+ * RenderSettings.file_quality -> file_quality: int "Quality of JPEG images, AVI Jpeg and SGI movies, Compression for PNGs" -#RenderSettings.filepath -> filepath: string "Directory/name to save animations, # characters defines the position and length of frame numbers" -#+ * RenderSettings.filter_size -> filter_size: float "Pixel width over which the reconstruction filter combines samples" -#+ * RenderSettings.fps -> fps: int "Framerate, expressed in frames per second" -#+ * RenderSettings.fps_base -> fps_base: float "Framerate base" -#RenderSettings.has_multiple_engines -> has_multiple_engines: boolean, "(read-only) More than one rendering engine is available" -#+ * RenderSettings.is_movie_format -> is_movie_format: boolean, "(read-only) When true the format is a movie" -#+ * RenderSettings.layers -> layers: collection, "(read-only)" -#+ * RenderSettings.motion_blur_samples -> motion_blur_samples: int "Number of scene samples to take with motion blur" -#+ * RenderSettings.motion_blur_shutter -> motion_blur_shutter: float "Time taken in frames between shutter open and close" -#+ * RenderSettings.octree_resolution -> octree_resolution: enum "Resolution of raytrace accelerator. Use higher resolutions for larger scenes" -#+ * RenderSettings.parts_x -> parts_x: int "Number of horizontal tiles to use while rendering" -#+ * RenderSettings.parts_y -> parts_y: int "Number of vertical tiles to use while rendering" -#+ * RenderSettings.pixel_aspect_x -> pixel_aspect_x: float "Horizontal aspect ratio - for anamorphic or non-square pixel output" -#+ * RenderSettings.pixel_aspect_y -> pixel_aspect_y: float "Vertical aspect ratio - for anamorphic or non-square pixel output" -#RenderSettings.pixel_filter_type -> pixel_filter_type: enum "Reconstruction filter used for combining anti-aliasing samples" -#RenderSettings.raytrace_method -> raytrace_method: enum "Type of raytrace accelerator structure" -#+ * RenderSettings.resolution_percentage -> resolution_percentage: int "Percentage scale for render resolution" -#+ * RenderSettings.resolution_x -> resolution_x: int "Number of horizontal pixels in the rendered image" -#+ * RenderSettings.resolution_y -> resolution_y: int "Number of vertical pixels in the rendered image" -#+ * RenderSettings.sequencer_gl_preview -> sequencer_gl_preview: enum "Method to draw in the sequencer view" -#+ * RenderSettings.sequencer_gl_render -> sequencer_gl_render: enum "Method to draw in the sequencer view" -#+ * RenderSettings.simplify_ao_sss -> simplify_ao_sss: float "Global approximate AA and SSS quality factor" -#+ * RenderSettings.simplify_child_particles -> simplify_child_particles: float "Global child particles percentage" -#+ * RenderSettings.simplify_shadow_samples -> simplify_shadow_samples: int "Global maximum shadow samples" -#+ * RenderSettings.simplify_subdivision -> simplify_subdivision: int "Global maximum subdivision level" -#+ * RenderSettings.stamp_background -> stamp_background: float[4] "Color to use behind stamp text" -#+ * RenderSettings.stamp_font_size -> stamp_font_size: int "Size of the font used when rendering stamp text" -#+ * RenderSettings.stamp_foreground -> stamp_foreground: float[4] "Color to use for stamp text" -#+ * RenderSettings.stamp_note_text -> stamp_note_text: string "Custom text to appear in the stamp note" -#+ * RenderSettings.threads -> threads: int "Number of CPU threads to use simultaneously while rendering (for multi-core/CPU systems)" -#+ * RenderSettings.threads_mode -> threads_mode: enum "Determine the amount of render threads used" -#RenderSettings.use_antialiasing -> use_antialiasing: boolean "Render and combine multiple samples per pixel to prevent jagged edges" -#RenderSettings.use_backbuf -> use_backbuf: boolean "Render backbuffer image" -#RenderSettings.use_bake_antialiasing -> use_bake_antialiasing: boolean "Enables Anti-aliasing" -#RenderSettings.use_bake_clear -> use_bake_clear: boolean "Clear Images before baking" -#RenderSettings.use_bake_normalize -> use_bake_normalize: boolean "With displacement normalize to the distance, with ambient occlusion normalize without using material settings" -#RenderSettings.use_bake_selected_to_active -> use_bake_selected_to_active: boolean "Bake shading on the surface of selected objects to the active object" -#+ * RenderSettings.use_border -> use_border: boolean "Render a user-defined border region, within the frame size. Note, this disables save_buffers and full_sample" -#RenderSettings.use_cineon_log -> use_cineon_log: boolean "Convert to logarithmic color space" -#RenderSettings.use_color_management -> use_color_management: boolean "Use linear workflow - gamma corrected imaging pipeline" -#+ * RenderSettings.use_compositing -> use_compositing: boolean "Process the render result through the compositing pipeline, if compositing nodes are enabled" -#RenderSettings.use_crop_to_border -> use_crop_to_border: boolean "Crop the rendered frame to the defined border size" -#RenderSettings.use_edge_enhance -> use_edge_enhance: boolean "Create a toon outline around the edges of geometry" -#+ * RenderSettings.use_envmaps -> use_envmaps: boolean "Calculate environment maps while rendering" -#RenderSettings.use_fields -> use_fields: boolean "Render image to two fields per frame, for interlaced TV output" -#RenderSettings.use_fields_still -> use_fields_still: boolean "Disable the time difference between fields" -#+ * RenderSettings.use_file_extension -> use_file_extension: boolean "Add the file format extensions to the rendered file name (eg: filename + .jpg)" -#RenderSettings.use_free_image_textures -> use_free_image_textures: boolean "Free all image texture from memory after render, to save memory before compositing" -#RenderSettings.use_free_unused_nodes -> use_free_unused_nodes: boolean "Free Nodes that are not used while compositing, to save memory" -#RenderSettings.use_full_sample -> use_full_sample: boolean "Save for every anti-aliasing sample the entire RenderLayer results. This solves anti-aliasing issues with compositing" -#+ * RenderSettings.use_game_engine -> use_game_engine: boolean, "(read-only) Current rendering engine is a game engine" -#+ * RenderSettings.use_instances -> use_instances: boolean "Instance support leads to effective memory reduction when using duplicates" -#+ * RenderSettings.use_local_coords -> use_local_coords: boolean "Vertex coordinates are stored localy on each primitive. Increases memory usage, but may have impact on speed" -#RenderSettings.use_motion_blur -> use_motion_blur: boolean "Use multi-sampled 3D scene motion blur" -#+ * RenderSettings.use_overwrite -> use_overwrite: boolean "Overwrite existing files while rendering" -#+ * RenderSettings.use_placeholder -> use_placeholder: boolean "Create empty placeholder files while rendering frames (similar to Unix touch)" -#+ * RenderSettings.use_radiosity -> use_radiosity: boolean "Calculate radiosity in a pre-process before rendering" -#RenderSettings.use_raytrace -> use_raytrace: boolean "Pre-calculate the raytrace accelerator and render raytracing effects" -#RenderSettings.use_save_buffers -> use_save_buffers: boolean "Save tiles for all RenderLayers and SceneNodes to files in the temp directory (saves memory, required for Full Sample)" -#+ * RenderSettings.use_sequencer -> use_sequencer: boolean "Process the render (and composited) result through the video sequence editor pipeline, if sequencer strips exist" -#+ * RenderSettings.use_sequencer_gl_preview -> use_sequencer_gl_preview: boolean "NO DESCRIPTION" -#+ * RenderSettings.use_sequencer_gl_render -> use_sequencer_gl_render: boolean "NO DESCRIPTION" -#+ * RenderSettings.use_shadows -> use_shadows: boolean "Calculate shadows while rendering" -#+ * RenderSettings.use_simplify -> use_simplify: boolean "Enable simplification of scene for quicker preview renders" -#RenderSettings.use_simplify_triangulate -> use_simplify_triangulate: boolean "Disables non-planer quads being triangulated" -#RenderSettings.use_single_layer -> use_single_layer: boolean "Only render the active layer" -#+ * RenderSettings.use_sss -> use_sss: boolean "Calculate sub-surface scattering in materials rendering" -#RenderSettings.use_stamp -> use_stamp: boolean "Render the stamp info text in the rendered image" -#RenderSettings.use_stamp_camera -> use_stamp_camera: boolean "Include the name of the active camera in image metadata" -#RenderSettings.use_stamp_date -> use_stamp_date: boolean "Include the current date in image metadata" -#RenderSettings.use_stamp_filename -> use_stamp_filename: boolean "Include the filename of the .blend file in image metadata" -#RenderSettings.use_stamp_frame -> use_stamp_frame: boolean "Include the frame number in image metadata" -#RenderSettings.use_stamp_marker -> use_stamp_marker: boolean "Include the name of the last marker in image metadata" -#RenderSettings.use_stamp_note -> use_stamp_note: boolean "Include a custom note in image metadata" -#RenderSettings.use_stamp_render_time -> use_stamp_render_time: boolean "Include the render time in the stamp image" -#RenderSettings.use_stamp_scene -> use_stamp_scene: boolean "Include the name of the active scene in image metadata" -#RenderSettings.use_stamp_sequencer_strip -> use_stamp_sequencer_strip: boolean "Include the name of the foreground sequence strip in image metadata" -#RenderSettings.use_stamp_time -> use_stamp_time: boolean "Include the render frame as HH:MM:SS.FF in image metadata" -#+ * RenderSettings.use_textures -> use_textures: boolean "Use textures to affect material properties" -#RenderSettings.use_tiff_16bit -> use_tiff_16bit: boolean "Save TIFF with 16 bits per channel" -#+ * SPHFluidSettings.buoyancy -> buoyancy: float "NO DESCRIPTION" -#+ * SPHFluidSettings.fluid_radius -> fluid_radius: float "Fluid interaction Radius" -#+ * SPHFluidSettings.rest_density -> rest_density: float "Density" -#+ * SPHFluidSettings.rest_length -> rest_length: float "The Spring Rest Length (factor of interaction radius)" -#SPHFluidSettings.spring_force -> spring_force: float "Spring force constant" -#SPHFluidSettings.stiffness -> stiffness: float "Constant K - Stiffness" -#SPHFluidSettings.stiffness_near -> stiffness_near: float "Repulsion factor: stiffness_knear" -#+ * SPHFluidSettings.viscosity_beta -> viscosity_beta: float "Square viscosity factor" -#+ * SPHFluidSettings.viscosity_omega -> viscosity_omega: float "Linear viscosity" -#+ * SceneBases.active -> active: pointer "Active object base in the scene" -#+ * SceneGameData.activity_culling_box_radius -> activity_culling_box_radius: float "Radius of the activity bubble, in Manhattan length. Objects outside the box are activity-culled" -#+ * SceneGameData.depth -> depth: int "Displays bit depth of full screen display" -#+ * SceneGameData.dome_angle -> dome_angle: int "Field of View of the Dome - it only works in mode Fisheye and Truncated" -#+ * SceneGameData.dome_buffer_resolution -> dome_buffer_resolution: float "Buffer Resolution - decrease it to increase speed" -#+ * SceneGameData.dome_mode -> dome_mode: enum "Dome physical configurations" -#+ * SceneGameData.dome_tesselation -> dome_tesselation: int "Tessellation level - check the generated mesh in wireframe mode" -#+ * SceneGameData.dome_text -> dome_text: pointer "Custom Warp Mesh data file" -#+ * SceneGameData.dome_tilt -> dome_tilt: int "Camera rotation in horizontal axis" -#+ * SceneGameData.fps -> fps: int "The nominal number of game frames per second. Physics fixed timestep = 1/fps, independently of actual frame rate" -#SceneGameData.frame_color -> frame_color: float[3] "Set colour of the bars" -#SceneGameData.frame_type -> frame_type: enum "Select the type of Framing you want" -#+ * SceneGameData.frequency -> frequency: int "Displays clock frequency of fullscreen display" -#+ * SceneGameData.logic_step_max -> logic_step_max: int "Sets the maximum number of logic frame per game frame if graphics slows down the game, higher value allows better synchronization with physics" -#+ * SceneGameData.material_mode -> material_mode: enum "Material mode to use for rendering" -#+ * SceneGameData.occlusion_culling_resolution -> occlusion_culling_resolution: float "The size of the occlusion buffer in pixel, use higher value for better precision (slower)" -#+ * SceneGameData.physics_engine -> physics_engine: enum "Physics engine used for physics simulation in the game engine" -#+ * SceneGameData.physics_gravity -> physics_gravity: float "Gravitational constant used for physics simulation in the game engine" -#+ * SceneGameData.physics_step_max -> physics_step_max: int "Sets the maximum number of physics step per game frame if graphics slows down the game, higher value allows physics to keep up with realtime" -#+ * SceneGameData.physics_step_sub -> physics_step_sub: int "Sets the number of simulation substep per physic timestep, higher value give better physics precision" -#+ * SceneGameData.resolution_x -> resolution_x: int "Number of horizontal pixels in the screen" -#+ * SceneGameData.resolution_y -> resolution_y: int "Number of vertical pixels in the screen" -#+ * SceneGameData.show_debug_properties -> show_debug_properties: boolean "Show properties marked for debugging while the game runs" -#+ * SceneGameData.show_framerate_profile -> show_framerate_profile: boolean "Show framerate and profiling information while the game runs" -#SceneGameData.show_fullscreen -> show_fullscreen: boolean "Starts player in a new fullscreen display" -#+ * SceneGameData.show_physics_visualization -> show_physics_visualization: boolean "Show a visualization of physics bounds and interactions" -#+ * SceneGameData.stereo -> stereo: enum "NO DESCRIPTION" -#SceneGameData.stereo_eye_separation -> stereo_eye_separation: float "Set the distance between the eyes - the camera focal length/30 should be fine" -#+ * SceneGameData.stereo_mode -> stereo_mode: enum "Stereographic techniques" -#SceneGameData.use_activity_culling -> use_activity_culling: boolean "Activity culling is enabled" -#+ * SceneGameData.use_animation_record -> use_animation_record: boolean "Record animation to fcurves" -#SceneGameData.use_auto_start -> use_auto_start: boolean "Automatically start game at load time" -#+ * SceneGameData.use_deprecation_warnings -> use_deprecation_warnings: boolean "Print warnings when using deprecated features in the python API" -#+ * SceneGameData.use_display_lists -> use_display_lists: boolean "Use display lists to speed up rendering by keeping geometry on the GPU" -#+ * SceneGameData.use_frame_rate -> use_frame_rate: boolean "Respect the frame rate rather than rendering as many frames as possible" -#SceneGameData.use_glsl_extra_textures -> use_glsl_extra_textures: boolean "Use extra textures like normal or specular maps for GLSL rendering" -#SceneGameData.use_glsl_lights -> use_glsl_lights: boolean "Use lights for GLSL rendering" -#SceneGameData.use_glsl_nodes -> use_glsl_nodes: boolean "Use nodes for GLSL rendering" -#SceneGameData.use_glsl_ramps -> use_glsl_ramps: boolean "Use ramps for GLSL rendering" -#SceneGameData.use_glsl_shaders -> use_glsl_shaders: boolean "Use shaders for GLSL rendering" -#SceneGameData.use_glsl_shadows -> use_glsl_shadows: boolean "Use shadows for GLSL rendering" -#+ * SceneGameData.use_occlusion_culling -> use_occlusion_culling: boolean "Use optimized Bullet DBVT tree for view frustum and occlusion culling" -#+ * SceneObjects.active -> active: pointer "Active object for this scene" -#SceneRenderLayer.exclude_ambient_occlusion -> exclude_ambient_occlusion: boolean "Exclude AO pass from combined" -#SceneRenderLayer.exclude_emit -> exclude_emit: boolean "Exclude emission pass from combined" -#SceneRenderLayer.exclude_environment -> exclude_environment: boolean "Exclude environment pass from combined" -#SceneRenderLayer.exclude_indirect -> exclude_indirect: boolean "Exclude indirect pass from combined" -#SceneRenderLayer.exclude_reflection -> exclude_reflection: boolean "Exclude raytraced reflection pass from combined" -#SceneRenderLayer.exclude_refraction -> exclude_refraction: boolean "Exclude raytraced refraction pass from combined" -#SceneRenderLayer.exclude_shadow -> exclude_shadow: boolean "Exclude shadow pass from combined" -#SceneRenderLayer.exclude_specular -> exclude_specular: boolean "Exclude specular pass from combined" -#SceneRenderLayer.invert_zmask -> invert_zmask: boolean "For Zmask, only render what is behind solid z values instead of in front" -#SceneRenderLayer.layers -> layers: boolean[20] "Scene layers included in this render layer" -#SceneRenderLayer.layers_zmask -> layers_zmask: boolean[20] "Zmask scene layers" -#+ * SceneRenderLayer.light_override -> light_override: pointer "Group to override all other lights in this render layer" -#+ * SceneRenderLayer.material_override -> material_override: pointer "Material to override all other materials in this render layer" -#+ * SceneRenderLayer.name -> name: string "Render layer name" -#+ * SceneRenderLayer.use -> use: boolean "Disable or enable the render layer" -#SceneRenderLayer.use_all_z -> use_all_z: boolean "Fill in Z values for solid faces in invisible layers, for masking" -#SceneRenderLayer.use_edge_enhance -> use_edge_enhance: boolean "Render Edge-enhance in this Layer (only works for Solid faces)" -#SceneRenderLayer.use_halo -> use_halo: boolean "Render Halos in this Layer (on top of Solid)" -#SceneRenderLayer.use_pass_ambient_occlusion -> use_pass_ambient_occlusion: boolean "Deliver AO pass" -#SceneRenderLayer.use_pass_color -> use_pass_color: boolean "Deliver shade-less color pass" -#SceneRenderLayer.use_pass_combined -> use_pass_combined: boolean "Deliver full combined RGBA buffer" -#SceneRenderLayer.use_pass_diffuse -> use_pass_diffuse: boolean "Deliver diffuse pass" -#SceneRenderLayer.use_pass_emit -> use_pass_emit: boolean "Deliver emission pass" -#SceneRenderLayer.use_pass_environment -> use_pass_environment: boolean "Deliver environment lighting pass" -#SceneRenderLayer.use_pass_indirect -> use_pass_indirect: boolean "Deliver indirect lighting pass" -#SceneRenderLayer.use_pass_mist -> use_pass_mist: boolean "Deliver mist factor pass (0.0-1.0)" -#SceneRenderLayer.use_pass_normal -> use_pass_normal: boolean "Deliver normal pass" -#SceneRenderLayer.use_pass_object_index -> use_pass_object_index: boolean "Deliver object index pass" -#SceneRenderLayer.use_pass_reflection -> use_pass_reflection: boolean "Deliver raytraced reflection pass" -#SceneRenderLayer.use_pass_refraction -> use_pass_refraction: boolean "Deliver raytraced refraction pass" -#SceneRenderLayer.use_pass_shadow -> use_pass_shadow: boolean "Deliver shadow pass" -#SceneRenderLayer.use_pass_specular -> use_pass_specular: boolean "Deliver specular pass" -#SceneRenderLayer.use_pass_uv -> use_pass_uv: boolean "Deliver texture UV pass" -#SceneRenderLayer.use_pass_vector -> use_pass_vector: boolean "Deliver speed vector pass" -#SceneRenderLayer.use_pass_z -> use_pass_z: boolean "Deliver Z values pass" -#SceneRenderLayer.use_sky -> use_sky: boolean "Render Sky in this Layer" -#SceneRenderLayer.use_solid -> use_solid: boolean "Render Solid faces in this Layer" -#SceneRenderLayer.use_strand -> use_strand: boolean "Render Strands in this Layer" -#SceneRenderLayer.use_zmask -> use_zmask: boolean "Only render whats in front of the solid z values" -#SceneRenderLayer.use_ztransp -> use_ztransp: boolean "Render Z-Transparent faces in this Layer (On top of Solid and Halos)" -#+ * Scopes.accuracy -> accuracy: float "Proportion of original image source pixel lines to sample" -#+ * Scopes.histogram -> histogram: pointer, "(read-only) Histogram for viewing image statistics" -#+ * Scopes.use_full_resolution -> use_full_resolution: boolean "Sample every pixel of the image" -#+ * Scopes.vectorscope_alpha -> vectorscope_alpha: float "Opacity of the points" -#+ * Scopes.waveform_alpha -> waveform_alpha: float "Opacity of the points" -#+ * Scopes.waveform_mode -> waveform_mode: enum "NO DESCRIPTION" -#+ * Sensor.frequency -> frequency: int "Delay between repeated pulses(in logic tics, 0=no delay)" -#+ * Sensor.invert -> invert: boolean "Invert the level(output) of this sensor" -#+ * Sensor.name -> name: string "Sensor name" -#Sensor.pin -> pin: boolean "Display when not linked to a visible states controller" -#Sensor.show_expanded -> show_expanded: boolean "Set sensor expanded in the user interface" -#+ * Sensor.type -> type: enum "NO DESCRIPTION" -#Sensor.use_level -> use_level: boolean "Level detector, trigger controllers of new states(only applicable upon logic state transition)" -#Sensor.use_pulse_false_level -> use_pulse_false_level: boolean "Activate FALSE level triggering (pulse mode)" -#Sensor.use_pulse_true_level -> use_pulse_true_level: boolean "Activate TRUE level triggering (pulse mode)" -#Sensor.use_tap -> use_tap: boolean "Trigger controllers only for an instant, even while the sensor remains true" -#+ * Sensor|ActuatorSensor.actuator -> actuator: string "Actuator name, actuator active state modifications will be detected" -#+ * Sensor|ArmatureSensor.bone -> bone: string "Identify the bone to check value from" -#+ * Sensor|ArmatureSensor.constraint -> constraint: string "Identify the bone constraint to check value from" -#+ * Sensor|ArmatureSensor.test_type -> test_type: enum "Type of value and test" -#+ * Sensor|ArmatureSensor.value -> value: float "Specify value to be used in comparison" -#+ * Sensor|CollisionSensor.material -> material: string "Only look for Objects with this material" -#+ * Sensor|CollisionSensor.property -> property: string "Only look for Objects with this property" -#Sensor|CollisionSensor.use_material -> use_material: boolean "Toggle collision on material or property" -#Sensor|CollisionSensor.use_pulse -> use_pulse: boolean "Changes to the set of colliding objects generates pulse" -#+ * Sensor|DelaySensor.delay -> delay: int "Delay in number of logic tics before the positive trigger (default 60 per second)" -#+ * Sensor|DelaySensor.duration -> duration: int "If >0, delay in number of logic tics before the negative trigger following the positive trigger" -#Sensor|DelaySensor.use_repeat -> use_repeat: boolean "Toggle repeat option. If selected, the sensor restarts after Delay+Dur logic tics" -#+ * Sensor|JoystickSensor.axis_direction -> axis_direction: enum "The direction of the axis" -#+ * Sensor|JoystickSensor.axis_number -> axis_number: int "Specify which axis pair to use, 1 is usually the main direction input" -#+ * Sensor|JoystickSensor.axis_threshold -> axis_threshold: int "Specify the precision of the axis" -#+ * Sensor|JoystickSensor.button_number -> button_number: int "Specify which button to use" -#+ * Sensor|JoystickSensor.event_type -> event_type: enum "The type of event this joystick sensor is triggered on" -#+ * Sensor|JoystickSensor.hat_direction -> hat_direction: enum "Specify hat direction" -#+ * Sensor|JoystickSensor.hat_number -> hat_number: int "Specify which hat to use" -#+ * Sensor|JoystickSensor.joystick_index -> joystick_index: int "Specify which joystick to use" -#+ * Sensor|JoystickSensor.single_axis_number -> single_axis_number: int "Specify a single axis (verticle/horizontal/other) to detect" -#Sensor|JoystickSensor.use_all_events -> use_all_events: boolean "Triggered by all events on this joysticks current type (axis/button/hat)" -#+ * Sensor|KeyboardSensor.key -> key: enum "NO DESCRIPTION" -#+ * Sensor|KeyboardSensor.log -> log: string "Property that receive the keystrokes in case a string is logged" -#Sensor|KeyboardSensor.modifier_key_1 -> modifier_key_1: enum "Modifier key code" -#Sensor|KeyboardSensor.modifier_key_2 -> modifier_key_2: enum "Modifier key code" -#+ * Sensor|KeyboardSensor.target -> target: string "Property that indicates whether to log keystrokes as a string" -#Sensor|KeyboardSensor.use_all_keys -> use_all_keys: boolean "Trigger this sensor on any keystroke" -#+ * Sensor|MessageSensor.subject -> subject: string "Optional subject filter: only accept messages with this subject, or empty for all" -#+ * Sensor|MouseSensor.mouse_event -> mouse_event: enum "Specify the type of event this mouse sensor should trigger on" -#+ * Sensor|NearSensor.distance -> distance: float "Trigger distance" -#+ * Sensor|NearSensor.property -> property: string "Only look for objects with this property" -#+ * Sensor|NearSensor.reset_distance -> reset_distance: float "NO DESCRIPTION" -#+ * Sensor|PropertySensor.evaluation_type -> evaluation_type: enum "Type of property evaluation" -#+ * Sensor|PropertySensor.property -> property: string "NO DESCRIPTION" -#+ * Sensor|PropertySensor.value -> value: string "Check for this value in types in Equal or Not Equal types" -#Sensor|PropertySensor.value_max -> value_max: string "Specify maximum value in Interval type" -#Sensor|PropertySensor.value_min -> value_min: string "Specify minimum value in Interval type" -#+ * Sensor|RadarSensor.angle -> angle: float "Opening angle of the radar cone" -#+ * Sensor|RadarSensor.axis -> axis: enum "Specify along which axis the radar cone is cast" -#+ * Sensor|RadarSensor.distance -> distance: float "Depth of the radar cone" -#+ * Sensor|RadarSensor.property -> property: string "Only look for Objects with this property" -#+ * Sensor|RandomSensor.seed -> seed: int "Initial seed of the generator. (Choose 0 for not random)" -#+ * Sensor|RaySensor.axis -> axis: enum "Specify along which axis the ray is cast" -#+ * Sensor|RaySensor.material -> material: string "Only look for Objects with this material" -#+ * Sensor|RaySensor.property -> property: string "Only look for Objects with this property" -#+ * Sensor|RaySensor.range -> range: float "Sense objects no farther than this distance" -#+ * Sensor|RaySensor.ray_type -> ray_type: enum "Toggle collision on material or property" -#Sensor|RaySensor.use_x_ray -> use_x_ray: boolean "Toggle X-Ray option (see through objects that dont have the property)" -#+ * Sensor|TouchSensor.material -> material: pointer "Only look for objects with this material" -#Sequence.blend_alpha -> blend_alpha: float "NO DESCRIPTION" -#Sequence.blend_type -> blend_type: enum "NO DESCRIPTION" -#+ * Sequence.channel -> channel: int "Y position of the sequence strip" -#+ * Sequence.effect_fader -> effect_fader: float "NO DESCRIPTION" -#Sequence.frame_duration -> frame_duration: int, "(read-only) The length of the contents of this strip before the handles are applied" -#Sequence.frame_final_duration -> frame_final_duration: int "The length of the contents of this strip before the handles are applied" -#+ * Sequence.frame_final_end -> frame_final_end: int "End frame displayed in the sequence editor after offsets are applied" -#+ * Sequence.frame_final_start -> frame_final_start: int "Start frame displayed in the sequence editor after offsets are applied, setting this is equivalent to moving the handle, not the actual start frame" -#+ * Sequence.frame_offset_end -> frame_offset_end: int, "(read-only)" -#+ * Sequence.frame_offset_start -> frame_offset_start: int, "(read-only)" -#+ * Sequence.frame_start -> frame_start: int "NO DESCRIPTION" -#+ * Sequence.frame_still_end -> frame_still_end: int, "(read-only)" -#+ * Sequence.frame_still_start -> frame_still_start: int, "(read-only)" -#+ * Sequence.lock -> lock: boolean "Lock strip so that it cant be transformed" -#+ * Sequence.mute -> mute: boolean "NO DESCRIPTION" -#+ * Sequence.name -> name: string "NO DESCRIPTION" -#+ * Sequence.select -> select: boolean "NO DESCRIPTION" -#+ * Sequence.select_left_handle -> select_left_handle: boolean "NO DESCRIPTION" -#+ * Sequence.select_right_handle -> select_right_handle: boolean "NO DESCRIPTION" -#+ * Sequence.speed_fader -> speed_fader: float "NO DESCRIPTION" -#+ * Sequence.type -> type: enum, "(read-only)" -#Sequence.use_default_fade -> use_default_fade: boolean "Fade effect using the built-in default (usually make transition as long as effect strip)" -#+ * SequenceColorBalance.gain -> gain: float[3] "Color balance gain (highlights)" -#+ * SequenceColorBalance.gamma -> gamma: float[3] "Color balance gamma (midtones)" -#SequenceColorBalance.invert_gain -> invert_gain: boolean "NO DESCRIPTION" -#SequenceColorBalance.invert_gamma -> invert_gamma: boolean "NO DESCRIPTION" -#SequenceColorBalance.invert_lift -> invert_lift: boolean "NO DESCRIPTION" -#+ * SequenceColorBalance.lift -> lift: float[3] "Color balance lift (shadows)" -#SequenceCrop.max_x -> max_x: int "NO DESCRIPTION" -#SequenceCrop.max_y -> max_y: int "NO DESCRIPTION" -#SequenceCrop.min_x -> min_x: int "NO DESCRIPTION" -#SequenceCrop.min_y -> min_y: int "NO DESCRIPTION" -#+ * SequenceEditor.active_strip -> active_strip: pointer "NO DESCRIPTION" -#+ * SequenceEditor.meta_stack -> meta_stack: collection, "(read-only) Meta strip stack, last is currently edited meta strip" -#+ * SequenceEditor.overlay_frame -> overlay_frame: int "Sequencers active strip" -#+ * SequenceEditor.overlay_lock -> overlay_lock: boolean "NO DESCRIPTION" -#+ * SequenceEditor.sequences -> sequences: collection, "(read-only)" -#+ * SequenceEditor.sequences_all -> sequences_all: collection, "(read-only)" -#+ * SequenceEditor.show_overlay -> show_overlay: boolean "Partial overlay ontop of the sequencer" -#+ * SequenceElement.filename -> filename: string "NO DESCRIPTION" -#+ * SequenceProxy.directory -> directory: string "Location to store the proxy files" -#+ * SequenceProxy.filepath -> filepath: string "Location of custom proxy file" -#+ * SequenceTransform.offset_x -> offset_x: int "NO DESCRIPTION" -#+ * SequenceTransform.offset_y -> offset_y: int "NO DESCRIPTION" -#+ * Sequence|EffectSequence.color_balance -> color_balance: pointer, "(read-only)" -#Sequence|EffectSequence.color_multiply -> color_multiply: float "NO DESCRIPTION" -#+ * Sequence|EffectSequence.color_saturation -> color_saturation: float "NO DESCRIPTION" -#+ * Sequence|EffectSequence.crop -> crop: pointer, "(read-only)" -#+ * Sequence|EffectSequence.proxy -> proxy: pointer, "(read-only)" -#+ * Sequence|EffectSequence.strobe -> strobe: float "Only display every nth frame" -#+ * Sequence|EffectSequence.transform -> transform: pointer, "(read-only)" -#+ * Sequence|EffectSequence.use_color_balance -> use_color_balance: boolean "(3-Way color correction) on input" -#+ * Sequence|EffectSequence.use_crop -> use_crop: boolean "Crop image before processing" -#Sequence|EffectSequence.use_deinterlace -> use_deinterlace: boolean "For video movies to remove fields" -#Sequence|EffectSequence.use_flip_x -> use_flip_x: boolean "Flip on the X axis" -#Sequence|EffectSequence.use_flip_y -> use_flip_y: boolean "Flip on the Y axis" -#Sequence|EffectSequence.use_float -> use_float: boolean "Convert input to float data" -#Sequence|EffectSequence.use_premultiply -> use_premultiply: boolean "Convert RGB from key alpha to premultiplied alpha" -#+ * Sequence|EffectSequence.use_proxy -> use_proxy: boolean "Use a preview proxy for this strip" -#Sequence|EffectSequence.use_proxy_custom_directory -> use_proxy_custom_directory: boolean "Use a custom directory to store data" -#Sequence|EffectSequence.use_proxy_custom_file -> use_proxy_custom_file: boolean "Use a custom file to read proxy data from" -#Sequence|EffectSequence.use_reverse_frames -> use_reverse_frames: boolean "Reverse frame order" -#+ * Sequence|EffectSequence.use_translation -> use_translation: boolean "Translate image before processing" -#+ * Sequence|EffectSequence|ColorSequence.color -> color: float[3] "NO DESCRIPTION" -#Sequence|EffectSequence|GlowSequence.blur_radius -> blur_radius: float "Radius of glow effect" -#+ * Sequence|EffectSequence|GlowSequence.boost_factor -> boost_factor: float "Brightness multiplier" -#+ * Sequence|EffectSequence|GlowSequence.clamp -> clamp: float "rightness limit of intensity" -#+ * Sequence|EffectSequence|GlowSequence.quality -> quality: int "Accuracy of the blur effect" -#+ * Sequence|EffectSequence|GlowSequence.threshold -> threshold: float "Minimum intensity to trigger a glow" -#Sequence|EffectSequence|GlowSequence.use_only_boost -> use_only_boost: boolean "Show the glow buffer only" -#+ * Sequence|EffectSequence|PluginSequence.filename -> filename: string, "(read-only)" -#+ * Sequence|EffectSequence|SpeedControlSequence.global_speed -> global_speed: float "NO DESCRIPTION" -#Sequence|EffectSequence|SpeedControlSequence.use_curve_compress_y -> use_curve_compress_y: boolean "Scale F-Curve value to get the target frame number, F-Curve value runs from 0.0 to 1.0" -#Sequence|EffectSequence|SpeedControlSequence.use_curve_velocity -> use_curve_velocity: boolean "Interpret the F-Curve value as a velocity instead of a frame number" -#Sequence|EffectSequence|SpeedControlSequence.use_frame_blend -> use_frame_blend: boolean "Blend two frames into the target for a smoother result" -#+ * Sequence|EffectSequence|TransformSequence.interpolation -> interpolation: enum "NO DESCRIPTION" -#+ * Sequence|EffectSequence|TransformSequence.rotation_start -> rotation_start: float "NO DESCRIPTION" -#+ * Sequence|EffectSequence|TransformSequence.scale_start_x -> scale_start_x: float "NO DESCRIPTION" -#+ * Sequence|EffectSequence|TransformSequence.scale_start_y -> scale_start_y: float "NO DESCRIPTION" -#+ * Sequence|EffectSequence|TransformSequence.translate_start_x -> translate_start_x: float "NO DESCRIPTION" -#+ * Sequence|EffectSequence|TransformSequence.translate_start_y -> translate_start_y: float "NO DESCRIPTION" -#+ * Sequence|EffectSequence|TransformSequence.translation_unit -> translation_unit: enum "NO DESCRIPTION" -#Sequence|EffectSequence|TransformSequence.use_uniform_scale -> use_uniform_scale: boolean "Scale uniformly, preserving aspect ratio" -#+ * Sequence|EffectSequence|WipeSequence.angle -> angle: float "Edge angle" -#+ * Sequence|EffectSequence|WipeSequence.blur_width -> blur_width: float "Width of the blur edge, in percentage relative to the image size" -#+ * Sequence|EffectSequence|WipeSequence.direction -> direction: enum "Wipe direction" -#+ * Sequence|EffectSequence|WipeSequence.transition_type -> transition_type: enum "NO DESCRIPTION" -#Sequence|ImageSequence.animation_offset_end -> animation_offset_end: int "Animation end offset (trim end)" -#Sequence|ImageSequence.animation_offset_start -> animation_offset_start: int "Animation start offset (trim start)" -#+ * Sequence|ImageSequence.color_balance -> color_balance: pointer, "(read-only)" -#Sequence|ImageSequence.color_multiply -> color_multiply: float "NO DESCRIPTION" -#+ * Sequence|ImageSequence.color_saturation -> color_saturation: float "NO DESCRIPTION" -#+ * Sequence|ImageSequence.crop -> crop: pointer, "(read-only)" -#+ * Sequence|ImageSequence.directory -> directory: string "NO DESCRIPTION" -#+ * Sequence|ImageSequence.elements -> elements: collection, "(read-only)" -#+ * Sequence|ImageSequence.proxy -> proxy: pointer, "(read-only)" -#+ * Sequence|ImageSequence.strobe -> strobe: float "Only display every nth frame" -#+ * Sequence|ImageSequence.transform -> transform: pointer, "(read-only)" -#+ * Sequence|ImageSequence.use_color_balance -> use_color_balance: boolean "(3-Way color correction) on input" -#+ * Sequence|ImageSequence.use_crop -> use_crop: boolean "Crop image before processing" -#Sequence|ImageSequence.use_deinterlace -> use_deinterlace: boolean "For video movies to remove fields" -#Sequence|ImageSequence.use_flip_x -> use_flip_x: boolean "Flip on the X axis" -#Sequence|ImageSequence.use_flip_y -> use_flip_y: boolean "Flip on the Y axis" -#Sequence|ImageSequence.use_float -> use_float: boolean "Convert input to float data" -#Sequence|ImageSequence.use_premultiply -> use_premultiply: boolean "Convert RGB from key alpha to premultiplied alpha" -#+ * Sequence|ImageSequence.use_proxy -> use_proxy: boolean "Use a preview proxy for this strip" -#Sequence|ImageSequence.use_proxy_custom_directory -> use_proxy_custom_directory: boolean "Use a custom directory to store data" -#Sequence|ImageSequence.use_proxy_custom_file -> use_proxy_custom_file: boolean "Use a custom file to read proxy data from" -#Sequence|ImageSequence.use_reverse_frames -> use_reverse_frames: boolean "Reverse frame order" -#+ * Sequence|ImageSequence.use_translation -> use_translation: boolean "Translate image before processing" -#Sequence|MetaSequence.animation_offset_end -> animation_offset_end: int "Animation end offset (trim end)" -#Sequence|MetaSequence.animation_offset_start -> animation_offset_start: int "Animation start offset (trim start)" -#+ * Sequence|MetaSequence.color_balance -> color_balance: pointer, "(read-only)" -#Sequence|MetaSequence.color_multiply -> color_multiply: float "NO DESCRIPTION" -#+ * Sequence|MetaSequence.color_saturation -> color_saturation: float "NO DESCRIPTION" -#+ * Sequence|MetaSequence.crop -> crop: pointer, "(read-only)" -#+ * Sequence|MetaSequence.proxy -> proxy: pointer, "(read-only)" -#+ * Sequence|MetaSequence.sequences -> sequences: collection, "(read-only)" -#+ * Sequence|MetaSequence.strobe -> strobe: float "Only display every nth frame" -#+ * Sequence|MetaSequence.transform -> transform: pointer, "(read-only)" -#+ * Sequence|MetaSequence.use_color_balance -> use_color_balance: boolean "(3-Way color correction) on input" -#+ * Sequence|MetaSequence.use_crop -> use_crop: boolean "Crop image before processing" -#Sequence|MetaSequence.use_deinterlace -> use_deinterlace: boolean "For video movies to remove fields" -#Sequence|MetaSequence.use_flip_x -> use_flip_x: boolean "Flip on the X axis" -#Sequence|MetaSequence.use_flip_y -> use_flip_y: boolean "Flip on the Y axis" -#Sequence|MetaSequence.use_float -> use_float: boolean "Convert input to float data" -#Sequence|MetaSequence.use_premultiply -> use_premultiply: boolean "Convert RGB from key alpha to premultiplied alpha" -#+ * Sequence|MetaSequence.use_proxy -> use_proxy: boolean "Use a preview proxy for this strip" -#Sequence|MetaSequence.use_proxy_custom_directory -> use_proxy_custom_directory: boolean "Use a custom directory to store data" -#Sequence|MetaSequence.use_proxy_custom_file -> use_proxy_custom_file: boolean "Use a custom file to read proxy data from" -#Sequence|MetaSequence.use_reverse_frames -> use_reverse_frames: boolean "Reverse frame order" -#+ * Sequence|MetaSequence.use_translation -> use_translation: boolean "Translate image before processing" -#Sequence|MovieSequence.animation_offset_end -> animation_offset_end: int "Animation end offset (trim end)" -#Sequence|MovieSequence.animation_offset_start -> animation_offset_start: int "Animation start offset (trim start)" -#+ * Sequence|MovieSequence.color_balance -> color_balance: pointer, "(read-only)" -#Sequence|MovieSequence.color_multiply -> color_multiply: float "NO DESCRIPTION" -#+ * Sequence|MovieSequence.color_saturation -> color_saturation: float "NO DESCRIPTION" -#+ * Sequence|MovieSequence.crop -> crop: pointer, "(read-only)" -#+ * Sequence|MovieSequence.filepath -> filepath: string "NO DESCRIPTION" -#+ * Sequence|MovieSequence.mpeg_preseek -> mpeg_preseek: int "For MPEG movies, preseek this many frames" -#+ * Sequence|MovieSequence.proxy -> proxy: pointer, "(read-only)" -#+ * Sequence|MovieSequence.strobe -> strobe: float "Only display every nth frame" -#+ * Sequence|MovieSequence.transform -> transform: pointer, "(read-only)" -#+ * Sequence|MovieSequence.use_color_balance -> use_color_balance: boolean "(3-Way color correction) on input" -#+ * Sequence|MovieSequence.use_crop -> use_crop: boolean "Crop image before processing" -#Sequence|MovieSequence.use_deinterlace -> use_deinterlace: boolean "For video movies to remove fields" -#Sequence|MovieSequence.use_flip_x -> use_flip_x: boolean "Flip on the X axis" -#Sequence|MovieSequence.use_flip_y -> use_flip_y: boolean "Flip on the Y axis" -#Sequence|MovieSequence.use_float -> use_float: boolean "Convert input to float data" -#Sequence|MovieSequence.use_premultiply -> use_premultiply: boolean "Convert RGB from key alpha to premultiplied alpha" -#+ * Sequence|MovieSequence.use_proxy -> use_proxy: boolean "Use a preview proxy for this strip" -#Sequence|MovieSequence.use_proxy_custom_directory -> use_proxy_custom_directory: boolean "Use a custom directory to store data" -#Sequence|MovieSequence.use_proxy_custom_file -> use_proxy_custom_file: boolean "Use a custom file to read proxy data from" -#Sequence|MovieSequence.use_reverse_frames -> use_reverse_frames: boolean "Reverse frame order" -#+ * Sequence|MovieSequence.use_translation -> use_translation: boolean "Translate image before processing" -#Sequence|MulticamSequence.animation_offset_end -> animation_offset_end: int "Animation end offset (trim end)" -#Sequence|MulticamSequence.animation_offset_start -> animation_offset_start: int "Animation start offset (trim start)" -#+ * Sequence|MulticamSequence.color_balance -> color_balance: pointer, "(read-only)" -#Sequence|MulticamSequence.color_multiply -> color_multiply: float "NO DESCRIPTION" -#+ * Sequence|MulticamSequence.color_saturation -> color_saturation: float "NO DESCRIPTION" -#+ * Sequence|MulticamSequence.crop -> crop: pointer, "(read-only)" -#+ * Sequence|MulticamSequence.multicam_source -> multicam_source: int "NO DESCRIPTION" -#+ * Sequence|MulticamSequence.proxy -> proxy: pointer, "(read-only)" -#+ * Sequence|MulticamSequence.strobe -> strobe: float "Only display every nth frame" -#+ * Sequence|MulticamSequence.transform -> transform: pointer, "(read-only)" -#+ * Sequence|MulticamSequence.use_color_balance -> use_color_balance: boolean "(3-Way color correction) on input" -#+ * Sequence|MulticamSequence.use_crop -> use_crop: boolean "Crop image before processing" -#Sequence|MulticamSequence.use_deinterlace -> use_deinterlace: boolean "For video movies to remove fields" -#Sequence|MulticamSequence.use_flip_x -> use_flip_x: boolean "Flip on the X axis" -#Sequence|MulticamSequence.use_flip_y -> use_flip_y: boolean "Flip on the Y axis" -#Sequence|MulticamSequence.use_float -> use_float: boolean "Convert input to float data" -#Sequence|MulticamSequence.use_premultiply -> use_premultiply: boolean "Convert RGB from key alpha to premultiplied alpha" -#+ * Sequence|MulticamSequence.use_proxy -> use_proxy: boolean "Use a preview proxy for this strip" -#Sequence|MulticamSequence.use_proxy_custom_directory -> use_proxy_custom_directory: boolean "Use a custom directory to store data" -#Sequence|MulticamSequence.use_proxy_custom_file -> use_proxy_custom_file: boolean "Use a custom file to read proxy data from" -#Sequence|MulticamSequence.use_reverse_frames -> use_reverse_frames: boolean "Reverse frame order" -#+ * Sequence|MulticamSequence.use_translation -> use_translation: boolean "Translate image before processing" -#Sequence|SceneSequence.animation_offset_end -> animation_offset_end: int "Animation end offset (trim end)" -#Sequence|SceneSequence.animation_offset_start -> animation_offset_start: int "Animation start offset (trim start)" -#+ * Sequence|SceneSequence.color_balance -> color_balance: pointer, "(read-only)" -#Sequence|SceneSequence.color_multiply -> color_multiply: float "NO DESCRIPTION" -#+ * Sequence|SceneSequence.color_saturation -> color_saturation: float "NO DESCRIPTION" -#+ * Sequence|SceneSequence.crop -> crop: pointer, "(read-only)" -#+ * Sequence|SceneSequence.proxy -> proxy: pointer, "(read-only)" -#+ * Sequence|SceneSequence.scene -> scene: pointer "Scene that this sequence uses" -#+ * Sequence|SceneSequence.scene_camera -> scene_camera: pointer "Override the scenes active camera" -#+ * Sequence|SceneSequence.strobe -> strobe: float "Only display every nth frame" -#+ * Sequence|SceneSequence.transform -> transform: pointer, "(read-only)" -#+ * Sequence|SceneSequence.use_color_balance -> use_color_balance: boolean "(3-Way color correction) on input" -#+ * Sequence|SceneSequence.use_crop -> use_crop: boolean "Crop image before processing" -#Sequence|SceneSequence.use_deinterlace -> use_deinterlace: boolean "For video movies to remove fields" -#Sequence|SceneSequence.use_flip_x -> use_flip_x: boolean "Flip on the X axis" -#Sequence|SceneSequence.use_flip_y -> use_flip_y: boolean "Flip on the Y axis" -#Sequence|SceneSequence.use_float -> use_float: boolean "Convert input to float data" -#Sequence|SceneSequence.use_premultiply -> use_premultiply: boolean "Convert RGB from key alpha to premultiplied alpha" -#+ * Sequence|SceneSequence.use_proxy -> use_proxy: boolean "Use a preview proxy for this strip" -#Sequence|SceneSequence.use_proxy_custom_directory -> use_proxy_custom_directory: boolean "Use a custom directory to store data" -#Sequence|SceneSequence.use_proxy_custom_file -> use_proxy_custom_file: boolean "Use a custom file to read proxy data from" -#Sequence|SceneSequence.use_reverse_frames -> use_reverse_frames: boolean "Reverse frame order" -#+ * Sequence|SceneSequence.use_translation -> use_translation: boolean "Translate image before processing" -#Sequence|SoundSequence.animation_offset_end -> animation_offset_end: int "Animation end offset (trim end)" -#Sequence|SoundSequence.animation_offset_start -> animation_offset_start: int "Animation start offset (trim start)" -#+ * Sequence|SoundSequence.attenuation -> attenuation: float "Attenuation in dezibel" -#+ * Sequence|SoundSequence.filepath -> filepath: string "NO DESCRIPTION" -#+ * Sequence|SoundSequence.sound -> sound: pointer, "(read-only) Sound datablock used by this sequence" -#+ * Sequence|SoundSequence.volume -> volume: float "Playback volume of the sound" -#+ * ShapeKey.data -> data: collection, "(read-only)" -#+ * ShapeKey.frame -> frame: float, "(read-only) Frame for absolute keys" -#+ * ShapeKey.interpolation -> interpolation: enum "Interpolation type" -#+ * ShapeKey.mute -> mute: boolean "Mute this shape key" -#+ * ShapeKey.name -> name: string "NO DESCRIPTION" -#+ * ShapeKey.relative_key -> relative_key: pointer "Shape used as a relative key" -#+ * ShapeKey.slider_max -> slider_max: float "Maximum for slider" -#+ * ShapeKey.slider_min -> slider_min: float "Minimum for slider" -#+ * ShapeKey.value -> value: float "Value of shape key at the current frame" -#+ * ShapeKey.vertex_group -> vertex_group: string "Vertex weight group, to blend with basis shape" -#+ * ShapeKeyBezierPoint.co -> co: float[3] "NO DESCRIPTION" -#ShapeKeyBezierPoint.handle_left -> handle_left: float[3] "NO DESCRIPTION" -#ShapeKeyBezierPoint.handle_right -> handle_right: float[3] "NO DESCRIPTION" -#+ * ShapeKeyCurvePoint.co -> co: float[3] "NO DESCRIPTION" -#+ * ShapeKeyCurvePoint.tilt -> tilt: float "NO DESCRIPTION" -#+ * ShapeKeyPoint.co -> co: float[3] "NO DESCRIPTION" -#TODO BETTER NAME * SmokeDomainSettings.alpha -> alpha: float "Higher value results in sinking smoke" -#+ * SmokeDomainSettings.amplify -> amplify: int "Enhance the resolution of smoke by this factor using noise" -#TODO BETTER NAME * SmokeDomainSettings.beta -> beta: float "Higher value results in faster rising smoke" -#SmokeDomainSettings.collision_extents -> collision_extents: enum "Selects which domain border will be treated as collision object." -#SmokeDomainSettings.collision_group -> collision_group: pointer "Limit collisions to this group" -#+ * SmokeDomainSettings.dissolve_speed -> dissolve_speed: int "Dissolve Speed" -#SmokeDomainSettings.effector_group -> effector_group: pointer "Limit effectors to this group" -#+ * SmokeDomainSettings.effector_weights -> effector_weights: pointer, "(read-only)" -#+ * SmokeDomainSettings.fluid_group -> fluid_group: pointer "Limit fluid objects to this group" -#+ * SmokeDomainSettings.noise_type -> noise_type: enum "Noise method which is used for creating the high resolution" -#SmokeDomainSettings.point_cache_compress_high_type -> point_cache_compress_high_type: enum "Compression method to be used" -#SmokeDomainSettings.point_cache_compress_type -> point_cache_compress_type: enum "Compression method to be used" -#+ * SmokeDomainSettings.point_cache_high -> point_cache_high: pointer, "(read-only)" -#+ * SmokeDomainSettings.point_cache_low -> point_cache_low: pointer, "(read-only)" -#SmokeDomainSettings.resolution_max -> resolution_max: int "Maximal resolution used in the fluid domain" -#SmokeDomainSettings.show_high_resolution -> show_high_resolution: boolean "Show high resolution (using amplification)" -#SmokeDomainSettings.smooth_emitter -> smooth_emitter: boolean "Smoothens emitted smoke to avoid blockiness." -#+ * SmokeDomainSettings.strength -> strength: float "Strength of wavelet noise" -#+ * SmokeDomainSettings.time_scale -> time_scale: float "Adjust simulation speed." -#SmokeDomainSettings.use_dissolve_smoke -> use_dissolve_smoke: boolean "Enable smoke to disappear over time" -#SmokeDomainSettings.use_dissolve_smoke_log -> use_dissolve_smoke_log: boolean "Using 1/x" -#SmokeDomainSettings.use_high_resolution -> use_high_resolution: boolean "Enable high resolution (using amplification)" -#+ * SmokeDomainSettings.vorticity -> vorticity: float "Amount of turbulence/rotation in fluid." -#+ * SmokeFlowSettings.density -> density: float "NO DESCRIPTION" -#+ * SmokeFlowSettings.initial_velocity -> initial_velocity: boolean "Smoke inherits its velocity from the emitter particle" -#SmokeFlowSettings.particle_system -> particle_system: pointer "Particle systems emitted from the object" -#+ * SmokeFlowSettings.temperature -> temperature: float "Temperature difference to ambient temperature" -#SmokeFlowSettings.use_absolute -> use_absolute: boolean "Only allows given density value in emitter area." -#SmokeFlowSettings.use_outflow -> use_outflow: boolean "Deletes smoke from simulation" -#SmokeFlowSettings.velocity_factor -> velocity_factor: float "Multiplier to adjust velocity passed to smoke" -#+ * SoftBodySettings.aero -> aero: float "Make edges sail" -#+ * SoftBodySettings.aerodynamics_type -> aerodynamics_type: enum "Method of calculating aerodynamic interaction" -#+ * SoftBodySettings.ball_damp -> ball_damp: float "Blending to inelastic collision" -#+ * SoftBodySettings.ball_size -> ball_size: float "Absolute ball size or factor if not manual adjusted" -#+ * SoftBodySettings.ball_stiff -> ball_stiff: float "Ball inflating pressure" -#SoftBodySettings.bend -> bend: float "Bending Stiffness" -#+ * SoftBodySettings.choke -> choke: int "Viscosity inside collision target" -#+ * SoftBodySettings.collision_type -> collision_type: enum "Choose Collision Type" -#SoftBodySettings.damping -> damping: float "Edge spring friction" -#+ * SoftBodySettings.effector_weights -> effector_weights: pointer, "(read-only)" -#SoftBodySettings.error_threshold -> error_threshold: float "The Runge-Kutta ODE solver error limit, low value gives more precision, high values speed" -#+ * SoftBodySettings.friction -> friction: float "General media friction for point movements" -#+ * SoftBodySettings.fuzzy -> fuzzy: int "Fuzziness while on collision, high values make collsion handling faster but less stable" -#+ * SoftBodySettings.goal_default -> goal_default: float "Default Goal (vertex target position) value, when no Vertex Group used" -#+ * SoftBodySettings.goal_friction -> goal_friction: float "Goal (vertex target position) friction" -#+ * SoftBodySettings.goal_max -> goal_max: float "Goal maximum, vertex weights are scaled to match this range" -#+ * SoftBodySettings.goal_min -> goal_min: float "Goal minimum, vertex weights are scaled to match this range" -#+ * SoftBodySettings.goal_spring -> goal_spring: float "Goal (vertex target position) spring stiffness" -#+ * SoftBodySettings.goal_vertex_group -> goal_vertex_group: string "Control point weight values" -#+ * SoftBodySettings.gravity -> gravity: float "Apply gravitation to point movement" -#SoftBodySettings.location_mass_center -> location_mass_center: float[3] "Location of Center of mass" -#+ * SoftBodySettings.mass -> mass: float "General Mass value" -#+ * SoftBodySettings.mass_vertex_group -> mass_vertex_group: string "Control point mass values" -#+ * SoftBodySettings.plastic -> plastic: float "Permanent deform" -#+ * SoftBodySettings.pull -> pull: float "Edge spring stiffness when longer than rest length" -#+ * SoftBodySettings.push -> push: float "Edge spring stiffness when shorter than rest length" -#SoftBodySettings.rotation_estimate -> rotation_estimate: float[9] "Estimated rotation matrix" -#SoftBodySettings.scale_estimate -> scale_estimate: float[9] "Estimated scale matrix" -#+ * SoftBodySettings.shear -> shear: float "Shear Stiffness" -#+ * SoftBodySettings.speed -> speed: float "Tweak timing for physics to control frequency and speed" -#+ * SoftBodySettings.spring_length -> spring_length: float "Alter spring length to shrink/blow up (unit %) 0 to disable" -#+ * SoftBodySettings.spring_vertex_group -> spring_vertex_group: string "Control point spring strength values" -#SoftBodySettings.step_max -> step_max: int "Maximal # solver steps/frame" -#SoftBodySettings.step_min -> step_min: int "Minimal # solver steps/frame" -#SoftBodySettings.use_auto_step -> use_auto_step: boolean "Use velocities for automagic step sizes" -#SoftBodySettings.use_diagnose -> use_diagnose: boolean "Turn on SB diagnose console prints" -#SoftBodySettings.use_edge_collision -> use_edge_collision: boolean "Edges collide too" -#+ * SoftBodySettings.use_edges -> use_edges: boolean "Use Edges as springs" -#SoftBodySettings.use_estimate_matrix -> use_estimate_matrix: boolean "estimate matrix .. split to COM , ROT ,SCALE" -#SoftBodySettings.use_face_collision -> use_face_collision: boolean "Faces collide too, can be very slow" -#+ * SoftBodySettings.use_goal -> use_goal: boolean "Define forces for vertices to stick to animated position" -#SoftBodySettings.use_self_collision -> use_self_collision: boolean "Enable naive vertex ball self collision" -#SoftBodySettings.use_stiff_quads -> use_stiff_quads: boolean "Adds diagonal springs on 4-gons" -#+ * Space.type -> type: enum, "(read-only) Space data type" -#+ * SpaceUVEditor.cursor_location -> cursor_location: float[2] "2D cursor location for this view" -#+ * SpaceUVEditor.draw_stretch_type -> draw_stretch_type: enum "Type of stretch to draw" -#+ * SpaceUVEditor.edge_draw_type -> edge_draw_type: enum "Draw type for drawing UV edges" -#SpaceUVEditor.lock_bounds -> lock_bounds: boolean "Constraint to stay within the image bounds while editing" -#SpaceUVEditor.pivot_point -> pivot_point: enum "Rotation/Scaling Pivot" -#SpaceUVEditor.show_modified_edges -> show_modified_edges: boolean "Draw edges after modifiers are applied" -#SpaceUVEditor.show_normalized_coords -> show_normalized_coords: boolean "Display UV coordinates from 0.0 to 1.0 rather than in pixels" -#SpaceUVEditor.show_other_objects -> show_other_objects: boolean "Draw other selected objects that share the same image" -#SpaceUVEditor.show_smooth_edges -> show_smooth_edges: boolean "Draw UV edges anti-aliased" -#SpaceUVEditor.show_stretch -> show_stretch: boolean "Draw faces colored according to the difference in shape between UVs and their 3D coordinates (blue for low distortion, red for high distortion)" -#SpaceUVEditor.sticky_select_mode -> sticky_select_mode: enum "Automatically select also UVs sharing the same vertex as the ones being selected" -#SpaceUVEditor.use_live_unwrap -> use_live_unwrap: boolean "Continuously unwrap the selected UV island while transforming pinned vertices" -#SpaceUVEditor.use_snap_to_pixels -> use_snap_to_pixels: boolean "Snap UVs to pixel locations while editing" -#+ * Space|SpaceConsole.console_type -> console_type: enum "Console type" -#+ * Space|SpaceConsole.font_size -> font_size: int "Font size to use for displaying the text" -#+ * Space|SpaceConsole.history -> history: collection, "(read-only) Command history" -#+ * Space|SpaceConsole.language -> language: string "Command line prompt language" -#+ * Space|SpaceConsole.prompt -> prompt: string "Command line prompt" -#+ * Space|SpaceConsole.scrollback -> scrollback: collection, "(read-only) Command output" -#Space|SpaceConsole.select_end -> select_end: int "NO DESCRIPTION" -#Space|SpaceConsole.select_start -> select_start: int "NO DESCRIPTION" -#+ * Space|SpaceConsole.show_report_debug -> show_report_debug: boolean "Display debug reporting info" -#+ * Space|SpaceConsole.show_report_error -> show_report_error: boolean "Display error text" -#+ * Space|SpaceConsole.show_report_info -> show_report_info: boolean "Display general information" -#+ * Space|SpaceConsole.show_report_operator -> show_report_operator: boolean "Display the operator log" -#Space|SpaceConsole.show_report_warning -> show_report_warning: boolean "Display warnings" -#+ * Space|SpaceDopeSheetEditor.action -> action: pointer "Action displayed and edited in this space" -#Space|SpaceDopeSheetEditor.auto_snap -> auto_snap: enum "Automatic time snapping settings for transformations" -#+ * Space|SpaceDopeSheetEditor.dopesheet -> dopesheet: pointer, "(read-only) Settings for filtering animation data" -#+ * Space|SpaceDopeSheetEditor.mode -> mode: enum "Editing context being displayed" -#Space|SpaceDopeSheetEditor.show_frame_indicator -> show_frame_indicator: boolean "Show frame number beside the current frame indicator line" -#+ * Space|SpaceDopeSheetEditor.show_seconds -> show_seconds: boolean, "(read-only) Show timing in seconds not frames" -#+ * Space|SpaceDopeSheetEditor.show_sliders -> show_sliders: boolean "Show sliders beside F-Curve channels" -#Space|SpaceDopeSheetEditor.use_auto_merge_keyframes -> use_auto_merge_keyframes: boolean "Automatically merge nearby keyframes" -#+ * Space|SpaceDopeSheetEditor.use_marker_sync -> use_marker_sync: boolean "Sync Markers with keyframe edits" -#Space|SpaceDopeSheetEditor.use_realtime_update -> use_realtime_update: boolean "When transforming keyframes, changes to the animation data are flushed to other views" -#+ * Space|SpaceFileBrowser.params -> params: pointer, "(read-only) Parameters and Settings for the Filebrowser" -#Space|SpaceGraphEditor.auto_snap -> auto_snap: enum "Automatic time snapping settings for transformations" -#Space|SpaceGraphEditor.cursor_position_y -> cursor_position_y: float "Graph Editor 2D-Value cursor - Y-Value component" -#+ * Space|SpaceGraphEditor.dopesheet -> dopesheet: pointer, "(read-only) Settings for filtering animation data" -#+ * Space|SpaceGraphEditor.has_ghost_curves -> has_ghost_curves: boolean "Graph Editor instance has some ghost curves stored" -#+ * Space|SpaceGraphEditor.mode -> mode: enum "Editing context being displayed" -#+ * Space|SpaceGraphEditor.pivot_point -> pivot_point: enum "Pivot center for rotation/scaling" -#+ * Space|SpaceGraphEditor.show_cursor -> show_cursor: boolean "Show 2D cursor" -#Space|SpaceGraphEditor.show_frame_indicator -> show_frame_indicator: boolean "Show frame number beside the current frame indicator line" -#+ * Space|SpaceGraphEditor.show_handles -> show_handles: boolean "Show handles of Bezier control points" -#+ * Space|SpaceGraphEditor.show_seconds -> show_seconds: boolean, "(read-only) Show timing in seconds not frames" -#+ * Space|SpaceGraphEditor.show_sliders -> show_sliders: boolean "Show sliders beside F-Curve channels" -#Space|SpaceGraphEditor.use_auto_merge_keyframes -> use_auto_merge_keyframes: boolean "Automatically merge nearby keyframes" -#Space|SpaceGraphEditor.use_only_selected_curves_handles -> use_only_selected_curves_handles: boolean "Only keyframes of selected F-Curves are visible and editable" -#Space|SpaceGraphEditor.use_only_selected_keyframe_handles -> use_only_selected_keyframe_handles: boolean "Only show and edit handles of selected keyframes" -#Space|SpaceGraphEditor.use_realtime_update -> use_realtime_update: boolean "When transforming keyframes, changes to the animation data are flushed to other views" -#+ * Space|SpaceImageEditor.curves -> curves: pointer, "(read-only) Color curve mapping to use for displaying the image" -#+ * Space|SpaceImageEditor.draw_channels -> draw_channels: enum "Channels of the image to draw" -#+ * Space|SpaceImageEditor.grease_pencil -> grease_pencil: pointer "Grease pencil data for this space" -#+ * Space|SpaceImageEditor.image -> image: pointer "Image displayed and edited in this space" -#+ * Space|SpaceImageEditor.image_user -> image_user: pointer, "(read-only) Parameters defining which layer, pass and frame of the image is displayed" -#+ * Space|SpaceImageEditor.sample_histogram -> sample_histogram: pointer, "(read-only) Sampled colors along line" -#+ * Space|SpaceImageEditor.scopes -> scopes: pointer, "(read-only) Scopes to visualize image statistics." -#+ * Space|SpaceImageEditor.show_paint -> show_paint: boolean, "(read-only) Show paint related properties" -#+ * Space|SpaceImageEditor.show_render -> show_render: boolean, "(read-only) Show render related properties" -#Space|SpaceImageEditor.show_repeat -> show_repeat: boolean "Draw the image repeated outside of the main view" -#+ * Space|SpaceImageEditor.show_uvedit -> show_uvedit: boolean, "(read-only) Show UV editing related properties" -#+ * Space|SpaceImageEditor.use_grease_pencil -> use_grease_pencil: boolean "Display and edit the grease pencil freehand annotations overlay" -#Space|SpaceImageEditor.use_image_paint -> use_image_paint: boolean "Enable image painting mode" -#Space|SpaceImageEditor.use_image_pin -> use_image_pin: boolean "Display current image regardless of object selection" -#Space|SpaceImageEditor.use_realtime_update -> use_realtime_update: boolean "Update other affected window spaces automatically to reflect changes during interactive operations such as transform" -#+ * Space|SpaceImageEditor.uv_editor -> uv_editor: pointer, "(read-only) UV editor settings" -#Space|SpaceLogicEditor.show_actuators_active_object -> show_actuators_active_object: boolean "Show actuators of active object" -#Space|SpaceLogicEditor.show_actuators_active_states -> show_actuators_active_states: boolean "Show only actuators connected to active states" -#Space|SpaceLogicEditor.show_actuators_linked_controller -> show_actuators_linked_controller: boolean "Show linked objects to the actuator" -#Space|SpaceLogicEditor.show_actuators_selected_objects -> show_actuators_selected_objects: boolean "Show actuators of all selected objects" -#Space|SpaceLogicEditor.show_controllers_active_object -> show_controllers_active_object: boolean "Show controllers of active object" -#Space|SpaceLogicEditor.show_controllers_linked_controller -> show_controllers_linked_controller: boolean "Show linked objects to sensor/actuator" -#Space|SpaceLogicEditor.show_controllers_selected_objects -> show_controllers_selected_objects: boolean "Show controllers of all selected objects" -#Space|SpaceLogicEditor.show_sensors_active_object -> show_sensors_active_object: boolean "Show sensors of active object" -#Space|SpaceLogicEditor.show_sensors_active_states -> show_sensors_active_states: boolean "Show only sensors connected to active states" -#Space|SpaceLogicEditor.show_sensors_linked_controller -> show_sensors_linked_controller: boolean "Show linked objects to the controller" -#Space|SpaceLogicEditor.show_sensors_selected_objects -> show_sensors_selected_objects: boolean "Show sensors of all selected objects" -#Space|SpaceNLA.auto_snap -> auto_snap: enum "Automatic time snapping settings for transformations" -#+ * Space|SpaceNLA.dopesheet -> dopesheet: pointer, "(read-only) Settings for filtering animation data" -#Space|SpaceNLA.show_frame_indicator -> show_frame_indicator: boolean "Show frame number beside the current frame indicator line" -#+ * Space|SpaceNLA.show_seconds -> show_seconds: boolean, "(read-only) Show timing in seconds not frames" -#+ * Space|SpaceNLA.show_strip_curves -> show_strip_curves: boolean "Show influence curves on strips" -#Space|SpaceNLA.use_realtime_update -> use_realtime_update: boolean "When transforming strips, changes to the animation data are flushed to other views" -#+ * Space|SpaceNodeEditor.id -> id: pointer, "(read-only) Datablock whose nodes are being edited" -#+ * Space|SpaceNodeEditor.id_from -> id_from: pointer, "(read-only) Datablock from which the edited datablock is linked" -#+ * Space|SpaceNodeEditor.nodetree -> nodetree: pointer, "(read-only) Node tree being displayed and edited" -#Space|SpaceNodeEditor.show_backdrop -> show_backdrop: boolean "Use active Viewer Node output as backdrop for compositing nodes" -#+ * Space|SpaceNodeEditor.texture_type -> texture_type: enum "Type of data to take texture from" -#+ * Space|SpaceNodeEditor.tree_type -> tree_type: enum "Node tree type to display and edit" -#+ * Space|SpaceOutliner.display_mode -> display_mode: enum "Type of information to display" -#Space|SpaceOutliner.filter_text -> filter_text: string "Live search filtering string" -#Space|SpaceOutliner.show_restrict_columns -> show_restrict_columns: boolean "Show column" -#Space|SpaceOutliner.use_filter_case_sensitive -> use_filter_case_sensitive: boolean "Only use case sensitive matches of search string" -#Space|SpaceOutliner.use_filter_complete -> use_filter_complete: boolean "Only use complete matches of search string" -#+ * Space|SpaceProperties.align -> align: enum "Arrangement of the panels" -#+ * Space|SpaceProperties.context -> context: enum "Type of active data to display and edit" -#+ * Space|SpaceProperties.pin_id -> pin_id: pointer "NO DESCRIPTION" -#Space|SpaceProperties.show_brush_texture -> show_brush_texture: boolean "Show brush textures" -#+ * Space|SpaceProperties.use_pin_id -> use_pin_id: boolean "Use the pinned context" -#+ * Space|SpaceSequenceEditor.display_channel -> display_channel: int "The channel number shown in the image preview. 0 is the result of all strips combined" -#+ * Space|SpaceSequenceEditor.display_mode -> display_mode: enum "The view mode to use for displaying sequencer output" -#+ * Space|SpaceSequenceEditor.draw_overexposed -> draw_overexposed: int "Show overexposed areas with zebra stripes" -#+ * Space|SpaceSequenceEditor.grease_pencil -> grease_pencil: pointer, "(read-only) Grease pencil data for this space" -#+ * Space|SpaceSequenceEditor.offset_x -> offset_x: float "Offsets image horizontally from the view center" -#+ * Space|SpaceSequenceEditor.offset_y -> offset_y: float "Offsets image horizontally from the view center" -#+ * Space|SpaceSequenceEditor.proxy_render_size -> proxy_render_size: enum "Draw preview using full resolution or different proxy resolutions" -#Space|SpaceSequenceEditor.show_frame_indicator -> show_frame_indicator: boolean "Show frame number beside the current frame indicator line" -#Space|SpaceSequenceEditor.show_frames -> show_frames: boolean "Draw frames rather than seconds" -#Space|SpaceSequenceEditor.show_safe_margin -> show_safe_margin: boolean "Draw title safe margins in preview" -#Space|SpaceSequenceEditor.show_separate_color -> show_separate_color: boolean "Separate color channels in preview" -#+ * Space|SpaceSequenceEditor.use_grease_pencil -> use_grease_pencil: boolean "Display and edit the grease pencil freehand annotations overlay" -#+ * Space|SpaceSequenceEditor.use_marker_sync -> use_marker_sync: boolean "Transform markers as well as strips" -#+ * Space|SpaceSequenceEditor.view_type -> view_type: enum "The type of the Sequencer view (sequencer, preview or both)" -#+ * Space|SpaceSequenceEditor.zoom -> zoom: float "Display zoom level" -#+ * Space|SpaceTextEditor.find_text -> find_text: string "Text to search for with the find tool" -#+ * Space|SpaceTextEditor.font_size -> font_size: int "Font size to use for displaying the text" -#+ * Space|SpaceTextEditor.replace_text -> replace_text: string "Text to replace selected text with using the replace tool" -#Space|SpaceTextEditor.show_line_highlight -> show_line_highlight: boolean "Highlight the current line" -#+ * Space|SpaceTextEditor.show_line_numbers -> show_line_numbers: boolean "Show line numbers next to the text" -#+ * Space|SpaceTextEditor.show_syntax_highlight -> show_syntax_highlight: boolean "Syntax highlight for scripting" -#+ * Space|SpaceTextEditor.show_word_wrap -> show_word_wrap: boolean "Wrap words if there is not enough horizontal space" -#+ * Space|SpaceTextEditor.tab_width -> tab_width: int "Number of spaces to display tabs with" -#+ * Space|SpaceTextEditor.text -> text: pointer "Text displayed and edited in this space" -#Space|SpaceTextEditor.use_find_all -> use_find_all: boolean "Search in all text datablocks, instead of only the active one" -#Space|SpaceTextEditor.use_find_wrap -> use_find_wrap: boolean "Search again from the start of the file when reaching the end" -#Space|SpaceTextEditor.use_live_edit -> use_live_edit: boolean "Run python while editing" -#Space|SpaceTextEditor.use_overwrite -> use_overwrite: boolean "Overwrite characters when typing rather than inserting them" -#+ * Space|SpaceTimeline.cache_cloth -> cache_cloth: boolean "Show the active objects cloth point cache" -#+ * Space|SpaceTimeline.cache_particles -> cache_particles: boolean "Show the active objects particle point cache" -#+ * Space|SpaceTimeline.cache_smoke -> cache_smoke: boolean "Show the active objects smoke cache" -#+ * Space|SpaceTimeline.cache_softbody -> cache_softbody: boolean "Show the active objects softbody point cache" -#+ * Space|SpaceTimeline.show_cache -> show_cache: boolean "Show the status of cached frames in the timeline" -#Space|SpaceTimeline.show_frame_indicator -> show_frame_indicator: boolean "Show frame number beside the current frame indicator line" -#Space|SpaceTimeline.show_only_selected -> show_only_selected: boolean "Show keyframes for active Object and/or its selected channels only" -#Space|SpaceTimeline.use_play_3d_editors -> use_play_3d_editors: boolean "NO DESCRIPTION" -#Space|SpaceTimeline.use_play_animation_editors -> use_play_animation_editors: boolean "NO DESCRIPTION" -#Space|SpaceTimeline.use_play_image_editors -> use_play_image_editors: boolean "NO DESCRIPTION" -#Space|SpaceTimeline.use_play_node_editors -> use_play_node_editors: boolean "NO DESCRIPTION" -#Space|SpaceTimeline.use_play_properties_editors -> use_play_properties_editors: boolean "NO DESCRIPTION" -#Space|SpaceTimeline.use_play_sequence_editors -> use_play_sequence_editors: boolean "NO DESCRIPTION" -#Space|SpaceTimeline.use_play_top_left_3d_editor -> use_play_top_left_3d_editor: boolean "NO DESCRIPTION" -#Space|SpaceUserPreferences.filter_text -> filter_text: string "Search term for filtering in the UI" -#+ * Space|SpaceView3D.background_images -> background_images: collection, "(read-only) List of background images" -#+ * Space|SpaceView3D.camera -> camera: pointer "Active camera used in this view (when unlocked from the scenes active camera)" -#+ * Space|SpaceView3D.clip_end -> clip_end: float "3D View far clipping distance" -#+ * Space|SpaceView3D.clip_start -> clip_start: float "3D View near clipping distance" -#+ * Space|SpaceView3D.current_orientation -> current_orientation: pointer, "(read-only) Current Transformation orientation" -#+ * Space|SpaceView3D.cursor_location -> cursor_location: float[3] "3D cursor location for this view (dependent on local view setting)" -#+ * Space|SpaceView3D.grid_lines -> grid_lines: int "The number of grid lines to display in perspective view" -#+ * Space|SpaceView3D.grid_spacing -> grid_spacing: float "The distance between 3D View grid lines" -#+ * Space|SpaceView3D.grid_subdivisions -> grid_subdivisions: int "The number of subdivisions between grid lines" -#+ * Space|SpaceView3D.layers -> layers: boolean[20] "Layers visible in this 3D View" -#Space|SpaceView3D.layers_used -> layers_used: boolean[20], "(read-only) Layers that contain something" -#+ * Space|SpaceView3D.lens -> lens: float "Lens angle (mm) in perspective view" -#+ * Space|SpaceView3D.local_view -> local_view: pointer, "(read-only) Display an isolated sub-set of objects, apart from the scene visibility" -#+ * Space|SpaceView3D.lock_bone -> lock_bone: string "3D View center is locked to this bones position" -#+ * Space|SpaceView3D.lock_camera_and_layers -> lock_camera_and_layers: boolean "Use the scenes active camera and layers in this view, rather than local layers" -#+ * Space|SpaceView3D.lock_object -> lock_object: pointer "3D View center is locked to this objects position" -#+ * Space|SpaceView3D.pivot_point -> pivot_point: enum "Pivot center for rotation/scaling" -#+ * Space|SpaceView3D.region_3d -> region_3d: pointer, "(read-only) 3D region in this space, in case of quad view the camera region" -#+ * Space|SpaceView3D.region_quadview -> region_quadview: pointer, "(read-only) 3D region that defines the quad view settings" -#Space|SpaceView3D.show_all_objects_origin -> show_all_objects_origin: boolean "Show the object origin center dot for all (selected and unselected) objects" -#Space|SpaceView3D.show_axis_x -> show_axis_x: boolean "Show the X axis line in perspective view" -#Space|SpaceView3D.show_axis_y -> show_axis_y: boolean "Show the Y axis line in perspective view" -#Space|SpaceView3D.show_axis_z -> show_axis_z: boolean "Show the Z axis line in perspective view" -#Space|SpaceView3D.show_background_images -> show_background_images: boolean "Display reference images behind objects in the 3D View" -#Space|SpaceView3D.show_floor -> show_floor: boolean "Show the ground plane grid in perspective view" -#Space|SpaceView3D.show_manipulator -> show_manipulator: boolean "Use a 3D manipulator widget for controlling transforms" -#Space|SpaceView3D.show_only_render -> show_only_render: boolean "Display only objects which will be rendered" -#Space|SpaceView3D.show_outline_selected -> show_outline_selected: boolean "Show an outline highlight around selected objects in non-wireframe views" -#Space|SpaceView3D.show_relationship_lines -> show_relationship_lines: boolean "Show dashed lines indicating parent or constraint relationships" -#Space|SpaceView3D.show_textured_solid -> show_textured_solid: boolean "Display face-assigned textures in solid view" -#+ * Space|SpaceView3D.transform_orientation -> transform_orientation: enum "Transformation orientation" -#Space|SpaceView3D.use_manipulator_rotate -> use_manipulator_rotate: boolean "Use the manipulator for rotation transformations" -#Space|SpaceView3D.use_manipulator_scale -> use_manipulator_scale: boolean "Use the manipulator for scale transformations" -#Space|SpaceView3D.use_manipulator_translate -> use_manipulator_translate: boolean "Use the manipulator for movement transformations" -#Space|SpaceView3D.use_occlude_geometry -> use_occlude_geometry: boolean "Limit selection to visible (clipped with depth buffer)" -#Space|SpaceView3D.use_pivot_point_align -> use_pivot_point_align: boolean "Manipulate object centers only" -#Space|SpaceView3D.viewport_shade -> viewport_shade: enum "Method to display/shade objects in the 3D View" -#+ * Spline.bezier_points -> bezier_points: collection, "(read-only) Collection of points for bezier curves only" -#+ * Spline.character_index -> character_index: int, "(read-only) Location of this character in the text data (only for text curves)" -#+ * Spline.hide -> hide: boolean "Hide this curve in editmode" -#+ * Spline.material_index -> material_index: int "NO DESCRIPTION" -#+ * Spline.order_u -> order_u: int "Nurbs order in the U direction (For splines and surfaces), Higher values let points influence a greater area" -#+ * Spline.order_v -> order_v: int "Nurbs order in the V direction (For surfaces only), Higher values let points influence a greater area" -#+ * Spline.point_count_u -> point_count_u: int, "(read-only) Total number points for the curve or surface in the U direction" -#+ * Spline.point_count_v -> point_count_v: int, "(read-only) Total number points for the surface on the V direction" -#+ * Spline.points -> points: collection, "(read-only) Collection of points that make up this poly or nurbs spline" -#+ * Spline.radius_interpolation -> radius_interpolation: enum "The type of radius interpolation for Bezier curves" -#+ * Spline.resolution_u -> resolution_u: int "Curve or Surface subdivisions per segment" -#+ * Spline.resolution_v -> resolution_v: int "Surface subdivisions per segment" -#+ * Spline.tilt_interpolation -> tilt_interpolation: enum "The type of tilt interpolation for 3D, Bezier curves" -#+ * Spline.type -> type: enum "The interpolation type for this curve element" -#Spline.use_bezier_u -> use_bezier_u: boolean "Make this nurbs curve or surface act like a bezier spline in the U direction (Order U must be 3 or 4, Cyclic U must be disabled)" -#Spline.use_bezier_v -> use_bezier_v: boolean "Make this nurbs surface act like a bezier spline in the V direction (Order V must be 3 or 4, Cyclic V must be disabled)" -#Spline.use_cyclic_u -> use_cyclic_u: boolean "Make this curve or surface a closed loop in the U direction" -#Spline.use_cyclic_v -> use_cyclic_v: boolean "Make this surface a closed loop in the V direction" -#Spline.use_endpoint_u -> use_endpoint_u: boolean "Make this nurbs curve or surface meet the endpoints in the U direction (Cyclic U must be disabled)" -#Spline.use_endpoint_v -> use_endpoint_v: boolean "Make this nurbs surface meet the endpoints in the V direction (Cyclic V must be disabled)" -#Spline.use_smooth -> use_smooth: boolean "Smooth the normals of the surface or beveled curve" -#+ * SplinePoint.co -> co: float[4] "Point coordinates" -#+ * SplinePoint.hide -> hide: boolean "Visibility status" -#+ * SplinePoint.radius -> radius: float, "(read-only) Radius for bevelling" -#+ * SplinePoint.select -> select: boolean "Selection status" -#+ * SplinePoint.tilt -> tilt: float "Tilt in 3D View" -#+ * SplinePoint.weight -> weight: float "Nurbs weight" -#+ * SplinePoint.weight_softbody -> weight_softbody: float "Softbody goal weight" -#+ * Struct.base -> base: pointer, "(read-only) Struct definition this is derived from" -#+ * Struct.description -> description: string, "(read-only) Description of the Structs purpose" -#+ * Struct.functions -> functions: collection, "(read-only)" -#+ * Struct.identifier -> identifier: string, "(read-only) Unique name used in the code and scripting" -#+ * Struct.name -> name: string, "(read-only) Human readable name" -#+ * Struct.name_property -> name_property: pointer, "(read-only) Property that gives the name of the struct" -#+ * Struct.nested -> nested: pointer, "(read-only) Struct in which this struct is always nested, and to which it logically belongs" -#+ * Struct.properties -> properties: collection, "(read-only) Properties in the struct" -#+ * TexMapping.location -> location: float[3] "NO DESCRIPTION" -#TexMapping.max -> max: float[3] "Maximum value for clipping" -#TexMapping.min -> min: float[3] "Minimum value for clipping" -#+ * TexMapping.rotation -> rotation: float[3] "NO DESCRIPTION" -#+ * TexMapping.scale -> scale: float[3] "NO DESCRIPTION" -#TexMapping.use_max -> use_max: boolean "Whether to use maximum clipping value" -#TexMapping.use_min -> use_min: boolean "Whether to use minimum clipping value" -#+ * TextBox.height -> height: float "NO DESCRIPTION" -#+ * TextBox.width -> width: float "NO DESCRIPTION" -#+ * TextBox.x -> x: float "NO DESCRIPTION" -#+ * TextBox.y -> y: float "NO DESCRIPTION" -#TextCharacterFormat.use_bold -> use_bold: boolean "NO DESCRIPTION" -#TextCharacterFormat.use_italic -> use_italic: boolean "NO DESCRIPTION" -#+ * TextCharacterFormat.use_small_caps -> use_small_caps: boolean "NO DESCRIPTION" -#TextCharacterFormat.use_underline -> use_underline: boolean "NO DESCRIPTION" -#+ * TextLine.body -> body: string "Text in the line" -#TextMarker.character_index_end -> character_index_end: int, "(read-only) Start position of the marker in the line" -#TextMarker.character_index_start -> character_index_start: int, "(read-only) Start position of the marker in the line" -#+ * TextMarker.color -> color: float[4] "Color to display the marker with" -#+ * TextMarker.group -> group: int, "(read-only)" -#TextMarker.is_temporary -> is_temporary: boolean, "(read-only) Marker is temporary" -#+ * TextMarker.line -> line: int, "(read-only) Line in which the marker is located" -#TextMarker.use_edit_all -> use_edit_all: boolean, "(read-only) Edit all markers of the same group as one" -#+ * TextureSlot.blend_type -> blend_type: enum "NO DESCRIPTION" -#+ * TextureSlot.color -> color: float[3] "The default color for textures that dont return RGB" -#+ * TextureSlot.default_value -> default_value: float "Value to use for Ref, Spec, Amb, Emit, Alpha, RayMir, TransLu and Hard" -#TextureSlot.invert -> invert: boolean "Inverts the values of the texture to reverse its effect" -#+ * TextureSlot.name -> name: string, "(read-only) Texture slot name" -#+ * TextureSlot.offset -> offset: float[3] "Fine tunes texture mapping X, Y and Z locations" -#+ * TextureSlot.output_node -> output_node: enum "Which output node to use, for node-based textures" -#TextureSlot.scale -> scale: float[3] "Sets scaling for the textures X, Y and Z sizes" -#+ * TextureSlot.texture -> texture: pointer "Texture datablock used by this texture slot" -#TextureSlot.use_rgb_to_intensity -> use_rgb_to_intensity: boolean "Converts texture RGB values to intensity (gray) values" -#TextureSlot.use_stencil -> use_stencil: boolean "Use this texture as a blending value on the next texture" -#+ * TextureSlot|BrushTextureSlot.angle -> angle: float "Defines brush texture rotation" -#+ * TextureSlot|BrushTextureSlot.map_mode -> map_mode: enum "NO DESCRIPTION" -#+ * TextureSlot|LampTextureSlot.color_factor -> color_factor: float "Amount texture affects color values" -#+ * TextureSlot|LampTextureSlot.object -> object: pointer "Object to use for mapping with Object texture coordinates" -#+ * TextureSlot|LampTextureSlot.shadow_factor -> shadow_factor: float "Amount texture affects shadow" -#TextureSlot|LampTextureSlot.texture_coords -> texture_coords: enum "NO DESCRIPTION" -#TextureSlot|LampTextureSlot.use_map_color -> use_map_color: boolean "Lets the texture affect the basic color of the lamp" -#TextureSlot|LampTextureSlot.use_map_shadow -> use_map_shadow: boolean "Lets the texture affect the shadow color of the lamp" -#+ * TextureSlot|MaterialTextureSlot.alpha_factor -> alpha_factor: float "Amount texture affects alpha" -#+ * TextureSlot|MaterialTextureSlot.ambient_factor -> ambient_factor: float "Amount texture affects ambient" -#TextureSlot|MaterialTextureSlot.color_emission_factor -> color_emission_factor: float "Amount texture affects emission color" -#+ * TextureSlot|MaterialTextureSlot.density_factor -> density_factor: float "Amount texture affects density" -#TextureSlot|MaterialTextureSlot.diffuse_color_factor -> diffuse_color_factor: float "Amount texture affects diffuse color" -#+ * TextureSlot|MaterialTextureSlot.diffuse_factor -> diffuse_factor: float "Amount texture affects diffuse reflectivity" -#+ * TextureSlot|MaterialTextureSlot.displacement_factor -> displacement_factor: float "Amount texture displaces the surface" -#+ * TextureSlot|MaterialTextureSlot.emission_factor -> emission_factor: float "Amount texture affects emission" -#+ * TextureSlot|MaterialTextureSlot.emit_factor -> emit_factor: float "Amount texture affects emission" -#+ * TextureSlot|MaterialTextureSlot.hardness_factor -> hardness_factor: float "Amount texture affects hardness" -#+ * TextureSlot|MaterialTextureSlot.mapping -> mapping: enum "NO DESCRIPTION" -#TextureSlot|MaterialTextureSlot.mapping_x -> mapping_x: enum "NO DESCRIPTION" -#TextureSlot|MaterialTextureSlot.mapping_y -> mapping_y: enum "NO DESCRIPTION" -#TextureSlot|MaterialTextureSlot.mapping_z -> mapping_z: enum "NO DESCRIPTION" -#+ * TextureSlot|MaterialTextureSlot.mirror_factor -> mirror_factor: float "Amount texture affects mirror color" -#+ * TextureSlot|MaterialTextureSlot.normal_factor -> normal_factor: float "Amount texture affects normal values" -#+ * TextureSlot|MaterialTextureSlot.normal_map_space -> normal_map_space: enum "NO DESCRIPTION" -#+ * TextureSlot|MaterialTextureSlot.object -> object: pointer "Object to use for mapping with Object texture coordinates" -#+ * TextureSlot|MaterialTextureSlot.raymir_factor -> raymir_factor: float "Amount texture affects ray mirror" -#TextureSlot|MaterialTextureSlot.reflection_color_factor -> reflection_color_factor: float "Amount texture affects color of out-scattered light" -#+ * TextureSlot|MaterialTextureSlot.reflection_factor -> reflection_factor: float "Amount texture affects brightness of out-scattered light" -#+ * TextureSlot|MaterialTextureSlot.scattering_factor -> scattering_factor: float "Amount texture affects scattering" -#TextureSlot|MaterialTextureSlot.specular_color_factor -> specular_color_factor: float "Amount texture affects specular color" -#+ * TextureSlot|MaterialTextureSlot.specular_factor -> specular_factor: float "Amount texture affects specular reflectivity" -#TextureSlot|MaterialTextureSlot.texture_coords -> texture_coords: enum "NO DESCRIPTION" -#+ * TextureSlot|MaterialTextureSlot.translucency_factor -> translucency_factor: float "Amount texture affects translucency" -#TextureSlot|MaterialTextureSlot.transmission_color_factor -> transmission_color_factor: float "Amount texture affects result color after light has been scattered/absorbed" -#+ * TextureSlot|MaterialTextureSlot.use -> use: boolean "Enable this material texture slot" -#TextureSlot|MaterialTextureSlot.use_from_dupli -> use_from_dupli: boolean "Duplis instanced from verts, faces or particles, inherit texture coordinate from their parent" -#TextureSlot|MaterialTextureSlot.use_from_original -> use_from_original: boolean "Duplis derive their object coordinates from the original objects transformation" -#TextureSlot|MaterialTextureSlot.use_map_alpha -> use_map_alpha: boolean "Causes the texture to affect the alpha value" -#TextureSlot|MaterialTextureSlot.use_map_ambient -> use_map_ambient: boolean "Causes the texture to affect the value of ambient" -#TextureSlot|MaterialTextureSlot.use_map_color_diffuse -> use_map_color_diffuse: boolean "Causes the texture to affect basic color of the material" -#TextureSlot|MaterialTextureSlot.use_map_color_emission -> use_map_color_emission: boolean "Causes the texture to affect the color of emission" -#TextureSlot|MaterialTextureSlot.use_map_color_reflection -> use_map_color_reflection: boolean "Causes the texture to affect the color of scattered light" -#TextureSlot|MaterialTextureSlot.use_map_color_spec -> use_map_color_spec: boolean "Causes the texture to affect the specularity color" -#TextureSlot|MaterialTextureSlot.use_map_color_transmission -> use_map_color_transmission: boolean "Causes the texture to affect the result color after other light has been scattered/absorbed" -#TextureSlot|MaterialTextureSlot.use_map_density -> use_map_density: boolean "Causes the texture to affect the volumes density" -#TextureSlot|MaterialTextureSlot.use_map_diffuse -> use_map_diffuse: boolean "Causes the texture to affect the value of the materials diffuse reflectivity" -#TextureSlot|MaterialTextureSlot.use_map_displacement -> use_map_displacement: boolean "Let the texture displace the surface" -#TextureSlot|MaterialTextureSlot.use_map_emission -> use_map_emission: boolean "Causes the texture to affect the volumes emission" -#TextureSlot|MaterialTextureSlot.use_map_emit -> use_map_emit: boolean "Causes the texture to affect the emit value" -#TextureSlot|MaterialTextureSlot.use_map_hardness -> use_map_hardness: boolean "Causes the texture to affect the hardness value" -#TextureSlot|MaterialTextureSlot.use_map_mirror -> use_map_mirror: boolean "Causes the texture to affect the mirror color" -#TextureSlot|MaterialTextureSlot.use_map_normal -> use_map_normal: boolean "Causes the texture to affect the rendered normal" -#TextureSlot|MaterialTextureSlot.use_map_raymir -> use_map_raymir: boolean "Causes the texture to affect the ray-mirror value" -#TextureSlot|MaterialTextureSlot.use_map_reflect -> use_map_reflect: boolean "Causes the texture to affect the reflected lights brightness" -#TextureSlot|MaterialTextureSlot.use_map_scatter -> use_map_scatter: boolean "Causes the texture to affect the volumes scattering" -#TextureSlot|MaterialTextureSlot.use_map_specular -> use_map_specular: boolean "Causes the texture to affect the value of specular reflectivity" -#TextureSlot|MaterialTextureSlot.use_map_translucency -> use_map_translucency: boolean "Causes the texture to affect the translucency value" -#TextureSlot|MaterialTextureSlot.use_map_warp -> use_map_warp: boolean "Let the texture warp texture coordinates of next channels" -#TextureSlot|MaterialTextureSlot.use_old_bump -> use_old_bump: boolean "Use old bump mapping (backwards compatibility option)" -#+ * TextureSlot|MaterialTextureSlot.uv_layer -> uv_layer: string "UV layer to use for mapping with UV texture coordinates" -#+ * TextureSlot|MaterialTextureSlot.warp_factor -> warp_factor: float "Amount texture affects texture coordinates of next channels" -#+ * TextureSlot|WorldTextureSlot.blend_factor -> blend_factor: float "Amount texture affects color progression of the background" -#+ * TextureSlot|WorldTextureSlot.horizon_factor -> horizon_factor: float "Amount texture affects color of the horizon" -#+ * TextureSlot|WorldTextureSlot.object -> object: pointer "Object to use for mapping with Object texture coordinates" -#TextureSlot|WorldTextureSlot.texture_coords -> texture_coords: enum "Texture coordinates used to map the texture onto the background" -#TextureSlot|WorldTextureSlot.use_map_blend -> use_map_blend: boolean "Affect the color progression of the background" -#TextureSlot|WorldTextureSlot.use_map_horizon -> use_map_horizon: boolean "Affect the color of the horizon" -#TextureSlot|WorldTextureSlot.use_map_zenith_down -> use_map_zenith_down: boolean "Affect the color of the zenith below" -#TextureSlot|WorldTextureSlot.use_map_zenith_up -> use_map_zenith_up: boolean "Affect the color of the zenith above" -#+ * TextureSlot|WorldTextureSlot.zenith_down_factor -> zenith_down_factor: float "Amount texture affects color of the zenith below" -#+ * TextureSlot|WorldTextureSlot.zenith_up_factor -> zenith_up_factor: float "Amount texture affects color of the zenith above" -#+ * Theme.bone_color_sets -> bone_color_sets: collection, "(read-only)" -#+ * Theme.console -> console: pointer, "(read-only)" -#+ * Theme.dopesheet_editor -> dopesheet_editor: pointer, "(read-only)" -#+ * Theme.file_browser -> file_browser: pointer, "(read-only)" -#+ * Theme.graph_editor -> graph_editor: pointer, "(read-only)" -#+ * Theme.image_editor -> image_editor: pointer, "(read-only)" -#+ * Theme.info -> info: pointer, "(read-only)" -#+ * Theme.logic_editor -> logic_editor: pointer, "(read-only)" -#+ * Theme.name -> name: string "Name of the theme" -#+ * Theme.nla_editor -> nla_editor: pointer, "(read-only)" -#+ * Theme.node_editor -> node_editor: pointer, "(read-only)" -#+ * Theme.outliner -> outliner: pointer, "(read-only)" -#+ * Theme.properties -> properties: pointer, "(read-only)" -#+ * Theme.sequence_editor -> sequence_editor: pointer, "(read-only)" -#+ * Theme.text_editor -> text_editor: pointer, "(read-only)" -#+ * Theme.theme_area -> theme_area: enum "NO DESCRIPTION" -#+ * Theme.timeline -> timeline: pointer, "(read-only)" -#+ * Theme.user_interface -> user_interface: pointer, "(read-only)" -#+ * Theme.user_preferences -> user_preferences: pointer, "(read-only)" -#+ * Theme.view_3d -> view_3d: pointer, "(read-only)" -#+ * ThemeAudioWindow.back -> back: float[3] "NO DESCRIPTION" -#+ * ThemeAudioWindow.button -> button: float[3] "NO DESCRIPTION" -#+ * ThemeAudioWindow.button_text -> button_text: float[3] "NO DESCRIPTION" -#+ * ThemeAudioWindow.button_text_hi -> button_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeAudioWindow.button_title -> button_title: float[3] "NO DESCRIPTION" -#+ * ThemeAudioWindow.frame_current -> frame_current: float[3] "NO DESCRIPTION" -#+ * ThemeAudioWindow.grid -> grid: float[3] "NO DESCRIPTION" -#+ * ThemeAudioWindow.header -> header: float[3] "NO DESCRIPTION" -#+ * ThemeAudioWindow.header_text -> header_text: float[3] "NO DESCRIPTION" -#+ * ThemeAudioWindow.header_text_hi -> header_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeAudioWindow.text -> text: float[3] "NO DESCRIPTION" -#+ * ThemeAudioWindow.text_hi -> text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeAudioWindow.title -> title: float[3] "NO DESCRIPTION" -#+ * ThemeAudioWindow.window_sliders -> window_sliders: float[3] "NO DESCRIPTION" -#+ * ThemeBoneColorSet.active -> active: float[3] "Color used for active bones" -#+ * ThemeBoneColorSet.normal -> normal: float[3] "Color used for the surface of bones" -#+ * ThemeBoneColorSet.select -> select: float[3] "Color used for selected bones" -#ThemeBoneColorSet.show_colored_constraints -> show_colored_constraints: boolean "Allow the use of colors indicating constraints/keyed status" -#+ * ThemeConsole.back -> back: float[3] "NO DESCRIPTION" -#+ * ThemeConsole.button -> button: float[3] "NO DESCRIPTION" -#+ * ThemeConsole.button_text -> button_text: float[3] "NO DESCRIPTION" -#+ * ThemeConsole.button_text_hi -> button_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeConsole.button_title -> button_title: float[3] "NO DESCRIPTION" -#+ * ThemeConsole.cursor -> cursor: float[3] "NO DESCRIPTION" -#+ * ThemeConsole.header -> header: float[3] "NO DESCRIPTION" -#+ * ThemeConsole.header_text -> header_text: float[3] "NO DESCRIPTION" -#+ * ThemeConsole.header_text_hi -> header_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeConsole.line_error -> line_error: float[3] "NO DESCRIPTION" -#+ * ThemeConsole.line_info -> line_info: float[3] "NO DESCRIPTION" -#+ * ThemeConsole.line_input -> line_input: float[3] "NO DESCRIPTION" -#+ * ThemeConsole.line_output -> line_output: float[3] "NO DESCRIPTION" -#+ * ThemeConsole.text -> text: float[3] "NO DESCRIPTION" -#+ * ThemeConsole.text_hi -> text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeConsole.title -> title: float[3] "NO DESCRIPTION" -#+ * ThemeDopeSheet.active_channels_group -> active_channels_group: float[3] "NO DESCRIPTION" -#+ * ThemeDopeSheet.back -> back: float[3] "NO DESCRIPTION" -#+ * ThemeDopeSheet.button -> button: float[3] "NO DESCRIPTION" -#+ * ThemeDopeSheet.button_text -> button_text: float[3] "NO DESCRIPTION" -#+ * ThemeDopeSheet.button_text_hi -> button_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeDopeSheet.button_title -> button_title: float[3] "NO DESCRIPTION" -#+ * ThemeDopeSheet.channel_group -> channel_group: float[3] "NO DESCRIPTION" -#+ * ThemeDopeSheet.channels -> channels: float[3] "NO DESCRIPTION" -#+ * ThemeDopeSheet.channels_selected -> channels_selected: float[3] "NO DESCRIPTION" -#+ * ThemeDopeSheet.dopesheet_channel -> dopesheet_channel: float[3] "NO DESCRIPTION" -#+ * ThemeDopeSheet.dopesheet_subchannel -> dopesheet_subchannel: float[3] "NO DESCRIPTION" -#+ * ThemeDopeSheet.frame_current -> frame_current: float[3] "NO DESCRIPTION" -#+ * ThemeDopeSheet.grid -> grid: float[3] "NO DESCRIPTION" -#+ * ThemeDopeSheet.header -> header: float[3] "NO DESCRIPTION" -#+ * ThemeDopeSheet.header_text -> header_text: float[3] "NO DESCRIPTION" -#+ * ThemeDopeSheet.header_text_hi -> header_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeDopeSheet.list -> list: float[3] "NO DESCRIPTION" -#+ * ThemeDopeSheet.list_text -> list_text: float[3] "NO DESCRIPTION" -#+ * ThemeDopeSheet.list_text_hi -> list_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeDopeSheet.list_title -> list_title: float[3] "NO DESCRIPTION" -#+ * ThemeDopeSheet.long_key -> long_key: float[3] "NO DESCRIPTION" -#+ * ThemeDopeSheet.long_key_selected -> long_key_selected: float[3] "NO DESCRIPTION" -#+ * ThemeDopeSheet.text -> text: float[3] "NO DESCRIPTION" -#+ * ThemeDopeSheet.text_hi -> text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeDopeSheet.title -> title: float[3] "NO DESCRIPTION" -#+ * ThemeDopeSheet.value_sliders -> value_sliders: float[3] "NO DESCRIPTION" -#+ * ThemeDopeSheet.view_sliders -> view_sliders: float[3] "NO DESCRIPTION" -#+ * ThemeFileBrowser.active_file -> active_file: float[3] "NO DESCRIPTION" -#+ * ThemeFileBrowser.active_file_text -> active_file_text: float[3] "NO DESCRIPTION" -#+ * ThemeFileBrowser.back -> back: float[3] "NO DESCRIPTION" -#+ * ThemeFileBrowser.button -> button: float[3] "NO DESCRIPTION" -#+ * ThemeFileBrowser.button_text -> button_text: float[3] "NO DESCRIPTION" -#+ * ThemeFileBrowser.button_text_hi -> button_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeFileBrowser.button_title -> button_title: float[3] "NO DESCRIPTION" -#+ * ThemeFileBrowser.header -> header: float[3] "NO DESCRIPTION" -#+ * ThemeFileBrowser.header_text -> header_text: float[3] "NO DESCRIPTION" -#+ * ThemeFileBrowser.header_text_hi -> header_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeFileBrowser.list -> list: float[3] "NO DESCRIPTION" -#+ * ThemeFileBrowser.list_text -> list_text: float[3] "NO DESCRIPTION" -#+ * ThemeFileBrowser.list_text_hi -> list_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeFileBrowser.list_title -> list_title: float[3] "NO DESCRIPTION" -#+ * ThemeFileBrowser.scroll_handle -> scroll_handle: float[3] "NO DESCRIPTION" -#+ * ThemeFileBrowser.scrollbar -> scrollbar: float[3] "NO DESCRIPTION" -#+ * ThemeFileBrowser.selected_file -> selected_file: float[3] "NO DESCRIPTION" -#+ * ThemeFileBrowser.text -> text: float[3] "NO DESCRIPTION" -#+ * ThemeFileBrowser.text_hi -> text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeFileBrowser.tiles -> tiles: float[3] "NO DESCRIPTION" -#+ * ThemeFileBrowser.title -> title: float[3] "NO DESCRIPTION" -#+ * ThemeFontStyle.font_kerning_style -> font_kerning_style: enum "Which style to use for font kerning" -#+ * ThemeFontStyle.points -> points: int "NO DESCRIPTION" -#+ * ThemeFontStyle.shadow -> shadow: int "Shadow size in pixels (0, 3 and 5 supported)" -#ThemeFontStyle.shadow_offset_x -> shadow_offset_x: int "Shadow offset in pixels" -#ThemeFontStyle.shadow_offset_y -> shadow_offset_y: int "Shadow offset in pixels" -#+ * ThemeFontStyle.shadowalpha -> shadowalpha: float "NO DESCRIPTION" -#+ * ThemeFontStyle.shadowcolor -> shadowcolor: float "Shadow color in grey value" -#+ * ThemeGraphEditor.active_channels_group -> active_channels_group: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.back -> back: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.button -> button: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.button_text -> button_text: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.button_text_hi -> button_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.button_title -> button_title: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.channel_group -> channel_group: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.channels_region -> channels_region: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.dopesheet_channel -> dopesheet_channel: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.dopesheet_subchannel -> dopesheet_subchannel: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.frame_current -> frame_current: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.grid -> grid: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.handle_align -> handle_align: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.handle_auto -> handle_auto: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.handle_free -> handle_free: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.handle_sel_align -> handle_sel_align: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.handle_sel_auto -> handle_sel_auto: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.handle_sel_free -> handle_sel_free: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.handle_sel_vect -> handle_sel_vect: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.handle_vect -> handle_vect: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.handle_vertex -> handle_vertex: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.handle_vertex_select -> handle_vertex_select: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.handle_vertex_size -> handle_vertex_size: int "NO DESCRIPTION" -#+ * ThemeGraphEditor.header -> header: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.header_text -> header_text: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.header_text_hi -> header_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.lastsel_point -> lastsel_point: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.list -> list: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.list_text -> list_text: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.list_text_hi -> list_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.list_title -> list_title: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.panel -> panel: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.text -> text: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.text_hi -> text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.title -> title: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.vertex -> vertex: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.vertex_select -> vertex_select: float[3] "NO DESCRIPTION" -#+ * ThemeGraphEditor.vertex_size -> vertex_size: int "NO DESCRIPTION" -#+ * ThemeGraphEditor.window_sliders -> window_sliders: float[3] "NO DESCRIPTION" -#+ * ThemeImageEditor.back -> back: float[3] "NO DESCRIPTION" -#+ * ThemeImageEditor.button -> button: float[3] "NO DESCRIPTION" -#+ * ThemeImageEditor.button_text -> button_text: float[3] "NO DESCRIPTION" -#+ * ThemeImageEditor.button_text_hi -> button_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeImageEditor.button_title -> button_title: float[3] "NO DESCRIPTION" -#+ * ThemeImageEditor.editmesh_active -> editmesh_active: float[4] "NO DESCRIPTION" -#+ * ThemeImageEditor.face -> face: float[4] "NO DESCRIPTION" -#+ * ThemeImageEditor.face_dot -> face_dot: float[3] "NO DESCRIPTION" -#+ * ThemeImageEditor.face_select -> face_select: float[4] "NO DESCRIPTION" -#+ * ThemeImageEditor.facedot_size -> facedot_size: int "NO DESCRIPTION" -#+ * ThemeImageEditor.header -> header: float[3] "NO DESCRIPTION" -#+ * ThemeImageEditor.header_text -> header_text: float[3] "NO DESCRIPTION" -#+ * ThemeImageEditor.header_text_hi -> header_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeImageEditor.scope_back -> scope_back: float[4] "NO DESCRIPTION" -#+ * ThemeImageEditor.text -> text: float[3] "NO DESCRIPTION" -#+ * ThemeImageEditor.text_hi -> text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeImageEditor.title -> title: float[3] "NO DESCRIPTION" -#+ * ThemeImageEditor.vertex -> vertex: float[3] "NO DESCRIPTION" -#+ * ThemeImageEditor.vertex_select -> vertex_select: float[3] "NO DESCRIPTION" -#+ * ThemeImageEditor.vertex_size -> vertex_size: int "NO DESCRIPTION" -#+ * ThemeInfo.back -> back: float[3] "NO DESCRIPTION" -#+ * ThemeInfo.button -> button: float[3] "NO DESCRIPTION" -#+ * ThemeInfo.button_text -> button_text: float[3] "NO DESCRIPTION" -#+ * ThemeInfo.button_text_hi -> button_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeInfo.button_title -> button_title: float[3] "NO DESCRIPTION" -#+ * ThemeInfo.header -> header: float[3] "NO DESCRIPTION" -#+ * ThemeInfo.header_text -> header_text: float[3] "NO DESCRIPTION" -#+ * ThemeInfo.header_text_hi -> header_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeInfo.text -> text: float[3] "NO DESCRIPTION" -#+ * ThemeInfo.text_hi -> text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeInfo.title -> title: float[3] "NO DESCRIPTION" -#+ * ThemeLogicEditor.back -> back: float[3] "NO DESCRIPTION" -#+ * ThemeLogicEditor.button -> button: float[3] "NO DESCRIPTION" -#+ * ThemeLogicEditor.button_text -> button_text: float[3] "NO DESCRIPTION" -#+ * ThemeLogicEditor.button_text_hi -> button_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeLogicEditor.button_title -> button_title: float[3] "NO DESCRIPTION" -#+ * ThemeLogicEditor.header -> header: float[3] "NO DESCRIPTION" -#+ * ThemeLogicEditor.header_text -> header_text: float[3] "NO DESCRIPTION" -#+ * ThemeLogicEditor.header_text_hi -> header_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeLogicEditor.panel -> panel: float[3] "NO DESCRIPTION" -#+ * ThemeLogicEditor.text -> text: float[3] "NO DESCRIPTION" -#+ * ThemeLogicEditor.text_hi -> text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeLogicEditor.title -> title: float[3] "NO DESCRIPTION" -#+ * ThemeNLAEditor.back -> back: float[3] "NO DESCRIPTION" -#+ * ThemeNLAEditor.bars -> bars: float[3] "NO DESCRIPTION" -#+ * ThemeNLAEditor.bars_selected -> bars_selected: float[3] "NO DESCRIPTION" -#+ * ThemeNLAEditor.button -> button: float[3] "NO DESCRIPTION" -#+ * ThemeNLAEditor.button_text -> button_text: float[3] "NO DESCRIPTION" -#+ * ThemeNLAEditor.button_text_hi -> button_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeNLAEditor.button_title -> button_title: float[3] "NO DESCRIPTION" -#+ * ThemeNLAEditor.frame_current -> frame_current: float[3] "NO DESCRIPTION" -#+ * ThemeNLAEditor.grid -> grid: float[3] "NO DESCRIPTION" -#+ * ThemeNLAEditor.header -> header: float[3] "NO DESCRIPTION" -#+ * ThemeNLAEditor.header_text -> header_text: float[3] "NO DESCRIPTION" -#+ * ThemeNLAEditor.header_text_hi -> header_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeNLAEditor.list -> list: float[3] "NO DESCRIPTION" -#+ * ThemeNLAEditor.list_text -> list_text: float[3] "NO DESCRIPTION" -#+ * ThemeNLAEditor.list_text_hi -> list_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeNLAEditor.list_title -> list_title: float[3] "NO DESCRIPTION" -#+ * ThemeNLAEditor.strips -> strips: float[3] "NO DESCRIPTION" -#+ * ThemeNLAEditor.strips_selected -> strips_selected: float[3] "NO DESCRIPTION" -#+ * ThemeNLAEditor.text -> text: float[3] "NO DESCRIPTION" -#+ * ThemeNLAEditor.text_hi -> text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeNLAEditor.title -> title: float[3] "NO DESCRIPTION" -#+ * ThemeNLAEditor.view_sliders -> view_sliders: float[3] "NO DESCRIPTION" -#+ * ThemeNodeEditor.back -> back: float[3] "NO DESCRIPTION" -#+ * ThemeNodeEditor.button -> button: float[3] "NO DESCRIPTION" -#+ * ThemeNodeEditor.button_text -> button_text: float[3] "NO DESCRIPTION" -#+ * ThemeNodeEditor.button_text_hi -> button_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeNodeEditor.button_title -> button_title: float[3] "NO DESCRIPTION" -#+ * ThemeNodeEditor.converter_node -> converter_node: float[3] "NO DESCRIPTION" -#+ * ThemeNodeEditor.group_node -> group_node: float[3] "NO DESCRIPTION" -#+ * ThemeNodeEditor.header -> header: float[3] "NO DESCRIPTION" -#+ * ThemeNodeEditor.header_text -> header_text: float[3] "NO DESCRIPTION" -#+ * ThemeNodeEditor.header_text_hi -> header_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeNodeEditor.in_out_node -> in_out_node: float[3] "NO DESCRIPTION" -#+ * ThemeNodeEditor.list -> list: float[3] "NO DESCRIPTION" -#+ * ThemeNodeEditor.list_text -> list_text: float[3] "NO DESCRIPTION" -#+ * ThemeNodeEditor.list_text_hi -> list_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeNodeEditor.list_title -> list_title: float[3] "NO DESCRIPTION" -#+ * ThemeNodeEditor.node_backdrop -> node_backdrop: float[4] "NO DESCRIPTION" -#+ * ThemeNodeEditor.operator_node -> operator_node: float[3] "NO DESCRIPTION" -#+ * ThemeNodeEditor.selected_text -> selected_text: float[3] "NO DESCRIPTION" -#+ * ThemeNodeEditor.text -> text: float[3] "NO DESCRIPTION" -#+ * ThemeNodeEditor.text_hi -> text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeNodeEditor.title -> title: float[3] "NO DESCRIPTION" -#ThemeNodeEditor.wire -> wire: float[3] "NO DESCRIPTION" -#+ * ThemeNodeEditor.wire_select -> wire_select: float[3] "NO DESCRIPTION" -#+ * ThemeOutliner.back -> back: float[3] "NO DESCRIPTION" -#+ * ThemeOutliner.button -> button: float[3] "NO DESCRIPTION" -#+ * ThemeOutliner.button_text -> button_text: float[3] "NO DESCRIPTION" -#+ * ThemeOutliner.button_text_hi -> button_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeOutliner.button_title -> button_title: float[3] "NO DESCRIPTION" -#+ * ThemeOutliner.header -> header: float[3] "NO DESCRIPTION" -#+ * ThemeOutliner.header_text -> header_text: float[3] "NO DESCRIPTION" -#+ * ThemeOutliner.header_text_hi -> header_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeOutliner.text -> text: float[3] "NO DESCRIPTION" -#+ * ThemeOutliner.text_hi -> text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeOutliner.title -> title: float[3] "NO DESCRIPTION" -#+ * ThemeProperties.back -> back: float[3] "NO DESCRIPTION" -#+ * ThemeProperties.button -> button: float[3] "NO DESCRIPTION" -#+ * ThemeProperties.button_text -> button_text: float[3] "NO DESCRIPTION" -#+ * ThemeProperties.button_text_hi -> button_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeProperties.button_title -> button_title: float[3] "NO DESCRIPTION" -#+ * ThemeProperties.header -> header: float[3] "NO DESCRIPTION" -#+ * ThemeProperties.header_text -> header_text: float[3] "NO DESCRIPTION" -#+ * ThemeProperties.header_text_hi -> header_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeProperties.panel -> panel: float[3] "NO DESCRIPTION" -#+ * ThemeProperties.text -> text: float[3] "NO DESCRIPTION" -#+ * ThemeProperties.text_hi -> text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeProperties.title -> title: float[3] "NO DESCRIPTION" -#+ * ThemeSequenceEditor.audio_strip -> audio_strip: float[3] "NO DESCRIPTION" -#+ * ThemeSequenceEditor.back -> back: float[3] "NO DESCRIPTION" -#+ * ThemeSequenceEditor.button -> button: float[3] "NO DESCRIPTION" -#+ * ThemeSequenceEditor.button_text -> button_text: float[3] "NO DESCRIPTION" -#+ * ThemeSequenceEditor.button_text_hi -> button_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeSequenceEditor.button_title -> button_title: float[3] "NO DESCRIPTION" -#+ * ThemeSequenceEditor.draw_action -> draw_action: float[3] "NO DESCRIPTION" -#+ * ThemeSequenceEditor.effect_strip -> effect_strip: float[3] "NO DESCRIPTION" -#+ * ThemeSequenceEditor.frame_current -> frame_current: float[3] "NO DESCRIPTION" -#+ * ThemeSequenceEditor.grid -> grid: float[3] "NO DESCRIPTION" -#+ * ThemeSequenceEditor.header -> header: float[3] "NO DESCRIPTION" -#+ * ThemeSequenceEditor.header_text -> header_text: float[3] "NO DESCRIPTION" -#+ * ThemeSequenceEditor.header_text_hi -> header_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeSequenceEditor.image_strip -> image_strip: float[3] "NO DESCRIPTION" -#+ * ThemeSequenceEditor.keyframe -> keyframe: float[3] "NO DESCRIPTION" -#+ * ThemeSequenceEditor.meta_strip -> meta_strip: float[3] "NO DESCRIPTION" -#+ * ThemeSequenceEditor.movie_strip -> movie_strip: float[3] "NO DESCRIPTION" -#+ * ThemeSequenceEditor.plugin_strip -> plugin_strip: float[3] "NO DESCRIPTION" -#+ * ThemeSequenceEditor.scene_strip -> scene_strip: float[3] "NO DESCRIPTION" -#+ * ThemeSequenceEditor.text -> text: float[3] "NO DESCRIPTION" -#+ * ThemeSequenceEditor.text_hi -> text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeSequenceEditor.title -> title: float[3] "NO DESCRIPTION" -#+ * ThemeSequenceEditor.transition_strip -> transition_strip: float[3] "NO DESCRIPTION" -#+ * ThemeSequenceEditor.window_sliders -> window_sliders: float[3] "NO DESCRIPTION" -#ThemeStyle.group_label -> group_label: pointer, "(read-only)" -#ThemeStyle.panel_title -> panel_title: pointer, "(read-only)" -#+ * ThemeStyle.panelzoom -> panelzoom: float "Default zoom level for panel areas" -#+ * ThemeStyle.widget -> widget: pointer, "(read-only)" -#ThemeStyle.widget_label -> widget_label: pointer, "(read-only)" -#+ * ThemeTextEditor.back -> back: float[3] "NO DESCRIPTION" -#+ * ThemeTextEditor.button -> button: float[3] "NO DESCRIPTION" -#+ * ThemeTextEditor.button_text -> button_text: float[3] "NO DESCRIPTION" -#+ * ThemeTextEditor.button_text_hi -> button_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeTextEditor.button_title -> button_title: float[3] "NO DESCRIPTION" -#+ * ThemeTextEditor.cursor -> cursor: float[3] "NO DESCRIPTION" -#+ * ThemeTextEditor.header -> header: float[3] "NO DESCRIPTION" -#+ * ThemeTextEditor.header_text -> header_text: float[3] "NO DESCRIPTION" -#+ * ThemeTextEditor.header_text_hi -> header_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeTextEditor.line_numbers_background -> line_numbers_background: float[3] "NO DESCRIPTION" -#+ * ThemeTextEditor.scroll_bar -> scroll_bar: float[3] "NO DESCRIPTION" -#+ * ThemeTextEditor.selected_text -> selected_text: float[3] "NO DESCRIPTION" -#+ * ThemeTextEditor.syntax_builtin -> syntax_builtin: float[3] "NO DESCRIPTION" -#+ * ThemeTextEditor.syntax_comment -> syntax_comment: float[3] "NO DESCRIPTION" -#+ * ThemeTextEditor.syntax_numbers -> syntax_numbers: float[3] "NO DESCRIPTION" -#+ * ThemeTextEditor.syntax_special -> syntax_special: float[3] "NO DESCRIPTION" -#+ * ThemeTextEditor.syntax_string -> syntax_string: float[3] "NO DESCRIPTION" -#+ * ThemeTextEditor.text -> text: float[3] "NO DESCRIPTION" -#+ * ThemeTextEditor.text_hi -> text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeTextEditor.title -> title: float[3] "NO DESCRIPTION" -#+ * ThemeTimeline.back -> back: float[3] "NO DESCRIPTION" -#+ * ThemeTimeline.button -> button: float[3] "NO DESCRIPTION" -#+ * ThemeTimeline.button_text -> button_text: float[3] "NO DESCRIPTION" -#+ * ThemeTimeline.button_text_hi -> button_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeTimeline.button_title -> button_title: float[3] "NO DESCRIPTION" -#+ * ThemeTimeline.frame_current -> frame_current: float[3] "NO DESCRIPTION" -#+ * ThemeTimeline.grid -> grid: float[3] "NO DESCRIPTION" -#+ * ThemeTimeline.header -> header: float[3] "NO DESCRIPTION" -#+ * ThemeTimeline.header_text -> header_text: float[3] "NO DESCRIPTION" -#+ * ThemeTimeline.header_text_hi -> header_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeTimeline.text -> text: float[3] "NO DESCRIPTION" -#+ * ThemeTimeline.text_hi -> text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeTimeline.title -> title: float[3] "NO DESCRIPTION" -#+ * ThemeUserInterface.icon_file -> icon_file: string "NO DESCRIPTION" -#+ * ThemeUserInterface.wcol_box -> wcol_box: pointer, "(read-only)" -#+ * ThemeUserInterface.wcol_list_item -> wcol_list_item: pointer, "(read-only)" -#+ * ThemeUserInterface.wcol_menu -> wcol_menu: pointer, "(read-only)" -#+ * ThemeUserInterface.wcol_menu_back -> wcol_menu_back: pointer, "(read-only)" -#+ * ThemeUserInterface.wcol_menu_item -> wcol_menu_item: pointer, "(read-only)" -#+ * ThemeUserInterface.wcol_num -> wcol_num: pointer, "(read-only)" -#+ * ThemeUserInterface.wcol_numslider -> wcol_numslider: pointer, "(read-only)" -#+ * ThemeUserInterface.wcol_option -> wcol_option: pointer, "(read-only)" -#+ * ThemeUserInterface.wcol_progress -> wcol_progress: pointer, "(read-only)" -#+ * ThemeUserInterface.wcol_pulldown -> wcol_pulldown: pointer, "(read-only)" -#+ * ThemeUserInterface.wcol_radio -> wcol_radio: pointer, "(read-only)" -#+ * ThemeUserInterface.wcol_regular -> wcol_regular: pointer, "(read-only)" -#+ * ThemeUserInterface.wcol_scroll -> wcol_scroll: pointer, "(read-only)" -#+ * ThemeUserInterface.wcol_state -> wcol_state: pointer, "(read-only)" -#+ * ThemeUserInterface.wcol_text -> wcol_text: pointer, "(read-only)" -#+ * ThemeUserInterface.wcol_toggle -> wcol_toggle: pointer, "(read-only)" -#+ * ThemeUserInterface.wcol_tool -> wcol_tool: pointer, "(read-only)" -#+ * ThemeUserPreferences.back -> back: float[3] "NO DESCRIPTION" -#+ * ThemeUserPreferences.button -> button: float[3] "NO DESCRIPTION" -#+ * ThemeUserPreferences.button_text -> button_text: float[3] "NO DESCRIPTION" -#+ * ThemeUserPreferences.button_text_hi -> button_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeUserPreferences.button_title -> button_title: float[3] "NO DESCRIPTION" -#+ * ThemeUserPreferences.header -> header: float[3] "NO DESCRIPTION" -#+ * ThemeUserPreferences.header_text -> header_text: float[3] "NO DESCRIPTION" -#+ * ThemeUserPreferences.header_text_hi -> header_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeUserPreferences.text -> text: float[3] "NO DESCRIPTION" -#+ * ThemeUserPreferences.text_hi -> text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeUserPreferences.title -> title: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.act_spline -> act_spline: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.back -> back: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.bone_pose -> bone_pose: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.bone_solid -> bone_solid: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.button -> button: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.button_text -> button_text: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.button_text_hi -> button_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.button_title -> button_title: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.edge_crease -> edge_crease: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.edge_facesel -> edge_facesel: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.edge_seam -> edge_seam: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.edge_select -> edge_select: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.edge_sharp -> edge_sharp: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.editmesh_active -> editmesh_active: float[4] "NO DESCRIPTION" -#+ * ThemeView3D.face -> face: float[4] "NO DESCRIPTION" -#+ * ThemeView3D.face_dot -> face_dot: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.face_select -> face_select: float[4] "NO DESCRIPTION" -#+ * ThemeView3D.facedot_size -> facedot_size: int "NO DESCRIPTION" -#+ * ThemeView3D.frame_current -> frame_current: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.grid -> grid: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.handle_align -> handle_align: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.handle_auto -> handle_auto: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.handle_free -> handle_free: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.handle_sel_align -> handle_sel_align: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.handle_sel_auto -> handle_sel_auto: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.handle_sel_free -> handle_sel_free: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.handle_sel_vect -> handle_sel_vect: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.handle_vect -> handle_vect: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.header -> header: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.header_text -> header_text: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.header_text_hi -> header_text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.lamp -> lamp: float[4] "NO DESCRIPTION" -#+ * ThemeView3D.lastsel_point -> lastsel_point: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.normal -> normal: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.nurb_sel_uline -> nurb_sel_uline: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.nurb_sel_vline -> nurb_sel_vline: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.nurb_uline -> nurb_uline: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.nurb_vline -> nurb_vline: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.object_active -> object_active: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.object_grouped -> object_grouped: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.object_grouped_active -> object_grouped_active: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.object_selected -> object_selected: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.panel -> panel: float[4] "NO DESCRIPTION" -#+ * ThemeView3D.text -> text: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.text_hi -> text_hi: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.title -> title: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.transform -> transform: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.vertex -> vertex: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.vertex_normal -> vertex_normal: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.vertex_select -> vertex_select: float[3] "NO DESCRIPTION" -#+ * ThemeView3D.vertex_size -> vertex_size: int "NO DESCRIPTION" -#+ * ThemeView3D.wire -> wire: float[3] "NO DESCRIPTION" -#+ * ThemeWidgetColors.inner -> inner: float[4] "NO DESCRIPTION" -#+ * ThemeWidgetColors.inner_sel -> inner_sel: float[4] "NO DESCRIPTION" -#+ * ThemeWidgetColors.item -> item: float[4] "NO DESCRIPTION" -#+ * ThemeWidgetColors.outline -> outline: float[3] "NO DESCRIPTION" -#+ * ThemeWidgetColors.shadedown -> shadedown: int "NO DESCRIPTION" -#+ * ThemeWidgetColors.shadetop -> shadetop: int "NO DESCRIPTION" -#ThemeWidgetColors.show_shaded -> show_shaded: boolean "NO DESCRIPTION" -#+ * ThemeWidgetColors.text -> text: float[3] "NO DESCRIPTION" -#+ * ThemeWidgetColors.text_sel -> text_sel: float[3] "NO DESCRIPTION" -#+ * ThemeWidgetStateColors.blend -> blend: float "NO DESCRIPTION" -#+ * ThemeWidgetStateColors.inner_anim -> inner_anim: float[3] "NO DESCRIPTION" -#+ * ThemeWidgetStateColors.inner_anim_sel -> inner_anim_sel: float[3] "NO DESCRIPTION" -#+ * ThemeWidgetStateColors.inner_driven -> inner_driven: float[3] "NO DESCRIPTION" -#+ * ThemeWidgetStateColors.inner_driven_sel -> inner_driven_sel: float[3] "NO DESCRIPTION" -#+ * ThemeWidgetStateColors.inner_key -> inner_key: float[3] "NO DESCRIPTION" -#+ * ThemeWidgetStateColors.inner_key_sel -> inner_key_sel: float[3] "NO DESCRIPTION" -#+ * TimelineMarker.camera -> camera: pointer "Camera this timeline sets to active" -#+ * TimelineMarker.frame -> frame: int "The frame on which the timeline marker appears" -#+ * TimelineMarker.name -> name: string "NO DESCRIPTION" -#+ * TimelineMarker.select -> select: boolean "Marker selection state" -#ToolSettings.auto_keying_mode -> auto_keying_mode: enum "Mode of automatic keyframe insertion for Objects and Bones" -#+ * ToolSettings.edge_path_mode -> edge_path_mode: enum "The edge flag to tag when selecting the shortest path" -#+ * ToolSettings.etch_adaptive_limit -> etch_adaptive_limit: float "Number of bones in the subdivided stroke" -#+ * ToolSettings.etch_convert_mode -> etch_convert_mode: enum "Method used to convert stroke to bones" -#+ * ToolSettings.etch_length_limit -> etch_length_limit: float "Number of bones in the subdivided stroke" -#+ * ToolSettings.etch_number -> etch_number: string "DOC BROKEN" -#+ * ToolSettings.etch_roll_mode -> etch_roll_mode: enum "Method used to adjust the roll of bones when retargeting" -#+ * ToolSettings.etch_side -> etch_side: string "DOC BROKEN" -#+ * ToolSettings.etch_subdivision_number -> etch_subdivision_number: int "Number of bones in the subdivided stroke" -#+ * ToolSettings.etch_template -> etch_template: pointer "Template armature that will be retargeted to the stroke" -#+ * ToolSettings.image_paint -> image_paint: pointer, "(read-only)" -#ToolSettings.mesh_select_mode -> mesh_select_mode: boolean[3] "Which mesh elements selection works on" -#+ * ToolSettings.normal_size -> normal_size: float "Display size for normals in the 3D view" -#+ * ToolSettings.particle_edit -> particle_edit: pointer, "(read-only)" -#ToolSettings.proportional_edit -> proportional_edit: enum "Proportional editing mode" -#ToolSettings.proportional_edit_falloff -> proportional_edit_falloff: enum "Falloff type for proportional editing mode" -#+ * ToolSettings.sculpt -> sculpt: pointer, "(read-only)" -#+ * ToolSettings.sculpt_paint_use_unified_size -> sculpt_paint_use_unified_size: boolean "Instead of per brush radius, the radius is shared across brushes" -#+ * ToolSettings.sculpt_paint_use_unified_strength -> sculpt_paint_use_unified_strength: boolean "Instead of per brush strength, the strength is shared across brushes" -#ToolSettings.show_uv_local_view -> show_uv_local_view: boolean "Draw only faces with the currently displayed image assigned" -#+ * ToolSettings.snap_element -> snap_element: enum "Type of element to snap to" -#+ * ToolSettings.snap_target -> snap_target: enum "Which part to snap onto the target" -#ToolSettings.use_auto_normalize -> use_auto_normalize: boolean "Ensure all bone-deforming vertex groups add up to 1.0 while weight painting" -#ToolSettings.use_bone_sketching -> use_bone_sketching: boolean "DOC BROKEN" -#ToolSettings.use_etch_autoname -> use_etch_autoname: boolean "DOC BROKEN" -#ToolSettings.use_etch_overdraw -> use_etch_overdraw: boolean "DOC BROKEN" -#ToolSettings.use_etch_quick -> use_etch_quick: boolean "DOC BROKEN" -#ToolSettings.use_keyframe_insert_auto -> use_keyframe_insert_auto: boolean "Automatic keyframe insertion for Objects and Bones" -#ToolSettings.use_mesh_automerge -> use_mesh_automerge: boolean "Automatically merge vertices moved to the same location" -#ToolSettings.use_proportional_edit_objects -> use_proportional_edit_objects: boolean "Proportional editing object mode" -#ToolSettings.use_record_with_nla -> use_record_with_nla: boolean "Add a new NLA Track + Strip for every loop/pass made over the animation to allow non-destructive tweaking" -#ToolSettings.use_snap -> use_snap: boolean "Snap during transform" -#ToolSettings.use_snap_align_rotation -> use_snap_align_rotation: boolean "Align rotation with the snapping target" -#ToolSettings.use_snap_peel_object -> use_snap_peel_object: boolean "Consider objects as whole when finding volume center" -#ToolSettings.use_snap_project -> use_snap_project: boolean "Project vertices on the surface of other objects" -#ToolSettings.use_uv_select_sync -> use_uv_select_sync: boolean "Keep UV and edit mode mesh selection in sync" -#ToolSettings.uv_select_mode -> uv_select_mode: enum "UV selection and display mode" -#+ * ToolSettings.vertex_group_weight -> vertex_group_weight: float "Weight to assign in vertex groups" -#+ * ToolSettings.vertex_paint -> vertex_paint: pointer, "(read-only)" -#+ * ToolSettings.weight_paint -> weight_paint: pointer, "(read-only)" -#+ * TransformOrientation.matrix -> matrix: float[9] "NO DESCRIPTION" -#+ * TransformOrientation.name -> name: string "NO DESCRIPTION" -#+ * UILayout.alignment -> alignment: enum "NO DESCRIPTION" -#+ * UILayout.operator_context -> operator_context: enum "NO DESCRIPTION" -#+ * UILayout.scale_x -> scale_x: float "Scale factor along the X for items in this (sub)layout." -#+ * UILayout.scale_y -> scale_y: float "Scale factor along the Y for items in this (sub)layout." - + * UILayout.active -> show_active: boolean "NO DESCRIPTION" - + * UILayout.enabled -> show_enabled: boolean "When false, this (sub)layout is greyed out." -#+ * UVProjector.object -> object: pointer "Object to use as projector transform" -#UVTextures.active -> active: pointer "Active UV texture" -#+ * UnitSettings.rotation_units -> rotation_units: enum "Unit to use for displaying/editing rotation values" -#+ * UnitSettings.scale_length -> scale_length: float "Scale to use when converting between blender units and dimensions" -#+ * UnitSettings.system -> system: enum "The unit system to use for button display" -#+ * UnitSettings.use_separate -> use_separate: boolean "Display units in pairs" -#+ * UserPreferences.active_section -> active_section: enum "Active section of the user preferences shown in the user interface" -#+ * UserPreferences.addons -> addons: collection, "(read-only)" -#+ * UserPreferences.edit -> edit: pointer, "(read-only) Settings for interacting with Blender data" -#+ * UserPreferences.filepaths -> filepaths: pointer, "(read-only) Default paths for external files" -#+ * UserPreferences.inputs -> inputs: pointer, "(read-only) Settings for input devices" -#+ * UserPreferences.system -> system: pointer, "(read-only) Graphics driver and operating system settings" -#+ * UserPreferences.themes -> themes: collection, "(read-only)" -#UserPreferences.ui_styles -> ui_styles: collection, "(read-only)" -#+ * UserPreferences.view -> view: pointer, "(read-only) Preferences related to viewing data" -#+ * UserPreferencesEdit.auto_keying_mode -> auto_keying_mode: enum "Mode of automatic keyframe insertion for Objects and Bones" -#+ * UserPreferencesEdit.grease_pencil_eraser_radius -> grease_pencil_eraser_radius: int "Radius of eraser brush" -#+ * UserPreferencesEdit.grease_pencil_euclidean_distance -> grease_pencil_euclidean_distance: int "Distance moved by mouse when drawing stroke (in pixels) to include" -#+ * UserPreferencesEdit.grease_pencil_manhattan_distance -> grease_pencil_manhattan_distance: int "Pixels moved by mouse per axis when drawing stroke" -#+ * UserPreferencesEdit.keyframe_new_handle_type -> keyframe_new_handle_type: enum "NO DESCRIPTION" -#+ * UserPreferencesEdit.keyframe_new_interpolation_type -> keyframe_new_interpolation_type: enum "NO DESCRIPTION" -#+ * UserPreferencesEdit.material_link -> material_link: enum "Toggle whether the material is linked to object data or the object block" -#+ * UserPreferencesEdit.object_align -> object_align: enum "When adding objects from a 3D View menu, either align them to that views direction or the world coordinates" -#UserPreferencesEdit.sculpt_paint_overlay_color -> sculpt_paint_overlay_color: float[3] "Color of texture overlay" -#+ * UserPreferencesEdit.undo_memory_limit -> undo_memory_limit: int "Maximum memory usage in megabytes (0 means unlimited)" -#+ * UserPreferencesEdit.undo_steps -> undo_steps: int "Number of undo steps available (smaller values conserve memory)" -#+ * UserPreferencesEdit.use_auto_keying -> use_auto_keying: boolean "Automatic keyframe insertion for Objects and Bones" -#UserPreferencesEdit.use_drag_immediately -> use_drag_immediately: boolean "Moving things with a mouse drag confirms when releasing the button" -#UserPreferencesEdit.use_duplicate_action -> use_duplicate_action: boolean "Causes actions to be duplicated with the object" -#UserPreferencesEdit.use_duplicate_armature -> use_duplicate_armature: boolean "Causes armature data to be duplicated with the object" -#UserPreferencesEdit.use_duplicate_curve -> use_duplicate_curve: boolean "Causes curve data to be duplicated with the object" -#UserPreferencesEdit.use_duplicate_fcurve -> use_duplicate_fcurve: boolean "Causes F-curve data to be duplicated with the object" -#UserPreferencesEdit.use_duplicate_lamp -> use_duplicate_lamp: boolean "Causes lamp data to be duplicated with the object" -#UserPreferencesEdit.use_duplicate_material -> use_duplicate_material: boolean "Causes material data to be duplicated with the object" -#UserPreferencesEdit.use_duplicate_mesh -> use_duplicate_mesh: boolean "Causes mesh data to be duplicated with the object" -#UserPreferencesEdit.use_duplicate_metaball -> use_duplicate_metaball: boolean "Causes metaball data to be duplicated with the object" -#UserPreferencesEdit.use_duplicate_particle -> use_duplicate_particle: boolean "Causes particle systems to be duplicated with the object" -#UserPreferencesEdit.use_duplicate_surface -> use_duplicate_surface: boolean "Causes surface data to be duplicated with the object" -#UserPreferencesEdit.use_duplicate_text -> use_duplicate_text: boolean "Causes text data to be duplicated with the object" -#UserPreferencesEdit.use_duplicate_texture -> use_duplicate_texture: boolean "Causes texture data to be duplicated with the object" -#UserPreferencesEdit.use_enter_edit_mode -> use_enter_edit_mode: boolean "Enter Edit Mode automatically after adding a new object" -#UserPreferencesEdit.use_global_undo -> use_global_undo: boolean "Global undo works by keeping a full copy of the file itself in memory, so takes extra memory" -#UserPreferencesEdit.use_grease_pencil_simplify_stroke -> use_grease_pencil_simplify_stroke: boolean "Simplify the final stroke" -#UserPreferencesEdit.use_grease_pencil_smooth_stroke -> use_grease_pencil_smooth_stroke: boolean "Smooth the final stroke" -#UserPreferencesEdit.use_insertkey_xyz_to_rgb -> use_insertkey_xyz_to_rgb: boolean "Color for newly added transformation F-Curves (Location, Rotation, Scale) and also Color is based on the transform axis" -#UserPreferencesEdit.use_keyframe_insert_available -> use_keyframe_insert_available: boolean "Automatic keyframe insertion in available curves" -#UserPreferencesEdit.use_keyframe_insert_keyingset -> use_keyframe_insert_keyingset: boolean "Automatic keyframe insertion using active Keying Set" -#UserPreferencesEdit.use_keyframe_insert_needed -> use_keyframe_insert_needed: boolean "Keyframe insertion only when keyframe needed" -#+ * UserPreferencesEdit.use_negative_frames -> use_negative_frames: boolean "Current frame number can be manually set to a negative value" -#+ * UserPreferencesEdit.use_visual_keying -> use_visual_keying: boolean "Use Visual keying automatically for constrained objects" -#+ * UserPreferencesFilePaths.animation_player -> animation_player: string "Path to a custom animation/frame sequence player" -#+ * UserPreferencesFilePaths.animation_player_preset -> animation_player_preset: enum "Preset configs for external animation players" -#+ * UserPreferencesFilePaths.auto_save_time -> auto_save_time: int "The time (in minutes) to wait between automatic temporary saves" -#UserPreferencesFilePaths.font_directory -> font_directory: string "The default directory to search for loading fonts" -#+ * UserPreferencesFilePaths.image_editor -> image_editor: string "Path to an image editor" -#+ * UserPreferencesFilePaths.recent_files -> recent_files: int "Maximum number of recently opened files to remember" -#+ * UserPreferencesFilePaths.render_output_directory -> render_output_directory: string "The default directory for rendering output" -#+ * UserPreferencesFilePaths.save_version -> save_version: int "The number of old versions to maintain in the current directory, when manually saving" -#UserPreferencesFilePaths.script_directory -> script_directory: string "The default directory to search for Python scripts (resets python module search path: sys.path)" -#+ * UserPreferencesFilePaths.sequence_plugin_directory -> sequence_plugin_directory: string "The default directory to search for sequence plugins" -#UserPreferencesFilePaths.show_hidden_files_datablocks -> show_hidden_files_datablocks: boolean "Hide files/datablocks that start with a dot(.*)" -#UserPreferencesFilePaths.sound_directory -> sound_directory: string "The default directory to search for sounds" -#+ * UserPreferencesFilePaths.temporary_directory -> temporary_directory: string "The directory for storing temporary save files" -#UserPreferencesFilePaths.texture_directory -> texture_directory: string "The default directory to search for textures" -#+ * UserPreferencesFilePaths.texture_plugin_directory -> texture_plugin_directory: string "The default directory to search for texture plugins" -#UserPreferencesFilePaths.use_auto_save_temporary_files -> use_auto_save_temporary_files: boolean "Automatic saving of temporary files" -#UserPreferencesFilePaths.use_file_compression -> use_file_compression: boolean "Enable file compression when saving .blend files" -#UserPreferencesFilePaths.use_filter_files -> use_filter_files: boolean "Display only files with extensions in the image select window" -#UserPreferencesFilePaths.use_load_ui -> use_load_ui: boolean "Load user interface setup when loading .blend files" -#+ * UserPreferencesFilePaths.use_relative_paths -> use_relative_paths: boolean "Default relative path option for the file selector" -#UserPreferencesFilePaths.use_save_preview_images -> use_save_preview_images: boolean "Enables automatic saving of preview images in the .blend file" -#+ * UserPreferencesInput.edited_keymaps -> edited_keymaps: collection, "(read-only)" -#UserPreferencesInput.invert_mouse_wheel_zoom -> invert_mouse_wheel_zoom: boolean "Invert the axis of mouse movement for zooming" -#UserPreferencesInput.invert_zoom_wheel -> invert_zoom_wheel: boolean "Swap the Mouse Wheel zoom direction" -#UserPreferencesInput.mouse_double_click_time -> mouse_double_click_time: int "The time (in ms) for a double click" -#+ * UserPreferencesInput.ndof_pan_speed -> ndof_pan_speed: int "The overall panning speed of an NDOF device, as percent of standard" -#+ * UserPreferencesInput.ndof_rotate_speed -> ndof_rotate_speed: int "The overall rotation speed of an NDOF device, as percent of standard" -#+ * UserPreferencesInput.select_mouse -> select_mouse: enum "The mouse button used for selection" -#UserPreferencesInput.use_emulate_numpad -> use_emulate_numpad: boolean "Causes the 1 to 0 keys to act as the numpad (useful for laptops)" -#UserPreferencesInput.use_mouse_continuous -> use_mouse_continuous: boolean "Allow moving the mouse outside the view on some manipulations (transform, ui control drag)" -#UserPreferencesInput.use_mouse_emulate_3_button -> use_mouse_emulate_3_button: boolean "Emulates Middle Mouse with Alt+LeftMouse (doesnt work with Left Mouse Select option)" -#UserPreferencesInput.use_mouse_mmb_paste -> use_mouse_mmb_paste: boolean "In text window, paste with middle mouse button instead of panning" -#UserPreferencesInput.view_rotate_method -> view_rotate_method: enum "Rotation style in the viewport" -#UserPreferencesInput.view_zoom_axis -> view_zoom_axis: enum "Axis of mouse movement to zoom in or out on" -#UserPreferencesInput.view_zoom_method -> view_zoom_method: enum "Which style to use for viewport scaling" -#+ * UserPreferencesInput.wheel_scroll_lines -> wheel_scroll_lines: int "The number of lines scrolled at a time with the mouse wheel" -#+ * UserPreferencesSystem.audio_channels -> audio_channels: enum "Sets the audio channel count" -#+ * UserPreferencesSystem.audio_device -> audio_device: enum "Sets the audio output device" -#+ * UserPreferencesSystem.audio_mixing_buffer -> audio_mixing_buffer: enum "Sets the number of samples used by the audio mixing buffer" -#+ * UserPreferencesSystem.audio_sample_format -> audio_sample_format: enum "Sets the audio sample format" -#+ * UserPreferencesSystem.audio_sample_rate -> audio_sample_rate: enum "Sets the audio sample rate" -#+ * UserPreferencesSystem.color_picker_type -> color_picker_type: enum "Different styles of displaying the color picker widget" -#+ * UserPreferencesSystem.dpi -> dpi: int "Font size and resolution for display" -#+ * UserPreferencesSystem.frame_server_port -> frame_server_port: int "Frameserver Port for Frameserver Rendering" -#UserPreferencesSystem.gl_clip_alpha -> gl_clip_alpha: float "Clip alpha below this threshold in the 3D textured view" -#+ * UserPreferencesSystem.gl_texture_limit -> gl_texture_limit: enum "Limit the texture size to save graphics memory" -#+ * UserPreferencesSystem.language -> language: enum "Language use for translation" -#+ * UserPreferencesSystem.memory_cache_limit -> memory_cache_limit: int "Memory cache limit in sequencer (megabytes)" -#+ * UserPreferencesSystem.prefetch_frames -> prefetch_frames: int "Number of frames to render ahead during playback" -#+ * UserPreferencesSystem.screencast_fps -> screencast_fps: int "Frame rate for the screencast to be played back" -#+ * UserPreferencesSystem.screencast_wait_time -> screencast_wait_time: int "Time in milliseconds between each frame recorded for screencast" -#+ * UserPreferencesSystem.scrollback -> scrollback: int "Maximum number of lines to store for the console buffer" -#+ * UserPreferencesSystem.solid_lights -> solid_lights: collection, "(read-only) Lights user to display objects in solid draw mode" -#+ * UserPreferencesSystem.texture_collection_rate -> texture_collection_rate: int "Number of seconds between each run of the GL texture garbage collector" -#+ * UserPreferencesSystem.texture_time_out -> texture_time_out: int "Time since last access of a GL texture in seconds after which it is freed. (Set to 0 to keep textures allocated.)" -#+ * UserPreferencesSystem.use_antialiasing -> use_antialiasing: boolean "Use anti-aliasing for the 3D view (may impact redraw performance)" -#UserPreferencesSystem.use_international_fonts -> use_international_fonts: boolean "Use international fonts" -#+ * UserPreferencesSystem.use_mipmaps -> use_mipmaps: boolean "Scale textures for the 3D View (looks nicer but uses more memory and slows image reloading)" -#UserPreferencesSystem.use_preview_images -> use_preview_images: boolean "Enables automatic saving of preview images in the .blend file (Windows only)" -#UserPreferencesSystem.use_scripts_auto_execute -> use_scripts_auto_execute: boolean "Allow any .blend file to run scripts automatically (unsafe with blend files from an untrusted source)" -#UserPreferencesSystem.use_tabs_as_spaces -> use_tabs_as_spaces: boolean "Automatically converts all new tabs into spaces for new and loaded text files" -#+ * UserPreferencesSystem.use_textured_fonts -> use_textured_fonts: boolean "Use textures for drawing international fonts" -#UserPreferencesSystem.use_translate_buttons -> use_translate_buttons: boolean "Translate button labels" -#UserPreferencesSystem.use_translate_toolbox -> use_translate_toolbox: boolean "Translate toolbox menu" -#UserPreferencesSystem.use_translate_tooltips -> use_translate_tooltips: boolean "Translate Tooltips" -#UserPreferencesSystem.use_vertex_buffer_objects -> use_vertex_buffer_objects: boolean "Use Vertex Buffer Objects (or Vertex Arrays, if unsupported) for viewport rendering" -#+ * UserPreferencesSystem.use_weight_color_range -> use_weight_color_range: boolean "Enable color range used for weight visualization in weight painting mode" -#+ * UserPreferencesSystem.weight_color_range -> weight_color_range: pointer, "(read-only) Color range used for weight visualization in weight painting mode" -#+ * UserPreferencesSystem.window_draw_method -> window_draw_method: enum "Drawing method used by the window manager" -#+ * UserPreferencesView.manipulator_handle_size -> manipulator_handle_size: int "Size of widget handles as percentage of widget radius" -#+ * UserPreferencesView.manipulator_hotspot -> manipulator_hotspot: int "Hotspot in pixels for clicking widget handles" -#+ * UserPreferencesView.manipulator_size -> manipulator_size: int "Diameter of widget, in 10 pixel units" -#+ * UserPreferencesView.mini_axis_brightness -> mini_axis_brightness: int "The brightness of the icon" -#+ * UserPreferencesView.mini_axis_size -> mini_axis_size: int "The axis icons size" -#+ * UserPreferencesView.object_origin_size -> object_origin_size: int "Diameter in Pixels for Object/Lamp origin display" -#+ * UserPreferencesView.open_left_mouse_delay -> open_left_mouse_delay: int "Time in 1/10 seconds to hold the Left Mouse Button before opening the toolbox" -#+ * UserPreferencesView.open_right_mouse_delay -> open_right_mouse_delay: int "Time in 1/10 seconds to hold the Right Mouse Button before opening the toolbox" -#+ * UserPreferencesView.open_sublevel_delay -> open_sublevel_delay: int "Time delay in 1/10 seconds before automatically opening sub level menus" -#+ * UserPreferencesView.open_toplevel_delay -> open_toplevel_delay: int "Time delay in 1/10 seconds before automatically opening top level menus" -#+ * UserPreferencesView.rotation_angle -> rotation_angle: int "The rotation step for numerical pad keys (2 4 6 8)" -#UserPreferencesView.show_column_layout -> show_column_layout: boolean "Use a column layout for toolbox" -#UserPreferencesView.show_large_cursors -> show_large_cursors: boolean "Use large mouse cursors when available" -#UserPreferencesView.show_manipulator -> show_manipulator: boolean "Use 3D transform manipulator" -#+ * UserPreferencesView.show_mini_axis -> show_mini_axis: boolean "Show a small rotating 3D axis in the bottom left corner of the 3D View" -#UserPreferencesView.show_object_info -> show_object_info: boolean "Display objects name and frame number in 3D view" -#+ * UserPreferencesView.show_playback_fps -> show_playback_fps: boolean "Show the frames per second screen refresh rate, while animation is played back" -#+ * UserPreferencesView.show_splash -> show_splash: boolean "Display splash screen on startup" -#UserPreferencesView.show_tooltips -> show_tooltips: boolean "Display tooltips" -#+ * UserPreferencesView.show_view_name -> show_view_name: boolean "Show the name of the views direction in each 3D View" -#+ * UserPreferencesView.smooth_view -> smooth_view: int "The time to animate the view in milliseconds, zero to disable" -#+ * UserPreferencesView.timecode_style -> timecode_style: enum "Format of Time Codes displayed when not displaying timing in terms of frames" -#UserPreferencesView.use_auto_perspective -> use_auto_perspective: boolean "Automatically switch between orthographic and perspective when changing from top/front/side views" -#UserPreferencesView.use_directional_menus -> use_directional_menus: boolean "Otherwise menus, etc will always be top to bottom, left to right, no matter opening direction" -#UserPreferencesView.use_global_pivot -> use_global_pivot: boolean "Lock the same rotation/scaling pivot in all 3D Views" -#UserPreferencesView.use_global_scene -> use_global_scene: boolean "Forces the current Scene to be displayed in all Screens" -#UserPreferencesView.use_mouse_auto_depth -> use_mouse_auto_depth: boolean "Use the depth under the mouse to improve view pan/rotate/zoom functionality" -#UserPreferencesView.use_mouse_over_open -> use_mouse_over_open: boolean "Open menu buttons and pulldowns automatically when the mouse is hovering" -#UserPreferencesView.use_rotate_around_active -> use_rotate_around_active: boolean "Use selection as the pivot point" -#UserPreferencesView.use_zoom_to_mouse -> use_zoom_to_mouse: boolean "Zoom in towards the mouse pointers position in the 3D view, rather than the 2D window center" -#UserPreferencesView.view2d_grid_spacing_min -> view2d_grid_spacing_min: int "Minimum number of pixels between each gridline in 2D Viewports" -#+ * UserSolidLight.diffuse_color -> diffuse_color: float[3] "The diffuse color of the OpenGL light" -#+ * UserSolidLight.direction -> direction: float[3] "The direction that the OpenGL light is shining" -#+ * UserSolidLight.specular_color -> specular_color: float[3] "The color of the lights specular highlight" -#+ * UserSolidLight.use -> use: boolean "Enable this OpenGL light in solid draw mode" -#+ * ValueNodeSocket.default_value -> default_value: float[1] "Default value of the socket when no link is attached" -#+ * ValueNodeSocket.name -> name: string, "(read-only) Socket name" -#+ * VectorNodeSocket.default_value -> default_value: float[3] "Default value of the socket when no link is attached" -#+ * VectorNodeSocket.name -> name: string, "(read-only) Socket name" -#VertexColors.active -> active: pointer "Active vertex color layer" -#+ * VertexGroup.index -> index: int, "(read-only) Index number of the vertex group" -#+ * VertexGroup.name -> name: string "Vertex group name" -#+ * VertexGroupElement.group -> group: int, "(read-only)" -#+ * VertexGroupElement.weight -> weight: float "Vertex Weight" -#+ * VoxelData.domain_object -> domain_object: pointer "Object used as the smoke simulation domain" -#+ * VoxelData.extension -> extension: enum "Sets how the texture is extrapolated past its original bounds" -#+ * VoxelData.file_format -> file_format: enum "Format of the source data set to render" -#VoxelData.filepath -> filepath: string "The external source data file to use" -#+ * VoxelData.intensity -> intensity: float "Multiplier for intensity values" -#+ * VoxelData.interpolation -> interpolation: enum "Method to interpolate/smooth values between voxel cells" -#+ * VoxelData.resolution -> resolution: int[3] "Resolution of the voxel grid" -#+ * VoxelData.smoke_data_type -> smoke_data_type: enum "Simulation value to be used as a texture" -#VoxelData.still_frame -> still_frame: int "The frame number to always use" -#VoxelData.use_still_frame -> use_still_frame: boolean "Always render a still frame from the voxel data sequence" -#+ * Window.screen -> screen: pointer "Active screen showing in the window" -#+ * WorldLighting.adapt_to_speed -> adapt_to_speed: float "Use the speed vector pass to reduce AO samples in fast moving pixels. Higher values result in more aggressive sample reduction. Requires Vec pass enabled (for Raytrace Adaptive QMC)" -#WorldLighting.ao_blend_type -> ao_blend_type: enum "Defines how AO mixes with material shading" -#+ * WorldLighting.ao_factor -> ao_factor: float "Factor for ambient occlusion blending" -#+ * WorldLighting.bias -> bias: float "Bias (in radians) to prevent smoothed faces from showing banding (for Raytrace Constant Jittered)" -#+ * WorldLighting.correction -> correction: float "Ad-hoc correction for over-occlusion due to the approximation (for Approximate)" -#+ * WorldLighting.distance -> distance: float "Length of rays, defines how far away other faces give occlusion effect" -#+ * WorldLighting.environment_color -> environment_color: enum "Defines where the color of the environment light comes from" -#+ * WorldLighting.environment_energy -> environment_energy: float "Defines the strength of environment light" -#WorldLighting.error_threshold -> error_threshold: float "Low values are slower and higher quality (for Approximate)" -#+ * WorldLighting.falloff_strength -> falloff_strength: float "Distance attenuation factor, the higher, the shorter the shadows" -#+ * WorldLighting.gather_method -> gather_method: enum "NO DESCRIPTION" -#+ * WorldLighting.indirect_bounces -> indirect_bounces: int "Number of indirect diffuse light bounces to use for approximate ambient occlusion" -#+ * WorldLighting.indirect_factor -> indirect_factor: float "Factor for how much surrounding objects contribute to light" -#+ * WorldLighting.passes -> passes: int "Number of preprocessing passes to reduce overocclusion (for approximate ambient occlusion)" -#+ * WorldLighting.sample_method -> sample_method: enum "Method for generating shadow samples (for Raytrace)" -#+ * WorldLighting.samples -> samples: int "Amount of ray samples. Higher values give smoother results and longer rendering times" -#+ * WorldLighting.threshold -> threshold: float "Samples below this threshold will be considered fully shadowed/unshadowed and skipped (for Raytrace Adaptive QMC)" -#+ * WorldLighting.use_ambient_occlusion -> use_ambient_occlusion: boolean "Use Ambient Occlusion to add shadowing based on distance between objects" -#WorldLighting.use_cache -> use_cache: boolean "Cache AO results in pixels and interpolate over neighbouring pixels for speedup (for Approximate)" -#WorldLighting.use_environment_light -> use_environment_light: boolean "Add light coming from the environment" -#WorldLighting.use_falloff -> use_falloff: boolean "NO DESCRIPTION" -#WorldLighting.use_indirect_light -> use_indirect_light: boolean "Add indirect light bouncing of surrounding objects" -#+ * WorldMistSettings.depth -> depth: float "The distance over which the mist effect fades in" -#+ * WorldMistSettings.falloff -> falloff: enum "Type of transition used to fade mist" -#+ * WorldMistSettings.height -> height: float "Control how much mist density decreases with height" -#+ * WorldMistSettings.intensity -> intensity: float "Intensity of the mist effect" -#+ * WorldMistSettings.start -> start: float "Starting distance of the mist, measured from the camera" -#+ * WorldMistSettings.use_mist -> use_mist: boolean "Occlude objects with the environment color as they are further away" -#+ * WorldStarsSettings.average_separation -> average_separation: float "Average distance between any two stars" -#WorldStarsSettings.color_random -> color_random: float "Randomize star colors" -#WorldStarsSettings.distance_min -> distance_min: float "Minimum distance to the camera for stars" -#+ * WorldStarsSettings.size -> size: float "Average screen dimension of stars" -#+ * WorldStarsSettings.use_stars -> use_stars: boolean "Enable starfield generation" +# See svn history for example formatting for this file, currently this isnt in use. From 02f4003184b071121079cf4d8ab76ebd7c2894ef Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 8 Dec 2010 13:02:16 +0000 Subject: [PATCH 053/236] metaball rotations must be kept normalized, normalize values after setting from rna/python. --- source/blender/makesdna/DNA_meta_types.h | 2 +- source/blender/makesrna/intern/rna_meta.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/source/blender/makesdna/DNA_meta_types.h b/source/blender/makesdna/DNA_meta_types.h index feadf7cd510..dc0ac7fd80c 100644 --- a/source/blender/makesdna/DNA_meta_types.h +++ b/source/blender/makesdna/DNA_meta_types.h @@ -48,7 +48,7 @@ typedef struct MetaElem { short type, flag, selcol1, selcol2; float x, y, z; /* Position of center of MetaElem */ - float quat[4]; /* Rotation of MetaElem */ + float quat[4]; /* Rotation of MetaElem (MUST be kept normalized) */ float expx; /* dimension parameters, used for some types like cubes */ float expy; float expz; diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c index e2e66b53513..b0ece32b6db 100644 --- a/source/blender/makesrna/intern/rna_meta.c +++ b/source/blender/makesrna/intern/rna_meta.c @@ -103,6 +103,13 @@ static void rna_MetaBall_update_data(Main *bmain, Scene *scene, PointerRNA *ptr) } } +static void rna_MetaBall_update_rotation(Main *bmain, Scene *scene, PointerRNA *ptr) +{ + MetaElem *ml= ptr->data; + normalize_qt(ml->quat); + rna_MetaBall_update_data(bmain, scene, ptr); +} + static MetaElem *rna_MetaBall_elements_new(MetaBall *mb, int type) { MetaElem *ml= add_metaball_element(mb, type); @@ -164,8 +171,8 @@ static void rna_def_metaelement(BlenderRNA *brna) prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_QUATERNION); RNA_def_property_float_sdna(prop, NULL, "quat"); - RNA_def_property_ui_text(prop, "Rotation", ""); - RNA_def_property_update(prop, 0, "rna_MetaBall_update_data"); + RNA_def_property_ui_text(prop, "Rotation", "Normalized quaternion rotation"); + RNA_def_property_update(prop, 0, "rna_MetaBall_update_rotation"); prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_UNSIGNED|PROP_UNIT_LENGTH); RNA_def_property_float_sdna(prop, NULL, "rad"); From e5a9dd928a943e818a73ef20f8bf952967b70514 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 8 Dec 2010 13:19:27 +0000 Subject: [PATCH 054/236] Bugfix #25086 The texture node is procedural; like RGB node it has no real buffers, but allows per-pixel reading. The compositor uses nodes that directly access buffers too, which conflicts with it... needs more design here. Restored old functionality that just passes on preview size buffers for nodes to prevent crashes. Giving it a render-size buffer is not nice; the resolution-independence of texture nodes is interesting to keep. Solution could be: - visually tag input/output sockets for this case (sockets with buffers, vs sockets with values), so users know what to expect. --- source/blender/nodes/intern/CMP_nodes/CMP_texture.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_texture.c b/source/blender/nodes/intern/CMP_nodes/CMP_texture.c index 7ddd8b96ae2..77c71ad7e3a 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_texture.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_texture.c @@ -106,11 +106,10 @@ static void node_composit_exec_texture(void *data, bNode *node, bNodeStack **in, VECCOPY(prevbuf->procedural_size, in[1]->vec); prevbuf->procedural_type= CB_RGBA; composit1_pixel_processor(node, prevbuf, prevbuf, out[0]->vec, do_copy_rgba, CB_RGBA); - generate_preview(data, node, prevbuf); - free_compbuf(prevbuf); + /* texture is procedural node, like RGBA node, we give it fake buffer for nodes that don't check it */ if(out[0]->hasoutput) { - CompBuf *stackbuf= alloc_compbuf(sizex, sizey, CB_VAL, 0); /* no buffer alloc */ + CompBuf *stackbuf= dupalloc_compbuf(prevbuf); /* buffer alloc */ stackbuf->rect_procedural= texture_procedural; stackbuf->node= node; @@ -121,7 +120,7 @@ static void node_composit_exec_texture(void *data, bNode *node, bNodeStack **in, out[0]->data= stackbuf; } if(out[1]->hasoutput) { - CompBuf *stackbuf= alloc_compbuf(sizex, sizey, CB_RGBA, 0); /* no buffer alloc */ + CompBuf *stackbuf= dupalloc_compbuf(prevbuf); /* buffer alloc */ stackbuf->rect_procedural= texture_procedural; stackbuf->node= node; @@ -131,6 +130,9 @@ static void node_composit_exec_texture(void *data, bNode *node, bNodeStack **in, out[1]->data= stackbuf; } + + generate_preview(data, node, prevbuf); + free_compbuf(prevbuf); } } From 071b61259bbbe9c3b4d6da2410b6914ecb89200e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 8 Dec 2010 14:40:14 +0000 Subject: [PATCH 055/236] increase grease pencil user count when copying objects. --- source/blender/blenkernel/intern/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index b98927db877..fba227eb479 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1322,8 +1322,8 @@ Object *copy_object(Object *ob) /* increase user numbers */ id_us_plus((ID *)obn->data); + id_us_plus((ID *)obn->gpd); id_lib_extern((ID *)obn->dup_group); - for(a=0; atotcol; a++) id_us_plus((ID *)obn->mat[a]); From 925077f74450f61f43f694063f1f5dde3d4be587 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 8 Dec 2010 17:51:25 +0000 Subject: [PATCH 056/236] Bugfix #25099 Outliner: group view: restrict buttons should be disabled in editmode. --- source/blender/editors/space_outliner/outliner.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index 7426fca844e..a9d75891bb4 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -4997,11 +4997,14 @@ static void restrictbutton_gr_restrict_flag(void *poin, void *poin2, int flag) } else { for(gob= gr->gobject.first; gob; gob= gob->next) { - gob->ob->restrictflag |= flag; + /* not in editmode */ + if(scene->obedit!=gob->ob) { + gob->ob->restrictflag |= flag; - if(flag==OB_RESTRICT_VIEW) - if((gob->ob->flag & SELECT) == 0) - ED_base_object_select(object_in_scene(gob->ob, scene), BA_SELECT); + if(flag==OB_RESTRICT_VIEW) + if((gob->ob->flag & SELECT) == 0) + ED_base_object_select(object_in_scene(gob->ob, scene), BA_SELECT); + } } } } From 8f8aa3f8639d4fe30b99cb5567f5f8c83050d6d6 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 8 Dec 2010 18:12:59 +0000 Subject: [PATCH 057/236] Bugfix #20598 Armature editmode: Circle select didn't flush selections, causing the center part of bones to remain unselected. --- source/blender/editors/space_view3d/view3d_select.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 69096843aa1..d7f2f14d650 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -2122,9 +2122,12 @@ static void armature_circle_select(ViewContext *vc, int select, short *mval, flo ebone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL); change= TRUE; } + + change |= didpoint; } if(change) { + ED_armature_sync_selection(arm->edbo); ED_armature_validate_active(arm); WM_main_add_notifier(NC_OBJECT|ND_BONE_SELECT, vc->obedit); } From 5d2966283b82b8c5d4b1c47fcdd8511416dfbab8 Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Wed, 8 Dec 2010 20:10:59 +0000 Subject: [PATCH 058/236] UI Cleanup: Halo materials and textures * Textures applied to halo materials showed influence option for normal particles. This was really confusing, and with the cleanup I revealed a couple of hidden features too! ** Particles actually allow for textures to change halo size and hardness, but my guess is that nobody knew since the names were wrong in the ui! ** I also added the option to change the "add" value with a texture, since it was just silly not to have it. * Halo material properties are also a bit cleaner now. --- release/scripts/ui/properties_material.py | 42 +++++++++---------- release/scripts/ui/properties_texture.py | 15 ++++++- .../render/intern/source/renderdatabase.c | 5 +++ 3 files changed, 40 insertions(+), 22 deletions(-) diff --git a/release/scripts/ui/properties_material.py b/release/scripts/ui/properties_material.py index 5c15bece6d6..6877d5da43a 100644 --- a/release/scripts/ui/properties_material.py +++ b/release/scripts/ui/properties_material.py @@ -269,7 +269,7 @@ class MATERIAL_PT_shading(MaterialButtonsPanel, bpy.types.Panel): def poll(cls, context): mat = active_node_mat(context.material) engine = context.scene.render.engine - return mat and (mat.type in ('SURFACE', 'WIRE', 'HALO')) and (engine in cls.COMPAT_ENGINES) + return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout @@ -294,9 +294,6 @@ class MATERIAL_PT_shading(MaterialButtonsPanel, bpy.types.Panel): sub.prop(mat, "use_tangent_shading") sub.prop(mat, "use_cubic") - elif mat.type == 'HALO': - layout.prop(mat, "alpha") - class MATERIAL_PT_transp(MaterialButtonsPanel, bpy.types.Panel): bl_label = "Transparency" @@ -486,14 +483,30 @@ class MATERIAL_PT_halo(MaterialButtonsPanel, bpy.types.Panel): mat = context.material # dont use node material halo = mat.halo + def number_but(layout, toggle, number, name, color): + row = layout.row(align=True) + row.prop(halo, toggle, text="") + sub = row.column() + sub.active = getattr(halo, toggle) + sub.prop(halo, number, text=name) + if not color == "": + sub.prop(mat, color, text="") + split = layout.split() col = split.column() + col.prop(mat, "alpha") col.prop(mat, "diffuse_color", text="") + + col = split.column() col.prop(halo, "size") col.prop(halo, "hardness") col.prop(halo, "add") - col.label(text="Options:") + + layout.label(text="Options:") + + split = layout.split() + col = split.column() col.prop(halo, "use_texture") col.prop(halo, "use_vertex_normal") col.prop(halo, "use_extreme_alpha") @@ -501,22 +514,9 @@ class MATERIAL_PT_halo(MaterialButtonsPanel, bpy.types.Panel): col.prop(halo, "use_soft") col = split.column() - col.prop(halo, "use_ring") - sub = col.column() - sub.active = halo.use_ring - sub.prop(halo, "ring_count") - sub.prop(mat, "mirror_color", text="") - col.separator() - col.prop(halo, "use_lines") - sub = col.column() - sub.active = halo.use_lines - sub.prop(halo, "line_count", text="Lines") - sub.prop(mat, "specular_color", text="") - col.separator() - col.prop(halo, "use_star") - sub = col.column() - sub.active = halo.use_star - sub.prop(halo, "star_tip_count") + number_but(col, "use_ring", "ring_count", "Rings", "mirror_color") + number_but(col, "use_lines", "line_count", "Lines", "specular_color") + number_but(col, "use_star", "star_tip_count", "Star tips", "") class MATERIAL_PT_flare(MaterialButtonsPanel, bpy.types.Panel): diff --git a/release/scripts/ui/properties_texture.py b/release/scripts/ui/properties_texture.py index f5b7d5fa32c..c51a9034bf7 100644 --- a/release/scripts/ui/properties_texture.py +++ b/release/scripts/ui/properties_texture.py @@ -894,7 +894,7 @@ class TEXTURE_PT_influence(TextureSlotPanel, bpy.types.Panel): return sub # XXX, temp. use_map_normal needs to override. if isinstance(idblock, bpy.types.Material): - if idblock.type in ('SURFACE', 'HALO', 'WIRE'): + if idblock.type in ('SURFACE', 'WIRE'): split = layout.split() col = split.column() @@ -928,6 +928,19 @@ class TEXTURE_PT_influence(TextureSlotPanel, bpy.types.Panel): #sub = col.column() #sub.active = tex.use_map_translucency or tex.map_emit or tex.map_alpha or tex.map_raymir or tex.map_hardness or tex.map_ambient or tex.map_specularity or tex.map_reflection or tex.map_mirror #sub.prop(tex, "default_value", text="Amount", slider=True) + elif idblock.type == 'HALO': + layout.label(text="Halo:") + + split = layout.split() + + col = split.column() + factor_but(col, "use_map_color_diffuse", "diffuse_color_factor", "Color") + factor_but(col, "use_map_alpha", "alpha_factor", "Alpha") + + col = split.column() + factor_but(col, "use_map_raymir", "raymir_factor", "Size") + factor_but(col, "use_map_hardness", "hardness_factor", "Hardness") + factor_but(col, "use_map_translucency", "translucency_factor", "Add") elif idblock.type == 'VOLUME': split = layout.split() diff --git a/source/blender/render/intern/source/renderdatabase.c b/source/blender/render/intern/source/renderdatabase.c index 979d221dae0..db8b0b2c1fd 100644 --- a/source/blender/render/intern/source/renderdatabase.c +++ b/source/blender/render/intern/source/renderdatabase.c @@ -1189,6 +1189,11 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater har->hard = 1.0+126.0*texture_value_blend(mtex->def_var,((float)har->hard)/127.0,tin,mtex->hardfac,mtex->blendtype); if(mtex->mapto & MAP_RAYMIRR) har->hasize = 100.0*texture_value_blend(mtex->def_var,har->hasize/100.0,tin,mtex->raymirrfac,mtex->blendtype); + if(mtex->mapto & MAP_TRANSLU) { + float add = texture_value_blend(mtex->def_var,(float)har->add/255.0,tin,mtex->translfac,mtex->blendtype); + CLAMP(add, 0.f, 1.f); + har->add = 255.0*add; + } /* now what on earth is this good for?? */ //if(mtex->texco & 16) { // har->alfa= tin; From e0ab0bc40107d0d532ad20c7e9e6d3d7d583734b Mon Sep 17 00:00:00 2001 From: Kent Mein Date: Wed, 8 Dec 2010 21:56:50 +0000 Subject: [PATCH 059/236] Added a few descriptions that were missing. This is a little bit of todo item: [#24814] Operators which have no decription Kent --- source/blender/editors/space_logic/logic_buttons.c | 1 + source/blender/editors/space_nla/nla_buttons.c | 1 + source/blender/editors/space_nla/nla_edit.c | 3 ++- source/blender/editors/space_nla/nla_select.c | 4 +++- source/blender/editors/space_node/node_select.c | 1 + 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/space_logic/logic_buttons.c b/source/blender/editors/space_logic/logic_buttons.c index e41627ad0a4..61cb3018424 100644 --- a/source/blender/editors/space_logic/logic_buttons.c +++ b/source/blender/editors/space_logic/logic_buttons.c @@ -199,6 +199,7 @@ void LOGIC_OT_links_cut(wmOperatorType *ot) ot->name= "Cut links"; ot->idname= "LOGIC_OT_links_cut"; + ot->description= "Remove logic brick connections"; ot->invoke= WM_gesture_lines_invoke; ot->modal= WM_gesture_lines_modal; diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c index 49cd09043c2..957bf001417 100644 --- a/source/blender/editors/space_nla/nla_buttons.c +++ b/source/blender/editors/space_nla/nla_buttons.c @@ -492,6 +492,7 @@ void NLA_OT_properties(wmOperatorType *ot) { ot->name= "Properties"; ot->idname= "NLA_OT_properties"; + ot->description= "Toggle display properties panel"; ot->exec= nla_properties; ot->poll= ED_operator_nla_active; diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index 886bd59235e..279c8c59c28 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -1638,6 +1638,7 @@ void NLA_OT_fmodifier_add (wmOperatorType *ot) /* identifiers */ ot->name= "Add F-Modifier"; ot->idname= "NLA_OT_fmodifier_add"; + ot->description= "Add F-Modifier of the secified type to the selected NLA-Strips"; /* api callbacks */ ot->invoke= nla_fmodifier_add_invoke; @@ -1701,7 +1702,7 @@ void NLA_OT_fmodifier_copy (wmOperatorType *ot) /* identifiers */ ot->name= "Copy F-Modifiers"; ot->idname= "NLA_OT_fmodifier_copy"; - ot->description= "Copy the F-Modifier(s) of the active NLA-Strip."; + ot->description= "Copy the F-Modifier(s) of the active NLA-Strip"; /* api callbacks */ ot->exec= nla_fmodifier_copy_exec; diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c index f49897e79fe..bb22b78b2d1 100644 --- a/source/blender/editors/space_nla/nla_select.c +++ b/source/blender/editors/space_nla/nla_select.c @@ -182,8 +182,9 @@ static int nlaedit_deselectall_exec(bContext *C, wmOperator *op) void NLA_OT_select_all_toggle (wmOperatorType *ot) { /* identifiers */ - ot->name= "Select All"; + ot->name= "Select or Deselect All"; ot->idname= "NLA_OT_select_all_toggle"; + ot->description= "(De)Select all NLA-Strips"; /* api callbacks */ ot->exec= nlaedit_deselectall_exec; @@ -321,6 +322,7 @@ void NLA_OT_select_border(wmOperatorType *ot) /* identifiers */ ot->name= "Border Select"; ot->idname= "NLA_OT_select_border"; + ot->description= "Use box selection to grab NLA-Strips"; /* api callbacks */ ot->invoke= WM_border_select_invoke; diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c index 402e1b2d1cd..e07eaa85bed 100644 --- a/source/blender/editors/space_node/node_select.c +++ b/source/blender/editors/space_node/node_select.c @@ -223,6 +223,7 @@ void NODE_OT_select_border(wmOperatorType *ot) /* identifiers */ ot->name= "Border Select"; ot->idname= "NODE_OT_select_border"; + ot->description= "Use box selection to select nodes"; /* api callbacks */ ot->invoke= node_border_select_invoke; From 3209077cafe5df7f745f99854c1637ba79e0284b Mon Sep 17 00:00:00 2001 From: Diego Borghetti Date: Thu, 9 Dec 2010 01:05:06 +0000 Subject: [PATCH 060/236] Testing commit! Remove an empty file. --- source/blender/blenfont/BLF_types.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 source/blender/blenfont/BLF_types.h diff --git a/source/blender/blenfont/BLF_types.h b/source/blender/blenfont/BLF_types.h deleted file mode 100644 index e69de29bb2d..00000000000 From 36175f37c9d3ea128cfdcebd1c1b438494b34433 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 9 Dec 2010 03:22:03 +0000 Subject: [PATCH 061/236] bugfix [#25104] Identical material settings render differently - Use Old Bump option wasn't available. - noise_intensity wasn't visible for MULTIFRACTAL musgrave textures. --- release/scripts/ui/properties_texture.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/release/scripts/ui/properties_texture.py b/release/scripts/ui/properties_texture.py index c51a9034bf7..5e200a45eb8 100644 --- a/release/scripts/ui/properties_texture.py +++ b/release/scripts/ui/properties_texture.py @@ -547,12 +547,14 @@ class TEXTURE_PT_musgrave(TextureTypePanel, bpy.types.Panel): col.prop(tex, "lacunarity") col.prop(tex, "octaves") + musgrave_type = tex.musgrave_type col = split.column() - if (tex.musgrave_type in ('HETERO_TERRAIN', 'RIDGED_MULTIFRACTAL', 'HYBRID_MULTIFRACTAL')): + if musgrave_type in ('HETERO_TERRAIN', 'RIDGED_MULTIFRACTAL', 'HYBRID_MULTIFRACTAL'): col.prop(tex, "offset") - if (tex.musgrave_type in ('RIDGED_MULTIFRACTAL', 'HYBRID_MULTIFRACTAL')): - col.prop(tex, "gain") + if musgrave_type in ('MULTIFRACTAL', 'RIDGED_MULTIFRACTAL', 'HYBRID_MULTIFRACTAL'): col.prop(tex, "noise_intensity", text="Intensity") + if musgrave_type in ('RIDGED_MULTIFRACTAL', 'HYBRID_MULTIFRACTAL'): + col.prop(tex, "gain") layout.label(text="Noise:") @@ -986,6 +988,9 @@ class TEXTURE_PT_influence(TextureSlotPanel, bpy.types.Panel): # color is used on grayscale textures even when use_rgb_to_intensity is disabled. col.prop(tex, "color", text="") + # XXX, dont remove since old files have this users need to be able to disable! + col.prop(tex, "use_old_bump", text="Old Bump Mapping") + col = split.column() col.prop(tex, "invert", text="Negative") col.prop(tex, "use_stencil") From b25c32393d42c314c073ef2244cde1fabb7b64af Mon Sep 17 00:00:00 2001 From: Diego Borghetti Date: Thu, 9 Dec 2010 04:36:58 +0000 Subject: [PATCH 062/236] Add the possibility to set a 4x4 matrix to be used on blf. This option allow the user to set a 4x4 matrix to be multiplied before draw the text, for example: double *m; /* Get the matrix or build it! */ BLF_matrix(m); BLF_enable(BLF_MATRIX); /* set color, size, etc and draw! */ BLF_disable(BLF_MATRIX); You don't need the last line (disable), but remember that if you use the font to draw in any other place, the matrix will be used!. The GL code is: glPushMatrix(); glMultMatrixd(m); glTranslatef(); glScalef(); glRotatef(); glPopMatrix(); Let's Dalai test this!!! :D --- source/blender/blenfont/BLF_api.h | 15 +++++++++++++++ source/blender/blenfont/intern/blf.c | 16 ++++++++++++++++ source/blender/blenfont/intern/blf_font.c | 7 ++++++- .../blender/blenfont/intern/blf_internal_types.h | 6 ++++-- 4 files changed, 41 insertions(+), 3 deletions(-) diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h index d32922f2429..84086742b15 100644 --- a/source/blender/blenfont/BLF_api.h +++ b/source/blender/blenfont/BLF_api.h @@ -49,6 +49,20 @@ void BLF_aspect(int fontid, float aspect); void BLF_position(int fontid, float x, float y, float z); void BLF_size(int fontid, int size, int dpi); +/* Set a 4x4 matrix to be multiplied before draw the text. + * Remember that you need call BLF_enable(BLF_MATRIX) + * to enable this. + * + * The order of the matrix is like GL: + + | m[0] m[4] m[8] m[12] | + | m[1] m[5] m[9] m[13] | + | m[2] m[6] m[10] m[14] | + | m[3] m[7] m[11] m[15] | + + */ +void BLF_matrix(int fontid, double *m); + /* Draw the string using the default font, size and dpi. */ void BLF_draw_default(float x, float y, float z, const char *str, size_t len); void BLF_draw_default_ascii(float x, float y, float z, const char *str, size_t len); @@ -180,6 +194,7 @@ void BLF_dir_free(char **dirs, int count); #define BLF_CLIPPING (1<<1) #define BLF_SHADOW (1<<2) #define BLF_KERNING_DEFAULT (1<<3) +#define BLF_MATRIX (1<<4) // XXX, bad design extern int blf_mono_font; diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c index febd3d9d6f7..d9a02b09336 100644 --- a/source/blender/blenfont/intern/blf.c +++ b/source/blender/blenfont/intern/blf.c @@ -330,6 +330,18 @@ void BLF_aspect(int fontid, float aspect) font->aspect= aspect; } +void BLF_matrix(int fontid, double *m) +{ + FontBLF *font; + int i; + + font= BLF_get(fontid); + if (font) { + for (i= 0; i < 16; i++) + font->m[i]= m[i]; + } +} + void BLF_position(int fontid, float x, float y, float z) { FontBLF *font; @@ -435,6 +447,10 @@ static void blf_draw__start(FontBLF *font) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glPushMatrix(); + + if (font->flags & BLF_MATRIX) + glMultMatrixd((GLdouble *)&font->m); + glTranslatef(font->pos[0], font->pos[1], font->pos[2]); glScalef(font->aspect, font->aspect, 1.0); diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c index 1ae654cc5bc..3adda7bb6f1 100644 --- a/source/blender/blenfont/intern/blf_font.c +++ b/source/blender/blenfont/intern/blf_font.c @@ -493,11 +493,16 @@ void blf_font_free(FontBLF *font) static void blf_font_fill(FontBLF *font) { + int i; + font->aspect= 1.0f; font->pos[0]= 0.0f; font->pos[1]= 0.0f; font->angle= 0.0f; - unit_m4(font->mat); + + for (i= 0; i < 16; i++) + font->m[i]= 0; + font->clip_rec.xmin= 0.0f; font->clip_rec.xmax= 0.0f; font->clip_rec.ymin= 0.0f; diff --git a/source/blender/blenfont/intern/blf_internal_types.h b/source/blender/blenfont/intern/blf_internal_types.h index 70318c51823..04afaeb2e97 100644 --- a/source/blender/blenfont/intern/blf_internal_types.h +++ b/source/blender/blenfont/intern/blf_internal_types.h @@ -154,8 +154,10 @@ typedef struct FontBLF { /* shadow color. */ float shadow_col[4]; - /* this is the matrix that we load before rotate/scale/translate. */ - float mat[4][4]; + /* Multiplied this matrix with the current one before + * draw the text! see blf_draw__start. + */ + double m[16]; /* clipping rectangle. */ rctf clip_rec; From de159a67aa0114e30940eee460774458bbd97a65 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 9 Dec 2010 06:08:19 +0000 Subject: [PATCH 063/236] - internal py/rna ifdef's USE_MATHUTILS was mixed up, - updated tooltip for vertex group mirror. --- source/blender/editors/object/object_vgroup.c | 4 +- source/blender/python/intern/bpy_rna.c | 105 ++++++++++-------- 2 files changed, 58 insertions(+), 51 deletions(-) diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index 52a7810d791..6f4af03c87d 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -1836,7 +1836,7 @@ void OBJECT_OT_vertex_group_mirror(wmOperatorType *ot) /* identifiers */ ot->name= "Mirror Vertex Group"; ot->idname= "OBJECT_OT_vertex_group_mirror"; - ot->description= "Mirror weights, and flip vertex group names, copying when only one side is selected"; + ot->description= "Mirror all vertex groups, flip weights and/or names, editing only selected vertices, flipping when both sides are selected otherwise copy from unselected"; /* api callbacks */ ot->poll= vertex_group_poll_edit; @@ -1847,7 +1847,7 @@ void OBJECT_OT_vertex_group_mirror(wmOperatorType *ot) /* properties */ RNA_def_boolean(ot->srna, "mirror_weights", TRUE, "Mirror Weights", "Mirror weights."); - RNA_def_boolean(ot->srna, "flip_group_names", TRUE, "Flip Groups", "Flip vertex group names while mirroring."); + RNA_def_boolean(ot->srna, "flip_group_names", TRUE, "Flip Groups", "Flip vertex group names."); } diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index e4c54f86ea9..c00edf7bf0f 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -50,24 +50,13 @@ #include "DNA_anim_types.h" #include "ED_keyframing.h" +#include "../generic/IDProp.h" /* for IDprop lookups */ +#include "../generic/py_capi_utils.h" + #define USE_PEDANTIC_WRITE #define USE_MATHUTILS #define USE_STRING_COERCE -#ifdef USE_MATHUTILS -#include "../generic/mathutils.h" /* so we can have mathutils callbacks */ -#include "../generic/IDProp.h" /* for IDprop lookups */ -#include "../generic/py_capi_utils.h" - -static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyObject *value, const char *error_prefix); -static PyObject *pyrna_prop_array_subscript_slice(BPy_PropertyArrayRNA *self, PointerRNA *ptr, PropertyRNA *prop, int start, int stop, int length); -static Py_ssize_t pyrna_prop_array_length(BPy_PropertyArrayRNA *self); -static Py_ssize_t pyrna_prop_collection_length(BPy_PropertyRNA *self); -static short pyrna_rotation_euler_order_get(PointerRNA *ptr, PropertyRNA **prop_eul_order, short order_fallback); -static int deferred_register_prop(StructRNA *srna, PyObject *key, PyObject *item); - -/* bpyrna vector/euler/quat callbacks */ -static int mathutils_rna_array_cb_index= -1; /* index for our callbacks */ #ifdef USE_PEDANTIC_WRITE static short rna_disallow_writes= FALSE; @@ -92,7 +81,21 @@ static int rna_id_write_error(PointerRNA *ptr, PyObject *key) return FALSE; } -#endif +#endif // USE_PEDANTIC_WRITE + +static Py_ssize_t pyrna_prop_collection_length(BPy_PropertyRNA *self); +static Py_ssize_t pyrna_prop_array_length(BPy_PropertyArrayRNA *self); +static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyObject *value, const char *error_prefix); +static int deferred_register_prop(StructRNA *srna, PyObject *key, PyObject *item); + +#ifdef USE_MATHUTILS +#include "../generic/mathutils.h" /* so we can have mathutils callbacks */ + +static PyObject *pyrna_prop_array_subscript_slice(BPy_PropertyArrayRNA *self, PointerRNA *ptr, PropertyRNA *prop, int start, int stop, int length); +static short pyrna_rotation_euler_order_get(PointerRNA *ptr, PropertyRNA **prop_eul_order, short order_fallback); + +/* bpyrna vector/euler/quat callbacks */ +static int mathutils_rna_array_cb_index= -1; /* index for our callbacks */ /* subtype not used much yet */ #define MATHUTILS_CB_SUBTYPE_EUL 0 @@ -135,7 +138,7 @@ static int mathutils_rna_vector_set(BaseMathObject *bmo, int subtype) if(rna_disallow_writes && rna_id_write_error(&self->ptr, NULL)) { return 0; } -#endif +#endif // USE_PEDANTIC_WRITE if (!RNA_property_editable_flag(&self->ptr, self->prop)) { PyErr_Format(PyExc_AttributeError, "bpy_prop \"%.200s.%.200s\" is read-only", RNA_struct_identifier(self->ptr.type), RNA_property_identifier(self->prop)); @@ -193,7 +196,7 @@ static int mathutils_rna_vector_set_index(BaseMathObject *bmo, int UNUSED(subtyp if(rna_disallow_writes && rna_id_write_error(&self->ptr, NULL)) { return 0; } -#endif +#endif // USE_PEDANTIC_WRITE if (!RNA_property_editable_flag(&self->ptr, self->prop)) { PyErr_Format(PyExc_AttributeError, "bpy_prop \"%.200s.%.200s\" is read-only", RNA_struct_identifier(self->ptr.type), RNA_property_identifier(self->prop)); @@ -244,7 +247,7 @@ static int mathutils_rna_matrix_set(BaseMathObject *bmo, int UNUSED(subtype)) if(rna_disallow_writes && rna_id_write_error(&self->ptr, NULL)) { return 0; } -#endif +#endif // USE_PEDANTIC_WRITE if (!RNA_property_editable_flag(&self->ptr, self->prop)) { PyErr_Format(PyExc_AttributeError, "bpy_prop \"%.200s.%.200s\" is read-only", RNA_struct_identifier(self->ptr.type), RNA_property_identifier(self->prop)); @@ -268,19 +271,23 @@ Mathutils_Callback mathutils_rna_matrix_cb = { NULL }; -/* same as RNA_enum_value_from_id but raises an exception */ -int pyrna_enum_value_from_id(EnumPropertyItem *item, const char *identifier, int *value, const char *error_prefix) +static short pyrna_rotation_euler_order_get(PointerRNA *ptr, PropertyRNA **prop_eul_order, short order_fallback) { - if(RNA_enum_value_from_id(item, identifier, value) == 0) { - char *enum_str= BPy_enum_as_string(item); - PyErr_Format(PyExc_TypeError, "%s: '%.200s' not found in (%s)", error_prefix, identifier, enum_str); - MEM_freeN(enum_str); - return -1; + /* attempt to get order */ + if(*prop_eul_order==NULL) + *prop_eul_order= RNA_struct_find_property(ptr, "rotation_mode"); + + if(*prop_eul_order) { + short order= RNA_property_enum_get(ptr, *prop_eul_order); + if (order >= ROT_MODE_XYZ && order <= ROT_MODE_ZYX) /* could be quat or axisangle */ + return order; } - return 0; + return order_fallback; } +#endif // USE_MATHUTILS + #define PROP_ALL_VECTOR_SUBTYPES PROP_TRANSLATION: case PROP_DIRECTION: case PROP_VELOCITY: case PROP_ACCELERATION: case PROP_XYZ: case PROP_XYZ_LENGTH PyObject *pyrna_math_object_from_array(PointerRNA *ptr, PropertyRNA *prop) @@ -401,27 +408,25 @@ PyObject *pyrna_math_object_from_array(PointerRNA *ptr, PropertyRNA *prop) ret = pyrna_prop_CreatePyObject(ptr, prop); /* owned by the Mathutils PyObject */ } } - -#endif +#else // USE_MATHUTILS + (void)ptr; + (void)prop; +#endif // USE_MATHUTILS return ret; } -#endif - -static short pyrna_rotation_euler_order_get(PointerRNA *ptr, PropertyRNA **prop_eul_order, short order_fallback) +/* same as RNA_enum_value_from_id but raises an exception */ +int pyrna_enum_value_from_id(EnumPropertyItem *item, const char *identifier, int *value, const char *error_prefix) { - /* attempt to get order */ - if(*prop_eul_order==NULL) - *prop_eul_order= RNA_struct_find_property(ptr, "rotation_mode"); - - if(*prop_eul_order) { - short order= RNA_property_enum_get(ptr, *prop_eul_order); - if (order >= ROT_MODE_XYZ && order <= ROT_MODE_ZYX) /* could be quat or axisangle */ - return order; + if(RNA_enum_value_from_id(item, identifier, value) == 0) { + char *enum_str= BPy_enum_as_string(item); + PyErr_Format(PyExc_TypeError, "%s: '%.200s' not found in (%s)", error_prefix, identifier, enum_str); + MEM_freeN(enum_str); + return -1; } - return order_fallback; + return 0; } static int pyrna_struct_compare( BPy_StructRNA * a, BPy_StructRNA * b ) @@ -853,9 +858,9 @@ PyObject * pyrna_prop_to_py(PointerRNA *ptr, PropertyRNA *prop) else { ret= PyUnicode_FromString(buf); } -#else +#else // USE_STRING_COERCE ret= PyUnicode_FromString(buf); -#endif +#endif // USE_STRING_COERCE MEM_freeN(buf); break; } @@ -990,7 +995,7 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyOb if(!BaseMath_ReadCallback(mat)) return -1; } else /* continue... */ -#endif +#endif // USE_MATHUTILS if (!PySequence_Check(value)) { PyErr_Format(PyExc_TypeError, "%.200s RNA array assignment to %.200s.%.200s expected a sequence instead of %.200s instance", error_prefix, RNA_struct_identifier(ptr->type), RNA_property_identifier(prop), Py_TYPE(value)->tp_name); return -1; @@ -1072,9 +1077,9 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyOb else { param= _PyUnicode_AsString(value); } -#else +#else // USE_STRING_COERCE param= _PyUnicode_AsString(value); -#endif +#endif // USE_STRING_COERCE if (param==NULL) { PyErr_Format(PyExc_TypeError, "%.200s %.200s.%.200s expected a string type", error_prefix, RNA_struct_identifier(ptr->type), RNA_property_identifier(prop)); @@ -1086,7 +1091,7 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyOb } #ifdef USE_STRING_COERCE Py_XDECREF(value_coerce); -#endif +#endif // USE_STRING_COERCE break; } case PROP_ENUM: @@ -1951,7 +1956,7 @@ static int pyrna_struct_ass_subscript( BPy_StructRNA *self, PyObject *key, PyObj if(rna_disallow_writes && rna_id_write_error(&self->ptr, key)) { return -1; } -#endif +#endif // USE_STRING_COERCE if(group==NULL) { PyErr_SetString(PyExc_TypeError, "bpy_struct[key] = val: id properties not supported for this type"); @@ -2781,7 +2786,7 @@ static int pyrna_struct_setattro( BPy_StructRNA *self, PyObject *pyname, PyObjec if(rna_disallow_writes && rna_id_write_error(&self->ptr, pyname)) { return -1; } -#endif +#endif // USE_STRING_COERCE if(name == NULL) { PyErr_SetString(PyExc_AttributeError, "bpy_struct: __setattr__ must be a string"); @@ -2900,7 +2905,7 @@ static int pyrna_prop_collection_setattro( BPy_PropertyRNA *self, PyObject *pyna if(rna_disallow_writes && rna_id_write_error(&self->ptr, pyname)) { return -1; } -#endif +#endif // USE_STRING_COERCE if(name == NULL) { PyErr_SetString(PyExc_AttributeError, "bpy_prop: __setattr__ must be a string"); @@ -3566,6 +3571,7 @@ PyObject *pyrna_param_to_py(PointerRNA *ptr, PropertyRNA *prop, void *data) break; case PROP_FLOAT: switch(RNA_property_subtype(prop)) { +#ifdef USE_MATHUTILS case PROP_ALL_VECTOR_SUBTYPES: ret= newVectorObject(data, len, Py_NEW, NULL); break; @@ -3579,6 +3585,7 @@ PyObject *pyrna_param_to_py(PointerRNA *ptr, PropertyRNA *prop, void *data) break; } /* pass through */ +#endif default: ret = PyTuple_New(len); for(a=0; a Date: Thu, 9 Dec 2010 07:05:09 +0000 Subject: [PATCH 064/236] removing BLF_types.h from CMakeLists.txt --- source/blender/blenfont/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/source/blender/blenfont/CMakeLists.txt b/source/blender/blenfont/CMakeLists.txt index 1dc546bd6d5..0b7cb20af83 100644 --- a/source/blender/blenfont/CMakeLists.txt +++ b/source/blender/blenfont/CMakeLists.txt @@ -42,7 +42,6 @@ set(SRC intern/blf_util.c BLF_api.h - BLF_types.h intern/blf_internal.h intern/blf_internal_types.h ) From 9f4b5d49fcc90c1ac41d3c969a5cfd3d75fc432d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 9 Dec 2010 11:49:38 +0000 Subject: [PATCH 065/236] Problem with FCurve pasting reported by Rob Garlington. - Pasting from 1 fcurve to any other fcurve now works (skip index and rna path checking). - Pasting multiple fcurves between bones now works. - If path checking fails, pasting matches indices so Scale XYZ can be pasted into Location XYZ for eg. --- .../editors/animation/keyframes_general.c | 219 ++++++++++++++---- .../editors/space_action/action_edit.c | 4 + .../blender/editors/space_graph/graph_edit.c | 5 +- 3 files changed, 176 insertions(+), 52 deletions(-) diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c index 68e38d04620..3672b3901e4 100644 --- a/source/blender/editors/animation/keyframes_general.c +++ b/source/blender/editors/animation/keyframes_general.c @@ -42,6 +42,11 @@ #include "BKE_fcurve.h" #include "BKE_utildefines.h" +#include "BKE_report.h" +#include "BKE_library.h" +#include "BKE_global.h" + +#include "RNA_access.h" #include "ED_anim_api.h" #include "ED_keyframing.h" @@ -453,6 +458,8 @@ typedef struct tAnimCopybufItem { int totvert; /* number of keyframes stored for this channel */ BezTriple *bezt; /* keyframes in buffer */ + + short id_type; /* Result of GS(id->name)*/ } tAnimCopybufItem; @@ -510,6 +517,7 @@ short copy_animedit_keys (bAnimContext *UNUSED(ac), ListBase *anim_data) /* init copybuf item info */ aci= MEM_callocN(sizeof(tAnimCopybufItem), "AnimCopybufItem"); aci->id= ale->id; + aci->id_type= GS(ale->id->name); aci->grp= fcu->grp; aci->rna_path= MEM_dupallocN(fcu->rna_path); aci->array_index= fcu->array_index; @@ -550,74 +558,183 @@ short copy_animedit_keys (bAnimContext *UNUSED(ac), ListBase *anim_data) return 0; } +static tAnimCopybufItem *pastebuf_match_path_full(FCurve *fcu, const short from_single, const short to_simple) { + tAnimCopybufItem *aci; + + for (aci= animcopybuf.first; aci; aci= aci->next) { + /* check that paths exist */ + if (to_simple || (aci->rna_path && fcu->rna_path)) { + if (to_simple || (strcmp(aci->rna_path, fcu->rna_path) == 0)) { + if ((from_single) || (aci->array_index == fcu->array_index)) { + break; + } + } + } + } + + return aci; +} + +static tAnimCopybufItem *pastebuf_match_path_property(FCurve *fcu, const short from_single, const short UNUSED(to_simple)) +{ + tAnimCopybufItem *aci; + + for (aci= animcopybuf.first; aci; aci= aci->next) { + /* check that paths exist */ + if (aci->rna_path && fcu->rna_path) { + + /* find the property of the fcurve and compare against the end of the tAnimCopybufItem + * more involves since it needs to to path lookups. + * This is not 100% reliable since the user could be editing the curves on a path that wont + * resolve, or a bone could be renamed after copying for eg. but in normal copy & paste + * this should work out ok. */ + if(BLI_findindex(which_libbase(G.main, aci->id_type), aci->id) == -1) { + /* pedantic but the ID could have been removed, and beats crashing! */ + printf("paste_animedit_keys: error ID has been removed!\n"); + } + else { + PointerRNA id_ptr, rptr; + PropertyRNA *prop; + + RNA_id_pointer_create(aci->id, &id_ptr); + RNA_path_resolve(&id_ptr, aci->rna_path, &rptr, &prop); + + if(prop) { + const char *identifier= RNA_property_identifier(prop); + int len_id = strlen(identifier); + int len_path = strlen(fcu->rna_path); + if(len_id <= len_path) { + /* note, paths which end with "] will fail with this test - Animated ID Props */ + if(strcmp(identifier, fcu->rna_path + (len_path-len_id))==0) { + if ((from_single) || (aci->array_index == fcu->array_index)) { + break; + } + } + } + } + else { + printf("paste_animedit_keys: failed to resolve path id:%s, '%s'!\n", aci->id->name, aci->rna_path); + } + } + } + } + + return aci; +} + +static tAnimCopybufItem *pastebuf_match_index_only(FCurve *fcu, const short from_single, const short UNUSED(to_simple)) +{ + tAnimCopybufItem *aci; + + for (aci= animcopybuf.first; aci; aci= aci->next) { + /* check that paths exist */ + if ((from_single) || (aci->array_index == fcu->array_index)) { + break; + } + } + + return aci; +} + +static void paste_animedit_keys_fcurve(FCurve *fcu, tAnimCopybufItem *aci, float offset) +{ + BezTriple *bezt; + int i; + + /* just start pasting, with the the first keyframe on the current frame, and so on */ + for (i=0, bezt=aci->bezt; i < aci->totvert; i++, bezt++) { + /* temporarily apply offset to src beztriple while copying */ + bezt->vec[0][0] += offset; + bezt->vec[1][0] += offset; + bezt->vec[2][0] += offset; + + /* insert the keyframe + * NOTE: no special flags here for now + */ + insert_bezt_fcurve(fcu, bezt, 0); + + /* un-apply offset from src beztriple after copying */ + bezt->vec[0][0] -= offset; + bezt->vec[1][0] -= offset; + bezt->vec[2][0] -= offset; + } + + /* recalculate F-Curve's handles? */ + calchandles_fcurve(fcu); +} + /* This function pastes data from the keyframes copy/paste buffer */ short paste_animedit_keys (bAnimContext *ac, ListBase *anim_data) { bAnimListElem *ale; const Scene *scene= (ac->scene); const float offset = (float)(CFRA - animcopy_firstframe); - short no_name= 0; + const short from_single= (animcopybuf.first == animcopybuf.last); + const short to_simple= (anim_data->first == anim_data->last); + int pass; /* check if buffer is empty */ if (ELEM(NULL, animcopybuf.first, animcopybuf.last)) { - //error("No data in buffer to paste"); + BKE_report(ac->reports, RPT_WARNING, "No data in buffer to paste"); return -1; } - /* check if single channel in buffer (disregard names if so) */ - if (animcopybuf.first == animcopybuf.last) - no_name= 1; + + if(from_single && to_simple) { + /* 1:1 match, no tricky checking, just paste */ + FCurve *fcu; + tAnimCopybufItem *aci; + + ale= anim_data->first; + fcu= (FCurve *)ale->data; /* destination F-Curve */ + aci= animcopybuf.first; + + paste_animedit_keys_fcurve(fcu, aci, offset); + } + else { + /* from selected channels */ + for(pass= 0; pass < 3; pass++) { + int totmatch= 0; + for (ale= anim_data->first; ale; ale= ale->next) { + + /* find buffer item to paste from + * - if names don't matter (i.e. only 1 channel in buffer), don't check id/group + * - if names do matter, only check if id-type is ok for now (group check is not that important) + * - most importantly, rna-paths should match (array indices are unimportant for now) + */ + FCurve *fcu = (FCurve *)ale->data; /* destination F-Curve */ + tAnimCopybufItem *aci= NULL; + + switch(pass) { + case 0: + /* most strict, must be exact path match data_path & index */ + aci= pastebuf_match_path_full(fcu, from_single, to_simple); + break; - /* from selected channels */ - for (ale= anim_data->first; ale; ale= ale->next) { - FCurve *fcu = (FCurve *)ale->data; /* destination F-Curve */ - tAnimCopybufItem *aci= NULL; - BezTriple *bezt; - int i; - - /* find buffer item to paste from - * - if names don't matter (i.e. only 1 channel in buffer), don't check id/group - * - if names do matter, only check if id-type is ok for now (group check is not that important) - * - most importantly, rna-paths should match (array indices are unimportant for now) - */ - // TODO: the matching algorithm here is pathetic! - for (aci= animcopybuf.first; aci; aci= aci->next) { - /* check that paths exist */ - if (aci->rna_path && fcu->rna_path) { - // FIXME: this breaks for bone names! - if (strcmp(aci->rna_path, fcu->rna_path) == 0) { - /* should be a match unless there's more than one of these */ - if ((no_name) || (aci->array_index == fcu->array_index)) - break; + case 1: + /* less strict, just compare property names */ + aci= pastebuf_match_path_property(fcu, from_single, to_simple); + break; + + case 2: + /* Comparing properties gave no results, so just do index comparisons */ + aci= pastebuf_match_index_only(fcu, from_single, to_simple); + break; + } + + /* copy the relevant data from the matching buffer curve */ + if (aci) { + totmatch++; + paste_animedit_keys_fcurve(fcu, aci, offset); } } - } - - - /* copy the relevant data from the matching buffer curve */ - if (aci) { - /* just start pasting, with the the first keyframe on the current frame, and so on */ - for (i=0, bezt=aci->bezt; i < aci->totvert; i++, bezt++) { - /* temporarily apply offset to src beztriple while copying */ - bezt->vec[0][0] += offset; - bezt->vec[1][0] += offset; - bezt->vec[2][0] += offset; - - /* insert the keyframe - * NOTE: no special flags here for now - */ - insert_bezt_fcurve(fcu, bezt, 0); - - /* un-apply offset from src beztriple after copying */ - bezt->vec[0][0] -= offset; - bezt->vec[1][0] -= offset; - bezt->vec[2][0] -= offset; - } - /* recalculate F-Curve's handles? */ - calchandles_fcurve(fcu); + /* dont continue if some fcurves were pasted */ + if(totmatch) { + break; + } } } - + return 0; } diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index 4d35b5ca4ff..59e4cfcf68f 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -358,6 +358,10 @@ static int actkeys_paste_exec(bContext *C, wmOperator *op) if (ANIM_animdata_get_context(C, &ac) == 0) return OPERATOR_CANCELLED; + if(ac.reports==NULL) { + ac.reports= op->reports; + } + /* paste keyframes */ if (ac.datatype == ANIMCONT_GPENCIL) { // FIXME... diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 35307a78e65..c53e71365a6 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -681,9 +681,12 @@ static int graphkeys_paste_exec(bContext *C, wmOperator *op) if (ANIM_animdata_get_context(C, &ac) == 0) return OPERATOR_CANCELLED; + if(ac.reports==NULL) { + ac.reports= op->reports; + } + /* paste keyframes */ if (paste_graph_keys(&ac)) { - BKE_report(op->reports, RPT_ERROR, "No keyframes to paste"); return OPERATOR_CANCELLED; } From ad35b37f2d082d6618c44d14cb9b8d98f25563fc Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Thu, 9 Dec 2010 15:49:05 +0000 Subject: [PATCH 066/236] Bugfix #25120 and #25119 and numerous future bugs! Two isses: - Material assigning to MetaBalls used wrong pointer (copy paste error, casting badly). - Checking for node-material used wrong RNA pointer (confusing void stuff going on here!) The error leads to corruption in data and/or random crashes. Better update svn now! --- source/blender/blenkernel/intern/material.c | 8 ++++++-- source/blender/editors/interface/interface_templates.c | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index 2af7fc3b70a..420aca12a20 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -445,7 +445,7 @@ Material ***give_matarar_id(ID *id) return &(((Curve *)id)->mat); break; case ID_MB: - return &(((Curve *)id)->mat); + return &(((MetaBall *)id)->mat); break; } return NULL; @@ -461,7 +461,7 @@ short *give_totcolp_id(ID *id) return &(((Curve *)id)->totcol); break; case ID_MB: - return &(((Curve *)id)->totcol); + return &(((MetaBall *)id)->totcol); break; } return NULL; @@ -530,6 +530,10 @@ Material *give_current_material(Object *ob, int act) totcolp= give_totcolp(ob); if(totcolp==NULL || ob->totcol==0) return NULL; + if(act<0) { + printf("no!\n"); + } + if(act>ob->totcol) act= ob->totcol; else if(act<=0) act= 1; diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index f776ee54a1c..81728964167 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -2008,7 +2008,7 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe /* provision to draw active node name */ Material *ma, *manode; Object *ob= (Object*)ptr->id.data; - int index= (Material**)ptr->data - ob->mat; + int index= (Material**)itemptr->data - ob->mat; /* default item with material base name */ uiItemL(sub, name, icon); From 6cd849809df032c543da48580753453db20abf67 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Thu, 9 Dec 2010 16:15:51 +0000 Subject: [PATCH 067/236] Bugfix 25147 Graph editor: operator poll for 'active curve' didn't check for visibility flag, caused tool like ctrl+click to still work. --- source/blender/editors/space_graph/graph_utils.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/blender/editors/space_graph/graph_utils.c b/source/blender/editors/space_graph/graph_utils.c index 417d92782cc..31c1394f1ae 100644 --- a/source/blender/editors/space_graph/graph_utils.c +++ b/source/blender/editors/space_graph/graph_utils.c @@ -208,6 +208,11 @@ int graphop_active_fcurve_poll (bContext *C) /* free temp data... */ has_fcurve= ((ale->data) && (ale->type == ANIMTYPE_FCURVE)); + if(has_fcurve) { + FCurve *fcu= (FCurve *)ale->data; + has_fcurve= (fcu->flag & FCURVE_VISIBLE)!=0; + } + MEM_freeN(ale); /* return success */ From b6c68777adff0ddf46befbca1f37caff22173e21 Mon Sep 17 00:00:00 2001 From: Kent Mein Date: Thu, 9 Dec 2010 16:50:32 +0000 Subject: [PATCH 068/236] A little more work on patch [#24814] Operators which have no decription submitted by Murat Egretli Not actually a patch but talks about descriptions that are missing and some small fixes that are needed. Kent --- source/blender/editors/object/object_shapekey.c | 4 ++-- source/blender/editors/space_graph/graph_buttons.c | 1 + source/blender/editors/space_image/image_buttons.c | 2 ++ source/blender/editors/space_node/node_state.c | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c index db58965fbcf..125e3c68b09 100644 --- a/source/blender/editors/object/object_shapekey.c +++ b/source/blender/editors/object/object_shapekey.c @@ -253,8 +253,8 @@ void OBJECT_OT_shape_key_add(wmOperatorType *ot) { /* identifiers */ ot->name= "Add Shape Key"; - ot->name= "Add shape key to the object."; ot->idname= "OBJECT_OT_shape_key_add"; + ot->description= "Add shape key to the object"; /* api callbacks */ ot->poll= shape_key_mode_poll; @@ -281,8 +281,8 @@ void OBJECT_OT_shape_key_remove(wmOperatorType *ot) { /* identifiers */ ot->name= "Remove Shape Key"; - ot->name= "Remove shape key from the object."; ot->idname= "OBJECT_OT_shape_key_remove"; + ot->description= "Remove shape key from the object"; /* api callbacks */ ot->poll= shape_key_mode_poll; diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index 4d180d90992..ee66c667932 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -746,6 +746,7 @@ void GRAPH_OT_properties(wmOperatorType *ot) { ot->name= "Properties"; ot->idname= "GRAPH_OT_properties"; + ot->description= "Toggle display properties panel"; ot->exec= graph_properties; ot->poll= ED_operator_ipo_active; // xxx diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index 970be9feab6..9a7aab73f69 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -1019,6 +1019,7 @@ void IMAGE_OT_properties(wmOperatorType *ot) { ot->name= "Properties"; ot->idname= "IMAGE_OT_properties"; + ot->description= "Toggle display properties panel"; ot->exec= image_properties; ot->poll= ED_operator_image_active; @@ -1042,6 +1043,7 @@ void IMAGE_OT_scopes(wmOperatorType *ot) { ot->name= "Scopes"; ot->idname= "IMAGE_OT_scopes"; + ot->description= "Toggle display scopes panel"; ot->exec= image_scopes; ot->poll= ED_operator_image_active; diff --git a/source/blender/editors/space_node/node_state.c b/source/blender/editors/space_node/node_state.c index 48801d4369d..cdb04ec373c 100644 --- a/source/blender/editors/space_node/node_state.c +++ b/source/blender/editors/space_node/node_state.c @@ -295,6 +295,7 @@ void NODE_OT_view_all(wmOperatorType *ot) /* identifiers */ ot->name= "View All"; ot->idname= "NODE_OT_view_all"; + ot->description= "Resize view so you can see all nodes"; /* api callbacks */ ot->exec= node_view_all_exec; From f1c4688e25a124a8fe38f29e4bbf7298e33aeb56 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Thu, 9 Dec 2010 17:31:42 +0000 Subject: [PATCH 069/236] renaming blf_api.h to blf_py_api.h In windows this was producing Linking dependence errors because we have BLF_api.h in the /blenfont/ and blf_api.h in /python/generic/. It doesn't produces crash out of the box but I was trying to link both "api" files to the same project (Ketjsi folder). For the linking order was determining what header to use. A workaround is to "include" the file using some ../../ relative folder. But renaming it is less error prone. Probably Ketsji folder shouldn't link to BLF_api.h anyways, but this is something I will look better later before another commit. In the mean time it's not a good idea to have 2 api files with the same name (for non case-sensitive systems). --- source/blender/python/generic/CMakeLists.txt | 4 ++-- source/blender/python/generic/{blf_api.c => blf_py_api.c} | 2 +- source/blender/python/generic/{blf_api.h => blf_py_api.h} | 0 source/blender/python/intern/bpy.c | 2 +- source/gameengine/Ketsji/KX_PythonInit.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename source/blender/python/generic/{blf_api.c => blf_py_api.c} (99%) rename source/blender/python/generic/{blf_api.h => blf_py_api.h} (100%) diff --git a/source/blender/python/generic/CMakeLists.txt b/source/blender/python/generic/CMakeLists.txt index 5569dda2ce6..e8a7a7149db 100644 --- a/source/blender/python/generic/CMakeLists.txt +++ b/source/blender/python/generic/CMakeLists.txt @@ -31,7 +31,7 @@ set(INC set(SRC IDProp.c bgl.c - blf_api.c + blf_py_api.c bpy_internal_import.c mathutils.c mathutils_color.c @@ -45,7 +45,7 @@ set(SRC IDProp.h bgl.h - blf_api.h + blf_py_api.h bpy_internal_import.h mathutils.h mathutils_color.h diff --git a/source/blender/python/generic/blf_api.c b/source/blender/python/generic/blf_py_api.c similarity index 99% rename from source/blender/python/generic/blf_api.c rename to source/blender/python/generic/blf_py_api.c index e81b885f7bb..8821aa6d6e7 100644 --- a/source/blender/python/generic/blf_api.c +++ b/source/blender/python/generic/blf_py_api.c @@ -23,7 +23,7 @@ */ #include -#include "blf_api.h" +#include "blf_py_api.h" #include "../../blenfont/BLF_api.h" #include "BKE_utildefines.h" diff --git a/source/blender/python/generic/blf_api.h b/source/blender/python/generic/blf_py_api.h similarity index 100% rename from source/blender/python/generic/blf_api.h rename to source/blender/python/generic/blf_py_api.h diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c index 2b6fbd7aaa5..834d472d786 100644 --- a/source/blender/python/intern/bpy.c +++ b/source/blender/python/intern/bpy.c @@ -44,7 +44,7 @@ /* external util modules */ #include "../generic/mathutils.h" #include "../generic/bgl.h" -#include "../generic/blf_api.h" +#include "../generic/blf_py_api.h" #include "../generic/IDProp.h" #include "AUD_PyInit.h" diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp index 99870c42018..48e002fc3c2 100644 --- a/source/gameengine/Ketsji/KX_PythonInit.cpp +++ b/source/gameengine/Ketsji/KX_PythonInit.cpp @@ -51,7 +51,7 @@ extern "C" { #include "py_capi_utils.h" #include "mathutils.h" // Blender.Mathutils module copied here so the blenderlayer can use. #include "bgl.h" - #include "blf_api.h" + #include "blf_py_api.h" #include "marshal.h" /* python header for loading/saving dicts */ } From 6a3efdc23adc43e60e51440c3e2906aa647e61bb Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Thu, 9 Dec 2010 17:35:35 +0000 Subject: [PATCH 070/236] User prefs: label "Auto Save" was on wrong position. --- release/scripts/ui/space_userpref.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/scripts/ui/space_userpref.py b/release/scripts/ui/space_userpref.py index 53c5051e25c..6445fdcfad6 100644 --- a/release/scripts/ui/space_userpref.py +++ b/release/scripts/ui/space_userpref.py @@ -705,10 +705,10 @@ class USERPREF_PT_file(bpy.types.Panel): col.separator() col.separator() - col.label(text="Auto Save:") col.prop(paths, "save_version") col.prop(paths, "recent_files") col.prop(paths, "use_save_preview_images") + col.label(text="Auto Save:") col.prop(paths, "use_auto_save_temporary_files") sub = col.column() sub.active = paths.use_auto_save_temporary_files From 996674704eec1268527d2f7ed22b578dc983f766 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Thu, 9 Dec 2010 17:36:44 +0000 Subject: [PATCH 071/236] Added more clear tooltip for Auto Save feature. --- source/blender/makesrna/intern/rna_userdef.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 014406f9074..7900c2a5994 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -2813,7 +2813,7 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna) prop= RNA_def_property(srna, "use_auto_save_temporary_files", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOSAVE); - RNA_def_property_ui_text(prop, "Auto Save Temporary Files", "Automatic saving of temporary files"); + RNA_def_property_ui_text(prop, "Auto Save Temporary Files", "Automatic saving of temporary files in temp directory, uses process ID"); RNA_def_property_update(prop, 0, "rna_userdef_autosave_update"); prop= RNA_def_property(srna, "auto_save_time", PROP_INT, PROP_NONE); From 4640833747d0dbd0e245fc0487885060e9d08f18 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Thu, 9 Dec 2010 18:08:58 +0000 Subject: [PATCH 072/236] Two nice usability fixes: - On inserting keyframes in buttons, no redraw happened - Keyframe in icon-only buttons now draw color in background. --- .../editors/interface/interface_handlers.c | 3 ++- .../editors/interface/interface_widgets.c | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 1e963e37fd2..66ea2ebc265 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -5002,7 +5002,8 @@ void uiContextAnimUpdate(const bContext *C) for(block=ar->uiblocks.first; block; block=block->next) { for(but=block->buttons.first; but; but= but->next) { ui_but_anim_flag(but, (scene)? scene->r.cfra: 0.0f); - + ED_region_tag_redraw(ar); + if(but->active) activebut= but; else if(!activebut && (but->flag & UI_BUT_LAST_ACTIVE)) diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 403c7001b3b..561fc754f7c 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -2350,6 +2350,20 @@ static void widget_swatch(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat } +static void widget_icon_has_anim(uiBut *but, uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) +{ + if(state & (UI_BUT_ANIMATED|UI_BUT_ANIMATED_KEY|UI_BUT_DRIVEN|UI_BUT_REDALERT)) { + uiWidgetBase wtb; + + widget_init(&wtb); + wtb.outline= 0; + + /* rounded */ + round_box_edges(&wtb, 15, rect, 10.0f); + widgetbase_draw(&wtb, wcol); + } +} + static void widget_textbut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) { @@ -2693,7 +2707,7 @@ static uiWidgetType *widget_type(uiWidgetTypeEnum type) /* specials */ case UI_WTYPE_ICON: - wt.draw= NULL; + wt.custom= widget_icon_has_anim; break; case UI_WTYPE_SWATCH: From 41acfb1907ab59b47af794c1c8d0eb3ea82a89b8 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Thu, 9 Dec 2010 18:31:40 +0000 Subject: [PATCH 073/236] Bugfix #25150 Graph editor: hotkeys for handles restored; they work immediate and non modal now (menu was ugly and slow). Uses similar options as 3d curve editing, but not toggling 'aligned' HKEY: sets aligned SHIFT+H: sets auto ALT+H: sets free handle VKEY: vector handle --- source/blender/editors/space_graph/graph_edit.c | 1 - source/blender/editors/space_graph/graph_ops.c | 8 +++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index c53e71365a6..a371a974be3 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -1433,7 +1433,6 @@ static int graphkeys_handletype_exec(bContext *C, wmOperator *op) ot->description= "Set type of handle for selected keyframes"; /* api callbacks */ - ot->invoke= WM_menu_invoke; ot->exec= graphkeys_handletype_exec; ot->poll= graphop_editable_keyframes_poll; diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c index aa9cff71857..97595c9b904 100644 --- a/source/blender/editors/space_graph/graph_ops.c +++ b/source/blender/editors/space_graph/graph_ops.c @@ -31,6 +31,7 @@ #include "DNA_scene_types.h" +#include "DNA_anim_types.h" #include "BLI_blenlib.h" @@ -331,7 +332,12 @@ static void graphedit_keymap_keyframes (wmKeyConfig *keyconf, wmKeyMap *keymap) WM_keymap_add_item(keymap, "GRAPH_OT_snap", SKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "GRAPH_OT_mirror", MKEY, KM_PRESS, KM_SHIFT, 0); - WM_keymap_add_item(keymap, "GRAPH_OT_handle_type", HKEY, KM_PRESS, 0, 0); + RNA_enum_set(WM_keymap_add_item(keymap, "GRAPH_OT_handle_type", HKEY, KM_PRESS, 0, 0)->ptr, "type", HD_ALIGN); + RNA_enum_set(WM_keymap_add_item(keymap, "GRAPH_OT_handle_type", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", HD_AUTO); + RNA_enum_set(WM_keymap_add_item(keymap, "GRAPH_OT_handle_type", HKEY, KM_PRESS, KM_ALT, 0)->ptr, "type", HD_FREE); + RNA_enum_set(WM_keymap_add_item(keymap, "GRAPH_OT_handle_type", VKEY, KM_PRESS, 0, 0)->ptr, "type", HD_VECT); + + WM_keymap_add_item(keymap, "GRAPH_OT_interpolation_type", TKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "GRAPH_OT_extrapolation_type", EKEY, KM_PRESS, KM_SHIFT, 0); From 3ee53d7b5f8e4371607467cff69c3f35662abdc4 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Thu, 9 Dec 2010 19:06:45 +0000 Subject: [PATCH 074/236] Related to previous commit: I still have to learn more of the recent changes in code :) Didn't know the handle type options became a menu for Curve edit mode. Providing much-used tools non-modal (direct) really should have preference. Pull down is not very accessible here though, will check on it later. :) This restores H, Shift+H, V and alt+H for handle setting. --- source/blender/editors/curve/curve_ops.c | 7 ++++++- source/blender/editors/curve/editcurve.c | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/source/blender/editors/curve/curve_ops.c b/source/blender/editors/curve/curve_ops.c index 66d8787627f..9f67b9d6c06 100644 --- a/source/blender/editors/curve/curve_ops.c +++ b/source/blender/editors/curve/curve_ops.c @@ -195,7 +195,12 @@ void ED_keymap_curve(wmKeyConfig *keyconf) keymap->poll= ED_operator_editsurfcurve; WM_keymap_add_menu(keymap, "INFO_MT_edit_curve_add", AKEY, KM_PRESS, KM_SHIFT, 0); - WM_keymap_add_menu(keymap, "INFO_MT_curve_handle_type_set", VKEY, KM_PRESS, 0, 0); + /* XXX will fix it with proper defines (ton) */ + RNA_enum_set(WM_keymap_add_item(keymap, "CURVE_OT_handle_type_set", HKEY, KM_PRESS, 0, 0)->ptr, "type", 5); + RNA_enum_set(WM_keymap_add_item(keymap, "CURVE_OT_handle_type_set", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", HD_AUTO); + RNA_enum_set(WM_keymap_add_item(keymap, "CURVE_OT_handle_type_set", HKEY, KM_PRESS, KM_ALT, 0)->ptr, "type", 6); + RNA_enum_set(WM_keymap_add_item(keymap, "CURVE_OT_handle_type_set", VKEY, KM_PRESS, 0, 0)->ptr, "type", HD_VECT); + WM_keymap_add_item(keymap, "CURVE_OT_vertex_add", LEFTMOUSE, KM_CLICK, KM_CTRL, 0); WM_keymap_add_item(keymap, "CURVE_OT_select_all", AKEY, KM_PRESS, 0, 0); diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 1a700868a96..9086e9fb317 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -3537,11 +3537,11 @@ static int set_handle_type_exec(bContext *C, wmOperator *op) void CURVE_OT_handle_type_set(wmOperatorType *ot) { static EnumPropertyItem type_items[]= { - {1, "AUTOMATIC", 0, "Automatic", ""}, - {2, "VECTOR", 0, "Vector", ""}, - {3, "TOGGLE_FREE_ALIGN", 0, "Toggle Free/Align", ""}, + {HD_AUTO, "AUTOMATIC", 0, "Automatic", ""}, + {HD_VECT, "VECTOR", 0, "Vector", ""}, {5, "ALIGN", 0, "Align", ""}, {6, "FREE_ALIGN", 0, "Free Align", ""}, + {3, "TOGGLE_FREE_ALIGN", 0, "Toggle Free/Align", ""}, {0, NULL, 0, NULL, NULL}}; /* identifiers */ From 545cc4803e8e9e7418aba98b2c1bec72fa629146 Mon Sep 17 00:00:00 2001 From: Diego Borghetti Date: Thu, 9 Dec 2010 22:27:55 +0000 Subject: [PATCH 075/236] Change the BLF_aspect function to handle 3d text. This is need to properly handle 3d text (dalai work on GE), before the BLF_aspect only take one argument, and the result was a call to: glScalef(aspect, aspect, 1.0) Now the three value are store in the font (x, y and z) and also need to be enable using BLF_enable(BLF_ASPECT). By default all the code that don't have BLF_ASPECT enable work with a scale of 1.0 (so nothing change to the current UI). I also remove all the call of BLF_aspect(fontid, 1.0) found in the editors, because is disable by default, so no need any more. Campbell the only thing to check is the python api, right now I modify the api to from: BLF_aspect(fontid, aspect) to: BLF_aspect(fontid, aspect, aspect, 1.0) This is to avoid break the api, but now you need add the BLF_ASPECT option to the function py_blf_enable and in some point change py_blf_aspect to take 3 arguments. --- source/blender/blenfont/BLF_api.h | 3 +- source/blender/blenfont/intern/blf.c | 44 +++++++++++++++---- source/blender/blenfont/intern/blf_font.c | 34 +++++++++++--- .../blenfont/intern/blf_internal_types.h | 2 +- source/blender/blenkernel/intern/image.c | 1 - source/blender/blenkernel/intern/image_gen.c | 1 - .../editors/interface/interface_style.c | 2 - .../blender/editors/space_image/image_draw.c | 1 - source/blender/editors/space_info/textview.c | 1 - source/blender/editors/space_text/text_draw.c | 1 - source/blender/python/generic/blf_py_api.c | 2 +- 11 files changed, 68 insertions(+), 24 deletions(-) diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h index 84086742b15..b696c64023d 100644 --- a/source/blender/blenfont/BLF_api.h +++ b/source/blender/blenfont/BLF_api.h @@ -45,7 +45,7 @@ int BLF_load_mem_unique(const char *name, unsigned char *mem, int mem_size); /* Attach a file with metrics information from memory. */ void BLF_metrics_attach(int fontid, unsigned char *mem, int mem_size); -void BLF_aspect(int fontid, float aspect); +void BLF_aspect(int fontid, float x, float y, float z); void BLF_position(int fontid, float x, float y, float z); void BLF_size(int fontid, int size, int dpi); @@ -195,6 +195,7 @@ void BLF_dir_free(char **dirs, int count); #define BLF_SHADOW (1<<2) #define BLF_KERNING_DEFAULT (1<<3) #define BLF_MATRIX (1<<4) +#define BLF_ASPECT (1<<5) // XXX, bad design extern int blf_mono_font; diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c index d9a02b09336..3ac0b8449b0 100644 --- a/source/blender/blenfont/intern/blf.c +++ b/source/blender/blenfont/intern/blf.c @@ -321,13 +321,16 @@ void BLF_disable_default(int option) font->flags &= ~option; } -void BLF_aspect(int fontid, float aspect) +void BLF_aspect(int fontid, float x, float y, float z) { FontBLF *font; font= BLF_get(fontid); - if (font) - font->aspect= aspect; + if (font) { + font->aspect[0]= x; + font->aspect[1]= y; + font->aspect[2]= z; + } } void BLF_matrix(int fontid, double *m) @@ -346,23 +349,43 @@ void BLF_position(int fontid, float x, float y, float z) { FontBLF *font; float remainder; + float xa, ya, za; font= BLF_get(fontid); if (font) { + if (font->flags & BLF_ASPECT) { + xa= font->aspect[0]; + ya= font->aspect[1]; + za= font->aspect[2]; + } + else { + xa= 1.0f; + ya= 1.0f; + za= 1.0f; + } + remainder= x - floor(x); if (remainder > 0.4 && remainder < 0.6) { if (remainder < 0.5) - x -= 0.1 * font->aspect; + x -= 0.1 * xa; else - x += 0.1 * font->aspect; + x += 0.1 * xa; } remainder= y - floor(y); if (remainder > 0.4 && remainder < 0.6) { if (remainder < 0.5) - y -= 0.1 * font->aspect; + y -= 0.1 * ya; else - y += 0.1 * font->aspect; + y += 0.1 * ya; + } + + remainder= z - floor(z); + if (remainder > 0.4 && remainder < 0.6) { + if (remainder < 0.5) + z -= 0.1 * za; + else + z += 0.1 * za; } font->pos[0]= x; @@ -406,6 +429,7 @@ void BLF_draw_default(float x, float y, float z, const char *str, size_t len) BLF_position(global_font_default, x, y, z); BLF_draw(global_font_default, str, len); } + /* same as above but call 'BLF_draw_ascii' */ void BLF_draw_default_ascii(float x, float y, float z, const char *str, size_t len) { @@ -434,7 +458,6 @@ void BLF_rotation_default(float angle) font->angle= angle; } - static void blf_draw__start(FontBLF *font) { /* @@ -452,11 +475,14 @@ static void blf_draw__start(FontBLF *font) glMultMatrixd((GLdouble *)&font->m); glTranslatef(font->pos[0], font->pos[1], font->pos[2]); - glScalef(font->aspect, font->aspect, 1.0); + + if (font->flags & BLF_ASPECT) + glScalef(font->aspect[0], font->aspect[1], font->aspect[2]); if (font->flags & BLF_ROTATION) glRotatef(font->angle, 0.0f, 0.0f, 1.0f); } + static void blf_draw__end(void) { glPopMatrix(); diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c index 3adda7bb6f1..d1dcf7aa9b3 100644 --- a/source/blender/blenfont/intern/blf_font.c +++ b/source/blender/blenfont/intern/blf_font.c @@ -420,35 +420,57 @@ void blf_font_boundbox(FontBLF *font, const char *str, rctf *box) void blf_font_width_and_height(FontBLF *font, const char *str, float *width, float *height) { + float xa, ya; rctf box; if (font->glyph_cache) { + if (font->flags & BLF_ASPECT) { + xa= font->aspect[0]; + ya= font->aspect[1]; + } + else { + xa= 1.0f; + ya= 1.0f; + } + blf_font_boundbox(font, str, &box); - *width= ((box.xmax - box.xmin) * font->aspect); - *height= ((box.ymax - box.ymin) * font->aspect); + *width= ((box.xmax - box.xmin) * xa); + *height= ((box.ymax - box.ymin) * ya); } } float blf_font_width(FontBLF *font, const char *str) { + float xa; rctf box; if (!font->glyph_cache) return(0.0f); + if (font->flags & BLF_ASPECT) + xa= font->aspect[0]; + else + xa= 1.0f; + blf_font_boundbox(font, str, &box); - return((box.xmax - box.xmin) * font->aspect); + return((box.xmax - box.xmin) * xa); } float blf_font_height(FontBLF *font, const char *str) { + float ya; rctf box; if (!font->glyph_cache) return(0.0f); + if (font->flags & BLF_ASPECT) + ya= font->aspect[1]; + else + ya= 1.0f; + blf_font_boundbox(font, str, &box); - return((box.ymax - box.ymin) * font->aspect); + return((box.ymax - box.ymin) * ya); } float blf_font_fixed_width(FontBLF *font) @@ -495,7 +517,9 @@ static void blf_font_fill(FontBLF *font) { int i; - font->aspect= 1.0f; + font->aspect[0]= 1.0f; + font->aspect[1]= 1.0f; + font->aspect[2]= 1.0f; font->pos[0]= 0.0f; font->pos[1]= 0.0f; font->angle= 0.0f; diff --git a/source/blender/blenfont/intern/blf_internal_types.h b/source/blender/blenfont/intern/blf_internal_types.h index 04afaeb2e97..d7c023fc415 100644 --- a/source/blender/blenfont/intern/blf_internal_types.h +++ b/source/blender/blenfont/intern/blf_internal_types.h @@ -133,7 +133,7 @@ typedef struct FontBLF { char *filename; /* aspect ratio or scale. */ - float aspect; + float aspect[3]; /* initial position for draw the text. */ float pos[3]; diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 6cd0c89157a..efa8a824663 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -1009,7 +1009,6 @@ void BKE_stamp_buf(Scene *scene, unsigned char *rect, float *rectf, int width, i scene->r.stamp_font_id= 12; /* set before return */ - BLF_aspect(mono, 1.0); BLF_size(mono, scene->r.stamp_font_id, 72); BLF_buffer(mono, rectf, rect, width, height, channels); diff --git a/source/blender/blenkernel/intern/image_gen.c b/source/blender/blenkernel/intern/image_gen.c index b765cf29a3d..a2d41920217 100644 --- a/source/blender/blenkernel/intern/image_gen.c +++ b/source/blender/blenkernel/intern/image_gen.c @@ -306,7 +306,6 @@ static void checker_board_text(unsigned char *rect, float *rect_float, int width char text[3]= {'A', '1', '\0'}; const int mono= blf_mono_font; - BLF_aspect(mono, 1.0); BLF_size(mono, 54, 72); /* hard coded size! */ BLF_buffer(mono, rect_float, rect, width, height, 4); diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index 51a54315d66..ec9ac300ca2 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -319,14 +319,12 @@ void uiStyleInit(void) if (blf_mono_font == -1) blf_mono_font= BLF_load_mem_unique("monospace", (unsigned char *)datatoc_bmonofont_ttf, datatoc_bmonofont_ttf_size); - BLF_aspect(blf_mono_font, 1.0); BLF_size(blf_mono_font, 12, 72); /* second for rendering else we get threading problems */ if (blf_mono_font_render == -1) blf_mono_font_render= BLF_load_mem_unique("monospace", (unsigned char *)datatoc_bmonofont_ttf, datatoc_bmonofont_ttf_size); - BLF_aspect(blf_mono_font_render, 1.0); BLF_size(blf_mono_font_render, 12, 72); } diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index b781544c05b..55f27cbca62 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -157,7 +157,6 @@ void draw_image_info(ARegion *ar, int channels, int x, int y, char *cp, float *f glColor3ub(255, 255, 255); // UI_DrawString(6, 6, str); // works ok but fixed width is nicer. - BLF_aspect(blf_mono_font, 1.0); BLF_size(blf_mono_font, 11, 72); BLF_position(blf_mono_font, 6, 6, 0); BLF_draw_ascii(blf_mono_font, str, sizeof(str)); diff --git a/source/blender/editors/space_info/textview.c b/source/blender/editors/space_info/textview.c index 53751884bec..a8452731d68 100644 --- a/source/blender/editors/space_info/textview.c +++ b/source/blender/editors/space_info/textview.c @@ -41,7 +41,6 @@ static void console_font_begin(TextViewContext *sc) { - BLF_aspect(blf_mono_font, 1.0); BLF_size(blf_mono_font, sc->lheight-2, 72); } diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index c5037d1226f..93581056c98 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -61,7 +61,6 @@ static void text_font_begin(SpaceText *st) { - BLF_aspect(mono, 1.0); BLF_size(mono, st->lheight, 72); } diff --git a/source/blender/python/generic/blf_py_api.c b/source/blender/python/generic/blf_py_api.c index 8821aa6d6e7..bd8512ff2d7 100644 --- a/source/blender/python/generic/blf_py_api.c +++ b/source/blender/python/generic/blf_py_api.c @@ -99,7 +99,7 @@ static PyObject *py_blf_aspect(PyObject *UNUSED(self), PyObject *args) if (!PyArg_ParseTuple(args, "if:blf.aspect", &fontid, &aspect)) return NULL; - BLF_aspect(fontid, aspect); + BLF_aspect(fontid, aspect, aspect, 1.0); Py_RETURN_NONE; } From d9f131f2f00677cb089b42ef662d14040ef40157 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 10 Dec 2010 00:00:01 +0000 Subject: [PATCH 076/236] tag unused variables. --- source/blender/editors/interface/interface_widgets.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 561fc754f7c..a3a8e40abe6 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -2350,7 +2350,7 @@ static void widget_swatch(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat } -static void widget_icon_has_anim(uiBut *but, uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) +static void widget_icon_has_anim(uiBut *UNUSED(but), uiWidgetColors *wcol, rcti *rect, int state, int UNUSED(roundboxalign)) { if(state & (UI_BUT_ANIMATED|UI_BUT_ANIMATED_KEY|UI_BUT_DRIVEN|UI_BUT_REDALERT)) { uiWidgetBase wtb; From 2ed82275b5738255f3830b25c5a7375501246911 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 10 Dec 2010 00:10:43 +0000 Subject: [PATCH 077/236] transforming pose bones while the animation was playing would crash. --- source/blender/editors/transform/transform_generics.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 8148e10b5d2..8b47fbd5b4c 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -770,13 +770,15 @@ void recalcData(TransInfo *t) /* if animtimer is running, and the object already has animation data, * check if the auto-record feature means that we should record 'samples' * (i.e. uneditable animation values) + * + * context is needed for keying set poll() functions. */ // TODO: autokeyframe calls need some setting to specify to add samples (FPoints) instead of keyframes? - if ((t->animtimer) && IS_AUTOKEY_ON(t->scene)) { + if ((t->animtimer) && (t->context) && IS_AUTOKEY_ON(t->scene)) { int targetless_ik= (t->flag & T_AUTOIK); // XXX this currently doesn't work, since flags aren't set yet! animrecord_check_state(t->scene, &ob->id, t->animtimer); - autokeyframe_pose_cb_func(NULL, t->scene, (View3D *)t->view, ob, t->mode, targetless_ik); + autokeyframe_pose_cb_func(t->context, t->scene, (View3D *)t->view, ob, t->mode, targetless_ik); } /* old optimize trick... this enforces to bypass the depgraph */ From b4081bfc7beecf45d58137885c6abac81e3fb27b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 10 Dec 2010 00:20:32 +0000 Subject: [PATCH 078/236] patch [#25027] formatting mathutils.geometry module docs for sphinx from Luka Bonavita See: http://www.blender.org/documentation/250PythonDoc/mathutils.geometry.html --- doc/python_api/sphinx_doc_gen.py | 25 ++- release/scripts/op/console_python.py | 3 +- source/blender/makesrna/intern/rna_screen.c | 2 +- source/blender/python/generic/blf_py_api.c | 2 +- .../python/generic/mathutils_geometry.c | 156 ++++++++++++++++-- 5 files changed, 170 insertions(+), 18 deletions(-) diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index 1353dcf70d7..ae0bb43d1bc 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -64,11 +64,16 @@ EXAMPLE_SET_USED = set() _BPY_STRUCT_FAKE = "bpy_struct" _BPY_FULL_REBUILD = False + def undocumented_message(module_name, type_name, identifier): - message = "Undocumented (`contribute " \ - "`_)\n\n" % (module_name, type_name, identifier) + if str(type_name).startswith('`_)\n\n" % preloadtitle return message @@ -405,6 +410,9 @@ def rna2sphinx(BASEPATH): fw(" mathutils.rst\n\n") + fw(" mathutils.geometry.rst\n\n") + # XXX TODO + #fw(" bgl.rst\n\n") fw(" blf.rst\n\n") fw(" aud.rst\n\n") @@ -485,11 +493,20 @@ def rna2sphinx(BASEPATH): import mathutils as module pymodule2sphinx(BASEPATH, "mathutils", module, "Math Types & Utilities (mathutils)") del module + + import mathutils.geometry as module + pymodule2sphinx(BASEPATH, "mathutils.geometry", module, "Geometry Utilities (mathutils.geometry)") + del module import blf as module pymodule2sphinx(BASEPATH, "blf", module, "Font Drawing (blf)") del module + # XXX TODO + #import bgl as module + #pymodule2sphinx(BASEPATH, "bgl", module, "Blender OpenGl wrapper (bgl)") + #del module + import aud as module pymodule2sphinx(BASEPATH, "aud", module, "Audio System (aud)") del module diff --git a/release/scripts/op/console_python.py b/release/scripts/op/console_python.py index f5486e6b0bf..b9483cd769a 100644 --- a/release/scripts/op/console_python.py +++ b/release/scripts/op/console_python.py @@ -264,7 +264,8 @@ def banner(context): sc = context.space_data version_string = sys.version.strip().replace('\n', ' ') - add_scrollback(" * Python Interactive Console %s *" % version_string, 'OUTPUT') + add_scrollback("PYTHON INTERACTIVE CONSOLE %s" % version_string, 'OUTPUT') + add_scrollback("", 'OUTPUT') add_scrollback("Command History: Up/Down Arrow", 'OUTPUT') add_scrollback("Cursor: Left/Right Home/End", 'OUTPUT') add_scrollback("Remove: Backspace/Delete", 'OUTPUT') diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c index 197a7266fea..a8c96e93448 100644 --- a/source/blender/makesrna/intern/rna_screen.c +++ b/source/blender/makesrna/intern/rna_screen.c @@ -116,7 +116,7 @@ static void rna_def_area(BlenderRNA *brna) prop= RNA_def_property(srna, "spaces", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "spacedata", NULL); RNA_def_property_struct_type(prop, "Space"); - RNA_def_property_ui_text(prop, "Spaces", "Spaces contained in this area, the first space is active"); + RNA_def_property_ui_text(prop, "Spaces", "Spaces contained in this area, the first being the active space. NOTE: Useful for example to restore a previously used 3d view space in a certain area to get the old view orientation."); prop= RNA_def_property(srna, "active_space", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "spacedata.first"); diff --git a/source/blender/python/generic/blf_py_api.c b/source/blender/python/generic/blf_py_api.c index bd8512ff2d7..380f2e456bd 100644 --- a/source/blender/python/generic/blf_py_api.c +++ b/source/blender/python/generic/blf_py_api.c @@ -367,7 +367,7 @@ struct PyMethodDef BLF_methods[] = { {"dimensions", (PyCFunction) py_blf_dimensions, METH_VARARGS, py_blf_dimensions_doc}, {"draw", (PyCFunction) py_blf_draw, METH_VARARGS, py_blf_draw_doc}, {"enable", (PyCFunction) py_blf_enable, METH_VARARGS, py_blf_enable_doc}, - {"position", (PyCFunction)py_blf_position, METH_VARARGS, py_blf_position_doc}, + {"position", (PyCFunction) py_blf_position, METH_VARARGS, py_blf_position_doc}, {"rotation", (PyCFunction) py_blf_rotation, METH_VARARGS, py_blf_rotation_doc}, {"shadow", (PyCFunction) py_blf_shadow, METH_VARARGS, py_blf_shadow_doc}, {"shadow_offset", (PyCFunction) py_blf_shadow_offset, METH_VARARGS, py_blf_shadow_offset_doc}, diff --git a/source/blender/python/generic/mathutils_geometry.c b/source/blender/python/generic/mathutils_geometry.c index 4a98a421650..673ce87d9ce 100644 --- a/source/blender/python/generic/mathutils_geometry.c +++ b/source/blender/python/generic/mathutils_geometry.c @@ -45,18 +45,152 @@ /*-------------------------DOC STRINGS ---------------------------*/ static char M_Geometry_doc[] = "The Blender geometry module\n\n"; -static char M_Geometry_Intersect_doc[] = "(v1, v2, v3, ray, orig, clip=1) - returns the intersection between a ray and a triangle, if possible, returns None otherwise"; -static char M_Geometry_TriangleArea_doc[] = "(v1, v2, v3) - returns the area size of the 2D or 3D triangle defined"; -static char M_Geometry_TriangleNormal_doc[] = "(v1, v2, v3) - returns the normal of the 3D triangle defined"; -static char M_Geometry_QuadNormal_doc[] = "(v1, v2, v3, v4) - returns the normal of the 3D quad defined"; -static char M_Geometry_LineIntersect_doc[] = "(v1, v2, v3, v4) - returns a tuple with the points on each line respectively closest to the other"; -static char M_Geometry_PolyFill_doc[] = "(veclist_list) - takes a list of polylines (each point a vector) and returns the point indicies for a polyline filled with triangles"; -static char M_Geometry_LineIntersect2D_doc[] = "(lineA_p1, lineA_p2, lineB_p1, lineB_p2) - takes 2 lines (as 4 vectors) and returns a vector for their point of intersection or None"; -static char M_Geometry_ClosestPointOnLine_doc[] = "(pt, line_p1, line_p2) - takes a point and a line and returns a (Vector, float) for the point on the line, and the bool so you can know if the point was between the 2 points"; -static char M_Geometry_PointInTriangle2D_doc[] = "(pt, tri_p1, tri_p2, tri_p3) - takes 4 vectors, one is the point and the next 3 define the triangle, only the x and y are used from the vectors"; -static char M_Geometry_PointInQuad2D_doc[] = "(pt, quad_p1, quad_p2, quad_p3, quad_p4) - takes 5 vectors, one is the point and the next 4 define the quad, only the x and y are used from the vectors"; +static char M_Geometry_Intersect_doc[] = +".. function:: Intersect(v1, v2, v3, ray, orig, clip=True)\n" +"\n" +" Returns the intersection between a ray and a triangle, if possible, returns None otherwise.\n" +"\n" +" :rtype: boolean\n" +" :arg v1: Point1\n" +" :type v1: :class:`mathutils.Vector`\n" +" :arg v2: Point2\n" +" :type v2: :class:`mathutils.Vector`\n" +" :arg v3: Point3\n" +" :type v3: :class:`mathutils.Vector`\n" +" :arg ray: Direction of the projection\n" +" :type ray: :class:`mathutils.Vector`\n" +" :arg orig: Origin\n" +" :type orig: :class:`mathutils.Vector`\n" +" :arg clip: Clip by the ray length\n" +" :type clip: boolean\n"; + +static char M_Geometry_TriangleArea_doc[] = +".. function:: TriangleArea(v1, v2, v3)\n" +"\n" +" Returns the area size of the 2D or 3D triangle defined.\n" +"\n" +" :rtype: float\n" +" :arg v1: Point1\n" +" :type v1: :class:`mathutils.Vector`\n" +" :arg v2: Point2\n" +" :type v2: :class:`mathutils.Vector`\n" +" :arg v3: Point3\n" +" :type v3: :class:`mathutils.Vector`\n"; + +static char M_Geometry_TriangleNormal_doc[] = +".. function:: TriangleNormal(v1, v2, v3)\n" +"\n" +" Returns the normal of the 3D triangle defined.\n" +"\n" +" :rtype: :class:`mathutils.Vector`\n" +" :arg v1: Point1\n" +" :type v1: :class:`mathutils.Vector`\n" +" :arg v2: Point2\n" +" :type v2: :class:`mathutils.Vector`\n" +" :arg v3: Point3\n" +" :type v3: :class:`mathutils.Vector`\n"; + +static char M_Geometry_QuadNormal_doc[] = +".. function:: QuadNormal(v1, v2, v3, v4)\n" +"\n" +" Returns the normal of the 3D quad defined.\n" +"\n" +" :rtype: :class:`mathutils.Vector`\n" +" :arg v1: Point1\n" +" :type v1: :class:`mathutils.Vector`\n" +" :arg v2: Point2\n" +" :type v2: :class:`mathutils.Vector`\n" +" :arg v3: Point3\n" +" :type v3: :class:`mathutils.Vector`\n" +" :arg v4: Point4\n" +" :type v4: :class:`mathutils.Vector`\n"; + +static char M_Geometry_LineIntersect_doc[] = +".. function:: LineIntersect(v1, v2, v3, v4)\n" +"\n" +" Returns a tuple with the points on each line respectively closest to the other.\n" +"\n" +" :rtype: tuple with elements being of type :class:`mathutils.Vector`\n" +" :arg v1: First point of the first line\n" +" :type v1: :class:`mathutils.Vector`\n" +" :arg v2: Second point of the first line\n" +" :type v2: :class:`mathutils.Vector`\n" +" :arg v3: First point of the second line\n" +" :type v3: :class:`mathutils.Vector`\n" +" :arg v4: Second point of the second line\n" +" :type v4: :class:`mathutils.Vector`\n"; + +static char M_Geometry_PolyFill_doc[] = +".. function:: PolyFill(veclist_list)\n" +"\n" +" Takes a list of polylines (each point a vector) and returns the point indicies for a polyline filled with triangles.\n" +"\n" +" :rtype: list\n" +" :arg veclist_list: list of polylines\n"; + +static char M_Geometry_LineIntersect2D_doc[] = +".. function:: LineIntersect2D(lineA_p1, lineA_p2, lineB_p1, lineB_p2)\n" +"\n" +" Takes 2 lines (as 4 vectors) and returns a vector for their point of intersection or None.\n" +"\n" +" :rtype: :class:`mathutils.Vector`\n" +" :arg lineA_p1: First point of the first line\n" +" :type lineA_p1: :class:`mathutils.Vector`\n" +" :arg lineA_p2: Second point of the first line\n" +" :type lineA_p2: :class:`mathutils.Vector`\n" +" :arg lineB_p1: First point of the second line\n" +" :type lineB_p1: :class:`mathutils.Vector`\n" +" :arg lineB_p2: Second point of the second line\n" +" :type lineB_p2: :class:`mathutils.Vector`\n"; + +static char M_Geometry_ClosestPointOnLine_doc[] = +".. function:: ClosestPointOnLine(pt, line_p1, line_p2)\n" +"\n" +" Takes a point and a line and returns a tuple with the closest point on the line and its distance from the first point of the line as a percentage of the length of the line.\n" +"\n" +" :rtype: (:class:`mathutils.Vector`, float)\n" +" :arg pt: Point\n" +" :type pt: :class:`mathutils.Vector`\n" +" :arg line_p1: First point of the line\n" +" :type line_p1: :class:`mathutils.Vector`\n" +" :arg line_p1: Second point of the line\n" +" :type line_p1: :class:`mathutils.Vector`\n"; + +static char M_Geometry_PointInTriangle2D_doc[] = +".. function:: PointInTriangle2D(pt, tri_p1, tri_p2, tri_p3)\n" +"\n" +" Takes 4 vectors (using only the x and y coordinates): one is the point and the next 3 define the triangle. Returns 1 if the point is within the triangle, otherwise 0.\n" +"\n" +" :rtype: int\n" +" :arg pt: Point\n" +" :type v1: :class:`mathutils.Vector`\n" +" :arg tri_p1: First point of the triangle\n" +" :type tri_p1: :class:`mathutils.Vector`\n" +" :arg tri_p2: Second point of the triangle\n" +" :type tri_p2: :class:`mathutils.Vector`\n" +" :arg tri_p3: Third point of the triangle\n" +" :type tri_p3: :class:`mathutils.Vector`\n"; + +static char M_Geometry_PointInQuad2D_doc[] = +".. function:: PointInQuad2D(pt, quad_p1, quad_p2, quad_p3, quad_p4)\n" +"\n" +" Takes 5 vectors (using only the x and y coordinates): one is the point and the next 4 define the quad, only the x and y are used from the vectors. Returns 1 if the point is within the quad, otherwise 0.\n" +"\n" +" :rtype: int\n" +" :arg pt: Point\n" +" :type v1: :class:`mathutils.Vector`\n" +" :arg quad_p1: First point of the quad\n" +" :type quad_p1: :class:`mathutils.Vector`\n" +" :arg quad_p2: Second point of the quad\n" +" :type quad_p2: :class:`mathutils.Vector`\n" +" :arg quad_p3: Third point of the quad\n" +" :type quad_p3: :class:`mathutils.Vector`\n" +" :arg quad_p4: Forth point of the quad\n" +" :type quad_p4: :class:`mathutils.Vector`\n"; + static char M_Geometry_BoxPack2D_doc[] = ""; static char M_Geometry_BezierInterp_doc[] = ""; +static char M_Geometry_BarycentricTransform_doc[] = ""; //---------------------------------INTERSECTION FUNCTIONS-------------------- //----------------------------------geometry.Intersect() ------------------- @@ -813,7 +947,7 @@ struct PyMethodDef M_Geometry_methods[] = { {"PointInQuad2D", ( PyCFunction ) M_Geometry_PointInQuad2D, METH_VARARGS, M_Geometry_PointInQuad2D_doc}, {"BoxPack2D", ( PyCFunction ) M_Geometry_BoxPack2D, METH_O, M_Geometry_BoxPack2D_doc}, {"BezierInterp", ( PyCFunction ) M_Geometry_BezierInterp, METH_VARARGS, M_Geometry_BezierInterp_doc}, - {"BarycentricTransform", ( PyCFunction ) M_Geometry_BarycentricTransform, METH_VARARGS, NULL}, + {"BarycentricTransform", ( PyCFunction ) M_Geometry_BarycentricTransform, METH_VARARGS, M_Geometry_BarycentricTransform_doc}, {NULL, NULL, 0, NULL} }; From b27f52ce2434d703dfafa3f98e74ff6e42027386 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 10 Dec 2010 04:10:21 +0000 Subject: [PATCH 079/236] bugfix [#25154] .MXF files should be included as a known video file type in the sequencer [#25159] Vertex locations dont read correctly and are not labeled correctly in the properties bar. - non rna buttons can now have units set. - calls with invalid units system now raises an assert(). - include .mxf in filter. --- source/blender/blenkernel/BKE_unit.h | 2 +- source/blender/blenkernel/intern/unit.c | 4 +- source/blender/editors/include/UI_interface.h | 3 + source/blender/editors/interface/interface.c | 55 ++++++++++--------- .../editors/interface/interface_handlers.c | 2 +- .../editors/interface/interface_intern.h | 3 +- .../editors/interface/interface_regions.c | 2 +- .../editors/space_view3d/view3d_buttons.c | 24 +++++--- source/blender/imbuf/intern/util.c | 1 + 9 files changed, 59 insertions(+), 37 deletions(-) diff --git a/source/blender/blenkernel/BKE_unit.h b/source/blender/blenkernel/BKE_unit.h index f8ffd1cd188..5708766432f 100644 --- a/source/blender/blenkernel/BKE_unit.h +++ b/source/blender/blenkernel/BKE_unit.h @@ -67,7 +67,7 @@ double bUnit_GetScaler(void *usys_pt, int index); #define B_UNIT_TIME 6 #define B_UNIT_VELOCITY 7 #define B_UNIT_ACCELERATION 8 -#define B_UNIT_MAXDEF 9 +#define B_UNIT_TYPE_TOT 9 #ifdef __cplusplus } diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c index 69a43ac60f0..1b04589c1f2 100644 --- a/source/blender/blenkernel/intern/unit.c +++ b/source/blender/blenkernel/intern/unit.c @@ -24,6 +24,7 @@ #include #include #include +#include #include "BKE_unit.h" #include "BLI_math.h" @@ -274,6 +275,7 @@ static struct bUnitCollection *bUnitSystems[][9] = { /* internal, has some option not exposed */ static bUnitCollection *unit_get_system(int system, int type) { + assert((system > -1) && (system < UNIT_SYSTEM_TOT) && (type > -1) && (type < B_UNIT_TYPE_TOT)); return bUnitSystems[system][type]; /* select system to use, metric/imperial/other? */ } @@ -738,7 +740,7 @@ double bUnit_BaseScalar(int system, int type) /* external access */ int bUnit_IsValid(int system, int type) { - return !(type < 0 || type >= B_UNIT_MAXDEF || system < 0 || system > UNIT_SYSTEM_TOT); + return !(system < 0 || system > UNIT_SYSTEM_TOT || type < 0 || type > B_UNIT_TYPE_TOT); } diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index a60354a085f..ef74052f217 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -441,6 +441,9 @@ uiBut *uiDefIconTextButO(uiBlock *block, int type, const char *opname, int opcon /* for passing inputs to ButO buttons */ struct PointerRNA *uiButGetOperatorPtrRNA(uiBut *but); +void uiButSetUnitType(uiBut *but, const int unit_type); +int uiButGetUnitType(uiBut *but); + /* Special Buttons * * Butons with a more specific purpose: diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index bc1133313ee..8d803ef130a 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -1246,12 +1246,10 @@ int ui_is_but_float(uiBut *but) int ui_is_but_unit(uiBut *but) { Scene *scene= CTX_data_scene((bContext *)but->block->evil_C); - int unit_type; - - if(but->rnaprop==NULL) - return 0; + int unit_type= uiButGetUnitType(but); - unit_type = RNA_SUBTYPE_UNIT(RNA_property_subtype(but->rnaprop)); + if(unit_type == PROP_UNIT_NONE) + return 0; #if 1 // removed so angle buttons get correct snapping if (scene->unit.system_rotation == USER_UNIT_ROT_RADIANS && unit_type == PROP_UNIT_ROTATION) @@ -1267,9 +1265,6 @@ int ui_is_but_unit(uiBut *but) return 0; } - if(unit_type == PROP_UNIT_NONE) - return 0; - return 1; } @@ -1449,18 +1444,18 @@ int ui_get_but_string_max_length(uiBut *but) static double ui_get_but_scale_unit(uiBut *but, double value) { Scene *scene= CTX_data_scene((bContext *)but->block->evil_C); - int subtype= RNA_SUBTYPE_UNIT(RNA_property_subtype(but->rnaprop)); + int unit_type= uiButGetUnitType(but); - if(subtype == PROP_UNIT_LENGTH) { + if(unit_type == PROP_UNIT_LENGTH) { return value * scene->unit.scale_length; } - else if(subtype == PROP_UNIT_AREA) { + else if(unit_type == PROP_UNIT_AREA) { return value * pow(scene->unit.scale_length, 2); } - else if(subtype == PROP_UNIT_VOLUME) { + else if(unit_type == PROP_UNIT_VOLUME) { return value * pow(scene->unit.scale_length, 3); } - else if(subtype == PROP_UNIT_TIME) { /* WARNING - using evil_C :| */ + else if(unit_type == PROP_UNIT_TIME) { /* WARNING - using evil_C :| */ return FRA2TIME(value); } else { @@ -1472,14 +1467,14 @@ static double ui_get_but_scale_unit(uiBut *but, double value) void ui_convert_to_unit_alt_name(uiBut *but, char *str, int maxlen) { if(ui_is_but_unit(but)) { - int unit_type= RNA_SUBTYPE_UNIT_VALUE(RNA_property_subtype(but->rnaprop)); + int unit_type= uiButGetUnitType(but); char *orig_str; Scene *scene= CTX_data_scene((bContext *)but->block->evil_C); orig_str= MEM_callocN(sizeof(char)*maxlen + 1, "textedit sub str"); memcpy(orig_str, str, maxlen); - bUnit_ToUnitAltName(str, maxlen, orig_str, scene->unit.system, unit_type); + bUnit_ToUnitAltName(str, maxlen, orig_str, scene->unit.system, unit_type>>16); MEM_freeN(orig_str); } @@ -1489,7 +1484,7 @@ static void ui_get_but_string_unit(uiBut *but, char *str, int len_max, double va { Scene *scene= CTX_data_scene((bContext *)but->block->evil_C); int do_split= scene->unit.flag & USER_UNIT_OPT_SPLIT; - int unit_type= RNA_SUBTYPE_UNIT_VALUE(RNA_property_subtype(but->rnaprop)); + int unit_type= uiButGetUnitType(but); int precision= but->a2; if(scene->unit.scale_length<0.0001) scene->unit.scale_length= 1.0; // XXX do_versions @@ -1498,13 +1493,13 @@ static void ui_get_but_string_unit(uiBut *but, char *str, int len_max, double va if(precision>4) precision= 4; else if(precision==0) precision= 2; - bUnit_AsString(str, len_max, ui_get_but_scale_unit(but, value), precision, scene->unit.system, unit_type, do_split, pad); + bUnit_AsString(str, len_max, ui_get_but_scale_unit(but, value), precision, scene->unit.system, unit_type>>16, do_split, pad); } static float ui_get_but_step_unit(uiBut *but, float step_default) { Scene *scene= CTX_data_scene((bContext *)but->block->evil_C); - int unit_type= RNA_SUBTYPE_UNIT_VALUE(RNA_property_subtype(but->rnaprop)); + int unit_type= uiButGetUnitType(but)>>16; float step; step = bUnit_ClosestScalar(ui_get_but_scale_unit(but, step_default), scene->unit.system, unit_type); @@ -1655,19 +1650,14 @@ int ui_set_but_string(bContext *C, uiBut *but, const char *str) #ifdef WITH_PYTHON { char str_unit_convert[256]; - int unit_type; + int unit_type= uiButGetUnitType(but); Scene *scene= CTX_data_scene((bContext *)but->block->evil_C); - if(but->rnaprop) - unit_type= RNA_SUBTYPE_UNIT_VALUE(RNA_property_subtype(but->rnaprop)); - else - unit_type= 0; - BLI_strncpy(str_unit_convert, str, sizeof(str_unit_convert)); if(ui_is_but_unit(but)) { /* ugly, use the draw string to get the value, this could cause problems if it includes some text which resolves to a unit */ - bUnit_ReplaceString(str_unit_convert, sizeof(str_unit_convert), but->drawstr, ui_get_but_scale_unit(but, 1.0), scene->unit.system, unit_type); + bUnit_ReplaceString(str_unit_convert, sizeof(str_unit_convert), but->drawstr, ui_get_but_scale_unit(but, 1.0), scene->unit.system, unit_type>>16); } if(BPY_eval_button(C, str_unit_convert, &value)) { @@ -3183,6 +3173,21 @@ PointerRNA *uiButGetOperatorPtrRNA(uiBut *but) return but->opptr; } +void uiButSetUnitType(uiBut *but, const int unit_type) +{ + but->unit_type= (unsigned char)(unit_type>>16); +} + +int uiButGetUnitType(uiBut *but) +{ + if(but->rnaprop) { + return RNA_property_subtype(but->rnaprop); + } + else { + return ((int)but->unit_type)<<16; + } +} + void uiBlockSetHandleFunc(uiBlock *block, uiBlockHandleFunc func, void *arg) { block->handle_func= func; diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 66ea2ebc265..499d1d62c76 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -2210,7 +2210,7 @@ static float ui_numedit_apply_snapf(uiBut *but, float tempf, float softmin, floa if(ui_is_but_unit(but)) { Scene *scene= CTX_data_scene((bContext *)but->block->evil_C); - int unit_type = RNA_SUBTYPE_UNIT_VALUE(RNA_property_subtype(but->rnaprop)); + int unit_type= uiButGetUnitType(but)>>16; if(bUnit_IsValid(scene->unit.system, unit_type)) { fac= (float)bUnit_BaseScalar(scene->unit.system, unit_type); diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h index 0573026bf56..a7c03a6b95d 100644 --- a/source/blender/editors/interface/interface_intern.h +++ b/source/blender/editors/interface/interface_intern.h @@ -209,7 +209,8 @@ struct uiBut { BIFIconID icon; char lock; char dt; - short changed; /* could be made into a single flag */ + char changed; /* could be made into a single flag */ + unsigned char unit_type; /* so buttons can support unit systems which are not RNA */ short modifier_key; short iconadd; diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index df2ebd44c9c..2230042fb1f 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -384,7 +384,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) } if(but->rnaprop) { - int unit_type = RNA_SUBTYPE_UNIT(RNA_property_subtype(but->rnaprop)); + int unit_type= uiButGetUnitType(but); if (unit_type == PROP_UNIT_ROTATION) { if (RNA_property_type(but->rnaprop) == PROP_FLOAT) { diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index bb0ea9f0b63..eb6965932a2 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -291,12 +291,17 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float uiBlockBeginAlign(block); if(tot==1) { + uiBut *but; uiDefBut(block, LABEL, 0, "Vertex:", 0, 130, 200, 20, 0, 0, 0, 0, 0, ""); uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "X:", 0, 110, 200, 20, &(tfp->ve_median[0]), -lim, lim, 10, 3, ""); - uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Y:", 0, 90, 200, 20, &(tfp->ve_median[1]), -lim, lim, 10, 3, ""); - uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Z:", 0, 70, 200, 20, &(tfp->ve_median[2]), -lim, lim, 10, 3, ""); - + + but= uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "X:", 0, 110, 200, 20, &(tfp->ve_median[0]), -lim, lim, 10, 3, ""); + uiButSetUnitType(but, PROP_UNIT_LENGTH); + but= uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Y:", 0, 90, 200, 20, &(tfp->ve_median[1]), -lim, lim, 10, 3, ""); + uiButSetUnitType(but, PROP_UNIT_LENGTH); + but= uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Z:", 0, 70, 200, 20, &(tfp->ve_median[2]), -lim, lim, 10, 3, ""); + uiButSetUnitType(but, PROP_UNIT_LENGTH); + if(totw==1) { uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "W:", 0, 50, 200, 20, &(tfp->ve_median[3]), 0.01, 100.0, 10, 3, ""); uiBlockBeginAlign(block); @@ -803,6 +808,7 @@ static void v3d_posearmature_buts(uiLayout *layout, Object *ob) PointerRNA pchanptr; uiLayout *col; // uiLayout *row; +// uiBut *but; pchan= get_active_posechannel(ob); @@ -841,9 +847,13 @@ static void v3d_posearmature_buts(uiLayout *layout, Object *ob) uiDefBut(block, LABEL, 0, "Location:", 0, 240, 100, 20, 0, 0, 0, 0, 0, ""); uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_ARMATUREPANEL2, "X:", 0, 220, 120, 19, pchan->loc, -lim, lim, 100, 3, ""); - uiDefButF(block, NUM, B_ARMATUREPANEL2, "Y:", 0, 200, 120, 19, pchan->loc+1, -lim, lim, 100, 3, ""); - uiDefButF(block, NUM, B_ARMATUREPANEL2, "Z:", 0, 180, 120, 19, pchan->loc+2, -lim, lim, 100, 3, ""); + + but= uiDefButF(block, NUM, B_ARMATUREPANEL2, "X:", 0, 220, 120, 19, pchan->loc, -lim, lim, 100, 3, ""); + uiButSetUnitType(but, PROP_UNIT_LENGTH); + but= uiDefButF(block, NUM, B_ARMATUREPANEL2, "Y:", 0, 200, 120, 19, pchan->loc+1, -lim, lim, 100, 3, ""); + uiButSetUnitType(but, PROP_UNIT_LENGTH); + but= uiDefButF(block, NUM, B_ARMATUREPANEL2, "Z:", 0, 180, 120, 19, pchan->loc+2, -lim, lim, 100, 3, ""); + uiButSetUnitType(but, PROP_UNIT_LENGTH); uiBlockEndAlign(block); uiBlockBeginAlign(block); diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c index bd3bc7f2a3f..1e50e2997d1 100644 --- a/source/blender/imbuf/intern/util.c +++ b/source/blender/imbuf/intern/util.c @@ -126,6 +126,7 @@ const char *imb_ext_movie[] = { ".flv", ".divx", ".xvid", + ".mxf", NULL}; /* sort of wrong being here... */ From 736ef55e747a6b3ca56d988d346abcc2d43fbc42 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 10 Dec 2010 04:39:53 +0000 Subject: [PATCH 080/236] fix [#25155] Glare node > Simple star > Rotate 45 is always applied from acob F (raccoon) --- source/blender/makesrna/intern/rna_nodetree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 5cb88c35b85..012954d72ca 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -2020,7 +2020,7 @@ static void def_cmp_glare(StructRNA *srna) RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "use_rotate_45", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "angle", 1); + RNA_def_property_boolean_sdna(prop, NULL, "angle", 0); RNA_def_property_ui_text(prop, "Rotate 45", "Simple star filter: add 45 degree rotation offset"); RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); From ad3ce4abab817b61cc0ac29681368633ecba94d9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 10 Dec 2010 05:35:06 +0000 Subject: [PATCH 081/236] fix [#25116] X3D export does generate image texture information in x3d file - was exporting UVs only if an image texture was used too - was also only exporting vertex colors if UV's existed which doesnt make much sense. --- release/scripts/op/io_scene_x3d/export_x3d.py | 39 ++++++------------- 1 file changed, 11 insertions(+), 28 deletions(-) diff --git a/release/scripts/op/io_scene_x3d/export_x3d.py b/release/scripts/op/io_scene_x3d/export_x3d.py index 3159d0c9acd..f9a9bc4e5a5 100644 --- a/release/scripts/op/io_scene_x3d/export_x3d.py +++ b/release/scripts/op/io_scene_x3d/export_x3d.py @@ -65,8 +65,6 @@ class x3d_class: self.writingtexture = 0 self.writingcoords = 0 self.proto = 1 - self.matonly = 0 - self.share = 0 self.billnode = 0 self.halonode = 0 self.collnode = 0 @@ -205,14 +203,14 @@ class x3d_class: # rot = (((rot[0]-90)*DEG2RAD), rot[1]*DEG2RAD, rot[2]*DEG2RAD) nRot = self.rotatePointForVRML( rot ) # convert to Quaternion and to Angle Axis - Q = self.eulerToQuaternions(nRot[0], nRot[1], nRot[2]) + Q = self.eulerToQuaternions(*nRot) Q1 = self.multiplyQuaternions(Q[0], Q[1]) Qf = self.multiplyQuaternions(Q1, Q[2]) angleAxis = self.quaternionToAngleAxis(Qf) self.file.write("\n\n" % (lens)) @@ -351,7 +349,6 @@ class x3d_class: def writeIndexedFaceSet(self, ob, mesh, mtx, world, EXPORT_TRI = False): imageMap={} # set of used images sided={} # 'one':cnt , 'two':cnt - vColors={} # 'multi':1 meshName = self.cleanStr(ob.name) meshME = self.cleanStr(ob.data.name) # We dont care if its the mesh name or not @@ -381,9 +378,6 @@ class x3d_class: # elif mode & Mesh.FaceModes.BILLBOARD and self.billnode == 0: self.writeIndented("\n",1) self.billnode = 1 - elif 'OBJECT_COLOR' in mode and self.matonly == 0: - # elif mode & Mesh.FaceModes.OBCOL and self.matonly == 0: - self.matonly = 1 # TF_TILES is marked as deprecated in DNA_meshdata_types.h # elif mode & Mesh.FaceModes.TILES and self.tilenode == 0: # self.tilenode = 1 @@ -392,7 +386,7 @@ class x3d_class: self.writeIndented("\n",1) self.collnode = 1 - nIFSCnt=self.countIFSSetsNeeded(mesh, imageMap, sided, vColors) + nIFSCnt=self.countIFSSetsNeeded(mesh, imageMap, sided) if nIFSCnt > 1: self.writeIndented("\n" % ("G_", meshName),1) @@ -482,10 +476,9 @@ class x3d_class: #--- output textureCoordinates if UV texture used if mesh.uv_textures.active: - if self.matonly == 1 and self.share == 1: - self.writeFaceColors(mesh) - elif hasImageTexture == True: - self.writeTextureCoordinates(mesh) + self.writeTextureCoordinates(mesh) + if mesh.vertex_colors.active: + self.writeFaceColors(mesh) #--- output coordinates self.writeCoordinates(ob, mesh, meshName, EXPORT_TRI) @@ -496,14 +489,10 @@ class x3d_class: #--- output textureCoordinates if UV texture used if mesh.uv_textures.active: - # if mesh.faceUV: - if hasImageTexture == True: - self.writeTextureCoordinates(mesh) - elif self.matonly == 1 and self.share == 1: - self.writeFaceColors(mesh) + self.writeTextureCoordinates(mesh) + if mesh.vertex_colors.active: + self.writeFaceColors(mesh) #--- output vertexColors - self.matonly = 0 - self.share = 0 self.writingcoords = 0 self.writingtexture = 0 @@ -817,7 +806,6 @@ class x3d_class: # for ob, ob_mat in BPyObject.getDerivedObjects(ob_main): objType=ob.type objName=ob.name - self.matonly = 0 if objType == "CAMERA": # if objType == "Camera": self.writeViewpoint(ob, ob_mat, scene) @@ -899,7 +887,7 @@ class x3d_class: newName=newName.replace(bad,'_') return newName - def countIFSSetsNeeded(self, mesh, imageMap, sided, vColors): + def countIFSSetsNeeded(self, mesh, imageMap, sided): """ countIFFSetsNeeded() - should look at a blender mesh to determine how many VRML IndexFaceSets or IndexLineSets are needed. A @@ -1024,12 +1012,7 @@ class x3d_class: # swap Y and Z to handle axis difference between Blender and VRML #------------------------------------------------------------------------ def rotatePointForVRML(self, v): - x = v[0] - y = v[2] - z = -v[1] - - vrmlPoint=[x, y, z] - return vrmlPoint + return v[0], v[2], -v[1] # For writing well formed VRML code #------------------------------------------------------------------------ From b12ca6a4000db09c81c80d32c249f6ab352627b9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 10 Dec 2010 06:08:11 +0000 Subject: [PATCH 082/236] bugfix [#25135] X3D export places scene objects incorrectly in x3d file matrix rotation order issue. --- release/scripts/op/io_scene_x3d/export_x3d.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/release/scripts/op/io_scene_x3d/export_x3d.py b/release/scripts/op/io_scene_x3d/export_x3d.py index f9a9bc4e5a5..e0886e327e9 100644 --- a/release/scripts/op/io_scene_x3d/export_x3d.py +++ b/release/scripts/op/io_scene_x3d/export_x3d.py @@ -256,7 +256,7 @@ class x3d_class: # note dy seems to equal om[3][2] #location=(ob.matrix_world*MATWORLD).translation_part() # now passed - location=(mtx*MATWORLD).translation_part() + location=(MATWORLD * mtx).translation_part() radius = lamp.distance*math.cos(beamWidth) # radius = lamp.dist*math.cos(beamWidth) @@ -301,8 +301,7 @@ class x3d_class: ambi = 0 ambientIntensity = 0 - # location=(ob.matrix_world*MATWORLD).translation_part() # now passed - location= (mtx*MATWORLD).translation_part() + location= (MATWORLD * mtx).translation_part() self.file.write(" Date: Fri, 10 Dec 2010 08:29:46 +0000 Subject: [PATCH 083/236] Fix for [#25095] Particle systems and object with collision modifier bug * Collisions didn't take emitter object layer into account --- source/blender/blenkernel/intern/effect.c | 2 +- source/blender/blenkernel/intern/particle_system.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c index 24a95c58e36..51f2203b525 100644 --- a/source/blender/blenkernel/intern/effect.c +++ b/source/blender/blenkernel/intern/effect.c @@ -432,7 +432,7 @@ static float eff_calc_visibility(ListBase *colliders, EffectorCache *eff, Effect return visibility; if(!colls) - colls = get_collider_cache(eff->scene, NULL, NULL); + colls = get_collider_cache(eff->scene, eff->ob, NULL); if(!colls) return visibility; diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 931339d90b4..333ca91d4b9 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -3392,7 +3392,7 @@ static void dynamics_step(ParticleSimulationData *sim, float cfra) psys_update_effectors(sim); if(part->type != PART_HAIR) - sim->colliders = get_collider_cache(sim->scene, NULL, NULL); + sim->colliders = get_collider_cache(sim->scene, sim->ob, NULL); /* initialize physics type specific stuff */ switch(part->phystype) { From f610c9b8a223b53165b6772dc0b1f3f676f36370 Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Fri, 10 Dec 2010 10:34:12 +0000 Subject: [PATCH 084/236] Bug fix: child particles weren't always updated correctly * Calling update_children(..) is very light if there's nothing to update, so it doesn't matter if it's called every time the particle system is updated. --- source/blender/blenkernel/intern/particle_system.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 333ca91d4b9..60f54cfebf2 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -3555,8 +3555,12 @@ static void update_children(ParticleSimulationData *sim) if((sim->psys->part->type == PART_HAIR) && (sim->psys->flag & PSYS_HAIR_DONE)==0) /* don't generate children while growing hair - waste of time */ psys_free_children(sim->psys); - else if(sim->psys->part->childtype && sim->psys->totchild != get_psys_tot_child(sim->scene, sim->psys)) - distribute_particles(sim, PART_FROM_CHILD); + else if(sim->psys->part->childtype) { + if(sim->psys->totchild != get_psys_tot_child(sim->scene, sim->psys)) + distribute_particles(sim, PART_FROM_CHILD); + else + ; /* Children are up to date, nothing to do. */ + } else psys_free_children(sim->psys); } @@ -3876,8 +3880,7 @@ static void system_step(ParticleSimulationData *sim, float cfra) BKE_ptcache_write_cache(use_cache, framenr); } - if(init) - update_children(sim); + update_children(sim); /* cleanup */ if(psys->lattice){ From 5854cfa5b8b1af7c451b56482a0a2b54b6c679de Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 10 Dec 2010 13:15:11 +0000 Subject: [PATCH 085/236] fix for error in recent commit, wasn't masking out the non unit subtype flags. --- source/blender/editors/interface/interface.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 8d803ef130a..60928f03ea7 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -1261,8 +1261,9 @@ int ui_is_but_unit(uiBut *but) return 0; if (scene->unit.system == USER_UNIT_NONE) { - if (unit_type != PROP_UNIT_ROTATION) + if (unit_type != PROP_UNIT_ROTATION) { return 0; + } } return 1; @@ -3181,7 +3182,7 @@ void uiButSetUnitType(uiBut *but, const int unit_type) int uiButGetUnitType(uiBut *but) { if(but->rnaprop) { - return RNA_property_subtype(but->rnaprop); + return RNA_SUBTYPE_UNIT(RNA_property_subtype(but->rnaprop)); } else { return ((int)but->unit_type)<<16; From 9aace59708c6cf5471c661feb6207f1eca923a17 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Fri, 10 Dec 2010 13:31:59 +0000 Subject: [PATCH 086/236] IRC report fix: Text edit mode (3d): brought back the ALT+Backspace mode for typing accented characters. Works with an operator property, so the hotkey for it is free to define. Example: type 'a', alt+backspace and then 'o' works to combine characters with ' ` ~ o / and ^ --- source/blender/editors/curve/curve_ops.c | 1 + source/blender/editors/curve/editfont.c | 10 + source/blender/editors/datafiles/prvicons.c | 861 +++++++++----------- 3 files changed, 398 insertions(+), 474 deletions(-) diff --git a/source/blender/editors/curve/curve_ops.c b/source/blender/editors/curve/curve_ops.c index 9f67b9d6c06..b454202fc11 100644 --- a/source/blender/editors/curve/curve_ops.c +++ b/source/blender/editors/curve/curve_ops.c @@ -189,6 +189,7 @@ void ED_keymap_curve(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "FONT_OT_line_break", RETKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "FONT_OT_text_insert", KM_TEXTINPUT, KM_ANY, KM_ANY, 0); // last! + RNA_boolean_set(WM_keymap_add_item(keymap, "FONT_OT_text_insert", BACKSPACEKEY, KM_PRESS, KM_ALT, 0)->ptr, "accent", 1); // accented characters /* only set in editmode curve, by space_view3d listener */ keymap= WM_keymap_find(keyconf, "Curve", 0, 0); diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index ef49abd4dbd..0010332c8d9 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -1259,6 +1259,12 @@ static int insert_text_invoke(bContext *C, wmOperator *op, wmEvent *evt) if(RNA_property_is_set(op->ptr, "text")) return insert_text_exec(C, op); + + if(RNA_property_is_set(op->ptr, "accent")) { + if(cu->len!=0 && cu->pos>0) + accentcode= 1; + return OPERATOR_FINISHED; + } /* tab should exit editmode, but we allow it to be typed using modifier keys */ if(event==TABKEY) { @@ -1333,6 +1339,9 @@ static int insert_text_invoke(bContext *C, wmOperator *op, wmEvent *evt) RNA_string_set(op->ptr, "text", inserted_utf8); } + /* reset property? */ + accentcode= 0; + return OPERATOR_FINISHED; } @@ -1353,6 +1362,7 @@ void FONT_OT_text_insert(wmOperatorType *ot) /* properties */ RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position."); + RNA_def_boolean(ot->srna, "accent", 0, "Accent mode", "Next typed character will strike through previous, for special character input."); } diff --git a/source/blender/editors/datafiles/prvicons.c b/source/blender/editors/datafiles/prvicons.c index 5d6b63c1d80..4254fe5a08e 100644 --- a/source/blender/editors/datafiles/prvicons.c +++ b/source/blender/editors/datafiles/prvicons.c @@ -1,477 +1,390 @@ /* DataToC output of file */ -int datatoc_prvicons_size= 15052; +int datatoc_prvicons_size= 12311; char datatoc_prvicons[]= { -137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, - 73, 72, 68, 82, 0, 0, 0,192, 0, 0, 0,192, 8, 6, 0, 0, 0, 82,220,108, 7, 0, 0, 0, 4,115, 66, 73, 84, 8, 8, 8, - 8,124, 8,100,136, 0, 0, 0, 9,112, 72, 89,115, 0, 0, 13,215, 0, 0, 13,215, 1, 66, 40,155,120, 0, 0, 0, 25,116, 69, - 88,116, 83,111,102,116,119, 97,114,101, 0,119,119,119, 46,105,110,107,115, 99, 97,112,101, 46,111,114,103,155,238, 60, 26, 0, - 0, 32, 0, 73, 68, 65, 84,120,156,237,125,121,156, 20,197,221,254, 83,125,205,204,206,206, 30,236,194, 94,200,130,200,181, 34, - 32, 40, 1,228, 88, 48, 70, 64,209,168, 81,140, 33, 26, 77, 66, 98,242,198, 55,106,162,198, 11,242,198, 68, 5,209,188,106,140, - 49, 94, 16,125,127, 49, 30,241, 74,226,145, 40,162, 34,114, 9,114, 45,187,171, 92,123,176,176,247, 28, 59, 71,119,215,239,143, -217,158,237,233,233,158,233,185,150,197,237,103, 63,179, 51,221, 93, 93,245, 84,245,243,173,250,214,209,221,132, 82, 10, 11, 22, - 6, 43,152, 19, 77,192,130,133, 19, 9,203, 0, 44, 12,110, 80, 74, 35, 31, 0,203,149,143,178,109,240, 93,222, 27,110,154,230, -252,114,245,249,234, 56,213,219,218,223,122,233,234,241,136,119,142,206,113, 35,142,186,113,197,137,191, 60, 1,199,242,120,101, -160, 87, 38,154,253,137,226, 55,228, 19,111,127,162,242, 77,230,250,104, 63,218,178,141,163, 15,109,222,116,243, 26,175, 76, 12, -174,109,204,183, 94,124,102, 62, 81, 45, 0,165,244, 9,245,119, 28, 92, 72, 41,125,130, 82,186,205, 96,255, 19, 0, 64, 8, 89, -174,108, 19, 66,150, 43,129,212,191,141,210, 85,199, 99,246, 28,147, 28,117,161,141, 95, 21,247,133, 70,156,180,199, 53,233, 62, - 97,176, 29, 21, 78, 57, 95,155, 31,163, 50,209, 73,207,112,191,230,120, 76, 89,153,189, 62, 58, 72, 84,182, 23,234,149,157,118, - 59, 81,153,196, 3, 33,164, 28, 64,115,130,248, 18, 34,161, 11,100, 80, 24,111, 18, 66,150,247,146, 72, 26,218, 2, 55,147,174, -153,115,210,225,152, 10,167,222,237, 55,147,224, 20, 55, 62,147,225, 99,210, 75,151,135, 22,122, 6,161,124,122,119,197,148,173, - 65,217, 24,114, 52,202,123, 18,101,114, 33,165,244,141, 20,206,139, 66, 66, 3,208,179, 42, 74,105,147, 89, 75, 77, 38, 94, 19, -233,154,182,240, 84, 56, 38,203, 41,219,101, 96, 16, 62,233, 22, 32, 21,232,181,198,170,150, 36,166,108, 13,202,198,144,163, 81, -222,147, 40,147, 55, 9, 33, 75, 82, 56, 47, 10, 92, 42, 39,169,107, 2, 29, 82,203, 21, 66,234,154, 36, 89,130,169,158,151, 12, - 71,157, 99,122,113,196,212, 90, 9, 56,189,169, 9,167,221,206, 56,122,227, 87,220, 17,211,249, 75,245,250,152,141,223, 76, 28, -137,210, 53, 10, 71, 41,109, 34,132, 92,152, 40, 92, 66, 30,212,154, 7,176, 48,136, 97, 13,131, 90, 24,212,176, 12,192,194,160, -134,101, 0, 22, 6, 53, 44, 3, 72, 3,132,144,242, 84,135,223, 44, 12, 16,232,204,242, 37,154, 89, 77,102,182, 54,238, 57,113, -102, 0, 19,206,226,170,247,233,165, 29,143, 71,170,233, 26,229,217, 12, 95,163,176,122,113,170, 57,105,243,169,141, 83,111, 59, -206,185,134, 51,172, 38,174,101,170, 51,227, 70,231, 37,154, 65,143, 59, 99,159,169, 79, 50, 6,160,187, 95,239, 98,152, 61,199, - 40,141, 68,225, 18, 8, 44, 33,143,116,210,213, 11,147,204,121,102,202, 49,153,112,102,242,145,236,117,137, 87,134,102,211, 72, -182,172,147,201, 95, 38, 63,105,185, 64,169,204,214,154,156, 1,204,202, 76,179, 94,124, 25, 74, 55,153,243, 18,206,162, 26,193, - 76,184, 84,103,139, 51,113, 45,227,165, 77, 77,142,207,167,122,205, 83, 69, 90, 6,160,151,169, 68, 25, 53, 58, 78,163,103, 30, -179, 53,211,108, 52,139,154, 86,186,201,156,167, 23,214,172, 56,204,132, 51,226,145,136, 95, 38,174,101,188,180,147, 89,226, 96, - 50, 92, 70,160, 59, 19,108, 48,171, 22, 51,163,105, 98,246, 45,149,115,226,206, 52,166, 56,211,252,102, 18,181,167,110,186, 41, -158, 23, 51, 43,171, 23,214,160,140, 50, 58,139,171,153, 45, 54, 74,211,204,117, 73,106,102, 60, 78,126,227,149,149,118, 59, 42, -108,111, 43,113,161,217,138, 35, 30,172,153, 96, 11, 39, 29,146,113,169, 18,198,101, 25,128,133,193, 12,107, 30,192,194,160,134, -101, 0, 22, 6, 60, 8, 33, 89,115, 83,190, 18, 6, 96,205,200,126,181, 65, 41, 37,218,125,132,144,106, 66, 8, 85,125,170, 83, -141, 92,119,210, 2,250, 51,140,166,238,201, 84,109,155,189,183, 51,238,236,168,222,121, 6,124,210,186, 87, 89,143,115,162, 60, -105,227, 78,162,108,226,206,160, 38,251, 1, 80, 13,128, 2,168,238,221,166,170, 99, 84,249,214,134, 49,216,214,134,167,154,180, -180,219,134,105, 39,147,190,122,159,118, 91,179,175, 90, 47, 13,117, 60,166,203, 77, 79,252,102,127,107,191, 19, 29, 79,244,173, -151,150, 25,110,201,156,103, 54, 47,233,114, 55, 83,142,241,226, 73,250, 66,170, 68,166, 21,146,217,111,163,184,140,210, 50,155, -118, 42, 60,140,210,208,132,175, 86, 11,223,136,111,188, 79,202, 46, 80,178,247,128, 38, 64,202,179,163,137,226, 73, 6, 26,206, -111, 26,140,123,235,230, 41, 25,238,217,114,215,180,190, 50,165,148, 36,242,159,123,143,207, 87,111, 83,149,203, 97,214,255, 54, - 74,155,106,220, 23,189,244,212,219, 70,113,107,227,233,197,251,148, 82, 66, 41, 93,111,134,163, 30, 82, 54, 0,154,220, 61,160, - 17, 49,233,137,136,166, 49, 59,154, 40,158, 36,207,127,130, 82,218,164,196,165,254, 86,113, 50,138,219, 52,247, 84,242,102, 6, -122, 34, 49, 16,142,246,248,251,128,190,208,204, 26,131,217,180,213,233,233,109,107, 17, 71,252, 0, 48, 63, 45,255, 31, 58, 51, -193, 52,205,251, 68,245,206,161,225,251, 55,163,190,245,206, 69,242,247,223,234,114, 64,156, 89, 70,154,230,189,202, 58, 48, 53, -203,172,199,147,234,204,252,102,114,146,199, 32,237,184, 53,174, 34,114, 69,116,154,237,249,102,106,108, 19,233,255, 90,239,152, -186,197,210, 51, 60,213,190,249, 42,195, 80,243, 76,154,151, 53, 17,102,225,164, 68,111,173,175,110, 57,230,167,226, 10, 89, 6, - 96, 97, 80,227, 43, 49, 15, 96,193, 66,170,176, 12,192,194,160,134,101, 0, 22, 6, 53, 44, 3,176, 48,168, 97, 25,128,133, 1, -129, 61,211, 8,221, 51,141,208,221,103, 71,143,233, 43,251,247, 76,139,158,131,216,125, 54,169,214,134,215,134, 49,131,148,158, - 13,106,193, 66,166,113,250,182,240, 24,127,175,136,137,222, 49, 53,136,140,247, 79,223, 70,137, 18, 62, 21,241, 3, 86, 11, 96, -161,159,160, 8, 52,158, 80,247, 76, 35,148, 50,177,147, 89,122, 45, 3, 0,236,158, 70, 86, 42,191,245,140,196, 12,172, 22,192, -194,128,192,158,105,132,234,137, 56, 94,203, 48,113, 27, 93,185,103, 26, 89,145, 78,186, 86, 11, 96,161, 95, 64, 25,204, 87,215, -240,122, 45,129,218,215, 87,127,235,157,167,141, 47, 85, 88, 51,193, 22, 6, 53,172, 22,192,194,160,134,101, 0, 22, 6, 53, 44, - 3,176, 48,168, 97, 25,128,133, 65, 13,203, 0, 44, 12,106, 88, 6, 96, 97, 80,195, 50, 0, 11,131, 26,150, 1, 88, 24,212,176, - 12,192,194,160,134,101, 0, 22, 6, 53, 6,213, 98,184,233,211,167,151,202,178,252, 46,128,137,217, 74, 67, 16,132,150,141, 27, - 55,150,102, 35,238, 49, 99,198,216, 10, 11, 11,103, 72,146,228,202, 70,252, 0,192,243,124, 96,211,166, 77,239,102, 43,254,129, -134,164, 12,224,100, 22, 80, 47,247,247,215,172, 89, 35,204,155, 55, 15, 91,183,110, 69, 69, 69, 5,236,118, 59, 88,150, 5, 33, - 4, 12,211,215, 32, 18, 66, 98,126,171,247,233,237,247,249,124,248,250,215,191, 94,146,105,238, 64, 88,252, 5, 5, 5, 51,239, -187,239, 62,102,193,130, 5,216,190,125, 59, 42, 42, 42, 32, 8, 2, 56, 46,124, 25, 89,150, 53, 60, 63,222, 49, 0,224, 56, 14, - 62,159, 15,213,213,213,182,140, 18, 31,224, 48,109, 0,122, 2, 42, 47, 47,143, 8,136, 97, 24, 16, 66,116,133,163,254, 29,111, - 95,182, 4,164,112,127,224,129, 7,108,243,230,205, 27, 5, 0, 91,182,108,129,223,239, 71, 94, 94, 30,120,158,143,201,131,250, - 99,180, 95,123,236,203, 47,191,204, 52,117, 0,125,226,191,255,254,251,153, 5, 11, 22,228, 0,192,230,205,155, 49,121,242,100, -184, 92, 46,112, 28, 7,150,101,163, 68,174, 24, 5,208, 39,126,245, 62,245,126,229,251,192,129, 3, 89,225, 63,144, 97,202, 0, -244, 4,180,105,211, 38, 76,154, 52, 9,121,121,121,224, 56, 14, 28,199, 69,137,193,232,119,188, 99,217, 16,144,194,125,245,234, -213,182,234,234,234, 81,202,126,134, 97, 32,203,114,148, 17, 38, 35,124,163,227,153,134,158,248,129,176,104, 37, 73,130,122, 91, - 65, 42,226, 31,172, 72,104, 0, 70, 2,226, 56, 14,178, 44, 3,136, 21, 79, 42,226,207,134,128, 20,238,171, 86,173,178,207,159, - 63,127,100, 84,198, 57, 46,101,241, 27, 29,203, 52,140,196,175,240, 87,144, 9,241,107,195, 12, 22,196,205,117, 60, 1, 41,133, -151, 41,241, 43,219,153,130,154,251,130, 5, 11, 70,106,143, 43,126, 63,165, 52, 35,226,207,180, 17,196, 19,191,194, 95, 11, 75, -252,201,195,112, 24,212,140,128, 24,134,137, 18, 80,186,226,207,148,128, 18,113, 87,248,171,211, 76, 87,252, 12,195, 68,117,162, -211, 65, 34,241, 43,252,141,220,151, 84,197, 63, 24,221, 33, 93,211, 55, 35, 32,197,133, 80, 4,148, 9,241,103, 66, 64,106,151, - 77,219,106,169, 97,179,245, 13,118,100, 66,252,153, 50, 96, 51,226, 7,140,107,109, 75,252,201, 33,166, 20,205, 10, 72, 16, 4, - 0,136, 18,110,186,226, 79, 87, 64,234,206,186,186,191, 2, 0,129, 64, 0, 7, 15, 30,196,225,195,135,209,214,214, 6,135,195, -145,208,157, 49,227,242,104,143,167,131,120,226, 15, 4, 2, 56,112,224, 0, 14, 31, 62,140,142,142, 14,228,228,228,196,136,217, - 18,127,242,136, 42, 41, 51, 2, 58,116,232, 80, 68, 64,106, 55, 98, 32,248,255,178, 44,191,251,224,131, 15, 10,115,231,206, 29, - 37,203, 50, 26, 27, 27,177,119,239, 94,212,214,214,162,181,181, 21, 46,151, 11,133,133,133, 40, 44, 44,140, 12, 31, 42,174,203, -137, 22, 63, 0, 20, 22, 22,206,120,224,129, 7,152,185,115,231,230, 72,146,132,198,198, 70,212,212,212,160,174,174, 46,138,127, - 65, 65, 65,132,191, 90,248, 64,122,226, 31,140,134, 16, 85, 90, 70, 2,218,191,127, 63,142, 31, 63,174, 43,160, 76,250,255, 25, -112,129, 38, 86, 85, 85,225,177,199, 30, 67,109,109, 45, 56,142, 67, 73, 73, 9,138,138,138, 80, 94, 94, 14,158,231,193,243, 60, - 4, 65,128,221,110, 7,207,243, 81,121, 72,197,229,209,126,210,129, 36, 73,174,170,170, 42,252,225, 15,127, 64, 93, 93, 29, 88, -150, 69,105,105, 41,138,139,139, 49,105,210,164,136,216,109, 54, 27,108, 54, 91, 84, 63,128,101, 89, 75,252, 41, 64,235, 2, 77, -156, 48, 97, 2, 30,125,244,209,168, 11, 48,100,200, 16, 76,158, 60, 25, 28,199,129,231,121,216,108, 54,216,237,246,132,227,255, -253,237, 2, 1,128,219,237,134,211,233, 68,117,117, 53, 10, 10, 10, 0,244, 77,180, 41,105, 8,130, 16,201, 7,195, 48, 49,147, - 96,233,244, 5,210, 69,119,119, 55, 92, 46, 23,230,205,155,135,194,194, 66, 0,177,162,213, 26,129, 94,127,192, 18,191, 57,196, -148,156, 34,160,121,243,230, 33, 63, 63, 63,170,102, 83,220, 5,165, 22, 85,215, 66,122,174, 68, 42,134,145, 46,156, 78, 39,166, - 76,153, 2, 73,146,148, 55, 10, 70,226, 85,210, 82, 12, 89,201,139,194, 61,149,137,175, 76, 27,176,211,233,196,228,201,147,163, - 38,185, 20,168, 69,173, 22,191,214, 8, 82, 17,191, 82,153, 13, 54,196,228, 88,239, 2,104,107, 80, 69, 64, 44,203, 70, 4,148, -169,254, 64,218, 25,226, 56, 8,130, 16, 51,203, 11,244, 93,108, 69,236,138,225,198, 91, 6,145,108, 95, 32, 93, 40, 21,139, 40, -138, 9, 93,154, 76,138,127,176, 34, 38,231,106, 1,169, 71,119,212, 23,122,229,159,254,131,173,123, 26, 33,245,206, 4, 39,139, - 93,175,222,105, 40,172,116,161, 94, 23,163,204, 81,196, 91,162,145,168,230,239,239,142,176,222,186, 30, 61, 49,235,137,215, 18, -127,242,208, 53, 0,165, 86, 49, 18,208,189, 55, 44, 70,107,167, 15,247, 61,253, 30,182,239,107,140,156,251,238, 19,215, 35, 47, -215, 17, 21,182,189,203,135,250,195,199,241,228,203,159, 96,219,222,195, 0,226, 15,151,166, 11,181, 47,158,138,128,211, 57,150, - 41,104,125,114,189,213,158,153,232,240, 14,118,241, 3, 58, 51,193,132,144,136, 75,160,184, 58,138,127,168, 30,118, 43, 45,206, -195,143, 46,159, 21,117, 46,167,114,131, 20,129, 20, 23,230, 98,230,148, 83,241,212, 61,203, 48,103,218,105,225, 68,179, 56, 19, -156,140,128, 51, 41,254, 76, 27,129,130,254, 18,127,188,153,229,175, 50,116, 13,192,172,239, 62,178,124, 72,116,100, 44, 99,120, - 30,203, 48,184,254,202,185, 9,211,200, 4,210,173,217, 79,228, 40, 80, 60,119, 71,189, 79,217,159, 41,241, 15, 86,232,182,129, -137, 46,188,242,219,229,180, 71,157,199, 38, 24, 9,154, 50,254, 20,124,109,210,168,126, 17,191,153,124,100,234, 88,166,196,175, - 32,153,149,158,201,134,177,196, 31,141, 24, 3,208, 19,144,217, 81, 27, 51, 35, 65,107,239,253, 94,214,196,175,206,131,154,191, - 89, 1, 15, 4,241,171, 97,137, 63,251, 48,108, 1,128,248,190,186,222,133,103,152,248,226,207,102,205,175,199, 63,219,226,207, - 84,199, 93, 11,163, 78,176,246,152, 37,254,244, 97,216, 7, 72,228,255,235, 93,124,197, 5, 82,135,189,121,213,203,253, 46,254, -100, 4, 60,208,196,175,133, 37,254,236, 66,183, 5, 72,217, 5,226,162, 93,160, 64, 72,194,134,173,117,134, 98,202, 22,140, 90, -176, 76,186, 60,150,248,191, 26,208,237, 3,168, 93,136, 68,174,140, 26,108,239,113, 81,146,113,172,205,141, 63,189,248, 17,122, - 2,161,126, 23,127,188, 78,240,201, 32,254,120,162,181,196,159, 89,152,238, 3,152,153,184,154,116,201,111,117, 19,233, 47,241, -107,249,103, 82,252,153,156,171,136, 7,173, 72, 45,241,103, 23,134, 45, 64, 60, 97, 24,137, 97,247,107,119,129, 97, 24,136,146, -140,150,214,110, 60,254,183, 15,241,242, 59,219, 7,132,248, 51,213, 17,238, 79, 88,226,207, 62,116,199,239,146, 89,200,166,119, -158,192,115,168,172, 40,198,138,159, 46,129,195,198,247,187,120,146, 21,183, 37,254,193, 11,221, 22, 64,249, 78, 36,126,173, 40, -180,199,114,236, 2,230,127,109,124,191,139, 39,211, 46,143, 37,254,175, 46, 12,251, 0,102,196,175,103, 0,218,243, 30,189,235, -170,126,201,136,154, 67, 38, 93,158,254, 22,191, 26,102,132,109,137, 63, 61, 36,116,129,226,137, 95, 43,142,254, 28,237,137, 7, - 75,252,150,248,205, 34, 97, 39, 56,153, 97,208,129, 32,254, 84,133,111,137,127,112, 34,238, 98,184,100,135, 65, 7,130,120,180, - 60, 82,237, 11,156,104, 88,226,239, 31,152, 90, 10, 97, 36,126,143, 47, 16,117,174,199, 23, 24, 16,226, 57,153,197,175,119,111, -174,122,201,179, 37,254,204, 34,169, 97, 80,237,144,225,129,198,182,168,243,234, 15, 31,239, 23,210,241,112, 50,139, 95, 15,137, -214,251,107,143, 89, 72, 14,166,111,136,209,138,165,177,165, 19, 15, 62, 27,253, 34,145,251,159,252, 23,234, 15, 31,235, 55,242, - 70,208, 51, 86, 75,252, 22,244, 96,106, 24, 84, 43,150,111,255,226, 73,124,182,239, 72,204,121, 91,118, 29,196, 55,190,255, 16, -198,159, 90,138,191,220,255,125, 20, 21,228,102, 61, 3,122, 72,101,236,127,160,193, 18,127,255,192,112, 53,104, 60,255,255,111, - 15,253, 40,242,123,160, 33,149, 81,160,129,134,100,110,115,180,144, 30,210,186, 39,120,160,226,100, 22,191, 2, 75,252,253, 3, - 93, 21, 91,226, 63,177,176,196,223,127, 48,188, 39,248,100, 20,191, 2, 51, 35, 64, 39, 3, 44,241,103, 31, 9,159, 10,113,178, -137, 63, 24, 12,162,190,190, 62,102,189, 82,127,136,159,231,249,180,227, 16, 69, 17,117,117,117, 0,250,223, 0, 6,163,145,197, - 24, 64, 40, 20, 66,125,125,125,148,224,251, 75,252,233, 10,200,102,179,181,204,153, 51, 39, 43,239,233, 77,134, 67,170,231, 58, - 28,142,192,172, 89,179, 78,232,123,122, 29, 14, 71, 32,113,168,175, 14,136,242, 4,101, 0, 56,231,156,115,142, 6, 2,129, 19, - 46,160,143, 63,254, 56, 43,111, 90,183, 96, 65,139, 40, 3,176, 96, 97,176, 97,224, 59,245, 22, 44,100, 17,150, 1, 88, 24,212, -176, 12,192,194,160,134,101, 0, 22, 6, 53, 44, 3,176, 48,168,145,212, 43, 66,122,223, 35,252, 46,128,137, 89,226, 3, 65, 16, - 90, 54,110,220,152,149, 97, 80,139,127, 98, 12, 54,254,166, 13, 64,121,137,246,154, 53,107,132,121,243,230, 97,219,182,109,168, -168,168,128,205,102,139,122,215, 46,128,152,111, 51,191, 9, 33,232,233,233,193,130, 5, 11,178, 50, 15,161,240,239,125, 15,242, - 73,203, 95, 41,255,173, 91,183,162,188,188, 60,242,182, 72,189, 39,117,104,103,189, 19,229,203,237,118, 99,209,162, 69,131,170, -252, 77, 25,128,250, 13,242,243,230,205, 27, 5, 0, 91,182,108, 65, 32, 16, 64, 94, 94, 94,212,139,221,146, 93,138,172, 62,246, -197, 23, 95, 36,195,221, 52,212,252,231,206,157,123, 82,243, 87,202,255,147, 79, 62,193,196,137, 19, 77,243, 55,147,143, 3, 7, - 14,100,157,255, 64, 43,255,132, 6,160, 38, 95, 93, 93, 61, 74,217,207,178, 44,100,213, 91, 34, 83,185, 9,165, 63,238,202, 74, -196, 95,153, 8, 28,232,252, 87,175, 94,109, 88,254,137, 4, 98, 70, 68, 39,170,252, 21,156,168,242,143,107, 0,170,194,183, 87, - 87, 87,143, 84, 31, 83, 22, 78, 81, 74, 51, 70, 62,211, 23,192, 12,127, 32,115,133,159, 45,254,171, 86,173,178,207,159, 63, 63, -134,191,146, 94, 38,132,159,141,167, 94,159, 12,250, 49, 28, 5, 82,147,215, 22,190,146,129, 84, 11,190, 63,150, 41,127, 85,248, -175, 90,181,202,190, 96,193,130, 24,254,106,193,102, 74,252,131,177,252,117, 91,128, 68,228,149, 12, 24, 93,132,116,158,199,153, - 9,124, 85,248, 27,137, 31, 8, 47,149, 78,100, 4,169,184, 69,153,228, 31,175,252, 95,127,253,117, 20, 22, 22, 70, 58,193,122, -121, 81,126,107,191,149,223, 12,195,224,214, 91,111, 77,171,252, 99, 12, 64,227,179,233,146, 7, 0, 65, 16, 98,246,165, 42,158, - 76, 54,191, 95, 21,254,171, 87,175,182, 25,137, 7, 0,108,182,190, 85,211,201, 26,113,188,227,153,226,159,168,252,151, 46, 93, -138, 83, 78, 57, 5,121,121,121, 16, 4, 1, 60,207,199,140,102,245, 71,249, 71, 25,128, 81,135, 5, 0, 2,129, 0, 14, 30, 60, -136,195,135, 15,163,189,189, 29, 57, 57, 57,113,239, 28, 75,150,124, 38, 46, 64, 42,252, 91, 90, 90, 34, 15,163,170,172,172, 76, -200,191,190,190, 30, 64,216,119,157, 48, 97, 66,191,241,247,251,253, 56,120,240, 32, 14, 30, 60,136,214,214, 86, 56, 28,142,148, - 90,169, 68,199,179,197,223,227,241, 96,199,142, 29,216,190,125, 59,246,236,217, 3,183,219, 13,167,211, 9, 65, 16, 34,163, 64, -102,107,126,117, 11,240,171, 95,253, 42, 45,254, 81, 6, 32,203,242,187,189,227,180,163,100, 89, 70, 99, 99, 35,246,237,219,135, -253,251,247,163,173,173, 13, 46,151, 11, 67,134, 12, 65, 97, 97, 33, 92, 46, 87,100,252, 54,149,103,240, 24,237, 79, 7,169,240, -223,182,109, 27, 46,187,236, 50,188,241,198, 27, 16, 4, 33,174,112, 8, 33,216,184,113, 35,174,189,246, 90, 60,243,204, 51, 56, -253,244,211, 51,206,191,119,156,127,148, 44,203,104,104,104,192,222,189,123,177,127,255,126, 28, 59,118,204,176,252, 7,130,248, -147, 41,255, 69,139, 22,161,160,160, 0, 46,151, 11, 57, 57, 57,176,217,108,145, 22,160,191,245,163,117,129, 38, 86, 85, 85,225, -177,199, 30, 67, 93, 93, 29, 88,150, 69, 73, 73, 9,138,139,139, 81, 81, 81, 1, 65, 16,192,178, 44,108, 54, 27,236,118,123,164, -230, 76,165,179,146,165, 38, 56,105,254,219,183,111,199,103,159,125, 6, 66, 8, 74, 74, 74,162,120,168,239,136, 83,190, 63,249, -228, 19,108,220,184, 17, 0,240,195, 31,254, 48, 43,252, 31,125,244, 81,212,214,214,130,101, 89, 12, 27, 54, 12, 69, 69, 69,152, - 52,105, 18,120,158, 7,199,113, 17,254,202,118, 38,196,159,237,242,255,248,227,143, 35, 2,231, 56, 14, 60,207, 71, 68,175,180, - 0, 64,252, 26, 95,123,140, 16,130,219,111,191, 61,163, 6, 0,143,199, 3,151,203,133,234,234,106, 20, 20, 20,196, 36,200, 48, - 76,132,188, 50, 11,169,231,187,165,218, 34,164,139,100,249,111,221,186, 53, 50, 23,176,105,211, 38, 0, 97,247, 70,249,104,183, -213,251,178,193,223,237,118,195,225,112, 96,206,156, 57,200,207,207,143, 49, 72,165,188, 5, 65,136, 24,180,153, 73, 48, 51,198, -145,205,242,255,233, 79,127, 26, 83,254,118,187,221,208,255,239, 47,253,196, 24, 64, 78, 78, 14, 38, 79,158, 12, 73,146, 34, 23, - 89,129,146,176, 98,193, 44,203,130,231,249, 24, 23,232, 68,118, 36,147,229, 95, 95, 95,143,134,134, 6, 12, 31, 62,220,116, 26, - 30,143, 7,185,185,185, 89,227, 63,105,210,164,168, 73, 58,109,139,148,168,252, 83, 17,127,134, 90, 0,195,242,127,226,137, 39, -162,106,112,181, 49,107,107,251, 68, 53,191,250,247, 29,119,220,145, 86,249,199, 24,128, 98,157,138,107,163, 71, 64,177, 86,245, -183,182, 48, 37, 89, 66,243,177, 6, 52, 30, 61,130,150,214,163,104,235,108, 69, 87,119, 7,124, 61, 94,252,230, 23,107,178, 34, -158, 84,248, 3,136,136,127,229,202,149, 96, 24, 6,179,102,205, 66, 85, 85, 21,138,138,138,208,214,214,134,189,123,247, 98,227, -198,141,144,101, 25, 43, 87,174, 68,110,110,110, 84,124,153,228,207,113, 28, 4, 65,128, 44,203, 81,252,245,202, 75,237,126,206, -152, 49, 3, 71,143, 30, 5, 0,148,150,150, 98,203,150, 45, 9, 13, 67,207, 56,210,133, 81,249,255,252,231, 63, 79, 74, 63,253, - 85,121,198, 24,128,226,147, 17, 66,116,155,121, 45, 89,183,183, 27,141, 71, 15,163,165,181, 25,173,157,199,209,217,213, 1,143, -183, 27, 61, 1, 31,186, 61,221,232,118,119,161,203,221,137,110, 79, 23,186,221, 93,232,118,119,226,158, 95, 62,152,181, 11,144, - 44,127, 53, 24,134,193,213, 87, 95,141,202,202,202,200,190,178,178, 50,148,149,149,225,180,211, 78,195,186,117,235,162,194,103, -131,191,250,241,232, 70,110,150,242,173,124, 58, 59, 59, 81, 89, 89,137,125,251,246, 1, 0, 22, 45, 90,132,238,238,110, 20, 21, - 21,245,171,248, 1,227,242,127,228,145, 71,162,202,220,168,118,191,229,150, 91,146,106,193,210,205, 67,140, 1,168,107, 70, 51, - 68, 30,122,234,183, 81, 2,239,114,119,162,219,221, 5,143,207, 13, 89,150,225,114,230,225,212,202, 49,152, 50, 97, 26, 70,143, - 28,139, 85,127,252,117,220,248,210, 69,178,252, 1,160,165,165, 5, 37, 37, 37,152, 53,107, 86,148,248,149,139, 8, 0,149,149, -149,152, 53,107, 22, 0,160,167,167, 7, 14,135, 35, 43,252,181, 34, 81,127,100, 89,198, 77, 55,221,132,166,166, 38,252,230, 55, -191,193,196,137, 19, 65, 8, 65,103,103, 39,102,206,156,137, 35, 71,142, 68, 90,131,206,206, 78, 20, 23, 23,131, 16,130,221,187, -119,227,150, 91,110,193,136, 17, 35,240,248,227,143, 71,220, 38, 61, 65,165, 11,163,242,191,233,166,155, 50, 54, 82,152, 73,253, -196,125, 81,182, 25, 34,127,123,243, 57, 48, 12,131,138,146, 83,112,106,229, 24, 76,159,114, 14, 70,143, 24,131,209, 35,199, 98, -204,200,113, 24, 86, 92, 26, 21, 94, 49,128,108, 93,128,100,249, 3, 64, 73, 73,120, 5,109, 85, 85, 85, 76, 28,106, 40,199, 29, - 14, 71, 76,252,153, 52, 0, 61,254,132, 16,220,124,243,205,152, 54,109, 26,254,231,127,254, 7,191,250,213,175, 80, 90, 90,138, -101,203,150,225,175,127,253, 43,102,204,152, 1,143,199, 3,134, 97, 80, 85, 85,133,103,159,125, 22,203,150, 45,195,115,207, 61, - 7, 73,146,176,110,221, 58,188,242,202, 43,184,254,250,235,241,244,211, 79, 27,138, 42, 19, 32, 36,188, 50, 51, 47, 47, 15,165, -165,225,165,249,253, 33,254,140, 24,128,222, 5, 72,212,235,222,245, 78, 3,108,130,205, 52,193,108,139, 63, 89,254, 10,138,138, -138, 34,191,181, 29,104,237,113,117,252,153,228,175,196,171, 23,127,115,115, 51, 46,190,248, 98,200,178,140, 39,159,124, 18,235, -215,175,199,221,119,223,141,229,203,151,227,130, 11, 46,136, 12,231, 94,124,241,197,200,203,203,195,186,117,235,112,253,245,215, -163,184,184, 24, 94,175, 23, 23, 93,116, 17, 94,127,253,117, 67, 81,101,210,128,135, 14, 29,138,138,138, 10, 4,131, 65,200,178, -156, 49,129,103,186,242, 76,216, 2,152,233,120,152, 21,191, 81,211,158, 73,241,164,194,191,173,173, 45,210,225, 45, 43, 43, 51, -140,183,173, 45,252, 70,156, 80, 40, 4,158,231,179,194, 95,207,128, 21,190,247,220,115, 15,110,187,237, 54, 60,245,212, 83,248, -248,227,143, 49,121,242,100,188,246,218,107,104,106,106,194,230,205,155,225,247,251, 97,183,219,177,111,223, 62,156,126,250,233, -152, 62,125, 58, 90, 90, 90, 80, 83, 83,131,113,227,198,225,206, 59,239,196,154, 53,107,116,203, 67,175, 66, 72, 39, 15,133,133, -133, 81,226,255,253,239,127, 31, 85,169,104,243,169,253, 54,179,143, 97, 24,220,125,247,221,105,149,127, 92, 3, 48,211, 52,169, -201,153, 21, 92, 54,197,159, 10,127,165,102,223,187,119,111,196, 0,212, 92,149,126,192,222,189,123, 1,244, 61,194, 49,219,252, -181,124,171,170,170, 48,124,248,112,188,247,222,123, 56,243,204, 51,177,107,215, 46,236,221,187, 23, 53, 53, 53,120,251,237,183, - 81, 95, 95, 15,150,101, 49,109,218, 52,124,247,187,223,197,184,113,227,224,245,122, 49,100,200, 16, 28, 57,114, 4, 46,151, 11, - 83,166, 76, 73,120,125, 50,197, 95, 93,243,223,116,211, 77,105,213,238,217,154,193, 54,124, 58,180,242, 59, 17, 17,117,184, 84, - 12, 38,211, 72,133,191,130,141, 27, 55,226,180,211, 78, 67,101,101, 37,180, 79,204, 59,116,232, 80,100, 6, 88,157, 86, 54, 16, -207,128,175,188,242, 74,172, 92,185, 18,175,190,250, 42,246,238,221,139, 87, 95,125, 21, 27, 54,108,192, 93,119,221,133, 25, 51, -102, 0, 0, 54,111,222,140, 95,252,226, 23,184,241,198, 27,113,209, 69, 23,129,231,121,220,113,199, 29,184,225,134, 27,250, 69, -252,122,229,255,208, 67, 15, 69,141, 10,169,243,153,108,205,175,109, 1,210,129,169, 62, 64, 60,129, 43, 68,204, 90,180, 54,141, - 76, 35, 21,254,202,133,145,101, 25,235,214,173,139, 59, 15,160, 14,159, 77,254,234, 15,165, 20, 93, 93, 93,232,232,232,192,243, -207, 63,143,229,203,151,163,185,185, 25, 53, 53, 53,216,176, 97, 3, 54,108,216, 16, 53,107, 92, 89, 89,137,133, 11, 23, 98,246, -236,217,152, 59,119, 46, 74, 74, 74,112,222,121,231, 97,221,186,117, 88,190,124, 57,138,139,139, 81, 88, 88,168, 59, 79,144, 41, -254,218,188,220,124,243,205, 25,237,236,102,170,252,211, 30, 5,210,134, 51, 35,184,108,137, 39, 29,254, 64,120, 34, 44,153,248, -179, 5,109, 13, 58,115,230, 76,140, 28, 57, 18, 51,102,204,192,236,217,179,177,120,241, 98,108,217,178, 5,239,190,251, 46,238, -186,235,174, 40,241, 43,159,130,130, 2,172, 88,177, 2,207, 63,255, 60,238,188,243, 78, 44, 88,176, 0,205,205,205,120,232,161, -135,240,217,103,159,161,173,173, 13, 7, 14, 28,200,138,168,244,202,255,193, 7, 31, 52, 60,174,221,103,230,152,242,157,241, 22, - 64,143, 68, 42,157,218,108,142,244, 36, 66,178,252, 7, 18,244, 42,150,163, 71,143,162,166,166, 6, 13, 13, 13,240,120, 60,216, -185,115,103,228, 61, 2, 51,102,204, 48, 44,251, 89,179,102,225,209, 71, 31,197,170, 85,171,208,216,216,136,203, 46,187, 12,130, - 32,192,233,116, 98,216,176, 97, 89,187, 62,122,229,255,203, 95,254,114, 64,213,252, 10,226,186, 64,102, 8,170,207,233,111,242, -122, 72,133,191, 50,177,101,118, 41, 68, 54, 93, 32, 37, 15,218,188, 40,219,138,219, 98,183,219,117, 39,156,180,253, 45,189, 69, -114,218,178,202,180,248,245,202,255,129, 7, 30,208, 13,147, 74,205,175,142, 39, 43, 45,128,150,124, 60,129,171, 73, 39, 90,119, -210,159, 72,134,191, 50,177,101,118, 41, 68,182,197,175, 45,215,210,210, 82, 44, 92,184, 16, 51,103,206, 68, 85, 85, 21, 46,190, -248, 98,212,215,215, 99,250,244,233,216,188,121,115,228, 70, 30,109,158, 55,109,218,132, 37, 75,150,160,167,167, 7,185,185,185, -120,246,217,103, 81, 91, 91,139, 93,187,118,161,162,162, 34,171,215, 70,203, 69,189,196, 33,149,190, 64,182,202, 60,225,107, 82, - 19,145, 4,140,199,219,119,239,223,129,215,223,121, 9, 71, 91,143,162,161,233, 16, 10,242, 11,179,146,137,116,249, 43, 80, 47, -133, 80,142,233, 45,133,200, 54,180, 6,176,117,235, 86,116,119,119,163,163,163, 3,107,215,174,133,205,102,195,172, 89,179,112, -245,213, 87,227,191,255,251,191,177,112,225, 66, 20, 20, 20, 68,229,203,237,118, 99,229,202,149,248,244,211, 79, 17, 12, 6,241, -218,107,175,161,179,179, 19, 43, 86,172, 64, 81, 81, 17,134, 12, 25,146, 85,241,239,222,189, 27, 46,151, 11,163, 71,143, 6, 0, -172, 94,189, 58, 38,111,122,121,141, 23, 70,175,156,178, 54, 10,100,214, 66,149, 12,171,247, 73,178,132,255,251,251, 51,232,246, -116,193,233,116,193,223,112, 0, 71,154, 14, 97,243,206, 79,178,222, 18,164,194, 95,153, 64, 82, 47,133, 80, 47, 69, 86,126, 43, -199,179,237, 2,169,243,161,112, 30, 50,100, 8,138,138,138,240,157,239,124, 7,183,221,118, 27, 46,188,240, 66,140, 27, 55, 14, -183,220,114, 11,102,207,158,141, 21, 43, 86, 68, 12,116,211,166, 77, 88,185,114, 37,254,252,231, 63, 35, 55, 55, 23, 62,159, 15, -207, 62,251, 44,214,174, 93,139,177, 99,199,102,181, 86, 85,226, 45, 46, 46, 70,121,121, 57, 24,134, 1,165, 20,183,222,122,235, -128,170,249, 21, 36,124, 73,158,154,224,222,186,207,241,214,250,215,209,210,214,130,134,166, 67,200,207,139,189,225,132, 16,130, -255,125,234,126, 52, 30, 61,130,242,146, 10,116,117,119,162,179,187, 3,129, 96, 0, 84,150, 49,180, 40,251,111, 96, 74,166,128, - 1,192,110,183, 3,208, 95,234,160,158, 15, 80,142,103,243,162, 36,226,189,110,221, 58,252,236,103, 63, 67, 71, 71, 7,218,219, -219,177,100,201, 18,204,153, 51, 7,207, 63,255, 60,254,240,135, 63,128,101, 89, 44, 89,178, 4,159,126,250, 41,114,115,115,209, -208,208, 0,167,211,137,101,203,150,225,201, 39,159,196,195, 15, 63,156,117, 97, 17, 66, 48,124,248,240,136,248, 25,134,193,170, - 85,171, 98,102,130,213,249,213,238, 83,127,199, 75, 39,235, 45, 0,195, 48,144,100, 9, 47,255,243,255,224,243,123,145,151, 87, -128, 35,205,135,209,120,244, 8,182,238,250, 84, 87, 84,127,127,235, 5,216, 4, 27, 14, 28,174,135,215,231,193,241,246, 99,232, -114,119, 66,148, 68, 44, 93,242,221,180, 8, 39, 66, 50,226,215,142, 2,169,151, 66,104,197,175, 28,239, 15, 24,241,222,189,123, - 55, 26, 26, 26,112,238,185,231, 98,255,254,253, 24, 62,124, 56,242,242,242,224,112, 56,112,251,237,183,227,222,123,239, 5, 33, -225,103,100, 6, 2, 1,244,244,244,192,233,116,162,167,167, 7, 87, 92,113, 5, 46,189,244, 82,236,216,177, 3, 83,167, 78,205, - 42,119, 69,184,234,135, 94,221,118,219,109,166,175, 77,127,142,206,197,109, 1, 20,130,143, 63,247,123,180,180, 54, 27,214,232, - 90,242, 46,103, 30,246,214,237, 2,207,241, 16, 37, 17,161, 80, 16, 0,240,203, 31,223,141,155,127,116, 71,214, 51,101, 86,252, -202,133, 82,214,246,168,151, 66, 40,241, 0,136, 89, 10,145,237,137, 48, 35,222,183,222,122, 43,158,126,250,105,184,221,110,140, - 25, 51, 6,111,189,245, 22, 30,123,236, 49, 92,119,221,117, 88,188,120, 49, 26, 27, 27,193, 48, 12, 28, 14, 7, 94,127,253,117, - 60,243,204, 51, 88,182,108, 25,174,184,226, 10,240, 60,143, 21, 43, 86,224,134, 27,110,192, 71, 31,125,148, 21,238,234, 60,104, -243,113,255,253,247,155, 90, 11,148, 76,185,102,165, 5, 80, 34, 86,147,127,253,221,151, 96,183,217,117,107,244,203, 47,248, 78, -140,229,254,233,254,231,176, 98,205, 47,209,208,116, 24, 78,103, 46, 10,243,135,224,198, 31,252, 10,103, 78, 60, 59, 45,178,102, - 97, 86,252, 74, 97, 43,107,123,204, 46,133,200,182, 95,106,196,123,196,136, 17,120,245,213, 87,177,120,241, 98,252,232, 71, 63, -194,232,209,163,241,200, 35,143, 96,221,186,117,104,107,107,195,210,165, 75, 65, 8,193, 51,207, 60,131,174,174, 46,172, 93,187, - 22, 79, 62,249, 36, 46,185,228, 18,172, 92,185, 18,239,188,243, 78,212, 8, 87, 54,249,107,203, 95,253,248,146,129, 80,243, 43, - 48,245,166,248,220, 28, 23,106,190,216, 19, 83,163,223,188,252, 78,220,180,252,246, 24,242,163, 78, 25,141,117,191,127,165,255, -114,145,128,127,188,130, 87,195,236, 82,136,108,243, 55,250, 60,254,248,227,184,254,250,235,241,198, 27,111, 96,205,154, 53,145, -133,109,203,151, 47,199,154, 53,107, 34,143,117,169,171,171,195,138, 21, 43, 48,118,236, 88, 60,252,240,195,216,177, 99, 7,110, -184,225, 6, 84, 86, 86, 98,237,218,181, 89,231,175, 87,206,247,221,119, 95, 84, 24,237,119, 42,149, 74, 86, 91, 0,245,231,225, -255,121, 10,191,125,228, 14, 52, 29,109,128,211,153,139,130,188, 66,252,252,251,183,225,204,137,103,159, 48,203,141, 7,179,226, - 87,187, 56,132, 16,211, 75, 33,250, 99, 34, 76,143, 63,203,178,120,234,169,167, 98,142, 21, 23, 23, 99,199,142, 29,200,201,201, - 1, 0,236,218,181, 43,234,118,200,169, 83,167,102,221,237, 73,196, 95,185,121,125,160,212,252, 10, 76, 13,131,158, 58,226, 52, - 60,253,192,223, 6, 28,121, 61, 36, 35,126,109, 77,148, 76, 26,217, 68, 50,252, 9, 9, 15,145,182,183,183, 99,232,208,161, 0, -128,138,138,138,172,142,243, 39,195, 93,225,255,187,223,253, 46, 42,140, 58,108, 50, 88,177, 98, 69, 70,249, 38,108, 1,146, 25, - 69, 25, 40, 72,149,191,217,165, 16, 3,129,187, 54,140,222,194,182,254, 22,127,188, 60,220,121,231,157, 3, 82, 63,166, 70,129, -140, 10,125,160, 34, 89,254,138, 75, 99,118, 41, 68,127,184, 64,201,136, 63, 94,235,118, 34,112, 50,233, 39,198, 4, 79, 38,242, -122, 72,133,191,178,173, 93, 10,161, 14,167, 94, 10,145,237,252, 91,226, 55,135, 95,255,250,215, 16, 69, 49,173, 56,146, 90, 11, - 52,208,197,175, 32, 85,254,102,151, 66,100, 19,233, 10,127, 32, 92,159,254,210, 79, 38,250, 3,134, 45,192,201, 42,254, 84,248, - 43, 2, 55,187, 20, 66, 59, 71,144,105,156,204,226, 63,217,244, 19,211, 2,132, 66, 33,212,215,215, 71, 21,104,127,145, 87, 38, -164,210, 65, 42,252,149, 99,218,167, 66, 40,190,190, 34,120,101, 41,132, 18,190,182,182, 54,227,252,125, 62, 31,190,248,226,139, - 24, 81,199,187,187, 46, 83,226, 63, 81,229,159, 41,164,194,159,168,107,179,115,206, 57,231,104, 32, 16,200,254,106,181, 56,176, -217,108, 45, 31,127,252,113, 74, 47,106, 62,217,249,207,154, 53,235,104, 48, 24, 60,105,249,159,140,229, 79,178,221,156, 91,176, - 48,144,113,226, 7, 98, 45, 88, 56,129,176, 12,192,194,160,134,101, 0, 22, 6, 53, 44, 3,176, 48,168, 97, 25,128,133, 65, 13, -195,199,162, 88,176,144,105,244,190, 71,248, 93, 0, 19,179,149,134, 32, 8, 45, 27, 55,110, 52, 61, 12,106, 25,128,133,126,129, -242, 18,237,222,247, 32, 99,235,214,173,168,168,168,136, 60,224, 75,153, 45, 86,160,158, 56, 83, 79,250,169,161,221,239,243,249, -240,245,175,127, 61,169,121, 8,203, 0, 44,100, 29,234, 55,200,207,155, 55,111, 20, 0,108,217,178, 5,126,191, 31,121,121,121, -186,175, 73, 53,187, 4, 68,125,236,203, 47,191, 76,154, 27,231,116, 58, 86, 6, 2,193, 59, 36, 73, 54,101, 12,132,144, 32,165, -116, 37,165,244,222,164, 83,203, 2, 28, 14, 71,117, 48, 24,156, 35,203,178,217,254,140, 4, 96, 61,165,180,255,110,145,138,131, -147,157,127, 34, 40,226, 95,189,122,181,173,186,186,122,148,178,159, 97,152,200,251, 3,128,228,111,100, 50, 58,158, 44,152, 64, - 32,120, 71,205,190, 93, 92, 40,232,131,153, 79,125,109, 77, 8, 64,102,111,203, 73, 3,193, 96,112,206,254,253,187,152, 80,168, - 7,102, 62,117,117,251,101, 0,213, 39,154,183,130,147,157,127, 60, 40,226, 95,181,106,149,125,254,252,249,163,212,199,148, 55, - 73, 2,201,139, 95,121, 62,106, 38, 22, 2,114,146, 36,115,149, 35, 71,161,199,219, 14, 89,138, 94, 91,173,183, 72,162,172,116, -200, 81, 0,163, 83, 74, 45, 11,144,101,153, 25, 57,242, 84,248, 61,237,144,229,104,254,122,183,176, 87,148, 22,122, 0,244,207, - 51, 26, 77,224,100,231,111, 4,181,248, 23, 44, 88, 48, 82,123, 92,241,251,227,189, 10, 54,149, 86, 33, 89,244,190,144, 22,144, - 36, 49,230, 2, 64,103,157,144, 36, 83, 41,233, 84,178, 13, 25, 16,101, 29,254, 58, 79,113,144, 56, 71,246, 31,237,144, 44, 78, -118,254, 26, 36, 18, 63, 0, 30, 79, 27,159, 0, 0, 26, 61, 73, 68, 65, 84,195, 55,196,167, 42,126,165, 85, 72, 22,170, 51,104, - 88,240,189, 31, 74, 41,104,120,111,248, 67,195,203,131, 41,149, 56, 0,126, 66, 72, 69,210,169,101, 21,114, 88, 48,234,143,126, - 56, 6,128, 72, 8,113,245, 39,187,196, 56,217,249,135,161,246,249,141,196, 15, 0, 54,155, 45,242, 59, 19,226, 79,171, 5,232, -238,108,193,246, 77, 47,161,199,219, 5, 0,160,138,243, 67, 85,110, 80,239,111,150, 99,135,254,242,151, 55,250, 31,124,240,225, - 67, 28,199, 70,142,169,130, 17,237, 78, 74, 17,195,140, 82, 26,181,143,101, 24,209,102,231,126,235,245, 6, 86, 38,155,137,238, -206,163,216,190,233, 37,248,124, 93,189,123,228,200,151, 86, 70, 12,225,156,183,220,114,147,248,192, 3,191,191, 81,121,190,190, - 62,250,206,148,229, 88,254, 90, 48, 12, 35, 11, 2,243, 97, 79, 79,104,125, 82,228,113,242,243, 87,160, 30,237, 81,119,120, 1, - 32, 16, 8,224,224,193,131, 56,124,248, 48,218,218,218, 12, 95, 52,158,110, 71, 56, 89,112, 0,192,178, 4,185, 78, 59, 56, 18, -236,149, 45, 85,137,159,106, 12,129,186,150,127,111, 9,126,113,227, 79, 33, 83, 25, 20, 20,164,183,124, 9,244,198,110, 17,181, -143, 70,142,133, 35, 85,194, 29, 58,116,136, 59,123,198,185,119, 0, 88,153,108, 38, 24,142, 65,110,174, 29, 28, 19,236,187,236, -154, 31,170, 77,225,135,215, 44,193,205, 55,254,180,247, 65, 87, 50,148,134, 48,170, 1,101,244,246,169,127,200,189,191,194, 59, - 15, 30, 62,200,156,253,181,115,231, 0, 88, 63,216,248, 71,168,201,242,187, 15, 62,248,160, 48,119,238,220, 81,178, 44,163,177, -177, 17,123,247,238, 69,109,109, 45, 90, 91, 91,225,114,185, 80, 88, 88,136,194,194, 66,184, 92, 46,112, 28,103,216,161,237, 15, -241, 3,189, 6, 32,138, 50,186,186,124,240,122, 61,145, 3,234,251, 4,162,238, 25,160, 64,199,230,183, 96,119,228,130, 48, 28, - 34,102,162,106, 42,212, 61,135,152,251, 13,148,198,133,246,109, 80, 0,237,237, 29,144,101,115, 67,177, 90,136,162,140,206, 78, - 31,124, 62,119,100, 95,180, 7, 33, 71,253,220,177,249, 95,176,231,184, 0,134,131,186,182,213, 9, 29,179,165, 19, 28, 0,208, -222,222,134, 36,134, 50,191, 82,252, 85,152, 88, 85, 85,133,199, 30,123, 12,181,181,181,224, 56, 14, 37, 37, 37, 40, 42, 42, 66, -121,121, 57,120,158, 7,207,243, 16, 4, 1,118,187, 29, 60,207, 71, 70,131, 50,213, 17, 78, 22,189, 45, 0,131, 28,167, 13, 12, - 9, 63, 38, 60, 92, 57,107,221, 32, 26,221, 39,166, 34, 40,148, 78,155, 90,244,209,225,162, 13,169, 55, 66,213, 87,164, 37,160, -169,223,221,207, 49, 12,114,114,237, 96,152,240,155, 94,244,175,185,164,217, 31,130,140, 16,116, 79,136, 58, 89,229, 74,168,118, - 51,170, 42, 89, 6, 0,109, 7, 54, 9,156,236,252,213,112,187,221,112, 58,157,168,174,174, 70, 65, 65,223,227,243,129,190, 91, - 35, 5, 65, 0,207,243,176,217,108,225,167,143,119, 31, 71,221,163,223,131,167,177, 30,142,226, 50,148,159,127, 61,202,191,241, -253,148, 12, 35, 89,244,182, 0, 18,186,187,125,240,245,182, 0, 17,205,210,228,133, 29,251, 91, 57,187,239, 95,244,254,176, 1, -120,188, 61, 73,147, 87, 32,138, 98,152,191,199, 29,125, 32,202,135,214,212,139, 49,154,145, 13,246,171,142,246,253,139,217,239, -241,249,147, 35,173,194,201,206, 95, 13,167,211,137, 41, 83,166, 64,146,164,168, 39,107, 40,223, 12,195,128,227, 56,240, 60, 15, -134, 97,192,243, 60, 26, 63,120, 14,249,104,197,156,165,231,195,231, 13,226,179,183, 31,129,231,192,103, 24,251,195,255, 5,195, - 11, 73,181, 10,201,130, 3, 0,134,101,224,204,177,129,129,195,208,245,209,186, 44,138,138, 99, 92, 31,170,218,210, 49,152,168, -115, 85,255, 66,161, 16, 82, 5,195, 49,200,205, 17,192, 32,199,176,198, 83, 95,124,125,239, 66,142,173, 71,163,220,138, 88, 31, - 67,157,146, 40, 6, 83, 96, 30,198,201,206, 95, 13,142,227, 32, 8, 66,204, 44, 47,128,200, 75,253, 20,191, 95, 89,254, 48,108, -230, 37,216,253,159,167, 49,188,169, 1,195, 38,156,141,217, 23,148, 96,231, 71,159, 98,231,175, 23,225,140, 91, 95,132,189, 96, -168,233,190, 64,210,124, 1, 64, 18, 37,116,187,125,240,122, 60, 26,161, 70,254,105,106,255,222,111, 3,145,171, 3, 81,221,237, -232, 52, 40, 40,220,105,181, 0, 50,186,187,125,240,120, 60,136, 18,137, 81,109, 24,219,211,212,236,215, 57, 57, 74, 52,177,181, -168,199,151,186,128, 78,118,254,106,112, 28, 7,150,101,193,178,108,212, 19,247,244,196,170, 24, 66,238, 41, 19, 48,241,182,151, -177,125,245, 82, 76, 12, 2,195,167,205,195,212,111,124, 3, 95,110,219,140,109,183,205,193,153,119,190,134,220, 17, 19,178, 55, - 10,196,176, 12,114, 28, 54, 64,238,237, 3, 68,185, 41,250, 46, 11,160,105, 33,194, 59, 84,191, 35,161,117,126,107,226, 1, 69, - 48,152, 70, 11,192, 48,200,201,177,171,248,135,235,187, 79,183,212, 98,195,166,122,120, 60, 62,248,253, 65,248,131,193,240,183, - 63,136, 96,239,239, 76,162,247, 98,232, 46, 19,225, 56, 78,158, 50,101,194,182, 45, 91, 62,255,231, 87,141,191, 26,106, 95, 92, - 45, 80, 26, 10,224,240, 95,110, 69,247,190,143, 32, 5, 2,160, 84, 14,187,216,178,220,231, 42, 49, 12, 62,223,186, 31,108,193, -112,148,143,159,136, 83,207,154, 1, 87, 81, 33,182,221,125, 62, 78,255,217,159, 49,236,236, 69,113,221,161, 84, 16,105, 1,186, -220, 62,120,221, 94, 0,177, 53,187,161,176,161,250,173,221, 79,181, 34,143,236, 84,197,213, 23,222,227, 73,221, 7,149, 69, 17, -157,221, 62,248, 60,225, 62,140, 82,123,110,216, 88,131, 23, 94,252, 59,138,139,139, 83,142, 59, 83, 56,120,240, 48,115,198,228, -179,167, 1,136, 17, 80,182,249,203,178, 72, 24,134,163,122,251, 1, 64,239, 88, 50,252,213, 80,139, 81, 45,210,230,183,254,136, - 92,127, 19,166, 93,122, 1, 88, 65, 0, 97,121, 16,150, 3, 97,194, 31, 48, 12, 64, 24, 0, 4,224,108,128,232, 7, 66, 62, 12, - 29, 53, 22,179,243,139,240,233,159,254, 11,222, 35,215, 99,244,183,110,201,252, 40, 16,195, 50,112, 58, 4, 16,217, 22, 37,230, -237,159,127,137, 15, 55,214,192,219, 19, 64, 48, 40, 34, 16, 8, 34, 16, 20, 17, 12,134, 16, 8,132,194,223, 65, 17,146,148,153, -213, 17, 12,195,200,132, 16,221,139, 65, 8,233,161,148,222, 65, 41,125, 40,230, 60,197,135,150,237, 81,126, 45, 39,112, 40, 46, - 46, 70,231,177,154,164,125,220, 96, 48,196,132,164, 16, 3, 0, 60,203,203,130,192,199, 25,106, 73, 12, 95,103, 43, 68, 81,212, - 29,166, 72,200,191,181, 22,162,104,190,130,144,101,145,136, 34, 37, 84, 18, 73, 80, 18, 25, 42,202,132,112, 12, 21, 88, 78, 38, - 44,215, 91,247,136,164,167, 39,200, 50, 0,108, 54, 65,226,109,188, 28,207, 16,124,221,198,252,181,208, 19,166, 28,236,129,195, -233, 0, 79,253, 32,162, 8, 80, 30,144,121,128, 97, 65,249, 28, 32, 20, 8, 15,235, 18, 6, 8,249, 0, 42, 3,172, 0,136,126, - 56,243,243, 49,231,242, 75,176,245,173,191,192,115,112, 23,206,188,229, 57, 16, 18,107, 4, 41,143, 2, 73,162, 4,183,167, 7, - 30,183, 55,202, 0, 62,217, 82,135,255,247,194,203,253, 89,131, 26,230,160,161,161,193, 81,117,250, 89,247, 3,136, 49, 0, 81, -148,209,237,241,194,211,237,137, 62, 32, 43,199,253, 16,131, 62, 83, 4,100, 89, 36, 62, 95,128,235,234,236,180,185,189, 94,129, - 16, 66,115,115, 93,193,130,252,188,128,195, 33, 72,102,106, 75, 61, 4,227,164,159,144,127,208,103,202, 0,100, 89, 38,162, 36, - 17,159,183,135,243,122,220,130,183,199,207, 5,131, 1, 78, 18, 69,134,229, 56, 89, 16,108,162,195, 97, 23, 57,150,165, 61, 61, - 62,174,219,237,177, 49,132,208,252,188,188, 64, 81,241,144,158,156, 28,135,104,148,191,120,252,213,208,186, 64,202,167,100,254, -213, 56,248,204,141,216,191,237, 95, 80,207, 75, 51, 44,143,170, 69, 87, 98,196,240, 92, 48,160, 0,219, 59, 21, 36,137,136, 44, - 32,144, 2,224, 65, 49, 99,201,133,248,236,189,247,176,247,137,155,113,198,245,255,155,182,248, 1,165, 5, 96, 24, 56, 28, 2, -100,201, 22,229,162, 8,130,128,226,162, 98,180,183,236,131,164,115, 1, 82, 82, 66,178,177,244, 30, 14,184, 61, 8,137,162,238, -179,239, 24,134, 65,142,221, 6, 89,180, 71,237,183,219, 5, 0, 50,100, 89,214, 27, 35,137,129, 40,138,196,231,243,241, 45, 71, -143, 59,119,236,220, 87,242,215,151,255, 51,213,225,176, 5, 47, 94, 50,123,247,148,137, 19, 90, 74, 74,135,122,115,114,114, 66, - 28,151,138, 17, 24,167, 31,159,127,239,185,178, 94,247, 85, 21,187, 28,174,209, 59, 59, 58,236,199,219,218,114,106,235, 14, 20, -109,218,188,103,196,161,134, 99, 69,221,157, 62,103, 65, 65,174,103,100,101, 73,235,244,179,170,142,148,149, 12,241, 29, 58,210, -146,247,194,203, 27,102,129, 80,233,187, 87,156,251,241,215,102, 76,105, 44, 97, 75,125, 54, 27,163,223,156, 39,209,254,169, 71, -127,148, 79, 78,233, 40,156,126,251,107,145,237, 96, 91, 35,246,174,249, 54,198,205,154,135,138,145,195, 64, 3,221, 0,103, 7, - 41, 28, 5,118,228, 57,128,171, 28, 32, 12,104,231, 65,200,117,239, 64,110,222, 1,244, 28,199,228,121,115,241,241,107,111,226, -200, 59,103,162,114,225,117,105,137, 31, 80, 90, 0, 73,134,219,221, 3,183,219, 23, 61,246, 79, 41, 40, 40,196,144, 15, 98, 40, -245, 81,154,116,160,116,144,186,187, 58, 12,195,200,162,140,110, 79, 15, 60,221, 62, 68, 15,248,201,125,223, 9,222,239, 37,138, - 34,241,121,125,124,211,209,163,185, 91,182,238,174,248,199,127,246, 44,254,247,251,155, 29,255,248,199, 63,112,247, 93,119,156, -122,237, 85,254,127,157,125,214,196,198,242,210, 82, 79,142, 51, 5, 35,136,147,126,124,254,137, 13, 88,105,181,142, 29, 63,158, -211,112,164, 41,127,237,243,111, 77,157, 56,101,246,164, 95,255,246,143, 76, 89, 89, 25,236,118, 59,142, 28, 57,130,109,219,182, -141,123,250,169,167,100, 57,212,190,167,181,189, 51,111,243,214,125,229,219,182,109,195, 47,110, 90, 62,121,194,248, 83, 91,135, - 20,230,251,109, 54,206,192,159, 53,111, 1, 90, 3,208,250,236,238,250,109,168,251,227,143, 49,245,130,111,162,176,192, 14,234, - 61, 6,112,118, 48,149,231,128, 25,179, 16, 68,125,107,100,201, 25, 96,134, 77,132, 84,243, 38,196, 29,127, 1,219,115, 28,211, -207,159,143, 13,107,111, 71,229, 55,174, 6,195,219,140,104,152, 66,111, 11, 64,194, 45,128,104,131,186, 35,235,176,135, 35, 15, -175, 2, 77,203, 5, 54,134,105, 25, 25, 7,100, 24,244,214,160, 66,212,126,229, 5,216,137, 4,164,212,252, 77, 71,143,230,110, -222,178,123,248,219,239,213, 44, 90,191,254, 67,135, 40,138, 56,239,188,243,112,202, 41,167,228, 92,119,237, 53,139, 36, 42,191, - 53,253,108,185, 33, 21, 35,136,151,126, 34,254,189,153, 48, 60, 63, 20, 8, 50,237,109,237,246,109, 91,119,151, 61,247,226,134, -243,215,174,251,191,194, 41, 83,166,192,231,243,245,142, 22,249, 49,108,216, 48, 44, 94,188, 24, 11, 23, 46,100,158,120,226,137, - 51, 86,175, 94, 21,202,205,205,197,216,177, 99,209,218,218,149, 31,244,251,185, 80, 64,100,100,123, 80,183,195,156,168, 2, 81, -160,238,140,234,137,255,216, 71, 47,162,233,141, 7, 49,227,210,203,225,100,125,128,207, 13,176, 54, 16, 87, 57, 48,250, 60, 72, -148, 98,255,129, 86,236, 62,208, 6,175, 63,132,211, 42,242,113,246,248, 18, 8, 99, 23,131,110,250, 3,164,186,183, 33, 12, 29, -135,161,167,140,192,177,237,255, 70,217,215, 46, 48,197,203, 8,125, 45,128,199, 7,119,183, 55,106, 20, 39,188,216, 42, 44,254, - 19,109, 0,241,210, 23,101,197,135,246,169,231,133,194,252,229,200,134,238,185,178, 44, 18,191,175,135,107,106,106,201,221,188, -101,215,240,119,214,215, 46,122,127,253, 6,135, 40,138,240,122,195,163, 98,227,199,143,199,179,107,255,146,115,237,247,174, 94, - 8, 74,223,154,126, 54, 26,134,151,151,184,227,249,204,201, 32, 46,127,196, 55, 96, 89,150, 73, 79,192,207,118,116,117,216,159, -123,241, 63,231,124,178,105,103, 33,207,243,104,110,110,198,227,143, 63,142, 15, 62,248,128, 30,109,110,236, 41, 45,171,112,204, -155, 55,143, 44, 95,190, 28,223,255,254,247, 49,122,244,104,149, 59, 73, 33, 81,137,136, 52, 68,228,222, 86, 39, 38,157, 20, 90, -128, 40,241, 3, 56,248,255, 86,162,167,110, 35,102, 95,122, 41,248,192, 49,208,144, 8, 66, 88, 0, 12,104,229, 92, 72, 50, 69, -125, 99, 59,254,245,233, 33, 4, 69, 9, 59,235,143,227,143, 77, 93,248,225,133,167,227,154,243, 39, 0,179,110, 6,234,222, 6, -245, 28, 67, 89,249, 20, 28,126,231,233,204, 24, 0,195, 16, 56,236, 2,164,144,210,156,132,199,254,237,142,112,159, 32,101, 3, -200, 76, 39, 33, 28, 85,156,135,248,134,125,104, 33,170, 6,149,229,190, 62, 0, 12, 46, 42, 0,132, 66, 34,211,222,209,105,223, -178,117, 87,197,219,235,247, 47,126,255,253, 13,118, 81, 20,177,115,231, 78,204,156, 57, 19,199,143, 31, 71,125,125, 61,198,142, - 29,139,103,215,254, 37,231,154,107,150, 45, 34, 4,255,116,204,226, 14,241,101,165, 94, 67,159, 89,139, 56, 53,104, 92,254, 9, - 12, 24,178, 8, 41, 36,145, 80, 32,200,130, 8,197,161, 80, 8,159,127,254, 57,174,191,254,199, 98,249, 80,254,179,111, 46,158, - 86,207,210, 9,228,192,145,163,133,207, 60,253,248,153, 47,189,244,210,208, 85,171, 86,145, 9, 19, 38, 68,162, 8,143,121,244, -166, 33, 27,148, 85, 18, 45,128,182, 19, 44, 7,123,176,255,225,107,225,178,201,248,218,249, 11,192,202, 94,244,240,165, 16,137, - 13,185,190, 58, 16, 80, 72,206, 82, 80, 81,196,198,221,205,104,110,243, 98, 91,109, 11,188, 61,225,185,161,191,189, 95,135,111, -205, 25, 5, 97,232, 25, 96, 8, 3,218,211,129,252,138, 60,236,219,177,197, 20,167,120,136,180, 0, 30,143, 31,221,238,222,158, -126,239, 24,190, 44,135,151, 59, 83, 12, 4, 3,136,239, 67,123, 60,126,116,119,247,141, 84,200, 80,106,206,222,111,157, 11, 40, -203, 50,233,241,251,217,246,142, 14,199, 63,223,221, 49,243,131, 15,183, 68,196,191,116,233, 21, 82, 83, 83, 51, 11, 0, 75,151, - 94, 33,189,240,194,223,216, 49, 99,198, 96,221,186,231, 29,215, 94,243,237,121, 85, 19, 78,125, 49,191, 48,207,207,178,140,204, - 48, 76,194,156,198,245,225,227,242,239,251,211, 5,195, 80,150,103,100,135,211, 17, 28, 55,186,104,203,130, 5,243,206,234,238, -234, 12,126,235,226, 25,235,207,156, 60,246,168, 32,216,196,206,246, 14,231,191,215,239,158,191,119,223, 23,195,114,115,115,213, -249, 7, 0,136,162,204, 82, 74, 40, 40,161,178,129, 1,164,210, 2, 16, 66, 16,236,104,198,222,251, 47,199,200, 9, 99,113,234, -184, 74, 64,242,162,179, 59,136,141,175, 60,135,115,174,188, 26, 32, 4, 84, 12, 64, 18, 69, 80, 73, 66, 83,171, 27, 31,126,222, - 16, 53,249,106, 23, 88,128,202, 8,133, 66,176,133, 35, 6,203,219, 16,234,241,232,166,159, 12, 34, 45,128,221, 46, 64, 12, 9, - 81,171, 63,115,148, 81, 8, 42,135, 63, 90,152, 27,192,201, 8,226, 25, 0,195,132,107, 75, 81, 12,215,152, 74,200, 8,255, 56, -144, 68,137,136,162,196,128,216, 10,125, 62, 31,246,237,219,135,107,174, 94,214, 67, 16,240, 0, 24, 10, 0, 4,129,246,107,174, - 94,150,187,118,221,115,142,202,202, 74,240,130, 93,160,146, 76,168, 72,205,207,188,196,109, 1, 18,240,143,123,135, 24, 96,227, - 57,169, 40, 63,175,231,202,111, 45,216,221,217,217,253, 5, 75, 8,117,185, 92,254,252,188, 60, 63, 24,192,235,245,216, 64, 56, -254,200,145, 35, 81, 67,218,148, 82,108,223,190, 29,229, 37,133,109,246, 28, 94,228,121,197,152,211,107, 1,148,111,255,177, 67, -216,253,219,139, 48,105,238, 28,148,150,228, 2,178,136,150,163, 93,216,185,126, 61,114,135,143, 67,200,219, 13,146,199,130, 6, - 61,144,218,234, 16, 32, 78,140,173,112,198,220,137,187, 96,114, 25, 68, 49, 4,182,113, 91, 88,135,124, 14,130, 33, 25,142, 33, -233,191,138,160,175, 5,240,246,160,219,237,139, 74, 92,148,194,125,128,176, 27,164, 35,231,254,124,183, 64,130, 62,128,199,231, - 67,183,218,135,238,221, 15, 0, 48,104, 1, 0, 80,142,231,164, 92,167, 35, 48,122, 68,238,167,115,102,207,152, 26, 8,248, 67, - 23,157, 63,101,203,171,255,220, 60, 69, 9,196,115,156,116,209,249,103,124,240,131,235,174,154, 68, 88, 91,193,148,211, 43,182, -229,186,156, 1,142,231, 36, 0,212,204, 27,228,227,118,194, 77,240, 55,238,195,200, 36, 24, 10, 50, 65,127,128,149, 66, 18, 97, - 9,161,148,202,196,231,243, 9,161, 80,144, 37,132, 80, 89,146,200,194,249, 85, 31, 95,250,205,133, 83, 65,216, 72,207, 90, 12, - 73,236,208,226,220,198,101,151,207,223, 94,224,116,249,109, 60, 39,197,185, 21, 51, 97, 30, 21, 40,174, 79,221,159,126,138, 73, -115,206, 65, 73, 33, 1,101,120, 28, 58,112, 20, 95,236,216,133,179,239,125, 31,199, 54,191,137,182,218,183, 80, 60,116, 2,224, -110, 6,249,240, 62,248,207,127, 10, 51,199, 13,193,210,185,149,120,111,103, 11,130,162,132,153, 19,134,226,226,153, 21, 8,133, - 66,176,111,121, 24, 0,192, 20, 84,162,179,195,141,194,241, 51, 77,115, 50,130,170, 5,224, 17, 10,132, 71,129, 20, 56, 28,189, - 45,130, 44,131,154,172, 1,162,145, 57, 3,137,223, 2, 48,176,219, 5, 4,237,118,168, 47, 84,142,122, 28,221,224, 2,218, 4, - 94, 26, 90, 92,232, 91,182,244, 27, 59,151,120,186,247,139, 65,137,117,123,189,118, 96,115,212, 98,144, 49, 99, 78, 57,126,230, -148,113,255,228, 5, 78,204,115,185, 2, 67,139,243,125,188,192,107, 23,233, 27, 35, 65, 31, 32, 62,127, 99, 3,146,164, 16,233, -236,236,182,213, 29, 56, 52,228,197, 87, 54, 76,170, 63,208, 84,198,178,125,171,253, 29, 14, 91,224,155,139,167,127, 94, 85, 53, -234,216,148, 73, 99,254, 33,201, 18, 35, 74, 34, 19, 10, 73, 44, 75, 64,157, 46,167,127,104,113,145,215, 85,232,242, 19,150,208, - 56,157,109,115,249, 68,159, 1,136,221,199, 49,100,248, 57,160, 8,162,118,103, 45,142,183,116, 96,250,253, 27,192,231, 22, 96, -248,130,101,248,228,205, 63, 96,212, 25, 19,193, 52,110, 7,231,239,132,125,227, 61,240, 76,191, 13,151,206, 42,199,101,231, 84, - 68,226, 2,149,192,111,126, 20,220,161,247, 1,134,131, 92, 54, 13,181,255,248, 0,179,239,123,196, 52, 39, 35,168,250, 0, 61, -125,125,128,222, 90, 95, 18, 41,178, 62, 10,100,210, 72,226,117,130,195, 62,180, 79,197, 63,236, 71,132,223,160,217, 91,251, 27, - 92, 64,142, 1,117, 58,156, 65,174,140,147,134, 6, 10,124,221, 94,159,208,212,216,172, 37, 70,115,115,236,129,242,210,146,174, -156, 28,123,200,158, 99, 19, 5,158,147, 57, 6,212,172,107, 16, 15,233,240, 15,244, 4,216,174,142, 78,251,186,231,223, 62,235, -201,181,175, 78, 26, 59,118,108,212,113,175,215,139, 25,103, 79,201,187,245,231,195, 95, 43, 46, 42,240,130, 2,221, 30,175,205, -237,118,219, 41,165,132, 99, 56,217, 97, 19, 68,129,101,100, 6,233,231, 71, 61,246,159, 63,225, 28,124,250,175,127, 35,228,243, -192,117,218, 89,152,250,155,191,130,229,109,225,155, 98,114, 11, 48, 98,241,143,240,197,158, 13, 24, 63,252,108, 72, 95,252, 27, -185,187,159,134,112,116, 43, 60,147,150, 35, 88, 60, 9,148,176, 16,218,118, 33,119,207, 90,216,154, 63, 1, 0, 48,195,167,163, -161,177, 3, 67,167,156,139,220,138, 49,105,113, 5, 52,125,128,144, 35, 92,227, 40,139,216,114,114, 4, 80,164, 49, 10,148, 17, - 40,203,177, 19,251,208, 57, 14,117,141, 31,230,175,108,199, 29,135,231, 64, 29,156, 77,148,237,172, 36, 82,137, 48, 28,137, 9, - 44,138, 18, 35,209, 16,161,176, 33,216, 19, 96, 37, 81, 34, 34, 47, 17,158,231,204,117,130, 77,244, 1,146,229, 47,203, 50, 9, -132,130,140,183,167,135, 63,220,208, 54,108,252,248,241,104,105,105,137, 10,211,210,210, 2,134, 99, 72, 32, 20,100,125,254, 30, - 46, 20, 18,217,154,186, 67, 67,223,124,251,243,185,146, 4, 97,226,132,161,219,190,117,113,245, 30,135,195, 22, 98,121,214,144, -100, 50, 45,128, 50,252, 57,254,199,143,194,123,100, 31, 4,215, 16,216,139,202, 99, 38,198, 70, 94,248, 19,124,240,147, 63, 34, -127,200, 44,148, 77,188, 28,210,254,127, 66,104,253, 28, 67,222,251,175,216, 72, 89, 1,236,105, 95, 71,135,152,143,253,155,223, -195,185,127,220, 97,154, 79, 60,168,250, 0,126,184, 61,225,217, 94,165,182, 13,137, 18, 34,143, 72, 57,209, 6,144,200,135,246, -248,225,233,173, 65,149,144,162, 40,246,141, 32,154,185,128, 50,192, 16, 74, 99, 23,228, 81,210,213,237,113,144, 35,148,242, 54, - 78, 98, 8, 67,121, 27, 47,230,187,242,252,133, 5,121,254,156, 28,187,152,216, 8,210,225,111,208, 2,200, 50, 36, 73, 34, 84, -150, 8, 97,123, 7, 76,101, 25,199,142, 29, 67, 77, 77, 13,238,190,251, 46,217,239,235,106, 95,124,222,228, 29,238,110,159, 35, - 24, 8,242,235, 63,218, 61,210, 19,112,125,237,131, 13,155, 5,159,207,135,217,231,124,109,230,194,249,238,250, 96, 97,190,207, - 38,240,146,113, 62,146,155, 8, 83, 62,174,202,211, 13,103,132, 57,155, 3,179, 87,127,136,173,247, 92,130,206, 97, 69, 24, 55, -229,106,144,163,159,129,186,155, 65,221,205,128, 44,129,228,150,128,184,202, 64, 74, 39,225,224,151,205, 56,184,251, 19,204, 89, -245, 30,236, 67, 82,122,143, 95, 12, 56, 0, 32, 12,129,221,198, 33,100,231,163, 22,195, 69,106, 36,163, 81,160, 12,192,108, 47, - 33,209, 60,128,221,206, 33,232, 80,143,250,200,166, 91, 0, 68,133,146, 65,136, 38, 49, 98, 31,242,240,159,222,168, 86,211,117, - 56,132,192,165, 75,102,109, 59,103,230,196,195, 37,252, 80,175,205, 38,196,157, 15,136, 63, 19,156,152,191,190, 0,251,230, 56, -212, 79,228, 56,124,248, 48,102,207,158,141,215, 95,127,131,121,228,145, 71,138, 63,219,190,173,250,189, 15,255,227,158, 56,105, -170,235, 7, 63,186,139, 95,184,112, 33,188, 94, 47,234,234,234, 32, 75,129, 46,150, 37, 50, 97,137,254,232, 79, 84, 90,230, 96, -230,198, 21,229,227, 40,174,192,220,135, 54, 97,207,159,111,198, 71,175,191,141,242, 49, 99, 80, 56,116, 52, 92,227, 74, 65, 24, - 6,158,214,227,232, 58,222,138,166,255,108,134,125,232, 72,156,251,248, 46,112,142,220,196, 36, 76,130, 3, 0, 89,146,225,245, - 6,208,237,233,137,186, 73, 37, 20,146,122,127,157, 72, 23,168, 23, 9,231, 1,130,232,114, 71,175, 88, 12, 6,195,226,144, 77, -172, 5, 2, 0, 6,160, 28,207, 74, 54,155, 61, 84, 94, 86,216,186,125,251,246,242,178,178, 50,212,127,113,192,198,113, 92,153, - 58,172,223,239,199,180, 51, 79,119,157, 62,126,196,139, 5,121,121,126, 62,209,124, 64,130,181, 64,241,248, 71,250, 1, 49, 81, -202, 32, 12,237,109, 28,251,146,190,238,186,107,165,123,238,249, 45,123,209, 69, 23,225,206, 59,239,132, 32, 8, 60,207,243, 67, -120,158, 7,165, 20,173,173,173,120,229,149, 87,112,239,189,191,241, 92,121,201,244, 77, 46,151,211,207,115,108,220, 17,173, 84, - 58,193,137,196,223,119,140,197,164,159, 60, 2,247,145, 26,180,237,254, 8, 13,159,189,131,182,247,158, 7,149, 68, 20,142, 61, - 11,197, 83,207,199,148,111,206, 70,225,152,105,166, 57,152, 69,164, 5,176,217,120, 56,236, 66,212, 98,184,156,222,135, 20,156, -216, 62, 0, 20, 18,198,199, 24,192,110,231,224,236, 29, 53,137,140,163,231,244,254, 48,154,221,212,129,192, 50,114,158,203, 22, -184,228,130,233,187,190,243,237,203, 71,174, 94,243,191,121,211,166,197, 22,252,193,131, 7, 65,194,211,167,136, 55,202,212,135, - 56,199, 19,240, 55,154,156, 2,100, 16, 66,168, 32,176, 98,190,203,225, 13, 6,131, 56,118,236, 24, 10,242,184,166, 63, 62,242, - 59,255,203, 47,191, 60,102,233,210,165, 56,227,140, 51,112,202, 41,167,160,161,161, 1,187,118,237,194, 11, 47,188,128, 99,205, -181,251,111,254,241,249,159,158, 50, 98, 88, 71, 65,129,203,207,243,140,156, 76, 45,111,132,228,197,223,183,157, 95, 89,133,252, -202, 42,156,122,193,242,180,121,152, 5, 71, 8,145, 3,254, 0,211,227, 15,134,251, 0,125, 55,252, 66,150,195,247,117, 82, 89, - 60, 97, 6,160,208, 9,134, 66, 32, 36,182,115, 10,128, 6,253, 65,226,243, 7,209,229,241, 35,114, 17,101, 64,150, 57,200, 0, - 68, 49, 24,246,167, 77,128, 16, 34,231, 58, 29,129,211, 70, 86,180,126,111,233,244, 55,127,247,235,155, 38, 54,181,116, 20,107, -125,181,130, 60,135,231,226, 69,103,237,204,117, 58,123, 88,134, 72,178, 44,199,157, 15,232,189,125, 81,207,138, 19,242,135, 44, - 26,206, 99,240, 28, 43,229, 56,115, 2, 23,124, 99,234,206,169,103,158, 94, 8,128,187,240,188,169, 59,198,140, 41,111,171,173, -111,218,247,236,159, 87,143,104, 62,214, 57,164,167, 39,228,116, 56,120,111,217,176,130,246,179,167,141, 62,180,236,210,139,154, -139,139, 10,188,249,121, 46,127,142,205, 38, 34,193,124, 70,239, 13, 69,166, 60,214, 68,194, 55, 58,126, 34,192, 57,115,108,199, -107,106,246,151, 12, 43, 41, 67,143,167, 61,178, 22, 84, 18,101, 12, 47, 25, 1, 73, 12,161,187,171, 93,247,228, 68, 47,217, 54, - 51, 79, 70, 19,148, 41,237,237,132,215,127,217, 0,187, 93, 56,162, 61,238,116,218,124, 53, 53, 53,206, 97,195, 42,224,119,183, -247, 45,128, 22,101, 20,149,141,128, 40, 6,209,221,169,207,223, 8,178, 44,139,206,252, 28,207,216,211, 42, 67, 63,190,110, 88, - 91, 32, 24,224,169, 36, 19, 74, 41, 33,132, 80, 48, 4, 2,207,139,185,185, 57,126,123,142,224, 15,133, 68, 89,146,226,184, 56, -178,140, 47, 15, 54,194,225,176,117, 39,203, 95, 22, 69,120, 60,157,198, 75,129,100, 81,206,205,177,247, 76,157, 50,254,200,105, -163, 43, 94,130, 12, 56, 93,142,128,221,102, 15,149, 13, 45,110,159, 62,109,252,193, 96, 48,196,201,162,204, 48, 28, 35, 11, 2, - 47,230, 56, 28, 33,167,211, 22,180,219,236, 34,195, 48,114, 80, 20,251, 30,241,164,151, 6,100,124,249,101,179, 46,127, 61,164, -242, 80,171, 19, 5,206,110,227,183,191,244,242,203,139,254,235, 39, 63,192,190, 61, 59,194, 79,137,150, 40,130, 33, 25,231, 46, - 94,128,142,246, 38,184, 61, 6,119, 3, 37, 50, 0, 19, 4, 18, 27, 81,120, 77,210, 39,155,107,252,146, 36,127,162, 61,238, 16, -184,230, 23, 95,126,249,180,159,253,244,135,216,183,231, 51,136, 98,184,182, 12, 6,101, 44,184,224, 92,116,182, 55,193,231,247, - 39,219,186, 83, 6, 76,200,238,176, 75,188, 32,248, 37, 81,100, 36,205,179, 76,121,142,145, 57,142,151, 32,129,250,253,193,184, -153,144,101, 25,155,182,214,138,146, 36,198, 24,112, 60,254, 95,191,224, 92,116,118, 54,193, 23,255,153, 61, 20, 4, 98,158,203, -225,181,219,120, 63, 0, 8, 2, 39,133, 39,195,108,112, 74, 14, 38, 16,148, 24,197,120,121,142,149,121,150,145, 9, 67,168, 36, -201, 84,146, 18,223, 42, 42,203, 50, 54,110,174,209,229,175, 69,178,181,254,137, 20, 63, 0,112, 57, 60,243, 95, 47,189,252, 70, -237,183, 46,187,148,253,246,119,111, 66,237,254,237, 16, 69, 9,227,198,159,137,161,195,134, 97,231,150,215, 16,240,167,104, 0, -137,214, 10,153,104, 34, 40,165, 56,210,216,138,151, 94,251, 56, 20, 12,138, 49, 79, 44,200,145,185,127,190,244,210,235, 63,187, -252,178,203,200,183,191,123, 51,106,107,183, 67, 20, 69,140, 31, 63, 21,195,134, 13,195,231, 91, 95,135,223,159,242,205, 60, 50, - 0,153, 50,132, 48,154,231,203, 82, 2, 26,146, 66, 8, 73, 72,104, 92,135, 27,142,225,197,191,127, 36, 7,131,210,122, 67,254, -151, 95, 70,190,125,205,205,168,173,217, 14, 89, 20, 49,118,252, 84, 12, 43, 45,197,222,237,111, 34,152,152, 63, 5, 32, 50, 76, -120,101,170,198, 29,147, 89,134,144,190,251, 16,101, 26,146,228,240,123,102, 96,238, 73, 28, 7, 15, 31,195, 11,127,223,160,203, - 95, 15, 39,139,248, 1,128, 80, 74, 49, 98, 68,241,245,109,173,158, 71,174,186,242, 34,246,194, 11, 47,192,216, 49,167,194,235, -110,197,151,117, 91, 16, 12,196,185, 23, 52, 93, 3,136,211, 70, 72,146,140,163,199, 58,177, 99,215,129,158, 87,223,220, 44, 73, -178,248,115, 81,164, 79,233,133, 29, 49, 98,232, 89,109,199,187, 23, 95,117,229, 69,100,201,197, 75, 48,246,180, 83,225,243,181, -226, 96,253, 22, 4,253,153,121,226, 89,178,144, 69, 25, 77,199,218,177,125,199,151,226,203,175,109,146,131,162,248, 22,165,244, - 51,189,176, 17,254, 87,125,147, 92,188,100, 9,198,142, 61, 21,126, 95, 59, 14,127,185, 29,193,160, 87, 21,105, 22,249,106,183, -101, 25, 77, 71,219,177,117,199,151, 98,216,120,141,249, 43, 56,235,172,179,232,167,159,126,138, 64, 32,112, 66,196, 95, 91, 91, -139,171,174,186, 10, 91,183,110, 53, 29, 57, 81,106,225,252,252,252,211,120, 78,126,212, 31, 16,167,248,124,129,161,148,210, 19, -250, 14, 97, 66, 32, 11, 2,127, 68,150,229, 79, 66, 33,105, 5,165,180, 54, 94,248,252,252,252, 33, 60, 43, 45,246, 7,197, 82, -175, 55,144, 3, 36,126, 36,120,150, 65,109, 54,190,155,138,242,145,160, 36,173,167,148,182,197, 11, 60, 96,249, 83,249, 72, 48, -152,152, 63,208,103, 0,193, 96, 48, 97, 71, 56, 27, 72,197, 0, 34, 79, 99,238,234,234,170, 7,176, 48, 43,204,250, 1, 93, 93, - 93,237, 0,158, 59,209, 60, 82,197,201,206, 95, 65, 48, 24, 68,125,125,125,204,227, 10,251,195,237,225,121,221,103, 38,196,133, -245,154, 84, 11, 25,131,205,102,107,153, 51,103, 78,250,139,244,211,228,144, 76,120, 98,166, 35,106,193,194, 87, 21, 39,212,207, -183, 96,225, 68,195, 50, 0, 11,131, 26,255, 31,244, 45,114, 84,193,188, 23, 3, 0, 0, 0, 0, 73, 69, 78, 68,174, 66, 96,130, - 0}; - +137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0,192, 0, 0, 0, +192, 8, 6, 0, 0, 0, 82,220,108, 7, 0, 0, 0, 1,115, 82, 71, 66, 0,174,206, 28,233, 0, 0, 0, 6, 98, 75, 71, 68, 0, +255, 0,255, 0,255,160,189,167,147, 0, 0, 0, 9,112, 72, 89,115, 0, 0, 13,215, 0, 0, 13,215, 1, 66, 40,155,120, 0, 0, + 0, 7,116, 73, 77, 69, 7,218, 12, 7, 13, 58, 45, 79,248, 81, 14, 0, 0, 32, 0, 73, 68, 65, 84,120,218,237,125,121,120, 20, + 85,214,254, 91, 85,221, 85,189,164,179, 67, 2, 1, 18, 6, 8, 24, 48,136, 40, 66, 8, 97, 85, 1, 5,183, 25,151, 31,200, 51, + 58,126,124,226,140,142, 27,155, 32, 70,103, 20, 89, 29, 69,113, 25, 20, 68,249, 92,113, 16,253,252, 84, 28, 29, 81, 2, 36, 49, +128, 96, 8,132, 64, 18, 18, 32,152,173,151,116,122,171,170,223, 31, 73, 53,213,157,222,183, 4,185,111,158,122, 82,221,213, 93, +125,234,214,123,206, 61,231,220, 83,247, 82,162, 40,130,128,224, 82, 5, 77,154,128,128, 40, 0, 1, 1, 81, 0, 2, 2,162, 0, + 4, 4, 68, 1, 8, 8,136, 2, 16, 16, 16, 5, 32, 32, 32, 10, 64, 64, 64, 20,128,128,128, 40, 0, 1, 1, 81, 0, 2, 2,162, + 0, 4, 4, 68, 1, 8, 8,136, 2, 16, 16, 16, 5, 32, 32, 32, 10, 64, 64, 64, 20,128,128,128, 40, 0, 1, 1, 81, 0, 2, 2, +162, 0, 4, 4, 68, 1, 8, 8,136, 2, 16, 16, 16, 5, 32, 32, 32, 10, 64, 64, 64, 20,128,128,128, 40, 0, 1, 1, 81, 0, 2, + 2,162, 0, 4, 4, 68, 1, 8, 8,136, 2, 16, 16, 16, 5, 32, 32, 32, 10, 64, 64, 64, 20,128,128,128, 40, 0, 1, 1, 81, 0, + 2, 2,162, 0, 4, 4, 68, 1, 8, 8,136, 2, 16, 16, 16, 5, 32, 32, 32, 10, 64, 64, 64, 20,128,128,128, 40, 0, 1, 1, 81, + 0, 2, 2,162, 0, 4, 4, 68, 1, 8, 8,136, 2, 16, 16, 16, 5, 32, 32, 32, 10, 64, 64, 64, 20,128,128, 64, 14,197,165,116, +177, 99,198,140, 73, 23, 4, 97, 23,128, 17,209,250, 13,150,101, 27,138,138,138,210,163,113,238, 33, 67,134,112, 73, 73, 73, 99, +121,158,215, 69, 75,126,165, 82,105,221,183,111,223, 46,162, 0,191, 49, 2,117,202,254,221,186,117,235,216,137, 19, 39,162,180, +180, 20, 25, 25, 25, 80,169, 84, 96, 24, 6, 20, 69,129,166, 47,116,136, 20, 69,249,220,151,191, 39,189, 54,155,205,152, 54,109, + 90, 90,180,200,159,152,152, 56,238,249,231,159,167,167, 76,153,130,178,178, 50,100,100,100,128,101, 89, 40, 20, 29,183,145, 97, + 24,175,223,247,117, 76,130,205,102,195,164, 73,147, 56,210, 3, 4, 65, 32,142,227,192, 48, 12,104,154,238, 66, 14,127,196,113, +223,143, 22,129, 36,217,215,174, 93,203, 77,156, 56,113, 32, 0,148,150,150,194, 98,177, 32, 62, 62, 30, 10,133,194,121, 13,210, +117,120,219,124, 29, 63,117,234, 20,162, 73,254, 85,171, 86,209, 83,166, 76,209, 0, 64,113,113, 49, 70,140, 24,129,196,196, 68, +167,252,114,146, 75, 74,225, 78,126,111,239, 51, 12, 19, 53,249, 47,122, 5,240, 68,160,253,251,247, 99,196,136, 17, 72, 72, 72, +240, 74, 32,119,178,248, 59,118,242,228,201,104,185, 61,223,173, 89,179,134,155, 52,105,210, 64,103,240, 67,211, 16, 4,193, 69, + 1,125,145, 59, 80,197,136, 5,249,253, 89,244, 80,200, 79, 98,128, 32, 9,196, 48, 12, 68, 81,244, 74,160, 96,201, 47,237, 71, +131,252,171, 87,175, 86, 77,158, 60, 57,203,155, 75, 16, 14,249,163, 37,187, 47,242,187,147, 89,126, 61,161,146,223,253,124, 68, + 1,194, 32, 80,168,228,143, 36,137,228,178, 79,153, 50, 37,203,147, 79, 28, 44,193, 3, 57, 22, 11,242, 7, 66, 98, 66,254, 48, + 21, 32, 80, 2, 73,238, 68,176,228,247,246,185, 88,144, 95,186,233, 82,208, 27, 41,242, 71, 74,126,127,228,151,218,223,155,235, + 18, 42,249, 47, 69, 87, 72, 17, 42,129,148, 74,101,200,150, 62,154, 46,144,220,101,115,239,181,228,224, 56,206, 99, 38, 39, 24, +127, 63, 26, 10, 16, 8,249, 37,249, 35, 73,126,210, 3, 4, 73, 32,150,101,187,100,113,194, 37,191, 60, 13, 25,110,182, 71, 30, +175, 0,128,213,106, 69,117,117, 53,106,107,107,209,220,220, 12,149, 74,229,145,200,225, 6,194,209, 34,191,213,106,197,169, 83, +167, 80, 91, 91,139,150,150, 22,104, 52,154, 46,100, 15,135,252,151,106, 32,172, 8,150, 64, 53, 53, 53,104,110,110,134, 90,173, +118, 18, 34, 18,150, 63, 92,242, 0,128, 32, 8,187,214,175, 95,207, 22, 20, 20, 12, 20, 4, 1,245,245,245, 56,122,244, 40,142, + 29, 59,134,198,198, 70,196,199,199, 35, 57, 57, 25, 9, 9, 9,208,233,116, 46,113, 64, 36, 98,129,112,145,148,148, 52,118,237, +218,181,116, 65, 65,129,134,231,121,212,215,215,163,162,162, 2,149,149,149,104,108,108,132, 78,167, 67, 82, 82, 18, 18, 19, 19, +161,211,233,160, 80, 40,186, 16, 63, 28,242, 95,242, 46,144, 32, 8,187, 58,243,252, 78, 2,149,151,151, 59, 9,164,211,233,144, +156,156,140,196,196, 68,104,181, 90,151,252,127,184,228,143,144, 11, 49, 34, 39, 39, 7, 27, 55,110, 68,101,101, 37, 24,134, 65, + 90, 90, 26, 82, 82, 82,208,183,111, 95,231,160, 17,203,178, 80,169, 84, 78, 2,249,203,255, 7,115, 44, 28,240, 60,175,203,201, +201,193, 43,175,188,130,147, 39, 79,130, 97, 24,244,234,213, 11,169,169,169,200,205,205,133, 66,161, 0,199,113, 96, 89,214, 57, +254,226,205,234, 19,242,135,230, 2,141, 24, 62,124, 56, 94,126,249,101, 84, 86, 86, 66,161, 80, 32, 45, 45, 13,201,201,201,184, +252,242,203,157, 4,226, 56, 14, 42,149, 10, 74,165, 18, 10,133, 34, 98,228,143,132, 21, 53, 26,141,136,139,139, 67, 65, 65, 1, + 18, 19, 19,157, 65,186, 60, 88, 87, 42,149, 93, 72,228,141,228,177,206, 2, 25, 12, 6,232,116, 58,228,231,231, 35, 41, 41,169, + 11,185, 37,121, 57,142,115,202,239,169, 23, 32,228, 15, 49, 6, 48, 24, 12,208,106,181, 78, 2,185,103,122,104,154,118, 42, 1, +199,113,206,215,193,102,123,188, 29, 11, 23, 90,173, 22,185,185,185,224,121,222, 25,155,200,255,211, 52, 13,134, 97,160, 84, 42, +157,255, 61,245, 0,161, 6,194,225, 34, 62, 62, 30, 35, 71,142,116,202,239, 45,243,227, 78,126,226,246, 68, 72, 1, 36, 2,185, +143,146,202, 9,164, 80, 40,156,196, 97, 89,214,133, 64,225,186, 68, 97, 95, 80,167,139, 35,138,162, 71,242, 75,191, 39,183,252, +145,138, 5, 34, 33,191,100,221, 29, 14,135, 95,210, 70,146,252,146, 59,120,201, 43,128,100,221, 5, 65,232,114, 99, 37,162, 23, +190,254,111,148,254, 82, 15, 94,166, 36,193,224,240,142,229, 81, 75,131,202,111,164,164, 4,242,205,125, 0, 44, 24,203, 31,139, + 64,216, 83, 93,143,175,236,142, 39,242, 7, 18, 23,248,250,204, 37,175, 0,242, 27,224,126,147,105,154,198,115, 15,206, 64,147, +190, 29,207,191,245, 45,202,142,214, 59,191,187,235,141, 5,208,105, 93,211,139, 45,134,118,156,168,253, 21,155,182,239,197, 79, +229,181, 62, 83,166,145,128,220,149,138,116,138,211, 95,250, 51, 82,215, 16, 72, 86, 39, 20, 98, 19,242,119, 5,237,141, 64,146, +117,145, 54, 41,224,149,222, 79, 79,141,199,252,223,143,115,109, 96, 15, 22, 53, 53, 41, 14,227,174,248, 29, 54,253,109, 14, 38, +140, 30,236,115,192, 41, 18, 49, 64, 36, 71,117,131, 33,127,180,138,225, 98, 69,254, 75, 53, 22,240,170, 0,129,248,238, 3, 51, + 82, 92, 27, 89,225,221,151, 86, 48, 12, 22,220, 89,224,243, 55, 34,133, 72,145, 63,208,244,104,180, 10,226, 8,249,187,193, 5, +242, 22, 52,122, 82, 4,157, 86,213,165, 7,240,165, 64, 35,135,246,195, 53,185, 3,163, 74,126, 95,242, 71, 82, 49,162, 85, 7, +228,238,215,135, 67,254, 64,227, 8,146, 5, 10,210,133,240,102,241,252, 5,149, 52, 77,227,237,149,127,140, 58,249,253,109,209, + 80,140,104,129,144,191, 27,122, 0,247, 32, 50,208,129, 43,134, 9, 60,237, 25, 13,242,123,147, 63,218,177, 0, 33,255,111, 44, + 6, 8,117,224,138,241,240,217,199, 86,111,143, 41,249,163,225,242,196,154,252,242, 44, 28, 33,127, 15,137, 1, 2, 25,184,162, + 25,215, 24,192, 98,115, 96,119,105,101,204,200,239, 46,127, 52,253,253,104, 90,254, 72, 4,179,132,252, 17,140, 1, 2,173,223, +151,210,160, 14, 94, 64, 67,163, 1,111,124,188, 7,237, 86,123,204,201, 47, 87,128,104, 5,194,177, 36, 62, 33,127, 55,198, 0, +193,148, 48,143,188,245, 57,159,164,140, 54,249,131,201, 2,117,231, 67, 47,129,248,253,132,252,221,220, 3, 4,146, 6,117, 39, +195,145, 79,159, 4, 69, 81,224, 5, 17, 13,141, 6,188,246,225, 15,216,254,117, 89, 76,201, 31, 72, 38,168, 59,107,125, 66, 85, + 8, 66,254, 24, 5,193,129, 90,126, 79,132,144,142,177, 74, 5, 6,244, 77,193,138, 7,110,132,154, 83, 18,242, 19,242, 95,124, + 10, 16, 74,253,190,251, 49,173,154,195,228,107,134,197,252,162, 8,249, 9,249, 35, 22, 4, 7,147, 6,245,244,189, 13,203,239, +234,118,242,135,227,239, 19,242, 95,162,105,208, 80,234,247,163, 61, 75, 90, 40, 74, 16,142,213,239,206,107, 32, 15,184,119, 99, + 15, 16,234, 35,140, 61,129,252,222, 20,152,144,159, 32,164, 24, 32, 24, 23,136,144, 63,194,214,137,144, 63,246, 10, 16, 12,249, + 77,102,171,203,119,221, 95,119,219, 69, 93,196,228,151, 72, 77,200,223,205, 61, 64, 32,254,255,201,186, 70,151,239, 85,214,156, +239,246, 11, 10,181,182,159, 88,126,162, 0, 30, 45,168, 55,242,215,157,107,193, 11,111,127,227,242,189,213,111,126,137, 19,181, + 61, 79, 9, 2, 33,126, 79, 33,191, 55, 98, 19,242,199, 48, 8,246, 71,254,187, 30,223,132, 3, 71, 79,119, 57, 89,201,225,106, + 92,127,223, 63, 48,236,119,233,216,250,252,189, 72, 73,140,235,209, 89, 32, 66,126, 2, 69, 32, 46,144,251,235, 15,214,207,239, + 17, 1, 47, 33, 63, 65, 84,122, 0,127, 83,133,244, 84,242, 7, 18, 4,199,186, 48, 47, 18,138, 64,200,223, 13, 65,240,197, 74, +254, 64, 31,137, 36,228, 39,240,168, 0, 23, 51,249, 3, 81, 2, 66,126,130,176, 98,128,158, 14,155,205,134, 19, 39, 78,120,244, +243,163, 77,126,165, 82, 25,246, 57, 28, 14, 7, 42, 43, 43, 61, 42, 64,180,193,178, 44, 81, 0,187,221,142,170,170,170,110, 9, + 22,195, 37, 16,199,113, 13, 19, 38, 76, 72,235,206, 6,229, 56,174, 33,212,239,170,213,106,107, 94, 94, 94,183,174,211,171, 86, +171,173,151,146, 2, 80,242,149, 30,199,143, 31,127,206,106,181,118, 59,129,246,236,217,147, 14, 2,130, 88, 43, 0, 1,193, 37, + 31, 4, 19, 16, 16, 5, 32, 32, 32, 10, 64, 64, 64, 20,128,128,128, 40, 0, 1,193,111, 21, 65,141,180,116,174, 35,188, 11,192, +136,104, 9,196,178,108, 67, 81, 81, 81, 84,210,160, 68,126, 34,127,200, 10, 32, 45,162,221,185,142, 48, 74, 75, 75,209,175, 95, + 63,112, 28,231, 92, 42,213,125,192, 44,216,253,246,246,118, 76,157, 58, 53, 45,138,141,255, 93,231, 66,218, 23,173,252, 82,251, +151,148,148, 32, 35, 35,163,139,252,222,228,243,244,252,182,251,251, 70,163, 17, 51,102,204,184,164,218, 95, 17,140,240,107,215, +174,229, 38, 78,156, 56, 16, 0, 74, 75, 75, 97,181, 90,145,144,144,224, 92, 58,201,223,116,232,254,142,157, 60,121, 18,209,108, +252,181,107,215,114, 5, 5, 5, 23,173,252,107,214,172,113,182,255,254,253,251, 49,124,248,112,196,199,199,123,148, 63,148,233, + 96, 78,157, 58,117,201,181,191, 34, 24,225, 39, 77,154, 52,208,249, 69,133, 2,242, 65,180, 64, 4,140,197, 42,139,191, 85,249, + 87,173, 90,197, 77,158, 60,217, 41, 63,195, 48,206,165,108, 35, 53, 23, 82,180,201,223, 19,219, 95, 17,160,229, 81, 77,154, 52, + 41,203, 37,122,238, 44, 44,115, 95,138, 52,220, 21,215,163,100, 57, 47,106,249, 87,173, 90,165,154, 58,117,106, 23,249,221, 93, +129, 64, 31, 2,138,213,196,191, 23, 67,251,211,129, 8, 63,121,242,228,172, 46,154,211,233,183, 5,210,248,193,116,103,209,104, +252,139, 89,126, 79,228,151,122,128, 64,229,239,142, 89,240, 46,150,246, 87,132, 34,188,252, 2, 34, 41,124,164,110,192,111, 69, +126,111,228,247, 68,160, 72,144, 63, 82,229,226,129,180,255,206,157, 59,145,144,144, 0,149, 74, 5,133, 66,225,210,163,185, 43, +134,167,160, 93,146,119,241,226,197,145, 85, 0, 55,159, 45,203,219, 23,149, 74,165,199,168, 61, 92, 82, 69,216,231,188,104,229, + 95,181,106, 21,231,141,252,114,249, 61, 17, 38,148, 89, 49, 34, 21,195, 4,218,254,119,220,113, 7,250,245,235,135,248,248,120, +176, 44, 11,165, 82,233,236,213, 98,217,254,138, 64, 2, 22, 0,176, 90,173,168,169,169, 65, 77, 77, 13, 90, 90, 90,160, 82,169, +186, 8, 28,174,240,225,222, 0,127,242, 87, 87, 87,163,182,182,214, 69,254,243,231,207, 59, 23, 3,239,223,191,191, 95, 57,171, +170,170,156,190,235,101,151, 93, 22, 21,249,215,172, 89,227, 18,240, 74,242,159, 58,117, 10, 53, 53, 53,104,108,108,132, 90,173, + 14,104,174,163, 96,123,134,104,181,191,201,100,194,193,131, 7, 81, 86, 86,134, 35, 71,142,160,173,173, 13, 90,173,214,101, 1, +246, 64, 45,191,252, 1,167, 37, 75,150, 68, 78, 1, 4, 65,216,213,153,167, 29, 40, 8, 2,234,235,235, 81, 81, 81,129, 99,199, +142,161,169,169, 9,113,113,113, 72, 73, 73, 65, 66, 66, 2,226,227,227,157, 66, 7,154,126,139,118, 22, 37, 20,249, 75, 75, 75, +113,219,109,183,225,179,207, 62,115, 90, 85, 79,126,165,244,126, 81, 81, 17,238,185,231, 30,108,222,188, 25, 57, 57, 57, 17,151, +191, 51,207, 63, 80, 16, 4,212,213,213,225,232,209,163,168,168,168, 64, 99, 99, 35,226,226,226,144,148,148,132,164,164, 36,104, +181, 90,159, 6, 40,214,228, 15,166,253,103,204,152,129,164,164, 36,232,116, 58,104, 52, 26,231, 88,128, 55, 62,197, 50, 11, 52, + 34, 39, 39, 7, 27, 55,110,196,137, 19, 39,192, 48, 12,122,247,238,141,212,212, 84,244,237,219, 23, 44,203, 66,161, 80,128,227, + 56,167,239, 38,247,165, 35,177, 16, 93,152, 8, 90,254,178,178, 50, 28, 56,112, 0, 20, 69, 33, 61, 61,221,171,245,145,182,189, +123,247,162,168,168, 8,162, 40,226,190,251,238,139,138,252, 47,191,252, 50, 42, 43, 43, 65,211,180, 83,254, 17, 35, 70, 56,173, + 37,199,113, 80,171,213,206,215, 61,104,213, 75,175,237,191,103,207, 30, 80, 20,229, 92, 8, 92,161, 80, 56,221, 30,121, 12, 16, +136,229,151,247, 0, 75,151, 46, 13,171,253,187,196, 0, 38,147, 9, 58,157, 14, 19, 39, 78, 68, 98, 98,162,139,127, 44,117,185, + 74,165, 18, 74,165, 18, 28,199,129,166,105,231,178,158,145,112,135,194, 69,176,242,151,148,148, 56, 63,179,111,223, 62,167,123, + 35,109,210,107,249,251,210,126, 52,228, 55, 26,141,208,104, 52,200,207,207, 71, 66, 66, 66, 23, 2, 72,132, 97, 89, 22, 44,203, + 58,219, 62,208, 65,164,104,199, 48,222,218,127,193,130, 5, 93,218, 95,165, 82, 57,247,221,149, 32, 86,252,233,162, 0, 90,173, + 22, 35, 71,142, 4,207,243,206, 28,173, 60,119, 43, 17, 94,169, 84, 58, 47,198,211, 40,100,168,238, 80,184, 8, 86,254,170,170, + 42,212,213,213,161, 95,191,126, 65,145, 84,167,211, 69, 69,126,141, 70,131,203, 47,191, 28,130, 32,116, 25, 40,146,218, 76,146, + 95,110, 61,165, 99,221,189, 24,136,183,246,127,227,141, 55,186,184,147, 18,111,188,101,128,124,197, 3,210,182,108,217,178,200, + 42,128,212, 53,201,211,108,158, 86,142,151, 91,126, 79,214,159,231,121,212,215,215,227,244,233,211, 56,119,238, 28, 26, 27, 27, +209,210,210,130,182,182, 54,172, 91,183, 46,106, 55, 32, 88,249, 1, 56,201, 95, 88, 88, 8,154,166,145,151,151,135,156,156, 28, +164,164,164,160,169,169, 9,229,229,229, 40, 42, 42,130, 32, 8, 40, 44, 44,132, 78,167,243,154,117,137,132,252, 44,203, 66, 16, + 4,175,105, 78,185, 34, 72,251, 99,199,142, 69, 67, 67,199,243,248,233,233,233, 40, 41, 41, 9,169, 52, 34, 90,237,255,240,195, + 15, 7,197,159,110,201, 2, 73, 3, 44,210,116, 28,158,186,121,249,107,134, 97, 96, 48, 24, 80, 91, 91,139,179,103,207,226,215, + 95,127, 69, 75, 75, 11, 12, 6, 3,204,102, 51, 12, 6, 3,244,122, 61, 90, 91, 91,161,215,235,157,251,235,215,175,143,218, 32, + 76,176,242,187,143, 78,206,155, 55, 15,153,153,153,206,247,250,244,233,131, 62,125,250, 96,240,224,193,216,186,117,171,203,231, +163, 33,191,228, 31, 75,238,150,175,153,186, 37, 34,181,182,182, 34, 43, 43, 11, 21, 21, 21, 0,128, 25, 51,102,192, 96, 48, 32, + 57, 57, 57,230, 99, 0,222,218,127,195,134, 13, 30, 19, 11,238,214,125,209,162, 69, 49, 93,187,185,139, 2, 72,141, 42, 31,110, +247, 37,200,179,207, 62,219,133,224,122,189, 30, 70,163, 17,130, 32, 32, 62, 62, 30, 67,134, 12,193,232,209,163,145,157,157,141, +167,159,126, 58,170, 55, 33, 88,249, 1,160,161,161, 1,105,105,105,200,203,203,115, 33, 63, 69, 81, 78, 55, 36, 51, 51, 19,121, +121,121, 0, 58,170, 14,213,106,117, 84,228,151,206,227,137,252,130, 32,224,209, 71, 31,197,153, 51,103,240,204, 51,207, 96,196, +136, 17,160,105, 26,122,189, 30,227,198,141,195,233,211,167,157,189, 65,107,107, 43, 82, 82, 82, 64, 81, 20,126,249,229, 23, 44, + 90,180, 8, 3, 6, 12,192,107,175,189,230, 50, 6, 18,233, 76,144,183,246,127,244,209, 71,163, 50,240, 24,110,251,251, 92, 35, + 44, 16, 65,222,125,247, 93,208, 52,141,254,253,251, 99,200,144, 33, 24, 63,126, 60,134, 12, 25,130,236,236,108,100,103,103, 59, + 51, 43,210,119,188, 41, 64, 36, 39,173, 10, 54,245,151,150,214, 81, 65,155,147,147,227,114, 14,119, 72,199,213,106,181,199, 2, +174, 72,201,238,109,116,247,177,199, 30,195,232,209,163,241,204, 51,207, 96,233,210,165, 72, 79, 79,199,220,185,115,241,254,251, +239, 99,236,216,177, 48,153, 76,160,105, 26, 57, 57, 57,216,188,121, 51,230,206,157,139,109,219,182,129,231,121,108,221,186, 21, +159,124,242, 9, 22, 44, 88,128, 55,223,124, 51,170,165, 28, 20, 69,225,240,225,195, 80, 40, 20,184,252,242,203, 35, 90,236, 22, +105,227,233,119,165,248, 64,162,238,211,167, 79, 67,165, 82, 5, 76,184,104, 79, 87, 24,172,252, 18, 82, 82, 82,156,251,238, 1, +180,251,113,247,152, 34,146,240,214,142,146,229, 23, 4, 1,155, 54,109,194,127,254,243, 31,172, 88,177, 2,243,231,207,199,204, +153, 51,113,224,192, 1,208, 52,141,155,110,186, 9,241,241,241,120,231,157,119,176, 96,193, 2,164,166,166,162,173,173, 13,179, +103,207,198,206,157, 59,163, 94,202, 65,211, 52, 56,142,195,176, 97,195,160, 80, 40,192,243,124,196,210,228,145, 54,158, 62, 87, +138, 15, 52,107,227,141,252,222, 26, 56,154,228, 15, 69,254,166,166, 38,103,192,219,167, 79, 31,175,231,110,106,106, 2,208, 49, +253, 34,203,178, 81,155,107,212,155, 2,255,253,239,127,199,146, 37, 75,240,230,155,111, 98,207,158, 61,200,205,205,197,167,159, +126,138, 51,103,206,160,164,164, 4, 22,139, 5, 42,149, 10,229,229,229, 24, 62,124, 56,198,140, 25,131,134,134, 6, 28, 61,122, + 20, 67,135, 14,197,147, 79, 62,233, 76, 64, 68, 43, 11, 39,157, 39, 39, 39,199,133,252, 47,190,248,162,139, 81, 9,118,212,215, +219,177,167,158,122, 42,188,152, 43, 16, 2,249, 11, 60,130, 77,115, 70,179,126, 62, 20,249, 37,203, 94, 94, 94,238, 84, 0,249, + 57,164, 56,160,188,188, 28,192,133, 57, 52,163, 65,126, 95,237,154,147,147,131,126,253,250,225,219,111,191,197,168, 81,163,112, +248,240, 97,148,151,151,163,162,162, 2, 95,127,253,181,115,240,105,244,232,209,152, 59,119, 46,134, 14, 29,138,182,182, 54,164, +164,164,224,244,233,211,136,139,139,195,200,145, 35,163, 58, 14, 32, 63,143,220,242,187,199, 0,225,150,204, 68,138, 63,138, 96, +253, 80, 79,214, 59,216, 72, 61,218, 19,237, 6, 43,191,132,162,162, 34, 12, 30, 60, 24,153,153,153,112,159, 49,175,166,166, 6, + 69, 69, 69,136, 54,252,185,138,119,222,121, 39, 10, 11, 11,177, 99,199, 14,148,151,151, 99,199,142, 29,216,189,123, 55,150, 47, + 95,142,113,227,198, 1, 0,138,139,139,177,112,225, 66, 60,242,200, 35,152, 53,107, 22, 88,150,197,178,101,203,240,224,131, 15, +198,164, 28,218, 83,251,191,240,194, 11, 93,122,128,112, 44,191,180,191, 98,197,138,232, 41, 64, 32,218, 25,168,171,225,237,153, +213,104, 42, 64,160,242, 75, 55, 70, 16, 4,108,221,186,213,231, 56,128,183,248, 32, 90, 10, 44,245, 64, 6,131, 1, 45, 45, 45, +216,182,109, 27,230,207,159,143,179,103,207,162,162,162, 2,187,119,239,198,247,223,127,143,196,196, 68,231,231, 51, 51, 51, 49, +125,250,116,228,231,231,163,160,160, 0,105,105,105,152, 54,109, 26,222,121,231, 29,204,159, 63, 31,169,169,169, 72, 74, 74,138, +218,179, 12,158,218,255,177,199, 30,139,152,191, 31, 73, 89, 21,225,100, 80,130,125, 32, 35, 22,115,243,135, 42,191, 52, 16, 22, +204, 13,142,149, 2,228,229,229, 33, 43, 43, 11, 99,199,142, 69,126,126, 62,102,206,156,137,146,146, 18,236,218,181, 11,203,151, + 47,119, 33,191,180, 37, 36, 36, 96,197,138, 21,216,182,109, 27,150, 45, 91,134,169, 83,167,226,220,185,115,120,225,133, 23,112, +224,192, 1, 52, 54, 54,226,212,169, 83, 81,115,129,220,183,245,235,215,187, 60,253, 21,142,229,151,255, 86, 84,122,128, 96,179, + 40,221,161,185,209,200, 2,245, 4,120,114, 21,207,157, 59,135,138,138, 10,212,213,213,193,100, 50,225,208,161, 67,176,219,237, +168,172,172,196,184,113,227,188,182,121, 94, 94, 30, 94,121,229, 21,172, 94,189, 26,245,245,245,184,245,214, 91,193,113, 28,180, + 90, 45,122,247,238, 29, 53, 23,200, 83,251, 63,254,248,227, 61,202,242, 71, 52, 11,212,147,200, 31,138,252,102,179, 25, 26,141, + 38,224, 82, 8, 65, 16,162,218,155,121, 35,165,124,244, 87,173, 86, 59, 71,178,125,181,189,188,196,216, 93,230,104,142,193,184, +203,181,110,221, 58,143, 61, 92, 40,150, 63,234, 61, 64, 48, 3, 23,254,110, 64,119,173, 44, 19,140,252, 26,141, 38,168, 82,136, +104,147,223,189, 93,211,211,211, 49,125,250,116,140, 27, 55, 14, 57, 57, 57,184,233,166,155,112,226,196, 9,140, 25, 51, 6,197, +197,197,200,204,204,244,120,109,251,246,237,195,172, 89,179,208,222,222, 14,173, 86,139, 45, 91,182,160,178,178, 18,135, 15, 31, + 70, 70, 70, 70, 84,221, 82,119, 89, 22, 45, 90,212,173, 79,170,133, 60, 18,236, 47,144,244,149, 6, 61,120,240, 32,182,111,223, +142, 51,103,206,160,166,166, 6,201,201,201, 61,138,252,238, 13, 43, 47,133,144, 7,200,238,165, 16,177,144, 95,126, 29, 37, 37, + 37, 48, 24, 12,104,109,109,197,219,111,191, 13,150,101, 49,126,252,120,204,155, 55, 15,127,253,235, 95, 49,125,250,116,103,233, +180,116,109, 70,163, 17,133,133,133,216,191,127, 63,172, 86, 43,118,238,220,137,214,214, 86,172, 88,177, 2, 41, 41, 41, 72, 78, + 78,142, 42,249,139,139,139,193, 48, 12,198,142, 29, 11, 0, 88,179,102,141,215, 94, 34, 88,203, 31,213, 30, 32,216, 28,173, 39, + 5, 16, 4, 1,111,189,245, 22,244,122, 61,180, 90, 45,218,219,219, 81, 91, 91,235,172,183,239, 41,228,151,228,151,106,123,228, +165, 16, 18,241,229,227, 0,210,241,104,186, 64,222,220,183,228,228,100,164,166,166, 98,206,156, 57, 88,178,100, 9,102,205,154, +133,236,236,108, 44, 90,180, 8,249,249,249, 88,177, 98, 5,242,242,242, 64, 81, 20,246,237,219,135,194,194, 66,252,243,159,255, + 68, 92, 92, 28,204,102, 51,182,108,217,130, 45, 91,182, 32, 59, 59, 59, 38,150,159,101, 89, 12, 29, 58,212, 89,215, 36,127,120, + 61,152,146,237,104,195,107, 16,236, 73,176,195,135, 15,227,179,207, 62,195,217,179,103, 81, 83, 83,131,164,164, 36,143, 55,107, +229,202,149,168,174,174,198,128, 1, 3,160,215,235,209,212,212,132,246,246,118,240, 60,143,244,244,232,175,126, 20,236, 52, 26, + 82,109,143,167, 82, 7,249,120,128,116, 60,218,217, 44, 95,114,111,221,186, 21, 15, 62,248, 32,154,155,155,209,220,220,140, 89, +179,102, 97,194,132, 9,216,182,109, 27, 54,110,220, 8,134, 97, 48,107,214, 44,236,223,191, 31,113,113,113,206, 1,176,185,115, +231, 98,211,166, 77,120,233,165,151,162, 46, 63, 77,211,184,250,234,171, 93,138,250, 86,175, 94,237,215,226, 7,106,249, 99,214, + 3,200,107,251,223,123,239, 61,152,205,102,196,199,199,163,186,186, 26,117,117,117, 40, 46, 46,118, 33,132,116,147, 62,248,224, + 3, 40,149, 74, 84, 85, 85,193,108, 54,163,161,161, 1,173,173,173,224,121, 30,119,223,125,119,183,165, 65,253,101,129,228,165, + 16,238,228,151,142,199,218,133,147,203,125,228,200, 17,212,213,213, 97,234,212,169, 56,118,236, 24,250,247,239, 15,157, 78, 7, +149, 74,133, 39,158,120, 2, 43, 87,174, 4, 69, 81, 48,155,205,176,217,108,104,111,111,119,246, 0,183,223,126, 59,110,185,229, + 22, 28, 58,116, 8,163, 70,141,138, 73, 18, 66,158,246, 92,178,100,137,223, 88, 44,150,150, 63,224, 24,128,162, 40,252,227, 31, +255, 64,125,125,189, 79,139, 46, 23, 94,167,211, 57,171, 1,121,158,135,221,110,135, 40,138,120,242,201, 39,177,108,217,178,110, + 25, 11,240,149, 5,146,106,123,228,165, 16,158,226, 0,169, 20, 34,218, 46,144, 55,185, 23, 47, 94,140, 55,223,124, 19, 6,131, + 1,131, 7, 15,198,151, 95,126,137, 87, 95,125, 21,247,222,123, 47,102,204,152,129,250,250,122,103,134,104,231,206,157,206,138, +208,219,111,191, 29, 10,133, 2,133,133,133,120,232,161,135,240,195, 15, 63,196,188,253, 87,175, 94,237,181, 22, 40, 88,203, 31, +245, 44,144,187,240,219,183,111, 7,203,178, 30, 45,250,156, 57,115,186,104,238,187,239,190,139,133, 11, 23,162,182,182, 22,113, +113,113, 72, 78, 78,198,210,165, 75,113,245,213, 87,119,171, 5,245,102,121,164,218,158, 64, 75, 33, 98,229, 2,185,203,221,191, +127,127,124,250,233,167,152, 57,115, 38,238,191,255,126, 12, 26, 52, 8, 27, 54,108,192,214,173, 91,209,212,212,132, 59,238,184, + 3, 20, 69, 97,243,230,205,104,109,109,197,150, 45, 91,176,105,211, 38,220,114,203, 45, 40, 44, 44,196,215, 95,127,237,146,225, +138,101,251, 47, 93,186,180, 71, 89,254,160,130,224,184,184, 56,252,242,203, 47, 93, 44,250,178,101,203, 92,158,201,148, 48,104, +208, 32,124,242,201, 39,221, 58,144, 20,108, 29,144,100,217, 3, 41,133,136,197, 53,120,146,253,181,215, 94,195, 3, 15, 60,128, +207, 62,251, 12,235,214,173,195, 21, 87, 92, 1,138,162, 48,127,254,124,172, 91,183,206,169,200,149,149,149, 88,177, 98, 5,178, +179,179,177, 97,195, 6, 28, 60,120, 16, 15, 61,244, 16, 50, 51, 51,177,101,203,150,110,105,255,231,159,127,222,111, 53,104, 40, +191, 21,181, 30, 64, 46,252, 91,111,189,133, 39,158,120,194, 25, 80,201, 45,122, 79, 28, 81, 13,118, 26, 22,201,165, 9,180, 20, + 34,218, 46,144, 55,217,149, 74, 37, 54,109,218,212,229,120,106,106, 42, 14, 30, 60,232, 28,207,248,249,231,159,145,146,146,226, +252,220,168, 81,163,162,238,246,248,187,134, 39,158,120,162, 71,142,200, 7,148, 5, 26, 52,104, 16, 62,252,240,195,139,166,156, + 32,216, 44, 80,176,100,238,142, 44,144, 47,242, 36, 37, 37,161,169,169, 9,189,122,245, 2, 0,100,100,100, 56, 31,135,236, 41, +237,255,220,115,207,121, 29, 3,136,165,197, 15, 41, 11,116, 49,214,210,132, 34,127,160,165, 16, 61, 73,126,233,125,121, 97, 91, +119,141,190,251,146,127,249,242,229, 61,146, 63, 1, 5,193,209,122,122,168,187,131, 96,119,151, 38,208, 82,136, 88,215, 2, 5, + 90, 54,208,221,228,191, 24,249, 67, 95,234,228,151,187, 52,238,165, 16,242,207,201, 75, 33, 98,233, 2, 5, 50, 1,238,165, 74, +254,167,159,126, 26, 14,135, 35,122, 61,192,197, 70,254,112,229, 15,180, 20,162, 39,100,177,122, 34,249, 99,205,159,112,159, 7, +246,216, 3,248,203, 68, 92, 12, 8, 86,126, 41,189, 25,104, 41, 68,180,211,161, 23, 51,249, 47, 54,254,116,233, 1,236,118, 59, +170,170,170,188,206,224, 21, 77, 40,149,202,176,207, 17,138,252,146, 75,227, 62, 43,132,148,183,150,148, 64, 42,133,144, 62,127, +252,248,241,136,203,223,214,214,134,147, 39, 79, 6, 52,147, 70,164,137,213, 93,237,223,157,252,161,228, 22,110,252,248,241,231, +172, 86,107, 90,119,106, 36,199,113, 13,123,246,236, 9,169, 98,238, 98,151, 63, 47, 47,239,156,205,102, 35,237, 31, 67,249, 41, +247, 33,127, 2,130, 75, 9, 52,105, 2, 2,162, 0, 4, 4, 68, 1, 8, 8,136, 2, 16, 16, 16, 5, 32, 32,184, 84,160, 32, 77, + 64, 16, 43,116,174, 35,188, 11,192,136,104,253, 6,203,178, 13, 69, 69, 69,233, 68, 1, 8,122, 34,249,191,235, 92, 7, 25,165, +165,165,200,200,200,112, 89,112, 93, 94, 99,229, 62, 33,152,251,190,167,105, 18,205,102, 51,166, 77,155, 22,212, 56, 4, 81, 0, +130,152,145,127,237,218,181,220,196,137, 19, 7, 2, 64,105,105, 41, 44, 22, 11,226,227,227,157,139,100, 7, 82,248,231,235,248, +169, 83,167,130,119,129,180, 90,117,161,213,106, 91,198,243, 66, 64,202, 64, 81,148, 77, 20,197, 66, 81, 20, 87,246,132,198,213, +106,181,163,173, 86,235, 40,158,231, 3,141,103, 4, 0,165,162, 40, 30, 36,242,199,142,252,107,214,172,225, 38, 77,154, 52,208, + 25,124,210,180, 75, 77, 85,119,205, 26, 77, 91,173,182,101, 21, 71, 15, 43,236, 54, 51, 2,217, 78, 28, 63,102, 7,240, 84, 79, +105, 96,171,213, 58,234,216,209,159,105,155,173, 13,129,108,149,149,149, 2,128,209, 68,254,216,145,127,245,234,213,170,201,147, + 39, 15,148, 31,147,175,208, 25,238,242, 73,225, 20, 3, 42,120, 94, 80,100,102, 13, 68,123, 91, 51, 4,158,239,124,251, 66,121, +132,123,161, 68,159,244,228,115, 0, 6,245,148, 70,230,121,158, 30,144,149, 5,171,185, 5,188,157,247,251,249,140,244, 20, 51, +128,120, 34,127,236,200, 63,101,202,148, 44,247,227,242,181,129, 35,185,118, 88,200, 89, 32,158,119, 64, 16,188, 60, 92, 32,211, + 2, 65, 20,248,158,216,224,188,157,135, 0,187,119,167,225,194,117,138, 68,254,238, 37, 63, 0,231, 10,247, 82, 15, 16,169,133, +243,130,118,129, 92, 8, 46,202, 55,209,185, 88,179,203,159, 40, 40, 0, 88, 40,138,202,232,113, 45, 47,184,110,188,180,225,194, + 6, 70,160, 0,240, 20, 69,105,137,252,209,245,249,189,145, 31, 0, 56,142,243,152,201, 9,228, 41,184,136,175, 20,111,104,109, + 64,217,222,143,209,110,110,237,208, 5, 81,102,244,157,251, 29, 59, 12,163,232,181,112,225, 35,150,245,235, 95,170, 81, 40,152, + 46, 61,132, 8, 80, 93,220, 40, 17, 93, 36, 19, 69,209,229, 61,134,166, 29,156, 74,241,108, 91,155,181, 48,216,139,208,183,156, + 71, 89,209,246, 14, 55,194, 15,193, 40,134, 81, 47, 92,248, 48,191,126,253,134,255, 39,173,104,238,197, 38,203,172, 46,252,182, + 44,195, 48, 2,199,209, 7,218,218,108, 63, 93,106,242,123,202,246,200, 3,222,206, 88, 7,213,213,213,168,173,173, 69,115,115, + 51, 84, 42,149, 71, 34,119,203, 66,217, 12, 67, 65,171, 85,129,161, 53, 78,162,139,157,204,117,233, 32, 58, 94,235,230,255,113, + 22, 30,127,228, 1,240, 98, 71,223, 76,137,148,143,124,173,139,138,119,252,115,211,122, 0,168,169,169, 81, 92, 61,118,234, 50, + 0, 65, 43,128,146,166,161,211,169,160,100, 52,174, 94, 3,207,123,162,132,242,191,255, 56, 27,143, 63,242, 23,240,146,111, 33, + 56,149,208, 75, 23, 41,177,196, 35,117, 0, 0,181,181,167,232, 49, 99,175, 29, 5,224,167, 75, 77,126,167,204,130,176,107,253, +250,245,108, 65, 65,193, 64, 65, 16, 80, 95, 95,143,163, 71,143,226,216,177, 99,104,108,108, 68,124,124, 60,146,147,147,145,144, +144, 0,157, 78,231, 18, 7, 68, 34, 22, 8, 41, 8, 6, 0,135, 67,128,222, 96,134,185,205,212,225,250,200, 76,183,232, 18, 7, +116,188, 58, 80,252, 37, 56,117, 28,104,154,113,237, 33,220,194,103,151, 71, 13, 68, 23,235, 47,239, 29, 0,136,104,105,213, 67, + 16,132,144,198, 37,236,130, 0,189,222, 12,179,217, 8,240,240, 97, 69, 59,152, 82, 86,242, 37, 84,170, 78,249, 93, 93,108, 23, +186,241,130, 95,227,234, 68,139, 94,143, 32, 82,153,191, 41,249,101, 24,145,147,147,131,141, 27, 55,162,178,178, 18, 12,195, 32, + 45, 45, 13, 41, 41, 41,232,219,183, 47, 88,150,133, 66,161, 0,203,178, 80,169, 84, 80, 40, 20,206, 88, 32, 82,129,112, 72, 10, + 64, 51, 20,180, 90, 14, 12,165,242, 72, 78,207,251, 14,160, 51,104,147,247, 16,148,236,187,148,139, 27, 36,202,222,239, 84, 16, + 0, 84,231,121, 41,209, 22,114,171, 51, 52,160,137,227, 64,211, 26, 64,150, 91, 22,186,220,116, 94,118,255,237, 78,249,105, 15, + 95, 16, 0, 48, 46,209,103, 23,199,194,141,155,214, 75, 86,126, 57,140, 70, 35,226,226,226, 80, 80, 80,128,196,196, 68,103,206, + 95,250, 47,205,112,199,178, 44, 56,142, 3,195, 48,224, 13,191,162,242,229, 63,194, 84,127, 2,234,212, 62,232,115,221,253,232, +123,221,159, 98,151, 5,226, 29, 2, 12,134, 54,152, 77, 38,167, 29,119,181,222,162, 71,203, 46, 87, 10,207,150,221,165,227,112, + 59,175,235,111, 24, 77,237, 97,101, 80,140,122, 19,204, 38, 83,231, 45,231,187, 88, 60,127, 86,181,163, 11,247, 98, 44,121, 31, +166,211,121,227, 45,151,172,252,114,104,181, 90,228,230,230,130,239,116,223,220, 75, 23,104,154, 6,195, 48, 80, 42,149,206,255, +245,223,191,139,120,241, 87, 76,248,195, 52,152,205, 54, 28,248,250,101,180, 85, 31, 68,246,127,189, 8,202,205, 77,138,116, 22, +168,179, 7,160,161, 85,115,160, 68,149, 71,114,250,238, 21,124, 17,219,237, 60,178,232,218, 61,198,176,217,194,152,223, 69,201, + 64,163,225, 0,112, 30, 83,135,130, 7, 75,232,219, 26,194,179, 21,134,224,193,146, 74, 65,158,253,210,149,223, 45,189,201,178, +172,199,137,112,229,164,101, 24,198, 89,254,208,123,220, 45, 56,242,239,183,208,124,166, 30,189, 47, 27,141,252,153,105, 56,244, + 99, 41, 14, 61, 61, 3,151, 47,254, 8, 92, 66,106, 80,235, 80,135,208, 3,240,208, 27,219,209,102, 50,249, 32,185,220,154,123, + 39, 54,220,131,103,209, 67,108, 32, 63, 79,231,126,155, 57,244, 30, 64,176,243,157, 62,180,201,171, 37,116,181,134,188,255,116, +164,243,159, 16,208,121, 44, 22,235, 37, 43,191,187, 2, 72,217, 41,249, 2, 25,238,171, 86,202,211,157,218,126,195, 48,124,241, +199, 40, 91,123, 39, 70,216,129,126, 87, 78,192,149,215, 77, 69,213, 79, 37,248,105,201, 4, 92,177,108, 7,226, 6, 92, 22,149, + 64, 88, 33,105,166, 70,211,209, 3,136,110,126,203, 5, 87,198,179,245,118,241,239,221, 93, 38,209, 45, 56, 22,157,148,151,157, +171,227,188,118,123,232, 61, 0,205, 48,208,104, 84,174, 22, 20,192,254,210, 74,236, 46, 58, 14,163,217, 10,187,213, 2,179,197, + 14,171,213, 14,139,197, 10,171,213, 2,139, 37, 50, 86, 79,150, 74, 4, 69, 81,243, 61, 26,121,165, 82,200,205,205,174, 40, 45, + 61,242,227,111, 77,126,247, 92,190,167, 1, 46,209,110,197,233,119,151,192,112,244, 71,240, 86, 43, 68, 81,232,224,137, 32,116, +236, 3,160,104, 26, 63,255,116, 28, 84, 66, 6,250, 93, 54, 28,131, 70, 95,131,248,228, 36,148, 61, 53, 29,195, 31,252, 39,122, + 95, 61,195,239,106,165,161,245, 0, 60, 15,131,193,140, 54, 83,155,171,239, 47, 39,189,232, 94, 30,209, 53, 67, 36,122, 32,182, + 63,215, 71,218, 55,182,133,238,131, 10, 60, 15,189,201, 12,179,209,236,242,254,238,162, 10,124,248,225,199, 72, 77,237,214,153, + 58, 0, 0,167,170, 79,209,185, 87,140, 29, 6,224,199,223,154,252,158, 6,179,220, 21,224,220, 87,175, 65,107,169,195,149, 55, + 95, 15, 5,203,130,162, 21,160, 24, 69,231,127, 6,160, 24,128,162, 59, 54, 5, 7,209, 97, 5,236,102,244,250,221, 80,228, 39, +245,194,254,215,255,130,182,211, 11, 48,232,247,139,124, 46,178, 17,114, 15,160,213,176,128,168,114, 33,231,129, 67, 39,241,195, +222, 10,152,219,109,176, 90,237,176,217,236,176,118,110, 29,251, 14, 88,173,118,103,192, 19, 46,104,154, 22, 40,138, 18,189, 52, +108,187, 40,138,203, 68, 81,124,193, 83,174, 91,167,225, 0, 94,229,102,181,104,164,166,166,162,249,252, 47,176,243,246,110, 37, +144, 89,223, 8,187,221,238, 49,205,232, 95,254, 10, 8,188,165,199,202,239, 73, 9,228, 10, 64,211, 52, 4, 91, 59, 52, 26, 53, + 88, 88, 65,241, 60, 32, 42, 0, 81, 9,208, 10,136, 80, 1,124, 27, 64, 43, 58, 20,193,110,238,224,161, 82, 5, 56,172,208, 38, + 38, 96,194, 31,110, 65,233,151,239,192, 84,125, 24, 87, 44,124, 7, 20, 69, 71, 48, 11,196,243, 48,152,204, 48, 25,218, 92, 44, +251,190,210, 74,188,247,193,118,164,166,164,198,170,157,189, 54,112, 93,125,157, 58,103,248, 85,171, 0,188,224, 49,143,110, 52, +195,168, 55,187,249,199, 12,120, 0,118,187, 21,118,187,185, 91, 9,228,235,247,125,201, 47,125, 87,250,109,244,155, 0, 0, 15, +139, 73, 68, 65, 84,176, 91,122,172,252,222, 20, 64, 78,208,180,201,243, 80,189,249, 17, 28, 43,251,218,101, 36,148,102,148,184, +108,250, 31, 48,160,175, 14, 52, 4, 80,140,162,147, 6, 2, 68,222, 1,128, 2,120, 27,148, 20, 48,118,246,141, 56,240,239,239, +112,244,159,143,227,242, 5, 47, 70,100,218, 69,103, 15,160, 86,115, 16, 29,156,139,203,194,178, 92,199, 28,249, 13,229,224, 29, +221,123, 3,172, 70, 19,236, 14,135,210,115, 30,157,134, 70,163, 4,236, 92,103,144,215,225, 83,114, 42,165,223,244,159, 39,180, +181, 89,152,219,231, 46,186,231,195,119, 87,111,214,106, 85, 62,190, 28,196,121,121, 95,227, 0,222,229,151, 50,255, 60,130,155, +143,244,127,191,252,177,239,187,239,125, 49,254, 68, 85, 77,142,213, 98,211, 90,109, 14,117, 74,114,252,153,204,254,125,170,102, +207,158, 92,124,215, 31,174,175, 14, 46, 87, 27, 56,249, 61,109,234,180, 44,228, 44,221,225,236, 17,108, 77,245, 40, 95,119, 23, +134,142,157,128,140,172, 94, 16,173, 6, 80, 12, 11, 42,121, 16,232,129, 5,160,226, 51, 0,138,134,216, 90, 3,225,196, 55, 16, +206, 30, 4,218,155, 49,114,210, 68,236,217,177, 19,167,191, 30,133,204,233,247,134, 61,237, 98,103, 15, 32,192,104, 48,195,100, +108,115,241,203,133,206,224,196, 97,111,135,195,238,158,165,137,109, 81,162,193,208,234,253,222, 8, 2,140,122, 51, 76, 38,147, +107,114,131,151,229,252,130,112,211,238,156,183,120,222,241,202,154,209,119,206, 91,204,127,246,225,250,205,145,144, 95,240, 65, +224, 72,202, 95, 87,127, 94,245,167, 7,254,246,199,170, 83,117, 93,214, 66, 61,255,107, 75,214,249, 95, 91,178, 74,202,202,167, +252,207,251, 95,236, 95,249,212,130,237, 35,134, 15, 49,132, 43,191, 7, 87,214,171, 50,208, 52, 13,227,137,159, 80,249,234,253, +184,114,230, 77, 72, 74,100, 33,182,253, 10, 40, 84,160, 6, 78, 4,147, 61, 19,148,252,209,200,180, 17,160,123, 15, 7,127,236, + 11, 56, 14,109, 3, 99,105,196,152,233, 83,177,251,237, 39, 48,224,218,187, 65, 43,185,240, 93, 14,154,166,160, 81,179,208,104, + 56,104, 53, 28,180, 26, 21, 52, 26, 14,106, 21,235, 12,128, 69, 81,232,214, 13,162,224,199,130,118,200,172,235,220, 52, 26, 14, + 42,141, 74,118,243, 2,219, 22,175,216, 48,225, 68,213,233,145,162, 40,210, 39,170, 78,143, 92,188, 98,195, 4, 4,241,125,239, + 27, 31, 19,249,239, 89,240,244,189,158,200,239,110,168,143, 86,156, 26, 59,111,254,211, 11,143,252, 82, 25, 31,174,252,129,244, + 0, 18,249,207,255,248, 17,170,254,249, 23,140,189,229, 54, 36,105,108,128,185,177,227,222,198,247, 3, 53,248,122,240,130,128, +242,234, 70,124,252,159,227,216,250,101, 57,126,248,185, 14,102,171, 29, 24, 50, 29,162,185, 25,142,159,223, 7,123,182, 8,189, +250, 15,192,249,178,111,194, 79,219, 58,123, 0, 83, 59, 12, 6,115,215,154, 29, 81,236, 16, 80, 12,174, 11, 22, 35,220, 67,136, +190, 44,168, 93,128,222,100,134, 73,111,118, 79,175, 72, 85,101, 16, 2,184,129, 95,127,187, 63,253,171, 93,123,103,216,237, 14, +117,135,223,235, 80,127,181,107,239,140,201,147, 70, 85, 94, 55,229,154,115,209,234,221,252,203, 47, 89, 97,255,215,240,208,159, +111,223,241,248,146,151,114,120, 94, 80, 14, 30,212,255,167, 27,103,230,255,144, 55,110,196, 25,157, 70,237,216,245, 93,201,128, +157,159,255,152,127,162,234,244, 85, 0, 96, 48,182,245,190,231,129,191, 61,188,235,243,151,158,139,215,105, 29,145,186, 30,143, + 51, 90, 83, 20,170,223, 43, 68,123,101, 17,198,223,114, 51, 88,235,175, 16,237, 14, 80, 52, 3, 80, 60,196,172, 2,240,130,136, +170, 51,173,248,170,184, 22, 14, 94, 64,217,241,243, 56, 81,223,138,255,186,113, 56,230, 93, 55, 12,226,184, 71,129,202,175, 32, +154,206,163, 79,223, 43,112,122,215,102,244,185,230,134,240, 21,128,166, 41,168,212, 44,120, 7,235, 82, 10,173, 86,113, 78,242, +137, 98,164,231,196, 15, 82, 65,124,253, 62, 3,104, 56, 14,130,198, 53, 68,224, 56,213, 5,218,248, 17,191,185,197,168,124,234, +153, 77,127, 50,181,181,187, 44, 18, 96,106,107, 79,121,234,153, 77,127,186,106,100,206,234,228, 36, 93,200,169, 36, 94, 8, 85, +254, 78, 5, 14,240, 57,164, 27,174,205, 59,115,160,236,248,219, 0,176,124,241, 31, 75,228,199, 6,221,211,239,232,253,247,220, +114,116,229,250,119,126,218,242,206,231,255, 37,138, 34,221,210, 98,204, 40,252,251,155, 19,214,175,124,232, 59,223, 62,144, 16, + 84, 15, 32, 31, 19, 16,108,237, 40,127,233, 30,232, 88, 1,215, 92, 63, 25,140, 96, 70, 59,155, 14, 7,197, 33,206, 92, 9, 10, + 20, 4,109, 31,136, 14, 7,246,254,114, 14,103,154,218, 80, 90,113, 14,166,246,142,230,254,240,187, 74,220,150,159, 5,174,119, + 46,104,138,134,216,222,130,132,140,120, 28, 61, 88, 18,153,172, 11,207, 11, 48,153, 44, 48, 24,218,161, 55,154, 97,232,220,120, + 94,144, 30,130,137,194, 38, 6,176,185,126,222,215, 56,128,201,108,134,209,104,133,222,104,118,110, 78,210, 8,254,187,248, 57, +247,174,248, 83,123,187, 37, 94,171, 85, 55,201,207,173,213,170,155,218,219, 45,241,115,238, 93,241,167,142,126, 36,180,205,103, + 53,143, 79,249,133, 78,229,241,190, 89,173, 22,250,131,143,119,101, 73,175,151, 47,158, 87,178,124,241,188, 18,111,159, 95,250, +232,156,178,105,147,175,218, 33,253,254, 55,223, 22,207,180, 90, 45,244,209, 99, 85,186,255,253,170,168,175,167,239,240, 65,246, + 0,206, 96,183,229, 44,126, 94,113, 45,210, 83, 53,200, 29,147, 3,198,209,134, 86,189, 5,223,109,126, 13,130,185, 5,160, 24, +136,188, 13,188,195, 1,158,231, 81,255,171, 17,223, 31, 60,237, 36, 63, 0,168, 88, 6, 16, 5,216,237,118,233, 7,192, 40, 89, +216,219, 77,145,113,129,104,154,130, 90,165,132,195,198,202, 71,178,160, 86,179, 78,235, 27,249, 30, 32,200, 14,192,135, 2,208, + 12, 3, 78,165,132,221,170, 4,112,193,138,106, 52, 23, 44,168,191,177,138,207, 63, 94,253,154,180,127,217,232, 57,175, 75,251, +165,187, 55, 61,113,193,140,135, 49,222,225,227,171,225,202,191,112,217,203, 83,190,219,125, 96,198,231, 95, 21,237,121,107,227, +146,127,209, 52,237,183,123,125,250,137,251,190,253,110,119,217, 13, 14, 7,207, 89,172,182,248, 9,215, 63,176,162,221,108,213, +221,125,215,244,119,166, 79,187,250, 76, 87,249,249,160, 21,192,114,190, 6, 71,158,157,141,220,130,124,164,247,142, 3, 4, 7, + 26,206,233,113,232, 63,223, 35,174,223, 80,216,219,244,160, 18, 24,136,150, 54, 8, 77, 39,208, 14, 13,134,244,213,192,253, 86, + 79, 25,217, 7, 60,239, 0,234,127,234,240, 4,148, 26,216,236, 34,212,201,105,145, 81,128,142, 30,160, 29, 6,231, 72,100, 71, +173, 15, 47, 8,178, 71, 35,187, 91, 1, 4,159, 22,212,108,180,194, 40, 27, 73, 21, 58,199, 55, 46,144, 47, 84,249, 35,117,221, +225,202,239, 37, 63,239,112, 80, 37,101,199,198, 90,109,246,184,146,159,142, 78,189,118,246, 35, 89,175,190,248,248, 27,217,131, +250,123, 52,143, 13, 13,205,220,252,191,174,158,219,220,108, 72, 19, 69,209,153,110,105,109, 53,245,233,221, 43,241,228, 99, 15, +221,121, 48,156,118,144,251,253,149,175,255, 25,185, 19,198, 35, 45,145,130,200, 40, 81,115,242, 28,170, 14, 29,193,213, 43,191, +195,249,226,207,209, 92,249, 21, 82,123, 95, 6, 24,207, 1, 63,172,132,245,250, 55, 49, 54, 59, 9,119, 20,100,226,219, 67, 13, +176, 57,120,140,187,172, 23,102,143,237, 11,187,221, 14,174,248,197, 14,131,145,152,137,214, 22, 35,146,134,141,139, 92, 15,192, +169,148,208,216,164,172, 79,135, 18,104,212,172,147,124, 61, 89, 1,104, 0, 74,149, 18,154,206, 60,122,135,187, 42,116,228,214, +209,225, 70, 32,212,103,249, 35, 52, 7,128, 47, 31,222,183,252,144,185, 34, 93,241,204,115,111,229,181,180, 26,251,116,124, 79, + 80,156, 57,219, 56,244,238,251,254,182,112,238, 29,215,126,252,224,253,183, 29,118,255,124, 90, 90,162,117,218,164,209,197,239, +126,176,235,247, 60, 47, 40,101,169, 75, 71, 65,222,200, 31,189,253, 78, 48, 78,144,164, 0, 14,195,175, 72,238, 55, 30,162,104, +195,177, 67,199,208,120,190, 21, 99, 86,237,134, 50, 46, 17,253,166,204,197,222,207, 95, 65,214,136, 17,160,235,127,130,162,189, + 5,170,162,191,195,120,245, 98,220,154,215, 23,183,230,245,189, 16, 75, 64,128,178,248, 69, 40,107,255, 3,208, 10, 8,125, 70, +227,248,255,126,143,241, 43, 95,138,140, 2, 56,164, 24, 64,178, 64,157, 10,224,176, 11, 29, 47, 66,200, 2, 69, 56, 4,246,169, + 0,118, 1, 48, 27, 45,208,187,100, 81, 4, 72, 46,163, 32,240,221,110,255,125,157,201,183,252,157,143,195,123, 81,160,221, 69, +135,242,229, 79,210, 49, 12,109,103,149, 10,235, 55,255,249,105,204,237, 55, 77, 60,158,150,150,212,165,204,243,193,249, 55, 31, +190,126,234, 85,167, 22, 60,242,194,252,115, 13, 45,131, 4, 65, 80, 36, 38,198,157, 93,190,248,238, 34,175,138, 42, 32,232, 30, + 32,126, 88, 30,246,255,223, 55,176,155, 77,208, 13,190, 10, 87,254,237, 3, 48,202,142,135,225,149,218, 4,244,159, 49, 31, 85, +191,252,128, 97, 25, 87,129,175,250, 6,113, 71,222, 2,123,174, 20,166,220,249,176,165,230, 66,160, 24,176, 77,135, 17,247,203, +219,224,206,238,237, 80,212,126, 99, 80, 87,223,130, 94, 87, 76, 69, 92,198,144, 72,198, 0, 44,236, 54,214,133,153,106, 53,219, + 57, 65, 68,247,247, 0,240, 17, 3, 48, 52,160,210, 40, 97,183,187,102, 81, 52, 42,165,108, 80, 41, 68,249,249,200, 92, 55,239, +115, 36,216,135,252,157, 61,130,167,129,168,245, 47,127,116,133, 94,223,214, 59, 49, 94,123,182,213,208,214,167,147,128,194,191, +222,123,102,141,148,177,242, 54,128, 53,120, 80, 95,211,151, 59, 86,189,112,223, 3,107,111, 57,116,184,106,252,213, 87, 14,221, +167, 84,210,162,119,166, 11, 65,247, 0,195,238,127, 25,230,186, 10,176,186,100,168, 82,250,118, 25, 23, 24, 56,235,207,248,254, +129,215,144,144,156,135, 62, 35,254, 0,254,216, 23, 96, 27,127, 70,242,183,127,241,208, 72, 44,152,193,211,208,226, 72,192,177, +226,111, 49,101,227,129,136,220, 23, 69, 71, 47, 47,192,100,182,192,104,108,119,177,208, 60, 47,197, 0,242, 32, 84,236, 38,254, +251, 25, 73, 53, 91,161, 55,185,230,209,237, 18,121,249,192, 7,114, 0,128,101, 21,109, 54,155, 67, 11, 0,159,127, 85,212,239, +198,235,175,169, 11, 48,158, 13, 41, 10,246, 41,191, 20,191,120,208,160,156,236,204,243,255,179,105,105,225,192,172,244,182,188, +107, 31, 94,101,177,218,226, 29, 14,158,123,250,217, 45, 83, 94, 92,245,192, 87,254, 36, 98, 0,113,243, 43,143,125,242,209,142, +221,101,179,103,142,171,245,165,165,124, 8, 65, 48, 77,211,208,101, 14,247, 94,191,207,169,145,191,230, 7,148,254,253, 22,180, +246, 78,198,208, 43,230,129, 58, 87, 6,209,120, 14,162,241, 44, 32,240,160,226,210, 64,233,250,128, 74,207, 69,245,201,179,168, + 62,178, 23,249,171,254, 13, 85,114,122, 68,120, 69, 3, 0, 69, 83, 80,113, 10,168, 85, 44,212, 42, 37, 84, 42, 37,212,156, 18, +234, 78, 11, 20, 94,250, 50,130,163,193, 94,175,130,134, 70, 73, 67,195,169,160,225,148, 23,182, 78,249,121,240, 46,115,235,248, +219, 18,226,181,231,165, 83,111,220,180,243,166,157, 95,237,239,231, 50, 55, 79,164,225, 79,126,222,179,156,215, 78, 29,125,102, + 72,118,127,163,130, 85, 10,147, 39,142,252, 66, 58,221,191,119, 31,188,121,213,134,143,174,244,118,125,207,174,127,255,234,191, +173,249,159,107,164,215,183,222, 92, 80,173, 96,149,130,175, 54, 9,133,252,129, 60,203,171, 78,205,192,132,245,123, 33,166, 12, +195,143, 59,191, 66, 85, 75, 34, 90,146,242,193, 95,245, 32,132,177,143, 66,159,126, 29,106,204,125, 80,244,239, 98, 52,155, 24, + 76,121,245,103,196,103, 70,110,193,242, 11, 61, 64,155,197,249, 92,174, 84, 12,103,115, 8,157,175, 34,237, 2,137, 17,237, 1, + 96, 23, 96, 50, 91, 97,234,180,160,188,211,130,242, 65, 15,228, 0,192,229, 57,191, 59,240,237,238, 3, 3, 1,160,230,244,249, +220,165, 79,109,202, 93,250,212, 38,143,159,253,185,232,245,255, 14, 59,154,240, 43, 63,239,215, 5, 89,190,104,206, 15,251,138, +143, 78,104,105, 53,101,136,162, 72,111,221,246,245,127,239,217,123,164,244,198,235,199,252, 56,185, 32,183,214,108,182, 41,246, + 22,151,247,253, 98, 87,201,132,170,147,103, 71, 3, 16, 25, 37,197, 47,126,248,142,210, 72, 71, 67, 65,207,240,160, 80, 34,247, +129, 13, 48,158,174, 64,211,145, 31, 81,119,112, 23,154,190,221, 6,145,119, 32, 41,251, 42,164,140,186, 14, 35,111,202, 71,210, +144,200, 79,137,170,112,246, 0,172, 18, 54,149,210,165, 24, 78,163,166,156,227, 0, 82, 16, 28, 27, 7, 72, 12,238, 6, 48, 0, +167, 84,130,227,220,125,104,249, 99,129,129,219,177,103,159,156,247,205,141,119, 84,141,110,106, 54,100,134,149,224, 15, 52,155, + 20,136,252,126,178, 81, 58, 13,235,216,184,254,193,127,204,127,232,197,133, 70,147,185, 55, 0, 84,157, 60,115,213,139,175,238, +184,234,197, 87,119,120, 52,214, 63,252,120,100,236,226,135,126, 31,160, 2,132, 87, 11,228,239, 89, 94,138,162,144,144,153,131, +132,204, 28,252,238,134,249, 49,115,173,105,138,162, 4,139,197,138,118,139, 13, 70, 83, 59, 76,166,118,152, 76, 29,189,129, 40, +116,186, 52,130,195,181, 40, 45,234,155,216,101,115, 56, 28,160, 40,202,147, 22,136, 86,139, 5,102,171, 29, 38,179,165, 99, 51, + 89, 96, 50,153, 59, 57,211, 49,130, 24,204,198,178, 52,255,175,119,151,175,154,156,159,251, 73,175,212,132, 83,172, 82,209,230, +213,120, 7,120, 78,115,199, 51,183, 98, 40,242, 7,154,138, 29, 62,172,191,225,141,151, 30, 92, 51,108, 72,191,125,254,108,213, +192,204,244, 3,175,191,244,208,166, 64,137,210, 57, 10, 43,134,162, 4,129,144, 63, 22, 43,201,123,236, 1,180, 26,238,215, 99, + 21,199,210,122,167,245,133,185,173,217, 89, 11,196,243, 60, 82,210,250,131,119,216, 97,208, 55,203, 92, 17, 49,212,100,141,204, +190,251, 59,135,216,229,117,101, 85, 61, 84, 42,246,180,251,103,181, 90,149,165,162,162, 82,157,214,187, 15,204,230,102,167,161, + 18, 4, 59, 50,122,103,128,183,219,161,215, 55, 6,221, 48, 20, 3,254,153, 39,231,126, 5,192,103, 48,105, 14,228, 97,114,129, + 71,117,237, 89,168,213,108, 91,208,242, 11, 60,244,198,150,128,229, 30,152,149,110,216,242,250, 99,155,119,124,190,247,187,255, +219, 85, 58,166,174,190,113, 80,171,222,148,161, 80, 48,237, 28,167, 52, 13,202, 74, 47,255,253,236,252, 61, 83, 39,229,158, 1, + 0,179, 57,176, 7, 93,170,170,206, 66,235, 65,126,127, 10,208,147,201, 15, 0, 10, 21,167, 44,251,120,251,246, 25,127,126,224, + 62, 28, 45, 63,216, 81,147, 33,136,176,219,121, 76,155, 49, 5, 45,205,103, 96,148,103, 39,252, 41, 64, 64,254,124,240, 10, 80, +180,255,168,133,231,133,189,238,159,213,176,108,227,246, 79,182,247, 95,176,224, 62, 84, 84, 28, 4,111,183,195, 46, 0,118,187, +128,169,211,167,161,165,165, 14,102,115,247, 62,204, 3, 65, 64,209,254, 99,188, 40, 10, 13, 65,201,127,195, 52,232,155,235, 3, +148,223,181,115,188,110,202,200,234,235,166,140,172, 14, 75,113,101,167,222, 91,122,156,231, 61,200,127, 49,147, 31, 0, 20, 26, + 37,253,151,143,183,127,118,252,247,183,221,202,220,117,247,163, 56, 94, 81, 6,158,231,145, 61,108, 20,122,245,234,141, 67, 37, +159,194,106, 49, 7, 76,111,127, 61,128, 40,138, 65, 43,200,233,250, 70,124,252,233, 30,187,205,230,232,178, 48, 71, 2,165,216, +243,209,246,207,238,184,237,214,155,169, 59,238,126, 12,149, 21,101,224,121, 59,178,135, 93,137,222,169,105, 56, 84,186, 51,200, + 41, 63, 34,159,231,169,175,111,196, 71, 59,246, 8,118,187,163, 52, 40,249,211,250,160,226,224,103,176,154,205, 81,146, 44, 48, +212,214, 54,226,253,237,187, 61,202, 31,108, 16, 28,206, 68,182,209, 0, 37,138, 34, 6, 12, 72, 93,208,212,104,218,112,215,157, +179,153, 89, 55,222,128,236, 33,191, 67,155,177, 17, 39, 43, 75, 96,179,154,131, 34, 47, 34,161, 0, 16,193,243, 2,206,157,111, +197,161, 35,213,237, 59, 62, 47,230,121,193,241,176,195, 33,190,233,233,243,153,153, 41, 57,141,141,230,241,255,239,206, 89,212, +236, 89, 55, 96,200,160, 65, 48,155, 27, 81, 93, 89, 10,139,165,123,158, 5, 22, 4, 30,103, 27,244, 40, 59,116,202,177,125,231, + 94,209,110,183,239, 21, 69,177,194,183,252, 55, 83, 55,207,186, 1,217,217, 89, 48,155, 91, 80, 91, 85, 6,123,132,228,231, 67, +145,255,108, 11, 14, 28, 58,225,120,239, 95,190,229,151,112,213, 85, 87,137,251,247,239,135,213,106,237, 22,242, 31, 63,126, 28, +115,230,204, 65,105,105, 41, 21,148, 2, 0, 64, 66, 66,194, 96, 37, 35,188,108,177, 57,174, 48,155,173,189,228,133, 82,221,162, +153, 20, 4,150, 85,158, 22, 4, 97,175,221,206, 63, 37,138,226,113, 95,159, 79, 73, 73,137,103, 68, 71,190,217,102, 75,105,107, +179,168, 0, 80,221,108, 92, 68, 53,203,182,137,130,208, 96,113, 56, 74, 69, 81,212,255,150,229,151, 43,128,205,102,235, 22,203, + 31,138, 2, 56,107, 72,244,122,253, 9, 0,211,113,145,162,169,169,201, 0,224, 11, 34,127,247,194,102,179,225,196,137, 19, 30, +253,252,104,187, 61, 74,165, 50,248, 24, 0, 4, 4, 17, 2,199,113, 13, 19, 38, 76, 72,235,110, 25,130,142, 1, 8, 8, 46, 85, +208,164, 9, 8,136, 2, 16, 16, 92,162,248,255,109, 43,244, 49,100,124,238,122, 0, 0, 0, 0, 73, 69, 78, 68,174, 66, 96,130, +}; From e11601be37a4a6cdf2afa6bffa5d4d0470ed453c Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Fri, 10 Dec 2010 18:48:20 +0000 Subject: [PATCH 087/236] Bugfix #25153 graph editor: - option "extend mode" requires channel-selection. Moved pulldown menu from Key to Channel instead - hotkey SHIFT+E for same operation now works both in channel list as in main view. --- release/scripts/ui/space_graph.py | 4 ++-- source/blender/editors/space_graph/graph_ops.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/release/scripts/ui/space_graph.py b/release/scripts/ui/space_graph.py index b3d08ef7c53..79acdd9f9ce 100644 --- a/release/scripts/ui/space_graph.py +++ b/release/scripts/ui/space_graph.py @@ -152,6 +152,7 @@ class GRAPH_MT_channel(bpy.types.Menu): layout.separator() layout.operator("anim.channels_editable_toggle") layout.operator("anim.channels_visibility_set") + layout.operator_menu_enum("graph.extrapolation_type", "type", text="Extrapolation Mode") layout.separator() layout.operator("anim.channels_expand") @@ -187,8 +188,7 @@ class GRAPH_MT_key(bpy.types.Menu): layout.separator() layout.operator_menu_enum("graph.handle_type", "type", text="Handle Type") layout.operator_menu_enum("graph.interpolation_type", "type", text="Interpolation Mode") - layout.operator_menu_enum("graph.extrapolation_type", "type", text="Extrapolation Mode") - + layout.separator() layout.operator("graph.clean") layout.operator("graph.sample") diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c index 97595c9b904..ab28d4d72ea 100644 --- a/source/blender/editors/space_graph/graph_ops.c +++ b/source/blender/editors/space_graph/graph_ops.c @@ -339,8 +339,6 @@ static void graphedit_keymap_keyframes (wmKeyConfig *keyconf, wmKeyMap *keymap) WM_keymap_add_item(keymap, "GRAPH_OT_interpolation_type", TKEY, KM_PRESS, KM_SHIFT, 0); - WM_keymap_add_item(keymap, "GRAPH_OT_extrapolation_type", EKEY, KM_PRESS, KM_SHIFT, 0); - /* destructive */ WM_keymap_add_item(keymap, "GRAPH_OT_clean", OKEY, KM_PRESS, 0, 0); @@ -388,6 +386,8 @@ void graphedit_keymap(wmKeyConfig *keyconf) /* keymap for all regions */ keymap= WM_keymap_find(keyconf, "Graph Editor Generic", SPACE_IPO, 0); WM_keymap_add_item(keymap, "GRAPH_OT_properties", NKEY, KM_PRESS, 0, 0); + /* extrapolation works on channels, not keys */ + WM_keymap_add_item(keymap, "GRAPH_OT_extrapolation_type", EKEY, KM_PRESS, KM_SHIFT, 0); /* channels */ /* Channels are not directly handled by the Graph Editor module, but are inherited from the Animation module. From c0c4d9c14ce9e0990cfc372ead875e4629298d0a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 10 Dec 2010 23:31:03 +0000 Subject: [PATCH 088/236] fix [#25170] The 3d view properties panel median values use Blender units when set to use imperial. unit settings were working for vertex location but not median selection. --- source/blender/editors/space_view3d/view3d_buttons.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index eb6965932a2..1c400ee1ff8 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -281,6 +281,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float mul_m4_v3(ob->obmat, median); if(block) { // buttons + uiBut *but; int but_y; if((ob->parent) && (ob->partype == PARBONE)) but_y = 135; else but_y = 150; @@ -291,7 +292,6 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float uiBlockBeginAlign(block); if(tot==1) { - uiBut *but; uiDefBut(block, LABEL, 0, "Vertex:", 0, 130, 200, 20, 0, 0, 0, 0, 0, ""); uiBlockBeginAlign(block); @@ -327,9 +327,12 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float else { uiDefBut(block, LABEL, 0, "Median:", 0, 130, 200, 20, 0, 0, 0, 0, 0, ""); uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "X:", 0, 110, 200, 20, &(tfp->ve_median[0]), -lim, lim, 10, 3, ""); - uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Y:", 0, 90, 200, 20, &(tfp->ve_median[1]), -lim, lim, 10, 3, ""); - uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Z:", 0, 70, 200, 20, &(tfp->ve_median[2]), -lim, lim, 10, 3, ""); + but= uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "X:", 0, 110, 200, 20, &(tfp->ve_median[0]), -lim, lim, 10, 3, ""); + uiButSetUnitType(but, PROP_UNIT_LENGTH); + but= uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Y:", 0, 90, 200, 20, &(tfp->ve_median[1]), -lim, lim, 10, 3, ""); + uiButSetUnitType(but, PROP_UNIT_LENGTH); + but= uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Z:", 0, 70, 200, 20, &(tfp->ve_median[2]), -lim, lim, 10, 3, ""); + uiButSetUnitType(but, PROP_UNIT_LENGTH); if(totw==tot) { uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "W:", 0, 50, 200, 20, &(tfp->ve_median[3]), 0.01, 100.0, 10, 3, ""); uiBlockEndAlign(block); From b4b636386faac383b7366eedfea0017bb106cae4 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Sat, 11 Dec 2010 00:04:01 +0000 Subject: [PATCH 089/236] BGE BugFix: [#25106] modelview matrix incorrect after using VideoTexture - affecting mouse.position. Patch by Benoit Bolsee (ben2610) --- source/gameengine/VideoTexture/ImageRender.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/gameengine/VideoTexture/ImageRender.cpp b/source/gameengine/VideoTexture/ImageRender.cpp index fafb19fd05b..0aba4be1121 100644 --- a/source/gameengine/VideoTexture/ImageRender.cpp +++ b/source/gameengine/VideoTexture/ImageRender.cpp @@ -181,7 +181,9 @@ void ImageRender::Render() frustrum.camnear = -mirrorOffset[2]; frustrum.camfar = -mirrorOffset[2]+m_clip; } + // Store settings to be restored later const RAS_IRasterizer::StereoMode stereomode = m_rasterizer->GetStereoMode(); + RAS_Rect area = m_canvas->GetWindowArea(); // The screen area that ImageViewport will copy is also the rendering zone m_canvas->SetViewPort(m_position[0], m_position[1], m_position[0]+m_capSize[0]-1, m_position[1]+m_capSize[1]-1); @@ -258,6 +260,9 @@ void ImageRender::Render() m_scene->CalculateVisibleMeshes(m_rasterizer,m_camera); m_scene->RenderBuckets(camtrans, m_rasterizer, m_rendertools); + + // restore the canvas area now that the render is completed + m_canvas->GetWindowArea() = area; } From 5f5814f45fc91fad2b45e28fdc7d7566a3e5d0fd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 11 Dec 2010 11:11:32 +0000 Subject: [PATCH 090/236] - ignore calls to WM_cursor_wait() in background mode (crashes saving blend files) - rename curve enum value align CENTRAL to CENTER --- source/blender/makesrna/intern/rna_curve.c | 2 +- .../blender/windowmanager/intern/wm_cursors.c | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index ccb032cd1c6..aaf322ee12c 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -847,7 +847,7 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna) static EnumPropertyItem prop_align_items[] = { {CU_LEFT, "LEFT", 0, "Left", "Align text to the left"}, - {CU_MIDDLE, "CENTRAL", 0, "Center", "Center text"}, + {CU_MIDDLE, "CENTER", 0, "Center", "Center text"}, {CU_RIGHT, "RIGHT", 0, "Right", "Align text to the right"}, {CU_JUSTIFY, "JUSTIFY", 0, "Justify", "Align to the left and the right"}, {CU_FLUSH, "FLUSH", 0, "Flush", "Align to the left and the right, with equal character spacing"}, diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c index 43352f4efd2..8998c9624e5 100644 --- a/source/blender/windowmanager/intern/wm_cursors.c +++ b/source/blender/windowmanager/intern/wm_cursors.c @@ -155,14 +155,16 @@ void WM_cursor_restore(wmWindow *win) /* to allow usage all over, we do entire WM */ void WM_cursor_wait(int val) { - wmWindowManager *wm= G.main->wm.first; - wmWindow *win= wm?wm->windows.first:NULL; - - for(; win; win= win->next) { - if(val) { - WM_cursor_modal(win, CURSOR_WAIT); - } else { - WM_cursor_restore(win); + if(!G.background) { + wmWindowManager *wm= G.main->wm.first; + wmWindow *win= wm?wm->windows.first:NULL; + + for(; win; win= win->next) { + if(val) { + WM_cursor_modal(win, CURSOR_WAIT); + } else { + WM_cursor_restore(win); + } } } } From 552cecc89e722e34f9211d89bfc35a9e1d5f39d9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 11 Dec 2010 11:14:30 +0000 Subject: [PATCH 091/236] ported back background_job template from 2.4x, useful for automating blender to generate scenes in background mode. --- release/scripts/templates/background_job.py | 109 ++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 release/scripts/templates/background_job.py diff --git a/release/scripts/templates/background_job.py b/release/scripts/templates/background_job.py new file mode 100644 index 00000000000..f887e6feaef --- /dev/null +++ b/release/scripts/templates/background_job.py @@ -0,0 +1,109 @@ +# This script is an example of how you can run blender from the command line (in background mode with no interface) +# to automate tasks, in this example it creates a text object, camera and light, then renders and/or saves it. +# This example also shows how you can parse command line options to python scripts. +# +# Example usage for this test. +# blender -b -P $HOME/background_job.py -- --text="Hello World" --render="/tmp/hello" --save="/tmp/hello.blend" +# +# Notice all python args are after the "--" argument. + +import bpy + +def example_function(body_text, save_path, render_path): + + scene = bpy.context.scene + + # Clear existing objects. + scene.camera = None + for obj in scene.objects: + scene.objects.unlink(obj) + + txt_data = bpy.data.curves.new(name="MyText", type='TEXT') + + # Text Object + txt_ob = bpy.data.objects.new(name="MyText", object_data=txt_data) + scene.objects.link(txt_ob) # add the data to the scene as an object + txt_data.body = body_text # set the body text to the command line arg given + txt_data.align = 'CENTER' # center text + + # Camera + cam_data = bpy.data.cameras.new("MyCam") # create new camera data + cam_ob = bpy.data.objects.new(name="MyCam", object_data=cam_data) + scene.objects.link(cam_ob) # add the camera data to the scene (creating a new object) + scene.camera = cam_ob # set the active camera + cam_ob.location = 0.0, 0.0, 10.0 + + # Lamp + lamp_data = bpy.data.lamps.new("MyLamp") + lamp_ob = bpy.data.objects.new(name="MyCam", object_data=lamp_data) + scene.objects.link(lamp_ob) + lamp_ob.location = 2.0, 2.0, 5.0 + + if save_path: + try: + f = open(save_path, 'w') + f.close() + ok = True + except: + print("Cannot save to path %r" % save_path) + + import traceback + traceback.print_exc() + + if ok: + bpy.ops.wm.save_as_mainfile(filepath=save_path) + + if render_path: + render = scene.render + render.use_file_extension = True + render.filepath = render_path + bpy.ops.render.render(write_still=True) + + +import sys # to get command line args +import optparse # to parse options for us and print a nice help message + +def main(): + + # get the args passed to blender after "--", all of which are ignored by blender specifically + # so python may receive its own arguments + argv = sys.argv + + if "--" not in argv: + argv = [] # as if no args are passed + else: + argv = argv[argv.index("--") + 1:] # get all args after "--" + + # When --help or no args are given, print this help + usage_text = "Run blender in background mode with this script:" + usage_text += " blender -b -P " + __file__ + " -- [options]" + + parser = optparse.OptionParser(usage=usage_text) + + + # Example background utility, add some text and renders or saves it (with options) + # Possible types are: string, int, long, choice, float and complex. + parser.add_option("-t", "--text", dest="body_text", help="This text will be used to render an image", type="string") + + parser.add_option("-s", "--save", dest="save_path", help="Save the generated file to the specified path", metavar='FILE') + parser.add_option("-r", "--render", dest="render_path", help="Render an image to the specified path", metavar='FILE') + + options, args = parser.parse_args(argv) # In this example we wont use the args + + if not argv: + parser.print_help() + return + + if not options.body_text: + print("Error: --text=\"some string\" argument not given, aborting.") + parser.print_help() + return + + # Run the example function + example_function(options.body_text, options.save_path, options.render_path) + + print("batch job finished, exiting") + + +if __name__ == "__main__": + main() From 3256d0fc6a2522532bdfd6ada2dd3dd1698094c8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 11 Dec 2010 11:52:28 +0000 Subject: [PATCH 092/236] allow addons/modules path so extension authors can develop their own shared modules. --- release/scripts/modules/bpy/__init__.py | 4 ++++ release/scripts/modules/bpy/path.py | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/release/scripts/modules/bpy/__init__.py b/release/scripts/modules/bpy/__init__.py index 3d8bf0724fb..99faeeaf169 100644 --- a/release/scripts/modules/bpy/__init__.py +++ b/release/scripts/modules/bpy/__init__.py @@ -48,6 +48,10 @@ def _main(): pydoc.getpager = lambda: pydoc.plainpager pydoc.Helper.getline = lambda self, prompt: None pydoc.TextDoc.use_bold = lambda self, text: text + + # Possibly temp. addons path + from os.path import join, dirname, normpath + _sys.path.append(normpath(join(dirname(__file__), "..", "..", "addons", "modules"))) # if "-d" in sys.argv: # Enable this to measure startup speed if 0: diff --git a/release/scripts/modules/bpy/path.py b/release/scripts/modules/bpy/path.py index 1470c1fda01..9c9d386c7b0 100644 --- a/release/scripts/modules/bpy/path.py +++ b/release/scripts/modules/bpy/path.py @@ -203,7 +203,9 @@ def module_names(path, recursive=False): modules = [] for filename in sorted(_os.listdir(path)): - if filename.endswith(".py") and filename != "__init__.py": + if filename == "modules": + pass # XXX, hard coded exception. + elif filename.endswith(".py") and filename != "__init__.py": fullpath = join(path, filename) modules.append((filename[0:-3], fullpath)) elif ("." not in filename): From f03735552bec066fc14696a879e441eb29bba7c1 Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Sat, 11 Dec 2010 12:24:23 +0000 Subject: [PATCH 093/236] Fix for [#22967] UI stops updating * Close event probably happens when drawable is set to other window and this messes up drawing. * Also fixes #25071 and possibly #22477 (somebody with osx has to re-test) --- source/blender/windowmanager/intern/wm_window.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 7ad7be54e96..438f34f06cf 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -148,10 +148,9 @@ void wm_window_free(bContext *C, wmWindowManager *wm, wmWindow *win) CTX_wm_window_set(C, NULL); } - if(wm->windrawable==win) - wm->windrawable= NULL; - if(wm->winactive==win) - wm->winactive= NULL; + /* always set drawable and active to NULL, prevents non-drawable state of main windows (bugs #22967 and #25071, possibly #22477 too) */ + wm->windrawable= NULL; + wm->winactive= NULL; /* end running jobs, a job end also removes its timer */ for(wt= wm->timers.first; wt; wt= wtnext) { From 63a508408d63c2a8853b6b0eac374c348c4c8ed1 Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Sat, 11 Dec 2010 13:51:04 +0000 Subject: [PATCH 094/236] Added some explanation to pointcache->step value as suggested by troubled on irc. --- source/blender/makesdna/DNA_object_force.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h index 4515a6c05a3..8a6018fb7ea 100644 --- a/source/blender/makesdna/DNA_object_force.h +++ b/source/blender/makesdna/DNA_object_force.h @@ -154,7 +154,19 @@ typedef struct PTCacheMem { typedef struct PointCache { struct PointCache *next, *prev; int flag; /* generic flag */ - int step; /* frames between cached frames */ + + int step; /* The number of frames between cached frames. + * This should probably be an upper bound for a per point adaptive step in the future, + * buf for now it's the same for all points. Without adaptivity this can effect the perceived + * simulation quite a bit though. If for example particles are colliding with a horizontal + * plane (with high damping) they quickly come to a stop on the plane, however there are still + * forces acting on the particle (gravity and collisions), so the particle velocity isn't necessarily + * zero for the whole duration of the frame even if the particle seems stationary. If all simulation + * frames aren't cached (step > 1) these velocities are interpolated into movement for the non-cached + * frames. The result will look like the point is oscillating around the collision location. So for + * now cache step should be set to 1 for accurate reproduction of collisions. + */ + int simframe; /* current frame of simulation (only if SIMULATION_VALID) */ int startframe; /* simulation start frame */ int endframe; /* simulation end frame */ From 1d1c8bb21bc3435cad337da9cafd5817d82fe503 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sat, 11 Dec 2010 16:06:25 +0000 Subject: [PATCH 095/236] Small fix: Material Properties: adding new materials didn't create a new preview icon for it. --- source/blender/makesrna/intern/rna_object.c | 1 + source/blender/windowmanager/intern/wm_jobs.c | 21 +++++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 289f3de2f2c..57f332a4248 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -583,6 +583,7 @@ static void rna_Object_active_material_set(PointerRNA *ptr, PointerRNA value) { Object *ob= (Object*)ptr->id.data; + DAG_id_tag_update(value.data, 0); assign_material(ob, value.data, ob->actcol); } diff --git a/source/blender/windowmanager/intern/wm_jobs.c b/source/blender/windowmanager/intern/wm_jobs.c index fbab146dc8e..41b206f5479 100644 --- a/source/blender/windowmanager/intern/wm_jobs.c +++ b/source/blender/windowmanager/intern/wm_jobs.c @@ -248,19 +248,32 @@ static void wm_jobs_test_suspend_stop(wmWindowManager *wm, wmJob *test) int suspend= 0; for(steve= wm->jobs.first; steve; steve= steve->next) { + /* obvious case, no test needed */ if(steve==test || !steve->running) continue; - if(steve->startjob!=test->startjob && !(test->flag & WM_JOB_EXCL_RENDER)) continue; - if((test->flag & WM_JOB_EXCL_RENDER) && !(steve->flag & WM_JOB_EXCL_RENDER)) continue; + + /* if new job is not render, then check for same startjob */ + if(0==(test->flag & WM_JOB_EXCL_RENDER)) + if(steve->startjob!=test->startjob) + continue; + + /* if new job is render, any render job should be stopped */ + if(test->flag & WM_JOB_EXCL_RENDER) + if(0==(steve->flag & WM_JOB_EXCL_RENDER)) + continue; suspend= 1; /* if this job has higher priority, stop others */ - if(test->flag & WM_JOB_PRIORITY) + if(test->flag & WM_JOB_PRIORITY) { steve->stop= 1; + // printf("job stopped: %s\n", steve->name); + } } /* possible suspend ourselfs, waiting for other jobs, or de-suspend */ test->suspended= suspend; + // if(suspend) printf("job suspended: %s\n", test->name); + } /* if job running, the same owner gave it a new job */ @@ -294,7 +307,7 @@ void WM_jobs_start(wmWindowManager *wm, wmJob *steve) BLI_init_threads(&steve->threads, do_job_thread, 1); BLI_insert_thread(&steve->threads, steve); - // printf("job started\n"); + // printf("job started: %s\n", steve->name); } /* restarted job has timer already */ From 2b772739fb36da513f19f23d2196f88d4c3840f3 Mon Sep 17 00:00:00 2001 From: Doug Hammond Date: Sat, 11 Dec 2010 16:35:11 +0000 Subject: [PATCH 096/236] Moved extensions_framework into addons/modules --- .../modules/extensions_framework/__init__.py | 195 -------------- .../modules/extensions_framework/engine.py | 39 --- .../extensions_framework/outputs/__init__.py | 26 -- .../outputs/xml_output.py | 116 -------- .../modules/extensions_framework/plugin.py | 94 ------- .../modules/extensions_framework/ui.py | 253 ------------------ .../modules/extensions_framework/util.py | 223 --------------- .../modules/extensions_framework/validate.py | 213 --------------- 8 files changed, 1159 deletions(-) delete mode 100644 release/scripts/modules/extensions_framework/__init__.py delete mode 100644 release/scripts/modules/extensions_framework/engine.py delete mode 100644 release/scripts/modules/extensions_framework/outputs/__init__.py delete mode 100644 release/scripts/modules/extensions_framework/outputs/xml_output.py delete mode 100644 release/scripts/modules/extensions_framework/plugin.py delete mode 100644 release/scripts/modules/extensions_framework/ui.py delete mode 100644 release/scripts/modules/extensions_framework/util.py delete mode 100644 release/scripts/modules/extensions_framework/validate.py diff --git a/release/scripts/modules/extensions_framework/__init__.py b/release/scripts/modules/extensions_framework/__init__.py deleted file mode 100644 index 6c4ced376c5..00000000000 --- a/release/scripts/modules/extensions_framework/__init__.py +++ /dev/null @@ -1,195 +0,0 @@ -# -*- coding: utf8 -*- -# -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# -------------------------------------------------------------------------- -# Blender 2.5 Extensions Framework -# -------------------------------------------------------------------------- -# -# Authors: -# Doug Hammond -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -# ***** END GPL LICENCE BLOCK ***** -# -import time - -import bpy - -from extensions_framework.ui import EF_OT_msg - -bpy.types.register(EF_OT_msg) -del EF_OT_msg - - -def log(str, popup=False, module_name='EF'): - """Print a message to the console, prefixed with the module_name - and the current time. If the popup flag is True, the message will - be raised in the UI as a warning using the operator bpy.ops.ef.msg. - - """ - print("[%s %s] %s" % - (module_name, time.strftime('%Y-%b-%d %H:%M:%S'), str)) - if popup: - bpy.ops.ef.msg( - msg_type='WARNING', - msg_text=str - ) - - -added_property_cache = {} - -def init_properties(obj, props, cache=True): - """Initialise custom properties in the given object or type. - The props list is described in the declarative_property_group - class definition. If the cache flag is False, this function - will attempt to redefine properties even if they have already been - added. - - """ - - if not obj in added_property_cache.keys(): - added_property_cache[obj] = [] - - for prop in props: - try: - if cache and prop['attr'] in added_property_cache[obj]: - continue - - if prop['type'] == 'bool': - t = bpy.props.BoolProperty - a = {k: v for k,v in prop.items() if k in ['name', - 'description','default']} - elif prop['type'] == 'collection': - t = bpy.props.CollectionProperty - a = {k: v for k,v in prop.items() if k in ["ptype", "name", - "description"]} - a['type'] = a['ptype'] - del a['ptype'] - elif prop['type'] == 'enum': - t = bpy.props.EnumProperty - a = {k: v for k,v in prop.items() if k in ["items", "name", - "description", "default"]} - elif prop['type'] == 'float': - t = bpy.props.FloatProperty - a = {k: v for k,v in prop.items() if k in ["name", - "description", "min", "max", "soft_min", "soft_max", - "default", "precision"]} - elif prop['type'] == 'float_vector': - t = bpy.props.FloatVectorProperty - a = {k: v for k,v in prop.items() if k in ["name", - "description", "min", "max", "soft_min", "soft_max", - "default", "precision", "size", "subtype"]} - elif prop['type'] == 'int': - t = bpy.props.IntProperty - a = {k: v for k,v in prop.items() if k in ["name", - "description", "min", "max", "soft_min", "soft_max", - "default"]} - elif prop['type'] == 'pointer': - t = bpy.props.PointerProperty - a = {k: v for k,v in prop.items() if k in ["ptype", "name", - "description"]} - a['type'] = a['ptype'] - del a['ptype'] - elif prop['type'] == 'string': - t = bpy.props.StringProperty - a = {k: v for k,v in prop.items() if k in ["name", - "description", "maxlen", "default", "subtype"]} - else: - continue - - setattr(obj, prop['attr'], t(**a)) - - added_property_cache[obj].append(prop['attr']) - except KeyError: - # Silently skip invalid entries in props - continue - - -class declarative_property_group(bpy.types.IDPropertyGroup): - """A declarative_property_group describes a set of logically - related properties, using a declarative style to list each - property type, name, values, and other relevant information. - The information provided for each property depends on the - property's type. - - The properties list attribute in this class describes the - properties present in this group. - - Some additional information about the properties in this group - can be specified, so that a UI can be generated to display them. - To that end, the controls list attribute and the visibility dict - attribute are present here, to be read and interpreted by a - property_group_renderer object. - See extensions_framework.ui.property_group_renderer. - - """ - - """This list controls the order of property layout when rendered - by a property_group_renderer. This can be a nested list, where each - list becomes a row in the panel layout. Nesting may be to any depth. - - """ - controls = [] - - """The visibility dict controls the display of properties based on - the value of other properties. See extensions_framework.validate - for test syntax. - - """ - visibility = {} - - """The properties list describes each property to be created. Each - item should be a dict of args to pass to a - bpy.props.Property function, with the exception of 'type' - which is used and stripped by extensions_framework in order to - determine which Property creation function to call. - - Example item: - { - 'type': 'int', # bpy.props.IntProperty - 'attr': 'threads', # bpy.types..threads - 'name': 'Render Threads', # Rendered next to the UI - 'description': 'Number of threads to use', # Tooltip text in the UI - 'default': 1, - 'min': 1, - 'soft_min': 1, - 'max': 64, - 'soft_max': 64 - } - - """ - properties = [] - - def draw_callback(self, context): - """Sub-classes can override this to get a callback when - rendering is completed by a property_group_renderer sub-class. - - """ - - pass - - @classmethod - def get_exportable_properties(cls): - """Return a list of properties which have the 'save_in_preset' key - set to True, and hence should be saved into preset files. - - """ - - out = [] - for prop in cls.properties: - if 'save_in_preset' in prop.keys() and prop['save_in_preset']: - out.append(prop) - return out diff --git a/release/scripts/modules/extensions_framework/engine.py b/release/scripts/modules/extensions_framework/engine.py deleted file mode 100644 index 0a6fecb034a..00000000000 --- a/release/scripts/modules/extensions_framework/engine.py +++ /dev/null @@ -1,39 +0,0 @@ -# -*- coding: utf8 -*- -# -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# -------------------------------------------------------------------------- -# Blender 2.5 Extensions Framework -# -------------------------------------------------------------------------- -# -# Authors: -# Doug Hammond -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -# ***** END GPL LICENCE BLOCK ***** -# -from extensions_framework.plugin import plugin - -class engine_base(plugin): - """Render Engine plugin base class - - TODO: Remove, this class hasn't grown to be useful - - """ - - bl_label = 'Abstract Render Engine Base Class' - - def render(self, scene): - pass diff --git a/release/scripts/modules/extensions_framework/outputs/__init__.py b/release/scripts/modules/extensions_framework/outputs/__init__.py deleted file mode 100644 index f05ed25fbad..00000000000 --- a/release/scripts/modules/extensions_framework/outputs/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf8 -*- -# -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# -------------------------------------------------------------------------- -# Blender 2.5 Extensions Framework -# -------------------------------------------------------------------------- -# -# Authors: -# Doug Hammond -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -# ***** END GPL LICENCE BLOCK ***** -# diff --git a/release/scripts/modules/extensions_framework/outputs/xml_output.py b/release/scripts/modules/extensions_framework/outputs/xml_output.py deleted file mode 100644 index 3b1102c1888..00000000000 --- a/release/scripts/modules/extensions_framework/outputs/xml_output.py +++ /dev/null @@ -1,116 +0,0 @@ -# -*- coding: utf8 -*- -# -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# -------------------------------------------------------------------------- -# Blender 2.5 Extensions Framework -# -------------------------------------------------------------------------- -# -# Authors: -# Doug Hammond -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -# ***** END GPL LICENCE BLOCK ***** -# -import xml.etree.cElementTree as ET -import xml.dom.minidom as MD - -class xml_output(object): - """This class serves to describe an XML output, it uses - cElementTree and minidom to construct and format the XML - data. - - """ - - """The format dict describes the XML structure that this class - should generate, and which properties should be used to fill - the XML data structure - - """ - format = {} - - def __str__(self): - return ET.tostring(self.root) - - def write_pretty(self, file): - """Write a formatted XML string to file""" - xml_dom = MD.parseString(ET.tostring(self.root, encoding='utf-8')) - xml_dom.writexml(file, addindent=' ', newl='\n', encoding='utf-8') - - def pretty(self): - """Return a formatted XML string""" - xml_str = MD.parseString(ET.tostring(self.root)) - return xml_str.toprettyxml() - - def get_format(self): - """This should be overridden in classes that produce XML - conditionally - - """ - return self.format - - def compute(self, context): - """Compute the XML output from the input format""" - self.context = context - - self.root = ET.Element(self.root_element) - self.parse_dict(self.get_format(), self.root) - - return self.root - - """Formatting functions for various data types""" - format_types = { - 'bool': lambda c,x: str(x).lower(), - 'collection': lambda c,x: x, - 'enum': lambda c,x: x, - 'float': lambda c,x: x, - 'int': lambda c,x: x, - 'pointer': lambda c,x: x, - 'string': lambda c,x: x, - } - - def parse_dict(self, d, elem): - """Parse the values in the format dict and collect the - formatted data into XML structure starting at self.root - - """ - for key in d.keys(): - # tuple provides multiple child elements - if type(d[key]) is tuple: - for cd in d[key]: - self.parse_dict({key:cd}, elem) - continue # don't create empty element for tuple child - - x = ET.SubElement(elem, key) - - # dictionary provides nested elements - if type(d[key]) is dict: - self.parse_dict(d[key], x) - - # list provides direct value insertion - elif type(d[key]) is list: - x.text = ' '.join([str(i) for i in d[key]]) - - # else look up property - else: - for p in self.properties: - if d[key] == p['attr']: - if 'compute' in p.keys(): - x.text = str(p['compute'](self.context, self)) - else: - x.text = str( - self.format_types[p['type']](self.context, - getattr(self, d[key])) - ) diff --git a/release/scripts/modules/extensions_framework/plugin.py b/release/scripts/modules/extensions_framework/plugin.py deleted file mode 100644 index 76f41930fdd..00000000000 --- a/release/scripts/modules/extensions_framework/plugin.py +++ /dev/null @@ -1,94 +0,0 @@ -# -*- coding: utf8 -*- -# -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# -------------------------------------------------------------------------- -# Blender 2.5 Extensions Framework -# -------------------------------------------------------------------------- -# -# Authors: -# Doug Hammond -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -# ***** END GPL LICENCE BLOCK ***** -# -import bpy - -from extensions_framework import init_properties -from extensions_framework import log - -class plugin(object): - """Base class for plugins which wish to make use of utilities - provided in extensions_framework. Using the property_groups - attribute and the install() and uninstall() methods, a large number - of custom scene properties can be easily defined, displayed and - managed. - - TODO: Rename, 'extension' would be more appropriate than 'plugin' - - """ - - """The property_groups defines a list of declarative_property_group - types to create in specified types during the initialisation of the - plugin. - Item format: - ('bpy.type prototype to attach to', ) - - Example item: - ('Scene', myaddon_property_group) - In this example, a new property group will be attached to - bpy.types.Scene and all of the properties described in that group - will be added to it. - See extensions_framework.declarative_property_group. - - """ - property_groups = [] - - @classmethod - def install(r_class): - """Initialise this plugin. So far, all this does is to create - custom property groups specified in the property_groups - attribute. - - """ - for property_group_parent, property_group in r_class.property_groups: - call_init = False - if property_group_parent is not None: - prototype = getattr(bpy.types, property_group_parent) - if not hasattr(prototype, property_group.__name__): - init_properties(prototype, [{ - 'type': 'pointer', - 'attr': property_group.__name__, - 'ptype': property_group, - 'name': property_group.__name__, - 'description': property_group.__name__ - }]) - call_init = True - else: - call_init = True - - if call_init: - init_properties(property_group, property_group.properties) - - log('Extension "%s" initialised' % r_class.bl_label) - - @classmethod - def uninstall(r_class): - """Unregister property groups in reverse order""" - reverse_property_groups = [p for p in r_class.property_groups] - reverse_property_groups.reverse() - for property_group_parent, property_group in reverse_property_groups: - prototype = getattr(bpy.types, property_group_parent) - prototype.RemoveProperty(property_group.__name__) diff --git a/release/scripts/modules/extensions_framework/ui.py b/release/scripts/modules/extensions_framework/ui.py deleted file mode 100644 index 5bbd69c0628..00000000000 --- a/release/scripts/modules/extensions_framework/ui.py +++ /dev/null @@ -1,253 +0,0 @@ -# -*- coding: utf8 -*- -# -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# -------------------------------------------------------------------------- -# Blender 2.5 Extensions Framework -# -------------------------------------------------------------------------- -# -# Authors: -# Doug Hammond -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -# ***** END GPL LICENCE BLOCK ***** -# -import bpy - -from extensions_framework.validate import Visibility - -class EF_OT_msg(bpy.types.Operator): - """An operator to show simple messages in the UI""" - bl_idname = 'ef.msg' - bl_label = 'Show UI Message' - msg_type = bpy.props.StringProperty(default='INFO') - msg_text = bpy.props.StringProperty(default='') - def execute(self, context): - self.report({self.properties.msg_type}, self.properties.msg_text) - return {'FINISHED'} - -def _get_item_from_context(context, path): - """Utility to get an object when the path to it is known: - _get_item_from_context(context, ['a','b','c']) returns - context.a.b.c - No error checking is performed other than checking that context - is not None. Exceptions caused by invalid path should be caught in - the calling code. - - """ - - if context is not None: - for p in path: - context = getattr(context, p) - return context - -class property_group_renderer(object): - """Mix-in class for sub-classes of bpy.types.Panel. This class - will provide the draw() method which implements drawing one or - more property groups derived from - extensions_framework.declarative_propery_group. - The display_property_groups list attribute describes which - declarative_property_groups should be drawn in the Panel, and - how to extract those groups from the context passed to draw(). - - """ - - """The display_property_groups list attribute specifies which - custom declarative_property_groups this panel should draw, and - where to find that property group in the active context. - Example item: - ( ('scene',), 'myaddon_property_group') - In this case, this renderer will look for properties in - context.scene.myaddon_property_group to draw in the Panel. - - """ - display_property_groups = [] - - def draw(self, context): - """Sub-classes should override this if they need to display - other (object-related) property groups. super().draw(context) - can be a useful call in those cases. - - """ - for property_group_path, property_group_name in \ - self.display_property_groups: - ctx = _get_item_from_context(context, property_group_path) - property_group = getattr(ctx, property_group_name) - for p in property_group.controls: - self.draw_column(p, self.layout, ctx, context, - property_group=property_group) - property_group.draw_callback(context) - - def check_visibility(self, lookup_property, property_group): - """Determine if the lookup_property should be drawn in the Panel""" - vt = Visibility(property_group) - if lookup_property in property_group.visibility.keys(): - if hasattr(property_group, lookup_property): - member = getattr(property_group, lookup_property) - else: - member = None - return vt.test_logic(member, - property_group.visibility[lookup_property]) - else: - return True - - # tab_level = 0 - - def is_real_property(self, lookup_property, property_group): - for prop in property_group.properties: - if prop['attr'] == lookup_property: - return prop['type'] not in ['text', 'prop_search'] - - return False - - def draw_column(self, control_list_item, layout, context, - supercontext=None, property_group=None): - # self.tab_level += 1 - """Draw a column's worth of UI controls in this Panel""" - if type(control_list_item) is list: - draw_row = False - - found_percent = None - # print('\t'*self.tab_level, '--', property_group, '--') - for sp in control_list_item: - # print('\t'*self.tab_level, sp) - if type(sp) is float: - found_percent = sp - elif type(sp) is list: - for ssp in [s for s in sp if self.is_real_property(s, property_group)]: - draw_row = draw_row or self.check_visibility(ssp, - property_group) - # print('\t'*self.tab_level, 'List: ', draw_row) - else: - draw_row = draw_row or self.check_visibility(sp, - property_group) - # print('\t'*self.tab_level, 'Single: ', draw_row) - # print('\t'*self.tab_level, '-->', draw_row) - # print('\t'*self.tab_level, '--', property_group, '--') - - next_items = [s for s in control_list_item if type(s) in [str, list]] - if draw_row and len(next_items) > 0: - if found_percent is not None: - splt = layout.split(percentage=found_percent) - else: - splt = layout.row(True) - for sp in next_items: - col2 = splt.column() - self.draw_column(sp, col2, context, supercontext, - property_group) - else: - if self.check_visibility(control_list_item, property_group): - - for current_property in property_group.properties: - if current_property['attr'] == control_list_item: - current_property_keys = current_property.keys() - if 'type' in current_property_keys: - - if current_property['type'] in ['int', 'float', - 'float_vector', 'enum', 'string']: - layout.prop( - property_group, - control_list_item, - text = current_property['name'], - expand = current_property['expand'] \ - if 'expand' in current_property_keys \ - else False, - slider = current_property['slider'] \ - if 'slider' in current_property_keys \ - else False, - toggle = current_property['toggle'] \ - if 'toggle' in current_property_keys \ - else False, - icon_only = current_property['icon_only'] \ - if 'icon_only' in current_property_keys \ - else False, - event = current_property['event'] \ - if 'event' in current_property_keys \ - else False, - full_event = current_property['full_event'] \ - if 'full_event' in current_property_keys \ - else False, - emboss = current_property['emboss'] \ - if 'emboss' in current_property_keys \ - else True, - ) - if current_property['type'] in ['bool']: - layout.prop( - property_group, - control_list_item, - text = current_property['name'], - toggle = current_property['toggle'] \ - if 'toggle' in current_property_keys \ - else False, - icon_only = current_property['icon_only'] \ - if 'icon_only' in current_property_keys \ - else False, - event = current_property['event'] \ - if 'event' in current_property_keys \ - else False, - full_event = current_property['full_event'] \ - if 'full_event' in current_property_keys \ - else False, - emboss = current_property['emboss'] \ - if 'emboss' in current_property_keys \ - else True, - ) - elif current_property['type'] in ['operator']: - layout.operator(current_property['operator'], - text = current_property['text'], - icon = current_property['icon'] - ) - - elif current_property['type'] in ['text']: - layout.label( - text = current_property['name'] - ) - - elif current_property['type'] in ['template_list']: - layout.template_list( - current_property['src'](supercontext, context), - current_property['src_attr'], - current_property['trg'](supercontext, context), - current_property['trg_attr'], - rows = 4 \ - if not 'rows' in current_property_keys \ - else current_property['rows'], - maxrows = 4 \ - if not 'rows' in current_property_keys \ - else current_property['rows'], - type = 'DEFAULT' \ - if not 'list_type' in current_property_keys \ - else current_property['list_type'] - ) - - elif current_property['type'] in ['prop_search']: - layout.prop_search( - current_property['trg'](supercontext, - context), - current_property['trg_attr'], - current_property['src'](supercontext, - context), - current_property['src_attr'], - text = current_property['name'], - ) - else: - layout.prop(property_group, control_list_item) - - # Fire a draw callback if specified - if 'draw' in current_property_keys: - current_property['draw'](supercontext, context) - - break - # self.tab_level -= 1 diff --git a/release/scripts/modules/extensions_framework/util.py b/release/scripts/modules/extensions_framework/util.py deleted file mode 100644 index dc737c6e4ae..00000000000 --- a/release/scripts/modules/extensions_framework/util.py +++ /dev/null @@ -1,223 +0,0 @@ -# -*- coding: utf8 -*- -# -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# -------------------------------------------------------------------------- -# Blender 2.5 Extensions Framework -# -------------------------------------------------------------------------- -# -# Authors: -# Doug Hammond -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# ***** END GPL LICENCE BLOCK ***** -# -import configparser -import datetime -import os -import tempfile -import threading - -import bpy - -"""List of possibly appropriate paths to load/save addon config from/to""" -config_paths = [] -if bpy.utils.user_resource('CONFIG') != "": config_paths.append(bpy.utils.user_resource('CONFIG')) -if bpy.utils.user_resource('SCRIPTS') != "": config_paths.append(bpy.utils.user_resource('SCRIPTS')) -for pth in bpy.utils.script_paths(): - if pth != "": config_paths.append(pth) - -"""This path is set at the start of export, so that calls to -path_relative_to_export() can make all exported paths relative to -this one. -""" -export_path = ''; - -def path_relative_to_export(p): - """Return a path that is relative to the export path""" - global export_path - p = filesystem_path(p) - try: - relp = os.path.relpath(p, os.path.dirname(export_path)) - except ValueError: # path on different drive on windows - relp = p - - return relp.replace('\\', '/') - -def filesystem_path(p): - """Resolve a relative Blender path to a real filesystem path""" - if p.startswith('//'): - pout = bpy.path.abspath(p) - else: - pout = os.path.realpath(p) - - return pout.replace('\\', '/') - -# TODO: - somehow specify TYPES to get/set from config - -def find_config_value(module, section, key, default): - """Attempt to find the configuration value specified by string key - in the specified section of module's configuration file. If it is - not found, return default. - - """ - global config_paths - fc = [] - for p in config_paths: - if os.path.exists(p) and os.path.isdir(p) and os.access(p, os.W_OK): - fc.append( '/'.join([p, '%s.cfg' % module])) - - if len(fc) < 1: - print('Cannot find %s config file path' % module) - return default - - cp = configparser.SafeConfigParser() - - cfg_files = cp.read(fc) - if len(cfg_files) > 0: - try: - val = cp.get(section, key) - if val == 'true': - return True - elif val == 'false': - return False - else: - return val - except: - return default - else: - return default - -def write_config_value(module, section, key, value): - """Attempt to write the configuration value specified by string key - in the specified section of module's configuration file. - - """ - global config_paths - fc = [] - for p in config_paths: - if os.path.exists(p) and os.path.isdir(p) and os.access(p, os.W_OK): - fc.append( '/'.join([p, '%s.cfg' % module])) - - if len(fc) < 1: - raise Exception('Cannot find a writable path to store %s config file' % - module) - - cp = configparser.SafeConfigParser() - - cfg_files = cp.read(fc) - - if not cp.has_section(section): - cp.add_section(section) - - if value == True: - cp.set(section, key, 'true') - elif value == False: - cp.set(section, key, 'false') - else: - cp.set(section, key, value) - - if len(cfg_files) < 1: - cfg_files = fc - - fh=open(cfg_files[0],'w') - cp.write(fh) - fh.close() - - return True - -def scene_filename(): - """Construct a safe scene filename, using 'untitled' instead of ''""" - filename = os.path.splitext(os.path.basename(bpy.data.filepath))[0] - if filename == '': - filename = 'untitled' - return bpy.path.clean_name(filename) - -def temp_directory(): - """Return the system temp directory""" - return tempfile.gettempdir() - -def temp_file(ext='tmp'): - """Get a temporary filename with the given extension. This function - will actually attempt to create the file.""" - tf, fn = tempfile.mkstemp(suffix='.%s'%ext) - os.close(tf) - return fn - -class TimerThread(threading.Thread): - """Periodically call self.kick(). The period of time in seconds - between calling is given by self.KICK_PERIOD, and the first call - may be delayed by setting self.STARTUP_DELAY, also in seconds. - self.kick() will continue to be called at regular intervals until - self.stop() is called. Since this is a thread, calling self.join() - may be wise after calling self.stop() if self.kick() is performing - a task necessary for the continuation of the program. - The object that creates this TimerThread may pass into it data - needed during self.kick() as a dict LocalStorage in __init__(). - - """ - STARTUP_DELAY = 0 - KICK_PERIOD = 8 - - active = True - timer = None - - LocalStorage = None - - def __init__(self, LocalStorage=dict()): - threading.Thread.__init__(self) - self.LocalStorage = LocalStorage - - def set_kick_period(self, period): - """Adjust the KICK_PERIOD between __init__() and start()""" - self.KICK_PERIOD = period + self.STARTUP_DELAY - - def stop(self): - """Stop this timer. This method does not join()""" - self.active = False - if self.timer is not None: - self.timer.cancel() - - def run(self): - """Timed Thread loop""" - while self.active: - self.timer = threading.Timer(self.KICK_PERIOD, self.kick_caller) - self.timer.start() - if self.timer.isAlive(): self.timer.join() - - def kick_caller(self): - """Intermediary between the kick-wait-loop and kick to allow - adjustment of the first KICK_PERIOD by STARTUP_DELAY - - """ - if self.STARTUP_DELAY > 0: - self.KICK_PERIOD -= self.STARTUP_DELAY - self.STARTUP_DELAY = 0 - - self.kick() - - def kick(self): - """Sub-classes do their work here""" - pass - -def format_elapsed_time(t): - """Format a duration in seconds as an HH:MM:SS format time""" - - td = datetime.timedelta(seconds=t) - min = td.days*1440 + td.seconds/60.0 - hrs = td.days*24 + td.seconds/3600.0 - - return '%i:%02i:%02i' % (hrs, min%60, td.seconds%60) diff --git a/release/scripts/modules/extensions_framework/validate.py b/release/scripts/modules/extensions_framework/validate.py deleted file mode 100644 index d9cee8fd807..00000000000 --- a/release/scripts/modules/extensions_framework/validate.py +++ /dev/null @@ -1,213 +0,0 @@ -# -*- coding: utf8 -*- -# -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# -------------------------------------------------------------------------- -# Blender 2.5 Extensions Framework -# -------------------------------------------------------------------------- -# -# Authors: -# Doug Hammond -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -# ***** END GPL LICENCE BLOCK ***** -# -""" -Pure logic and validation class. - -By using a Subject object, and a dict of described logic tests, it -is possible to arrive at a True or False result for various purposes: -1. Data validation -2. UI control visibility - -A Subject can be any object whose members are readable with getattr() : -class Subject(object): - a = 0 - b = 1 - c = 'foo' - d = True - e = False - f = 8 - g = 'bar' - - -Tests are described thus: - -Use the special list types Logic_AND and Logic_OR to describe -combinations of values and other members. Use Logic_Operator for -numerical comparison. - -With regards to Subject, each of these evaluate to True: -TESTA = { - 'a': 0, - 'c': Logic_OR([ 'foo', 'bar' ]), - 'd': Logic_AND([True, True]), - 'f': Logic_AND([8, {'b': 1}]), - 'e': {'b': Logic_Operator({'gte':1, 'lt':3}) }, - 'g': Logic_OR([ 'baz', Logic_AND([{'b': 1}, {'f': 8}]) ]) -} - -With regards to Subject, each of these evaluate to False: -TESTB = { - 'a': 'foo', - 'c': Logic_OR([ 'bar', 'baz' ]), - 'd': Logic_AND([ True, 'foo' ]), - 'f': Logic_AND([9, {'b': 1}]), - 'e': {'b': Logic_Operator({'gte':-10, 'lt': 1}) }, - 'g': Logic_OR([ 'baz', Logic_AND([{'b':0}, {'f': 8}]) ]) -} - -With regards to Subject, this test is invalid -TESTC = { - 'n': 0 -} - -Tests are executed thus: -S = Subject() -L = Logician(S) -L.execute(TESTA) - -""" - -class Logic_AND(list): - pass -class Logic_OR(list): - pass -class Logic_Operator(dict): - pass - -class Logician(object): - """Given a subject and a dict that describes tests to perform on - its members, this class will evaluate True or False results for - each member/test pair. See the examples below for test syntax. - - """ - - subject = None - def __init__(self, subject): - self.subject = subject - - def get_member(self, member_name): - """Get a member value from the subject object. Raise exception - if subject is None or member not found. - - """ - if self.subject is None: - raise Exception('Cannot run tests on a subject which is None') - - return getattr(self.subject, member_name) - - def test_logic(self, member, logic, operator='eq'): - """Find the type of test to run on member, and perform that test""" - - if type(logic) is dict: - return self.test_dict(member, logic) - elif type(logic) is Logic_AND: - return self.test_and(member, logic) - elif type(logic) is Logic_OR: - return self.test_or(member, logic) - elif type(logic) is Logic_Operator: - return self.test_operator(member, logic) - else: - # compare the value, I think using Logic_Operator() here - # allows completeness in test_operator(), but I can't put - # my finger on why for the minute - return self.test_operator(member, - Logic_Operator({operator: logic})) - - def test_operator(self, member, value): - """Execute the operators contained within value and expect that - ALL operators are True - - """ - - # something in this method is incomplete, what if operand is - # a dict, Logic_AND, Logic_OR or another Logic_Operator ? - # Do those constructs even make any sense ? - - result = True - for operator, operand in value.items(): - operator = operator.lower().strip() - if operator in ['eq', '==']: - result &= member==operand - if operator in ['not', '!=']: - result &= member!=operand - if operator in ['lt', '<']: - result &= member']: - result &= member>operand - if operator in ['gte', '>=']: - result &= member>=operand - if operator in ['and', '&']: - result &= member&operand - if operator in ['or', '|']: - result &= member|operand - if operator in ['len']: - result &= len(member)==operand - # I can think of some more, but they're probably not useful. - - return result - - def test_or(self, member, logic): - """Member is a value, logic is a set of values, ANY of which - can be True - - """ - result = False - for test in logic: - result |= self.test_logic(member, test) - - return result - - def test_and(self, member, logic): - """Member is a value, logic is a list of values, ALL of which - must be True - - """ - result = True - for test in logic: - result &= self.test_logic(member, test) - - return result - - def test_dict(self, member, logic): - """Member is a value, logic is a dict of other members to - compare to. All other member tests must be True - - """ - result = True - for other_member, test in logic.items(): - result &= self.test_logic(self.get_member(other_member), test) - - return result - - def execute(self, test): - """Subject is an object, test is a dict of {member: test} pairs - to perform on subject's members. Wach key in test is a member - of subject. - - """ - - for member_name, logic in test.items(): - result = self.test_logic(self.get_member(member_name), logic) - print('member %s is %s' % (member_name, result)) - -# A couple of name aliases -class Validation(Logician): - pass -class Visibility(Logician): - pass From 8a32c6468ec928246b5d669cc46423709554c8c3 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sat, 11 Dec 2010 17:47:36 +0000 Subject: [PATCH 097/236] 2.4 feature back: For constraints that have 'disabled' flag (because it has invalid input) the name was drawn in red. Easy to recognize constraints that stopped working. --- .../editors/interface/interface_layout.c | 6 ++++++ .../editors/interface/interface_templates.c | 17 ++++++----------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index e14a52ca2dc..cb5f7925256 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -961,6 +961,9 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index else if(type == PROP_ENUM || type == PROP_STRING || type == PROP_POINTER) { but= ui_item_with_label(layout, block, name, icon, ptr, prop, index, 0, 0, w, h, flag); ui_but_add_search(but, ptr, prop, NULL, NULL); + + if(layout->redalert) + uiButSetFlag(but, UI_BUT_REDALERT); } /* single button */ else { @@ -971,6 +974,9 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index if(toggle && but->type==OPTION) but->type= TOG; + + if(layout->redalert) + uiButSetFlag(but, UI_BUT_REDALERT); } if (no_bg) diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 81728964167..7e52ee6c6d0 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -833,9 +833,6 @@ void do_constraint_panels(bContext *C, void *ob_pt, int event) switch(event) { case B_CONSTRAINT_TEST: - // XXX allqueue(REDRAWVIEW3D, 0); - // XXX allqueue(REDRAWBUTSOBJECT, 0); - // XXX allqueue(REDRAWBUTSEDIT, 0); break; // no handling case B_CONSTRAINT_CHANGETARGET: if (ob->pose) ob->pose->flag |= POSE_RECALC; // checks & sorts pose channels @@ -855,10 +852,6 @@ void do_constraint_panels(bContext *C, void *ob_pt, int event) else DAG_id_tag_update(&ob->id, OB_RECALC_OB); WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob); - - // XXX allqueue(REDRAWVIEW3D, 0); - // XXX allqueue(REDRAWBUTSOBJECT, 0); - // XXX allqueue(REDRAWBUTSEDIT, 0); } static void constraint_active_func(bContext *UNUSED(C), void *ob_v, void *con_v) @@ -920,18 +913,20 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con) uiItemR(row, &ptr, "show_expanded", UI_ITEM_R_ICON_ONLY, "", 0); uiBlockSetEmboss(block, UI_EMBOSS); - /* XXX if (con->flag & CONSTRAINT_DISABLE) - uiBlockSetCol(block, TH_REDALERT);*/ - /* name */ uiDefBut(block, LABEL, B_CONSTRAINT_TEST, typestr, xco+10, yco, 100, 18, NULL, 0.0, 0.0, 0.0, 0.0, ""); + if (con->flag & CONSTRAINT_DISABLE) + uiLayoutSetRedAlert(row, 1); + if(proxy_protected == 0) { uiItemR(row, &ptr, "name", 0, "", 0); } else uiItemL(row, con->name, 0); + uiLayoutSetRedAlert(row, 0); + /* proxy-protected constraints cannot be edited, so hide up/down + close buttons */ if (proxy_protected) { uiBlockSetEmboss(block, UI_EMBOSSN); @@ -1001,7 +996,7 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con) box= uiLayoutBox(col); block= uiLayoutAbsoluteBlock(box); result= box; - } + } /* clear any locks set up for proxies/lib-linking */ uiBlockClearButLock(block); From 02be76be29ae591a002f1fa6a1fa65b1215f4ed1 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sat, 11 Dec 2010 17:55:54 +0000 Subject: [PATCH 098/236] Drag/drop fix: Outliner icons of ID blocks can be dragged, but it also caused an activate of the item. This prevented using outliner for dragging into name buttons. Now outliner activates on mouse-release, waiting for potential drags to happen. --- source/blender/editors/space_outliner/outliner_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/space_outliner/outliner_ops.c b/source/blender/editors/space_outliner/outliner_ops.c index d23e950a033..8b2c288e400 100644 --- a/source/blender/editors/space_outliner/outliner_ops.c +++ b/source/blender/editors/space_outliner/outliner_ops.c @@ -77,7 +77,7 @@ void outliner_keymap(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "OUTLINER_OT_item_rename", LEFTMOUSE, KM_DBL_CLICK, 0, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "OUTLINER_OT_item_activate", LEFTMOUSE, KM_PRESS, 0, 0)->ptr, "extend", 0); + RNA_boolean_set(WM_keymap_add_item(keymap, "OUTLINER_OT_item_activate", LEFTMOUSE, KM_RELEASE, 0, 0)->ptr, "extend", 0); RNA_boolean_set(WM_keymap_add_item(keymap, "OUTLINER_OT_item_activate", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", 1); RNA_boolean_set(WM_keymap_add_item(keymap, "OUTLINER_OT_item_openclose", RETKEY, KM_PRESS, 0, 0)->ptr, "all", 0); From 194449d03801d4c41df2a54e5564c67888ecf3d2 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sat, 11 Dec 2010 20:01:34 +0000 Subject: [PATCH 099/236] Sequencer: Dropping in image/movie/sound strips was broken; it dropped things in wrong location (frame 0), and without giving images proper length. The file path setting code for the operators here is complex... --- .../editors/space_sequencer/sequencer_add.c | 66 ++++++++++--------- .../editors/space_sequencer/space_sequencer.c | 1 + 2 files changed, 37 insertions(+), 30 deletions(-) diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index 807672623cd..adf1de8a125 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -73,9 +73,10 @@ /* Generic functions, reused by add strip operators */ /* avoid passing multiple args and be more verbose */ -#define SEQPROP_STARTFRAME 1<<0 -#define SEQPROP_ENDFRAME 1<<1 -#define SEQPROP_FILES 1<<2 +#define SEQPROP_STARTFRAME (1<<0) +#define SEQPROP_ENDFRAME (1<<1) +#define SEQPROP_FILES (1<<2) +#define SEQPROP_NOPATHS (1<<3) static void sequencer_generic_props__internal(wmOperatorType *ot, int flag) { @@ -127,8 +128,10 @@ static void sequencer_generic_invoke_xy__internal(bContext *C, wmOperator *op, w if ((flag & SEQPROP_ENDFRAME) && RNA_property_is_set(op->ptr, "frame_end")==0) RNA_int_set(op->ptr, "frame_end", (int)mval_v2d[0] + 25); // XXX arbitary but ok for now. - sequencer_generic_invoke_path__internal(C, op, "filepath"); - sequencer_generic_invoke_path__internal(C, op, "directory"); + if (!(flag & SEQPROP_NOPATHS)) { + sequencer_generic_invoke_path__internal(C, op, "filepath"); + sequencer_generic_invoke_path__internal(C, op, "directory"); + } } static void seq_load_operator_info(SeqLoadInfo *seq_load, wmOperator *op) @@ -344,23 +347,23 @@ static int sequencer_add_movie_strip_exec(bContext *C, wmOperator *op) static int sequencer_add_movie_strip_invoke(bContext *C, wmOperator *op, wmEvent *event) { - if(RNA_collection_length(op->ptr, "files") || RNA_property_is_set(op->ptr, "filepath")) - return sequencer_add_movie_strip_exec(C, op); if(!ED_operator_sequencer_active(C)) { BKE_report(op->reports, RPT_ERROR, "Sequencer area not active"); return OPERATOR_CANCELLED; } + /* This is for drag and drop */ + if(RNA_collection_length(op->ptr, "files") || RNA_property_is_set(op->ptr, "filepath")) { + sequencer_generic_invoke_xy__internal(C, op, event, SEQPROP_NOPATHS); + return sequencer_add_movie_strip_exec(C, op); + } + + sequencer_generic_invoke_xy__internal(C, op, event, 0); + if(!RNA_property_is_set(op->ptr, "relative_path")) RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS); - - /* This is for drag and drop */ - if(RNA_property_is_set(op->ptr, "filepath")) - return sequencer_add_movie_strip_exec(C, op); - - sequencer_generic_invoke_xy__internal(C, op, event, 0); - + WM_event_add_fileselect(C, op); return OPERATOR_RUNNING_MODAL; @@ -399,23 +402,23 @@ static int sequencer_add_sound_strip_exec(bContext *C, wmOperator *op) static int sequencer_add_sound_strip_invoke(bContext *C, wmOperator *op, wmEvent *event) { - if(RNA_collection_length(op->ptr, "files") || RNA_property_is_set(op->ptr, "filepath")) - return sequencer_add_sound_strip_exec(C, op); if(!ED_operator_sequencer_active(C)) { BKE_report(op->reports, RPT_ERROR, "Sequencer area not active"); return OPERATOR_CANCELLED; } - + + /* This is for drag and drop */ + if(RNA_collection_length(op->ptr, "files") || RNA_property_is_set(op->ptr, "filepath")) { + sequencer_generic_invoke_xy__internal(C, op, event, SEQPROP_NOPATHS); + return sequencer_add_sound_strip_exec(C, op); + } + + sequencer_generic_invoke_xy__internal(C, op, event, 0); + if(!RNA_property_is_set(op->ptr, "relative_path")) RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS); - - /* This is for drag and drop */ - if(RNA_property_is_set(op->ptr, "filepath")) - return sequencer_add_sound_strip_exec(C, op); - - sequencer_generic_invoke_xy__internal(C, op, event, 0); - + WM_event_add_fileselect(C, op); return OPERATOR_RUNNING_MODAL; @@ -503,23 +506,26 @@ static int sequencer_add_image_strip_exec(bContext *C, wmOperator *op) static int sequencer_add_image_strip_invoke(bContext *C, wmOperator *op, wmEvent *event) { - if(RNA_collection_length(op->ptr, "files")) - return sequencer_add_image_strip_exec(C, op); if(!ED_operator_sequencer_active(C)) { BKE_report(op->reports, RPT_ERROR, "Sequencer area not active"); return OPERATOR_CANCELLED; } + + /* drag drop has set the names */ + if(RNA_collection_length(op->ptr, "files")) { + sequencer_generic_invoke_xy__internal(C, op, event, SEQPROP_ENDFRAME|SEQPROP_NOPATHS); + return sequencer_add_image_strip_exec(C, op); + } + + sequencer_generic_invoke_xy__internal(C, op, event, SEQPROP_ENDFRAME); + if(!RNA_property_is_set(op->ptr, "relative_path")) RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS); - sequencer_generic_invoke_xy__internal(C, op, event, SEQPROP_ENDFRAME); - WM_event_add_fileselect(C, op); return OPERATOR_RUNNING_MODAL; - - //return sequencer_add_image_strip_exec(C, op); } diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c index 84daf04e4aa..179db47ae12 100644 --- a/source/blender/editors/space_sequencer/space_sequencer.c +++ b/source/blender/editors/space_sequencer/space_sequencer.c @@ -334,6 +334,7 @@ static void sequencer_drop_copy(wmDrag *drag, wmDropBox *drop) RNA_string_set(drop->ptr, "directory", dir); + RNA_collection_clear(drop->ptr, "files"); RNA_collection_add(drop->ptr, "files", &itemptr); RNA_string_set(&itemptr, "name", file); } From 448d24e7a02b3ebf3b5a66f64d187b9cd64ed9ed Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sat, 11 Dec 2010 21:27:39 +0000 Subject: [PATCH 100/236] New math util funcitons: - equals_v2v2 - project_v2_v2v2 - isect_seg_seg_v2_point which would be necessery for my further multires interpolation commit M_Geometry_LineIntersect2D now uses isect_seg_seg_v2_point(). Behaviour of this function was changed a bit -- it haven't returned intersection point in several cases when two segments are making angle. --- source/blender/blenlib/BLI_math_geom.h | 1 + source/blender/blenlib/BLI_math_vector.h | 2 + source/blender/blenlib/intern/math_geom.c | 75 +++++++++++++++++ source/blender/blenlib/intern/math_vector.c | 10 +++ .../blenlib/intern/math_vector_inline.c | 5 ++ .../python/generic/mathutils_geometry.c | 82 +------------------ 6 files changed, 97 insertions(+), 78 deletions(-) diff --git a/source/blender/blenlib/BLI_math_geom.h b/source/blender/blenlib/BLI_math_geom.h index 7d06bbce43d..7dae49f067d 100644 --- a/source/blender/blenlib/BLI_math_geom.h +++ b/source/blender/blenlib/BLI_math_geom.h @@ -73,6 +73,7 @@ void closest_to_line_segment_v3(float r[3], float p[3], float l1[3], float l2[3] int isect_line_line_v2(float a1[2], float a2[2], float b1[2], float b2[2]); int isect_line_line_v2_short(short a1[2], short a2[2], short b1[2], short b2[2]); +int isect_seg_seg_v2_point(float v1[2], float v2[2], float v3[2], float v4[2], float vi[2]); /* Returns the number of point of interests * 0 - lines are colinear diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h index ec62954149c..3a63e87ac76 100644 --- a/source/blender/blenlib/BLI_math_vector.h +++ b/source/blender/blenlib/BLI_math_vector.h @@ -124,6 +124,7 @@ void mid_v3_v3v3(float r[3], const float a[3], const float b[3]); MINLINE int is_zero_v3(const float a[3]); MINLINE int is_one_v3(const float a[3]); +MINLINE int equals_v2v2(const float *v1, const float *v2); MINLINE int equals_v3v3(const float a[3], const float b[3]); MINLINE int compare_v3v3(const float a[3], const float b[3], const float limit); MINLINE int compare_len_v3v3(const float a[3], const float b[3], const float limit); @@ -149,6 +150,7 @@ void angle_quad_v3(float angles[4], const float v1[3], const float v2[3], const /********************************* Geometry **********************************/ +void project_v2_v2v2(float c[2], const float v1[2], const float v2[2]); void project_v3_v3v3(float r[3], const float p[3], const float n[3]); void reflect_v3_v3v3(float r[3], const float v[3], const float n[3]); void ortho_basis_v3v3_v3(float r1[3], float r2[3], const float a[3]); diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c index bab48c722dc..ac62eb71e97 100644 --- a/source/blender/blenlib/intern/math_geom.c +++ b/source/blender/blenlib/intern/math_geom.c @@ -282,6 +282,81 @@ int isect_line_line_v2(float *v1, float *v2, float *v3, float *v4) return 0; } +/* get intersection point of two 2D segments and return intersection type: + -1: colliniar + 1: intersection */ +int isect_seg_seg_v2_point(float v1[2], float v2[2], float v3[2], float v4[2], float vi[2]) +{ + float a1, a2, b1, b2, c1, c2, d; + float u, v; + const float eps= 0.000001f; + + a1= v2[0]-v1[0]; + b1= v4[0]-v3[0]; + c1= v1[0]-v4[0]; + + a2= v2[1]-v1[1]; + b2= v4[1]-v3[1]; + c2= v1[1]-v4[1]; + + d= a1*b2-a2*b1; + + if(d==0) { + if(a1*c2-a2*c1==0.0f && b1*c2-b2*c1==0.0f) { /* equal lines */ + float a[2], b[2], c[2]; + float u2; + + if(len_v2v2(v1, v2)==0.0f) { + if(len_v2v2(v3, v4)>eps) { + /* use non-point segment as basis */ + SWAP(float, v1[0], v3[0]); + SWAP(float, v1[1], v3[1]); + SWAP(float, v2[0], v4[0]); + SWAP(float, v2[1], v4[1]); + } else { /* both of segments are points */ + if(equals_v2v2(v1, v3)) { /* points are equal */ + copy_v2_v2(vi, v1); + return 1; + } + + /* two different points */ + return -1; + } + } + + sub_v2_v2v2(a, v3, v1); + sub_v2_v2v2(b, v2, v1); + sub_v2_v2v2(c, v2, v1); + u= dot_v2v2(a, b) / dot_v2v2(c, c); + + sub_v2_v2v2(a, v4, v1); + u2= dot_v2v2(a, b) / dot_v2v2(c, c); + + if(u>u2) SWAP(float, u, u2); + + if(u>1.0f+eps || u2<-eps) return -1; /* non-ovlerlapping segments */ + else if(maxf(0.0f, u) == minf(1.0f, u2)){ /* one common point: can return result */ + interp_v2_v2v2(vi, v1, v2, maxf(0, u)); + return 1; + } + } + + /* lines are colliniar */ + return -1; + } + + u= (c2*b1-b2*c1)/d; + v= (c1*a2-a1*c2)/d; + + if(u>=-eps && u<=1.0f+eps && v>=-eps && v<=1.0f+eps) { /* intersection */ + interp_v2_v2v2(vi, v1, v2, u); + return 1; + } + + /* out of segment intersection */ + return -1; +} + /* -1: colliniar 1: intersection diff --git a/source/blender/blenlib/intern/math_vector.c b/source/blender/blenlib/intern/math_vector.c index 35476a8aba9..6ac1fcfab7e 100644 --- a/source/blender/blenlib/intern/math_vector.c +++ b/source/blender/blenlib/intern/math_vector.c @@ -230,6 +230,16 @@ void angle_quad_v3(float angles[4], const float v1[3], const float v2[3], const /********************************* Geometry **********************************/ +/* Project v1 on v2 */ +void project_v2_v2v2(float c[2], const float v1[2], const float v2[2]) +{ + float mul; + mul = dot_v2v2(v1, v2) / dot_v2v2(v2, v2); + + c[0] = mul * v2[0]; + c[1] = mul * v2[1]; +} + /* Project v1 on v2 */ void project_v3_v3v3(float c[3], const float v1[3], const float v2[3]) { diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c index 9718b37ee8a..b0666d2ed5d 100644 --- a/source/blender/blenlib/intern/math_vector_inline.c +++ b/source/blender/blenlib/intern/math_vector_inline.c @@ -429,6 +429,11 @@ MINLINE int is_one_v3(const float *v) return (v[0] == 1 && v[1] == 1 && v[2] == 1); } +MINLINE int equals_v2v2(const float *v1, const float *v2) +{ + return ((v1[0]==v2[0]) && (v1[1]==v2[1])); +} + MINLINE int equals_v3v3(const float *v1, const float *v2) { return ((v1[0]==v2[0]) && (v1[1]==v2[1]) && (v1[2]==v2[2])); diff --git a/source/blender/python/generic/mathutils_geometry.c b/source/blender/python/generic/mathutils_geometry.c index 673ce87d9ce..8b25a7b805f 100644 --- a/source/blender/python/generic/mathutils_geometry.c +++ b/source/blender/python/generic/mathutils_geometry.c @@ -587,7 +587,7 @@ static PyObject *M_Geometry_PolyFill(PyObject *UNUSED(self), PyObject * polyLine static PyObject *M_Geometry_LineIntersect2D(PyObject *UNUSED(self), PyObject* args) { VectorObject *line_a1, *line_a2, *line_b1, *line_b2; - float a1x, a1y, a2x, a2y, b1x, b1y, b2x, b2y, xi, yi, a1,a2,b1,b2, newvec[2]; + float vi[2]; if( !PyArg_ParseTuple ( args, "O!O!O!O!", &vector_Type, &line_a1, &vector_Type, &line_a2, @@ -600,86 +600,12 @@ static PyObject *M_Geometry_LineIntersect2D(PyObject *UNUSED(self), PyObject* ar if(!BaseMath_ReadCallback(line_a1) || !BaseMath_ReadCallback(line_a2) || !BaseMath_ReadCallback(line_b1) || !BaseMath_ReadCallback(line_b2)) return NULL; - - a1x= line_a1->vec[0]; - a1y= line_a1->vec[1]; - a2x= line_a2->vec[0]; - a2y= line_a2->vec[1]; - b1x= line_b1->vec[0]; - b1y= line_b1->vec[1]; - b2x= line_b2->vec[0]; - b2y= line_b2->vec[1]; - - if((MIN2(a1x, a2x) > MAX2(b1x, b2x)) || - (MAX2(a1x, a2x) < MIN2(b1x, b2x)) || - (MIN2(a1y, a2y) > MAX2(b1y, b2y)) || - (MAX2(a1y, a2y) < MIN2(b1y, b2y)) ) { + if(isect_seg_seg_v2_point(line_a1->vec, line_a2->vec, line_b1->vec, line_b2->vec, vi) == 1) { + return newVectorObject(vi, 2, Py_NEW, NULL); + } else { Py_RETURN_NONE; } - /* Make sure the hoz/vert line comes first. */ - if (fabs(b1x - b2x) < eps || fabs(b1y - b2y) < eps) { - SWAP_FLOAT(a1x, b1x, xi); /*abuse xi*/ - SWAP_FLOAT(a1y, b1y, xi); - SWAP_FLOAT(a2x, b2x, xi); - SWAP_FLOAT(a2y, b2y, xi); - } - - if (fabs(a1x-a2x) < eps) { /* verticle line */ - if (fabs(b1x-b2x) < eps){ /*verticle second line */ - Py_RETURN_NONE; /* 2 verticle lines dont intersect. */ - } - else if (fabs(b1y-b2y) < eps) { - /*X of vert, Y of hoz. no calculation needed */ - newvec[0]= a1x; - newvec[1]= b1y; - return newVectorObject(newvec, 2, Py_NEW, NULL); - } - - yi = (float)(((b1y / fabs(b1x - b2x)) * fabs(b2x - a1x)) + ((b2y / fabs(b1x - b2x)) * fabs(b1x - a1x))); - - if (yi > MAX2(a1y, a2y)) {/* New point above seg1's vert line */ - Py_RETURN_NONE; - } else if (yi < MIN2(a1y, a2y)) { /* New point below seg1's vert line */ - Py_RETURN_NONE; - } - newvec[0]= a1x; - newvec[1]= yi; - return newVectorObject(newvec, 2, Py_NEW, NULL); - } else if (fabs(a2y-a1y) < eps) { /* hoz line1 */ - if (fabs(b2y-b1y) < eps) { /*hoz line2*/ - Py_RETURN_NONE; /*2 hoz lines dont intersect*/ - } - - /* Can skip vert line check for seg 2 since its covered above. */ - xi = (float)(((b1x / fabs(b1y - b2y)) * fabs(b2y - a1y)) + ((b2x / fabs(b1y - b2y)) * fabs(b1y - a1y))); - if (xi > MAX2(a1x, a2x)) { /* New point right of hoz line1's */ - Py_RETURN_NONE; - } else if (xi < MIN2(a1x, a2x)) { /*New point left of seg1's hoz line */ - Py_RETURN_NONE; - } - newvec[0]= xi; - newvec[1]= a1y; - return newVectorObject(newvec, 2, Py_NEW, NULL); - } - - b1 = (a2y-a1y)/(a2x-a1x); - b2 = (b2y-b1y)/(b2x-b1x); - a1 = a1y-b1*a1x; - a2 = b1y-b2*b1x; - - if (b1 - b2 == 0.0) { - Py_RETURN_NONE; - } - - xi = - (a1-a2)/(b1-b2); - yi = a1+b1*xi; - if ((a1x-xi)*(xi-a2x) >= 0 && (b1x-xi)*(xi-b2x) >= 0 && (a1y-yi)*(yi-a2y) >= 0 && (b1y-yi)*(yi-b2y)>=0) { - newvec[0]= xi; - newvec[1]= yi; - return newVectorObject(newvec, 2, Py_NEW, NULL); - } - Py_RETURN_NONE; } static PyObject *M_Geometry_ClosestPointOnLine(PyObject *UNUSED(self), PyObject* args) From 1ad15c37aa60ec223f072cdca2209e1017c3d8ef Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 12 Dec 2010 01:33:12 +0000 Subject: [PATCH 101/236] avoid possible errors, surround bit shifted defines with brackets. --- source/blender/blenkernel/BKE_sequencer.h | 16 +++--- source/blender/makesdna/DNA_modifier_types.h | 44 ++++++++-------- source/blender/makesdna/DNA_space_types.h | 50 +++++++++---------- .../makesdna/DNA_windowmanager_types.h | 4 +- 4 files changed, 57 insertions(+), 57 deletions(-) diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h index d8d4c75a74b..eb19fce94e5 100644 --- a/source/blender/blenkernel/BKE_sequencer.h +++ b/source/blender/blenkernel/BKE_sequencer.h @@ -293,17 +293,17 @@ typedef struct SeqLoadInfo { } SeqLoadInfo; /* SeqLoadInfo.flag */ -#define SEQ_LOAD_REPLACE_SEL 1<<0 -#define SEQ_LOAD_FRAME_ADVANCE 1<<1 -#define SEQ_LOAD_MOVIE_SOUND 1<<2 -#define SEQ_LOAD_SOUND_CACHE 1<<3 +#define SEQ_LOAD_REPLACE_SEL (1<<0) +#define SEQ_LOAD_FRAME_ADVANCE (1<<1) +#define SEQ_LOAD_MOVIE_SOUND (1<<2) +#define SEQ_LOAD_SOUND_CACHE (1<<3) /* seq_dupli' flags */ -#define SEQ_DUPE_UNIQUE_NAME 1<<0 -#define SEQ_DUPE_CONTEXT 1<<1 -#define SEQ_DUPE_ANIM 1<<2 -#define SEQ_DUPE_ALL 1<<3 /* otherwise only selected are copied */ +#define SEQ_DUPE_UNIQUE_NAME (1<<0) +#define SEQ_DUPE_CONTEXT (1<<1) +#define SEQ_DUPE_ANIM (1<<2) +#define SEQ_DUPE_ALL (1<<3) /* otherwise only selected are copied */ /* use as an api function */ typedef struct Sequence *(*SeqLoadFunc)(struct bContext *, ListBase *, struct SeqLoadInfo *); diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 30b2503c677..3f6124c7fa1 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -209,13 +209,13 @@ typedef struct ArrayModifierData { #define MOD_ARR_FITCURVE 2 /* ArrayModifierData->offset_type */ -#define MOD_ARR_OFF_CONST 1<<0 -#define MOD_ARR_OFF_RELATIVE 1<<1 -#define MOD_ARR_OFF_OBJ 1<<2 +#define MOD_ARR_OFF_CONST (1<<0) +#define MOD_ARR_OFF_RELATIVE (1<<1) +#define MOD_ARR_OFF_OBJ (1<<2) /* ArrayModifierData->flags */ -#define MOD_ARR_MERGE 1<<0 -#define MOD_ARR_MERGEFINAL 1<<1 +#define MOD_ARR_MERGE (1<<0) +#define MOD_ARR_MERGEFINAL (1<<1) typedef struct MirrorModifierData { ModifierData modifier; @@ -227,13 +227,13 @@ typedef struct MirrorModifierData { } MirrorModifierData; /* MirrorModifierData->flag */ -#define MOD_MIR_CLIPPING 1<<0 -#define MOD_MIR_MIRROR_U 1<<1 -#define MOD_MIR_MIRROR_V 1<<2 -#define MOD_MIR_AXIS_X 1<<3 -#define MOD_MIR_AXIS_Y 1<<4 -#define MOD_MIR_AXIS_Z 1<<5 -#define MOD_MIR_VGROUP 1<<6 +#define MOD_MIR_CLIPPING (1<<0) +#define MOD_MIR_MIRROR_U (1<<1) +#define MOD_MIR_MIRROR_V (1<<2) +#define MOD_MIR_AXIS_X (1<<3) +#define MOD_MIR_AXIS_Y (1<<4) +#define MOD_MIR_AXIS_Z (1<<5) +#define MOD_MIR_VGROUP (1<<6) typedef struct EdgeSplitModifierData { ModifierData modifier; @@ -243,8 +243,8 @@ typedef struct EdgeSplitModifierData { } EdgeSplitModifierData; /* EdgeSplitModifierData->flags */ -#define MOD_EDGESPLIT_FROMANGLE 1<<1 -#define MOD_EDGESPLIT_FROMFLAG 1<<2 +#define MOD_EDGESPLIT_FROMANGLE (1<<1) +#define MOD_EDGESPLIT_FROMFLAG (1<<2) typedef struct BevelModifierData { ModifierData modifier; @@ -331,7 +331,7 @@ typedef struct UVProjectModifierData { #define MOD_UVPROJECT_MAXPROJECTORS 10 /* UVProjectModifierData->flags */ -#define MOD_UVPROJECT_OVERRIDEIMAGE 1<<0 +#define MOD_UVPROJECT_OVERRIDEIMAGE (1<<0) typedef struct DecimateModifierData { ModifierData modifier; @@ -384,13 +384,13 @@ enum { }; /* WaveModifierData.flag */ -#define MOD_WAVE_X 1<<1 -#define MOD_WAVE_Y 1<<2 -#define MOD_WAVE_CYCL 1<<3 -#define MOD_WAVE_NORM 1<<4 -#define MOD_WAVE_NORM_X 1<<5 -#define MOD_WAVE_NORM_Y 1<<6 -#define MOD_WAVE_NORM_Z 1<<7 +#define MOD_WAVE_X (1<<1) +#define MOD_WAVE_Y (1<<2) +#define MOD_WAVE_CYCL (1<<3) +#define MOD_WAVE_NORM (1<<4) +#define MOD_WAVE_NORM_X (1<<5) +#define MOD_WAVE_NORM_Y (1<<6) +#define MOD_WAVE_NORM_Z (1<<7) typedef struct WaveModifierData { ModifierData modifier; diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 06ec96df848..190cea4f81b 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -737,35 +737,35 @@ enum FileSortTypeE { #define SI_STICKY_VERTEX 2 /* SpaceImage->flag */ -#define SI_BE_SQUARE 1<<0 -#define SI_EDITTILE 1<<1 -#define SI_CLIP_UV 1<<2 -#define SI_DRAWTOOL 1<<3 -#define SI_DEPRECATED1 1<<4 /* stick UVs to others in the same location */ -#define SI_DRAWSHADOW 1<<5 -#define SI_SELACTFACE 1<<6 /* deprecated */ -#define SI_DEPRECATED2 1<<7 -#define SI_DEPRECATED3 1<<8 /* stick UV selection to mesh vertex (UVs wont always be touching) */ -#define SI_COORDFLOATS 1<<9 -#define SI_PIXELSNAP 1<<10 -#define SI_LIVE_UNWRAP 1<<11 -#define SI_USE_ALPHA 1<<12 -#define SI_SHOW_ALPHA 1<<13 -#define SI_SHOW_ZBUF 1<<14 +#define SI_BE_SQUARE (1<<0) +#define SI_EDITTILE (1<<1) +#define SI_CLIP_UV (1<<2) +#define SI_DRAWTOOL (1<<3) +#define SI_DEPRECATED1 (1<<4) /* stick UVs to others in the same location */ +#define SI_DRAWSHADOW (1<<5) +#define SI_SELACTFACE (1<<6) /* deprecated */ +#define SI_DEPRECATED2 (1<<7) +#define SI_DEPRECATED3 (1<<8) /* stick UV selection to mesh vertex (UVs wont always be touching) */ +#define SI_COORDFLOATS (1<<9) +#define SI_PIXELSNAP (1<<10) +#define SI_LIVE_UNWRAP (1<<11) +#define SI_USE_ALPHA (1<<12) +#define SI_SHOW_ALPHA (1<<13) +#define SI_SHOW_ZBUF (1<<14) /* next two for render window dislay */ -#define SI_PREVSPACE 1<<15 -#define SI_FULLWINDOW 1<<16 -#define SI_DEPRECATED4 1<<17 -#define SI_DEPRECATED5 1<<18 +#define SI_PREVSPACE (1<<15) +#define SI_FULLWINDOW (1<<16) +#define SI_DEPRECATED4 (1<<17) +#define SI_DEPRECATED5 (1<<18) /* this means that the image is drawn until it reaches the view edge, * in the image view, its unrelated to the 'tile' mode for texface */ -#define SI_DRAW_TILE 1<<19 -#define SI_SMOOTH_UV 1<<20 -#define SI_DRAW_STRETCH 1<<21 -#define SI_DISPGP 1<<22 -#define SI_DRAW_OTHER 1<<23 +#define SI_DRAW_TILE (1<<19) +#define SI_SMOOTH_UV (1<<20) +#define SI_DRAW_STRETCH (1<<21) +#define SI_DISPGP (1<<22) +#define SI_DRAW_OTHER (1<<23) -#define SI_COLOR_CORRECTION 1<<24 +#define SI_COLOR_CORRECTION (1<<24) /* SpaceIpo->flag (Graph Editor Settings) */ /* OLD DEPRECEATED SETTING */ diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index e2eba140a55..a29ea4e9152 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -146,8 +146,8 @@ typedef struct wmWindowManager { } wmWindowManager; /* wmWindowManager.initialized */ -#define WM_INIT_WINDOW 1<<0 -#define WM_INIT_KEYMAP 1<<1 +#define WM_INIT_WINDOW (1<<0) +#define WM_INIT_KEYMAP (1<<1) /* the savable part, rest of data is local in ghostwinlay */ typedef struct wmWindow { From 4f343642b14f67b595720542deac89eaf18852fb Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 12 Dec 2010 01:36:10 +0000 Subject: [PATCH 102/236] isect_seg_seg_v2_point was modifying the value of line vectors passed. this could be confusing later on, now swap the pointers rather then changing their values. --- source/blender/blenlib/BLI_math_geom.h | 6 ++--- source/blender/blenlib/intern/math_geom.c | 12 ++++------ .../editors/sculpt_paint/paint_image.c | 24 +++++++++---------- 3 files changed, 20 insertions(+), 22 deletions(-) diff --git a/source/blender/blenlib/BLI_math_geom.h b/source/blender/blenlib/BLI_math_geom.h index 7dae49f067d..3c2c6312f4d 100644 --- a/source/blender/blenlib/BLI_math_geom.h +++ b/source/blender/blenlib/BLI_math_geom.h @@ -71,9 +71,9 @@ void closest_to_line_segment_v3(float r[3], float p[3], float l1[3], float l2[3] #define ISECT_LINE_LINE_EXACT 1 #define ISECT_LINE_LINE_CROSS 2 -int isect_line_line_v2(float a1[2], float a2[2], float b1[2], float b2[2]); -int isect_line_line_v2_short(short a1[2], short a2[2], short b1[2], short b2[2]); -int isect_seg_seg_v2_point(float v1[2], float v2[2], float v3[2], float v4[2], float vi[2]); +int isect_line_line_v2(const float a1[2], const float a2[2], const float b1[2], const float b2[2]); +int isect_line_line_v2_short(const short a1[2], const short a2[2], const short b1[2], const short b2[2]); +int isect_seg_seg_v2_point(const float *v1, const float *v2, const float *v3, const float *v4, float vi[2]); /* Returns the number of point of interests * 0 - lines are colinear diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c index ac62eb71e97..673d8113f32 100644 --- a/source/blender/blenlib/intern/math_geom.c +++ b/source/blender/blenlib/intern/math_geom.c @@ -233,7 +233,7 @@ float dist_to_line_segment_v3(float *v1, float *v2, float *v3) /******************************* Intersection ********************************/ /* intersect Line-Line, shorts */ -int isect_line_line_v2_short(short *v1, short *v2, short *v3, short *v4) +int isect_line_line_v2_short(const short *v1, const short *v2, const short *v3, const short *v4) { /* return: -1: colliniar @@ -258,7 +258,7 @@ int isect_line_line_v2_short(short *v1, short *v2, short *v3, short *v4) } /* intersect Line-Line, floats */ -int isect_line_line_v2(float *v1, float *v2, float *v3, float *v4) +int isect_line_line_v2(const float *v1, const float *v2, const float *v3, const float *v4) { /* return: -1: colliniar @@ -285,7 +285,7 @@ int isect_line_line_v2(float *v1, float *v2, float *v3, float *v4) /* get intersection point of two 2D segments and return intersection type: -1: colliniar 1: intersection */ -int isect_seg_seg_v2_point(float v1[2], float v2[2], float v3[2], float v4[2], float vi[2]) +int isect_seg_seg_v2_point(const float *v1, const float *v2, const float *v3, const float *v4, float vi[2]) { float a1, a2, b1, b2, c1, c2, d; float u, v; @@ -309,10 +309,8 @@ int isect_seg_seg_v2_point(float v1[2], float v2[2], float v3[2], float v4[2], f if(len_v2v2(v1, v2)==0.0f) { if(len_v2v2(v3, v4)>eps) { /* use non-point segment as basis */ - SWAP(float, v1[0], v3[0]); - SWAP(float, v1[1], v3[1]); - SWAP(float, v2[0], v4[0]); - SWAP(float, v2[1], v4[1]); + SWAP(const float *, v1, v3); + SWAP(const float *, v2, v4); } else { /* both of segments are points */ if(equals_v2v2(v1, v3)) { /* points are equal */ copy_v2_v2(vi, v1); diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 3c116d3b763..84816cebc46 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -163,17 +163,17 @@ typedef struct ImagePaintRegion { #define PROJ_DEBUG_WINCLIP 1 /* projectFaceSeamFlags options */ -//#define PROJ_FACE_IGNORE 1<<0 /* When the face is hidden, backfacing or occluded */ -//#define PROJ_FACE_INIT 1<<1 /* When we have initialized the faces data */ -#define PROJ_FACE_SEAM1 1<<0 /* If this face has a seam on any of its edges */ -#define PROJ_FACE_SEAM2 1<<1 -#define PROJ_FACE_SEAM3 1<<2 -#define PROJ_FACE_SEAM4 1<<3 +//#define PROJ_FACE_IGNORE (1<<0) /* When the face is hidden, backfacing or occluded */ +//#define PROJ_FACE_INIT (1<<1) /* When we have initialized the faces data */ +#define PROJ_FACE_SEAM1 (1<<0) /* If this face has a seam on any of its edges */ +#define PROJ_FACE_SEAM2 (1<<1) +#define PROJ_FACE_SEAM3 (1<<2) +#define PROJ_FACE_SEAM4 (1<<3) -#define PROJ_FACE_NOSEAM1 1<<4 -#define PROJ_FACE_NOSEAM2 1<<5 -#define PROJ_FACE_NOSEAM3 1<<6 -#define PROJ_FACE_NOSEAM4 1<<7 +#define PROJ_FACE_NOSEAM1 (1<<4) +#define PROJ_FACE_NOSEAM2 (1<<5) +#define PROJ_FACE_NOSEAM3 (1<<6) +#define PROJ_FACE_NOSEAM4 (1<<7) #define PROJ_SRC_VIEW 1 #define PROJ_SRC_IMAGE_CAM 2 @@ -189,8 +189,8 @@ typedef struct ImagePaintRegion { #define PROJ_FACE_SCALE_SEAM 0.99f #define PROJ_BUCKET_NULL 0 -#define PROJ_BUCKET_INIT 1<<0 -// #define PROJ_BUCKET_CLONE_INIT 1<<1 +#define PROJ_BUCKET_INIT (1<<0) +// #define PROJ_BUCKET_CLONE_INIT (1<<1) /* used for testing doubles, if a point is on a line etc */ #define PROJ_GEOM_TOLERANCE 0.00075f From 03305de86d30b138da863a5104274805be4ac430 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sun, 12 Dec 2010 13:45:35 +0000 Subject: [PATCH 103/236] OS X Cocoa: added QT "Animation" codec. Thanks to Jens Verwiebe for providing diff and test --- source/blender/quicktime/apple/qtkit_export.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/blender/quicktime/apple/qtkit_export.m b/source/blender/quicktime/apple/qtkit_export.m index 14a1163ee9a..add280c6b64 100644 --- a/source/blender/quicktime/apple/qtkit_export.m +++ b/source/blender/quicktime/apple/qtkit_export.m @@ -119,9 +119,10 @@ static QuicktimeCodecTypeDesc qtVideoCodecList[] = { {kMPEG4VisualCodecType, 10, "MPEG4"}, {kH263CodecType, 11, "H.263"}, {kH264CodecType, 12, "H.264"}, + {kAnimationCodecType, 13, "Animation"}, {0,0,NULL}}; -static int qtVideoCodecCount = 12; +static int qtVideoCodecCount = 13; int quicktime_get_num_videocodecs() { return qtVideoCodecCount; From ee73c96e90e87dad9dab8b0bbeb0ceec50d035ad Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 12 Dec 2010 14:28:23 +0000 Subject: [PATCH 104/236] - fix for rna show_brush variable shadowing its parent classes with a flag which is now unused. - getting clipboard RNA variable would crash blender in background mode. --- source/blender/makesdna/DNA_scene_types.h | 5 +++-- source/blender/makesrna/intern/rna_sculpt_paint.c | 9 --------- source/blender/windowmanager/intern/wm_window.c | 6 ++++++ 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 7b8f86a302a..e2f1966bd50 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1159,8 +1159,9 @@ typedef enum SculptFlags { /* ImagePaintSettings.flag */ #define IMAGEPAINT_DRAWING 1 -#define IMAGEPAINT_DRAW_TOOL 2 -#define IMAGEPAINT_DRAW_TOOL_DRAWING 4 +// #define IMAGEPAINT_DRAW_TOOL 2 // deprecated +// #define IMAGEPAINT_DRAW_TOOL_DRAWING 4 // deprecated + /* projection painting only */ #define IMAGEPAINT_PROJECT_DISABLE 8 /* Non projection 3D painting */ #define IMAGEPAINT_PROJECT_XRAY 16 diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index 6203df0a975..ae13e5c68d9 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -285,15 +285,6 @@ static void rna_def_image_paint(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "Image Paint", "Properties of image and texture painting mode"); /* booleans */ - - prop= RNA_def_property(srna, "show_brush_draw", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", IMAGEPAINT_DRAW_TOOL); - RNA_def_property_ui_text(prop, "Show Brush Draw", "Enables brush shape while drawing"); - - prop= RNA_def_property(srna, "show_brush", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", IMAGEPAINT_DRAW_TOOL_DRAWING); - RNA_def_property_ui_text(prop, "Show Brush", "Enables brush shape while not drawing"); - prop= RNA_def_property(srna, "use_projection", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_DISABLE); RNA_def_property_ui_text(prop, "Project Paint", "Use projection painting for improved consistency in the brush strokes"); diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 438f34f06cf..dc9ccd54832 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -1007,6 +1007,9 @@ char *WM_clipboard_text_get(int selection) { char *p, *p2, *buf, *newbuf; + if(G.background) + return NULL; + buf= (char*)GHOST_getClipboard(selection); if(!buf) return NULL; @@ -1027,6 +1030,9 @@ char *WM_clipboard_text_get(int selection) void WM_clipboard_text_set(char *buf, int selection) { + if(G.background) + return; + #ifdef _WIN32 /* do conversion from \n to \r\n on Windows */ char *p, *p2, *newbuf; From d47ef94d1ae1693eb8491543f2c1bfe25e02103f Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sun, 12 Dec 2010 16:06:04 +0000 Subject: [PATCH 105/236] Armature pose: removed the "Confirm" dialog for clearing loc/rot/size properties. (same as object mode) --- source/blender/editors/armature/editarmature.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 66af2f34f0f..a52b9a7d099 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -4902,7 +4902,6 @@ void POSE_OT_scale_clear(wmOperatorType *ot) ot->idname= "POSE_OT_scale_clear"; /* api callbacks */ - ot->invoke = WM_operator_confirm; ot->exec = pose_clear_scale_exec; ot->poll = ED_operator_posemode; @@ -4971,7 +4970,6 @@ void POSE_OT_loc_clear(wmOperatorType *ot) ot->idname= "POSE_OT_loc_clear"; /* api callbacks */ - ot->invoke = WM_operator_confirm; ot->exec = pose_clear_loc_exec; ot->poll = ED_operator_posemode; @@ -5128,7 +5126,6 @@ void POSE_OT_rot_clear(wmOperatorType *ot) ot->idname= "POSE_OT_rot_clear"; /* api callbacks */ - ot->invoke = WM_operator_confirm; ot->exec = pose_clear_rot_exec; ot->poll = ED_operator_posemode; From 1185d70f8f0f6b968338921e9d888b42b094de13 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sun, 12 Dec 2010 16:15:49 +0000 Subject: [PATCH 106/236] Fix #25177: Skeleton Sketching - deleted sketches don't disappear immediately Added notifier ND_SKETCH for handling such actions --- source/blender/editors/armature/editarmature_sketch.c | 1 + source/blender/editors/space_view3d/space_view3d.c | 1 + source/blender/windowmanager/WM_types.h | 1 + 3 files changed, 3 insertions(+) diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c index a9d9d96a54a..121a7d6987b 100644 --- a/source/blender/editors/armature/editarmature_sketch.c +++ b/source/blender/editors/armature/editarmature_sketch.c @@ -2456,6 +2456,7 @@ static int sketch_delete(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(ev sk_deleteSelectedStrokes(sketch); // allqueue(REDRAWVIEW3D, 0); } + WM_event_add_notifier(C, NC_SCREEN|ND_SKETCH|NA_REMOVED, NULL); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index d9f0ea07cce..08c50b95778 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -703,6 +703,7 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn) switch(wmn->data) { case ND_GPENCIL: case ND_ANIMPLAY: + case ND_SKETCH: ED_region_tag_redraw(ar); break; case ND_SCREENBROWSE: diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index b853ff9efd4..ea06395c35b 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -172,6 +172,7 @@ typedef struct wmNotifier { #define ND_GPENCIL (5<<16) #define ND_EDITOR_CHANGED (6<<16) /*sent to new editors after switching to them*/ #define ND_SCREENSET (7<<16) +#define ND_SKETCH (8<<16) /* NC_SCENE Scene */ #define ND_SCENEBROWSE (1<<16) From 826cf81d34b7778b75fee93f1905e227ea9c0515 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sun, 12 Dec 2010 17:59:48 +0000 Subject: [PATCH 107/236] Unlinking material crashed, missing NULL check. --- source/blender/blenkernel/intern/depsgraph.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index fe6b320d0bd..6a97fa21aa5 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -2427,6 +2427,8 @@ void DAG_id_tag_update(ID *id, short flag) { Main *bmain= G.main; + if(id==NULL) return; + /* tag ID for update */ id->flag |= LIB_ID_RECALC; bmain->id_tag_update[id->name[0]] = 1; From ba2edc007b0adcf422c97398ecd706e78c342044 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sun, 12 Dec 2010 18:16:54 +0000 Subject: [PATCH 108/236] Bugfix #25179 Armature properties: layer buttons now show which ones are in use, like object layers. --- .../editors/interface/interface_layout.c | 17 +++++++++++++++-- .../blender/editors/space_view3d/drawarmature.c | 9 +++++++++ source/blender/makesdna/DNA_armature_types.h | 3 +-- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index cb5f7925256..88bba064ea1 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -30,6 +30,7 @@ #include "MEM_guardedalloc.h" #include "DNA_screen_types.h" +#include "DNA_armature_types.h" #include "DNA_userdef_types.h" #include "BLI_listbase.h" @@ -352,23 +353,35 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, in int butw, buth, unit; int cols= (len >= 20)? 2: 1; int colbuts= len/(2*cols); + int layer_used= 0; uiBlockSetCurLayout(block, uiLayoutAbsolute(layout, 0)); unit= UI_UNIT_X*0.75; butw= unit; buth= unit; + + if(ptr->type == &RNA_Armature) { + bArmature *arm= (bArmature *)ptr->data; + layer_used= arm->layer_used; + } for(b=0; blayer_used= 0; + /* hacky... prevent outline select from drawing dashed helplines */ glGetFloatv(GL_LINE_WIDTH, &tmp); if (tmp > 1.1) do_dashed &= ~1; @@ -1631,6 +1634,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { bone= pchan->bone; + arm->layer_used |= bone->layer; if ( (bone) && !(bone->flag & (BONE_HIDDEN_P|BONE_HIDDEN_PG)) ) { if (bone->layer & arm->layer) { @@ -1776,6 +1780,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { bone= pchan->bone; + arm->layer_used |= bone->layer; if ((bone) && !(bone->flag & (BONE_HIDDEN_P|BONE_HIDDEN_PG))) { if (bone->layer & arm->layer) { @@ -1948,6 +1953,9 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt) unsigned int index; int flag; + /* being set in code below */ + arm->layer_used= 0; + /* envelope (deform distance) */ if(arm->drawtype==ARM_ENVELOPE) { /* precalc inverse matrix for drawing screen aligned */ @@ -2020,6 +2028,7 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt) index= 0; /* do selection codes */ for (eBone=arm->edbo->first; eBone; eBone=eBone->next) { + arm->layer_used |= eBone->layer; if (eBone->layer & arm->layer) { if ((eBone->flag & BONE_HIDDEN_A)==0) { diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h index f6b61d5f2ba..108c0883f15 100644 --- a/source/blender/makesdna/DNA_armature_types.h +++ b/source/blender/makesdna/DNA_armature_types.h @@ -95,8 +95,7 @@ typedef struct bArmature { short deformflag; short pathflag; - int pad; - + unsigned int layer_used; /* for UI, to show which layers are there */ unsigned int layer, layer_protected; /* for buttons to work, both variables in this order together */ // XXX depreceated... old animaton system (armature only viz) --- From 32d82da9e45e4233afe8fcb15728589bd6e82278 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sun, 12 Dec 2010 19:22:24 +0000 Subject: [PATCH 109/236] Bugfix #25183 Copy constraints pose mode: didn't update constraint flag to denote colored bone drawing. Also notifier was missing for redraw. --- source/blender/editors/object/object_constraint.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 7e44442d867..50088e4a889 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -1029,14 +1029,19 @@ static int pose_constraint_copy_exec(bContext *C, wmOperator *op) CTX_DATA_BEGIN(C, bPoseChannel*, chan, selected_pose_bones) { /* if we're not handling the object we're copying from, copy all constraints over */ - if (pchan != chan) + if (pchan != chan) { copy_constraints(&chan->constraints, &pchan->constraints, TRUE); + /* update flags (need to add here, not just copy) */ + chan->constflag |= pchan->constflag; + } } CTX_DATA_END; /* force depsgraph to get recalculated since new relationships added */ DAG_scene_sort(bmain, scene); /* sort order of objects/bones */ + WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, NULL); + return OPERATOR_FINISHED; } From 040112d6ae9ecf65b92bdc98e95d36cf5b5c18dc Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Sun, 12 Dec 2010 20:21:59 +0000 Subject: [PATCH 110/236] Fix for compile on windows: *Variable declaration after return statement --- source/blender/windowmanager/intern/wm_window.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index dc9ccd54832..a4fa646c043 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -1030,9 +1030,6 @@ char *WM_clipboard_text_get(int selection) void WM_clipboard_text_set(char *buf, int selection) { - if(G.background) - return; - #ifdef _WIN32 /* do conversion from \n to \r\n on Windows */ char *p, *p2, *newbuf; @@ -1060,6 +1057,9 @@ void WM_clipboard_text_set(char *buf, int selection) #else GHOST_putClipboard((GHOST_TInt8*)buf, selection); #endif + + if(G.background) + return; } /* ******************* progress bar **************** */ From 450a09de2e1bd4405d4124aae9e6fbec6def6c4b Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Sun, 12 Dec 2010 20:36:07 +0000 Subject: [PATCH 111/236] Ui: User Preferences "Editing": * "Sculpt Overlay Color" wasted some unnecessary space. --- release/scripts/ui/space_userpref.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/release/scripts/ui/space_userpref.py b/release/scripts/ui/space_userpref.py index 6445fdcfad6..3f9e0cd83bb 100644 --- a/release/scripts/ui/space_userpref.py +++ b/release/scripts/ui/space_userpref.py @@ -323,8 +323,7 @@ class USERPREF_PT_edit(bpy.types.Panel): row.separator() col = row.column() - row = col.row(align=True) - row.prop(edit, "sculpt_paint_overlay_color", text="Sculpt Overlay Color") + col.prop(edit, "sculpt_paint_overlay_color", text="Sculpt Overlay Color") col.separator() col.separator() From 433eeee41f0c33a8a96a01e8f4d871af7663f144 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 12 Dec 2010 21:28:07 +0000 Subject: [PATCH 112/236] clipboard setting background check correction. --- .../blender/windowmanager/intern/wm_window.c | 51 +++++++++---------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index a4fa646c043..c962ee8c118 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -1030,36 +1030,35 @@ char *WM_clipboard_text_get(int selection) void WM_clipboard_text_set(char *buf, int selection) { + if(!G.background) { #ifdef _WIN32 - /* do conversion from \n to \r\n on Windows */ - char *p, *p2, *newbuf; - int newlen= 0; - - for(p= buf; *p; p++) { - if(*p == '\n') - newlen += 2; - else - newlen++; - } - - newbuf= MEM_callocN(newlen+1, "WM_clipboard_text_set"); - - for(p= buf, p2= newbuf; *p; p++, p2++) { - if(*p == '\n') { - *(p2++)= '\r'; *p2= '\n'; + /* do conversion from \n to \r\n on Windows */ + char *p, *p2, *newbuf; + int newlen= 0; + + for(p= buf; *p; p++) { + if(*p == '\n') + newlen += 2; + else + newlen++; } - else *p2= *p; - } - *p2= '\0'; - - GHOST_putClipboard((GHOST_TInt8*)newbuf, selection); - MEM_freeN(newbuf); + + newbuf= MEM_callocN(newlen+1, "WM_clipboard_text_set"); + + for(p= buf, p2= newbuf; *p; p++, p2++) { + if(*p == '\n') { + *(p2++)= '\r'; *p2= '\n'; + } + else *p2= *p; + } + *p2= '\0'; + + GHOST_putClipboard((GHOST_TInt8*)newbuf, selection); + MEM_freeN(newbuf); #else - GHOST_putClipboard((GHOST_TInt8*)buf, selection); + GHOST_putClipboard((GHOST_TInt8*)buf, selection); #endif - - if(G.background) - return; + } } /* ******************* progress bar **************** */ From ddd2dff60e0640851e25fd49f6b7c4dabb755242 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 12 Dec 2010 21:50:55 +0000 Subject: [PATCH 113/236] bugfix [#25186] FBX export rotations aren't applied to the exported model file. --- release/scripts/op/io_scene_fbx/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/release/scripts/op/io_scene_fbx/__init__.py b/release/scripts/op/io_scene_fbx/__init__.py index e2c281efee4..d2c809cab0b 100644 --- a/release/scripts/op/io_scene_fbx/__init__.py +++ b/release/scripts/op/io_scene_fbx/__init__.py @@ -86,8 +86,11 @@ class ExportFBX(bpy.types.Operator, ExportHelper): if self.TX_ZROT90: GLOBAL_MATRIX = mtx4_z90n * GLOBAL_MATRIX + keywords = self.as_keywords(ignore=("TX_XROT90", "TX_YROT90", "TX_ZROT90", "TX_SCALE", "check_existing", "filter_glob")) + keywords["GLOBAL_MATRIX"] = GLOBAL_MATRIX + import io_scene_fbx.export_fbx - return io_scene_fbx.export_fbx.save(self, context, **self.as_keywords(ignore=("TX_XROT90", "TX_YROT90", "TX_ZROT90", "TX_SCALE", "check_existing", "filter_glob"))) + return io_scene_fbx.export_fbx.save(self, context, **keywords) def menu_func(self, context): From 19d0736862e69a5642f4086c1b7ce0dbeffedebc Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 12 Dec 2010 23:02:19 +0000 Subject: [PATCH 114/236] bugfix [#23395] Mirror + Front Faces Only + Grab = Scaling oddity sculpt normal was used un-initialized, this also affected snake/hook brush. --- source/blender/editors/sculpt_paint/sculpt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 5913de2d83e..dc805a9ef0e 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -1331,7 +1331,7 @@ static void do_grab_brush(Sculpt *sd, SculptSession *ss, PBVHNode **nodes, int t int n; float len; - if (brush->normal_weight > 0) + if (brush->normal_weight > 0 || brush->flag & BRUSH_FRONTFACE) calc_sculpt_normal(sd, ss, an, nodes, totnode); copy_v3_v3(grab_delta, ss->cache->grab_delta_symmetry); @@ -1423,7 +1423,7 @@ static void do_snake_hook_brush(Sculpt *sd, SculptSession *ss, PBVHNode **nodes, int n; float len; - if (brush->normal_weight > 0) + if (brush->normal_weight > 0 || brush->flag & BRUSH_FRONTFACE) calc_sculpt_normal(sd, ss, an, nodes, totnode); copy_v3_v3(grab_delta, ss->cache->grab_delta_symmetry); From 2ca6e5dd019b30519926b1d743df10aa72c5519b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 13 Dec 2010 02:33:14 +0000 Subject: [PATCH 115/236] multi-dimensional array resolving for rna paths. eg, "matrix[3][2]" could be used as a driver. Test from python bpy.context.object.path_resolve("matrix_world[2][3]") Before this was always treated as a 1 dimensional array. --- source/blender/makesrna/intern/rna_access.c | 88 +++++++++++++++------ 1 file changed, 64 insertions(+), 24 deletions(-) diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 44155a8c528..4dc696e32dc 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -3085,36 +3085,76 @@ int RNA_path_resolve_full(PointerRNA *ptr, const char *path, PointerRNA *r_ptr, *index= -1; if (*path) { - if (*path=='[') { - token= rna_path_token(&path, fixedbuf, sizeof(fixedbuf), 1); + int index_arr[RNA_MAX_ARRAY_DIMENSION]= {0}; + int len[RNA_MAX_ARRAY_DIMENSION]; + const int dim= RNA_property_array_dimension(&curptr, prop, len); + int i, temp_index; - if(token==NULL) { - /* invalid syntax blah[] */ - return 0; - } - /* check for "" to see if it is a string */ - else if(rna_token_strip_quotes(token)) { - *index= RNA_property_array_item_index(prop, *(token+1)); - } - else { - /* otherwise do int lookup */ - *index= atoi(token); - if(intkey==0 && (token[0] != '0' || token[1] != '\0')) { - return 0; /* we can be sure the fixedbuf was used in this case */ + for(i=0; i= len[i]) + return 0; + + index_arr[i]= temp_index; + /* end multi index resolve */ } - if(token != fixedbuf) - MEM_freeN(token); + /* arrays always contain numbers so further values are not valid */ + if(*path) { + return 0; + } + else { + int totdim= 1; + int flat_index= 0; + + for(i=dim-1; i>=0; i--) { + flat_index += index_arr[i] * totdim; + totdim *= len[i]; + } + + *index= flat_index; + } } } } From f2d4b7dfb813b6dde7f7bf6a43a72c7b1bcce429 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 13 Dec 2010 04:33:58 +0000 Subject: [PATCH 116/236] fix [#24752] ctr-tab hotkey dont show "mesh select mode" menu for maya preset, but for default blender preset its ok --- release/scripts/presets/keyconfig/maya.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/scripts/presets/keyconfig/maya.py b/release/scripts/presets/keyconfig/maya.py index 8c67a4ed231..29533fd7a41 100644 --- a/release/scripts/presets/keyconfig/maya.py +++ b/release/scripts/presets/keyconfig/maya.py @@ -314,7 +314,7 @@ kmi = km.items.new('mesh.faces_select_linked_flat', 'F', 'PRESS', shift=True, ct kmi.properties.sharpness = 135.0 kmi = km.items.new('mesh.select_similar', 'G', 'PRESS', shift=True) kmi = km.items.new('wm.call_menu', 'TAB', 'PRESS', ctrl=True) -kmi.properties.name = 'VIEW3D_MT_edit_mesh_selection_mode' +kmi.properties.name = 'VIEW3D_MT_edit_mesh_select_mode' kmi = km.items.new('mesh.hide', 'H', 'PRESS') kmi = km.items.new('mesh.hide', 'H', 'PRESS', shift=True) kmi.properties.unselected = True From dec478957114ddaed1512a47a590ff7fa52ade70 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 13 Dec 2010 05:02:23 +0000 Subject: [PATCH 117/236] option to reverse cycle through render slots (Alt+J). --- source/blender/editors/space_image/image_ops.c | 8 ++++++-- source/blender/editors/space_image/space_image.c | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index a2aa2419e49..594de9b943d 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -2094,13 +2094,15 @@ static int cycle_render_slot_poll(bContext *C) return (ima && ima->type == IMA_TYPE_R_RESULT); } -static int cycle_render_slot_exec(bContext *C, wmOperator *UNUSED(op)) +static int cycle_render_slot_exec(bContext *C, wmOperator *op) { Image *ima= CTX_data_edit_image(C); int a, slot, cur= ima->render_slot; + const short use_reverse= RNA_boolean_get(op->ptr, "reverse"); for(a=1; arenders[slot] || slot == ima->last_render_slot) { ima->render_slot= slot; @@ -2132,6 +2134,8 @@ void IMAGE_OT_cycle_render_slot(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + RNA_def_boolean(ot->srna, "reverse", 0, "Cycle in Reverse", ""); } /******************** TODO ********************/ diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 9d5b5048d75..cebc0666eb0 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -505,6 +505,7 @@ void image_keymap(struct wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "IMAGE_OT_scopes", PKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "IMAGE_OT_cycle_render_slot", JKEY, KM_PRESS, 0, 0); + RNA_boolean_set(WM_keymap_add_item(keymap, "IMAGE_OT_cycle_render_slot", JKEY, KM_PRESS, KM_ALT, 0)->ptr, "reverse", TRUE); keymap= WM_keymap_find(keyconf, "Image", SPACE_IMAGE, 0); From 1474b32456f26ead36b50d787d99f9b1769b27e8 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Mon, 13 Dec 2010 06:31:49 +0000 Subject: [PATCH 118/236] Lattices now have AnimData This allows manual (point by point) animation of their control verts, although many other settings cannot really be animated with any visible effects yet. Interestingly, lattices also had IPO block pointers, though they were never really used (AFAIK). Todo: - Animation Editor support has yet to be added. I've got a few other things to add to, so will group those changes together. --- source/blender/blenkernel/intern/anim_sys.c | 5 +++- source/blender/blenkernel/intern/lattice.c | 11 ++++--- source/blender/blenkernel/intern/mball.c | 5 +++- source/blender/blenloader/intern/readfile.c | 7 +++++ source/blender/blenloader/intern/writefile.c | 5 +++- source/blender/makesdna/DNA_lattice_types.h | 4 ++- source/blender/makesrna/intern/rna_lattice.c | 31 ++++++++++++++++++++ 7 files changed, 60 insertions(+), 8 deletions(-) diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index e48183ac479..b595d22e88c 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -73,7 +73,7 @@ short id_type_can_have_animdata (ID *id) switch (GS(id->name)) { /* has AnimData */ case ID_OB: - case ID_ME: case ID_MB: case ID_CU: case ID_AR: + case ID_ME: case ID_MB: case ID_CU: case ID_AR: case ID_LT: case ID_KE: case ID_PA: case ID_MA: case ID_TE: case ID_NT: @@ -1913,6 +1913,9 @@ void BKE_animsys_evaluate_all_animation (Main *main, float ctime) /* armatures */ EVAL_ANIM_IDS(main->armature.first, ADT_RECALC_ANIM); + /* lattices */ + EVAL_ANIM_IDS(main->latt.first, ADT_RECALC_ANIM); + /* meshes */ EVAL_ANIM_IDS(main->mesh.first, ADT_RECALC_ANIM); diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c index 73d77e850fd..891d42c4a76 100644 --- a/source/blender/blenkernel/intern/lattice.c +++ b/source/blender/blenkernel/intern/lattice.c @@ -49,6 +49,7 @@ #include "DNA_curve_types.h" #include "DNA_key_types.h" +#include "BKE_animsys.h" #include "BKE_anim.h" #include "BKE_cdderivedmesh.h" #include "BKE_displist.h" @@ -203,10 +204,6 @@ Lattice *copy_lattice(Lattice *lt) ltn= copy_libblock(lt); ltn->def= MEM_dupallocN(lt->def); - -#if 0 // XXX old animation system - id_us_plus((ID *)ltn->ipo); -#endif // XXX old animation system ltn->key= copy_key(ltn->key); if(ltn->key) ltn->key->from= (ID *)ltn; @@ -233,6 +230,12 @@ void free_lattice(Lattice *lt) MEM_freeN(editlt); MEM_freeN(lt->editlatt); } + + /* free animation data */ + if (lt->adt) { + BKE_free_animdata(<->id); + lt->adt= NULL; + } } diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c index 94ffaaea947..03cbd9e41fd 100644 --- a/source/blender/blenkernel/intern/mball.c +++ b/source/blender/blenkernel/intern/mball.c @@ -86,7 +86,10 @@ void free_mball(MetaBall *mb) { unlink_mball(mb); - if(mb->adt) BKE_free_animdata((ID *)mb); + if(mb->adt) { + BKE_free_animdata((ID *)mb); + mb->adt = NULL; + } if(mb->mat) MEM_freeN(mb->mat); if(mb->bb) MEM_freeN(mb->bb); BLI_freelistN(&mb->elems); diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index c22cdb21899..44fbf9ef317 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -3421,6 +3421,7 @@ static void lib_link_latt(FileData *fd, Main *main) lt= main->latt.first; while(lt) { if(lt->id.flag & LIB_NEEDLINK) { + if(lt->adt) lib_link_animdata(fd, <->id, lt->adt); lt->ipo= newlibadr_us(fd, lt->id.lib, lt->ipo); // XXX depreceated - old animation system lt->key= newlibadr_us(fd, lt->id.lib, lt->key); @@ -3439,6 +3440,9 @@ static void direct_link_latt(FileData *fd, Lattice *lt) direct_link_dverts(fd, lt->pntsu*lt->pntsv*lt->pntsw, lt->dvert); lt->editlatt= NULL; + + lt->adt = newdataadr(fd, lt->adt); + direct_link_animdata(fd, lt->adt); } @@ -11766,6 +11770,9 @@ static void expand_lattice(FileData *fd, Main *mainvar, Lattice *lt) { expand_doit(fd, mainvar, lt->ipo); // XXX depreceated - old animation system expand_doit(fd, mainvar, lt->key); + + if (lt->adt) + expand_animdata(fd, mainvar, lt->adt); } diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 9d990d3ea30..6f6f7570df2 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1557,7 +1557,10 @@ static void write_lattices(WriteData *wd, ListBase *idbase) /* write LibData */ writestruct(wd, ID_LT, "Lattice", 1, lt); if (lt->id.properties) IDP_WriteProperty(lt->id.properties, wd); - + + /* write animdata */ + if (lt->adt) write_animdata(wd, lt->adt); + /* direct data */ writestruct(wd, DATA, "BPoint", lt->pntsu*lt->pntsv*lt->pntsw, lt->def); diff --git a/source/blender/makesdna/DNA_lattice_types.h b/source/blender/makesdna/DNA_lattice_types.h index 3d05acfbe0d..253846dfae5 100644 --- a/source/blender/makesdna/DNA_lattice_types.h +++ b/source/blender/makesdna/DNA_lattice_types.h @@ -31,6 +31,7 @@ #include "DNA_ID.h" +struct AnimData; struct BPoint; struct Ipo; struct Key; @@ -46,6 +47,7 @@ typedef struct EditLatt { typedef struct Lattice { ID id; + struct AnimData *adt; short pntsu, pntsv, pntsw, flag; short opntsu, opntsv, opntsw, pad2; @@ -56,7 +58,7 @@ typedef struct Lattice { struct BPoint *def; - struct Ipo *ipo; + struct Ipo *ipo; /* XXX: depreceated... old animation system */ struct Key *key; struct MDeformVert *dvert; diff --git a/source/blender/makesrna/intern/rna_lattice.c b/source/blender/makesrna/intern/rna_lattice.c index c9e7da414e5..1678201dec2 100644 --- a/source/blender/makesrna/intern/rna_lattice.c +++ b/source/blender/makesrna/intern/rna_lattice.c @@ -180,6 +180,33 @@ static void rna_Lattice_vg_name_set(PointerRNA *ptr, const char *value) strcpy(lt->editlatt->latt->vgroup, value); } +/* annoying, but is a consequence of RNA structures... */ +static char *rna_LatticePoint_path(PointerRNA *ptr) +{ + Lattice *lt= (Lattice*)ptr->id.data; + void *point= ptr->data; + BPoint *points = NULL; + + if (lt->editlatt && lt->editlatt->latt->def) + points = lt->editlatt->latt->def; + else + points = lt->def; + + if (points && point) { + int tot= lt->pntsu*lt->pntsv*lt->pntsw; + + /* only return index if in range */ + if ((point >= (void *)points) && (point < (void *)(points + tot))) { + int pt_index = (int)((BPoint *)point - points); + + return BLI_sprintfN("points[%d]", pt_index); + } + } + else { + return BLI_strdup(""); + } +} + #else @@ -191,6 +218,7 @@ static void rna_def_latticepoint(BlenderRNA *brna) srna= RNA_def_struct(brna, "LatticePoint", NULL); RNA_def_struct_sdna(srna, "BPoint"); RNA_def_struct_ui_text(srna, "LatticePoint", "Point in the lattice grid"); + RNA_def_struct_path_func(srna, "rna_LatticePoint_path"); prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION); RNA_def_property_array(prop, 3); @@ -287,6 +315,9 @@ static void rna_def_lattice(BlenderRNA *brna) RNA_def_property_struct_type(prop, "LatticePoint"); RNA_def_property_collection_funcs(prop, "rna_Lattice_points_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, 0, 0); RNA_def_property_ui_text(prop, "Points", "Points of the lattice"); + + /* pointers */ + rna_def_animdata_common(srna); } void RNA_def_lattice(BlenderRNA *brna) From 39e3a759789d493073580b04fe9c6b811321c7f6 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 13 Dec 2010 06:54:25 +0000 Subject: [PATCH 119/236] fix for transform operator giving '' enum value when logged, now pass on the context for operator string representation. --- source/blender/windowmanager/intern/wm_event_system.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 8be7cc2d702..579bac52306 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -385,9 +385,10 @@ int WM_operator_poll_context(bContext *C, wmOperatorType *ot, int context) return wm_operator_call_internal(C, ot, NULL, NULL, context, TRUE); } -static void wm_operator_print(wmOperator *op) +static void wm_operator_print(bContext *C, wmOperator *op) { - char *buf = WM_operator_pystring(NULL, op->type, op->ptr, 1); + /* context is needed for enum function */ + char *buf = WM_operator_pystring(C, op->type, op->ptr, 1); printf("%s\n", buf); MEM_freeN(buf); } @@ -404,7 +405,7 @@ static void wm_operator_reports(bContext *C, wmOperator *op, int retval, int pop if(retval & OPERATOR_FINISHED) { if(G.f & G_DEBUG) - wm_operator_print(op); /* todo - this print may double up, might want to check more flags then the FINISHED */ + wm_operator_print(C, op); /* todo - this print may double up, might want to check more flags then the FINISHED */ if (op->type->flag & OPTYPE_REGISTER) { /* Report the python string representation of the operator */ @@ -1289,7 +1290,7 @@ static int wm_handler_fileselect_call(bContext *C, ListBase *handlers, wmEventHa if (retval & OPERATOR_FINISHED) if(G.f & G_DEBUG) - wm_operator_print(handler->op); + wm_operator_print(C, handler->op); /* XXX check this carefully, CTX_wm_manager(C) == wm is a bit hackish */ if(CTX_wm_manager(C) == wm && wm->op_undo_depth == 0) From 6ef85af300d55030eda2bfe7cf01d92fcdc92188 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 13 Dec 2010 07:54:35 +0000 Subject: [PATCH 120/236] exceptions in registering properties were not properly handled, allowing a single error stop the main module registration loop. worst case 1 script error could load blender without a UI. --- source/blender/python/intern/bpy_rna.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index c00edf7bf0f..c1bd2d87d7f 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -4908,7 +4908,7 @@ static int pyrna_deferred_register_props(StructRNA *srna, PyObject *class_dict) PyObject *item, *key; PyObject *order; Py_ssize_t pos = 0; - int ret; + int ret= 0; /* in both cases PyDict_CheckExact(class_dict) will be true even * though Operators have a metaclass dict namespace */ @@ -4918,7 +4918,7 @@ static int pyrna_deferred_register_props(StructRNA *srna, PyObject *class_dict) key= PyList_GET_ITEM(order, pos); item= PyDict_GetItem(class_dict, key); ret= deferred_register_prop(srna, key, item); - if(ret==-1) + if(ret != 0) break; } } @@ -4926,12 +4926,12 @@ static int pyrna_deferred_register_props(StructRNA *srna, PyObject *class_dict) while (PyDict_Next(class_dict, &pos, &key, &item)) { ret= deferred_register_prop(srna, key, item); - if(ret==-1) + if(ret != 0) break; } } - return 0; + return ret; } static int pyrna_deferred_register_class_recursive(StructRNA *srna, PyTypeObject *py_class) From d09bc78e6b39ce78791517de2cb99b664e9c8e53 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Mon, 13 Dec 2010 08:08:09 +0000 Subject: [PATCH 121/236] Reshuffled AnimData reading functions in writefile.c as per an old comment I'd left in there before this code had been merged back from NLA-SoC branch --- source/blender/blenloader/intern/writefile.c | 389 +++++++++---------- 1 file changed, 194 insertions(+), 195 deletions(-) diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 6f6f7570df2..13b741e5661 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -362,7 +362,6 @@ static void writedata(WriteData *wd, int filecode, int len, void *adr) /* do not /*These functions are used by blender's .blend system for file saving/loading.*/ void IDP_WriteProperty_OnlyData(IDProperty *prop, void *wd); void IDP_WriteProperty(IDProperty *prop, void *wd); -static void write_animdata(WriteData *wd, AnimData *adt); // XXX code needs reshuffling, but not before NLA SoC is merged back into 2.5 static void IDP_WriteArray(IDProperty *prop, void *wd) { @@ -434,6 +433,200 @@ void IDP_WriteProperty(IDProperty *prop, void *wd) IDP_WriteProperty_OnlyData(prop, wd); } +static void write_fmodifiers(WriteData *wd, ListBase *fmodifiers) +{ + FModifier *fcm; + + /* Modifiers */ + for (fcm= fmodifiers->first; fcm; fcm= fcm->next) { + FModifierTypeInfo *fmi= fmodifier_get_typeinfo(fcm); + + /* Write the specific data */ + if (fmi && fcm->data) { + /* firstly, just write the plain fmi->data struct */ + writestruct(wd, DATA, fmi->structName, 1, fcm->data); + + /* do any modifier specific stuff */ + switch (fcm->type) { + case FMODIFIER_TYPE_GENERATOR: + { + FMod_Generator *data= (FMod_Generator *)fcm->data; + + /* write coefficients array */ + if (data->coefficients) + writedata(wd, DATA, sizeof(float)*(data->arraysize), data->coefficients); + } + break; + case FMODIFIER_TYPE_ENVELOPE: + { + FMod_Envelope *data= (FMod_Envelope *)fcm->data; + + /* write envelope data */ + if (data->data) + writedata(wd, DATA, sizeof(FCM_EnvelopeData)*(data->totvert), data->data); + } + break; + case FMODIFIER_TYPE_PYTHON: + { + FMod_Python *data = (FMod_Python *)fcm->data; + + /* Write ID Properties -- and copy this comment EXACTLY for easy finding + of library blocks that implement this.*/ + IDP_WriteProperty(data->prop, wd); + } + break; + } + } + + /* Write the modifier */ + writestruct(wd, DATA, "FModifier", 1, fcm); + } +} + +static void write_fcurves(WriteData *wd, ListBase *fcurves) +{ + FCurve *fcu; + + for (fcu=fcurves->first; fcu; fcu=fcu->next) { + /* F-Curve */ + writestruct(wd, DATA, "FCurve", 1, fcu); + + /* curve data */ + if (fcu->bezt) + writestruct(wd, DATA, "BezTriple", fcu->totvert, fcu->bezt); + if (fcu->fpt) + writestruct(wd, DATA, "FPoint", fcu->totvert, fcu->fpt); + + if (fcu->rna_path) + writedata(wd, DATA, strlen(fcu->rna_path)+1, fcu->rna_path); + + /* driver data */ + if (fcu->driver) { + ChannelDriver *driver= fcu->driver; + DriverVar *dvar; + + writestruct(wd, DATA, "ChannelDriver", 1, driver); + + /* variables */ + for (dvar= driver->variables.first; dvar; dvar= dvar->next) { + writestruct(wd, DATA, "DriverVar", 1, dvar); + + DRIVER_TARGETS_USED_LOOPER(dvar) + { + if (dtar->rna_path) + writedata(wd, DATA, strlen(dtar->rna_path)+1, dtar->rna_path); + } + DRIVER_TARGETS_LOOPER_END + } + } + + /* write F-Modifiers */ + write_fmodifiers(wd, &fcu->modifiers); + } +} + +static void write_actions(WriteData *wd, ListBase *idbase) +{ + bAction *act; + bActionGroup *grp; + TimeMarker *marker; + + for(act=idbase->first; act; act= act->id.next) { + if (act->id.us>0 || wd->current) { + writestruct(wd, ID_AC, "bAction", 1, act); + if (act->id.properties) IDP_WriteProperty(act->id.properties, wd); + + write_fcurves(wd, &act->curves); + + for (grp=act->groups.first; grp; grp=grp->next) { + writestruct(wd, DATA, "bActionGroup", 1, grp); + } + + for (marker=act->markers.first; marker; marker=marker->next) { + writestruct(wd, DATA, "TimeMarker", 1, marker); + } + } + } + + /* flush helps the compression for undo-save */ + mywrite(wd, MYWRITE_FLUSH, 0); +} + +static void write_keyingsets(WriteData *wd, ListBase *list) +{ + KeyingSet *ks; + KS_Path *ksp; + + for (ks= list->first; ks; ks= ks->next) { + /* KeyingSet */ + writestruct(wd, DATA, "KeyingSet", 1, ks); + + /* Paths */ + for (ksp= ks->paths.first; ksp; ksp= ksp->next) { + /* Path */ + writestruct(wd, DATA, "KS_Path", 1, ksp); + + if (ksp->rna_path) + writedata(wd, DATA, strlen(ksp->rna_path)+1, ksp->rna_path); + } + } +} + +static void write_nlastrips(WriteData *wd, ListBase *strips) +{ + NlaStrip *strip; + + for (strip= strips->first; strip; strip= strip->next) { + /* write the strip first */ + writestruct(wd, DATA, "NlaStrip", 1, strip); + + /* write the strip's F-Curves and modifiers */ + write_fcurves(wd, &strip->fcurves); + write_fmodifiers(wd, &strip->modifiers); + + /* write the strip's children */ + write_nlastrips(wd, &strip->strips); + } +} + +static void write_nladata(WriteData *wd, ListBase *nlabase) +{ + NlaTrack *nlt; + + /* write all the tracks */ + for (nlt= nlabase->first; nlt; nlt= nlt->next) { + /* write the track first */ + writestruct(wd, DATA, "NlaTrack", 1, nlt); + + /* write the track's strips */ + write_nlastrips(wd, &nlt->strips); + } +} + +static void write_animdata(WriteData *wd, AnimData *adt) +{ + AnimOverride *aor; + + /* firstly, just write the AnimData block */ + writestruct(wd, DATA, "AnimData", 1, adt); + + /* write drivers */ + write_fcurves(wd, &adt->drivers); + + /* write overrides */ + // FIXME: are these needed? + for (aor= adt->overrides.first; aor; aor= aor->next) { + /* overrides consist of base data + rna_path */ + writestruct(wd, DATA, "AnimOverride", 1, aor); + writedata(wd, DATA, strlen(aor->rna_path)+1, aor->rna_path); + } + + // TODO write the remaps (if they are needed) + + /* write NLA data */ + write_nladata(wd, &adt->nla_tracks); +} + static void write_curvemapping(WriteData *wd, CurveMapping *cumap) { int a; @@ -846,200 +1039,6 @@ static void write_actuators(WriteData *wd, ListBase *lb) } } -static void write_fmodifiers(WriteData *wd, ListBase *fmodifiers) -{ - FModifier *fcm; - - /* Modifiers */ - for (fcm= fmodifiers->first; fcm; fcm= fcm->next) { - FModifierTypeInfo *fmi= fmodifier_get_typeinfo(fcm); - - /* Write the specific data */ - if (fmi && fcm->data) { - /* firstly, just write the plain fmi->data struct */ - writestruct(wd, DATA, fmi->structName, 1, fcm->data); - - /* do any modifier specific stuff */ - switch (fcm->type) { - case FMODIFIER_TYPE_GENERATOR: - { - FMod_Generator *data= (FMod_Generator *)fcm->data; - - /* write coefficients array */ - if (data->coefficients) - writedata(wd, DATA, sizeof(float)*(data->arraysize), data->coefficients); - } - break; - case FMODIFIER_TYPE_ENVELOPE: - { - FMod_Envelope *data= (FMod_Envelope *)fcm->data; - - /* write envelope data */ - if (data->data) - writedata(wd, DATA, sizeof(FCM_EnvelopeData)*(data->totvert), data->data); - } - break; - case FMODIFIER_TYPE_PYTHON: - { - FMod_Python *data = (FMod_Python *)fcm->data; - - /* Write ID Properties -- and copy this comment EXACTLY for easy finding - of library blocks that implement this.*/ - IDP_WriteProperty(data->prop, wd); - } - break; - } - } - - /* Write the modifier */ - writestruct(wd, DATA, "FModifier", 1, fcm); - } -} - -static void write_fcurves(WriteData *wd, ListBase *fcurves) -{ - FCurve *fcu; - - for (fcu=fcurves->first; fcu; fcu=fcu->next) { - /* F-Curve */ - writestruct(wd, DATA, "FCurve", 1, fcu); - - /* curve data */ - if (fcu->bezt) - writestruct(wd, DATA, "BezTriple", fcu->totvert, fcu->bezt); - if (fcu->fpt) - writestruct(wd, DATA, "FPoint", fcu->totvert, fcu->fpt); - - if (fcu->rna_path) - writedata(wd, DATA, strlen(fcu->rna_path)+1, fcu->rna_path); - - /* driver data */ - if (fcu->driver) { - ChannelDriver *driver= fcu->driver; - DriverVar *dvar; - - writestruct(wd, DATA, "ChannelDriver", 1, driver); - - /* variables */ - for (dvar= driver->variables.first; dvar; dvar= dvar->next) { - writestruct(wd, DATA, "DriverVar", 1, dvar); - - DRIVER_TARGETS_USED_LOOPER(dvar) - { - if (dtar->rna_path) - writedata(wd, DATA, strlen(dtar->rna_path)+1, dtar->rna_path); - } - DRIVER_TARGETS_LOOPER_END - } - } - - /* write F-Modifiers */ - write_fmodifiers(wd, &fcu->modifiers); - } -} - -static void write_actions(WriteData *wd, ListBase *idbase) -{ - bAction *act; - bActionGroup *grp; - TimeMarker *marker; - - for(act=idbase->first; act; act= act->id.next) { - if (act->id.us>0 || wd->current) { - writestruct(wd, ID_AC, "bAction", 1, act); - if (act->id.properties) IDP_WriteProperty(act->id.properties, wd); - - write_fcurves(wd, &act->curves); - - for (grp=act->groups.first; grp; grp=grp->next) { - writestruct(wd, DATA, "bActionGroup", 1, grp); - } - - for (marker=act->markers.first; marker; marker=marker->next) { - writestruct(wd, DATA, "TimeMarker", 1, marker); - } - } - } - - /* flush helps the compression for undo-save */ - mywrite(wd, MYWRITE_FLUSH, 0); -} - -static void write_keyingsets(WriteData *wd, ListBase *list) -{ - KeyingSet *ks; - KS_Path *ksp; - - for (ks= list->first; ks; ks= ks->next) { - /* KeyingSet */ - writestruct(wd, DATA, "KeyingSet", 1, ks); - - /* Paths */ - for (ksp= ks->paths.first; ksp; ksp= ksp->next) { - /* Path */ - writestruct(wd, DATA, "KS_Path", 1, ksp); - - if (ksp->rna_path) - writedata(wd, DATA, strlen(ksp->rna_path)+1, ksp->rna_path); - } - } -} - -static void write_nlastrips(WriteData *wd, ListBase *strips) -{ - NlaStrip *strip; - - for (strip= strips->first; strip; strip= strip->next) { - /* write the strip first */ - writestruct(wd, DATA, "NlaStrip", 1, strip); - - /* write the strip's F-Curves and modifiers */ - write_fcurves(wd, &strip->fcurves); - write_fmodifiers(wd, &strip->modifiers); - - /* write the strip's children */ - write_nlastrips(wd, &strip->strips); - } -} - -static void write_nladata(WriteData *wd, ListBase *nlabase) -{ - NlaTrack *nlt; - - /* write all the tracks */ - for (nlt= nlabase->first; nlt; nlt= nlt->next) { - /* write the track first */ - writestruct(wd, DATA, "NlaTrack", 1, nlt); - - /* write the track's strips */ - write_nlastrips(wd, &nlt->strips); - } -} - -static void write_animdata(WriteData *wd, AnimData *adt) -{ - AnimOverride *aor; - - /* firstly, just write the AnimData block */ - writestruct(wd, DATA, "AnimData", 1, adt); - - /* write drivers */ - write_fcurves(wd, &adt->drivers); - - /* write overrides */ - // FIXME: are these needed? - for (aor= adt->overrides.first; aor; aor= aor->next) { - /* overrides consist of base data + rna_path */ - writestruct(wd, DATA, "AnimOverride", 1, aor); - writedata(wd, DATA, strlen(aor->rna_path)+1, aor->rna_path); - } - - // TODO write the remaps (if they are needed) - - /* write NLA data */ - write_nladata(wd, &adt->nla_tracks); -} - static void write_motionpath(WriteData *wd, bMotionPath *mpath) { /* sanity checks */ From 02ec64ca46b277175a35e8289c5b6e10d44ff275 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 13 Dec 2010 08:44:07 +0000 Subject: [PATCH 122/236] fix for error in recent commit. --- source/blender/makesrna/intern/rna_lattice.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/blender/makesrna/intern/rna_lattice.c b/source/blender/makesrna/intern/rna_lattice.c index 1678201dec2..3285ed4e392 100644 --- a/source/blender/makesrna/intern/rna_lattice.c +++ b/source/blender/makesrna/intern/rna_lattice.c @@ -202,9 +202,8 @@ static char *rna_LatticePoint_path(PointerRNA *ptr) return BLI_sprintfN("points[%d]", pt_index); } } - else { - return BLI_strdup(""); - } + + return BLI_strdup(""); } From 25bf9e38f3fbeb1e36f29b1296f0bbc2dd61f9d2 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Mon, 13 Dec 2010 09:04:04 +0000 Subject: [PATCH 123/236] Bugfix #25188: Can't assign "add driver" to hide properties of bones This was set to being not-animatable in r33397. However, I think there are some valid use cases where controlling layer visibility may be a "too heavy handed" approach. --- source/blender/makesrna/intern/rna_armature.c | 1 - 1 file changed, 1 deletion(-) diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c index 8f436d9597d..1cf6ffb00bc 100644 --- a/source/blender/makesrna/intern/rna_armature.c +++ b/source/blender/makesrna/intern/rna_armature.c @@ -551,7 +551,6 @@ static void rna_def_bone(BlenderRNA *brna) prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_HIDDEN_P); RNA_def_property_ui_text(prop, "Hide", "Bone is not visible when it is not in Edit Mode (i.e. in Object or Pose Modes)"); - RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_update(prop, 0, "rna_Armature_redraw_data"); prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); From a4b410af3d67c44a35c9cbf6f09c33a3c41a50af Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 13 Dec 2010 09:10:16 +0000 Subject: [PATCH 124/236] Expose access to PROP_ENUM_FLAG from bpy.props.EnumProperty(), this is exposed as a python set(). The default value is also a python set() so multiple booleans can be used in the 1 property. Also added PROP_ENUM_FLAG support to operator printouts. --- source/blender/makesrna/intern/rna_access.c | 26 ++++- source/blender/python/intern/bpy_props.c | 123 +++++++++++++++----- 2 files changed, 118 insertions(+), 31 deletions(-) diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 4dc696e32dc..f95e18f3722 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -3807,7 +3807,31 @@ char *RNA_property_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop) const char *identifier; int val = RNA_property_enum_get(ptr, prop); - if(RNA_property_enum_identifier(C, ptr, prop, val, &identifier)) { + if(RNA_property_flag(prop) & PROP_ENUM_FLAG) { + /* represent as a python set */ + EnumPropertyItem *item= NULL; + int free; + + BLI_dynstr_append(dynstr, "{"); + + RNA_property_enum_items(C, ptr, prop, &item, NULL, &free); + if(item) { + short is_first= TRUE; + for (; item->identifier; item++) { + if(item->identifier[0] && item->value & val) { + BLI_dynstr_appendf(dynstr, is_first ? "'%s'" : ", '%s'", item->identifier); + is_first= FALSE; + } + } + + if(free) { + MEM_freeN(item); + } + } + + BLI_dynstr_append(dynstr, "}"); + } + else if(RNA_property_enum_identifier(C, ptr, prop, val, &identifier)) { BLI_dynstr_appendf(dynstr, "'%s'", identifier); } else { diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c index b7192f7395b..1148b9e5e2b 100644 --- a/source/blender/python/intern/bpy_props.c +++ b/source/blender/python/intern/bpy_props.c @@ -40,6 +40,12 @@ EnumPropertyItem property_flag_items[] = { {PROP_ANIMATABLE, "ANIMATABLE", 0, "Animateable", ""}, {0, NULL, 0, NULL, NULL}}; +EnumPropertyItem property_flag_enum_items[] = { + {PROP_HIDDEN, "HIDDEN", 0, "Hidden", ""}, + {PROP_ANIMATABLE, "ANIMATABLE", 0, "Animateable", ""}, + {PROP_ENUM_FLAG, "ENUM_FLAG", 0, "Enum Flag", ""}, + {0, NULL, 0, NULL, NULL}}; + /* subtypes */ EnumPropertyItem property_subtype_string_items[] = { {PROP_FILEPATH, "FILE_PATH", 0, "File Path", ""}, @@ -134,7 +140,7 @@ static PyObject *bpy_prop_deferred_return(PyObject *func, PyObject *kw) /* terse macros for error checks shared between all funcs cant use function * calls because of static strins passed to pyrna_set_to_enum_bitfield */ -#define BPY_PROPDEF_CHECK(_func) \ +#define BPY_PROPDEF_CHECK(_func, _property_flag_items) \ if(id_len >= MAX_IDPROP_NAME) { \ PyErr_Format(PyExc_TypeError, #_func"(): '%.200s' too long, max length is %d", id, MAX_IDPROP_NAME-1); \ return NULL; \ @@ -143,11 +149,11 @@ static PyObject *bpy_prop_deferred_return(PyObject *func, PyObject *kw) PyErr_Format(PyExc_TypeError, #_func"(): '%s' is defined as a non-dynamic type", id); \ return NULL; \ } \ - if(pyopts && pyrna_set_to_enum_bitfield(property_flag_items, pyopts, &opts, #_func"(options={...}):")) \ + if(pyopts && pyrna_set_to_enum_bitfield(_property_flag_items, pyopts, &opts, #_func"(options={...}):")) \ return NULL; \ -#define BPY_PROPDEF_SUBTYPE_CHECK(_func, _subtype) \ - BPY_PROPDEF_CHECK(_func) \ +#define BPY_PROPDEF_SUBTYPE_CHECK(_func, _property_flag_items, _subtype) \ + BPY_PROPDEF_CHECK(_func, _property_flag_items) \ if(pysubtype && RNA_enum_value_from_id(_subtype, pysubtype, &subtype)==0) { \ PyErr_Format(PyExc_TypeError, #_func"(subtype='%s'): invalid subtype", pysubtype); \ return NULL; \ @@ -196,7 +202,7 @@ static PyObject *BPy_BoolProperty(PyObject *self, PyObject *args, PyObject *kw) if (!PyArg_ParseTupleAndKeywords(args, kw, "s#|ssiO!s:BoolProperty", (char **)kwlist, &id, &id_len, &name, &description, &def, &PySet_Type, &pyopts, &pysubtype)) return NULL; - BPY_PROPDEF_SUBTYPE_CHECK(BoolProperty, property_subtype_number_items) + BPY_PROPDEF_SUBTYPE_CHECK(BoolProperty, property_flag_items, property_subtype_number_items) prop= RNA_def_property(srna, id, PROP_BOOLEAN, subtype); RNA_def_property_boolean_default(prop, def); @@ -243,7 +249,7 @@ static PyObject *BPy_BoolVectorProperty(PyObject *self, PyObject *args, PyObject if (!PyArg_ParseTupleAndKeywords(args, kw, "s#|ssOO!si:BoolVectorProperty", (char **)kwlist, &id, &id_len, &name, &description, &pydef, &PySet_Type, &pyopts, &pysubtype, &size)) return NULL; - BPY_PROPDEF_SUBTYPE_CHECK(BoolVectorProperty, property_subtype_array_items) + BPY_PROPDEF_SUBTYPE_CHECK(BoolVectorProperty, property_flag_items, property_subtype_array_items) if(size < 1 || size > PYRNA_STACK_ARRAY) { PyErr_Format(PyExc_TypeError, "BoolVectorProperty(size=%d): size must be between 0 and " STRINGIFY(PYRNA_STACK_ARRAY), size); @@ -298,7 +304,7 @@ static PyObject *BPy_IntProperty(PyObject *self, PyObject *args, PyObject *kw) if (!PyArg_ParseTupleAndKeywords(args, kw, "s#|ssiiiiiiO!s:IntProperty", (char **)kwlist, &id, &id_len, &name, &description, &def, &min, &max, &soft_min, &soft_max, &step, &PySet_Type, &pyopts, &pysubtype)) return NULL; - BPY_PROPDEF_SUBTYPE_CHECK(IntProperty, property_subtype_number_items) + BPY_PROPDEF_SUBTYPE_CHECK(IntProperty, property_flag_items, property_subtype_number_items) prop= RNA_def_property(srna, id, PROP_INT, subtype); RNA_def_property_int_default(prop, def); @@ -346,7 +352,7 @@ static PyObject *BPy_IntVectorProperty(PyObject *self, PyObject *args, PyObject if (!PyArg_ParseTupleAndKeywords(args, kw, "s#|ssOiiiiiO!si:IntVectorProperty", (char **)kwlist, &id, &id_len, &name, &description, &pydef, &min, &max, &soft_min, &soft_max, &step, &PySet_Type, &pyopts, &pysubtype, &size)) return NULL; - BPY_PROPDEF_SUBTYPE_CHECK(IntVectorProperty, property_subtype_array_items) + BPY_PROPDEF_SUBTYPE_CHECK(IntVectorProperty, property_flag_items, property_subtype_array_items) if(size < 1 || size > PYRNA_STACK_ARRAY) { PyErr_Format(PyExc_TypeError, "IntVectorProperty(size=%d): size must be between 0 and " STRINGIFY(PYRNA_STACK_ARRAY), size); @@ -407,7 +413,7 @@ static PyObject *BPy_FloatProperty(PyObject *self, PyObject *args, PyObject *kw) if (!PyArg_ParseTupleAndKeywords(args, kw, "s#|ssffffffiO!ss:FloatProperty", (char **)kwlist, &id, &id_len, &name, &description, &def, &min, &max, &soft_min, &soft_max, &step, &precision, &PySet_Type, &pyopts, &pysubtype, &pyunit)) return NULL; - BPY_PROPDEF_SUBTYPE_CHECK(FloatProperty, property_subtype_number_items) + BPY_PROPDEF_SUBTYPE_CHECK(FloatProperty, property_flag_items, property_subtype_number_items) if(pyunit && RNA_enum_value_from_id(property_unit_items, pyunit, &unit)==0) { PyErr_Format(PyExc_TypeError, "FloatProperty(unit='%s'): invalid unit"); @@ -460,7 +466,7 @@ static PyObject *BPy_FloatVectorProperty(PyObject *self, PyObject *args, PyObjec if (!PyArg_ParseTupleAndKeywords(args, kw, "s#|ssOfffffiO!si:FloatVectorProperty", (char **)kwlist, &id, &id_len, &name, &description, &pydef, &min, &max, &soft_min, &soft_max, &step, &precision, &PySet_Type, &pyopts, &pysubtype, &size)) return NULL; - BPY_PROPDEF_SUBTYPE_CHECK(FloatVectorProperty, property_subtype_array_items) + BPY_PROPDEF_SUBTYPE_CHECK(FloatVectorProperty, property_flag_items, property_subtype_array_items) if(size < 1 || size > PYRNA_STACK_ARRAY) { PyErr_Format(PyExc_TypeError, "FloatVectorProperty(size=%d): size must be between 0 and " STRINGIFY(PYRNA_STACK_ARRAY), size); @@ -515,7 +521,7 @@ static PyObject *BPy_StringProperty(PyObject *self, PyObject *args, PyObject *kw if (!PyArg_ParseTupleAndKeywords(args, kw, "s#|sssiO!s:StringProperty", (char **)kwlist, &id, &id_len, &name, &description, &def, &maxlen, &PySet_Type, &pyopts, &pysubtype)) return NULL; - BPY_PROPDEF_SUBTYPE_CHECK(StringProperty, property_subtype_string_items) + BPY_PROPDEF_SUBTYPE_CHECK(StringProperty, property_flag_items, property_subtype_string_items) prop= RNA_def_property(srna, id, PROP_STRING, subtype); if(maxlen != 0) RNA_def_property_string_maxlength(prop, maxlen + 1); /* +1 since it includes null terminator */ @@ -531,49 +537,102 @@ static PyObject *BPy_StringProperty(PyObject *self, PyObject *args, PyObject *kw Py_RETURN_NONE; } -static EnumPropertyItem *enum_items_from_py(PyObject *value, const char *def, int *defvalue) +static EnumPropertyItem *enum_items_from_py(PyObject *value, PyObject *def, int *defvalue, const short is_enum_flag) { EnumPropertyItem *items= NULL; PyObject *item; int seq_len, i, totitem= 0; + short def_used= 0; + const char *def_cmp= NULL; if(!PySequence_Check(value)) { - PyErr_SetString(PyExc_TypeError, "expected a sequence of tuples for the enum items"); + PyErr_SetString(PyExc_TypeError, "EnumProperty(...): expected a sequence of tuples for the enum items"); return NULL; } - seq_len = PySequence_Length(value); + seq_len= PySequence_Length(value); + + if(is_enum_flag) { + if(seq_len > RNA_ENUM_BITFLAG_SIZE) { + PyErr_SetString(PyExc_TypeError, "EnumProperty(...): maximum " STRINGIFY(RNA_ENUM_BITFLAG_SIZE) " members for a ENUM_FLAG type property"); + return NULL; + } + if(def && !PySet_Check(def)) { + PyErr_Format(PyExc_TypeError, "EnumProperty(...): default option must be a 'set' type when ENUM_FLAG is enabled, not a '%.200s'", Py_TYPE(def)->tp_name); + return NULL; + } + } + else { + if(def) { + def_cmp= _PyUnicode_AsString(def); + if(def_cmp==NULL) { + PyErr_Format(PyExc_TypeError, "EnumProperty(...): default option must be a 'str' type when ENUM_FLAG is disabled, not a '%.200s'", Py_TYPE(def)->tp_name); + return NULL; + } + } + } + + /* blank value */ + *defvalue= 0; + for(i=0; i Date: Mon, 13 Dec 2010 09:39:14 +0000 Subject: [PATCH 125/236] Fix for [#25185] Toggling hair dynamics without deleting cache leaves hair disattached when mesh animation is controlled by deformers - discussed with Jahka on IRC on Sat --- release/scripts/ui/properties_particle.py | 6 +++--- source/blender/blenkernel/intern/particle.c | 4 ++-- source/blender/makesrna/intern/rna_particle.c | 3 +++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/release/scripts/ui/properties_particle.py b/release/scripts/ui/properties_particle.py index 6389dcb2207..1565ece3b40 100644 --- a/release/scripts/ui/properties_particle.py +++ b/release/scripts/ui/properties_particle.py @@ -234,7 +234,7 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, bpy.types.Panel): #part = psys.settings cloth = psys.cloth.settings - layout.enabled = psys.use_hair_dynamics + layout.enabled = psys.use_hair_dynamics and psys.point_cache.is_baked == False split = layout.split() @@ -274,12 +274,12 @@ class PARTICLE_PT_cache(ParticleButtonsPanel, bpy.types.Panel): phystype = psys.settings.physics_type if phystype == 'NO' or phystype == 'KEYED': return False - return (psys.settings.type in ('EMITTER', 'REACTOR') or (psys.settings.type == 'HAIR' and psys.use_hair_dynamics)) and engine in cls.COMPAT_ENGINES + return (psys.settings.type in ('EMITTER', 'REACTOR') or (psys.settings.type == 'HAIR' and (psys.use_hair_dynamics or psys.point_cache.is_baked))) and engine in cls.COMPAT_ENGINES def draw(self, context): psys = context.particle_system - point_cache_ui(self, context, psys.point_cache, True, 'HAIR' if psys.use_hair_dynamics else 'PSYS') + point_cache_ui(self, context, psys.point_cache, True, 'HAIR' if (psys.settings.type == 'HAIR') else 'PSYS') class PARTICLE_PT_velocity(ParticleButtonsPanel, bpy.types.Panel): diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 374d5a20b1c..a81406f0af1 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -2795,7 +2795,7 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra) ParticleSettings *part = psys->part; ParticleCacheKey *ca, **cache= psys->pathcache; - DerivedMesh *hair_dm = psys->hair_out_dm; + DerivedMesh *hair_dm = (psys->part->type==PART_HAIR && psys->flag & PSYS_HAIR_DYNAMICS) ? psys->hair_out_dm : NULL; ParticleKey result; @@ -2828,7 +2828,7 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra) BLI_srandom(psys->seed); keyed = psys->flag & PSYS_KEYED; - baked = !hair_dm && psys->pointcache->mem_cache.first; + baked = psys->pointcache->mem_cache.first && psys->part->type != PART_HAIR; /* clear out old and create new empty path cache */ psys_free_path_cache(psys, psys->edit); diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index 38e052dd7be..649ba0f3a1d 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -302,6 +302,7 @@ static void rna_Particle_target_redo(Main *bmain, Scene *scene, PointerRNA *ptr) static void rna_Particle_hair_dynamics(Main *bmain, Scene *scene, PointerRNA *ptr) { + Object *ob = (Object*)ptr->id.data; ParticleSystem *psys = (ParticleSystem*)ptr->data; if(psys && !psys->clmd) { @@ -313,6 +314,8 @@ static void rna_Particle_hair_dynamics(Main *bmain, Scene *scene, PointerRNA *pt } else WM_main_add_notifier(NC_OBJECT|ND_PARTICLE|NA_EDITED, NULL); + + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } static PointerRNA rna_particle_settings_get(PointerRNA *ptr) { From c85adcc2e439b7ecfede6e01a6e21f2f6258406b Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 13 Dec 2010 10:24:05 +0000 Subject: [PATCH 126/236] Use mdisps layer from edit_mesh when adding/removing multires modifier when object is in edit mode. --- source/blender/blenkernel/intern/multires.c | 6 +++++- source/blender/editors/object/object_modifier.c | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c index 7f7433f8965..802bc32f571 100644 --- a/source/blender/blenkernel/intern/multires.c +++ b/source/blender/blenkernel/intern/multires.c @@ -37,6 +37,7 @@ #include "BLI_blenlib.h" #include "BLI_math.h" #include "BLI_pbvh.h" +#include "BLI_editVert.h" #include "BKE_cdderivedmesh.h" #include "BKE_mesh.h" @@ -278,7 +279,10 @@ void multiresModifier_set_levels_from_disps(MultiresModifierData *mmd, Object *o Mesh *me = ob->data; MDisps *mdisp; - mdisp = CustomData_get_layer(&me->fdata, CD_MDISPS); + if(me->edit_mesh) + mdisp = CustomData_get_layer(&me->edit_mesh->fdata, CD_MDISPS); + else + mdisp = CustomData_get_layer(&me->fdata, CD_MDISPS); if(mdisp) { mmd->totlvl = get_levels_from_disps(ob); diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index cf34e885592..ba1778a6a38 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -42,6 +42,7 @@ #include "BLI_listbase.h" #include "BLI_string.h" #include "BLI_path_util.h" +#include "BLI_editVert.h" #include "BKE_curve.h" #include "BKE_context.h" @@ -68,6 +69,7 @@ #include "ED_armature.h" #include "ED_object.h" #include "ED_screen.h" +#include "ED_mesh.h" #include "WM_api.h" #include "WM_types.h" @@ -192,8 +194,16 @@ int ED_object_modifier_remove(ReportList *reports, Main *bmain, Scene *scene, Ob else if(md->type == eModifierType_Multires) { Mesh *me= ob->data; - CustomData_external_remove(&me->fdata, &me->id, CD_MDISPS, me->totface); - CustomData_free_layer_active(&me->fdata, CD_MDISPS, me->totface); + if(me->edit_mesh) { + EditMesh *em= me->edit_mesh; + /* CustomData_external_remove is used here only to mark layer as non-external + for further free-ing, so zero element count looks safer than em->totface */ + CustomData_external_remove(&em->fdata, &me->id, CD_MDISPS, 0); + EM_free_data_layer(em, &em->fdata, CD_MDISPS); + } else { + CustomData_external_remove(&me->fdata, &me->id, CD_MDISPS, me->totface); + CustomData_free_layer_active(&me->fdata, CD_MDISPS, me->totface); + } } if(ELEM(md->type, eModifierType_Softbody, eModifierType_Cloth) && From 7bf5d9449c615120169eb290a3a8f46e53157340 Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Mon, 13 Dec 2010 10:45:24 +0000 Subject: [PATCH 127/236] "Fix" for [#25184] Forces for growing hair - update inconsistency - as discussed with Jahka on Saturday on IRC * New option to "Regrow hair" for each frame. * This was perhaps more a feature request, but there was a similar useful feature called "animated hair" in particles at some point. * The previous behavior for hair growing was inconsistent to say the least, so this is a nice option to have. --- release/scripts/ui/properties_particle.py | 4 +++- source/blender/blenkernel/intern/particle.c | 2 +- source/blender/blenkernel/intern/particle_system.c | 2 +- source/blender/blenloader/intern/readfile.c | 2 ++ source/blender/makesdna/DNA_particle_types.h | 2 +- source/blender/makesrna/intern/rna_particle.c | 5 +++++ 6 files changed, 13 insertions(+), 4 deletions(-) diff --git a/release/scripts/ui/properties_particle.py b/release/scripts/ui/properties_particle.py index 1565ece3b40..af60c5fd784 100644 --- a/release/scripts/ui/properties_particle.py +++ b/release/scripts/ui/properties_particle.py @@ -125,7 +125,9 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, bpy.types.Panel): if psys.is_edited: split.operator("particle.edited_clear", text="Free Edit") else: - split.label(text="") + row = split.row() + row.enabled = particle_panel_enabled(context, psys) + row.prop(part, "regrow_hair") row = split.row() row.enabled = particle_panel_enabled(context, psys) row.prop(part, "hair_step") diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index a81406f0af1..2ec90eb29db 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -3473,7 +3473,7 @@ static void default_particle_settings(ParticleSettings *part) part->bb_uv_split=1; part->bb_align=PART_BB_VIEW; part->bb_split_offset=PART_BB_OFF_LINEAR; - part->flag=PART_REACT_MULTIPLE|PART_HAIR_GEOMETRY|PART_EDISTR|PART_TRAND; + part->flag=PART_EDISTR|PART_TRAND; part->sta= 1.0; part->end= 200.0; diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 60f54cfebf2..c7a65b8a5ee 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -4006,7 +4006,7 @@ static void psys_prepare_physics(ParticleSimulationData *sim) static int hair_needs_recalc(ParticleSystem *psys) { if(!(psys->flag & PSYS_EDITED) && (!psys->edit || !psys->edit->edited) && - ((psys->flag & PSYS_HAIR_DONE)==0 || psys->recalc & PSYS_RECALC_RESET)) { + ((psys->flag & PSYS_HAIR_DONE)==0 || psys->recalc & PSYS_RECALC_RESET || (psys->part->flag & PART_HAIR_REGROW && !psys->edit))) { return 1; } diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 44fbf9ef317..2661f046178 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -11173,6 +11173,8 @@ static void do_versions(FileData *fd, Library *lib, Main *main) for(part = main->particle.first; part; part = part->id.next) { if(part->boids) part->boids->pitch = 1.0f; + + part->flag &= ~PART_HAIR_REGROW; /* this was a deprecated flag before */ } for (sc= main->screen.first; sc; sc= sc->id.next) { diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h index 105fa6d5289..e336d3056ea 100644 --- a/source/blender/makesdna/DNA_particle_types.h +++ b/source/blender/makesdna/DNA_particle_types.h @@ -273,7 +273,7 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in /* for dopesheet */ #define PART_DS_EXPAND 8 -#define PART_HAIR_GEOMETRY 16 +#define PART_HAIR_REGROW 16 /* regrow hair for each frame */ #define PART_UNBORN 32 /*show unborn particles*/ #define PART_DIED 64 /*show died particles*/ diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index 649ba0f3a1d..90aeba65118 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -1183,6 +1183,11 @@ static void rna_def_particle_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Multi React", "React multiple times"); RNA_def_property_update(prop, 0, "rna_Particle_reset"); + prop= RNA_def_property(srna, "regrow_hair", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_HAIR_REGROW); + RNA_def_property_ui_text(prop, "Regrow", "Regrow hair for each frame"); + RNA_def_property_update(prop, 0, "rna_Particle_redo"); + prop= RNA_def_property(srna, "show_unborn", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_UNBORN); RNA_def_property_ui_text(prop, "Unborn", "Show particles before they are emitted"); From 7a581f95d002d6758079256e690b9fb14bd51bc9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 13 Dec 2010 11:39:11 +0000 Subject: [PATCH 128/236] check if a path can be created to a property before showing keyframe items in menus since they only give an error when accessed. --- .../editors/interface/interface_handlers.c | 11 ++++++--- source/blender/makesrna/RNA_access.h | 1 + source/blender/makesrna/intern/rna_access.c | 24 ++++++++++++++++++- 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 499d1d62c76..85359267ffd 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -4116,6 +4116,11 @@ static int ui_but_menu(bContext *C, uiBut *but) uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_DEFAULT); if(but->rnapoin.data && but->rnaprop) { + short is_anim= RNA_property_animateable(&but->rnapoin, but->rnaprop); + + /* second slower test, saved people finding keyframe items in menus when its not possible */ + if(is_anim) + is_anim= RNA_property_path_from_ID_check(&but->rnapoin, but->rnaprop); length= RNA_property_array_length(&but->rnapoin, but->rnaprop); @@ -4133,7 +4138,7 @@ static int ui_but_menu(bContext *C, uiBut *but) } } else if(but->flag & UI_BUT_DRIVEN); - else if(RNA_property_animateable(&but->rnapoin, but->rnaprop)) { + else if(is_anim) { if(length) { uiItemBooleanO(layout, "Insert Keyframes", 0, "ANIM_OT_keyframe_insert_button", "all", 1); uiItemBooleanO(layout, "Insert Single Keyframe", 0, "ANIM_OT_keyframe_insert_button", "all", 0); @@ -4158,7 +4163,7 @@ static int ui_but_menu(bContext *C, uiBut *but) uiItemO(layout, "Paste Driver", 0, "ANIM_OT_paste_driver_button"); } else if(but->flag & (UI_BUT_ANIMATED_KEY|UI_BUT_ANIMATED)); - else if(RNA_property_animateable(&but->rnapoin, but->rnaprop)) { + else if(is_anim) { uiItemS(layout); if(length) { @@ -4173,7 +4178,7 @@ static int ui_but_menu(bContext *C, uiBut *but) } /* Keying Sets */ - if(RNA_property_animateable(&but->rnapoin, but->rnaprop)) { + if(is_anim) { uiItemS(layout); if(length) { diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index 333e0d4bd2c..eb7f4b4d73f 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -682,6 +682,7 @@ int RNA_property_editable_index(PointerRNA *ptr, PropertyRNA *prop, int index); int RNA_property_editable_flag(PointerRNA *ptr, PropertyRNA *prop); /* without lib check, only checks the flag */ int RNA_property_animateable(PointerRNA *ptr, PropertyRNA *prop); int RNA_property_animated(PointerRNA *ptr, PropertyRNA *prop); +int RNA_property_path_from_ID_check(PointerRNA *ptr, PropertyRNA *prop); /* slow, use with care */ void RNA_property_update(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop); void RNA_property_update_main(struct Main *bmain, struct Scene *scene, PointerRNA *ptr, PropertyRNA *prop); diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index f95e18f3722..bf77d73351c 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -1238,6 +1238,29 @@ int RNA_property_animated(PointerRNA *ptr, PropertyRNA *prop) return 0; } + +/* this function is to check if its possible to create a valid path from the ID + * its slow so dont call in a loop */ +int RNA_property_path_from_ID_check(PointerRNA *ptr, PropertyRNA *prop) +{ + char *path= RNA_path_from_ID_to_property(ptr, prop); + int ret= 0; + + if(path) { + PointerRNA id_ptr; + PointerRNA r_ptr; + PropertyRNA *r_prop; + + RNA_id_pointer_create(ptr->id.data, &id_ptr); + RNA_path_resolve(&id_ptr, path, &r_ptr, &r_prop); + ret= (prop == r_prop); + MEM_freeN(path); + } + + return ret; +} + + static void rna_property_update(bContext *C, Main *bmain, Scene *scene, PointerRNA *ptr, PropertyRNA *prop) { int is_rna = (prop->magic == RNA_MAGIC); @@ -4760,4 +4783,3 @@ int RNA_property_copy(PointerRNA *ptr, PointerRNA *fromptr, PropertyRNA *prop, i return 0; } - From 6402aedc1a8fb808900e781ee588e569eaecb12c Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Mon, 13 Dec 2010 13:50:20 +0000 Subject: [PATCH 129/236] Bugfix #25178 Armature edit mode: x-mirror: "switch bone direction" now flips the mirror bone too. It leaves the mirrored bones selected too, so you get good visual feedback things happened there. --- .../blender/editors/armature/editarmature.c | 79 +++++++++++-------- 1 file changed, 45 insertions(+), 34 deletions(-) diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index a52b9a7d099..d9f2a9f2aca 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -152,6 +152,47 @@ void ED_armature_edit_bone_remove(bArmature *arm, EditBone *exBone) bone_free(arm, exBone); } +/* context: editmode armature */ +EditBone *ED_armature_bone_get_mirrored(ListBase *edbo, EditBone *ebo) +{ + EditBone *eboflip= NULL; + char name[32]; + + if (ebo == NULL) + return NULL; + + flip_side_name(name, ebo->name, FALSE); + + for (eboflip= edbo->first; eboflip; eboflip=eboflip->next) { + if (ebo != eboflip) { + if (!strcmp (name, eboflip->name)) + break; + } + } + + return eboflip; +} + +/* helper function for tools to work on mirrored parts. + it leaves mirrored bones selected then too, which is a good indication of what happened */ +static void armature_select_mirrored(bArmature *arm) +{ + /* Select mirrored bones */ + if (arm->flag & ARM_MIRROR_EDIT) { + EditBone *curBone, *ebone_mirr; + + for (curBone=arm->edbo->first; curBone; curBone=curBone->next) { + if (arm->layer & curBone->layer) { + if (curBone->flag & BONE_SELECTED) { + ebone_mirr= ED_armature_bone_get_mirrored(arm->edbo, curBone); + if (ebone_mirr) + ebone_mirr->flag |= BONE_SELECTED; + } + } + } + } + +} /* converts Bones to EditBone list, used for tools as well */ EditBone *make_boneList(ListBase *edbo, ListBase *bones, EditBone *parent, Bone *actBone) @@ -1749,28 +1790,6 @@ static EditBone *get_nearest_editbonepoint (ViewContext *vc, short mval[2], List return NULL; } -/* context: editmode armature */ -EditBone *ED_armature_bone_get_mirrored(ListBase *edbo, EditBone *ebo) -{ - EditBone *eboflip= NULL; - char name[32]; - - if (ebo == NULL) - return NULL; - - flip_side_name(name, ebo->name, FALSE); - - for (eboflip= edbo->first; eboflip; eboflip=eboflip->next) { - if (ebo != eboflip) { - if (!strcmp (name, eboflip->name)) - break; - } - } - - return eboflip; -} - - /* previously delete_armature */ /* only editmode! */ static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op)) @@ -1785,18 +1804,7 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op)) if (CTX_DATA_COUNT(C, selected_bones) == 0) return OPERATOR_CANCELLED; - /* Select mirrored bones */ - if (arm->flag & ARM_MIRROR_EDIT) { - for (curBone=arm->edbo->first; curBone; curBone=curBone->next) { - if (arm->layer & curBone->layer) { - if (curBone->flag & BONE_SELECTED) { - ebone_next= ED_armature_bone_get_mirrored(arm->edbo, curBone); - if (ebone_next) - ebone_next->flag |= BONE_SELECTED; - } - } - } - } + armature_select_mirrored(arm); /* First erase any associated pose channel */ if (obedit->pose) { @@ -3722,6 +3730,9 @@ static int armature_switch_direction_exec(bContext *C, wmOperator *UNUSED(op)) chains_find_tips(arm->edbo, &chains); if (chains.first == NULL) return OPERATOR_CANCELLED; + /* leaves mirrored bones selected, as indication of operation */ + armature_select_mirrored(arm); + /* loop over chains, only considering selected and visible bones */ for (chain= chains.first; chain; chain= chain->next) { EditBone *ebo, *child=NULL, *parent=NULL; From d241f2ed9377857c24e6d87feb277ad37bf2bda0 Mon Sep 17 00:00:00 2001 From: Xavier Thomas Date: Mon, 13 Dec 2010 14:47:31 +0000 Subject: [PATCH 130/236] Fix for imageeditor's scopes not updating when changing the image. --- source/blender/editors/space_image/space_image.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index cebc0666eb0..58ae3d0df87 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -643,6 +643,7 @@ static void image_listener(ScrArea *sa, wmNotifier *wmn) switch(wmn->data) { case ND_DATA: case ND_SELECT: + image_scopes_tag_refresh(sa); ED_area_tag_refresh(sa); ED_area_tag_redraw(sa); break; From 0ea96731d90407bec0088c1cf4c843ca34b38464 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Mon, 13 Dec 2010 15:21:44 +0000 Subject: [PATCH 131/236] Bugfix #25199 Graph editor: submenu for handle type had drawing error. Seems to be the collumns-separator feature for enum properties? No time for debugging that, a 5-item menu doesn't need 2 collumns. --- source/blender/editors/interface/interface_layout.c | 2 +- source/blender/editors/space_graph/graph_edit.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 88bba064ea1..5d9ebebe89d 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -756,7 +756,7 @@ void uiItemsFullEnumO(uiLayout *layout, const char *opname, const char *propname bt= block->buttons.last; bt->flag= UI_TEXT_LEFT; } - else + else /* XXX bug here, collums draw bottom item badly */ uiItemS(column); } } diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index a371a974be3..a9336046ea5 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -1356,7 +1356,6 @@ EnumPropertyItem graphkeys_handle_type_items[] = { {HD_FREE, "FREE", 0, "Free", ""}, {HD_VECT, "VECTOR", 0, "Vector", ""}, {HD_ALIGN, "ALIGNED", 0, "Aligned", ""}, - {0, "", 0, "", ""}, {HD_AUTO, "AUTO", 0, "Auto", "Handles that are automatically adjusted upon moving the keyframe. Whole curve"}, {HD_AUTO_ANIM, "ANIM_CLAMPED", 0, "Auto Clamped", "Auto handles clamped to not overshoot. Whole curve"}, {0, NULL, 0, NULL, NULL}}; From 573b8d0309c7459c8a7dcf1be12f92b65b9e22df Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Mon, 13 Dec 2010 17:10:44 +0000 Subject: [PATCH 132/236] Bugfix #25197 Curve follow path: the fcurve modifier got lost after tabbing in out editmode. Also other non-point related curves would get lost. --- source/blender/editors/curve/editcurve.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 9086e9fb317..7018ddab9fc 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -1108,8 +1108,10 @@ void ED_curve_updateAnimPaths(Object *obedit) nu_index++; } + /* the remainders in orig_curves can be copied back (like follow path) */ + addlisttolist(&curves, &orig_curves); + free_fcurves(&ad->action->curves); - free_fcurves(&orig_curves); ad->action->curves= curves; } From e3a2622cb51e660c6040fdd6c4ca395b956ed985 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Mon, 13 Dec 2010 17:23:03 +0000 Subject: [PATCH 133/236] Small fix in error text returned from baking. --- source/blender/editors/object/object_bake.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c index dd422f6d221..4af2e00ef69 100644 --- a/source/blender/editors/object/object_bake.c +++ b/source/blender/editors/object/object_bake.c @@ -235,7 +235,7 @@ static void bake_freejob(void *bkv) BakeRender *bkr= bkv; finish_bake_internal(bkr); - if(bkr->tot==0) BKE_report(bkr->reports, RPT_ERROR, "No valid images found to bake to"); + if(bkr->tot==0) BKE_report(bkr->reports, RPT_ERROR, "No objects or images found to bake to"); MEM_freeN(bkr); G.rendering = 0; } From d2f84e0f7997cb3a4f6f23d9c818d4fcb5010e0a Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Mon, 13 Dec 2010 17:40:06 +0000 Subject: [PATCH 134/236] Bugfix #25191 F11 pushed a render window to back, but not popped it. This also works for user prefs btw, not bad ;) --- .../blender/editors/render/render_internal.c | 58 +++++++++++-------- 1 file changed, 35 insertions(+), 23 deletions(-) diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index 5426a0e9df2..f6805094056 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -843,34 +843,46 @@ static int render_view_show_invoke(bContext *C, wmOperator *UNUSED(unused), wmEv { ScrArea *sa= find_area_showing_r_result(C); - /* test if we have a temp screen in front */ + /* test if we have a temp screen active */ if(CTX_wm_window(C)->screen->temp) { wm_window_lower(CTX_wm_window(C)); } - /* determine if render already shows */ - else if(sa) { - SpaceImage *sima= sa->spacedata.first; - - if(sima->flag & SI_PREVSPACE) { - sima->flag &= ~SI_PREVSPACE; - - if(sima->flag & SI_FULLWINDOW) { - sima->flag &= ~SI_FULLWINDOW; - ED_screen_full_prevspace(C, sa); - } - else if(sima->next) { - /* workaround for case of double prevspace, render window - with a file browser on top of it (same as in ED_area_prevspace) */ - if(sima->next->spacetype == SPACE_FILE && sima->next->next) - ED_area_newspace(C, sa, sima->next->next->spacetype); - else - ED_area_newspace(C, sa, sima->next->spacetype); - ED_area_tag_redraw(sa); + else { + /* is there another window? */ + wmWindow *win; + + for(win= CTX_wm_manager(C)->windows.first; win; win= win->next) { + if(win->screen->temp) { + wm_window_raise(win); + return OPERATOR_FINISHED; } } - } - else { - screen_set_image_output(C, event->x, event->y); + + /* determine if render already shows */ + if(sa) { + SpaceImage *sima= sa->spacedata.first; + + if(sima->flag & SI_PREVSPACE) { + sima->flag &= ~SI_PREVSPACE; + + if(sima->flag & SI_FULLWINDOW) { + sima->flag &= ~SI_FULLWINDOW; + ED_screen_full_prevspace(C, sa); + } + else if(sima->next) { + /* workaround for case of double prevspace, render window + with a file browser on top of it (same as in ED_area_prevspace) */ + if(sima->next->spacetype == SPACE_FILE && sima->next->next) + ED_area_newspace(C, sa, sima->next->next->spacetype); + else + ED_area_newspace(C, sa, sima->next->spacetype); + ED_area_tag_redraw(sa); + } + } + } + else { + screen_set_image_output(C, event->x, event->y); + } } return OPERATOR_FINISHED; From 4d5afa04f8a927041cbcee32b0cf74e5c0a173e1 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Mon, 13 Dec 2010 18:22:59 +0000 Subject: [PATCH 135/236] Bugfix #23420 Compositor/Image viewer In 2.4x viewer nodes had animation playback. Not restored yet. However, when loading such older files the viewer never showed any result. --- source/blender/blenkernel/intern/image.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index efa8a824663..eb85db89835 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -2149,7 +2149,8 @@ ImBuf *BKE_image_acquire_ibuf(Image *ima, ImageUser *iuser, void **lock_r) BLI_lock_thread(LOCK_VIEWER); *lock_r= ima; - frame= iuser?iuser->framenr:0; + /* XXX anim play for viewer nodes not yet supported */ + frame= 0; // XXX iuser?iuser->framenr:0; ibuf= image_get_ibuf(ima, 0, frame); if(!ibuf) { From 33d98c4d3ab4382a296615b770f915cbbf44628b Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Mon, 13 Dec 2010 19:10:35 +0000 Subject: [PATCH 136/236] Bugfix #25207 Driver fix: typing expression outside Graph Editor didn't tag the expression to be re-evaluated. Also missing was notifier for other editors. --- source/blender/editors/interface/interface_anim.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c index 4021e4208dc..0f77b437eeb 100644 --- a/source/blender/editors/interface/interface_anim.c +++ b/source/blender/editors/interface/interface_anim.c @@ -84,6 +84,8 @@ int ui_but_anim_expression_set(uiBut *but, const char *str) if(driver && driver->type == DRIVER_TYPE_PYTHON) { BLI_strncpy(driver->expression, str, sizeof(driver->expression)); + driver->flag |= DRIVER_FLAG_RECOMPILE; + WM_event_add_notifier(but->block->evil_C, NC_ANIMATION|ND_KEYFRAME, NULL); return 1; } } From bfe5ae9ff12daff1f12266170465c234034735ca Mon Sep 17 00:00:00 2001 From: Xavier Thomas Date: Mon, 13 Dec 2010 21:17:00 +0000 Subject: [PATCH 137/236] Compositor: Add an option to select the YCbCR conversion mode for the YCbCR combine/separate nodes. --- source/blender/editors/space_node/drawnode.c | 9 ++ source/blender/makesrna/intern/rna_nodetree.c | 16 ++ .../makesrna/intern/rna_nodetree_types.h | 4 +- .../nodes/intern/CMP_nodes/CMP_sepcombYCCA.c | 145 ++++++++++++++++-- 4 files changed, 159 insertions(+), 15 deletions(-) diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 471e5085c56..75eaa1d4988 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -1017,6 +1017,11 @@ static void node_composit_buts_huecorrect(uiLayout *layout, bContext *UNUSED(C), uiTemplateCurveMapping(layout, ptr, "mapping", 'h', 0, 0); } +static void node_composit_buts_ycc(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) +{ + uiItemR(layout, ptr, "mode", 0, "", 0); +} + /* only once called */ static void node_composit_set_butfunc(bNodeType *ntype) { @@ -1161,6 +1166,10 @@ static void node_composit_set_butfunc(bNodeType *ntype) case CMP_NODE_ZCOMBINE: ntype->uifunc=node_composit_buts_zcombine; break; + case CMP_NODE_COMBYCCA: + case CMP_NODE_SEPYCCA: + ntype->uifunc=node_composit_buts_ycc; + break; default: ntype->uifunc= NULL; } diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 012954d72ca..0001537bbb9 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -630,6 +630,11 @@ static EnumPropertyItem node_filter_items[] = { {6, "SHADOW", 0, "Shadow", ""}, {0, NULL, 0, NULL, NULL}}; +static EnumPropertyItem node_ycc_items[] = { +{ 0, "ITUBT601", 0, "ITU 601", ""}, +{ 1, "ITUBT709", 0, "ITU 709", ""}, +{ 2, "JFIF", 0, "Jpeg", ""}, +{0, NULL, 0, NULL, NULL}}; #define MaxNodes 1000 @@ -2203,6 +2208,17 @@ static void def_cmp_zcombine(StructRNA *srna) RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); } +static void def_cmp_ycc(StructRNA *srna) +{ + PropertyRNA *prop; + + prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "custom1"); + RNA_def_property_enum_items(prop, node_ycc_items); + RNA_def_property_ui_text(prop, "Mode", ""); + RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); +} + /* -- Texture Nodes --------------------------------------------------------- */ diff --git a/source/blender/makesrna/intern/rna_nodetree_types.h b/source/blender/makesrna/intern/rna_nodetree_types.h index 679a5fc0cdc..e74680280f8 100644 --- a/source/blender/makesrna/intern/rna_nodetree_types.h +++ b/source/blender/makesrna/intern/rna_nodetree_types.h @@ -76,8 +76,8 @@ DefNode( CompositorNode, CMP_NODE_COMBRGBA, 0, "COMBR DefNode( CompositorNode, CMP_NODE_DILATEERODE, def_cmp_dilate_erode, "DILATEERODE", DilateErode, "Dilate/Erode", "" ) DefNode( CompositorNode, CMP_NODE_ROTATE, def_cmp_rotate, "ROTATE", Rotate, "Rotate", "" ) DefNode( CompositorNode, CMP_NODE_SCALE, def_cmp_scale, "SCALE", Scale, "Scale", "" ) -DefNode( CompositorNode, CMP_NODE_SEPYCCA, 0, "SEPYCCA", SepYCCA, "Separate YCCA", "" ) -DefNode( CompositorNode, CMP_NODE_COMBYCCA, 0, "COMBYCCA", CombYCCA, "Combine YCCA", "" ) +DefNode( CompositorNode, CMP_NODE_SEPYCCA, def_cmp_ycc, "SEPYCCA", SepYCCA, "Separate YCCA", "" ) +DefNode( CompositorNode, CMP_NODE_COMBYCCA, def_cmp_ycc, "COMBYCCA", CombYCCA, "Combine YCCA", "" ) DefNode( CompositorNode, CMP_NODE_SEPYUVA, 0, "SEPYUVA", SepYUVA, "Separate YUVA", "" ) DefNode( CompositorNode, CMP_NODE_COMBYUVA, 0, "COMBYUVA", CombYUVA, "Combine YUVA", "" ) DefNode( CompositorNode, CMP_NODE_DIFF_MATTE, def_cmp_diff_matte, "DIFF_MATTE", DiffMatte, "Difference Key", "" ) diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_sepcombYCCA.c b/source/blender/nodes/intern/CMP_nodes/CMP_sepcombYCCA.c index 4b164729bbc..895d7799796 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_sepcombYCCA.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_sepcombYCCA.c @@ -43,7 +43,7 @@ static bNodeSocketType cmp_node_sepycca_out[]= { { -1, 0, "" } }; -static void do_sepycca(bNode *UNUSED(node), float *out, float *in) +static void do_sepycca_601(bNode *UNUSED(node), float *out, float *in) { float y, cb, cr; @@ -56,13 +56,51 @@ static void do_sepycca(bNode *UNUSED(node), float *out, float *in) out[3]= in[3]; } +static void do_sepycca_709(bNode *UNUSED(node), float *out, float *in) +{ + float y, cb, cr; + + rgb_to_ycc(in[0], in[1], in[2], &y, &cb, &cr, BLI_YCC_ITU_BT709); + + /*divided by 255 to normalize for viewing in */ + out[0]= y/255.0; + out[1]= cb/255.0; + out[2]= cr/255.0; + out[3]= in[3]; +} + +static void do_sepycca_jfif(bNode *UNUSED(node), float *out, float *in) +{ + float y, cb, cr; + + rgb_to_ycc(in[0], in[1], in[2], &y, &cb, &cr, BLI_YCC_JFIF_0_255); + + /*divided by 255 to normalize for viewing in */ + out[0]= y/255.0; + out[1]= cb/255.0; + out[2]= cr/255.0; + out[3]= in[3]; +} + static void node_composit_exec_sepycca(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) { /* input no image? then only color operation */ if(in[0]->data==NULL) { float y, cb, cr; - rgb_to_ycc(in[0]->vec[0], in[0]->vec[1], in[0]->vec[2], &y, &cb, &cr, BLI_YCC_ITU_BT601); + switch(node->custom1) + { + case 1: + rgb_to_ycc(in[0]->vec[0], in[0]->vec[1], in[0]->vec[2], &y, &cb, &cr, BLI_YCC_ITU_BT709); + break; + case 2: + rgb_to_ycc(in[0]->vec[0], in[0]->vec[1], in[0]->vec[2], &y, &cb, &cr, BLI_YCC_JFIF_0_255); + break; + case 0: + default: + rgb_to_ycc(in[0]->vec[0], in[0]->vec[1], in[0]->vec[2], &y, &cb, &cr, BLI_YCC_ITU_BT601); + break; + } /*divided by 255 to normalize for viewing in */ out[0]->vec[0] = y/255.0; @@ -76,7 +114,19 @@ static void node_composit_exec_sepycca(void *UNUSED(data), bNode *node, bNodeSta CompBuf *cbuf2=typecheck_compbuf(cbuf, CB_RGBA); /* convert the RGB stackbuf to an HSV representation */ - composit1_pixel_processor(node, cbuf2, cbuf2, in[0]->vec, do_sepycca, CB_RGBA); + switch(node->custom1) + { + case 1: + composit1_pixel_processor(node, cbuf2, cbuf2, in[0]->vec, do_sepycca_709, CB_RGBA); + break; + case 2: + composit1_pixel_processor(node, cbuf2, cbuf2, in[0]->vec, do_sepycca_jfif, CB_RGBA); + break; + case 0: + default: + composit1_pixel_processor(node, cbuf2, cbuf2, in[0]->vec, do_sepycca_601, CB_RGBA); + break; + } /* separate each of those channels */ if(out[0]->hasoutput) @@ -100,7 +150,7 @@ bNodeType cmp_node_sepycca= { /* type code */ CMP_NODE_SEPYCCA, /* name */ "Separate YCbCrA", /* width+range */ 80, 40, 140, - /* class+opts */ NODE_CLASS_CONVERTOR, 0, + /* class+opts */ NODE_CLASS_CONVERTOR, NODE_OPTIONS, /* input sock */ cmp_node_sepycca_in, /* output sock */ cmp_node_sepycca_out, /* storage */ "", @@ -116,8 +166,8 @@ bNodeType cmp_node_sepycca= { /* **************** COMBINE YCCA ******************** */ static bNodeSocketType cmp_node_combycca_in[]= { { SOCK_VALUE, 1, "Y", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "Cb", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, - { SOCK_VALUE, 1, "Cr", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, + { SOCK_VALUE, 1, "Cb", 0.5f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, + { SOCK_VALUE, 1, "Cr", 0.5f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, { SOCK_VALUE, 1, "A", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, { -1, 0, "" } }; @@ -126,7 +176,7 @@ static bNodeSocketType cmp_node_combycca_out[]= { { -1, 0, "" } }; -static void do_comb_ycca(bNode *UNUSED(node), float *out, float *in1, float *in2, float *in3, float *in4) +static void do_comb_ycca_601(bNode *UNUSED(node), float *out, float *in1, float *in2, float *in3, float *in4) { float r,g,b; float y, cb, cr; @@ -144,6 +194,42 @@ static void do_comb_ycca(bNode *UNUSED(node), float *out, float *in1, float *in2 out[3] = in4[0]; } +static void do_comb_ycca_709(bNode *UNUSED(node), float *out, float *in1, float *in2, float *in3, float *in4) +{ + float r,g,b; + float y, cb, cr; + + /*need to un-normalize the data*/ + y=in1[0]*255; + cb=in2[0]*255; + cr=in3[0]*255; + + ycc_to_rgb(y,cb,cr, &r, &g, &b, BLI_YCC_ITU_BT709); + + out[0] = r; + out[1] = g; + out[2] = b; + out[3] = in4[0]; +} + +static void do_comb_ycca_jfif(bNode *UNUSED(node), float *out, float *in1, float *in2, float *in3, float *in4) +{ + float r,g,b; + float y, cb, cr; + + /*need to un-normalize the data*/ + y=in1[0]*255; + cb=in2[0]*255; + cr=in3[0]*255; + + ycc_to_rgb(y,cb,cr, &r, &g, &b, BLI_YCC_JFIF_0_255); + + out[0] = r; + out[1] = g; + out[2] = b; + out[3] = in4[0]; +} + static void node_composit_exec_combycca(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) { /* stack order out: 1 ycca channels */ @@ -151,9 +237,24 @@ static void node_composit_exec_combycca(void *UNUSED(data), bNode *node, bNodeSt /* input no image? then only color operation */ if((in[0]->data==NULL) && (in[1]->data==NULL) && (in[2]->data==NULL) && (in[3]->data==NULL)) { - out[0]->vec[0] = in[0]->vec[0]; - out[0]->vec[1] = in[1]->vec[0]; - out[0]->vec[2] = in[2]->vec[0]; + float y = in[0]->vec[0] * 255; + float cb = in[1]->vec[0] * 255; + float cr = in[2]->vec[0] * 255; + + switch(node->custom1) + { + case 1: + ycc_to_rgb(y, cb, cr, &out[0]->vec[0], &out[0]->vec[1], &out[0]->vec[2], BLI_YCC_ITU_BT709); + break; + case 2: + ycc_to_rgb(y, cb, cr, &out[0]->vec[0], &out[0]->vec[1], &out[0]->vec[2], BLI_YCC_JFIF_0_255); + break; + case 0: + default: + ycc_to_rgb(y, cb, cr, &out[0]->vec[0], &out[0]->vec[1], &out[0]->vec[2], BLI_YCC_ITU_BT601); + break; + } + out[0]->vec[3] = in[3]->vec[0]; } else { @@ -169,9 +270,27 @@ static void node_composit_exec_combycca(void *UNUSED(data), bNode *node, bNodeSt stackbuf = alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* allocs */ - composit4_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, in[1]->data, in[1]->vec, - in[2]->data, in[2]->vec, in[3]->data, in[3]->vec, - do_comb_ycca, CB_VAL, CB_VAL, CB_VAL, CB_VAL); + + switch(node->custom1) + { + case 1: + composit4_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, in[1]->data, in[1]->vec, + in[2]->data, in[2]->vec, in[3]->data, in[3]->vec, + do_comb_ycca_709, CB_VAL, CB_VAL, CB_VAL, CB_VAL); + break; + + case 2: + composit4_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, in[1]->data, in[1]->vec, + in[2]->data, in[2]->vec, in[3]->data, in[3]->vec, + do_comb_ycca_jfif, CB_VAL, CB_VAL, CB_VAL, CB_VAL); + break; + case 0: + default: + composit4_pixel_processor(node, stackbuf, in[0]->data, in[0]->vec, in[1]->data, in[1]->vec, + in[2]->data, in[2]->vec, in[3]->data, in[3]->vec, + do_comb_ycca_601, CB_VAL, CB_VAL, CB_VAL, CB_VAL); + break; + } out[0]->data= stackbuf; } From 991eac85ff682f66fdf5e73638fb5ebb66cf5bd2 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 13 Dec 2010 21:22:30 +0000 Subject: [PATCH 138/236] Initial implementation of mdisps layer interpolation Sculpt data shouldn't be lost when making topology changes without quads<->tris face converison. General idea: - Go through all grid points of each corner and convert per-corner coordiante to per-face cooredinate - Apply weights and convert new point to per-corner coordinate - Use bilinear interpolation to get needed displacement vector Some additional work was necessery: - Two neighbour corners could have different displacements along common boundary. multires_mdisp_smooth_bounds() makes displacement "symmetrical" - Point could change it's corner, so displacement vector should be flipped in some way. In some cases it's not only flipping, because corner could be mapped with some rotation. It's not solved for triangular faces yet, so only z-axis displacement would be interpolated for tris. More limitations: - Interpolation will give incorrect result after quad<->triangle face conversion. - When face normal was fillped displacement would change it's direction too. --- source/blender/blenkernel/BKE_multires.h | 1 + source/blender/blenkernel/intern/customdata.c | 308 +++++++++++++++--- source/blender/blenkernel/intern/multires.c | 127 ++++++++ 3 files changed, 389 insertions(+), 47 deletions(-) diff --git a/source/blender/blenkernel/BKE_multires.h b/source/blender/blenkernel/BKE_multires.h index 6520ef0df63..8fb80292ffb 100644 --- a/source/blender/blenkernel/BKE_multires.h +++ b/source/blender/blenkernel/BKE_multires.h @@ -76,6 +76,7 @@ void multiresModifier_scale_disp(struct Scene *scene, struct Object *ob); void multiresModifier_prepare_join(struct Scene *scene, struct Object *ob, struct Object *to_ob); int multires_mdisp_corners(struct MDisps *s); +void multires_mdisp_smooth_bounds(struct MDisps *disps); /* update multires data after topology changing */ void multires_topology_changed(struct Object *ob); diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index 1a3d31bdcf8..67d485d2dc3 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -396,7 +396,6 @@ static void layerDefault_origspace_face(void *data, int count) osf[i] = default_osf; } -#if 0 /* Adapted from sculptmode.c */ static void mdisps_bilinear(float out[3], float (*disps)[3], int st, float u, float v) { @@ -442,7 +441,6 @@ static void mdisps_bilinear(float out[3], float (*disps)[3], int st, float u, fl add_v3_v3v3(out, d2[0], d2[1]); } -#endif static void layerSwap_mdisps(void *data, const int *ci) { @@ -475,64 +473,280 @@ static void layerSwap_mdisps(void *data, const int *ci) } } -static void layerInterp_mdisps(void **UNUSED(sources), float *UNUSED(weights), - float *UNUSED(sub_weights), int UNUSED(count), void *dest) +static void mdisp_get_crn_rect(int face_side, float crn[3][4][2]) { - MDisps *d = dest; - int i; + float offset = face_side*0.5f - 0.5f; + float mid[2]; - // XXX -#if 0 + mid[0] = offset * 4 / 3; + mid[1] = offset * 2 / 3; + + crn[0][0][0] = mid[0]; crn[0][0][1] = mid[1]; + crn[0][1][0] = offset; crn[0][1][1] = 0; + crn[0][2][0] = 0; crn[0][2][1] = 0; + crn[0][3][0] = offset; crn[0][3][1] = offset; + + crn[1][0][0] = mid[0]; crn[1][0][1] = mid[1]; + crn[1][1][0] = offset * 2; crn[1][1][1] = offset; + crn[1][2][0] = offset * 2; crn[1][2][1] = 0; + crn[1][3][0] = offset; crn[1][3][1] = 0; + + crn[2][0][0] = mid[0]; crn[2][0][1] = mid[1]; + crn[2][1][0] = offset; crn[2][1][1] = offset; + crn[2][2][0] = offset * 2; crn[2][2][1] = offset * 2; + crn[2][3][0] = offset * 2; crn[2][3][1] = offset; +} + +static void mdisp_rot_crn_to_face(int S, int corners, int face_side, float x, float y, float *u, float *v) +{ + float offset = face_side*0.5f - 0.5f; + + if(corners == 4) { + if(S == 1) { *u= offset + x; *v = offset - y; } + if(S == 2) { *u= offset + y; *v = offset + x; } + if(S == 3) { *u= offset - x; *v = offset + y; } + if(S == 0) { *u= offset - y; *v = offset - x; } + } else { + float crn[3][4][2], vec[4][2]; + float p[2]; + + mdisp_get_crn_rect(face_side, crn); + + interp_v2_v2v2(vec[0], crn[S][0], crn[S][1], x / offset); + interp_v2_v2v2(vec[1], crn[S][3], crn[S][2], x / offset); + interp_v2_v2v2(vec[2], crn[S][0], crn[S][3], y / offset); + interp_v2_v2v2(vec[3], crn[S][1], crn[S][2], y / offset); + + isect_seg_seg_v2_point(vec[0], vec[1], vec[2], vec[3], p); + + (*u) = p[0]; + (*v) = p[1]; + } +} + +static int mdisp_pt_in_crn(float p[2], float crn[4][2]) +{ + float v[2][2]; + float a[2][2]; + + sub_v2_v2v2(v[0], crn[1], crn[0]); + sub_v2_v2v2(v[1], crn[3], crn[0]); + + sub_v2_v2v2(a[0], p, crn[0]); + sub_v2_v2v2(a[1], crn[2], crn[0]); + + if(cross_v2v2(a[0], v[0]) * cross_v2v2(a[1], v[0]) < 0) + return 0; + + if(cross_v2v2(a[0], v[1]) * cross_v2v2(a[1], v[1]) < 0) + return 0; + + return 1; +} + +static void face_to_crn_interp(float u, float v, float v1[2], float v2[2], float v3[2], float v4[2], float *x) +{ + float a = (v4[1]-v3[1])*v2[0]+(-v4[1]+v3[1])*v1[0]+(-v2[1]+v1[1])*v4[0]+(v2[1]-v1[1])*v3[0]; + float b = (v3[1]-v)*v2[0]+(v4[1]-2*v3[1]+v)*v1[0]+(-v4[1]+v3[1]+v2[1]-v1[1])*u+(v4[0]-v3[0])*v-v1[1]*v4[0]+(-v2[1]+2*v1[1])*v3[0]; + float c = (v3[1]-v)*v1[0]+(-v3[1]+v1[1])*u+v3[0]*v-v1[1]*v3[0]; + float d = b * b - 4 * a * c; + float x1, x2; + + if(a == 0) { + *x = -c / b; + return; + } + + x1 = (-b - sqrtf(d)) / (2 * a); + x2 = (-b + sqrtf(d)) / (2 * a); + + *x = maxf(x1, x2); +} + +static int mdisp_rot_face_to_crn(int corners, int face_side, float u, float v, float *x, float *y) +{ + float offset = face_side*0.5f - 0.5f; + int S; + + if (corners == 4) { + if(u <= offset && v <= offset) S = 0; + else if(u > offset && v <= offset) S = 1; + else if(u > offset && v > offset) S = 2; + else if(u <= offset && v >= offset) S = 3; + + if(S == 0) { + *y = offset - u; + *x = offset - v; + } else if(S == 1) { + *x = u - offset; + *y = offset - v; + } else if(S == 2) { + *y = u - offset; + *x = v - offset; + } else if(S == 3) { + *x= offset - u; + *y = v - offset; + } + } else { + float crn[3][4][2]; + float p[2] = {u, v}; + + mdisp_get_crn_rect(face_side, crn); + + for (S = 0; S < 3; ++S) { + if (mdisp_pt_in_crn(p, crn[S])) + break; + } + + face_to_crn_interp(u, v, crn[S][0], crn[S][1], crn[S][3], crn[S][2], &p[0]); + face_to_crn_interp(u, v, crn[S][0], crn[S][3], crn[S][1], crn[S][2], &p[1]); + + *x = p[0] * offset; + *y = p[1] * offset; + } + + return S; +} + +static void mdisp_apply_weight(int S, int corners, int x, int y, int face_side, + float crn_weight[4][2], float *u_r, float *v_r) +{ + float u, v, xl, yl; + float mid1[2], mid2[2], mid3[2]; + + mdisp_rot_crn_to_face(S, corners, face_side, x, y, &u, &v); + + if(corners == 4) { + xl = u / (face_side - 1); + yl = v / (face_side - 1); + + mid1[0] = crn_weight[0][0] * (1 - xl) + crn_weight[1][0] * xl; + mid1[1] = crn_weight[0][1] * (1 - xl) + crn_weight[1][1] * xl; + mid2[0] = crn_weight[3][0] * (1 - xl) + crn_weight[2][0] * xl; + mid2[1] = crn_weight[3][1] * (1 - xl) + crn_weight[2][1] * xl; + mid3[0] = mid1[0] * (1 - yl) + mid2[0] * yl; + mid3[1] = mid1[1] * (1 - yl) + mid2[1] * yl; + } else { + yl = v / (face_side - 1); + + if(v == face_side - 1) xl = 1; + else xl = 1 - (face_side - 1 - u) / (face_side - 1 - v); + + mid1[0] = crn_weight[0][0] * (1 - xl) + crn_weight[1][0] * xl; + mid1[1] = crn_weight[0][1] * (1 - xl) + crn_weight[1][1] * xl; + mid3[0] = mid1[0] * (1 - yl) + crn_weight[2][0] * yl; + mid3[1] = mid1[1] * (1 - yl) + crn_weight[2][1] * yl; + } + + *u_r = mid3[0]; + *v_r = mid3[1]; +} + +static void mdisp_flip_disp(int S, int corners, float axis_x[2], float axis_y[2], float disp[3]) +{ + float crn_x[2], crn_y[2]; + float vx[2], vy[2], coord[2]; + + if (corners == 4) { + float x[4][2] = {{0, -1}, {1, 0}, {0, 1}, {-1, 0}}; + float y[4][2] = {{-1, 0}, {0, -1}, {1, 0}, {0, 1}}; + + copy_v2_v2(crn_x, x[S]); + copy_v2_v2(crn_y, y[S]); + + mul_v2_v2fl(vx, crn_x, disp[0]); + mul_v2_v2fl(vy, crn_y, disp[1]); + add_v2_v2v2(coord, vx, vy); + + project_v2_v2v2(vx, coord, axis_x); + project_v2_v2v2(vy, coord, axis_y); + + disp[0] = len_v2(vx); + disp[1] = len_v2(vy); + + if(dot_v2v2(vx, axis_x) < 0) + disp[0] = -disp[0]; + + if(dot_v2v2(vy, axis_y) < 0) + disp[1] = -disp[1]; + } else { + /* XXX: it was very overhead code to support displacement flipping + for case of tris without visible profit. + Maybe its not really big limitation? for now? (nazgul) */ + disp[0] = 0; + disp[1] = 0; + } +} + +static void layerInterp_mdisps(void **sources, float *UNUSED(weights), + float *sub_weights, int count, void *dest) +{ MDisps *d = dest; MDisps *s = NULL; int st, stl; int i, x, y; - float crn[4][2]; + int side, S, dst_corners, src_corners; + float crn_weight[4][2]; float (*sw)[4] = NULL; - - /* Initialize the destination */ - for(i = 0; i < d->totdisp; ++i) { - float z[3] = {0,0,0}; - copy_v3_v3(d->disps[i], z); - } - - /* For now, some restrictions on the input */ - if(count != 1 || !sub_weights) return; - - st = sqrt(d->totdisp); - stl = st - 1; - - sw = (void*)sub_weights; - for(i = 0; i < 4; ++i) { - crn[i][0] = 0 * sw[i][0] + stl * sw[i][1] + stl * sw[i][2] + 0 * sw[i][3]; - crn[i][1] = 0 * sw[i][0] + 0 * sw[i][1] + stl * sw[i][2] + stl * sw[i][3]; - } + float (*disps)[3], (*out)[3]; s = sources[0]; - for(y = 0; y < st; ++y) { - for(x = 0; x < st; ++x) { - /* One suspects this code could be cleaner. */ - float xl = (float)x / (st - 1); - float yl = (float)y / (st - 1); - float mid1[2] = {crn[0][0] * (1 - xl) + crn[1][0] * xl, - crn[0][1] * (1 - xl) + crn[1][1] * xl}; - float mid2[2] = {crn[3][0] * (1 - xl) + crn[2][0] * xl, - crn[3][1] * (1 - xl) + crn[2][1] * xl}; - float mid3[2] = {mid1[0] * (1 - yl) + mid2[0] * yl, - mid1[1] * (1 - yl) + mid2[1] * yl}; + dst_corners = multires_mdisp_corners(d); + src_corners = multires_mdisp_corners(d); - float srcdisp[3]; - - mdisps_bilinear(srcdisp, s->disps, st, mid3[0], mid3[1]); - copy_v3_v3(d->disps[y * st + x], srcdisp); - } - } -#else - if(d->disps) { + /* XXX: For now, some restrictions on the input + should be implemented to allow quad<->tris face conversion */ + if(count != 1 || !sub_weights || dst_corners != src_corners) { for(i = 0; i < d->totdisp; ++i) zero_v3(d->disps[i]); + + return; } -#endif + + /* Initialize the destination */ + out = disps = MEM_callocN(3*d->totdisp*sizeof(float), "iterp disps"); + + side = sqrt(d->totdisp / dst_corners); + st = (side<<1)-1; + stl = st - 1; + + sw= (void*)sub_weights; + for(i = 0; i < 4; ++i) { + crn_weight[i][0] = 0 * sw[i][0] + stl * sw[i][1] + stl * sw[i][2] + 0 * sw[i][3]; + crn_weight[i][1] = 0 * sw[i][0] + 0 * sw[i][1] + stl * sw[i][2] + stl * sw[i][3]; + } + + multires_mdisp_smooth_bounds(s); + + out = disps; + for(S = 0; S < dst_corners; S++) { + float base[2], axis_x[2], axis_y[2]; + + mdisp_apply_weight(S, dst_corners, 0, 0, st, crn_weight, &base[0], &base[1]); + mdisp_apply_weight(S, dst_corners, side-1, 0, st, crn_weight, &axis_x[0], &axis_x[1]); + mdisp_apply_weight(S, dst_corners, 0, side-1, st, crn_weight, &axis_y[0], &axis_y[1]); + + sub_v3_v3(axis_x, base); + sub_v3_v3(axis_y, base); + normalize_v2(axis_x); + normalize_v2(axis_y); + + for(y = 0; y < side; ++y) { + for(x = 0; x < side; ++x, ++out) { + int crn; + float face_u, face_v, crn_u, crn_v; + + mdisp_apply_weight(S, dst_corners, x, y, st, crn_weight, &face_u, &face_v); + crn = mdisp_rot_face_to_crn(src_corners, st, face_u, face_v, &crn_u, &crn_v); + + mdisps_bilinear((*out), &s->disps[crn*side*side], side, crn_u, crn_v); + mdisp_flip_disp(crn, dst_corners, axis_x, axis_y, *out); + } + } + } + + MEM_freeN(d->disps); + d->disps = disps; } static void layerCopy_mdisps(const void *source, void *dest, int count) diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c index 802bc32f571..2224b3d8d49 100644 --- a/source/blender/blenkernel/intern/multires.c +++ b/source/blender/blenkernel/intern/multires.c @@ -1647,3 +1647,130 @@ void multires_topology_changed(Object *ob) } } } + +/* makes displacement along grid boundary symmetrical */ +void multires_mdisp_smooth_bounds(MDisps *disps) +{ + int x, y, side, S, corners; + float (*out)[3]; + + corners = multires_mdisp_corners(disps); + side = sqrt(disps->totdisp / corners); + + out = disps->disps; + for(S = 0; S < corners; S++) { + for(y = 0; y < side; ++y) { + for(x = 0; x < side; ++x, ++out) { + float (*dispgrid)[3]; + float *data; + + if(x != 0 && y != 0) continue; + + if(corners == 4) { + if(S == 0) { + if(y == 0) { + dispgrid = &disps->disps[1*side*side]; + data = dispgrid[side * x + 0]; + + (*out)[0] = (*out)[0] + data[1]; + (*out)[1] = (*out)[1] - data[0]; + (*out)[2] = (*out)[2] + data[2]; + + mul_v3_fl(*out, 0.5); + + data[0] = -(*out)[1]; + data[1] = (*out)[0]; + data[2] = (*out)[2]; + } else if (x == 0) { + dispgrid = &disps->disps[3 * side * side]; + data = dispgrid[side * 0 + y]; + + (*out)[0] = (*out)[0] - data[1]; + (*out)[1] = (*out)[1] + data[0]; + (*out)[2] = (*out)[2] + data[2]; + + mul_v3_fl(*out, 0.5); + + data[0] = (*out)[1]; + data[1] = -(*out)[0]; + data[2] = (*out)[2]; + } + } else if (S == 2) { + if(y == 0) { + dispgrid = &disps->disps[3 * side * side]; + data = dispgrid[side * x + 0]; + + (*out)[0] = (*out)[0] + data[1]; + (*out)[1] = (*out)[1] - data[0]; + (*out)[2] = (*out)[2] + data[2]; + + mul_v3_fl(*out, 0.5); + + data[0] = -(*out)[1]; + data[1] = (*out)[0]; + data[2] = (*out)[2]; + } else if(x == 0) { + dispgrid = &disps->disps[1 * side * side]; + data = dispgrid[side * 0 + y]; + + (*out)[0] = (*out)[0] - data[1]; + (*out)[1] = (*out)[1] + data[0]; + (*out)[2] = (*out)[2] + data[2]; + + mul_v3_fl(*out, 0.5); + + data[0] = (*out)[1]; + data[1] = -(*out)[0]; + data[2] = (*out)[2]; + } + } + } else if (corners == 3) { + if(S == 0) { + if(y == 0) { + dispgrid = &disps->disps[1*side*side]; + data = dispgrid[side * x + 0]; + + (*out)[0] = (*out)[0] + data[1]; + (*out)[1] = (*out)[1] - data[0]; + (*out)[2] = (*out)[2] + data[2]; + + mul_v3_fl(*out, 0.5); + + data[0] = -(*out)[1]; + data[1] = (*out)[0]; + data[2] = (*out)[2]; + } else if (x == 0) { + dispgrid = &disps->disps[2 * side * side]; + data = dispgrid[side * 0 + y]; + + (*out)[0] = (*out)[0] - data[1]; + (*out)[1] = (*out)[1] + data[0]; + (*out)[2] = (*out)[2] + data[2]; + + mul_v3_fl(*out, 0.5); + + data[0] = (*out)[1]; + data[1] = -(*out)[0]; + data[2] = (*out)[2]; + } + } else if (S == 2) { + if(x == 0) { + dispgrid = &disps->disps[1 * side * side]; + data = dispgrid[side * 0 + y]; + + (*out)[0] = (*out)[0] - data[1]; + (*out)[1] = (*out)[1] + data[0]; + (*out)[2] = (*out)[2] + data[2]; + + mul_v3_fl(*out, 0.5); + + data[0] = (*out)[1]; + data[1] = -(*out)[0]; + data[2] = (*out)[2]; + } + } + } + } + } + } +} From 17bd906de3ba02c8d7bf848b1f61465f09fc631c Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Tue, 14 Dec 2010 01:19:51 +0000 Subject: [PATCH 139/236] Fixed bug #23826, Other kind of brushes appear in sculpt mode Was another problem caused by each brush being allowed in more than one paint mode. Added a new field to the brush struct to indicate what mode the icon was last set for; if it's changed then reset it. Not sure if it's really worth it to cache this, could remove it for simplicity. --- .../editors/interface/interface_icons.c | 40 +++++++++++++------ source/blender/makesdna/DNA_brush_types.h | 3 ++ 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index cf1a90137af..566400e98d6 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -1026,30 +1026,46 @@ static int ui_id_brush_get_icon(bContext *C, ID *id, int preview) BKE_icon_getid(id); ui_id_icon_render(C, id, preview); } - else if(!id->icon_id) { - /* no icon found, reset it */ - - /* this is not nice, should probably make - brushes be strictly in one paint mode only - to avoid this kind of thing */ + else { Object *ob = CTX_data_active_object(C); EnumPropertyItem *items; - int tool; - - if(ob && (ob->mode & OB_MODE_SCULPT)) { + int tool, mode = 0; + + /* this is not nice, should probably make brushes be + strictly in one paint mode only to avoid checking + object mode here */ + + if(ob) { + if(ob->mode & OB_MODE_SCULPT) + mode = OB_MODE_SCULPT; + else if(ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT)) + mode = OB_MODE_VERTEX_PAINT; + else if(ob->mode & OB_MODE_TEXTURE_PAINT) + mode = OB_MODE_TEXTURE_PAINT; + } + + /* check if cached icon is OK */ + if(!mode || (id->icon_id && mode == br->icon_mode)) + return id->icon_id; + + br->icon_mode = mode; + + /* reset the icon */ + if(mode == OB_MODE_SCULPT) { items = brush_sculpt_tool_items; tool = br->sculpt_tool; } - else if(ob && (ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT))) { + else if(mode == OB_MODE_VERTEX_PAINT) { items = brush_vertexpaint_tool_items; tool = br->vertexpaint_tool; } - else { + else if(mode == OB_MODE_TEXTURE_PAINT) { items = brush_imagepaint_tool_items; tool = br->imagepaint_tool; } - RNA_enum_icon_from_value(items, tool, &id->icon_id); + if(!RNA_enum_icon_from_value(items, tool, &id->icon_id)) + id->icon_id = 0; } return id->icon_id; diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h index 1492319fe22..8fca829101b 100644 --- a/source/blender/makesdna/DNA_brush_types.h +++ b/source/blender/makesdna/DNA_brush_types.h @@ -57,6 +57,9 @@ typedef struct Brush { struct ImBuf *icon_imbuf; PreviewImage *preview; char icon_filepath[240]; + int icon_mode; /* store paint mode for which brush's icon was last generated */ + int pad; + float normal_weight; From 35f431b3d0edda651fda97cb0156181fab07562c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 14 Dec 2010 02:38:29 +0000 Subject: [PATCH 140/236] Menu UI feature common in other widget sets: Automatically assign menu keys based on name, alternative to pressing number 0-9 on menus items. keys are assigned by first giving each menu item the first character of any word, if that fails any key in the name is used. - active key is shown underlined. - only ascii keys are assigned currently. - can run operators, open menu items. - currently this only works in cases where number buttons were used (UI_BLOCK_NUMSELECT), but could be enabled for file menu, splash etc by removing this check. --- source/blender/editors/include/UI_interface.h | 2 + source/blender/editors/interface/interface.c | 73 +++++++++++++++++++ .../editors/interface/interface_handlers.c | 59 ++++++++++++++- .../editors/interface/interface_intern.h | 5 +- .../editors/interface/interface_style.c | 14 +++- .../editors/interface/interface_widgets.c | 39 +++++++++- 6 files changed, 187 insertions(+), 5 deletions(-) diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index ef74052f217..19e2a86f644 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -749,6 +749,8 @@ void uiIDContextProperty(struct bContext *C, struct PointerRNA *ptr, struct Prop /* Styled text draw */ void uiStyleFontSet(struct uiFontStyle *fs); +void uiStyleFontDrawExt(struct uiFontStyle *fs, struct rcti *rect, const char *str, + float *r_xofs, float *r_yofs); void uiStyleFontDraw(struct uiFontStyle *fs, struct rcti *rect, const char *str); void uiStyleFontDrawRotated(struct uiFontStyle *fs, struct rcti *rect, const char *str); diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 60928f03ea7..4e3e9786a5a 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -29,6 +29,7 @@ #include #include #include +#include #include "MEM_guardedalloc.h" @@ -585,6 +586,77 @@ int uiButActiveOnly(const bContext *C, uiBlock *block, uiBut *but) return 1; } +/* assigns automatic keybindings to menu items for fast access + * (underline key in menu) */ +static void ui_menu_block_set_keyaccels(uiBlock *block) +{ + uiBut *but; + + unsigned int meny_key_mask= 0; + unsigned char menu_key; + const char *str_pt; + int pass; + int tot_missing= 0; + + /* only do it before bounding */ + if(block->minx != block->maxx) + return; + + for(pass=0; pass<2; pass++) { + /* 2 Passes, on for first letter only, second for any letter if first fails + * fun first pass on all buttons so first word chars always get first priority */ + + for(but=block->buttons.first; but; but=but->next) { + if(!ELEM4(but->type, BUT, MENU, BLOCK, PULLDOWN) || (but->flag & UI_HIDDEN)) { + /* pass */ + } + else if(but->menu_key=='\0') { + if(but->str) { + for(str_pt= but->str; *str_pt; ) { + menu_key= tolower(*str_pt); + if((menu_key >= 'a' && menu_key <= 'z') && !(meny_key_mask & 1<<(menu_key-'a'))) { + meny_key_mask |= 1<<(menu_key-'a'); + break; + } + + if(pass==0) { + /* Skip to next delimeter on first pass (be picky) */ + while(isalpha(*str_pt)) + str_pt++; + + if(*str_pt) + str_pt++; + } + else { + /* just step over every char second pass and find first usable key */ + str_pt++; + } + } + + if(*str_pt) { + but->menu_key= menu_key; + } + else { + /* run second pass */ + tot_missing++; + } + + /* if all keys have been used just exit, unlikely */ + if(meny_key_mask == (1<<26)-1) { + return; + } + } + } + } + + /* check if second pass is needed */ + if(!tot_missing) { + break; + } + } +} + + void ui_menu_block_set_keymaps(const bContext *C, uiBlock *block) { uiBut *but; @@ -658,6 +730,7 @@ void uiEndBlock(const bContext *C, uiBlock *block) /* handle pending stuff */ if(block->layouts.first) uiBlockLayoutResolve(block, NULL, NULL); ui_block_do_align(block); + if((block->flag & UI_BLOCK_LOOP) && (block->flag & UI_BLOCK_NUMSELECT)) ui_menu_block_set_keyaccels(block); /* could use a different flag to check */ if(block->flag & UI_BLOCK_LOOP) ui_menu_block_set_keymaps(C, block); /* after keymaps! */ diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 85359267ffd..e15696d7e80 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -5635,8 +5635,65 @@ int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle *menu, retval= WM_UI_HANDLER_BREAK; } - break; + + /* Handle keystrokes on menu items */ + case AKEY: + case BKEY: + case CKEY: + case DKEY: + case EKEY: + case FKEY: + case GKEY: + case HKEY: + case IKEY: + case JKEY: + case KKEY: + case LKEY: + case MKEY: + case NKEY: + case OKEY: + case PKEY: + case QKEY: + case RKEY: + case SKEY: + case TKEY: + case UKEY: + case VKEY: + case WKEY: + case XKEY: + case YKEY: + case ZKEY: + { + if(event->val == KM_PRESS) { + count= 0; + for(but= block->buttons.first; but; but= but->next) { + + if(but->menu_key==event->type) { + if(but->type == BUT) { + /* mainly for operator buttons */ + ui_handle_button_activate(C, ar, but, BUTTON_ACTIVATE_APPLY); + } + else if(ELEM(but->type, BLOCK, PULLDOWN)) { + /* open submenus (like right arrow key) */ + ui_handle_button_activate(C, ar, but, BUTTON_ACTIVATE_OPEN); + } + else if (but->type == MENU) { + /* activate menu items */ + ui_handle_button_activate(C, ar, but, BUTTON_ACTIVATE); + } + else { + printf("Error, but->menu_key type: %d\n", but->type); + } + + break; + } + } + + retval= WM_UI_HANDLER_BREAK; + } + break; + } } } diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h index a7c03a6b95d..72f6e72cd5d 100644 --- a/source/blender/editors/interface/interface_intern.h +++ b/source/blender/editors/interface/interface_intern.h @@ -237,9 +237,10 @@ struct uiBut { struct IDProperty *opproperties; struct PointerRNA *opptr; short opcontext; - + unsigned char menu_key; /* 'a'-'z', always lower case */ + /* Draggable data, type is WM_DRAG_... */ - short dragtype; + char dragtype; void *dragpoin; struct ImBuf *imb; float imb_scale; diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index ec9ac300ca2..af0b2189a99 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -136,7 +136,9 @@ static uiFont *uifont_to_blfont(int id) /* *************** draw ************************ */ -void uiStyleFontDraw(uiFontStyle *fs, rcti *rect, const char *str) + +void uiStyleFontDrawExt(uiFontStyle *fs, rcti *rect, const char *str, + float *r_xofs, float *r_yofs) { float height; int xofs=0, yofs; @@ -171,6 +173,16 @@ void uiStyleFontDraw(uiFontStyle *fs, rcti *rect, const char *str) BLF_disable(fs->uifont_id, BLF_SHADOW); if (fs->kerning == 1) BLF_disable(fs->uifont_id, BLF_KERNING_DEFAULT); + + *r_xofs= xofs; + *r_yofs= yofs; +} + +void uiStyleFontDraw(uiFontStyle *fs, rcti *rect, const char *str) +{ + float xofs, yofs; + uiStyleFontDrawExt(fs, rect, str, + &xofs, &yofs); } /* drawn same as above, but at 90 degree angle */ diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index a3a8e40abe6..319d51cdf75 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -35,6 +35,7 @@ #include "BLI_math.h" #include "BLI_listbase.h" #include "BLI_rect.h" +#include "BLI_string.h" #include "BKE_context.h" #include "BKE_curve.h" @@ -961,6 +962,9 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b // int transopts; char *cpoin = NULL; + /* for underline drawing */ + float font_xofs, font_yofs; + uiStyleFontSet(fstyle); if(but->editstr || (but->flag & UI_TEXT_LEFT)) @@ -1038,7 +1042,40 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b } glColor3ubv((unsigned char*)wcol->text); - uiStyleFontDraw(fstyle, rect, but->drawstr+but->ofs); + + uiStyleFontDrawExt(fstyle, rect, but->drawstr+but->ofs, &font_xofs, &font_yofs); + + if(but->menu_key != '\0') { + char fixedbuf[128]; + char *str; + + BLI_strncpy(fixedbuf, but->drawstr + but->ofs, sizeof(fixedbuf)); + + str= strchr(fixedbuf, but->menu_key-32); /* upper case */ + if(str==NULL) + str= strchr(fixedbuf, but->menu_key); + + if(str) { + int ul_index= -1; + float ul_advance; + + ul_index= (int)(str - fixedbuf); + + if (fstyle->kerning == 1) { + BLF_enable(fstyle->uifont_id, BLF_KERNING_DEFAULT); + } + + fixedbuf[ul_index]= '\0'; + ul_advance= BLF_width(fstyle->uifont_id, fixedbuf); + + BLF_position(fstyle->uifont_id, rect->xmin+font_xofs + ul_advance, rect->ymin+font_yofs, 0.0f); + BLF_draw(fstyle->uifont_id, "_", 2); + + if (fstyle->kerning == 1) { + BLF_disable(fstyle->uifont_id, BLF_KERNING_DEFAULT); + } + } + } /* part text right aligned */ if(cpoin) { From 98f642dd31c3d73d41f37df67d8d1f83693e2d26 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Tue, 14 Dec 2010 03:30:30 +0000 Subject: [PATCH 141/236] Fixed bug #23922, Sculpting - Textured display draws incorrectly Root cause is that some drawing modes don't work with PBVH drawing. Worked around by adding a call to update mesh normals from the PBVH so that sculpted changes appear correctly in those "unsupported" modes. (They'll still draw much more slowly than solid, but should at least appear correct now.) --- .../blender/blenkernel/intern/cdderivedmesh.c | 23 +++++++++++++++++++ .../blender/blenkernel/intern/subsurf_ccg.c | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index b820ad00305..cd0872807a0 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -226,6 +226,21 @@ static struct PBVH *cdDM_getPBVH(Object *ob, DerivedMesh *dm) return cddm->pbvh; } +/* update vertex normals so that drawing smooth faces works during sculpt + TODO: proper fix is to support the pbvh in all drawing modes */ +static void cdDM_update_normals_from_pbvh(DerivedMesh *dm) +{ + CDDerivedMesh *cddm = (CDDerivedMesh*) dm; + float (*face_nors)[3]; + + if(!cddm->pbvh || !cddm->pbvh_draw || !dm->numFaceData) + return; + + face_nors = CustomData_get_layer(&dm->faceData, CD_NORMAL); + + BLI_pbvh_update(cddm->pbvh, PBVH_UpdateNormals, face_nors); +} + static void cdDM_drawVerts(DerivedMesh *dm) { CDDerivedMesh *cddm = (CDDerivedMesh*) dm; @@ -538,6 +553,8 @@ static void cdDM_drawFacesColored(DerivedMesh *dm, int useTwoSided, unsigned cha if(col1 && col2) glEnable(GL_CULL_FACE); + cdDM_update_normals_from_pbvh(dm); + if( GPU_buffer_legacy(dm) ) { DEBUG_VBO( "Using legacy code. cdDM_drawFacesColored\n" ); glShadeModel(GL_SMOOTH); @@ -617,6 +634,8 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm, if(!mcol) mcol = dm->getFaceDataArray(dm, CD_MCOL); + cdDM_update_normals_from_pbvh(dm); + if( GPU_buffer_legacy(dm) ) { DEBUG_VBO( "Using legacy code. cdDM_drawFacesTex_common\n" ); for(i = 0; i < dm->numFaceData; i++, mf++) { @@ -792,6 +811,8 @@ static void cdDM_drawMappedFaces(DerivedMesh *dm, int (*setDrawOptions)(void *us if(!mc) mc = DM_get_face_data_layer(dm, CD_MCOL); + cdDM_update_normals_from_pbvh(dm); + /* back-buffer always uses legacy since VBO's would need the * color array temporarily overwritten for drawing, then reset. */ if( GPU_buffer_legacy(dm) || G.f & G_BACKBUFSEL) { @@ -938,6 +959,8 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, vo int transp, new_transp, orig_transp; int orig, *index = dm->getFaceDataArray(dm, CD_ORIGINDEX); + cdDM_update_normals_from_pbvh(dm); + matnr = -1; smoothnormal = 0; dodraw = 0; diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index 56491b8d692..6f6e6844f0b 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -1245,7 +1245,7 @@ static void ccgDM_glNormalFast(float *a, float *b, float *c, float *d) no[1] = b_dZ*a_cX - b_dX*a_cZ; no[2] = b_dX*a_cY - b_dY*a_cX; - /* don't normalize, GL_NORMALIZE is be enabled */ + /* don't normalize, GL_NORMALIZE is enabled */ glNormal3fv(no); } From 2fe540e0f2ae79c23d60bd86858f22e0376dc5fd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 14 Dec 2010 04:44:07 +0000 Subject: [PATCH 142/236] disallow RNA color values to be set to negative values. Material colors could be set to -100.0 if typed in manually, this is sure to cause bad/unpredictable behavior. --- source/blender/makesrna/intern/rna_define.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index 214a79dbd34..b061fbccd37 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -887,6 +887,8 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier fprop->hardmax= FLT_MAX; if(ELEM(subtype, PROP_COLOR, PROP_COLOR_GAMMA)) { + fprop->hardmin= 0.0f; /* disallow colors to go below zero */ + fprop->softmin= 0.0f; fprop->softmax= 1.0f; } From 96eeb9ad93fb31ed86f224622f709d4ca0e111fd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 14 Dec 2010 04:45:29 +0000 Subject: [PATCH 143/236] bugfix [#25209] X3D export results in invalid value for specular color --- release/scripts/op/io_scene_x3d/export_x3d.py | 52 +++++++++++-------- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/release/scripts/op/io_scene_x3d/export_x3d.py b/release/scripts/op/io_scene_x3d/export_x3d.py index e0886e327e9..6bc667e242b 100644 --- a/release/scripts/op/io_scene_x3d/export_x3d.py +++ b/release/scripts/op/io_scene_x3d/export_x3d.py @@ -616,38 +616,46 @@ class x3d_class: self.matNames[matName]+=1 return; - self.matNames[matName]=1 + self.matNames[matName] = 1 - ambient = mat.ambient/3 - # ambient = mat.amb/3 - diffuseR, diffuseG, diffuseB = tuple(mat.diffuse_color) - # diffuseR, diffuseG, diffuseB = mat.rgbCol[0], mat.rgbCol[1],mat.rgbCol[2] + ambient = mat.ambient / 3.0 + diffuseR, diffuseG, diffuseB = mat.diffuse_color if world: ambi = world.ambient_color - # ambi = world.getAmb() - ambi0, ambi1, ambi2 = (ambi[0]*mat.ambient)*2, (ambi[1]*mat.ambient)*2, (ambi[2]*mat.ambient)*2 - # ambi0, ambi1, ambi2 = (ambi[0]*mat.amb)*2, (ambi[1]*mat.amb)*2, (ambi[2]*mat.amb)*2 + ambi0, ambi1, ambi2 = (ambi[0] * mat.ambient) * 2.0, (ambi[1] * mat.ambient) * 2.0, (ambi[2] * mat.ambient) * 2.0 else: - ambi0, ambi1, ambi2 = 0, 0, 0 - emisR, emisG, emisB = (diffuseR*mat.emit+ambi0)/2, (diffuseG*mat.emit+ambi1)/2, (diffuseB*mat.emit+ambi2)/2 + ambi0, ambi1, ambi2 = 0.0, 0.0, 0.0 + + emisR, emisG, emisB = (diffuseR*mat.emit+ambi0) / 2.0, (diffuseG*mat.emit+ambi1) / 2.0, (diffuseB*mat.emit+ambi2) / 2.0 + del ambi0, ambi1, ambi2 shininess = mat.specular_hardness/512.0 - # shininess = mat.hard/512.0 specR = (mat.specular_color[0]+0.001)/(1.25/(mat.specular_intensity+0.001)) - # specR = (mat.specCol[0]+0.001)/(1.25/(mat.spec+0.001)) specG = (mat.specular_color[1]+0.001)/(1.25/(mat.specular_intensity+0.001)) - # specG = (mat.specCol[1]+0.001)/(1.25/(mat.spec+0.001)) specB = (mat.specular_color[2]+0.001)/(1.25/(mat.specular_intensity+0.001)) - # specB = (mat.specCol[2]+0.001)/(1.25/(mat.spec+0.001)) - transp = 1-mat.alpha - # matFlags = mat.getMode() + + transp = 1.0 - mat.alpha + if mat.use_shadeless: - # if matFlags & Blender.Material.Modes['SHADELESS']: - ambient = 1 - shine = 1 - specR = emitR = diffuseR - specG = emitG = diffuseG - specB = emitB = diffuseB + ambient = 1 + shine = 1 + specR = emitR = diffuseR + specG = emitG = diffuseG + specB = emitB = diffuseB + + # Clamp to be safe + specR= max(min(specR, 1.0), 0.0) + specG= max(min(specG, 1.0), 0.0) + specB= max(min(specB, 1.0), 0.0) + + diffuseR= max(min(diffuseR, 1.0), 0.0) + diffuseG= max(min(diffuseG, 1.0), 0.0) + diffuseB= max(min(diffuseB, 1.0), 0.0) + + emitR= max(min(emitR, 1.0), 0.0) + emitG= max(min(emitG, 1.0), 0.0) + emitB= max(min(emitB, 1.0), 0.0) + self.writeIndented(" Date: Tue, 14 Dec 2010 06:20:28 +0000 Subject: [PATCH 144/236] [#25211] Impossible to select an armature with shapes broke since 2.49b, highly confusing function. Stick bones dont draw solid so cant run glLoadName() in this case. Tested pose/object mode with all armature draw types and view draw modes. --- source/blender/editors/space_view3d/drawarmature.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c index 3ab86505bcf..89da66e269a 100644 --- a/source/blender/editors/space_view3d/drawarmature.c +++ b/source/blender/editors/space_view3d/drawarmature.c @@ -1753,8 +1753,8 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, if (index != -1) index+= 0x10000; // pose bones count in higher 2 bytes only } - - if (draw_wire) { + /* stick bones have not been drawn yet so dont clear object selection in this case */ + if ((arm->drawtype != ARM_LINE) && draw_wire) { /* object tag, for bordersel optim */ glLoadName(index & 0xFFFF); index= -1; From 996bc87793ebb6ad2b347c8e5fce1f2987607c58 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 14 Dec 2010 08:35:56 +0000 Subject: [PATCH 145/236] update for changes in cmake files. --- build_files/cmake/cmake_consistency_check.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/build_files/cmake/cmake_consistency_check.py b/build_files/cmake/cmake_consistency_check.py index 8ff6ae241f8..302ea8561d1 100644 --- a/build_files/cmake/cmake_consistency_check.py +++ b/build_files/cmake/cmake_consistency_check.py @@ -30,10 +30,13 @@ IGNORE = \ "/ik_glut_test/" import os -from os.path import join, dirname, normpath +from os.path import join, dirname, normpath, abspath -base = join(os.getcwd(), "..", "..") +base = join(os.path.dirname(__file__), "..", "..") base = normpath(base) +base = abspath(base) + +print("Scanning:", base) global_h = set() global_c = set() @@ -76,7 +79,7 @@ def cmake_get_src(f): sources_h = [] sources_c = [] - filen = open(f, "r") + filen = open(f, "r", encoding="utf8") it = iter(filen) found = False i = 0 @@ -91,15 +94,15 @@ def cmake_get_src(f): break l = l.strip() if not l.startswith("#"): - if 'SET(SRC' in l or ('SET(' in l and l.endswith("SRC")): + if 'set(SRC' in l or ('set(' in l and l.endswith("SRC")): if len(l.split()) > 1: - raise Exception("strict formatting not kept 'SET(SRC*' %s:%d" % (f, i)) + raise Exception("strict formatting not kept 'set(SRC*' %s:%d" % (f, i)) found = True break - if "LIST(APPEND SRC" in l: + if "list(APPEND SRC" in l: if l.endswith(")"): - raise Exception("strict formatting not kept 'LIST(APPEND SRC...)' on 1 line %s:%d" % (f, i)) + raise Exception("strict formatting not kept 'list(APPEND SRC...)' on 1 line %s:%d" % (f, i)) found = True break From 58f31f8a5d52ec8d043ae92a249804216f626fda Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 14 Dec 2010 10:17:13 +0000 Subject: [PATCH 146/236] Change set handle types back to menu now menus have key access - V+A, V+V, V+L, V+F for Graph & Edit Curve view. Editcurve can be Hkey for hide again. --- release/scripts/ui/space_info.py | 12 ---------- source/blender/editors/curve/curve_ops.c | 9 +++----- source/blender/editors/curve/editcurve.c | 10 +++++---- .../blender/editors/space_graph/graph_edit.c | 22 ++++++++++--------- .../editors/space_graph/graph_intern.h | 2 +- .../blender/editors/space_graph/graph_ops.c | 10 +++------ 6 files changed, 25 insertions(+), 40 deletions(-) diff --git a/release/scripts/ui/space_info.py b/release/scripts/ui/space_info.py index 1aebe51e0d2..8d440c0a02d 100644 --- a/release/scripts/ui/space_info.py +++ b/release/scripts/ui/space_info.py @@ -250,18 +250,6 @@ class INFO_MT_surface_add(bpy.types.Menu): layout.operator("surface.primitive_nurbs_surface_sphere_add", icon='SURFACE_NSPHERE', text="NURBS Sphere") layout.operator("surface.primitive_nurbs_surface_torus_add", icon='SURFACE_NTORUS', text="NURBS Torus") -class INFO_MT_curve_handle_type_set(bpy.types.Menu): - bl_idname = "INFO_MT_curve_handle_type_set" - bl_label = "Handle Type" - - def draw(self, context): - layout = self.layout - layout.operator_context = 'INVOKE_REGION_WIN' - layout.operator("curve.handle_type_set", text="Automatic").type = "AUTOMATIC" - layout.operator("curve.handle_type_set", text="Vector").type = "VECTOR" - layout.operator("curve.handle_type_set", text="Align").type = "ALIGN" - layout.operator("curve.handle_type_set", text="Free Align").type = "FREE_ALIGN" - class INFO_MT_armature_add(bpy.types.Menu): bl_idname = "INFO_MT_armature_add" diff --git a/source/blender/editors/curve/curve_ops.c b/source/blender/editors/curve/curve_ops.c index b454202fc11..89059c0141f 100644 --- a/source/blender/editors/curve/curve_ops.c +++ b/source/blender/editors/curve/curve_ops.c @@ -196,12 +196,9 @@ void ED_keymap_curve(wmKeyConfig *keyconf) keymap->poll= ED_operator_editsurfcurve; WM_keymap_add_menu(keymap, "INFO_MT_edit_curve_add", AKEY, KM_PRESS, KM_SHIFT, 0); - /* XXX will fix it with proper defines (ton) */ - RNA_enum_set(WM_keymap_add_item(keymap, "CURVE_OT_handle_type_set", HKEY, KM_PRESS, 0, 0)->ptr, "type", 5); - RNA_enum_set(WM_keymap_add_item(keymap, "CURVE_OT_handle_type_set", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", HD_AUTO); - RNA_enum_set(WM_keymap_add_item(keymap, "CURVE_OT_handle_type_set", HKEY, KM_PRESS, KM_ALT, 0)->ptr, "type", 6); - RNA_enum_set(WM_keymap_add_item(keymap, "CURVE_OT_handle_type_set", VKEY, KM_PRESS, 0, 0)->ptr, "type", HD_VECT); + WM_keymap_add_item(keymap, "CURVE_OT_handle_type_set", VKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "CURVE_OT_vertex_add", LEFTMOUSE, KM_CLICK, KM_CTRL, 0); WM_keymap_add_item(keymap, "CURVE_OT_select_all", AKEY, KM_PRESS, 0, 0); @@ -226,7 +223,7 @@ void ED_keymap_curve(wmKeyConfig *keyconf) RNA_enum_set(WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, KM_ALT, 0)->ptr, "mode", TFM_CURVE_SHRINKFATTEN); WM_keymap_add_item(keymap, "CURVE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0); - WM_keymap_add_item(keymap, "CURVE_OT_hide", HKEY, KM_PRESS, KM_ALT|KM_CTRL, 0); + WM_keymap_add_item(keymap, "CURVE_OT_hide", HKEY, KM_PRESS, KM_ALT, 0); RNA_enum_set(WM_keymap_add_item(keymap, "CURVE_OT_hide", HKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0)->ptr, "unselected", 1); WM_keymap_add_item(keymap, "OBJECT_OT_vertex_parent_set", PKEY, KM_PRESS, KM_CTRL, 0); diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 7018ddab9fc..5fa1ebe12fb 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -3538,11 +3538,12 @@ static int set_handle_type_exec(bContext *C, wmOperator *op) void CURVE_OT_handle_type_set(wmOperatorType *ot) { - static EnumPropertyItem type_items[]= { + /* keep in sync with graphkeys_handle_type_items */ + static EnumPropertyItem editcurve_handle_type_items[]= { {HD_AUTO, "AUTOMATIC", 0, "Automatic", ""}, {HD_VECT, "VECTOR", 0, "Vector", ""}, - {5, "ALIGN", 0, "Align", ""}, - {6, "FREE_ALIGN", 0, "Free Align", ""}, + {5, "ALIGNED", 0, "Aligned", ""}, + {6, "FREE_ALIGN", 0, "Free", ""}, {3, "TOGGLE_FREE_ALIGN", 0, "Toggle Free/Align", ""}, {0, NULL, 0, NULL, NULL}}; @@ -3551,6 +3552,7 @@ void CURVE_OT_handle_type_set(wmOperatorType *ot) ot->idname= "CURVE_OT_handle_type_set"; /* api callbacks */ + ot->invoke= WM_menu_invoke; ot->exec= set_handle_type_exec; ot->poll= ED_operator_editcurve; @@ -3558,7 +3560,7 @@ void CURVE_OT_handle_type_set(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_enum(ot->srna, "type", type_items, 1, "Type", "Spline type"); + ot->prop= RNA_def_enum(ot->srna, "type", editcurve_handle_type_items, 1, "Type", "Spline type"); } /***************** make segment operator **********************/ diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index a9336046ea5..e9fcb182c8f 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -1352,14 +1352,6 @@ void GRAPH_OT_interpolation_type (wmOperatorType *ot) /* ******************** Set Handle-Type Operator *********************** */ -EnumPropertyItem graphkeys_handle_type_items[] = { - {HD_FREE, "FREE", 0, "Free", ""}, - {HD_VECT, "VECTOR", 0, "Vector", ""}, - {HD_ALIGN, "ALIGNED", 0, "Aligned", ""}, - {HD_AUTO, "AUTO", 0, "Auto", "Handles that are automatically adjusted upon moving the keyframe. Whole curve"}, - {HD_AUTO_ANIM, "ANIM_CLAMPED", 0, "Auto Clamped", "Auto handles clamped to not overshoot. Whole curve"}, - {0, NULL, 0, NULL, NULL}}; - /* ------------------- */ /* this function is responsible for setting handle-type of selected keyframes */ @@ -1424,14 +1416,24 @@ static int graphkeys_handletype_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } - void GRAPH_OT_handle_type (wmOperatorType *ot) + void GRAPH_OT_handle_type_set (wmOperatorType *ot) { + /* sync with editcurve_handle_type_items */ + static EnumPropertyItem graphkeys_handle_type_items[] = { + {HD_AUTO, "AUTO", 0, "Automatic", "Handles that are automatically adjusted upon moving the keyframe. Whole curve"}, + {HD_VECT, "VECTOR", 0, "Vector", ""}, + {HD_ALIGN, "ALIGNED", 0, "Aligned", ""}, + {HD_FREE, "FREE_ALIGN", 0, "Free", ""}, + {HD_AUTO_ANIM, "ANIM_CLAMPED", 0, "Auto Clamped", "Auto handles clamped to not overshoot. Whole curve"}, + {0, NULL, 0, NULL, NULL}}; + /* identifiers */ ot->name= "Set Keyframe Handle Type"; - ot->idname= "GRAPH_OT_handle_type"; + ot->idname= "GRAPH_OT_handle_type_set"; ot->description= "Set type of handle for selected keyframes"; /* api callbacks */ + ot->invoke= WM_menu_invoke; ot->exec= graphkeys_handletype_exec; ot->poll= graphop_editable_keyframes_poll; diff --git a/source/blender/editors/space_graph/graph_intern.h b/source/blender/editors/space_graph/graph_intern.h index 560dabbb634..55279d9ae29 100644 --- a/source/blender/editors/space_graph/graph_intern.h +++ b/source/blender/editors/space_graph/graph_intern.h @@ -106,7 +106,7 @@ void GRAPH_OT_bake(struct wmOperatorType *ot); void GRAPH_OT_sound_bake(struct wmOperatorType *ot); void GRAPH_OT_smooth(struct wmOperatorType *ot); -void GRAPH_OT_handle_type(struct wmOperatorType *ot); +void GRAPH_OT_handle_type_set(struct wmOperatorType *ot); void GRAPH_OT_interpolation_type(struct wmOperatorType *ot); void GRAPH_OT_extrapolation_type(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c index ab28d4d72ea..bbd0df3ecd2 100644 --- a/source/blender/editors/space_graph/graph_ops.c +++ b/source/blender/editors/space_graph/graph_ops.c @@ -239,7 +239,7 @@ void graphedit_operatortypes(void) WM_operatortype_append(GRAPH_OT_snap); WM_operatortype_append(GRAPH_OT_mirror); WM_operatortype_append(GRAPH_OT_frame_jump); - WM_operatortype_append(GRAPH_OT_handle_type); + WM_operatortype_append(GRAPH_OT_handle_type_set); WM_operatortype_append(GRAPH_OT_interpolation_type); WM_operatortype_append(GRAPH_OT_extrapolation_type); WM_operatortype_append(GRAPH_OT_sample); @@ -332,12 +332,8 @@ static void graphedit_keymap_keyframes (wmKeyConfig *keyconf, wmKeyMap *keymap) WM_keymap_add_item(keymap, "GRAPH_OT_snap", SKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "GRAPH_OT_mirror", MKEY, KM_PRESS, KM_SHIFT, 0); - RNA_enum_set(WM_keymap_add_item(keymap, "GRAPH_OT_handle_type", HKEY, KM_PRESS, 0, 0)->ptr, "type", HD_ALIGN); - RNA_enum_set(WM_keymap_add_item(keymap, "GRAPH_OT_handle_type", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", HD_AUTO); - RNA_enum_set(WM_keymap_add_item(keymap, "GRAPH_OT_handle_type", HKEY, KM_PRESS, KM_ALT, 0)->ptr, "type", HD_FREE); - RNA_enum_set(WM_keymap_add_item(keymap, "GRAPH_OT_handle_type", VKEY, KM_PRESS, 0, 0)->ptr, "type", HD_VECT); - - + WM_keymap_add_item(keymap, "GRAPH_OT_handle_type_set", VKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "GRAPH_OT_interpolation_type", TKEY, KM_PRESS, KM_SHIFT, 0); /* destructive */ From b49ac2430c189e647cea2c9bf274d29066585fec Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Tue, 14 Dec 2010 10:52:38 +0000 Subject: [PATCH 147/236] Fix for 'handle_type' submenu in Graph Editor no longer working. Previous commit fixing rest of handle type keymaps renamed this operator, but that brings it out of line with rest of animation editor operators, so reverting that fix. Also, made Action Editor/DopeSheet use same hotkey as Graph Editor for setting handle types now (which is same as one used in 3D-View). --- source/blender/editors/space_action/action_ops.c | 2 +- source/blender/editors/space_graph/graph_edit.c | 4 ++-- source/blender/editors/space_graph/graph_intern.h | 2 +- source/blender/editors/space_graph/graph_ops.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/blender/editors/space_action/action_ops.c b/source/blender/editors/space_action/action_ops.c index 19dd4512909..ea36ce98ecb 100644 --- a/source/blender/editors/space_action/action_ops.c +++ b/source/blender/editors/space_action/action_ops.c @@ -131,7 +131,7 @@ static void action_keymap_keyframes (wmKeyConfig *keyconf, wmKeyMap *keymap) WM_keymap_add_item(keymap, "ACTION_OT_mirror", MKEY, KM_PRESS, KM_SHIFT, 0); /* menu + set setting */ - WM_keymap_add_item(keymap, "ACTION_OT_handle_type", HKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "ACTION_OT_handle_type", VKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "ACTION_OT_interpolation_type", TKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "ACTION_OT_extrapolation_type", EKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "ACTION_OT_keyframe_type", RKEY, KM_PRESS, 0, 0); diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index e9fcb182c8f..798e1b12242 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -1416,7 +1416,7 @@ static int graphkeys_handletype_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } - void GRAPH_OT_handle_type_set (wmOperatorType *ot) + void GRAPH_OT_handle_type (wmOperatorType *ot) { /* sync with editcurve_handle_type_items */ static EnumPropertyItem graphkeys_handle_type_items[] = { @@ -1429,7 +1429,7 @@ static int graphkeys_handletype_exec(bContext *C, wmOperator *op) /* identifiers */ ot->name= "Set Keyframe Handle Type"; - ot->idname= "GRAPH_OT_handle_type_set"; + ot->idname= "GRAPH_OT_handle_type"; ot->description= "Set type of handle for selected keyframes"; /* api callbacks */ diff --git a/source/blender/editors/space_graph/graph_intern.h b/source/blender/editors/space_graph/graph_intern.h index 55279d9ae29..560dabbb634 100644 --- a/source/blender/editors/space_graph/graph_intern.h +++ b/source/blender/editors/space_graph/graph_intern.h @@ -106,7 +106,7 @@ void GRAPH_OT_bake(struct wmOperatorType *ot); void GRAPH_OT_sound_bake(struct wmOperatorType *ot); void GRAPH_OT_smooth(struct wmOperatorType *ot); -void GRAPH_OT_handle_type_set(struct wmOperatorType *ot); +void GRAPH_OT_handle_type(struct wmOperatorType *ot); void GRAPH_OT_interpolation_type(struct wmOperatorType *ot); void GRAPH_OT_extrapolation_type(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c index bbd0df3ecd2..1939de69e14 100644 --- a/source/blender/editors/space_graph/graph_ops.c +++ b/source/blender/editors/space_graph/graph_ops.c @@ -239,7 +239,7 @@ void graphedit_operatortypes(void) WM_operatortype_append(GRAPH_OT_snap); WM_operatortype_append(GRAPH_OT_mirror); WM_operatortype_append(GRAPH_OT_frame_jump); - WM_operatortype_append(GRAPH_OT_handle_type_set); + WM_operatortype_append(GRAPH_OT_handle_type); WM_operatortype_append(GRAPH_OT_interpolation_type); WM_operatortype_append(GRAPH_OT_extrapolation_type); WM_operatortype_append(GRAPH_OT_sample); @@ -332,7 +332,7 @@ static void graphedit_keymap_keyframes (wmKeyConfig *keyconf, wmKeyMap *keymap) WM_keymap_add_item(keymap, "GRAPH_OT_snap", SKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "GRAPH_OT_mirror", MKEY, KM_PRESS, KM_SHIFT, 0); - WM_keymap_add_item(keymap, "GRAPH_OT_handle_type_set", VKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "GRAPH_OT_handle_type", VKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "GRAPH_OT_interpolation_type", TKEY, KM_PRESS, KM_SHIFT, 0); From ef0e29269b81c411c07b836eb569098106517e79 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 14 Dec 2010 11:22:54 +0000 Subject: [PATCH 148/236] curve hide keys were still not right, now match mesh editmode. --- source/blender/editors/curve/curve_ops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/curve/curve_ops.c b/source/blender/editors/curve/curve_ops.c index 89059c0141f..690aed2203b 100644 --- a/source/blender/editors/curve/curve_ops.c +++ b/source/blender/editors/curve/curve_ops.c @@ -223,8 +223,8 @@ void ED_keymap_curve(wmKeyConfig *keyconf) RNA_enum_set(WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, KM_ALT, 0)->ptr, "mode", TFM_CURVE_SHRINKFATTEN); WM_keymap_add_item(keymap, "CURVE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0); - WM_keymap_add_item(keymap, "CURVE_OT_hide", HKEY, KM_PRESS, KM_ALT, 0); - RNA_enum_set(WM_keymap_add_item(keymap, "CURVE_OT_hide", HKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0)->ptr, "unselected", 1); + WM_keymap_add_item(keymap, "CURVE_OT_hide", HKEY, KM_PRESS, 0, 0); + RNA_enum_set(WM_keymap_add_item(keymap, "CURVE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "unselected", 1); WM_keymap_add_item(keymap, "OBJECT_OT_vertex_parent_set", PKEY, KM_PRESS, KM_CTRL, 0); From b412a072e70a54f94c04636cfe8bd2b88d987776 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 14 Dec 2010 12:09:30 +0000 Subject: [PATCH 149/236] script to convert datatoc files back to data. --- release/datafiles/ctodata.py | 58 ++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 release/datafiles/ctodata.py diff --git a/release/datafiles/ctodata.py b/release/datafiles/ctodata.py new file mode 100644 index 00000000000..be33f724deb --- /dev/null +++ b/release/datafiles/ctodata.py @@ -0,0 +1,58 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# The Original Code is Copyright (C) 2009 Blender Foundation. +# All rights reserved. +# +# Contributor(s): Campbell Barton +# +# ***** END GPL LICENCE BLOCK ***** + + +# + +import sys +import os + +if len(sys.argv) < 2: + sys.stdout.write("Usage: ctodata \n") + sys.exit(1) + +filename = sys.argv[1] + +try: + fpin = open(filename, "r") +except: + sys.stdout.write("Unable to open input %s\n" % sys.argv[1]) + sys.exit(1) + +data = fpin.read().rsplit("{")[-1].split("}")[0] +data = data.replace(",", " ") +data = data.split() +data = bytes([int(v) for v in data]) + +dname = filename + ".ctodata" + +try: + fpout = open(dname, "wb") +except: + sys.stdout.write("Unable to open output %s\n" % dname) + sys.exit(1) + +fpout.write(data) From 295ce322e3ff3c2536336057126c1605358965b5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 14 Dec 2010 13:56:10 +0000 Subject: [PATCH 150/236] missed renaming this enum. --- release/scripts/ui/space_view3d_toolbar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/scripts/ui/space_view3d_toolbar.py b/release/scripts/ui/space_view3d_toolbar.py index d49ae34f222..aa9dfb043fe 100644 --- a/release/scripts/ui/space_view3d_toolbar.py +++ b/release/scripts/ui/space_view3d_toolbar.py @@ -194,7 +194,7 @@ class VIEW3D_PT_tools_curveedit(View3DPanel, bpy.types.Panel): row.operator("curve.handle_type_set", text="Auto").type = 'AUTOMATIC' row.operator("curve.handle_type_set", text="Vector").type = 'VECTOR' row = col.row() - row.operator("curve.handle_type_set", text="Align").type = 'ALIGN' + row.operator("curve.handle_type_set", text="Align").type = 'ALIGNED' row.operator("curve.handle_type_set", text="Free").type = 'FREE_ALIGN' col = layout.column(align=True) From 93cbc840e088ca0ecb62f96596d2f7c46e5635ee Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Tue, 14 Dec 2010 14:45:56 +0000 Subject: [PATCH 151/236] Fix for [#25198] Smoke gets shown before simulation starts * Smoke is now only drawn/rendered after the simulation frame range starts. * This does not apply to simulation end frame though, so that any remaining smoke can for example be faded away nicely through material settings. --- source/blender/editors/space_view3d/drawobject.c | 4 +++- source/blender/render/intern/source/voxeldata.c | 10 ++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index b28be7bad86..055a12348c9 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -6119,7 +6119,9 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) // only draw domains if(smd->domain && smd->domain->fluid) { - if(!smd->domain->wt || !(smd->domain->viewsettings & MOD_SMOKE_VIEW_SHOWBIG)) + if(CFRA < smd->domain->point_cache[0]->startframe) + ; /* don't show smoke before simulation starts, this could be made an option in the future */ + else if(!smd->domain->wt || !(smd->domain->viewsettings & MOD_SMOKE_VIEW_SHOWBIG)) { // #if 0 smd->domain->tex = NULL; diff --git a/source/blender/render/intern/source/voxeldata.c b/source/blender/render/intern/source/voxeldata.c index 859b6246eca..0ccf905a851 100644 --- a/source/blender/render/intern/source/voxeldata.c +++ b/source/blender/render/intern/source/voxeldata.c @@ -47,6 +47,7 @@ #include "smoke_API.h" #include "DNA_texture_types.h" +#include "DNA_object_force.h" #include "DNA_object_types.h" #include "DNA_modifier_types.h" #include "DNA_smoke_types.h" @@ -179,7 +180,7 @@ static int read_voxeldata_header(FILE *fp, struct VoxelData *vd) return 1; } -static void init_frame_smoke(VoxelData *vd) +static void init_frame_smoke(VoxelData *vd, float cfra) { Object *ob; ModifierData *md; @@ -195,8 +196,9 @@ static void init_frame_smoke(VoxelData *vd) if(smd->domain && smd->domain->fluid) { - - if (vd->smoked_type == TEX_VD_SMOKEHEAT) { + if(cfra < smd->domain->point_cache[0]->startframe) + ; /* don't show smoke before simulation starts, this could be made an option in the future */ + else if (vd->smoked_type == TEX_VD_SMOKEHEAT) { int totRes; float *heat; int i; @@ -294,7 +296,7 @@ static void cache_voxeldata(struct Render *re, Tex *tex) load_frame_image_sequence(vd, tex); return; case TEX_VD_SMOKE: - init_frame_smoke(vd); + init_frame_smoke(vd, re->r.cfra); return; case TEX_VD_BLENDERVOXEL: BLI_path_abs(path, G.main->name); From 78e7c6b329585a0dd6b4d07112d66e54c2a9d5f4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 14 Dec 2010 15:14:16 +0000 Subject: [PATCH 152/236] graph editor & action keyframe paste options. - Offset, so you can paste at the same time of the original frames, at the current frame or relative to the current frame at time of copying. - Merge method, so the pasted keys can overwrite keys in their range or the entire curve. Currently there is no redo panel for these space types so the only way to access these options is with F6 redo popup. --- .../editors/animation/keyframes_general.c | 121 ++++++++++++++++-- .../editors/include/ED_keyframes_edit.h | 27 +++- .../editors/space_action/action_edit.c | 14 +- .../blender/editors/space_graph/graph_edit.c | 14 +- source/blender/makesrna/RNA_enum_types.h | 3 + 5 files changed, 159 insertions(+), 20 deletions(-) diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c index 3672b3901e4..437f74201e4 100644 --- a/source/blender/editors/animation/keyframes_general.c +++ b/source/blender/editors/animation/keyframes_general.c @@ -117,11 +117,18 @@ void delete_fcurve_keys(FCurve *fcu) } /* Free the array of BezTriples if there are not keyframes */ - if (fcu->totvert == 0) { - if (fcu->bezt) - MEM_freeN(fcu->bezt); - fcu->bezt= NULL; - } + if(fcu->totvert == 0) + clear_fcurve_keys(fcu); +} + + +void clear_fcurve_keys(FCurve *fcu) +{ + if (fcu->bezt) + MEM_freeN(fcu->bezt); + fcu->bezt= NULL; + + fcu->totvert= 0; } /* ---------------- */ @@ -446,6 +453,8 @@ void sample_fcurve (FCurve *fcu) /* globals for copy/paste data (like for other copy/paste buffers) */ ListBase animcopybuf = {NULL, NULL}; static float animcopy_firstframe= 999999999.0f; +static float animcopy_lastframe= -999999999.0f; +static float animcopy_cfra= 0.0; /* datatype for use in copy/paste buffer */ typedef struct tAnimCopybufItem { @@ -488,14 +497,16 @@ void free_anim_copybuf (void) /* restore initial state */ animcopybuf.first= animcopybuf.last= NULL; animcopy_firstframe= 999999999.0f; + animcopy_lastframe= -999999999.0f; } /* ------------------- */ /* This function adds data to the keyframes copy/paste buffer, freeing existing data first */ -short copy_animedit_keys (bAnimContext *UNUSED(ac), ListBase *anim_data) +short copy_animedit_keys (bAnimContext *ac, ListBase *anim_data) { bAnimListElem *ale; + Scene *scene= ac->scene; /* clear buffer first */ free_anim_copybuf(); @@ -545,6 +556,8 @@ short copy_animedit_keys (bAnimContext *UNUSED(ac), ListBase *anim_data) /* check if this is the earliest frame encountered so far */ if (bezt->vec[1][0] < animcopy_firstframe) animcopy_firstframe= bezt->vec[1][0]; + if (bezt->vec[1][0] > animcopy_lastframe) + animcopy_lastframe= bezt->vec[1][0]; } } @@ -553,7 +566,10 @@ short copy_animedit_keys (bAnimContext *UNUSED(ac), ListBase *anim_data) /* check if anything ended up in the buffer */ if (ELEM(NULL, animcopybuf.first, animcopybuf.last)) return -1; - + + /* incase 'relative' paste method is used */ + animcopy_cfra= CFRA; + /* everything went fine */ return 0; } @@ -636,11 +652,58 @@ static tAnimCopybufItem *pastebuf_match_index_only(FCurve *fcu, const short from return aci; } -static void paste_animedit_keys_fcurve(FCurve *fcu, tAnimCopybufItem *aci, float offset) +static void paste_animedit_keys_fcurve(FCurve *fcu, tAnimCopybufItem *aci, float offset, const eKeyMergeMode merge_mode) { BezTriple *bezt; int i; + /* First de-select existing FCuvre */ + for (i=0, bezt=fcu->bezt; i < fcu->totvert; i++, bezt++) { + bezt->f2 &= ~SELECT; + } + + /* mix mode with existing data */ + switch(merge_mode) { + case KEYFRAME_PASTE_MERGE_MIX: + /* do-nothing */ + break; + case KEYFRAME_PASTE_MERGE_OVER: + /* remove all keys */ + clear_fcurve_keys(fcu); + break; + case KEYFRAME_PASTE_MERGE_OVER_RANGE: + case KEYFRAME_PASTE_MERGE_OVER_RANGE_ALL: + { + float f_min; + float f_max; + + if(merge_mode==KEYFRAME_PASTE_MERGE_OVER_RANGE) { + f_min= aci->bezt[0].vec[1][0] + offset; + f_max= aci->bezt[aci->totvert-1].vec[1][0] + offset; + } + else { /* Entire Range */ + f_min= animcopy_firstframe + offset; + f_max= animcopy_lastframe + offset; + } + + /* remove keys in range */ + + if(f_min < f_max) { + /* select verts in range for removal */ + for (i=0, bezt=fcu->bezt; i < fcu->totvert; i++, bezt++) { + if((f_min < bezt[0].vec[1][0]) && (bezt[0].vec[1][0] < f_max)) { + bezt->f2 |= SELECT; + } + } + + /* remove frames in the range */ + delete_fcurve_keys(fcu); + } + break; + } + } + + /* just start pasting, with the the first keyframe on the current frame, and so on */ for (i=0, bezt=aci->bezt; i < aci->totvert; i++, bezt++) { /* temporarily apply offset to src beztriple while copying */ @@ -663,22 +726,54 @@ static void paste_animedit_keys_fcurve(FCurve *fcu, tAnimCopybufItem *aci, float calchandles_fcurve(fcu); } +EnumPropertyItem keyframe_paste_offset_items[] = { + {KEYFRAME_PASTE_OFFSET_CFRA_START, "START", 0, "Frame Start", "Paste keys starting at current frame"}, + {KEYFRAME_PASTE_OFFSET_CFRA_END, "END", 0, "Frame End", "Paste keys ending at current frame"}, + {KEYFRAME_PASTE_OFFSET_CFRA_RELATIVE, "RELATIVE", 0, "Frame Relative", "Paste keys relative to the current frame when copying"}, + {KEYFRAME_PASTE_OFFSET_NONE, "NONE", 0, "No Offset", "Paste keys from original time"}, + {0, NULL, 0, NULL, NULL}}; + +EnumPropertyItem keyframe_paste_merge_items[] = { + {KEYFRAME_PASTE_MERGE_MIX, "MIX", 0, "Mix", "Overlay existing with new keys"}, + {KEYFRAME_PASTE_MERGE_OVER, "OVER_ALL", 0, "Overwrite All", "Replace all keys"}, + {KEYFRAME_PASTE_MERGE_OVER_RANGE, "OVER_RANGE", 0, "Overwrite Range", "Overwrite keys in pasted range"}, + {KEYFRAME_PASTE_MERGE_OVER_RANGE_ALL, "OVER_RANGE_ALL", 0, "Overwrite Entire Range", "Overwrite keys in pasted range, using the range of all copied keys."}, + {0, NULL, 0, NULL, NULL}}; + + /* This function pastes data from the keyframes copy/paste buffer */ -short paste_animedit_keys (bAnimContext *ac, ListBase *anim_data) +short paste_animedit_keys (bAnimContext *ac, ListBase *anim_data, + const eKeyPasteOffset offset_mode, const eKeyMergeMode merge_mode) { bAnimListElem *ale; const Scene *scene= (ac->scene); - const float offset = (float)(CFRA - animcopy_firstframe); + float offset; const short from_single= (animcopybuf.first == animcopybuf.last); const short to_simple= (anim_data->first == anim_data->last); int pass; - + /* check if buffer is empty */ if (ELEM(NULL, animcopybuf.first, animcopybuf.last)) { BKE_report(ac->reports, RPT_WARNING, "No data in buffer to paste"); return -1; } + /* mathods of offset */ + switch(offset_mode) { + case KEYFRAME_PASTE_OFFSET_CFRA_START: + offset= (float)(CFRA - animcopy_firstframe); + break; + case KEYFRAME_PASTE_OFFSET_CFRA_END: + offset= (float)(CFRA - animcopy_lastframe); + break; + case KEYFRAME_PASTE_OFFSET_CFRA_RELATIVE: + offset= (float)(CFRA - animcopy_cfra); + break; + case KEYFRAME_PASTE_OFFSET_NONE: + offset= 0.0f; + break; + } + if(from_single && to_simple) { /* 1:1 match, no tricky checking, just paste */ FCurve *fcu; @@ -688,7 +783,7 @@ short paste_animedit_keys (bAnimContext *ac, ListBase *anim_data) fcu= (FCurve *)ale->data; /* destination F-Curve */ aci= animcopybuf.first; - paste_animedit_keys_fcurve(fcu, aci, offset); + paste_animedit_keys_fcurve(fcu, aci, offset, merge_mode); } else { /* from selected channels */ @@ -724,7 +819,7 @@ short paste_animedit_keys (bAnimContext *ac, ListBase *anim_data) /* copy the relevant data from the matching buffer curve */ if (aci) { totmatch++; - paste_animedit_keys_fcurve(fcu, aci, offset); + paste_animedit_keys_fcurve(fcu, aci, offset, merge_mode); } } diff --git a/source/blender/editors/include/ED_keyframes_edit.h b/source/blender/editors/include/ED_keyframes_edit.h index 5ea9287a71e..2a7ce9b540b 100644 --- a/source/blender/editors/include/ED_keyframes_edit.h +++ b/source/blender/editors/include/ED_keyframes_edit.h @@ -152,6 +152,29 @@ typedef struct KeyframeEditCD_Remap { float newMin, newMax; /* new range */ } KeyframeEditCD_Remap; +/* Paste options */ +typedef enum eKeyPasteOffset { + /* paste keys starting at current frame */ + KEYFRAME_PASTE_OFFSET_CFRA_START, + /* paste keys ending at current frame */ + KEYFRAME_PASTE_OFFSET_CFRA_END, + /* paste keys relative to the current frame when copying */ + KEYFRAME_PASTE_OFFSET_CFRA_RELATIVE, + /* paste keys from original time */ + KEYFRAME_PASTE_OFFSET_NONE +} eKeyPasteOffset; + +typedef enum eKeyMergeMode { + /* overlay existing with new keys */ + KEYFRAME_PASTE_MERGE_MIX, + /* replace entire fcurve */ + KEYFRAME_PASTE_MERGE_OVER, + /* overwrite keys in pasted range */ + KEYFRAME_PASTE_MERGE_OVER_RANGE, + /* overwrite keys in pasted range (use all keyframe start & end for range) */ + KEYFRAME_PASTE_MERGE_OVER_RANGE_ALL +} eKeyMergeMode; + /* ---------------- Looping API --------------------- */ /* functions for looping over keyframes */ @@ -212,6 +235,7 @@ void bezt_remap_times(KeyframeEditData *ked, struct BezTriple *bezt); void delete_fcurve_key(struct FCurve *fcu, int index, short do_recalc); void delete_fcurve_keys(struct FCurve *fcu); +void clear_fcurve_keys(struct FCurve *fcu); void duplicate_fcurve_keys(struct FCurve *fcu); void clean_fcurve(struct FCurve *fcu, float thresh); @@ -222,7 +246,8 @@ void sample_fcurve(struct FCurve *fcu); void free_anim_copybuf(void); short copy_animedit_keys(struct bAnimContext *ac, ListBase *anim_data); -short paste_animedit_keys(struct bAnimContext *ac, ListBase *anim_data); +short paste_animedit_keys(struct bAnimContext *ac, ListBase *anim_data, + const eKeyPasteOffset offset_mode, const eKeyMergeMode merge_mode); /* ************************************************ */ diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index 59e4cfcf68f..afda04d1c45 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -291,7 +291,8 @@ static short copy_action_keys (bAnimContext *ac) } -static short paste_action_keys (bAnimContext *ac) +static short paste_action_keys (bAnimContext *ac, + const eKeyPasteOffset offset_mode, const eKeyMergeMode merge_mode) { ListBase anim_data = {NULL, NULL}; int filter, ok=0; @@ -301,7 +302,7 @@ static short paste_action_keys (bAnimContext *ac) ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); /* paste keyframes */ - ok= paste_animedit_keys(ac, &anim_data); + ok= paste_animedit_keys(ac, &anim_data, offset_mode, merge_mode); /* clean up */ BLI_freelistN(&anim_data); @@ -341,11 +342,15 @@ void ACTION_OT_copy (wmOperatorType *ot) ot->description= "Copy selected keyframes to the copy/paste buffer"; /* api callbacks */ +// ot->invoke= WM_operator_props_popup; // better wait for graph redo panel ot->exec= actkeys_copy_exec; ot->poll= ED_operator_action_active; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + RNA_def_enum(ot->srna, "offset", keyframe_paste_offset_items, KEYFRAME_PASTE_OFFSET_CFRA_START, "Offset", "Paste time offset of keys"); + RNA_def_enum(ot->srna, "merge", keyframe_paste_merge_items, KEYFRAME_PASTE_MERGE_MIX, "Type", "Method of merking pasted keys and existing"); } @@ -353,6 +358,9 @@ void ACTION_OT_copy (wmOperatorType *ot) static int actkeys_paste_exec(bContext *C, wmOperator *op) { bAnimContext ac; + + const eKeyPasteOffset offset_mode= RNA_enum_get(op->ptr, "offset"); + const eKeyMergeMode merge_mode= RNA_enum_get(op->ptr, "merge"); /* get editor data */ if (ANIM_animdata_get_context(C, &ac) == 0) @@ -367,7 +375,7 @@ static int actkeys_paste_exec(bContext *C, wmOperator *op) // FIXME... } else { - if (paste_action_keys(&ac)) { + if (paste_action_keys(&ac, offset_mode, merge_mode)) { BKE_report(op->reports, RPT_ERROR, "No keyframes to paste"); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 798e1b12242..1e6443bba32 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -618,7 +618,8 @@ static short copy_graph_keys (bAnimContext *ac) return ok; } -static short paste_graph_keys (bAnimContext *ac) +static short paste_graph_keys (bAnimContext *ac, + const eKeyPasteOffset offset_mode, const eKeyMergeMode merge_mode) { ListBase anim_data = {NULL, NULL}; int filter, ok=0; @@ -628,7 +629,7 @@ static short paste_graph_keys (bAnimContext *ac) ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); /* paste keyframes */ - ok= paste_animedit_keys(ac, &anim_data); + ok= paste_animedit_keys(ac, &anim_data, offset_mode, merge_mode); /* clean up */ BLI_freelistN(&anim_data); @@ -676,6 +677,9 @@ void GRAPH_OT_copy (wmOperatorType *ot) static int graphkeys_paste_exec(bContext *C, wmOperator *op) { bAnimContext ac; + + const eKeyPasteOffset offset_mode= RNA_enum_get(op->ptr, "offset"); + const eKeyMergeMode merge_mode= RNA_enum_get(op->ptr, "merge"); /* get editor data */ if (ANIM_animdata_get_context(C, &ac) == 0) @@ -686,7 +690,7 @@ static int graphkeys_paste_exec(bContext *C, wmOperator *op) } /* paste keyframes */ - if (paste_graph_keys(&ac)) { + if (paste_graph_keys(&ac, offset_mode, merge_mode)) { return OPERATOR_CANCELLED; } @@ -707,11 +711,15 @@ void GRAPH_OT_paste (wmOperatorType *ot) ot->description= "Paste keyframes from copy/paste buffer for the selected channels, starting on the current frame"; /* api callbacks */ +// ot->invoke= WM_operator_props_popup; // better wait for graph redo panel ot->exec= graphkeys_paste_exec; ot->poll= graphop_editable_keyframes_poll; /* flags */ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + + RNA_def_enum(ot->srna, "offset", keyframe_paste_offset_items, KEYFRAME_PASTE_OFFSET_CFRA_START, "Offset", "Paste time offset of keys"); + RNA_def_enum(ot->srna, "merge", keyframe_paste_merge_items, KEYFRAME_PASTE_MERGE_MIX, "Type", "Method of merking pasted keys and existing"); } /* ******************** Duplicate Keyframes Operator ************************* */ diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h index 9b6b12ef727..8e5463d5990 100644 --- a/source/blender/makesrna/RNA_enum_types.h +++ b/source/blender/makesrna/RNA_enum_types.h @@ -57,6 +57,9 @@ extern EnumPropertyItem beztriple_interpolation_mode_items[]; extern EnumPropertyItem keyingset_path_grouping_items[]; +extern EnumPropertyItem keyframe_paste_offset_items[]; +extern EnumPropertyItem keyframe_paste_merge_items[]; + extern EnumPropertyItem fmodifier_type_items[]; extern EnumPropertyItem nla_mode_extend_items[]; From 2dc61df9eac381042af2b9a675ac645ee88449dc Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Tue, 14 Dec 2010 15:49:36 +0000 Subject: [PATCH 153/236] Fix for [#25206] Particles system can't start at frame 0 * The basic problem is that frame 0 can't be cached, so the correct solution is to read frame 1 and interpolate backwards from that state. --- source/blender/blenkernel/intern/particle.c | 24 ++++++++++++++----- .../blenkernel/intern/particle_system.c | 1 + 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 2ec90eb29db..187071941bf 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -4229,18 +4229,21 @@ int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *sta else if(pa->prev_state.time==state->time) copy_particle_key(state, &pa->prev_state, 1); else { + float dfra, frs_sec = sim->scene->r.frs_sec; /* let's interpolate to try to be as accurate as possible */ - if(pa->state.time + 2.0f > state->time && pa->prev_state.time - 2.0f < state->time) { - ParticleKey keys[4]; - float dfra, keytime, frs_sec = sim->scene->r.frs_sec; - + if(pa->state.time + 2.0f >= state->time && pa->prev_state.time - 2.0f <= state->time) { if(pa->prev_state.time >= pa->state.time) { - /* prev_state is wrong so let's not use it, this can happen at frame 1 or particle birth */ + /* prev_state is wrong so let's not use it, this can happen at frames 1, 0 or particle birth */ + dfra = state->time - pa->state.time; + copy_particle_key(state, &pa->state, 1); - VECADDFAC(state->co, state->co, state->vel, (state->time-pa->state.time)/frs_sec); + madd_v3_v3v3fl(state->co, state->co, state->vel, dfra/frs_sec); } else { + ParticleKey keys[4]; + float keytime; + copy_particle_key(keys+1, &pa->prev_state, 1); copy_particle_key(keys+2, &pa->state, 1); @@ -4261,6 +4264,15 @@ int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *sta interp_qt_qtqt(state->rot, keys[1].rot, keys[2].rot, keytime); } } + else if(pa->state.time + 1.f >= state->time && pa->state.time - 1.f <= state->time) { + /* linear interpolation using only pa->state */ + + dfra = state->time - pa->state.time; + + copy_particle_key(state, &pa->state, 1); + + madd_v3_v3v3fl(state->co, state->co, state->vel, dfra/frs_sec); + } else { /* extrapolating over big ranges is not accurate so let's just give something close to reasonable back */ copy_particle_key(state, &pa->state, 0); diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index c7a65b8a5ee..9eed401adbb 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -3776,6 +3776,7 @@ static void system_step(ParticleSimulationData *sim, float cfra) /* simulation is only active during a specific period */ if(framenr < startframe) { + BKE_ptcache_read_cache(use_cache, startframe, sim->scene->r.frs_sec); /* set correct particle state and reset particles */ cached_step(sim, cfra); return; From 4057626e55e3c1e78d6725c54160b059580f1dd1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 14 Dec 2010 16:20:25 +0000 Subject: [PATCH 154/236] - revert own recent change after discussion, default set hard minimum of colors to 0 but now don't set a hard min, each property needs to define. - use_old_bump setting only applies to material texture slots. --- release/scripts/ui/properties_texture.py | 5 +++-- source/blender/makesrna/intern/rna_define.c | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/release/scripts/ui/properties_texture.py b/release/scripts/ui/properties_texture.py index 5e200a45eb8..b343035b29a 100644 --- a/release/scripts/ui/properties_texture.py +++ b/release/scripts/ui/properties_texture.py @@ -988,8 +988,9 @@ class TEXTURE_PT_influence(TextureSlotPanel, bpy.types.Panel): # color is used on grayscale textures even when use_rgb_to_intensity is disabled. col.prop(tex, "color", text="") - # XXX, dont remove since old files have this users need to be able to disable! - col.prop(tex, "use_old_bump", text="Old Bump Mapping") + if isinstance(idblock, bpy.types.Material): + # XXX, dont remove since old files have this users need to be able to disable! + col.prop(tex, "use_old_bump", text="Old Bump Mapping") col = split.column() col.prop(tex, "invert", text="Negative") diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index b061fbccd37..214a79dbd34 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -887,8 +887,6 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier fprop->hardmax= FLT_MAX; if(ELEM(subtype, PROP_COLOR, PROP_COLOR_GAMMA)) { - fprop->hardmin= 0.0f; /* disallow colors to go below zero */ - fprop->softmin= 0.0f; fprop->softmax= 1.0f; } From 2b537777454b402e997dc64559ca5e692675af81 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Tue, 14 Dec 2010 16:23:15 +0000 Subject: [PATCH 155/236] Bugfix #25212 Sequencer: Properties -> Panel "Strip Input" -> file browse button next to directory name assigned the full file name. Added on todo: unported code still for "Change Sequence", allowing to rebrowse strip contents. --- source/blender/editors/space_buttons/buttons_ops.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c index a461fdcd9c6..abb2f689803 100644 --- a/source/blender/editors/space_buttons/buttons_ops.c +++ b/source/blender/editors/space_buttons/buttons_ops.c @@ -104,16 +104,20 @@ static int file_browse_exec(bContext *C, wmOperator *op) /* add slash for directories, important for some properties */ if(RNA_property_subtype(fbo->prop) == PROP_DIRPATH) { + char name[FILE_MAX]; + id = fbo->ptr.id.data; base = (id && id->lib)? id->lib->filepath: G.main->name; BLI_strncpy(path, str, FILE_MAX); BLI_path_abs(path, base); - + if(BLI_is_dir(path)) { str = MEM_reallocN(str, strlen(str)+2); BLI_add_slash(str); } + else + BLI_splitdirstring(str, name); } RNA_property_string_set(&fbo->ptr, fbo->prop, str); From 73ea636abb6f9d4d25155f630ac606973e9bf335 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 14 Dec 2010 16:33:04 +0000 Subject: [PATCH 156/236] clamp colors from 0-1 which are used for display only. --- source/blender/makesrna/intern/rna_fcurve.c | 1 + source/blender/makesrna/intern/rna_gpencil.c | 1 + source/blender/makesrna/intern/rna_scene.c | 1 + source/blender/makesrna/intern/rna_text.c | 1 + 4 files changed, 4 insertions(+) diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c index 05ee9f9c216..b3c5f74ab84 100644 --- a/source/blender/makesrna/intern/rna_fcurve.c +++ b/source/blender/makesrna/intern/rna_fcurve.c @@ -1395,6 +1395,7 @@ static void rna_def_fcurve(BlenderRNA *brna) prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR); RNA_def_property_array(prop, 3); + RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Color", "Color of the F-Curve in the Graph Editor"); RNA_def_property_update(prop, NC_ANIMATION, NULL); diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c index c03af99ccb0..a104ae9de5c 100644 --- a/source/blender/makesrna/intern/rna_gpencil.c +++ b/source/blender/makesrna/intern/rna_gpencil.c @@ -169,6 +169,7 @@ static void rna_def_gpencil_layer(BlenderRNA *brna) /* Drawing Color */ prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR); RNA_def_property_array(prop, 3); + RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Color", "Color for all strokes in this layer"); RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index cb12c042298..02b05cb7073 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -1655,6 +1655,7 @@ static void rna_def_scene_game_data(BlenderRNA *brna) prop= RNA_def_property(srna, "frame_color", PROP_FLOAT, PROP_COLOR); RNA_def_property_float_sdna(prop, NULL, "framing.col"); + RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_array(prop, 3); RNA_def_property_ui_text(prop, "Framing Color", "Set color of the bars"); RNA_def_property_update(prop, NC_SCENE, NULL); diff --git a/source/blender/makesrna/intern/rna_text.c b/source/blender/makesrna/intern/rna_text.c index 15e7ce525ba..c61f47b719c 100644 --- a/source/blender/makesrna/intern/rna_text.c +++ b/source/blender/makesrna/intern/rna_text.c @@ -165,6 +165,7 @@ static void rna_def_text_marker(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Edit All", "Edit all markers of the same group as one"); prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR); + RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Color", "Color to display the marker with"); } From 9ac68ad4abf2f4bb4fc92c292170a7cf6c29b319 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Tue, 14 Dec 2010 18:02:41 +0000 Subject: [PATCH 157/236] Bugfix #22040 Old bug report: Image Editor, Painting: crash when texture was visible in Material or Texture preview. Was caused by paint code freeing mipmaps. Now replaced with a mipmap tag (to be done again), and a new mipmap function that doesn't re-allocate. --- .../editors/sculpt_paint/paint_image.c | 3 +- source/blender/imbuf/IMB_imbuf.h | 1 + source/blender/imbuf/IMB_imbuf_types.h | 3 +- source/blender/imbuf/intern/IMB_filter.h | 2 + source/blender/imbuf/intern/filter.c | 37 ++++++++++++++ source/blender/imbuf/intern/scaling.c | 33 ++++++++----- .../render/intern/source/imagetexture.c | 48 +++++++++++-------- 7 files changed, 92 insertions(+), 35 deletions(-) diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 84816cebc46..46bcd1f1c0d 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -4013,8 +4013,9 @@ static void imapaint_image_update(SpaceImage *sima, Image *image, ImBuf *ibuf, s if(ibuf->rect_float) /* TODO - should just update a portion from imapaintpartial! */ imb_freerectImBuf(ibuf); /* force recreate of char rect */ + if(ibuf->mipmap[0]) - imb_freemipmapImBuf(ibuf); + ibuf->userflags |= IB_MIPMAP_INVALID; /* todo: should set_tpage create ->rect? */ if(texpaint || (sima && sima->lock)) { diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h index a22168e06a3..2accad35859 100644 --- a/source/blender/imbuf/IMB_imbuf.h +++ b/source/blender/imbuf/IMB_imbuf.h @@ -244,6 +244,7 @@ void IMB_filter(struct ImBuf *ibuf); void IMB_filterN(struct ImBuf *out, struct ImBuf *in); void IMB_filter_extend(struct ImBuf *ibuf, char *mask); void IMB_makemipmap(struct ImBuf *ibuf, int use_filter); +void IMB_remakemipmap(struct ImBuf *ibuf, int use_filter); struct ImBuf *IMB_getmipmap(struct ImBuf *ibuf, int level); /** diff --git a/source/blender/imbuf/IMB_imbuf_types.h b/source/blender/imbuf/IMB_imbuf_types.h index a12976fa813..f60c6d03547 100644 --- a/source/blender/imbuf/IMB_imbuf_types.h +++ b/source/blender/imbuf/IMB_imbuf_types.h @@ -131,11 +131,12 @@ typedef struct ImBuf { /* Moved from BKE_bmfont_types.h because it is a userflag bit mask. */ /** - * \brief Flags used internally by blender for imagebuffers + * \brief userflags: Flags used internally by blender for imagebuffers */ #define IB_BITMAPFONT (1 << 0) /* this image is a font */ #define IB_BITMAPDIRTY (1 << 1) /* image needs to be saved is not the same as filename */ +#define IB_MIPMAP_INVALID (1 << 2) /* image mipmaps are invalid, need recreate */ /* From iff.h. This was once moved away by Frank, now Nzc moves it * back. Such is the way it is... It is a long list of defines, and diff --git a/source/blender/imbuf/intern/IMB_filter.h b/source/blender/imbuf/intern/IMB_filter.h index 84ad72c520a..0d414cb4702 100644 --- a/source/blender/imbuf/intern/IMB_filter.h +++ b/source/blender/imbuf/intern/IMB_filter.h @@ -44,5 +44,7 @@ void imb_filterx(struct ImBuf *ibuf); void IMB_premultiply_rect(unsigned int *rect, int depth, int w, int h); void IMB_premultiply_rect_float(float *rect_float, int depth, int w, int h); +void imb_onehalf_no_alloc(struct ImBuf *ibuf2, struct ImBuf *ibuf1); + #endif diff --git a/source/blender/imbuf/intern/filter.c b/source/blender/imbuf/intern/filter.c index 3c2c276b6e4..13c0e6cf632 100644 --- a/source/blender/imbuf/intern/filter.c +++ b/source/blender/imbuf/intern/filter.c @@ -371,11 +371,48 @@ void IMB_filter_extend(struct ImBuf *ibuf, char *mask) } } +/* threadsafe version, only recreates existing maps */ +void IMB_remakemipmap(ImBuf *ibuf, int use_filter) +{ + ImBuf *hbuf = ibuf; + int curmap = 0; + + ibuf->miptot= 1; + + while(curmap < IB_MIPMAP_LEVELS) { + + if(ibuf->mipmap[curmap]) { + + if(use_filter) { + ImBuf *nbuf= IMB_allocImBuf(hbuf->x, hbuf->y, 32, IB_rect); + IMB_filterN(nbuf, hbuf); + imb_onehalf_no_alloc(ibuf->mipmap[curmap], nbuf); + IMB_freeImBuf(nbuf); + } + else + imb_onehalf_no_alloc(ibuf->mipmap[curmap], hbuf); + } + + ibuf->miptot= curmap+2; + hbuf= ibuf->mipmap[curmap]; + if(hbuf) + hbuf->miplevel= curmap+1; + + if(!hbuf || (hbuf->x <= 2 && hbuf->y <= 2)) + break; + + curmap++; + } +} + +/* frees too (if there) and recreates new data */ void IMB_makemipmap(ImBuf *ibuf, int use_filter) { ImBuf *hbuf = ibuf; int curmap = 0; + imb_freemipmapImBuf(ibuf); + ibuf->miptot= 1; while(curmap < IB_MIPMAP_LEVELS) { diff --git a/source/blender/imbuf/intern/scaling.c b/source/blender/imbuf/intern/scaling.c index 73dcc0c8ea9..1f50deaee2a 100644 --- a/source/blender/imbuf/intern/scaling.c +++ b/source/blender/imbuf/intern/scaling.c @@ -286,26 +286,16 @@ struct ImBuf *IMB_double_y(struct ImBuf *ibuf1) return (ibuf2); } - -struct ImBuf *IMB_onehalf(struct ImBuf *ibuf1) +/* result in ibuf2, scaling should be done correctly */ +void imb_onehalf_no_alloc(struct ImBuf *ibuf2, struct ImBuf *ibuf1) { - struct ImBuf *ibuf2; uchar *p1, *p2 = NULL, *dest; float *p1f, *destf, *p2f = NULL; int x,y; int do_rect, do_float; - if (ibuf1==NULL) return (0); - if (ibuf1->rect==NULL && ibuf1->rect_float==NULL) return (0); - do_rect= (ibuf1->rect != NULL); - - if (ibuf1->x <= 1) return(IMB_half_y(ibuf1)); - if (ibuf1->y <= 1) return(IMB_half_x(ibuf1)); - ibuf2=IMB_allocImBuf((ibuf1->x)/2, (ibuf1->y)/2, ibuf1->depth, ibuf1->flags); - if (ibuf2==NULL) return (0); - p1f = ibuf1->rect_float; destf=ibuf2->rect_float; p1 = (uchar *) ibuf1->rect; @@ -343,9 +333,26 @@ struct ImBuf *IMB_onehalf(struct ImBuf *ibuf1) if (do_float) p1f+=4; } } - return (ibuf2); + } +struct ImBuf *IMB_onehalf(struct ImBuf *ibuf1) +{ + struct ImBuf *ibuf2; + + if (ibuf1==NULL) return (0); + if (ibuf1->rect==NULL && ibuf1->rect_float==NULL) return (0); + + if (ibuf1->x <= 1) return(IMB_half_y(ibuf1)); + if (ibuf1->y <= 1) return(IMB_half_x(ibuf1)); + + ibuf2=IMB_allocImBuf((ibuf1->x)/2, (ibuf1->y)/2, ibuf1->depth, ibuf1->flags); + if (ibuf2==NULL) return (0); + + imb_onehalf_no_alloc(ibuf2, ibuf1); + + return (ibuf2); +} /* q_scale_linear_interpolation helper functions */ diff --git a/source/blender/render/intern/source/imagetexture.c b/source/blender/render/intern/source/imagetexture.c index 9376c798c39..5a2ce5a6b89 100644 --- a/source/blender/render/intern/source/imagetexture.c +++ b/source/blender/render/intern/source/imagetexture.c @@ -960,6 +960,30 @@ static void alpha_clip_aniso(ImBuf *ibuf, float minx, float miny, float maxx, fl } } +static void image_mipmap_test(Tex *tex, ImBuf *ibuf) +{ + if (tex->imaflag & TEX_MIPMAP) { + if ((ibuf->flags & IB_fields) == 0) { + + if (ibuf->mipmap[0] && (ibuf->userflags & IB_MIPMAP_INVALID)) { + BLI_lock_thread(LOCK_IMAGE); + if (ibuf->userflags & IB_MIPMAP_INVALID) { + IMB_remakemipmap(ibuf, tex->imaflag & TEX_GAUSS_MIP); + ibuf->userflags &= ~IB_MIPMAP_INVALID; + } + BLI_unlock_thread(LOCK_IMAGE); + } + if (ibuf->mipmap[0] == NULL) { + BLI_lock_thread(LOCK_IMAGE); + if (ibuf->mipmap[0] == NULL) + IMB_makemipmap(ibuf, tex->imaflag & TEX_GAUSS_MIP); + BLI_unlock_thread(LOCK_IMAGE); + } + } + } + +} + static int imagewraposa_aniso(Tex *tex, Image *ima, ImBuf *ibuf, float *texvec, float *dxt, float *dyt, TexResult *texres) { TexResult texr; @@ -996,15 +1020,9 @@ static int imagewraposa_aniso(Tex *tex, Image *ima, ImBuf *ibuf, float *texvec, if ((ibuf == NULL) || ((ibuf->rect == NULL) && (ibuf->rect_float == NULL))) return retval; - // mipmap test - if (tex->imaflag & TEX_MIPMAP) { - if (((ibuf->flags & IB_fields) == 0) && (ibuf->mipmap[0] == NULL)) { - BLI_lock_thread(LOCK_IMAGE); - if (ibuf->mipmap[0] == NULL) IMB_makemipmap(ibuf, tex->imaflag & TEX_GAUSS_MIP); - BLI_unlock_thread(LOCK_IMAGE); - } - } - + /* mipmap test */ + image_mipmap_test(tex, ibuf); + if ((tex->imaflag & TEX_USEALPHA) && ((tex->imaflag & TEX_CALCALPHA) == 0)) texres->talpha = 1; texr.talpha = texres->talpha; @@ -1388,17 +1406,7 @@ int imagewraposa(Tex *tex, Image *ima, ImBuf *ibuf, float *texvec, float *DXT, f return retval; /* mipmap test */ - if (tex->imaflag & TEX_MIPMAP) { - if(ibuf->flags & IB_fields); - else if(ibuf->mipmap[0]==NULL) { - BLI_lock_thread(LOCK_IMAGE); - - if(ibuf->mipmap[0]==NULL) - IMB_makemipmap(ibuf, tex->imaflag & TEX_GAUSS_MIP); - - BLI_unlock_thread(LOCK_IMAGE); - } - } + image_mipmap_test(tex, ibuf); if(tex->imaflag & TEX_USEALPHA) { if(tex->imaflag & TEX_CALCALPHA); From 7775a1a798dd6130140e82f97a1b5e0abea4b8ec Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Tue, 14 Dec 2010 19:25:49 +0000 Subject: [PATCH 158/236] Bugfix #21724 Graph Editor: "make selected channels visible" VKEY didn't make unselected channels invisble. What is left is that the active channel remains visible still. Not sure if that's by design, for Joshua to answer. --- source/blender/editors/animation/anim_channels_edit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index ccc87a6ccd4..04cb5091f33 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -1173,7 +1173,7 @@ static int animchannels_visibility_set_exec(bContext *C, wmOperator *UNUSED(op)) BLI_freelistN(&anim_data); /* make all the selected channels visible */ - filter= (ANIMFILTER_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_NODUPLIS); + filter= (ANIMFILTER_SEL | ANIMFILTER_NODUPLIS); ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); for (ale= anim_data.first; ale; ale= ale->next) { From 100d611ce53f759508b29c819b0033cbf8bbb167 Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Tue, 14 Dec 2010 21:46:03 +0000 Subject: [PATCH 159/236] Apply patch [#25224] Refactor COLLADA DocumentImporter Submitted by Martijn Berger. Make DocumentImporter class the actual IWriter implementation and move prototype to the header. Group together functions that we should move out of the class. No functional changes. --- source/blender/collada/DocumentImporter.cpp | 100 ++++++++---------- source/blender/collada/DocumentImporter.h | 108 +++++++++++++++++++- source/blender/collada/collada.cpp | 4 +- 3 files changed, 148 insertions(+), 64 deletions(-) diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp index fc3ae1ac8c2..818b78fdd6d 100644 --- a/source/blender/collada/DocumentImporter.cpp +++ b/source/blender/collada/DocumentImporter.cpp @@ -30,16 +30,9 @@ #include // sort() #include "COLLADAFWRoot.h" -#include "COLLADAFWIWriter.h" #include "COLLADAFWStableHeaders.h" -#include "COLLADAFWCamera.h" #include "COLLADAFWColorOrTexture.h" -#include "COLLADAFWEffect.h" -#include "COLLADAFWImage.h" #include "COLLADAFWIndexList.h" -#include "COLLADAFWInstanceGeometry.h" -#include "COLLADAFWLight.h" -#include "COLLADAFWMaterial.h" #include "COLLADAFWMeshPrimitiveWithFaceVertexCount.h" #include "COLLADAFWPolygons.h" #include "COLLADAFWSampler.h" @@ -47,6 +40,8 @@ #include "COLLADAFWVisualScene.h" #include "COLLADAFWArrayPrimitiveType.h" #include "COLLADAFWLibraryNodes.h" +#include "COLLADAFWCamera.h" +#include "COLLADAFWLight.h" #include "COLLADASaxFWLLoader.h" @@ -58,7 +53,6 @@ #include "BLI_path_util.h" #include "BKE_scene.h" #include "BKE_global.h" -#include "BKE_object.h" #include "BKE_material.h" #include "BKE_utildefines.h" #include "BKE_image.h" @@ -77,10 +71,6 @@ #include "DocumentImporter.h" #include "collada_internal.h" -#include "TransformReader.h" -#include "AnimationImporter.h" -#include "ArmatureImporter.h" -#include "MeshImporter.h" #include "collada_utils.h" @@ -95,8 +85,7 @@ /** Class that needs to be implemented by a writer. IMPORTANT: The write functions are called in arbitrary order.*/ -class Writer: public COLLADAFW::IWriter -{ +/* private: std::string mFilename; @@ -118,25 +107,27 @@ private: std::vector vscenes; std::vector libnode_ob; - std::map root_map; // find root joint by child joint uid, for bone tree evaluation during resampling + std::map root_map; + */ + // find root joint by child joint uid, for bone tree evaluation during resampling // animation // std::map > uid_fcurve_map; // Nodes don't share AnimationLists (Arystan) // std::map uid_animated_map; // AnimationList->uniqueId to AnimatedObject map -public: +//public: /** Constructor. */ - Writer(bContext *C, const char *filename) : mFilename(filename), mContext(C), + DocumentImporter::DocumentImporter(bContext *C, const char *filename) : mFilename(filename), mContext(C), armature_importer(&unit_converter, &mesh_importer, &anim_importer, CTX_data_scene(C)), mesh_importer(&unit_converter, &armature_importer, CTX_data_scene(C)), anim_importer(&unit_converter, &armature_importer, CTX_data_scene(C)) {} /** Destructor. */ - ~Writer() {} + DocumentImporter::~DocumentImporter() {} - bool write() + bool DocumentImporter::import() { COLLADASaxFWL::Loader loader; COLLADAFW::Root root(&loader, this); @@ -147,12 +138,8 @@ public: return true; } - - /** This method will be called if an error in the loading process occurred and the loader cannot - continue to load. The writer should undo all operations that have been performed. - @param errorMessage A message containing informations about the error that occurred. - */ - virtual void cancel(const COLLADAFW::String& errorMessage) + + void DocumentImporter::cancel(const COLLADAFW::String& errorMessage) { // TODO: if possible show error info // @@ -162,13 +149,10 @@ public: // The latter sounds better. } - /** This is the method called. The writer hast to prepare to receive data.*/ - virtual void start() - { - } + void DocumentImporter::start(){} /** This method is called after the last write* method. No other methods will be called after this.*/ - virtual void finish() + void DocumentImporter::finish() { std::vector::iterator it; for (it = vscenes.begin(); it != vscenes.end(); it++) { @@ -213,7 +197,7 @@ public: const COLLADAFW::NodePointerArray& roots = (*it)->getRootNodes(); for (unsigned int i = 0; i < roots.getCount(); i++) - translate_anim_recursive(roots[i]); + translate_anim_recursive(roots[i],NULL,NULL); } if (libnode_ob.size()) { @@ -242,7 +226,7 @@ public: } - void translate_anim_recursive(COLLADAFW::Node *node, COLLADAFW::Node *par = NULL, Object *parob = NULL) + void DocumentImporter::translate_anim_recursive(COLLADAFW::Node *node, COLLADAFW::Node *par = NULL, Object *parob = NULL) { if (par && par->getType() == COLLADAFW::Node::JOINT) { // par is root if there's no corresp. key in root_map @@ -273,7 +257,7 @@ public: /** When this method is called, the writer must write the global document asset. @return The writer should return true, if writing succeeded, false otherwise.*/ - virtual bool writeGlobalAsset ( const COLLADAFW::FileInfo* asset ) + bool DocumentImporter::writeGlobalAsset ( const COLLADAFW::FileInfo* asset ) { unit_converter.read_asset(asset); @@ -282,12 +266,12 @@ public: /** When this method is called, the writer must write the scene. @return The writer should return true, if writing succeeded, false otherwise.*/ - virtual bool writeScene ( const COLLADAFW::Scene* scene ) + bool DocumentImporter::writeScene ( const COLLADAFW::Scene* scene ) { // XXX could store the scene id, but do nothing for now return true; } - Object *create_camera_object(COLLADAFW::InstanceCamera *camera, Scene *sce) + Object* DocumentImporter::create_camera_object(COLLADAFW::InstanceCamera *camera, Scene *sce) { const COLLADAFW::UniqueId& cam_uid = camera->getInstanciatedObjectId(); if (uid_camera_map.find(cam_uid) == uid_camera_map.end()) { @@ -304,7 +288,7 @@ public: return ob; } - Object *create_lamp_object(COLLADAFW::InstanceLight *lamp, Scene *sce) + Object* DocumentImporter::create_lamp_object(COLLADAFW::InstanceLight *lamp, Scene *sce) { const COLLADAFW::UniqueId& lamp_uid = lamp->getInstanciatedObjectId(); if (uid_lamp_map.find(lamp_uid) == uid_lamp_map.end()) { @@ -321,7 +305,7 @@ public: return ob; } - Object *create_instance_node(Object *source_ob, COLLADAFW::Node *source_node, COLLADAFW::Node *instance_node, Scene *sce, bool is_library_node) + Object* DocumentImporter::create_instance_node(Object *source_ob, COLLADAFW::Node *source_node, COLLADAFW::Node *instance_node, Scene *sce, bool is_library_node) { Object *obn = copy_object(source_ob); obn->recalc |= OB_RECALC_ALL; @@ -361,7 +345,7 @@ public: return obn; } - void write_node (COLLADAFW::Node *node, COLLADAFW::Node *parent_node, Scene *sce, Object *par, bool is_library_node) + void DocumentImporter::write_node (COLLADAFW::Node *node, COLLADAFW::Node *parent_node, Scene *sce, Object *par, bool is_library_node) { Object *ob = NULL; bool is_joint = node->getType() == COLLADAFW::Node::JOINT; @@ -452,7 +436,7 @@ public: /** When this method is called, the writer must write the entire visual scene. @return The writer should return true, if writing succeeded, false otherwise.*/ - virtual bool writeVisualScene ( const COLLADAFW::VisualScene* visualScene ) + bool DocumentImporter::writeVisualScene ( const COLLADAFW::VisualScene* visualScene ) { // this method called on post process after writeGeometry, writeMaterial, etc. @@ -472,7 +456,7 @@ public: /** When this method is called, the writer must handle all nodes contained in the library nodes. @return The writer should return true, if writing succeeded, false otherwise.*/ - virtual bool writeLibraryNodes ( const COLLADAFW::LibraryNodes* libraryNodes ) + bool DocumentImporter::writeLibraryNodes ( const COLLADAFW::LibraryNodes* libraryNodes ) { Scene *sce = CTX_data_scene(mContext); @@ -487,14 +471,14 @@ public: /** When this method is called, the writer must write the geometry. @return The writer should return true, if writing succeeded, false otherwise.*/ - virtual bool writeGeometry ( const COLLADAFW::Geometry* geom ) + bool DocumentImporter::writeGeometry ( const COLLADAFW::Geometry* geom ) { return mesh_importer.write_geometry(geom); } /** When this method is called, the writer must write the material. @return The writer should return true, if writing succeeded, false otherwise.*/ - virtual bool writeMaterial( const COLLADAFW::Material* cmat ) + bool DocumentImporter::writeMaterial( const COLLADAFW::Material* cmat ) { const std::string& str_mat_id = cmat->getOriginalId(); Material *ma = add_material((char*)str_mat_id.c_str()); @@ -506,7 +490,7 @@ public: } // create mtex, create texture, set texture image - MTex *create_texture(COLLADAFW::EffectCommon *ef, COLLADAFW::Texture &ctex, Material *ma, + MTex* DocumentImporter::create_texture(COLLADAFW::EffectCommon *ef, COLLADAFW::Texture &ctex, Material *ma, int i, TexIndexTextureArrayMap &texindex_texarray_map) { COLLADAFW::SamplerPointerArray& samp_array = ef->getSamplerPointerArray(); @@ -531,7 +515,7 @@ public: return ma->mtex[i]; } - void write_profile_COMMON(COLLADAFW::EffectCommon *ef, Material *ma) + void DocumentImporter::write_profile_COMMON(COLLADAFW::EffectCommon *ef, Material *ma) { COLLADAFW::EffectCommon::ShaderType shader = ef->getShaderType(); @@ -668,7 +652,7 @@ public: /** When this method is called, the writer must write the effect. @return The writer should return true, if writing succeeded, false otherwise.*/ - virtual bool writeEffect( const COLLADAFW::Effect* effect ) + bool DocumentImporter::writeEffect( const COLLADAFW::Effect* effect ) { const COLLADAFW::UniqueId& uid = effect->getUniqueId(); @@ -695,7 +679,7 @@ public: /** When this method is called, the writer must write the camera. @return The writer should return true, if writing succeeded, false otherwise.*/ - virtual bool writeCamera( const COLLADAFW::Camera* camera ) + bool DocumentImporter::writeCamera( const COLLADAFW::Camera* camera ) { Camera *cam = NULL; std::string cam_id, cam_name; @@ -807,7 +791,7 @@ public: /** When this method is called, the writer must write the image. @return The writer should return true, if writing succeeded, false otherwise.*/ - virtual bool writeImage( const COLLADAFW::Image* image ) + bool DocumentImporter::writeImage( const COLLADAFW::Image* image ) { // XXX maybe it is necessary to check if the path is absolute or relative const std::string& filepath = image->getImageURI().toNativePath(); @@ -829,7 +813,7 @@ public: /** When this method is called, the writer must write the light. @return The writer should return true, if writing succeeded, false otherwise.*/ - virtual bool writeLight( const COLLADAFW::Light* light ) + bool DocumentImporter::writeLight( const COLLADAFW::Light* light ) { Lamp *lamp = NULL; std::string la_id, la_name; @@ -924,14 +908,14 @@ public: } // this function is called only for animations that pass COLLADAFW::validate - virtual bool writeAnimation( const COLLADAFW::Animation* anim ) + bool DocumentImporter::writeAnimation( const COLLADAFW::Animation* anim ) { // return true; return anim_importer.write_animation(anim); } // called on post-process stage after writeVisualScenes - virtual bool writeAnimationList( const COLLADAFW::AnimationList* animationList ) + bool DocumentImporter::writeAnimationList( const COLLADAFW::AnimationList* animationList ) { // return true; return anim_importer.write_animation_list(animationList); @@ -939,30 +923,26 @@ public: /** When this method is called, the writer must write the skin controller data. @return The writer should return true, if writing succeeded, false otherwise.*/ - virtual bool writeSkinControllerData( const COLLADAFW::SkinControllerData* skin ) + bool DocumentImporter::writeSkinControllerData( const COLLADAFW::SkinControllerData* skin ) { return armature_importer.write_skin_controller_data(skin); } // this is called on postprocess, before writeVisualScenes - virtual bool writeController( const COLLADAFW::Controller* controller ) + bool DocumentImporter::writeController( const COLLADAFW::Controller* controller ) { return armature_importer.write_controller(controller); } - virtual bool writeFormulas( const COLLADAFW::Formulas* formulas ) + bool DocumentImporter::writeFormulas( const COLLADAFW::Formulas* formulas ) { return true; } - virtual bool writeKinematicsScene( const COLLADAFW::KinematicsScene* kinematicsScene ) + bool DocumentImporter::writeKinematicsScene( const COLLADAFW::KinematicsScene* kinematicsScene ) { return true; } -}; -void DocumentImporter::import(bContext *C, const char *filename) -{ - Writer w(C, filename); - w.write(); -} + + diff --git a/source/blender/collada/DocumentImporter.h b/source/blender/collada/DocumentImporter.h index 6a6f1dcb3bc..a2c5e664623 100644 --- a/source/blender/collada/DocumentImporter.h +++ b/source/blender/collada/DocumentImporter.h @@ -24,13 +24,117 @@ #ifndef __DOCUMENTIMPORTER_H__ #define __DOCUMENTIMPORTER_H__ + +#include "COLLADAFWIWriter.h" +#include "COLLADAFWMaterial.h" +#include "COLLADAFWEffect.h" +#include "COLLADAFWColor.h" +#include "COLLADAFWImage.h" +#include "COLLADAFWInstanceGeometry.h" +#include "COLLADAFWController.h" +#include "COLLADAFWMorphController.h" +#include "COLLADAFWSkinController.h" + +#include "BKE_object.h" + +#include "TransformReader.h" +#include "AnimationImporter.h" +#include "ArmatureImporter.h" +#include "MeshImporter.h" + + struct Main; struct bContext; -class DocumentImporter +class DocumentImporter : COLLADAFW::IWriter { + private: + + std::string mFilename; + + bContext *mContext; + + UnitConverter unit_converter; + ArmatureImporter armature_importer; + MeshImporter mesh_importer; + AnimationImporter anim_importer; + + std::map uid_image_map; + std::map uid_material_map; + std::map uid_effect_map; + std::map uid_camera_map; + std::map uid_lamp_map; + std::map material_texture_mapping_map; + std::map object_map; + std::map node_map; + std::vector vscenes; + std::vector libnode_ob; + + std::map root_map; // find root joint by child joint uid, for bone tree evaluation during resampling public: - void import(bContext *C, const char *filename); + /** Constructor */ + DocumentImporter(bContext *C, const char *filename); + + /** Destructor */ + ~DocumentImporter(); + + /** Function called by blender UI */ + bool import(); + + /** these should not be here */ + Object* create_camera_object(COLLADAFW::InstanceCamera*, Scene*); + Object* create_lamp_object(COLLADAFW::InstanceLight*, Scene*); + Object* create_instance_node(Object*, COLLADAFW::Node*, COLLADAFW::Node*, Scene*, bool); + void write_node(COLLADAFW::Node*, COLLADAFW::Node*, Scene*, Object*, bool); + MTex* create_texture(COLLADAFW::EffectCommon*, COLLADAFW::Texture&, Material*, int, TexIndexTextureArrayMap&); + void write_profile_COMMON(COLLADAFW::EffectCommon*, Material*); + void translate_anim_recursive(COLLADAFW::Node*, COLLADAFW::Node*, Object*); + + /** This method will be called if an error in the loading process occurred and the loader cannot + continue to load. The writer should undo all operations that have been performed. + @param errorMessage A message containing informations about the error that occurred. + */ + void cancel(const COLLADAFW::String& errorMessage); + + /** This is the method called. The writer hast to prepare to receive data.*/ + void start(); + + /** This method is called after the last write* method. No other methods will be called after this.*/ + void finish(); + + bool writeGlobalAsset(const COLLADAFW::FileInfo*); + + bool writeScene(const COLLADAFW::Scene*); + + bool writeVisualScene(const COLLADAFW::VisualScene*); + + bool writeLibraryNodes(const COLLADAFW::LibraryNodes*); + + bool writeAnimation(const COLLADAFW::Animation*); + + bool writeAnimationList(const COLLADAFW::AnimationList*); + + bool writeGeometry(const COLLADAFW::Geometry*); + + bool writeMaterial(const COLLADAFW::Material*); + + bool writeEffect(const COLLADAFW::Effect*); + + bool writeCamera(const COLLADAFW::Camera*); + + bool writeImage(const COLLADAFW::Image*); + + bool writeLight(const COLLADAFW::Light*); + + bool writeSkinControllerData(const COLLADAFW::SkinControllerData*); + + bool writeController(const COLLADAFW::Controller*); + + bool writeFormulas(const COLLADAFW::Formulas*); + + bool writeKinematicsScene(const COLLADAFW::KinematicsScene*); + + }; #endif diff --git a/source/blender/collada/collada.cpp b/source/blender/collada/collada.cpp index d499249cfa2..d040e99c4b9 100644 --- a/source/blender/collada/collada.cpp +++ b/source/blender/collada/collada.cpp @@ -32,8 +32,8 @@ extern "C" int collada_import(bContext *C, const char *filepath) { - DocumentImporter imp; - imp.import(C, filepath); + DocumentImporter imp (C, filepath); + imp.import(); return 1; } From f2d843ed2be8dd8ffdd3c8958f682f9411fdf50d Mon Sep 17 00:00:00 2001 From: Matt Ebb Date: Wed, 15 Dec 2010 00:56:15 +0000 Subject: [PATCH 160/236] Exposed mesh edit 'select similar' threshold as operator property, must have been missed before. --- source/blender/editors/mesh/editmesh_mods.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c index b4cac123ce4..d017ddb1b3e 100644 --- a/source/blender/editors/mesh/editmesh_mods.c +++ b/source/blender/editors/mesh/editmesh_mods.c @@ -731,7 +731,7 @@ static EnumPropertyItem prop_similar_types[] = { *0.5 so smaller faces arnt ALWAYS selected with a thresh of 1.0 */ #define SCALE_CMP(a,b) ((a+a*thresh >= b) && (a-(a*thresh*0.5) <= b)) -static int similar_face_select__internal(Scene *scene, EditMesh *em, int mode) +static int similar_face_select__internal(Scene *scene, EditMesh *em, int mode, float thresh) { EditFace *efa, *base_efa=NULL; unsigned int selcount=0; /*count how many new faces we select*/ @@ -739,7 +739,6 @@ static int similar_face_select__internal(Scene *scene, EditMesh *em, int mode) /*deselcount, count how many deselected faces are left, so we can bail out early also means that if there are no deselected faces, we can avoid a lot of looping */ unsigned int deselcount=0; - float thresh= scene->toolsettings->select_thresh; short ok=0; for(efa= em->faces.first; efa; efa= efa->next) { @@ -864,7 +863,7 @@ static int similar_face_select_exec(bContext *C, wmOperator *op) Mesh *me= obedit->data; EditMesh *em= BKE_mesh_get_editmesh(me); - int selcount = similar_face_select__internal(scene, em, RNA_int_get(op->ptr, "type")); + int selcount = similar_face_select__internal(scene, em, RNA_int_get(op->ptr, "type"), RNA_float_get(op->ptr, "threshold")); if (selcount) { /* here was an edge-mode only select flush case, has to be generalized */ @@ -880,7 +879,7 @@ static int similar_face_select_exec(bContext *C, wmOperator *op) /* ***************************************************** */ -static int similar_edge_select__internal(ToolSettings *ts, EditMesh *em, int mode) +static int similar_edge_select__internal(ToolSettings *ts, EditMesh *em, int mode, float thresh) { EditEdge *eed, *base_eed=NULL; unsigned int selcount=0; /* count how many new edges we select*/ @@ -890,7 +889,6 @@ static int similar_edge_select__internal(ToolSettings *ts, EditMesh *em, int mod unsigned int deselcount=0; short ok=0; - float thresh= ts->select_thresh; for(eed= em->edges.first; eed; eed= eed->next) { if (!eed->h) { @@ -1085,7 +1083,7 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op) Mesh *me= obedit->data; EditMesh *em= BKE_mesh_get_editmesh(me); - int selcount = similar_edge_select__internal(ts, em, RNA_int_get(op->ptr, "type")); + int selcount = similar_edge_select__internal(ts, em, RNA_int_get(op->ptr, "type"), RNA_float_get(op->ptr, "threshold")); if (selcount) { /* here was an edge-mode only select flush case, has to be generalized */ @@ -1114,9 +1112,9 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op) so we can return when there are none left */ unsigned int deselcount=0; int mode= RNA_enum_get(op->ptr, "type"); + float thresh = RNA_float_get(op->ptr, "threshold"); short ok=0; - float thresh= ts->select_thresh; for(eve= em->verts.first; eve; eve= eve->next) { if (!eve->h) { @@ -1304,6 +1302,7 @@ void MESH_OT_select_similar(wmOperatorType *ot) prop= RNA_def_enum(ot->srna, "type", prop_similar_types, SIMVERT_NORMAL, "Type", ""); RNA_def_enum_funcs(prop, select_similar_type_itemf); ot->prop= prop; + RNA_def_float(ot->srna, "threshold", 0.01f, 0.0f, FLT_MAX, "Threshold", "", 0.0f, 100.f); } /* ******************************************* */ From 32e6f862e9ec670d675487958ecae85b86fd526d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 15 Dec 2010 02:09:35 +0000 Subject: [PATCH 161/236] remove unused args. --- source/blender/editors/mesh/editmesh_mods.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c index d017ddb1b3e..5a2464bb0c6 100644 --- a/source/blender/editors/mesh/editmesh_mods.c +++ b/source/blender/editors/mesh/editmesh_mods.c @@ -731,7 +731,7 @@ static EnumPropertyItem prop_similar_types[] = { *0.5 so smaller faces arnt ALWAYS selected with a thresh of 1.0 */ #define SCALE_CMP(a,b) ((a+a*thresh >= b) && (a-(a*thresh*0.5) <= b)) -static int similar_face_select__internal(Scene *scene, EditMesh *em, int mode, float thresh) +static int similar_face_select__internal(EditMesh *em, int mode, float thresh) { EditFace *efa, *base_efa=NULL; unsigned int selcount=0; /*count how many new faces we select*/ @@ -858,12 +858,11 @@ static int similar_face_select__internal(Scene *scene, EditMesh *em, int mode, f static int similar_face_select_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); Object *obedit= CTX_data_edit_object(C); Mesh *me= obedit->data; EditMesh *em= BKE_mesh_get_editmesh(me); - int selcount = similar_face_select__internal(scene, em, RNA_int_get(op->ptr, "type"), RNA_float_get(op->ptr, "threshold")); + int selcount = similar_face_select__internal(em, RNA_int_get(op->ptr, "type"), RNA_float_get(op->ptr, "threshold")); if (selcount) { /* here was an edge-mode only select flush case, has to be generalized */ @@ -879,7 +878,7 @@ static int similar_face_select_exec(bContext *C, wmOperator *op) /* ***************************************************** */ -static int similar_edge_select__internal(ToolSettings *ts, EditMesh *em, int mode, float thresh) +static int similar_edge_select__internal(EditMesh *em, int mode, float thresh) { EditEdge *eed, *base_eed=NULL; unsigned int selcount=0; /* count how many new edges we select*/ @@ -1078,12 +1077,11 @@ static int similar_edge_select__internal(ToolSettings *ts, EditMesh *em, int mod /* wrap the above function but do selection flushing edge to face */ static int similar_edge_select_exec(bContext *C, wmOperator *op) { - ToolSettings *ts= CTX_data_tool_settings(C); Object *obedit= CTX_data_edit_object(C); Mesh *me= obedit->data; EditMesh *em= BKE_mesh_get_editmesh(me); - int selcount = similar_edge_select__internal(ts, em, RNA_int_get(op->ptr, "type"), RNA_float_get(op->ptr, "threshold")); + int selcount = similar_edge_select__internal(em, RNA_int_get(op->ptr, "type"), RNA_float_get(op->ptr, "threshold")); if (selcount) { /* here was an edge-mode only select flush case, has to be generalized */ @@ -1101,7 +1099,6 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op) static int similar_vert_select_exec(bContext *C, wmOperator *op) { - ToolSettings *ts= CTX_data_tool_settings(C); Object *obedit= CTX_data_edit_object(C); Mesh *me= obedit->data; EditMesh *em= BKE_mesh_get_editmesh(me); From ff6e631c86aa934da09db03e9505d5b060007fac Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Wed, 15 Dec 2010 03:53:56 +0000 Subject: [PATCH 162/236] Fixed bug #23042, Sculpting + Multires + Noise texture tears mesh Noise texture moved the edges of multires grids different, causing tears in the mesh. Fixed with a call to re-stitch grids (but only done if the brush texture is set to noise) --- source/blender/editors/sculpt_paint/sculpt.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index dc805a9ef0e..f29d32131d6 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -2584,6 +2584,18 @@ static void do_radial_symmetry(Sculpt *sd, SculptSession *ss, Brush *brush, cons } } +/* noise texture gives different values for the same input coord; this + can tear a multires mesh during sculpting so do a stitch in this + case */ +static void sculpt_fix_noise_tear(Sculpt *sd, SculptSession *ss) +{ + Brush *brush = paint_brush(&sd->paint); + MTex *mtex = &brush->mtex; + + if(ss->multires && mtex->tex && mtex->tex->type == TEX_NOISE) + multires_stitch_grids(ss->ob); +} + static void do_symmetrical_brush_actions(Sculpt *sd, SculptSession *ss) { Brush *brush = paint_brush(&sd->paint); @@ -2614,6 +2626,9 @@ static void do_symmetrical_brush_actions(Sculpt *sd, SculptSession *ss) sculpt_combine_proxies(sd, ss); + /* hack to fix noise texture tearing mesh */ + sculpt_fix_noise_tear(sd, ss); + cache->first_time= 0; } From acd7b81c2d3fa7828d28c1562fad10663d911783 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 15 Dec 2010 04:06:19 +0000 Subject: [PATCH 163/236] bugfix [#25230] Quick extrude Ctrl-LMB : wrong behaviour of 'RotateSource' option. Problem is is with operator redo which click-extrude exposed. Check if redo operator can run, otherwise lock the UI and add a label that the operator doesn't support redo. This is clunky but IMHO better then failing silently and leaving the user confused. - Merged redo functions into ED_undo_operator_repeat(), code was duplicated in a few places. - added WM_operator_repeat_check to check if WM_operator_repeat() can run, avoids an undo call when redo work. Unrelated changes - GHOST_SystemWin32.cpp set to utf8 encoding. - cmake_consistency_check.py now checks source files are utf8. --- build_files/cmake/cmake_consistency_check.py | 13 +++++ intern/ghost/intern/GHOST_SystemWin32.cpp | 2 +- source/blender/editors/include/ED_util.h | 6 ++- .../editors/space_view3d/view3d_buttons.c | 22 +------- .../editors/space_view3d/view3d_toolbar.c | 41 +++------------ source/blender/editors/util/undo.c | 52 +++++++++++++++++++ source/blender/windowmanager/WM_api.h | 1 + .../windowmanager/intern/wm_event_system.c | 8 +++ .../windowmanager/intern/wm_operators.c | 22 ++++---- 9 files changed, 98 insertions(+), 69 deletions(-) diff --git a/build_files/cmake/cmake_consistency_check.py b/build_files/cmake/cmake_consistency_check.py index 302ea8561d1..7c47c1d8bfd 100644 --- a/build_files/cmake/cmake_consistency_check.py +++ b/build_files/cmake/cmake_consistency_check.py @@ -192,3 +192,16 @@ for hf in sorted(source_list(base, is_c_header)): if not is_ignore(hf): if hf not in global_h: print("missing_h: ", hf) + +# test encoding +import traceback +for files in (global_c, global_h): + for f in sorted(files): + i = 1 + try: + for l in open(f, "r", encoding="utf8"): + i += 1 + except: + print("Non utf8: %s:%d" % (f, i)) + if i > 1: + traceback.print_exc() diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index 09b53544e31..371a8bf865b 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -855,7 +855,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, * specifies a character code generated by a dead key. A dead key is a key that * generates a character, such as the umlaut (double-dot), that is combined with * another character to form a composite character. For example, the umlaut-O - * character (Ù) is generated by typing the dead key for the umlaut character, and + * character (Ù) is generated by typing the dead key for the umlaut character, and * then typing the O key. */ case WM_SYSDEADCHAR: diff --git a/source/blender/editors/include/ED_util.h b/source/blender/editors/include/ED_util.h index 8d654e4eaa5..2936d63511c 100644 --- a/source/blender/editors/include/ED_util.h +++ b/source/blender/editors/include/ED_util.h @@ -51,6 +51,11 @@ void ED_undo_redo (struct bContext *C); void ED_OT_undo (struct wmOperatorType *ot); void ED_OT_redo (struct wmOperatorType *ot); +int ED_undo_operator_repeat(struct bContext *C, struct wmOperator *op); + /* convenience since UI callbacks use this mostly*/ +void ED_undo_operator_repeat_cb(struct bContext *C, void *arg_op, void *arg_unused); +void ED_undo_operator_repeat_cb_evt(struct bContext *C, void *arg_op, int arg_unused); + /* undo_editmode.c */ void undo_editmode_push(struct bContext *C, const char *name, void * (*getdata)(struct bContext *C), @@ -66,7 +71,6 @@ void undo_editmode_menu (struct bContext *C); void undo_editmode_clear (void); void undo_editmode_step (struct bContext *C, int step); - /* ************** XXX OLD CRUFT WARNING ************* */ void apply_keyb_grid(int shift, int ctrl, float *val, float fac1, float fac2, float fac3, int invert); diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index 1c400ee1ff8..0352996484a 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -1392,26 +1392,6 @@ static void view3d_panel_bonesketch_spaces(const bContext *C, Panel *pa) uiBlockEndAlign(block); } -/* op->invoke */ -static void redo_cb(bContext *C, void *arg_op, void *arg2) -{ - wmOperator *lastop= arg_op; - - if(lastop) { - int retval; - - if (G.f & G_DEBUG) - printf("operator redo %s\n", lastop->type->name); - ED_undo_pop(C); - retval= WM_operator_repeat(C, lastop); - if((retval & OPERATOR_FINISHED)==0) { - if (G.f & G_DEBUG) - printf("operator redo failed %s\n", lastop->type->name); - ED_undo_redo(C); - } - } -} - static void view3d_panel_operator_redo(const bContext *C, Panel *pa) { wmWindowManager *wm= CTX_wm_manager(C); @@ -1429,7 +1409,7 @@ static void view3d_panel_operator_redo(const bContext *C, Panel *pa) if(op==NULL) return; - uiBlockSetFunc(block, redo_cb, op, NULL); + uiBlockSetFunc(block, ED_undo_operator_repeat_cb, op, NULL); if(!op->properties) { IDPropertyTemplate val = {0}; diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c index 1064611b84f..a20397aa720 100644 --- a/source/blender/editors/space_view3d/view3d_toolbar.c +++ b/source/blender/editors/space_view3d/view3d_toolbar.c @@ -63,38 +63,6 @@ /* ******************* view3d space & buttons ************** */ - -/* op->exec */ -/* XXX DUPLICATE CODE */ -static void redo_cb(bContext *C, void *arg_op, void *UNUSED(arg2)) -{ - wmOperator *lastop= arg_op; - - if(lastop) { - ARegion *ar= CTX_wm_region(C); - ARegion *ar1= BKE_area_find_region_type(CTX_wm_area(C), RGN_TYPE_WINDOW); - int retval; - - if(ar1) - CTX_wm_region_set(C, ar1); - - if (G.f & G_DEBUG) - printf("operator redo %s\n", lastop->type->name); - - ED_undo_pop_op(C, lastop); - retval= WM_operator_repeat(C, lastop); - - if((retval & OPERATOR_FINISHED)==0) { - if (G.f & G_DEBUG) - printf("operator redo failed %s\n", lastop->type->name); - ED_undo_redo(C); - } - - /* set region back */ - CTX_wm_region_set(C, ar); - } -} - static wmOperator *view3d_last_operator(const bContext *C) { wmWindowManager *wm= CTX_wm_manager(C); @@ -118,6 +86,13 @@ static void view3d_panel_operator_redo_buts(const bContext *C, Panel *pa, wmOper op->properties= IDP_New(IDP_GROUP, val, "wmOperatorProperties"); } + /* poll() on this operator may still fail, at the moment there is no nice feedback when this happens + * just fails silently */ + if(!WM_operator_repeat_check(C, op)) { + uiBlockSetButLock(uiLayoutGetBlock(pa->layout), TRUE, "Operator cannot redo"); + uiItemL(pa->layout, "* Redo Unsupported *", 0); // XXX, could give some nicer feedback or not show redo panel at all? + } + RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr); if(op->type->ui) { op->layout= pa->layout; @@ -161,7 +136,7 @@ static void view3d_panel_operator_redo(const bContext *C, Panel *pa) block= uiLayoutGetBlock(pa->layout); - uiBlockSetFunc(block, redo_cb, op, NULL); + uiBlockSetFunc(block, ED_undo_operator_repeat_cb, op, NULL); view3d_panel_operator_redo_operator(C, pa, op); } diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index f0e8184b991..0165cf5a03d 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -38,6 +38,8 @@ #include "BKE_blender.h" #include "BKE_context.h" +#include "BKE_global.h" +#include "BKE_screen.h" #include "BLI_blenlib.h" #include "BLI_editVert.h" @@ -261,3 +263,53 @@ void ED_OT_redo(wmOperatorType *ot) } +/* ui callbacks should call this rather then calling WM_operator_repeat() themselves */ +int ED_undo_operator_repeat(bContext *C, struct wmOperator *op) +{ + int ret= 0; + + if(op) { + ARegion *ar= CTX_wm_region(C); + ARegion *ar1= BKE_area_find_region_type(CTX_wm_area(C), RGN_TYPE_WINDOW); + + if(ar1) + CTX_wm_region_set(C, ar1); + + if(WM_operator_repeat_check(C, op) && WM_operator_poll(C, op->type)) { + int retval; + + if (G.f & G_DEBUG) + printf("redo_cb: operator redo %s\n", op->type->name); + ED_undo_pop_op(C, op); + retval= WM_operator_repeat(C, op); + if((retval & OPERATOR_FINISHED)==0) { + if (G.f & G_DEBUG) + printf("redo_cb: operator redo failed: %s, return %d\n", op->type->name, retval); + ED_undo_redo(C); + } + else { + ret= 1; + } + } + + /* set region back */ + CTX_wm_region_set(C, ar); + } + else { + if (G.f & G_DEBUG) { + printf("redo_cb: WM_operator_repeat_check returned false %s\n", op->type->name); + } + } + + return ret; +} + +void ED_undo_operator_repeat_cb(bContext *C, void *arg_op, void *UNUSED(arg_unused)) +{ + ED_undo_operator_repeat(C, (wmOperator *)arg_op); +} + +void ED_undo_operator_repeat_cb_evt(bContext *C, void *arg_op, int UNUSED(arg_event)) +{ + ED_undo_operator_repeat(C, (wmOperator *)arg_op); +} diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 3a47e29f553..9c3e19ef4b7 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -221,6 +221,7 @@ int WM_operator_poll (struct bContext *C, struct wmOperatorType *ot); int WM_operator_poll_context(struct bContext *C, struct wmOperatorType *ot, int context); int WM_operator_call (struct bContext *C, struct wmOperator *op); int WM_operator_repeat (struct bContext *C, struct wmOperator *op); +int WM_operator_repeat_check(const struct bContext *C, struct wmOperator *op); int WM_operator_name_call (struct bContext *C, const char *opstring, int context, struct PointerRNA *properties); int WM_operator_call_py(struct bContext *C, struct wmOperatorType *ot, int context, struct PointerRNA *properties, struct ReportList *reports); diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 579bac52306..08b50ef9d3f 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -514,6 +514,14 @@ int WM_operator_repeat(bContext *C, wmOperator *op) { return wm_operator_exec(C, op, 1); } +/* TRUE if WM_operator_repeat can run + * simple check for now but may become more involved. + * To be sure the operator can run call WM_operator_poll(C, op->type) also, since this call + * checks if WM_operator_repeat() can run at all, not that it WILL run at any time. */ +int WM_operator_repeat_check(const bContext *UNUSED(C), wmOperator *op) +{ + return op->type->exec != NULL; +} static wmOperator *wm_operator_create(wmWindowManager *wm, wmOperatorType *ot, PointerRNA *properties, ReportList *reports) { diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 9f18f23bdd6..d7c84392a12 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -869,17 +869,6 @@ int WM_operator_winactive(bContext *C) return 1; } -/* op->exec */ -static void redo_cb(bContext *C, void *arg_op, int UNUSED(event)) -{ - wmOperator *lastop= arg_op; - - if(lastop) { - ED_undo_pop_op(C, lastop); - WM_operator_repeat(C, lastop); - } -} - static uiBlock *wm_block_create_redo(bContext *C, ARegion *ar, void *arg_op) { wmWindowManager *wm= CTX_wm_manager(C); @@ -896,10 +885,10 @@ static uiBlock *wm_block_create_redo(bContext *C, ARegion *ar, void *arg_op) uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN|UI_BLOCK_RET_1|UI_BLOCK_MOVEMOUSE_QUIT); /* if register is not enabled, the operator gets freed on OPERATOR_FINISHED - * ui_apply_but_funcs_after calls redo_cb and crashes */ + * ui_apply_but_funcs_after calls ED_undo_operator_repeate_cb and crashes */ assert(op->type->flag & OPTYPE_REGISTER); - uiBlockSetHandleFunc(block, redo_cb, arg_op); + uiBlockSetHandleFunc(block, ED_undo_operator_repeat_cb_evt, arg_op); if(!op->properties) { IDPropertyTemplate val = {0}; @@ -910,6 +899,13 @@ static uiBlock *wm_block_create_redo(bContext *C, ARegion *ar, void *arg_op) layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, width, 20, style); uiItemL(layout, op->type->name, 0); + /* poll() on this operator may still fail, at the moment there is no nice feedback when this happens + * just fails silently */ + if(!WM_operator_repeat_check(C, op)) { + uiBlockSetButLock(uiLayoutGetBlock(layout), TRUE, "Operator cannot redo"); + uiItemL(layout, "* Redo Unsupported *", 0); // XXX, could give some nicer feedback or not show redo panel at all? + } + if(op->type->ui) { op->layout= layout; op->type->ui((bContext*)C, op); From eb8458b064c5a7553a3bd51c214c9669aaf550f9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 15 Dec 2010 05:42:23 +0000 Subject: [PATCH 164/236] Centralized operator UI drawing into a new function uiLayoutOperatorButs(), Operator drawing calls were duplicated in file selector panel, redo panels, redo & dialog popups. note, uiDefAutoButsRNA's column's argument was misleading, renamed to label_align. --- source/blender/editors/include/UI_interface.h | 7 ++- .../editors/interface/interface_layout.c | 42 +++++++++++++ .../editors/interface/interface_utils.c | 46 +++++++++----- .../blender/editors/space_file/file_panels.c | 38 ++++------- .../editors/space_view3d/view3d_buttons.c | 27 -------- .../editors/space_view3d/view3d_toolbar.c | 24 +------ .../windowmanager/intern/wm_operators.c | 63 +++---------------- 7 files changed, 98 insertions(+), 149 deletions(-) diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 19e2a86f644..bab5fef5721 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -496,7 +496,7 @@ uiBut *uiDefSearchBut(uiBlock *block, void *arg, int retval, int icon, int maxle void uiBlockPickerButtons(struct uiBlock *block, float *col, float *hsv, float *old, char *hexcol, char mode, short retval); uiBut *uiDefAutoButR(uiBlock *block, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, const char *name, int icon, int x1, int y1, int x2, int y2); -void uiDefAutoButsRNA(uiLayout *layout, struct PointerRNA *ptr, int columns); +int uiDefAutoButsRNA(uiLayout *layout, struct PointerRNA *ptr, int (*check_prop)(struct PropertyRNA *), const char label_align); /* Links * @@ -633,6 +633,10 @@ void UI_exit(void); #define UI_ITEM_R_NO_BG 128 #define UI_ITEM_R_IMMEDIATE 256 +/* uiLayoutOperatorButs flags */ +#define UI_LAYOUT_OP_SHOW_TITLE 1 +#define UI_LAYOUT_OP_SHOW_EMPTY 2 + uiLayout *uiBlockLayout(uiBlock *block, int dir, int type, int x, int y, int size, int em, struct uiStyle *style); void uiBlockSetCurLayout(uiBlock *block, uiLayout *layout); void uiBlockLayoutResolve(uiBlock *block, int *x, int *y); @@ -642,6 +646,7 @@ uiBlock *uiLayoutGetBlock(uiLayout *layout); void uiLayoutSetFunc(uiLayout *layout, uiMenuHandleFunc handlefunc, void *argv); void uiLayoutSetContextPointer(uiLayout *layout, const char *name, struct PointerRNA *ptr); const char *uiLayoutIntrospect(uiLayout *layout); // XXX - testing +void uiLayoutOperatorButs(const struct bContext *C, struct uiLayout *layout, struct wmOperator *op, int (*check_prop)(struct PropertyRNA *), const char label_align, const short flag); void uiLayoutSetOperatorContext(uiLayout *layout, int opcontext); void uiLayoutSetActive(uiLayout *layout, int active); diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 5d9ebebe89d..a419fcfe40b 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -2664,3 +2664,45 @@ const char *uiLayoutIntrospect(uiLayout *layout) return str; } + +/* this function does not initialize the layout, functions can be called on the layout before and after */ +void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,int (*check_prop)(struct PropertyRNA *), const char label_align, const short flag) +{ + if(!op->properties) { + IDPropertyTemplate val = {0}; + op->properties= IDP_New(IDP_GROUP, val, "wmOperatorProperties"); + } + + if(flag & UI_LAYOUT_OP_SHOW_TITLE) { + uiItemL(layout, op->type->name, 0); + } + + /* poll() on this operator may still fail, at the moment there is no nice feedback when this happens + * just fails silently */ + if(!WM_operator_repeat_check(C, op)) { + uiBlockSetButLock(uiLayoutGetBlock(layout), TRUE, "Operator cannot redo"); + uiItemL(layout, "* Redo Unsupported *", 0); // XXX, could give some nicer feedback or not show redo panel at all? + } + + if(op->type->ui) { + op->layout= layout; + op->type->ui((bContext*)C, op); + op->layout= NULL; + + /* UI_LAYOUT_OP_SHOW_EMPTY ignored */ + } + else { + wmWindowManager *wm= CTX_wm_manager(C); + PointerRNA ptr; + int empty; + + RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr); + + /* main draw call */ + empty= uiDefAutoButsRNA(layout, &ptr, check_prop, label_align) == 0; + + if(empty && (flag & UI_LAYOUT_OP_SHOW_EMPTY)) { + uiItemL(layout, "No Properties.", 0); + } + } +} diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c index 7d3f186d490..b6afe6f63d4 100644 --- a/source/blender/editors/interface/interface_utils.c +++ b/source/blender/editors/interface/interface_utils.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "DNA_object_types.h" @@ -131,35 +132,50 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind return but; } -void uiDefAutoButsRNA(uiLayout *layout, PointerRNA *ptr, int columns) +int uiDefAutoButsRNA(uiLayout *layout, PointerRNA *ptr, int (*check_prop)(PropertyRNA *), const char label_align) { uiLayout *split, *col; int flag; - char *name; + const char *name; + int tot= 0; + + assert(ELEM3(label_align, '\0', 'H', 'V')); RNA_STRUCT_BEGIN(ptr, prop) { flag= RNA_property_flag(prop); - if(flag & PROP_HIDDEN) + if(flag & PROP_HIDDEN || (check_prop && check_prop(prop)==FALSE)) continue; - name= (char*)RNA_property_ui_name(prop); + if(label_align != '\0') { + name= RNA_property_ui_name(prop); - if(columns == 1) { - col= uiLayoutColumn(layout, 1); - uiItemL(col, name, 0); + if(label_align=='V') { + col= uiLayoutColumn(layout, 1); + uiItemL(col, name, 0); + } + else if(label_align=='H') { + split = uiLayoutSplit(layout, 0.5f, 0); + + uiItemL(uiLayoutColumn(split, 0), name, 0); + col= uiLayoutColumn(split, 0); + } + else { + col= NULL; + } + + name= ""; /* name is shown above, empty name for button below */ } - else if(columns == 2) { - split = uiLayoutSplit(layout, 0.5f, 0); - - uiItemL(uiLayoutColumn(split, 0), name, 0); - col= uiLayoutColumn(split, 0); + else { + col= layout; + name= NULL; /* no smart label alignment, show default name with button */ } - else - col= NULL; - uiItemFullR(col, ptr, prop, -1, 0, 0, "", 0); + uiItemFullR(col, ptr, prop, -1, 0, 0, name, 0); + tot++; } RNA_STRUCT_END; + + return tot; } /***************************** ID Utilities *******************************/ diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c index 109c5f0fdf6..4ce49251fdc 100644 --- a/source/blender/editors/space_file/file_panels.c +++ b/source/blender/editors/space_file/file_panels.c @@ -171,41 +171,25 @@ static void file_panel_operator_header(const bContext *C, Panel *pa) BLI_strncpy(pa->drawname, op->type->name, sizeof(pa->drawname)); } +static int file_panel_check_prop(PropertyRNA *prop) +{ + const char *prop_id= RNA_property_identifier(prop); + return !( strcmp(prop_id, "filepath") == 0 || + strcmp(prop_id, "directory") == 0 || + strcmp(prop_id, "filename") == 0 + ); +} + static void file_panel_operator(const bContext *C, Panel *pa) { SpaceFile *sfile= CTX_wm_space_file(C); wmOperator *op= sfile->op; - int empty= 1, flag; + // int empty= 1, flag; uiBlockSetFunc(uiLayoutGetBlock(pa->layout), file_draw_check_cb, NULL, NULL); - - if(op->type->ui) { - op->layout= pa->layout; - op->type->ui((bContext*)C, op); - op->layout= NULL; - } - else { - RNA_STRUCT_BEGIN(op->ptr, prop) { - flag= RNA_property_flag(prop); - if(flag & PROP_HIDDEN) - continue; - if(strcmp(RNA_property_identifier(prop), "filepath") == 0) - continue; - if(strcmp(RNA_property_identifier(prop), "directory") == 0) - continue; - if(strcmp(RNA_property_identifier(prop), "filename") == 0) - continue; + uiLayoutOperatorButs(C, pa->layout, op, file_panel_check_prop, '\0', UI_LAYOUT_OP_SHOW_EMPTY); - uiItemFullR(pa->layout, op->ptr, prop, -1, 0, 0, NULL, 0); - empty= 0; - } - RNA_STRUCT_END; - - if(empty) - uiItemL(pa->layout, "No properties.", 0); - } - uiBlockSetFunc(uiLayoutGetBlock(pa->layout), NULL, NULL, NULL); } diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index 0352996484a..d2775d7f03d 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -1392,33 +1392,6 @@ static void view3d_panel_bonesketch_spaces(const bContext *C, Panel *pa) uiBlockEndAlign(block); } -static void view3d_panel_operator_redo(const bContext *C, Panel *pa) -{ - wmWindowManager *wm= CTX_wm_manager(C); - wmOperator *op; - PointerRNA ptr; - uiBlock *block; - - block= uiLayoutGetBlock(pa->layout); - - /* only for operators that are registered and did an undo push */ - for(op= wm->operators.last; op; op= op->prev) - if((op->type->flag & OPTYPE_REGISTER) && (op->type->flag & OPTYPE_UNDO)) - break; - - if(op==NULL) - return; - - uiBlockSetFunc(block, ED_undo_operator_repeat_cb, op, NULL); - - if(!op->properties) { - IDPropertyTemplate val = {0}; - op->properties= IDP_New(IDP_GROUP, val, "wmOperatorProperties"); - } - - RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr); - uiDefAutoButsRNA(pa->layout, &ptr, 2); -} #endif // XXX not used void view3d_buttons_register(ARegionType *art) diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c index a20397aa720..56ca1ce8280 100644 --- a/source/blender/editors/space_view3d/view3d_toolbar.c +++ b/source/blender/editors/space_view3d/view3d_toolbar.c @@ -78,29 +78,7 @@ static wmOperator *view3d_last_operator(const bContext *C) static void view3d_panel_operator_redo_buts(const bContext *C, Panel *pa, wmOperator *op) { - wmWindowManager *wm= CTX_wm_manager(C); - PointerRNA ptr; - - if(!op->properties) { - IDPropertyTemplate val = {0}; - op->properties= IDP_New(IDP_GROUP, val, "wmOperatorProperties"); - } - - /* poll() on this operator may still fail, at the moment there is no nice feedback when this happens - * just fails silently */ - if(!WM_operator_repeat_check(C, op)) { - uiBlockSetButLock(uiLayoutGetBlock(pa->layout), TRUE, "Operator cannot redo"); - uiItemL(pa->layout, "* Redo Unsupported *", 0); // XXX, could give some nicer feedback or not show redo panel at all? - } - - RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr); - if(op->type->ui) { - op->layout= pa->layout; - op->type->ui((bContext*)C, op); - op->layout= NULL; - } - else - uiDefAutoButsRNA(pa->layout, &ptr, 1); + uiLayoutOperatorButs(C, pa->layout, op, NULL, 'V', 0); } static void view3d_panel_operator_redo_header(const bContext *C, Panel *pa) diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index d7c84392a12..2b82a772518 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -871,13 +871,11 @@ int WM_operator_winactive(bContext *C) static uiBlock *wm_block_create_redo(bContext *C, ARegion *ar, void *arg_op) { - wmWindowManager *wm= CTX_wm_manager(C); wmOperator *op= arg_op; - PointerRNA ptr; uiBlock *block; uiLayout *layout; uiStyle *style= U.uistyles.first; - int columns= 2, width= 300; + int width= 300; block= uiBeginBlock(C, ar, "redo_popup", UI_EMBOSS); @@ -889,30 +887,9 @@ static uiBlock *wm_block_create_redo(bContext *C, ARegion *ar, void *arg_op) assert(op->type->flag & OPTYPE_REGISTER); uiBlockSetHandleFunc(block, ED_undo_operator_repeat_cb_evt, arg_op); - - if(!op->properties) { - IDPropertyTemplate val = {0}; - op->properties= IDP_New(IDP_GROUP, val, "wmOperatorProperties"); - } - - RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr); layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, width, 20, style); - uiItemL(layout, op->type->name, 0); - /* poll() on this operator may still fail, at the moment there is no nice feedback when this happens - * just fails silently */ - if(!WM_operator_repeat_check(C, op)) { - uiBlockSetButLock(uiLayoutGetBlock(layout), TRUE, "Operator cannot redo"); - uiItemL(layout, "* Redo Unsupported *", 0); // XXX, could give some nicer feedback or not show redo panel at all? - } - - if(op->type->ui) { - op->layout= layout; - op->type->ui((bContext*)C, op); - op->layout= NULL; - } - else - uiDefAutoButsRNA(layout, &ptr, columns); + uiLayoutOperatorButs(C, layout, op, NULL, 'H', UI_LAYOUT_OP_SHOW_TITLE); uiPopupBoundsBlock(block, 4.0f, 0, 0); uiEndBlock(C, block); @@ -945,38 +922,23 @@ void dialog_check_cb(bContext *C, void *op_ptr, void *UNUSED(arg)) static uiBlock *wm_block_create_dialog(bContext *C, ARegion *ar, void *userData) { struct { wmOperator *op; int width; int height; } * data = userData; - wmWindowManager *wm= CTX_wm_manager(C); wmOperator *op= data->op; - PointerRNA ptr; uiBlock *block; uiLayout *layout; uiBut *btn; uiStyle *style= U.uistyles.first; - int columns= 2; block = uiBeginBlock(C, ar, "operator dialog", UI_EMBOSS); uiBlockClearFlag(block, UI_BLOCK_LOOP); uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN|UI_BLOCK_RET_1|UI_BLOCK_MOVEMOUSE_QUIT); - if (!op->properties) { - IDPropertyTemplate val = {0}; - op->properties= IDP_New(IDP_GROUP, val, "wmOperatorProperties"); - } - - RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr); layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, data->width, data->height, style); - uiItemL(layout, op->type->name, 0); uiBlockSetFunc(block, dialog_check_cb, op, NULL); - if (op->type->ui) { - op->layout= layout; - op->type->ui((bContext*)C, op); - op->layout= NULL; - } - else - uiDefAutoButsRNA(layout, &ptr, columns); + uiLayoutOperatorButs(C, layout, op, NULL, 'H', UI_LAYOUT_OP_SHOW_TITLE); + /* clear so the OK button is left alone */ uiBlockSetFunc(block, NULL, NULL, NULL); /* Create OK button, the callback of which will execute op */ @@ -993,9 +955,7 @@ static uiBlock *wm_block_create_dialog(bContext *C, ARegion *ar, void *userData) static uiBlock *wm_operator_create_ui(bContext *C, ARegion *ar, void *userData) { struct { wmOperator *op; int width; int height; } * data = userData; - wmWindowManager *wm= CTX_wm_manager(C); wmOperator *op= data->op; - PointerRNA ptr; uiBlock *block; uiLayout *layout; uiStyle *style= U.uistyles.first; @@ -1004,19 +964,10 @@ static uiBlock *wm_operator_create_ui(bContext *C, ARegion *ar, void *userData) uiBlockClearFlag(block, UI_BLOCK_LOOP); uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN|UI_BLOCK_RET_1|UI_BLOCK_MOVEMOUSE_QUIT); - if(!op->properties) { - IDPropertyTemplate val = {0}; - op->properties= IDP_New(IDP_GROUP, val, "wmOperatorProperties"); - } - - RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr); layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, data->width, data->height, style); - if(op->type->ui) { - op->layout= layout; - op->type->ui((bContext*)C, op); - op->layout= NULL; - } + /* since ui is defined the auto-layout args are not used */ + uiLayoutOperatorButs(C, layout, op, NULL, 'V', 0); uiPopupBoundsBlock(block, 4.0f, 0, 0); uiEndBlock(C, block); @@ -1103,7 +1054,7 @@ static uiBlock *wm_block_create_menu(bContext *C, ARegion *ar, void *arg_op) op->layout= NULL; } else - uiDefAutoButsRNA(layout, op->ptr, 2); + uiDefAutoButsRNA(layout, op->ptr, NULL, 'H'); uiPopupBoundsBlock(block, 4.0f, 0, 0); uiEndBlock(C, block); From 97aa2287fae49c610fc076a76b26b60e18636880 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 15 Dec 2010 06:03:45 +0000 Subject: [PATCH 165/236] access bpy.app.debug_value, G.rt internally --- source/blender/python/intern/bpy_app.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/source/blender/python/intern/bpy_app.c b/source/blender/python/intern/bpy_app.c index bbcfef4cd30..0db8ea0f317 100644 --- a/source/blender/python/intern/bpy_app.c +++ b/source/blender/python/intern/bpy_app.c @@ -153,6 +153,25 @@ static int bpy_app_debug_set(PyObject *UNUSED(self), PyObject *value, void *UNUS return 0; } +static PyObject *bpy_app_debug_value_get(PyObject *UNUSED(self), void *UNUSED(closure)) +{ + return PyLong_FromSsize_t(G.rt); +} + +static int bpy_app_debug_value_set(PyObject *UNUSED(self), PyObject *value, void *UNUSED(closure)) +{ + int param= PyLong_AsSsize_t(value); + + if (param == -1 && PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, "bpy.app.debug_value can only be set to a whole number"); + return -1; + } + + G.rt= param; + + return 0; +} + static PyObject *bpy_app_tempdir_get(PyObject *UNUSED(self), void *UNUSED(closure)) { extern char btempdir[]; @@ -174,6 +193,7 @@ static PyObject *bpy_app_driver_dict_get(PyObject *UNUSED(self), void *UNUSED(cl PyGetSetDef bpy_app_getsets[]= { {(char *)"debug", bpy_app_debug_get, bpy_app_debug_set, (char *)"Boolean, set when blender is running in debug mode (started with -d)", NULL}, + {(char *)"debug_value", bpy_app_debug_value_get, bpy_app_debug_value_set, (char *)"Int, number which can be set to non-zero values for testing purposes.", NULL}, {(char *)"tempdir", bpy_app_tempdir_get, NULL, (char *)"String, the temp directory used by blender (read-only)", NULL}, {(char *)"driver_namespace", bpy_app_driver_dict_get, NULL, (char *)"Dictionary for drivers namespace, editable in-place, reset on file load (read-only)", NULL}, {NULL, NULL, NULL, NULL, NULL} From 46ce8cdf58bdbab4074558fcbd550a3bcf55dde3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 15 Dec 2010 06:12:16 +0000 Subject: [PATCH 166/236] replace debug popup function with call to generic function WM_operator_props_dialog_popup(). --- .../windowmanager/intern/wm_operators.c | 43 +++---------------- 1 file changed, 5 insertions(+), 38 deletions(-) diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 2b82a772518..cfd8a9256be 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -1034,52 +1034,19 @@ int WM_operator_redo_popup(bContext *C, wmOperator *op) /* ***************** Debug menu ************************* */ -static uiBlock *wm_block_create_menu(bContext *C, ARegion *ar, void *arg_op) -{ - wmOperator *op= arg_op; - uiBlock *block; - uiLayout *layout; - uiStyle *style= U.uistyles.first; - - block= uiBeginBlock(C, ar, "_popup", UI_EMBOSS); - uiBlockClearFlag(block, UI_BLOCK_LOOP); - uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN|UI_BLOCK_RET_1|UI_BLOCK_MOVEMOUSE_QUIT); - - layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, 300, 20, style); - uiItemL(layout, op->type->name, 0); - - if(op->type->ui) { - op->layout= layout; - op->type->ui(C, op); - op->layout= NULL; - } - else - uiDefAutoButsRNA(layout, op->ptr, NULL, 'H'); - - uiPopupBoundsBlock(block, 4.0f, 0, 0); - uiEndBlock(C, block); - - return block; -} - static int wm_debug_menu_exec(bContext *C, wmOperator *op) { - G.rt= RNA_int_get(op->ptr, "debugval"); + G.rt= RNA_int_get(op->ptr, "debug_value"); ED_screen_refresh(CTX_wm_manager(C), CTX_wm_window(C)); WM_event_add_notifier(C, NC_WINDOW, NULL); - + return OPERATOR_FINISHED; } static int wm_debug_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - - RNA_int_set(op->ptr, "debugval", G.rt); - - /* pass on operator, so return modal */ - uiPupBlockOperator(C, wm_block_create_menu, op, WM_OP_EXEC_DEFAULT); - - return OPERATOR_RUNNING_MODAL; + RNA_int_set(op->ptr, "debug_value", G.rt); + return WM_operator_props_dialog_popup(C, op, 180, 20); } static void WM_OT_debug_menu(wmOperatorType *ot) @@ -1092,7 +1059,7 @@ static void WM_OT_debug_menu(wmOperatorType *ot) ot->exec= wm_debug_menu_exec; ot->poll= WM_operator_winactive; - RNA_def_int(ot->srna, "debugval", 0, -10000, 10000, "Debug Value", "", INT_MIN, INT_MAX); + RNA_def_int(ot->srna, "debug_value", 0, -10000, 10000, "Debug Value", "", INT_MIN, INT_MAX); } From dbd3081895b6b03c8b321803e0fe2900b7577beb Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 15 Dec 2010 07:15:51 +0000 Subject: [PATCH 167/236] fix for annoyance found when looking into bug [#25226]. Changing the edge crease median value often wouldn't result in the median value entered because of clamping from 0-1. Now the median crease is applied by scaling the values up/down. also add some simple checks to speed up updates, - don't move verts or recalculate normals if only crease changes. - don't apply crease changes if location is being edited. --- .../editors/space_view3d/view3d_buttons.c | 72 ++++++++++++++----- 1 file changed, 54 insertions(+), 18 deletions(-) diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index d2775d7f03d..9450a3f223a 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -381,30 +381,66 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float if(ob->type==OB_MESH) { Mesh *me= ob->data; EditMesh *em = BKE_mesh_get_editmesh(me); - EditVert *eve; - EditEdge *eed; - - eve= em->verts.first; - while(eve) { - if(eve->f & SELECT) { - add_v3_v3(eve->co, median); + + /* allow for some rounding error becasue of matrix transform */ + if(len_v3(median) > 0.000001) { + EditVert *eve; + + for(eve= em->verts.first; eve; eve= eve->next) { + if(eve->f & SELECT) { + add_v3_v3(eve->co, median); + } } - eve= eve->next; + + recalc_editnormals(em); } - - for(eed= em->edges.first; eed; eed= eed->next) { - if(eed->f & SELECT) { - /* ensure the median can be set to zero or one */ - if(ve_median[3]==0.0f) eed->crease= 0.0f; - else if(ve_median[3]==1.0f) eed->crease= 1.0f; + + if(median[3] != 0.0f) { + EditEdge *eed; + const float fixed_crease= (ve_median[3] <= 0.0f ? 0.0 : (ve_median[3] >= 1.0f ? 1.0 : FLT_MAX)); + + if(fixed_crease != FLT_MAX) { + /* simple case */ + + for(eed= em->edges.first; eed; eed= eed->next) { + if(eed->f & SELECT) { + eed->crease= fixed_crease; + } + } + } + else { + /* scale crease to target median */ + float median_new= ve_median[3]; + float median_orig= ve_median[3] - median[3]; /* previous median value */ + + /* incase of floating point error */ + CLAMP(median_orig, 0.0, 1.0); + CLAMP(median_new, 0.0, 1.0); + + if(median_new < median_orig) { + /* scale down */ + const float sca= median_new / median_orig; + + for(eed= em->edges.first; eed; eed= eed->next) { + if(eed->f & SELECT) { + eed->crease *= sca; + CLAMP(eed->crease, 0.0, 1.0); + } + } + } else { - eed->crease+= median[3]; - CLAMP(eed->crease, 0.0, 1.0); + /* scale up */ + const float sca= (1.0f - median_new) / (1.0f - median_orig); + + for(eed= em->edges.first; eed; eed= eed->next) { + if(eed->f & SELECT) { + eed->crease = 1.0f - ((1.0f - eed->crease) * sca); + CLAMP(eed->crease, 0.0, 1.0); + } + } } } } - - recalc_editnormals(em); BKE_mesh_end_editmesh(me, em); } From eac46088e5a63991d2894197bbe14971864541ed Mon Sep 17 00:00:00 2001 From: Daniel Salazar Date: Wed, 15 Dec 2010 08:21:58 +0000 Subject: [PATCH 168/236] Randomize Transform operator: Added support for working on delta transformations instead of plain transform. this should help the fact that you cant randomize animated objects (still need to check into that) Removed minimun scale since it was not well done, need a stronger version of this --- .../scripts/op/object_randomize_transform.py | 54 +++++++++++-------- 1 file changed, 32 insertions(+), 22 deletions(-) diff --git a/release/scripts/op/object_randomize_transform.py b/release/scripts/op/object_randomize_transform.py index f60f25242c7..7d962892c6a 100644 --- a/release/scripts/op/object_randomize_transform.py +++ b/release/scripts/op/object_randomize_transform.py @@ -21,7 +21,7 @@ import bpy -def randomize_selected(seed, loc, rot, scale, scale_even, scale_min): +def randomize_selected(seed, delta, loc, rot, scale, scale_even): import random from random import uniform @@ -35,20 +35,31 @@ def randomize_selected(seed, loc, rot, scale, scale_even, scale_min): for obj in bpy.context.selected_objects: if loc: - obj.location += rand_vec(loc) + if delta: + obj.delta_location += rand_vec(loc) + else: + obj.location += rand_vec(loc) else: # otherwise the values change under us uniform(0.0, 0.0), uniform(0.0, 0.0), uniform(0.0, 0.0) if rot: # TODO, non euler's vec = rand_vec(rot) - obj.rotation_euler[0] += vec[0] - obj.rotation_euler[1] += vec[1] - obj.rotation_euler[2] += vec[2] + if delta: + obj.delta_rotation_euler[0] += vec[0] + obj.delta_rotation_euler[1] += vec[1] + obj.delta_rotation_euler[2] += vec[2] + else: + obj.rotation_euler[0] += vec[0] + obj.rotation_euler[1] += vec[1] + obj.rotation_euler[2] += vec[2] else: uniform(0.0, 0.0), uniform(0.0, 0.0), uniform(0.0, 0.0) if scale: - org_sca_x, org_sca_y, org_sca_z = obj.scale + if delta: + org_sca_x, org_sca_y, org_sca_z = obj.delta_scale + else: + org_sca_x, org_sca_y, org_sca_z = obj.scale if scale_even: sca_x = sca_y = sca_z = uniform(scale[0], - scale[0]) @@ -57,22 +68,15 @@ def randomize_selected(seed, loc, rot, scale, scale_even, scale_min): sca_x, sca_y, sca_z = rand_vec(scale) aX = sca_x + org_sca_x - bX = org_sca_x * scale_min aY = sca_y + org_sca_y - bY = org_sca_y * scale_min aZ = sca_z + org_sca_z - bZ = org_sca_z * scale_min - if aX < bX: - aX = bX - if aY < bY: - aY = bY - if aZ < bZ: - aZ = bZ - - obj.scale = aX, aY, aZ + if delta: + obj.delta_scale = aX, aY, aZ + else: + obj.scale = aX, aY, aZ else: uniform(0.0, 0.0), uniform(0.0, 0.0), uniform(0.0, 0.0) @@ -89,8 +93,11 @@ class RandomizeLocRotSize(bpy.types.Operator): description="Seed value for the random generator", default=0, min=0, max=1000) + use_delta = BoolProperty(name="Transform Delta", + description="Randomize delta transform values instead of regular transform", default=False) + use_loc = BoolProperty(name="Randomize Location", - description="Randomize the scale values", default=True) + description="Randomize the location values", default=True) loc = FloatVectorProperty(name="Location", description="Maximun distance the objects can spread over each axis", @@ -109,9 +116,9 @@ class RandomizeLocRotSize(bpy.types.Operator): scale_even = BoolProperty(name="Scale Even", description="Use the same scale value for all axis", default=False) - scale_min = FloatProperty(name="Minimun Scale Factor", + '''scale_min = FloatProperty(name="Minimun Scale Factor", description="Lowest scale percentage possible", - default=0.15, min=-1.0, max=1.0, precision=3) + default=0.15, min=-1.0, max=1.0, precision=3)''' scale = FloatVectorProperty(name="Scale", description="Maximum scale randomization over each axis", @@ -119,16 +126,19 @@ class RandomizeLocRotSize(bpy.types.Operator): def execute(self, context): from math import radians + seed = self.random_seed + delta = self.use_delta + loc = None if not self.use_loc else self.loc rot = None if not self.use_rot else self.rot * radians(1.0) scale = None if not self.use_scale else self.scale scale_even = self.scale_even - scale_min = self.scale_min + #scale_min = self.scale_min - randomize_selected(seed, loc, rot, scale, scale_even, scale_min) + randomize_selected(seed, delta, loc, rot, scale, scale_even) return {'FINISHED'} From 35fa581403dc056528968234f608c4a7d68da26a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 15 Dec 2010 10:22:26 +0000 Subject: [PATCH 169/236] BKE_assert(), only prints the error unless cmake define WITH_ASSERT_ABORT is enabled and it will call abort(). made this option advanced so people don't enable along with other features. --- CMakeLists.txt | 7 +++++ source/blender/blenkernel/BKE_utildefines.h | 35 +++++++++++++++++++++ source/blender/python/intern/bpy_rna.c | 11 +++++-- 3 files changed, 51 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3ccfb12b7ff..03a61a1a316 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -128,6 +128,9 @@ option(WITH_PYTHON_INSTALL "Copy system python into the blender install fo option(WITH_CXX_GUARDEDALLOC "Enable GuardedAlloc for C++ memory allocation tracking" OFF) mark_as_advanced(WITH_CXX_GUARDEDALLOC) +option(WITH_ASSERT_ABORT "Call abort() when raising an assertion through BKE_assert()" OFF) +mark_as_advanced(WITH_ASSERT_ABORT) + if(APPLE) option(WITH_COCOA "Use Cocoa framework instead of deprecated Carbon" ON) option(USE_QTKIT "Use QtKit instead of Carbon quicktime (needed for having partial quicktime for 64bit)" OFF) @@ -1011,6 +1014,10 @@ if(WITH_CXX_GUARDEDALLOC) set(CMAKE_CXX_FLAGS " -DWITH_CXX_GUARDEDALLOC -I${CMAKE_SOURCE_DIR}/intern/guardedalloc ${CMAKE_CXX_FLAGS}") endif() +if(WITH_ASSERT_ABORT) + add_definitions(-DWITH_ASSERT_ABORT) +endif() + #----------------------------------------------------------------------------- # Libraries diff --git a/source/blender/blenkernel/BKE_utildefines.h b/source/blender/blenkernel/BKE_utildefines.h index a1968459fd6..605a50e078b 100644 --- a/source/blender/blenkernel/BKE_utildefines.h +++ b/source/blender/blenkernel/BKE_utildefines.h @@ -54,6 +54,41 @@ # define UNUSED(x) UNUSED_ ## x #endif + +/* BKE_assert(), default only to print + * for aborting need to define WITH_ASSERT_ABORT */ +#if !defined NDEBUG +# ifdef WITH_ASSERT_ABORT +# define _dummy_abort abort +# else +# define _dummy_abort() (void)0 +# endif +# ifdef __GNUC__ /* just want to check if __func__ is available */ +# define BKE_assert(a) \ +do { \ + if (0 == (a)) { \ + fprintf(stderr, \ + "BKE_assert failed: %s, %s(), %d at \'%s\'\n", \ + __FILE__, __func__, __LINE__, STRINGIFY(a)); \ + _dummy_abort(); \ + } \ +} while (0) +# else +# define BKE_assert(a) \ +do { \ + if (0 == (a)) { \ + fprintf(stderr, \ + "BKE_assert failed: %s, %d at \'%s\'\n", \ + __FILE__, __LINE__, STRINGIFY(a)); \ + _dummy_abort(); \ + } \ +} while (0) +# endif +#else +# define BKE_assert(a) (void)0 +#endif + + /* these values need to be hardcoded in structs, dna does not recognize defines */ /* also defined in DNA_space_types.h */ #ifndef FILE_MAXDIR diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index c1bd2d87d7f..2463041cda8 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -72,7 +72,7 @@ static int rna_id_write_error(PointerRNA *ptr, PyObject *key) else pyname= ""; /* make a nice string error */ - assert(idtype != NULL); + BKE_assert(idtype != NULL); PyErr_Format(PyExc_RuntimeError, "Writing to ID classes in this context is not allowed: %.200s, %.200s datablock, error setting %.200s.%.200s", id->name+2, idtype, RNA_struct_identifier(ptr->type), pyname); return TRUE; @@ -1544,7 +1544,8 @@ static PyObject *pyrna_prop_array_subscript_slice(BPy_PropertyArrayRNA *self, Po break; } default: - /* probably will never happen */ + BKE_assert(!"Invalid array type"); + PyErr_SetString(PyExc_TypeError, "not an array type"); Py_DECREF(list); list= NULL; @@ -2678,6 +2679,8 @@ static PyObject *pyrna_struct_getattro( BPy_StructRNA *self, PyObject *pyname ) break; default: /* should never happen */ + BKE_assert(!"Invalid context type"); + PyErr_Format(PyExc_AttributeError, "bpy_struct: Context type invalid %d, can't get \"%.200s\" from context", newtype, name); ret= NULL; } @@ -3306,6 +3309,7 @@ static PyObject *foreach_getset(BPy_PropertyRNA *self, PyObject *args, int set) break; case PROP_RAW_UNSET: /* should never happen */ + BKE_assert(!"Invalid array type - set"); break; } @@ -3360,6 +3364,7 @@ static PyObject *foreach_getset(BPy_PropertyRNA *self, PyObject *args, int set) break; case PROP_RAW_UNSET: /* should never happen */ + BKE_assert(!"Invalid array type - get"); break; } @@ -3717,6 +3722,8 @@ static PyObject * pyrna_func_call(PyObject *self, PyObject *args, PyObject *kw) void *retdata_single= NULL; /* Should never happen but it does in rare cases */ + BKE_assert(self_ptr != NULL); + if(self_ptr==NULL) { PyErr_SetString(PyExc_RuntimeError, "rna functions internal rna pointer is NULL, this is a bug. aborting"); return NULL; From dbbd12d76006a3032fd22ec90e3fefc95bf984ac Mon Sep 17 00:00:00 2001 From: Daniel Salazar Date: Wed, 15 Dec 2010 10:59:45 +0000 Subject: [PATCH 170/236] Randomize Transform op: Scale Even wasn't really working with objects with an asymmetric starting scale. Handling of starting scale values of 0 needs improvement, ie: default for delta transform --- release/scripts/op/object_randomize_transform.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/release/scripts/op/object_randomize_transform.py b/release/scripts/op/object_randomize_transform.py index 7d962892c6a..ff1af6794ee 100644 --- a/release/scripts/op/object_randomize_transform.py +++ b/release/scripts/op/object_randomize_transform.py @@ -67,11 +67,14 @@ def randomize_selected(seed, delta, loc, rot, scale, scale_even): else: sca_x, sca_y, sca_z = rand_vec(scale) - aX = sca_x + org_sca_x - - aY = sca_y + org_sca_y - - aZ = sca_z + org_sca_z + if scale_even: + aX = -(sca_x * org_sca_x) + org_sca_x + aY = -(sca_x * org_sca_y) + org_sca_y + aZ = -(sca_x * org_sca_z) + org_sca_z + else: + aX = sca_x + org_sca_x + aY = sca_y + org_sca_y + aZ = sca_z + org_sca_z if delta: obj.delta_scale = aX, aY, aZ @@ -80,8 +83,8 @@ def randomize_selected(seed, delta, loc, rot, scale, scale_even): else: uniform(0.0, 0.0), uniform(0.0, 0.0), uniform(0.0, 0.0) -from bpy.props import * +from bpy.props import * class RandomizeLocRotSize(bpy.types.Operator): '''Randomize objects loc/rot/scale''' From 0efdb860f195edc5899d4698f62d21dc0599ab83 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 15 Dec 2010 13:08:34 +0000 Subject: [PATCH 171/236] Bugfix #22982 Displace modifier: mapping "Global" didn't set a dependency entry. Fix provided by the reporter himself, thanks Jacob F! --- source/blender/modifiers/intern/MOD_displace.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/blender/modifiers/intern/MOD_displace.c b/source/blender/modifiers/intern/MOD_displace.c index ce41f6dfc1d..f6e5b9c119a 100644 --- a/source/blender/modifiers/intern/MOD_displace.c +++ b/source/blender/modifiers/intern/MOD_displace.c @@ -148,6 +148,12 @@ static void updateDepgraph(ModifierData *md, DagForest *forest, dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Displace Modifier"); } + + + if(dmd->texmapping == MOD_DISP_MAP_GLOBAL) + dag_add_relation(forest, obNode, obNode, + DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Displace Modifier"); + } static void get_texture_coords(DisplaceModifierData *dmd, Object *ob, From 95f205ed5c81b3afcb678dd48253d69e88a19f1c Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 15 Dec 2010 15:28:03 +0000 Subject: [PATCH 172/236] Bugfix 21333 "Continuous grab": the boundary is now set to Area (editor), making it work for operators started in other regions (like toolbar, or in quad view case) --- .../blender/windowmanager/intern/wm_event_system.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 08b50ef9d3f..77dfa015d68 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -683,12 +683,12 @@ int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, PointerR } if(wrap) { - ARegion *ar= CTX_wm_region(C); - if(ar) { - bounds[0]= ar->winrct.xmin; - bounds[1]= ar->winrct.ymax; - bounds[2]= ar->winrct.xmax; - bounds[3]= ar->winrct.ymin; + ScrArea *sa= CTX_wm_area(C); + if(sa) { + bounds[0]= sa->totrct.xmin; + bounds[1]= sa->totrct.ymax; + bounds[2]= sa->totrct.xmax; + bounds[3]= sa->totrct.ymin; } } From 9129750787aedc51f80108ee4f6c1a0dbcf5a45d Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 15 Dec 2010 15:56:06 +0000 Subject: [PATCH 173/236] Bugfix #25231 File Window: text clipping was tiny bit too narrow. It was also clipping text twice even ;) --- source/blender/editors/space_file/file_draw.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index c5b8969e189..ece227494c6 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -26,6 +26,7 @@ * ***** END GPL LICENSE BLOCK ***** */ +#include #include #include "BLI_blenlib.h" @@ -292,20 +293,18 @@ static void file_draw_icon(uiBlock *block, char *path, int sx, int sy, int icon, static void file_draw_string(int sx, int sy, const char* string, float width, int height, short align) { - char fname[FILE_MAXFILE]; - rcti rect; - float sw; uiStyle *style= U.uistyles.first; uiFontStyle fs = style->widgetlabel; + rcti rect; + char fname[FILE_MAXFILE]; fs.align = align; BLI_strncpy(fname,string, FILE_MAXFILE); - sw = file_shorten_string(fname, width+1, 0 ); - - + + /* no text clipping needed, uiStyleFontDraw does it but is a bit too strict (for buttons it works) */ rect.xmin = sx; - rect.xmax = sx + width; + rect.xmax = sx + ceil(width+4.0f); rect.ymin = sy - height; rect.ymax = sy; From 53adab987044654f36d4c26906b19ae559a93fc1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 15 Dec 2010 15:59:10 +0000 Subject: [PATCH 174/236] Minor annoyance with graph editor selection: Selecting graph keys would toggle channel selection if shift was held. this was annoying when selecting 2+ unselected keys to have the channel change color each click. Now set the channel based on the selection state of the point, as long as points are being selected the channel will stay selected too. --- .../editors/space_graph/graph_select.c | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index 4e42e199521..05fcb3c6bf8 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -955,6 +955,7 @@ static void mouse_graph_keys (bAnimContext *ac, int mval[], short select_mode, s { SpaceIpo *sipo= (SpaceIpo *)ac->sa->spacedata.first; tNearestVertInfo *nvi; + BezTriple *bezt= NULL; /* find the beztriple that we're selecting, and the handle that was clicked on */ nvi = find_nearest_fcurve_vert(ac, mval); @@ -984,8 +985,7 @@ static void mouse_graph_keys (bAnimContext *ac, int mval[], short select_mode, s if ((curves_only == 0) && ((nvi->fcu->flag & FCURVE_PROTECTED)==0)) { /* only if there's keyframe */ if (nvi->bezt) { - BezTriple *bezt= nvi->bezt; - + bezt= nvi->bezt; /* used to check bezt seletion is set */ /* depends on selection mode */ if (select_mode == SELECT_INVERT) { /* keyframe - invert select of all */ @@ -1041,11 +1041,23 @@ static void mouse_graph_keys (bAnimContext *ac, int mval[], short select_mode, s /* only change selection of channel when the visibility of keyframes doesn't depend on this */ if ((sipo->flag & SIPO_SELCUVERTSONLY) == 0) { /* select or deselect curve? */ - if (select_mode == SELECT_INVERT) - nvi->fcu->flag ^= FCURVE_SELECTED; - else if (select_mode == SELECT_ADD) - nvi->fcu->flag |= FCURVE_SELECTED; - + + /* when a single point is selected then dont toggle channel selection */ + if(bezt) { + if((bezt->f2|bezt->f1|bezt->f3) & SELECT) { + nvi->fcu->flag |= FCURVE_SELECTED; + } + else { + nvi->fcu->flag &= ~FCURVE_SELECTED; + } + } + else { + if (select_mode == SELECT_INVERT) + nvi->fcu->flag ^= FCURVE_SELECTED; + else if (select_mode == SELECT_ADD) + nvi->fcu->flag |= FCURVE_SELECTED; + } + /* set active F-Curve (NOTE: sync the filter flags with findnearest_fcurve_vert) */ if (nvi->fcu->flag & FCURVE_SELECTED) { int filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVEVISIBLE | ANIMFILTER_CURVESONLY | ANIMFILTER_NODUPLIS); From ee09aeb498ee51deb8f5255cf176344a0e64aafb Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 15 Dec 2010 16:07:49 +0000 Subject: [PATCH 175/236] dont transform hidden handles in the graph editor. --- .../editors/transform/transform_conversions.c | 63 +++++++++++-------- 1 file changed, 37 insertions(+), 26 deletions(-) diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 1aac6e72228..d545acfb93a 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -3351,7 +3351,7 @@ static void bezt_to_transdata (TransData *td, TransData2D *td2d, AnimData *adt, static void createTransGraphEditData(bContext *C, TransInfo *t) { - SpaceIpo *sipo= CTX_wm_space_graph(C); + SpaceIpo *sipo = (SpaceIpo *)t->sa->spacedata.first; Scene *scene= t->scene; ARegion *ar= t->ar; View2D *v2d= &ar->v2d; @@ -3368,6 +3368,7 @@ static void createTransGraphEditData(bContext *C, TransInfo *t) int count=0, i; float cfra; float mtx[3][3], smtx[3][3]; + const short use_handle = !(sipo->flag & SIPO_NOHANDLES); /* determine what type of data we are operating on */ if (ANIM_animdata_get_context(C, &ac) == 0) @@ -3411,13 +3412,17 @@ static void createTransGraphEditData(bContext *C, TransInfo *t) /* only include BezTriples whose 'keyframe' occurs on the same side of the current frame as mouse */ for (i=0, bezt=fcu->bezt; i < fcu->totvert; i++, bezt++) { if (FrameOnMouseSide(t->frame_side, bezt->vec[1][0], cfra)) { + const char sel1= use_handle ? bezt->f1 & SELECT : 0; + const char sel2= bezt->f2 & SELECT; + const char sel3= use_handle ? bezt->f3 & SELECT : 0; + if (ELEM3(t->mode, TFM_TRANSLATION, TFM_TIME_TRANSLATE, TFM_TIME_SLIDE)) { /* for 'normal' pivots - just include anything that is selected. this works a bit differently in translation modes */ - if (bezt->f2 & SELECT) count++; + if (sel2) count++; else { - if (bezt->f1 & SELECT) count++; - if (bezt->f3 & SELECT) count++; + if (sel1) count++; + if (sel3) count++; } } else if (sipo->around == V3D_LOCAL) { @@ -3425,17 +3430,17 @@ static void createTransGraphEditData(bContext *C, TransInfo *t) * don't get moved wrong */ if (bezt->ipo == BEZT_IPO_BEZ) { - if (bezt->f1 & SELECT) count++; - if (bezt->f3 & SELECT) count++; + if (sel1) count++; + if (sel3) count++; } - /* else if (bezt->f2 & SELECT) count++; // TODO: could this cause problems? */ + /* else if (sel2) count++; // TODO: could this cause problems? */ /* - yes this causes problems, because no td is created for the center point */ } else { /* for 'normal' pivots - just include anything that is selected */ - if (bezt->f1 & SELECT) count++; - if (bezt->f2 & SELECT) count++; - if (bezt->f3 & SELECT) count++; + if (sel1) count++; + if (sel2) count++; + if (sel3) count++; } } } @@ -3500,21 +3505,25 @@ static void createTransGraphEditData(bContext *C, TransInfo *t) /* only include BezTriples whose 'keyframe' occurs on the same side of the current frame as mouse (if applicable) */ for (i=0, bezt= fcu->bezt; i < fcu->totvert; i++, bezt++) { if (FrameOnMouseSide(t->frame_side, bezt->vec[1][0], cfra)) { + const char sel1= use_handle ? bezt->f1 & SELECT : 0; + const char sel2= bezt->f2 & SELECT; + const char sel3= use_handle ? bezt->f3 & SELECT : 0; + TransDataCurveHandleFlags *hdata = NULL; short h1=1, h2=1; /* only include handles if selected, irrespective of the interpolation modes. * also, only treat handles specially if the center point isn't selected. */ - if (!ELEM3(t->mode, TFM_TRANSLATION, TFM_TIME_TRANSLATE, TFM_TIME_SLIDE) || !(bezt->f2 & SELECT)) { - if (bezt->f1 & SELECT) { + if (!ELEM3(t->mode, TFM_TRANSLATION, TFM_TIME_TRANSLATE, TFM_TIME_SLIDE) || !(sel2)) { + if (sel1) { hdata = initTransDataCurveHandles(td, bezt); bezt_to_transdata(td++, td2d++, adt, bezt, 0, 1, 1, intvals, mtx, smtx); } else h1= 0; - if (bezt->f3 & SELECT) { + if (sel3) { if (hdata==NULL) hdata = initTransDataCurveHandles(td, bezt); bezt_to_transdata(td++, td2d++, adt, bezt, 2, 1, 1, intvals, mtx, smtx); @@ -3524,16 +3533,16 @@ static void createTransGraphEditData(bContext *C, TransInfo *t) } /* only include main vert if selected */ - if (bezt->f2 & SELECT && (sipo->around != V3D_LOCAL || ELEM3(t->mode, TFM_TRANSLATION, TFM_TIME_TRANSLATE, TFM_TIME_SLIDE))) { + if (sel2 && (sipo->around != V3D_LOCAL || ELEM3(t->mode, TFM_TRANSLATION, TFM_TIME_TRANSLATE, TFM_TIME_SLIDE))) { /* move handles relative to center */ if (ELEM3(t->mode, TFM_TRANSLATION, TFM_TIME_TRANSLATE, TFM_TIME_SLIDE)) { - if (bezt->f1 & SELECT) td->flag |= TD_MOVEHANDLE1; - if (bezt->f3 & SELECT) td->flag |= TD_MOVEHANDLE2; + if (sel1) td->flag |= TD_MOVEHANDLE1; + if (sel3) td->flag |= TD_MOVEHANDLE2; } /* if handles were not selected, store their selection status */ - if (!(bezt->f1 & SELECT) && !(bezt->f3 & SELECT)) { + if (!(sel1) && !(sel3)) { if (hdata == NULL) hdata = initTransDataCurveHandles(td, bezt); } @@ -3547,7 +3556,7 @@ static void createTransGraphEditData(bContext *C, TransInfo *t) * - If so, change them auto-handles to aligned handles so that handles get affected too */ if ((bezt->h1 == HD_AUTO) && (bezt->h2 == HD_AUTO) && ELEM(t->mode, TFM_ROTATION, TFM_RESIZE)) { - if (hdata && (bezt->f1 & SELECT) && (bezt->f3 & SELECT)) { + if (hdata && (sel1) && (sel3)) { bezt->h1= HD_ALIGN; bezt->h2= HD_ALIGN; } @@ -3579,7 +3588,7 @@ typedef struct BeztMap { /* This function converts an FCurve's BezTriple array to a BeztMap array * NOTE: this allocates memory that will need to get freed later */ -static BeztMap *bezt_to_beztmaps (BezTriple *bezts, int totvert) +static BeztMap *bezt_to_beztmaps (BezTriple *bezts, int totvert, const short UNUSED(use_handle)) { BezTriple *bezt= bezts; BezTriple *prevbezt= NULL; @@ -3606,7 +3615,7 @@ static BeztMap *bezt_to_beztmaps (BezTriple *bezts, int totvert) } /* This function copies the code of sort_time_ipocurve, but acts on BeztMap structs instead */ -static void sort_time_beztmaps (BeztMap *bezms, int totvert) +static void sort_time_beztmaps (BeztMap *bezms, int totvert, const short UNUSED(use_handle)) { BeztMap *bezm; int i, ok= 1; @@ -3652,7 +3661,7 @@ static void sort_time_beztmaps (BeztMap *bezms, int totvert) } /* This function firstly adjusts the pointers that the transdata has to each BezTriple */ -static void beztmap_to_data (TransInfo *t, FCurve *fcu, BeztMap *bezms, int totvert) +static void beztmap_to_data (TransInfo *t, FCurve *fcu, BeztMap *bezms, int totvert, const short use_handle) { BezTriple *bezts = fcu->bezt; BeztMap *bezm; @@ -3679,7 +3688,7 @@ static void beztmap_to_data (TransInfo *t, FCurve *fcu, BeztMap *bezms, int totv /* only selected verts */ if (bezm->pipo == BEZT_IPO_BEZ) { - if (bezm->bezt->f1 & SELECT) { + if (use_handle && bezm->bezt->f1 & SELECT) { if (td->loc2d == bezm->bezt->vec[0]) { if (bezm->swapHs == 1) td->loc2d= (bezts + bezm->newIndex)->vec[2]; @@ -3690,7 +3699,7 @@ static void beztmap_to_data (TransInfo *t, FCurve *fcu, BeztMap *bezms, int totv } } if (bezm->cipo == BEZT_IPO_BEZ) { - if (bezm->bezt->f3 & SELECT) { + if (use_handle && bezm->bezt->f3 & SELECT) { if (td->loc2d == bezm->bezt->vec[2]) { if (bezm->swapHs == 1) td->loc2d= (bezts + bezm->newIndex)->vec[0]; @@ -3728,7 +3737,9 @@ static void beztmap_to_data (TransInfo *t, FCurve *fcu, BeztMap *bezms, int totv */ void remake_graph_transdata (TransInfo *t, ListBase *anim_data) { + SpaceIpo *sipo = (SpaceIpo *)t->sa->spacedata.first; bAnimListElem *ale; + const short use_handle = !(sipo->flag & SIPO_NOHANDLES); /* sort and reassign verts */ for (ale= anim_data->first; ale; ale= ale->next) { @@ -3738,9 +3749,9 @@ void remake_graph_transdata (TransInfo *t, ListBase *anim_data) BeztMap *bezm; /* adjust transform-data pointers */ - bezm= bezt_to_beztmaps(fcu->bezt, fcu->totvert); - sort_time_beztmaps(bezm, fcu->totvert); - beztmap_to_data(t, fcu, bezm, fcu->totvert); + bezm= bezt_to_beztmaps(fcu->bezt, fcu->totvert, use_handle); + sort_time_beztmaps(bezm, fcu->totvert, use_handle); + beztmap_to_data(t, fcu, bezm, fcu->totvert, use_handle); /* free mapping stuff */ MEM_freeN(bezm); From bc64d8dcd852443e387d374a35f57bd9e1c38963 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 15 Dec 2010 16:15:52 +0000 Subject: [PATCH 176/236] Bugfix, irc report: Stamp info was calling log10 on zero, when end-frame was zero. Caused crash! Thanks Sergey for report. --- source/blender/blenkernel/intern/image.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index eb85db89835..4a40982b62e 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -940,8 +940,13 @@ static void stampdata(Scene *scene, StampData *stamp_data, int do_prefix) if (scene->r.stamp & R_STAMP_FRAME) { char format[32]; - if (do_prefix) sprintf(format, "Frame %%0%di", 1 + (int) log10(scene->r.efra)); - else sprintf(format, "%%0%di", 1 + (int) log10(scene->r.efra)); + int digits= 1; + + if(scene->r.efra>9) + digits= 1 + (int) log10(scene->r.efra); + + if (do_prefix) sprintf(format, "Frame %%0%di", digits); + else sprintf(format, "%%0%di", digits); sprintf (stamp_data->frame, format, scene->r.cfra); } else { stamp_data->frame[0] = '\0'; From 0a3902bb5515c4e7ce02fc1a86cc6f2b3868c082 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 15 Dec 2010 16:46:59 +0000 Subject: [PATCH 177/236] change the cursor bounds to only use the Area if the mouse is outside the region or the region is not a WINDOW type. --- .../windowmanager/intern/wm_event_system.c | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 77dfa015d68..03ad58e67d5 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -683,12 +683,22 @@ int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, PointerR } if(wrap) { + rcti *winrect= NULL; + ARegion *ar= CTX_wm_region(C); ScrArea *sa= CTX_wm_area(C); - if(sa) { - bounds[0]= sa->totrct.xmin; - bounds[1]= sa->totrct.ymax; - bounds[2]= sa->totrct.xmax; - bounds[3]= sa->totrct.ymin; + + if(ar && ar->regiontype == RGN_TYPE_WINDOW && BLI_in_rcti(&ar->winrct, event->x, event->y)) { + winrect= &ar->winrct; + } + else if(sa) { + winrect= &sa->totrct; + } + + if(winrect) { + bounds[0]= winrect->xmin; + bounds[1]= winrect->ymax; + bounds[2]= winrect->xmax; + bounds[3]= winrect->ymin; } } From 2c55dd96adee33962b2a618e7678ed61c07d1446 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 15 Dec 2010 16:57:56 +0000 Subject: [PATCH 178/236] missing check for keyframe paste, was crashing when no keyframes to paste into. --- source/blender/editors/animation/keyframes_general.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c index 437f74201e4..07c8ddcdb4a 100644 --- a/source/blender/editors/animation/keyframes_general.c +++ b/source/blender/editors/animation/keyframes_general.c @@ -753,11 +753,16 @@ short paste_animedit_keys (bAnimContext *ac, ListBase *anim_data, int pass; /* check if buffer is empty */ - if (ELEM(NULL, animcopybuf.first, animcopybuf.last)) { + if (animcopybuf.first == NULL) { BKE_report(ac->reports, RPT_WARNING, "No data in buffer to paste"); return -1; } + if (anim_data->first == NULL) { + BKE_report(ac->reports, RPT_WARNING, "No FCurves to paste into"); + return -1; + } + /* mathods of offset */ switch(offset_mode) { case KEYFRAME_PASTE_OFFSET_CFRA_START: From 6b2b56c35eaf1ea8d2b0d0edd2412288f0e67e19 Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Wed, 15 Dec 2010 17:05:34 +0000 Subject: [PATCH 179/236] Fix for [#25218] No smoke is emitted when particle system starts and ends on same frame * Depsgraph wasn't updated properly for smoke flow collision object dependencies. * Smoke also wasn't properly using the actual emission frame of the flow particles. * There was a lot of bloated logic in some parts of particle code so this fix turned into a small scale cleanup operation. ** As a result particle updating and cache usage should be a bit more stable too. --- source/blender/blenkernel/intern/particle.c | 17 ++-- .../blenkernel/intern/particle_system.c | 83 +++++++------------ source/blender/blenkernel/intern/pointcache.c | 8 +- source/blender/blenkernel/intern/smoke.c | 39 +++++---- source/blender/modifiers/intern/MOD_smoke.c | 30 +++++-- 5 files changed, 92 insertions(+), 85 deletions(-) diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 187071941bf..a7506f2114b 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -4193,11 +4193,11 @@ int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *sta if(pa) { if(!always) - if((pa->alive==PARS_UNBORN && (part->flag & PART_UNBORN)==0) - || (pa->alive==PARS_DEAD && (part->flag & PART_DIED)==0)) + if((cfra < pa->time && (part->flag & PART_UNBORN)==0) + || (cfra > pa->dietime && (part->flag & PART_DIED)==0)) return 0; - state->time = MIN2(state->time, pa->dietime); + cfra = MIN2(cfra, pa->dietime); } if(sim->psys->flag & PSYS_KEYED){ @@ -4223,16 +4223,15 @@ int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *sta calc_latt_deform(sim->psys->lattice, state->co,1.0f); } else{ - if(pa->state.time==state->time || ELEM(part->phystype,PART_PHYS_NO,PART_PHYS_KEYED) - || pa->prev_state.time <= 0.0f) + if(pa->state.time==cfra || ELEM(part->phystype,PART_PHYS_NO,PART_PHYS_KEYED)) copy_particle_key(state, &pa->state, 1); - else if(pa->prev_state.time==state->time) + else if(pa->prev_state.time==cfra) copy_particle_key(state, &pa->prev_state, 1); else { float dfra, frs_sec = sim->scene->r.frs_sec; /* let's interpolate to try to be as accurate as possible */ - if(pa->state.time + 2.0f >= state->time && pa->prev_state.time - 2.0f <= state->time) { - if(pa->prev_state.time >= pa->state.time) { + if(pa->state.time + 2.f >= state->time && pa->prev_state.time - 2.f <= state->time) { + if(pa->prev_state.time >= pa->state.time || pa->prev_state.time < 0.f) { /* prev_state is wrong so let's not use it, this can happen at frames 1, 0 or particle birth */ dfra = state->time - pa->state.time; @@ -4258,7 +4257,7 @@ int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *sta psys_interpolate_particle(-1, keys, keytime, state, 1); /* convert back to real velocity */ - mul_v3_fl(state->vel, 1.0f / (dfra * timestep)); + mul_v3_fl(state->vel, 1.f / (dfra * timestep)); interp_v3_v3v3(state->ave, keys[1].ave, keys[2].ave, keytime); interp_qt_qtqt(state->rot, keys[1].rot, keys[2].rot, keytime); diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 9eed401adbb..7e65cf26fd2 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -3749,80 +3749,59 @@ static void system_step(ParticleSimulationData *sim, float cfra) ParticleSystem *psys = sim->psys; ParticleSettings *part = psys->part; PointCache *cache = psys->pointcache; - PTCacheID pid, *use_cache = NULL; + PTCacheID ptcacheid, *pid = NULL; PARTICLE_P; - int oldtotpart; - float disp; /*, *vg_vel= 0, *vg_tan= 0, *vg_rot= 0, *vg_size= 0; */ - int init= 0, emit= 0; //, only_children_changed= 0; - int framenr, framedelta, startframe = 0, endframe = 100; - - framenr= (int)sim->scene->r.cfra; - framedelta= framenr - cache->simframe; + float disp, cache_cfra = cfra; /*, *vg_vel= 0, *vg_tan= 0, *vg_rot= 0, *vg_size= 0; */ + int startframe = 0, endframe = 100; /* cache shouldn't be used for hair or "continue physics" */ if(part->type != PART_HAIR && BKE_ptcache_get_continue_physics() == 0) { - BKE_ptcache_id_from_particles(&pid, sim->ob, psys); - use_cache = &pid; - } - - if(use_cache) { - psys_clear_temp_pointcache(sim->psys); + psys_clear_temp_pointcache(psys); /* set suitable cache range automatically */ if((cache->flag & (PTCACHE_BAKING|PTCACHE_BAKED))==0) - psys_get_pointcache_start_end(sim->scene, sim->psys, &cache->startframe, &cache->endframe); - - BKE_ptcache_id_time(&pid, sim->scene, 0.0f, &startframe, &endframe, NULL); + psys_get_pointcache_start_end(sim->scene, psys, &cache->startframe, &cache->endframe); - /* simulation is only active during a specific period */ - if(framenr < startframe) { - BKE_ptcache_read_cache(use_cache, startframe, sim->scene->r.frs_sec); - /* set correct particle state and reset particles */ - cached_step(sim, cfra); - return; - } - else if(framenr > endframe) { - framenr= endframe; - } - else if(framenr == startframe) { - BKE_ptcache_id_reset(sim->scene, use_cache, PTCACHE_RESET_OUTDATED); - BKE_ptcache_validate(cache, framenr); + pid = &ptcacheid; + BKE_ptcache_id_from_particles(pid, sim->ob, psys); + + BKE_ptcache_id_time(pid, sim->scene, 0.0f, &startframe, &endframe, NULL); + + /* clear everythin on start frame */ + if((int)cfra == startframe) { + BKE_ptcache_id_reset(sim->scene, pid, PTCACHE_RESET_OUTDATED); + BKE_ptcache_validate(cache, startframe); cache->flag &= ~PTCACHE_REDO_NEEDED; } + + CLAMP(cache_cfra, startframe, endframe); } -/* 1. emit particles */ - - /* verify if we need to reallocate */ - oldtotpart = psys->totpart; - - emit = emit_particles(sim, use_cache, cfra); - if(use_cache && emit > 0) - BKE_ptcache_id_clear(&pid, PTCACHE_CLEAR_ALL, cfra); - init = emit*emit + (psys->recalc & PSYS_RECALC_RESET); - - if(init) { +/* 1. emit particles and redo particles if needed */ + if(emit_particles(sim, pid, cfra) || psys->recalc & PSYS_RECALC_RESET) { distribute_particles(sim, part->from); initialize_all_particles(sim); - reset_all_particles(sim, 0.0, cfra, oldtotpart); + reset_all_particles(sim, 0.0, cfra, 0); /* flag for possible explode modifiers after this system */ sim->psmd->flag |= eParticleSystemFlag_Pars; + + BKE_ptcache_id_clear(pid, PTCACHE_CLEAR_ALL, cfra); } /* 2. try to read from the cache */ - if(use_cache) { - int cache_result = BKE_ptcache_read_cache(use_cache, cfra, sim->scene->r.frs_sec); + if(pid) { + int cache_result = BKE_ptcache_read_cache(pid, cache_cfra, sim->scene->r.frs_sec); if(ELEM(cache_result, PTCACHE_READ_EXACT, PTCACHE_READ_INTERPOLATED)) { cached_step(sim, cfra); update_children(sim); psys_update_path_cache(sim, cfra); - BKE_ptcache_validate(cache, framenr); + BKE_ptcache_validate(cache, (int)cache_cfra); if(cache_result == PTCACHE_READ_INTERPOLATED && cache->flag & PTCACHE_REDO_NEEDED) - BKE_ptcache_write_cache(use_cache, framenr); + BKE_ptcache_write_cache(pid, (int)cache_cfra); return; } @@ -3837,7 +3816,7 @@ static void system_step(ParticleSimulationData *sim, float cfra) /* if on second frame, write cache for first frame */ if(psys->cfra == startframe && (cache->flag & PTCACHE_OUTDATED || cache->last_exact==0)) - BKE_ptcache_write_cache(use_cache, startframe); + BKE_ptcache_write_cache(pid, startframe); } else BKE_ptcache_invalidate(cache); @@ -3860,7 +3839,7 @@ static void system_step(ParticleSimulationData *sim, float cfra) /* handle negative frame start at the first frame by doing * all the steps before the first frame */ - if(framenr == startframe && part->sta < startframe) + if((int)cfra == startframe && part->sta < startframe) totframesback = (startframe - (int)part->sta); for(dframe=-totframesback; dframe<=0; dframe++) { @@ -3875,10 +3854,10 @@ static void system_step(ParticleSimulationData *sim, float cfra) } /* 4. only write cache starting from second frame */ - if(use_cache) { - BKE_ptcache_validate(cache, framenr); - if(framenr != startframe) - BKE_ptcache_write_cache(use_cache, framenr); + if(pid) { + BKE_ptcache_validate(cache, (int)cache_cfra); + if((int)cache_cfra != startframe) + BKE_ptcache_write_cache(pid, (int)cache_cfra); } update_children(sim); diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 4711e61c767..c43f53cc4af 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -1883,8 +1883,7 @@ void BKE_ptcache_id_clear(PTCacheID *pid, int mode, int cfra) { int len; /* store the length of the string */ int i; - int sta = pid->cache->startframe; - int end = pid->cache->endframe; + int sta, end; /* mode is same as fopen's modes */ DIR *dir; @@ -1894,9 +1893,12 @@ void BKE_ptcache_id_clear(PTCacheID *pid, int mode, int cfra) char path_full[MAX_PTCACHE_FILE]; char ext[MAX_PTCACHE_PATH]; - if(!pid->cache || pid->cache->flag & PTCACHE_BAKED) + if(!pid || !pid->cache || pid->cache->flag & PTCACHE_BAKED) return; + sta = pid->cache->startframe; + end = pid->cache->endframe; + #ifndef DURIAN_POINTCACHE_LIB_OK /* don't allow clearing for linked objects */ if(pid->ob->id.lib) diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c index 1833cc4eeac..08871cfeec7 100644 --- a/source/blender/blenkernel/intern/smoke.c +++ b/source/blender/blenkernel/intern/smoke.c @@ -973,9 +973,9 @@ static void smoke_calc_domain(Scene *scene, Object *ob, SmokeModifierData *smd) if(sfs && sfs->psys && sfs->psys->part && sfs->psys->part->type==PART_EMITTER) // is particle system selected { + ParticleSimulationData sim; ParticleSystem *psys = sfs->psys; ParticleSettings *part=psys->part; - ParticleData *pa = NULL; int p = 0; float *density = smoke_get_density(sds->fluid); float *bigdensity = smoke_turbulence_get_density(sds->wt); @@ -995,6 +995,10 @@ static void smoke_calc_domain(Scene *scene, Object *ob, SmokeModifierData *smd) */ float *temp_emission_map = NULL; + sim.scene = scene; + sim.ob = otherobj; + sim.psys = psys; + // initialize temp emission map if(!(sfs->type & MOD_SMOKE_FLOW_TYPE_OUTFLOW)) { @@ -1007,19 +1011,26 @@ static void smoke_calc_domain(Scene *scene, Object *ob, SmokeModifierData *smd) } // mostly copied from particle code - for(p=0, pa=psys->particles; ptotpart; p++, pa++) - { - int cell[3]; - size_t i = 0; - size_t index = 0; - int badcell = 0; - if(pa->alive == PARS_UNBORN && (part->flag & PART_UNBORN)==0) continue; - else if(pa->alive == PARS_DEAD && (part->flag & PART_DIED)==0) continue; - else if(pa->flag & (PARS_UNEXIST+PARS_NO_DISP)) continue; + for(p=0; ptotpart; p++) + { + int cell[3]; + size_t i = 0; + size_t index = 0; + int badcell = 0; + ParticleKey state; + + if(psys->particles[p].flag & (PARS_NO_DISP|PARS_UNEXIST)) + continue; + + state.time = smd->time; + + if(psys_get_particle_state(&sim, p, &state, 0) == 0) + continue; + // VECCOPY(pos, pa->state.co); // mul_m4_v3(ob->imat, pos); // 1. get corresponding cell - get_cell(smd->domain->p0, smd->domain->res, smd->domain->dx, pa->state.co, cell, 0); + get_cell(smd->domain->p0, smd->domain->res, smd->domain->dx, state.co, cell, 0); // check if cell is valid (in the domain boundary) for(i = 0; i < 3; i++) { @@ -1045,9 +1056,9 @@ static void smoke_calc_domain(Scene *scene, Object *ob, SmokeModifierData *smd) // Uses particle velocity as initial velocity for smoke if(sfs->flags & MOD_SMOKE_FLOW_INITVELOCITY && (psys->part->phystype != PART_PHYS_NO)) { - velocity_x[index] = pa->state.vel[0]*sfs->vel_multi; - velocity_y[index] = pa->state.vel[1]*sfs->vel_multi; - velocity_z[index] = pa->state.vel[2]*sfs->vel_multi; + velocity_x[index] = state.vel[0]*sfs->vel_multi; + velocity_y[index] = state.vel[1]*sfs->vel_multi; + velocity_z[index] = state.vel[2]*sfs->vel_multi; } } else if(sfs->type & MOD_SMOKE_FLOW_TYPE_OUTFLOW) // outflow diff --git a/source/blender/modifiers/intern/MOD_smoke.c b/source/blender/modifiers/intern/MOD_smoke.c index a183018da30..91197376ae9 100644 --- a/source/blender/modifiers/intern/MOD_smoke.c +++ b/source/blender/modifiers/intern/MOD_smoke.c @@ -34,7 +34,10 @@ #include "MEM_guardedalloc.h" +#include "DNA_group_types.h" #include "DNA_object_types.h" +#include "DNA_scene_types.h" +#include "DNA_smoke_types.h" #include "BKE_utildefines.h" #include "BKE_cdderivedmesh.h" @@ -93,12 +96,13 @@ static int dependsOnTime(ModifierData *UNUSED(md)) return 1; } -static void updateDepgraph(ModifierData *UNUSED(md), DagForest *UNUSED(forest), - struct Scene *UNUSED(scene), - Object *UNUSED(ob), - DagNode *UNUSED(obNode)) +static void updateDepgraph(ModifierData *md, DagForest *forest, + struct Scene *scene, + Object *ob, + DagNode *obNode) { - /*SmokeModifierData *smd = (SmokeModifierData *) md; + SmokeModifierData *smd = (SmokeModifierData *) md; + if(smd && (smd->type & MOD_SMOKE_TYPE_DOMAIN) && smd->domain) { if(smd->domain->fluid_group) @@ -112,7 +116,7 @@ static void updateDepgraph(ModifierData *UNUSED(md), DagForest *UNUSED(forest), SmokeModifierData *smd2 = (SmokeModifierData *)modifiers_findByType(go->ob, eModifierType_Smoke); // check for initialized smoke object - if(smd2 && (smd2->type & MOD_SMOKE_TYPE_FLOW) && smd2->flow) + if(smd2 && (((smd2->type & MOD_SMOKE_TYPE_FLOW) && smd2->flow) || ((smd->type & MOD_SMOKE_TYPE_COLL) && smd2->coll))) { DagNode *curNode = dag_get_node(forest, go->ob); dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Smoke Flow"); @@ -120,8 +124,20 @@ static void updateDepgraph(ModifierData *UNUSED(md), DagForest *UNUSED(forest), } } } + else { + Base *base = scene->base.first; + + for(; base; base = base->next) { + SmokeModifierData *smd2 = (SmokeModifierData *)modifiers_findByType(base->object, eModifierType_Smoke); + + if(smd2 && (((smd2->type & MOD_SMOKE_TYPE_FLOW) && smd2->flow) || ((smd->type & MOD_SMOKE_TYPE_COLL) && smd2->coll))) + { + DagNode *curNode = dag_get_node(forest, base->object); + dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Smoke Flow"); + } + } + } } - */ } From 7e10a9e6ce3d788e28ee39c9d2e94605d2a0ba47 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 15 Dec 2010 17:36:08 +0000 Subject: [PATCH 180/236] ensure pasted graph keys are always selected. --- source/blender/blenkernel/intern/smoke.c | 1 - source/blender/editors/animation/keyframes_general.c | 12 +++++++++--- source/blender/editors/animation/keyframing.c | 4 ++++ source/blender/modifiers/intern/MOD_smoke.c | 2 +- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c index 08871cfeec7..adaab2046dc 100644 --- a/source/blender/blenkernel/intern/smoke.c +++ b/source/blender/blenkernel/intern/smoke.c @@ -975,7 +975,6 @@ static void smoke_calc_domain(Scene *scene, Object *ob, SmokeModifierData *smd) { ParticleSimulationData sim; ParticleSystem *psys = sfs->psys; - ParticleSettings *part=psys->part; int p = 0; float *density = smoke_get_density(sds->fluid); float *bigdensity = smoke_turbulence_get_density(sds->wt); diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c index 07c8ddcdb4a..a0585acf305 100644 --- a/source/blender/editors/animation/keyframes_general.c +++ b/source/blender/editors/animation/keyframes_general.c @@ -515,7 +515,7 @@ short copy_animedit_keys (bAnimContext *ac, ListBase *anim_data) for (ale= anim_data->first; ale; ale= ale->next) { FCurve *fcu= (FCurve *)ale->key_data; tAnimCopybufItem *aci; - BezTriple *bezt, *newbuf; + BezTriple *bezt, *nbezt, *newbuf; int i; /* firstly, check if F-Curve has any selected keyframes @@ -546,8 +546,14 @@ short copy_animedit_keys (bAnimContext *ac, ListBase *anim_data) memcpy(newbuf, aci->bezt, sizeof(BezTriple)*(aci->totvert)); /* copy current beztriple across too */ - *(newbuf + aci->totvert)= *bezt; - + nbezt= &newbuf[aci->totvert]; + *nbezt= *bezt; + + /* ensure copy buffer is selected so pasted keys are selected */ + nbezt->f1 |= SELECT; + nbezt->f2 |= SELECT; + nbezt->f3 |= SELECT; + /* free old array and set the new */ if (aci->bezt) MEM_freeN(aci->bezt); aci->bezt= newbuf; diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 5d5f660213b..899f5ed2229 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -229,6 +229,10 @@ int insert_bezt_fcurve (FCurve *fcu, BezTriple *bezt, short flag) dst->vec[0][1] += dy; dst->vec[1][1] += dy; dst->vec[2][1] += dy; + + dst->f1= bezt->f1; + dst->f2= bezt->f2; + dst->f3= bezt->f3; // TODO: perform some other operations? } diff --git a/source/blender/modifiers/intern/MOD_smoke.c b/source/blender/modifiers/intern/MOD_smoke.c index 91197376ae9..fc7d66b278e 100644 --- a/source/blender/modifiers/intern/MOD_smoke.c +++ b/source/blender/modifiers/intern/MOD_smoke.c @@ -98,7 +98,7 @@ static int dependsOnTime(ModifierData *UNUSED(md)) static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *scene, - Object *ob, + Object *UNUSED(ob), DagNode *obNode) { SmokeModifierData *smd = (SmokeModifierData *) md; From 29d2e534631ff1aa8da35549c022647734642494 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 15 Dec 2010 18:09:25 +0000 Subject: [PATCH 181/236] Bugfix, own collection Using RMB on menus to change hotkeys was broken. - the input button was on a weird place outside menu, assign would close pulldown, so you had to reopen to check - ESC didn't close the button, but assigned ESC as hotkey. This key is a protected key, and always should be escaping. - Worst bug: if you used this on a 'user keymap' it removed all entries from the map... --- .../blender/editors/interface/interface_handlers.c | 12 +++++++++--- source/blender/windowmanager/intern/wm_keymap.c | 4 ++++ source/blender/windowmanager/wm_event_types.h | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index e15696d7e80..77782e56f23 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -2081,6 +2081,12 @@ static int ui_do_but_HOTKEYEVT(bContext *C, uiBut *but, uiHandleButtonData *data button_activate_state(C, but, BUTTON_STATE_EXIT); return WM_UI_HANDLER_BREAK; } + else if(event->type == ESCKEY) { + data->cancel= 1; + data->escapecancel= 1; + button_activate_state(C, but, BUTTON_STATE_EXIT); + } + } } @@ -4011,14 +4017,14 @@ static uiBlock *menu_change_shortcut(bContext *C, ARegion *ar, void *arg) block= uiBeginBlock(C, ar, "_popup", UI_EMBOSS); uiBlockSetHandleFunc(block, but_shortcut_name_func, but); - uiBlockSetFlag(block, UI_BLOCK_RET_1|UI_BLOCK_MOVEMOUSE_QUIT); + uiBlockSetFlag(block, UI_BLOCK_MOVEMOUSE_QUIT); uiBlockSetDirection(block, UI_CENTER); layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, 200, 20, style); uiItemR(layout, &ptr, "type", UI_ITEM_R_FULL_EVENT|UI_ITEM_R_IMMEDIATE, "", 0); - uiPopupBoundsBlock(block, 6, 100, 10); + uiPopupBoundsBlock(block, 6, -50, 26); uiEndBlock(C, block); return block; @@ -4056,7 +4062,7 @@ static uiBlock *menu_add_shortcut(bContext *C, ARegion *ar, void *arg) uiItemR(layout, &ptr, "type", UI_ITEM_R_FULL_EVENT|UI_ITEM_R_IMMEDIATE, "", 0); - uiPopupBoundsBlock(block, 6, 100, 10); + uiPopupBoundsBlock(block, 6, -50, 26); uiEndBlock(C, block); return block; diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c index df635c0ccb2..a3f662cbbf3 100644 --- a/source/blender/windowmanager/intern/wm_keymap.c +++ b/source/blender/windowmanager/intern/wm_keymap.c @@ -652,6 +652,10 @@ wmKeyMap *WM_keymap_copy_to_user(wmKeyMap *keymap) usermap= WM_keymap_list_find(&U.keymaps, keymap->idname, keymap->spaceid, keymap->regionid); + /* XXX this function is only used by RMB setting hotkeys, and it clears maps on 2nd try this way */ + if(keymap==usermap) + return keymap; + if(!usermap) { /* not saved yet, duplicate existing */ usermap= MEM_dupallocN(keymap); diff --git a/source/blender/windowmanager/wm_event_types.h b/source/blender/windowmanager/wm_event_types.h index 822b36392ce..5d7eb625f78 100644 --- a/source/blender/windowmanager/wm_event_types.h +++ b/source/blender/windowmanager/wm_event_types.h @@ -227,7 +227,7 @@ #define ISTWEAK(event) (event >= EVT_TWEAK_L && event <= EVT_GESTURE) /* test whether event type is acceptable as hotkey, excluding modifiers */ -#define ISHOTKEY(event) ((ISKEYBOARD(event) || ISMOUSE(event)) && !(event>=LEFTCTRLKEY && event<=LEFTSHIFTKEY) && !(event>=UNKNOWNKEY && event<=GRLESSKEY)) +#define ISHOTKEY(event) ((ISKEYBOARD(event) || ISMOUSE(event)) && event!=ESCKEY && !(event>=LEFTCTRLKEY && event<=LEFTSHIFTKEY) && !(event>=UNKNOWNKEY && event<=GRLESSKEY)) /* **************** BLENDER GESTURE EVENTS (0x5000) **************** */ From 97b0e1757730c5db0a0343a35bdeea1d5bd55eab Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 15 Dec 2010 19:10:42 +0000 Subject: [PATCH 182/236] Bugfix #25243 Pressing Enter twice on enum-menus or pulldowns sent an 'OK execute' with illegal values (no menu item active). Caused crashes too. --- source/blender/editors/interface/interface_handlers.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 77782e56f23..d66f7d262a9 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -5726,10 +5726,10 @@ int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle *menu, menu->menuretval= UI_RETURN_CANCEL; } else if(ELEM(event->type, RETKEY, PADENTER) && event->val==KM_PRESS) { - /* enter will always close this block, but we let the event - * get handled by the button if it is activated */ + /* enter will always close this block, we let the event + * get handled by the button if it is activated, otherwise we cancel */ if(!ui_but_find_activated(ar)) - menu->menuretval= UI_RETURN_OK; + menu->menuretval= UI_RETURN_CANCEL; } else { ui_mouse_motion_towards_check(block, menu, mx, my); From a6855c9c2124d0cb928e262896451b50425c2c6e Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 15 Dec 2010 19:21:02 +0000 Subject: [PATCH 183/236] Bugfix #25235 Image Editor: paint mode, use clone image, always showed. Now it hides clone when paint is disabled. --- source/blender/editors/space_image/image_draw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index 55f27cbca62..6e7af2cb196 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -664,7 +664,8 @@ void draw_image_main(SpaceImage *sima, ARegion *ar, Scene *scene) draw_image_buffer(sima, ar, scene, ima, ibuf, 0.0f, 0.0f, zoomx, zoomy); /* paint helpers */ - draw_image_paint_helpers(ar, scene, zoomx, zoomy); + if(sima->flag & SI_DRAWTOOL) + draw_image_paint_helpers(ar, scene, zoomx, zoomy); /* XXX integrate this code */ From 143573f507b8c293aceb57ccb67f297ed85b6ad0 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 15 Dec 2010 21:25:54 +0000 Subject: [PATCH 184/236] Fix #25241: Wordwrap memory leak /w Undo Looks like drawcache shouldn't be freed when restoring screen because spaces aren't freeing and could still use caches. --- source/blender/blenloader/intern/readfile.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 2661f046178..f2ff372d613 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -4947,8 +4947,6 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene) st->text= restore_pointer_by_name(newmain, (ID *)st->text, 1); if(st->text==NULL) st->text= newmain->text.first; - - st->drawcache= NULL; } else if(sl->spacetype==SPACE_SCRIPT) { SpaceScript *scpt= (SpaceScript *)sl; From 3ae56ea1b3362d586bb2e7efdce887919ebd789d Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Wed, 15 Dec 2010 22:46:43 +0000 Subject: [PATCH 185/236] small tweak, moving /* put compatibility code here until next subversion bump */ {} to a distinct (right) place when doing a version bump, please remember to do that. --- source/blender/blenloader/intern/readfile.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index f2ff372d613..6e3376c8834 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -11156,7 +11156,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } - /* put compatibility code here until next subversion bump */ if (main->versionfile < 255 || (main->versionfile == 255 && main->subversionfile < 1)) { Brush *br; ParticleSettings *part; @@ -11216,6 +11215,10 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } + /* put compatibility code here until next subversion bump */ + { + } + /* WATCH IT!!!: pointers from libdata have not been converted yet here! */ /* WATCH IT 2!: Userdef struct init has to be in editors/interface/resources.c! */ From e15f34b35fce21c89fdff956402a3671caf18a8b Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Thu, 16 Dec 2010 03:39:51 +0000 Subject: [PATCH 186/236] Fixed bug [#22634] sculpting/multires and wireframe display mode glitches Added a call to flush sculpting face grid changes out to ccgsubsurf's other data (in particular, to edge grids) Hopefully correct fix this time :) --- .../blender/blenkernel/intern/subsurf_ccg.c | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index 6f6e6844f0b..874fd0fef17 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -1146,6 +1146,22 @@ static void ccgDM_drawVerts(DerivedMesh *dm) { ccgFaceIterator_free(fi); glEnd(); } + +static void ccgdm_pbvh_update(CCGDerivedMesh *ccgdm) +{ + if(ccgdm->pbvh && ccgDM_use_grid_pbvh(ccgdm)) { + CCGFace **faces; + int totface; + + BLI_pbvh_get_grid_updates(ccgdm->pbvh, 1, (void***)&faces, &totface); + if(totface) { + ccgSubSurf_updateFromFaces(ccgdm->ss, 0, faces, totface); + ccgSubSurf_updateNormals(ccgdm->ss, faces, totface); + MEM_freeN(faces); + } + } +} + static void ccgDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int UNUSED(drawAllEdges)) { CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm; CCGSubSurf *ss = ccgdm->ss; @@ -1155,6 +1171,8 @@ static void ccgDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int UNUSED(draw int gridSize = ccgSubSurf_getGridSize(ss); int useAging; + ccgdm_pbvh_update(ccgdm); + ccgSubSurf_getUseAgeCounts(ss, &useAging, NULL, NULL, NULL); for (; !ccgEdgeIterator_isStopped(ei); ccgEdgeIterator_next(ei)) { @@ -1249,21 +1267,6 @@ static void ccgDM_glNormalFast(float *a, float *b, float *c, float *d) glNormal3fv(no); } -static void ccgdm_pbvh_update(CCGDerivedMesh *ccgdm) -{ - if(ccgdm->pbvh && ccgDM_use_grid_pbvh(ccgdm)) { - CCGFace **faces; - int totface; - - BLI_pbvh_get_grid_updates(ccgdm->pbvh, 1, (void***)&faces, &totface); - if(totface) { - ccgSubSurf_updateFromFaces(ccgdm->ss, 0, faces, totface); - ccgSubSurf_updateNormals(ccgdm->ss, faces, totface); - MEM_freeN(faces); - } - } -} - /* Only used by non-editmesh types */ static void ccgDM_drawFacesSolid(DerivedMesh *dm, float (*partial_redraw_planes)[4], int fast, int (*setMaterial)(int, void *attribs)) { CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm; From 6d2019074ffb3466840443a4a75cb19ca6493566 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 16 Dec 2010 05:02:15 +0000 Subject: [PATCH 187/236] - fix [#25246] export default scene to X3D crashes exporter, own fault but also made sure all colors are now clamped and noticed 3D text was not being exported. - de-duplicated 'object_type_items' enum, text was known as TEXT in one, FONT in another. --- release/scripts/op/io_scene_x3d/export_x3d.py | 161 ++++++------------ release/scripts/templates/background_job.py | 2 +- .../scripts/ui/properties_data_metaball.py | 2 +- release/scripts/ui/space_view3d.py | 2 +- 4 files changed, 59 insertions(+), 108 deletions(-) diff --git a/release/scripts/op/io_scene_x3d/export_x3d.py b/release/scripts/op/io_scene_x3d/export_x3d.py index 6bc667e242b..4d6e8181203 100644 --- a/release/scripts/op/io_scene_x3d/export_x3d.py +++ b/release/scripts/op/io_scene_x3d/export_x3d.py @@ -44,6 +44,9 @@ from io_utils import create_derived_objects, free_derived_objects DEG2RAD=0.017453292519943295 MATWORLD= mathutils.Matrix.Rotation(-90, 4, 'X') +def round_color(col, cp): + return tuple([round(max(min(c, 1.0), 0.0), cp) for c in col]) + #################################### # Global Variables #################################### @@ -218,15 +221,13 @@ class x3d_class: if world: mtype = world.mist_settings.falloff mparam = world.mist_settings - grd = world.horizon_color - grd0, grd1, grd2 = grd[0], grd[1], grd[2] else: return if (mtype == 'LINEAR' or mtype == 'INVERSE_QUADRATIC'): mtype = 1 if mtype == 'LINEAR' else 2 # if (mtype == 1 or mtype == 2): self.file.write("\n\n" % round(mparam[2],self.cp)) else: return @@ -238,11 +239,10 @@ class x3d_class: safeName = self.cleanStr(ob.name) if world: ambi = world.ambient_color - # ambi = world.amb - ambientIntensity = ((float(ambi[0] + ambi[1] + ambi[2]))/3)/2.5 + ambientIntensity = ((ambi[0] + ambi[1] + ambi[2]) / 3.0) / 2.5 + del ambi else: - ambi = 0 - ambientIntensity = 0 + ambientIntensity = 0.0 # compute cutoff and beamwidth intensity=min(lamp.energy/1.75,1.0) @@ -264,8 +264,7 @@ class x3d_class: self.file.write("radius=\"%s\" " % (round(radius,self.cp))) self.file.write("ambientIntensity=\"%s\" " % (round(ambientIntensity,self.cp))) self.file.write("intensity=\"%s\" " % (round(intensity,self.cp))) - self.file.write("color=\"%s %s %s\" " % (round(lamp.color[0],self.cp), round(lamp.color[1],self.cp), round(lamp.color[2],self.cp))) - # self.file.write("color=\"%s %s %s\" " % (round(lamp.col[0],self.cp), round(lamp.col[1],self.cp), round(lamp.col[2],self.cp))) + self.file.write("color=\"%s %s %s\" " % round_color(lamp.color, self.cp)) self.file.write("beamWidth=\"%s\" " % (round(beamWidth,self.cp))) self.file.write("cutOffAngle=\"%s\" " % (round(cutOffAngle,self.cp))) self.file.write("direction=\"%s %s %s\" " % (round(dx,3),round(dy,3),round(dz,3))) @@ -618,51 +617,31 @@ class x3d_class: self.matNames[matName] = 1 + emit = mat.emit ambient = mat.ambient / 3.0 - diffuseR, diffuseG, diffuseB = mat.diffuse_color + diffuseColor = tuple(mat.diffuse_color) if world: - ambi = world.ambient_color - ambi0, ambi1, ambi2 = (ambi[0] * mat.ambient) * 2.0, (ambi[1] * mat.ambient) * 2.0, (ambi[2] * mat.ambient) * 2.0 + ambiColor = tuple(((c * mat.ambient) * 2.0) for c in world.ambient_color) else: - ambi0, ambi1, ambi2 = 0.0, 0.0, 0.0 - - emisR, emisG, emisB = (diffuseR*mat.emit+ambi0) / 2.0, (diffuseG*mat.emit+ambi1) / 2.0, (diffuseB*mat.emit+ambi2) / 2.0 - del ambi0, ambi1, ambi2 - - shininess = mat.specular_hardness/512.0 - specR = (mat.specular_color[0]+0.001)/(1.25/(mat.specular_intensity+0.001)) - specG = (mat.specular_color[1]+0.001)/(1.25/(mat.specular_intensity+0.001)) - specB = (mat.specular_color[2]+0.001)/(1.25/(mat.specular_intensity+0.001)) + ambiColor = 0.0, 0.0, 0.0 + emitColor = tuple(((c * emit) + ambiColor[i]) / 2.0 for i, c in enumerate(diffuseColor)) + shininess = mat.specular_hardness / 512.0 + specColor = tuple((c + 0.001) / (1.25 / (mat.specular_intensity + 0.001)) for c in mat.specular_color) transp = 1.0 - mat.alpha if mat.use_shadeless: - ambient = 1 - shine = 1 - specR = emitR = diffuseR - specG = emitG = diffuseG - specB = emitB = diffuseB - - # Clamp to be safe - specR= max(min(specR, 1.0), 0.0) - specG= max(min(specG, 1.0), 0.0) - specB= max(min(specB, 1.0), 0.0) - - diffuseR= max(min(diffuseR, 1.0), 0.0) - diffuseG= max(min(diffuseG, 1.0), 0.0) - diffuseB= max(min(diffuseB, 1.0), 0.0) - - emitR= max(min(emitR, 1.0), 0.0) - emitG= max(min(emitG, 1.0), 0.0) - emitB= max(min(emitB, 1.0), 0.0) + ambient = 1.0 + shininess = 0.0 + specColor = emitColor = diffuseColor self.writeIndented("" % (round(transp,self.cp))) + self.file.write("diffuseColor=\"%s %s %s\" " % round_color(diffuseColor, self.cp)) + self.file.write("specularColor=\"%s %s %s\" " % round_color(specColor, self.cp)) + self.file.write("emissiveColor=\"%s %s %s\" \n" % round_color(emitColor, self.cp)) + self.writeIndented("ambientIntensity=\"%s\" " % (round(ambient, self.cp))) + self.file.write("shininess=\"%s\" " % (round(shininess, self.cp))) + self.file.write("transparency=\"%s\" />" % (round(transp, self.cp))) self.writeIndented("\n",-1) def writeImageTexture(self, image): @@ -680,54 +659,45 @@ class x3d_class: def writeBackground(self, world, alltextures): if world: worldname = world.name else: return - blending = (world.use_sky_blend, world.use_sky_paper, world.use_sky_real) - # blending = world.getSkytype() - grd = world.horizon_color - # grd = world.getHor() - grd0, grd1, grd2 = grd[0], grd[1], grd[2] - sky = world.zenith_color - # sky = world.getZen() - sky0, sky1, sky2 = sky[0], sky[1], sky[2] - mix0, mix1, mix2 = grd[0]+sky[0], grd[1]+sky[1], grd[2]+sky[2] - mix0, mix1, mix2 = mix0/2, mix1/2, mix2/2 + blending = world.use_sky_blend, world.use_sky_paper, world.use_sky_real + + grd_triple = round_color(world.horizon_color, self.cp) + sky_triple = round_color(world.zenith_color, self.cp) + mix_triple = round_color(((grd_triple[i] + sky_triple[i]) / 2.0 for i in range(3)), self.cp) + self.file.write("\n\n") ########################################################## @@ -812,18 +775,13 @@ class x3d_class: # for ob, ob_mat in BPyObject.getDerivedObjects(ob_main): objType=ob.type objName=ob.name - if objType == "CAMERA": - # if objType == "Camera": + if objType == 'CAMERA': self.writeViewpoint(ob, ob_mat, scene) - elif objType in ("MESH", "CURVE", "SURF", "TEXT") : - # elif objType in ("Mesh", "Curve", "Surf", "Text") : + elif objType in ('MESH', 'CURVE', 'SURF', 'FONT') : if EXPORT_APPLY_MODIFIERS or objType != 'MESH': - # if EXPORT_APPLY_MODIFIERS or objType != 'Mesh': me = ob.create_mesh(scene, EXPORT_APPLY_MODIFIERS, 'PREVIEW') - # me= BPyMesh.getMeshFromObject(ob, containerMesh, EXPORT_APPLY_MODIFIERS, False, scene) else: me = ob.data - # me = ob.getData(mesh=1) self.writeIndexedFaceSet(ob, me, ob_mat, world, EXPORT_TRI = EXPORT_TRI) @@ -831,24 +789,17 @@ class x3d_class: if me != ob.data: bpy.data.meshes.remove(me) - elif objType == "LAMP": - # elif objType == "Lamp": + elif objType == 'LAMP': data= ob.data datatype=data.type if datatype == 'POINT': - # if datatype == Lamp.Types.Lamp: self.writePointLight(ob, ob_mat, data, world) elif datatype == 'SPOT': - # elif datatype == Lamp.Types.Spot: self.writeSpotLight(ob, ob_mat, data, world) elif datatype == 'SUN': - # elif datatype == Lamp.Types.Sun: self.writeDirectionalLight(ob, ob_mat, data, world) else: self.writeDirectionalLight(ob, ob_mat, data, world) - # do you think x3d could document what to do with dummy objects? - #elif objType == "Empty" and objName != "Empty": - # self.writeNode(ob, ob_mat) else: #print "Info: Ignoring [%s], object type [%s] not handle yet" % (object.name,object.getType) pass diff --git a/release/scripts/templates/background_job.py b/release/scripts/templates/background_job.py index f887e6feaef..5705e8ef53e 100644 --- a/release/scripts/templates/background_job.py +++ b/release/scripts/templates/background_job.py @@ -18,7 +18,7 @@ def example_function(body_text, save_path, render_path): for obj in scene.objects: scene.objects.unlink(obj) - txt_data = bpy.data.curves.new(name="MyText", type='TEXT') + txt_data = bpy.data.curves.new(name="MyText", type='FONT') # Text Object txt_ob = bpy.data.objects.new(name="MyText", object_data=txt_data) diff --git a/release/scripts/ui/properties_data_metaball.py b/release/scripts/ui/properties_data_metaball.py index b4bf8dc5d70..051841562e0 100644 --- a/release/scripts/ui/properties_data_metaball.py +++ b/release/scripts/ui/properties_data_metaball.py @@ -115,7 +115,7 @@ class DATA_PT_metaball_element(DataButtonsPanel, bpy.types.Panel): col.prop(metaelem, "size_y", text="Y") -class DATA_PT_custom_props_metaball(DataButtonsPanel, PropertyPanel, bpy.types.Panel): +class DATA_PT_custom_props_metaball(PropertyPanel, DataButtonsPanel, bpy.types.Panel): COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} _context_path = "object.data" diff --git a/release/scripts/ui/space_view3d.py b/release/scripts/ui/space_view3d.py index 22ae16bf041..3a3a526dab5 100644 --- a/release/scripts/ui/space_view3d.py +++ b/release/scripts/ui/space_view3d.py @@ -755,7 +755,7 @@ class VIEW3D_MT_object_specials(bpy.types.Menu): props.data_path_item = "data.dof_distance" props.input_scale = 0.02 - if obj.type in ('CURVE', 'TEXT'): + if obj.type in ('CURVE', 'FONT'): layout.operator_context = 'INVOKE_REGION_WIN' props = layout.operator("wm.context_modal_mouse", text="Extrude Size") From ee05792a7ba189cc7b1973d10a391ac56c683138 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 16 Dec 2010 09:51:55 +0000 Subject: [PATCH 188/236] missed this file before (de-duplicating enum). --- source/blender/makesrna/intern/rna_object.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 57f332a4248..5d2b2e5f178 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -92,14 +92,14 @@ EnumPropertyItem metaelem_type_items[] = { /* used for 2 enums */ #define OBTYPE_CU_CURVE {OB_CURVE, "CURVE", 0, "Curve", ""} #define OBTYPE_CU_SURF {OB_SURF, "SURFACE", 0, "Surface", ""} -#define OBTYPE_CU_TEXT {OB_FONT, "TEXT", 0, "Text", ""} +#define OBTYPE_CU_FONT {OB_FONT, "FONT", 0, "Font", ""} EnumPropertyItem object_type_items[] = { {OB_MESH, "MESH", 0, "Mesh", ""}, OBTYPE_CU_CURVE, OBTYPE_CU_SURF, {OB_MBALL, "META", 0, "Meta", ""}, - OBTYPE_CU_TEXT, + OBTYPE_CU_FONT, {0, "", 0, NULL, NULL}, {OB_ARMATURE, "ARMATURE", 0, "Armature", ""}, {OB_LATTICE, "LATTICE", 0, "Lattice", ""}, @@ -112,7 +112,7 @@ EnumPropertyItem object_type_items[] = { EnumPropertyItem object_type_curve_items[] = { OBTYPE_CU_CURVE, OBTYPE_CU_SURF, - OBTYPE_CU_TEXT, + OBTYPE_CU_FONT, {0, NULL, 0, NULL, NULL}}; @@ -1586,19 +1586,6 @@ static void rna_def_object(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem object_type_items[] = { - {OB_EMPTY, "EMPTY", 0, "Empty", ""}, - {OB_MESH, "MESH", 0, "Mesh", ""}, - {OB_CURVE, "CURVE", 0, "Curve", ""}, - {OB_SURF, "SURFACE", 0, "Surface", ""}, - {OB_FONT, "FONT", 0, "Font", ""}, - {OB_MBALL, "META", 0, "Meta", ""}, - {OB_LAMP, "LAMP", 0, "Lamp", ""}, - {OB_CAMERA, "CAMERA", 0, "Camera", ""}, - {OB_LATTICE, "LATTICE", 0, "Lattice", ""}, - {OB_ARMATURE, "ARMATURE", 0, "Armature", ""}, - {0, NULL, 0, NULL, NULL}}; - static EnumPropertyItem empty_drawtype_items[] = { {OB_ARROWS, "ARROWS", 0, "Arrows", ""}, {OB_SINGLE_ARROW, "SINGLE_ARROW", 0, "Single Arrow", ""}, From ed4e7271f163b1d98feee7b956c0229cc47dad92 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 16 Dec 2010 09:55:35 +0000 Subject: [PATCH 189/236] CMake now tests warnings are supported, GCC 4.0 wasn't working because of unsupported warnings. this can work for other compilers too, currently intel and gcc use this. --- CMakeLists.txt | 52 ++++++++++++++++++++-------------- build_files/cmake/macros.cmake | 31 ++++++++++++++++++++ 2 files changed, 61 insertions(+), 22 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 03a61a1a316..2ac45e47486 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -355,12 +355,6 @@ if(UNIX AND NOT APPLE) # GNU Compiler if(CMAKE_COMPILER_IS_GNUCC) set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing") - - # Better warnings - # note: -Wunused-parameter is added below for all GCC compilers - set(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -Wno-unknown-pragmas") - set(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare") - # Intel C++ Compiler elseif(CMAKE_C_COMPILER_ID MATCHES "Intel") # think these next two are broken @@ -379,13 +373,8 @@ if(UNIX AND NOT APPLE) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fp-model precise -prec_div -parallel") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fp-model precise -prec_div -parallel") - set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing") - # set(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -diag-enable sc3") - - set(C_WARNINGS "-Wall -Wpointer-arith -Wno-unknown-pragmas") - set(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare") - + set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing") set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -static-intel") endif() @@ -605,10 +594,6 @@ elseif(WIN32) set(LLIBS "-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid") set(PLATFORM_CFLAGS "-pipe -funsigned-char -fno-strict-aliasing") - # Better warnings - set(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -Wno-unknown-pragmas") - set(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE") endif() @@ -892,11 +877,6 @@ elseif(APPLE) set(CMAKE_C_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing") set(CMAKE_CXX_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing") endif() - - # Better warnings - set(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement -Wno-unknown-pragmas") - set(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare") - endif() @@ -1003,9 +983,37 @@ if((NOT WIN32) AND (NOT MSVC)) endif() if(CMAKE_COMPILER_IS_GNUCC) - set(C_WARNINGS "${C_WARNINGS} -Wunused-parameter -Wwrite-strings -Werror=strict-prototypes -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=return-type") + + ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS -Wall) + ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS -Wcast-align) + ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS -Wdeclaration-after-statement) + ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS -Werror=declaration-after-statement) + ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS -Werror=implicit-function-declaration) + ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS -Werror=return-type) + ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS -Werror=strict-prototypes) + ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS -Wno-char-subscripts) + ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS -Wno-unknown-pragmas) + ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS -Wpointer-arith) + ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS -Wunused-parameter) + ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS -Wwrite-strings) + + ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS -Wall) + ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS -Wno-invalid-offsetof) + ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS -Wno-sign-compare) + +elseif(CMAKE_C_COMPILER_ID MATCHES "Intel") + + ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS -Wall) + ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS -Wpointer-arith) + ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS -Wno-unknown-pragmas) + + ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS -Wall) + ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS -Wno-invalid-offsetof) + ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS -Wno-sign-compare) + endif() + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS} ${C_WARNINGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PLATFORM_CFLAGS} ${CXX_WARNINGS}") diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index 7f7ddc9d258..a246a81a545 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -275,6 +275,37 @@ macro(remove_strict_flags) endmacro() +macro(ADD_CHECK_C_COMPILER_FLAG + _CFLAGS + _FLAG) + + include(CheckCCompilerFlag) + + CHECK_C_COMPILER_FLAG(${_FLAG} SUPPORT_WALL) + + if(SUPPORT_WALL) + message(STATUS "Using CFLAG: ${_FLAG}") + set(_CFLAGS "${_CFLAGS} ${_FLAG}") + else() + message(STATUS "Unsupported CFLAG: ${_FLAG}") + endif() +endmacro() + +macro(ADD_CHECK_CXX_COMPILER_FLAG + _CXXFLAGS + _FLAG) + + include(CheckCXXCompilerFlag) + + CHECK_CXX_COMPILER_FLAG(${_FLAG} SUPPORT_WALL) + + if(SUPPORT_WALL) + message(STATUS "Using CXXFLAG: ${_FLAG}") + set(_CFLAGS "${_CXXFLAGS} ${_FLAG}") + else() + message(STATUS "Unsupported CXXFLAG: ${_FLAG}") + endif() +endmacro() macro(get_blender_version) file(READ ${CMAKE_SOURCE_DIR}/source/blender/blenkernel/BKE_blender.h CONTENT) From 0890b80ed9343ac9b86b40f612d5a994745d85d7 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Thu, 16 Dec 2010 10:25:41 +0000 Subject: [PATCH 190/236] Patch:[#25163] BGE support for Blender Font objects - unicode support Problem/Bug: ------------ There were no way to have proper unicode characters (e.g. Japanese) in Blender Game Engine. Now we can :) You can see a sample here: http://blog.mikepan.com/multi-language-support-in-blender/ Functionality Explanation: -------------------------- This patch converts the Blender Font Objects to a new BGE type: KX_FontObject This object inherits KX_GameObject.cpp and has the following properties: - text (the text of the object) - size (taken from the Blender object, usually is 1.0) - resolution (1.0 by default, maybe not really needed, but at least for debugging/the time being it's nice to have) The way we deal with linked objects is different than Blender. In Blender the text and size are a property of the Text databock. Therefore linked objects necessarily share the same text (and size, although the size of the object datablock affects that too). In BGE they are stored and accessed per object. Without that it would be problematic to have addObject adding texts that don't share the same data. Known problems/limitations/ToDo: -------------------------------- 1) support for packed font and the 2) figure why some fonts are displayed in a different size in 3DView/BGE (BLF) 3) investigate some glitches I see some times 4) support for multiline 5) support for more Blender Font Object options (text aligment, text boxes, ...) [1] Diego (bdiego) evantually will help on that. For the time being we are using the "default" (ui) font to replace the . [2] but not all of them. I need to cross check who is calculating the size/dpi in/correctly - Blender or BLF. (e.g. fonts that work well - MS Gothic) [3] I think this may be related to the resolution we are drawing the font [4] It can't/will not be handled inside BFL. So the way I see it is to implement a mini text library/api that works as a middlelayer between the drawing step and BLF. So instead of: BLF_draw(fontid, (char *)text, strlen(text)); We would do: MAGIC_ROUTINE_IM_NOT_BLF_draw(fontir, (char *)text, styleflag, width, height); [5] don't hold your breath ... but if someone wants to have fun in the holidays the (4) and (5) are part of the same problem. Code Explanation: ----------------- The patch should be simple to read. They are three may parts: 1) BL_BlenderDataConversion.cpp:: converts the OB_FONT object into a KX_FontObject.cpp and store it in the KX_Scene->m_fonts 2) KetsjiEngine.cpp::RenderFonts:: loop through the texts and call their internal drawing routine. 3) KX_FontObject.cpp:: a) constructor: load the font of the object, and store other values. b) DrawText: calculate the aspect for the given size (sounds hacky but this is how blf works) and call the render routine in RenderTools 4) KX_BlenderGL.cpp (called from rendertools) ::BL_print_game_line:: Draws the text. Using the BLF API *) In order to handle visibility of the object added with AddObject I'm adding to the m_scene.m_fonts list only the Fonts in a visible layer - unlike Cameras and Lamps where all the objects are added. Acknowledgements: ---------------- Thanks Benoit for the review and adjustment suggestions. Thanks Diego for the BFL expertise, patches and support (Latin community ftw) Thanks my boss for letting me do part of this patch during work time. Good thing we are starting a project in a partnership with a Japanese Foundation and eventual will need unicode in BGE :) for more details on that - www.nereusprogram.org - let's call it the main sponsor of this "bug feature" ;) --- .../BlenderRoutines/KX_BlenderGL.cpp | 26 ++++ .../gameengine/BlenderRoutines/KX_BlenderGL.h | 1 + .../BlenderRoutines/KX_BlenderRenderTools.cpp | 11 +- .../BlenderRoutines/KX_BlenderRenderTools.h | 10 +- .../Converter/BL_BlenderDataConversion.cpp | 20 ++- .../GamePlayer/common/CMakeLists.txt | 1 + .../GamePlayer/common/GPC_RenderTools.cpp | 33 ++++ .../GamePlayer/common/GPC_RenderTools.h | 7 + source/gameengine/GamePlayer/common/Makefile | 1 + .../gameengine/GamePlayer/common/SConscript | 1 + source/gameengine/Ketsji/CMakeLists.txt | 3 + source/gameengine/Ketsji/KX_FontObject.cpp | 147 ++++++++++++++++++ source/gameengine/Ketsji/KX_FontObject.h | 80 ++++++++++ source/gameengine/Ketsji/KX_GameObject.cpp | 4 +- source/gameengine/Ketsji/KX_KetsjiEngine.cpp | 17 ++ source/gameengine/Ketsji/KX_KetsjiEngine.h | 1 + .../gameengine/Ketsji/KX_PythonInitTypes.cpp | 2 + source/gameengine/Ketsji/KX_Scene.cpp | 29 +++- source/gameengine/Ketsji/KX_Scene.h | 28 ++++ source/gameengine/Ketsji/Makefile | 1 + source/gameengine/Ketsji/SConscript | 2 +- .../gameengine/Rasterizer/RAS_IRenderTools.h | 22 +++ 22 files changed, 440 insertions(+), 7 deletions(-) create mode 100755 source/gameengine/Ketsji/KX_FontObject.cpp create mode 100755 source/gameengine/Ketsji/KX_FontObject.h diff --git a/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp b/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp index 2515c1738d7..ee1e92eee75 100644 --- a/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp +++ b/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp @@ -123,6 +123,32 @@ void DisableForText() } } +/* Print 3D text */ +void BL_print_game_line(int fontid, const char* text, int size, int dpi, float* color, double* mat, float aspect) +{ + /* gl prepping */ + DisableForText(); + + /* the actual drawing */ + glColor4fv(color); + + /* multiply the text matrix by the object matrix */ + BLF_enable(fontid, BLF_MATRIX|BLF_ASPECT); + BLF_matrix(fontid, mat); + + /* aspect is the inverse scale that allows you to increase */ + /* your resolution without sizing the final text size */ + /* the bigger the size, the smaller the aspect */ + BLF_aspect(fontid, aspect, aspect, aspect); + + BLF_size(fontid, size, dpi); + BLF_position(fontid, 0, 0, 0); + BLF_draw(fontid, (char *)text, strlen(text)); + + BLF_disable(fontid, BLF_MATRIX|BLF_ASPECT); + glEnable(GL_DEPTH_TEST); +} + void BL_print_gamedebug_line(const char* text, int xco, int yco, int width, int height) { /* gl prepping */ diff --git a/source/gameengine/BlenderRoutines/KX_BlenderGL.h b/source/gameengine/BlenderRoutines/KX_BlenderGL.h index 9c5254dd661..6d481470517 100644 --- a/source/gameengine/BlenderRoutines/KX_BlenderGL.h +++ b/source/gameengine/BlenderRoutines/KX_BlenderGL.h @@ -47,6 +47,7 @@ void BL_HideMouse(struct wmWindow *win); void BL_NormalMouse(struct wmWindow *win); void BL_WaitMouse(struct wmWindow *win); +void BL_print_game_line(int fontid, const char* text, int size, int dpi, float* color, double* mat, float aspect); void BL_print_gamedebug_line(const char* text, int xco, int yco, int width, int height); void BL_print_gamedebug_line_padded(const char* text, int xco, int yco, int width, int height); diff --git a/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp b/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp index 3d736557535..bbc2389b875 100644 --- a/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp +++ b/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp @@ -275,7 +275,16 @@ void KX_BlenderRenderTools::applyTransform(RAS_IRasterizer* rasty,double* oglmat } } } - +void KX_BlenderRenderTools::RenderText3D(int fontid, + const char* text, + int size, + int dpi, + float* color, + double* mat, + float aspect) +{ + BL_print_game_line(fontid, text, size, dpi, color, mat, aspect); +} void KX_BlenderRenderTools::RenderText2D(RAS_TEXT_RENDER_MODE mode, const char* text, diff --git a/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.h b/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.h index 517e0713352..7d4728f5ef0 100644 --- a/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.h +++ b/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.h @@ -69,7 +69,15 @@ public: void DisableOpenGLLights(); void ProcessLighting(RAS_IRasterizer *rasty, bool uselights, const MT_Transform& viewmat); - void RenderText2D(RAS_TEXT_RENDER_MODE mode, + void RenderText3D(int fontid, + const char* text, + int size, + int dpi, + float* color, + double* mat, + float aspect); + + void RenderText2D(RAS_TEXT_RENDER_MODE mode, const char* text, int xco, int yco, diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 715e5e33e75..374f5c814d1 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -64,6 +64,7 @@ #include "KX_Light.h" #include "KX_Camera.h" #include "KX_EmptyObject.h" +#include "KX_FontObject.h" #include "MT_Point3.h" #include "MT_Transform.h" #include "MT_MinMax.h" @@ -1266,10 +1267,13 @@ static void my_get_local_bounds(Object *ob, DerivedMesh *dm, float *center, floa break; case OB_CURVE: case OB_SURF: - case OB_FONT: center[0]= center[1]= center[2]= 0.0; size[0] = size[1]=size[2]=0.0; break; + case OB_FONT: + center[0]= center[1]= center[2]= 0.0; + size[0] = size[1]=size[2]=1.0; + break; case OB_MBALL: bb= ob->bb; break; @@ -1801,6 +1805,18 @@ static KX_GameObject *gameobject_from_blenderobject( // set transformation break; } + + case OB_FONT: + { + /* font objects have no bounding box */ + gameobj = new KX_FontObject(kxscene,KX_Scene::m_callbacks, rendertools, ob); + + /* add to the list only the visible fonts */ + if((ob->lay & kxscene->GetBlenderScene()->lay) != 0) + kxscene->AddFont(static_cast(gameobj)); + break; + } + } if (gameobj) { @@ -2703,4 +2719,4 @@ void BL_ConvertBlenderObjects(struct Main* maggie, MT_Scalar distance = (activecam)? activecam->GetCameraFar() - activecam->GetCameraNear(): 100.0f; RAS_BucketManager *bucketmanager = kxscene->GetBucketManager(); bucketmanager->OptimizeBuckets(distance); -} +} \ No newline at end of file diff --git a/source/gameengine/GamePlayer/common/CMakeLists.txt b/source/gameengine/GamePlayer/common/CMakeLists.txt index e0338f672e0..43952a15431 100644 --- a/source/gameengine/GamePlayer/common/CMakeLists.txt +++ b/source/gameengine/GamePlayer/common/CMakeLists.txt @@ -37,6 +37,7 @@ set(INC ../../../../source/blender/imbuf ../../../../source/gameengine/Ketsji ../../../../source/blender/blenlib + ../../../../source/blender/blenfont ../../../../source/blender/blenkernel ../../../../source/blender ../../../../source/blender/makesdna diff --git a/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp b/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp index a985decabe4..51cd323a375 100644 --- a/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp +++ b/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp @@ -53,6 +53,10 @@ #include "GPC_RenderTools.h" +extern "C" { +#include "BLF_api.h" +} + unsigned int GPC_RenderTools::m_numgllights; @@ -276,6 +280,35 @@ void GPC_RenderTools::applyTransform(RAS_IRasterizer* rasty,double* oglmatrix,in } } +void GPC_RenderTools::RenderText3D( int fontid, + const char* text, + int size, + int dpi, + float* color, + double* mat, + float aspect) +{ + /* the actual drawing */ + glColor3fv(color); + + /* multiply the text matrix by the object matrix */ + BLF_enable(fontid, BLF_MATRIX|BLF_ASPECT); + BLF_matrix(fontid, mat); + + /* aspect is the inverse scale that allows you to increase */ + /* your resolution without sizing the final text size */ + /* the bigger the size, the smaller the aspect */ + BLF_aspect(fontid, aspect, aspect, aspect); + + BLF_size(fontid, size, dpi); + BLF_position(fontid, 0, 0, 0); + BLF_draw(fontid, (char *)text, strlen(text)); + + BLF_disable(fontid, BLF_MATRIX|BLF_ASPECT); + glEnable(GL_DEPTH_TEST); +} + + void GPC_RenderTools::RenderText2D(RAS_TEXT_RENDER_MODE mode, const char* text, diff --git a/source/gameengine/GamePlayer/common/GPC_RenderTools.h b/source/gameengine/GamePlayer/common/GPC_RenderTools.h index 378c6d8580f..714d686439d 100644 --- a/source/gameengine/GamePlayer/common/GPC_RenderTools.h +++ b/source/gameengine/GamePlayer/common/GPC_RenderTools.h @@ -68,6 +68,13 @@ public: void DisableOpenGLLights(); void ProcessLighting(RAS_IRasterizer *rasty, bool uselights, const MT_Transform& viewmat); + void RenderText3D(int fontid, + const char* text, + int size, + int dpi, + float* color, + double* mat, + float aspect); /* @attention mode is ignored here */ void RenderText2D(RAS_TEXT_RENDER_MODE mode, const char* text, diff --git a/source/gameengine/GamePlayer/common/Makefile b/source/gameengine/GamePlayer/common/Makefile index dd6aa9fc98c..39b7a4bd781 100644 --- a/source/gameengine/GamePlayer/common/Makefile +++ b/source/gameengine/GamePlayer/common/Makefile @@ -41,6 +41,7 @@ CPPFLAGS += -I$(OPENGL_HEADERS) CPPFLAGS += -I../../../blender/blenkernel CPPFLAGS += -I../../../blender/blenloader CPPFLAGS += -I../../../blender/blenlib +CPPFLAGS += -I../../../blender/blenfont CPPFLAGS += -I../../../blender/imbuf CPPFLAGS += -I../../../blender/makesdna CPPFLAGS += -I../../../blender/gpu diff --git a/source/gameengine/GamePlayer/common/SConscript b/source/gameengine/GamePlayer/common/SConscript index 873f53f25fa..f7a423f4588 100644 --- a/source/gameengine/GamePlayer/common/SConscript +++ b/source/gameengine/GamePlayer/common/SConscript @@ -26,6 +26,7 @@ incs = ['.', '#source/blender/imbuf', '#source/gameengine/Ketsji', '#source/blender/blenlib', + '#source/blender/blenfont', '#source/blender/blenkernel', '#source/blender', '#source/blender/include', diff --git a/source/gameengine/Ketsji/CMakeLists.txt b/source/gameengine/Ketsji/CMakeLists.txt index 4931299a8e5..912794d9f75 100644 --- a/source/gameengine/Ketsji/CMakeLists.txt +++ b/source/gameengine/Ketsji/CMakeLists.txt @@ -35,6 +35,7 @@ set(INC ../../../intern/moto/include ../../../source/gameengine/Ketsji ../../../source/blender/blenlib + ../../../source/blender/blenfont ../../../source/blender/blenkernel ../../../source/blender/python ../../../source/blender/python/generic @@ -70,6 +71,7 @@ set(SRC KX_ConvertPhysicsObjects.cpp KX_Dome.cpp KX_EmptyObject.cpp + KX_FontObject.cpp KX_GameActuator.cpp KX_GameObject.cpp KX_IPO_SGController.cpp @@ -135,6 +137,7 @@ set(SRC KX_ConvertPhysicsObject.h KX_Dome.h KX_EmptyObject.h + KX_FontObject.h KX_GameActuator.h KX_GameObject.h KX_IInterpolator.h diff --git a/source/gameengine/Ketsji/KX_FontObject.cpp b/source/gameengine/Ketsji/KX_FontObject.cpp new file mode 100755 index 00000000000..2bd41b8fe1a --- /dev/null +++ b/source/gameengine/Ketsji/KX_FontObject.cpp @@ -0,0 +1,147 @@ +/** + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ +#include "KX_FontObject.h" +#include "DNA_curve_types.h" +#include "KX_Scene.h" +#include "KX_PythonInit.h" + +extern "C" { +#include "BLF_api.h" +} + +#define BGE_FONT_RES 100 + +KX_FontObject::KX_FontObject( void* sgReplicationInfo, + SG_Callbacks callbacks, + RAS_IRenderTools* rendertools, + Object *ob): + KX_GameObject(sgReplicationInfo, callbacks), + m_rendertools(rendertools), + m_object(ob), + m_dpi(72), + m_resolution(1.f), + m_color(ob->col) /* initial color - non-animatable */ +{ + Curve *text = static_cast (ob->data); + m_text = text->str; + m_fsize = text->fsize; + + /* != "default" */ + /* I hope at some point Blender (2.5x) can have a single font */ + /* with unicode support for ui and OB_FONT */ + /* once we have packed working we can load the font */ + const char* filepath = text->vfont->name; + if (strcmp("", filepath) == 0) + filepath = "default"; + + /* XXX - if it's packed it will not work. waiting for bdiego (Diego) fix for that. */ + m_fontid = BLF_load(filepath); + if (m_fontid == -1) + m_fontid = BLF_load("default"); +} + +KX_FontObject::~KX_FontObject() +{ + //remove font from the scene list + //it's handled in KX_Scene::NewRemoveObject +} + +CValue* KX_FontObject::GetReplica() { + KX_FontObject* replica = new KX_FontObject(*this); + replica->ProcessReplica(); + return replica; +} + +void KX_FontObject::ProcessReplica() +{ + KX_GameObject::ProcessReplica(); + KX_GetActiveScene()->AddFont(this); +} + +void KX_FontObject::DrawText() +{ + /* only draws the text if visible */ + if(this->GetVisible() == 0) return; + + /* XXX 2DO - handle multiple lines + /* HARDCODED MULTIPLICATION FACTOR - this will affect the render resolution directly */ + float RES = BGE_FONT_RES * m_resolution; + + float size = m_fsize * m_object->size[0] * RES; + float aspect = 1.f / (m_object->size[0] * RES); + m_rendertools->RenderText3D(m_fontid, m_text, int(size), m_dpi, m_color, this->GetOpenGLMatrix(), aspect); +} + +#ifdef WITH_PYTHON + +/* ------------------------------------------------------------------------- */ +/* Python Integration Hooks */ +/* ------------------------------------------------------------------------- */ + +PyTypeObject KX_FontObject::Type = { + PyVarObject_HEAD_INIT(NULL, 0) + "KX_FontObject", + sizeof(PyObjectPlus_Proxy), + 0, + py_base_dealloc, + 0, + 0, + 0, + 0, + py_base_repr, + 0, + &KX_GameObject::Sequence, + &KX_GameObject::Mapping, + 0,0,0, + NULL, + NULL, + 0, + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, + 0,0,0,0,0,0,0, + Methods, + 0, + 0, + &KX_GameObject::Type, + 0,0,0,0,0,0, + py_base_new +}; + +PyMethodDef KX_FontObject::Methods[] = { + {NULL,NULL} //Sentinel +}; + +PyAttributeDef KX_FontObject::Attributes[] = { + KX_PYATTRIBUTE_STRING_RW("text", 0, 100, false, KX_FontObject, m_text), + KX_PYATTRIBUTE_FLOAT_RW("size", 0.0001f, 10000.0f, KX_FontObject, m_fsize), + KX_PYATTRIBUTE_FLOAT_RW("resolution", 0.0001f, 10000.0f, KX_FontObject, m_resolution), + /* KX_PYATTRIBUTE_INT_RW("dpi", 0, 10000, false, KX_FontObject, m_dpi), */// no real need for expose this I think + { NULL } //Sentinel +}; + +#endif // WITH_PYTHON diff --git a/source/gameengine/Ketsji/KX_FontObject.h b/source/gameengine/Ketsji/KX_FontObject.h new file mode 100755 index 00000000000..21fe1f0e9ea --- /dev/null +++ b/source/gameengine/Ketsji/KX_FontObject.h @@ -0,0 +1,80 @@ +/** + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ +#ifndef __KX_FONTOBJECT +#define __KX_FONTOBJECT +#include "KX_GameObject.h" +#include "DNA_vfont_types.h" +#include "RAS_IRenderTools.h" + +class KX_FontObject : public KX_GameObject +{ +public: + Py_Header; + KX_FontObject( void* sgReplicationInfo, + SG_Callbacks callbacks, + RAS_IRenderTools* rendertools, + Object *ob); + + virtual ~KX_FontObject(); + + void DrawText(); + + /** + * Inherited from CValue -- return a new copy of this + * instance allocated on the heap. Ownership of the new + * object belongs with the caller. + */ + virtual CValue* GetReplica(); + virtual void ProcessReplica(); + +protected: + STR_String m_text; + Object* m_object; + int m_fontid; + int m_dpi; + float m_fsize; + float m_resolution; + float* m_color; + + class RAS_IRenderTools* m_rendertools; //needed for drawing routine + +/* +#ifdef WITH_CXX_GUARDEDALLOC +public: + void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_FontObject"); } + void operator delete( void *mem ) { MEM_freeN(mem); } +#endif +*/ + +#ifdef WITH_PYTHON +#endif + +}; + +#endif //__KX_FONTOBJECT diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 7bd7fb8026f..f515016d0b9 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -47,6 +47,7 @@ typedef unsigned long uint_ptr; #include "KX_GameObject.h" #include "KX_Camera.h" // only for their ::Type #include "KX_Light.h" // only for their ::Type +#include "KX_FontObject.h" // only for their ::Type #include "RAS_MeshObject.h" #include "KX_MeshProxy.h" #include "KX_PolyProxy.h" @@ -3034,7 +3035,8 @@ bool ConvertPythonToGameObject(PyObject * value, KX_GameObject **object, bool py if ( PyObject_TypeCheck(value, &KX_GameObject::Type) || PyObject_TypeCheck(value, &KX_LightObject::Type) || - PyObject_TypeCheck(value, &KX_Camera::Type) ) + PyObject_TypeCheck(value, &KX_Camera::Type) || + PyObject_TypeCheck(value, &KX_FontObject::Type)) { *object = static_castBGE_PROXY_REF(value); diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp index 35d02fbc9f4..f4fd85affb6 100644 --- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp +++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp @@ -55,6 +55,7 @@ #include "KX_Scene.h" #include "MT_CmMatrix4x4.h" #include "KX_Camera.h" +#include "KX_FontObject.h" #include "KX_Dome.h" #include "KX_Light.h" #include "KX_PythonInit.h" @@ -1301,10 +1302,26 @@ void KX_KetsjiEngine::RenderFrame(KX_Scene* scene, KX_Camera* cam) #endif scene->RenderBuckets(camtrans, m_rasterizer, m_rendertools); + + //render all the font objects for this scene + RenderFonts(scene); if (scene->GetPhysicsEnvironment()) scene->GetPhysicsEnvironment()->debugDrawWorld(); } + +void KX_KetsjiEngine::RenderFonts(KX_Scene* scene) +{ + list* fonts = scene->GetFonts(); + + list::iterator it = fonts->begin(); + while(it != fonts->end()) + { + (*it)->DrawText(); + ++it; + } +} + /* To run once per scene */ diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.h b/source/gameengine/Ketsji/KX_KetsjiEngine.h index 4ce14e100cc..8b07a998c33 100644 --- a/source/gameengine/Ketsji/KX_KetsjiEngine.h +++ b/source/gameengine/Ketsji/KX_KetsjiEngine.h @@ -191,6 +191,7 @@ private: void RenderShadowBuffers(KX_Scene *scene); void SetBackGround(KX_WorldInfo* worldinfo); void DoSound(KX_Scene* scene); + void RenderFonts(KX_Scene* scene); public: KX_KetsjiEngine(class KX_ISystem* system); diff --git a/source/gameengine/Ketsji/KX_PythonInitTypes.cpp b/source/gameengine/Ketsji/KX_PythonInitTypes.cpp index 3cca4f39f85..8a9eac216d1 100644 --- a/source/gameengine/Ketsji/KX_PythonInitTypes.cpp +++ b/source/gameengine/Ketsji/KX_PythonInitTypes.cpp @@ -47,6 +47,7 @@ #include "KX_ConstraintWrapper.h" #include "KX_GameActuator.h" #include "KX_Light.h" +#include "KX_FontObject.h" #include "KX_MeshProxy.h" #include "KX_MouseFocusSensor.h" #include "KX_NetworkMessageActuator.h" @@ -193,6 +194,7 @@ void initPyTypes(void) PyType_Ready_Attr(dict, KX_GameObject, init_getset); PyType_Ready_Attr(dict, KX_IpoActuator, init_getset); PyType_Ready_Attr(dict, KX_LightObject, init_getset); + PyType_Ready_Attr(dict, KX_FontObject, init_getset); PyType_Ready_Attr(dict, KX_MeshProxy, init_getset); PyType_Ready_Attr(dict, KX_MouseFocusSensor, init_getset); PyType_Ready_Attr(dict, KX_NearSensor, init_getset); diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index 0605650bb09..1db174d72be 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -323,7 +323,10 @@ list* KX_Scene::GetCameras() return &m_cameras; } - +list* KX_Scene::GetFonts() +{ + return &m_fonts; +} void KX_Scene::SetFramingType(RAS_FrameSettings & frame_settings) { @@ -1014,6 +1017,9 @@ int KX_Scene::NewRemoveObject(class CValue* gameobj) // in case this is a camera m_cameras.remove((KX_Camera*)newobj); + // in case this is a font + m_fonts.remove((KX_FontObject*)newobj); + /* currently does nothing, keep incase we need to Unregister something */ #if 0 if (m_sceneConverter) @@ -1188,6 +1194,27 @@ void KX_Scene::ReplaceMesh(class CValue* obj,void* meshobj, bool use_gfx, bool u #endif } +/* Font Object routines */ +void KX_Scene::AddFont(KX_FontObject* font) +{ + if (!FindFont(font)) + m_fonts.push_back(font); +} + +KX_FontObject* KX_Scene::FindFont(KX_FontObject* font) +{ + list::iterator it = m_fonts.begin(); + + while ( (it != m_fonts.end()) + && ((*it) != font) ) { + ++it; + } + + return ((it == m_fonts.end()) ? NULL : (*it)); +} + + +/* Camera Object routines */ KX_Camera* KX_Scene::FindCamera(KX_Camera* cam) { list::iterator it = m_cameras.begin(); diff --git a/source/gameengine/Ketsji/KX_Scene.h b/source/gameengine/Ketsji/KX_Scene.h index 9b4a6ec5ec6..6bef3f95dde 100644 --- a/source/gameengine/Ketsji/KX_Scene.h +++ b/source/gameengine/Ketsji/KX_Scene.h @@ -136,6 +136,13 @@ protected: * The set of cameras for this scene */ list m_cameras; + + /** + * The set of fonts for this scene + */ + list m_fonts; + + /** * Various SCA managers used by the scene */ @@ -361,6 +368,27 @@ public: GetTimeEventManager( ); + /** Font Routines */ + + list* + GetFonts( + ); + + /** Find a font in the scene by pointer. */ + KX_FontObject* + FindFont( + KX_FontObject* + ); + + /** Add a camera to this scene. */ + void + AddFont( + KX_FontObject* + ); + + + /** Camera Routines */ + list* GetCameras( ); diff --git a/source/gameengine/Ketsji/Makefile b/source/gameengine/Ketsji/Makefile index 79c8626d295..3161351db90 100644 --- a/source/gameengine/Ketsji/Makefile +++ b/source/gameengine/Ketsji/Makefile @@ -60,6 +60,7 @@ CPPFLAGS += -I../Converter CPPFLAGS += -I../../blender/blenkernel CPPFLAGS += -I../../blender/blenlib CPPFLAGS += -I../../blender/blenloader +CPPFLAGS += -I../../blender/blenfont CPPFLAGS += -I../../blender/makesdna CPPFLAGS += -I../../blender/imbuf CPPFLAGS += -I../../blender/gpu diff --git a/source/gameengine/Ketsji/SConscript b/source/gameengine/Ketsji/SConscript index 3e86080a2f8..56e0db0cc20 100644 --- a/source/gameengine/Ketsji/SConscript +++ b/source/gameengine/Ketsji/SConscript @@ -12,7 +12,7 @@ incs += ' #source/kernel/gen_system #intern/string #intern/guardedalloc' incs += ' #source/gameengine/Rasterizer/RAS_OpenGLRasterizer' incs += ' #intern/audaspace/intern #source/gameengine/Converter' incs += ' #source/gameengine/BlenderRoutines #source/blender/imbuf #intern/moto/include' -incs += ' #source/gameengine/Ketsji #source/gameengine/Ketsji/KXNetwork #source/blender/blenlib' +incs += ' #source/gameengine/Ketsji #source/gameengine/Ketsji/KXNetwork #source/blender/blenlib #source/blender/blenfont' incs += ' #source/blender/blenkernel #source/blender #source/blender/editors/include' incs += ' #source/blender/makesdna #source/blender/python #source/gameengine/Rasterizer' incs += ' #source/gameengine/GameLogic #source/gameengine/Expressions #source/gameengine/Network' diff --git a/source/gameengine/Rasterizer/RAS_IRenderTools.h b/source/gameengine/Rasterizer/RAS_IRenderTools.h index 50de4980e1d..dab28de27f4 100644 --- a/source/gameengine/Rasterizer/RAS_IRenderTools.h +++ b/source/gameengine/Rasterizer/RAS_IRenderTools.h @@ -98,6 +98,28 @@ public: int drawingmode )=0; + /** + * Renders 3D text string using BFL. + * @param fontid The id of the font. + * @param text The string to render. + * @param size The size of the text. + * @param dpi The resolution of the text. + * @param color The color of the object. + * @param mat The Matrix of the text object. + * @param aspect A scaling factor to compensate for the size. + */ + virtual + void + RenderText3D(int fontid, + const char* text, + int size, + int dpi, + float* color, + double* mat, + float aspect + ) = 0; + + /** * Renders 2D text string. * @param mode The type of text From d3070ad9acbc416f416fac567d651f763a31e31d Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Thu, 16 Dec 2010 11:31:04 +0000 Subject: [PATCH 191/236] Bugfix #23658 Render: Alpha calculated for ray-traced transparency could overflow beyond 1.0. Gets clamped now. --- source/blender/render/intern/source/rayshade.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c index 2859862c9e6..f66d8b9c55e 100644 --- a/source/blender/render/intern/source/rayshade.c +++ b/source/blender/render/intern/source/rayshade.c @@ -1492,7 +1492,7 @@ void ray_trace(ShadeInput *shi, ShadeResult *shr) if(!(shi->combinedflag & SCE_PASS_REFRACT)) VECSUB(diff, diff, shr->refr); - shr->alpha= tracol[3]; + shr->alpha= MIN2(1.0f, tracol[3]); } if(do_mir) { From 566bda734acdb45f6f3244e9d1d96817dca5ff14 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 16 Dec 2010 12:48:30 +0000 Subject: [PATCH 192/236] last commit to fix warnings didnt set them at all, not it works as it should. also made cmakes output a lot quieter, messages can be uncommented for debugging or added back if other devs need this for some reason. --- CMakeLists.txt | 3 +++ build_files/cmake/macros.cmake | 26 +++++++++---------- source/blender/makesdna/intern/CMakeLists.txt | 4 +-- source/blender/makesrna/intern/CMakeLists.txt | 2 +- source/blenderplayer/CMakeLists.txt | 8 +++--- source/creator/CMakeLists.txt | 7 +++-- 6 files changed, 29 insertions(+), 21 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ac45e47486..89ee0707280 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1026,6 +1026,9 @@ if(WITH_ASSERT_ABORT) add_definitions(-DWITH_ASSERT_ABORT) endif() +# message(STATUS "Using CFLAGS: ${CMAKE_C_FLAGS}") +# message(STATUS "Using CXXFLAGS: ${CMAKE_CXX_FLAGS}") + #----------------------------------------------------------------------------- # Libraries diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index a246a81a545..b1428cdf131 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -5,7 +5,7 @@ macro(blenderlib_nolist sources includes) - message(STATUS "Configuring library ${name}") + # message(STATUS "Configuring library ${name}") include_directories(${includes}) add_library(${name} ${sources}) @@ -205,7 +205,7 @@ endmacro() macro(TEST_SSE_SUPPORT) include(CheckCSourceRuns) - message(STATUS "Detecting SSE support") + # message(STATUS "Detecting SSE support") if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_REQUIRED_FLAGS "-msse -msse2") elseif(MSVC) @@ -221,18 +221,18 @@ macro(TEST_SSE_SUPPORT) #include int main() { __m128d v = _mm_setzero_pd(); return 0; }" SUPPORT_SSE2_BUILD) - message(STATUS "Detecting SSE support") + # message(STATUS "Detecting SSE support") if(SUPPORT_SSE_BUILD) - message(STATUS " ...SSE support found.") + message(STATUS "SSE Support: detected.") else() - message(STATUS " ...SSE support missing.") + message(STATUS "SSE Support: missing.") endif() if(SUPPORT_SSE2_BUILD) - message(STATUS " ...SSE2 support found.") + message(STATUS "SSE2 Support: detected.") else() - message(STATUS " ...SSE2 support missing.") + message(STATUS "SSE2 Support: missing.") endif() endmacro() @@ -284,8 +284,8 @@ macro(ADD_CHECK_C_COMPILER_FLAG CHECK_C_COMPILER_FLAG(${_FLAG} SUPPORT_WALL) if(SUPPORT_WALL) - message(STATUS "Using CFLAG: ${_FLAG}") - set(_CFLAGS "${_CFLAGS} ${_FLAG}") + # message(STATUS "Using CFLAG: ${_FLAG}") + set(${_CFLAGS} "${${_CFLAGS}} ${_FLAG}") else() message(STATUS "Unsupported CFLAG: ${_FLAG}") endif() @@ -300,8 +300,8 @@ macro(ADD_CHECK_CXX_COMPILER_FLAG CHECK_CXX_COMPILER_FLAG(${_FLAG} SUPPORT_WALL) if(SUPPORT_WALL) - message(STATUS "Using CXXFLAG: ${_FLAG}") - set(_CFLAGS "${_CXXFLAGS} ${_FLAG}") + # message(STATUS "Using CXXFLAG: ${_FLAG}") + set(${_CXXFLAGS} "${${_CXXFLAGS}} ${_FLAG}") else() message(STATUS "Unsupported CXXFLAG: ${_FLAG}") endif() @@ -337,6 +337,6 @@ macro(get_blender_version) set(LASTITEM ${ITEM}) endforeach() - message(STATUS "Version major: ${BLENDER_VERSION_MAJOR}, Version minor: ${BLENDER_VERSION_MINOR}, Subversion: ${BLENDER_SUBVERSION}, Version: ${BLENDER_VERSION}") - message(STATUS "Minversion major: ${BLENDER_MINVERSION_MAJOR}, Minversion minor: ${BLENDER_MINVERSION_MINOR}, MinSubversion: ${BLENDER_MINSUBVERSION}, Minversion: ${BLENDER_MINVERSION}") + # message(STATUS "Version major: ${BLENDER_VERSION_MAJOR}, Version minor: ${BLENDER_VERSION_MINOR}, Subversion: ${BLENDER_SUBVERSION}, Version: ${BLENDER_VERSION}") + # message(STATUS "Minversion major: ${BLENDER_MINVERSION_MAJOR}, Minversion minor: ${BLENDER_MINVERSION_MINOR}, MinSubversion: ${BLENDER_MINSUBVERSION}, Minversion: ${BLENDER_MINVERSION}") endmacro() diff --git a/source/blender/makesdna/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt index 8329c28d42e..b6b2d2d2a13 100644 --- a/source/blender/makesdna/intern/CMakeLists.txt +++ b/source/blender/makesdna/intern/CMakeLists.txt @@ -24,6 +24,8 @@ # # ***** END GPL LICENSE BLOCK ***** +# message(STATUS "Configuring makesdna") + include_directories(../../../../intern/guardedalloc ..) # Build makesdna executable @@ -115,5 +117,3 @@ set(SRC ) blenderlib(bf_dna "${SRC}" "${INC}") - -message(STATUS "Configuring makesdna") diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 3d189edb2f2..4794e98285e 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -27,7 +27,7 @@ # Generated code has some unused vars we can ignore. remove_strict_flags() -message(STATUS "Configuring makesrna") +# message(STATUS "Configuring makesrna") file(GLOB DEFSRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.c") file(GLOB APISRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*_api.c") diff --git a/source/blenderplayer/CMakeLists.txt b/source/blenderplayer/CMakeLists.txt index 46a1d41d098..53397070be8 100644 --- a/source/blenderplayer/CMakeLists.txt +++ b/source/blenderplayer/CMakeLists.txt @@ -24,7 +24,7 @@ # # ***** END GPL LICENSE BLOCK ***** -message(STATUS "Configuring blenderplayer") +# message(STATUS "Configuring blenderplayer") setup_libdirs() @@ -139,11 +139,13 @@ if(UNIX) endif() endforeach() if(REMLIB) - message(STATUS "Removing library ${REMLIB} from blenderplayer linking because: not configured") + # message(STATUS "Removing library ${REMLIB} from blenderplayer linking because: not configured") + list(APPEND REM_MSG ${REMLIB}) list(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB}) endif() endforeach() - + list(SORT REM_MSG) + message(STATUS "Player Skipping: (${REM_MSG})") target_link_libraries(blenderplayer ${BLENDER_SORTED_LIBS}) else() target_link_libraries(blenderplayer ${BLENDER_LINK_LIBS}) diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 9561cd4831c..c3a0b003917 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -121,7 +121,7 @@ if(WITH_BUILDINFO) ) endif() -message(STATUS "Configuring blender") +# message(STATUS "Configuring blender") add_executable(blender ${EXETYPE} ${SRC}) @@ -595,10 +595,13 @@ endif() endif() endforeach() if(REMLIB) - message(STATUS "Removing library ${REMLIB} from blender linking because: not configured") + # message(STATUS "Removing library ${REMLIB} from blender linking because: not configured") + list(APPEND REM_MSG ${REMLIB}) list(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB}) endif() endforeach() + list(SORT REM_MSG) + message(STATUS "Blender Skipping: (${REM_MSG})") target_link_libraries(blender ${BLENDER_SORTED_LIBS}) #else() # target_link_libraries(blender ${BLENDER_LINK_LIBS}) From 4e26b4ec38aa62959951e2edb488661e6245ba96 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Thu, 16 Dec 2010 12:49:48 +0000 Subject: [PATCH 193/236] Bugfix #22794 Panorama render is now border-render safe. --- source/blender/render/intern/source/pipeline.c | 9 +++++---- source/blender/render/intern/source/rendercore.c | 8 +------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 15fa70ef823..8cf1ec887f3 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -1494,14 +1494,15 @@ static void *do_part_thread(void *pa_v) float panorama_pixel_rot(Render *re) { float psize, phi, xfac; + float borderfac= (float)(re->disprect.xmax - re->disprect.xmin) / (float)re->winx; /* size of 1 pixel mapped to viewplane coords */ - psize= (re->viewplane.xmax-re->viewplane.xmin)/(float)re->winx; + psize= (re->viewplane.xmax-re->viewplane.xmin)/(float)(re->winx); /* angle of a pixel */ phi= atan(psize/re->clipsta); /* correction factor for viewplane shifting, first calculate how much the viewplane angle is */ - xfac= ((re->viewplane.xmax-re->viewplane.xmin))/(float)re->xparts; + xfac= borderfac*((re->viewplane.xmax-re->viewplane.xmin))/(float)re->xparts; xfac= atan(0.5f*xfac/re->clipsta); /* and how much the same viewplane angle is wrapped */ psize= 0.5f*phi*((float)re->partx); @@ -1532,9 +1533,9 @@ static RenderPart *find_next_pano_slice(Render *re, int *minx, rctf *viewplane) if(best) { float phi= panorama_pixel_rot(re); - /* R.disprect.xmax - R.disprect.xmin rather then R.winx for border render */ + R.panodxp= (re->winx - (best->disprect.xmin + best->disprect.xmax) )/2; - R.panodxv= ((viewplane->xmax-viewplane->xmin)*R.panodxp)/(float)(R.disprect.xmax - R.disprect.xmin); + R.panodxv= ((viewplane->xmax-viewplane->xmin)*R.panodxp)/(float)(re->winx); /* shift viewplane */ R.viewplane.xmin = viewplane->xmin + R.panodxv; diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c index 3ddfabfa110..374c717ecdd 100644 --- a/source/blender/render/intern/source/rendercore.c +++ b/source/blender/render/intern/source/rendercore.c @@ -97,13 +97,7 @@ void calc_view_vector(float *view, float x, float y) else { if(R.r.mode & R_PANORAMA) { - if(R.r.mode & R_BORDER) { - /* scale by the win/border size */ - x-= R.panodxp * ((float)R.winx / (float)(R.disprect.xmax - R.disprect.xmin)); - } - else { - x-= R.panodxp; - } + x-= R.panodxp; } /* move x and y to real viewplane coords */ From 919d3413216818ef794dc897831d39059ac73f16 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Thu, 16 Dec 2010 13:43:20 +0000 Subject: [PATCH 194/236] Bugfix #24976 revisited Multi-layer images: clicking on the "Source" popup freed all memory for multilayers, even when choosing the same "File" entry again. Now it should work :) --- source/blender/blenkernel/intern/image.c | 4 +++- source/blender/makesrna/intern/rna_nodetree.c | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 4a40982b62e..f2a100134b3 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -1440,7 +1440,9 @@ void BKE_image_signal(Image *ima, ImageUser *iuser, int signal) } } - image_free_buffers(ima); + /* force reload on first use, but not for multilayer, that makes nodes and buttons in ui drawing fail */ + if(ima->type!=IMA_TYPE_MULTILAYER) + image_free_buffers(ima); ima->ok= 1; if(iuser) diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 0001537bbb9..6d87d30ea5c 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -318,8 +318,7 @@ static void rna_Node_image_layer_update(Main *bmain, Scene *scene, PointerRNA *p ImageUser *iuser= node->storage; BKE_image_multilayer_index(ima->rr, iuser); - /* do not call below function, it frees the multilayer exr */ - /* BKE_image_signal(ima, iuser, IMA_SIGNAL_SRC_CHANGE); */ + BKE_image_signal(ima, iuser, IMA_SIGNAL_SRC_CHANGE); rna_Node_update(bmain, scene, ptr); } From 0a7853478f74814a02254a18f4830089716dc07a Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 16 Dec 2010 14:49:50 +0000 Subject: [PATCH 195/236] Workaround #22856: defocus node with OpenMP could crash on Mac, just disabled OpenMP now in that case, since it's only an optimization. --- source/blender/nodes/intern/CMP_nodes/CMP_defocus.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_defocus.c b/source/blender/nodes/intern/CMP_nodes/CMP_defocus.c index a18ae13b438..d3fd7c8bcad 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_defocus.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_defocus.c @@ -378,10 +378,12 @@ static void defocus_blur(bNode *node, CompBuf *new, CompBuf *img, CompBuf *zbuf, //------------------------------------------------------------------ // main loop +#ifndef __APPLE__ /* can crash on Mac, see bug #22856, disabled for now */ #ifdef __INTEL_COMPILER /* icc doesn't like the compound statement -- internal error: 0_1506 */ #pragma omp parallel for private(y) if(!nqd->preview) schedule(guided) #else #pragma omp parallel for private(y) if(!nqd->preview && img->y*img->x > 16384) schedule(guided) +#endif #endif for (y=0; yy; y++) { unsigned int p, p4, zp, cp, cp4; From f7c60cab96146dbf7ebf0ddac9d55432afc5b37c Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Thu, 16 Dec 2010 16:09:23 +0000 Subject: [PATCH 196/236] Fix for [#25202] Blender crashes when opening smoke simulations made with Blender 2.55.1 r33530 * Since r33398 smoke only uses one pointcache, but old versions want two caches so save new files with a fake second pointcache. --- source/blender/blenloader/intern/writefile.c | 28 +++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 13b741e5661..34825af6c6a 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -143,6 +143,7 @@ Any case: direct data is ALWAYS after the lib block #include "BKE_utildefines.h" // for defines #include "BKE_modifier.h" #include "BKE_fcurve.h" +#include "BKE_pointcache.h" #include "BLO_writefile.h" #include "BLO_readfile.h" @@ -1176,19 +1177,32 @@ static void write_modifiers(WriteData *wd, ListBase *modbase) if(smd->type & MOD_SMOKE_TYPE_DOMAIN) { + if(smd->domain) + { + write_pointcaches(wd, &(smd->domain->ptcaches[0])); + + /* create fake pointcache so that old blender versions can read it */ + smd->domain->point_cache[1] = BKE_ptcache_add(&smd->domain->ptcaches[1]); + smd->domain->point_cache[1]->flag |= PTCACHE_DISK_CACHE; + smd->domain->point_cache[1]->step = 1; + + write_pointcaches(wd, &(smd->domain->ptcaches[1])); + } + writestruct(wd, DATA, "SmokeDomainSettings", 1, smd->domain); - writestruct(wd, DATA, "EffectorWeights", 1, smd->domain->effector_weights); + + if(smd->domain) { + /* cleanup the fake pointcache */ + BKE_ptcache_free_list(&smd->domain->ptcaches[1]); + smd->domain->point_cache[1] = NULL; + + writestruct(wd, DATA, "EffectorWeights", 1, smd->domain->effector_weights); + } } else if(smd->type & MOD_SMOKE_TYPE_FLOW) writestruct(wd, DATA, "SmokeFlowSettings", 1, smd->flow); else if(smd->type & MOD_SMOKE_TYPE_COLL) writestruct(wd, DATA, "SmokeCollSettings", 1, smd->coll); - - if((smd->type & MOD_SMOKE_TYPE_DOMAIN) && smd->domain) - { - write_pointcaches(wd, &(smd->domain->ptcaches[0])); - write_pointcaches(wd, &(smd->domain->ptcaches[1])); - } } else if(md->type==eModifierType_Fluidsim) { FluidsimModifierData *fluidmd = (FluidsimModifierData*) md; From e836d2a1695cdcaf5bfdb01b6bebd663b977bf28 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Thu, 16 Dec 2010 17:19:24 +0000 Subject: [PATCH 197/236] Bugfix, irc report After using loop-cut with multiple edges, transform widget disappeared. Reason was a variable being set in function not being called on cancelled operators. Now it's in Posttrans() --- .../blender/editors/transform/transform_conversions.c | 10 ---------- source/blender/editors/transform/transform_generics.c | 7 +++++++ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index d545acfb93a..4784f47218f 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -5122,16 +5122,6 @@ void special_aftertrans_update(bContext *C, TransInfo *t) clear_trans_object_base_flags(t); - if(t->spacetype == SPACE_VIEW3D) - { - View3D *v3d = t->view; - - /* restore manipulator */ - if (t->flag & T_MODAL) { - v3d->twtype = t->twtype; - } - } - #if 0 // TRANSFORM_FIX_ME if(resetslowpar) diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 8b47fbd5b4c..7dbc0b9c633 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -1159,6 +1159,13 @@ void postTrans (bContext *C, TransInfo *t) if(sima->flag & SI_LIVE_UNWRAP) ED_uvedit_live_unwrap_end(t->state == TRANS_CANCEL); } + else if(t->spacetype==SPACE_VIEW3D) { + View3D *v3d = t->sa->spacedata.first; + /* restore manipulator */ + if (t->flag & T_MODAL) { + v3d->twtype = t->twtype; + } + } if (t->mouse.data) { From b978bf39e3b89cc16024dc73421dcf54f76dfce6 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 16 Dec 2010 17:54:00 +0000 Subject: [PATCH 198/236] fix for error in testing C/C++ flags --- build_files/cmake/macros.cmake | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index b1428cdf131..ff8baa544b8 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -275,15 +275,34 @@ macro(remove_strict_flags) endmacro() + +# XXX, until cmake fix this bug! from CheckCCompilerFlag.cmakem reported 11615 +INCLUDE(CheckCSourceCompiles) +MACRO (CHECK_C_COMPILER_FLAG__INTERNAL _FLAG _RESULT) + SET(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}") + SET(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}") + CHECK_C_SOURCE_COMPILES("int main(void) { return 0;}" ${_RESULT} + # Some compilers do not fail with a bad flag + FAIL_REGEX "unrecognized .*option" # GNU + FAIL_REGEX "ignoring unknown option" # MSVC + FAIL_REGEX "[Uu]nknown option" # HP + FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro + FAIL_REGEX "command option .* is not recognized" # XL + ) + SET (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}") +ENDMACRO (CHECK_C_COMPILER_FLAG__INTERNAL) +# XXX, end duplicate code. + macro(ADD_CHECK_C_COMPILER_FLAG _CFLAGS _FLAG) - include(CheckCCompilerFlag) + # include(CheckCCompilerFlag) - CHECK_C_COMPILER_FLAG(${_FLAG} SUPPORT_WALL) - - if(SUPPORT_WALL) + # odd workaround + set(CFLAG_TEST "CFLAG_TEST") + CHECK_C_COMPILER_FLAG__INTERNAL("${_FLAG}" CFLAG_TEST) + if(CFLAG_TEST) # message(STATUS "Using CFLAG: ${_FLAG}") set(${_CFLAGS} "${${_CFLAGS}} ${_FLAG}") else() @@ -297,9 +316,10 @@ macro(ADD_CHECK_CXX_COMPILER_FLAG include(CheckCXXCompilerFlag) - CHECK_CXX_COMPILER_FLAG(${_FLAG} SUPPORT_WALL) - - if(SUPPORT_WALL) + # odd workaround + set(CFLAG_TEST "CXXFLAG_TEST") + CHECK_CXX_COMPILER_FLAG("${_FLAG}" CXXFLAG_TEST) + if(CXXFLAG_TEST) # message(STATUS "Using CXXFLAG: ${_FLAG}") set(${_CXXFLAGS} "${${_CXXFLAGS}} ${_FLAG}") else() From fdcfca54e0471f10413fbcf0ba4efd029a4d563c Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Thu, 16 Dec 2010 18:58:22 +0000 Subject: [PATCH 199/236] Annoyance fix: Using scrollwheel on properties window halted when it was over a list-button. Now it disables handling wheel events when you use scrollwheel outside of lists first. Implementation note: UI event handlers have priority over other keymaps. That's OK. In this case it's simple conflict, for which no design solution exists... wouldn't know how to do this nicer! Code is nice local and can be improved when we look into other conflicts... --- .../windowmanager/intern/wm_event_system.c | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 03ad58e67d5..0a1f3035a84 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -302,6 +302,12 @@ void wm_event_do_notifiers(bContext *C) CTX_wm_window_set(C, NULL); } +static int wm_event_always_pass(wmEvent *event) +{ + /* some events we always pass on, to ensure proper communication */ + return ISTIMER(event->type) || (event->type == WINDEACTIVATE); +} + /* ********************* ui handler ******************* */ static int wm_handler_ui_call(bContext *C, wmEventHandler *handler, wmEvent *event, int always_pass) @@ -309,8 +315,19 @@ static int wm_handler_ui_call(bContext *C, wmEventHandler *handler, wmEvent *eve ScrArea *area= CTX_wm_area(C); ARegion *region= CTX_wm_region(C); ARegion *menu= CTX_wm_menu(C); + static int do_wheel_ui= 1; + int is_wheel= ELEM(event->type, WHEELUPMOUSE, WHEELDOWNMOUSE); int retval; - + + /* UI is quite agressive with swallowing events, like scrollwheel */ + /* I realize this is not extremely nice code... when UI gets keymaps it can be maybe smarter */ + if(do_wheel_ui==0) { + if(is_wheel) + return WM_HANDLER_CONTINUE; + else if(wm_event_always_pass(event)==0) + do_wheel_ui= 1; + } + /* we set context to where ui handler came from */ if(handler->ui_area) CTX_wm_area_set(C, handler->ui_area); if(handler->ui_region) CTX_wm_region_set(C, handler->ui_region); @@ -330,10 +347,14 @@ static int wm_handler_ui_call(bContext *C, wmEventHandler *handler, wmEvent *eve CTX_wm_region_set(C, NULL); CTX_wm_menu_set(C, NULL); } - + if(retval == WM_UI_HANDLER_BREAK) return WM_HANDLER_BREAK; - + + /* event not handled in UI, if wheel then we temporarily disable it */ + if(is_wheel) + do_wheel_ui= 0; + return WM_HANDLER_CONTINUE; } @@ -1100,11 +1121,6 @@ static int wm_eventmatch(wmEvent *winevent, wmKeyMapItem *kmi) return 1; } -static int wm_event_always_pass(wmEvent *event) -{ - /* some events we always pass on, to ensure proper communication */ - return ISTIMER(event->type) || (event->type == WINDEACTIVATE); -} /* operator exists */ static void wm_event_modalkeymap(const bContext *C, wmOperator *op, wmEvent *event) From fef0549ea5f09d5d83066b9c5cc232f8f0b0568a Mon Sep 17 00:00:00 2001 From: "Guillermo S. Romero" Date: Thu, 16 Dec 2010 19:05:47 +0000 Subject: [PATCH 200/236] SVN maintenance. Plus some typo fixes in comments. --- intern/ghost/intern/GHOST_SystemWin32.cpp | 2 +- intern/ghost/intern/GHOST_WindowX11.cpp | 2 +- source/blender/blenkernel/BKE_sca.h | 2 +- source/blender/blenlib/intern/fileops.c | 2 +- source/blender/editors/render/render_opengl.c | 2 +- source/gameengine/Converter/BL_BlenderDataConversion.cpp | 2 +- source/gameengine/Ketsji/KX_FontObject.cpp | 0 source/gameengine/Ketsji/KX_FontObject.h | 0 8 files changed, 6 insertions(+), 6 deletions(-) mode change 100755 => 100644 source/gameengine/Ketsji/KX_FontObject.cpp mode change 100755 => 100644 source/gameengine/Ketsji/KX_FontObject.h diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index 371a8bf865b..5ae30d8f948 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -855,7 +855,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, * specifies a character code generated by a dead key. A dead key is a key that * generates a character, such as the umlaut (double-dot), that is combined with * another character to form a composite character. For example, the umlaut-O - * character (Ù) is generated by typing the dead key for the umlaut character, and + * character (Ö) is generated by typing the dead key for the umlaut character, and * then typing the O key. */ case WM_SYSDEADCHAR: diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp index e8b2f6f7358..b877470d710 100644 --- a/intern/ghost/intern/GHOST_WindowX11.cpp +++ b/intern/ghost/intern/GHOST_WindowX11.cpp @@ -176,7 +176,7 @@ GHOST_WindowX11( int attributes[40], i, samples; Atom atoms[2]; int natom; - int glxVersionMajor, glxVersionMinor; // As in GLX major.mino + int glxVersionMajor, glxVersionMinor; // As in GLX major.minor /* initialize incase X11 fails to load */ memset(&m_xtablet, 0, sizeof(m_xtablet)); diff --git a/source/blender/blenkernel/BKE_sca.h b/source/blender/blenkernel/BKE_sca.h index 6cafb7ef104..fa253ddf2bd 100644 --- a/source/blender/blenkernel/BKE_sca.h +++ b/source/blender/blenkernel/BKE_sca.h @@ -68,7 +68,7 @@ void clear_sca_new_poins_ob(struct Object *ob); void clear_sca_new_poins(void); void set_sca_new_poins_ob(struct Object *ob); void set_sca_new_poins(void); -void sca_remove_ob_poin(struct Object *obt, struct Object *ob); +void sca_remove_ob_poin(struct Object *obt, struct Object *ob); void sca_move_sensor(struct bSensor *sens_to_move, struct Object *ob, int move_up); void sca_move_controller(struct bController *cont_to_move, struct Object *ob, int move_up); diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c index 795938b4957..15218fb9ece 100644 --- a/source/blender/blenlib/intern/fileops.c +++ b/source/blender/blenlib/intern/fileops.c @@ -264,7 +264,7 @@ int BLI_rename(const char *from, const char *to) { return rename(from, to); } -#else /* The weirdo UNIX world */ +#else /* The UNIX world */ /* * but the UNIX world is tied to the interface, and the system diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index 8dd9adf0777..32e20100c15 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -257,7 +257,7 @@ static int screen_opengl_render_init(bContext *C, wmOperator *op) sizex= (scene->r.size*scene->r.xsch)/100; sizey= (scene->r.size*scene->r.ysch)/100; - /* corrects render size with actual size, some gfx cards return units of 256 or 512 */ + /* corrects render size with actual size, not every card supports non-power-of-two dimensions */ ofs= GPU_offscreen_create(&sizex, &sizey); if(!ofs) { diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 374f5c814d1..79afedb5f43 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -2719,4 +2719,4 @@ void BL_ConvertBlenderObjects(struct Main* maggie, MT_Scalar distance = (activecam)? activecam->GetCameraFar() - activecam->GetCameraNear(): 100.0f; RAS_BucketManager *bucketmanager = kxscene->GetBucketManager(); bucketmanager->OptimizeBuckets(distance); -} \ No newline at end of file +} diff --git a/source/gameengine/Ketsji/KX_FontObject.cpp b/source/gameengine/Ketsji/KX_FontObject.cpp old mode 100755 new mode 100644 diff --git a/source/gameengine/Ketsji/KX_FontObject.h b/source/gameengine/Ketsji/KX_FontObject.h old mode 100755 new mode 100644 From eecfc0fbb2892875d29879ebcb82289941ac4b1d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 16 Dec 2010 19:26:54 +0000 Subject: [PATCH 201/236] bugfix [#25208] randomize transform doesn't work on objects with keyframes Surprising this wasnt noticed in a much more obvious case: - Key Location, Move, Rotate, Undo-Rotate >> Resets to keyed location as well. This was happening because DAG_on_load_update() was called on read_undosave(), flagging 'ob->adt->recalc |= ADT_RECALC_ANIM;' Fix by adding an option to DAG_on_load_update(), not to recalculate time flags. --- source/blender/blenkernel/BKE_depsgraph.h | 6 +- source/blender/blenkernel/intern/anim.c | 2 +- source/blender/blenkernel/intern/blender.c | 6 +- source/blender/blenkernel/intern/depsgraph.c | 65 ++++++++++--------- source/blender/blenkernel/intern/scene.c | 2 +- .../editors/space_view3d/view3d_header.c | 2 +- .../blender/windowmanager/intern/wm_files.c | 4 +- 7 files changed, 48 insertions(+), 39 deletions(-) diff --git a/source/blender/blenkernel/BKE_depsgraph.h b/source/blender/blenkernel/BKE_depsgraph.h index e612d00f936..91954131b71 100644 --- a/source/blender/blenkernel/BKE_depsgraph.h +++ b/source/blender/blenkernel/BKE_depsgraph.h @@ -104,11 +104,11 @@ void draw_all_deps(void); void DAG_scene_sort(struct Main *bmain, struct Scene *sce); /* flag all objects that need recalc because they're animated */ -void DAG_scene_update_flags(struct Main *bmain, struct Scene *sce, unsigned int lay); +void DAG_scene_update_flags(struct Main *bmain, struct Scene *sce, unsigned int lay, const short do_time); /* flushes all recalc flags in objects down the dependency tree */ -void DAG_scene_flush_update(struct Main *bmain, struct Scene *sce, unsigned int lay, int time); +void DAG_scene_flush_update(struct Main *bmain, struct Scene *sce, unsigned int lay, const short do_time); /* tag objects for update on file load */ -void DAG_on_load_update(struct Main *bmain); +void DAG_on_load_update(struct Main *bmain, const short do_time); /* when setting manual RECALC flags, call this afterwards */ void DAG_ids_flush_update(struct Main *bmain, int time); diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c index b479bd5ef28..c372855b3eb 100644 --- a/source/blender/blenkernel/intern/anim.c +++ b/source/blender/blenkernel/intern/anim.c @@ -296,7 +296,7 @@ static void motionpaths_calc_update_scene(Scene *scene) Base *base, *last=NULL; /* only stuff that moves or needs display still */ - DAG_scene_update_flags(G.main, scene, scene->lay); + DAG_scene_update_flags(G.main, scene, scene->lay, TRUE); /* find the last object with the tag * - all those afterwards are assumed to not be relevant for our calculations diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index 6ceb75f2f83..b782d3a92a9 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -467,8 +467,10 @@ static int read_undosave(bContext *C, UndoElem *uel) strcpy(G.main->name, mainstr); /* restore */ G.fileflags= fileflags; - if(success) - DAG_on_load_update(G.main); + if(success) { + /* important not to update time here, else non keyed tranforms are lost */ + DAG_on_load_update(G.main, FALSE); + } return success; } diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index 6a97fa21aa5..2ac3946cb98 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -1923,7 +1923,7 @@ static void dag_scene_flush_layers(Scene *sce, int lay) } /* flushes all recalc flags in objects down the dependency tree */ -void DAG_scene_flush_update(Main *bmain, Scene *sce, unsigned int lay, int time) +void DAG_scene_flush_update(Main *bmain, Scene *sce, unsigned int lay, const short time) { DagNode *firstnode; DagAdjList *itA; @@ -2132,50 +2132,57 @@ static void dag_object_time_update_flags(Object *ob) } } /* flag all objects that need recalc, for changes in time for example */ -void DAG_scene_update_flags(Main *bmain, Scene *scene, unsigned int lay) +/* do_time: make this optional because undo resets objects to their animated locations without this */ +void DAG_scene_update_flags(Main *bmain, Scene *scene, unsigned int lay, const short do_time) { Base *base; Object *ob; Group *group; GroupObject *go; Scene *sce; - + /* set ob flags where animated systems are */ for(SETLOOPER(scene, base)) { ob= base->object; - - /* now if DagNode were part of base, the node->lay could be checked... */ - /* we do all now, since the scene_flush checks layers and clears recalc flags even */ - dag_object_time_update_flags(ob); - + + if(do_time) { + /* now if DagNode were part of base, the node->lay could be checked... */ + /* we do all now, since the scene_flush checks layers and clears recalc flags even */ + dag_object_time_update_flags(ob); + } + /* handled in next loop */ - if(ob->dup_group) + if(ob->dup_group) ob->dup_group->id.flag |= LIB_DOIT; - } - - /* we do groups each once */ - for(group= bmain->group.first; group; group= group->id.next) { - if(group->id.flag & LIB_DOIT) { - for(go= group->gobject.first; go; go= go->next) { - dag_object_time_update_flags(go->ob); + } + + if(do_time) { + /* we do groups each once */ + for(group= bmain->group.first; group; group= group->id.next) { + if(group->id.flag & LIB_DOIT) { + for(go= group->gobject.first; go; go= go->next) { + dag_object_time_update_flags(go->ob); + } } } } - + for(sce= scene; sce; sce= sce->set) DAG_scene_flush_update(bmain, sce, lay, 1); - /* test: set time flag, to disable baked systems to update */ - for(SETLOOPER(scene, base)) { - ob= base->object; - if(ob->recalc) - ob->recalc |= OB_RECALC_TIME; + if(do_time) { + /* test: set time flag, to disable baked systems to update */ + for(SETLOOPER(scene, base)) { + ob= base->object; + if(ob->recalc) + ob->recalc |= OB_RECALC_TIME; + } + + /* hrmf... an exception to look at once, for invisible camera object we do it over */ + if(scene->camera) + dag_object_time_update_flags(scene->camera); } - - /* hrmf... an exception to look at once, for invisible camera object we do it over */ - if(scene->camera) - dag_object_time_update_flags(scene->camera); - + /* and store the info in groupobject */ for(group= bmain->group.first; group; group= group->id.next) { if(group->id.flag & LIB_DOIT) { @@ -2231,7 +2238,7 @@ void DAG_ids_flush_update(Main *bmain, int time) DAG_scene_flush_update(bmain, sce, lay, time); } -void DAG_on_load_update(Main *bmain) +void DAG_on_load_update(Main *bmain, const short do_time) { Scene *scene, *sce; Base *base; @@ -2277,7 +2284,7 @@ void DAG_on_load_update(Main *bmain) } /* now tag update flags, to ensure deformers get calculated on redraw */ - DAG_scene_update_flags(bmain, scene, lay); + DAG_scene_update_flags(bmain, scene, lay, do_time); } } diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 9bbadbacb37..58b7f95f9c8 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -1010,7 +1010,7 @@ void scene_update_for_newframe(Main *bmain, Scene *sce, unsigned int lay) /* Following 2 functions are recursive * so dont call within 'scene_update_tagged_recursive' */ - DAG_scene_update_flags(bmain, sce, lay); // only stuff that moves or needs display still + DAG_scene_update_flags(bmain, sce, lay, TRUE); // only stuff that moves or needs display still /* All 'standard' (i.e. without any dependencies) animation is handled here, * with an 'local' to 'macro' order of evaluation. This should ensure that diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index 5c3a34801a3..213b48931b9 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -201,7 +201,7 @@ static int layers_exec(bContext *C, wmOperator *op) if(v3d->scenelock) handle_view3d_lock(C); /* new layers might need unflushed events events */ - DAG_scene_update_flags(bmain, scene, v3d->lay); /* tags all that moves and flushes */ + DAG_scene_update_flags(bmain, scene, v3d->lay, FALSE); /* tags all that moves and flushes */ ED_area_tag_redraw(sa); diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index b21d58c1053..006f96502c6 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -315,7 +315,7 @@ void WM_read_file(bContext *C, const char *name, ReportList *reports) CTX_wm_window_set(C, CTX_wm_manager(C)->windows.first); ED_editors_init(C); - DAG_on_load_update(CTX_data_main(C)); + DAG_on_load_update(CTX_data_main(C), TRUE); #ifdef WITH_PYTHON /* run any texts that were loaded in and flagged as modules */ @@ -408,7 +408,7 @@ int WM_read_homefile(bContext *C, wmOperator *op) BKE_write_undo(C, "original"); /* save current state */ ED_editors_init(C); - DAG_on_load_update(CTX_data_main(C)); + DAG_on_load_update(CTX_data_main(C), TRUE); #ifdef WITH_PYTHON if(CTX_py_init_get(C)) { From 6afe713d5785dd54d90cf856e495ed6eb0842e5c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 16 Dec 2010 21:32:56 +0000 Subject: [PATCH 202/236] script to generate qtcreator project files, advantage is they include all source which is nicer for refactoring. --- build_files/cmake/cmake_consistency_check.py | 2 + build_files/cmake/cmake_qtcreator_project.py | 94 ++++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 build_files/cmake/cmake_qtcreator_project.py diff --git a/build_files/cmake/cmake_consistency_check.py b/build_files/cmake/cmake_consistency_check.py index 7c47c1d8bfd..68b5fc0bcce 100644 --- a/build_files/cmake/cmake_consistency_check.py +++ b/build_files/cmake/cmake_consistency_check.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + # $Id$ # ***** BEGIN GPL LICENSE BLOCK ***** # diff --git a/build_files/cmake/cmake_qtcreator_project.py b/build_files/cmake/cmake_qtcreator_project.py new file mode 100644 index 00000000000..edb15443ebf --- /dev/null +++ b/build_files/cmake/cmake_qtcreator_project.py @@ -0,0 +1,94 @@ +#!/usr/bin/env python + +# $Id: +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Contributor(s): Campbell Barton +# +# ***** END GPL LICENSE BLOCK ***** + +import os +from os.path import join, dirname, normpath, abspath, splitext, relpath, exists + +base = join(os.path.dirname(__file__), "..", "..") +base = normpath(base) +base = abspath(base) + +def source_list(path, filename_check=None): + for dirpath, dirnames, filenames in os.walk(path): + + # skip '.svn' + if dirpath.startswith("."): + continue + + for filename in filenames: + filepath = join(dirpath, filename) + if filename_check is None or filename_check(filepath): + yield filepath + +# extension checking +def is_c_header(filename): + ext = splitext(filename)[1] + return (ext in (".h", ".hpp", ".hxx")) + +def is_cmake(filename): + ext = splitext(filename)[1] + return (ext == ".cmake") or (filename == "CMakeLists.txt") + +def is_c_header(filename): + ext = splitext(filename)[1] + return (ext in (".h", ".hpp", ".hxx")) + +def is_c(filename): + ext = splitext(filename)[1] + return (ext in (".c", ".cpp", ".cxx", ".m", ".mm", ".rc")) + +def is_c_any(filename): + return is_c(filename) or is_c_header(filename) + +def is_svn_file(filename): + dn, fn = os.path.split(filename) + filename_svn = join(dn, ".svn", "text-base", "%s.svn-base" % fn) + return exists(filename_svn) + +def is_project_file(filename): + return (is_c_any(filename) or is_cmake(filename)) and is_svn_file(filename) + +files = list(source_list(base, filename_check=is_project_file)) +files_rel = [relpath(f, start=base) for f in files] +files_rel.sort() + + +# --- qtcreator spesific, simple format +PROJECT_NAME = "Blender" +f = open(join(base, "%s.files" % PROJECT_NAME), 'w') +f.write("\n".join(files_rel)) + +f = open(join(base, "%s.includes" % PROJECT_NAME), 'w') +f.write("\n".join(sorted(list(set(dirname(f) for f in files_rel if is_c_header(f)))))) + +qtc_prj = join(base, "%s.creator" % PROJECT_NAME) +f = open(qtc_prj, 'w') +f.write("[General]\n") + +qtc_cfg = join(base, "%s.config" % PROJECT_NAME) +if not exists(qtc_cfg): + f = open(qtc_cfg, 'w') + f.write("// ADD PREDEFINED MACROS HERE!\n") + +print("Project file written to: %s" % qtc_prj) +# --- end From a140fdcbdba49c0b84c99367698a4bdd588908a1 Mon Sep 17 00:00:00 2001 From: "Guillermo S. Romero" Date: Thu, 16 Dec 2010 23:24:25 +0000 Subject: [PATCH 203/236] SVN maintenance. --- source/blender/blenkernel/BKE_sca.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/source/blender/blenkernel/BKE_sca.h b/source/blender/blenkernel/BKE_sca.h index fa253ddf2bd..a9238dadb27 100644 --- a/source/blender/blenkernel/BKE_sca.h +++ b/source/blender/blenkernel/BKE_sca.h @@ -1,7 +1,5 @@ /** - * blenlib/BKE_sca.h (mar-2001 nzc) - * - * $Id$ + * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -68,7 +66,7 @@ void clear_sca_new_poins_ob(struct Object *ob); void clear_sca_new_poins(void); void set_sca_new_poins_ob(struct Object *ob); void set_sca_new_poins(void); -void sca_remove_ob_poin(struct Object *obt, struct Object *ob); +void sca_remove_ob_poin(struct Object *obt, struct Object *ob); void sca_move_sensor(struct bSensor *sens_to_move, struct Object *ob, int move_up); void sca_move_controller(struct bController *cont_to_move, struct Object *ob, int move_up); From b51d86d977cf5214925acd47ad3337639a601e3f Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Fri, 17 Dec 2010 01:40:47 +0000 Subject: [PATCH 204/236] Fixed bug reported by Reuben Martin: Undoing in sculpt mode with drawing mode not set to solid didn't redraw correctly. Problem was that the non-PBVH VBOs need to be remade in that case. --- source/blender/editors/sculpt_paint/sculpt_undo.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c index a9b27ab2a15..c9912936399 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.c +++ b/source/blender/editors/sculpt_paint/sculpt_undo.c @@ -52,6 +52,8 @@ #include "WM_api.h" #include "WM_types.h" +#include "GPU_buffers.h" + #include "ED_sculpt.h" #include "paint_intern.h" #include "sculpt_intern.h" @@ -170,6 +172,9 @@ static void sculpt_undo_restore(bContext *C, ListBase *lb) if(ss->modifiers_active || ((Mesh*)ob->data)->id.us > 1) DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + + /* for non-PBVH drawing, need to recreate VBOs */ + GPU_drawobject_free(ob->derivedFinal); } } From 61a7c8d4ae0e92dc2f56df1cd157b3ba52f59c1b Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Fri, 17 Dec 2010 02:45:17 +0000 Subject: [PATCH 205/236] BGE Font: increasing the limit of the text object to 140 --- source/gameengine/Ketsji/KX_FontObject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/gameengine/Ketsji/KX_FontObject.cpp b/source/gameengine/Ketsji/KX_FontObject.cpp index 2bd41b8fe1a..f01a140c356 100644 --- a/source/gameengine/Ketsji/KX_FontObject.cpp +++ b/source/gameengine/Ketsji/KX_FontObject.cpp @@ -137,7 +137,7 @@ PyMethodDef KX_FontObject::Methods[] = { }; PyAttributeDef KX_FontObject::Attributes[] = { - KX_PYATTRIBUTE_STRING_RW("text", 0, 100, false, KX_FontObject, m_text), + KX_PYATTRIBUTE_STRING_RW("text", 0, 140, false, KX_FontObject, m_text), KX_PYATTRIBUTE_FLOAT_RW("size", 0.0001f, 10000.0f, KX_FontObject, m_fsize), KX_PYATTRIBUTE_FLOAT_RW("resolution", 0.0001f, 10000.0f, KX_FontObject, m_resolution), /* KX_PYATTRIBUTE_INT_RW("dpi", 0, 10000, false, KX_FontObject, m_dpi), */// no real need for expose this I think From 5c621bd7f5a2647547b8a18eccce8fa1dee47500 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 17 Dec 2010 04:41:48 +0000 Subject: [PATCH 206/236] cmake was complaining when there was no libs skipped. --- source/blenderplayer/CMakeLists.txt | 6 ++++-- source/creator/CMakeLists.txt | 7 ++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/source/blenderplayer/CMakeLists.txt b/source/blenderplayer/CMakeLists.txt index 53397070be8..eecb67e8882 100644 --- a/source/blenderplayer/CMakeLists.txt +++ b/source/blenderplayer/CMakeLists.txt @@ -144,8 +144,10 @@ if(UNIX) list(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB}) endif() endforeach() - list(SORT REM_MSG) - message(STATUS "Player Skipping: (${REM_MSG})") + if(REM_MSG) + list(SORT REM_MSG) + message(STATUS "Player Skipping: (${REM_MSG})") + endif() target_link_libraries(blenderplayer ${BLENDER_SORTED_LIBS}) else() target_link_libraries(blenderplayer ${BLENDER_LINK_LIBS}) diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index c3a0b003917..3328a8a1707 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -586,7 +586,6 @@ endif() list(APPEND BLENDER_SORTED_LIBS bf_quicktime) endif() - foreach(SORTLIB ${BLENDER_SORTED_LIBS}) set(REMLIB ${SORTLIB}) foreach(SEARCHLIB ${BLENDER_LINK_LIBS}) @@ -600,8 +599,10 @@ endif() list(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB}) endif() endforeach() - list(SORT REM_MSG) - message(STATUS "Blender Skipping: (${REM_MSG})") + if(REM_MSG) + list(SORT REM_MSG) + message(STATUS "Blender Skipping: (${REM_MSG})") + endif() target_link_libraries(blender ${BLENDER_SORTED_LIBS}) #else() # target_link_libraries(blender ${BLENDER_LINK_LIBS}) From 4558d45d460d5bd331cc58fc2f38c4fc87699a53 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 17 Dec 2010 05:12:36 +0000 Subject: [PATCH 207/236] WM_OT_path_open was failing with non utf8 paths. --- release/scripts/op/wm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/scripts/op/wm.py b/release/scripts/op/wm.py index 8879b2bbaf2..1435d34934c 100644 --- a/release/scripts/op/wm.py +++ b/release/scripts/op/wm.py @@ -528,7 +528,7 @@ class WM_OT_path_open(bpy.types.Operator): bl_idname = "wm.path_open" bl_label = "" - filepath = StringProperty(name="File Path", maxlen=1024) + filepath = StringProperty(name="File Path", maxlen=1024, subtype='FILE_PATH') def execute(self, context): import sys From 4474782aa3a2f72dc59f9dd81bd534cbd921175b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 17 Dec 2010 06:02:52 +0000 Subject: [PATCH 208/236] bugfix [#25260] Solidify function UV mapping problems --- source/blender/editors/mesh/editmesh_lib.c | 29 +++++++++------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/source/blender/editors/mesh/editmesh_lib.c b/source/blender/editors/mesh/editmesh_lib.c index b7ae0759f7e..acbd9a3bb3e 100644 --- a/source/blender/editors/mesh/editmesh_lib.c +++ b/source/blender/editors/mesh/editmesh_lib.c @@ -1391,27 +1391,22 @@ static short extrudeflag_edge(Object *obedit, EditMesh *em, short UNUSED(flag), if (efa->v4 && (efa->v4->tmp.v == NULL)) efa->v4->tmp.v = addvertlist(em, efa->v4->co, efa->v4); - if(del_old==0) { // keep old faces means flipping normal - if(efa->v4) - efan = addfacelist(em, efa->v4->tmp.v, efa->v3->tmp.v, - efa->v2->tmp.v, efa->v1->tmp.v, efa, efa); - else - efan = addfacelist(em, efa->v3->tmp.v, efa->v2->tmp.v, - efa->v1->tmp.v, NULL, efa, efa); + if(efa->v4) + efan = addfacelist(em, efa->v1->tmp.v, efa->v2->tmp.v, + efa->v3->tmp.v, efa->v4->tmp.v, efa, efa); + else + efan = addfacelist(em, efa->v1->tmp.v, efa->v2->tmp.v, + efa->v3->tmp.v, NULL, efa, efa); + + /* keep old faces means flipping normal, reverse vertex order gives bad UV's & VCols etc - [#25260] */ + if(del_old==0) { + flipface(em, efan); } - else { - if(efa->v4) - efan = addfacelist(em, efa->v1->tmp.v, efa->v2->tmp.v, - efa->v3->tmp.v, efa->v4->tmp.v, efa, efa); - else - efan = addfacelist(em, efa->v1->tmp.v, efa->v2->tmp.v, - efa->v3->tmp.v, NULL, efa, efa); - } - + if (em->act_face == efa) { em->act_face = efan; } - + /* for transform */ add_normal_aligned(nor, efa->n); } From 5b56bbfa0b8d48953b63bc4493078a34d3881242 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 17 Dec 2010 07:06:27 +0000 Subject: [PATCH 209/236] script which dumps ui as xml in a fake blender envieonment. useful for testing for bad api use (make sure UI uses limited functions). --- release/scripts/ui/space_info.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/release/scripts/ui/space_info.py b/release/scripts/ui/space_info.py index 8d440c0a02d..0b79063c3e9 100644 --- a/release/scripts/ui/space_info.py +++ b/release/scripts/ui/space_info.py @@ -348,6 +348,8 @@ class INFO_MT_help(bpy.types.Menu): bl_label = "Help" def draw(self, context): + import sys + layout = self.layout layout.operator("wm.url_open", text="Manual", icon='HELP').url = 'http://wiki.blender.org/index.php/Doc:Manual' @@ -366,7 +368,7 @@ class INFO_MT_help(bpy.types.Menu): layout.operator("help.operator_cheat_sheet", icon='TEXT') layout.operator("wm.sysinfo", icon='TEXT') layout.separator() - if bpy.app.build_platform[0:7] == 'Windows': + if sys.platform == "win32": layout.operator("wm.toggle_console", icon='CONSOLE') layout.separator() layout.operator("anim.update_data_paths", text="FCurve/Driver 2.54 fix", icon='HELP') From 9f3edfecfc20766df107a0c19d883bbd895ffeec Mon Sep 17 00:00:00 2001 From: Peter Schlaile Date: Fri, 17 Dec 2010 08:08:35 +0000 Subject: [PATCH 210/236] This fixes [#25011] Opacity IPO not refreshing with still images (should be better named: animation of any prefiltering parameters using still images didn't work out as expected) And this issue by private mail by Ton: "I tried to debug a memory-free error; very simple case: - add image strip - click on strip at 2 places - quit blender" --- source/blender/blenkernel/intern/sequencer.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index fac773b2c6f..74a38d785e4 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -1683,8 +1683,7 @@ static ImBuf * copy_from_ibuf_still(SeqRenderData context, Sequence * seq, ibuf = seq_stripelem_cache_get( context, seq, seq->start, SEQ_STRIPELEM_IBUF_STARTSTILL); - } - if (nr == seq->len - 1) { + } else if (nr == seq->len - 1) { ibuf = seq_stripelem_cache_get( context, seq, seq->start, SEQ_STRIPELEM_IBUF_ENDSTILL); @@ -1705,7 +1704,8 @@ static void copy_to_ibuf_still(SeqRenderData context, Sequence * seq, float nr, seq_stripelem_cache_put( context, seq, seq->start, SEQ_STRIPELEM_IBUF_STARTSTILL, ibuf); - } + } + if (nr == seq->len - 1) { seq_stripelem_cache_put( context, seq, seq->start, @@ -1969,13 +1969,14 @@ static ImBuf * seq_render_strip(SeqRenderData context, Sequence * seq, float cfr ibuf = seq_stripelem_cache_get(context, seq, cfra, SEQ_STRIPELEM_IBUF); - if (ibuf == NULL) - ibuf = copy_from_ibuf_still(context, seq, nr); - - /* currently, we cache preprocessed images */ + /* currently, we cache preprocessed images in SEQ_STRIPELEM_IBUF, + but not(!) on SEQ_STRIPELEM_IBUF_ENDSTILL and ..._STARTSTILL */ if (ibuf) use_preprocess = FALSE; + if (ibuf == NULL) + ibuf = copy_from_ibuf_still(context, seq, nr); + if (ibuf == NULL) ibuf = seq_proxy_fetch(context, seq, cfra); From 0ec7f95245478baa4b3608888d70db72cca5348b Mon Sep 17 00:00:00 2001 From: Peter Schlaile Date: Fri, 17 Dec 2010 08:53:49 +0000 Subject: [PATCH 211/236] == Sequencer == Sequence effect rendering of color generator did some rather strange fall through, because of a missing break statement. (Noone got hurt, but better add that break, just in case) --- source/blender/blenkernel/intern/sequencer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 74a38d785e4..17d63fa2349 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -1770,6 +1770,7 @@ static ImBuf* seq_render_effect_strip_impl( case EARLY_NO_INPUT: out = sh.execute(context, seq, cfra, fac, facf, NULL, NULL, NULL); + break; case EARLY_DO_EFFECT: for(i=0; i<3; i++) { if(input[i]) From 676d795d7e215052246507a1c8809e6464a696df Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 17 Dec 2010 10:33:28 +0000 Subject: [PATCH 212/236] bugfix [#25240] Custom properties panel on pinned data fail. --- release/scripts/modules/rna_prop_ui.py | 32 ++++++++++++++++--- .../scripts/ui/properties_data_armature.py | 4 ++- release/scripts/ui/properties_data_bone.py | 5 +-- release/scripts/ui/properties_data_camera.py | 1 + release/scripts/ui/properties_data_curve.py | 1 + release/scripts/ui/properties_data_lamp.py | 1 + release/scripts/ui/properties_data_lattice.py | 1 + release/scripts/ui/properties_data_mesh.py | 3 +- .../scripts/ui/properties_data_metaball.py | 3 +- release/scripts/ui/properties_material.py | 1 + release/scripts/ui/properties_object.py | 3 +- release/scripts/ui/properties_particle.py | 1 + release/scripts/ui/properties_scene.py | 1 + release/scripts/ui/properties_texture.py | 1 + release/scripts/ui/properties_world.py | 1 + 15 files changed, 49 insertions(+), 10 deletions(-) diff --git a/release/scripts/modules/rna_prop_ui.py b/release/scripts/modules/rna_prop_ui.py index cbe0b668e77..7c77a01d646 100644 --- a/release/scripts/modules/rna_prop_ui.py +++ b/release/scripts/modules/rna_prop_ui.py @@ -58,7 +58,20 @@ def rna_idprop_ui_prop_clear(item, prop): pass -def draw(layout, context, context_member, use_edit=True): +def rna_idprop_context_value(context, context_member, property_type): + space = context.space_data + pin_id = space.pin_id + + if pin_id and isinstance(pin_id, property_type): + rna_item = pin_id + context_member = "space_data.pin_id" + else: + rna_item = eval("context." + context_member) + + return rna_item, context_member + + +def draw(layout, context, context_member, property_type, use_edit=True): def assign_props(prop, val, key): prop.data_path = context_member @@ -69,12 +82,14 @@ def draw(layout, context, context_member, use_edit=True): except: pass - rna_item = eval("context." + context_member) + rna_item, context_member = rna_idprop_context_value(context, context_member, property_type) # poll should really get this... if not rna_item: return + assert(isinstance(rna_item, property_type)) + items = rna_item.items() items.sort() @@ -139,7 +154,16 @@ class PropertyPanel(): @classmethod def poll(cls, context): - return bool(eval("context.%s" % cls._context_path)) + rna_item, context_member = rna_idprop_context_value(context, cls._context_path, cls._property_type) + return bool(rna_item) + + """ + def draw_header(self, context): + rna_item, context_member = rna_idprop_context_value(context, self._context_path, self._property_type) + tot = len(rna_item.keys()) + if tot: + self.layout().label("%d:" % tot) + """ def draw(self, context): - draw(self.layout, context, self._context_path) + draw(self.layout, context, self._context_path, self._property_type) diff --git a/release/scripts/ui/properties_data_armature.py b/release/scripts/ui/properties_data_armature.py index 5cb7016a908..5e13560136b 100644 --- a/release/scripts/ui/properties_data_armature.py +++ b/release/scripts/ui/properties_data_armature.py @@ -101,7 +101,8 @@ class DATA_PT_display(ArmatureButtonsPanel, bpy.types.Panel): col = split.column() col.prop(arm, "show_group_colors", text="Colors") - col.prop(ob, "show_x_ray", text="X-Ray") + if ob: + col.prop(ob, "show_x_ray", text="X-Ray") col.prop(arm, "use_deform_delay", text="Delay Refresh") @@ -287,6 +288,7 @@ class DATA_PT_onion_skinning(OnionSkinButtonsPanel): # , bpy.types.Panel): # in class DATA_PT_custom_props_arm(ArmatureButtonsPanel, PropertyPanel, bpy.types.Panel): COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} _context_path = "object.data" + _property_type = bpy.types.Armature def register(): diff --git a/release/scripts/ui/properties_data_bone.py b/release/scripts/ui/properties_data_bone.py index 488aa01a475..30a4c635f6f 100644 --- a/release/scripts/ui/properties_data_bone.py +++ b/release/scripts/ui/properties_data_bone.py @@ -135,7 +135,7 @@ class BONE_PT_relations(BoneButtonsPanel, bpy.types.Panel): bone = context.bone arm = context.armature - if bone: + if ob and bone: pchan = ob.pose.bones[bone.name] else: bone = context.edit_bone @@ -185,7 +185,7 @@ class BONE_PT_display(BoneButtonsPanel, bpy.types.Panel): ob = context.object bone = context.bone - if bone: + if ob and bone: pchan = ob.pose.bones[bone.name] else: bone = context.edit_bone @@ -348,6 +348,7 @@ class BONE_PT_deform(BoneButtonsPanel, bpy.types.Panel): class BONE_PT_custom_props(BoneButtonsPanel, PropertyPanel, bpy.types.Panel): COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + _property_type = bpy.types.Bone, bpy.types.EditBone, bpy.types.PoseBone @property def _context_path(self): diff --git a/release/scripts/ui/properties_data_camera.py b/release/scripts/ui/properties_data_camera.py index ce8f9f7ef59..9c4f19b4c51 100644 --- a/release/scripts/ui/properties_data_camera.py +++ b/release/scripts/ui/properties_data_camera.py @@ -135,6 +135,7 @@ class DATA_PT_camera_display(CameraButtonsPanel, bpy.types.Panel): class DATA_PT_custom_props_camera(CameraButtonsPanel, PropertyPanel, bpy.types.Panel): COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} _context_path = "object.data" + _property_type = bpy.types.Camera def register(): diff --git a/release/scripts/ui/properties_data_curve.py b/release/scripts/ui/properties_data_curve.py index 821f815ed5e..33dcd8d4c7c 100644 --- a/release/scripts/ui/properties_data_curve.py +++ b/release/scripts/ui/properties_data_curve.py @@ -396,6 +396,7 @@ class DATA_PT_textboxes(CurveButtonsPanel, bpy.types.Panel): class DATA_PT_custom_props_curve(CurveButtonsPanel, PropertyPanel, bpy.types.Panel): COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} _context_path = "object.data" + _property_type = bpy.types.Curve def register(): diff --git a/release/scripts/ui/properties_data_lamp.py b/release/scripts/ui/properties_data_lamp.py index 72e95989b06..9961bf1e77f 100644 --- a/release/scripts/ui/properties_data_lamp.py +++ b/release/scripts/ui/properties_data_lamp.py @@ -390,6 +390,7 @@ class DATA_PT_falloff_curve(DataButtonsPanel, bpy.types.Panel): class DATA_PT_custom_props_lamp(DataButtonsPanel, PropertyPanel, bpy.types.Panel): COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} _context_path = "object.data" + _property_type = bpy.types.Lamp def register(): diff --git a/release/scripts/ui/properties_data_lattice.py b/release/scripts/ui/properties_data_lattice.py index 469bd07b691..ae9e9e6f3a8 100644 --- a/release/scripts/ui/properties_data_lattice.py +++ b/release/scripts/ui/properties_data_lattice.py @@ -85,6 +85,7 @@ class DATA_PT_lattice(DataButtonsPanel, bpy.types.Panel): class DATA_PT_custom_props_lattice(DataButtonsPanel, PropertyPanel, bpy.types.Panel): COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} _context_path = "object.data" + _property_type = bpy.types.Lattice def register(): diff --git a/release/scripts/ui/properties_data_mesh.py b/release/scripts/ui/properties_data_mesh.py index c26a36d8ef5..4814d067436 100644 --- a/release/scripts/ui/properties_data_mesh.py +++ b/release/scripts/ui/properties_data_mesh.py @@ -302,7 +302,7 @@ class DATA_PT_texface(MeshButtonsPanel, bpy.types.Panel): split = layout.split() col = split.column() - + col.prop(tf, "use_image") col.prop(tf, "use_light") col.prop(tf, "hide") @@ -352,6 +352,7 @@ class DATA_PT_vertex_colors(MeshButtonsPanel, bpy.types.Panel): class DATA_PT_custom_props_mesh(MeshButtonsPanel, PropertyPanel, bpy.types.Panel): COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} _context_path = "object.data" + _property_type = bpy.types.Mesh def register(): diff --git a/release/scripts/ui/properties_data_metaball.py b/release/scripts/ui/properties_data_metaball.py index 051841562e0..6cb58cb4939 100644 --- a/release/scripts/ui/properties_data_metaball.py +++ b/release/scripts/ui/properties_data_metaball.py @@ -115,9 +115,10 @@ class DATA_PT_metaball_element(DataButtonsPanel, bpy.types.Panel): col.prop(metaelem, "size_y", text="Y") -class DATA_PT_custom_props_metaball(PropertyPanel, DataButtonsPanel, bpy.types.Panel): +class DATA_PT_custom_props_metaball(DataButtonsPanel, PropertyPanel, bpy.types.Panel): COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} _context_path = "object.data" + _property_type = bpy.types.MetaBall def register(): diff --git a/release/scripts/ui/properties_material.py b/release/scripts/ui/properties_material.py index 6877d5da43a..6bfebc444b9 100644 --- a/release/scripts/ui/properties_material.py +++ b/release/scripts/ui/properties_material.py @@ -892,6 +892,7 @@ class MATERIAL_PT_volume_options(VolumeButtonsPanel, bpy.types.Panel): class MATERIAL_PT_custom_props(MaterialButtonsPanel, PropertyPanel, bpy.types.Panel): COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} _context_path = "material" + _property_type = bpy.types.Material def register(): diff --git a/release/scripts/ui/properties_object.py b/release/scripts/ui/properties_object.py index 6390f13b668..d0184c2d0af 100644 --- a/release/scripts/ui/properties_object.py +++ b/release/scripts/ui/properties_object.py @@ -335,9 +335,10 @@ class OBJECT_PT_onion_skinning(OnionSkinButtonsPanel): # , bpy.types.Panel): # self.draw_settings(context, ob.animation_visualisation) -class OBJECT_PT_custom_props(bpy.types.Panel, PropertyPanel, ObjectButtonsPanel): +class OBJECT_PT_custom_props(ObjectButtonsPanel, PropertyPanel, bpy.types.Panel): COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} _context_path = "object" + _property_type = bpy.types.Object def register(): diff --git a/release/scripts/ui/properties_particle.py b/release/scripts/ui/properties_particle.py index af60c5fd784..e8bfdf913f1 100644 --- a/release/scripts/ui/properties_particle.py +++ b/release/scripts/ui/properties_particle.py @@ -1093,6 +1093,7 @@ class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, bpy.types.Panel): class PARTICLE_PT_custom_props(ParticleButtonsPanel, PropertyPanel, bpy.types.Panel): COMPAT_ENGINES = {'BLENDER_RENDER'} _context_path = "particle_system.settings" + _property_type = bpy.types.ParticleSettings def register(): diff --git a/release/scripts/ui/properties_scene.py b/release/scripts/ui/properties_scene.py index 4855b309bf4..bc735e57493 100644 --- a/release/scripts/ui/properties_scene.py +++ b/release/scripts/ui/properties_scene.py @@ -197,6 +197,7 @@ class SCENE_PT_simplify(SceneButtonsPanel, bpy.types.Panel): class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, bpy.types.Panel): COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} _context_path = "scene" + _property_type = bpy.types.Scene from bpy.props import * diff --git a/release/scripts/ui/properties_texture.py b/release/scripts/ui/properties_texture.py index b343035b29a..c6fa942eb2d 100644 --- a/release/scripts/ui/properties_texture.py +++ b/release/scripts/ui/properties_texture.py @@ -1003,6 +1003,7 @@ class TEXTURE_PT_influence(TextureSlotPanel, bpy.types.Panel): class TEXTURE_PT_custom_props(TextureButtonsPanel, PropertyPanel, bpy.types.Panel): COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} _context_path = "texture" + _property_type = bpy.types.Texture def register(): diff --git a/release/scripts/ui/properties_world.py b/release/scripts/ui/properties_world.py index 76fb70f47d1..8b6ad827c1d 100644 --- a/release/scripts/ui/properties_world.py +++ b/release/scripts/ui/properties_world.py @@ -264,6 +264,7 @@ class WORLD_PT_stars(WorldButtonsPanel, bpy.types.Panel): class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel, bpy.types.Panel): COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} _context_path = "world" + _property_type = bpy.types.World def register(): From 48abe2a27f81db5068ab8a2d6c6849d72b109e5d Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Fri, 17 Dec 2010 13:13:32 +0000 Subject: [PATCH 213/236] Big fix: particle pointcache was cleared fully on any particle setting change * Now only the cache after current frame is cleared. * Probably own fault from my last commit. --- source/blender/blenkernel/intern/particle_system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 7e65cf26fd2..8cfc9c3e4af 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -3786,7 +3786,7 @@ static void system_step(ParticleSimulationData *sim, float cfra) /* flag for possible explode modifiers after this system */ sim->psmd->flag |= eParticleSystemFlag_Pars; - BKE_ptcache_id_clear(pid, PTCACHE_CLEAR_ALL, cfra); + BKE_ptcache_id_clear(pid, PTCACHE_CLEAR_AFTER, cfra); } /* 2. try to read from the cache */ From 12a93c5b0f4c3d2de88161669f2dd655646f222e Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Fri, 17 Dec 2010 13:29:40 +0000 Subject: [PATCH 214/236] Fix for [#25256] Particles with trailcount > 1 does not render if particles system is baked to Disk Cache. --- source/blender/render/intern/source/convertblender.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index e22e916fe86..53f418966e2 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -1931,6 +1931,9 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem float ct = (part->draw & PART_ABS_PATH_TIME) ? cfra : pa_time; float dt = length / (trail_count ? (float)trail_count : 1.0f); + /* make sure we have pointcache in memory before getting particle on path */ + psys_make_temp_pointcache(ob, psys); + for(i=0; i < trail_count; i++, ct -= dt) { if(part->draw & PART_ABS_PATH_TIME) { if(ct < pa_birthtime || ct > pa_dietime) From e5e039d626656ac430cd750f5761adfa8d94a98a Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Fri, 17 Dec 2010 14:20:20 +0000 Subject: [PATCH 215/236] Bugfix #25264 Bad user counting went on, ID users could be set zero whilst having Fake user set. Also ensured the code using the BKE calls for increment/decrement. --- source/blender/blenkernel/intern/library.c | 10 ++++++++-- source/blender/editors/interface/interface_templates.c | 4 ++-- source/blender/makesrna/intern/rna_ID.c | 6 +++--- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 8e1220dde24..ce9e7ddf0ce 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -138,8 +138,14 @@ void id_us_plus(ID *id) void id_us_min(ID *id) { - if(id) - id->us--; + if(id) { + if(id->us<2 && (id->flag & LIB_FAKEUSER)) + id->us= 1; + else if(id->us<=0) + printf("ID user decrement error: %s \n", id->name); + else + id->us--; + } } int id_make_local(ID *id, int test) diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 7e52ee6c6d0..3b5fa09abfd 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -252,8 +252,8 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event) break; case UI_ID_FAKE_USER: if(id) { - if(id->flag & LIB_FAKEUSER) id->us++; - else id->us--; + if(id->flag & LIB_FAKEUSER) id_us_plus(id); + else id_us_min(id); } else return; break; diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index 91c6fcdf40a..69342068a57 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -190,11 +190,11 @@ void rna_ID_fake_user_set(PointerRNA *ptr, int value) if(value && !(id->flag & LIB_FAKEUSER)) { id->flag |= LIB_FAKEUSER; - id->us++; + id_us_plus(id); } else if(!value && (id->flag & LIB_FAKEUSER)) { id->flag &= ~LIB_FAKEUSER; - id->us--; + id_us_min(id); } } @@ -241,7 +241,7 @@ ID *rna_ID_copy(ID *id) ID *newid; if(id_copy(id, &newid, 0)) { - if(newid) newid->us--; + if(newid) id_us_min(newid); return newid; } From 04590d86e7d9ce5c4ea4ef073145a4e3c98bf2d6 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 17 Dec 2010 14:49:38 +0000 Subject: [PATCH 216/236] fix for keymap error with renaming rna. --- source/blender/editors/space_view3d/view3d_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c index 7a25d23b56b..22494db7020 100644 --- a/source/blender/editors/space_view3d/view3d_ops.c +++ b/source/blender/editors/space_view3d/view3d_ops.c @@ -272,7 +272,7 @@ void view3d_keymap(wmKeyConfig *keyconf) RNA_string_set(kmi->ptr, "value", "MEDIAN_POINT"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", COMMAKEY, KM_PRESS, KM_ALT, 0); /* new in 2.5 */ - RNA_string_set(kmi->ptr, "data_path", "space_data.pivot_point_align"); + RNA_string_set(kmi->ptr, "data_path", "space_data.use_pivot_point_align"); kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", SPACEKEY, KM_PRESS, KM_CTRL, 0); /* new in 2.5 */ RNA_string_set(kmi->ptr, "data_path", "space_data.show_manipulator"); From f53e8b78b40084a3e37b59e81798fe8c7b5267e3 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Fri, 17 Dec 2010 15:24:03 +0000 Subject: [PATCH 217/236] Bug fix: When compositing without render (Enable composite, no renderlayer nodes) the option Full Sample AA caused havoc. Added warning for this case and gracefully stop render. --- source/blender/render/intern/source/pipeline.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 8cf1ec887f3..e458bc54468 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -2726,11 +2726,17 @@ int RE_is_rendering_allowed(Scene *scene, void *erh, void (*error)(void *handle, if(node->type==CMP_NODE_COMPOSITE) break; - if(node==NULL) { error(erh, "No Render Output Node in Scene"); return 0; } + + if(scene->r.scemode & R_FULL_SAMPLE) { + if(composite_needs_render(scene)==0) { + error(erh, "Full Sample AA not supported without 3d rendering"); + return 0; + } + } } } From 902b239aa8de92d559c7b431eaa4321d9dc2b7cf Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 17 Dec 2010 15:37:59 +0000 Subject: [PATCH 218/236] no functional changes: SETLOOPER macro assumed a scene was defined called 'sce' used to loop over, now make this an argument, helps to make it clear what's going on. --- release/scripts/presets/keyconfig/maya.py | 2 +- source/blender/blenkernel/BKE_scene.h | 4 ++-- source/blender/blenkernel/intern/collision.c | 8 ++++---- source/blender/blenkernel/intern/depsgraph.c | 17 +++++++++-------- source/blender/blenkernel/intern/pointcache.c | 6 +++--- source/blender/blenkernel/intern/scene.c | 10 +++++----- .../blender/editors/space_view3d/view3d_draw.c | 16 ++++++++-------- source/blender/gpu/intern/gpu_material.c | 4 ++-- source/blender/makesrna/intern/rna_scene.c | 4 ++-- .../render/intern/source/convertblender.c | 8 ++++---- .../Converter/BL_BlenderDataConversion.cpp | 8 ++++---- 11 files changed, 44 insertions(+), 43 deletions(-) diff --git a/release/scripts/presets/keyconfig/maya.py b/release/scripts/presets/keyconfig/maya.py index 29533fd7a41..120597cdd2a 100644 --- a/release/scripts/presets/keyconfig/maya.py +++ b/release/scripts/presets/keyconfig/maya.py @@ -173,7 +173,7 @@ kmi = km.items.new('wm.context_set_enum', 'COMMA', 'PRESS', ctrl=True) kmi.properties.data_path = 'space_data.pivot_point' kmi.properties.value = 'MEDIAN_POINT' kmi = km.items.new('wm.context_toggle', 'COMMA', 'PRESS', alt=True) -kmi.properties.data_path = 'space_data.use_pivot_point_align' +kmi.properties.data_path = 'space_data.use_pivot_point' kmi = km.items.new('wm.context_toggle', 'Q', 'PRESS') kmi.properties.data_path = 'space_data.show_manipulator' kmi = km.items.new('wm.context_set_enum', 'PERIOD', 'PRESS') diff --git a/source/blender/blenkernel/BKE_scene.h b/source/blender/blenkernel/BKE_scene.h index 4b3d3723ab5..f75e4020cb9 100644 --- a/source/blender/blenkernel/BKE_scene.h +++ b/source/blender/blenkernel/BKE_scene.h @@ -51,8 +51,8 @@ struct Text; #define SCE_COPY_LINK_DATA 2 #define SCE_COPY_FULL 3 -#define SETLOOPER(s, b) sce= s, b= _setlooper_base_step(&sce, NULL); b; b= _setlooper_base_step(&sce, b) -struct Base *_setlooper_base_step(struct Scene **sce, struct Base *base); +#define SETLOOPER(_sce_basis, _sce_iter, _base) _sce_iter= _sce_basis, _base= _setlooper_base_step(&_sce_iter, NULL); _base; _base= _setlooper_base_step(&_sce_iter, _base) +struct Base *_setlooper_base_step(struct Scene **sce_iter, struct Base *base); void free_avicodecdata(struct AviCodecData *acd); void free_qtcodecdata(struct QuicktimeCodecData *acd); diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index d39e550192b..b2d587151b1 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -1358,9 +1358,9 @@ Object **get_collisionobjects(Scene *scene, Object *self, Group *group, unsigned add_collision_object(&objs, &numobj, &maxobj, go->ob, self, 0); } else { - Scene *sce; /* for SETLOOPER macro */ + Scene *sce_iter; /* add objects in same layer in scene */ - for(SETLOOPER(scene, base)) { + for(SETLOOPER(scene, sce_iter, base)) { if(base->lay & self->lay) add_collision_object(&objs, &numobj, &maxobj, base->object, self, 0); @@ -1417,11 +1417,11 @@ ListBase *get_collider_cache(Scene *scene, Object *self, Group *group) add_collider_cache_object(&objs, go->ob, self, 0); } else { - Scene *sce; /* for SETLOOPER macro */ + Scene *sce_iter; Base *base; /* add objects in same layer in scene */ - for(SETLOOPER(scene, base)) { + for(SETLOOPER(scene, sce_iter, base)) { if(!self || (base->lay & self->lay)) add_collider_cache_object(&objs, base->object, self, 0); diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index 2ac3946cb98..1904e63c2ba 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -2139,10 +2139,10 @@ void DAG_scene_update_flags(Main *bmain, Scene *scene, unsigned int lay, const s Object *ob; Group *group; GroupObject *go; - Scene *sce; + Scene *sce_iter; /* set ob flags where animated systems are */ - for(SETLOOPER(scene, base)) { + for(SETLOOPER(scene, sce_iter, base)) { ob= base->object; if(do_time) { @@ -2167,12 +2167,12 @@ void DAG_scene_update_flags(Main *bmain, Scene *scene, unsigned int lay, const s } } - for(sce= scene; sce; sce= sce->set) - DAG_scene_flush_update(bmain, sce, lay, 1); + for(sce_iter= scene; sce_iter; sce_iter= sce_iter->set) + DAG_scene_flush_update(bmain, sce_iter, lay, 1); if(do_time) { /* test: set time flag, to disable baked systems to update */ - for(SETLOOPER(scene, base)) { + for(SETLOOPER(scene, sce_iter, base)) { ob= base->object; if(ob->recalc) ob->recalc |= OB_RECALC_TIME; @@ -2240,7 +2240,7 @@ void DAG_ids_flush_update(Main *bmain, int time) void DAG_on_load_update(Main *bmain, const short do_time) { - Scene *scene, *sce; + Scene *scene; Base *base; Object *ob; Group *group; @@ -2251,15 +2251,16 @@ void DAG_on_load_update(Main *bmain, const short do_time) dag_current_scene_layers(bmain, &scene, &lay); if(scene && scene->theDag) { + Scene *sce_iter; /* derivedmeshes and displists are not saved to file so need to be remade, tag them so they get remade in the scene update loop, note armature poses or object matrices are preserved and do not require updates, so we skip those */ dag_scene_flush_layers(scene, lay); - for(SETLOOPER(scene, base)) { + for(SETLOOPER(scene, sce_iter, base)) { ob= base->object; - node= (sce->theDag)? dag_get_node(sce->theDag, ob): NULL; + node= (sce_iter->theDag)? dag_get_node(sce_iter->theDag, ob): NULL; oblay= (node)? node->lay: ob->lay; if(oblay & lay) { diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index c43f53cc4af..d131a3c3592 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -2464,7 +2464,7 @@ void BKE_ptcache_make_cache(PTCacheBaker* baker) { Main *bmain = baker->main; Scene *scene = baker->scene; - Scene *sce; /* SETLOOPER macro only */ + Scene *sce_iter; /* SETLOOPER macro only */ Base *base; ListBase pidlist; PTCacheID *pid = baker->pid; @@ -2535,7 +2535,7 @@ void BKE_ptcache_make_cache(PTCacheBaker* baker) cache->flag &= ~PTCACHE_BAKED; } } - else for(SETLOOPER(scene, base)) { + else for(SETLOOPER(scene, sce_iter, base)) { /* cache/bake everything in the scene */ BKE_ptcache_ids_from_object(&pidlist, base->object, scene, MAX_DUPLI_RECUR); @@ -2624,7 +2624,7 @@ void BKE_ptcache_make_cache(PTCacheBaker* baker) BKE_ptcache_write_cache(pid, 0); } } - else for(SETLOOPER(scene, base)) { + else for(SETLOOPER(scene, sce_iter, base)) { BKE_ptcache_ids_from_object(&pidlist, base->object, scene, MAX_DUPLI_RECUR); for(pid=pidlist.first; pid; pid=pid->next) { diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 58b7f95f9c8..7a8c4efb51a 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -1077,20 +1077,20 @@ float get_render_aosss_error(RenderData *r, float error) } /* helper function for the SETLOOPER macro */ -Base *_setlooper_base_step(Scene **sce, Base *base) +Base *_setlooper_base_step(Scene **sce_iter, Base *base) { if(base && base->next) { /* common case, step to the next */ return base->next; } - else if(base==NULL && (*sce)->base.first) { + else if(base==NULL && (*sce_iter)->base.first) { /* first time looping, return the scenes first base */ - return (Base *)(*sce)->base.first; + return (Base *)(*sce_iter)->base.first; } else { /* reached the end, get the next base in the set */ - while((*sce= (*sce)->set)) { - base= (Base *)(*sce)->base.first; + while((*sce_iter= (*sce_iter)->set)) { + base= (Base *)(*sce_iter)->base.first; if(base) { return base; } diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 80993b45f72..6bf87e1964b 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1726,7 +1726,6 @@ void draw_depth(Scene *scene, ARegion *ar, View3D *v3d, int (* func)(void *)) { RegionView3D *rv3d= ar->regiondata; Base *base; - Scene *sce; short zbuf= v3d->zbuf; short flag= v3d->flag; float glalphaclip= U.glalphaclip; @@ -1759,7 +1758,8 @@ void draw_depth(Scene *scene, ARegion *ar, View3D *v3d, int (* func)(void *)) /* draw set first */ if(scene->set) { - for(SETLOOPER(scene->set, base)) { + Scene *sce_iter; + for(SETLOOPER(scene->set, sce_iter, base)) { if(v3d->lay & base->lay) { if (func == NULL || func(base)) { draw_object(scene, ar, v3d, base, 0); @@ -1881,14 +1881,14 @@ static void gpu_update_lamps_shadows(Scene *scene, View3D *v3d) { ListBase shadows; View3DShadow *shadow; - Scene *sce; + Scene *sce_iter; Base *base; Object *ob; shadows.first= shadows.last= NULL; /* update lamp transform and gather shadow lamps */ - for(SETLOOPER(scene, base)) { + for(SETLOOPER(scene, sce_iter, base)) { ob= base->object; if(ob->type == OB_LAMP) @@ -2036,7 +2036,6 @@ static void view3d_main_area_setup_view(Scene *scene, View3D *v3d, ARegion *ar, void ED_view3d_draw_offscreen(Scene *scene, View3D *v3d, ARegion *ar, int winx, int winy, float viewmat[][4], float winmat[][4]) { - Scene *sce; Base *base; float backcol[3]; int bwinx, bwiny; @@ -2091,7 +2090,8 @@ void ED_view3d_draw_offscreen(Scene *scene, View3D *v3d, ARegion *ar, int winx, /* draw set first */ if(scene->set) { - for(SETLOOPER(scene->set, base)) { + Scene *sce_iter; + for(SETLOOPER(scene->set, sce_iter, base)) { if(v3d->lay & base->lay) { UI_ThemeColorBlend(TH_WIRE, TH_BACK, 0.6f); draw_object(scene, ar, v3d, base, DRAW_CONSTCOLOR|DRAW_SCENESET); @@ -2295,7 +2295,6 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar) Scene *scene= CTX_data_scene(C); View3D *v3d = CTX_wm_view3d(C); RegionView3D *rv3d= CTX_wm_region_view3d(C); - Scene *sce; Base *base; Object *ob; float backcol[3]; @@ -2389,7 +2388,8 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar) /* draw set first */ if(scene->set) { - for(SETLOOPER(scene->set, base)) { + Scene *sce_iter; + for(SETLOOPER(scene->set, sce_iter, base)) { if(v3d->lay & base->lay) { diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index 592cf809a4f..b9da22b36a7 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -756,10 +756,10 @@ static void material_lights(GPUShadeInput *shi, GPUShadeResult *shr) { Base *base; Object *ob; - Scene *sce; + Scene *sce_iter; GPULamp *lamp; - for(SETLOOPER(shi->gpumat->scene, base)) { + for(SETLOOPER(shi->gpumat->scene, sce_iter, base)) { ob= base->object; if(ob->type==OB_LAMP) { diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 02b05cb7073..48de2930bd0 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -874,10 +874,10 @@ static void object_simplify_update(Object *ob) static void rna_Scene_use_simplify_update(Main *bmain, Scene *scene, PointerRNA *ptr) { - Scene *sce; + Scene *sce_iter; Base *base; - for(SETLOOPER(scene, base)) + for(SETLOOPER(scene, sce_iter, base)) object_simplify_update(base->object); DAG_ids_flush_update(bmain, 0); diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index 53f418966e2..b851728653a 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -4679,7 +4679,7 @@ static void database_init_objects(Render *re, unsigned int renderlay, int nolamp Object *ob; Group *group; ObjectInstanceRen *obi; - Scene *sce; + Scene *sce_iter; float mat[4][4]; int lay, vectorlay, redoimat= 0; @@ -4688,7 +4688,7 @@ static void database_init_objects(Render *re, unsigned int renderlay, int nolamp * NULL is just for init */ set_dupli_tex_mat(NULL, NULL, NULL); - for(SETLOOPER(re->scene, base)) { + for(SETLOOPER(re->scene, sce_iter, base)) { ob= base->object; /* imat objects has to be done here, since displace can have texture using Object map-input */ mul_m4_m4m4(mat, ob->obmat, re->viewmat); @@ -4698,7 +4698,7 @@ static void database_init_objects(Render *re, unsigned int renderlay, int nolamp ob->transflag &= ~OB_RENDER_DUPLI; } - for(SETLOOPER(re->scene, base)) { + for(SETLOOPER(re->scene, sce_iter, base)) { ob= base->object; /* in the prev/next pass for making speed vectors, avoid creating @@ -4836,7 +4836,7 @@ static void database_init_objects(Render *re, unsigned int renderlay, int nolamp /* imat objects has to be done again, since groups can mess it up */ if(redoimat) { - for(SETLOOPER(re->scene, base)) { + for(SETLOOPER(re->scene, sce_iter, base)) { ob= base->object; mul_m4_m4m4(mat, ob->obmat, re->viewmat); invert_m4_m4(ob->imat, mat); diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 79afedb5f43..47e31585148 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -227,10 +227,10 @@ static unsigned int KX_Mcol2uint_new(MCol col) static void SetDefaultFaceType(Scene* scene) { default_face_mode = TF_DYNAMIC; - Scene *sce; + Scene *sce_iter; Base *base; - for(SETLOOPER(scene,base)) + for(SETLOOPER(scene, sce_iter, base)) { if (base->object->type == OB_LAMP) { @@ -1931,7 +1931,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie, Scene *blenderscene = kxscene->GetBlenderScene(); // for SETLOOPER - Scene *sce; + Scene *sce_iter; Base *base; // Get the frame settings of the canvas. @@ -2012,7 +2012,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie, // Beware of name conflict in linked data, it will not crash but will create confusion // in Python scripting and in certain actuators (replace mesh). Linked scene *should* have // no conflicting name for Object, Object data and Action. - for (SETLOOPER(blenderscene, base)) + for (SETLOOPER(blenderscene, sce_iter, base)) { Object* blenderobject = base->object; allblobj.insert(blenderobject); From f90a2123eedc6cb82cfe9ad1c2ab64ba2f1e0c38 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 17 Dec 2010 15:51:42 +0000 Subject: [PATCH 219/236] no functional change: only check against OB_RECALC_ALL but don't use for assignment. Makes adding new flags give ambiguous results and also makes it less easy to tell whats intended. In some places it looks like OB_RECALC_TIME should be left out too. --- source/blender/blenkernel/intern/exotic.c | 2 +- source/blender/blenkernel/intern/library.c | 2 +- source/blender/blenkernel/intern/object.c | 14 +++++++------- source/blender/blenloader/intern/readfile.c | 8 ++++---- source/blender/collada/DocumentImporter.cpp | 2 +- source/blender/editors/animation/anim_deps.c | 4 ++-- source/blender/editors/animation/keyingsets.c | 2 +- source/blender/editors/object/object_add.c | 8 ++++---- source/blender/editors/object/object_edit.c | 2 +- source/blender/editors/object/object_relations.c | 16 ++++++++-------- .../editors/transform/transform_conversions.c | 2 +- .../blender/editors/transform/transform_snap.c | 2 +- source/blender/makesdna/DNA_object_types.h | 3 ++- source/blender/makesrna/intern/rna_access.c | 2 +- .../blender/makesrna/intern/rna_object_force.c | 8 ++++---- source/blender/makesrna/intern/rna_scene.c | 2 +- 16 files changed, 40 insertions(+), 39 deletions(-) diff --git a/source/blender/blenkernel/intern/exotic.c b/source/blender/blenkernel/intern/exotic.c index 51fd5e1e4c6..53c3534bce3 100644 --- a/source/blender/blenkernel/intern/exotic.c +++ b/source/blender/blenkernel/intern/exotic.c @@ -2376,7 +2376,7 @@ static void dxf_read(Scene *scene, const char *filename) ob->dupon= 1; ob->dupoff= 0; ob->dupsta= 1; ob->dupend= 100; - ob->recalc= OB_RECALC_ALL; /* needed because of weird way of adding libdata directly */ + ob->recalc= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; /* needed because of weird way of adding libdata directly */ ob->data= obdata; ((ID*)ob->data)->us++; diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index ce9e7ddf0ce..cac0b64a6b6 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -450,7 +450,7 @@ void recalc_all_library_objects(Main *main) /* flag for full recalc */ for(ob=main->object.first; ob; ob=ob->id.next) if(ob->id.lib) - ob->recalc |= OB_RECALC_ALL; + ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; } /* note: MAX_LIBARRAY define should match this code */ diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index fba227eb479..54bc07b548d 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -316,7 +316,7 @@ static void unlink_object__unlinkModifierLinks(void *userData, Object *ob, Objec if (*obpoin==unlinkOb) { *obpoin = NULL; - ob->recalc |= OB_RECALC_ALL; // XXX: should this just be OB_RECALC_DATA? + ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; // XXX: should this just be OB_RECALC_DATA? } } @@ -357,7 +357,7 @@ void unlink_object(Object *ob) if(obt->parent==ob) { obt->parent= NULL; - obt->recalc |= OB_RECALC_ALL; + obt->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; } modifiers_foreachObjectLink(obt, unlink_object__unlinkModifierLinks, ob); @@ -367,15 +367,15 @@ void unlink_object(Object *ob) if(cu->bevobj==ob) { cu->bevobj= NULL; - obt->recalc |= OB_RECALC_ALL; + obt->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; } if(cu->taperobj==ob) { cu->taperobj= NULL; - obt->recalc |= OB_RECALC_ALL; + obt->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; } if(cu->textoncurve==ob) { cu->textoncurve= NULL; - obt->recalc |= OB_RECALC_ALL; + obt->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; } } else if(obt->type==OB_ARMATURE && obt->pose) { @@ -1078,7 +1078,7 @@ Object *add_object(struct Scene *scene, int type) base= scene_add_base(scene, ob); scene_select_base(scene, base); - ob->recalc |= OB_RECALC_ALL; + ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; return ob; } @@ -1538,7 +1538,7 @@ void object_make_proxy(Object *ob, Object *target, Object *gob) ob->proxy_group= gob; id_lib_extern(&target->id); - ob->recalc= target->recalc= OB_RECALC_ALL; + ob->recalc= target->recalc= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; /* copy transform * - gob means this proxy comes from a group, just apply the matrix diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 6e3376c8834..9e63b1be87d 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2248,7 +2248,7 @@ static void lib_link_pose(FileData *fd, Object *ob, bPose *pose) } if(rebuild) { - ob->recalc= OB_RECALC_ALL; + ob->recalc= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; pose->flag |= POSE_RECALC; } } @@ -3505,7 +3505,7 @@ static void lib_link_object(FileData *fd, Main *main) /* this triggers object_update to always use a copy */ ob->proxy->proxy_from= ob; /* force proxy updates after load/undo, a bit weak */ - ob->recalc= ob->proxy->recalc= OB_RECALC_ALL; + ob->recalc= ob->proxy->recalc= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; } } ob->proxy_group= newlibadr(fd, ob->id.lib, ob->proxy_group); @@ -7955,7 +7955,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) if(ob->type==OB_ARMATURE) { if(ob->pose) ob->pose->flag |= POSE_RECALC; - ob->recalc |= OB_RECALC_ALL; // cannot call stuff now (pointers!), done in setup_app_data + ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; // cannot call stuff now (pointers!), done in setup_app_data /* new generic xray option */ arm= newlibadr(fd, lib, ob->data); @@ -12351,7 +12351,7 @@ static void give_base_to_groups(Main *mainvar, Scene *scene) base= scene_add_base(scene, ob); base->flag |= SELECT; base->object->flag= base->flag; - ob->recalc |= OB_RECALC_ALL; + ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; scene->basact= base; /* assign the group */ diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp index 818b78fdd6d..f7ee0dbd16d 100644 --- a/source/blender/collada/DocumentImporter.cpp +++ b/source/blender/collada/DocumentImporter.cpp @@ -308,7 +308,7 @@ private: Object* DocumentImporter::create_instance_node(Object *source_ob, COLLADAFW::Node *source_node, COLLADAFW::Node *instance_node, Scene *sce, bool is_library_node) { Object *obn = copy_object(source_ob); - obn->recalc |= OB_RECALC_ALL; + obn->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; scene_add_base(sce, obn); if (instance_node) diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c index 8ea113cedb9..02d69fd61fa 100644 --- a/source/blender/editors/animation/anim_deps.c +++ b/source/blender/editors/animation/anim_deps.c @@ -90,7 +90,7 @@ void ANIM_list_elem_update(Scene *scene, bAnimListElem *ale) else { /* in other case we do standard depsgaph update, ideally we'd be calling property update functions here too ... */ - DAG_id_tag_update(id, OB_RECALC_ALL); // XXX or do we want something more restrictive? + DAG_id_tag_update(id, OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME); // XXX or do we want something more restrictive? } } @@ -106,7 +106,7 @@ void ANIM_id_update(Scene *UNUSED(scene), ID *id) adt->recalc |= ADT_RECALC_ANIM; /* set recalc flags */ - DAG_id_tag_update(id, OB_RECALC_ALL); // XXX or do we want something more restrictive? + DAG_id_tag_update(id, OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME); // XXX or do we want something more restrictive? } } diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c index 9c801d97ba8..61cf17adf81 100644 --- a/source/blender/editors/animation/keyingsets.c +++ b/source/blender/editors/animation/keyingsets.c @@ -926,7 +926,7 @@ int ANIM_apply_keyingset (bContext *C, ListBase *dsources, bAction *act, KeyingS { Object *ob= (Object *)ksp->id; - ob->recalc |= OB_RECALC_ALL; // XXX: only object transforms only? + ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; // XXX: only object transforms only? } break; } diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 5a4bbaf480c..fb0b18b011c 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -1066,7 +1066,7 @@ static Base *duplibase_for_convert(Scene *scene, Base *base, Object *ob) } obn= copy_object(ob); - obn->recalc |= OB_RECALC_ALL; + obn->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; basen= MEM_mallocN(sizeof(Base), "duplibase"); *basen= *base; @@ -1150,7 +1150,7 @@ static int convert_exec(bContext *C, wmOperator *op) newob->data= copy_mesh(me); } else { newob = ob; - ob->recalc |= OB_RECALC_ALL; + ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; } /* make new mesh data from the original copy */ @@ -1211,7 +1211,7 @@ static int convert_exec(bContext *C, wmOperator *op) for(ob1= bmain->object.first; ob1; ob1=ob1->id.next) { if(ob1->data==ob->data) { ob1->type= OB_CURVE; - ob1->recalc |= OB_RECALC_ALL; + ob1->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; } } } @@ -1404,7 +1404,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base } else { obn= copy_object(ob); - obn->recalc |= OB_RECALC_ALL; + obn->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; basen= MEM_mallocN(sizeof(Base), "duplibase"); *basen= *base; diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 2c0f232b03c..78163fa4e1d 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -460,7 +460,7 @@ void ED_object_enter_editmode(bContext *C, int flag) scene->obedit= ob; ED_armature_to_edit(ob); /* to ensure all goes in restposition and without striding */ - DAG_id_tag_update(&ob->id, OB_RECALC_ALL); // XXX: should this be OB_RECALC_DATA? + DAG_id_tag_update(&ob->id, OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME); // XXX: should this be OB_RECALC_DATA? WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_EDITMODE_ARMATURE, scene); } diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 5f1e9b43990..2b45299aefa 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -196,7 +196,7 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op) CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) { if(ob != obedit) { - ob->recalc |= OB_RECALC_ALL; + ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; par= obedit->parent; while(par) { @@ -343,7 +343,7 @@ static int make_proxy_exec (bContext *C, wmOperator *op) /* depsgraph flushes are needed for the new data */ DAG_scene_sort(bmain, scene); - DAG_id_tag_update(&newob->id, OB_RECALC_ALL); + DAG_id_tag_update(&newob->id, OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, newob); } else { @@ -434,7 +434,7 @@ static int parent_clear_exec(bContext *C, wmOperator *op) else if(type == 2) unit_m4(ob->parentinv); - ob->recalc |= OB_RECALC_ALL; + ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; } CTX_DATA_END; @@ -894,7 +894,7 @@ static int object_track_clear_exec(bContext *C, wmOperator *op) /* remove track-object for old track */ ob->track= NULL; - ob->recalc |= OB_RECALC_ALL; + ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; /* also remove all tracking constraints */ for (con= ob->constraints.last; con; con= pcon) { @@ -961,7 +961,7 @@ static int track_set_exec(bContext *C, wmOperator *op) data = con->data; data->tar = obact; - ob->recalc |= OB_RECALC_ALL; + ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; /* Lamp and Camera track differently by default */ if (ob->type == OB_LAMP || ob->type == OB_CAMERA) @@ -980,7 +980,7 @@ static int track_set_exec(bContext *C, wmOperator *op) data = con->data; data->tar = obact; - ob->recalc |= OB_RECALC_ALL; + ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; /* Lamp and Camera track differently by default */ if (ob->type == OB_LAMP || ob->type == OB_CAMERA) { @@ -1001,7 +1001,7 @@ static int track_set_exec(bContext *C, wmOperator *op) data = con->data; data->tar = obact; - ob->recalc |= OB_RECALC_ALL; + ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; /* Lamp and Camera track differently by default */ if (ob->type == OB_LAMP || ob->type == OB_CAMERA) { @@ -1289,7 +1289,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op) break; case MAKE_LINKS_MODIFIERS: object_link_modifiers(obt, ob); - obt->recalc |= OB_RECALC_ALL; + obt->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; break; } } diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 4784f47218f..0dbcfd76ecc 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -4872,7 +4872,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t) // fixme... some of this stuff is not good if (ob) { if (ob->pose || ob_get_key(ob)) - DAG_id_tag_update(&ob->id, OB_RECALC_ALL); + DAG_id_tag_update(&ob->id, OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME); else DAG_id_tag_update(&ob->id, OB_RECALC_OB); } diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index f2beb5b1053..3cc50109778 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -261,7 +261,7 @@ void applyProject(TransInfo *t) } else if (t->flag & T_OBJECT) { - td->ob->recalc |= OB_RECALC_ALL; + td->ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; object_handle_update(t->scene, td->ob); VECCOPY(iloc, td->ob->obmat[3]); } diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index a5e8e1545b0..87f03aec06a 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -437,7 +437,8 @@ extern Object workob; #define OB_RECALC_DATA 2 /* time flag is set when time changes need recalc, so baked systems can ignore it */ #define OB_RECALC_TIME 4 -#define OB_RECALC_ALL 7 + /* only use for matching any flag, NOT as an argument since more flags may be added. */ +#define OB_RECALC_ALL (OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME) /* controller state */ #define OB_MAX_STATES 30 diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index bf77d73351c..1678dc6d520 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -1282,7 +1282,7 @@ static void rna_property_update(bContext *C, Main *bmain, Scene *scene, PointerR else { /* WARNING! This is so property drivers update the display! * not especially nice */ - DAG_id_tag_update(ptr->id.data, OB_RECALC_ALL); + DAG_id_tag_update(ptr->id.data, OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME); WM_main_add_notifier(NC_WINDOW, NULL); } diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c index 3947e0366e6..a1b9af78983 100644 --- a/source/blender/makesrna/intern/rna_object_force.c +++ b/source/blender/makesrna/intern/rna_object_force.c @@ -480,7 +480,7 @@ static void rna_FieldSettings_update(Main *bmain, Scene *scene, PointerRNA *ptr) part->pd2->tex= 0; } - DAG_id_tag_update(&part->id, OB_RECALC_ALL|PSYS_RECALC_RESET); + DAG_id_tag_update(&part->id, OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME|PSYS_RECALC_RESET); WM_main_add_notifier(NC_OBJECT|ND_DRAW, NULL); } @@ -522,7 +522,7 @@ static void rna_FieldSettings_shape_update(Main *bmain, Scene *scene, PointerRNA static void rna_FieldSettings_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr) { if(particle_id_check(ptr)) { - DAG_id_tag_update((ID*)ptr->id.data, OB_RECALC_ALL|PSYS_RECALC_RESET); + DAG_id_tag_update((ID*)ptr->id.data, OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME|PSYS_RECALC_RESET); } else { Object *ob= (Object*)ptr->id.data; @@ -539,7 +539,7 @@ static void rna_FieldSettings_dependency_update(Main *bmain, Scene *scene, Point DAG_scene_sort(bmain, scene); if(ob->type == OB_CURVE && ob->pd->forcefield == PFIELD_GUIDE) - DAG_id_tag_update(&ob->id, OB_RECALC_ALL); + DAG_id_tag_update(&ob->id, OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME); else DAG_id_tag_update(&ob->id, OB_RECALC_OB); @@ -649,7 +649,7 @@ static void rna_CollisionSettings_update(Main *bmain, Scene *scene, PointerRNA * { Object *ob= (Object*)ptr->id.data; - DAG_id_tag_update(&ob->id, OB_RECALC_ALL); + DAG_id_tag_update(&ob->id, OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME); WM_main_add_notifier(NC_OBJECT|ND_DRAW, ob); } diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 48de2930bd0..2a705c39ec3 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -224,7 +224,7 @@ static Base *rna_Scene_object_link(Scene *scene, bContext *C, ReportList *report if(scene == scene_act) ob->lay= base->lay; - ob->recalc |= OB_RECALC_ALL; + ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; /* slows down importers too much, run scene.update() */ /* DAG_scene_sort(G.main, scene); */ From 031d37f4d95ec1f376273fb96d5572a1ec396bd1 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Fri, 17 Dec 2010 16:02:55 +0000 Subject: [PATCH 220/236] Bugfix #25261 Weightpaint tools now grey out when no active group exists. --- release/scripts/ui/space_view3d_toolbar.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/release/scripts/ui/space_view3d_toolbar.py b/release/scripts/ui/space_view3d_toolbar.py index aa9dfb043fe..39d590be8c8 100644 --- a/release/scripts/ui/space_view3d_toolbar.py +++ b/release/scripts/ui/space_view3d_toolbar.py @@ -1077,8 +1077,11 @@ class VIEW3D_PT_tools_weightpaint(View3DPanel, bpy.types.Panel): def draw(self, context): layout = self.layout - + + ob = context.active_object + col = layout.column() + col.active = ob.vertex_groups.active != None col.operator("object.vertex_group_normalize_all", text="Normalize All") col.operator("object.vertex_group_normalize", text="Normalize") col.operator("object.vertex_group_invert", text="Invert") From 264f37d6d82168861b3c48bac336d48a65673e34 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Fri, 17 Dec 2010 16:04:05 +0000 Subject: [PATCH 221/236] Bugfix #25261 Adding weightgroup in weight-paint now sends notifier, so buttons update --- source/blender/editors/sculpt_paint/paint_vertex.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 9ec4039a271..39768a010a8 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -1331,8 +1331,10 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *UNUSED if(me==NULL || me->totface==0) return OPERATOR_PASS_THROUGH; /* if nothing was added yet, we make dverts and a vertex deform group */ - if (!me->dvert) + if (!me->dvert) { ED_vgroup_data_create(&me->id); + WM_event_add_notifier(C, NC_GEOM|ND_DATA, me); + } /* make mode data storage */ wpd= MEM_callocN(sizeof(struct WPaintData), "WPaintData"); From fb977b793e3d4a1de3565587c11824ee060a768f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 17 Dec 2010 16:05:40 +0000 Subject: [PATCH 222/236] minor warnings removed. --- source/blender/editors/interface/interface_draw.c | 2 +- source/gameengine/Ketsji/KX_FontObject.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index be54e6a2feb..d06fe5efcf0 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -517,7 +517,7 @@ static void ui_draw_but_CHARTAB(uiBut *but) int result = 0; int charmax = G.charmax; - /* font in use. There are TTF and non-TTF fonts */ + /* FO_BUILTIN_NAME font in use. There are TTF FO_BUILTIN_NAME and non-TTF FO_BUILTIN_NAME fonts */ if(!strcmp(G.selfont->name, FO_BUILTIN_NAME)) { if(G.ui_international == TRUE) diff --git a/source/gameengine/Ketsji/KX_FontObject.cpp b/source/gameengine/Ketsji/KX_FontObject.cpp index f01a140c356..37314e80dc6 100644 --- a/source/gameengine/Ketsji/KX_FontObject.cpp +++ b/source/gameengine/Ketsji/KX_FontObject.cpp @@ -42,22 +42,22 @@ KX_FontObject::KX_FontObject( void* sgReplicationInfo, RAS_IRenderTools* rendertools, Object *ob): KX_GameObject(sgReplicationInfo, callbacks), - m_rendertools(rendertools), m_object(ob), m_dpi(72), m_resolution(1.f), - m_color(ob->col) /* initial color - non-animatable */ + m_color(ob->col), /* initial color - non-animatable */ + m_rendertools(rendertools) { Curve *text = static_cast (ob->data); m_text = text->str; m_fsize = text->fsize; - /* != "default" */ + /* FO_BUILTIN_NAME != "default" */ /* I hope at some point Blender (2.5x) can have a single font */ /* with unicode support for ui and OB_FONT */ - /* once we have packed working we can load the font */ + /* once we have packed working we can load the FO_BUILTIN_NAME font */ const char* filepath = text->vfont->name; - if (strcmp("", filepath) == 0) + if (strcmp(FO_BUILTIN_NAME, filepath) == 0) filepath = "default"; /* XXX - if it's packed it will not work. waiting for bdiego (Diego) fix for that. */ @@ -89,7 +89,7 @@ void KX_FontObject::DrawText() /* only draws the text if visible */ if(this->GetVisible() == 0) return; - /* XXX 2DO - handle multiple lines + /* XXX 2DO - handle multiple lines */ /* HARDCODED MULTIPLICATION FACTOR - this will affect the render resolution directly */ float RES = BGE_FONT_RES * m_resolution; From 7bca6bcf1f6765410b7559056d9f7d52e96cc57b Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Fri, 17 Dec 2010 17:06:36 +0000 Subject: [PATCH 223/236] Bugfix #25259 Compositor: using the icon "render only this layer" now shows progress in header, allows it to stop, and signals composite in end. --- .../editors/interface/interface_templates.c | 14 ++++++++++---- source/blender/editors/render/render_internal.c | 6 ++++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 3b5fa09abfd..a0afe3eedc3 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -2305,7 +2305,7 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C) wmWindowManager *wm= CTX_wm_manager(C); ScrArea *sa= CTX_wm_area(C); uiBlock *block; - void *owner; + void *owner= NULL; int handle_event; block= uiLayoutGetBlock(layout); @@ -2314,14 +2314,20 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C) uiBlockSetHandleFunc(block, do_running_jobs, NULL); if(sa->spacetype==SPACE_NODE) { - owner = sa; + if(WM_jobs_test(wm, sa)) + owner = sa; handle_event= B_STOPCOMPO; - } else { + } + else { + /* another scene can be rendering too, for example via compositor */ + for(scene= CTX_data_main(C)->scene.first; scene; scene= scene->id.next) + if(WM_jobs_test(wm, scene)) + break; owner = scene; handle_event= B_STOPRENDER; } - if(WM_jobs_test(wm, owner)) { + if(owner) { uiLayout *ui_abs; ui_abs= uiLayoutAbsolute(layout, 0); diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index f6805094056..339bcf2ab4a 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -43,6 +43,7 @@ #include "BKE_image.h" #include "BKE_library.h" #include "BKE_main.h" +#include "BKE_node.h" #include "BKE_multires.h" #include "BKE_report.h" #include "BKE_sequencer.h" @@ -594,6 +595,11 @@ static void render_endjob(void *rjv) /* else the frame will not update for the original value */ ED_update_for_newframe(G.main, rj->scene, rj->win->screen, 1); + if(rj->srl) { + NodeTagIDChanged(rj->scene->nodetree, &rj->scene->id); + WM_main_add_notifier(NC_NODE|NA_EDITED, rj->scene); + } + /* XXX render stability hack */ G.rendering = 0; WM_main_add_notifier(NC_WINDOW, NULL); From 157082ecc9ad9d971111450f6b8cd172378af614 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 17 Dec 2010 17:51:43 +0000 Subject: [PATCH 224/236] fixes for pinning bones & pose ui, could easily get error messages and invalid situations. when pinned there is no pose bone. --- release/scripts/ui/properties_data_bone.py | 32 ++++++++++++++-------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/release/scripts/ui/properties_data_bone.py b/release/scripts/ui/properties_data_bone.py index 30a4c635f6f..61ce3f7503c 100644 --- a/release/scripts/ui/properties_data_bone.py +++ b/release/scripts/ui/properties_data_bone.py @@ -50,13 +50,21 @@ class BONE_PT_context_bone(BoneButtonsPanel, bpy.types.Panel): class BONE_PT_transform(BoneButtonsPanel, bpy.types.Panel): bl_label = "Transform" + @classmethod + def poll(cls, context): + if context.edit_bone: + return True + + ob = context.object + return ob and ob.mode == 'POSE' and context.bone + def draw(self, context): layout = self.layout ob = context.object bone = context.bone - if bone: + if bone and ob: pchan = ob.pose.bones[bone.name] row = layout.row() @@ -79,7 +87,7 @@ class BONE_PT_transform(BoneButtonsPanel, bpy.types.Panel): layout.prop(pchan, "rotation_mode") - else: + elif context.edit_bone: bone = context.edit_bone row = layout.row() row.column().prop(bone, "head") @@ -99,7 +107,8 @@ class BONE_PT_transform_locks(BoneButtonsPanel, bpy.types.Panel): @classmethod def poll(cls, context): - return context.bone + ob = context.object + return ob and ob.mode == 'POSE' and context.bone def draw(self, context): layout = self.layout @@ -134,12 +143,12 @@ class BONE_PT_relations(BoneButtonsPanel, bpy.types.Panel): ob = context.object bone = context.bone arm = context.armature + pchan = None if ob and bone: pchan = ob.pose.bones[bone.name] - else: + elif bone is None: bone = context.edit_bone - pchan = None split = layout.split() @@ -184,12 +193,12 @@ class BONE_PT_display(BoneButtonsPanel, bpy.types.Panel): ob = context.object bone = context.bone + pchan = None if ob and bone: pchan = ob.pose.bones[bone.name] - else: + elif bone is None: bone = context.edit_bone - pchan = None if bone: split = layout.split() @@ -213,14 +222,15 @@ class BONE_PT_inverse_kinematics(BoneButtonsPanel, bpy.types.Panel): @classmethod def poll(cls, context): - return context.active_pose_bone + ob = context.object + return ob and ob.mode == 'POSE' and context.bone def draw(self, context): layout = self.layout - pchan = context.active_pose_bone - # incase pose bone context is pinned don't use 'context.object' - ob = pchan.id_data + ob = context.object + bone = context.bone + pchan = ob.pose.bones[bone.name] row = layout.row() row.prop(ob.pose, "ik_solver") From f01672fde0d736c77cfdaa74110be45301d6f12b Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Fri, 17 Dec 2010 18:25:08 +0000 Subject: [PATCH 225/236] Render Buttons UI: * Fixed a small alignment issue (Aspect Ratio/ Frame Rate Columns) --- release/scripts/ui/properties_render.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/release/scripts/ui/properties_render.py b/release/scripts/ui/properties_render.py index 05a8c18c37f..52fc57412cc 100644 --- a/release/scripts/ui/properties_render.py +++ b/release/scripts/ui/properties_render.py @@ -527,6 +527,7 @@ class RENDER_PT_dimensions(RenderButtonsPanel, bpy.types.Panel): row.menu("RENDER_MT_presets", text=bpy.types.RENDER_MT_presets.bl_label) row.operator("render.preset_add", text="", icon="ZOOMIN") row.operator("render.preset_add", text="", icon="ZOOMOUT").remove_active = True + split = layout.split() col = split.column() @@ -554,8 +555,6 @@ class RENDER_PT_dimensions(RenderButtonsPanel, bpy.types.Panel): sub.prop(scene, "frame_step", text="Step") sub.label(text="Frame Rate:") - - sub = col.column(align=True) sub.prop(rd, "fps") sub.prop(rd, "fps_base", text="/") subrow = sub.row(align=True) From b48f7901d27f28d5e0aa10d352f31ecd2cf71e25 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 17 Dec 2010 18:38:44 +0000 Subject: [PATCH 226/236] [#25270] X3D Export generates incorrect location for Lamp was actually incorrect location for everything! - x3d's global scene rotation value wasnt converted from deg to radians. - camera viewport was also incorrectly exported. use mathutils rather then inline math for rotations. --- release/scripts/op/io_scene_x3d/export_x3d.py | 96 ++----------------- 1 file changed, 8 insertions(+), 88 deletions(-) diff --git a/release/scripts/op/io_scene_x3d/export_x3d.py b/release/scripts/op/io_scene_x3d/export_x3d.py index 4d6e8181203..f8fe6e0efd4 100644 --- a/release/scripts/op/io_scene_x3d/export_x3d.py +++ b/release/scripts/op/io_scene_x3d/export_x3d.py @@ -42,7 +42,8 @@ import mathutils from io_utils import create_derived_objects, free_derived_objects DEG2RAD=0.017453292519943295 -MATWORLD= mathutils.Matrix.Rotation(-90, 4, 'X') +RAD_90D = -(math.pi / 2.0) +MATWORLD= mathutils.Matrix.Rotation(RAD_90D, 4, 'X') def round_color(col, cp): return tuple([round(max(min(c, 1.0), 0.0), cp) for c in col]) @@ -190,32 +191,15 @@ class x3d_class: def writeViewpoint(self, ob, mat, scene): context = scene.render - # context = scene.render - ratio = float(context.resolution_x)/float(context.resolution_y) - # ratio = float(context.imageSizeY())/float(context.imageSizeX()) - lens = (360* (math.atan(ratio *16 / ob.data.lens) / math.pi))*(math.pi/180) - # lens = (360* (math.atan(ratio *16 / ob.data.getLens()) / math.pi))*(math.pi/180) - lens = min(lens, math.pi) - # get the camera location, subtract 90 degress from X to orient like X3D does - # mat = ob.matrix_world - mat is now passed! - - loc = self.rotatePointForVRML(mat.translation_part()) - rot = mat.to_euler() - rot = (((rot[0]-90)), rot[1], rot[2]) - # rot = (((rot[0]-90)*DEG2RAD), rot[1]*DEG2RAD, rot[2]*DEG2RAD) - nRot = self.rotatePointForVRML( rot ) - # convert to Quaternion and to Angle Axis - Q = self.eulerToQuaternions(*nRot) - Q1 = self.multiplyQuaternions(Q[0], Q[1]) - Qf = self.multiplyQuaternions(Q1, Q[2]) - angleAxis = self.quaternionToAngleAxis(Qf) + loc, quat, scale = (MATWORLD * mat).decompose() + angleAxis = tuple(quat.axis) + (quat.angle, ) self.file.write("\n\n" % (lens)) + self.file.write("position=\"%3.2f %3.2f %3.2f\" " % tuple(loc)) + self.file.write("orientation=\"%3.2f %3.2f %3.2f %3.2f\" " % angleAxis) + self.file.write("fieldOfView=\"%.3f\" />\n\n" % ob.data.angle) def writeFog(self, world): if world: @@ -940,31 +924,7 @@ class x3d_class: return s def computeDirection(self, mtx): - x,y,z=(0,-1.0,0) # point down - - ax,ay,az = (MATWORLD * mtx).to_euler() - - # ax *= DEG2RAD - # ay *= DEG2RAD - # az *= DEG2RAD - - # rot X - x1=x - y1=y*math.cos(ax)-z*math.sin(ax) - z1=y*math.sin(ax)+z*math.cos(ax) - - # rot Y - x2=x1*math.cos(ay)+z1*math.sin(ay) - y2=y1 - z2=z1*math.cos(ay)-x1*math.sin(ay) - - # rot Z - x3=x2*math.cos(az)-y2*math.sin(az) - y3=x2*math.sin(az)+y2*math.cos(az) - z3=z2 - - return [x3,y3,z3] - + return (mathutils.Vector((0, -1, 0)) * (MATWORLD * mtx).rotation_part())[:] # swap Y and Z to handle axis difference between Blender and VRML #------------------------------------------------------------------------ @@ -985,46 +945,6 @@ class x3d_class: if inc > 0: self.indentLevel = self.indentLevel + inc - # Converts a Euler to three new Quaternions - # Angles of Euler are passed in as radians - #------------------------------------------------------------------------ - def eulerToQuaternions(self, x, y, z): - Qx = [math.cos(x/2), math.sin(x/2), 0, 0] - Qy = [math.cos(y/2), 0, math.sin(y/2), 0] - Qz = [math.cos(z/2), 0, 0, math.sin(z/2)] - - quaternionVec=[Qx,Qy,Qz] - return quaternionVec - - # Multiply two Quaternions together to get a new Quaternion - #------------------------------------------------------------------------ - def multiplyQuaternions(self, Q1, Q2): - result = [((Q1[0] * Q2[0]) - (Q1[1] * Q2[1]) - (Q1[2] * Q2[2]) - (Q1[3] * Q2[3])), - ((Q1[0] * Q2[1]) + (Q1[1] * Q2[0]) + (Q1[2] * Q2[3]) - (Q1[3] * Q2[2])), - ((Q1[0] * Q2[2]) + (Q1[2] * Q2[0]) + (Q1[3] * Q2[1]) - (Q1[1] * Q2[3])), - ((Q1[0] * Q2[3]) + (Q1[3] * Q2[0]) + (Q1[1] * Q2[2]) - (Q1[2] * Q2[1]))] - - return result - - # Convert a Quaternion to an Angle Axis (ax, ay, az, angle) - # angle is in radians - #------------------------------------------------------------------------ - def quaternionToAngleAxis(self, Qf): - scale = math.pow(Qf[1],2) + math.pow(Qf[2],2) + math.pow(Qf[3],2) - ax = Qf[1] - ay = Qf[2] - az = Qf[3] - - if scale > .0001: - ax/=scale - ay/=scale - az/=scale - - angle = 2 * math.acos(Qf[0]) - - result = [ax, ay, az, angle] - return result - ########################################################## # Callbacks, needed before Main ########################################################## From fd90685a48f6fae30e6731bc4a805930e776f117 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 17 Dec 2010 19:05:10 +0000 Subject: [PATCH 227/236] remove some paranoid NULL checks, since the pointers are used already. --- release/plugins/sequence/color-correction-hsv.c | 3 ++- release/plugins/sequence/color-correction-yuv.c | 3 ++- source/blender/blenkernel/intern/cdderivedmesh.c | 2 +- source/blender/editors/metaball/mball_edit.c | 2 -- source/blender/render/intern/source/voxeldata.c | 2 -- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/release/plugins/sequence/color-correction-hsv.c b/release/plugins/sequence/color-correction-hsv.c index 120ca76bbe7..cff2f1aad82 100644 --- a/release/plugins/sequence/color-correction-hsv.c +++ b/release/plugins/sequence/color-correction-hsv.c @@ -187,12 +187,13 @@ void plugin_seq_doit(Cast *cast, float facf0, float facf1, int width, double gamma_table[256]; double uv_table[256]; float *destf = out->rect_float; - float *src1f = ibuf1->rect_float; + float *src1f; if (!ibuf1) return; dest= (char *) out->rect; src1= (char *) ibuf1->rect; + src1f= ibuf1->rect_float; for (y = 0; y < 256; y++) { float v = 1.0 * y / 255; diff --git a/release/plugins/sequence/color-correction-yuv.c b/release/plugins/sequence/color-correction-yuv.c index 721cadb07ce..b80489f3b0b 100644 --- a/release/plugins/sequence/color-correction-yuv.c +++ b/release/plugins/sequence/color-correction-yuv.c @@ -120,12 +120,13 @@ void plugin_seq_doit(Cast *cast, float facf0, float facf1, int width, float gamma_table[256]; float uv_table[256]; float *destf = out->rect_float; - float *src1f = ibuf1->rect_float; + float *src1f; if (!ibuf1) return; dest= (char *) out->rect; src1= (char *) ibuf1->rect; + src1f= ibuf1->rect_float; for (y = 0; y < 256; y++) { float v = 1.0 * y / 255; diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index cd0872807a0..d6c91c3c908 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -199,7 +199,6 @@ static int can_pbvh_draw(Object *ob, DerivedMesh *dm) static struct PBVH *cdDM_getPBVH(Object *ob, DerivedMesh *dm) { CDDerivedMesh *cddm = (CDDerivedMesh*) dm; - Mesh *me= (ob)? ob->data: NULL; if(!ob) { cddm->pbvh= NULL; @@ -217,6 +216,7 @@ static struct PBVH *cdDM_getPBVH(Object *ob, DerivedMesh *dm) this derivedmesh is just original mesh. it's the multires subsurf dm that this is actually for, to support a pbvh on a modified mesh */ if(!cddm->pbvh && ob->type == OB_MESH) { + Mesh *me= ob->data; cddm->pbvh = BLI_pbvh_new(); cddm->pbvh_draw = can_pbvh_draw(ob, dm); BLI_pbvh_build_mesh(cddm->pbvh, me->mface, me->mvert, diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c index 1170a910c92..a9a673fdf20 100644 --- a/source/blender/editors/metaball/mball_edit.c +++ b/source/blender/editors/metaball/mball_edit.c @@ -95,8 +95,6 @@ MetaElem *add_metaball_primitive(bContext *C, float mat[4][4], int type, int UNU MetaBall *mball = (MetaBall*)obedit->data; MetaElem *ml; - if(!obedit) return NULL; - /* Deselect all existing metaelems */ ml= mball->editelems->first; while(ml) { diff --git a/source/blender/render/intern/source/voxeldata.c b/source/blender/render/intern/source/voxeldata.c index 0ccf905a851..581dedfe655 100644 --- a/source/blender/render/intern/source/voxeldata.c +++ b/source/blender/render/intern/source/voxeldata.c @@ -272,8 +272,6 @@ static void cache_voxeldata(struct Render *re, Tex *tex) int curframe; char path[sizeof(vd->source_path)]; - if (!vd) return; - /* only re-cache if dataset needs updating */ if ((vd->flag & TEX_VD_STILL) || (vd->cachedframe == re->r.cfra)) if (vd->ok) return; From a0ce28d7312adc31194e2ba34974dc5de754fced Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Fri, 17 Dec 2010 19:05:34 +0000 Subject: [PATCH 228/236] Drag & drop feature: You now can drop a .blend inside blender window to open it. Implementation notes: - Added call to extract icon type for files. Code re-used from space_file - External files that get dropped set icon types too. Drop box polls can check for this. - Also enabled setting op-context for drop operators, this was needed to prevent filewindow to open. --- .../blender/editors/include/ED_fileselect.h | 2 + source/blender/editors/screen/screen_ops.c | 24 +++ source/blender/editors/space_file/filelist.c | 137 +++++++++++------- source/blender/editors/space_file/filelist.h | 1 - source/blender/windowmanager/WM_types.h | 3 +- .../windowmanager/intern/wm_dragdrop.c | 2 + .../windowmanager/intern/wm_event_system.c | 8 +- .../blender/windowmanager/intern/wm_window.c | 14 +- 8 files changed, 134 insertions(+), 57 deletions(-) diff --git a/source/blender/editors/include/ED_fileselect.h b/source/blender/editors/include/ED_fileselect.h index 5001323cb61..a7d763ca4c8 100644 --- a/source/blender/editors/include/ED_fileselect.h +++ b/source/blender/editors/include/ED_fileselect.h @@ -93,5 +93,7 @@ void ED_fileselect_clear(struct bContext *C, struct SpaceFile *sfile); void ED_fileselect_exit(struct bContext *C, struct SpaceFile *sfile); +int ED_file_extension_icon(char *relname); + #endif /* ED_FILES_H */ diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index bcfddd0792c..0c49779cd84 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -64,6 +64,7 @@ #include "RNA_define.h" #include "UI_interface.h" +#include "UI_resources.h" #include "wm_window.h" @@ -3014,6 +3015,7 @@ void SCENE_OT_delete(wmOperatorType *ot) /* **************** Assigning operatortypes to global list, adding handlers **************** */ + /* called in spacetypes.c */ void ED_operatortypes_screen(void) { @@ -3087,9 +3089,27 @@ static void keymap_modal_set(wmKeyConfig *keyconf) } +static int open_file_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event)) +{ + if(drag->type==WM_DRAG_PATH) { + if(drag->icon==ICON_FILE_BLEND) + return 1; + } + return 0; +} + +static void open_file_drop_copy(wmDrag *drag, wmDropBox *drop) +{ + /* copy drag path to properties */ + RNA_string_set(drop->ptr, "filepath", drag->path); + drop->opcontext= WM_OP_EXEC_DEFAULT; +} + + /* called in spacetypes.c */ void ED_keymap_screen(wmKeyConfig *keyconf) { + ListBase *lb; wmKeyMap *keymap; //wmKeyMapItem *kmi; @@ -3203,6 +3223,10 @@ void ED_keymap_screen(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", DOWNARROWKEY, KM_PRESS, KM_ALT, 0); #endif + /* dropbox for entire window */ + lb= WM_dropboxmap_find("Window", 0, 0); + WM_dropbox_add(lb, "WM_OT_open_mainfile", open_file_drop_poll, open_file_drop_copy); + keymap_modal_set(keyconf); } diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index 476a887ee87..ce4b5bdd4de 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -69,10 +69,11 @@ #include "PIL_time.h" - #include "WM_api.h" #include "WM_types.h" +#include "UI_resources.h" + #include "filelist.h" /* max length of library group name within filesel */ @@ -360,7 +361,7 @@ void filelist_filter(FileList* filelist) } } -void filelist_init_icons() +void filelist_init_icons(void) { short x, y, k; ImBuf *bbuf; @@ -383,7 +384,7 @@ void filelist_init_icons() } } -void filelist_free_icons() +void filelist_free_icons(void) { int i; for (i=0; i < SPECIAL_IMG_MAX; ++i) { @@ -720,6 +721,87 @@ void filelist_setfilter_types(struct FileList* filelist, const char *filter_glob BLI_strncpy(filelist->filter_glob, filter_glob, sizeof(filelist->filter_glob)); } +static int file_extension_type(char *relname) +{ + if(BLO_has_bfile_extension(relname)) { + return BLENDERFILE; + } else if(BLI_testextensie(relname, ".py")) { + return PYSCRIPTFILE; + } else if(BLI_testextensie(relname, ".txt") + || BLI_testextensie(relname, ".glsl") + || BLI_testextensie(relname, ".data")) { + return TEXTFILE; + } else if( BLI_testextensie(relname, ".ttf") + || BLI_testextensie(relname, ".ttc") + || BLI_testextensie(relname, ".pfb") + || BLI_testextensie(relname, ".otf") + || BLI_testextensie(relname, ".otc")) { + return FTFONTFILE; + } else if(BLI_testextensie(relname, ".btx")) { + return BTXFILE; + } else if(BLI_testextensie(relname, ".dae")) { + return COLLADAFILE; + } else if(BLI_testextensie_array(relname, imb_ext_image) + || (G.have_quicktime && BLI_testextensie_array(relname, imb_ext_image_qt))) { + return IMAGEFILE; + } else if(BLI_testextensie_array(relname, imb_ext_movie)) { + return MOVIEFILE; + } else if(BLI_testextensie_array(relname, imb_ext_audio)) { + return SOUNDFILE; + } + return 0; +} + +int ED_file_extension_icon(char *relname) +{ + int type= file_extension_type(relname); + + if (type == BLENDERFILE) + return ICON_FILE_BLEND; + else if (type == IMAGEFILE) + return ICON_FILE_IMAGE; + else if (type == MOVIEFILE) + return ICON_FILE_MOVIE; + else if (type == PYSCRIPTFILE) + return ICON_FILE_SCRIPT; + else if (type == PYSCRIPTFILE) + return ICON_FILE_SCRIPT; + else if (type == SOUNDFILE) + return ICON_FILE_SOUND; + else if (type == FTFONTFILE) + return ICON_FILE_FONT; + else if (type == BTXFILE) + return ICON_FILE_BLANK; + else if (type == COLLADAFILE) + return ICON_FILE_BLANK; + + return ICON_FILE_BLANK; +} + +void filelist_setfiletypes(struct FileList* filelist) +{ + struct direntry *file; + int num; + + file= filelist->filelist; + + for(num=0; numnumfiles; num++, file++) { + file->type= file->s.st_mode; /* restore the mess below */ + + /* Don't check extensions for directories */ + if (file->type & S_IFDIR) { + continue; + } + file->flags = file_extension_type(file->relname); + + if(filelist->filter_glob + && BLI_testextensie_glob(file->relname, filelist->filter_glob)) { + file->flags= OPERATORFILE; + } + + } +} + static void filelist_read_dir(struct FileList* filelist) { char wdir[FILE_MAX]; @@ -734,7 +816,7 @@ static void filelist_read_dir(struct FileList* filelist) filelist->numfiles = BLI_getdir(filelist->dir, &(filelist->filelist)); if(!chdir(wdir)) {} /* fix warning about not checking return value */ - filelist_setfiletypes(filelist, G.have_quicktime); + filelist_setfiletypes(filelist); filelist_filter(filelist); } @@ -790,53 +872,6 @@ void filelist_parent(struct FileList* filelist) filelist_readdir(filelist); } -void filelist_setfiletypes(struct FileList* filelist, short has_quicktime) -{ - struct direntry *file; - int num; - - file= filelist->filelist; - - for(num=0; numnumfiles; num++, file++) { - file->flags= 0; - file->type= file->s.st_mode; /* restore the mess below */ - - /* Don't check extensions for directories */ - if (file->type & S_IFDIR) { - continue; - } - - if(BLO_has_bfile_extension(file->relname)) { - file->flags |= BLENDERFILE; - } else if(BLI_testextensie(file->relname, ".py")) { - file->flags |= PYSCRIPTFILE; - } else if(BLI_testextensie(file->relname, ".txt") - || BLI_testextensie(file->relname, ".glsl") - || BLI_testextensie(file->relname, ".data")) { - file->flags |= TEXTFILE; - } else if( BLI_testextensie(file->relname, ".ttf") - || BLI_testextensie(file->relname, ".ttc") - || BLI_testextensie(file->relname, ".pfb") - || BLI_testextensie(file->relname, ".otf") - || BLI_testextensie(file->relname, ".otc")) { - file->flags |= FTFONTFILE; - } else if(BLI_testextensie(file->relname, ".btx")) { - file->flags |= BTXFILE; - } else if(BLI_testextensie(file->relname, ".dae")) { - file->flags |= COLLADAFILE; - } else if(BLI_testextensie_array(file->relname, imb_ext_image) - || (has_quicktime && BLI_testextensie_array(file->relname, imb_ext_image_qt))) { - file->flags |= IMAGEFILE; - } else if(BLI_testextensie_array(file->relname, imb_ext_movie)) { - file->flags |= MOVIEFILE; - } else if(BLI_testextensie_array(file->relname, imb_ext_audio)) { - file->flags |= SOUNDFILE; - } else if(filelist->filter_glob - && BLI_testextensie_glob(file->relname, filelist->filter_glob)) { - file->flags |= OPERATORFILE; - } - } -} void filelist_swapselect(struct FileList* filelist) { diff --git a/source/blender/editors/space_file/filelist.h b/source/blender/editors/space_file/filelist.h index eb1c46d652e..6ea91746b85 100644 --- a/source/blender/editors/space_file/filelist.h +++ b/source/blender/editors/space_file/filelist.h @@ -69,7 +69,6 @@ void filelist_readdir(struct FileList* filelist); int filelist_empty(struct FileList* filelist); void filelist_parent(struct FileList* filelist); -void filelist_setfiletypes(struct FileList* filelist, short has_quicktime); int filelist_islibrary (struct FileList* filelist, char* dir, char* group); diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index ea06395c35b..0ca8c5e7f4f 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -504,7 +504,8 @@ typedef struct wmDropBox { /* if poll survives, operator is called */ wmOperatorType *ot; /* not saved in file, so can be pointer */ - + short opcontext; /* default invoke */ + struct IDProperty *properties; /* operator properties, assigned to ptr->data and can be written to a file */ struct PointerRNA *ptr; /* rna pointer to access properties */ diff --git a/source/blender/windowmanager/intern/wm_dragdrop.c b/source/blender/windowmanager/intern/wm_dragdrop.c index 6cf2c7a9a81..a19499b3464 100644 --- a/source/blender/windowmanager/intern/wm_dragdrop.c +++ b/source/blender/windowmanager/intern/wm_dragdrop.c @@ -75,6 +75,7 @@ typedef struct wmDropBoxMap { } wmDropBoxMap; +/* spaceid/regionid is zero for window drop maps */ ListBase *WM_dropboxmap_find(const char *idname, int spaceid, int regionid) { wmDropBoxMap *dm; @@ -103,6 +104,7 @@ wmDropBox *WM_dropbox_add(ListBase *lb, const char *idname, int (*poll)(bContext drop->poll= poll; drop->copy= copy; drop->ot= WM_operatortype_find(idname, 0); + drop->opcontext= WM_OP_INVOKE_DEFAULT; if(drop->ot==NULL) { MEM_freeN(drop); diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 0a1f3035a84..9c8bd3f4fec 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -1468,8 +1468,14 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers) if(drop->poll(C, drag, event)) { drop->copy(drag, drop); - wm_operator_invoke(C, drop->ot, event, drop->ptr, NULL, FALSE); + WM_operator_name_call(C, drop->ot->idname, drop->opcontext, drop->ptr); + //wm_operator_invoke(C, drop->ot, event, drop->ptr, NULL, FALSE); action |= WM_HANDLER_BREAK; + + /* prevent hanging on file read */ + BLI_freelistN(event->customdata); + event->customdata= NULL; + event->custom= 0; } } } diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index c962ee8c118..723286b09ce 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -60,6 +60,7 @@ #include "wm_event_system.h" #include "ED_screen.h" +#include "ED_fileselect.h" #include "PIL_time.h" @@ -413,6 +414,11 @@ void wm_window_add_ghostwindows(bContext* C, wmWindowManager *wm) keymap= WM_keymap_find(wm->defaultconf, "Screen Editing", 0, 0); WM_event_add_keymap_handler(&win->modalhandlers, keymap); + /* add drop boxes */ + { + ListBase *lb= WM_dropboxmap_find("Window", 0, 0); + WM_event_add_dropbox_handler(&win->handlers, lb); + } wm_window_title(wm, win); } } @@ -820,15 +826,17 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private) /* printf("Drop detected\n"); */ /* add drag data to wm for paths: */ - /* need icon type, some dropboxes check for that... see filesel code for this */ if(ddd->dataType == GHOST_kDragnDropTypeFilenames) { GHOST_TStringArray *stra= ddd->data; - int a; + int a, icon; for(a=0; acount; a++) { printf("drop file %s\n", stra->strings[a]); - WM_event_start_drag(C, 0, WM_DRAG_PATH, stra->strings[a], 0.0); + /* try to get icon type from extension */ + icon= ED_file_extension_icon((char *)stra->strings[a]); + + WM_event_start_drag(C, icon, WM_DRAG_PATH, stra->strings[a], 0.0); /* void poin should point to string, it makes a copy */ break; // only one drop element supported now } From 4b0c455093202ff203b7ea751786c39afcdc5633 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 17 Dec 2010 19:58:02 +0000 Subject: [PATCH 229/236] Fix #25263: Text cursor click point is random. - Fixed some wierd cursor placements when clicking in special text position (mostly when line segments had null-terminator at the max allowed position) - Also subtract top padding, so centering is looks a bit better --- source/blender/editors/space_text/text_ops.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index bd291cc8fe2..c594fa7acc0 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -2220,14 +2220,14 @@ static void set_cursor_to_pos(SpaceText *st, ARegion *ar, int x, int y, int sel) Text *text= st->text; TextLine **linep; int *charp; - int w, tabs; + int w; text_update_character_width(st); if(sel) { linep= &text->sell; charp= &text->selc; } else { linep= &text->curl; charp= &text->curc; } - y= (ar->winy - y)/st->lheight; + y= (ar->winy - 2 - y)/st->lheight; if(st->showlinenrs) x-= TXT_OFFSET+TEXTXLOC; @@ -2267,14 +2267,12 @@ static void set_cursor_to_pos(SpaceText *st, ARegion *ar, int x, int y, int sel) chars= 0; curs= 0; endj= 0; - tabs= 0; for(i=0, j=0; loop; j++) { /* Mimic replacement of tabs */ ch= (*linep)->line[j]; if(ch=='\t') { chars= st->tabnumber-i%st->tabnumber; - tabs+= chars-1; ch= ' '; } else @@ -2302,7 +2300,7 @@ static void set_cursor_to_pos(SpaceText *st, ARegion *ar, int x, int y, int sel) if(found) { /* exact cursor position was found, check if it's */ /* still on needed line (hasn't been wrapped) */ - if(*charp>endj && !chop) (*charp)= endj; + if(*charp>endj && !chop && ch!='\0') (*charp)= endj; loop= 0; break; } @@ -2311,7 +2309,7 @@ static void set_cursor_to_pos(SpaceText *st, ARegion *ar, int x, int y, int sel) start= end; end += max; - if(start-tabs<(*linep)->len) + if(j<(*linep)->len) y--; chop= 1; @@ -2340,13 +2338,13 @@ static void set_cursor_to_pos(SpaceText *st, ARegion *ar, int x, int y, int sel) } if(ch=='\0') break; } - if(!loop || y<0) break; + if(!loop || found) break; if(!(*linep)->next) { *charp= (*linep)->len; break; } - + /* On correct line but didn't meet cursor, must be at end */ if(y==0) { *charp= (*linep)->len; From 8b28c24d16386db7e68326d8607de5d20c9833b0 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 17 Dec 2010 20:13:54 +0000 Subject: [PATCH 230/236] Fix #25272: shrinkwrap with dependency cycle could lead to eternal loop and increasing memory usage. Modifiers should never call mesh_get_derived_final or similar, only use ob->derivedFinal if it exists, if the dependencies are set correct and there are no cycles, it will be there. --- source/blender/blenkernel/BKE_shrinkwrap.h | 4 +-- source/blender/blenkernel/intern/constraint.c | 2 +- source/blender/blenkernel/intern/shrinkwrap.c | 30 +++++++++---------- .../blender/modifiers/intern/MOD_shrinkwrap.c | 4 +-- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/source/blender/blenkernel/BKE_shrinkwrap.h b/source/blender/blenkernel/BKE_shrinkwrap.h index 47fb5049278..6b8e7860db8 100644 --- a/source/blender/blenkernel/BKE_shrinkwrap.h +++ b/source/blender/blenkernel/BKE_shrinkwrap.h @@ -35,7 +35,7 @@ #include "BKE_customdata.h" struct DerivedMesh; struct Object; -struct DerivedMesh *object_get_derived_final(struct Scene *scene, struct Object *ob, CustomDataMask dataMask); +struct DerivedMesh *object_get_derived_final(struct Object *ob); /* SpaceTransform stuff */ @@ -121,7 +121,7 @@ typedef struct ShrinkwrapCalcData } ShrinkwrapCalcData; -void shrinkwrapModifier_deform(struct ShrinkwrapModifierData *smd, struct Scene *scene, struct Object *ob, struct DerivedMesh *dm, float (*vertexCos)[3], int numVerts); +void shrinkwrapModifier_deform(struct ShrinkwrapModifierData *smd, struct Object *ob, struct DerivedMesh *dm, float (*vertexCos)[3], int numVerts); /* * This function casts a ray in the given BVHTree.. but it takes into consideration the space_transform, that is: diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index f92f2326aeb..bb0fc23c02c 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -3423,7 +3423,7 @@ static void shrinkwrap_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstr float dist; SpaceTransform transform; - DerivedMesh *target = object_get_derived_final(cob->scene, ct->tar, CD_MASK_BAREMESH); + DerivedMesh *target = object_get_derived_final(ct->tar); BVHTreeRayHit hit; BVHTreeNearest nearest; diff --git a/source/blender/blenkernel/intern/shrinkwrap.c b/source/blender/blenkernel/intern/shrinkwrap.c index 936fb1bfeab..16e4933332c 100644 --- a/source/blender/blenkernel/intern/shrinkwrap.c +++ b/source/blender/blenkernel/intern/shrinkwrap.c @@ -48,6 +48,7 @@ #include "BKE_mesh.h" #include "BKE_subsurf.h" +#include "BLI_editVert.h" #include "BLI_math.h" @@ -82,21 +83,18 @@ typedef void ( *Shrinkwrap_ForeachVertexCallback) (DerivedMesh *target, float *c /* get derived mesh */ //TODO is anyfunction that does this? returning the derivedFinal witouth we caring if its in edit mode or not? -DerivedMesh *object_get_derived_final(struct Scene *scene, Object *ob, CustomDataMask dataMask) +DerivedMesh *object_get_derived_final(Object *ob) { Mesh *me= ob->data; - struct EditMesh *em = BKE_mesh_get_editmesh(me); + EditMesh *em = BKE_mesh_get_editmesh(me); - if (em) - { - DerivedMesh *final = NULL; - editmesh_get_derived_cage_and_final(scene, ob, em, &final, dataMask); - + if(em) { + DerivedMesh *dm = em->derivedFinal; BKE_mesh_end_editmesh(me, em); - return final; + return dm; } - else - return mesh_get_derived_final(scene, ob, dataMask); + + return ob->derivedFinal; } /* Space transform */ @@ -282,7 +280,7 @@ int normal_projection_project_vertex(char options, const float *vert, const floa } -static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc, struct Scene *scene) +static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc) { int i; @@ -327,7 +325,9 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc, struct S if(calc->smd->auxTarget) { - auxMesh = object_get_derived_final(scene, calc->smd->auxTarget, CD_MASK_BAREMESH); + auxMesh = object_get_derived_final(calc->smd->auxTarget); + if(!auxMesh) + return; space_transform_setup( &local2aux, calc->ob, calc->smd->auxTarget); } @@ -499,7 +499,7 @@ static void shrinkwrap_calc_nearest_surface_point(ShrinkwrapCalcData *calc) } /* Main shrinkwrap function */ -void shrinkwrapModifier_deform(ShrinkwrapModifierData *smd, Scene *scene, Object *ob, DerivedMesh *dm, float (*vertexCos)[3], int numVerts) +void shrinkwrapModifier_deform(ShrinkwrapModifierData *smd, Object *ob, DerivedMesh *dm, float (*vertexCos)[3], int numVerts) { DerivedMesh *ss_mesh = NULL; @@ -530,7 +530,7 @@ void shrinkwrapModifier_deform(ShrinkwrapModifierData *smd, Scene *scene, Object if(smd->target) { - calc.target = object_get_derived_final(scene, smd->target, CD_MASK_BAREMESH); + calc.target = object_get_derived_final(smd->target); //TODO there might be several "bugs" on non-uniform scales matrixs //because it will no longer be nearest surface, not sphere projection @@ -587,7 +587,7 @@ void shrinkwrapModifier_deform(ShrinkwrapModifierData *smd, Scene *scene, Object break; case MOD_SHRINKWRAP_PROJECT: - BENCH(shrinkwrap_calc_normal_projection(&calc, scene)); + BENCH(shrinkwrap_calc_normal_projection(&calc)); break; case MOD_SHRINKWRAP_NEAREST_VERTEX: diff --git a/source/blender/modifiers/intern/MOD_shrinkwrap.c b/source/blender/modifiers/intern/MOD_shrinkwrap.c index 417c73eba98..ff0ed5d841a 100644 --- a/source/blender/modifiers/intern/MOD_shrinkwrap.c +++ b/source/blender/modifiers/intern/MOD_shrinkwrap.c @@ -117,7 +117,7 @@ static void deformVerts(ModifierData *md, Object *ob, if(dataMask) dm= get_cddm(ob, NULL, dm, vertexCos); - shrinkwrapModifier_deform((ShrinkwrapModifierData*)md, md->scene, ob, dm, vertexCos, numVerts); + shrinkwrapModifier_deform((ShrinkwrapModifierData*)md, ob, dm, vertexCos, numVerts); if(dm != derivedData) dm->release(dm); @@ -132,7 +132,7 @@ static void deformVertsEM(ModifierData *md, Object *ob, struct EditMesh *editDat if(dataMask) dm= get_cddm(ob, editData, dm, vertexCos); - shrinkwrapModifier_deform((ShrinkwrapModifierData*)md, md->scene, ob, dm, vertexCos, numVerts); + shrinkwrapModifier_deform((ShrinkwrapModifierData*)md, ob, dm, vertexCos, numVerts); if(dm != derivedData) dm->release(dm); From 96dfaa215c87cbbb4676d19b1f278997a52d47a1 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 17 Dec 2010 20:24:13 +0000 Subject: [PATCH 231/236] Fix for moving caret to the line beginning/ending when word-wrapping is enabled --- source/blender/editors/space_text/text_ops.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index c594fa7acc0..bcfcfd09fed 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -1541,6 +1541,7 @@ static void wrap_move_bol(SpaceText *st, ARegion *ar, short sel) *charp= endj; if(j>=oldc) { + if(ch=='\0') *charp= start; loop= 0; break; } @@ -1549,10 +1550,11 @@ static void wrap_move_bol(SpaceText *st, ARegion *ar, short sel) start= end; end += max; - chop= 0; + chop= 1; } else if(ch==' ' || ch=='-' || ch=='\0') { if(j>=oldc) { + *charp= start; loop= 0; break; } @@ -1603,17 +1605,18 @@ static void wrap_move_eol(SpaceText *st, ARegion *ar, short sel) while(chars--) { if(i-start>=max) { + if(chop) endj= j-1; + if(endj>=oldc) { - *charp= endj; + if(ch=='\0') *charp= (*linep)->len; + else *charp= endj; loop= 0; break; } - if(chop) endj= j; - start= end; end += max; - chop= 0; + chop= 1; } else if(ch=='\0') { *charp= (*linep)->len; loop= 0; From 77c17d332d5afd0d5df5e31af2e7d2c8c31a8fe7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 18 Dec 2010 07:22:52 +0000 Subject: [PATCH 232/236] fix [#25262] Keyboard shortcut presets can't be made because of wrong folder New create option when getting a user resource for creating paths. bpy.utils.user_resource(type, path, create=False) --- release/scripts/modules/bpy/utils.py | 36 +++++++++++++++++++++++++++- release/scripts/op/presets.py | 8 +++++-- release/scripts/ui/space_userpref.py | 13 +--------- source/blender/python/intern/bpy.c | 14 ++--------- 4 files changed, 44 insertions(+), 27 deletions(-) diff --git a/release/scripts/modules/bpy/utils.py b/release/scripts/modules/bpy/utils.py index 1643b2036fd..624f111d85f 100644 --- a/release/scripts/modules/bpy/utils.py +++ b/release/scripts/modules/bpy/utils.py @@ -23,8 +23,9 @@ This module contains utility functions specific to blender but not assosiated with blenders internal data. """ -from _bpy import blend_paths, user_resource +from _bpy import blend_paths from _bpy import script_paths as _bpy_script_paths +from _bpy import user_resource as _user_resource import bpy as _bpy import os as _os @@ -559,3 +560,36 @@ def keyconfig_set(filepath): keyconfigs.active = kc_new +def user_resource(type, path, create=False): + """ + Return a user resource path (normally from the users home directory). + + :arg type: Resource type in ['DATAFILES', 'CONFIG', 'SCRIPTS', 'AUTOSAVE']. + :type type: string + :arg subdir: Optional subdirectory. + :type subdir: string + :arg create: Treat the path as a directory and create it if its not existing. + :type create: boolean + :return: a path. + :rtype: string + """ + + target_path = _user_resource(type, path) + + if create: + # should always be true. + if target_path: + # create path if not existing. + if not _os.path.exists(target_path): + try: + _os.makedirs(target_path) + except: + import traceback + traceback.print_exc() + target_path = "" + elif not _os.path.isdir(target_path): + print("Path %r found but isn't a directory!" % path) + target_path = "" + + return target_path + diff --git a/release/scripts/op/presets.py b/release/scripts/op/presets.py index 3a78f15d770..0ee20966fad 100644 --- a/release/scripts/op/presets.py +++ b/release/scripts/op/presets.py @@ -49,13 +49,17 @@ class AddPresetBase(): preset_menu_class = getattr(bpy.types, self.preset_menu) if not self.remove_active: - + if not self.name: return {'FINISHED'} filename = self.as_filename(self.name) - target_path = bpy.utils.preset_paths(self.preset_subdir)[0] # we need some way to tell the user and system preset path + target_path = bpy.utils.user_resource('SCRIPTS', os.path.join("presets", self.preset_subdir), create=True) + + if not target_path: + self.report({'WARNING'}, "Failed to create presets path") + return {'CANCELLED'} filepath = os.path.join(target_path, filename) + ".py" diff --git a/release/scripts/ui/space_userpref.py b/release/scripts/ui/space_userpref.py index 3f9e0cd83bb..39700016526 100644 --- a/release/scripts/ui/space_userpref.py +++ b/release/scripts/ui/space_userpref.py @@ -1133,23 +1133,12 @@ class WM_OT_addon_install(bpy.types.Operator): pyfile = self.filepath # dont use bpy.utils.script_paths("addons") because we may not be able to write to it. - path_addons = bpy.utils.user_resource('SCRIPTS', 'addons') + path_addons = bpy.utils.user_resource('SCRIPTS', "addons", create=True) - # should never happen. if not path_addons: self.report({'WARNING'}, "Failed to get addons path\n") return {'CANCELLED'} - # create path if not existing. - if not os.path.exists(path_addons): - try: - os.makedirs(path_addons) - except: - self.report({'WARNING'}, "Failed to create %r\n" % path_addons) - - traceback.print_exc() - return {'CANCELLED'} - contents = set(os.listdir(path_addons)) #check to see if the file is in compressed format (.zip) diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c index 834d472d786..3dc9183f014 100644 --- a/source/blender/python/intern/bpy.c +++ b/source/blender/python/intern/bpy.c @@ -121,17 +121,7 @@ static PyObject *bpy_blend_paths(PyObject *UNUSED(self), PyObject *args, PyObjec } -static char bpy_user_resource_doc[] = -".. function:: user_resource(type, subdir)\n" -"\n" -" Returns a list of paths to external files referenced by the loaded .blend file.\n" -"\n" -" :arg type: Resource type in ['DATAFILES', 'CONFIG', 'SCRIPTS', 'AUTOSAVE'].\n" -" :type type: string\n" -" :arg subdir: Optional subdirectory.\n" -" :type subdir: string\n" -" :return: a path.\n" -" :rtype: string\n"; +// static char bpy_user_resource_doc[] = // now in bpy/utils.py static PyObject *bpy_user_resource(PyObject *UNUSED(self), PyObject *args, PyObject *kw) { char *type; @@ -165,7 +155,7 @@ static PyObject *bpy_user_resource(PyObject *UNUSED(self), PyObject *args, PyObj static PyMethodDef meth_bpy_script_paths = {"script_paths", (PyCFunction)bpy_script_paths, METH_NOARGS, bpy_script_paths_doc}; static PyMethodDef meth_bpy_blend_paths = {"blend_paths", (PyCFunction)bpy_blend_paths, METH_VARARGS|METH_KEYWORDS, bpy_blend_paths_doc}; -static PyMethodDef meth_bpy_user_resource = {"user_resource", (PyCFunction)bpy_user_resource, METH_VARARGS|METH_KEYWORDS, bpy_user_resource_doc}; +static PyMethodDef meth_bpy_user_resource = {"user_resource", (PyCFunction)bpy_user_resource, METH_VARARGS|METH_KEYWORDS, NULL}; static void bpy_import_test(const char *modname) { From b31b63bd728010603681752ecdd4057bf9f8aa92 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sat, 18 Dec 2010 09:18:39 +0000 Subject: [PATCH 233/236] - Rename operator "Set Curve Radius" to "Set Curve Weight" to "Set Goal Weight" as it was in 2.49 (functionality of this operator hasn't changed, but it's quite confusing name) - Documentation for some curve operators --- source/blender/editors/curve/editcurve.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 5fa1ebe12fb..f57c51fd559 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -1967,6 +1967,7 @@ void CURVE_OT_switch_direction(wmOperatorType *ot) { /* identifiers */ ot->name= "Switch Direction"; + ot->description= "Switch direction of selected splines"; ot->idname= "CURVE_OT_switch_direction"; /* api callbacks */ @@ -2013,7 +2014,8 @@ static int set_goal_weight_exec(bContext *C, wmOperator *op) void CURVE_OT_spline_weight_set(wmOperatorType *ot) { /* identifiers */ - ot->name= "Set Curve Weight"; + ot->name= "Set Goal Weight"; + ot->description= "Set softbody goal weight for selected points"; ot->idname= "CURVE_OT_spline_weight_set"; /* api callbacks */ @@ -2065,6 +2067,7 @@ void CURVE_OT_radius_set(wmOperatorType *ot) { /* identifiers */ ot->name= "Set Curve Radius"; + ot->description= "Set per-point radius which is used for bevel tapering"; ot->idname= "CURVE_OT_radius_set"; /* api callbacks */ @@ -2140,6 +2143,7 @@ void CURVE_OT_smooth(wmOperatorType *ot) { /* identifiers */ ot->name= "Smooth"; + ot->description= "Flatten angles of selected points"; ot->idname= "CURVE_OT_smooth"; /* api callbacks */ @@ -2305,6 +2309,7 @@ void CURVE_OT_smooth_radius(wmOperatorType *ot) { /* identifiers */ ot->name= "Smooth Curve Radius"; + ot->description= "Flatten radiuses of selected points"; ot->idname= "CURVE_OT_smooth_radius"; /* api clastbacks */ @@ -3191,6 +3196,7 @@ void CURVE_OT_subdivide(wmOperatorType *ot) { /* identifiers */ ot->name= "Subdivide"; + ot->description= "Subdivide selected segments"; ot->idname= "CURVE_OT_subdivide"; /* api callbacks */ From 7bc0fa99aed667e63226be2ab081709313ce5db5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 18 Dec 2010 09:27:08 +0000 Subject: [PATCH 234/236] workaround for build system dependency hell, fixed for cmake + makefiles (probably other buildsystems too). makesrna was often generating source every build, but not updating the files because the contents wasn't changed. this happened because makefiles would check makesrna.c and rna_*.c files were newer then rna_*_gen.c and force a re-generation. Now ensure updating the files even if they dont change when makesrna.c or rna_*.c are newer then rna_*_gen.c files. Another solution for this would be to run makesrna program for each C file for finer grained deps. or remove file comparison checks but that would mean a change to any rna_*.c file would rebuild all. --- source/blender/makesrna/intern/makesrna.c | 59 +++++++++++++++++++++-- 1 file changed, 55 insertions(+), 4 deletions(-) diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index f454cb8f231..f4479885676 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -47,7 +47,20 @@ /* Replace if different */ #define TMP_EXT ".tmp" -static int replace_if_different(char *tmpfile) + +/* copied from BLI_file_older */ +#include +static int file_older(const char *file1, const char *file2) +{ + struct stat st1, st2; + + if(stat(file1, &st1)) return 0; + if(stat(file2, &st2)) return 0; + + return (st1.st_mtime < st2.st_mtime); +} + +static int replace_if_different(char *tmpfile, const char *dep_files[]) { // return 0; // use for testing had edited rna @@ -78,6 +91,38 @@ static int replace_if_different(char *tmpfile) REN_IF_DIFF; } + + /* XXX, trick to work around dependancy problem + * assumes dep_files is in the same dir as makesrna.c, which is true for now. */ + + if(1) { + /* first check if makesrna.c is newer then generated files + * for development on makesrna.c you may want to disable this */ + if(file_older(orgfile, __FILE__)) { + REN_IF_DIFF; + } + + /* now check if any files we depend on are newer then any generated files */ + if(dep_files) { + int pass; + for(pass=0; dep_files[pass]; pass++) { + char from_path[4096]= __FILE__; + char *p1, *p2; + + /* dir only */ + p1= strrchr(from_path, '/'); + p2= strrchr(from_path, '\\'); + strcpy((p1 > p2 ? p1 : p2)+1, dep_files[pass]); + /* account for build deps, if makesrna.c (this file) is newer */ + if(file_older(orgfile, from_path)) { + REN_IF_DIFF; + } + } + } + } + /* XXX end dep trick */ + + fp_new= fopen(tmpfile, "rb"); if(fp_new==NULL) { @@ -2615,6 +2660,7 @@ static int rna_preprocess(char *outfile) FILE *file; char deffile[4096]; int i, status; + const char *deps[3]; /* expand as needed */ /* define rna */ brna= RNA_create(); @@ -2655,7 +2701,7 @@ static int rna_preprocess(char *outfile) } } - replace_if_different(deffile); + replace_if_different(deffile, NULL); rna_sort(brna); @@ -2683,7 +2729,12 @@ static int rna_preprocess(char *outfile) } } - replace_if_different(deffile); + /* avoid unneeded rebuilds */ + deps[0]= PROCESS_ITEMS[i].filename; + deps[1]= PROCESS_ITEMS[i].api_filename; + deps[2]= NULL; + + replace_if_different(deffile, deps); } /* create RNA_blender.h */ @@ -2707,7 +2758,7 @@ static int rna_preprocess(char *outfile) } } - replace_if_different(deffile); + replace_if_different(deffile, NULL); /* free RNA */ RNA_define_free(brna); From ee762ce93f8f5591793445ab678ed0ea58703003 Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Sat, 18 Dec 2010 09:32:27 +0000 Subject: [PATCH 235/236] Fix for mistake in own commit * Was a bit too eager to clean up, so all particles got reset when changing a particle value when animation was playing. --- source/blender/blenkernel/intern/particle_system.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 8cfc9c3e4af..f112689a63b 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -3752,7 +3752,7 @@ static void system_step(ParticleSimulationData *sim, float cfra) PTCacheID ptcacheid, *pid = NULL; PARTICLE_P; float disp, cache_cfra = cfra; /*, *vg_vel= 0, *vg_tan= 0, *vg_rot= 0, *vg_size= 0; */ - int startframe = 0, endframe = 100; + int startframe = 0, endframe = 100, oldtotpart = 0; /* cache shouldn't be used for hair or "continue physics" */ if(part->type != PART_HAIR && BKE_ptcache_get_continue_physics() == 0) { @@ -3778,10 +3778,12 @@ static void system_step(ParticleSimulationData *sim, float cfra) } /* 1. emit particles and redo particles if needed */ + oldtotpart = psys->totpart; if(emit_particles(sim, pid, cfra) || psys->recalc & PSYS_RECALC_RESET) { distribute_particles(sim, part->from); initialize_all_particles(sim); - reset_all_particles(sim, 0.0, cfra, 0); + /* reset only just created particles (on startframe all particles are recreated) */ + reset_all_particles(sim, 0.0, cfra, oldtotpart); /* flag for possible explode modifiers after this system */ sim->psmd->flag |= eParticleSystemFlag_Pars; From a93411629811ec20f576895c0cb515b9abd7ec19 Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Sat, 18 Dec 2010 09:46:52 +0000 Subject: [PATCH 236/236] Fix for [#25282] Crash when weting initial mesh pressets with a smoke simulation --- source/blender/blenkernel/intern/pointcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index d131a3c3592..8c5d38b63a3 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -1946,7 +1946,7 @@ void BKE_ptcache_id_clear(PTCacheID *pid, int mode, int cfra) BLI_join_dirfile(path_full, path, de->d_name); BLI_delete(path_full, 0, 0); - if(frame >=sta && frame <= end) + if(pid->cache->cached_frames && frame >=sta && frame <= end) pid->cache->cached_frames[frame-sta] = 0; } }