Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2012-03-06 03:30:41 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2012-03-06 03:30:41 +0400
commit0114d78c33edfaef5bc412eefcb5d52a0a6823b0 (patch)
tree2deb1401eb9152ccf44855b8674ee75560b1ad9f
parent1eb893a11410955a9cf3ceb41ab50d515f5393b1 (diff)
Code cleanup in rna files (huge, higly automated with py script).
Addresses: * C++ comments. * Spaces after if/for/while/switch statements. * Spaces around assignment operators.
-rw-r--r--source/blender/makesrna/intern/makesrna.c1290
-rw-r--r--source/blender/makesrna/intern/rna_ID.c194
-rw-r--r--source/blender/makesrna/intern/rna_access.c2490
-rw-r--r--source/blender/makesrna/intern/rna_action.c170
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c634
-rw-r--r--source/blender/makesrna/intern/rna_actuator_api.c8
-rw-r--r--source/blender/makesrna/intern/rna_animation.c222
-rw-r--r--source/blender/makesrna/intern/rna_animation_api.c6
-rw-r--r--source/blender/makesrna/intern/rna_animviz.c94
-rw-r--r--source/blender/makesrna/intern/rna_armature.c400
-rw-r--r--source/blender/makesrna/intern/rna_armature_api.c12
-rw-r--r--source/blender/makesrna/intern/rna_boid.c216
-rw-r--r--source/blender/makesrna/intern/rna_brush.c200
-rw-r--r--source/blender/makesrna/intern/rna_camera.c78
-rw-r--r--source/blender/makesrna/intern/rna_camera_api.c10
-rw-r--r--source/blender/makesrna/intern/rna_cloth.c138
-rw-r--r--source/blender/makesrna/intern/rna_color.c166
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c700
-rw-r--r--source/blender/makesrna/intern/rna_context.c54
-rw-r--r--source/blender/makesrna/intern/rna_controller.c106
-rw-r--r--source/blender/makesrna/intern/rna_controller_api.c20
-rw-r--r--source/blender/makesrna/intern/rna_curve.c572
-rw-r--r--source/blender/makesrna/intern/rna_define.c1728
-rw-r--r--source/blender/makesrna/intern/rna_dynamicpaint.c236
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c554
-rw-r--r--source/blender/makesrna/intern/rna_fcurve_api.c4
-rw-r--r--source/blender/makesrna/intern/rna_fluidsim.c180
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c104
-rw-r--r--source/blender/makesrna/intern/rna_group.c26
-rw-r--r--source/blender/makesrna/intern/rna_image.c240
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c60
-rw-r--r--source/blender/makesrna/intern/rna_internal.h2
-rw-r--r--source/blender/makesrna/intern/rna_key.c222
-rw-r--r--source/blender/makesrna/intern/rna_lamp.c200
-rw-r--r--source/blender/makesrna/intern/rna_lattice.c118
-rw-r--r--source/blender/makesrna/intern/rna_main.c92
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c584
-rw-r--r--source/blender/makesrna/intern/rna_material.c606
-rw-r--r--source/blender/makesrna/intern/rna_material_api.c4
-rw-r--r--source/blender/makesrna/intern/rna_mesh_api.c18
-rw-r--r--source/blender/makesrna/intern/rna_mesh_utils.h18
-rw-r--r--source/blender/makesrna/intern/rna_meta.c90
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c862
-rw-r--r--source/blender/makesrna/intern/rna_movieclip.c70
-rw-r--r--source/blender/makesrna/intern/rna_nla.c158
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c310
-rw-r--r--source/blender/makesrna/intern/rna_object.c826
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c180
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c548
-rw-r--r--source/blender/makesrna/intern/rna_packedfile.c4
-rw-r--r--source/blender/makesrna/intern/rna_particle.c906
-rw-r--r--source/blender/makesrna/intern/rna_pose.c394
-rw-r--r--source/blender/makesrna/intern/rna_pose_api.c6
-rw-r--r--source/blender/makesrna/intern/rna_property.c52
-rw-r--r--source/blender/makesrna/intern/rna_render.c174
-rw-r--r--source/blender/makesrna/intern/rna_rna.c430
-rw-r--r--source/blender/makesrna/intern/rna_scene.c1396
-rw-r--r--source/blender/makesrna/intern/rna_scene_api.c26
-rw-r--r--source/blender/makesrna/intern/rna_screen.c82
-rw-r--r--source/blender/makesrna/intern/rna_sculpt_paint.c180
-rw-r--r--source/blender/makesrna/intern/rna_sensor.c244
-rw-r--r--source/blender/makesrna/intern/rna_sensor_api.c8
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c564
-rw-r--r--source/blender/makesrna/intern/rna_sequencer_api.c10
-rw-r--r--source/blender/makesrna/intern/rna_smoke.c66
-rw-r--r--source/blender/makesrna/intern/rna_sound.c14
-rw-r--r--source/blender/makesrna/intern/rna_space.c952
-rw-r--r--source/blender/makesrna/intern/rna_speaker.c79
-rw-r--r--source/blender/makesrna/intern/rna_test.c34
-rw-r--r--source/blender/makesrna/intern/rna_text.c82
-rw-r--r--source/blender/makesrna/intern/rna_text_api.c6
-rw-r--r--source/blender/makesrna/intern/rna_texture.c544
-rw-r--r--source/blender/makesrna/intern/rna_texture_api.c16
-rw-r--r--source/blender/makesrna/intern/rna_timeline.c10
-rw-r--r--source/blender/makesrna/intern/rna_tracking.c448
-rw-r--r--source/blender/makesrna/intern/rna_ui.c248
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c206
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c1004
-rw-r--r--source/blender/makesrna/intern/rna_vfont.c6
-rw-r--r--source/blender/makesrna/intern/rna_wm.c566
-rw-r--r--source/blender/makesrna/intern/rna_wm_api.c206
-rw-r--r--source/blender/makesrna/intern/rna_world.c154
82 files changed, 12471 insertions, 12466 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index f6bf7b69887..5e2669d3227 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -62,34 +62,34 @@
static int file_older(const char *file1, const char *file2)
{
struct stat st1, st2;
- // printf("compare: %s %s\n", file1, file2);
+ /* printf("compare: %s %s\n", file1, file2); */
- if(stat(file1, &st1)) return 0;
- if(stat(file2, &st2)) return 0;
+ if (stat(file1, &st1)) return 0;
+ if (stat(file2, &st2)) return 0;
return (st1.st_mtime < st2.st_mtime);
}
-static const char *makesrna_path= NULL;
+static const char *makesrna_path = NULL;
static int replace_if_different(char *tmpfile, const char *dep_files[])
{
- // return 0; // use for testing had edited rna
+ /* return 0; *//* use for testing had edited rna */
#define REN_IF_DIFF \
{ \
- FILE *file_test= fopen(orgfile, "rb"); \
- if(file_test) { \
+ FILE *file_test = fopen(orgfile, "rb"); \
+ if (file_test) { \
fclose(file_test); \
- if(fp_org) fclose(fp_org); \
- if(fp_new) fclose(fp_new); \
- if(remove(orgfile) != 0) { \
+ if (fp_org) fclose(fp_org); \
+ if (fp_new) fclose(fp_new); \
+ if (remove(orgfile) != 0) { \
fprintf(stderr, "%s:%d, Remove Error (%s): \"%s\"\n", \
__FILE__, __LINE__, strerror(errno), orgfile); \
return -1; \
} \
} \
} \
- if(rename(tmpfile, orgfile) != 0) { \
+ if (rename(tmpfile, orgfile) != 0) { \
fprintf(stderr, "%s:%d, Rename Error (%s): \"%s\" -> \"%s\"\n", \
__FILE__, __LINE__, strerror(errno), tmpfile, orgfile); \
return -1; \
@@ -100,7 +100,7 @@ static int replace_if_different(char *tmpfile, const char *dep_files[])
/* end REN_IF_DIFF */
- FILE *fp_new= NULL, *fp_org= NULL;
+ FILE *fp_new = NULL, *fp_org = NULL;
int len_new, len_org;
char *arr_new, *arr_org;
int cmp;
@@ -110,9 +110,9 @@ static int replace_if_different(char *tmpfile, const char *dep_files[])
strcpy(orgfile, tmpfile);
orgfile[strlen(orgfile) - strlen(TMP_EXT)] = '\0'; /* strip '.tmp' */
- fp_org= fopen(orgfile, "rb");
+ fp_org = fopen(orgfile, "rb");
- if(fp_org==NULL) {
+ if (fp_org == NULL) {
REN_IF_DIFF;
}
@@ -120,30 +120,30 @@ static int replace_if_different(char *tmpfile, const char *dep_files[])
/* XXX, trick to work around dependency problem
* assumes dep_files is in the same dir as makesrna.c, which is true for now. */
- if(1) {
+ 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__)) {
+ if (file_older(orgfile, __FILE__)) {
REN_IF_DIFF;
}
- if(file_older(orgfile, makesrna_path)) {
+ if (file_older(orgfile, makesrna_path)) {
REN_IF_DIFF;
}
/* now check if any files we depend on are newer then any generated files */
- if(dep_files) {
+ if (dep_files) {
int pass;
- for(pass=0; dep_files[pass]; pass++) {
- char from_path[4096]= __FILE__;
+ 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, '\\');
+ 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)) {
+ if (file_older(orgfile, from_path)) {
REN_IF_DIFF;
}
}
@@ -152,9 +152,9 @@ static int replace_if_different(char *tmpfile, const char *dep_files[])
/* XXX end dep trick */
- fp_new= fopen(tmpfile, "rb");
+ fp_new = fopen(tmpfile, "rb");
- if(fp_new==NULL) {
+ if (fp_new == NULL) {
/* shouldn't happen, just to be safe */
fprintf(stderr, "%s:%d, open error: \"%s\"\n", __FILE__, __LINE__, tmpfile);
fclose(fp_org);
@@ -165,30 +165,30 @@ static int replace_if_different(char *tmpfile, const char *dep_files[])
fseek(fp_org, 0L, SEEK_END); len_org = ftell(fp_org); fseek(fp_org, 0L, SEEK_SET);
- if(len_new != len_org) {
+ if (len_new != len_org) {
fclose(fp_new);
fclose(fp_org);
REN_IF_DIFF;
}
/* now compare the files... */
- arr_new= MEM_mallocN(sizeof(char)*len_new, "rna_cmp_file_new");
- arr_org= MEM_mallocN(sizeof(char)*len_org, "rna_cmp_file_org");
+ arr_new = MEM_mallocN(sizeof(char)*len_new, "rna_cmp_file_new");
+ arr_org = MEM_mallocN(sizeof(char)*len_org, "rna_cmp_file_org");
- if(fread(arr_new, sizeof(char), len_new, fp_new) != len_new)
+ if (fread(arr_new, sizeof(char), len_new, fp_new) != len_new)
fprintf(stderr, "%s:%d, error reading file %s for comparison.\n", __FILE__, __LINE__, tmpfile);
- if(fread(arr_org, sizeof(char), len_org, fp_org) != len_org)
+ if (fread(arr_org, sizeof(char), len_org, fp_org) != len_org)
fprintf(stderr, "%s:%d, error reading file %s for comparison.\n", __FILE__, __LINE__, orgfile);
fclose(fp_new);
fclose(fp_org);
- cmp= memcmp(arr_new, arr_org, len_new);
+ cmp = memcmp(arr_new, arr_org, len_new);
MEM_freeN(arr_new);
MEM_freeN(arr_org);
- if(cmp) {
+ if (cmp) {
REN_IF_DIFF;
}
else {
@@ -203,9 +203,9 @@ static int replace_if_different(char *tmpfile, const char *dep_files[])
static const char *rna_safe_id(const char *id)
{
- if(strcmp(id, "default") == 0)
+ if (strcmp(id, "default") == 0)
return "default_value";
- else if(strcmp(id, "operator") == 0)
+ else if (strcmp(id, "operator") == 0)
return "operator_value";
return id;
@@ -215,38 +215,38 @@ static const char *rna_safe_id(const char *id)
static int cmp_struct(const void *a, const void *b)
{
- const StructRNA *structa= *(const StructRNA**)a;
- const StructRNA *structb= *(const StructRNA**)b;
+ const StructRNA *structa = *(const StructRNA**)a;
+ const StructRNA *structb = *(const StructRNA**)b;
return strcmp(structa->identifier, structb->identifier);
}
static int cmp_property(const void *a, const void *b)
{
- const PropertyRNA *propa= *(const PropertyRNA**)a;
- const PropertyRNA *propb= *(const PropertyRNA**)b;
+ const PropertyRNA *propa = *(const PropertyRNA**)a;
+ const PropertyRNA *propb = *(const PropertyRNA**)b;
- if(strcmp(propa->identifier, "rna_type") == 0) return -1;
- else if(strcmp(propb->identifier, "rna_type") == 0) return 1;
+ if (strcmp(propa->identifier, "rna_type") == 0) return -1;
+ else if (strcmp(propb->identifier, "rna_type") == 0) return 1;
- if(strcmp(propa->identifier, "name") == 0) return -1;
- else if(strcmp(propb->identifier, "name") == 0) return 1;
+ if (strcmp(propa->identifier, "name") == 0) return -1;
+ else if (strcmp(propb->identifier, "name") == 0) return 1;
return strcmp(propa->name, propb->name);
}
static int cmp_def_struct(const void *a, const void *b)
{
- const StructDefRNA *dsa= *(const StructDefRNA**)a;
- const StructDefRNA *dsb= *(const StructDefRNA**)b;
+ const StructDefRNA *dsa = *(const StructDefRNA**)a;
+ const StructDefRNA *dsb = *(const StructDefRNA**)b;
return cmp_struct(&dsa->srna, &dsb->srna);
}
static int cmp_def_property(const void *a, const void *b)
{
- const PropertyDefRNA *dpa= *(const PropertyDefRNA**)a;
- const PropertyDefRNA *dpb= *(const PropertyDefRNA**)b;
+ const PropertyDefRNA *dpa = *(const PropertyDefRNA**)a;
+ const PropertyDefRNA *dpb = *(const PropertyDefRNA**)b;
return cmp_property(&dpa->prop, &dpb->prop);
}
@@ -257,22 +257,22 @@ static void rna_sortlist(ListBase *listbase, int(*cmp)(const void*, const void*)
void **array;
int a, size;
- if(listbase->first == listbase->last)
+ if (listbase->first == listbase->last)
return;
- for(size=0, link=listbase->first; link; link=link->next)
+ for (size = 0, link = listbase->first; link; link = link->next)
size++;
- array= MEM_mallocN(sizeof(void*)*size, "rna_sortlist");
- for(a=0, link=listbase->first; link; link=link->next, a++)
- array[a]= link;
+ array = MEM_mallocN(sizeof(void*)*size, "rna_sortlist");
+ for (a = 0, link = listbase->first; link; link = link->next, a++)
+ array[a] = link;
qsort(array, size, sizeof(void*), cmp);
- listbase->first= listbase->last= NULL;
- for(a=0; a<size; a++) {
- link= array[a];
- link->next= link->prev= NULL;
+ listbase->first = listbase->last = NULL;
+ for (a = 0; a<size; a++) {
+ link = array[a];
+ link->next = link->prev = NULL;
rna_addtail(listbase, link);
}
@@ -286,18 +286,18 @@ static void rna_print_c_string(FILE *f, const char *str)
static const char *escape[] = {"\''", "\"\"", "\??", "\\\\","\aa", "\bb", "\ff", "\nn", "\rr", "\tt", "\vv", NULL};
int i, j;
- if(!str) {
+ if (!str) {
fprintf(f, "NULL");
return;
}
fprintf(f, "\"");
- for(i=0; str[i]; i++) {
- for(j=0; escape[j]; j++)
- if(str[i] == escape[j][0])
+ for (i = 0; str[i]; i++) {
+ for (j = 0; escape[j]; j++)
+ if (str[i] == escape[j][0])
break;
- if(escape[j]) fprintf(f, "\\%c", escape[j][1]);
+ if (escape[j]) fprintf(f, "\\%c", escape[j][1]);
else fprintf(f, "%c", str[i]);
}
fprintf(f, "\"");
@@ -305,7 +305,7 @@ static void rna_print_c_string(FILE *f, const char *str)
static void rna_print_data_get(FILE *f, PropertyDefRNA *dp)
{
- if(dp->dnastructfromname && dp->dnastructfromprop)
+ if (dp->dnastructfromname && dp->dnastructfromprop)
fprintf(f, " %s *data= (%s*)(((%s*)ptr->data)->%s);\n", dp->dnastructname, dp->dnastructname, dp->dnastructfromname, dp->dnastructfromprop);
else
fprintf(f, " %s *data= (%s*)(ptr->data);\n", dp->dnastructname, dp->dnastructname);
@@ -323,11 +323,11 @@ static char *rna_alloc_function_name(const char *structname, const char *propnam
char *result;
snprintf(buffer, sizeof(buffer), "%s_%s_%s", structname, propname, type);
- result= MEM_callocN(sizeof(char)*strlen(buffer)+1, "rna_alloc_function_name");
+ result = MEM_callocN(sizeof(char)*strlen(buffer)+1, "rna_alloc_function_name");
strcpy(result, buffer);
- alloc= MEM_callocN(sizeof(AllocDefRNA), "AllocDefRNA");
- alloc->mem= result;
+ alloc = MEM_callocN(sizeof(AllocDefRNA), "AllocDefRNA");
+ alloc->mem = result;
rna_addtail(&DefRNA.allocs, alloc);
return result;
@@ -337,8 +337,8 @@ static StructRNA *rna_find_struct(const char *identifier)
{
StructDefRNA *ds;
- for(ds=DefRNA.structs.first; ds; ds=ds->cont.next)
- if(strcmp(ds->srna->identifier, identifier)==0)
+ for (ds = DefRNA.structs.first; ds; ds = ds->cont.next)
+ if (strcmp(ds->srna->identifier, identifier) == 0)
return ds->srna;
return NULL;
@@ -348,8 +348,8 @@ static const char *rna_find_type(const char *type)
{
StructDefRNA *ds;
- for(ds=DefRNA.structs.first; ds; ds=ds->cont.next)
- if(ds->dnaname && strcmp(ds->dnaname, type)==0)
+ for (ds = DefRNA.structs.first; ds; ds = ds->cont.next)
+ if (ds->dnaname && strcmp(ds->dnaname, type) == 0)
return ds->srna->identifier;
return NULL;
@@ -359,8 +359,8 @@ static const char *rna_find_dna_type(const char *type)
{
StructDefRNA *ds;
- for(ds=DefRNA.structs.first; ds; ds=ds->cont.next)
- if(strcmp(ds->srna->identifier, type)==0)
+ for (ds = DefRNA.structs.first; ds; ds = ds->cont.next)
+ if (strcmp(ds->srna->identifier, type) == 0)
return ds->dnaname;
return NULL;
@@ -368,7 +368,7 @@ static const char *rna_find_dna_type(const char *type)
static const char *rna_type_type_name(PropertyRNA *prop)
{
- switch(prop->type) {
+ switch (prop->type) {
case PROP_BOOLEAN:
case PROP_INT:
case PROP_ENUM:
@@ -376,7 +376,7 @@ static const char *rna_type_type_name(PropertyRNA *prop)
case PROP_FLOAT:
return "float";
case PROP_STRING:
- if(prop->flag & PROP_THICK_WRAP) {
+ if (prop->flag & PROP_THICK_WRAP) {
return "char*";
}
else {
@@ -391,9 +391,9 @@ static const char *rna_type_type(PropertyRNA *prop)
{
const char *type;
- type= rna_type_type_name(prop);
+ type = rna_type_type_name(prop);
- if(type)
+ if (type)
return type;
return "PointerRNA";
@@ -403,9 +403,9 @@ static const char *rna_type_struct(PropertyRNA *prop)
{
const char *type;
- type= rna_type_type_name(prop);
+ type = rna_type_type_name(prop);
- if(type)
+ if (type)
return "";
return "struct ";
@@ -415,16 +415,16 @@ static const char *rna_parameter_type_name(PropertyRNA *parm)
{
const char *type;
- type= rna_type_type_name(parm);
+ type = rna_type_type_name(parm);
- if(type)
+ if (type)
return type;
- switch(parm->type) {
+ switch (parm->type) {
case PROP_POINTER: {
- PointerPropertyRNA *pparm= (PointerPropertyRNA*)parm;
+ PointerPropertyRNA *pparm = (PointerPropertyRNA*)parm;
- if(parm->flag & PROP_RNAPTR)
+ if (parm->flag & PROP_RNAPTR)
return "PointerRNA";
else
return rna_find_dna_type((const char *)pparm->type);
@@ -439,12 +439,12 @@ static const char *rna_parameter_type_name(PropertyRNA *parm)
static int rna_enum_bitmask(PropertyRNA *prop)
{
- EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
- int a, mask= 0;
+ EnumPropertyRNA *eprop = (EnumPropertyRNA*)prop;
+ int a, mask = 0;
- if(eprop->item) {
- for(a=0; a<eprop->totitem; a++)
- if(eprop->item[a].identifier[0])
+ if (eprop->item) {
+ for (a = 0; a<eprop->totitem; a++)
+ if (eprop->item[a].identifier[0])
mask |= eprop->item[a].value;
}
@@ -454,7 +454,7 @@ static int rna_enum_bitmask(PropertyRNA *prop)
static int rna_color_quantize(PropertyRNA *prop, PropertyDefRNA *dp)
{
return ( (prop->type == PROP_FLOAT) &&
- (prop->subtype==PROP_COLOR || prop->subtype==PROP_COLOR_GAMMA) &&
+ (prop->subtype == PROP_COLOR || prop->subtype == PROP_COLOR_GAMMA) &&
(IS_DNATYPE_FLOAT_COMPAT(dp->dnatype) == 0) );
}
@@ -465,16 +465,16 @@ static const char *rna_function_string(void *func)
static void rna_float_print(FILE *f, float num)
{
- if(num == -FLT_MAX) fprintf(f, "-FLT_MAX");
- else if(num == FLT_MAX) fprintf(f, "FLT_MAX");
- else if((int)num == num) fprintf(f, "%.1ff", num);
+ if (num == -FLT_MAX) fprintf(f, "-FLT_MAX");
+ else if (num == FLT_MAX) fprintf(f, "FLT_MAX");
+ else if ((int)num == num) fprintf(f, "%.1ff", num);
else fprintf(f, "%.10ff", num);
}
static void rna_int_print(FILE *f, int num)
{
- if(num == INT_MIN) fprintf(f, "INT_MIN");
- else if(num == INT_MAX) fprintf(f, "INT_MAX");
+ if (num == INT_MIN) fprintf(f, "INT_MIN");
+ else if (num == INT_MAX) fprintf(f, "INT_MAX");
else fprintf(f, "%d", num);
}
@@ -482,35 +482,35 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
{
char *func;
- if(prop->flag & PROP_IDPROPERTY && manualfunc==NULL)
+ if (prop->flag & PROP_IDPROPERTY && manualfunc == NULL)
return NULL;
- if(!manualfunc) {
- if(!dp->dnastructname || !dp->dnaname) {
+ if (!manualfunc) {
+ if (!dp->dnastructname || !dp->dnaname) {
fprintf(stderr, "%s (0): %s.%s has no valid dna info.\n",
__func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
return NULL;
}
/* typecheck, */
- if(dp->dnatype && *dp->dnatype) {
+ if (dp->dnatype && *dp->dnatype) {
- if(prop->type == PROP_FLOAT) {
- if(IS_DNATYPE_FLOAT_COMPAT(dp->dnatype) == 0) {
- if(prop->subtype != PROP_COLOR_GAMMA) { /* colors are an exception. these get translated */
+ if (prop->type == PROP_FLOAT) {
+ if (IS_DNATYPE_FLOAT_COMPAT(dp->dnatype) == 0) {
+ if (prop->subtype != PROP_COLOR_GAMMA) { /* colors are an exception. these get translated */
fprintf(stderr, "%s (1): %s.%s is a '%s' but wrapped as type '%s'.\n",
__func__, srna->identifier, prop->identifier, dp->dnatype, RNA_property_typename(prop->type));
- DefRNA.error= 1;
+ DefRNA.error = 1;
return NULL;
}
}
}
- else if(prop->type == PROP_INT || prop->type == PROP_BOOLEAN || prop->type == PROP_ENUM) {
- if(IS_DNATYPE_INT_COMPAT(dp->dnatype) == 0) {
+ else if (prop->type == PROP_INT || prop->type == PROP_BOOLEAN || prop->type == PROP_ENUM) {
+ if (IS_DNATYPE_INT_COMPAT(dp->dnatype) == 0) {
fprintf(stderr, "%s (2): %s.%s is a '%s' but wrapped as type '%s'.\n",
__func__, srna->identifier, prop->identifier, dp->dnatype, RNA_property_typename(prop->type));
- DefRNA.error= 1;
+ DefRNA.error = 1;
return NULL;
}
}
@@ -518,26 +518,26 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
}
- func= rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "get");
+ func = rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "get");
- switch(prop->type) {
+ switch (prop->type) {
case PROP_STRING: {
- StringPropertyRNA *sprop= (StringPropertyRNA*)prop;
+ StringPropertyRNA *sprop = (StringPropertyRNA*)prop;
fprintf(f, "void %s(PointerRNA *ptr, char *value)\n", func);
fprintf(f, "{\n");
- if(manualfunc) {
+ if (manualfunc) {
fprintf(f, " %s(ptr, value);\n", manualfunc);
}
else {
- const PropertySubType subtype= prop->subtype;
- const char *string_copy_func= (subtype==PROP_FILEPATH ||
- subtype==PROP_DIRPATH ||
- subtype==PROP_FILENAME ||
- subtype==PROP_BYTESTRING) ?
+ const PropertySubType subtype = prop->subtype;
+ const char *string_copy_func = (subtype == PROP_FILEPATH ||
+ subtype == PROP_DIRPATH ||
+ subtype == PROP_FILENAME ||
+ subtype == PROP_BYTESTRING) ?
"BLI_strncpy" : "BLI_strncpy_utf8";
rna_print_data_get(f, dp);
- if(sprop->maxlength)
+ if (sprop->maxlength)
fprintf(f, " %s(value, data->%s, %d);\n", string_copy_func, dp->dnaname, sprop->maxlength);
else
fprintf(f, " %s(value, data->%s, sizeof(data->%s));\n", string_copy_func, dp->dnaname, dp->dnaname);
@@ -548,13 +548,13 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
case PROP_POINTER: {
fprintf(f, "PointerRNA %s(PointerRNA *ptr)\n", func);
fprintf(f, "{\n");
- if(manualfunc) {
+ if (manualfunc) {
fprintf(f, " return %s(ptr);\n", manualfunc);
}
else {
- PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop;
+ PointerPropertyRNA *pprop = (PointerPropertyRNA*)prop;
rna_print_data_get(f, dp);
- if(dp->dnapointerlevel == 0)
+ if (dp->dnapointerlevel == 0)
fprintf(f, " return rna_pointer_inherit_refine(ptr, &RNA_%s, &data->%s);\n", (const char*)pprop->type, dp->dnaname);
else
fprintf(f, " return rna_pointer_inherit_refine(ptr, &RNA_%s, data->%s);\n", (const char*)pprop->type, dp->dnaname);
@@ -563,12 +563,12 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
break;
}
case PROP_COLLECTION: {
- CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop;
+ CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)prop;
fprintf(f, "static PointerRNA %s(CollectionPropertyIterator *iter)\n", func);
fprintf(f, "{\n");
- if(manualfunc) {
- if(strcmp(manualfunc, "rna_iterator_listbase_get") == 0 ||
+ if (manualfunc) {
+ if (strcmp(manualfunc, "rna_iterator_listbase_get") == 0 ||
strcmp(manualfunc, "rna_iterator_array_get") == 0 ||
strcmp(manualfunc, "rna_iterator_array_dereference_get") == 0)
fprintf(f, " return rna_pointer_inherit_refine(&iter->parent, &RNA_%s, %s(iter));\n", (cprop->item_type)? (const char*)cprop->item_type: "UnknownType", manualfunc);
@@ -579,21 +579,21 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
break;
}
default:
- if(prop->arraydimension) {
- if(prop->flag & PROP_DYNAMIC)
+ if (prop->arraydimension) {
+ if (prop->flag & PROP_DYNAMIC)
fprintf(f, "void %s(PointerRNA *ptr, %s values[])\n", func, rna_type_type(prop));
else
fprintf(f, "void %s(PointerRNA *ptr, %s values[%u])\n", func, rna_type_type(prop), prop->totarraylength);
fprintf(f, "{\n");
- if(manualfunc) {
+ if (manualfunc) {
fprintf(f, " %s(ptr, values);\n", manualfunc);
}
else {
rna_print_data_get(f, dp);
- if(prop->flag & PROP_DYNAMIC) {
- char *lenfunc= rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "get_length");
+ if (prop->flag & PROP_DYNAMIC) {
+ char *lenfunc = rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "get_length");
fprintf(f, " int i, arraylen[RNA_MAX_ARRAY_DIMENSION];\n");
fprintf(f, " int len= %s(ptr, arraylen);\n\n", lenfunc);
fprintf(f, " for(i=0; i<len; i++) {\n");
@@ -604,21 +604,21 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
fprintf(f, " for(i=0; i<%u; i++) {\n", prop->totarraylength);
}
- if(dp->dnaarraylength == 1) {
- if(prop->type == PROP_BOOLEAN && dp->booleanbit)
+ if (dp->dnaarraylength == 1) {
+ if (prop->type == PROP_BOOLEAN && dp->booleanbit)
fprintf(f, " values[i]= %s((data->%s & (%d<<i)) != 0);\n", (dp->booleannegative)? "!": "", dp->dnaname, dp->booleanbit);
else
fprintf(f, " values[i]= (%s)%s((&data->%s)[i]);\n", rna_type_type(prop), (dp->booleannegative)? "!": "", dp->dnaname);
}
else {
- if(prop->type == PROP_BOOLEAN && dp->booleanbit) {
+ if (prop->type == PROP_BOOLEAN && dp->booleanbit) {
fprintf(f, " values[i]= %s((data->%s[i] & ", (dp->booleannegative)? "!": "", dp->dnaname);
rna_int_print(f, dp->booleanbit);
fprintf(f, ") != 0);\n");
}
- else if(rna_color_quantize(prop, dp))
+ else if (rna_color_quantize(prop, dp))
fprintf(f, " values[i]= (%s)(data->%s[i]*(1.0f/255.0f));\n", rna_type_type(prop), dp->dnaname);
- else if(dp->dnatype)
+ else if (dp->dnatype)
fprintf(f, " values[i]= (%s)%s(((%s*)data->%s)[i]);\n", rna_type_type(prop), (dp->booleannegative)? "!": "", dp->dnatype, dp->dnaname);
else
fprintf(f, " values[i]= (%s)%s((data->%s)[i]);\n", rna_type_type(prop), (dp->booleannegative)? "!": "", dp->dnaname);
@@ -631,17 +631,17 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
fprintf(f, "%s %s(PointerRNA *ptr)\n", rna_type_type(prop), func);
fprintf(f, "{\n");
- if(manualfunc) {
+ if (manualfunc) {
fprintf(f, " return %s(ptr);\n", manualfunc);
}
else {
rna_print_data_get(f, dp);
- if(prop->type == PROP_BOOLEAN && dp->booleanbit) {
+ if (prop->type == PROP_BOOLEAN && dp->booleanbit) {
fprintf(f, " return %s(((data->%s) & ", (dp->booleannegative)? "!": "", dp->dnaname);
rna_int_print(f, dp->booleanbit);
fprintf(f, ") != 0);\n");
}
- else if(prop->type == PROP_ENUM && dp->enumbitflags) {
+ else if (prop->type == PROP_ENUM && dp->enumbitflags) {
fprintf(f, " return ((data->%s) & ", dp->dnaname);
rna_int_print(f, rna_enum_bitmask(prop));
fprintf(f, ");\n");
@@ -661,16 +661,16 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
/* defined min/max variables to be used by rna_clamp_value() */
static void rna_clamp_value_range(FILE *f, PropertyRNA *prop)
{
- if(prop->type == PROP_FLOAT) {
- FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
- if(fprop->range) {
+ if (prop->type == PROP_FLOAT) {
+ FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
+ if (fprop->range) {
fprintf(f, " float prop_clamp_min, prop_clamp_max;\n");
fprintf(f, " %s(ptr, &prop_clamp_min, &prop_clamp_max);\n", rna_function_string(fprop->range));
}
}
- else if(prop->type == PROP_INT) {
- IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
- if(iprop->range) {
+ else if (prop->type == PROP_INT) {
+ IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
+ if (iprop->range) {
fprintf(f, " int prop_clamp_min, prop_clamp_max;\n");
fprintf(f, " %s(ptr, &prop_clamp_min, &prop_clamp_max);\n", rna_function_string(iprop->range));
}
@@ -679,13 +679,13 @@ static void rna_clamp_value_range(FILE *f, PropertyRNA *prop)
static void rna_clamp_value(FILE *f, PropertyRNA *prop, int array)
{
- if(prop->type == PROP_INT) {
- IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
+ if (prop->type == PROP_INT) {
+ IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
- if(iprop->hardmin != INT_MIN || iprop->hardmax != INT_MAX) {
- if(array) fprintf(f, "CLAMPIS(values[i], ");
+ if (iprop->hardmin != INT_MIN || iprop->hardmax != INT_MAX) {
+ if (array) fprintf(f, "CLAMPIS(values[i], ");
else fprintf(f, "CLAMPIS(value, ");
- if(iprop->range) {
+ if (iprop->range) {
fprintf(f, "prop_clamp_min, prop_clamp_max);");
}
else {
@@ -695,13 +695,13 @@ static void rna_clamp_value(FILE *f, PropertyRNA *prop, int array)
return;
}
}
- else if(prop->type == PROP_FLOAT) {
- FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
+ else if (prop->type == PROP_FLOAT) {
+ FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
- if(fprop->hardmin != -FLT_MAX || fprop->hardmax != FLT_MAX) {
- if(array) fprintf(f, "CLAMPIS(values[i], ");
+ if (fprop->hardmin != -FLT_MAX || fprop->hardmax != FLT_MAX) {
+ if (array) fprintf(f, "CLAMPIS(values[i], ");
else fprintf(f, "CLAMPIS(value, ");
- if(fprop->range) {
+ if (fprop->range) {
fprintf(f, "prop_clamp_min, prop_clamp_max);");
}
else {
@@ -712,7 +712,7 @@ static void rna_clamp_value(FILE *f, PropertyRNA *prop, int array)
}
}
- if(array)
+ if (array)
fprintf(f, "values[i];\n");
else
fprintf(f, "value;\n");
@@ -722,42 +722,42 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
{
char *func;
- if(!(prop->flag & PROP_EDITABLE))
+ if (!(prop->flag & PROP_EDITABLE))
return NULL;
- if(prop->flag & PROP_IDPROPERTY && manualfunc==NULL)
+ if (prop->flag & PROP_IDPROPERTY && manualfunc == NULL)
return NULL;
- if(!manualfunc) {
- if(!dp->dnastructname || !dp->dnaname) {
- if(prop->flag & PROP_EDITABLE) {
+ if (!manualfunc) {
+ if (!dp->dnastructname || !dp->dnaname) {
+ if (prop->flag & PROP_EDITABLE) {
fprintf(stderr, "%s: %s.%s has no valid dna info.\n",
__func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
}
return NULL;
}
}
- func= rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "set");
+ func = rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "set");
- switch(prop->type) {
+ switch (prop->type) {
case PROP_STRING: {
- StringPropertyRNA *sprop= (StringPropertyRNA*)prop;
+ StringPropertyRNA *sprop = (StringPropertyRNA*)prop;
fprintf(f, "void %s(PointerRNA *ptr, const char *value)\n", func);
fprintf(f, "{\n");
- if(manualfunc) {
+ if (manualfunc) {
fprintf(f, " %s(ptr, value);\n", manualfunc);
}
else {
- const PropertySubType subtype= prop->subtype;
- const char *string_copy_func= (subtype==PROP_FILEPATH ||
- subtype==PROP_DIRPATH ||
- subtype==PROP_FILENAME ||
- subtype==PROP_BYTESTRING) ?
+ const PropertySubType subtype = prop->subtype;
+ const char *string_copy_func = (subtype == PROP_FILEPATH ||
+ subtype == PROP_DIRPATH ||
+ subtype == PROP_FILENAME ||
+ subtype == PROP_BYTESTRING) ?
"BLI_strncpy" : "BLI_strncpy_utf8";
rna_print_data_get(f, dp);
- if(sprop->maxlength)
+ if (sprop->maxlength)
fprintf(f, " %s(data->%s, value, %d);\n", string_copy_func, dp->dnaname, sprop->maxlength);
else
fprintf(f, " %s(data->%s, value, sizeof(data->%s));\n", string_copy_func, dp->dnaname, dp->dnaname);
@@ -768,27 +768,27 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
case PROP_POINTER: {
fprintf(f, "void %s(PointerRNA *ptr, PointerRNA value)\n", func);
fprintf(f, "{\n");
- if(manualfunc) {
+ if (manualfunc) {
fprintf(f, " %s(ptr, value);\n", manualfunc);
}
else {
rna_print_data_get(f, dp);
- if(prop->flag & PROP_ID_SELF_CHECK) {
+ if (prop->flag & PROP_ID_SELF_CHECK) {
rna_print_id_get(f, dp);
fprintf(f, " if(id==value.data) return;\n\n");
}
- if(prop->flag & PROP_ID_REFCOUNT) {
+ if (prop->flag & PROP_ID_REFCOUNT) {
fprintf(f, "\n if(data->%s)\n", dp->dnaname);
fprintf(f, " id_us_min((ID*)data->%s);\n", dp->dnaname);
fprintf(f, " if(value.data)\n");
fprintf(f, " id_us_plus((ID*)value.data);\n\n");
}
else {
- PointerPropertyRNA *pprop= (PointerPropertyRNA*)dp->prop;
- StructRNA *type= rna_find_struct((const char*)pprop->type);
- if(type && (type->flag & STRUCT_ID)) {
+ PointerPropertyRNA *pprop = (PointerPropertyRNA*)dp->prop;
+ StructRNA *type = rna_find_struct((const char*)pprop->type);
+ if (type && (type->flag & STRUCT_ID)) {
fprintf(f, " if(value.data)\n");
fprintf(f, " id_lib_extern((ID*)value.data);\n\n");
}
@@ -801,21 +801,21 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
break;
}
default:
- if(prop->arraydimension) {
- if(prop->flag & PROP_DYNAMIC)
+ if (prop->arraydimension) {
+ if (prop->flag & PROP_DYNAMIC)
fprintf(f, "void %s(PointerRNA *ptr, const %s values[])\n", func, rna_type_type(prop));
else
fprintf(f, "void %s(PointerRNA *ptr, const %s values[%u])\n", func, rna_type_type(prop), prop->totarraylength);
fprintf(f, "{\n");
- if(manualfunc) {
+ if (manualfunc) {
fprintf(f, " %s(ptr, values);\n", manualfunc);
}
else {
rna_print_data_get(f, dp);
- if(prop->flag & PROP_DYNAMIC) {
- char *lenfunc= rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "set_length");
+ if (prop->flag & PROP_DYNAMIC) {
+ char *lenfunc = rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "set_length");
fprintf(f, " int i, arraylen[RNA_MAX_ARRAY_DIMENSION];\n");
fprintf(f, " int len= %s(ptr, arraylen);\n\n", lenfunc);
rna_clamp_value_range(f, prop);
@@ -828,8 +828,8 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
fprintf(f, " for(i=0; i<%u; i++) {\n", prop->totarraylength);
}
- if(dp->dnaarraylength == 1) {
- if(prop->type == PROP_BOOLEAN && dp->booleanbit) {
+ if (dp->dnaarraylength == 1) {
+ if (prop->type == PROP_BOOLEAN && dp->booleanbit) {
fprintf(f, " if(%svalues[i]) data->%s |= (%d<<i);\n", (dp->booleannegative)? "!": "", dp->dnaname, dp->booleanbit);
fprintf(f, " else data->%s &= ~(%d<<i);\n", dp->dnaname, dp->booleanbit);
}
@@ -839,7 +839,7 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
}
}
else {
- if(prop->type == PROP_BOOLEAN && dp->booleanbit) {
+ if (prop->type == PROP_BOOLEAN && dp->booleanbit) {
fprintf(f, " if(%svalues[i]) data->%s[i] |= ", (dp->booleannegative)? "!": "", dp->dnaname);
rna_int_print(f, dp->booleanbit);
fprintf(f, ";\n");
@@ -847,11 +847,11 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
rna_int_print(f, dp->booleanbit);
fprintf(f, ";\n");
}
- else if(rna_color_quantize(prop, dp)) {
+ else if (rna_color_quantize(prop, dp)) {
fprintf(f, " data->%s[i]= FTOCHAR(values[i]);\n", dp->dnaname);
}
else {
- if(dp->dnatype)
+ if (dp->dnatype)
fprintf(f, " ((%s*)data->%s)[i]= %s", dp->dnatype, dp->dnaname, (dp->booleannegative)? "!": "");
else
fprintf(f, " (data->%s)[i]= %s", dp->dnaname, (dp->booleannegative)? "!": "");
@@ -866,12 +866,12 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
fprintf(f, "void %s(PointerRNA *ptr, %s value)\n", func, rna_type_type(prop));
fprintf(f, "{\n");
- if(manualfunc) {
+ if (manualfunc) {
fprintf(f, " %s(ptr, value);\n", manualfunc);
}
else {
rna_print_data_get(f, dp);
- if(prop->type == PROP_BOOLEAN && dp->booleanbit) {
+ if (prop->type == PROP_BOOLEAN && dp->booleanbit) {
fprintf(f, " if(%svalue) data->%s |= ", (dp->booleannegative)? "!": "", dp->dnaname);
rna_int_print(f, dp->booleanbit);
fprintf(f, ";\n");
@@ -879,7 +879,7 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
rna_int_print(f, dp->booleanbit);
fprintf(f, ";\n");
}
- else if(prop->type == PROP_ENUM && dp->enumbitflags) {
+ else if (prop->type == PROP_ENUM && dp->enumbitflags) {
fprintf(f, " data->%s &= ~", dp->dnaname);
rna_int_print(f, rna_enum_bitmask(prop));
fprintf(f, ";\n");
@@ -901,26 +901,26 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
static char *rna_def_property_length_func(FILE *f, StructRNA *srna, PropertyRNA *prop, PropertyDefRNA *dp, const char *manualfunc)
{
- char *func= NULL;
+ char *func = NULL;
- if(prop->flag & PROP_IDPROPERTY && manualfunc==NULL)
+ if (prop->flag & PROP_IDPROPERTY && manualfunc == NULL)
return NULL;
- if(prop->type == PROP_STRING) {
- if(!manualfunc) {
- if(!dp->dnastructname || !dp->dnaname) {
+ if (prop->type == PROP_STRING) {
+ if (!manualfunc) {
+ if (!dp->dnastructname || !dp->dnaname) {
fprintf(stderr, "%s: %s.%s has no valid dna info.\n",
__func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
return NULL;
}
}
- func= rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "length");
+ func = rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "length");
fprintf(f, "int %s(PointerRNA *ptr)\n", func);
fprintf(f, "{\n");
- if(manualfunc) {
+ if (manualfunc) {
fprintf(f, " return %s(ptr);\n", manualfunc);
}
else {
@@ -929,26 +929,26 @@ static char *rna_def_property_length_func(FILE *f, StructRNA *srna, PropertyRNA
}
fprintf(f, "}\n\n");
}
- else if(prop->type == PROP_COLLECTION) {
- if(!manualfunc) {
- if(prop->type == PROP_COLLECTION && (!(dp->dnalengthname || dp->dnalengthfixed)|| !dp->dnaname)) {
+ else if (prop->type == PROP_COLLECTION) {
+ if (!manualfunc) {
+ if (prop->type == PROP_COLLECTION && (!(dp->dnalengthname || dp->dnalengthfixed)|| !dp->dnaname)) {
fprintf(stderr, "%s: %s.%s has no valid dna info.\n",
__func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
return NULL;
}
}
- func= rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "length");
+ func = rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "length");
fprintf(f, "int %s(PointerRNA *ptr)\n", func);
fprintf(f, "{\n");
- if(manualfunc) {
+ if (manualfunc) {
fprintf(f, " return %s(ptr);\n", manualfunc);
}
else {
rna_print_data_get(f, dp);
- if(dp->dnalengthname)
+ if (dp->dnalengthname)
fprintf(f, " return (data->%s == NULL)? 0: data->%s;\n", dp->dnaname, dp->dnalengthname);
else
fprintf(f, " return (data->%s == NULL)? 0: %d;\n", dp->dnaname, dp->dnalengthfixed);
@@ -963,51 +963,51 @@ static char *rna_def_property_begin_func(FILE *f, StructRNA *srna, PropertyRNA *
{
char *func, *getfunc;
- if(prop->flag & PROP_IDPROPERTY && manualfunc==NULL)
+ if (prop->flag & PROP_IDPROPERTY && manualfunc == NULL)
return NULL;
- if(!manualfunc) {
- if(!dp->dnastructname || !dp->dnaname) {
+ if (!manualfunc) {
+ if (!dp->dnastructname || !dp->dnaname) {
fprintf(stderr, "%s: %s.%s has no valid dna info.\n",
__func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
return NULL;
}
}
- func= rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "begin");
+ func = rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "begin");
fprintf(f, "void %s(CollectionPropertyIterator *iter, PointerRNA *ptr)\n", func);
fprintf(f, "{\n");
- if(!manualfunc)
+ if (!manualfunc)
rna_print_data_get(f, dp);
fprintf(f, "\n memset(iter, 0, sizeof(*iter));\n");
fprintf(f, " iter->parent= *ptr;\n");
fprintf(f, " iter->prop= (PropertyRNA*)&rna_%s_%s;\n", srna->identifier, prop->identifier);
- if(dp->dnalengthname || dp->dnalengthfixed) {
- if(manualfunc) {
+ if (dp->dnalengthname || dp->dnalengthfixed) {
+ if (manualfunc) {
fprintf(f, "\n %s(iter, ptr);\n", manualfunc);
}
else {
- if(dp->dnalengthname)
+ if (dp->dnalengthname)
fprintf(f, "\n rna_iterator_array_begin(iter, data->%s, sizeof(data->%s[0]), data->%s, 0, NULL);\n", dp->dnaname, dp->dnaname, dp->dnalengthname);
else
fprintf(f, "\n rna_iterator_array_begin(iter, data->%s, sizeof(data->%s[0]), %d, 0, NULL);\n", dp->dnaname, dp->dnaname, dp->dnalengthfixed);
}
}
else {
- if(manualfunc)
+ if (manualfunc)
fprintf(f, "\n %s(iter, ptr);\n", manualfunc);
- else if(dp->dnapointerlevel == 0)
+ else if (dp->dnapointerlevel == 0)
fprintf(f, "\n rna_iterator_listbase_begin(iter, &data->%s, NULL);\n", dp->dnaname);
else
fprintf(f, "\n rna_iterator_listbase_begin(iter, data->%s, NULL);\n", dp->dnaname);
}
- getfunc= rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "get");
+ getfunc = rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "get");
fprintf(f, "\n if(iter->valid)\n");
fprintf(f, " iter->ptr= %s(iter);\n", getfunc);
@@ -1024,25 +1024,25 @@ static char *rna_def_property_lookup_int_func(FILE *f, StructRNA *srna, Property
* so the the index can only be checked against the length when there is no 'skip' funcion. */
char *func;
- if(prop->flag & PROP_IDPROPERTY && manualfunc==NULL)
+ if (prop->flag & PROP_IDPROPERTY && manualfunc == NULL)
return NULL;
- if(!manualfunc) {
- if(!dp->dnastructname || !dp->dnaname)
+ if (!manualfunc) {
+ if (!dp->dnastructname || !dp->dnaname)
return NULL;
/* only supported in case of standard next functions */
- if(strcmp(nextfunc, "rna_iterator_array_next") == 0);
- else if(strcmp(nextfunc, "rna_iterator_listbase_next") == 0);
+ if (strcmp(nextfunc, "rna_iterator_array_next") == 0);
+ else if (strcmp(nextfunc, "rna_iterator_listbase_next") == 0);
else return NULL;
}
- func= rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "lookup_int");
+ func = rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "lookup_int");
fprintf(f, "int %s(PointerRNA *ptr, int index, PointerRNA *r_ptr)\n", func);
fprintf(f, "{\n");
- if(manualfunc) {
+ if (manualfunc) {
fprintf(f, "\n return %s(ptr, index, r_ptr);\n", manualfunc);
fprintf(f, "}\n\n");
return func;
@@ -1054,7 +1054,7 @@ static char *rna_def_property_lookup_int_func(FILE *f, StructRNA *srna, Property
fprintf(f, " %s_%s_begin(&iter, ptr);\n\n", srna->identifier, rna_safe_id(prop->identifier));
fprintf(f, " if(iter.valid){\n");
- if(strcmp(nextfunc, "rna_iterator_array_next") == 0) {
+ if (strcmp(nextfunc, "rna_iterator_array_next") == 0) {
fprintf(f, " ArrayIterator *internal= iter.internal;\n");
fprintf(f, " if(index < 0 || index >= internal->length) {\n");
fprintf(f, "#ifdef __GNUC__\n");
@@ -1074,7 +1074,7 @@ static char *rna_def_property_lookup_int_func(FILE *f, StructRNA *srna, Property
fprintf(f, " found= 1;\n");
fprintf(f, " }\n");
}
- else if(strcmp(nextfunc, "rna_iterator_listbase_next") == 0) {
+ else if (strcmp(nextfunc, "rna_iterator_listbase_next") == 0) {
fprintf(f, " ListBaseIterator *internal= iter.internal;\n");
fprintf(f, " if(internal->skip) {\n");
fprintf(f, " while(index-- > 0 && iter.valid) {\n");
@@ -1097,16 +1097,16 @@ static char *rna_def_property_lookup_int_func(FILE *f, StructRNA *srna, Property
#if 0
rna_print_data_get(f, dp);
- item_type= (cprop->item_type)? (const char*)cprop->item_type: "UnknownType";
+ item_type = (cprop->item_type)? (const char*)cprop->item_type: "UnknownType";
- if(dp->dnalengthname || dp->dnalengthfixed) {
- if(dp->dnalengthname)
+ if (dp->dnalengthname || dp->dnalengthfixed) {
+ if (dp->dnalengthname)
fprintf(f, "\n rna_array_lookup_int(ptr, &RNA_%s, data->%s, sizeof(data->%s[0]), data->%s, index);\n", item_type, dp->dnaname, dp->dnaname, dp->dnalengthname);
else
fprintf(f, "\n rna_array_lookup_int(ptr, &RNA_%s, data->%s, sizeof(data->%s[0]), %d, index);\n", item_type, dp->dnaname, dp->dnaname, dp->dnalengthfixed);
}
else {
- if(dp->dnapointerlevel == 0)
+ if (dp->dnapointerlevel == 0)
fprintf(f, "\n return rna_listbase_lookup_int(ptr, &RNA_%s, &data->%s, index);\n", item_type, dp->dnaname);
else
fprintf(f, "\n return rna_listbase_lookup_int(ptr, &RNA_%s, data->%s, index);\n", item_type, dp->dnaname);
@@ -1122,19 +1122,19 @@ static char *rna_def_property_next_func(FILE *f, StructRNA *srna, PropertyRNA *p
{
char *func, *getfunc;
- if(prop->flag & PROP_IDPROPERTY && manualfunc==NULL)
+ if (prop->flag & PROP_IDPROPERTY && manualfunc == NULL)
return NULL;
- if(!manualfunc)
+ if (!manualfunc)
return NULL;
- func= rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "next");
+ func = rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "next");
fprintf(f, "void %s(CollectionPropertyIterator *iter)\n", func);
fprintf(f, "{\n");
fprintf(f, " %s(iter);\n", manualfunc);
- getfunc= rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "get");
+ getfunc = rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "get");
fprintf(f, "\n if(iter->valid)\n");
fprintf(f, " iter->ptr= %s(iter);\n", getfunc);
@@ -1148,14 +1148,14 @@ static char *rna_def_property_end_func(FILE *f, StructRNA *srna, PropertyRNA *pr
{
char *func;
- if(prop->flag & PROP_IDPROPERTY && manualfunc==NULL)
+ if (prop->flag & PROP_IDPROPERTY && manualfunc == NULL)
return NULL;
- func= rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "end");
+ func = rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "end");
fprintf(f, "void %s(CollectionPropertyIterator *iter)\n", func);
fprintf(f, "{\n");
- if(manualfunc)
+ if (manualfunc)
fprintf(f, " %s(iter);\n", manualfunc);
fprintf(f, "}\n\n");
@@ -1164,36 +1164,36 @@ static char *rna_def_property_end_func(FILE *f, StructRNA *srna, PropertyRNA *pr
static void rna_set_raw_property(PropertyDefRNA *dp, PropertyRNA *prop)
{
- if(dp->dnapointerlevel != 0)
+ if (dp->dnapointerlevel != 0)
return;
- if(!dp->dnatype || !dp->dnaname || !dp->dnastructname)
+ if (!dp->dnatype || !dp->dnaname || !dp->dnastructname)
return;
- if(strcmp(dp->dnatype, "char") == 0) {
- prop->rawtype= PROP_RAW_CHAR;
+ if (strcmp(dp->dnatype, "char") == 0) {
+ prop->rawtype = PROP_RAW_CHAR;
prop->flag |= PROP_RAW_ACCESS;
}
- else if(strcmp(dp->dnatype, "short") == 0) {
- prop->rawtype= PROP_RAW_SHORT;
+ else if (strcmp(dp->dnatype, "short") == 0) {
+ prop->rawtype = PROP_RAW_SHORT;
prop->flag |= PROP_RAW_ACCESS;
}
- else if(strcmp(dp->dnatype, "int") == 0) {
- prop->rawtype= PROP_RAW_INT;
+ else if (strcmp(dp->dnatype, "int") == 0) {
+ prop->rawtype = PROP_RAW_INT;
prop->flag |= PROP_RAW_ACCESS;
}
- else if(strcmp(dp->dnatype, "float") == 0) {
- prop->rawtype= PROP_RAW_FLOAT;
+ else if (strcmp(dp->dnatype, "float") == 0) {
+ prop->rawtype = PROP_RAW_FLOAT;
prop->flag |= PROP_RAW_ACCESS;
}
- else if(strcmp(dp->dnatype, "double") == 0) {
- prop->rawtype= PROP_RAW_DOUBLE;
+ else if (strcmp(dp->dnatype, "double") == 0) {
+ prop->rawtype = PROP_RAW_DOUBLE;
prop->flag |= PROP_RAW_ACCESS;
}
}
static void rna_set_raw_offset(FILE *f, StructRNA *srna, PropertyRNA *prop)
{
- PropertyDefRNA *dp= rna_find_struct_property_def(srna, prop);
+ PropertyDefRNA *dp = rna_find_struct_property_def(srna, prop);
fprintf(f, "\toffsetof(%s, %s), %d", dp->dnastructname, dp->dnaname, prop->rawtype);
}
@@ -1202,132 +1202,132 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
{
PropertyRNA *prop;
- prop= dp->prop;
+ prop = dp->prop;
- switch(prop->type) {
+ switch (prop->type) {
case PROP_BOOLEAN: {
- BoolPropertyRNA *bprop= (BoolPropertyRNA*)prop;
+ BoolPropertyRNA *bprop = (BoolPropertyRNA*)prop;
- if(!prop->arraydimension) {
- if(!bprop->get && !bprop->set && !dp->booleanbit)
+ if (!prop->arraydimension) {
+ if (!bprop->get && !bprop->set && !dp->booleanbit)
rna_set_raw_property(dp, prop);
- bprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)bprop->get);
- bprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)bprop->set);
+ bprop->get = (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)bprop->get);
+ bprop->set = (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)bprop->set);
}
else {
- bprop->getarray= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)bprop->getarray);
- bprop->setarray= (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)bprop->setarray);
+ bprop->getarray = (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)bprop->getarray);
+ bprop->setarray = (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)bprop->setarray);
}
break;
}
case PROP_INT: {
- IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
+ IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
- if(!prop->arraydimension) {
- if(!iprop->get && !iprop->set)
+ if (!prop->arraydimension) {
+ if (!iprop->get && !iprop->set)
rna_set_raw_property(dp, prop);
- iprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)iprop->get);
- iprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)iprop->set);
+ iprop->get = (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)iprop->get);
+ iprop->set = (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)iprop->set);
}
else {
- if(!iprop->getarray && !iprop->setarray)
+ if (!iprop->getarray && !iprop->setarray)
rna_set_raw_property(dp, prop);
- iprop->getarray= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)iprop->getarray);
- iprop->setarray= (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)iprop->setarray);
+ iprop->getarray = (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)iprop->getarray);
+ iprop->setarray = (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)iprop->setarray);
}
break;
}
case PROP_FLOAT: {
- FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
+ FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
- if(!prop->arraydimension) {
- if(!fprop->get && !fprop->set)
+ if (!prop->arraydimension) {
+ if (!fprop->get && !fprop->set)
rna_set_raw_property(dp, prop);
- fprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)fprop->get);
- fprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)fprop->set);
+ fprop->get = (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)fprop->get);
+ fprop->set = (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)fprop->set);
}
else {
- if(!fprop->getarray && !fprop->setarray)
+ if (!fprop->getarray && !fprop->setarray)
rna_set_raw_property(dp, prop);
- fprop->getarray= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)fprop->getarray);
- fprop->setarray= (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)fprop->setarray);
+ fprop->getarray = (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)fprop->getarray);
+ fprop->setarray = (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)fprop->setarray);
}
break;
}
case PROP_ENUM: {
- EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
+ EnumPropertyRNA *eprop = (EnumPropertyRNA*)prop;
- eprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)eprop->get);
- eprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)eprop->set);
+ eprop->get = (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)eprop->get);
+ eprop->set = (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)eprop->set);
break;
}
case PROP_STRING: {
- StringPropertyRNA *sprop= (StringPropertyRNA*)prop;
+ StringPropertyRNA *sprop = (StringPropertyRNA*)prop;
- sprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)sprop->get);
- sprop->length= (void*)rna_def_property_length_func(f, srna, prop, dp, (const char*)sprop->length);
- sprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)sprop->set);
+ sprop->get = (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)sprop->get);
+ sprop->length = (void*)rna_def_property_length_func(f, srna, prop, dp, (const char*)sprop->length);
+ sprop->set = (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)sprop->set);
break;
}
case PROP_POINTER: {
- PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop;
+ PointerPropertyRNA *pprop = (PointerPropertyRNA*)prop;
- pprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)pprop->get);
- pprop->set= (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)pprop->set);
- if(!pprop->type) {
+ pprop->get = (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)pprop->get);
+ pprop->set = (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)pprop->set);
+ if (!pprop->type) {
fprintf(stderr, "%s: %s.%s, pointer must have a struct type.\n",
__func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
}
break;
}
case PROP_COLLECTION: {
- CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop;
- const char *nextfunc= (const char*)cprop->next;
+ CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)prop;
+ const char *nextfunc = (const char*)cprop->next;
- if(dp->dnatype && strcmp(dp->dnatype, "ListBase")==0);
- else if(dp->dnalengthname || dp->dnalengthfixed)
- cprop->length= (void*)rna_def_property_length_func(f, srna, prop, dp, (const char*)cprop->length);
+ if (dp->dnatype && strcmp(dp->dnatype, "ListBase") == 0);
+ else if (dp->dnalengthname || dp->dnalengthfixed)
+ cprop->length = (void*)rna_def_property_length_func(f, srna, prop, dp, (const char*)cprop->length);
/* test if we can allow raw array access, if it is using our standard
* array get/next function, we can be sure it is an actual array */
- if(cprop->next && cprop->get)
- if(strcmp((const char*)cprop->next, "rna_iterator_array_next") == 0 &&
+ if (cprop->next && cprop->get)
+ if (strcmp((const char*)cprop->next, "rna_iterator_array_next") == 0 &&
strcmp((const char*)cprop->get, "rna_iterator_array_get") == 0)
prop->flag |= PROP_RAW_ARRAY;
- cprop->get= (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)cprop->get);
- cprop->begin= (void*)rna_def_property_begin_func(f, srna, prop, dp, (const char*)cprop->begin);
- cprop->next= (void*)rna_def_property_next_func(f, srna, prop, dp, (const char*)cprop->next);
- cprop->end= (void*)rna_def_property_end_func(f, srna, prop, dp, (const char*)cprop->end);
- cprop->lookupint= (void*)rna_def_property_lookup_int_func(f, srna, prop, dp, (const char*)cprop->lookupint, nextfunc);
+ cprop->get = (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)cprop->get);
+ cprop->begin = (void*)rna_def_property_begin_func(f, srna, prop, dp, (const char*)cprop->begin);
+ cprop->next = (void*)rna_def_property_next_func(f, srna, prop, dp, (const char*)cprop->next);
+ cprop->end = (void*)rna_def_property_end_func(f, srna, prop, dp, (const char*)cprop->end);
+ cprop->lookupint = (void*)rna_def_property_lookup_int_func(f, srna, prop, dp, (const char*)cprop->lookupint, nextfunc);
- if(!(prop->flag & PROP_IDPROPERTY)) {
- if(!cprop->begin) {
+ if (!(prop->flag & PROP_IDPROPERTY)) {
+ if (!cprop->begin) {
fprintf(stderr, "%s: %s.%s, collection must have a begin function.\n",
__func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
}
- if(!cprop->next) {
+ if (!cprop->next) {
fprintf(stderr, "%s: %s.%s, collection must have a next function.\n",
__func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
}
- if(!cprop->get) {
+ if (!cprop->get) {
fprintf(stderr, "%s: %s.%s, collection must have a get function.\n",
__func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
}
}
- if(!cprop->item_type) {
+ if (!cprop->item_type) {
fprintf(stderr, "%s: %s.%s, collection must have a struct type.\n",
__func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
}
break;
}
@@ -1339,89 +1339,89 @@ static void rna_def_property_funcs_header(FILE *f, StructRNA *srna, PropertyDefR
PropertyRNA *prop;
char *func;
- prop= dp->prop;
+ prop = dp->prop;
- if(prop->flag & (PROP_IDPROPERTY|PROP_BUILTIN))
+ if (prop->flag & (PROP_IDPROPERTY|PROP_BUILTIN))
return;
- func= rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "");
+ func = rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "");
- switch(prop->type) {
+ switch (prop->type) {
case PROP_BOOLEAN:
case PROP_INT: {
- if(!prop->arraydimension) {
+ if (!prop->arraydimension) {
fprintf(f, "int %sget(PointerRNA *ptr);\n", func);
- //fprintf(f, "void %sset(PointerRNA *ptr, int value);\n", func);
+ /*fprintf(f, "void %sset(PointerRNA *ptr, int value);\n", func); */
}
- else if(prop->arraydimension && prop->totarraylength) {
+ else if (prop->arraydimension && prop->totarraylength) {
fprintf(f, "void %sget(PointerRNA *ptr, int values[%u]);\n", func, prop->totarraylength);
- //fprintf(f, "void %sset(PointerRNA *ptr, const int values[%d]);\n", func, prop->arraylength);
+ /*fprintf(f, "void %sset(PointerRNA *ptr, const int values[%d]);\n", func, prop->arraylength); */
}
else {
fprintf(f, "void %sget(PointerRNA *ptr, int values[]);\n", func);
- //fprintf(f, "void %sset(PointerRNA *ptr, const int values[]);\n", func);
+ /*fprintf(f, "void %sset(PointerRNA *ptr, const int values[]);\n", func); */
}
break;
}
case PROP_FLOAT: {
- if(!prop->arraydimension) {
+ if (!prop->arraydimension) {
fprintf(f, "float %sget(PointerRNA *ptr);\n", func);
- //fprintf(f, "void %sset(PointerRNA *ptr, float value);\n", func);
+ /*fprintf(f, "void %sset(PointerRNA *ptr, float value);\n", func); */
}
- else if(prop->arraydimension && prop->totarraylength) {
+ else if (prop->arraydimension && prop->totarraylength) {
fprintf(f, "void %sget(PointerRNA *ptr, float values[%u]);\n", func, prop->totarraylength);
- //fprintf(f, "void %sset(PointerRNA *ptr, const float values[%d]);\n", func, prop->arraylength);
+ /*fprintf(f, "void %sset(PointerRNA *ptr, const float values[%d]);\n", func, prop->arraylength); */
}
else {
fprintf(f, "void %sget(PointerRNA *ptr, float values[]);\n", func);
- //fprintf(f, "void %sset(PointerRNA *ptr, const float values[]);\n", func);
+ /*fprintf(f, "void %sset(PointerRNA *ptr, const float values[]);\n", func); */
}
break;
}
case PROP_ENUM: {
- EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
+ EnumPropertyRNA *eprop = (EnumPropertyRNA*)prop;
int i;
- if(eprop->item) {
+ if (eprop->item) {
fprintf(f, "enum {\n");
- for(i=0; i<eprop->totitem; i++)
- if(eprop->item[i].identifier[0])
+ for (i = 0; i<eprop->totitem; i++)
+ if (eprop->item[i].identifier[0])
fprintf(f, "\t%s_%s_%s = %d,\n", srna->identifier, prop->identifier, eprop->item[i].identifier, eprop->item[i].value);
fprintf(f, "};\n\n");
}
fprintf(f, "int %sget(PointerRNA *ptr);\n", func);
- //fprintf(f, "void %sset(PointerRNA *ptr, int value);\n", func);
+ /*fprintf(f, "void %sset(PointerRNA *ptr, int value);\n", func); */
break;
}
case PROP_STRING: {
- StringPropertyRNA *sprop= (StringPropertyRNA*)prop;
+ StringPropertyRNA *sprop = (StringPropertyRNA*)prop;
- if(sprop->maxlength) {
+ if (sprop->maxlength) {
fprintf(f, "#define %s_%s_MAX %d\n\n", srna->identifier, prop->identifier, sprop->maxlength);
}
fprintf(f, "void %sget(PointerRNA *ptr, char *value);\n", func);
fprintf(f, "int %slength(PointerRNA *ptr);\n", func);
- //fprintf(f, "void %sset(PointerRNA *ptr, const char *value);\n", func);
+ /*fprintf(f, "void %sset(PointerRNA *ptr, const char *value);\n", func); */
break;
}
case PROP_POINTER: {
fprintf(f, "PointerRNA %sget(PointerRNA *ptr);\n", func);
- //fprintf(f, "void %sset(PointerRNA *ptr, PointerRNA value);\n", func);
+ /*fprintf(f, "void %sset(PointerRNA *ptr, PointerRNA value);\n", func); */
break;
}
case PROP_COLLECTION: {
fprintf(f, "void %sbegin(CollectionPropertyIterator *iter, PointerRNA *ptr);\n", func);
fprintf(f, "void %snext(CollectionPropertyIterator *iter);\n", func);
fprintf(f, "void %send(CollectionPropertyIterator *iter);\n", func);
- //fprintf(f, "int %slength(PointerRNA *ptr);\n", func);
- //fprintf(f, "void %slookup_int(PointerRNA *ptr, int key, StructRNA **type);\n", func);
- //fprintf(f, "void %slookup_string(PointerRNA *ptr, const char *key, StructRNA **type);\n", func);
+ /*fprintf(f, "int %slength(PointerRNA *ptr);\n", func); */
+ /*fprintf(f, "void %slookup_int(PointerRNA *ptr, int key, StructRNA **type);\n", func); */
+ /*fprintf(f, "void %slookup_string(PointerRNA *ptr, const char *key, StructRNA **type);\n", func); */
break;
}
}
@@ -1433,49 +1433,49 @@ static void rna_def_property_funcs_header_cpp(FILE *f, StructRNA *srna, Property
{
PropertyRNA *prop;
- prop= dp->prop;
+ prop = dp->prop;
- if(prop->flag & (PROP_IDPROPERTY|PROP_BUILTIN))
+ if (prop->flag & (PROP_IDPROPERTY|PROP_BUILTIN))
return;
- if(prop->name && prop->description && prop->description[0] != '\0')
+ if (prop->name && prop->description && prop->description[0] != '\0')
fprintf(f, "\t/* %s: %s */\n", prop->name, prop->description);
- else if(prop->name)
+ else if (prop->name)
fprintf(f, "\t/* %s */\n", prop->name);
else
fprintf(f, "\t/* */\n");
- switch(prop->type) {
+ switch (prop->type) {
case PROP_BOOLEAN: {
- if(!prop->arraydimension)
+ if (!prop->arraydimension)
fprintf(f, "\tinline bool %s(void);", rna_safe_id(prop->identifier));
- else if(prop->totarraylength)
+ else if (prop->totarraylength)
fprintf(f, "\tinline Array<int, %u> %s(void);", prop->totarraylength, rna_safe_id(prop->identifier));
break;
}
case PROP_INT: {
- if(!prop->arraydimension)
+ if (!prop->arraydimension)
fprintf(f, "\tinline int %s(void);", rna_safe_id(prop->identifier));
- else if(prop->totarraylength)
+ else if (prop->totarraylength)
fprintf(f, "\tinline Array<int, %u> %s(void);", prop->totarraylength, rna_safe_id(prop->identifier));
break;
}
case PROP_FLOAT: {
- if(!prop->arraydimension)
+ if (!prop->arraydimension)
fprintf(f, "\tinline float %s(void);", rna_safe_id(prop->identifier));
- else if(prop->totarraylength)
+ else if (prop->totarraylength)
fprintf(f, "\tinline Array<float, %u> %s(void);", prop->totarraylength, rna_safe_id(prop->identifier));
break;
}
case PROP_ENUM: {
- EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
+ EnumPropertyRNA *eprop = (EnumPropertyRNA*)prop;
int i;
- if(eprop->item) {
+ if (eprop->item) {
fprintf(f, "\tenum %s_enum {\n", rna_safe_id(prop->identifier));
- for(i=0; i<eprop->totitem; i++)
- if(eprop->item[i].identifier[0])
+ for (i = 0; i<eprop->totitem; i++)
+ if (eprop->item[i].identifier[0])
fprintf(f, "\t\t%s_%s = %d,\n", rna_safe_id(prop->identifier), eprop->item[i].identifier, eprop->item[i].value);
fprintf(f, "\t};\n");
@@ -1489,18 +1489,18 @@ static void rna_def_property_funcs_header_cpp(FILE *f, StructRNA *srna, Property
break;
}
case PROP_POINTER: {
- PointerPropertyRNA *pprop= (PointerPropertyRNA*)dp->prop;
+ PointerPropertyRNA *pprop = (PointerPropertyRNA*)dp->prop;
- if(pprop->type)
+ if (pprop->type)
fprintf(f, "\tinline %s %s(void);", (const char*)pprop->type, rna_safe_id(prop->identifier));
else
fprintf(f, "\tinline %s %s(void);", "UnknownType", rna_safe_id(prop->identifier));
break;
}
case PROP_COLLECTION: {
- CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)dp->prop;
+ CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)dp->prop;
- if(cprop->item_type)
+ if (cprop->item_type)
fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", (const char*)cprop->item_type, srna->identifier, rna_safe_id(prop->identifier));
else
fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", "UnknownType", srna->identifier, rna_safe_id(prop->identifier));
@@ -1515,30 +1515,30 @@ static void rna_def_property_funcs_impl_cpp(FILE *f, StructRNA *srna, PropertyDe
{
PropertyRNA *prop;
- prop= dp->prop;
+ prop = dp->prop;
- if(prop->flag & (PROP_IDPROPERTY|PROP_BUILTIN))
+ if (prop->flag & (PROP_IDPROPERTY|PROP_BUILTIN))
return;
- switch(prop->type) {
+ switch (prop->type) {
case PROP_BOOLEAN: {
- if(!prop->arraydimension)
+ if (!prop->arraydimension)
fprintf(f, "\tBOOLEAN_PROPERTY(%s, %s)", srna->identifier, rna_safe_id(prop->identifier));
- else if(prop->totarraylength)
+ else if (prop->totarraylength)
fprintf(f, "\tBOOLEAN_ARRAY_PROPERTY(%s, %u, %s)", srna->identifier, prop->totarraylength, rna_safe_id(prop->identifier));
break;
}
case PROP_INT: {
- if(!prop->arraydimension)
+ if (!prop->arraydimension)
fprintf(f, "\tINT_PROPERTY(%s, %s)", srna->identifier, rna_safe_id(prop->identifier));
- else if(prop->totarraylength)
+ else if (prop->totarraylength)
fprintf(f, "\tINT_ARRAY_PROPERTY(%s, %u, %s)", srna->identifier, prop->totarraylength, rna_safe_id(prop->identifier));
break;
}
case PROP_FLOAT: {
- if(!prop->arraydimension)
+ if (!prop->arraydimension)
fprintf(f, "\tFLOAT_PROPERTY(%s, %s)", srna->identifier, rna_safe_id(prop->identifier));
- else if(prop->totarraylength)
+ else if (prop->totarraylength)
fprintf(f, "\tFLOAT_ARRAY_PROPERTY(%s, %u, %s)", srna->identifier, prop->totarraylength, rna_safe_id(prop->identifier));
break;
}
@@ -1552,9 +1552,9 @@ static void rna_def_property_funcs_impl_cpp(FILE *f, StructRNA *srna, PropertyDe
break;
}
case PROP_POINTER: {
- PointerPropertyRNA *pprop= (PointerPropertyRNA*)dp->prop;
+ PointerPropertyRNA *pprop = (PointerPropertyRNA*)dp->prop;
- if(pprop->type)
+ if (pprop->type)
fprintf(f, "\tPOINTER_PROPERTY(%s, %s, %s)", (const char*)pprop->type, srna->identifier, rna_safe_id(prop->identifier));
else
fprintf(f, "\tPOINTER_PROPERTY(%s, %s, %s)", "UnknownType", srna->identifier, rna_safe_id(prop->identifier));
@@ -1582,16 +1582,16 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
PropertyType type;
const char *funcname, *valstr;
const char *ptrstr;
- const short has_data= (dfunc->cont.properties.first != NULL);
+ const short has_data = (dfunc->cont.properties.first != NULL);
int flag, pout, cptr, first;
- srna= dsrna->srna;
- func= dfunc->func;
+ srna = dsrna->srna;
+ func = dfunc->func;
- if(!dfunc->call)
+ if (!dfunc->call)
return;
- funcname= rna_alloc_function_name(srna->identifier, func->identifier, "call");
+ funcname = rna_alloc_function_name(srna->identifier, func->identifier, "call");
/* function definition */
fprintf(f, "void %s(bContext *C, ReportList *reports, PointerRNA *_ptr, ParameterList *_parms)", funcname);
@@ -1599,35 +1599,35 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
/* variable definitions */
- if(func->flag & FUNC_USE_SELF_ID) {
+ if (func->flag & FUNC_USE_SELF_ID) {
fprintf(f, "\tstruct ID *_selfid;\n");
}
- if((func->flag & FUNC_NO_SELF)==0) {
- if(dsrna->dnaname) fprintf(f, "\tstruct %s *_self;\n", dsrna->dnaname);
+ if ((func->flag & FUNC_NO_SELF) == 0) {
+ if (dsrna->dnaname) fprintf(f, "\tstruct %s *_self;\n", dsrna->dnaname);
else fprintf(f, "\tstruct %s *_self;\n", srna->identifier);
}
- dparm= dfunc->cont.properties.first;
- for(; dparm; dparm= dparm->next) {
+ dparm = dfunc->cont.properties.first;
+ for (; dparm; dparm = dparm->next) {
type = dparm->prop->type;
flag = dparm->prop->flag;
pout = (flag & PROP_OUTPUT);
cptr = ((type == PROP_POINTER) && !(flag & PROP_RNAPTR));
- if(dparm->prop==func->c_ret)
- ptrstr= cptr || dparm->prop->arraydimension ? "*" : "";
+ if (dparm->prop == func->c_ret)
+ ptrstr = cptr || dparm->prop->arraydimension ? "*" : "";
/* XXX only arrays and strings are allowed to be dynamic, is this checked anywhere? */
else if (cptr || (flag & PROP_DYNAMIC))
- ptrstr= pout ? "**" : "*";
+ ptrstr = pout ? "**" : "*";
/* fixed size arrays and RNA pointers are pre-allocated on the ParameterList stack, pass a pointer to it */
else if (type == PROP_POINTER || dparm->prop->arraydimension)
- ptrstr= "*";
+ ptrstr = "*";
/* PROP_THICK_WRAP strings are pre-allocated on the ParameterList stack, but type name for string props is already char*, so leave empty */
else if (type == PROP_STRING && (flag & PROP_THICK_WRAP))
- ptrstr= "";
+ ptrstr = "";
else
- ptrstr= pout ? "*" : "";
+ ptrstr = pout ? "*" : "";
/* for dynamic parameters we pass an additional int for the length of the parameter */
if (flag & PROP_DYNAMIC)
@@ -1636,62 +1636,62 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
fprintf(f, "\t%s%s %s%s;\n", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop), ptrstr, dparm->prop->identifier);
}
- if(has_data) {
+ if (has_data) {
fprintf(f, "\tchar *_data");
- if(func->c_ret) fprintf(f, ", *_retdata");
+ if (func->c_ret) fprintf(f, ", *_retdata");
fprintf(f, ";\n");
fprintf(f, "\t\n");
}
/* assign self */
- if(func->flag & FUNC_USE_SELF_ID) {
+ if (func->flag & FUNC_USE_SELF_ID) {
fprintf(f, "\t_selfid= (struct ID*)_ptr->id.data;\n");
}
- if((func->flag & FUNC_NO_SELF)==0) {
- if(dsrna->dnaname) fprintf(f, "\t_self= (struct %s *)_ptr->data;\n", dsrna->dnaname);
+ if ((func->flag & FUNC_NO_SELF) == 0) {
+ if (dsrna->dnaname) fprintf(f, "\t_self= (struct %s *)_ptr->data;\n", dsrna->dnaname);
else fprintf(f, "\t_self= (struct %s *)_ptr->data;\n", srna->identifier);
}
- if(has_data) {
+ if (has_data) {
fprintf(f, "\t_data= (char *)_parms->data;\n");
}
- dparm= dfunc->cont.properties.first;
- for(; dparm; dparm= dparm->next) {
+ dparm = dfunc->cont.properties.first;
+ for (; dparm; dparm = dparm->next) {
type = dparm->prop->type;
flag = dparm->prop->flag;
pout = (flag & PROP_OUTPUT);
cptr = ((type == PROP_POINTER) && !(flag & PROP_RNAPTR));
- if(dparm->prop==func->c_ret)
+ if (dparm->prop == func->c_ret)
fprintf(f, "\t_retdata= _data;\n");
else {
const char *data_str;
if (cptr || (flag & PROP_DYNAMIC)) {
- ptrstr= "**";
- valstr= "*";
+ ptrstr = "**";
+ valstr = "*";
}
else if (type == PROP_POINTER || dparm->prop->arraydimension) {
- ptrstr= "*";
- valstr= "";
+ ptrstr = "*";
+ valstr = "";
}
else if (type == PROP_STRING && (flag & PROP_THICK_WRAP)) {
- ptrstr= "";
- valstr= "";
+ ptrstr = "";
+ valstr = "";
}
else {
- ptrstr= "*";
- valstr= "*";
+ ptrstr = "*";
+ valstr = "*";
}
/* this must be kept in sync with RNA_parameter_length_get_data, we could just call the function directly, but this is faster */
if (flag & PROP_DYNAMIC) {
fprintf(f, "\t%s_len= %s((int *)_data);\n", dparm->prop->identifier, pout ? "" : "*");
- data_str= "(&(((char *)_data)[sizeof(void *)]))";
+ data_str = "(&(((char *)_data)[sizeof(void *)]))";
}
else {
- data_str= "_data";
+ data_str = "_data";
}
fprintf(f, "\t%s= ", dparm->prop->identifier);
@@ -1701,54 +1701,54 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
fprintf(f, "((%s%s%s)%s);\n", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop), ptrstr, data_str);
}
- if(dparm->next)
+ if (dparm->next)
fprintf(f, "\t_data+= %d;\n", rna_parameter_size_alloc(dparm->prop));
}
- if(dfunc->call) {
+ if (dfunc->call) {
fprintf(f, "\t\n");
fprintf(f, "\t");
- if(func->c_ret) fprintf(f, "%s= ", func->c_ret->identifier);
+ if (func->c_ret) fprintf(f, "%s= ", func->c_ret->identifier);
fprintf(f, "%s(", dfunc->call);
- first= 1;
+ first = 1;
- if(func->flag & FUNC_USE_SELF_ID) {
+ if (func->flag & FUNC_USE_SELF_ID) {
fprintf(f, "_selfid");
- first= 0;
+ first = 0;
}
- if((func->flag & FUNC_NO_SELF)==0) {
- if(!first) fprintf(f, ", ");
+ if ((func->flag & FUNC_NO_SELF) == 0) {
+ if (!first) fprintf(f, ", ");
fprintf(f, "_self");
- first= 0;
+ first = 0;
}
- if(func->flag & FUNC_USE_MAIN) {
- if(!first) fprintf(f, ", ");
- first= 0;
+ if (func->flag & FUNC_USE_MAIN) {
+ if (!first) fprintf(f, ", ");
+ first = 0;
fprintf(f, "CTX_data_main(C)"); /* may have direct access later */
}
- if(func->flag & FUNC_USE_CONTEXT) {
- if(!first) fprintf(f, ", ");
- first= 0;
+ if (func->flag & FUNC_USE_CONTEXT) {
+ if (!first) fprintf(f, ", ");
+ first = 0;
fprintf(f, "C");
}
- if(func->flag & FUNC_USE_REPORTS) {
- if(!first) fprintf(f, ", ");
- first= 0;
+ if (func->flag & FUNC_USE_REPORTS) {
+ if (!first) fprintf(f, ", ");
+ first = 0;
fprintf(f, "reports");
}
- dparm= dfunc->cont.properties.first;
- for(; dparm; dparm= dparm->next) {
- if(dparm->prop==func->c_ret)
+ dparm = dfunc->cont.properties.first;
+ for (; dparm; dparm = dparm->next) {
+ if (dparm->prop == func->c_ret)
continue;
- if(!first) fprintf(f, ", ");
- first= 0;
+ if (!first) fprintf(f, ", ");
+ first = 0;
if (dparm->prop->flag & PROP_DYNAMIC)
fprintf(f, "%s_len, %s", dparm->prop->identifier, dparm->prop->identifier);
@@ -1758,16 +1758,16 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
fprintf(f, ");\n");
- if(func->c_ret) {
- dparm= rna_find_parameter_def(func->c_ret);
- ptrstr= (((dparm->prop->type == PROP_POINTER) && !(dparm->prop->flag & PROP_RNAPTR)) || (dparm->prop->arraydimension))? "*": "";
+ if (func->c_ret) {
+ dparm = rna_find_parameter_def(func->c_ret);
+ ptrstr = (((dparm->prop->type == PROP_POINTER) && !(dparm->prop->flag & PROP_RNAPTR)) || (dparm->prop->arraydimension))? "*": "";
fprintf(f, "\t*((%s%s%s*)_retdata)= %s;\n", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop), ptrstr, func->c_ret->identifier);
}
}
fprintf(f, "}\n\n");
- dfunc->gencall= funcname;
+ dfunc->gencall = funcname;
}
static void rna_auto_types(void)
@@ -1775,34 +1775,34 @@ static void rna_auto_types(void)
StructDefRNA *ds;
PropertyDefRNA *dp;
- for(ds=DefRNA.structs.first; ds; ds=ds->cont.next) {
+ for (ds = DefRNA.structs.first; ds; ds = ds->cont.next) {
/* DNA name for Screen is patched in 2.5, we do the reverse here .. */
- if(ds->dnaname && strcmp(ds->dnaname, "Screen") == 0)
- ds->dnaname= "bScreen";
+ if (ds->dnaname && strcmp(ds->dnaname, "Screen") == 0)
+ ds->dnaname = "bScreen";
- for(dp=ds->cont.properties.first; dp; dp=dp->next) {
- if(dp->dnastructname && strcmp(dp->dnastructname, "Screen") == 0)
- dp->dnastructname= "bScreen";
+ for (dp = ds->cont.properties.first; dp; dp = dp->next) {
+ if (dp->dnastructname && strcmp(dp->dnastructname, "Screen") == 0)
+ dp->dnastructname = "bScreen";
- if(dp->dnatype) {
- if(dp->prop->type == PROP_POINTER) {
- PointerPropertyRNA *pprop= (PointerPropertyRNA*)dp->prop;
+ if (dp->dnatype) {
+ if (dp->prop->type == PROP_POINTER) {
+ PointerPropertyRNA *pprop = (PointerPropertyRNA*)dp->prop;
StructRNA *type;
- if(!pprop->type && !pprop->get)
- pprop->type= (StructRNA*)rna_find_type(dp->dnatype);
+ if (!pprop->type && !pprop->get)
+ pprop->type = (StructRNA*)rna_find_type(dp->dnatype);
- if(pprop->type) {
- type= rna_find_struct((const char*)pprop->type);
- if(type && (type->flag & STRUCT_ID_REFCOUNT))
+ if (pprop->type) {
+ type = rna_find_struct((const char*)pprop->type);
+ if (type && (type->flag & STRUCT_ID_REFCOUNT))
pprop->property.flag |= PROP_ID_REFCOUNT;
}
}
- else if(dp->prop->type== PROP_COLLECTION) {
- CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)dp->prop;
+ else if (dp->prop->type == PROP_COLLECTION) {
+ CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)dp->prop;
- if(!cprop->item_type && !cprop->get && strcmp(dp->dnatype, "ListBase")==0)
- cprop->item_type= (StructRNA*)rna_find_type(dp->dnatype);
+ if (!cprop->item_type && !cprop->get && strcmp(dp->dnatype, "ListBase") == 0)
+ cprop->item_type = (StructRNA*)rna_find_type(dp->dnatype);
}
}
}
@@ -1817,16 +1817,16 @@ static void rna_sort(BlenderRNA *brna)
rna_sortlist(&brna->structs, cmp_struct);
rna_sortlist(&DefRNA.structs, cmp_def_struct);
- for(srna=brna->structs.first; srna; srna=srna->cont.next)
+ for (srna = brna->structs.first; srna; srna = srna->cont.next)
rna_sortlist(&srna->cont.properties, cmp_property);
- for(ds=DefRNA.structs.first; ds; ds=ds->cont.next)
+ for (ds = DefRNA.structs.first; ds; ds = ds->cont.next)
rna_sortlist(&ds->cont.properties, cmp_def_property);
}
static const char *rna_property_structname(PropertyType type)
{
- switch(type) {
+ switch (type) {
case PROP_BOOLEAN: return "BoolPropertyRNA";
case PROP_INT: return "IntPropertyRNA";
case PROP_FLOAT: return "FloatPropertyRNA";
@@ -1840,7 +1840,7 @@ static const char *rna_property_structname(PropertyType type)
static const char *rna_property_subtypename(PropertySubType type)
{
- switch(type) {
+ switch (type) {
case PROP_NONE: return "PROP_NONE";
case PROP_FILEPATH: return "PROP_FILEPATH";
case PROP_FILENAME: return "PROP_FILENAME";
@@ -1869,7 +1869,7 @@ static const char *rna_property_subtypename(PropertySubType type)
case PROP_LAYER_MEMBER: return "PROP_LAYER_MEMBER";
default: {
/* incase we dont have a type preset that includes the subtype */
- if(RNA_SUBTYPE_UNIT(type)) {
+ if (RNA_SUBTYPE_UNIT(type)) {
return rna_property_subtypename(type & ~RNA_SUBTYPE_UNIT(type));
}
else {
@@ -1881,7 +1881,7 @@ static const char *rna_property_subtypename(PropertySubType type)
static const char *rna_property_subtype_unit(PropertySubType type)
{
- switch(RNA_SUBTYPE_UNIT(type)) {
+ switch (RNA_SUBTYPE_UNIT(type)) {
case PROP_UNIT_NONE: return "PROP_UNIT_NONE";
case PROP_UNIT_LENGTH: return "PROP_UNIT_LENGTH";
case PROP_UNIT_AREA: return "PROP_UNIT_AREA";
@@ -1899,7 +1899,7 @@ static void rna_generate_prototypes(BlenderRNA *brna, FILE *f)
{
StructRNA *srna;
- for(srna=brna->structs.first; srna; srna=srna->cont.next)
+ for (srna = brna->structs.first; srna; srna = srna->cont.next)
fprintf(f, "extern StructRNA RNA_%s;\n", srna->identifier);
fprintf(f, "\n");
}
@@ -1910,12 +1910,12 @@ static void rna_generate_blender(BlenderRNA *brna, FILE *f)
fprintf(f, "BlenderRNA BLENDER_RNA = {");
- srna= brna->structs.first;
- if(srna) fprintf(f, "{&RNA_%s, ", srna->identifier);
+ srna = brna->structs.first;
+ if (srna) fprintf(f, "{&RNA_%s, ", srna->identifier);
else fprintf(f, "{NULL, ");
- srna= brna->structs.last;
- if(srna) fprintf(f, "&RNA_%s}", srna->identifier);
+ srna = brna->structs.last;
+ if (srna) fprintf(f, "&RNA_%s}", srna->identifier);
else fprintf(f, "NULL}");
fprintf(f, "};\n\n");
@@ -1926,18 +1926,18 @@ static void rna_generate_property_prototypes(BlenderRNA *brna, StructRNA *srna,
PropertyRNA *prop;
StructRNA *base;
- base= srna->base;
+ base = srna->base;
while (base) {
fprintf(f, "\n");
- for(prop=base->cont.properties.first; prop; prop=prop->next)
+ for (prop = base->cont.properties.first; prop; prop = prop->next)
fprintf(f, "%s%s rna_%s_%s;\n", "extern ", rna_property_structname(prop->type), base->identifier, prop->identifier);
- base= base->base;
+ base = base->base;
}
- if(srna->cont.properties.first)
+ if (srna->cont.properties.first)
fprintf(f, "\n");
- for(prop=srna->cont.properties.first; prop; prop=prop->next)
+ for (prop = srna->cont.properties.first; prop; prop = prop->next)
fprintf(f, "%s%s rna_%s_%s;\n", (prop->flag & PROP_EXPORT)? "": "", rna_property_structname(prop->type), srna->identifier, prop->identifier);
fprintf(f, "\n");
}
@@ -1946,10 +1946,10 @@ static void rna_generate_parameter_prototypes(BlenderRNA *brna, StructRNA *srna,
{
PropertyRNA *parm;
- for(parm= func->cont.properties.first; parm; parm= parm->next)
+ for (parm = func->cont.properties.first; parm; parm = parm->next)
fprintf(f, "%s%s rna_%s_%s_%s;\n", "extern ", rna_property_structname(parm->type), srna->identifier, func->identifier, parm->identifier);
- if(func->cont.properties.first)
+ if (func->cont.properties.first)
fprintf(f, "\n");
}
@@ -1958,25 +1958,25 @@ static void rna_generate_function_prototypes(BlenderRNA *brna, StructRNA *srna,
FunctionRNA *func;
StructRNA *base;
- base= srna->base;
+ base = srna->base;
while (base) {
- for(func= base->functions.first; func; func= func->cont.next) {
+ for (func = base->functions.first; func; func = func->cont.next) {
fprintf(f, "%s%s rna_%s_%s_func;\n", "extern ", "FunctionRNA", base->identifier, func->identifier);
rna_generate_parameter_prototypes(brna, base, func, f);
}
- if(base->functions.first)
+ if (base->functions.first)
fprintf(f, "\n");
- base= base->base;
+ base = base->base;
}
- for(func= srna->functions.first; func; func= func->cont.next) {
+ for (func = srna->functions.first; func; func = func->cont.next) {
fprintf(f, "%s%s rna_%s_%s_func;\n", "extern ", "FunctionRNA", srna->identifier, func->identifier);
rna_generate_parameter_prototypes(brna, srna, func, f);
}
- if(srna->functions.first)
+ if (srna->functions.first)
fprintf(f, "\n");
}
@@ -1989,15 +1989,15 @@ static void rna_generate_static_parameter_prototypes(BlenderRNA *brna, StructRNA
int flag, pout, cptr, first;
const char *ptrstr;
- dsrna= rna_find_struct_def(srna);
- func= dfunc->func;
+ dsrna = rna_find_struct_def(srna);
+ func = dfunc->func;
/* return type */
- for(dparm= dfunc->cont.properties.first; dparm; dparm= dparm->next) {
- if(dparm->prop==func->c_ret) {
- if(dparm->prop->arraydimension)
+ for (dparm = dfunc->cont.properties.first; dparm; dparm = dparm->next) {
+ if (dparm->prop == func->c_ret) {
+ if (dparm->prop->arraydimension)
fprintf(f, "XXX no array return types yet"); /* XXX not supported */
- else if(dparm->prop->type == PROP_POINTER && !(dparm->prop->flag & PROP_RNAPTR))
+ else if (dparm->prop->type == PROP_POINTER && !(dparm->prop->flag & PROP_RNAPTR))
fprintf(f, "%s%s *", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop));
else
fprintf(f, "%s%s ", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop));
@@ -2007,71 +2007,71 @@ static void rna_generate_static_parameter_prototypes(BlenderRNA *brna, StructRNA
}
/* void if nothing to return */
- if(!dparm)
+ if (!dparm)
fprintf(f, "void ");
/* function name */
fprintf(f, "%s(", dfunc->call);
- first= 1;
+ first = 1;
/* self, context and reports parameters */
- if(func->flag & FUNC_USE_SELF_ID) {
+ if (func->flag & FUNC_USE_SELF_ID) {
fprintf(f, "struct ID *_selfid");
- first= 0;
+ first = 0;
}
- if((func->flag & FUNC_NO_SELF)==0) {
- if(!first) fprintf(f, ", ");
- if(dsrna->dnaname) fprintf(f, "struct %s *_self", dsrna->dnaname);
+ if ((func->flag & FUNC_NO_SELF) == 0) {
+ if (!first) fprintf(f, ", ");
+ if (dsrna->dnaname) fprintf(f, "struct %s *_self", dsrna->dnaname);
else fprintf(f, "struct %s *_self", srna->identifier);
- first= 0;
+ first = 0;
}
- if(func->flag & FUNC_USE_MAIN) {
- if(!first) fprintf(f, ", ");
- first= 0;
+ if (func->flag & FUNC_USE_MAIN) {
+ if (!first) fprintf(f, ", ");
+ first = 0;
fprintf(f, "Main *bmain");
}
- if(func->flag & FUNC_USE_CONTEXT) {
- if(!first) fprintf(f, ", ");
- first= 0;
+ if (func->flag & FUNC_USE_CONTEXT) {
+ if (!first) fprintf(f, ", ");
+ first = 0;
fprintf(f, "bContext *C");
}
- if(func->flag & FUNC_USE_REPORTS) {
- if(!first) fprintf(f, ", ");
- first= 0;
+ if (func->flag & FUNC_USE_REPORTS) {
+ if (!first) fprintf(f, ", ");
+ first = 0;
fprintf(f, "ReportList *reports");
}
/* defined parameters */
- for(dparm= dfunc->cont.properties.first; dparm; dparm= dparm->next) {
+ for (dparm = dfunc->cont.properties.first; dparm; dparm = dparm->next) {
type = dparm->prop->type;
flag = dparm->prop->flag;
pout = (flag & PROP_OUTPUT);
cptr = ((type == PROP_POINTER) && !(flag & PROP_RNAPTR));
- if(dparm->prop==func->c_ret)
+ if (dparm->prop == func->c_ret)
continue;
if (cptr || (flag & PROP_DYNAMIC))
- ptrstr= pout ? "**" : "*";
+ ptrstr = pout ? "**" : "*";
else if (type == PROP_POINTER || dparm->prop->arraydimension)
- ptrstr= "*";
+ ptrstr = "*";
else if (type == PROP_STRING && (flag & PROP_THICK_WRAP))
- ptrstr= "";
+ ptrstr = "";
else
- ptrstr= pout ? "*" : "";
+ ptrstr = pout ? "*" : "";
- if(!first) fprintf(f, ", ");
- first= 0;
+ if (!first) fprintf(f, ", ");
+ first = 0;
if (flag & PROP_DYNAMIC)
fprintf(f, "int %s%s_len, ", pout ? "*" : "", dparm->prop->identifier);
- if(!(flag & PROP_DYNAMIC) && dparm->prop->arraydimension)
+ if (!(flag & PROP_DYNAMIC) && dparm->prop->arraydimension)
fprintf(f, "%s%s %s[%u]", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop), dparm->prop->identifier, dparm->prop->totarraylength);
else
fprintf(f, "%s%s %s%s", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop), ptrstr, dparm->prop->identifier);
@@ -2085,15 +2085,15 @@ static void rna_generate_static_function_prototypes(BlenderRNA *brna, StructRNA
{
FunctionRNA *func;
FunctionDefRNA *dfunc;
- int first= 1;
+ int first = 1;
- for(func= srna->functions.first; func; func= func->cont.next) {
- dfunc= rna_find_function_def(func);
+ for (func = srna->functions.first; func; func = func->cont.next) {
+ dfunc = rna_find_function_def(func);
- if(dfunc->call) {
- if(first) {
+ if (dfunc->call) {
+ if (first) {
fprintf(f, "/* Repeated prototypes to detect errors */\n\n");
- first= 0;
+ first = 0;
}
rna_generate_static_parameter_prototypes(brna, srna, dfunc, f);
@@ -2105,43 +2105,43 @@ static void rna_generate_static_function_prototypes(BlenderRNA *brna, StructRNA
static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, PropertyRNA *prop)
{
- char *strnest= "", *errnest= "";
- int len, freenest= 0;
+ char *strnest = "", *errnest = "";
+ int len, freenest = 0;
- if(nest != NULL) {
- len= strlen(nest);
+ if (nest != NULL) {
+ len = strlen(nest);
- strnest= MEM_mallocN(sizeof(char)*(len+2), "rna_generate_property -> strnest");
- errnest= MEM_mallocN(sizeof(char)*(len+2), "rna_generate_property -> errnest");
+ strnest = MEM_mallocN(sizeof(char)*(len+2), "rna_generate_property -> strnest");
+ errnest = MEM_mallocN(sizeof(char)*(len+2), "rna_generate_property -> errnest");
strcpy(strnest, "_"); strcat(strnest, nest);
strcpy(errnest, "."); strcat(errnest, nest);
- freenest= 1;
+ freenest = 1;
}
- switch(prop->type) {
+ switch (prop->type) {
case PROP_ENUM: {
- EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
- int i, defaultfound= 0, totflag= 0;
+ EnumPropertyRNA *eprop = (EnumPropertyRNA*)prop;
+ int i, defaultfound = 0, totflag = 0;
- if(eprop->item) {
+ if (eprop->item) {
fprintf(f, "static EnumPropertyItem rna_%s%s_%s_items[%d] = {\n\t", srna->identifier, strnest, prop->identifier, eprop->totitem+1);
- for(i=0; i<eprop->totitem; i++) {
+ for (i = 0; i<eprop->totitem; i++) {
fprintf(f, "{%d, ", eprop->item[i].value);
rna_print_c_string(f, eprop->item[i].identifier); fprintf(f, ", ");
fprintf(f, "%d, ", eprop->item[i].icon);
rna_print_c_string(f, eprop->item[i].name); fprintf(f, ", ");
rna_print_c_string(f, eprop->item[i].description); fprintf(f, "},\n\t");
- if(eprop->item[i].identifier[0]) {
- if(prop->flag & PROP_ENUM_FLAG) {
+ if (eprop->item[i].identifier[0]) {
+ if (prop->flag & PROP_ENUM_FLAG) {
totflag |= eprop->item[i].value;
}
else {
- if(eprop->defaultvalue == eprop->item[i].value) {
- defaultfound= 1;
+ if (eprop->defaultvalue == eprop->item[i].value) {
+ defaultfound = 1;
}
}
}
@@ -2149,41 +2149,41 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
fprintf(f, "{0, NULL, 0, NULL, NULL}\n};\n\n");
- if(prop->flag & PROP_ENUM_FLAG) {
- if(eprop->defaultvalue & ~totflag) {
+ if (prop->flag & PROP_ENUM_FLAG) {
+ if (eprop->defaultvalue & ~totflag) {
fprintf(stderr, "%s: %s%s.%s, enum default includes unused bits (%d).\n",
__func__, srna->identifier, errnest, prop->identifier, eprop->defaultvalue & ~totflag);
- DefRNA.error= 1;
+ DefRNA.error = 1;
}
}
else {
- if(!defaultfound) {
+ if (!defaultfound) {
fprintf(stderr, "%s: %s%s.%s, enum default is not in items.\n",
__func__, srna->identifier, errnest, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
}
}
}
else {
fprintf(stderr, "%s: %s%s.%s, enum must have items defined.\n",
__func__, srna->identifier, errnest, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
}
break;
}
case PROP_BOOLEAN: {
- BoolPropertyRNA *bprop= (BoolPropertyRNA*)prop;
+ BoolPropertyRNA *bprop = (BoolPropertyRNA*)prop;
unsigned int i;
- if(prop->arraydimension && prop->totarraylength) {
+ if (prop->arraydimension && prop->totarraylength) {
fprintf(f, "static int rna_%s%s_%s_default[%u] = {\n\t", srna->identifier, strnest, prop->identifier, prop->totarraylength);
- for(i=0; i<prop->totarraylength; i++) {
- if(bprop->defaultarray)
+ for (i = 0; i<prop->totarraylength; i++) {
+ if (bprop->defaultarray)
fprintf(f, "%d", bprop->defaultarray[i]);
else
fprintf(f, "%d", bprop->defaultvalue);
- if(i != prop->totarraylength-1)
+ if (i != prop->totarraylength-1)
fprintf(f, ",\n\t");
}
@@ -2192,18 +2192,18 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
break;
}
case PROP_INT: {
- IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
+ IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
unsigned int i;
- if(prop->arraydimension && prop->totarraylength) {
+ if (prop->arraydimension && prop->totarraylength) {
fprintf(f, "static int rna_%s%s_%s_default[%u] = {\n\t", srna->identifier, strnest, prop->identifier, prop->totarraylength);
- for(i=0; i<prop->totarraylength; i++) {
- if(iprop->defaultarray)
+ for (i = 0; i<prop->totarraylength; i++) {
+ if (iprop->defaultarray)
fprintf(f, "%d", iprop->defaultarray[i]);
else
fprintf(f, "%d", iprop->defaultvalue);
- if(i != prop->totarraylength-1)
+ if (i != prop->totarraylength-1)
fprintf(f, ",\n\t");
}
@@ -2212,18 +2212,18 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
break;
}
case PROP_FLOAT: {
- FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
+ FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
unsigned int i;
- if(prop->arraydimension && prop->totarraylength) {
+ if (prop->arraydimension && prop->totarraylength) {
fprintf(f, "static float rna_%s%s_%s_default[%u] = {\n\t", srna->identifier, strnest, prop->identifier, prop->totarraylength);
- for(i=0; i<prop->totarraylength; i++) {
- if(fprop->defaultarray)
+ for (i = 0; i<prop->totarraylength; i++) {
+ if (fprop->defaultarray)
rna_float_print(f, fprop->defaultarray[i]);
else
rna_float_print(f, fprop->defaultvalue);
- if(i != prop->totarraylength-1)
+ if (i != prop->totarraylength-1)
fprintf(f, ",\n\t");
}
@@ -2237,9 +2237,9 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
fprintf(f, "%s%s rna_%s%s_%s = {\n", (prop->flag & PROP_EXPORT)? "": "", rna_property_structname(prop->type), srna->identifier, strnest, prop->identifier);
- if(prop->next) fprintf(f, "\t{(PropertyRNA*)&rna_%s%s_%s, ", srna->identifier, strnest, prop->next->identifier);
+ if (prop->next) fprintf(f, "\t{(PropertyRNA*)&rna_%s%s_%s, ", srna->identifier, strnest, prop->next->identifier);
else fprintf(f, "\t{NULL, ");
- if(prop->prev) fprintf(f, "(PropertyRNA*)&rna_%s%s_%s,\n", srna->identifier, strnest, prop->prev->identifier);
+ if (prop->prev) fprintf(f, "(PropertyRNA*)&rna_%s%s_%s,\n", srna->identifier, strnest, prop->prev->identifier);
else fprintf(f, "NULL,\n");
fprintf(f, "\t%d, ", prop->magic);
rna_print_c_string(f, prop->identifier);
@@ -2251,25 +2251,25 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
fprintf(f, "\t%s, %s|%s, %s, %u, {%u, %u, %u}, %u,\n", RNA_property_typename(prop->type), rna_property_subtypename(prop->subtype), rna_property_subtype_unit(prop->subtype), rna_function_string(prop->getlength), prop->arraydimension, prop->arraylength[0], prop->arraylength[1], prop->arraylength[2], prop->totarraylength);
fprintf(f, "\t%s%s, %d, %s, %s,\n", (prop->flag & PROP_CONTEXT_UPDATE)? "(UpdateFunc)": "", rna_function_string(prop->update), prop->noteflag, rna_function_string(prop->editable), rna_function_string(prop->itemeditable));
- if(prop->flag & PROP_RAW_ACCESS) rna_set_raw_offset(f, srna, prop);
+ if (prop->flag & PROP_RAW_ACCESS) rna_set_raw_offset(f, srna, prop);
else fprintf(f, "\t0, -1");
/* our own type - collections/arrays only */
- if(prop->srna) fprintf(f, ", &RNA_%s", (const char*)prop->srna);
+ if (prop->srna) fprintf(f, ", &RNA_%s", (const char*)prop->srna);
else fprintf(f, ", NULL");
fprintf(f, "},\n");
- switch(prop->type) {
+ switch (prop->type) {
case PROP_BOOLEAN: {
- BoolPropertyRNA *bprop= (BoolPropertyRNA*)prop;
+ BoolPropertyRNA *bprop = (BoolPropertyRNA*)prop;
fprintf(f, "\t%s, %s, %s, %s, %d, ", rna_function_string(bprop->get), rna_function_string(bprop->set), rna_function_string(bprop->getarray), rna_function_string(bprop->setarray), bprop->defaultvalue);
- if(prop->arraydimension && prop->totarraylength) fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
+ if (prop->arraydimension && prop->totarraylength) fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
else fprintf(f, "NULL\n");
break;
}
case PROP_INT: {
- IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
+ IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
fprintf(f, "\t%s, %s, %s, %s, %s,\n\t", rna_function_string(iprop->get), rna_function_string(iprop->set), rna_function_string(iprop->getarray), rna_function_string(iprop->setarray), rna_function_string(iprop->range));
rna_int_print(f, iprop->softmin); fprintf(f, ", ");
rna_int_print(f, iprop->softmax); fprintf(f, ", ");
@@ -2277,12 +2277,12 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
rna_int_print(f, iprop->hardmax); fprintf(f, ", ");
rna_int_print(f, iprop->step); fprintf(f, ", ");
rna_int_print(f, iprop->defaultvalue); fprintf(f, ", ");
- if(prop->arraydimension && prop->totarraylength) fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
+ if (prop->arraydimension && prop->totarraylength) fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
else fprintf(f, "NULL\n");
break;
}
case PROP_FLOAT: {
- FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
+ FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
fprintf(f, "\t%s, %s, %s, %s, %s, ", rna_function_string(fprop->get), rna_function_string(fprop->set), rna_function_string(fprop->getarray), rna_function_string(fprop->setarray), rna_function_string(fprop->range));
rna_float_print(f, fprop->softmin); fprintf(f, ", ");
rna_float_print(f, fprop->softmax); fprintf(f, ", ");
@@ -2291,20 +2291,20 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
rna_float_print(f, fprop->step); fprintf(f, ", ");
rna_int_print(f, (int)fprop->precision); fprintf(f, ", ");
rna_float_print(f, fprop->defaultvalue); fprintf(f, ", ");
- if(prop->arraydimension && prop->totarraylength) fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
+ if (prop->arraydimension && prop->totarraylength) fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
else fprintf(f, "NULL\n");
break;
}
case PROP_STRING: {
- StringPropertyRNA *sprop= (StringPropertyRNA*)prop;
+ StringPropertyRNA *sprop = (StringPropertyRNA*)prop;
fprintf(f, "\t%s, %s, %s, %d, ", rna_function_string(sprop->get), rna_function_string(sprop->length), rna_function_string(sprop->set), sprop->maxlength);
rna_print_c_string(f, sprop->defaultvalue); fprintf(f, "\n");
break;
}
case PROP_ENUM: {
- EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
+ EnumPropertyRNA *eprop = (EnumPropertyRNA*)prop;
fprintf(f, "\t%s, %s, %s, NULL, ", rna_function_string(eprop->get), rna_function_string(eprop->set), rna_function_string(eprop->itemf));
- if(eprop->item)
+ if (eprop->item)
fprintf(f, "rna_%s%s_%s_items, ", srna->identifier, strnest, prop->identifier);
else
fprintf(f, "NULL, ");
@@ -2312,16 +2312,16 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
break;
}
case PROP_POINTER: {
- PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop;
+ PointerPropertyRNA *pprop = (PointerPropertyRNA*)prop;
fprintf(f, "\t%s, %s, %s, %s,", rna_function_string(pprop->get), rna_function_string(pprop->set), rna_function_string(pprop->typef), rna_function_string(pprop->poll));
- if(pprop->type) fprintf(f, "&RNA_%s\n", (const char*)pprop->type);
+ if (pprop->type) fprintf(f, "&RNA_%s\n", (const char*)pprop->type);
else fprintf(f, "NULL\n");
break;
}
case PROP_COLLECTION: {
- CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop;
+ CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)prop;
fprintf(f, "\t%s, %s, %s, %s, %s, %s, %s, %s, ", rna_function_string(cprop->begin), rna_function_string(cprop->next), rna_function_string(cprop->end), rna_function_string(cprop->get), rna_function_string(cprop->length), rna_function_string(cprop->lookupint), rna_function_string(cprop->lookupstring), rna_function_string(cprop->assignint));
- if(cprop->item_type) fprintf(f, "&RNA_%s\n", (const char*)cprop->item_type);
+ if (cprop->item_type) fprintf(f, "&RNA_%s\n", (const char*)cprop->item_type);
else fprintf(f, "NULL\n");
break;
}
@@ -2329,7 +2329,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
fprintf(f, "};\n\n");
- if(freenest) {
+ if (freenest) {
MEM_freeN(strnest);
MEM_freeN(errnest);
}
@@ -2344,28 +2344,28 @@ static void rna_generate_struct(BlenderRNA *brna, StructRNA *srna, FILE *f)
fprintf(f, "/* %s */\n", srna->name);
- for(prop= srna->cont.properties.first; prop; prop= prop->next)
+ for (prop = srna->cont.properties.first; prop; prop = prop->next)
rna_generate_property(f, srna, NULL, prop);
- for(func= srna->functions.first; func; func= func->cont.next) {
- for(parm= func->cont.properties.first; parm; parm= parm->next)
+ for (func = srna->functions.first; func; func = func->cont.next) {
+ for (parm = func->cont.properties.first; parm; parm = parm->next)
rna_generate_property(f, srna, func->identifier, parm);
fprintf(f, "%s%s rna_%s_%s_func = {\n", "", "FunctionRNA", srna->identifier, func->identifier);
- if(func->cont.next) fprintf(f, "\t{(FunctionRNA*)&rna_%s_%s_func, ", srna->identifier, ((FunctionRNA*)func->cont.next)->identifier);
+ if (func->cont.next) fprintf(f, "\t{(FunctionRNA*)&rna_%s_%s_func, ", srna->identifier, ((FunctionRNA*)func->cont.next)->identifier);
else fprintf(f, "\t{NULL, ");
- if(func->cont.prev) fprintf(f, "(FunctionRNA*)&rna_%s_%s_func,\n", srna->identifier, ((FunctionRNA*)func->cont.prev)->identifier);
+ if (func->cont.prev) fprintf(f, "(FunctionRNA*)&rna_%s_%s_func,\n", srna->identifier, ((FunctionRNA*)func->cont.prev)->identifier);
else fprintf(f, "NULL,\n");
fprintf(f, "\tNULL,\n");
- parm= func->cont.properties.first;
- if(parm) fprintf(f, "\t{(PropertyRNA*)&rna_%s_%s_%s, ", srna->identifier, func->identifier, parm->identifier);
+ parm = func->cont.properties.first;
+ if (parm) fprintf(f, "\t{(PropertyRNA*)&rna_%s_%s_%s, ", srna->identifier, func->identifier, parm->identifier);
else fprintf(f, "\t{NULL, ");
- parm= func->cont.properties.last;
- if(parm) fprintf(f, "(PropertyRNA*)&rna_%s_%s_%s}},\n", srna->identifier, func->identifier, parm->identifier);
+ parm = func->cont.properties.last;
+ if (parm) fprintf(f, "(PropertyRNA*)&rna_%s_%s_%s}},\n", srna->identifier, func->identifier, parm->identifier);
else fprintf(f, "NULL}},\n");
fprintf(f, "\t");
@@ -2373,11 +2373,11 @@ static void rna_generate_struct(BlenderRNA *brna, StructRNA *srna, FILE *f)
fprintf(f, ", %d, ", func->flag);
rna_print_c_string(f, func->description); fprintf(f, ",\n");
- dfunc= rna_find_function_def(func);
- if(dfunc->gencall) fprintf(f, "\t%s,\n", dfunc->gencall);
+ dfunc = rna_find_function_def(func);
+ if (dfunc->gencall) fprintf(f, "\t%s,\n", dfunc->gencall);
else fprintf(f, "\tNULL,\n");
- if(func->c_ret) fprintf(f, "\t(PropertyRNA*)&rna_%s_%s_%s\n", srna->identifier, func->identifier, func->c_ret->identifier);
+ if (func->c_ret) fprintf(f, "\t(PropertyRNA*)&rna_%s_%s_%s\n", srna->identifier, func->identifier, func->c_ret->identifier);
else fprintf(f, "\tNULL\n");
fprintf(f, "};\n");
@@ -2386,19 +2386,19 @@ static void rna_generate_struct(BlenderRNA *brna, StructRNA *srna, FILE *f)
fprintf(f, "StructRNA RNA_%s = {\n", srna->identifier);
- if(srna->cont.next) fprintf(f, "\t{(ContainerRNA *)&RNA_%s, ", ((StructRNA*)srna->cont.next)->identifier);
+ if (srna->cont.next) fprintf(f, "\t{(ContainerRNA *)&RNA_%s, ", ((StructRNA*)srna->cont.next)->identifier);
else fprintf(f, "\t{NULL, ");
- if(srna->cont.prev) fprintf(f, "(ContainerRNA *)&RNA_%s,\n", ((StructRNA*)srna->cont.prev)->identifier);
+ if (srna->cont.prev) fprintf(f, "(ContainerRNA *)&RNA_%s,\n", ((StructRNA*)srna->cont.prev)->identifier);
else fprintf(f, "NULL,\n");
fprintf(f, "\tNULL,\n");
- prop= srna->cont.properties.first;
- if(prop) fprintf(f, "\t{(PropertyRNA*)&rna_%s_%s, ", srna->identifier, prop->identifier);
+ prop = srna->cont.properties.first;
+ if (prop) fprintf(f, "\t{(PropertyRNA*)&rna_%s_%s, ", srna->identifier, prop->identifier);
else fprintf(f, "\t{NULL, ");
- prop= srna->cont.properties.last;
- if(prop) fprintf(f, "(PropertyRNA*)&rna_%s_%s}},\n", srna->identifier, prop->identifier);
+ prop = srna->cont.properties.last;
+ if (prop) fprintf(f, "(PropertyRNA*)&rna_%s_%s}},\n", srna->identifier, prop->identifier);
else fprintf(f, "NULL}},\n");
fprintf(f, "\t");
rna_print_c_string(f, srna->identifier);
@@ -2409,26 +2409,26 @@ static void rna_generate_struct(BlenderRNA *brna, StructRNA *srna, FILE *f)
rna_print_c_string(f, srna->description);
fprintf(f, ",\n\t%d,\n", srna->icon);
- prop= srna->nameproperty;
- if(prop) {
- base= srna;
- while (base->base && base->base->nameproperty==prop)
- base= base->base;
+ prop = srna->nameproperty;
+ if (prop) {
+ base = srna;
+ while (base->base && base->base->nameproperty == prop)
+ base = base->base;
fprintf(f, "\t(PropertyRNA*)&rna_%s_%s, ", base->identifier, prop->identifier);
}
else fprintf(f, "\tNULL, ");
- prop= srna->iteratorproperty;
- base= srna;
- while (base->base && base->base->iteratorproperty==prop)
- base= base->base;
+ prop = srna->iteratorproperty;
+ base = srna;
+ while (base->base && base->base->iteratorproperty == prop)
+ base = base->base;
fprintf(f, "(PropertyRNA*)&rna_%s_rna_properties,\n", base->identifier);
- if(srna->base) fprintf(f, "\t&RNA_%s,\n", srna->base->identifier);
+ if (srna->base) fprintf(f, "\t&RNA_%s,\n", srna->base->identifier);
else fprintf(f, "\tNULL,\n");
- if(srna->nested) fprintf(f, "\t&RNA_%s,\n", srna->nested->identifier);
+ if (srna->nested) fprintf(f, "\t&RNA_%s,\n", srna->nested->identifier);
else fprintf(f, "\tNULL,\n");
fprintf(f, "\t%s,\n", rna_function_string(srna->refine));
@@ -2438,18 +2438,18 @@ static void rna_generate_struct(BlenderRNA *brna, StructRNA *srna, FILE *f)
fprintf(f, "\t%s,\n", rna_function_string(srna->instance));
fprintf(f, "\t%s,\n", rna_function_string(srna->idproperties));
- if(srna->reg && !srna->refine) {
+ if (srna->reg && !srna->refine) {
fprintf(stderr, "%s: %s has a register function, must also have refine function.\n",
__func__, srna->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
}
- func= srna->functions.first;
- if(func) fprintf(f, "\t{(FunctionRNA*)&rna_%s_%s_func, ", srna->identifier, func->identifier);
+ func = srna->functions.first;
+ if (func) fprintf(f, "\t{(FunctionRNA*)&rna_%s_%s_func, ", srna->identifier, func->identifier);
else fprintf(f, "\t{NULL, ");
- func= srna->functions.last;
- if(func) fprintf(f, "(FunctionRNA*)&rna_%s_%s_func}\n", srna->identifier, func->identifier);
+ func = srna->functions.last;
+ if (func) fprintf(f, "(FunctionRNA*)&rna_%s_%s_func}\n", srna->identifier, func->identifier);
else fprintf(f, "NULL}\n");
fprintf(f, "};\n");
@@ -2463,7 +2463,7 @@ typedef struct RNAProcessItem {
void (*define)(BlenderRNA *brna);
} RNAProcessItem;
-static RNAProcessItem PROCESS_ITEMS[]= {
+static RNAProcessItem PROCESS_ITEMS[] = {
{"rna_rna.c", NULL, RNA_def_rna},
{"rna_ID.c", NULL, RNA_def_ID},
{"rna_texture.c", "rna_texture_api.c", RNA_def_texture},
@@ -2559,38 +2559,38 @@ static void rna_generate(BlenderRNA *brna, FILE *f, const char *filename, const
rna_generate_prototypes(brna, f);
fprintf(f, "#include \"%s\"\n", filename);
- if(api_filename)
+ if (api_filename)
fprintf(f, "#include \"%s\"\n", api_filename);
fprintf(f, "\n");
fprintf(f, "/* Autogenerated Functions */\n\n");
- for(ds=DefRNA.structs.first; ds; ds=ds->cont.next) {
- if(!filename || ds->filename == filename) {
+ for (ds = DefRNA.structs.first; ds; ds = ds->cont.next) {
+ if (!filename || ds->filename == filename) {
rna_generate_property_prototypes(brna, ds->srna, f);
rna_generate_function_prototypes(brna, ds->srna, f);
}
}
- for(ds=DefRNA.structs.first; ds; ds=ds->cont.next)
- if(!filename || ds->filename == filename)
- for(dp=ds->cont.properties.first; dp; dp=dp->next)
+ for (ds = DefRNA.structs.first; ds; ds = ds->cont.next)
+ if (!filename || ds->filename == filename)
+ for (dp = ds->cont.properties.first; dp; dp = dp->next)
rna_def_property_funcs(f, ds->srna, dp);
- for(ds=DefRNA.structs.first; ds; ds=ds->cont.next) {
- if(!filename || ds->filename == filename) {
- for(dfunc=ds->functions.first; dfunc; dfunc= dfunc->cont.next)
+ for (ds = DefRNA.structs.first; ds; ds = ds->cont.next) {
+ if (!filename || ds->filename == filename) {
+ for (dfunc = ds->functions.first; dfunc; dfunc = dfunc->cont.next)
rna_def_function_funcs(f, ds, dfunc);
rna_generate_static_function_prototypes(brna, ds->srna, f);
}
}
- for(ds=DefRNA.structs.first; ds; ds=ds->cont.next)
- if(!filename || ds->filename == filename)
+ for (ds = DefRNA.structs.first; ds; ds = ds->cont.next)
+ if (!filename || ds->filename == filename)
rna_generate_struct(brna, ds->srna, f);
- if(strcmp(filename, "rna_ID.c") == 0) {
+ if (strcmp(filename, "rna_ID.c") == 0) {
/* this is ugly, but we cannot have c files compiled for both
* makesrna and blender with some build systems at the moment */
fprintf(f, "#include \"rna_define.c\"\n\n");
@@ -2626,18 +2626,18 @@ static void rna_generate_header(BlenderRNA *brna, FILE *f)
fprintf(f, " property##_end(&rna_macro_iter); \\\n");
fprintf(f, " }\n\n");
- for(ds=DefRNA.structs.first; ds; ds=ds->cont.next) {
- srna= ds->srna;
+ for (ds = DefRNA.structs.first; ds; ds = ds->cont.next) {
+ srna = ds->srna;
fprintf(f, "/**************** %s ****************/\n\n", srna->name);
- while(srna) {
+ while (srna) {
fprintf(f, "extern StructRNA RNA_%s;\n", srna->identifier);
- srna= srna->base;
+ srna = srna->base;
}
fprintf(f, "\n");
- for(dp=ds->cont.properties.first; dp; dp=dp->next)
+ for (dp = ds->cont.properties.first; dp; dp = dp->next)
rna_def_property_funcs_header(f, ds->srna, dp);
}
@@ -2781,25 +2781,25 @@ static void rna_generate_header_cpp(BlenderRNA *brna, FILE *f)
fprintf(f, "/**************** Declarations ****************/\n\n");
- for(ds=DefRNA.structs.first; ds; ds=ds->cont.next)
+ for (ds = DefRNA.structs.first; ds; ds = ds->cont.next)
fprintf(f, "class %s;\n", ds->srna->identifier);
fprintf(f, "\n");
- for(ds=DefRNA.structs.first; ds; ds=ds->cont.next) {
- srna= ds->srna;
+ for (ds = DefRNA.structs.first; ds; ds = ds->cont.next) {
+ srna = ds->srna;
fprintf(f, "/**************** %s ****************/\n\n", srna->name);
fprintf(f, "class %s : public %s {\n", srna->identifier, (srna->base)? srna->base->identifier: "Pointer");
fprintf(f, "public:\n");
fprintf(f, "\t%s(const PointerRNA& ptr) :\n\t\t%s(ptr)", srna->identifier, (srna->base)? srna->base->identifier: "Pointer");
- for(dp=ds->cont.properties.first; dp; dp=dp->next)
- if(!(dp->prop->flag & (PROP_IDPROPERTY|PROP_BUILTIN)))
- if(dp->prop->type == PROP_COLLECTION)
+ for (dp = ds->cont.properties.first; dp; dp = dp->next)
+ if (!(dp->prop->flag & (PROP_IDPROPERTY|PROP_BUILTIN)))
+ if (dp->prop->type == PROP_COLLECTION)
fprintf(f, ",\n\t\t%s(ptr)", dp->prop->identifier);
fprintf(f, "\n\t\t{}\n\n");
- for(dp=ds->cont.properties.first; dp; dp=dp->next)
+ for (dp = ds->cont.properties.first; dp; dp = dp->next)
rna_def_property_funcs_header_cpp(f, ds->srna, dp);
fprintf(f, "};\n\n");
}
@@ -2807,8 +2807,8 @@ static void rna_generate_header_cpp(BlenderRNA *brna, FILE *f)
fprintf(f, "/**************** Implementation ****************/\n");
- for(ds=DefRNA.structs.first; ds; ds=ds->cont.next) {
- for(dp=ds->cont.properties.first; dp; dp=dp->next)
+ for (ds = DefRNA.structs.first; ds; ds = ds->cont.next) {
+ for (dp = ds->cont.properties.first; dp; dp = dp->next)
rna_def_property_funcs_impl_cpp(f, ds->srna, dp);
fprintf(f, "\n");
@@ -2819,7 +2819,7 @@ static void rna_generate_header_cpp(BlenderRNA *brna, FILE *f)
static void make_bad_file(const char *file, int line)
{
- FILE *fp= fopen(file, "w");
+ FILE *fp = fopen(file, "w");
fprintf(fp, "#error \"Error! can't make correct RNA file from %s:%d, STUPID!\"\n", __FILE__, line);
fclose(fp);
}
@@ -2834,15 +2834,15 @@ static int rna_preprocess(const char *outfile)
const char *deps[3]; /* expand as needed */
/* define rna */
- brna= RNA_create();
+ brna = RNA_create();
- for(i=0; PROCESS_ITEMS[i].filename; i++) {
- if(PROCESS_ITEMS[i].define) {
+ for (i = 0; PROCESS_ITEMS[i].filename; i++) {
+ if (PROCESS_ITEMS[i].define) {
PROCESS_ITEMS[i].define(brna);
- for(ds=DefRNA.structs.first; ds; ds=ds->cont.next)
- if(!ds->filename)
- ds->filename= PROCESS_ITEMS[i].filename;
+ for (ds = DefRNA.structs.first; ds; ds = ds->cont.next)
+ if (!ds->filename)
+ ds->filename = PROCESS_ITEMS[i].filename;
}
}
@@ -2853,22 +2853,22 @@ static int rna_preprocess(const char *outfile)
strcpy(deffile, outfile);
strcat(deffile, "RNA_blender_cpp.h" TMP_EXT);
- status= (DefRNA.error != 0);
+ status = (DefRNA.error != 0);
- if(status) {
+ if (status) {
make_bad_file(deffile, __LINE__);
}
else {
file = fopen(deffile, "w");
- if(!file) {
+ if (!file) {
fprintf(stderr, "Unable to open file: %s\n", deffile);
status = 1;
}
else {
rna_generate_header_cpp(brna, file);
fclose(file);
- status= (DefRNA.error != 0);
+ status = (DefRNA.error != 0);
}
}
@@ -2877,33 +2877,33 @@ static int rna_preprocess(const char *outfile)
rna_sort(brna);
/* create rna_gen_*.c files */
- for(i=0; PROCESS_ITEMS[i].filename; i++) {
+ for (i = 0; PROCESS_ITEMS[i].filename; i++) {
strcpy(deffile, outfile);
strcat(deffile, PROCESS_ITEMS[i].filename);
deffile[strlen(deffile)-2] = '\0';
strcat(deffile, "_gen.c" TMP_EXT);
- if(status) {
+ if (status) {
make_bad_file(deffile, __LINE__);
}
else {
file = fopen(deffile, "w");
- if(!file) {
+ if (!file) {
fprintf(stderr, "Unable to open file: %s\n", deffile);
status = 1;
}
else {
rna_generate(brna, file, PROCESS_ITEMS[i].filename, PROCESS_ITEMS[i].api_filename);
fclose(file);
- status= (DefRNA.error != 0);
+ status = (DefRNA.error != 0);
}
}
/* avoid unneeded rebuilds */
- deps[0]= PROCESS_ITEMS[i].filename;
- deps[1]= PROCESS_ITEMS[i].api_filename;
- deps[2]= NULL;
+ deps[0] = PROCESS_ITEMS[i].filename;
+ deps[1] = PROCESS_ITEMS[i].api_filename;
+ deps[2] = NULL;
replace_if_different(deffile, deps);
}
@@ -2912,20 +2912,20 @@ static int rna_preprocess(const char *outfile)
strcpy(deffile, outfile);
strcat(deffile, "RNA_blender.h" TMP_EXT);
- if(status) {
+ if (status) {
make_bad_file(deffile, __LINE__);
}
else {
file = fopen(deffile, "w");
- if(!file) {
+ if (!file) {
fprintf(stderr, "Unable to open file: %s\n", deffile);
status = 1;
}
else {
rna_generate_header(brna, file);
fclose(file);
- status= (DefRNA.error != 0);
+ status = (DefRNA.error != 0);
}
}
@@ -2948,18 +2948,18 @@ int main(int argc, char **argv)
{
int totblock, return_status = 0;
- if(argc<2) {
+ if (argc<2) {
fprintf(stderr, "Usage: %s outdirectory/\n", argv[0]);
return_status = 1;
}
else {
fprintf(stderr, "Running makesrna, program versions %s\n", RNA_VERSION_DATE);
- makesrna_path= argv[0];
- return_status= rna_preprocess(argv[1]);
+ makesrna_path = argv[0];
+ return_status = rna_preprocess(argv[1]);
}
- totblock= MEM_get_memory_blocks_in_use();
- if(totblock!=0) {
+ totblock = MEM_get_memory_blocks_in_use();
+ if (totblock != 0) {
fprintf(stderr, "Error Totblock: %d\n",totblock);
MEM_set_error_callback(mem_error_cb);
MEM_printmemlist();
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index de0cd6d9c59..6ca66f1d116 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -84,30 +84,30 @@ EnumPropertyItem id_type_items[] = {
/* name functions that ignore the first two ID characters */
void rna_ID_name_get(PointerRNA *ptr, char *value)
{
- ID *id= (ID*)ptr->data;
+ ID *id = (ID*)ptr->data;
BLI_strncpy(value, id->name+2, sizeof(id->name)-2);
}
int rna_ID_name_length(PointerRNA *ptr)
{
- ID *id= (ID*)ptr->data;
+ ID *id = (ID*)ptr->data;
return strlen(id->name+2);
}
void rna_ID_name_set(PointerRNA *ptr, const char *value)
{
- ID *id= (ID*)ptr->data;
+ ID *id = (ID*)ptr->data;
BLI_strncpy_utf8(id->name+2, value, sizeof(id->name)-2);
test_idbutton(id->name+2);
}
static int rna_ID_name_editable(PointerRNA *ptr)
{
- ID *id= (ID*)ptr->data;
+ ID *id = (ID*)ptr->data;
if (GS(id->name) == ID_VF) {
- VFont *vf= (VFont *)id;
- if (strcmp(vf->name, FO_BUILTIN_NAME)==0)
+ VFont *vf = (VFont *)id;
+ if (strcmp(vf->name, FO_BUILTIN_NAME) == 0)
return 0;
}
@@ -116,41 +116,41 @@ static int rna_ID_name_editable(PointerRNA *ptr)
short RNA_type_to_ID_code(StructRNA *type)
{
- if(RNA_struct_is_a(type, &RNA_Action)) return ID_AC;
- if(RNA_struct_is_a(type, &RNA_Armature)) return ID_AR;
- if(RNA_struct_is_a(type, &RNA_Brush)) return ID_BR;
- if(RNA_struct_is_a(type, &RNA_Camera)) return ID_CA;
- if(RNA_struct_is_a(type, &RNA_Curve)) return ID_CU;
- if(RNA_struct_is_a(type, &RNA_GreasePencil)) return ID_GD;
- if(RNA_struct_is_a(type, &RNA_Group)) return ID_GR;
- if(RNA_struct_is_a(type, &RNA_Image)) return ID_IM;
- if(RNA_struct_is_a(type, &RNA_Key)) return ID_KE;
- if(RNA_struct_is_a(type, &RNA_Lamp)) return ID_LA;
- if(RNA_struct_is_a(type, &RNA_Library)) return ID_LI;
- if(RNA_struct_is_a(type, &RNA_Lattice)) return ID_LT;
- if(RNA_struct_is_a(type, &RNA_Material)) return ID_MA;
- if(RNA_struct_is_a(type, &RNA_MetaBall)) return ID_MB;
- if(RNA_struct_is_a(type, &RNA_NodeTree)) return ID_NT;
- if(RNA_struct_is_a(type, &RNA_Mesh)) return ID_ME;
- if(RNA_struct_is_a(type, &RNA_Object)) return ID_OB;
- if(RNA_struct_is_a(type, &RNA_ParticleSettings)) return ID_PA;
- if(RNA_struct_is_a(type, &RNA_Scene)) return ID_SCE;
- if(RNA_struct_is_a(type, &RNA_Screen)) return ID_SCR;
- if(RNA_struct_is_a(type, &RNA_Speaker)) return ID_SPK;
- if(RNA_struct_is_a(type, &RNA_Sound)) return ID_SO;
- if(RNA_struct_is_a(type, &RNA_Text)) return ID_TXT;
- if(RNA_struct_is_a(type, &RNA_Texture)) return ID_TE;
- if(RNA_struct_is_a(type, &RNA_VectorFont)) return ID_VF;
- if(RNA_struct_is_a(type, &RNA_World)) return ID_WO;
- if(RNA_struct_is_a(type, &RNA_WindowManager)) return ID_WM;
- if(RNA_struct_is_a(type, &RNA_MovieClip)) return ID_MC;
+ if (RNA_struct_is_a(type, &RNA_Action)) return ID_AC;
+ if (RNA_struct_is_a(type, &RNA_Armature)) return ID_AR;
+ if (RNA_struct_is_a(type, &RNA_Brush)) return ID_BR;
+ if (RNA_struct_is_a(type, &RNA_Camera)) return ID_CA;
+ if (RNA_struct_is_a(type, &RNA_Curve)) return ID_CU;
+ if (RNA_struct_is_a(type, &RNA_GreasePencil)) return ID_GD;
+ if (RNA_struct_is_a(type, &RNA_Group)) return ID_GR;
+ if (RNA_struct_is_a(type, &RNA_Image)) return ID_IM;
+ if (RNA_struct_is_a(type, &RNA_Key)) return ID_KE;
+ if (RNA_struct_is_a(type, &RNA_Lamp)) return ID_LA;
+ if (RNA_struct_is_a(type, &RNA_Library)) return ID_LI;
+ if (RNA_struct_is_a(type, &RNA_Lattice)) return ID_LT;
+ if (RNA_struct_is_a(type, &RNA_Material)) return ID_MA;
+ if (RNA_struct_is_a(type, &RNA_MetaBall)) return ID_MB;
+ if (RNA_struct_is_a(type, &RNA_NodeTree)) return ID_NT;
+ if (RNA_struct_is_a(type, &RNA_Mesh)) return ID_ME;
+ if (RNA_struct_is_a(type, &RNA_Object)) return ID_OB;
+ if (RNA_struct_is_a(type, &RNA_ParticleSettings)) return ID_PA;
+ if (RNA_struct_is_a(type, &RNA_Scene)) return ID_SCE;
+ if (RNA_struct_is_a(type, &RNA_Screen)) return ID_SCR;
+ if (RNA_struct_is_a(type, &RNA_Speaker)) return ID_SPK;
+ if (RNA_struct_is_a(type, &RNA_Sound)) return ID_SO;
+ if (RNA_struct_is_a(type, &RNA_Text)) return ID_TXT;
+ if (RNA_struct_is_a(type, &RNA_Texture)) return ID_TE;
+ if (RNA_struct_is_a(type, &RNA_VectorFont)) return ID_VF;
+ if (RNA_struct_is_a(type, &RNA_World)) return ID_WO;
+ if (RNA_struct_is_a(type, &RNA_WindowManager)) return ID_WM;
+ if (RNA_struct_is_a(type, &RNA_MovieClip)) return ID_MC;
return 0;
}
StructRNA *ID_code_to_RNA_type(short idcode)
{
- switch(idcode) {
+ switch (idcode) {
case ID_AC: return &RNA_Action;
case ID_AR: return &RNA_Armature;
case ID_BR: return &RNA_Brush;
@@ -185,7 +185,7 @@ StructRNA *ID_code_to_RNA_type(short idcode)
StructRNA *rna_ID_refine(PointerRNA *ptr)
{
- ID *id= (ID*)ptr->data;
+ ID *id = (ID*)ptr->data;
return ID_code_to_RNA_type(GS(id->name));
}
@@ -197,13 +197,13 @@ IDProperty *rna_ID_idprops(PointerRNA *ptr, int create)
void rna_ID_fake_user_set(PointerRNA *ptr, int value)
{
- ID *id= (ID*)ptr->data;
+ ID *id = (ID*)ptr->data;
- if(value && !(id->flag & LIB_FAKEUSER)) {
+ if (value && !(id->flag & LIB_FAKEUSER)) {
id->flag |= LIB_FAKEUSER;
id_us_plus(id);
}
- else if(!value && (id->flag & LIB_FAKEUSER)) {
+ else if (!value && (id->flag & LIB_FAKEUSER)) {
id->flag &= ~LIB_FAKEUSER;
id_us_min(id);
}
@@ -227,19 +227,19 @@ StructRNA *rna_PropertyGroup_register(Main *UNUSED(bmain), ReportList *reports,
RNA_pointer_create(NULL, &RNA_PropertyGroup, NULL, &dummyptr);
/* validate the python class */
- if(validate(&dummyptr, data, NULL) != 0)
+ if (validate(&dummyptr, data, NULL) != 0)
return NULL;
/* note: it looks like there is no length limit on the srna id since its
* just a char pointer, but take care here, also be careful that python
* owns the string pointer which it could potentially free while blender
* is running. */
- if(BLI_strnlen(identifier, MAX_IDPROP_NAME) == MAX_IDPROP_NAME) {
+ if (BLI_strnlen(identifier, MAX_IDPROP_NAME) == MAX_IDPROP_NAME) {
BKE_reportf(reports, RPT_ERROR, "registering id property class: '%s' is too long, maximum length is " STRINGIFY(MAX_IDPROP_NAME), identifier);
return NULL;
}
- return RNA_def_struct(&BLENDER_RNA, identifier, "PropertyGroup"); // XXX
+ return RNA_def_struct(&BLENDER_RNA, identifier, "PropertyGroup"); /* XXX */
}
StructRNA* rna_PropertyGroup_refine(PointerRNA *ptr)
@@ -251,8 +251,8 @@ ID *rna_ID_copy(ID *id)
{
ID *newid;
- if(id_copy(id, &newid, 0)) {
- if(newid) id_us_min(newid);
+ if (id_copy(id, &newid, 0)) {
+ if (newid) id_us_min(newid);
return newid;
}
@@ -268,14 +268,14 @@ static void rna_ID_update_tag(ID *id, ReportList *reports, int flag)
BKE_text_to_curve(sce, ob, CU_LEFT);
}*/
- if(flag == 0) {
+ if (flag == 0) {
/* pass */
}
else {
/* ensure flag us correct for the type */
- switch(GS(id->name)) {
+ switch (GS(id->name)) {
case ID_OB:
- if(flag & ~(OB_RECALC_ALL)) {
+ if (flag & ~(OB_RECALC_ALL)) {
BKE_report(reports, RPT_ERROR, "'refresh' incompatible with Object ID type");
return;
}
@@ -298,28 +298,28 @@ static void rna_ID_update_tag(ID *id, ReportList *reports, int flag)
void rna_ID_user_clear(ID *id)
{
- id->us= 0; /* dont save */
+ id->us = 0; /* dont save */
id->flag &= ~LIB_FAKEUSER;
}
static void rna_IDPArray_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- IDProperty *prop= (IDProperty *)ptr->data;
+ IDProperty *prop = (IDProperty *)ptr->data;
rna_iterator_array_begin(iter, IDP_IDPArray(prop), sizeof(IDProperty), prop->len, 0, NULL);
}
static int rna_IDPArray_length(PointerRNA *ptr)
{
- IDProperty *prop= (IDProperty *)ptr->data;
+ IDProperty *prop = (IDProperty *)ptr->data;
return prop->len;
}
int rna_IDMaterials_assign_int(PointerRNA *ptr, int key, const PointerRNA *assign_ptr)
{
- ID *id= ptr->id.data;
- short *totcol= give_totcolp_id(id);
- Material *mat_id= assign_ptr->id.data;
- if(totcol && (key >= 0 && key < *totcol)) {
+ ID *id = ptr->id.data;
+ short *totcol = give_totcolp_id(id);
+ Material *mat_id = assign_ptr->id.data;
+ if (totcol && (key >= 0 && key < *totcol)) {
assign_material_id(id, mat_id, key + 1);
return 1;
}
@@ -330,7 +330,7 @@ int rna_IDMaterials_assign_int(PointerRNA *ptr, int key, const PointerRNA *assig
void rna_Library_filepath_set(PointerRNA *ptr, const char *value)
{
- Library *lib= (Library*)ptr->data;
+ Library *lib = (Library*)ptr->data;
BKE_library_filepath_set(lib, value);
}
@@ -343,56 +343,56 @@ static void rna_def_ID_properties(BlenderRNA *brna)
/* this is struct is used for holding the virtual
* PropertyRNA's for ID properties */
- srna= RNA_def_struct(brna, "PropertyGroupItem", NULL);
+ srna = RNA_def_struct(brna, "PropertyGroupItem", NULL);
RNA_def_struct_sdna(srna, "IDProperty");
RNA_def_struct_ui_text(srna, "ID Property", "Property that stores arbitrary, user defined properties");
/* IDP_STRING */
- prop= RNA_def_property(srna, "string", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "string", PROP_STRING, PROP_NONE);
RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
/* IDP_INT */
- prop= RNA_def_property(srna, "int", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "int", PROP_INT, PROP_NONE);
RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
- prop= RNA_def_property(srna, "int_array", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "int_array", PROP_INT, PROP_NONE);
RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
RNA_def_property_array(prop, 1);
/* IDP_FLOAT */
- prop= RNA_def_property(srna, "float", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "float", PROP_FLOAT, PROP_NONE);
RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
- prop= RNA_def_property(srna, "float_array", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "float_array", PROP_FLOAT, PROP_NONE);
RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
RNA_def_property_array(prop, 1);
/* IDP_DOUBLE */
- prop= RNA_def_property(srna, "double", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "double", PROP_FLOAT, PROP_NONE);
RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
- prop= RNA_def_property(srna, "double_array", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "double_array", PROP_FLOAT, PROP_NONE);
RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
RNA_def_property_array(prop, 1);
/* IDP_GROUP */
- prop= RNA_def_property(srna, "group", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "group", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "PropertyGroup");
- prop= RNA_def_property(srna, "collection", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "collection", PROP_COLLECTION, PROP_NONE);
RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
RNA_def_property_struct_type(prop, "PropertyGroup");
- prop= RNA_def_property(srna, "idp_array", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "idp_array", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "PropertyGroup");
RNA_def_property_collection_funcs(prop, "rna_IDPArray_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_IDPArray_length", NULL, NULL, NULL);
RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
- // never tested, maybe its useful to have this?
+ /* never tested, maybe its useful to have this? */
#if 0
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Name", "Unique name used in the code and scripting");
@@ -404,7 +404,7 @@ static void rna_def_ID_properties(BlenderRNA *brna)
/* ID property groups > level 0, since level 0 group is merged
* with native RNA properties. the builtin_properties will take
* care of the properties here */
- srna= RNA_def_struct(brna, "PropertyGroup", NULL);
+ srna = RNA_def_struct(brna, "PropertyGroup", NULL);
RNA_def_struct_sdna(srna, "IDPropertyGroup");
RNA_def_struct_ui_text(srna, "ID Property Group", "Group of ID properties");
RNA_def_struct_idprops_func(srna, "rna_PropertyGroup_idprops");
@@ -414,9 +414,9 @@ static void rna_def_ID_properties(BlenderRNA *brna)
/* important so python types can have their name used in list views
* however this isnt prefect because it overrides how python would set the name
* when we only really want this so RNA_def_struct_name_property() is set to something useful */
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
- //RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ /*RNA_def_property_clear_flag(prop, PROP_EDITABLE); */
RNA_def_property_ui_text(prop, "Name", "Unique name used in the code and scripting");
RNA_def_struct_name_property(srna, prop);
}
@@ -429,21 +429,21 @@ static void rna_def_ID_materials(BlenderRNA *brna)
PropertyRNA *parm;
/* for mesh/mball/curve materials */
- srna= RNA_def_struct(brna, "IDMaterials", NULL);
+ srna = RNA_def_struct(brna, "IDMaterials", NULL);
RNA_def_struct_sdna(srna, "ID");
RNA_def_struct_ui_text(srna, "ID Materials", "Collection of materials");
- func= RNA_def_function(srna, "append", "material_append_id");
+ func = RNA_def_function(srna, "append", "material_append_id");
RNA_def_function_ui_description(func, "Add a new material to the data block");
- parm= RNA_def_pointer(func, "material", "Material", "", "Material to add");
+ parm = RNA_def_pointer(func, "material", "Material", "", "Material to add");
RNA_def_property_flag(parm, PROP_REQUIRED);
- func= RNA_def_function(srna, "pop", "material_pop_id");
+ func = RNA_def_function(srna, "pop", "material_pop_id");
RNA_def_function_ui_description(func, "Remove a material from the data block");
- parm= RNA_def_int(func, "index", 0, 0, MAXMAT, "", "Index of material to remove", 0, MAXMAT);
+ parm = RNA_def_int(func, "index", 0, 0, MAXMAT, "", "Index of material to remove", 0, MAXMAT);
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_boolean(func, "update_data", 0, "", "Update data by re-adjusting the material slots assigned");
- parm= RNA_def_pointer(func, "material", "Material", "", "Material to remove");
+ parm = RNA_def_pointer(func, "material", "Material", "", "Material to remove");
RNA_def_function_return(func, parm);
}
@@ -459,13 +459,13 @@ static void rna_def_ID(BlenderRNA *brna)
{OB_RECALC_TIME, "TIME", 0, "Time", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "ID", NULL);
+ srna = RNA_def_struct(brna, "ID", NULL);
RNA_def_struct_ui_text(srna, "ID", "Base type for datablocks, defining a unique name, linking from other libraries and garbage collection");
RNA_def_struct_flag(srna, STRUCT_ID|STRUCT_ID_REFCOUNT);
RNA_def_struct_refine_func(srna, "rna_ID_refine");
RNA_def_struct_idprops_func(srna, "rna_ID_idprops");
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "Unique datablock ID name");
RNA_def_property_string_funcs(prop, "rna_ID_name_get", "rna_ID_name_length", "rna_ID_name_set");
RNA_def_property_string_maxlength(prop, MAX_ID_NAME-2);
@@ -473,55 +473,55 @@ static void rna_def_ID(BlenderRNA *brna)
RNA_def_property_update(prop, NC_ID|NA_RENAME, NULL);
RNA_def_struct_name_property(srna, prop);
- prop= RNA_def_property(srna, "users", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "users", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "us");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Users", "Number of times this datablock is referenced");
- prop= RNA_def_property(srna, "use_fake_user", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_fake_user", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIB_FAKEUSER);
RNA_def_property_ui_text(prop, "Fake User", "Save this datablock even if it has no users");
RNA_def_property_boolean_funcs(prop, NULL, "rna_ID_fake_user_set");
- prop= RNA_def_property(srna, "tag", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "tag", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIB_DOIT);
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
RNA_def_property_ui_text(prop, "Tag", "Tools can use this to tag data (initial state is undefined)");
- prop= RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIB_ID_RECALC);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Is Updated", "Datablock is tagged for recalculation");
- prop= RNA_def_property(srna, "is_updated_data", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_updated_data", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIB_ID_RECALC_DATA);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Is Updated Data", "Datablock data is tagged for recalculation");
- prop= RNA_def_property(srna, "library", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "library", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "lib");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Library", "Library file the datablock is linked from");
/* functions */
- func= RNA_def_function(srna, "copy", "rna_ID_copy");
+ func = RNA_def_function(srna, "copy", "rna_ID_copy");
RNA_def_function_ui_description(func, "Create a copy of this datablock (not supported for all datablocks)");
- parm= RNA_def_pointer(func, "id", "ID", "", "New copy of the ID");
+ parm = RNA_def_pointer(func, "id", "ID", "", "New copy of the ID");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "user_clear", "rna_ID_user_clear");
+ func = RNA_def_function(srna, "user_clear", "rna_ID_user_clear");
RNA_def_function_ui_description(func, "Clear the user count of a datablock so its not saved, "
"on reload the data will be removed");
- func= RNA_def_function(srna, "animation_data_create", "BKE_id_add_animdata");
+ func = RNA_def_function(srna, "animation_data_create", "BKE_id_add_animdata");
RNA_def_function_ui_description(func, "Create animation data to this ID, note that not all ID types support this");
- parm= RNA_def_pointer(func, "anim_data", "AnimData", "", "New animation data or NULL");
+ parm = RNA_def_pointer(func, "anim_data", "AnimData", "", "New animation data or NULL");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "animation_data_clear", "BKE_free_animdata");
+ func = RNA_def_function(srna, "animation_data_clear", "BKE_free_animdata");
RNA_def_function_ui_description(func, "Clear animation on this this ID");
- func= RNA_def_function(srna, "update_tag", "rna_ID_update_tag");
+ func = RNA_def_function(srna, "update_tag", "rna_ID_update_tag");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Tag the ID to update its display data");
RNA_def_enum_flag(func, "refresh", update_flag_items, 0, "", "Type of updates to perform");
@@ -532,16 +532,16 @@ static void rna_def_library(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Library", "ID");
+ srna = RNA_def_struct(brna, "Library", "ID");
RNA_def_struct_ui_text(srna, "Library", "External .blend file from which data is linked");
RNA_def_struct_ui_icon(srna, ICON_LIBRARY_DATA_DIRECT);
- prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
+ prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "File Path", "Path to the library .blend file");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Library_filepath_set");
- prop= RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Library");
RNA_def_property_ui_text(prop, "Parent", "");
}
@@ -550,11 +550,11 @@ void RNA_def_ID(BlenderRNA *brna)
StructRNA *srna;
/* built-in unknown type */
- srna= RNA_def_struct(brna, "UnknownType", NULL);
+ srna = RNA_def_struct(brna, "UnknownType", NULL);
RNA_def_struct_ui_text(srna, "Unknown Type", "Stub RNA type used for pointers to unknown or internal data");
/* built-in any type */
- srna= RNA_def_struct(brna, "AnyType", NULL);
+ srna = RNA_def_struct(brna, "AnyType", NULL);
RNA_def_struct_ui_text(srna, "Any Type", "RNA type used for pointers to any possible data");
rna_def_ID(brna);
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 0df8a625caf..0a420b1c6bf 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -63,7 +63,7 @@
#include "rna_internal.h"
-const PointerRNA PointerRNA_NULL= {{NULL}};
+const PointerRNA PointerRNA_NULL = {{NULL}};
/* Init/Exit */
@@ -72,12 +72,12 @@ void RNA_init(void)
StructRNA *srna;
PropertyRNA *prop;
- for(srna=BLENDER_RNA.structs.first; srna; srna=srna->cont.next) {
- if(!srna->cont.prophash) {
- srna->cont.prophash= BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "RNA_init gh");
+ for (srna = BLENDER_RNA.structs.first; srna; srna = srna->cont.next) {
+ if (!srna->cont.prophash) {
+ srna->cont.prophash = BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "RNA_init gh");
- for(prop=srna->cont.properties.first; prop; prop=prop->next)
- if(!(prop->flag & PROP_BUILTIN))
+ for (prop = srna->cont.properties.first; prop; prop = prop->next)
+ if (!(prop->flag & PROP_BUILTIN))
BLI_ghash_insert(srna->cont.prophash, (void*)prop->identifier, prop);
}
}
@@ -89,10 +89,10 @@ void RNA_exit(void)
RNA_property_update_cache_free();
- for(srna=BLENDER_RNA.structs.first; srna; srna=srna->cont.next) {
- if(srna->cont.prophash) {
+ for (srna = BLENDER_RNA.structs.first; srna; srna = srna->cont.next) {
+ if (srna->cont.prophash) {
BLI_ghash_free(srna->cont.prophash, NULL, NULL);
- srna->cont.prophash= NULL;
+ srna->cont.prophash = NULL;
}
}
@@ -103,95 +103,95 @@ void RNA_exit(void)
void RNA_main_pointer_create(struct Main *main, PointerRNA *r_ptr)
{
- r_ptr->id.data= NULL;
- r_ptr->type= &RNA_BlendData;
- r_ptr->data= main;
+ r_ptr->id.data = NULL;
+ r_ptr->type = &RNA_BlendData;
+ r_ptr->data = main;
}
void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr)
{
- StructRNA *type, *idtype= NULL;
+ StructRNA *type, *idtype = NULL;
- if(id) {
- PointerRNA tmp= {{NULL}};
- tmp.data= id;
- idtype= rna_ID_refine(&tmp);
+ if (id) {
+ PointerRNA tmp = {{NULL}};
+ tmp.data = id;
+ idtype = rna_ID_refine(&tmp);
- while(idtype->refine) {
- type= idtype->refine(&tmp);
+ while (idtype->refine) {
+ type = idtype->refine(&tmp);
- if(type == idtype)
+ if (type == idtype)
break;
else
- idtype= type;
+ idtype = type;
}
}
- r_ptr->id.data= id;
- r_ptr->type= idtype;
- r_ptr->data= id;
+ r_ptr->id.data = id;
+ r_ptr->type = idtype;
+ r_ptr->data = id;
}
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
{
#if 0 /* UNUSED */
- StructRNA *idtype= NULL;
+ StructRNA *idtype = NULL;
- if(id) {
- PointerRNA tmp= {{0}};
- tmp.data= id;
- idtype= rna_ID_refine(&tmp);
+ if (id) {
+ PointerRNA tmp = {{0}};
+ tmp.data = id;
+ idtype = rna_ID_refine(&tmp);
}
#endif
- r_ptr->id.data= id;
- r_ptr->type= type;
- r_ptr->data= data;
+ r_ptr->id.data = id;
+ r_ptr->type = type;
+ r_ptr->data = data;
- if(data) {
- while(r_ptr->type && r_ptr->type->refine) {
- StructRNA *rtype= r_ptr->type->refine(r_ptr);
+ if (data) {
+ while (r_ptr->type && r_ptr->type->refine) {
+ StructRNA *rtype = r_ptr->type->refine(r_ptr);
- if(rtype == r_ptr->type)
+ if (rtype == r_ptr->type)
break;
else
- r_ptr->type= rtype;
+ r_ptr->type = rtype;
}
}
}
static void rna_pointer_inherit_id(StructRNA *type, PointerRNA *parent, PointerRNA *ptr)
{
- if(type && type->flag & STRUCT_ID) {
- ptr->id.data= ptr->data;
+ if (type && type->flag & STRUCT_ID) {
+ ptr->id.data = ptr->data;
}
else {
- ptr->id.data= parent->id.data;
+ ptr->id.data = parent->id.data;
}
}
void RNA_blender_rna_pointer_create(PointerRNA *r_ptr)
{
- r_ptr->id.data= NULL;
- r_ptr->type= &RNA_BlenderRNA;
- r_ptr->data= &BLENDER_RNA;
+ r_ptr->id.data = NULL;
+ r_ptr->type = &RNA_BlenderRNA;
+ r_ptr->data = &BLENDER_RNA;
}
PointerRNA rna_pointer_inherit_refine(PointerRNA *ptr, StructRNA *type, void *data)
{
- if(data) {
+ if (data) {
PointerRNA result;
- result.data= data;
- result.type= type;
+ result.data = data;
+ result.type = type;
rna_pointer_inherit_id(type, ptr, &result);
- while(result.type->refine) {
- type= result.type->refine(&result);
+ while (result.type->refine) {
+ type = result.type->refine(&result);
- if(type == result.type)
+ if (type == result.type)
break;
else
- result.type= type;
+ result.type = type;
}
return result;
}
@@ -203,8 +203,8 @@ PointerRNA rna_pointer_inherit_refine(PointerRNA *ptr, StructRNA *type, void *da
/**/
void RNA_pointer_recast(PointerRNA *ptr, PointerRNA *r_ptr)
{
-#if 0 // works but this case if covered by more general code below.
- if(RNA_struct_is_ID(ptr->type)) {
+#if 0 /* works but this case if covered by more general code below. */
+ if (RNA_struct_is_ID(ptr->type)) {
/* simple case */
RNA_id_pointer_create(ptr->id.data, r_ptr);
}
@@ -213,12 +213,12 @@ void RNA_pointer_recast(PointerRNA *ptr, PointerRNA *r_ptr)
{
StructRNA *base;
PointerRNA t_ptr;
- *r_ptr= *ptr; /* initialize as the same incase cant recast */
+ *r_ptr = *ptr; /* initialize as the same incase cant recast */
- for(base=ptr->type->base; base; base=base->base) {
- t_ptr= rna_pointer_inherit_refine(ptr, base, ptr->data);
- if(t_ptr.type && t_ptr.type != ptr->type) {
- *r_ptr= t_ptr;
+ for (base = ptr->type->base; base; base = base->base) {
+ t_ptr = rna_pointer_inherit_refine(ptr, base, ptr->data);
+ if (t_ptr.type && t_ptr.type != ptr->type) {
+ *r_ptr = t_ptr;
}
}
}
@@ -237,14 +237,14 @@ IDProperty *rna_idproperty_ui(PropertyRNA *prop)
{
IDProperty *idprop;
- for(idprop= ((IDProperty *)prop)->prev; idprop; idprop= idprop->prev) {
- if (strcmp(RNA_IDP_UI, idprop->name)==0)
+ for (idprop = ((IDProperty *)prop)->prev; idprop; idprop = idprop->prev) {
+ if (strcmp(RNA_IDP_UI, idprop->name) == 0)
break;
}
- if(idprop==NULL) {
- for(idprop= ((IDProperty *)prop)->next; idprop; idprop= idprop->next) {
- if (strcmp(RNA_IDP_UI, idprop->name)==0)
+ if (idprop == NULL) {
+ for (idprop = ((IDProperty *)prop)->next; idprop; idprop = idprop->next) {
+ if (strcmp(RNA_IDP_UI, idprop->name) == 0)
break;
}
}
@@ -258,9 +258,9 @@ IDProperty *rna_idproperty_ui(PropertyRNA *prop)
IDProperty *RNA_struct_idprops(PointerRNA *ptr, int create)
{
- StructRNA *type= ptr->type;
+ StructRNA *type = ptr->type;
- if(type && type->idproperties)
+ if (type && type->idproperties)
return type->idproperties(ptr, create);
return NULL;
@@ -273,9 +273,9 @@ int RNA_struct_idprops_check(StructRNA *srna)
static IDProperty *rna_idproperty_find(PointerRNA *ptr, const char *name)
{
- IDProperty *group= RNA_struct_idprops(ptr, 0);
+ IDProperty *group = RNA_struct_idprops(ptr, 0);
- if(group)
+ if (group)
return IDP_GetPropertyFromGroup(group, name);
return NULL;
@@ -283,14 +283,14 @@ static IDProperty *rna_idproperty_find(PointerRNA *ptr, const char *name)
static int rna_ensure_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
{
- if(prop->magic == RNA_MAGIC) {
+ if (prop->magic == RNA_MAGIC) {
int arraylen[RNA_MAX_ARRAY_DIMENSION];
return (prop->getlength && ptr->data)? prop->getlength(ptr, arraylen): prop->totarraylength;
}
else {
- IDProperty *idprop= (IDProperty*)prop;
+ IDProperty *idprop = (IDProperty*)prop;
- if(idprop->type == IDP_ARRAY)
+ if (idprop->type == IDP_ARRAY)
return idprop->len;
else
return 0;
@@ -299,11 +299,11 @@ static int rna_ensure_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
static int rna_ensure_property_array_check(PropertyRNA *prop)
{
- if(prop->magic == RNA_MAGIC) {
+ if (prop->magic == RNA_MAGIC) {
return (prop->getlength || prop->totarraylength) ? 1:0;
}
else {
- IDProperty *idprop= (IDProperty*)prop;
+ IDProperty *idprop = (IDProperty*)prop;
return idprop->type == IDP_ARRAY ? 1:0;
}
@@ -311,19 +311,19 @@ static int rna_ensure_property_array_check(PropertyRNA *prop)
static void rna_ensure_property_multi_array_length(PointerRNA *ptr, PropertyRNA *prop, int length[])
{
- if(prop->magic == RNA_MAGIC) {
- if(prop->getlength)
+ if (prop->magic == RNA_MAGIC) {
+ if (prop->getlength)
prop->getlength(ptr, length);
else
memcpy(length, prop->arraylength, prop->arraydimension*sizeof(int));
}
else {
- IDProperty *idprop= (IDProperty*)prop;
+ IDProperty *idprop = (IDProperty*)prop;
- if(idprop->type == IDP_ARRAY)
- length[0]= idprop->len;
+ if (idprop->type == IDP_ARRAY)
+ length[0] = idprop->len;
else
- length[0]= 0;
+ length[0] = 0;
}
}
@@ -334,36 +334,36 @@ static int rna_idproperty_verify_valid(PointerRNA *ptr, PropertyRNA *prop, IDPro
* rna property access is type safe, e.g. if you defined the rna
* to have a certain array length you can count on that staying so */
- switch(idprop->type) {
+ switch (idprop->type) {
case IDP_IDPARRAY:
- if(prop->type != PROP_COLLECTION)
+ if (prop->type != PROP_COLLECTION)
return 0;
break;
case IDP_ARRAY:
- if(rna_ensure_property_array_length(ptr, prop) != idprop->len)
+ if (rna_ensure_property_array_length(ptr, prop) != idprop->len)
return 0;
- if(idprop->subtype == IDP_FLOAT && prop->type != PROP_FLOAT)
+ if (idprop->subtype == IDP_FLOAT && prop->type != PROP_FLOAT)
return 0;
- if(idprop->subtype == IDP_INT && !ELEM3(prop->type, PROP_BOOLEAN, PROP_INT, PROP_ENUM))
+ if (idprop->subtype == IDP_INT && !ELEM3(prop->type, PROP_BOOLEAN, PROP_INT, PROP_ENUM))
return 0;
break;
case IDP_INT:
- if(!ELEM3(prop->type, PROP_BOOLEAN, PROP_INT, PROP_ENUM))
+ if (!ELEM3(prop->type, PROP_BOOLEAN, PROP_INT, PROP_ENUM))
return 0;
break;
case IDP_FLOAT:
case IDP_DOUBLE:
- if(prop->type != PROP_FLOAT)
+ if (prop->type != PROP_FLOAT)
return 0;
break;
case IDP_STRING:
- if(prop->type != PROP_STRING)
+ if (prop->type != PROP_STRING)
return 0;
break;
case IDP_GROUP:
- if(prop->type != PROP_POINTER)
+ if (prop->type != PROP_POINTER)
return 0;
break;
default:
@@ -398,12 +398,12 @@ IDProperty *rna_idproperty_check(PropertyRNA **prop, PointerRNA *ptr)
* we look up an IDP PropertyRNA based on the type, and set the data
* pointer to the IDProperty. */
- if((*prop)->magic == RNA_MAGIC) {
- if((*prop)->flag & PROP_IDPROPERTY) {
- IDProperty *idprop= rna_idproperty_find(ptr, (*prop)->identifier);
+ if ((*prop)->magic == RNA_MAGIC) {
+ if ((*prop)->flag & PROP_IDPROPERTY) {
+ IDProperty *idprop = rna_idproperty_find(ptr, (*prop)->identifier);
- if(idprop && !rna_idproperty_verify_valid(ptr, *prop, idprop)) {
- IDProperty *group= RNA_struct_idprops(ptr, 0);
+ if (idprop && !rna_idproperty_verify_valid(ptr, *prop, idprop)) {
+ IDProperty *group = RNA_struct_idprops(ptr, 0);
IDP_RemFromGroup(group, idprop);
IDP_FreeProperty(idprop);
@@ -418,12 +418,12 @@ IDProperty *rna_idproperty_check(PropertyRNA **prop, PointerRNA *ptr)
}
{
- IDProperty *idprop= (IDProperty*)(*prop);
+ IDProperty *idprop = (IDProperty*)(*prop);
- if(idprop->type == IDP_ARRAY)
- *prop= arraytypemap[(int)(idprop->subtype)];
- else
- *prop= typemap[(int)(idprop->type)];
+ if (idprop->type == IDP_ARRAY)
+ *prop = arraytypemap[(int)(idprop->subtype)];
+ else
+ *prop = typemap[(int)(idprop->type)];
return idprop;
}
@@ -433,22 +433,22 @@ static PropertyRNA *rna_ensure_property(PropertyRNA *prop)
{
/* the quick version if we don't need the idproperty */
- if(prop->magic == RNA_MAGIC)
+ if (prop->magic == RNA_MAGIC)
return prop;
{
- IDProperty *idprop= (IDProperty*)prop;
+ IDProperty *idprop = (IDProperty*)prop;
- if(idprop->type == IDP_ARRAY)
+ if (idprop->type == IDP_ARRAY)
return arraytypemap[(int)(idprop->subtype)];
- else
+ else
return typemap[(int)(idprop->type)];
}
}
static const char *rna_ensure_property_identifier(PropertyRNA *prop)
{
- if(prop->magic == RNA_MAGIC)
+ if (prop->magic == RNA_MAGIC)
return prop->identifier;
else
return ((IDProperty*)prop)->name;
@@ -456,27 +456,27 @@ static const char *rna_ensure_property_identifier(PropertyRNA *prop)
static const char *rna_ensure_property_description(PropertyRNA *prop)
{
- const char *description= NULL;
+ const char *description = NULL;
- if(prop->magic == RNA_MAGIC)
- description= prop->description;
+ if (prop->magic == RNA_MAGIC)
+ description = prop->description;
else {
/* attempt to get the local ID values */
- IDProperty *idp_ui= rna_idproperty_ui(prop);
+ IDProperty *idp_ui = rna_idproperty_ui(prop);
- if(idp_ui) {
- IDProperty *item= IDP_GetPropertyTypeFromGroup(idp_ui, "description", IDP_STRING);
- if(item)
- description= IDP_String(item);
+ if (idp_ui) {
+ IDProperty *item = IDP_GetPropertyTypeFromGroup(idp_ui, "description", IDP_STRING);
+ if (item)
+ description = IDP_String(item);
}
- if(description == NULL)
- description= ((IDProperty*)prop)->name; /* XXX - not correct */
+ if (description == NULL)
+ description = ((IDProperty*)prop)->name; /* XXX - not correct */
}
#ifdef WITH_INTERNATIONAL
- if(description && BLF_translate_tooltips())
- description= BLF_gettext(description);
+ if (description && BLF_translate_tooltips())
+ description = BLF_gettext(description);
#endif
return description;
@@ -486,14 +486,14 @@ static const char *rna_ensure_property_name(PropertyRNA *prop)
{
const char *name;
- if(prop->magic == RNA_MAGIC)
- name= prop->name;
+ if (prop->magic == RNA_MAGIC)
+ name = prop->name;
else
- name= ((IDProperty*)prop)->name;
+ name = ((IDProperty*)prop)->name;
#ifdef WITH_INTERNATIONAL
- if(BLF_translate_iface()) {
- if(prop->translation_context)
+ if (BLF_translate_iface()) {
+ if (prop->translation_context)
name = BLF_pgettext(prop->translation_context, name);
else
name = BLF_gettext(name);
@@ -510,7 +510,7 @@ StructRNA *RNA_struct_find(const char *identifier)
StructRNA *type;
if (identifier) {
for (type = BLENDER_RNA.structs.first; type; type = type->cont.next)
- if (strcmp(type->identifier, identifier)==0)
+ if (strcmp(type->identifier, identifier) == 0)
return type;
}
return NULL;
@@ -528,7 +528,7 @@ const char *RNA_struct_ui_name(StructRNA *type)
int RNA_struct_ui_icon(StructRNA *type)
{
- if(type)
+ if (type)
return type->icon;
else
return ICON_DOT;
@@ -572,11 +572,11 @@ int RNA_struct_idprops_register_check(StructRNA *type)
/* remove an id-property */
int RNA_struct_idprops_unset(PointerRNA *ptr, const char *identifier)
{
- IDProperty *group= RNA_struct_idprops(ptr, 0);
+ IDProperty *group = RNA_struct_idprops(ptr, 0);
- if(group) {
- IDProperty *idp= IDP_GetPropertyFromGroup(group, identifier);
- if(idp) {
+ if (group) {
+ IDProperty *idp = IDP_GetPropertyFromGroup(group, identifier);
+ if (idp) {
IDP_RemFromGroup(group, idp);
IDP_FreeProperty(idp);
MEM_freeN(idp);
@@ -591,12 +591,12 @@ int RNA_struct_is_a(StructRNA *type, StructRNA *srna)
{
StructRNA *base;
- if(!type)
+ if (!type)
return 0;
/* ptr->type is always maximally refined */
- for(base=type; base; base=base->base)
- if(base == srna)
+ for (base = type; base; base = base->base)
+ if (base == srna)
return 1;
return 0;
@@ -604,19 +604,19 @@ int RNA_struct_is_a(StructRNA *type, StructRNA *srna)
PropertyRNA *RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
{
- if(identifier[0]=='[' && identifier[1]=='"') { // " (dummy comment to avoid confusing some function lists in text editors)
+ if (identifier[0] =='[' && identifier[1] =='"') { /* " (dummy comment to avoid confusing some function lists in text editors) */
/* id prop lookup, not so common */
- PropertyRNA *r_prop= NULL;
+ PropertyRNA *r_prop = NULL;
PointerRNA r_ptr; /* only support single level props */
- if(RNA_path_resolve(ptr, identifier, &r_ptr, &r_prop) && r_ptr.type==ptr->type && r_ptr.data==ptr->data)
+ if (RNA_path_resolve(ptr, identifier, &r_ptr, &r_prop) && r_ptr.type == ptr->type && r_ptr.data == ptr->data)
return r_prop;
}
else {
/* most common case */
- PropertyRNA *iterprop= RNA_struct_iterator_property(ptr->type);
+ PropertyRNA *iterprop = RNA_struct_iterator_property(ptr->type);
PointerRNA propptr;
- if(RNA_property_collection_lookup_string(ptr, iterprop, identifier, &propptr))
+ if (RNA_property_collection_lookup_string(ptr, iterprop, identifier, &propptr))
return propptr.data;
}
@@ -626,12 +626,12 @@ PropertyRNA *RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
/* Find the property which uses the given nested struct */
PropertyRNA *RNA_struct_find_nested(PointerRNA *ptr, StructRNA *srna)
{
- PropertyRNA *prop= NULL;
+ PropertyRNA *prop = NULL;
RNA_STRUCT_BEGIN(ptr, iprop) {
/* This assumes that there can only be one user of this nested struct */
if (RNA_property_pointer_type(ptr, iprop) == srna) {
- prop= iprop;
+ prop = iprop;
break;
}
}
@@ -646,14 +646,14 @@ int RNA_struct_contains_property(PointerRNA *ptr, PropertyRNA *prop_test)
/* validate the RNA is ok */
PropertyRNA *iterprop;
- int found= FALSE;
+ int found = FALSE;
- iterprop= RNA_struct_iterator_property(ptr->type);
+ iterprop = RNA_struct_iterator_property(ptr->type);
RNA_PROP_BEGIN(ptr, itemptr, iterprop) {
/* PropertyRNA *prop= itemptr.data; */
- if(prop_test == (PropertyRNA *)itemptr.data) {
- found= TRUE;
+ if (prop_test == (PropertyRNA *)itemptr.data) {
+ found = TRUE;
break;
}
}
@@ -678,9 +678,9 @@ FunctionRNA *RNA_struct_find_function(PointerRNA *ptr, const char *identifier)
#if 1
FunctionRNA *func;
StructRNA *type;
- for(type= ptr->type; type; type= type->base) {
- func= (FunctionRNA *)BLI_findstring_ptr(&type->functions, identifier, offsetof(FunctionRNA, identifier));
- if(func) {
+ for (type = ptr->type; type; type = type->base) {
+ func = (FunctionRNA *)BLI_findstring_ptr(&type->functions, identifier, offsetof(FunctionRNA, identifier));
+ if (func) {
return func;
}
}
@@ -693,13 +693,13 @@ FunctionRNA *RNA_struct_find_function(PointerRNA *ptr, const char *identifier)
FunctionRNA *func;
RNA_pointer_create(NULL, &RNA_Struct, ptr->type, &tptr);
- iterprop= RNA_struct_find_property(&tptr, "functions");
+ iterprop = RNA_struct_find_property(&tptr, "functions");
- func= NULL;
+ func = NULL;
RNA_PROP_BEGIN(&tptr, funcptr, iterprop) {
- if(strcmp(identifier, RNA_function_identifier(funcptr.data)) == 0) {
- func= funcptr.data;
+ if (strcmp(identifier, RNA_function_identifier(funcptr.data)) == 0) {
+ func = funcptr.data;
break;
}
}
@@ -722,21 +722,21 @@ StructRegisterFunc RNA_struct_register(StructRNA *type)
StructUnregisterFunc RNA_struct_unregister(StructRNA *type)
{
do {
- if(type->unreg)
+ if (type->unreg)
return type->unreg;
- } while((type=type->base));
+ } while ((type = type->base));
return NULL;
}
void **RNA_struct_instance(PointerRNA *ptr)
{
- StructRNA *type= ptr->type;
+ StructRNA *type = ptr->type;
do {
- if(type->instance)
+ if (type->instance)
return type->instance(ptr);
- } while((type=type->base));
+ } while ((type = type->base));
return NULL;
}
@@ -748,7 +748,7 @@ void *RNA_struct_py_type_get(StructRNA *srna)
void RNA_struct_py_type_set(StructRNA *srna, void *py_type)
{
- srna->py_type= py_type;
+ srna->py_type = py_type;
}
void *RNA_struct_blender_type_get(StructRNA *srna)
@@ -758,14 +758,14 @@ void *RNA_struct_blender_type_get(StructRNA *srna)
void RNA_struct_blender_type_set(StructRNA *srna, void *blender_type)
{
- srna->blender_type= blender_type;
+ srna->blender_type = blender_type;
}
char *RNA_struct_name_get_alloc(PointerRNA *ptr, char *fixedbuf, int fixedlen, int *r_len)
{
PropertyRNA *nameprop;
- if(ptr->data && (nameprop = RNA_struct_name_property(ptr->type)))
+ if (ptr->data && (nameprop = RNA_struct_name_property(ptr->type)))
return RNA_property_string_get_alloc(ptr, nameprop, fixedbuf, fixedlen, r_len);
return NULL;
@@ -821,9 +821,9 @@ int RNA_property_array_check(PropertyRNA *prop)
/* used by BPY to make an array from the python object */
int RNA_property_array_dimension(PointerRNA *ptr, PropertyRNA *prop, int length[])
{
- PropertyRNA *rprop= rna_ensure_property(prop);
+ PropertyRNA *rprop = rna_ensure_property(prop);
- if(length)
+ if (length)
rna_ensure_property_multi_array_length(ptr, prop, length);
return rprop->arraydimension;
@@ -841,16 +841,16 @@ int RNA_property_multi_array_length(PointerRNA *ptr, PropertyRNA *prop, int dim)
char RNA_property_array_item_char(PropertyRNA *prop, int index)
{
- const char *vectoritem= "XYZW";
- const char *quatitem= "WXYZ";
- const char *coloritem= "RGBA";
- PropertySubType subtype= rna_ensure_property(prop)->subtype;
+ const char *vectoritem = "XYZW";
+ const char *quatitem = "WXYZ";
+ const char *coloritem = "RGBA";
+ PropertySubType subtype = rna_ensure_property(prop)->subtype;
/* get string to use for array index */
if ((index < 4) && ELEM(subtype, PROP_QUATERNION, PROP_AXISANGLE)) {
return quatitem[index];
}
- else if((index < 4) && ELEM8(subtype, PROP_TRANSLATION, PROP_DIRECTION, PROP_XYZ, PROP_XYZ_LENGTH,
+ else if ((index < 4) && ELEM8(subtype, PROP_TRANSLATION, PROP_DIRECTION, PROP_XYZ, PROP_XYZ_LENGTH,
PROP_EULER, PROP_VELOCITY, PROP_ACCELERATION, PROP_COORDS))
{
return vectoritem[index];
@@ -864,7 +864,7 @@ char RNA_property_array_item_char(PropertyRNA *prop, int index)
int RNA_property_array_item_index(PropertyRNA *prop, char name)
{
- PropertySubType subtype= rna_ensure_property(prop)->subtype;
+ PropertySubType subtype = rna_ensure_property(prop)->subtype;
/* get index based on string name/alias */
/* maybe a function to find char index in string would be better than all the switches */
@@ -880,7 +880,7 @@ int RNA_property_array_item_index(PropertyRNA *prop, char name)
return 3;
}
}
- else if(ELEM6(subtype, PROP_TRANSLATION, PROP_DIRECTION, PROP_XYZ,
+ else if (ELEM6(subtype, PROP_TRANSLATION, PROP_DIRECTION, PROP_XYZ,
PROP_EULER, PROP_VELOCITY, PROP_ACCELERATION))
{
switch (name) {
@@ -913,142 +913,142 @@ int RNA_property_array_item_index(PropertyRNA *prop, char name)
void RNA_property_int_range(PointerRNA *ptr, PropertyRNA *prop, int *hardmin, int *hardmax)
{
- IntPropertyRNA *iprop= (IntPropertyRNA*)rna_ensure_property(prop);
+ IntPropertyRNA *iprop = (IntPropertyRNA*)rna_ensure_property(prop);
- if(prop->magic != RNA_MAGIC) {
+ if (prop->magic != RNA_MAGIC) {
/* attempt to get the local ID values */
- IDProperty *idp_ui= rna_idproperty_ui(prop);
+ IDProperty *idp_ui = rna_idproperty_ui(prop);
- if(idp_ui) {
+ if (idp_ui) {
IDProperty *item;
- item= IDP_GetPropertyTypeFromGroup(idp_ui, "min", IDP_INT);
- *hardmin= item ? IDP_Int(item) : INT_MIN;
+ item = IDP_GetPropertyTypeFromGroup(idp_ui, "min", IDP_INT);
+ *hardmin = item ? IDP_Int(item) : INT_MIN;
- item= IDP_GetPropertyTypeFromGroup(idp_ui, "max", IDP_INT);
- *hardmax= item ? IDP_Int(item) : INT_MAX;
+ item = IDP_GetPropertyTypeFromGroup(idp_ui, "max", IDP_INT);
+ *hardmax = item ? IDP_Int(item) : INT_MAX;
return;
}
}
- if(iprop->range) {
+ if (iprop->range) {
iprop->range(ptr, hardmin, hardmax);
}
else {
- *hardmin= iprop->hardmin;
- *hardmax= iprop->hardmax;
+ *hardmin = iprop->hardmin;
+ *hardmax = iprop->hardmax;
}
}
void RNA_property_int_ui_range(PointerRNA *ptr, PropertyRNA *prop, int *softmin, int *softmax, int *step)
{
- IntPropertyRNA *iprop= (IntPropertyRNA*)rna_ensure_property(prop);
+ IntPropertyRNA *iprop = (IntPropertyRNA*)rna_ensure_property(prop);
int hardmin, hardmax;
- if(prop->magic != RNA_MAGIC) {
+ if (prop->magic != RNA_MAGIC) {
/* attempt to get the local ID values */
- IDProperty *idp_ui= rna_idproperty_ui(prop);
+ IDProperty *idp_ui = rna_idproperty_ui(prop);
- if(idp_ui) {
+ if (idp_ui) {
IDProperty *item;
- item= IDP_GetPropertyTypeFromGroup(idp_ui, "soft_min", IDP_INT);
- *softmin= item ? IDP_Int(item) : INT_MIN;
+ item = IDP_GetPropertyTypeFromGroup(idp_ui, "soft_min", IDP_INT);
+ *softmin = item ? IDP_Int(item) : INT_MIN;
- item= IDP_GetPropertyTypeFromGroup(idp_ui, "soft_max", IDP_INT);
- *softmax= item ? IDP_Int(item) : INT_MAX;
+ item = IDP_GetPropertyTypeFromGroup(idp_ui, "soft_max", IDP_INT);
+ *softmax = item ? IDP_Int(item) : INT_MAX;
- item= IDP_GetPropertyTypeFromGroup(idp_ui, "step", IDP_INT);
- *step= item ? IDP_Int(item) : 1;
+ item = IDP_GetPropertyTypeFromGroup(idp_ui, "step", IDP_INT);
+ *step = item ? IDP_Int(item) : 1;
return;
}
}
- if(iprop->range) {
+ if (iprop->range) {
iprop->range(ptr, &hardmin, &hardmax);
- *softmin= MAX2(iprop->softmin, hardmin);
- *softmax= MIN2(iprop->softmax, hardmax);
+ *softmin = MAX2(iprop->softmin, hardmin);
+ *softmax = MIN2(iprop->softmax, hardmax);
}
else {
- *softmin= iprop->softmin;
- *softmax= iprop->softmax;
+ *softmin = iprop->softmin;
+ *softmax = iprop->softmax;
}
- *step= iprop->step;
+ *step = iprop->step;
}
void RNA_property_float_range(PointerRNA *ptr, PropertyRNA *prop, float *hardmin, float *hardmax)
{
- FloatPropertyRNA *fprop= (FloatPropertyRNA*)rna_ensure_property(prop);
+ FloatPropertyRNA *fprop = (FloatPropertyRNA*)rna_ensure_property(prop);
- if(prop->magic != RNA_MAGIC) {
+ if (prop->magic != RNA_MAGIC) {
/* attempt to get the local ID values */
- IDProperty *idp_ui= rna_idproperty_ui(prop);
+ IDProperty *idp_ui = rna_idproperty_ui(prop);
- if(idp_ui) {
+ if (idp_ui) {
IDProperty *item;
- item= IDP_GetPropertyTypeFromGroup(idp_ui, "min", IDP_DOUBLE);
- *hardmin= item ? (float)IDP_Double(item) : FLT_MIN;
+ item = IDP_GetPropertyTypeFromGroup(idp_ui, "min", IDP_DOUBLE);
+ *hardmin = item ? (float)IDP_Double(item) : FLT_MIN;
- item= IDP_GetPropertyTypeFromGroup(idp_ui, "max", IDP_DOUBLE);
- *hardmax= item ? (float)IDP_Double(item) : FLT_MAX;
+ item = IDP_GetPropertyTypeFromGroup(idp_ui, "max", IDP_DOUBLE);
+ *hardmax = item ? (float)IDP_Double(item) : FLT_MAX;
return;
}
}
- if(fprop->range) {
+ if (fprop->range) {
fprop->range(ptr, hardmin, hardmax);
}
else {
- *hardmin= fprop->hardmin;
- *hardmax= fprop->hardmax;
+ *hardmin = fprop->hardmin;
+ *hardmax = fprop->hardmax;
}
}
void RNA_property_float_ui_range(PointerRNA *ptr, PropertyRNA *prop, float *softmin, float *softmax, float *step, float *precision)
{
- FloatPropertyRNA *fprop= (FloatPropertyRNA*)rna_ensure_property(prop);
+ FloatPropertyRNA *fprop = (FloatPropertyRNA*)rna_ensure_property(prop);
float hardmin, hardmax;
- if(prop->magic != RNA_MAGIC) {
+ if (prop->magic != RNA_MAGIC) {
/* attempt to get the local ID values */
- IDProperty *idp_ui= rna_idproperty_ui(prop);
+ IDProperty *idp_ui = rna_idproperty_ui(prop);
- if(idp_ui) {
+ if (idp_ui) {
IDProperty *item;
- item= IDP_GetPropertyTypeFromGroup(idp_ui, "soft_min", IDP_DOUBLE);
- *softmin= item ? (float)IDP_Double(item) : FLT_MIN;
+ item = IDP_GetPropertyTypeFromGroup(idp_ui, "soft_min", IDP_DOUBLE);
+ *softmin = item ? (float)IDP_Double(item) : FLT_MIN;
- item= IDP_GetPropertyTypeFromGroup(idp_ui, "soft_max", IDP_DOUBLE);
- *softmax= item ? (float)IDP_Double(item) : FLT_MAX;
+ item = IDP_GetPropertyTypeFromGroup(idp_ui, "soft_max", IDP_DOUBLE);
+ *softmax = item ? (float)IDP_Double(item) : FLT_MAX;
- item= IDP_GetPropertyTypeFromGroup(idp_ui, "step", IDP_DOUBLE);
- *step= item ? (float)IDP_Double(item) : 1.0f;
+ item = IDP_GetPropertyTypeFromGroup(idp_ui, "step", IDP_DOUBLE);
+ *step = item ? (float)IDP_Double(item) : 1.0f;
- item= IDP_GetPropertyTypeFromGroup(idp_ui, "precision", IDP_DOUBLE);
- *precision= item ? (float)IDP_Double(item) : 3.0f;
+ item = IDP_GetPropertyTypeFromGroup(idp_ui, "precision", IDP_DOUBLE);
+ *precision = item ? (float)IDP_Double(item) : 3.0f;
return;
}
}
- if(fprop->range) {
+ if (fprop->range) {
fprop->range(ptr, &hardmin, &hardmax);
- *softmin= MAX2(fprop->softmin, hardmin);
- *softmax= MIN2(fprop->softmax, hardmax);
+ *softmin = MAX2(fprop->softmin, hardmin);
+ *softmax = MIN2(fprop->softmax, hardmax);
}
else {
- *softmin= fprop->softmin;
- *softmax= fprop->softmax;
+ *softmin = fprop->softmin;
+ *softmax = fprop->softmax;
}
- *step= fprop->step;
- *precision= (float)fprop->precision;
+ *step = fprop->step;
+ *precision = (float)fprop->precision;
}
int RNA_property_float_clamp(PointerRNA *ptr, PropertyRNA *prop, float *value)
@@ -1057,12 +1057,12 @@ int RNA_property_float_clamp(PointerRNA *ptr, PropertyRNA *prop, float *value)
RNA_property_float_range(ptr, prop, &min, &max);
- if(*value < min) {
- *value= min;
+ if (*value < min) {
+ *value = min;
return -1;
}
- else if(*value > max) {
- *value= max;
+ else if (*value > max) {
+ *value = max;
return 1;
}
else {
@@ -1076,12 +1076,12 @@ int RNA_property_int_clamp(PointerRNA *ptr, PropertyRNA *prop, int *value)
RNA_property_int_range(ptr, prop, &min, &max);
- if(*value < min) {
- *value= min;
+ if (*value < min) {
+ *value = min;
return -1;
}
- else if(*value > max) {
- *value= max;
+ else if (*value > max) {
+ *value = max;
return 1;
}
else {
@@ -1093,26 +1093,26 @@ int RNA_property_int_clamp(PointerRNA *ptr, PropertyRNA *prop, int *value)
* '0' used when their is no maximum */
int RNA_property_string_maxlength(PropertyRNA *prop)
{
- StringPropertyRNA *sprop= (StringPropertyRNA*)rna_ensure_property(prop);
+ StringPropertyRNA *sprop = (StringPropertyRNA*)rna_ensure_property(prop);
return sprop->maxlength;
}
StructRNA *RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop)
{
- prop= rna_ensure_property(prop);
+ prop = rna_ensure_property(prop);
- if(prop->type == PROP_POINTER) {
- PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop;
+ if (prop->type == PROP_POINTER) {
+ PointerPropertyRNA *pprop = (PointerPropertyRNA*)prop;
- if(pprop->typef)
+ if (pprop->typef)
return pprop->typef(ptr);
- else if(pprop->type)
+ else if (pprop->type)
return pprop->type;
}
- else if(prop->type == PROP_COLLECTION) {
- CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop;
+ else if (prop->type == PROP_COLLECTION) {
+ CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)prop;
- if(cprop->item_type)
+ if (cprop->item_type)
return cprop->item_type;
}
/* ignore other types, RNA_struct_find_nested calls with unchecked props */
@@ -1122,11 +1122,11 @@ StructRNA *RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop)
int RNA_property_pointer_poll(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *value)
{
- prop= rna_ensure_property(prop);
+ prop = rna_ensure_property(prop);
- if(prop->type == PROP_POINTER) {
- PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop;
- if(pprop->poll)
+ if (prop->type == PROP_POINTER) {
+ PointerPropertyRNA *pprop = (PointerPropertyRNA*)prop;
+ if (pprop->poll)
return pprop->poll(ptr, *value);
return 1;
@@ -1149,31 +1149,31 @@ EnumPropertyItem DummyRNA_DEFAULT_items[] = {
void RNA_property_enum_items(bContext *C, PointerRNA *ptr, PropertyRNA *prop, EnumPropertyItem **item, int *totitem, int *free)
{
- EnumPropertyRNA *eprop= (EnumPropertyRNA*)rna_ensure_property(prop);
+ EnumPropertyRNA *eprop = (EnumPropertyRNA*)rna_ensure_property(prop);
- *free= 0;
+ *free = 0;
- if(eprop->itemf && (C != NULL || (prop->flag & PROP_ENUM_NO_CONTEXT))) {
- int tot= 0;
+ if (eprop->itemf && (C != NULL || (prop->flag & PROP_ENUM_NO_CONTEXT))) {
+ int tot = 0;
if (prop->flag & PROP_ENUM_NO_CONTEXT)
- *item= eprop->itemf(NULL, ptr, prop, free);
+ *item = eprop->itemf(NULL, ptr, prop, free);
else
- *item= eprop->itemf(C, ptr, prop, free);
+ *item = eprop->itemf(C, ptr, prop, free);
- if(totitem) {
- if(*item) {
- for( ; (*item)[tot].identifier; tot++);
+ if (totitem) {
+ if (*item) {
+ for ( ; (*item)[tot].identifier; tot++);
}
- *totitem= tot;
+ *totitem = tot;
}
}
else {
- *item= eprop->item;
- if(totitem)
- *totitem= eprop->totitem;
+ *item = eprop->item;
+ if (totitem)
+ *totitem = eprop->totitem;
}
}
@@ -1182,67 +1182,67 @@ void RNA_property_enum_items_gettexted(bContext *C, PointerRNA *ptr, PropertyRNA
RNA_property_enum_items(C, ptr, prop, item, totitem, free);
#ifdef WITH_INTERNATIONAL
- if(BLF_translate_iface()) {
+ if (BLF_translate_iface()) {
int i;
EnumPropertyItem *nitem;
- if(*free) {
- nitem= *item;
+ if (*free) {
+ nitem = *item;
} else {
- int totitem= 0;
+ int totitem = 0;
/* count */
- for(i=0; (*item)[i].identifier; i++)
+ for (i = 0; (*item)[i].identifier; i++)
totitem++;
- nitem= MEM_callocN(sizeof(EnumPropertyItem)*(totitem+1), "enum_items_gettexted");
+ nitem = MEM_callocN(sizeof(EnumPropertyItem)*(totitem+1), "enum_items_gettexted");
- for(i=0; (*item)[i].identifier; i++)
- nitem[i]= (*item)[i];
+ for (i = 0; (*item)[i].identifier; i++)
+ nitem[i] = (*item)[i];
- *free= 1;
+ *free = 1;
}
- for(i=0; nitem[i].identifier; i++) {
- if( nitem[i].name ) {
- if(prop->translation_context)
+ for (i = 0; nitem[i].identifier; i++) {
+ if ( nitem[i].name ) {
+ if (prop->translation_context)
nitem[i].name = BLF_pgettext(prop->translation_context, nitem[i].name);
else
nitem[i].name = BLF_gettext(nitem[i].name);
}
- if( nitem[i].description )
+ if ( nitem[i].description )
nitem[i].description = BLF_gettext(nitem[i].description);
}
- *item= nitem;
+ *item = nitem;
}
#endif
}
int RNA_property_enum_value(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const char *identifier, int *value)
-{
+{
EnumPropertyItem *item, *item_array;
int free, found;
RNA_property_enum_items(C, ptr, prop, &item_array, NULL, &free);
- if(item_array) {
- for(item= item_array; item->identifier; item++) {
- if(item->identifier[0] && strcmp(item->identifier, identifier)==0) {
+ if (item_array) {
+ for (item = item_array; item->identifier; item++) {
+ if (item->identifier[0] && strcmp(item->identifier, identifier) == 0) {
*value = item->value;
break;
}
}
- found= (item->identifier != NULL); /* could be alloc'd, assign before free */
+ found = (item->identifier != NULL); /* could be alloc'd, assign before free */
- if(free) {
+ if (free) {
MEM_freeN(item_array);
}
}
else {
- found= 0;
+ found = 0;
}
return found;
}
@@ -1250,7 +1250,7 @@ int RNA_property_enum_value(bContext *C, PointerRNA *ptr, PropertyRNA *prop, con
int RNA_enum_identifier(EnumPropertyItem *item, const int value, const char **identifier)
{
for (; item->identifier; item++) {
- if(item->identifier[0] && item->value==value) {
+ if (item->identifier[0] && item->value == value) {
*identifier = item->identifier;
return 1;
}
@@ -1260,20 +1260,20 @@ int RNA_enum_identifier(EnumPropertyItem *item, const int value, const char **id
int RNA_enum_bitflag_identifiers(EnumPropertyItem *item, const int value, const char **identifier)
{
- int index= 0;
+ int index = 0;
for (; item->identifier; item++) {
- if(item->identifier[0] && item->value & value) {
+ if (item->identifier[0] && item->value & value) {
identifier[index++] = item->identifier;
}
}
- identifier[index]= NULL;
+ identifier[index] = NULL;
return index;
}
int RNA_enum_name(EnumPropertyItem *item, const int value, const char **name)
{
for (; item->identifier; item++) {
- if(item->identifier[0] && item->value==value) {
+ if (item->identifier[0] && item->value == value) {
*name = item->name;
return 1;
}
@@ -1284,7 +1284,7 @@ int RNA_enum_name(EnumPropertyItem *item, const int value, const char **name)
int RNA_enum_description(EnumPropertyItem *item, const int value, const char **description)
{
for (; item->identifier; item++) {
- if(item->identifier[0] && item->value==value) {
+ if (item->identifier[0] && item->value == value) {
*description = item->description;
return 1;
}
@@ -1293,14 +1293,14 @@ int RNA_enum_description(EnumPropertyItem *item, const int value, const char **d
}
int RNA_property_enum_identifier(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **identifier)
-{
- EnumPropertyItem *item= NULL;
+{
+ EnumPropertyItem *item = NULL;
int result, free;
RNA_property_enum_items(C, ptr, prop, &item, NULL, &free);
- if(item) {
- result= RNA_enum_identifier(item, value, identifier);
- if(free)
+ if (item) {
+ result = RNA_enum_identifier(item, value, identifier);
+ if (free)
MEM_freeN(item);
return result;
@@ -1309,14 +1309,14 @@ int RNA_property_enum_identifier(bContext *C, PointerRNA *ptr, PropertyRNA *prop
}
int RNA_property_enum_name(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **name)
-{
- EnumPropertyItem *item= NULL;
+{
+ EnumPropertyItem *item = NULL;
int result, free;
RNA_property_enum_items(C, ptr, prop, &item, NULL, &free);
- if(item) {
- result= RNA_enum_name(item, value, name);
- if(free)
+ if (item) {
+ result = RNA_enum_name(item, value, name);
+ if (free)
MEM_freeN(item);
return result;
@@ -1326,13 +1326,13 @@ int RNA_property_enum_name(bContext *C, PointerRNA *ptr, PropertyRNA *prop, cons
int RNA_property_enum_bitflag_identifiers(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **identifier)
{
- EnumPropertyItem *item= NULL;
+ EnumPropertyItem *item = NULL;
int result, free;
RNA_property_enum_items(C, ptr, prop, &item, NULL, &free);
- if(item) {
- result= RNA_enum_bitflag_identifiers(item, value, identifier);
- if(free)
+ if (item) {
+ result = RNA_enum_bitflag_identifiers(item, value, identifier);
+ if (free)
MEM_freeN(item);
return result;
@@ -1357,11 +1357,11 @@ int RNA_property_ui_icon(PropertyRNA *prop)
int RNA_property_editable(PointerRNA *ptr, PropertyRNA *prop)
{
- ID *id= ptr->id.data;
+ ID *id = ptr->id.data;
int flag;
- prop= rna_ensure_property(prop);
- flag= prop->editable ? prop->editable(ptr) : prop->flag;
+ prop = rna_ensure_property(prop);
+ flag = prop->editable ? prop->editable(ptr) : prop->flag;
return (flag & PROP_EDITABLE) && (!id || !id->lib || (prop->flag & PROP_LIB_EXCEPTION));
}
@@ -1369,8 +1369,8 @@ int RNA_property_editable_flag(PointerRNA *ptr, PropertyRNA *prop)
{
int flag;
- prop= rna_ensure_property(prop);
- flag= prop->editable ? prop->editable(ptr) : prop->flag;
+ prop = rna_ensure_property(prop);
+ flag = prop->editable ? prop->editable(ptr) : prop->flag;
return (flag & PROP_EDITABLE);
}
@@ -1380,17 +1380,17 @@ int RNA_property_editable_index(PointerRNA *ptr, PropertyRNA *prop, int index)
ID *id;
int flag;
- prop= rna_ensure_property(prop);
+ prop = rna_ensure_property(prop);
- flag= prop->flag;
+ flag = prop->flag;
- if(prop->editable)
+ if (prop->editable)
flag &= prop->editable(ptr);
if (prop->itemeditable)
flag &= prop->itemeditable(ptr, index);
- id= ptr->id.data;
+ id = ptr->id.data;
return (flag & PROP_EDITABLE) && (!id || !id->lib || (prop->flag & PROP_LIB_EXCEPTION));
}
@@ -1401,9 +1401,9 @@ int RNA_property_animateable(PointerRNA *ptr, PropertyRNA *prop)
if (!id_type_can_have_animdata(ptr->id.data))
return 0;
- prop= rna_ensure_property(prop);
+ prop = rna_ensure_property(prop);
- if(!(prop->flag & PROP_ANIMATABLE))
+ if (!(prop->flag & PROP_ANIMATABLE))
return 0;
return (prop->flag & PROP_EDITABLE);
@@ -1421,17 +1421,17 @@ int RNA_property_animated(PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop))
* 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;
+ char *path = RNA_path_from_ID_to_property(ptr, prop);
+ int ret = 0;
- if(path) {
+ 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);
+ ret = (prop == r_prop);
MEM_freeN(path);
}
@@ -1442,15 +1442,15 @@ int RNA_property_path_from_ID_check(PointerRNA *ptr, PropertyRNA *prop)
static void rna_property_update(bContext *C, Main *bmain, Scene *scene, PointerRNA *ptr, PropertyRNA *prop)
{
int is_rna = (prop->magic == RNA_MAGIC);
- prop= rna_ensure_property(prop);
+ prop = rna_ensure_property(prop);
- if(is_rna) {
- if(prop->update) {
+ if (is_rna) {
+ if (prop->update) {
/* ideally no context would be needed for update, but there's some
parts of the code that need it still, so we have this exception */
- if(prop->flag & PROP_CONTEXT_UPDATE) {
- if(C) {
- if(prop->flag & PROP_CONTEXT_PROPERTY_UPDATE) {
+ if (prop->flag & PROP_CONTEXT_UPDATE) {
+ if (C) {
+ if (prop->flag & PROP_CONTEXT_PROPERTY_UPDATE) {
((ContextPropUpdateFunc)prop->update)(C, ptr, prop);
}
else {
@@ -1461,11 +1461,11 @@ static void rna_property_update(bContext *C, Main *bmain, Scene *scene, PointerR
else
prop->update(bmain, scene, ptr);
}
- if(prop->noteflag)
+ if (prop->noteflag)
WM_main_add_notifier(prop->noteflag, ptr->id.data);
}
- if(!is_rna || (prop->flag & PROP_IDPROPERTY)) {
+ if (!is_rna || (prop->flag & PROP_IDPROPERTY)) {
/* WARNING! This is so property drivers update the display!
* not especially nice */
DAG_id_tag_update(ptr->id.data, OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME);
@@ -1530,7 +1530,7 @@ void RNA_property_update_cache_add(PointerRNA *ptr, PropertyRNA *prop)
if (ELEM(NULL, ptr, prop))
return;
- prop= rna_ensure_property(prop);
+ prop = rna_ensure_property(prop);
/* we can only handle update calls with no context args for now (makes animsys updates easier) */
if ((is_rna == 0) || (prop->update == NULL) || (prop->flag & PROP_CONTEXT_UPDATE))
@@ -1568,7 +1568,7 @@ void RNA_property_update_cache_flush(Main *bmain, Scene *scene)
{
tRnaUpdateCacheElem *uce;
- // TODO: should we check that bmain and scene are valid? The above stuff doesn't!
+ /* TODO: should we check that bmain and scene are valid? The above stuff doesn't! */
/* execute the cached updates */
for (uce = rna_updates_cache.first; uce; uce = uce->next) {
@@ -1602,15 +1602,15 @@ void RNA_property_update_cache_free(void)
int RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
{
- BoolPropertyRNA *bprop= (BoolPropertyRNA*)prop;
+ BoolPropertyRNA *bprop = (BoolPropertyRNA*)prop;
IDProperty *idprop;
BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN);
BLI_assert(RNA_property_array_check(prop) == 0);
- if((idprop=rna_idproperty_check(&prop, ptr)))
+ if ((idprop = rna_idproperty_check(&prop, ptr)))
return IDP_Int(idprop);
- else if(bprop->get)
+ else if (bprop->get)
return bprop->get(ptr);
else
return bprop->defaultvalue;
@@ -1618,52 +1618,52 @@ int RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, int value)
{
- BoolPropertyRNA *bprop= (BoolPropertyRNA*)prop;
+ BoolPropertyRNA *bprop = (BoolPropertyRNA*)prop;
IDProperty *idprop;
BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN);
BLI_assert(RNA_property_array_check(prop) == 0);
/* just incase other values are passed */
- if(value) value= 1;
+ if (value) value = 1;
- if((idprop=rna_idproperty_check(&prop, ptr))) {
- IDP_Int(idprop)= value;
+ if ((idprop = rna_idproperty_check(&prop, ptr))) {
+ IDP_Int(idprop) = value;
rna_idproperty_touch(idprop);
}
- else if(bprop->set)
+ else if (bprop->set)
bprop->set(ptr, value);
- else if(prop->flag & PROP_EDITABLE) {
+ else if (prop->flag & PROP_EDITABLE) {
IDPropertyTemplate val = {0};
IDProperty *group;
- val.i= value;
+ val.i = value;
- group= RNA_struct_idprops(ptr, 1);
- if(group)
+ group = RNA_struct_idprops(ptr, 1);
+ if (group)
IDP_AddToGroup(group, IDP_New(IDP_INT, &val, prop->identifier));
}
}
void RNA_property_boolean_get_array(PointerRNA *ptr, PropertyRNA *prop, int *values)
{
- BoolPropertyRNA *bprop= (BoolPropertyRNA*)prop;
+ BoolPropertyRNA *bprop = (BoolPropertyRNA*)prop;
IDProperty *idprop;
BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN);
BLI_assert(RNA_property_array_check(prop) != 0);
- if((idprop=rna_idproperty_check(&prop, ptr))) {
- if(prop->arraydimension == 0)
- values[0]= RNA_property_boolean_get(ptr, prop);
+ if ((idprop = rna_idproperty_check(&prop, ptr))) {
+ if (prop->arraydimension == 0)
+ values[0] = RNA_property_boolean_get(ptr, prop);
else
memcpy(values, IDP_Array(idprop), sizeof(int)*idprop->len);
}
- else if(prop->arraydimension == 0)
- values[0]= RNA_property_boolean_get(ptr, prop);
- else if(bprop->getarray)
+ else if (prop->arraydimension == 0)
+ values[0] = RNA_property_boolean_get(ptr, prop);
+ else if (bprop->getarray)
bprop->getarray(ptr, values);
- else if(bprop->defaultarray)
+ else if (bprop->defaultarray)
memcpy(values, bprop->defaultarray, sizeof(int)*prop->totarraylength);
else
memset(values, 0, sizeof(int)*prop->totarraylength);
@@ -1672,21 +1672,21 @@ void RNA_property_boolean_get_array(PointerRNA *ptr, PropertyRNA *prop, int *val
int RNA_property_boolean_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
{
int tmp[RNA_MAX_ARRAY_LENGTH];
- int len= rna_ensure_property_array_length(ptr, prop);
+ int len = rna_ensure_property_array_length(ptr, prop);
BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN);
BLI_assert(RNA_property_array_check(prop) != 0);
- if(len <= RNA_MAX_ARRAY_LENGTH) {
+ if (len <= RNA_MAX_ARRAY_LENGTH) {
RNA_property_boolean_get_array(ptr, prop, tmp);
return tmp[index];
}
else {
int *tmparray, value;
- tmparray= MEM_callocN(sizeof(int)*len, "RNA_property_boolean_get_index");
+ tmparray = MEM_callocN(sizeof(int)*len, "RNA_property_boolean_get_index");
RNA_property_boolean_get_array(ptr, prop, tmparray);
- value= tmparray[index];
+ value = tmparray[index];
MEM_freeN(tmparray);
return value;
@@ -1695,34 +1695,34 @@ int RNA_property_boolean_get_index(PointerRNA *ptr, PropertyRNA *prop, int index
void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *values)
{
- BoolPropertyRNA *bprop= (BoolPropertyRNA*)prop;
+ BoolPropertyRNA *bprop = (BoolPropertyRNA*)prop;
IDProperty *idprop;
BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN);
BLI_assert(RNA_property_array_check(prop) != 0);
- if((idprop=rna_idproperty_check(&prop, ptr))) {
- if(prop->arraydimension == 0)
- IDP_Int(idprop)= values[0];
+ if ((idprop = rna_idproperty_check(&prop, ptr))) {
+ if (prop->arraydimension == 0)
+ IDP_Int(idprop) = values[0];
else
memcpy(IDP_Array(idprop), values, sizeof(int)*idprop->len);
rna_idproperty_touch(idprop);
}
- else if(prop->arraydimension == 0)
+ else if (prop->arraydimension == 0)
RNA_property_boolean_set(ptr, prop, values[0]);
- else if(bprop->setarray)
+ else if (bprop->setarray)
bprop->setarray(ptr, values);
- else if(prop->flag & PROP_EDITABLE) {
+ else if (prop->flag & PROP_EDITABLE) {
IDPropertyTemplate val = {0};
IDProperty *group;
- val.array.len= prop->totarraylength;
- val.array.type= IDP_INT;
+ val.array.len = prop->totarraylength;
+ val.array.type = IDP_INT;
- group= RNA_struct_idprops(ptr, 1);
- if(group) {
- idprop= IDP_New(IDP_ARRAY, &val, prop->identifier);
+ group = RNA_struct_idprops(ptr, 1);
+ if (group) {
+ idprop = IDP_New(IDP_ARRAY, &val, prop->identifier);
IDP_AddToGroup(group, idprop);
memcpy(IDP_Array(idprop), values, sizeof(int)*idprop->len);
}
@@ -1732,22 +1732,22 @@ void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const in
void RNA_property_boolean_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, int value)
{
int tmp[RNA_MAX_ARRAY_LENGTH];
- int len= rna_ensure_property_array_length(ptr, prop);
+ int len = rna_ensure_property_array_length(ptr, prop);
BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN);
BLI_assert(RNA_property_array_check(prop) != 0);
- if(len <= RNA_MAX_ARRAY_LENGTH) {
+ if (len <= RNA_MAX_ARRAY_LENGTH) {
RNA_property_boolean_get_array(ptr, prop, tmp);
- tmp[index]= value;
+ tmp[index] = value;
RNA_property_boolean_set_array(ptr, prop, tmp);
}
else {
int *tmparray;
- tmparray= MEM_callocN(sizeof(int)*len, "RNA_property_boolean_get_index");
+ tmparray = MEM_callocN(sizeof(int)*len, "RNA_property_boolean_get_index");
RNA_property_boolean_get_array(ptr, prop, tmparray);
- tmparray[index]= value;
+ tmparray[index] = value;
RNA_property_boolean_set_array(ptr, prop, tmparray);
MEM_freeN(tmparray);
}
@@ -1755,7 +1755,7 @@ void RNA_property_boolean_set_index(PointerRNA *ptr, PropertyRNA *prop, int inde
int RNA_property_boolean_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
{
- BoolPropertyRNA *bprop= (BoolPropertyRNA*)prop;
+ BoolPropertyRNA *bprop = (BoolPropertyRNA*)prop;
BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN);
BLI_assert(RNA_property_array_check(prop) == 0);
@@ -1765,14 +1765,14 @@ int RNA_property_boolean_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
void RNA_property_boolean_get_default_array(PointerRNA *UNUSED(ptr), PropertyRNA *prop, int *values)
{
- BoolPropertyRNA *bprop= (BoolPropertyRNA*)prop;
+ BoolPropertyRNA *bprop = (BoolPropertyRNA*)prop;
BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN);
BLI_assert(RNA_property_array_check(prop) != 0);
- if(prop->arraydimension == 0)
- values[0]= bprop->defaultvalue;
- else if(bprop->defaultarray)
+ if (prop->arraydimension == 0)
+ values[0] = bprop->defaultvalue;
+ else if (bprop->defaultarray)
memcpy(values, bprop->defaultarray, sizeof(int)*prop->totarraylength);
else
memset(values, 0, sizeof(int)*prop->totarraylength);
@@ -1781,21 +1781,21 @@ void RNA_property_boolean_get_default_array(PointerRNA *UNUSED(ptr), PropertyRNA
int RNA_property_boolean_get_default_index(PointerRNA *ptr, PropertyRNA *prop, int index)
{
int tmp[RNA_MAX_ARRAY_LENGTH];
- int len= rna_ensure_property_array_length(ptr, prop);
+ int len = rna_ensure_property_array_length(ptr, prop);
BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN);
BLI_assert(RNA_property_array_check(prop) != 0);
- if(len <= RNA_MAX_ARRAY_LENGTH) {
+ if (len <= RNA_MAX_ARRAY_LENGTH) {
RNA_property_boolean_get_default_array(ptr, prop, tmp);
return tmp[index];
}
else {
int *tmparray, value;
- tmparray= MEM_callocN(sizeof(int)*len, "RNA_property_boolean_get_default_index");
+ tmparray = MEM_callocN(sizeof(int)*len, "RNA_property_boolean_get_default_index");
RNA_property_boolean_get_default_array(ptr, prop, tmparray);
- value= tmparray[index];
+ value = tmparray[index];
MEM_freeN(tmparray);
return value;
@@ -1804,15 +1804,15 @@ int RNA_property_boolean_get_default_index(PointerRNA *ptr, PropertyRNA *prop, i
int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop)
{
- IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
+ IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
IDProperty *idprop;
BLI_assert(RNA_property_type(prop) == PROP_INT);
BLI_assert(RNA_property_array_check(prop) == 0);
- if((idprop=rna_idproperty_check(&prop, ptr)))
+ if ((idprop = rna_idproperty_check(&prop, ptr)))
return IDP_Int(idprop);
- else if(iprop->get)
+ else if (iprop->get)
return iprop->get(ptr);
else
return iprop->defaultvalue;
@@ -1820,7 +1820,7 @@ int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value)
{
- IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
+ IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
IDProperty *idprop;
BLI_assert(RNA_property_type(prop) == PROP_INT);
@@ -1828,43 +1828,43 @@ void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value)
/* useful to check on bad values but set function should clamp */
/* BLI_assert(RNA_property_int_clamp(ptr, prop, &value) == 0); */
- if((idprop=rna_idproperty_check(&prop, ptr))) {
- IDP_Int(idprop)= value;
+ if ((idprop = rna_idproperty_check(&prop, ptr))) {
+ IDP_Int(idprop) = value;
rna_idproperty_touch(idprop);
}
- else if(iprop->set)
+ else if (iprop->set)
iprop->set(ptr, value);
- else if(prop->flag & PROP_EDITABLE) {
+ else if (prop->flag & PROP_EDITABLE) {
IDPropertyTemplate val = {0};
IDProperty *group;
- val.i= value;
+ val.i = value;
- group= RNA_struct_idprops(ptr, 1);
- if(group)
+ group = RNA_struct_idprops(ptr, 1);
+ if (group)
IDP_AddToGroup(group, IDP_New(IDP_INT, &val, prop->identifier));
}
}
void RNA_property_int_get_array(PointerRNA *ptr, PropertyRNA *prop, int *values)
{
- IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
+ IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
IDProperty *idprop;
BLI_assert(RNA_property_type(prop) == PROP_INT);
BLI_assert(RNA_property_array_check(prop) != 0);
- if((idprop=rna_idproperty_check(&prop, ptr))) {
- if(prop->arraydimension == 0)
- values[0]= RNA_property_int_get(ptr, prop);
+ if ((idprop = rna_idproperty_check(&prop, ptr))) {
+ if (prop->arraydimension == 0)
+ values[0] = RNA_property_int_get(ptr, prop);
else
memcpy(values, IDP_Array(idprop), sizeof(int)*idprop->len);
}
- else if(prop->arraydimension == 0)
- values[0]= RNA_property_int_get(ptr, prop);
- else if(iprop->getarray)
+ else if (prop->arraydimension == 0)
+ values[0] = RNA_property_int_get(ptr, prop);
+ else if (iprop->getarray)
iprop->getarray(ptr, values);
- else if(iprop->defaultarray)
+ else if (iprop->defaultarray)
memcpy(values, iprop->defaultarray, sizeof(int)*prop->totarraylength);
else
memset(values, 0, sizeof(int)*prop->totarraylength);
@@ -1872,36 +1872,36 @@ void RNA_property_int_get_array(PointerRNA *ptr, PropertyRNA *prop, int *values)
void RNA_property_int_get_array_range(PointerRNA *ptr, PropertyRNA *prop, int values[2])
{
- const int array_len= RNA_property_array_length(ptr, prop);
+ const int array_len = RNA_property_array_length(ptr, prop);
- if(array_len <= 0) {
- values[0]= 0;
- values[1]= 0;
+ if (array_len <= 0) {
+ values[0] = 0;
+ values[1] = 0;
}
else if (array_len == 1) {
RNA_property_int_get_array(ptr, prop, values);
- values[1]= values[0];
+ values[1] = values[0];
}
else {
int arr_stack[32];
int *arr;
int i;
- if(array_len > 32) {
- arr= MEM_mallocN(sizeof(int) * array_len, "RNA_property_int_get_array_range");
+ if (array_len > 32) {
+ arr = MEM_mallocN(sizeof(int) * array_len, "RNA_property_int_get_array_range");
}
else {
- arr= arr_stack;
+ arr = arr_stack;
}
RNA_property_int_get_array(ptr, prop, arr);
- values[0]= values[1]= arr[0];
- for(i= 1; i < array_len; i++) {
- values[0]= MIN2(values[0], arr[i]);
- values[1]= MAX2(values[1], arr[i]);
+ values[0] = values[1] = arr[0];
+ for (i = 1; i < array_len; i++) {
+ values[0] = MIN2(values[0], arr[i]);
+ values[1] = MAX2(values[1], arr[i]);
}
- if(arr != arr_stack) {
+ if (arr != arr_stack) {
MEM_freeN(arr);
}
}
@@ -1910,21 +1910,21 @@ void RNA_property_int_get_array_range(PointerRNA *ptr, PropertyRNA *prop, int va
int RNA_property_int_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
{
int tmp[RNA_MAX_ARRAY_LENGTH];
- int len= rna_ensure_property_array_length(ptr, prop);
+ int len = rna_ensure_property_array_length(ptr, prop);
BLI_assert(RNA_property_type(prop) == PROP_INT);
BLI_assert(RNA_property_array_check(prop) != 0);
- if(len <= RNA_MAX_ARRAY_LENGTH) {
+ if (len <= RNA_MAX_ARRAY_LENGTH) {
RNA_property_int_get_array(ptr, prop, tmp);
return tmp[index];
}
else {
int *tmparray, value;
- tmparray= MEM_callocN(sizeof(int)*len, "RNA_property_int_get_index");
+ tmparray = MEM_callocN(sizeof(int)*len, "RNA_property_int_get_index");
RNA_property_int_get_array(ptr, prop, tmparray);
- value= tmparray[index];
+ value = tmparray[index];
MEM_freeN(tmparray);
return value;
@@ -1933,34 +1933,34 @@ int RNA_property_int_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
void RNA_property_int_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *values)
{
- IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
+ IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
IDProperty *idprop;
BLI_assert(RNA_property_type(prop) == PROP_INT);
BLI_assert(RNA_property_array_check(prop) != 0);
- if((idprop=rna_idproperty_check(&prop, ptr))) {
- if(prop->arraydimension == 0)
- IDP_Int(idprop)= values[0];
+ if ((idprop = rna_idproperty_check(&prop, ptr))) {
+ if (prop->arraydimension == 0)
+ IDP_Int(idprop) = values[0];
else
memcpy(IDP_Array(idprop), values, sizeof(int)*idprop->len);
rna_idproperty_touch(idprop);
}
- else if(prop->arraydimension == 0)
+ else if (prop->arraydimension == 0)
RNA_property_int_set(ptr, prop, values[0]);
- else if(iprop->setarray)
+ else if (iprop->setarray)
iprop->setarray(ptr, values);
- else if(prop->flag & PROP_EDITABLE) {
+ else if (prop->flag & PROP_EDITABLE) {
IDPropertyTemplate val = {0};
IDProperty *group;
- val.array.len= prop->totarraylength;
- val.array.type= IDP_INT;
+ val.array.len = prop->totarraylength;
+ val.array.type = IDP_INT;
- group= RNA_struct_idprops(ptr, 1);
- if(group) {
- idprop= IDP_New(IDP_ARRAY, &val, prop->identifier);
+ group = RNA_struct_idprops(ptr, 1);
+ if (group) {
+ idprop = IDP_New(IDP_ARRAY, &val, prop->identifier);
IDP_AddToGroup(group, idprop);
memcpy(IDP_Array(idprop), values, sizeof(int)*idprop->len);
}
@@ -1970,22 +1970,22 @@ void RNA_property_int_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *v
void RNA_property_int_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, int value)
{
int tmp[RNA_MAX_ARRAY_LENGTH];
- int len= rna_ensure_property_array_length(ptr, prop);
+ int len = rna_ensure_property_array_length(ptr, prop);
BLI_assert(RNA_property_type(prop) == PROP_INT);
BLI_assert(RNA_property_array_check(prop) != 0);
- if(len <= RNA_MAX_ARRAY_LENGTH) {
+ if (len <= RNA_MAX_ARRAY_LENGTH) {
RNA_property_int_get_array(ptr, prop, tmp);
- tmp[index]= value;
+ tmp[index] = value;
RNA_property_int_set_array(ptr, prop, tmp);
}
else {
int *tmparray;
- tmparray= MEM_callocN(sizeof(int)*len, "RNA_property_int_get_index");
+ tmparray = MEM_callocN(sizeof(int)*len, "RNA_property_int_get_index");
RNA_property_int_get_array(ptr, prop, tmparray);
- tmparray[index]= value;
+ tmparray[index] = value;
RNA_property_int_set_array(ptr, prop, tmparray);
MEM_freeN(tmparray);
}
@@ -1993,20 +1993,20 @@ void RNA_property_int_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, i
int RNA_property_int_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
{
- IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
+ IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
return iprop->defaultvalue;
}
void RNA_property_int_get_default_array(PointerRNA *UNUSED(ptr), PropertyRNA *prop, int *values)
{
- IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
+ IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
BLI_assert(RNA_property_type(prop) == PROP_INT);
BLI_assert(RNA_property_array_check(prop) != 0);
- if(prop->arraydimension == 0)
- values[0]= iprop->defaultvalue;
- else if(iprop->defaultarray)
+ if (prop->arraydimension == 0)
+ values[0] = iprop->defaultvalue;
+ else if (iprop->defaultarray)
memcpy(values, iprop->defaultarray, sizeof(int)*prop->totarraylength);
else
memset(values, 0, sizeof(int)*prop->totarraylength);
@@ -2015,18 +2015,18 @@ void RNA_property_int_get_default_array(PointerRNA *UNUSED(ptr), PropertyRNA *pr
int RNA_property_int_get_default_index(PointerRNA *ptr, PropertyRNA *prop, int index)
{
int tmp[RNA_MAX_ARRAY_LENGTH];
- int len= rna_ensure_property_array_length(ptr, prop);
+ int len = rna_ensure_property_array_length(ptr, prop);
- if(len <= RNA_MAX_ARRAY_LENGTH) {
+ if (len <= RNA_MAX_ARRAY_LENGTH) {
RNA_property_int_get_default_array(ptr, prop, tmp);
return tmp[index];
}
else {
int *tmparray, value;
- tmparray= MEM_callocN(sizeof(int)*len, "RNA_property_int_get_default_index");
+ tmparray = MEM_callocN(sizeof(int)*len, "RNA_property_int_get_default_index");
RNA_property_int_get_default_array(ptr, prop, tmparray);
- value= tmparray[index];
+ value = tmparray[index];
MEM_freeN(tmparray);
return value;
@@ -2035,19 +2035,19 @@ int RNA_property_int_get_default_index(PointerRNA *ptr, PropertyRNA *prop, int i
float RNA_property_float_get(PointerRNA *ptr, PropertyRNA *prop)
{
- FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
+ FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
IDProperty *idprop;
BLI_assert(RNA_property_type(prop) == PROP_FLOAT);
BLI_assert(RNA_property_array_check(prop) == 0);
- if((idprop=rna_idproperty_check(&prop, ptr))) {
- if(idprop->type == IDP_FLOAT)
+ if ((idprop = rna_idproperty_check(&prop, ptr))) {
+ if (idprop->type == IDP_FLOAT)
return IDP_Float(idprop);
else
return (float)IDP_Double(idprop);
}
- else if(fprop->get)
+ else if (fprop->get)
return fprop->get(ptr);
else
return fprop->defaultvalue;
@@ -2055,7 +2055,7 @@ float RNA_property_float_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value)
{
- FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
+ FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
IDProperty *idprop;
BLI_assert(RNA_property_type(prop) == PROP_FLOAT);
@@ -2063,54 +2063,54 @@ void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value)
/* useful to check on bad values but set function should clamp */
/* BLI_assert(RNA_property_float_clamp(ptr, prop, &value) == 0); */
- if((idprop=rna_idproperty_check(&prop, ptr))) {
- if(idprop->type == IDP_FLOAT)
- IDP_Float(idprop)= value;
+ if ((idprop = rna_idproperty_check(&prop, ptr))) {
+ if (idprop->type == IDP_FLOAT)
+ IDP_Float(idprop) = value;
else
- IDP_Double(idprop)= value;
+ IDP_Double(idprop) = value;
rna_idproperty_touch(idprop);
}
- else if(fprop->set) {
+ else if (fprop->set) {
fprop->set(ptr, value);
}
- else if(prop->flag & PROP_EDITABLE) {
+ else if (prop->flag & PROP_EDITABLE) {
IDPropertyTemplate val = {0};
IDProperty *group;
- val.f= value;
+ val.f = value;
- group= RNA_struct_idprops(ptr, 1);
- if(group)
+ group = RNA_struct_idprops(ptr, 1);
+ if (group)
IDP_AddToGroup(group, IDP_New(IDP_FLOAT, &val, prop->identifier));
}
}
void RNA_property_float_get_array(PointerRNA *ptr, PropertyRNA *prop, float *values)
{
- FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
+ FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
IDProperty *idprop;
int i;
BLI_assert(RNA_property_type(prop) == PROP_FLOAT);
BLI_assert(RNA_property_array_check(prop) != 0);
- if((idprop=rna_idproperty_check(&prop, ptr))) {
- if(prop->arraydimension == 0)
- values[0]= RNA_property_float_get(ptr, prop);
- else if(idprop->subtype == IDP_FLOAT) {
+ if ((idprop = rna_idproperty_check(&prop, ptr))) {
+ if (prop->arraydimension == 0)
+ values[0] = RNA_property_float_get(ptr, prop);
+ else if (idprop->subtype == IDP_FLOAT) {
memcpy(values, IDP_Array(idprop), sizeof(float)*idprop->len);
}
else {
- for(i=0; i<idprop->len; i++)
- values[i]= (float)(((double*)IDP_Array(idprop))[i]);
+ for (i = 0; i<idprop->len; i++)
+ values[i] = (float)(((double*)IDP_Array(idprop))[i]);
}
}
- else if(prop->arraydimension == 0)
- values[0]= RNA_property_float_get(ptr, prop);
- else if(fprop->getarray)
+ else if (prop->arraydimension == 0)
+ values[0] = RNA_property_float_get(ptr, prop);
+ else if (fprop->getarray)
fprop->getarray(ptr, values);
- else if(fprop->defaultarray)
+ else if (fprop->defaultarray)
memcpy(values, fprop->defaultarray, sizeof(float)*prop->totarraylength);
else
memset(values, 0, sizeof(float)*prop->totarraylength);
@@ -2118,36 +2118,36 @@ void RNA_property_float_get_array(PointerRNA *ptr, PropertyRNA *prop, float *val
void RNA_property_float_get_array_range(PointerRNA *ptr, PropertyRNA *prop, float values[2])
{
- const int array_len= RNA_property_array_length(ptr, prop);
+ const int array_len = RNA_property_array_length(ptr, prop);
- if(array_len <= 0) {
- values[0]= 0.0f;
- values[1]= 0.0f;
+ if (array_len <= 0) {
+ values[0] = 0.0f;
+ values[1] = 0.0f;
}
else if (array_len == 1) {
RNA_property_float_get_array(ptr, prop, values);
- values[1]= values[0];
+ values[1] = values[0];
}
else {
float arr_stack[32];
float *arr;
int i;
- if(array_len > 32) {
- arr= MEM_mallocN(sizeof(float) * array_len, "RNA_property_float_get_array_range");
+ if (array_len > 32) {
+ arr = MEM_mallocN(sizeof(float) * array_len, "RNA_property_float_get_array_range");
}
else {
- arr= arr_stack;
+ arr = arr_stack;
}
RNA_property_float_get_array(ptr, prop, arr);
- values[0]= values[1]= arr[0];
- for(i= 1; i < array_len; i++) {
- values[0]= MIN2(values[0], arr[i]);
- values[1]= MAX2(values[1], arr[i]);
+ values[0] = values[1] = arr[0];
+ for (i = 1; i < array_len; i++) {
+ values[0] = MIN2(values[0], arr[i]);
+ values[1] = MAX2(values[1], arr[i]);
}
- if(arr != arr_stack) {
+ if (arr != arr_stack) {
MEM_freeN(arr);
}
}
@@ -2156,21 +2156,21 @@ void RNA_property_float_get_array_range(PointerRNA *ptr, PropertyRNA *prop, floa
float RNA_property_float_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
{
float tmp[RNA_MAX_ARRAY_LENGTH];
- int len= rna_ensure_property_array_length(ptr, prop);
+ int len = rna_ensure_property_array_length(ptr, prop);
BLI_assert(RNA_property_type(prop) == PROP_FLOAT);
BLI_assert(RNA_property_array_check(prop) != 0);
- if(len <= RNA_MAX_ARRAY_LENGTH) {
+ if (len <= RNA_MAX_ARRAY_LENGTH) {
RNA_property_float_get_array(ptr, prop, tmp);
return tmp[index];
}
else {
float *tmparray, value;
- tmparray= MEM_callocN(sizeof(float)*len, "RNA_property_float_get_index");
+ tmparray = MEM_callocN(sizeof(float)*len, "RNA_property_float_get_index");
RNA_property_float_get_array(ptr, prop, tmparray);
- value= tmparray[index];
+ value = tmparray[index];
MEM_freeN(tmparray);
return value;
@@ -2180,45 +2180,45 @@ float RNA_property_float_get_index(PointerRNA *ptr, PropertyRNA *prop, int index
void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const float *values)
{
- FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
+ FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
IDProperty *idprop;
int i;
BLI_assert(RNA_property_type(prop) == PROP_FLOAT);
BLI_assert(RNA_property_array_check(prop) != 0);
- if((idprop=rna_idproperty_check(&prop, ptr))) {
- if(prop->arraydimension == 0) {
- if(idprop->type == IDP_FLOAT)
- IDP_Float(idprop)= values[0];
+ if ((idprop = rna_idproperty_check(&prop, ptr))) {
+ if (prop->arraydimension == 0) {
+ if (idprop->type == IDP_FLOAT)
+ IDP_Float(idprop) = values[0];
else
- IDP_Double(idprop)= values[0];
+ IDP_Double(idprop) = values[0];
}
- else if(idprop->subtype == IDP_FLOAT) {
+ else if (idprop->subtype == IDP_FLOAT) {
memcpy(IDP_Array(idprop), values, sizeof(float)*idprop->len);
}
else {
- for(i=0; i<idprop->len; i++)
- ((double*)IDP_Array(idprop))[i]= values[i];
+ for (i = 0; i<idprop->len; i++)
+ ((double*)IDP_Array(idprop))[i] = values[i];
}
rna_idproperty_touch(idprop);
}
- else if(prop->arraydimension == 0)
+ else if (prop->arraydimension == 0)
RNA_property_float_set(ptr, prop, values[0]);
- else if(fprop->setarray) {
+ else if (fprop->setarray) {
fprop->setarray(ptr, values);
}
- else if(prop->flag & PROP_EDITABLE) {
+ else if (prop->flag & PROP_EDITABLE) {
IDPropertyTemplate val = {0};
IDProperty *group;
- val.array.len= prop->totarraylength;
- val.array.type= IDP_FLOAT;
+ val.array.len = prop->totarraylength;
+ val.array.type = IDP_FLOAT;
- group= RNA_struct_idprops(ptr, 1);
- if(group) {
- idprop= IDP_New(IDP_ARRAY, &val, prop->identifier);
+ group = RNA_struct_idprops(ptr, 1);
+ if (group) {
+ idprop = IDP_New(IDP_ARRAY, &val, prop->identifier);
IDP_AddToGroup(group, idprop);
memcpy(IDP_Array(idprop), values, sizeof(float)*idprop->len);
}
@@ -2228,22 +2228,22 @@ void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const floa
void RNA_property_float_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, float value)
{
float tmp[RNA_MAX_ARRAY_LENGTH];
- int len= rna_ensure_property_array_length(ptr, prop);
+ int len = rna_ensure_property_array_length(ptr, prop);
BLI_assert(RNA_property_type(prop) == PROP_FLOAT);
BLI_assert(RNA_property_array_check(prop) != 0);
- if(len <= RNA_MAX_ARRAY_LENGTH) {
+ if (len <= RNA_MAX_ARRAY_LENGTH) {
RNA_property_float_get_array(ptr, prop, tmp);
- tmp[index]= value;
+ tmp[index] = value;
RNA_property_float_set_array(ptr, prop, tmp);
}
else {
float *tmparray;
- tmparray= MEM_callocN(sizeof(float)*len, "RNA_property_float_get_index");
+ tmparray = MEM_callocN(sizeof(float)*len, "RNA_property_float_get_index");
RNA_property_float_get_array(ptr, prop, tmparray);
- tmparray[index]= value;
+ tmparray[index] = value;
RNA_property_float_set_array(ptr, prop, tmparray);
MEM_freeN(tmparray);
}
@@ -2251,7 +2251,7 @@ void RNA_property_float_set_index(PointerRNA *ptr, PropertyRNA *prop, int index,
float RNA_property_float_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
{
- FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
+ FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
BLI_assert(RNA_property_type(prop) == PROP_FLOAT);
BLI_assert(RNA_property_array_check(prop) == 0);
@@ -2261,14 +2261,14 @@ float RNA_property_float_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
void RNA_property_float_get_default_array(PointerRNA *UNUSED(ptr), PropertyRNA *prop, float *values)
{
- FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
+ FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
BLI_assert(RNA_property_type(prop) == PROP_FLOAT);
BLI_assert(RNA_property_array_check(prop) != 0);
- if(prop->arraydimension == 0)
- values[0]= fprop->defaultvalue;
- else if(fprop->defaultarray)
+ if (prop->arraydimension == 0)
+ values[0] = fprop->defaultvalue;
+ else if (fprop->defaultarray)
memcpy(values, fprop->defaultarray, sizeof(float)*prop->totarraylength);
else
memset(values, 0, sizeof(float)*prop->totarraylength);
@@ -2277,21 +2277,21 @@ void RNA_property_float_get_default_array(PointerRNA *UNUSED(ptr), PropertyRNA *
float RNA_property_float_get_default_index(PointerRNA *ptr, PropertyRNA *prop, int index)
{
float tmp[RNA_MAX_ARRAY_LENGTH];
- int len= rna_ensure_property_array_length(ptr, prop);
+ int len = rna_ensure_property_array_length(ptr, prop);
BLI_assert(RNA_property_type(prop) == PROP_FLOAT);
BLI_assert(RNA_property_array_check(prop) != 0);
- if(len <= RNA_MAX_ARRAY_LENGTH) {
+ if (len <= RNA_MAX_ARRAY_LENGTH) {
RNA_property_float_get_default_array(ptr, prop, tmp);
return tmp[index];
}
else {
float *tmparray, value;
- tmparray= MEM_callocN(sizeof(float)*len, "RNA_property_float_get_default_index");
+ tmparray = MEM_callocN(sizeof(float)*len, "RNA_property_float_get_default_index");
RNA_property_float_get_default_array(ptr, prop, tmparray);
- value= tmparray[index];
+ value = tmparray[index];
MEM_freeN(tmparray);
return value;
@@ -2300,23 +2300,23 @@ float RNA_property_float_get_default_index(PointerRNA *ptr, PropertyRNA *prop, i
void RNA_property_string_get(PointerRNA *ptr, PropertyRNA *prop, char *value)
{
- StringPropertyRNA *sprop= (StringPropertyRNA*)prop;
+ StringPropertyRNA *sprop = (StringPropertyRNA*)prop;
IDProperty *idprop;
BLI_assert(RNA_property_type(prop) == PROP_STRING);
- if((idprop=rna_idproperty_check(&prop, ptr))) {
+ if ((idprop = rna_idproperty_check(&prop, ptr))) {
/* editing bytes is not 100% supported
* since they can contain NIL chars */
if (idprop->subtype == IDP_STRING_SUB_BYTE) {
memcpy(value, IDP_String(idprop), idprop->len);
- value[idprop->len]= '\0';
+ value[idprop->len] = '\0';
}
else {
memcpy(value, IDP_String(idprop), idprop->len);
}
}
- else if(sprop->get) {
+ else if (sprop->get) {
sprop->get(ptr, value);
}
else {
@@ -2332,16 +2332,16 @@ char *RNA_property_string_get_alloc(PointerRNA *ptr, PropertyRNA *prop,
BLI_assert(RNA_property_type(prop) == PROP_STRING);
- length= RNA_property_string_length(ptr, prop);
+ length = RNA_property_string_length(ptr, prop);
- if(length+1 < fixedlen)
- buf= fixedbuf;
+ if (length+1 < fixedlen)
+ buf = fixedbuf;
else
- buf= MEM_mallocN(sizeof(char)*(length+1), "RNA_string_get_alloc");
+ buf = MEM_mallocN(sizeof(char)*(length+1), "RNA_string_get_alloc");
#ifndef NDEBUG
/* safety check to ensure the string is actually set */
- buf[length]= 255;
+ buf[length] = 255;
#endif
RNA_property_string_get(ptr, prop, buf);
@@ -2351,7 +2351,7 @@ char *RNA_property_string_get_alloc(PointerRNA *ptr, PropertyRNA *prop,
#endif
if (r_len) {
- *r_len= length;
+ *r_len = length;
}
return buf;
@@ -2360,12 +2360,12 @@ char *RNA_property_string_get_alloc(PointerRNA *ptr, PropertyRNA *prop,
/* this is the length without \0 terminator */
int RNA_property_string_length(PointerRNA *ptr, PropertyRNA *prop)
{
- StringPropertyRNA *sprop= (StringPropertyRNA*)prop;
+ StringPropertyRNA *sprop = (StringPropertyRNA*)prop;
IDProperty *idprop;
BLI_assert(RNA_property_type(prop) == PROP_STRING);
- if((idprop=rna_idproperty_check(&prop, ptr))) {
+ if ((idprop = rna_idproperty_check(&prop, ptr))) {
if (idprop->subtype == IDP_STRING_SUB_BYTE) {
return idprop->len;
}
@@ -2377,7 +2377,7 @@ int RNA_property_string_length(PointerRNA *ptr, PropertyRNA *prop)
return idprop->len - 1;
}
}
- else if(sprop->length)
+ else if (sprop->length)
return sprop->length(ptr);
else
return strlen(sprop->defaultvalue);
@@ -2385,30 +2385,30 @@ int RNA_property_string_length(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_string_set(PointerRNA *ptr, PropertyRNA *prop, const char *value)
{
- StringPropertyRNA *sprop= (StringPropertyRNA*)prop;
+ StringPropertyRNA *sprop = (StringPropertyRNA*)prop;
IDProperty *idprop;
BLI_assert(RNA_property_type(prop) == PROP_STRING);
- if((idprop=rna_idproperty_check(&prop, ptr))) {
+ if ((idprop = rna_idproperty_check(&prop, ptr))) {
/* both IDP_STRING_SUB_BYTE / IDP_STRING_SUB_UTF8 */
IDP_AssignString(idprop, value, RNA_property_string_maxlength(prop) - 1);
rna_idproperty_touch(idprop);
}
- else if(sprop->set)
+ else if (sprop->set)
sprop->set(ptr, value); /* set function needs to clamp its self */
- else if(prop->flag & PROP_EDITABLE) {
+ else if (prop->flag & PROP_EDITABLE) {
IDProperty *group;
- group= RNA_struct_idprops(ptr, 1);
- if(group)
+ group = RNA_struct_idprops(ptr, 1);
+ if (group)
IDP_AddToGroup(group, IDP_NewString(value, prop->identifier, RNA_property_string_maxlength(prop) - 1));
}
}
void RNA_property_string_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop, char *value)
{
- StringPropertyRNA *sprop= (StringPropertyRNA*)prop;
+ StringPropertyRNA *sprop = (StringPropertyRNA*)prop;
BLI_assert(RNA_property_type(prop) == PROP_STRING);
@@ -2422,12 +2422,12 @@ char *RNA_property_string_get_default_alloc(PointerRNA *ptr, PropertyRNA *prop,
BLI_assert(RNA_property_type(prop) == PROP_STRING);
- length= RNA_property_string_default_length(ptr, prop);
+ length = RNA_property_string_default_length(ptr, prop);
- if(length+1 < fixedlen)
- buf= fixedbuf;
+ if (length+1 < fixedlen)
+ buf = fixedbuf;
else
- buf= MEM_callocN(sizeof(char)*(length+1), "RNA_string_get_alloc");
+ buf = MEM_callocN(sizeof(char)*(length+1), "RNA_string_get_alloc");
RNA_property_string_get_default(ptr, prop, buf);
@@ -2437,7 +2437,7 @@ char *RNA_property_string_get_default_alloc(PointerRNA *ptr, PropertyRNA *prop,
/* this is the length without \0 terminator */
int RNA_property_string_default_length(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
{
- StringPropertyRNA *sprop= (StringPropertyRNA*)prop;
+ StringPropertyRNA *sprop = (StringPropertyRNA*)prop;
BLI_assert(RNA_property_type(prop) == PROP_STRING);
@@ -2446,14 +2446,14 @@ int RNA_property_string_default_length(PointerRNA *UNUSED(ptr), PropertyRNA *pro
int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
{
- EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
+ EnumPropertyRNA *eprop = (EnumPropertyRNA*)prop;
IDProperty *idprop;
BLI_assert(RNA_property_type(prop) == PROP_ENUM);
- if((idprop=rna_idproperty_check(&prop, ptr)))
+ if ((idprop = rna_idproperty_check(&prop, ptr)))
return IDP_Int(idprop);
- else if(eprop->get)
+ else if (eprop->get)
return eprop->get(ptr);
else
return eprop->defaultvalue;
@@ -2461,33 +2461,33 @@ int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_enum_set(PointerRNA *ptr, PropertyRNA *prop, int value)
{
- EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
+ EnumPropertyRNA *eprop = (EnumPropertyRNA*)prop;
IDProperty *idprop;
BLI_assert(RNA_property_type(prop) == PROP_ENUM);
- if((idprop=rna_idproperty_check(&prop, ptr))) {
- IDP_Int(idprop)= value;
+ if ((idprop = rna_idproperty_check(&prop, ptr))) {
+ IDP_Int(idprop) = value;
rna_idproperty_touch(idprop);
}
- else if(eprop->set) {
+ else if (eprop->set) {
eprop->set(ptr, value);
}
- else if(prop->flag & PROP_EDITABLE) {
+ else if (prop->flag & PROP_EDITABLE) {
IDPropertyTemplate val = {0};
IDProperty *group;
- val.i= value;
+ val.i = value;
- group= RNA_struct_idprops(ptr, 1);
- if(group)
+ group = RNA_struct_idprops(ptr, 1);
+ if (group)
IDP_AddToGroup(group, IDP_New(IDP_INT, &val, prop->identifier));
}
}
int RNA_property_enum_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
{
- EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
+ EnumPropertyRNA *eprop = (EnumPropertyRNA*)prop;
BLI_assert(RNA_property_type(prop) == PROP_ENUM);
@@ -2496,7 +2496,7 @@ int RNA_property_enum_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
void *RNA_property_enum_py_data_get(PropertyRNA *prop)
{
- EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
+ EnumPropertyRNA *eprop = (EnumPropertyRNA*)prop;
BLI_assert(RNA_property_type(prop) == PROP_ENUM);
@@ -2505,21 +2505,21 @@ void *RNA_property_enum_py_data_get(PropertyRNA *prop)
PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
{
- PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop;
+ PointerPropertyRNA *pprop = (PointerPropertyRNA*)prop;
IDProperty *idprop;
BLI_assert(RNA_property_type(prop) == PROP_POINTER);
- if((idprop=rna_idproperty_check(&prop, ptr))) {
- pprop= (PointerPropertyRNA*)prop;
+ if ((idprop = rna_idproperty_check(&prop, ptr))) {
+ pprop = (PointerPropertyRNA*)prop;
/* for groups, data is idprop itself */
return rna_pointer_inherit_refine(ptr, pprop->type, idprop);
}
- else if(pprop->get) {
+ else if (pprop->get) {
return pprop->get(ptr);
}
- else if(prop->flag & PROP_IDPROPERTY) {
+ else if (prop->flag & PROP_IDPROPERTY) {
/* XXX temporary hack to add it automatically, reading should
never do any write ops, to ensure thread safety etc .. */
RNA_property_pointer_add(ptr, prop);
@@ -2536,14 +2536,14 @@ void RNA_property_pointer_set(PointerRNA *ptr, PropertyRNA *prop, PointerRNA ptr
BLI_assert(RNA_property_type(prop) == PROP_POINTER);
- if((/*idprop=*/ rna_idproperty_check(&prop, ptr))) {
+ if ((/*idprop=*/ rna_idproperty_check(&prop, ptr))) {
/* not supported */
/* rna_idproperty_touch(idprop); */
}
else {
- PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop;
+ PointerPropertyRNA *pprop = (PointerPropertyRNA*)prop;
- if( pprop->set &&
+ if ( pprop->set &&
!((prop->flag & PROP_NEVER_NULL) && ptr_value.data == NULL) &&
!((prop->flag & PROP_ID_SELF_CHECK) && ptr->id.data == ptr_value.id.data)
) {
@@ -2554,11 +2554,11 @@ void RNA_property_pointer_set(PointerRNA *ptr, PropertyRNA *prop, PointerRNA ptr
PointerRNA RNA_property_pointer_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop))
{
- //PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop;
+ /*PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop; */
- // BLI_assert(RNA_property_type(prop) == PROP_POINTER);
+ /* BLI_assert(RNA_property_type(prop) == PROP_POINTER); */
- return PointerRNA_NULL; // FIXME: there has to be a way...
+ return PointerRNA_NULL; /* FIXME: there has to be a way... */
}
void RNA_property_pointer_add(PointerRNA *ptr, PropertyRNA *prop)
@@ -2567,17 +2567,17 @@ void RNA_property_pointer_add(PointerRNA *ptr, PropertyRNA *prop)
BLI_assert(RNA_property_type(prop) == PROP_POINTER);
- if((/*idprop=*/rna_idproperty_check(&prop, ptr))) {
+ if ((/*idprop=*/rna_idproperty_check(&prop, ptr))) {
/* already exists */
}
- else if(prop->flag & PROP_IDPROPERTY) {
+ else if (prop->flag & PROP_IDPROPERTY) {
IDPropertyTemplate val = {0};
IDProperty *group;
- val.i= 0;
+ val.i = 0;
- group= RNA_struct_idprops(ptr, 1);
- if(group)
+ group = RNA_struct_idprops(ptr, 1);
+ if (group)
IDP_AddToGroup(group, IDP_New(IDP_GROUP, &val, prop->identifier));
}
else
@@ -2590,10 +2590,10 @@ void RNA_property_pointer_remove(PointerRNA *ptr, PropertyRNA *prop)
BLI_assert(RNA_property_type(prop) == PROP_POINTER);
- if((idprop=rna_idproperty_check(&prop, ptr))) {
- group= RNA_struct_idprops(ptr, 0);
+ if ((idprop = rna_idproperty_check(&prop, ptr))) {
+ group = RNA_struct_idprops(ptr, 0);
- if(group) {
+ if (group) {
IDP_RemFromGroup(group, idprop);
IDP_FreeProperty(idprop);
MEM_freeN(idprop);
@@ -2605,10 +2605,10 @@ void RNA_property_pointer_remove(PointerRNA *ptr, PropertyRNA *prop)
static void rna_property_collection_get_idp(CollectionPropertyIterator *iter)
{
- CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)iter->prop;
+ CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)iter->prop;
- iter->ptr.data= rna_iterator_array_get(iter);
- iter->ptr.type= cprop->item_type;
+ iter->ptr.data = rna_iterator_array_get(iter);
+ iter->ptr.type = cprop->item_type;
rna_pointer_inherit_id(cprop->item_type, &iter->parent, &iter->ptr);
}
@@ -2620,34 +2620,34 @@ void RNA_property_collection_begin(PointerRNA *ptr, PropertyRNA *prop, Collectio
memset(iter, 0, sizeof(*iter));
- if((idprop=rna_idproperty_check(&prop, ptr)) || (prop->flag & PROP_IDPROPERTY)) {
- iter->parent= *ptr;
- iter->prop= prop;
+ if ((idprop = rna_idproperty_check(&prop, ptr)) || (prop->flag & PROP_IDPROPERTY)) {
+ iter->parent = *ptr;
+ iter->prop = prop;
- if(idprop)
+ if (idprop)
rna_iterator_array_begin(iter, IDP_IDPArray(idprop), sizeof(IDProperty), idprop->len, 0, NULL);
else
rna_iterator_array_begin(iter, NULL, sizeof(IDProperty), 0, 0, NULL);
- if(iter->valid)
+ if (iter->valid)
rna_property_collection_get_idp(iter);
- iter->idprop= 1;
+ iter->idprop = 1;
}
else {
- CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop;
+ CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)prop;
cprop->begin(iter, ptr);
}
}
void RNA_property_collection_next(CollectionPropertyIterator *iter)
{
- CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)rna_ensure_property(iter->prop);
+ CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)rna_ensure_property(iter->prop);
- if(iter->idprop) {
+ if (iter->idprop) {
rna_iterator_array_next(iter);
- if(iter->valid)
+ if (iter->valid)
rna_property_collection_get_idp(iter);
}
else
@@ -2656,9 +2656,9 @@ void RNA_property_collection_next(CollectionPropertyIterator *iter)
void RNA_property_collection_end(CollectionPropertyIterator *iter)
{
- CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)rna_ensure_property(iter->prop);
+ CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)rna_ensure_property(iter->prop);
- if(iter->idprop)
+ if (iter->idprop)
rna_iterator_array_end(iter);
else
cprop->end(iter);
@@ -2666,23 +2666,23 @@ void RNA_property_collection_end(CollectionPropertyIterator *iter)
int RNA_property_collection_length(PointerRNA *ptr, PropertyRNA *prop)
{
- CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop;
+ CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)prop;
IDProperty *idprop;
BLI_assert(RNA_property_type(prop) == PROP_COLLECTION);
- if((idprop=rna_idproperty_check(&prop, ptr))) {
+ if ((idprop = rna_idproperty_check(&prop, ptr))) {
return idprop->len;
}
- else if(cprop->length) {
+ else if (cprop->length) {
return cprop->length(ptr);
}
else {
CollectionPropertyIterator iter;
- int length= 0;
+ int length = 0;
RNA_property_collection_begin(ptr, prop, &iter);
- for(; iter.valid; RNA_property_collection_next(&iter))
+ for (; iter.valid; RNA_property_collection_next(&iter))
length++;
RNA_property_collection_end(&iter);
@@ -2693,39 +2693,39 @@ int RNA_property_collection_length(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *r_ptr)
{
IDProperty *idprop;
-// CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop;
+/* CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop; */
BLI_assert(RNA_property_type(prop) == PROP_COLLECTION);
- if((idprop=rna_idproperty_check(&prop, ptr))) {
+ if ((idprop = rna_idproperty_check(&prop, ptr))) {
IDPropertyTemplate val = {0};
IDProperty *item;
- item= IDP_New(IDP_GROUP, &val, "");
+ item = IDP_New(IDP_GROUP, &val, "");
IDP_AppendArray(idprop, item);
- // IDP_FreeProperty(item); // IDP_AppendArray does a shallow copy (memcpy), only free memory
+ /* IDP_FreeProperty(item); *//* IDP_AppendArray does a shallow copy (memcpy), only free memory */
MEM_freeN(item);
}
- else if(prop->flag & PROP_IDPROPERTY) {
+ else if (prop->flag & PROP_IDPROPERTY) {
IDProperty *group, *item;
IDPropertyTemplate val = {0};
- group= RNA_struct_idprops(ptr, 1);
- if(group) {
- idprop= IDP_NewIDPArray(prop->identifier);
+ group = RNA_struct_idprops(ptr, 1);
+ if (group) {
+ idprop = IDP_NewIDPArray(prop->identifier);
IDP_AddToGroup(group, idprop);
- item= IDP_New(IDP_GROUP, &val, "");
+ item = IDP_New(IDP_GROUP, &val, "");
IDP_AppendArray(idprop, item);
- // IDP_FreeProperty(item); // IDP_AppendArray does a shallow copy (memcpy), only free memory
+ /* IDP_FreeProperty(item); *//* IDP_AppendArray does a shallow copy (memcpy), only free memory */
MEM_freeN(item);
}
}
/* py api calls directly */
#if 0
- else if(cprop->add){
- if(!(cprop->add->flag & FUNC_USE_CONTEXT)) { /* XXX check for this somewhere else */
+ else if (cprop->add){
+ if (!(cprop->add->flag & FUNC_USE_CONTEXT)) { /* XXX check for this somewhere else */
ParameterList params;
RNA_parameter_list_create(&params, ptr, cprop->add);
RNA_function_call(NULL, NULL, ptr, cprop->add, &params);
@@ -2736,12 +2736,12 @@ void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA
printf("%s %s.%s: not implemented for this property.\n", __func__, ptr->type->identifier, prop->identifier);*/
#endif
- if(r_ptr) {
- if(idprop) {
- CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop;
+ if (r_ptr) {
+ if (idprop) {
+ CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)prop;
- r_ptr->data= IDP_GetIndexArray(idprop, idprop->len-1);
- r_ptr->type= cprop->item_type;
+ r_ptr->data = IDP_GetIndexArray(idprop, idprop->len-1);
+ r_ptr->type = cprop->item_type;
rna_pointer_inherit_id(NULL, ptr, r_ptr);
}
else
@@ -2752,19 +2752,19 @@ void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA
int RNA_property_collection_remove(PointerRNA *ptr, PropertyRNA *prop, int key)
{
IDProperty *idprop;
-// CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop;
+/* CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop; */
BLI_assert(RNA_property_type(prop) == PROP_COLLECTION);
- if((idprop=rna_idproperty_check(&prop, ptr))) {
+ if ((idprop = rna_idproperty_check(&prop, ptr))) {
IDProperty tmp, *array;
int len;
- len= idprop->len;
- array= IDP_IDPArray(idprop);
+ len = idprop->len;
+ array = IDP_IDPArray(idprop);
- if(key >= 0 && key < len) {
- if(key+1 < len) {
+ if (key >= 0 && key < len) {
+ if (key+1 < len) {
/* move element to be removed to the back */
memcpy(&tmp, &array[key], sizeof(IDProperty));
memmove(array+key, array+key+1, sizeof(IDProperty)*(len-(key+1)));
@@ -2776,13 +2776,13 @@ int RNA_property_collection_remove(PointerRNA *ptr, PropertyRNA *prop, int key)
return 1;
}
- else if(prop->flag & PROP_IDPROPERTY)
+ else if (prop->flag & PROP_IDPROPERTY)
return 1;
/* py api calls directly */
#if 0
- else if(cprop->remove){
- if(!(cprop->remove->flag & FUNC_USE_CONTEXT)) { /* XXX check for this somewhere else */
+ else if (cprop->remove){
+ if (!(cprop->remove->flag & FUNC_USE_CONTEXT)) { /* XXX check for this somewhere else */
ParameterList params;
RNA_parameter_list_create(&params, ptr, cprop->remove);
RNA_function_call(NULL, NULL, ptr, cprop->remove, &params);
@@ -2803,16 +2803,16 @@ int RNA_property_collection_move(PointerRNA *ptr, PropertyRNA *prop, int key, in
BLI_assert(RNA_property_type(prop) == PROP_COLLECTION);
- if((idprop=rna_idproperty_check(&prop, ptr))) {
+ if ((idprop = rna_idproperty_check(&prop, ptr))) {
IDProperty tmp, *array;
int len;
- len= idprop->len;
- array= IDP_IDPArray(idprop);
+ len = idprop->len;
+ array = IDP_IDPArray(idprop);
- if(key >= 0 && key < len && pos >= 0 && pos < len && key != pos) {
+ if (key >= 0 && key < len && pos >= 0 && pos < len && key != pos) {
memcpy(&tmp, &array[key], sizeof(IDProperty));
- if(pos < key)
+ if (pos < key)
memmove(array+pos+1, array+pos, sizeof(IDProperty)*(key - pos));
else
memmove(array+key, array+key+1, sizeof(IDProperty)*(pos - key));
@@ -2821,7 +2821,7 @@ int RNA_property_collection_move(PointerRNA *ptr, PropertyRNA *prop, int key, in
return 1;
}
- else if(prop->flag & PROP_IDPROPERTY)
+ else if (prop->flag & PROP_IDPROPERTY)
return 1;
return 0;
@@ -2833,19 +2833,19 @@ void RNA_property_collection_clear(PointerRNA *ptr, PropertyRNA *prop)
BLI_assert(RNA_property_type(prop) == PROP_COLLECTION);
- if((idprop=rna_idproperty_check(&prop, ptr)))
+ if ((idprop = rna_idproperty_check(&prop, ptr)))
IDP_ResizeIDPArray(idprop, 0);
}
int RNA_property_collection_lookup_index(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *t_ptr)
{
CollectionPropertyIterator iter;
- int index= 0;
+ int index = 0;
BLI_assert(RNA_property_type(prop) == PROP_COLLECTION);
RNA_property_collection_begin(ptr, prop, &iter);
- for(index=0; iter.valid; RNA_property_collection_next(&iter), index++) {
+ for (index = 0; iter.valid; RNA_property_collection_next(&iter), index++) {
if (iter.ptr.data == t_ptr->data)
break;
}
@@ -2860,11 +2860,11 @@ int RNA_property_collection_lookup_index(PointerRNA *ptr, PropertyRNA *prop, Poi
int RNA_property_collection_lookup_int(PointerRNA *ptr, PropertyRNA *prop, int key, PointerRNA *r_ptr)
{
- CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)rna_ensure_property(prop);
+ CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)rna_ensure_property(prop);
BLI_assert(RNA_property_type(prop) == PROP_COLLECTION);
- if(cprop->lookupint) {
+ if (cprop->lookupint) {
/* we have a callback defined, use it */
return cprop->lookupint(ptr, key, r_ptr);
}
@@ -2874,15 +2874,15 @@ int RNA_property_collection_lookup_int(PointerRNA *ptr, PropertyRNA *prop, int k
int i;
RNA_property_collection_begin(ptr, prop, &iter);
- for(i=0; iter.valid; RNA_property_collection_next(&iter), i++) {
- if(i == key) {
- *r_ptr= iter.ptr;
+ for (i = 0; iter.valid; RNA_property_collection_next(&iter), i++) {
+ if (i == key) {
+ *r_ptr = iter.ptr;
break;
}
}
RNA_property_collection_end(&iter);
- if(!iter.valid)
+ if (!iter.valid)
memset(r_ptr, 0, sizeof(*r_ptr));
return iter.valid;
@@ -2891,11 +2891,11 @@ int RNA_property_collection_lookup_int(PointerRNA *ptr, PropertyRNA *prop, int k
int RNA_property_collection_lookup_string(PointerRNA *ptr, PropertyRNA *prop, const char *key, PointerRNA *r_ptr)
{
- CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)rna_ensure_property(prop);
+ CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)rna_ensure_property(prop);
BLI_assert(RNA_property_type(prop) == PROP_COLLECTION);
- if(cprop->lookupstring) {
+ if (cprop->lookupstring) {
/* we have a callback defined, use it */
return cprop->lookupstring(ptr, key, r_ptr);
}
@@ -2904,32 +2904,32 @@ int RNA_property_collection_lookup_string(PointerRNA *ptr, PropertyRNA *prop, co
CollectionPropertyIterator iter;
PropertyRNA *nameprop;
char name[256], *nameptr;
- int found= 0;
- int keylen= strlen(key);
+ int found = 0;
+ int keylen = strlen(key);
int namelen;
RNA_property_collection_begin(ptr, prop, &iter);
- for(; iter.valid; RNA_property_collection_next(&iter)) {
- if(iter.ptr.data && iter.ptr.type->nameproperty) {
- nameprop= iter.ptr.type->nameproperty;
+ for (; iter.valid; RNA_property_collection_next(&iter)) {
+ if (iter.ptr.data && iter.ptr.type->nameproperty) {
+ nameprop = iter.ptr.type->nameproperty;
- nameptr= RNA_property_string_get_alloc(&iter.ptr, nameprop, name, sizeof(name), &namelen);
+ nameptr = RNA_property_string_get_alloc(&iter.ptr, nameprop, name, sizeof(name), &namelen);
- if((keylen == namelen) && (strcmp(nameptr, key) == 0)) {
- *r_ptr= iter.ptr;
- found= 1;
+ if ((keylen == namelen) && (strcmp(nameptr, key) == 0)) {
+ *r_ptr = iter.ptr;
+ found = 1;
}
- if((char *)&name != nameptr)
+ if ((char *)&name != nameptr)
MEM_freeN(nameptr);
- if(found)
+ if (found)
break;
}
}
RNA_property_collection_end(&iter);
- if(!iter.valid)
+ if (!iter.valid)
memset(r_ptr, 0, sizeof(*r_ptr));
return iter.valid;
@@ -2939,11 +2939,11 @@ int RNA_property_collection_lookup_string(PointerRNA *ptr, PropertyRNA *prop, co
/* zero return is an assignment error */
int RNA_property_collection_assign_int(PointerRNA *ptr, PropertyRNA *prop, const int key, const PointerRNA *assign_ptr)
{
- CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)rna_ensure_property(prop);
+ CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)rna_ensure_property(prop);
BLI_assert(RNA_property_type(prop) == PROP_COLLECTION);
- if(cprop->assignint) {
+ if (cprop->assignint) {
/* we have a callback defined, use it */
return cprop->assignint(ptr, key, assign_ptr);
}
@@ -2955,7 +2955,7 @@ int RNA_property_collection_type_get(PointerRNA *ptr, PropertyRNA *prop, Pointer
{
BLI_assert(RNA_property_type(prop) == PROP_COLLECTION);
- *r_ptr= *ptr;
+ *r_ptr = *ptr;
return ((r_ptr->type = rna_ensure_property(prop)->srna) ? 1:0);
}
@@ -2967,26 +2967,26 @@ int RNA_property_collection_raw_array(PointerRNA *ptr, PropertyRNA *prop, Proper
BLI_assert(RNA_property_type(prop) == PROP_COLLECTION);
- if(!(prop->flag & PROP_RAW_ARRAY) || !(itemprop->flag & PROP_RAW_ACCESS))
+ if (!(prop->flag & PROP_RAW_ARRAY) || !(itemprop->flag & PROP_RAW_ACCESS))
return 0;
RNA_property_collection_begin(ptr, prop, &iter);
- if(iter.valid) {
+ if (iter.valid) {
/* get data from array iterator and item property */
- internal= iter.internal;
- arrayp= (iter.valid)? iter.ptr.data: NULL;
+ internal = iter.internal;
+ arrayp = (iter.valid)? iter.ptr.data: NULL;
- if(internal->skip || !RNA_property_editable(&iter.ptr, itemprop)) {
+ if (internal->skip || !RNA_property_editable(&iter.ptr, itemprop)) {
/* we might skip some items, so it's not a proper array */
RNA_property_collection_end(&iter);
return 0;
}
- array->array= arrayp + itemprop->rawoffset;
- array->stride= internal->itemsize;
- array->len= ((char*)internal->endptr - arrayp)/internal->itemsize;
- array->type= itemprop->rawtype;
+ array->array = arrayp + itemprop->rawoffset;
+ array->stride = internal->itemsize;
+ array->len = ((char*)internal->endptr - arrayp)/internal->itemsize;
+ array->type = itemprop->rawtype;
}
else
memset(array, 0, sizeof(RawArray));
@@ -2998,7 +2998,7 @@ int RNA_property_collection_raw_array(PointerRNA *ptr, PropertyRNA *prop, Proper
#define RAW_GET(dtype, var, raw, a) \
{ \
- switch(raw.type) { \
+ switch (raw.type) { \
case PROP_RAW_CHAR: var = (dtype)((char*)raw.array)[a]; break; \
case PROP_RAW_SHORT: var = (dtype)((short*)raw.array)[a]; break; \
case PROP_RAW_INT: var = (dtype)((int*)raw.array)[a]; break; \
@@ -3010,7 +3010,7 @@ int RNA_property_collection_raw_array(PointerRNA *ptr, PropertyRNA *prop, Proper
#define RAW_SET(dtype, raw, a, var) \
{ \
- switch(raw.type) { \
+ switch (raw.type) { \
case PROP_RAW_CHAR: ((char*)raw.array)[a] = (char)var; break; \
case PROP_RAW_SHORT: ((short*)raw.array)[a] = (short)var; break; \
case PROP_RAW_INT: ((int*)raw.array)[a] = (int)var; break; \
@@ -3022,7 +3022,7 @@ int RNA_property_collection_raw_array(PointerRNA *ptr, PropertyRNA *prop, Proper
int RNA_raw_type_sizeof(RawPropertyType type)
{
- switch(type) {
+ switch (type) {
case PROP_RAW_CHAR: return sizeof(char);
case PROP_RAW_SHORT: return sizeof(short);
case PROP_RAW_INT: return sizeof(int);
@@ -3037,59 +3037,59 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
StructRNA *ptype;
PointerRNA itemptr;
PropertyRNA *itemprop, *iprop;
- PropertyType itemtype=0;
+ PropertyType itemtype = 0;
RawArray in;
- int itemlen= 0;
+ int itemlen = 0;
/* initialize in array, stride assumed 0 in following code */
- in.array= inarray;
- in.type= intype;
- in.len= inlen;
- in.stride= 0;
+ in.array = inarray;
+ in.type = intype;
+ in.len = inlen;
+ in.stride = 0;
- ptype= RNA_property_pointer_type(ptr, prop);
+ ptype = RNA_property_pointer_type(ptr, prop);
/* try to get item property pointer */
RNA_pointer_create(NULL, ptype, NULL, &itemptr);
- itemprop= RNA_struct_find_property(&itemptr, propname);
+ itemprop = RNA_struct_find_property(&itemptr, propname);
- if(itemprop) {
+ if (itemprop) {
/* we have item property pointer */
RawArray out;
/* check type */
- itemtype= RNA_property_type(itemprop);
+ itemtype = RNA_property_type(itemprop);
- if(!ELEM3(itemtype, PROP_BOOLEAN, PROP_INT, PROP_FLOAT)) {
+ if (!ELEM3(itemtype, PROP_BOOLEAN, PROP_INT, PROP_FLOAT)) {
BKE_report(reports, RPT_ERROR, "Only boolean, int and float properties supported");
return 0;
}
/* check item array */
- itemlen= RNA_property_array_length(&itemptr, itemprop);
+ itemlen = RNA_property_array_length(&itemptr, itemprop);
/* try to access as raw array */
- if(RNA_property_collection_raw_array(ptr, prop, itemprop, &out)) {
+ if (RNA_property_collection_raw_array(ptr, prop, itemprop, &out)) {
int arraylen = (itemlen == 0) ? 1 : itemlen;
- if(in.len != arraylen*out.len) {
+ if (in.len != arraylen*out.len) {
BKE_reportf(reports, RPT_ERROR, "Array length mismatch (expected %d, got %d)", out.len*arraylen, in.len);
return 0;
}
/* matching raw types */
- if(out.type == in.type) {
- void *inp= in.array;
- void *outp= out.array;
+ if (out.type == in.type) {
+ void *inp = in.array;
+ void *outp = out.array;
int a, size;
- size= RNA_raw_type_sizeof(out.type) * arraylen;
+ size = RNA_raw_type_sizeof(out.type) * arraylen;
- for(a=0; a<out.len; a++) {
- if(set) memcpy(outp, inp, size);
+ for (a = 0; a<out.len; a++) {
+ if (set) memcpy(outp, inp, size);
else memcpy(inp, outp, size);
- inp= (char*)inp + size;
- outp= (char*)outp + out.stride;
+ inp = (char*)inp + size;
+ outp = (char*)outp + out.stride;
}
return 1;
@@ -3101,9 +3101,9 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
}
{
- void *tmparray= NULL;
- int tmplen= 0;
- int err= 0, j, a= 0;
+ void *tmparray = NULL;
+ int tmplen = 0;
+ int err = 0, j, a = 0;
int needconv = 1;
if (((itemtype == PROP_BOOLEAN || itemtype == PROP_INT) && in.type == PROP_RAW_INT) ||
@@ -3114,44 +3114,44 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
/* no item property pointer, can still be id property, or
* property of a type derived from the collection pointer type */
RNA_PROP_BEGIN(ptr, itemptr, prop) {
- if(itemptr.data) {
- if(itemprop) {
+ if (itemptr.data) {
+ if (itemprop) {
/* we got the property already */
- iprop= itemprop;
+ iprop = itemprop;
}
else {
/* not yet, look it up and verify if it is valid */
- iprop= RNA_struct_find_property(&itemptr, propname);
+ iprop = RNA_struct_find_property(&itemptr, propname);
- if(iprop) {
- itemlen= RNA_property_array_length(&itemptr, iprop);
- itemtype= RNA_property_type(iprop);
+ if (iprop) {
+ itemlen = RNA_property_array_length(&itemptr, iprop);
+ itemtype = RNA_property_type(iprop);
}
else {
BKE_reportf(reports, RPT_ERROR, "Property named %s not found", propname);
- err= 1;
+ err = 1;
break;
}
- if(!ELEM3(itemtype, PROP_BOOLEAN, PROP_INT, PROP_FLOAT)) {
+ if (!ELEM3(itemtype, PROP_BOOLEAN, PROP_INT, PROP_FLOAT)) {
BKE_report(reports, RPT_ERROR, "Only boolean, int and float properties supported");
- err= 1;
+ err = 1;
break;
}
}
/* editable check */
- if(!set || RNA_property_editable(&itemptr, iprop)) {
- if(a+itemlen > in.len) {
+ if (!set || RNA_property_editable(&itemptr, iprop)) {
+ if (a+itemlen > in.len) {
BKE_reportf(reports, RPT_ERROR, "Array length mismatch (got %d, expected more)", in.len);
- err= 1;
+ err = 1;
break;
}
- if(itemlen == 0) {
+ if (itemlen == 0) {
/* handle conversions */
- if(set) {
- switch(itemtype) {
+ if (set) {
+ switch (itemtype) {
case PROP_BOOLEAN: {
int b;
RAW_GET(int, b, in, a);
@@ -3175,19 +3175,19 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
}
}
else {
- switch(itemtype) {
+ switch (itemtype) {
case PROP_BOOLEAN: {
- int b= RNA_property_boolean_get(&itemptr, iprop);
+ int b = RNA_property_boolean_get(&itemptr, iprop);
RAW_SET(int, in, a, b);
break;
}
case PROP_INT: {
- int i= RNA_property_int_get(&itemptr, iprop);
+ int i = RNA_property_int_get(&itemptr, iprop);
RAW_SET(int, in, a, i);
break;
}
case PROP_FLOAT: {
- float f= RNA_property_float_get(&itemptr, iprop);
+ float f = RNA_property_float_get(&itemptr, iprop);
RAW_SET(float, in, a, f);
break;
}
@@ -3199,32 +3199,32 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
}
else if (needconv == 1) {
/* allocate temporary array if needed */
- if(tmparray && tmplen != itemlen) {
+ if (tmparray && tmplen != itemlen) {
MEM_freeN(tmparray);
- tmparray= NULL;
+ tmparray = NULL;
}
- if(!tmparray) {
- tmparray= MEM_callocN(sizeof(float)*itemlen, "RNA tmparray\n");
- tmplen= itemlen;
+ if (!tmparray) {
+ tmparray = MEM_callocN(sizeof(float)*itemlen, "RNA tmparray\n");
+ tmplen = itemlen;
}
/* handle conversions */
- if(set) {
- switch(itemtype) {
+ if (set) {
+ switch (itemtype) {
case PROP_BOOLEAN: {
- for(j=0; j<itemlen; j++, a++)
+ for (j = 0; j<itemlen; j++, a++)
RAW_GET(int, ((int*)tmparray)[j], in, a);
RNA_property_boolean_set_array(&itemptr, iprop, tmparray);
break;
}
case PROP_INT: {
- for(j=0; j<itemlen; j++, a++)
+ for (j = 0; j<itemlen; j++, a++)
RAW_GET(int, ((int*)tmparray)[j], in, a);
RNA_property_int_set_array(&itemptr, iprop, tmparray);
break;
}
case PROP_FLOAT: {
- for(j=0; j<itemlen; j++, a++)
+ for (j = 0; j<itemlen; j++, a++)
RAW_GET(float, ((float*)tmparray)[j], in, a);
RNA_property_float_set_array(&itemptr, iprop, tmparray);
break;
@@ -3234,22 +3234,22 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
}
}
else {
- switch(itemtype) {
+ switch (itemtype) {
case PROP_BOOLEAN: {
RNA_property_boolean_get_array(&itemptr, iprop, tmparray);
- for(j=0; j<itemlen; j++, a++)
+ for (j = 0; j<itemlen; j++, a++)
RAW_SET(int, in, a, ((int*)tmparray)[j]);
break;
}
case PROP_INT: {
RNA_property_int_get_array(&itemptr, iprop, tmparray);
- for(j=0; j<itemlen; j++, a++)
+ for (j = 0; j<itemlen; j++, a++)
RAW_SET(int, in, a, ((int*)tmparray)[j]);
break;
}
case PROP_FLOAT: {
RNA_property_float_get_array(&itemptr, iprop, tmparray);
- for(j=0; j<itemlen; j++, a++)
+ for (j = 0; j<itemlen; j++, a++)
RAW_SET(float, in, a, ((float*)tmparray)[j]);
break;
}
@@ -3259,8 +3259,8 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
}
}
else {
- if(set) {
- switch(itemtype) {
+ if (set) {
+ switch (itemtype) {
case PROP_BOOLEAN: {
RNA_property_boolean_set_array(&itemptr, iprop, &((int*)in.array)[a]);
a += itemlen;
@@ -3281,7 +3281,7 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
}
}
else {
- switch(itemtype) {
+ switch (itemtype) {
case PROP_BOOLEAN: {
RNA_property_boolean_get_array(&itemptr, iprop, &((int*)in.array)[a]);
a += itemlen;
@@ -3307,7 +3307,7 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
}
RNA_PROP_END;
- if(tmparray)
+ if (tmparray)
MEM_freeN(tmparray);
return !err;
@@ -3350,36 +3350,36 @@ void rna_iterator_listbase_begin(CollectionPropertyIterator *iter, ListBase *lb,
{
ListBaseIterator *internal;
- internal= MEM_callocN(sizeof(ListBaseIterator), "ListBaseIterator");
- internal->link= (lb)? lb->first: NULL;
- internal->skip= skip;
+ internal = MEM_callocN(sizeof(ListBaseIterator), "ListBaseIterator");
+ internal->link = (lb)? lb->first: NULL;
+ internal->skip = skip;
- iter->internal= internal;
- iter->valid= (internal->link != NULL);
+ iter->internal = internal;
+ iter->valid = (internal->link != NULL);
- if(skip && iter->valid && skip(iter, internal->link))
+ if (skip && iter->valid && skip(iter, internal->link))
rna_iterator_listbase_next(iter);
}
void rna_iterator_listbase_next(CollectionPropertyIterator *iter)
{
- ListBaseIterator *internal= iter->internal;
+ ListBaseIterator *internal = iter->internal;
- if(internal->skip) {
+ if (internal->skip) {
do {
- internal->link= internal->link->next;
- iter->valid= (internal->link != NULL);
- } while(iter->valid && internal->skip(iter, internal->link));
+ internal->link = internal->link->next;
+ iter->valid = (internal->link != NULL);
+ } while (iter->valid && internal->skip(iter, internal->link));
}
else {
- internal->link= internal->link->next;
- iter->valid= (internal->link != NULL);
+ internal->link = internal->link->next;
+ iter->valid = (internal->link != NULL);
}
}
void *rna_iterator_listbase_get(CollectionPropertyIterator *iter)
{
- ListBaseIterator *internal= iter->internal;
+ ListBaseIterator *internal = iter->internal;
return internal->link;
}
@@ -3387,12 +3387,12 @@ void *rna_iterator_listbase_get(CollectionPropertyIterator *iter)
void rna_iterator_listbase_end(CollectionPropertyIterator *iter)
{
MEM_freeN(iter->internal);
- iter->internal= NULL;
+ iter->internal = NULL;
}
PointerRNA rna_listbase_lookup_int(PointerRNA *ptr, StructRNA *type, struct ListBase *lb, int index)
{
- void *data= BLI_findlink(lb, index);
+ void *data = BLI_findlink(lb, index);
return rna_pointer_inherit_refine(ptr, type, data);
}
@@ -3400,54 +3400,54 @@ void rna_iterator_array_begin(CollectionPropertyIterator *iter, void *ptr, int i
{
ArrayIterator *internal;
- if(ptr == NULL)
- length= 0;
+ if (ptr == NULL)
+ length = 0;
else if (length == 0) {
- ptr= NULL;
- itemsize= 0;
+ ptr = NULL;
+ itemsize = 0;
}
- internal= MEM_callocN(sizeof(ArrayIterator), "ArrayIterator");
- internal->ptr= ptr;
- internal->free_ptr= free_ptr ? ptr:NULL;
- internal->endptr= ((char*)ptr)+length*itemsize;
- internal->itemsize= itemsize;
- internal->skip= skip;
- internal->length= length;
+ internal = MEM_callocN(sizeof(ArrayIterator), "ArrayIterator");
+ internal->ptr = ptr;
+ internal->free_ptr = free_ptr ? ptr:NULL;
+ internal->endptr = ((char*)ptr)+length*itemsize;
+ internal->itemsize = itemsize;
+ internal->skip = skip;
+ internal->length = length;
- iter->internal= internal;
- iter->valid= (internal->ptr != internal->endptr);
+ iter->internal = internal;
+ iter->valid = (internal->ptr != internal->endptr);
- if(skip && iter->valid && skip(iter, internal->ptr))
+ if (skip && iter->valid && skip(iter, internal->ptr))
rna_iterator_array_next(iter);
}
void rna_iterator_array_next(CollectionPropertyIterator *iter)
{
- ArrayIterator *internal= iter->internal;
+ ArrayIterator *internal = iter->internal;
- if(internal->skip) {
+ if (internal->skip) {
do {
internal->ptr += internal->itemsize;
- iter->valid= (internal->ptr != internal->endptr);
- } while(iter->valid && internal->skip(iter, internal->ptr));
+ iter->valid = (internal->ptr != internal->endptr);
+ } while (iter->valid && internal->skip(iter, internal->ptr));
}
else {
internal->ptr += internal->itemsize;
- iter->valid= (internal->ptr != internal->endptr);
+ iter->valid = (internal->ptr != internal->endptr);
}
}
void *rna_iterator_array_get(CollectionPropertyIterator *iter)
{
- ArrayIterator *internal= iter->internal;
+ ArrayIterator *internal = iter->internal;
return internal->ptr;
}
void *rna_iterator_array_dereference_get(CollectionPropertyIterator *iter)
{
- ArrayIterator *internal= iter->internal;
+ ArrayIterator *internal = iter->internal;
/* for ** arrays */
return *(void**)(internal->ptr);
@@ -3455,19 +3455,19 @@ void *rna_iterator_array_dereference_get(CollectionPropertyIterator *iter)
void rna_iterator_array_end(CollectionPropertyIterator *iter)
{
- ArrayIterator *internal= iter->internal;
+ ArrayIterator *internal = iter->internal;
- if(internal->free_ptr) {
+ if (internal->free_ptr) {
MEM_freeN(internal->free_ptr);
- internal->free_ptr= NULL;
+ internal->free_ptr = NULL;
}
MEM_freeN(iter->internal);
- iter->internal= NULL;
+ iter->internal = NULL;
}
PointerRNA rna_array_lookup_int(PointerRNA *ptr, StructRNA *type, void *data, int itemsize, int length, int index)
{
- if(index < 0 || index >= length)
+ if (index < 0 || index >= length)
return PointerRNA_NULL;
return rna_pointer_inherit_refine(ptr, type, ((char*)data) + index*itemsize);
@@ -3479,37 +3479,37 @@ static char *rna_path_token(const char **path, char *fixedbuf, int fixedlen, int
{
const char *p;
char *buf;
- char quote= '\0';
+ char quote = '\0';
int i, j, len, escape;
- len= 0;
+ len = 0;
- if(bracket) {
+ if (bracket) {
/* get data between [], check escaping ] with \] */
- if(**path == '[') (*path)++;
+ if (**path == '[') (*path)++;
else return NULL;
- p= *path;
+ p = *path;
/* 2 kinds of lookups now, quoted or unquoted */
- quote= *p;
+ quote = *p;
- if(quote != '"') /* " - this comment is hack for Aligorith's text editor's sanity */
- quote= 0;
+ if (quote != '"') /* " - this comment is hack for Aligorith's text editor's sanity */
+ quote = 0;
- if(quote==0) {
- while(*p && (*p != ']')) {
+ if (quote == 0) {
+ while (*p && (*p != ']')) {
len++;
p++;
}
}
else {
- escape= 0;
+ escape = 0;
/* skip the first quote */
len++;
p++;
- while(*p && (*p != quote || escape)) {
- escape= (*p == '\\');
+ while (*p && (*p != quote || escape)) {
+ escape = (*p == '\\');
len++;
p++;
}
@@ -3519,57 +3519,57 @@ static char *rna_path_token(const char **path, char *fixedbuf, int fixedlen, int
p++;
}
- if(*p != ']') return NULL;
+ if (*p != ']') return NULL;
}
else {
/* get data until . or [ */
- p= *path;
+ p = *path;
- while(*p && *p != '.' && *p != '[') {
+ while (*p && *p != '.' && *p != '[') {
len++;
p++;
}
}
/* empty, return */
- if(len == 0)
+ if (len == 0)
return NULL;
/* try to use fixed buffer if possible */
- if(len+1 < fixedlen)
- buf= fixedbuf;
+ if (len+1 < fixedlen)
+ buf = fixedbuf;
else
- buf= MEM_callocN(sizeof(char)*(len+1), "rna_path_token");
+ buf = MEM_callocN(sizeof(char)*(len+1), "rna_path_token");
/* copy string, taking into account escaped ] */
- if(bracket) {
- for(p=*path, i=0, j=0; i<len; i++, p++) {
- if(*p == '\\' && *(p+1) == quote);
- else buf[j++]= *p;
+ if (bracket) {
+ for (p = *path, i = 0, j = 0; i<len; i++, p++) {
+ if (*p == '\\' && *(p+1) == quote);
+ else buf[j++] = *p;
}
- buf[j]= 0;
+ buf[j] = 0;
}
else {
memcpy(buf, *path, sizeof(char)*len);
- buf[len]= '\0';
+ buf[len] = '\0';
}
/* set path to start of next token */
- if(*p == ']') p++;
- if(*p == '.') p++;
- *path= p;
+ if (*p == ']') p++;
+ if (*p == '.') p++;
+ *path = p;
return buf;
}
static int rna_token_strip_quotes(char *token)
{
- if(token[0]=='"') {
+ if (token[0] =='"') {
int len = strlen(token);
- if (len >= 2 && token[len-1]=='"') {
+ if (len >= 2 && token[len-1] =='"') {
/* strip away "" */
- token[len-1]= '\0';
+ token[len-1] = '\0';
return 1;
}
}
@@ -3589,80 +3589,80 @@ int RNA_path_resolve_full(PointerRNA *ptr, const char *path, PointerRNA *r_ptr,
char fixedbuf[256], *token;
int type, intkey;
- prop= NULL;
- curptr= *ptr;
+ prop = NULL;
+ curptr = *ptr;
- if(path==NULL || *path=='\0')
+ if (path == NULL || *path =='\0')
return 0;
- while(*path) {
- int use_id_prop = (*path=='[') ? 1:0;
+ while (*path) {
+ int use_id_prop = (*path =='[') ? 1:0;
/* custom property lookup ?
* C.object["someprop"]
*/
/* look up property name in current struct */
- token= rna_path_token(&path, fixedbuf, sizeof(fixedbuf), use_id_prop);
+ token = rna_path_token(&path, fixedbuf, sizeof(fixedbuf), use_id_prop);
- if(!token)
+ if (!token)
return 0;
- if(use_id_prop) { /* look up property name in current struct */
- IDProperty *group= RNA_struct_idprops(&curptr, 0);
- if(group && rna_token_strip_quotes(token))
- prop= (PropertyRNA *)IDP_GetPropertyFromGroup(group, token+1);
+ if (use_id_prop) { /* look up property name in current struct */
+ IDProperty *group = RNA_struct_idprops(&curptr, 0);
+ if (group && rna_token_strip_quotes(token))
+ prop = (PropertyRNA *)IDP_GetPropertyFromGroup(group, token+1);
}
else {
- prop= RNA_struct_find_property(&curptr, token);
+ prop = RNA_struct_find_property(&curptr, token);
}
- if(token != fixedbuf)
+ if (token != fixedbuf)
MEM_freeN(token);
- if(!prop)
+ if (!prop)
return 0;
- type= RNA_property_type(prop);
+ type = RNA_property_type(prop);
/* now look up the value of this property if it is a pointer or
* collection, otherwise return the property rna so that the
* caller can read the value of the property itself */
switch (type) {
case PROP_POINTER:
- nextptr= RNA_property_pointer_get(&curptr, prop);
+ nextptr = RNA_property_pointer_get(&curptr, prop);
- if(nextptr.data) {
- curptr= nextptr;
- prop= NULL; /* now we have a PointerRNA, the prop is our parent so forget it */
- if(index) *index= -1;
+ if (nextptr.data) {
+ curptr = nextptr;
+ prop = NULL; /* now we have a PointerRNA, the prop is our parent so forget it */
+ if (index) *index = -1;
}
else
return 0;
break;
case PROP_COLLECTION:
- if(*path) {
- if(*path == '[') {
+ if (*path) {
+ if (*path == '[') {
/* resolve the lookup with [] brackets */
- token= rna_path_token(&path, fixedbuf, sizeof(fixedbuf), 1);
+ token = rna_path_token(&path, fixedbuf, sizeof(fixedbuf), 1);
- if(!token)
+ if (!token)
return 0;
/* check for "" to see if it is a string */
- if(rna_token_strip_quotes(token)) {
+ if (rna_token_strip_quotes(token)) {
RNA_property_collection_lookup_string(&curptr, prop, token+1, &nextptr);
}
else {
/* otherwise do int lookup */
- intkey= atoi(token);
- if(intkey==0 && (token[0] != '0' || token[1] != '\0')) {
+ intkey = atoi(token);
+ if (intkey == 0 && (token[0] != '0' || token[1] != '\0')) {
return 0; /* we can be sure the fixedbuf was used in this case */
}
RNA_property_collection_lookup_int(&curptr, prop, intkey, &nextptr);
}
- if(token != fixedbuf) {
+ if (token != fixedbuf) {
MEM_freeN(token);
}
}
@@ -3672,15 +3672,15 @@ int RNA_path_resolve_full(PointerRNA *ptr, const char *path, PointerRNA *r_ptr,
/* ensure we quit on invalid values */
nextptr.data = NULL;
- if(RNA_property_collection_type_get(&curptr, prop, &c_ptr)) {
- nextptr= c_ptr;
+ if (RNA_property_collection_type_get(&curptr, prop, &c_ptr)) {
+ nextptr = c_ptr;
}
}
- if(nextptr.data) {
- curptr= nextptr;
- prop= NULL; /* now we have a PointerRNA, the prop is our parent so forget it */
- if(index) *index= -1;
+ if (nextptr.data) {
+ curptr = nextptr;
+ prop = NULL; /* now we have a PointerRNA, the prop is our parent so forget it */
+ if (index) *index = -1;
}
else
return 0;
@@ -3688,38 +3688,38 @@ int RNA_path_resolve_full(PointerRNA *ptr, const char *path, PointerRNA *r_ptr,
break;
default:
- if (index==NULL)
+ if (index == NULL)
break;
- *index= -1;
+ *index = -1;
if (*path) {
- int index_arr[RNA_MAX_ARRAY_DIMENSION]= {0};
+ int index_arr[RNA_MAX_ARRAY_DIMENSION] = {0};
int len[RNA_MAX_ARRAY_DIMENSION];
- const int dim= RNA_property_array_dimension(&curptr, prop, len);
+ const int dim = RNA_property_array_dimension(&curptr, prop, len);
int i, temp_index;
- for(i=0; i<dim; i++) {
- temp_index= -1;
+ for (i = 0; i<dim; i++) {
+ temp_index = -1;
/* multi index resolve */
- if (*path=='[') {
- token= rna_path_token(&path, fixedbuf, sizeof(fixedbuf), 1);
+ if (*path =='[') {
+ token = rna_path_token(&path, fixedbuf, sizeof(fixedbuf), 1);
- if(token==NULL) {
+ if (token == NULL) {
/* invalid syntax blah[] */
return 0;
}
/* check for "" to see if it is a string */
- else if(rna_token_strip_quotes(token)) {
- temp_index= RNA_property_array_item_index(prop, *(token+1));
+ else if (rna_token_strip_quotes(token)) {
+ temp_index = RNA_property_array_item_index(prop, *(token+1));
}
else {
/* otherwise do int lookup */
- temp_index= atoi(token);
+ temp_index = atoi(token);
- if(temp_index==0 && (token[0] != '0' || token[1] != '\0')) {
- if(token != fixedbuf) {
+ if (temp_index == 0 && (token[0] != '0' || token[1] != '\0')) {
+ if (token != fixedbuf) {
MEM_freeN(token);
}
@@ -3727,49 +3727,49 @@ int RNA_path_resolve_full(PointerRNA *ptr, const char *path, PointerRNA *r_ptr,
}
}
}
- else if(dim==1) {
+ else if (dim == 1) {
/* location.x || scale.X, single dimension arrays only */
- token= rna_path_token(&path, fixedbuf, sizeof(fixedbuf), 0);
- if(token==NULL) {
+ token = rna_path_token(&path, fixedbuf, sizeof(fixedbuf), 0);
+ if (token == NULL) {
/* invalid syntax blah.. */
return 0;
}
- temp_index= RNA_property_array_item_index(prop, *token);
+ temp_index = RNA_property_array_item_index(prop, *token);
}
- if(token != fixedbuf) {
+ if (token != fixedbuf) {
MEM_freeN(token);
}
/* out of range */
- if(temp_index < 0 || temp_index >= len[i])
+ if (temp_index < 0 || temp_index >= len[i])
return 0;
- index_arr[i]= temp_index;
+ index_arr[i] = temp_index;
/* end multi index resolve */
}
/* arrays always contain numbers so further values are not valid */
- if(*path) {
+ if (*path) {
return 0;
}
else {
- int totdim= 1;
- int flat_index= 0;
+ int totdim = 1;
+ int flat_index = 0;
- for(i=dim-1; i>=0; i--) {
+ for (i = dim-1; i >= 0; i--) {
flat_index += index_arr[i] * totdim;
totdim *= len[i];
}
- *index= flat_index;
+ *index = flat_index;
}
}
}
}
- *r_ptr= curptr;
- *r_prop= prop;
+ *r_ptr = curptr;
+ *r_prop = prop;
return 1;
}
@@ -3781,32 +3781,32 @@ char *RNA_path_append(const char *path, PointerRNA *UNUSED(ptr), PropertyRNA *pr
const char *s;
char appendstr[128], *result;
- dynstr= BLI_dynstr_new();
+ dynstr = BLI_dynstr_new();
/* add .identifier */
- if(path) {
+ if (path) {
BLI_dynstr_append(dynstr, (char*)path);
- if(*path)
+ if (*path)
BLI_dynstr_append(dynstr, ".");
}
BLI_dynstr_append(dynstr, RNA_property_identifier(prop));
- if(RNA_property_type(prop) == PROP_COLLECTION) {
+ if (RNA_property_type(prop) == PROP_COLLECTION) {
/* add ["strkey"] or [intkey] */
BLI_dynstr_append(dynstr, "[");
- if(strkey) {
+ if (strkey) {
BLI_dynstr_append(dynstr, "\"");
- for(s=strkey; *s; s++) {
- if(*s == '[') {
- appendstr[0]= '\\';
- appendstr[1]= *s;
- appendstr[2]= 0;
+ for (s = strkey; *s; s++) {
+ if (*s == '[') {
+ appendstr[0] = '\\';
+ appendstr[1] = *s;
+ appendstr[2] = 0;
}
else {
- appendstr[0]= *s;
- appendstr[1]= 0;
+ appendstr[0] = *s;
+ appendstr[1] = 0;
}
BLI_dynstr_append(dynstr, appendstr);
}
@@ -3820,7 +3820,7 @@ char *RNA_path_append(const char *path, PointerRNA *UNUSED(ptr), PropertyRNA *pr
BLI_dynstr_append(dynstr, "]");
}
- result= BLI_dynstr_get_cstring(dynstr);
+ result = BLI_dynstr_get_cstring(dynstr);
BLI_dynstr_free(dynstr);
return result;
@@ -3833,42 +3833,42 @@ char *RNA_path_back(const char *path)
char *result, *token;
int i;
- if(!path)
+ if (!path)
return NULL;
- previous= NULL;
- current= path;
+ previous = NULL;
+ current = path;
/* parse token by token until the end, then we back up to the previous
* position and strip of the next token to get the path one step back */
- while(*current) {
- token= rna_path_token(&current, fixedbuf, sizeof(fixedbuf), 0);
+ while (*current) {
+ token = rna_path_token(&current, fixedbuf, sizeof(fixedbuf), 0);
- if(!token)
+ if (!token)
return NULL;
- if(token != fixedbuf)
+ if (token != fixedbuf)
MEM_freeN(token);
/* in case of collection we also need to strip off [] */
- token= rna_path_token(&current, fixedbuf, sizeof(fixedbuf), 1);
- if(token && token != fixedbuf)
+ token = rna_path_token(&current, fixedbuf, sizeof(fixedbuf), 1);
+ if (token && token != fixedbuf)
MEM_freeN(token);
- if(!*current)
+ if (!*current)
break;
- previous= current;
+ previous = current;
}
- if(!previous)
+ if (!previous)
return NULL;
/* copy and strip off last token */
- i= previous - path;
- result= BLI_strdup(path);
+ i = previous - path;
+ result = BLI_strdup(path);
- if(i > 0 && result[i-1] == '.') i--;
- result[i]= 0;
+ if (i > 0 && result[i-1] == '.') i--;
+ result[i] = 0;
return result;
}
@@ -3885,42 +3885,42 @@ typedef struct IDP_Chain {
static char *rna_idp_path_create(IDP_Chain *child_link)
{
- DynStr *dynstr= BLI_dynstr_new();
+ DynStr *dynstr = BLI_dynstr_new();
char *path;
- short first= TRUE;
+ short first = TRUE;
- int tot= 0;
- IDP_Chain *link= child_link;
+ int tot = 0;
+ IDP_Chain *link = child_link;
/* reverse the list */
IDP_Chain *link_prev;
- link_prev= NULL;
- while(link) {
- IDP_Chain *link_next= link->up;
- link->up= link_prev;
- link_prev= link;
- link= link_next;
+ link_prev = NULL;
+ while (link) {
+ IDP_Chain *link_next = link->up;
+ link->up = link_prev;
+ link_prev = link;
+ link = link_next;
tot++;
}
- for(link= link_prev; link; link= link->up) {
+ for (link = link_prev; link; link = link->up) {
/* pass */
- if(link->index >= 0) {
+ if (link->index >= 0) {
BLI_dynstr_appendf(dynstr, first ? "%s[%d]" : ".%s[%d]", link->name, link->index);
}
else {
BLI_dynstr_appendf(dynstr, first ? "%s" : ".%s", link->name);
}
- first= FALSE;
+ first = FALSE;
}
- path= BLI_dynstr_get_cstring(dynstr);
+ path = BLI_dynstr_get_cstring(dynstr);
BLI_dynstr_free(dynstr);
- if(*path=='\0') {
+ if (*path =='\0') {
MEM_freeN(path);
- path= NULL;
+ path = NULL;
}
return path;
@@ -3928,7 +3928,7 @@ static char *rna_idp_path_create(IDP_Chain *child_link)
static char *rna_idp_path(PointerRNA *ptr, IDProperty *haystack, IDProperty *needle, IDP_Chain *parent_link)
{
- char *path= NULL;
+ char *path = NULL;
IDP_Chain link;
IDProperty *iter;
@@ -3936,50 +3936,50 @@ static char *rna_idp_path(PointerRNA *ptr, IDProperty *haystack, IDProperty *nee
BLI_assert(haystack->type == IDP_GROUP);
- link.up= parent_link;
- link.name= NULL;
- link.index= -1;
+ link.up = parent_link;
+ link.name = NULL;
+ link.index = -1;
- for (i=0, iter= haystack->data.group.first; iter; iter= iter->next, i++) {
- if(needle == iter) { /* found! */
- link.name= iter->name;
- path= rna_idp_path_create(&link);
+ for (i = 0, iter = haystack->data.group.first; iter; iter = iter->next, i++) {
+ if (needle == iter) { /* found! */
+ link.name = iter->name;
+ path = rna_idp_path_create(&link);
break;
}
else {
- if(iter->type == IDP_GROUP) {
+ if (iter->type == IDP_GROUP) {
/* ensure this is RNA */
- PointerRNA child_ptr= RNA_pointer_get(ptr, iter->name);
- if(child_ptr.type) {
- link.name= iter->name;
- if((path= rna_idp_path(&child_ptr, iter, needle, &link))) {
+ PointerRNA child_ptr = RNA_pointer_get(ptr, iter->name);
+ if (child_ptr.type) {
+ link.name = iter->name;
+ if ((path = rna_idp_path(&child_ptr, iter, needle, &link))) {
break;
}
}
}
else if (iter->type == IDP_IDPARRAY) {
- PropertyRNA *prop= RNA_struct_find_property(ptr, iter->name);
- if(prop && prop->type == PROP_COLLECTION) {
- IDProperty *array= IDP_IDPArray(iter);
- if(needle >= array && needle < (iter->len + array)) { /* found! */
- link.name= iter->name;
- link.index= (int)(needle - array);
- path= rna_idp_path_create(&link);
+ PropertyRNA *prop = RNA_struct_find_property(ptr, iter->name);
+ if (prop && prop->type == PROP_COLLECTION) {
+ IDProperty *array = IDP_IDPArray(iter);
+ if (needle >= array && needle < (iter->len + array)) { /* found! */
+ link.name = iter->name;
+ link.index = (int)(needle - array);
+ path = rna_idp_path_create(&link);
break;
}
else {
int i;
- link.name= iter->name;
- for(i= 0; i < iter->len; i++, array++) {
+ link.name = iter->name;
+ for (i = 0; i < iter->len; i++, array++) {
PointerRNA child_ptr;
- if(RNA_property_collection_lookup_int(ptr, prop, i, &child_ptr)) {
- link.index= i;
- if((path= rna_idp_path(&child_ptr, array, needle, &link))) {
+ if (RNA_property_collection_lookup_int(ptr, prop, i, &child_ptr)) {
+ link.index = i;
+ if ((path = rna_idp_path(&child_ptr, array, needle, &link))) {
break;
}
}
}
- if(path)
+ if (path)
break;
}
}
@@ -4002,9 +4002,9 @@ static char *rna_path_from_ID_to_idpgroup(PointerRNA *ptr)
* unless this is added only way to find this is to also search all bones and pose bones of an armature or object */
RNA_id_pointer_create(ptr->id.data, &id_ptr);
- haystack= RNA_struct_idprops(&id_ptr, FALSE);
- if(haystack) { /* can fail when called on bones */
- needle= ptr->data;
+ haystack = RNA_struct_idprops(&id_ptr, FALSE);
+ if (haystack) { /* can fail when called on bones */
+ needle = ptr->data;
return rna_idp_path(&id_ptr, haystack, needle, NULL);
}
else {
@@ -4014,17 +4014,17 @@ static char *rna_path_from_ID_to_idpgroup(PointerRNA *ptr)
char *RNA_path_from_ID_to_struct(PointerRNA *ptr)
{
- char *ptrpath=NULL;
+ char *ptrpath = NULL;
- if(!ptr->id.data || !ptr->data)
+ if (!ptr->id.data || !ptr->data)
return NULL;
- if(!RNA_struct_is_ID(ptr->type)) {
- if(ptr->type->path) {
+ if (!RNA_struct_is_ID(ptr->type)) {
+ if (ptr->type->path) {
/* if type has a path to some ID, use it */
- ptrpath= ptr->type->path(ptr);
+ ptrpath = ptr->type->path(ptr);
}
- else if(ptr->type->nested && RNA_struct_is_ID(ptr->type->nested)) {
+ else if (ptr->type->nested && RNA_struct_is_ID(ptr->type->nested)) {
PointerRNA parentptr;
PropertyRNA *userprop;
@@ -4032,12 +4032,12 @@ char *RNA_path_from_ID_to_struct(PointerRNA *ptr)
* use its identifier as the first part of the path used...
*/
RNA_id_pointer_create(ptr->id.data, &parentptr);
- userprop= RNA_struct_find_nested(&parentptr, ptr->type);
+ userprop = RNA_struct_find_nested(&parentptr, ptr->type);
- if(userprop)
- ptrpath= BLI_strdup(RNA_property_identifier(userprop));
+ if (userprop)
+ ptrpath = BLI_strdup(RNA_property_identifier(userprop));
else
- return NULL; // can't do anything about this case yet...
+ return NULL; /* can't do anything about this case yet... */
}
else if (RNA_struct_is_a(ptr->type, &RNA_PropertyGroup)) {
/* special case, easier to deal with here then in ptr->type->path() */
@@ -4056,23 +4056,23 @@ char *RNA_path_from_ID_to_property(PointerRNA *ptr, PropertyRNA *prop)
const char *propname;
char *ptrpath, *path;
- if(!ptr->id.data || !ptr->data || !prop)
+ if (!ptr->id.data || !ptr->data || !prop)
return NULL;
/* path from ID to the struct holding this property */
- ptrpath= RNA_path_from_ID_to_struct(ptr);
+ ptrpath = RNA_path_from_ID_to_struct(ptr);
- propname= RNA_property_identifier(prop);
+ propname = RNA_property_identifier(prop);
- if(ptrpath) {
- path= BLI_sprintfN(is_rna ? "%s.%s":"%s[\"%s\"]", ptrpath, propname);
+ if (ptrpath) {
+ path = BLI_sprintfN(is_rna ? "%s.%s":"%s[\"%s\"]", ptrpath, propname);
MEM_freeN(ptrpath);
}
else {
- if(is_rna)
- path= BLI_strdup(propname);
+ if (is_rna)
+ path = BLI_strdup(propname);
else
- path= BLI_sprintfN("[\"%s\"]", propname);
+ path = BLI_sprintfN("[\"%s\"]", propname);
}
return path;
@@ -4082,9 +4082,9 @@ char *RNA_path_from_ID_to_property(PointerRNA *ptr, PropertyRNA *prop)
int RNA_boolean_get(PointerRNA *ptr, const char *name)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, name);
+ PropertyRNA *prop = RNA_struct_find_property(ptr, name);
- if(prop) {
+ if (prop) {
return RNA_property_boolean_get(ptr, prop);
}
else {
@@ -4095,9 +4095,9 @@ int RNA_boolean_get(PointerRNA *ptr, const char *name)
void RNA_boolean_set(PointerRNA *ptr, const char *name, int value)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, name);
+ PropertyRNA *prop = RNA_struct_find_property(ptr, name);
- if(prop)
+ if (prop)
RNA_property_boolean_set(ptr, prop, value);
else
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
@@ -4105,9 +4105,9 @@ void RNA_boolean_set(PointerRNA *ptr, const char *name, int value)
void RNA_boolean_get_array(PointerRNA *ptr, const char *name, int *values)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, name);
+ PropertyRNA *prop = RNA_struct_find_property(ptr, name);
- if(prop)
+ if (prop)
RNA_property_boolean_get_array(ptr, prop, values);
else
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
@@ -4115,9 +4115,9 @@ void RNA_boolean_get_array(PointerRNA *ptr, const char *name, int *values)
void RNA_boolean_set_array(PointerRNA *ptr, const char *name, const int *values)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, name);
+ PropertyRNA *prop = RNA_struct_find_property(ptr, name);
- if(prop)
+ if (prop)
RNA_property_boolean_set_array(ptr, prop, values);
else
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
@@ -4125,9 +4125,9 @@ void RNA_boolean_set_array(PointerRNA *ptr, const char *name, const int *values)
int RNA_int_get(PointerRNA *ptr, const char *name)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, name);
+ PropertyRNA *prop = RNA_struct_find_property(ptr, name);
- if(prop) {
+ if (prop) {
return RNA_property_int_get(ptr, prop);
}
else {
@@ -4138,9 +4138,9 @@ int RNA_int_get(PointerRNA *ptr, const char *name)
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, name);
+ PropertyRNA *prop = RNA_struct_find_property(ptr, name);
- if(prop)
+ if (prop)
RNA_property_int_set(ptr, prop, value);
else
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
@@ -4148,9 +4148,9 @@ void RNA_int_set(PointerRNA *ptr, const char *name, int value)
void RNA_int_get_array(PointerRNA *ptr, const char *name, int *values)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, name);
+ PropertyRNA *prop = RNA_struct_find_property(ptr, name);
- if(prop)
+ if (prop)
RNA_property_int_get_array(ptr, prop, values);
else
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
@@ -4158,9 +4158,9 @@ void RNA_int_get_array(PointerRNA *ptr, const char *name, int *values)
void RNA_int_set_array(PointerRNA *ptr, const char *name, const int *values)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, name);
+ PropertyRNA *prop = RNA_struct_find_property(ptr, name);
- if(prop)
+ if (prop)
RNA_property_int_set_array(ptr, prop, values);
else
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
@@ -4168,9 +4168,9 @@ void RNA_int_set_array(PointerRNA *ptr, const char *name, const int *values)
float RNA_float_get(PointerRNA *ptr, const char *name)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, name);
+ PropertyRNA *prop = RNA_struct_find_property(ptr, name);
- if(prop) {
+ if (prop) {
return RNA_property_float_get(ptr, prop);
}
else {
@@ -4181,9 +4181,9 @@ float RNA_float_get(PointerRNA *ptr, const char *name)
void RNA_float_set(PointerRNA *ptr, const char *name, float value)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, name);
+ PropertyRNA *prop = RNA_struct_find_property(ptr, name);
- if(prop)
+ if (prop)
RNA_property_float_set(ptr, prop, value);
else
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
@@ -4191,9 +4191,9 @@ void RNA_float_set(PointerRNA *ptr, const char *name, float value)
void RNA_float_get_array(PointerRNA *ptr, const char *name, float *values)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, name);
+ PropertyRNA *prop = RNA_struct_find_property(ptr, name);
- if(prop)
+ if (prop)
RNA_property_float_get_array(ptr, prop, values);
else
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
@@ -4201,9 +4201,9 @@ void RNA_float_get_array(PointerRNA *ptr, const char *name, float *values)
void RNA_float_set_array(PointerRNA *ptr, const char *name, const float *values)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, name);
+ PropertyRNA *prop = RNA_struct_find_property(ptr, name);
- if(prop)
+ if (prop)
RNA_property_float_set_array(ptr, prop, values);
else
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
@@ -4211,9 +4211,9 @@ void RNA_float_set_array(PointerRNA *ptr, const char *name, const float *values)
int RNA_enum_get(PointerRNA *ptr, const char *name)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, name);
+ PropertyRNA *prop = RNA_struct_find_property(ptr, name);
- if(prop) {
+ if (prop) {
return RNA_property_enum_get(ptr, prop);
}
else {
@@ -4224,9 +4224,9 @@ int RNA_enum_get(PointerRNA *ptr, const char *name)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, name);
+ PropertyRNA *prop = RNA_struct_find_property(ptr, name);
- if(prop)
+ if (prop)
RNA_property_enum_set(ptr, prop, value);
else
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
@@ -4234,11 +4234,11 @@ void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
void RNA_enum_set_identifier(PointerRNA *ptr, const char *name, const char *id)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, name);
+ PropertyRNA *prop = RNA_struct_find_property(ptr, name);
- if(prop) {
+ if (prop) {
int value;
- if(RNA_property_enum_value(NULL, ptr, prop, id, &value))
+ if (RNA_property_enum_value(NULL, ptr, prop, id, &value))
RNA_property_enum_set(ptr, prop, value);
else
printf("%s: %s.%s has no enum id '%s'.\n", __func__, ptr->type->identifier, name, id);
@@ -4250,18 +4250,18 @@ void RNA_enum_set_identifier(PointerRNA *ptr, const char *name, const char *id)
int RNA_enum_is_equal(bContext *C, PointerRNA *ptr, const char *name, const char *enumname)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, name);
+ PropertyRNA *prop = RNA_struct_find_property(ptr, name);
EnumPropertyItem *item;
int free;
- if(prop) {
+ if (prop) {
RNA_property_enum_items(C, ptr, prop, &item, NULL, &free);
- for(; item->identifier; item++)
- if(strcmp(item->identifier, enumname) == 0)
+ for (; item->identifier; item++)
+ if (strcmp(item->identifier, enumname) == 0)
return (item->value == RNA_property_enum_get(ptr, prop));
- if(free)
+ if (free)
MEM_freeN(item);
printf("%s: %s.%s item %s not found.\n", __func__, ptr->type->identifier, name, enumname);
@@ -4275,9 +4275,9 @@ int RNA_enum_is_equal(bContext *C, PointerRNA *ptr, const char *name, const char
int RNA_enum_value_from_id(EnumPropertyItem *item, const char *identifier, int *value)
{
- for( ; item->identifier; item++) {
- if(strcmp(item->identifier, identifier)==0) {
- *value= item->value;
+ for ( ; item->identifier; item++) {
+ if (strcmp(item->identifier, identifier) == 0) {
+ *value = item->value;
return 1;
}
}
@@ -4287,9 +4287,9 @@ int RNA_enum_value_from_id(EnumPropertyItem *item, const char *identifier, int *
int RNA_enum_id_from_value(EnumPropertyItem *item, int value, const char **identifier)
{
- for( ; item->identifier; item++) {
- if(item->value==value) {
- *identifier= item->identifier;
+ for ( ; item->identifier; item++) {
+ if (item->value == value) {
+ *identifier = item->identifier;
return 1;
}
}
@@ -4299,8 +4299,8 @@ int RNA_enum_id_from_value(EnumPropertyItem *item, int value, const char **ident
int RNA_enum_icon_from_value(EnumPropertyItem *item, int value, int *icon)
{
- for( ; item->identifier; item++) {
- if(item->value==value) {
+ for ( ; item->identifier; item++) {
+ if (item->value == value) {
*icon = item->icon;
return 1;
}
@@ -4311,22 +4311,22 @@ int RNA_enum_icon_from_value(EnumPropertyItem *item, int value, int *icon)
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, name);
+ PropertyRNA *prop = RNA_struct_find_property(ptr, name);
- if(prop) {
+ if (prop) {
RNA_property_string_get(ptr, prop, value);
}
else {
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
- value[0]= '\0';
+ value[0] = '\0';
}
}
char *RNA_string_get_alloc(PointerRNA *ptr, const char *name, char *fixedbuf, int fixedlen)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, name);
+ PropertyRNA *prop = RNA_struct_find_property(ptr, name);
- if(prop) {
+ if (prop) {
return RNA_property_string_get_alloc(ptr, prop, fixedbuf, fixedlen, NULL); /* TODO, pass length */
}
else {
@@ -4337,9 +4337,9 @@ char *RNA_string_get_alloc(PointerRNA *ptr, const char *name, char *fixedbuf, in
int RNA_string_length(PointerRNA *ptr, const char *name)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, name);
+ PropertyRNA *prop = RNA_struct_find_property(ptr, name);
- if(prop) {
+ if (prop) {
return RNA_property_string_length(ptr, prop);
}
else {
@@ -4350,9 +4350,9 @@ int RNA_string_length(PointerRNA *ptr, const char *name)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, name);
+ PropertyRNA *prop = RNA_struct_find_property(ptr, name);
- if(prop)
+ if (prop)
RNA_property_string_set(ptr, prop, value);
else
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
@@ -4360,9 +4360,9 @@ void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
PointerRNA RNA_pointer_get(PointerRNA *ptr, const char *name)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, name);
+ PropertyRNA *prop = RNA_struct_find_property(ptr, name);
- if(prop) {
+ if (prop) {
return RNA_property_pointer_get(ptr, prop);
}
else {
@@ -4374,9 +4374,9 @@ PointerRNA RNA_pointer_get(PointerRNA *ptr, const char *name)
void RNA_pointer_set(PointerRNA *ptr, const char *name, PointerRNA ptr_value)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, name);
+ PropertyRNA *prop = RNA_struct_find_property(ptr, name);
- if(prop) {
+ if (prop) {
RNA_property_pointer_set(ptr, prop, ptr_value);
}
else {
@@ -4386,9 +4386,9 @@ void RNA_pointer_set(PointerRNA *ptr, const char *name, PointerRNA ptr_value)
void RNA_pointer_add(PointerRNA *ptr, const char *name)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, name);
+ PropertyRNA *prop = RNA_struct_find_property(ptr, name);
- if(prop)
+ if (prop)
RNA_property_pointer_add(ptr, prop);
else
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
@@ -4396,9 +4396,9 @@ void RNA_pointer_add(PointerRNA *ptr, const char *name)
void RNA_collection_begin(PointerRNA *ptr, const char *name, CollectionPropertyIterator *iter)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, name);
+ PropertyRNA *prop = RNA_struct_find_property(ptr, name);
- if(prop)
+ if (prop)
RNA_property_collection_begin(ptr, prop, iter);
else
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
@@ -4406,9 +4406,9 @@ void RNA_collection_begin(PointerRNA *ptr, const char *name, CollectionPropertyI
void RNA_collection_add(PointerRNA *ptr, const char *name, PointerRNA *r_value)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, name);
+ PropertyRNA *prop = RNA_struct_find_property(ptr, name);
- if(prop)
+ if (prop)
RNA_property_collection_add(ptr, prop, r_value);
else
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
@@ -4416,9 +4416,9 @@ void RNA_collection_add(PointerRNA *ptr, const char *name, PointerRNA *r_value)
void RNA_collection_clear(PointerRNA *ptr, const char *name)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, name);
+ PropertyRNA *prop = RNA_struct_find_property(ptr, name);
- if(prop)
+ if (prop)
RNA_property_collection_clear(ptr, prop);
else
printf("%s: %s.%s not found.\n", __func__, ptr->type->identifier, name);
@@ -4426,9 +4426,9 @@ void RNA_collection_clear(PointerRNA *ptr, const char *name)
int RNA_collection_length(PointerRNA *ptr, const char *name)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, name);
+ PropertyRNA *prop = RNA_struct_find_property(ptr, name);
- if(prop) {
+ if (prop) {
return RNA_property_collection_length(ptr, prop);
}
else {
@@ -4439,7 +4439,7 @@ int RNA_collection_length(PointerRNA *ptr, const char *name)
int RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
{
- if(prop->flag & PROP_IDPROPERTY) {
+ if (prop->flag & PROP_IDPROPERTY) {
IDProperty *idprop = rna_idproperty_find(ptr, prop->identifier);
return ((idprop != NULL) && !(idprop->flag & IDP_FLAG_GHOST));
}
@@ -4450,9 +4450,9 @@ int RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
int RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, identifier);
+ PropertyRNA *prop = RNA_struct_find_property(ptr, identifier);
- if(prop) {
+ if (prop) {
return RNA_property_is_set(ptr, prop);
}
else {
@@ -4464,7 +4464,7 @@ int RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
int RNA_property_is_idprop(PropertyRNA *prop)
{
- return (prop->magic!=RNA_MAGIC);
+ return (prop->magic != RNA_MAGIC);
}
/* string representation of a property, python
@@ -4472,7 +4472,7 @@ int RNA_property_is_idprop(PropertyRNA *prop)
* context may be NULL */
char *RNA_pointer_as_string(bContext *C, PointerRNA *ptr)
{
- DynStr *dynstr= BLI_dynstr_new();
+ DynStr *dynstr = BLI_dynstr_new();
char *cstring;
const char *propname;
@@ -4483,12 +4483,12 @@ char *RNA_pointer_as_string(bContext *C, PointerRNA *ptr)
RNA_STRUCT_BEGIN(ptr, prop) {
propname = RNA_property_identifier(prop);
- if(strcmp(propname, "rna_type")==0)
+ if (strcmp(propname, "rna_type") == 0)
continue;
- if(first_time==0)
+ if (first_time == 0)
BLI_dynstr_append(dynstr, ", ");
- first_time= 0;
+ first_time = 0;
cstring = RNA_property_as_string(C, ptr, prop);
BLI_dynstr_appendf(dynstr, "\"%s\":%s", propname, cstring);
@@ -4510,50 +4510,50 @@ char *RNA_property_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
int len = RNA_property_array_length(ptr, prop);
int i;
- DynStr *dynstr= BLI_dynstr_new();
+ DynStr *dynstr = BLI_dynstr_new();
char *cstring;
/* see if we can coorce into a python type - PropertyType */
switch (type) {
case PROP_BOOLEAN:
- if(len==0) {
+ if (len == 0) {
BLI_dynstr_append(dynstr, RNA_property_boolean_get(ptr, prop) ? "True" : "False");
}
else {
BLI_dynstr_append(dynstr, "(");
- for(i=0; i<len; i++) {
+ for (i = 0; i<len; i++) {
BLI_dynstr_appendf(dynstr, i?", %s":"%s", RNA_property_boolean_get_index(ptr, prop, i) ? "True" : "False");
}
- if(len==1)
+ if (len == 1)
BLI_dynstr_append(dynstr, ","); /* otherwise python wont see it as a tuple */
BLI_dynstr_append(dynstr, ")");
}
break;
case PROP_INT:
- if(len==0) {
+ if (len == 0) {
BLI_dynstr_appendf(dynstr, "%d", RNA_property_int_get(ptr, prop));
}
else {
BLI_dynstr_append(dynstr, "(");
- for(i=0; i<len; i++) {
+ for (i = 0; i<len; i++) {
BLI_dynstr_appendf(dynstr, i?", %d":"%d", RNA_property_int_get_index(ptr, prop, i));
}
- if(len==1)
+ if (len == 1)
BLI_dynstr_append(dynstr, ","); /* otherwise python wont see it as a tuple */
BLI_dynstr_append(dynstr, ")");
}
break;
case PROP_FLOAT:
- if(len==0) {
+ if (len == 0) {
BLI_dynstr_appendf(dynstr, "%g", RNA_property_float_get(ptr, prop));
}
else {
BLI_dynstr_append(dynstr, "(");
- for(i=0; i<len; i++) {
+ for (i = 0; i<len; i++) {
BLI_dynstr_appendf(dynstr, i?", %g":"%g", RNA_property_float_get_index(ptr, prop, i));
}
- if(len==1)
+ if (len == 1)
BLI_dynstr_append(dynstr, ","); /* otherwise python wont see it as a tuple */
BLI_dynstr_append(dynstr, ")");
}
@@ -4564,9 +4564,9 @@ char *RNA_property_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
char *buf;
int length;
- length= RNA_property_string_length(ptr, prop);
- buf= MEM_mallocN(sizeof(char)*(length+1), "RNA_property_as_string");
- buf_esc= MEM_mallocN(sizeof(char)*(length*2+1), "RNA_property_as_string esc");
+ length = RNA_property_string_length(ptr, prop);
+ buf = MEM_mallocN(sizeof(char)*(length+1), "RNA_property_as_string");
+ buf_esc = MEM_mallocN(sizeof(char)*(length*2+1), "RNA_property_as_string esc");
RNA_property_string_get(ptr, prop, buf);
BLI_strescape(buf_esc, buf, length*2+1);
MEM_freeN(buf);
@@ -4580,31 +4580,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_flag(prop) & PROP_ENUM_FLAG) {
+ if (RNA_property_flag(prop) & PROP_ENUM_FLAG) {
/* represent as a python set */
- EnumPropertyItem *item= NULL;
+ 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;
+ if (item) {
+ short is_first = TRUE;
for (; item->identifier; item++) {
- if(item->identifier[0] && item->value & val) {
+ if (item->identifier[0] && item->value & val) {
BLI_dynstr_appendf(dynstr, is_first ? "'%s'" : ", '%s'", item->identifier);
- is_first= FALSE;
+ is_first = FALSE;
}
}
- if(free) {
+ if (free) {
MEM_freeN(item);
}
}
BLI_dynstr_append(dynstr, "}");
}
- else if(RNA_property_enum_identifier(C, ptr, prop, val, &identifier)) {
+ else if (RNA_property_enum_identifier(C, ptr, prop, val, &identifier)) {
BLI_dynstr_appendf(dynstr, "'%s'", identifier);
}
else {
@@ -4614,8 +4614,8 @@ char *RNA_property_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
}
case PROP_POINTER:
{
- PointerRNA tptr= RNA_property_pointer_get(ptr, prop);
- cstring= RNA_pointer_as_string(C, &tptr);
+ PointerRNA tptr = RNA_property_pointer_get(ptr, prop);
+ cstring = RNA_pointer_as_string(C, &tptr);
BLI_dynstr_append(dynstr, cstring);
MEM_freeN(cstring);
break;
@@ -4626,15 +4626,15 @@ char *RNA_property_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
CollectionPropertyIterator collect_iter;
BLI_dynstr_append(dynstr, "[");
- for(RNA_property_collection_begin(ptr, prop, &collect_iter); collect_iter.valid; RNA_property_collection_next(&collect_iter)) {
- PointerRNA itemptr= collect_iter.ptr;
+ for (RNA_property_collection_begin(ptr, prop, &collect_iter); collect_iter.valid; RNA_property_collection_next(&collect_iter)) {
+ PointerRNA itemptr = collect_iter.ptr;
- if(first_time==0)
+ if (first_time == 0)
BLI_dynstr_append(dynstr, ", ");
- first_time= 0;
+ first_time = 0;
/* now get every prop of the collection */
- cstring= RNA_pointer_as_string(C, &itemptr);
+ cstring = RNA_pointer_as_string(C, &itemptr);
BLI_dynstr_append(dynstr, cstring);
MEM_freeN(cstring);
}
@@ -4696,58 +4696,58 @@ ParameterList *RNA_parameter_list_create(ParameterList *parms, PointerRNA *UNUSE
{
PropertyRNA *parm;
void *data;
- int alloc_size= 0, size;
+ int alloc_size = 0, size;
- parms->arg_count= 0;
- parms->ret_count= 0;
+ parms->arg_count = 0;
+ parms->ret_count = 0;
/* allocate data */
- for(parm= func->cont.properties.first; parm; parm= parm->next) {
+ for (parm = func->cont.properties.first; parm; parm = parm->next) {
alloc_size += rna_parameter_size_alloc(parm);
- if(parm->flag & PROP_OUTPUT)
+ if (parm->flag & PROP_OUTPUT)
parms->ret_count++;
else
parms->arg_count++;
}
- parms->data= MEM_callocN(alloc_size, "RNA_parameter_list_create");
- parms->func= func;
- parms->alloc_size= alloc_size;
+ parms->data = MEM_callocN(alloc_size, "RNA_parameter_list_create");
+ parms->func = func;
+ parms->alloc_size = alloc_size;
/* set default values */
- data= parms->data;
+ data = parms->data;
- for(parm= func->cont.properties.first; parm; parm= parm->next) {
- size= rna_parameter_size(parm);
+ for (parm = func->cont.properties.first; parm; parm = parm->next) {
+ size = rna_parameter_size(parm);
/* set length to 0, these need to be set later, see bpy_array.c's py_to_array */
if (parm->flag & PROP_DYNAMIC) {
- ParameterDynAlloc *data_alloc= data;
- data_alloc->array_tot= 0;
- data_alloc->array= NULL;
+ ParameterDynAlloc *data_alloc = data;
+ data_alloc->array_tot = 0;
+ data_alloc->array = NULL;
}
- if(!(parm->flag & PROP_REQUIRED) && !(parm->flag & PROP_DYNAMIC)) {
- switch(parm->type) {
+ if (!(parm->flag & PROP_REQUIRED) && !(parm->flag & PROP_DYNAMIC)) {
+ switch (parm->type) {
case PROP_BOOLEAN:
- if(parm->arraydimension) memcpy(data, ((BoolPropertyRNA*)parm)->defaultarray, size);
+ if (parm->arraydimension) memcpy(data, ((BoolPropertyRNA*)parm)->defaultarray, size);
else memcpy(data, &((BoolPropertyRNA*)parm)->defaultvalue, size);
break;
case PROP_INT:
- if(parm->arraydimension) memcpy(data, ((IntPropertyRNA*)parm)->defaultarray, size);
+ if (parm->arraydimension) memcpy(data, ((IntPropertyRNA*)parm)->defaultarray, size);
else memcpy(data, &((IntPropertyRNA*)parm)->defaultvalue, size);
break;
case PROP_FLOAT:
- if(parm->arraydimension) memcpy(data, ((FloatPropertyRNA*)parm)->defaultarray, size);
+ if (parm->arraydimension) memcpy(data, ((FloatPropertyRNA*)parm)->defaultarray, size);
else memcpy(data, &((FloatPropertyRNA*)parm)->defaultvalue, size);
break;
case PROP_ENUM:
memcpy(data, &((EnumPropertyRNA*)parm)->defaultvalue, size);
break;
case PROP_STRING: {
- const char *defvalue= ((StringPropertyRNA*)parm)->defaultvalue;
- if(defvalue && defvalue[0]) {
+ const char *defvalue = ((StringPropertyRNA*)parm)->defaultvalue;
+ if (defvalue && defvalue[0]) {
/* causes bug [#29988], possibly this is only correct for thick wrapped
* need to look further into it - campbell */
#if 0
@@ -4764,7 +4764,7 @@ ParameterList *RNA_parameter_list_create(ParameterList *parms, PointerRNA *UNUSE
}
}
- data= ((char*)data) + rna_parameter_size_alloc(parm);
+ data = ((char*)data) + rna_parameter_size_alloc(parm);
}
return parms;
@@ -4775,24 +4775,24 @@ void RNA_parameter_list_free(ParameterList *parms)
PropertyRNA *parm;
int tot;
- parm= parms->func->cont.properties.first;
- for(tot= 0; parm; parm= parm->next) {
- if(parm->type == PROP_COLLECTION)
+ parm = parms->func->cont.properties.first;
+ for (tot = 0; parm; parm = parm->next) {
+ if (parm->type == PROP_COLLECTION)
BLI_freelistN((ListBase*)((char*)parms->data+tot));
else if (parm->flag & PROP_DYNAMIC) {
/* for dynamic arrays and strings, data is a pointer to an array */
- ParameterDynAlloc *data_alloc= (void *)(((char *)parms->data) + tot);
- if(data_alloc->array)
+ ParameterDynAlloc *data_alloc = (void *)(((char *)parms->data) + tot);
+ if (data_alloc->array)
MEM_freeN(data_alloc->array);
}
- tot+= rna_parameter_size_alloc(parm);
+ tot += rna_parameter_size_alloc(parm);
}
MEM_freeN(parms->data);
- parms->data= NULL;
+ parms->data = NULL;
- parms->func= NULL;
+ parms->func = NULL;
}
int RNA_parameter_list_size(ParameterList *parms)
@@ -4815,26 +4815,26 @@ void RNA_parameter_list_begin(ParameterList *parms, ParameterIterator *iter)
/* may be useful but unused now */
/* RNA_pointer_create(NULL, &RNA_Function, parms->func, &iter->funcptr); */ /*UNUSED*/
- iter->parms= parms;
- iter->parm= parms->func->cont.properties.first;
- iter->valid= iter->parm != NULL;
- iter->offset= 0;
+ iter->parms = parms;
+ iter->parm = parms->func->cont.properties.first;
+ iter->valid = iter->parm != NULL;
+ iter->offset = 0;
- if(iter->valid) {
- iter->size= rna_parameter_size_alloc(iter->parm);
- iter->data= (((char*)iter->parms->data)); /* +iter->offset, always 0 */
+ if (iter->valid) {
+ iter->size = rna_parameter_size_alloc(iter->parm);
+ iter->data = (((char*)iter->parms->data)); /* +iter->offset, always 0 */
}
}
void RNA_parameter_list_next(ParameterIterator *iter)
{
- iter->offset+= iter->size;
- iter->parm= iter->parm->next;
- iter->valid= iter->parm != NULL;
+ iter->offset += iter->size;
+ iter->parm = iter->parm->next;
+ iter->valid = iter->parm != NULL;
- if(iter->valid) {
- iter->size= rna_parameter_size_alloc(iter->parm);
- iter->data= (((char*)iter->parms->data)+iter->offset);
+ if (iter->valid) {
+ iter->size = rna_parameter_size_alloc(iter->parm);
+ iter->data = (((char*)iter->parms->data)+iter->offset);
}
}
@@ -4849,14 +4849,14 @@ void RNA_parameter_get(ParameterList *parms, PropertyRNA *parm, void **value)
RNA_parameter_list_begin(parms, &iter);
- for(; iter.valid; RNA_parameter_list_next(&iter))
- if(iter.parm==parm)
+ for (; iter.valid; RNA_parameter_list_next(&iter))
+ if (iter.parm == parm)
break;
- if(iter.valid)
- *value= iter.data;
+ if (iter.valid)
+ *value = iter.data;
else
- *value= NULL;
+ *value = NULL;
RNA_parameter_list_end(&iter);
}
@@ -4865,12 +4865,12 @@ void RNA_parameter_get_lookup(ParameterList *parms, const char *identifier, void
{
PropertyRNA *parm;
- parm= parms->func->cont.properties.first;
- for(; parm; parm= parm->next)
- if(strcmp(RNA_property_identifier(parm), identifier)==0)
+ parm = parms->func->cont.properties.first;
+ for (; parm; parm = parm->next)
+ if (strcmp(RNA_property_identifier(parm), identifier) == 0)
break;
- if(parm)
+ if (parm)
RNA_parameter_get(parms, parm, value);
}
@@ -4880,11 +4880,11 @@ void RNA_parameter_set(ParameterList *parms, PropertyRNA *parm, const void *valu
RNA_parameter_list_begin(parms, &iter);
- for(; iter.valid; RNA_parameter_list_next(&iter))
- if(iter.parm==parm)
+ for (; iter.valid; RNA_parameter_list_next(&iter))
+ if (iter.parm == parm)
break;
- if(iter.valid)
+ if (iter.valid)
memcpy(iter.data, value, iter.size);
RNA_parameter_list_end(&iter);
@@ -4894,28 +4894,28 @@ void RNA_parameter_set_lookup(ParameterList *parms, const char *identifier, cons
{
PropertyRNA *parm;
- parm= parms->func->cont.properties.first;
- for(; parm; parm= parm->next)
- if(strcmp(RNA_property_identifier(parm), identifier)==0)
+ parm = parms->func->cont.properties.first;
+ for (; parm; parm = parm->next)
+ if (strcmp(RNA_property_identifier(parm), identifier) == 0)
break;
- if(parm)
+ if (parm)
RNA_parameter_set(parms, parm, value);
}
int RNA_parameter_length_get(ParameterList *parms, PropertyRNA *parm)
{
ParameterIterator iter;
- int len= 0;
+ int len = 0;
RNA_parameter_list_begin(parms, &iter);
- for(; iter.valid; RNA_parameter_list_next(&iter))
- if(iter.parm==parm)
+ for (; iter.valid; RNA_parameter_list_next(&iter))
+ if (iter.parm == parm)
break;
- if(iter.valid)
- len= RNA_parameter_length_get_data(parms, parm, iter.data);
+ if (iter.valid)
+ len = RNA_parameter_length_get_data(parms, parm, iter.data);
RNA_parameter_list_end(&iter);
@@ -4928,11 +4928,11 @@ void RNA_parameter_length_set(ParameterList *parms, PropertyRNA *parm, int lengt
RNA_parameter_list_begin(parms, &iter);
- for(; iter.valid; RNA_parameter_list_next(&iter))
- if(iter.parm==parm)
+ for (; iter.valid; RNA_parameter_list_next(&iter))
+ if (iter.parm == parm)
break;
- if(iter.valid)
+ if (iter.valid)
RNA_parameter_length_set_data(parms, parm, iter.data, length);
RNA_parameter_list_end(&iter);
@@ -4945,12 +4945,12 @@ int RNA_parameter_length_get_data(ParameterList *UNUSED(parms), PropertyRNA *UNU
void RNA_parameter_length_set_data(ParameterList *UNUSED(parms), PropertyRNA *UNUSED(parm), void *data, int length)
{
- *((int *)data)= length;
+ *((int *)data) = length;
}
int RNA_function_call(bContext *C, ReportList *reports, PointerRNA *ptr, FunctionRNA *func, ParameterList *parms)
{
- if(func->call) {
+ if (func->call) {
func->call(C, reports, ptr, parms);
return 0;
@@ -4963,9 +4963,9 @@ int RNA_function_call_lookup(bContext *C, ReportList *reports, PointerRNA *ptr,
{
FunctionRNA *func;
- func= RNA_struct_find_function(ptr, identifier);
+ func = RNA_struct_find_function(ptr, identifier);
- if(func)
+ if (func)
return RNA_function_call(C, reports, ptr, func, parms);
return -1;
@@ -4978,7 +4978,7 @@ int RNA_function_call_direct(bContext *C, ReportList *reports, PointerRNA *ptr,
va_start(args, format);
- ret= RNA_function_call_direct_va(C, reports, ptr, func, format, args);
+ ret = RNA_function_call_direct_va(C, reports, ptr, func, format, args);
va_end(args);
@@ -4989,15 +4989,15 @@ int RNA_function_call_direct_lookup(bContext *C, ReportList *reports, PointerRNA
{
FunctionRNA *func;
- func= RNA_struct_find_function(ptr, identifier);
+ func = RNA_struct_find_function(ptr, identifier);
- if(func) {
+ if (func) {
va_list args;
int ret;
va_start(args, format);
- ret= RNA_function_call_direct_va(C, reports, ptr, func, format, args);
+ ret = RNA_function_call_direct_va(C, reports, ptr, func, format, args);
va_end(args);
@@ -5010,15 +5010,15 @@ int RNA_function_call_direct_lookup(bContext *C, ReportList *reports, PointerRNA
static int rna_function_format_array_length(const char *format, int ofs, int flen)
{
char lenbuf[16];
- int idx= 0;
+ int idx = 0;
- if (format[ofs++]=='[')
- for (; ofs<flen && format[ofs]!=']' && idx<sizeof(*lenbuf)-1; idx++, ofs++)
- lenbuf[idx]= format[ofs];
+ if (format[ofs++] =='[')
+ for (; ofs<flen && format[ofs] !=']' && idx<sizeof(*lenbuf)-1; idx++, ofs++)
+ lenbuf[idx] = format[ofs];
- if (ofs<flen && format[ofs+1]==']') {
+ if (ofs<flen && format[ofs+1] ==']') {
/* XXX put better error reporting for ofs>=flen or idx over lenbuf capacity */
- lenbuf[idx]= '\0';
+ lenbuf[idx] = '\0';
return atoi(lenbuf);
}
@@ -5034,13 +5034,13 @@ static int rna_function_parameter_parse(PointerRNA *ptr, PropertyRNA *prop, Prop
switch (type) {
case PROP_BOOLEAN:
{
- if (ftype!='b') {
+ if (ftype !='b') {
fprintf(stderr, "%s.%s: wrong type for parameter %s, a boolean was expected\n", tid, fid, pid);
return -1;
}
- if (len==0)
- *((int*)dest)= *((int*)src);
+ if (len == 0)
+ *((int*)dest) = *((int*)src);
else
memcpy(dest, src, len*sizeof(int));
@@ -5048,13 +5048,13 @@ static int rna_function_parameter_parse(PointerRNA *ptr, PropertyRNA *prop, Prop
}
case PROP_INT:
{
- if (ftype!='i') {
+ if (ftype !='i') {
fprintf(stderr, "%s.%s: wrong type for parameter %s, an integer was expected\n", tid, fid, pid);
return -1;
}
- if (len==0)
- *((int*)dest)= *((int*)src);
+ if (len == 0)
+ *((int*)dest) = *((int*)src);
else
memcpy(dest, src, len*sizeof(int));
@@ -5062,13 +5062,13 @@ static int rna_function_parameter_parse(PointerRNA *ptr, PropertyRNA *prop, Prop
}
case PROP_FLOAT:
{
- if (ftype!='f') {
+ if (ftype !='f') {
fprintf(stderr, "%s.%s: wrong type for parameter %s, a float was expected\n", tid, fid, pid);
return -1;
}
- if (len==0)
- *((float*)dest)= *((float*)src);
+ if (len == 0)
+ *((float*)dest) = *((float*)src);
else
memcpy(dest, src, len*sizeof(float));
@@ -5076,23 +5076,23 @@ static int rna_function_parameter_parse(PointerRNA *ptr, PropertyRNA *prop, Prop
}
case PROP_STRING:
{
- if (ftype!='s') {
+ if (ftype !='s') {
fprintf(stderr, "%s.%s: wrong type for parameter %s, a string was expected\n", tid, fid, pid);
return -1;
}
- *((char**)dest)= *((char**)src);
+ *((char**)dest) = *((char**)src);
break;
}
case PROP_ENUM:
{
- if (ftype!='e') {
+ if (ftype !='e') {
fprintf(stderr, "%s.%s: wrong type for parameter %s, an enum was expected\n", tid, fid, pid);
return -1;
}
- *((int*)dest)= *((int*)src);
+ *((int*)dest) = *((int*)src);
break;
}
@@ -5100,26 +5100,26 @@ static int rna_function_parameter_parse(PointerRNA *ptr, PropertyRNA *prop, Prop
{
StructRNA *ptype;
- if (ftype!='O') {
+ if (ftype !='O') {
fprintf(stderr, "%s.%s: wrong type for parameter %s, an object was expected\n", tid, fid, pid);
return -1;
}
- ptype= RNA_property_pointer_type(ptr, prop);
+ ptype = RNA_property_pointer_type(ptr, prop);
- if(prop->flag & PROP_RNAPTR) {
- *((PointerRNA*)dest)= *((PointerRNA*)src);
+ if (prop->flag & PROP_RNAPTR) {
+ *((PointerRNA*)dest) = *((PointerRNA*)src);
break;
}
- if (ptype!=srna && !RNA_struct_is_a(srna, ptype)) {
+ if (ptype != srna && !RNA_struct_is_a(srna, ptype)) {
fprintf(stderr, "%s.%s: wrong type for parameter %s, "
"an object of type %s was expected, passed an object of type %s\n",
tid, fid, pid, RNA_struct_identifier(ptype), RNA_struct_identifier(srna));
return -1;
}
- *((void**)dest)= *((void**)src);
+ *((void**)dest) = *((void**)src);
break;
}
@@ -5130,16 +5130,16 @@ static int rna_function_parameter_parse(PointerRNA *ptr, PropertyRNA *prop, Prop
Link *link;
CollectionPointerLink *clink;
- if (ftype!='C') {
+ if (ftype !='C') {
fprintf(stderr, "%s.%s: wrong type for parameter %s, a collection was expected\n", tid, fid, pid);
return -1;
}
- lb= (ListBase *)src;
- clb= (ListBase *)dest;
- ptype= RNA_property_pointer_type(ptr, prop);
+ lb = (ListBase *)src;
+ clb = (ListBase *)dest;
+ ptype = RNA_property_pointer_type(ptr, prop);
- if (ptype!=srna && !RNA_struct_is_a(srna, ptype)) {
+ if (ptype != srna && !RNA_struct_is_a(srna, ptype)) {
fprintf(stderr, "%s.%s: wrong type for parameter %s, "
"a collection of objects of type %s was expected, "
"passed a collection of objects of type %s\n",
@@ -5147,17 +5147,17 @@ static int rna_function_parameter_parse(PointerRNA *ptr, PropertyRNA *prop, Prop
return -1;
}
- for (link= lb->first; link; link= link->next) {
- clink= MEM_callocN(sizeof(CollectionPointerLink), "CCollectionPointerLink");
+ for (link = lb->first; link; link = link->next) {
+ clink = MEM_callocN(sizeof(CollectionPointerLink), "CCollectionPointerLink");
RNA_pointer_create(NULL, srna, link, &clink->ptr);
BLI_addtail(clb, clink);
}
break;
}
- default:
+ default:
{
- if (len==0)
+ if (len == 0)
fprintf(stderr, "%s.%s: unknown type for parameter %s\n", tid, fid, pid);
else
fprintf(stderr, "%s.%s: unknown array type for parameter %s\n", tid, fid, pid);
@@ -5176,38 +5176,38 @@ int RNA_function_call_direct_va(bContext *C, ReportList *reports, PointerRNA *pt
ParameterIterator iter;
PropertyRNA *pret, *parm;
PropertyType type;
- int i, ofs, flen, flag, len, alen, err= 0;
- const char *tid, *fid, *pid=NULL;
+ int i, ofs, flen, flag, len, alen, err = 0;
+ const char *tid, *fid, *pid = NULL;
char ftype;
- void **retdata=NULL;
+ void **retdata = NULL;
RNA_pointer_create(NULL, &RNA_Function, func, &funcptr);
- tid= RNA_struct_identifier(ptr->type);
- fid= RNA_function_identifier(func);
- pret= func->c_ret;
- flen= strlen(format);
+ tid = RNA_struct_identifier(ptr->type);
+ fid = RNA_function_identifier(func);
+ pret = func->c_ret;
+ flen = strlen(format);
RNA_parameter_list_create(&parms, ptr, func);
RNA_parameter_list_begin(&parms, &iter);
- for(i= 0, ofs= 0; iter.valid; RNA_parameter_list_next(&iter), i++) {
- parm= iter.parm;
- flag= RNA_property_flag(parm);
+ for (i = 0, ofs = 0; iter.valid; RNA_parameter_list_next(&iter), i++) {
+ parm = iter.parm;
+ flag = RNA_property_flag(parm);
- if(parm==pret) {
- retdata= iter.data;
+ if (parm == pret) {
+ retdata = iter.data;
continue;
}
else if (flag & PROP_OUTPUT) {
continue;
}
- pid= RNA_property_identifier(parm);
+ pid = RNA_property_identifier(parm);
- if (ofs>=flen || format[ofs]=='N') {
+ if (ofs >= flen || format[ofs] =='N') {
if (flag & PROP_REQUIRED) {
- err= -1;
+ err = -1;
fprintf(stderr, "%s.%s: missing required parameter %s\n", tid, fid, pid);
break;
}
@@ -5215,13 +5215,13 @@ int RNA_function_call_direct_va(bContext *C, ReportList *reports, PointerRNA *pt
continue;
}
- type= RNA_property_type(parm);
- ftype= format[ofs++];
- len= RNA_property_array_length(&funcptr, parm);
- alen= rna_function_format_array_length(format, ofs, flen);
+ type = RNA_property_type(parm);
+ ftype = format[ofs++];
+ len = RNA_property_array_length(&funcptr, parm);
+ alen = rna_function_format_array_length(format, ofs, flen);
- if (len!=alen) {
- err= -1;
+ if (len != alen) {
+ err = -1;
fprintf(stderr, "%s.%s: for parameter %s, "
"was expecting an array of %i elements, "
"passed %i elements instead\n",
@@ -5234,62 +5234,62 @@ int RNA_function_call_direct_va(bContext *C, ReportList *reports, PointerRNA *pt
case PROP_INT:
case PROP_ENUM:
{
- int arg= va_arg(args, int);
- err= rna_function_parameter_parse(&funcptr, parm, type, ftype, len, iter.data, &arg, NULL, tid, fid, pid);
+ int arg = va_arg(args, int);
+ err = rna_function_parameter_parse(&funcptr, parm, type, ftype, len, iter.data, &arg, NULL, tid, fid, pid);
break;
}
case PROP_FLOAT:
{
- double arg= va_arg(args, double);
- err= rna_function_parameter_parse(&funcptr, parm, type, ftype, len, iter.data, &arg, NULL, tid, fid, pid);
+ double arg = va_arg(args, double);
+ err = rna_function_parameter_parse(&funcptr, parm, type, ftype, len, iter.data, &arg, NULL, tid, fid, pid);
break;
}
case PROP_STRING:
{
- char *arg= va_arg(args, char*);
- err= rna_function_parameter_parse(&funcptr, parm, type, ftype, len, iter.data, &arg, NULL, tid, fid, pid);
+ char *arg = va_arg(args, char*);
+ err = rna_function_parameter_parse(&funcptr, parm, type, ftype, len, iter.data, &arg, NULL, tid, fid, pid);
break;
}
case PROP_POINTER:
{
- StructRNA *srna= va_arg(args, StructRNA*);
- void *arg= va_arg(args, void*);
- err= rna_function_parameter_parse(&funcptr, parm, type, ftype, len, iter.data, &arg, srna, tid, fid, pid);
+ StructRNA *srna = va_arg(args, StructRNA*);
+ void *arg = va_arg(args, void*);
+ err = rna_function_parameter_parse(&funcptr, parm, type, ftype, len, iter.data, &arg, srna, tid, fid, pid);
break;
}
case PROP_COLLECTION:
{
- StructRNA *srna= va_arg(args, StructRNA*);
- ListBase *arg= va_arg(args, ListBase*);
- err= rna_function_parameter_parse(&funcptr, parm, type, ftype, len, iter.data, &arg, srna, tid, fid, pid);
+ StructRNA *srna = va_arg(args, StructRNA*);
+ ListBase *arg = va_arg(args, ListBase*);
+ err = rna_function_parameter_parse(&funcptr, parm, type, ftype, len, iter.data, &arg, srna, tid, fid, pid);
break;
}
default:
{
/* handle errors */
- err= rna_function_parameter_parse(&funcptr, parm, type, ftype, len, iter.data, NULL, NULL, tid, fid, pid);
+ err = rna_function_parameter_parse(&funcptr, parm, type, ftype, len, iter.data, NULL, NULL, tid, fid, pid);
break;
}
}
- if (err!=0)
+ if (err != 0)
break;
}
- if (err==0)
- err= RNA_function_call(C, reports, ptr, func, &parms);
+ if (err == 0)
+ err = RNA_function_call(C, reports, ptr, func, &parms);
/* XXX throw error when more parameters than those needed are passed or leave silent? */
- if (err==0 && pret && ofs<flen && format[ofs++]=='R') {
- parm= pret;
+ if (err == 0 && pret && ofs<flen && format[ofs++] =='R') {
+ parm = pret;
- type= RNA_property_type(parm);
- ftype= format[ofs++];
- len= RNA_property_array_length(&funcptr, parm);
- alen= rna_function_format_array_length(format, ofs, flen);
+ type = RNA_property_type(parm);
+ ftype = format[ofs++];
+ len = RNA_property_array_length(&funcptr, parm);
+ alen = rna_function_format_array_length(format, ofs, flen);
- if (len!=alen) {
- err= -1;
+ if (len != alen) {
+ err = -1;
fprintf(stderr, "%s.%s: for return parameter %s, "
"was expecting an array of %i elements, passed %i elements instead\n",
tid, fid, pid, len, alen);
@@ -5300,40 +5300,40 @@ int RNA_function_call_direct_va(bContext *C, ReportList *reports, PointerRNA *pt
case PROP_INT:
case PROP_ENUM:
{
- int *arg= va_arg(args, int*);
- err= rna_function_parameter_parse(&funcptr, parm, type, ftype, len, arg, retdata, NULL, tid, fid, pid);
+ int *arg = va_arg(args, int*);
+ err = rna_function_parameter_parse(&funcptr, parm, type, ftype, len, arg, retdata, NULL, tid, fid, pid);
break;
}
case PROP_FLOAT:
{
- float *arg= va_arg(args, float*);
- err= rna_function_parameter_parse(&funcptr, parm, type, ftype, len, arg, retdata, NULL, tid, fid, pid);
+ float *arg = va_arg(args, float*);
+ err = rna_function_parameter_parse(&funcptr, parm, type, ftype, len, arg, retdata, NULL, tid, fid, pid);
break;
}
case PROP_STRING:
{
- char **arg= va_arg(args, char**);
- err= rna_function_parameter_parse(&funcptr, parm, type, ftype, len, arg, retdata, NULL, tid, fid, pid);
+ char **arg = va_arg(args, char**);
+ err = rna_function_parameter_parse(&funcptr, parm, type, ftype, len, arg, retdata, NULL, tid, fid, pid);
break;
}
case PROP_POINTER:
{
- StructRNA *srna= va_arg(args, StructRNA*);
- void **arg= va_arg(args, void**);
- err= rna_function_parameter_parse(&funcptr, parm, type, ftype, len, arg, retdata, srna, tid, fid, pid);
+ StructRNA *srna = va_arg(args, StructRNA*);
+ void **arg = va_arg(args, void**);
+ err = rna_function_parameter_parse(&funcptr, parm, type, ftype, len, arg, retdata, srna, tid, fid, pid);
break;
}
case PROP_COLLECTION:
{
- StructRNA *srna= va_arg(args, StructRNA*);
- ListBase **arg= va_arg(args, ListBase**);
- err= rna_function_parameter_parse(&funcptr, parm, type, ftype, len, arg, retdata, srna, tid, fid, pid);
+ StructRNA *srna = va_arg(args, StructRNA*);
+ ListBase **arg = va_arg(args, ListBase**);
+ err = rna_function_parameter_parse(&funcptr, parm, type, ftype, len, arg, retdata, srna, tid, fid, pid);
break;
- }
+ }
default:
{
/* handle errors */
- err= rna_function_parameter_parse(&funcptr, parm, type, ftype, len, NULL, NULL, NULL, tid, fid, pid);
+ err = rna_function_parameter_parse(&funcptr, parm, type, ftype, len, NULL, NULL, NULL, tid, fid, pid);
break;
}
}
@@ -5351,9 +5351,9 @@ int RNA_function_call_direct_va_lookup(bContext *C, ReportList *reports, Pointer
{
FunctionRNA *func;
- func= RNA_struct_find_function(ptr, identifier);
+ func = RNA_struct_find_function(ptr, identifier);
- if(func)
+ if (func)
return RNA_function_call_direct_va(C, reports, ptr, func, format, args);
return 0;
@@ -5364,14 +5364,14 @@ int RNA_property_reset(PointerRNA *ptr, PropertyRNA *prop, int index)
int len;
/* get the length of the array to work with */
- len= RNA_property_array_length(ptr, prop);
+ len = RNA_property_array_length(ptr, prop);
/* get and set the default values as appropriate for the various types */
switch (RNA_property_type(prop)) {
case PROP_BOOLEAN:
if (len) {
if (index == -1) {
- int *tmparray= MEM_callocN(sizeof(int)*len, "reset_defaults - boolean");
+ int *tmparray = MEM_callocN(sizeof(int)*len, "reset_defaults - boolean");
RNA_property_boolean_get_default_array(ptr, prop, tmparray);
RNA_property_boolean_set_array(ptr, prop, tmparray);
@@ -5379,19 +5379,19 @@ int RNA_property_reset(PointerRNA *ptr, PropertyRNA *prop, int index)
MEM_freeN(tmparray);
}
else {
- int value= RNA_property_boolean_get_default_index(ptr, prop, index);
+ int value = RNA_property_boolean_get_default_index(ptr, prop, index);
RNA_property_boolean_set_index(ptr, prop, index, value);
}
}
else {
- int value= RNA_property_boolean_get_default(ptr, prop);
+ int value = RNA_property_boolean_get_default(ptr, prop);
RNA_property_boolean_set(ptr, prop, value);
}
return 1;
case PROP_INT:
if (len) {
if (index == -1) {
- int *tmparray= MEM_callocN(sizeof(int)*len, "reset_defaults - int");
+ int *tmparray = MEM_callocN(sizeof(int)*len, "reset_defaults - int");
RNA_property_int_get_default_array(ptr, prop, tmparray);
RNA_property_int_set_array(ptr, prop, tmparray);
@@ -5399,19 +5399,19 @@ int RNA_property_reset(PointerRNA *ptr, PropertyRNA *prop, int index)
MEM_freeN(tmparray);
}
else {
- int value= RNA_property_int_get_default_index(ptr, prop, index);
+ int value = RNA_property_int_get_default_index(ptr, prop, index);
RNA_property_int_set_index(ptr, prop, index, value);
}
}
else {
- int value= RNA_property_int_get_default(ptr, prop);
+ int value = RNA_property_int_get_default(ptr, prop);
RNA_property_int_set(ptr, prop, value);
}
return 1;
case PROP_FLOAT:
if (len) {
if (index == -1) {
- float *tmparray= MEM_callocN(sizeof(float)*len, "reset_defaults - float");
+ float *tmparray = MEM_callocN(sizeof(float)*len, "reset_defaults - float");
RNA_property_float_get_default_array(ptr, prop, tmparray);
RNA_property_float_set_array(ptr, prop, tmparray);
@@ -5419,25 +5419,25 @@ int RNA_property_reset(PointerRNA *ptr, PropertyRNA *prop, int index)
MEM_freeN(tmparray);
}
else {
- float value= RNA_property_float_get_default_index(ptr, prop, index);
+ float value = RNA_property_float_get_default_index(ptr, prop, index);
RNA_property_float_set_index(ptr, prop, index, value);
}
}
else {
- float value= RNA_property_float_get_default(ptr, prop);
+ float value = RNA_property_float_get_default(ptr, prop);
RNA_property_float_set(ptr, prop, value);
}
return 1;
case PROP_ENUM:
{
- int value= RNA_property_enum_get_default(ptr, prop);
+ int value = RNA_property_enum_get_default(ptr, prop);
RNA_property_enum_set(ptr, prop, value);
return 1;
}
case PROP_STRING:
{
- char *value= RNA_property_string_get_default_alloc(ptr, prop, NULL, 0);
+ char *value = RNA_property_string_get_default_alloc(ptr, prop, NULL, 0);
RNA_property_string_set(ptr, prop, value);
MEM_freeN(value);
return 1;
@@ -5445,13 +5445,13 @@ int RNA_property_reset(PointerRNA *ptr, PropertyRNA *prop, int index)
case PROP_POINTER:
{
- PointerRNA value= RNA_property_pointer_get_default(ptr, prop);
+ PointerRNA value = RNA_property_pointer_get_default(ptr, prop);
RNA_property_pointer_set(ptr, prop, value);
return 1;
}
- default:
- // FIXME: are there still any cases that haven't been handled? comment out "default" block to check :)
+ default:
+ /* FIXME: are there still any cases that haven't been handled? comment out "default" block to check :) */
return 0;
}
}
@@ -5461,10 +5461,10 @@ int RNA_property_copy(PointerRNA *ptr, PointerRNA *fromptr, PropertyRNA *prop, i
int len, fromlen;
/* get the length of the array to work with */
- len= RNA_property_array_length(ptr, prop);
- fromlen= RNA_property_array_length(ptr, prop);
+ len = RNA_property_array_length(ptr, prop);
+ fromlen = RNA_property_array_length(ptr, prop);
- if(len != fromlen)
+ if (len != fromlen)
return 0;
/* get and set the default values as appropriate for the various types */
@@ -5472,7 +5472,7 @@ int RNA_property_copy(PointerRNA *ptr, PointerRNA *fromptr, PropertyRNA *prop, i
case PROP_BOOLEAN:
if (len) {
if (index == -1) {
- int *tmparray= MEM_callocN(sizeof(int)*len, "copy - boolean");
+ int *tmparray = MEM_callocN(sizeof(int)*len, "copy - boolean");
RNA_property_boolean_get_array(fromptr, prop, tmparray);
RNA_property_boolean_set_array(ptr, prop, tmparray);
@@ -5480,19 +5480,19 @@ int RNA_property_copy(PointerRNA *ptr, PointerRNA *fromptr, PropertyRNA *prop, i
MEM_freeN(tmparray);
}
else {
- int value= RNA_property_boolean_get_index(fromptr, prop, index);
+ int value = RNA_property_boolean_get_index(fromptr, prop, index);
RNA_property_boolean_set_index(ptr, prop, index, value);
}
}
else {
- int value= RNA_property_boolean_get(fromptr, prop);
+ int value = RNA_property_boolean_get(fromptr, prop);
RNA_property_boolean_set(ptr, prop, value);
}
return 1;
case PROP_INT:
if (len) {
if (index == -1) {
- int *tmparray= MEM_callocN(sizeof(int)*len, "copy - int");
+ int *tmparray = MEM_callocN(sizeof(int)*len, "copy - int");
RNA_property_int_get_array(fromptr, prop, tmparray);
RNA_property_int_set_array(ptr, prop, tmparray);
@@ -5500,19 +5500,19 @@ int RNA_property_copy(PointerRNA *ptr, PointerRNA *fromptr, PropertyRNA *prop, i
MEM_freeN(tmparray);
}
else {
- int value= RNA_property_int_get_index(fromptr, prop, index);
+ int value = RNA_property_int_get_index(fromptr, prop, index);
RNA_property_int_set_index(ptr, prop, index, value);
}
}
else {
- int value= RNA_property_int_get(fromptr, prop);
+ int value = RNA_property_int_get(fromptr, prop);
RNA_property_int_set(ptr, prop, value);
}
return 1;
case PROP_FLOAT:
if (len) {
if (index == -1) {
- float *tmparray= MEM_callocN(sizeof(float)*len, "copy - float");
+ float *tmparray = MEM_callocN(sizeof(float)*len, "copy - float");
RNA_property_float_get_array(fromptr, prop, tmparray);
RNA_property_float_set_array(ptr, prop, tmparray);
@@ -5520,30 +5520,30 @@ int RNA_property_copy(PointerRNA *ptr, PointerRNA *fromptr, PropertyRNA *prop, i
MEM_freeN(tmparray);
}
else {
- float value= RNA_property_float_get_index(fromptr, prop, index);
+ float value = RNA_property_float_get_index(fromptr, prop, index);
RNA_property_float_set_index(ptr, prop, index, value);
}
}
else {
- float value= RNA_property_float_get(fromptr, prop);
+ float value = RNA_property_float_get(fromptr, prop);
RNA_property_float_set(ptr, prop, value);
}
return 1;
case PROP_ENUM:
{
- int value= RNA_property_enum_get(fromptr, prop);
+ int value = RNA_property_enum_get(fromptr, prop);
RNA_property_enum_set(ptr, prop, value);
return 1;
}
case PROP_POINTER:
{
- PointerRNA value= RNA_property_pointer_get(fromptr, prop);
+ PointerRNA value = RNA_property_pointer_get(fromptr, prop);
RNA_property_pointer_set(ptr, prop, value);
return 1;
}
case PROP_STRING:
{
- char *value= RNA_property_string_get_alloc(fromptr, prop, NULL, 0, NULL);
+ char *value = RNA_property_string_get_alloc(fromptr, prop, NULL, 0, NULL);
RNA_property_string_set(ptr, prop, value);
MEM_freeN(value);
return 1;
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c
index 82a7d276817..829b1ae1f13 100644
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -50,17 +50,17 @@
static void rna_ActionGroup_channels_next(CollectionPropertyIterator *iter)
{
- ListBaseIterator *internal= iter->internal;
- FCurve *fcu= (FCurve*)internal->link;
- bActionGroup *grp= fcu->grp;
+ ListBaseIterator *internal = iter->internal;
+ FCurve *fcu = (FCurve*)internal->link;
+ bActionGroup *grp = fcu->grp;
/* only continue if the next F-Curve (if existant) belongs in the same group */
if ((fcu->next) && (fcu->next->grp == grp))
- internal->link= (Link*)fcu->next;
+ internal->link = (Link*)fcu->next;
else
- internal->link= NULL;
+ internal->link = NULL;
- iter->valid= (internal->link != NULL);
+ iter->valid = (internal->link != NULL);
}
static bActionGroup *rna_Action_groups_new(bAction *act, const char name[])
@@ -79,8 +79,8 @@ static void rna_Action_groups_remove(bAction *act, ReportList *reports, bActionG
}
/* move every one one of the group's F-Curves out into the Action again */
- for (fcu= agrp->channels.first; (fcu) && (fcu->grp==agrp); fcu=fcn) {
- fcn= fcu->next;
+ for (fcu = agrp->channels.first; (fcu) && (fcu->grp == agrp); fcu = fcn) {
+ fcn = fcu->next;
/* remove from group */
action_groups_remove_channel(act, fcu);
@@ -90,12 +90,12 @@ static void rna_Action_groups_remove(bAction *act, ReportList *reports, bActionG
}
/* XXX, invalidates PyObject */
- MEM_freeN(agrp);
+ MEM_freeN(agrp);
}
static FCurve *rna_Action_fcurve_new(bAction *act, ReportList *reports, const char *data_path, int index, const char *group)
{
- if (group && group[0]=='\0') group= NULL;
+ if (group && group[0] =='\0') group = NULL;
if (data_path[0] == '\0') {
BKE_report(reports, RPT_ERROR, "F-Curve data path empty, invalid argument");
@@ -135,8 +135,8 @@ static void rna_Action_fcurve_remove(bAction *act, ReportList *reports, FCurve *
static TimeMarker *rna_Action_pose_markers_new(bAction *act, const char name[])
{
TimeMarker *marker = MEM_callocN(sizeof(TimeMarker), "TimeMarker");
- marker->flag= 1;
- marker->frame= 1;
+ marker->flag = 1;
+ marker->frame = 1;
BLI_strncpy_utf8(marker->name, name, sizeof(marker->name));
BLI_addtail(&act->markers, marker);
return marker;
@@ -155,35 +155,35 @@ static void rna_Action_pose_markers_remove(bAction *act, ReportList *reports, Ti
static PointerRNA rna_Action_active_pose_marker_get(PointerRNA *ptr)
{
- bAction *act= (bAction*)ptr->data;
+ bAction *act = (bAction*)ptr->data;
return rna_pointer_inherit_refine(ptr, &RNA_TimelineMarker, BLI_findlink(&act->markers, act->active_marker-1));
}
static void rna_Action_active_pose_marker_set(PointerRNA *ptr, PointerRNA value)
{
- bAction *act= (bAction*)ptr->data;
- act->active_marker= BLI_findindex(&act->markers, value.data) + 1;
+ bAction *act = (bAction*)ptr->data;
+ act->active_marker = BLI_findindex(&act->markers, value.data) + 1;
}
static int rna_Action_active_pose_marker_index_get(PointerRNA *ptr)
{
- bAction *act= (bAction*)ptr->data;
+ bAction *act = (bAction*)ptr->data;
return MAX2(act->active_marker-1, 0);
}
static void rna_Action_active_pose_marker_index_set(PointerRNA *ptr, int value)
{
- bAction *act= (bAction*)ptr->data;
- act->active_marker= value+1;
+ bAction *act = (bAction*)ptr->data;
+ act->active_marker = value+1;
}
static void rna_Action_active_pose_marker_index_range(PointerRNA *ptr, int *min, int *max)
{
- bAction *act= (bAction*)ptr->data;
+ bAction *act = (bAction*)ptr->data;
- *min= 0;
- *max= BLI_countlist(&act->markers)-1;
- *max= MAX2(0, *max);
+ *min = 0;
+ *max = BLI_countlist(&act->markers)-1;
+ *max = MAX2(0, *max);
}
@@ -251,173 +251,173 @@ static void rna_def_dopesheet(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "DopeSheet", NULL);
+ srna = RNA_def_struct(brna, "DopeSheet", NULL);
RNA_def_struct_sdna(srna, "bDopeSheet");
RNA_def_struct_ui_text(srna, "DopeSheet", "Settings for filtering the channels shown in Animation Editors");
/* Source of DopeSheet data */
- // XXX: make this obsolete?
- prop= RNA_def_property(srna, "source", PROP_POINTER, PROP_NONE);
+ /* XXX: make this obsolete? */
+ prop = RNA_def_property(srna, "source", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ID");
RNA_def_property_ui_text(prop, "Source", "ID-Block representing source data, currently ID_SCE (for Dopesheet), and ID_SC (for Grease Pencil)");
/* Show datablock filters */
- prop= RNA_def_property(srna, "show_datablock_filters", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_datablock_filters", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ADS_FLAG_SHOW_DBFILTERS);
RNA_def_property_ui_text(prop, "Show Datablock Filters", "Show options for whether channels related to certain types of data are included");
RNA_def_property_ui_icon(prop, ICON_DISCLOSURE_TRI_RIGHT, -1);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN, NULL);
/* General Filtering Settings */
- prop= RNA_def_property(srna, "show_only_selected", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_only_selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filterflag", ADS_FILTER_ONLYSEL);
RNA_def_property_ui_text(prop, "Only Selected", "Only include channels relating to selected objects and data");
RNA_def_property_ui_icon(prop, ICON_RESTRICT_SELECT_OFF, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "show_hidden", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_hidden", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filterflag", ADS_FILTER_INCL_HIDDEN);
RNA_def_property_ui_text(prop, "Display Hidden", "Include channels from objects/bone that aren't visible");
RNA_def_property_ui_icon(prop, ICON_GHOST_ENABLED, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
/* Object Group Filtering Settings */
- prop= RNA_def_property(srna, "show_only_group_objects", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_only_group_objects", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filterflag", ADS_FILTER_ONLYOBGROUP);
RNA_def_property_ui_text(prop, "Only Objects in Group", "Only include channels from Objects in the specified Group");
RNA_def_property_ui_icon(prop, ICON_GROUP, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "filter_group", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "filter_group", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "filter_grp");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Filtering Group", "Group that included Object should be a member of");
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
/* FCurve Display Name Search Settings */
- prop= RNA_def_property(srna, "show_only_matching_fcurves", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_only_matching_fcurves", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filterflag", ADS_FILTER_BY_FCU_NAME);
RNA_def_property_ui_text(prop, "Only Matching F-Curves", "Only include F-Curves with names containing search text");
RNA_def_property_ui_icon(prop, ICON_VIEWZOOM, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "filter_fcurve_name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "filter_fcurve_name", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "searchstr");
RNA_def_property_ui_text(prop, "F-Curve Name Filter", "F-Curve live filtering string");
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
/* NLA Specific Settings */
- prop= RNA_def_property(srna, "show_missing_nla", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_missing_nla", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NLA_NOACT);
RNA_def_property_ui_text(prop, "Include Missing NLA", "Include Animation Data blocks with no NLA data (NLA Editor only)");
RNA_def_property_ui_icon(prop, ICON_ACTION, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
/* Summary Settings (DopeSheet editors only) */
- prop= RNA_def_property(srna, "show_summary", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_summary", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filterflag", ADS_FILTER_SUMMARY);
RNA_def_property_ui_text(prop, "Display Summary", "Display an additional 'summary' line (DopeSheet Editors only)");
RNA_def_property_ui_icon(prop, ICON_BORDERMOVE, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "show_expanded_summary", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_expanded_summary", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", ADS_FLAG_SUMMARY_COLLAPSED);
RNA_def_property_ui_text(prop, "Collapse Summary", "Collapse summary when shown, so all other channels get hidden (DopeSheet Editors Only)");
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
/* General DataType Filtering Settings */
- prop= RNA_def_property(srna, "show_transforms", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_transforms", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOOBJ);
RNA_def_property_ui_text(prop, "Display Transforms", "Include visualization of Object-level Animation data (mostly Transforms)");
- RNA_def_property_ui_icon(prop, ICON_MANIPUL, 0); // XXX?
+ RNA_def_property_ui_icon(prop, ICON_MANIPUL, 0); /* XXX? */
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "show_shapekeys", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_shapekeys", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOSHAPEKEYS);
RNA_def_property_ui_text(prop, "Display Shapekeys", "Include visualization of ShapeKey related Animation data");
RNA_def_property_ui_icon(prop, ICON_SHAPEKEY_DATA, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "show_meshes", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_meshes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOMESH);
RNA_def_property_ui_text(prop, "Display Meshes", "Include visualization of Mesh related Animation data");
RNA_def_property_ui_icon(prop, ICON_MESH_DATA, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "show_lattices", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_lattices", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOLAT);
RNA_def_property_ui_text(prop, "Display Lattices", "Include visualization of Lattice related Animation data");
RNA_def_property_ui_icon(prop, ICON_LATTICE_DATA, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "show_cameras", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_cameras", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOCAM);
RNA_def_property_ui_text(prop, "Display Camera", "Include visualization of Camera related Animation data");
RNA_def_property_ui_icon(prop, ICON_CAMERA_DATA, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "show_materials", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_materials", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOMAT);
RNA_def_property_ui_text(prop, "Display Material", "Include visualization of Material related Animation data");
RNA_def_property_ui_icon(prop, ICON_MATERIAL_DATA, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "show_lamps", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_lamps", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOLAM);
RNA_def_property_ui_text(prop, "Display Lamp", "Include visualization of Lamp related Animation data");
RNA_def_property_ui_icon(prop, ICON_LAMP_DATA, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "show_textures", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_textures", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOTEX);
RNA_def_property_ui_text(prop, "Display Texture", "Include visualization of Texture related Animation data");
RNA_def_property_ui_icon(prop, ICON_TEXTURE_DATA, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "show_curves", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_curves", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOCUR);
RNA_def_property_ui_text(prop, "Display Curve", "Include visualization of Curve related Animation data");
RNA_def_property_ui_icon(prop, ICON_CURVE_DATA, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "show_worlds", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_worlds", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOWOR);
RNA_def_property_ui_text(prop, "Display World", "Include visualization of World related Animation data");
RNA_def_property_ui_icon(prop, ICON_WORLD_DATA, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "show_scenes", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_scenes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOSCE);
RNA_def_property_ui_text(prop, "Display Scene", "Include visualization of Scene related Animation data");
RNA_def_property_ui_icon(prop, ICON_SCENE_DATA, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "show_particles", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_particles", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOPART);
RNA_def_property_ui_text(prop, "Display Particle", "Include visualization of Particle related Animation data");
RNA_def_property_ui_icon(prop, ICON_PARTICLE_DATA, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "show_metaballs", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_metaballs", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOMBA);
RNA_def_property_ui_text(prop, "Display Metaball", "Include visualization of Metaball related Animation data");
RNA_def_property_ui_icon(prop, ICON_META_DATA, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "show_armatures", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_armatures", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOARM);
RNA_def_property_ui_text(prop, "Display Armature", "Include visualization of Armature related Animation data");
RNA_def_property_ui_icon(prop, ICON_ARMATURE_DATA, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "show_nodes", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_nodes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NONTREE);
RNA_def_property_ui_text(prop, "Display Node", "Include visualization of Node related Animation data");
RNA_def_property_ui_icon(prop, ICON_NODETREE, 0);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "show_speakers", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_speakers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "filterflag", ADS_FILTER_NOSPK);
RNA_def_property_ui_text(prop, "Display Speaker", "Include visualization of Speaker related Animation data");
RNA_def_property_ui_icon(prop, ICON_SPEAKER, 0);
@@ -429,11 +429,11 @@ static void rna_def_action_group(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ActionGroup", NULL);
+ srna = RNA_def_struct(brna, "ActionGroup", NULL);
RNA_def_struct_sdna(srna, "bActionGroup");
RNA_def_struct_ui_text(srna, "Action Group", "Groups of F-Curves");
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_struct_name_property(srna, prop);
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
@@ -448,28 +448,28 @@ static void rna_def_action_group(BlenderRNA *brna)
* If such changes are required, these MUST go through the API functions for manipulating
* these F-Curve groupings. Also, note that groups only apply in actions ONLY.
*/
- prop= RNA_def_property(srna, "channels", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "channels", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "channels", NULL);
RNA_def_property_struct_type(prop, "FCurve");
RNA_def_property_collection_funcs(prop, 0, "rna_ActionGroup_channels_next", NULL, NULL, NULL, NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Channels", "F-Curves in this group");
- prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", AGRP_SELECTED);
RNA_def_property_ui_text(prop, "Select", "Action Group is selected");
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_SELECTED, NULL);
- prop= RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", AGRP_PROTECTED);
RNA_def_property_ui_text(prop, "Lock", "Action Group is locked");
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", AGRP_EXPANDED);
RNA_def_property_ui_text(prop, "Expanded", "Action Group is expanded");
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "custom_color", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "custom_color", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "customCol");
RNA_def_property_ui_text(prop, "Custom Color", "Index of custom color set");
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
@@ -484,23 +484,23 @@ static void rna_def_action_groups(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *parm;
RNA_def_property_srna(cprop, "ActionGroups");
- srna= RNA_def_struct(brna, "ActionGroups", NULL);
+ srna = RNA_def_struct(brna, "ActionGroups", NULL);
RNA_def_struct_sdna(srna, "bAction");
RNA_def_struct_ui_text(srna, "Action Groups", "Collection of action groups");
- func= RNA_def_function(srna, "new", "rna_Action_groups_new");
+ func = RNA_def_function(srna, "new", "rna_Action_groups_new");
RNA_def_function_ui_description(func, "Add a keyframe to the curve");
- parm= RNA_def_string(func, "name", "Group", 0, "", "New name for the action group");
+ parm = RNA_def_string(func, "name", "Group", 0, "", "New name for the action group");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "action_group", "ActionGroup", "", "Newly created action group");
+ parm = RNA_def_pointer(func, "action_group", "ActionGroup", "", "Newly created action group");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_Action_groups_remove");
+ func = RNA_def_function(srna, "remove", "rna_Action_groups_remove");
RNA_def_function_ui_description(func, "Remove action group");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "action_group", "ActionGroup", "", "Action group to remove");
+ parm = RNA_def_pointer(func, "action_group", "ActionGroup", "", "Action group to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
@@ -512,26 +512,26 @@ static void rna_def_action_fcurves(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *parm;
RNA_def_property_srna(cprop, "ActionFCurves");
- srna= RNA_def_struct(brna, "ActionFCurves", NULL);
+ srna = RNA_def_struct(brna, "ActionFCurves", NULL);
RNA_def_struct_sdna(srna, "bAction");
RNA_def_struct_ui_text(srna, "Action F-Curves", "Collection of action F-Curves");
- func= RNA_def_function(srna, "new", "rna_Action_fcurve_new");
+ func = RNA_def_function(srna, "new", "rna_Action_fcurve_new");
RNA_def_function_ui_description(func, "Add a keyframe to the F-Curve");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_string(func, "data_path", "", 0, "Data Path", "F-Curve data path to use");
+ parm = RNA_def_string(func, "data_path", "", 0, "Data Path", "F-Curve data path to use");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "Array index", 0, INT_MAX);
RNA_def_string(func, "action_group", "", 0, "Action Group", "Acton group to add this F-Curve into");
- parm= RNA_def_pointer(func, "fcurve", "FCurve", "", "Newly created F-Curve");
+ parm = RNA_def_pointer(func, "fcurve", "FCurve", "", "Newly created F-Curve");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_Action_fcurve_remove");
+ func = RNA_def_function(srna, "remove", "rna_Action_fcurve_remove");
RNA_def_function_ui_description(func, "Remove action group");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "fcurve", "FCurve", "", "F-Curve to remove");
+ parm = RNA_def_pointer(func, "fcurve", "FCurve", "", "F-Curve to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
@@ -544,31 +544,31 @@ static void rna_def_action_pose_markers(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *parm;
RNA_def_property_srna(cprop, "ActionPoseMarkers");
- srna= RNA_def_struct(brna, "ActionPoseMarkers", NULL);
+ srna = RNA_def_struct(brna, "ActionPoseMarkers", NULL);
RNA_def_struct_sdna(srna, "bAction");
RNA_def_struct_ui_text(srna, "Action Pose Markers", "Collection of timeline markers");
- func= RNA_def_function(srna, "new", "rna_Action_pose_markers_new");
+ func = RNA_def_function(srna, "new", "rna_Action_pose_markers_new");
RNA_def_function_ui_description(func, "Add a pose marker to the action");
- parm= RNA_def_string(func, "name", "Marker", 0, "", "New name for the marker (not unique)");
+ parm = RNA_def_string(func, "name", "Marker", 0, "", "New name for the marker (not unique)");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "marker", "TimelineMarker", "", "Newly created marker");
+ parm = RNA_def_pointer(func, "marker", "TimelineMarker", "", "Newly created marker");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_Action_pose_markers_remove");
+ func = RNA_def_function(srna, "remove", "rna_Action_pose_markers_remove");
RNA_def_function_ui_description(func, "Remove a timeline marker");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "marker", "TimelineMarker", "", "Timeline marker to remove");
+ parm = RNA_def_pointer(func, "marker", "TimelineMarker", "", "Timeline marker to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "TimelineMarker");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, "rna_Action_active_pose_marker_get", "rna_Action_active_pose_marker_set", NULL, NULL);
RNA_def_property_ui_text(prop, "Active Pose Marker", "Active pose marker for this Action");
- prop= RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "active_marker");
RNA_def_property_int_funcs(prop, "rna_Action_active_pose_marker_index_get", "rna_Action_active_pose_marker_index_set", "rna_Action_active_pose_marker_index_range");
RNA_def_property_ui_text(prop, "Active Pose Marker Index", "Index of active pose marker");
@@ -579,37 +579,37 @@ static void rna_def_action(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Action", "ID");
+ srna = RNA_def_struct(brna, "Action", "ID");
RNA_def_struct_sdna(srna, "bAction");
RNA_def_struct_ui_text(srna, "Action", "A collection of F-Curves for animation");
RNA_def_struct_ui_icon(srna, ICON_ACTION);
/* collections */
- prop= RNA_def_property(srna, "fcurves", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "fcurves", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "curves", NULL);
RNA_def_property_struct_type(prop, "FCurve");
RNA_def_property_ui_text(prop, "F-Curves", "The individual F-Curves that make up the Action");
rna_def_action_fcurves(brna, prop);
- prop= RNA_def_property(srna, "groups", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "groups", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "groups", NULL);
RNA_def_property_struct_type(prop, "ActionGroup");
RNA_def_property_ui_text(prop, "Groups", "Convenient groupings of F-Curves");
rna_def_action_groups(brna, prop);
- prop= RNA_def_property(srna, "pose_markers", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "pose_markers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "markers", NULL);
RNA_def_property_struct_type(prop, "TimelineMarker");
RNA_def_property_ui_text(prop, "Pose Markers", "Markers specific to this Action, for labeling poses");
rna_def_action_pose_markers(brna, prop);
/* properties */
- prop= RNA_def_float_vector(srna, "frame_range" , 2 , NULL , 0, 0, "Frame Range" , "The final frame range of all F-Curves within this action" , 0 , 0);
+ prop = RNA_def_float_vector(srna, "frame_range" , 2 , NULL , 0, 0, "Frame Range" , "The final frame range of all F-Curves within this action" , 0 , 0);
RNA_def_property_float_funcs(prop, "rna_Action_frame_range_get" , NULL, NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
/* special "type" limiter - should not really be edited in general, but is still available/editable in 'emergencies' */
- prop= RNA_def_property(srna, "id_root", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "id_root", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "idroot");
RNA_def_property_enum_items(prop, id_type_items);
RNA_def_property_ui_text(prop, "ID Root Type", "Type of ID-block that action can be used on - DO NOT CHANGE UNLESS YOU KNOW WHAT YOU'RE DOING");
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index c9a57279181..4b7bc0a6160 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -34,14 +34,14 @@
#include "DNA_constraint_types.h"
#include "DNA_object_types.h"
#include "DNA_actuator_types.h"
-#include "DNA_scene_types.h" // for MAXFRAME
+#include "DNA_scene_types.h" /* for MAXFRAME */
#include "WM_types.h"
#include "BLI_utildefines.h"
/* Always keep in alphabetical order */
-EnumPropertyItem actuator_type_items[] ={
+EnumPropertyItem actuator_type_items[] = {
{ACT_ACTION, "ACTION", 0, "Action", ""},
{ACT_ARMATURE, "ARMATURE", 0, "Armature", ""},
{ACT_CAMERA, "CAMERA", 0, "Camera", ""},
@@ -67,9 +67,9 @@ EnumPropertyItem actuator_type_items[] ={
static StructRNA* rna_Actuator_refine(struct PointerRNA *ptr)
{
- bActuator *actuator= (bActuator*)ptr->data;
+ bActuator *actuator = (bActuator*)ptr->data;
- switch(actuator->type) {
+ switch (actuator->type) {
case ACT_ACTION:
return &RNA_ActionActuator;
case ACT_OBJECT:
@@ -111,19 +111,19 @@ static StructRNA* rna_Actuator_refine(struct PointerRNA *ptr)
void rna_Actuator_name_set(PointerRNA *ptr, const char *value)
{
- bActuator *act= (bActuator *)ptr->data;
+ bActuator *act = (bActuator *)ptr->data;
BLI_strncpy_utf8(act->name, value, sizeof(act->name));
if (ptr->id.data) {
- Object *ob= (Object *)ptr->id.data;
+ Object *ob = (Object *)ptr->id.data;
BLI_uniquename(&ob->actuators, act, "Actuator", '.', offsetof(bActuator, name), sizeof(act->name));
}
}
static void rna_Actuator_type_set(struct PointerRNA *ptr, int value)
{
- bActuator *act= (bActuator *)ptr->data;
+ bActuator *act = (bActuator *)ptr->data;
if (value != act->type)
{
act->type = value;
@@ -133,8 +133,8 @@ static void rna_Actuator_type_set(struct PointerRNA *ptr, int value)
static void rna_ConstraintActuator_type_set(struct PointerRNA *ptr, int value)
{
- bActuator *act= (bActuator *)ptr->data;
- bConstraintActuator *ca= act->data;
+ bActuator *act = (bActuator *)ptr->data;
+ bConstraintActuator *ca = act->data;
if (value != ca->type)
{
ca->type = value;
@@ -160,12 +160,12 @@ static float rna_ConstraintActuator_limitmin_get(struct PointerRNA *ptr)
bConstraintActuator *ca = act->data;
float *fp;
- if(ca->flag & ACT_CONST_LOCX) fp= ca->minloc;
- else if(ca->flag & ACT_CONST_LOCY) fp= ca->minloc+1;
- else if(ca->flag & ACT_CONST_LOCZ) fp= ca->minloc+2;
- else if(ca->flag & ACT_CONST_ROTX) fp= ca->minrot;
- else if(ca->flag & ACT_CONST_ROTY) fp= ca->minrot+1;
- else fp= ca->minrot+2;
+ if (ca->flag & ACT_CONST_LOCX) fp = ca->minloc;
+ else if (ca->flag & ACT_CONST_LOCY) fp = ca->minloc+1;
+ else if (ca->flag & ACT_CONST_LOCZ) fp = ca->minloc+2;
+ else if (ca->flag & ACT_CONST_ROTX) fp = ca->minrot;
+ else if (ca->flag & ACT_CONST_ROTY) fp = ca->minrot+1;
+ else fp = ca->minrot+2;
return *fp;
}
@@ -176,12 +176,12 @@ static void rna_ConstraintActuator_limitmin_set(struct PointerRNA *ptr, float va
bConstraintActuator *ca = act->data;
float *fp;
- if(ca->flag & ACT_CONST_LOCX) fp= ca->minloc;
- else if(ca->flag & ACT_CONST_LOCY) fp= ca->minloc+1;
- else if(ca->flag & ACT_CONST_LOCZ) fp= ca->minloc+2;
- else if(ca->flag & ACT_CONST_ROTX) fp= ca->minrot;
- else if(ca->flag & ACT_CONST_ROTY) fp= ca->minrot+1;
- else fp= ca->minrot+2;
+ if (ca->flag & ACT_CONST_LOCX) fp = ca->minloc;
+ else if (ca->flag & ACT_CONST_LOCY) fp = ca->minloc+1;
+ else if (ca->flag & ACT_CONST_LOCZ) fp = ca->minloc+2;
+ else if (ca->flag & ACT_CONST_ROTX) fp = ca->minrot;
+ else if (ca->flag & ACT_CONST_ROTY) fp = ca->minrot+1;
+ else fp = ca->minrot+2;
*fp = value;
}
@@ -192,12 +192,12 @@ static float rna_ConstraintActuator_limitmax_get(struct PointerRNA *ptr)
bConstraintActuator *ca = act->data;
float *fp;
- if(ca->flag & ACT_CONST_LOCX) fp= ca->maxloc;
- else if(ca->flag & ACT_CONST_LOCY) fp= ca->maxloc+1;
- else if(ca->flag & ACT_CONST_LOCZ) fp= ca->maxloc+2;
- else if(ca->flag & ACT_CONST_ROTX) fp= ca->maxrot;
- else if(ca->flag & ACT_CONST_ROTY) fp= ca->maxrot+1;
- else fp= ca->maxrot+2;
+ if (ca->flag & ACT_CONST_LOCX) fp = ca->maxloc;
+ else if (ca->flag & ACT_CONST_LOCY) fp = ca->maxloc+1;
+ else if (ca->flag & ACT_CONST_LOCZ) fp = ca->maxloc+2;
+ else if (ca->flag & ACT_CONST_ROTX) fp = ca->maxrot;
+ else if (ca->flag & ACT_CONST_ROTY) fp = ca->maxrot+1;
+ else fp = ca->maxrot+2;
return *fp;
}
@@ -208,12 +208,12 @@ static void rna_ConstraintActuator_limitmax_set(struct PointerRNA *ptr, float va
bConstraintActuator *ca = act->data;
float *fp;
- if(ca->flag & ACT_CONST_LOCX) fp= ca->maxloc;
- else if(ca->flag & ACT_CONST_LOCY) fp= ca->maxloc+1;
- else if(ca->flag & ACT_CONST_LOCZ) fp= ca->maxloc+2;
- else if(ca->flag & ACT_CONST_ROTX) fp= ca->maxrot;
- else if(ca->flag & ACT_CONST_ROTY) fp= ca->maxrot+1;
- else fp= ca->maxrot+2;
+ if (ca->flag & ACT_CONST_LOCX) fp = ca->maxloc;
+ else if (ca->flag & ACT_CONST_LOCY) fp = ca->maxloc+1;
+ else if (ca->flag & ACT_CONST_LOCZ) fp = ca->maxloc+2;
+ else if (ca->flag & ACT_CONST_ROTX) fp = ca->maxrot;
+ else if (ca->flag & ACT_CONST_ROTY) fp = ca->maxrot+1;
+ else fp = ca->maxrot+2;
*fp = value;
}
@@ -224,9 +224,9 @@ static float rna_ConstraintActuator_distance_get(struct PointerRNA *ptr)
bConstraintActuator *ca = act->data;
float *fp;
- if(ca->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp= ca->minloc;
- else if(ca->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp= ca->minloc+1;
- else fp= ca->minloc+2;
+ if (ca->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp = ca->minloc;
+ else if (ca->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp = ca->minloc+1;
+ else fp = ca->minloc+2;
return *fp;
}
@@ -237,9 +237,9 @@ static void rna_ConstraintActuator_distance_set(struct PointerRNA *ptr, float va
bConstraintActuator *ca = act->data;
float *fp;
- if(ca->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp= ca->minloc;
- else if(ca->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp= ca->minloc+1;
- else fp= ca->minloc+2;
+ if (ca->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp = ca->minloc;
+ else if (ca->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp = ca->minloc+1;
+ else fp = ca->minloc+2;
*fp = value;
}
@@ -250,9 +250,9 @@ static float rna_ConstraintActuator_range_get(struct PointerRNA *ptr)
bConstraintActuator *ca = act->data;
float *fp;
- if(ca->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp= ca->maxloc;
- else if(ca->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp= ca->maxloc+1;
- else fp= ca->maxloc+2;
+ if (ca->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp = ca->maxloc;
+ else if (ca->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp = ca->maxloc+1;
+ else fp = ca->maxloc+2;
return *fp;
}
@@ -263,9 +263,9 @@ static void rna_ConstraintActuator_range_set(struct PointerRNA *ptr, float value
bConstraintActuator *ca = act->data;
float *fp;
- if(ca->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp= ca->maxloc;
- else if(ca->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp= ca->maxloc+1;
- else fp= ca->maxloc+2;
+ if (ca->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp = ca->maxloc;
+ else if (ca->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp = ca->maxloc+1;
+ else fp = ca->maxloc+2;
*fp = value;
}
@@ -276,9 +276,9 @@ static float rna_ConstraintActuator_fhheight_get(struct PointerRNA *ptr)
bConstraintActuator *ca = act->data;
float *fp;
- if(ca->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp= ca->minloc;
- else if(ca->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp= ca->minloc+1;
- else fp= ca->minloc+2;
+ if (ca->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp = ca->minloc;
+ else if (ca->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp = ca->minloc+1;
+ else fp = ca->minloc+2;
return *fp;
}
@@ -289,9 +289,9 @@ static void rna_ConstraintActuator_fhheight_set(struct PointerRNA *ptr, float va
bConstraintActuator *ca = act->data;
float *fp;
- if(ca->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp= ca->minloc;
- else if(ca->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp= ca->minloc+1;
- else fp= ca->minloc+2;
+ if (ca->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp = ca->minloc;
+ else if (ca->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp = ca->minloc+1;
+ else fp = ca->minloc+2;
*fp = value;
}
@@ -302,9 +302,9 @@ static float rna_ConstraintActuator_spring_get(struct PointerRNA *ptr)
bConstraintActuator *ca = act->data;
float *fp;
- if(ca->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp= ca->maxloc;
- else if(ca->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp= ca->maxloc+1;
- else fp= ca->maxloc+2;
+ if (ca->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp = ca->maxloc;
+ else if (ca->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp = ca->maxloc+1;
+ else fp = ca->maxloc+2;
return *fp;
}
@@ -315,9 +315,9 @@ static void rna_ConstraintActuator_spring_set(struct PointerRNA *ptr, float valu
bConstraintActuator *ca = act->data;
float *fp;
- if(ca->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp= ca->maxloc;
- else if(ca->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp= ca->maxloc+1;
- else fp= ca->maxloc+2;
+ if (ca->mode & (ACT_CONST_DIRPX|ACT_CONST_DIRNX)) fp = ca->maxloc;
+ else if (ca->mode & (ACT_CONST_DIRPY|ACT_CONST_DIRNY)) fp = ca->maxloc+1;
+ else fp = ca->maxloc+2;
*fp = value;
}
@@ -341,7 +341,7 @@ static void rna_ActionActuator_add_set(struct PointerRNA *ptr, int value)
bActuator *act = (bActuator *)ptr->data;
bActionActuator *aa = act->data;
- if(value == 1){
+ if (value == 1){
aa->flag &= ~ACT_IPOFORCE;
aa->flag |= ACT_IPOADD;
}else
@@ -353,7 +353,7 @@ static void rna_ActionActuator_force_set(struct PointerRNA *ptr, int value)
bActuator *act = (bActuator *)ptr->data;
bActionActuator *aa = act->data;
- if(value == 1){
+ if (value == 1){
aa->flag &= ~ACT_IPOADD;
aa->flag |= ACT_IPOFORCE;
}else
@@ -362,7 +362,7 @@ static void rna_ActionActuator_force_set(struct PointerRNA *ptr, int value)
static void rna_ObjectActuator_type_set(struct PointerRNA *ptr, int value)
{
- bActuator *act= (bActuator *)ptr->data;
+ bActuator *act = (bActuator *)ptr->data;
bObjectActuator *oa = act->data;
if (value != oa->type)
{
@@ -400,18 +400,18 @@ static void rna_StateActuator_state_set(PointerRNA *ptr, const int *values)
bActuator *act = (bActuator*)ptr->data;
bStateActuator *sa = act->data;
- int i, tot= 0;
+ int i, tot = 0;
/* ensure we always have some state selected */
- for(i=0; i<OB_MAX_STATES; i++)
- if(values[i])
+ for (i = 0; i<OB_MAX_STATES; i++)
+ if (values[i])
tot++;
- if(tot==0)
+ if (tot == 0)
return;
- for(i=0; i<OB_MAX_STATES; i++) {
- if(values[i]) sa->mask |= (1<<i);
+ for (i = 0; i<OB_MAX_STATES; i++) {
+ if (values[i]) sa->mask |= (1<<i);
else sa->mask &= ~(1<<i);
}
}
@@ -419,11 +419,11 @@ static void rna_StateActuator_state_set(PointerRNA *ptr, const int *values)
/* Always keep in alphabetical order */
EnumPropertyItem *rna_Actuator_type_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
- EnumPropertyItem *item= NULL;
- Object *ob= NULL;
- int totitem= 0;
+ EnumPropertyItem *item = NULL;
+ Object *ob = NULL;
+ int totitem = 0;
- if (ptr->type==&RNA_Actuator || RNA_struct_is_a(ptr->type, &RNA_Actuator)){
+ if (ptr->type == &RNA_Actuator || RNA_struct_is_a(ptr->type, &RNA_Actuator)){
ob = (Object *)ptr->id.data;
} else {
/* can't use ob from ptr->id.data because that enum is also used by operators */
@@ -431,7 +431,7 @@ EnumPropertyItem *rna_Actuator_type_itemf(bContext *C, PointerRNA *ptr, Property
}
if (ob != NULL) {
- if (ob->type==OB_ARMATURE) {
+ if (ob->type == OB_ARMATURE) {
RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_ARMATURE);
}
}
@@ -455,32 +455,32 @@ EnumPropertyItem *rna_Actuator_type_itemf(bContext *C, PointerRNA *ptr, Property
RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_VISIBILITY);
RNA_enum_item_end(&item, &totitem);
- *free= 1;
+ *free = 1;
return item;
}
static void rna_Actuator_Armature_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- bActuator *act= (bActuator *)ptr->data;
+ bActuator *act = (bActuator *)ptr->data;
bArmatureActuator *aa = act->data;
Object *ob = (Object *)ptr->id.data;
- char *posechannel= aa->posechannel;
- char *constraint= aa->constraint;
+ char *posechannel = aa->posechannel;
+ char *constraint = aa->constraint;
/* check that bone exist in the active object */
if (ob->type == OB_ARMATURE && ob->pose) {
bPoseChannel *pchan;
bPose *pose = ob->pose;
- for (pchan=pose->chanbase.first; pchan; pchan=pchan->next) {
+ for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) {
if (!strcmp(pchan->name, posechannel)) {
/* found it, now look for constraint channel */
bConstraint *con;
- for (con=pchan->constraints.first; con; con=con->next) {
+ for (con = pchan->constraints.first; con; con = con->next) {
if (!strcmp(con->name, constraint)) {
/* found it, all ok */
- return;
+ return;
}
}
/* didn't find constraint, make empty */
@@ -500,7 +500,7 @@ static void rna_SteeringActuator_navmesh_set(PointerRNA *ptr, PointerRNA value)
bSteeringActuator *sa = (bSteeringActuator*) act->data;
Object* obj = value.data;
- if (obj && obj->body_type==OB_BODY_TYPE_NAVMESH)
+ if (obj && obj->body_type == OB_BODY_TYPE_NAVMESH)
sa->navmesh = obj;
else
sa->navmesh = NULL;
@@ -530,29 +530,29 @@ void rna_def_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Actuator", NULL);
+ srna = RNA_def_struct(brna, "Actuator", NULL);
RNA_def_struct_ui_text(srna, "Actuator", "Actuator to apply actions in the game engine");
RNA_def_struct_sdna(srna, "bActuator");
RNA_def_struct_refine_func(srna, "rna_Actuator_refine");
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Actuator_name_set");
RNA_def_struct_name_property(srna, prop);
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, actuator_type_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_Actuator_type_set", "rna_Actuator_type_itemf");
RNA_def_property_ui_text(prop, "Type", "");
- prop= RNA_def_property(srna, "pin", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "pin", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_PIN);
RNA_def_property_ui_text(prop, "Pinned", "Display when not linked to a visible states controller");
RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1);
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_SHOW);
RNA_def_property_ui_text(prop, "Expanded", "Set actuator expanded in the user interface");
RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
@@ -565,7 +565,7 @@ static void rna_def_action_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] ={
+ static EnumPropertyItem prop_type_items[] = {
{ACT_ACTION_PLAY, "PLAY", 0, "Play", ""},
{ACT_ACTION_PINGPONG, "PINGPONG", 0, "Ping Pong", ""},
{ACT_ACTION_FLIPPER, "FLIPPER", 0, "Flipper", ""},
@@ -577,17 +577,17 @@ static void rna_def_action_actuator(BlenderRNA *brna)
#endif
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "ActionActuator", "Actuator");
+ srna = RNA_def_struct(brna, "ActionActuator", "Actuator");
RNA_def_struct_ui_text(srna, "Action Actuator", "Actuator to control the object movement");
RNA_def_struct_sdna_from(srna, "bActionActuator", "data");
- prop= RNA_def_property(srna, "play_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "play_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Action Type", "Action playback type");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "act");
RNA_def_property_struct_type(prop, "Action");
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -596,79 +596,79 @@ static void rna_def_action_actuator(BlenderRNA *brna)
RNA_def_property_pointer_funcs(prop, NULL, "rna_Actuator_action_action_set", NULL, NULL);
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_continue_last_frame", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_continue_last_frame", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "end_reset", 1);
RNA_def_property_ui_text(prop, "Continue", "Restore last frame when switching on/off, otherwise play from the start each time");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Property", "Use this property to define the Action position");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sta");
RNA_def_property_ui_range(prop, 0.0, MAXFRAME, 100, 2);
RNA_def_property_ui_text(prop, "Start Frame", "");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "frame_end", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_end", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "end");
RNA_def_property_ui_range(prop, 0.0, MAXFRAME, 100, 2);
RNA_def_property_ui_text(prop, "End Frame", "");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "frame_blend_in", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_blend_in", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "blendin");
RNA_def_property_range(prop, 0, 32767);
RNA_def_property_ui_text(prop, "Blendin", "Number of frames of motion blending");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "priority", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "priority", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Priority", "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)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "layer", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "layer", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 7); /* This should match BL_ActionManager::MAX_ACTION_LAYERS - 1 */
RNA_def_property_ui_text(prop, "Layer", "The animation layer to play the action on");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "layer_weight", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "layer_weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Layer Weight", "How much of the previous layer to blend into this one (0 = add mode)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "frame_property", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_property", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "frameProp");
RNA_def_property_ui_text(prop, "Frame Property", "Assign the action's current frame number to this property");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* booleans */
- prop= RNA_def_property(srna, "use_additive", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_additive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOADD);
RNA_def_property_boolean_funcs(prop, NULL, "rna_ActionActuator_add_set");
RNA_def_property_ui_text(prop, "Add", "Action is added to the current loc/rot/scale in global or local coordinate according to Local flag");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_force", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_force", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOFORCE);
RNA_def_property_boolean_funcs(prop, NULL, "rna_ActionActuator_force_set");
RNA_def_property_ui_text(prop, "Force", "Apply Action as a global or local force depending on the local option (dynamic objects only)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_local", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_local", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOLOCAL);
RNA_def_property_ui_text(prop, "L", "Let the Action act in local coordinates, used in Force and Add mode");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "apply_to_children", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "apply_to_children", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOCHILD);
RNA_def_property_ui_text(prop, "Child", "Update Action on all children Objects as well");
RNA_def_property_update(prop, NC_LOGIC, NULL);
#ifdef __NLA_ACTION_BY_MOTION_ACTUATOR
- prop= RNA_def_property(srna, "stride_length", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "stride_length", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "stridelength");
RNA_def_property_range(prop, 0.0, 2500.0);
RNA_def_property_ui_text(prop, "Cycle", "Distance covered by a single cycle of the action");
@@ -681,128 +681,128 @@ static void rna_def_object_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA* prop;
- static EnumPropertyItem prop_type_items[] ={
+ static EnumPropertyItem prop_type_items[] = {
{ACT_OBJECT_NORMAL, "OBJECT_NORMAL", 0, "Simple Motion", ""},
{ACT_OBJECT_SERVO, "OBJECT_SERVO", 0, "Servo Control", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "ObjectActuator", "Actuator");
+ srna = RNA_def_struct(brna, "ObjectActuator", "Actuator");
RNA_def_struct_ui_text(srna, "Motion Actuator", "Actuator to control the object movement");
RNA_def_struct_sdna_from(srna, "bObjectActuator", "data");
- prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_ObjectActuator_type_set", NULL);
RNA_def_property_ui_text(prop, "Motion Type", "Specify the motion system");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "reference_object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "reference_object", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_pointer_sdna(prop, NULL, "reference");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Reference Object", "Reference object for velocity calculation, leave empty for world reference");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "damping", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "damping", PROP_INT, PROP_NONE);
RNA_def_property_ui_range(prop, 0, 1000, 1, 1);
RNA_def_property_ui_text(prop, "Damping Frames", "Number of frames to reach the target velocity");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "proportional_coefficient", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "proportional_coefficient", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "forcerot[0]");
RNA_def_property_ui_range(prop, 0.0, 200.0, 10, 2);
RNA_def_property_ui_text(prop, "Proportional Coefficient", "Typical value is 60x integral coefficient");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "integral_coefficient", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "integral_coefficient", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "forcerot[1]");
RNA_def_property_ui_range(prop, 0.0, 3.0, 10, 2);
RNA_def_property_float_funcs(prop, NULL, "rna_ObjectActuator_integralcoefficient_set", NULL);
RNA_def_property_ui_text(prop, "Integral Coefficient", "Low value (0.01) for slow response, high value (0.5) for fast response");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "derivate_coefficient", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "derivate_coefficient", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "forcerot[2]");
RNA_def_property_ui_range(prop, -100.0, 100.0, 10, 2);
RNA_def_property_ui_text(prop, "Derivate Coefficient", "Not required, high values can cause instability");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* Servo Limit */
- prop= RNA_def_property(srna, "force_max_x", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "force_max_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dloc[0]");
RNA_def_property_ui_range(prop, -100.0, 100.0, 1, 2);
RNA_def_property_ui_text(prop, "Max", "Upper limit for X force");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "force_min_x", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "force_min_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "drot[0]");
RNA_def_property_ui_range(prop, -100.0, 100.0, 1, 2);
RNA_def_property_ui_text(prop, "Min", "Lower limit for X force");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "force_max_y", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "force_max_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dloc[1]");
RNA_def_property_ui_range(prop, -100.0, 100.0, 1, 2);
RNA_def_property_ui_text(prop, "Max", "Upper limit for Y force");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "force_min_y", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "force_min_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "drot[1]");
RNA_def_property_ui_range(prop, -100.0, 100.0, 1, 2);
RNA_def_property_ui_text(prop, "Min", "Lower limit for Y force");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "force_max_z", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "force_max_z", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dloc[2]");
RNA_def_property_ui_range(prop, -100.0, 100.0, 1, 2);
RNA_def_property_ui_text(prop, "Max", "Upper limit for Z force");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "force_min_z", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "force_min_z", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "drot[2]");
RNA_def_property_ui_range(prop, -100.0, 100.0, 1, 2);
RNA_def_property_ui_text(prop, "Min", "Lower limit for Z force");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* floats 3 Arrays*/
- prop= RNA_def_property(srna, "offset_location", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "offset_location", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "dloc");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 2);
RNA_def_property_ui_text(prop, "Loc", "Location");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "offset_rotation", PROP_FLOAT, PROP_EULER);
+ prop = RNA_def_property(srna, "offset_rotation", PROP_FLOAT, PROP_EULER);
RNA_def_property_float_sdna(prop, NULL, "drot");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 2);
RNA_def_property_ui_text(prop, "Rot", "Rotation");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "force", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "force", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "forceloc");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 2);
RNA_def_property_ui_text(prop, "Force", "Force");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "torque", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "torque", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "forcerot");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 2);
RNA_def_property_ui_text(prop, "Torque", "Torque");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "linear_velocity", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "linear_velocity", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "linearvelocity");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 2);
RNA_def_property_ui_text(prop, "Linear Velocity", "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)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "angular_velocity", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "angular_velocity", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "angularvelocity");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 2);
@@ -810,52 +810,52 @@ static void rna_def_object_actuator(BlenderRNA *brna)
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* booleans */
- prop= RNA_def_property(srna, "use_local_location", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_local_location", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_DLOC_LOCAL);
RNA_def_property_ui_text(prop, "L", "Location is defined in local coordinates");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_local_rotation", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_local_rotation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_DROT_LOCAL);
RNA_def_property_ui_text(prop, "L", "Rotation is defined in local coordinates");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_local_force", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_local_force", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_FORCE_LOCAL);
RNA_def_property_ui_text(prop, "L", "Force is defined in local coordinates");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_local_torque", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_local_torque", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_TORQUE_LOCAL);
RNA_def_property_ui_text(prop, "L", "Torque is defined in local coordinates");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_local_linear_velocity", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_local_linear_velocity", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_LIN_VEL_LOCAL);
RNA_def_property_ui_text(prop, "L", "Velocity is defined in local coordinates");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_local_angular_velocity", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_local_angular_velocity", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_ANG_VEL_LOCAL);
RNA_def_property_ui_text(prop, "L", "Angular velocity is defined in local coordinates");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_add_linear_velocity", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_add_linear_velocity", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_ADD_LIN_VEL);
RNA_def_property_ui_text(prop, "Add", "Toggles between ADD and SET linV");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_servo_limit_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_servo_limit_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_SERVO_LIMIT_X);
RNA_def_property_ui_text(prop, "X", "Set limit to force along the X axis");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_servo_limit_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_servo_limit_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_SERVO_LIMIT_Y);
RNA_def_property_ui_text(prop, "Y", "Set limit to force along the Y axis");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_servo_limit_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_servo_limit_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_SERVO_LIMIT_Z);
RNA_def_property_ui_text(prop, "Z", "Set limit to force along the Z axis");
RNA_def_property_update(prop, NC_LOGIC, NULL);
@@ -866,18 +866,18 @@ static void rna_def_camera_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_axis_items[] ={
+ static EnumPropertyItem prop_axis_items[] = {
{OB_POSX, "POS_X", 0, "+X", "Camera tries to get behind the X axis"},
{OB_POSY, "POS_Y", 0, "+Y", "Camera tries to get behind the Y axis"},
{OB_NEGX, "NEG_X", 0, "-X", "Camera tries to get behind the -X axis"},
{OB_NEGY, "NEG_Y", 0, "-Y", "Camera tries to get behind the -Y axis"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "CameraActuator", "Actuator");
+ srna = RNA_def_struct(brna, "CameraActuator", "Actuator");
RNA_def_struct_ui_text(srna, "Camera Actuator", "");
RNA_def_struct_sdna_from(srna, "bCameraActuator", "data");
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_pointer_sdna(prop, NULL, "ob");
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -885,22 +885,22 @@ static void rna_def_camera_actuator(BlenderRNA *brna)
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* floats */
- prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "height", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_range(prop, 0.0, 20.0, 1, 2);
RNA_def_property_ui_text(prop, "Height", "");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "min", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "min", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_range(prop, 0.0, 20.0, 1, 2);
RNA_def_property_ui_text(prop, "Min", "");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "max", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_range(prop, 0.0, 20.0, 1, 2);
RNA_def_property_ui_text(prop, "Max", "");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "damping", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "damping", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "damping");
RNA_def_property_range(prop, 0, 10.0);
RNA_def_property_ui_range(prop, 0, 5.0, 1, 2);
@@ -908,7 +908,7 @@ static void rna_def_camera_actuator(BlenderRNA *brna)
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* +x/+y/-x/-y */
- prop= RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "axis");
RNA_def_property_enum_items(prop, prop_axis_items);
RNA_def_property_ui_text(prop, "Axis", "Axis the Camera will try to get behind");
@@ -920,7 +920,7 @@ static void rna_def_sound_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] ={
+ static EnumPropertyItem prop_type_items[] = {
{ACT_SND_PLAY_STOP_SOUND, "PLAYSTOP", 0, "Play Stop", ""},
{ACT_SND_PLAY_END_SOUND, "PLAYEND", 0, "Play End", ""},
{ACT_SND_LOOP_STOP_SOUND, "LOOPSTOP", 0, "Loop Stop", ""},
@@ -930,84 +930,84 @@ static void rna_def_sound_actuator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- srna= RNA_def_struct(brna, "SoundActuator", "Actuator");
+ srna = RNA_def_struct(brna, "SoundActuator", "Actuator");
RNA_def_struct_ui_text(srna, "Sound Actuator", "Actuator to handle sound");
RNA_def_struct_sdna_from(srna, "bSoundActuator", "data");
- prop= RNA_def_property(srna, "sound", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "sound", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Sound");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_struct_ui_text(srna, "Sound", "Sound file");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Play Mode", "");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 2);
RNA_def_property_range(prop, 0.0, 2.0);
RNA_def_property_ui_text(prop, "Volume", "Initial volume of the sound");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "pitch", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "pitch", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_range(prop, -12.0, 12.0, 1, 2);
RNA_def_property_ui_text(prop, "Pitch", "Pitch of the sound");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* floats - 3D Parameters */
- prop= RNA_def_property(srna, "gain_3d_min", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "gain_3d_min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sound3D.min_gain");
RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 2);
RNA_def_property_ui_text(prop, "Minimum Gain", "The minimum gain of the sound, no matter how far it is away");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "gain_3d_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "gain_3d_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sound3D.max_gain");
RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 2);
RNA_def_property_ui_text(prop, "Maximum Gain", "The maximum gain of the sound, no matter how near it is");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "distance_3d_reference", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "distance_3d_reference", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sound3D.reference_distance");
RNA_def_property_ui_range(prop, 0.0, FLT_MAX, 1, 2);
RNA_def_property_ui_text(prop, "Reference Distance", "The distance where the sound has a gain of 1.0");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "distance_3d_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "distance_3d_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sound3D.max_distance");
RNA_def_property_ui_range(prop, 0.0, FLT_MAX, 1, 2);
RNA_def_property_ui_text(prop, "Maximum Distance", "The maximum distance at which you can hear the sound");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "rolloff_factor_3d", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "rolloff_factor_3d", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sound3D.rolloff_factor");
RNA_def_property_ui_range(prop, 0.0, 5.0, 1, 2);
RNA_def_property_ui_text(prop, "Rolloff", "The influence factor on volume depending on distance");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "cone_outer_gain_3d", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "cone_outer_gain_3d", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sound3D.cone_outer_gain");
RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 2);
RNA_def_property_ui_text(prop, "Cone Outer Gain", "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)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "cone_outer_angle_3d", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "cone_outer_angle_3d", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sound3D.cone_outer_angle");
RNA_def_property_ui_range(prop, 0.0, 360.0, 1, 2);
RNA_def_property_ui_text(prop, "Cone Outer Angle", "The angle of the outer cone");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "cone_inner_angle_3d", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "cone_inner_angle_3d", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sound3D.cone_inner_angle");
RNA_def_property_ui_range(prop, 0.0, 360.0, 1, 2);
RNA_def_property_ui_text(prop, "Cone Inner Angle", "The angle of the inner cone");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* booleans */
- prop= RNA_def_property(srna, "use_sound_3d", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_sound_3d", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_SND_3D_SOUND);
RNA_def_property_ui_text(prop, "3D Sound", "Enable/Disable 3D Sound");
RNA_def_property_update(prop, NC_LOGIC, NULL);
@@ -1018,7 +1018,7 @@ static void rna_def_property_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] ={
+ static EnumPropertyItem prop_type_items[] = {
{ACT_PROP_ASSIGN, "ASSIGN", 0, "Assign", ""},
{ACT_PROP_ADD, "ADD", 0, "Add", ""},
{ACT_PROP_COPY, "COPY", 0, "Copy", ""},
@@ -1026,35 +1026,35 @@ static void rna_def_property_actuator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- srna= RNA_def_struct(brna, "PropertyActuator", "Actuator");
+ srna = RNA_def_struct(brna, "PropertyActuator", "Actuator");
RNA_def_struct_ui_text(srna, "Property Actuator", "Actuator to handle properties");
RNA_def_struct_sdna_from(srna, "bPropertyActuator", "data");
- prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Mode", "");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Property", "The name of the property");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "value", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "value", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Value", "The name of the property or the value to use (use \"\" around strings)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* Copy Mode */
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_pointer_sdna(prop, NULL, "ob");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object", "Copy from this Object");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- //XXX add even magic'er property lookup (need to look for the property list of the target object)
- prop= RNA_def_property(srna, "object_property", PROP_STRING, PROP_NONE);
+ /*XXX add even magic'er property lookup (need to look for the property list of the target object) */
+ prop = RNA_def_property(srna, "object_property", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "value");
RNA_def_property_ui_text(prop, "Property Name", "Copy this property");
RNA_def_property_update(prop, NC_LOGIC, NULL);
@@ -1065,7 +1065,7 @@ static void rna_def_constraint_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] ={
+ static EnumPropertyItem prop_type_items[] = {
{ACT_CONST_TYPE_LOC, "LOC", 0, "Location Constraint", ""},
{ACT_CONST_TYPE_DIST, "DIST", 0, "Distance Constraint", ""},
{ACT_CONST_TYPE_ORI, "ORI", 0, "Orientation Constraint", ""},
@@ -1073,7 +1073,7 @@ static void rna_def_constraint_actuator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_limit_items[] ={
+ static EnumPropertyItem prop_limit_items[] = {
{ACT_CONST_NONE, "NONE", 0, "None", ""},
{ACT_CONST_LOCX, "LOCX", 0, "Loc X", ""},
{ACT_CONST_LOCY, "LOCY", 0, "Loc Y", ""},
@@ -1081,7 +1081,7 @@ static void rna_def_constraint_actuator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_direction_items[] ={
+ static EnumPropertyItem prop_direction_items[] = {
{ACT_CONST_NONE, "NONE", 0, "None", ""},
{ACT_CONST_DIRPX, "DIRPX", 0, "X axis", ""},
{ACT_CONST_DIRPY, "DIRPY", 0, "Y axis", ""},
@@ -1092,7 +1092,7 @@ static void rna_def_constraint_actuator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_direction_pos_items[] ={
+ static EnumPropertyItem prop_direction_pos_items[] = {
{ACT_CONST_NONE, "NONE", 0, "None", ""},
{ACT_CONST_DIRPX, "DIRPX", 0, "X axis", ""},
{ACT_CONST_DIRPY, "DIRPY", 0, "Y axis", ""},
@@ -1100,172 +1100,172 @@ static void rna_def_constraint_actuator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- srna= RNA_def_struct(brna, "ConstraintActuator", "Actuator");
+ srna = RNA_def_struct(brna, "ConstraintActuator", "Actuator");
RNA_def_struct_ui_text(srna, "Constraint Actuator", "Actuator to handle Constraints");
RNA_def_struct_sdna_from(srna, "bConstraintActuator", "data");
- prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_ConstraintActuator_type_set", NULL);
RNA_def_property_ui_text(prop, "Constraints Mode", "The type of the constraint");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "limit", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "limit", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, prop_limit_items);
RNA_def_property_ui_text(prop, "Limit", "");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, prop_direction_items);
RNA_def_property_ui_text(prop, "Direction", "Direction of the ray");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "direction_axis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "direction_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, prop_direction_items);
RNA_def_property_ui_text(prop, "Direction", "Select the axis to be aligned along the reference direction");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* ACT_CONST_TYPE_LOC */
- prop= RNA_def_property(srna, "limit_min", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "limit_min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_funcs(prop, "rna_ConstraintActuator_limitmin_get", "rna_ConstraintActuator_limitmin_set", NULL);
RNA_def_property_ui_range(prop, -2000.f, 2000.f, 1, 2);
RNA_def_property_ui_text(prop, "Min", "");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "limit_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "limit_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_funcs(prop, "rna_ConstraintActuator_limitmax_get", "rna_ConstraintActuator_limitmax_set", NULL);
RNA_def_property_ui_range(prop, -2000.f, 2000.f, 1, 2);
RNA_def_property_ui_text(prop, "Max", "");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "damping", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "damping", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "damp");
RNA_def_property_ui_range(prop, 0, 100, 1, 1);
RNA_def_property_ui_text(prop, "Damping", "Damping factor: time constant (in frame) of low pass filter");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* ACT_CONST_TYPE_DIST */
- prop= RNA_def_property(srna, "range", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "range", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_funcs(prop, "rna_ConstraintActuator_range_get", "rna_ConstraintActuator_range_set", NULL);
RNA_def_property_ui_range(prop, 0.f, 2000.f, 1, 2);
RNA_def_property_ui_text(prop, "Range", "Maximum length of ray");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_funcs(prop, "rna_ConstraintActuator_distance_get", "rna_ConstraintActuator_distance_set", NULL);
RNA_def_property_ui_range(prop, -2000.f, 2000.f, 1, 2);
RNA_def_property_ui_text(prop, "Distance", "Keep this distance to target");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- //XXX to use a pointer or add a material lookup
- prop= RNA_def_property(srna, "material", PROP_STRING, PROP_NONE);
+ /*XXX to use a pointer or add a material lookup */
+ prop = RNA_def_property(srna, "material", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "matprop");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Material", "Ray detects only Objects with this material");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- //XXX add magic property lookup
- prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
+ /*XXX add magic property lookup */
+ prop = RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "matprop");
RNA_def_property_ui_text(prop, "Property", "Ray detects only Objects with this property");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "time", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "time", PROP_INT, PROP_NONE);
RNA_def_property_ui_range(prop, 0, 1000, 1, 2);
RNA_def_property_ui_text(prop, "Time", "Maximum activation time in frame, 0 for unlimited");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "damping_rotation", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "damping_rotation", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "rotdamp");
RNA_def_property_ui_range(prop, 0, 100, 1, 1);
RNA_def_property_ui_text(prop, "RotDamp", "Use a different damping for orientation");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* ACT_CONST_TYPE_ORI */
- prop= RNA_def_property(srna, "direction_axis_pos", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "direction_axis_pos", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, prop_direction_pos_items);
RNA_def_property_ui_text(prop, "Direction", "Select the axis to be aligned along the reference direction");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "rotation_max", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "rotation_max", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "maxrot");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_range(prop, -2000.0, 2000.0, 10, 2);
RNA_def_property_ui_text(prop, "Reference Direction", "Reference Direction");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- //XXX TODO - use radians internally then change to PROP_ANGLE
- prop= RNA_def_property(srna, "angle_min", PROP_FLOAT, PROP_NONE);
+ /*XXX TODO - use radians internally then change to PROP_ANGLE */
+ prop = RNA_def_property(srna, "angle_min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "minloc[0]");
RNA_def_property_range(prop, 0.0, 180.0);
RNA_def_property_ui_text(prop, "Min Angle", "Minimum angle (in degree) to maintain with target direction (no correction is done if angle with target direction is between min and max)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- //XXX TODO - use radians internally then change to PROP_ANGLE
- prop= RNA_def_property(srna, "angle_max", PROP_FLOAT, PROP_NONE);
+ /*XXX TODO - use radians internally then change to PROP_ANGLE */
+ prop = RNA_def_property(srna, "angle_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxloc[0]");
RNA_def_property_range(prop, 0.0, 180.0);
RNA_def_property_ui_text(prop, "Max Angle", "Maximum angle (in degree) allowed with target direction (no correction is done if angle with target direction is between min and max)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* ACT_CONST_TYPE_FH */
- prop= RNA_def_property(srna, "fh_height", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "fh_height", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_funcs(prop, "rna_ConstraintActuator_fhheight_get", "rna_ConstraintActuator_fhheight_set", NULL);
RNA_def_property_ui_range(prop, 0.01, 2000.0, 10, 2);
RNA_def_property_ui_text(prop, "Distance", "Height of the force field area");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "fh_force", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "fh_force", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_funcs(prop, "rna_ConstraintActuator_spring_get", "rna_ConstraintActuator_spring_set", NULL);
RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 2);
RNA_def_property_ui_text(prop, "Force", "Spring force within the force field area");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "fh_damping", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "fh_damping", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxrot[0]");
RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 2);
RNA_def_property_ui_text(prop, "Damping", "Damping factor of the force field spring");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* booleans */
- prop= RNA_def_property(srna, "use_force_distance", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_force_distance", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_CONST_DISTANCE);
RNA_def_property_ui_text(prop, "Force Distance", "Force distance of object to point of impact of ray");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_local", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_local", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_CONST_LOCAL);
RNA_def_property_ui_text(prop, "L", "Set ray along object's axis or global axis");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_normal", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_CONST_NORMAL);
RNA_def_property_ui_text(prop, "N", "Set object axis along (local axis) or parallel (global axis) to the normal at hit position");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_persistent", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_persistent", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_CONST_PERMANENT);
RNA_def_property_ui_text(prop, "PER", "Persistent actuator: stays active even if ray does not reach target");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- //XXX to use an enum instead of a flag if possible
- prop= RNA_def_property(srna, "use_material_detect", PROP_BOOLEAN, PROP_NONE);
+ /*XXX to use an enum instead of a flag if possible */
+ prop = RNA_def_property(srna, "use_material_detect", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_CONST_MATERIAL);
RNA_def_property_ui_text(prop, "M/P", "Detect material instead of property");
RNA_def_property_boolean_funcs(prop, NULL, "rna_Actuator_constraint_detect_material_set");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_fh_paralel_axis", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_fh_paralel_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_CONST_DOROTFH);
RNA_def_property_ui_text(prop, "Rot Fh", "Keep object axis parallel to normal");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_fh_normal", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_fh_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_CONST_NORMAL);
RNA_def_property_ui_text(prop, "N", "Add a horizontal spring force on slopes");
RNA_def_property_update(prop, NC_LOGIC, NULL);
@@ -1276,7 +1276,7 @@ static void rna_def_edit_object_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_dyn_items[] ={
+ static EnumPropertyItem prop_dyn_items[] = {
{ACT_EDOB_RESTORE_DYN, "RESTOREDYN", 0, "Restore Dynamics", ""},
{ACT_EDOB_SUSPEND_DYN, "SUSPENDDYN", 0, "Suspend Dynamics", ""},
{ACT_EDOB_ENABLE_RB, "ENABLERIGIDBODY", 0, "Enable Rigid Body", ""},
@@ -1284,7 +1284,7 @@ static void rna_def_edit_object_actuator(BlenderRNA *brna)
{ACT_EDOB_SET_MASS, "SETMASS", 0, "Set Mass", ""},
{0, NULL, 0, NULL, NULL} };
- static EnumPropertyItem prop_type_items[] ={
+ static EnumPropertyItem prop_type_items[] = {
{ACT_EDOB_ADD_OBJECT, "ADDOBJECT", 0, "Add Object", ""},
{ACT_EDOB_END_OBJECT, "ENDOBJECT", 0, "End Object", ""},
{ACT_EDOB_REPLACE_MESH, "REPLACEMESH", 0, "Replace Mesh", ""},
@@ -1292,37 +1292,37 @@ static void rna_def_edit_object_actuator(BlenderRNA *brna)
{ACT_EDOB_DYNAMICS, "DYNAMICS", 0, "Dynamics", ""},
{0, NULL, 0, NULL, NULL} };
- srna= RNA_def_struct(brna, "EditObjectActuator", "Actuator");
+ srna = RNA_def_struct(brna, "EditObjectActuator", "Actuator");
RNA_def_struct_ui_text(srna, "Edit Object Actuator", "Actuator used to edit objects");
RNA_def_struct_sdna_from(srna, "bEditObjectActuator", "data");
- prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Edit Object", "The mode of the actuator");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "dynamic_operation", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "dynamic_operation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "dyn_operation");
RNA_def_property_enum_items(prop, prop_dyn_items);
RNA_def_property_ui_text(prop, "Dynamic Operation", "");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_pointer_sdna(prop, NULL, "ob");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object", "Add this Object and all its children (can't be on a visible layer)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "track_object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "track_object", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_pointer_sdna(prop, NULL, "ob");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object", "Track to this Object");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "mesh", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "mesh", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Mesh");
RNA_def_property_pointer_sdna(prop, NULL, "me");
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -1331,25 +1331,25 @@ static void rna_def_edit_object_actuator(BlenderRNA *brna)
RNA_def_property_pointer_funcs(prop, NULL, "rna_Actuator_editobject_mesh_set", NULL, NULL);
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "time", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "time", PROP_INT, PROP_NONE);
RNA_def_property_ui_range(prop, 0, 2000, 1, 1);
RNA_def_property_ui_text(prop, "Time", "Duration the new Object lives or the track takes");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_range(prop, 0, 10000, 1, 2);
RNA_def_property_ui_text(prop, "Mass", "The mass of the object");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* floats 3 Arrays*/
- prop= RNA_def_property(srna, "linear_velocity", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "linear_velocity", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "linVelocity");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_range(prop, -100.0, 100.0, 10, 2);
RNA_def_property_ui_text(prop, "Linear Velocity", "Velocity upon creation");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "angular_velocity", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "angular_velocity", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "angVelocity");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 2);
@@ -1357,27 +1357,27 @@ static void rna_def_edit_object_actuator(BlenderRNA *brna)
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* booleans */
- prop= RNA_def_property(srna, "use_local_linear_velocity", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_local_linear_velocity", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "localflag", ACT_EDOB_LOCAL_LINV);
RNA_def_property_ui_text(prop, "L", "Apply the transformation locally");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_local_angular_velocity", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_local_angular_velocity", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "localflag", ACT_EDOB_LOCAL_ANGV);
RNA_def_property_ui_text(prop, "L", "Apply the rotation locally");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_replace_display_mesh", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_replace_display_mesh", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", ACT_EDOB_REPLACE_MESH_NOGFX);
RNA_def_property_ui_text(prop, "Gfx", "Replace the display mesh");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_replace_physics_mesh", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_replace_physics_mesh", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_EDOB_REPLACE_MESH_PHYS);
RNA_def_property_ui_text(prop, "Phys", "Replace the physics mesh (triangle bounds only - compound shapes not supported)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_3d_tracking", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_3d_tracking", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_TRACK_3D);
RNA_def_property_ui_text(prop, "3D", "Enable 3D tracking");
RNA_def_property_update(prop, NC_LOGIC, NULL);
@@ -1388,7 +1388,7 @@ static void rna_def_scene_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] ={
+ static EnumPropertyItem prop_type_items[] = {
{ACT_SCENE_RESTART, "RESTART", 0, "Restart", ""},
{ACT_SCENE_SET, "SET", 0, "Set Scene", ""},
{ACT_SCENE_CAMERA, "CAMERA", 0, "Set Camera", ""},
@@ -1399,24 +1399,24 @@ static void rna_def_scene_actuator(BlenderRNA *brna)
{ACT_SCENE_RESUME, "RESUME", 0, "Resume Scene", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "SceneActuator", "Actuator");
+ srna = RNA_def_struct(brna, "SceneActuator", "Actuator");
RNA_def_struct_ui_text(srna, "Scene Actuator", "");
RNA_def_struct_sdna_from(srna, "bSceneActuator", "data");
- prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Mode", "");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- //XXX filter only camera objects
- prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
+ /*XXX filter only camera objects */
+ prop = RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Camera Object", "Set this Camera (leave empty to refer to self object)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "scene", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "scene", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Scene");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Scene", "Scene to be added/removed/paused/resumed");
@@ -1444,7 +1444,7 @@ static void rna_def_random_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_distribution_items[] ={
+ static EnumPropertyItem prop_distribution_items[] = {
{ACT_RANDOM_BOOL_CONST, "BOOL_CONSTANT", 0, "Bool Constant", ""},
{ACT_RANDOM_BOOL_UNIFORM, "BOOL_UNIFORM", 0, "Bool Uniform", ""},
{ACT_RANDOM_BOOL_BERNOUILLI, "BOOL_BERNOUILLI", 0, "Bool Bernoulli", ""},
@@ -1457,22 +1457,22 @@ static void rna_def_random_actuator(BlenderRNA *brna)
{ACT_RANDOM_FLOAT_NEGATIVE_EXPONENTIAL, "FLOAT_NEGATIVE_EXPONENTIAL", 0, "Float Neg. Exp.", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "RandomActuator", "Actuator");
+ srna = RNA_def_struct(brna, "RandomActuator", "Actuator");
RNA_def_struct_ui_text(srna, "Random Actuator", "");
RNA_def_struct_sdna_from(srna, "bRandomActuator", "data");
- prop= RNA_def_property(srna, "seed", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "seed", PROP_INT, PROP_NONE);
RNA_def_property_ui_range(prop, 0, 1000, 1, 1);
RNA_def_property_range(prop, 0, MAXFRAME);
RNA_def_property_ui_text(prop, "Seed", "Initial seed of the random generator, use Python for more freedom (choose 0 for not random)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "propname");
RNA_def_property_ui_text(prop, "Property", "Assign the random value to this property");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "distribution", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "distribution", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_distribution_items);
RNA_def_property_ui_text(prop, "Distribution", "Choose the type of distribution");
RNA_def_property_update(prop, NC_LOGIC, NULL);
@@ -1481,83 +1481,83 @@ static void rna_def_random_actuator(BlenderRNA *brna)
/* int_arg_1, int_arg_2, float_arg_1, float_arg_2 */
/* ACT_RANDOM_BOOL_CONST */
- prop= RNA_def_property(srna, "use_always_true", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_always_true", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "int_arg_1", 1);
RNA_def_property_ui_text(prop, "Always True", "Always false or always true");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* ACT_RANDOM_BOOL_UNIFORM */
- // label => "Choose between true and false, 50% chance each"
+ /* label => "Choose between true and false, 50% chance each" */
/* ACT_RANDOM_BOOL_BERNOUILLI */
- prop= RNA_def_property(srna, "chance", PROP_FLOAT, PROP_PERCENTAGE);
+ prop = RNA_def_property(srna, "chance", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "float_arg_1");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Chance", "Pick a number between 0 and 1, success if it's below this value");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* ACT_RANDOM_INT_CONST */
- prop= RNA_def_property(srna, "int_value", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "int_value", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "int_arg_1");
RNA_def_property_ui_range(prop, -1000, 1000, 1, 1);
RNA_def_property_ui_text(prop, "Value", "Always return this number");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* ACT_RANDOM_INT_UNIFORM */
- prop= RNA_def_property(srna, "int_min", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "int_min", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "int_arg_1");
RNA_def_property_range(prop, -1000, 1000);
RNA_def_property_ui_text(prop, "Min", "Choose a number from a range: lower boundary of the range");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "int_max", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "int_max", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "int_arg_2");
RNA_def_property_range(prop, -1000, 1000);
RNA_def_property_ui_text(prop, "Max", "Choose a number from a range: upper boundary of the range");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* ACT_RANDOM_INT_POISSON */
- prop= RNA_def_property(srna, "int_mean", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "int_mean", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "float_arg_1");
RNA_def_property_range(prop, 0.01, 100.0);
RNA_def_property_ui_text(prop, "Mean", "Expected mean value of the distribution");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* ACT_RANDOM_FLOAT_CONST */
- prop= RNA_def_property(srna, "float_value", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "float_value", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "float_arg_1");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Value", "Always return this number");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* ACT_RANDOM_FLOAT_UNIFORM */
- prop= RNA_def_property(srna, "float_min", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "float_min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "float_arg_1");
RNA_def_property_range(prop, -1000.0, 1000.0);
RNA_def_property_ui_text(prop, "Min", "Choose a number from a range: lower boundary of the range");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "float_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "float_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "float_arg_2");
RNA_def_property_range(prop, -1000.0, 1000.0);
RNA_def_property_ui_text(prop, "Max", "Choose a number from a range: upper boundary of the range");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* ACT_RANDOM_FLOAT_NORMAL */
- prop= RNA_def_property(srna, "float_mean", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "float_mean", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "float_arg_1");
RNA_def_property_range(prop, -1000.0, 1000.0);
RNA_def_property_ui_text(prop, "Mean", "A normal distribution: mean of the distribution");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "standard_derivation", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "standard_derivation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "float_arg_2");
RNA_def_property_range(prop, -1000.0, 1000.0);
RNA_def_property_ui_text(prop, "SD", "A normal distribution: standard deviation of the distribution");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* ACT_RANDOM_FLOAT_NEGATIVE_EXPONENTIAL */
- prop= RNA_def_property(srna, "half_life_time", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "half_life_time", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "float_arg_1");
RNA_def_property_range(prop, -1000.0, 1000.0);
RNA_def_property_ui_text(prop, "Half-Life Time", "Negative exponential dropoff");
@@ -1569,37 +1569,37 @@ static void rna_def_message_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_body_type_items[] ={
+ static EnumPropertyItem prop_body_type_items[] = {
{ACT_MESG_MESG, "TEXT", 0, "Text", ""},
{ACT_MESG_PROP, "PROPERTY", 0, "Property", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "MessageActuator", "Actuator");
+ srna = RNA_def_struct(brna, "MessageActuator", "Actuator");
RNA_def_struct_ui_text(srna, "Message Actuator", "");
RNA_def_struct_sdna_from(srna, "bMessageActuator", "data");
- prop= RNA_def_property(srna, "to_property", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "to_property", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "toPropName");
RNA_def_property_ui_text(prop, "To", "Optional, send message to objects with this name only, or empty to broadcast");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "subject", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "subject", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Subject", "Optional, message subject (this is what can be filtered on)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "body_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "body_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "bodyType");
RNA_def_property_enum_items(prop, prop_body_type_items);
RNA_def_property_ui_text(prop, "Body", "Toggle message type: either Text or a PropertyName");
/* ACT_MESG_MESG */
- prop= RNA_def_property(srna, "body_message", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "body_message", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "body");
RNA_def_property_ui_text(prop, "Body", "Optional, message body Text");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* ACT_MESG_PROP */
- prop= RNA_def_property(srna, "body_property", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "body_property", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "body");
RNA_def_property_ui_text(prop, "Prop Name", "The message body will be set by the Property Value");
RNA_def_property_update(prop, NC_LOGIC, NULL);
@@ -1610,11 +1610,11 @@ static void rna_def_game_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] ={
-// {ACT_GAME_LOAD, "LOAD", 0, "Load Game", ""},
-// {ACT_GAME_START, "START", 0, "Start Loaded Game", ""},
-// keeping the load/start hacky for compatibility with 2.49
-// ideally we could use ACT_GAME_START again and do a do_version()
+ static EnumPropertyItem prop_type_items[] = {
+/* {ACT_GAME_LOAD, "LOAD", 0, "Load Game", ""}, */
+/* {ACT_GAME_START, "START", 0, "Start Loaded Game", ""}, */
+/* keeping the load/start hacky for compatibility with 2.49 */
+/* ideally we could use ACT_GAME_START again and do a do_version() */
{ACT_GAME_LOAD, "START", 0, "Start Game From File", ""},
{ACT_GAME_RESTART, "RESTART", 0, "Restart Game", ""},
@@ -1623,21 +1623,21 @@ static void rna_def_game_actuator(BlenderRNA *brna)
{ACT_GAME_LOADCFG, "LOADCFG", 0, "Load bge.logic.globalDict", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "GameActuator", "Actuator");
+ srna = RNA_def_struct(brna, "GameActuator", "Actuator");
RNA_def_struct_ui_text(srna, "Game Actuator", "");
RNA_def_struct_sdna_from(srna, "bGameActuator", "data");
- prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Game", "");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* ACT_GAME_LOAD */
- prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH);
+ prop = RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH);
RNA_def_property_ui_text(prop, "File", "Load this blend file, use the \"//\" prefix for a path relative to the current blend file");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- //XXX to do: an operator that calls file_browse with relative_path on and blender filtering active
+ /*XXX to do: an operator that calls file_browse with relative_path on and blender filtering active */
}
static void rna_def_visibility_actuator(BlenderRNA *brna)
@@ -1645,21 +1645,21 @@ static void rna_def_visibility_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "VisibilityActuator", "Actuator");
+ srna = RNA_def_struct(brna, "VisibilityActuator", "Actuator");
RNA_def_struct_ui_text(srna, "Visibility Actuator", "Actuator to set visibility and occlusion of the object");
RNA_def_struct_sdna_from(srna, "bVisibilityActuator", "data");
- prop= RNA_def_property(srna, "use_visible", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_visible", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", ACT_VISIBILITY_INVISIBLE);
RNA_def_property_ui_text(prop, "Visible", "Set the objects visible (initialized from the object render restriction toggle in physics button)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_occlusion", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_occlusion", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_VISIBILITY_OCCLUSION);
RNA_def_property_ui_text(prop, "Occlusion", "Set the object to occlude objects behind it (initialized from the object type in physics button)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "apply_to_children", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "apply_to_children", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_VISIBILITY_RECURSIVE);
RNA_def_property_ui_text(prop, "Children", "Set all the children of this object to the same visibility/occlusion recursively");
RNA_def_property_update(prop, NC_LOGIC, NULL);
@@ -1670,7 +1670,7 @@ static void rna_def_twodfilter_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] ={
+ static EnumPropertyItem prop_type_items[] = {
{ACT_2DFILTER_ENABLED, "ENABLE", 0, "Enable Filter", ""},
{ACT_2DFILTER_DISABLED, "DISABLE", 0, "Disable Filter", ""},
{ACT_2DFILTER_NOFILTER, "REMOVE", 0, "Remove Filter", ""},
@@ -1686,40 +1686,40 @@ static void rna_def_twodfilter_actuator(BlenderRNA *brna)
{ACT_2DFILTER_SEPIA, "SEPIA", 0, "Sepia", ""},
{ACT_2DFILTER_INVERT, "INVERT", 0, "Invert", ""},
{ACT_2DFILTER_CUSTOMFILTER, "CUSTOMFILTER", 0, "Custom Filter", ""},
-// {ACT_2DFILTER_NUMBER_OF_FILTERS, "", 0, "Do not use it. Sentinel", ""},
+/* {ACT_2DFILTER_NUMBER_OF_FILTERS, "", 0, "Do not use it. Sentinel", ""}, */
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "Filter2DActuator", "Actuator");
+ srna = RNA_def_struct(brna, "Filter2DActuator", "Actuator");
RNA_def_struct_ui_text(srna, "Filter 2D Actuator", "Actuator to apply screen graphic effects");
RNA_def_struct_sdna_from(srna, "bTwoDFilterActuator", "data");
- prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Filter 2D Type", "");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "glsl_shader", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "glsl_shader", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "text");
RNA_def_property_struct_type(prop, "Text");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Script", "");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "filter_pass", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "filter_pass", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "int_arg");
RNA_def_property_ui_text(prop, "Pass Number", "Set filter order");
- RNA_def_property_range(prop, 0, 99); //MAX_RENDER_PASS-1
+ RNA_def_property_range(prop, 0, 99); /*MAX_RENDER_PASS-1 */
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "motion_blur_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "motion_blur_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "float_arg");
RNA_def_property_ui_text(prop, "Value", "Motion blur factor");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* booleans */
- prop= RNA_def_property(srna, "use_motion_blur", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_motion_blur", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", 1);
RNA_def_property_ui_text(prop, "Enable", "Enable/Disable Motion Blur");
RNA_def_property_update(prop, NC_LOGIC, NULL);
@@ -1730,22 +1730,22 @@ static void rna_def_parent_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] ={
+ static EnumPropertyItem prop_type_items[] = {
{ACT_PARENT_SET, "SETPARENT", 0, "Set Parent", ""},
{ACT_PARENT_REMOVE, "REMOVEPARENT", 0, "Remove Parent", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "ParentActuator", "Actuator");
+ srna = RNA_def_struct(brna, "ParentActuator", "Actuator");
RNA_def_struct_ui_text(srna, "Parent Actuator", "");
RNA_def_struct_sdna_from(srna, "bParentActuator", "data");
- prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Scene", "");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_pointer_sdna(prop, NULL, "ob");
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -1753,12 +1753,12 @@ static void rna_def_parent_actuator(BlenderRNA *brna)
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* booleans */
- prop= RNA_def_property(srna, "use_compound", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_compound", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", ACT_PARENT_COMPOUND);
RNA_def_property_ui_text(prop, "Compound", "Add this object shape to the parent shape (only if the parent shape is already compound)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_ghost", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_ghost", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", ACT_PARENT_GHOST);
RNA_def_property_ui_text(prop, "Ghost", "Make this object ghost while parented");
RNA_def_property_update(prop, NC_LOGIC, NULL);
@@ -1769,7 +1769,7 @@ static void rna_def_shape_action_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] ={
+ static EnumPropertyItem prop_type_items[] = {
{ACT_ACTION_PLAY, "PLAY", 0, "Play", ""},
{ACT_ACTION_PINGPONG, "PINGPONG", 0, "Ping Pong", ""},
{ACT_ACTION_FLIPPER, "FLIPPER", 0, "Flipper", ""},
@@ -1781,17 +1781,17 @@ static void rna_def_shape_action_actuator(BlenderRNA *brna)
#endif
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "ShapeActionActuator", "Actuator");
+ srna = RNA_def_struct(brna, "ShapeActionActuator", "Actuator");
RNA_def_struct_ui_text(srna, "Shape Action Actuator", "Actuator to control shape key animations");
RNA_def_struct_sdna_from(srna, "bActionActuator", "data");
- prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Action Type", "Action playback type");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "act");
RNA_def_property_struct_type(prop, "Action");
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -1800,46 +1800,46 @@ static void rna_def_shape_action_actuator(BlenderRNA *brna)
RNA_def_property_pointer_funcs(prop, NULL, "rna_Actuator_action_action_set", NULL, NULL);
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_continue_last_frame", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_continue_last_frame", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "end_reset", 1);
RNA_def_property_ui_text(prop, "Continue", "Restore last frame when switching on/off, otherwise play from the start each time");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Property", "Use this property to define the Action position");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sta");
RNA_def_property_ui_range(prop, 0.0, MAXFRAME, 100, 2);
RNA_def_property_ui_text(prop, "Start Frame", "");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "frame_end", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_end", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "end");
RNA_def_property_ui_range(prop, 0.0, MAXFRAME, 100, 2);
RNA_def_property_ui_text(prop, "End Frame", "");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "frame_blend_in", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_blend_in", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "blendin");
RNA_def_property_range(prop, 0, 32767);
RNA_def_property_ui_text(prop, "Blendin", "Number of frames of motion blending");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "priority", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "priority", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Priority", "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)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "frame_property", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_property", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "frameProp");
RNA_def_property_ui_text(prop, "Frame Property", "Assign the action's current frame number to this property");
RNA_def_property_update(prop, NC_LOGIC, NULL);
#ifdef __NLA_ACTION_BY_MOTION_ACTUATOR
- prop= RNA_def_property(srna, "stride_length", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "stride_length", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "stridelength");
RNA_def_property_range(prop, 0.0, 2500.0);
RNA_def_property_ui_text(prop, "Cycle", "Distance covered by a single cycle of the action");
@@ -1852,24 +1852,24 @@ static void rna_def_state_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] ={
+ static EnumPropertyItem prop_type_items[] = {
{ACT_STATE_SET, "SET", 0, "Set State", ""},
{ACT_STATE_ADD, "ADD", 0, "Add State", ""},
{ACT_STATE_REMOVE, "REMOVE", 0, "Remove State", ""},
{ACT_STATE_CHANGE, "CHANGE", 0, "Change State", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "StateActuator", "Actuator");
+ srna = RNA_def_struct(brna, "StateActuator", "Actuator");
RNA_def_struct_ui_text(srna, "State Actuator", "Actuator to handle states");
RNA_def_struct_sdna_from(srna, "bStateActuator", "data");
- prop= RNA_def_property(srna, "operation", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "operation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Operation", "Select the bit operation on object state mask");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "states", PROP_BOOLEAN, PROP_LAYER_MEMBER);
+ prop = RNA_def_property(srna, "states", PROP_BOOLEAN, PROP_LAYER_MEMBER);
RNA_def_property_boolean_sdna(prop, NULL, "mask", 1);
RNA_def_property_array(prop, OB_MAX_STATES);
RNA_def_property_ui_text(prop, "State", "");
@@ -1881,7 +1881,7 @@ static void rna_def_armature_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA* prop;
- static EnumPropertyItem prop_type_items[] ={
+ static EnumPropertyItem prop_type_items[] = {
{ACT_ARM_RUN, "RUN", 0, "Run Armature", ""},
{ACT_ARM_ENABLE, "ENABLE", 0, "Enable", ""},
{ACT_ARM_DISABLE, "DISABLE", 0, "Disable", ""},
@@ -1890,46 +1890,46 @@ static void rna_def_armature_actuator(BlenderRNA *brna)
{ACT_ARM_SETINFLUENCE, "SETINFLUENCE", 0, "Set Influence", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "ArmatureActuator", "Actuator");
+ srna = RNA_def_struct(brna, "ArmatureActuator", "Actuator");
RNA_def_struct_ui_text(srna, "Armature Actuator", "");
RNA_def_struct_sdna_from(srna, "bArmatureActuator", "data");
- prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Constraint Type", "");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "bone", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "bone", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "posechannel");
RNA_def_property_ui_text(prop, "Bone", "Bone on which the constraint is defined");
RNA_def_property_update(prop, NC_LOGIC, "rna_Actuator_Armature_update");
- prop= RNA_def_property(srna, "constraint", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "constraint", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "constraint");
RNA_def_property_ui_text(prop, "Constraint", "Name of the constraint to control");
RNA_def_property_update(prop, NC_LOGIC, "rna_Actuator_Armature_update");
- prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Target", "Set this object as the target of the constraint");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "secondary_target", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "secondary_target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "subtarget");
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Secondary Target", "Set this object as the secondary target of the constraint (only IK polar target at the moment)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "weight", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "weight");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Weight", "Weight of this constraint");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "influence", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "influence", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "influence");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Influence", "Influence of this constraint");
@@ -1941,13 +1941,13 @@ static void rna_def_steering_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] ={
+ static EnumPropertyItem prop_type_items[] = {
{ACT_STEERING_SEEK, "SEEK", 0, "Seek", ""},
{ACT_STEERING_FLEE, "FLEE", 0, "Flee", ""},
{ACT_STEERING_PATHFOLLOWING, "PATHFOLLOWING", 0, "Path following", ""},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem facingaxis_items[] ={
+ static EnumPropertyItem facingaxis_items[] = {
{1, "X", 0, "X", ""},
{2, "Y", 0, "Y", ""},
{3, "Z", 0, "Z", ""},
@@ -1956,64 +1956,64 @@ static void rna_def_steering_actuator(BlenderRNA *brna)
{6, "NEG_Z", 0, "-Z", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "SteeringActuator", "Actuator");
+ srna = RNA_def_struct(brna, "SteeringActuator", "Actuator");
RNA_def_struct_ui_text(srna, "Steering Actuator", "");
RNA_def_struct_sdna_from(srna, "bSteeringActuator", "data");
- prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Behavior", "");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "velocity", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "velocity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "velocity");
RNA_def_property_range(prop, 0.0, 1000.0);
RNA_def_property_ui_text(prop, "Velocity", "Velocity magnitude");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "acceleration", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "acceleration", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "acceleration");
RNA_def_property_range(prop, 0.0, 1000.0);
RNA_def_property_ui_text(prop, "Acceleration", "Max acceleration");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "turn_speed", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "turn_speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "turnspeed");
RNA_def_property_range(prop, 0.0, 720.0);
RNA_def_property_ui_text(prop, "Turn Speed", "Max turn speed");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dist");
RNA_def_property_range(prop, 0.0, 1000.0);
RNA_def_property_ui_text(prop, "Dist", "Relax distance");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_pointer_sdna(prop, NULL, "target");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Target Object", "Target object");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "self_terminated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "self_terminated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_STEERING_SELFTERMINATED);
RNA_def_property_ui_text(prop, "Self Terminated", "Terminate when target is reached");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "show_visualization", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_visualization", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_STEERING_ENABLEVISUALIZATION);
RNA_def_property_ui_text(prop, "Visualize", "Enable debug visualization");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "update_period", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "update_period", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "updateTime");
RNA_def_property_ui_range(prop, -1, 100000, 1, 1);
RNA_def_property_ui_text(prop, "Update period", "Path update period");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "navmesh", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "navmesh", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_pointer_sdna(prop, NULL, "navmesh");
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -2021,18 +2021,18 @@ static void rna_def_steering_actuator(BlenderRNA *brna)
RNA_def_property_pointer_funcs(prop, NULL, "rna_SteeringActuator_navmesh_set", NULL, NULL);
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "facing", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "facing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_STEERING_AUTOMATICFACING);
RNA_def_property_ui_text(prop, "Facing", "Enable automatic facing");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "facing_axis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "facing_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "facingaxis");
RNA_def_property_enum_items(prop, facingaxis_items);
RNA_def_property_ui_text(prop, "Axis", "Axis for automatic facing");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "normal_up", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "normal_up", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_STEERING_NORMALUP);
RNA_def_property_ui_text(prop, "N", "Use normal of the navmesh to set \"UP\" vector");
RNA_def_property_update(prop, NC_LOGIC, NULL);
diff --git a/source/blender/makesrna/intern/rna_actuator_api.c b/source/blender/makesrna/intern/rna_actuator_api.c
index dd289c2b8c4..eba2cfafd47 100644
--- a/source/blender/makesrna/intern/rna_actuator_api.c
+++ b/source/blender/makesrna/intern/rna_actuator_api.c
@@ -58,15 +58,15 @@ void RNA_api_actuator(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
- func= RNA_def_function(srna, "link", "rna_Actuator_link");
+ func = RNA_def_function(srna, "link", "rna_Actuator_link");
RNA_def_function_ui_description(func, "Link the actuator to a controller");
- parm= RNA_def_pointer(func, "controller", "Controller", "", "Controller to link to");
+ parm = RNA_def_pointer(func, "controller", "Controller", "", "Controller to link to");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_property_update(parm, NC_LOGIC, NULL);
- func= RNA_def_function(srna, "unlink", "rna_Actuator_unlink");
+ func = RNA_def_function(srna, "unlink", "rna_Actuator_unlink");
RNA_def_function_ui_description(func, "Unlink the actuator from a controller");
- parm= RNA_def_pointer(func, "controller", "Controller", "", "Controller to unlink from");
+ parm = RNA_def_pointer(func, "controller", "Controller", "", "Controller to unlink from");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_property_update(parm, NC_LOGIC, NULL);
}
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c
index 21e99d312d6..5bf2c080f9f 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -60,7 +60,7 @@ EnumPropertyItem keyingset_path_grouping_items[] = {
static int rna_AnimData_action_editable(PointerRNA *ptr)
{
- AnimData *adt= (AnimData *)ptr->data;
+ AnimData *adt = (AnimData *)ptr->data;
/* active action is only editable when it is not a tweaking strip */
if ((adt->flag & ADT_NLA_EDIT_ON) || (adt->actstrip) || (adt->tmpact))
@@ -89,7 +89,7 @@ static int RKS_POLL_rna_internal(KeyingSetInfo *ksi, bContext *C)
int ok;
RNA_pointer_create(NULL, ksi->ext.srna, ksi, &ptr);
- func= &rna_KeyingSetInfo_poll_func; /* RNA_struct_find_function(&ptr, "poll"); */
+ func = &rna_KeyingSetInfo_poll_func; /* RNA_struct_find_function(&ptr, "poll"); */
RNA_parameter_list_create(&list, &ptr, func);
/* hook up arguments */
@@ -101,7 +101,7 @@ static int RKS_POLL_rna_internal(KeyingSetInfo *ksi, bContext *C)
/* read the result */
RNA_parameter_get_lookup(&list, "ok", &ret);
- ok= *(int*)ret;
+ ok = *(int*)ret;
RNA_parameter_list_free(&list);
return ok;
@@ -117,7 +117,7 @@ static void RKS_ITER_rna_internal(KeyingSetInfo *ksi, bContext *C, KeyingSet *ks
FunctionRNA *func;
RNA_pointer_create(NULL, ksi->ext.srna, ksi, &ptr);
- func= &rna_KeyingSetInfo_iterator_func; /* RNA_struct_find_function(&ptr, "poll"); */
+ func = &rna_KeyingSetInfo_iterator_func; /* RNA_struct_find_function(&ptr, "poll"); */
RNA_parameter_list_create(&list, &ptr, func);
/* hook up arguments */
@@ -140,7 +140,7 @@ static void RKS_GEN_rna_internal(KeyingSetInfo *ksi, bContext *C, KeyingSet *ks,
FunctionRNA *func;
RNA_pointer_create(NULL, ksi->ext.srna, ksi, &ptr);
- func= &rna_KeyingSetInfo_generate_func; /* RNA_struct_find_generate(&ptr, "poll"); */
+ func = &rna_KeyingSetInfo_generate_func; /* RNA_struct_find_generate(&ptr, "poll"); */
RNA_parameter_list_create(&list, &ptr, func);
/* hook up arguments */
@@ -156,16 +156,16 @@ static void RKS_GEN_rna_internal(KeyingSetInfo *ksi, bContext *C, KeyingSet *ks,
/* ------ */
-// XXX: the exact purpose of this is not too clear... maybe we want to revise this at some point?
+/* XXX: the exact purpose of this is not too clear... maybe we want to revise this at some point? */
static StructRNA *rna_KeyingSetInfo_refine(PointerRNA *ptr)
{
- KeyingSetInfo *ksi= (KeyingSetInfo *)ptr->data;
+ KeyingSetInfo *ksi = (KeyingSetInfo *)ptr->data;
return (ksi->ext.srna)? ksi->ext.srna: &RNA_KeyingSetInfo;
}
static void rna_KeyingSetInfo_unregister(Main *bmain, StructRNA *type)
{
- KeyingSetInfo *ksi= RNA_struct_blender_type_get(type);
+ KeyingSetInfo *ksi = RNA_struct_blender_type_get(type);
if (ksi == NULL)
return;
@@ -186,7 +186,7 @@ static StructRNA *rna_KeyingSetInfo_register(Main *bmain, ReportList *reports, v
int have_function[3];
/* setup dummy type info to store static properties in */
- // TODO: perhaps we want to get users to register as if they're using 'KeyingSet' directly instead?
+ /* TODO: perhaps we want to get users to register as if they're using 'KeyingSet' directly instead? */
RNA_pointer_create(NULL, &RNA_KeyingSetInfo, &dummyksi, &dummyptr);
/* validate the python class */
@@ -204,21 +204,21 @@ static StructRNA *rna_KeyingSetInfo_register(Main *bmain, ReportList *reports, v
rna_KeyingSetInfo_unregister(bmain, ksi->ext.srna);
/* create a new KeyingSetInfo type */
- ksi= MEM_callocN(sizeof(KeyingSetInfo), "python keying set info");
+ ksi = MEM_callocN(sizeof(KeyingSetInfo), "python keying set info");
memcpy(ksi, &dummyksi, sizeof(KeyingSetInfo));
/* set RNA-extensions info */
- ksi->ext.srna= RNA_def_struct(&BLENDER_RNA, ksi->idname, "KeyingSetInfo");
- ksi->ext.data= data;
- ksi->ext.call= call;
- ksi->ext.free= free;
+ ksi->ext.srna = RNA_def_struct(&BLENDER_RNA, ksi->idname, "KeyingSetInfo");
+ ksi->ext.data = data;
+ ksi->ext.call = call;
+ ksi->ext.free = free;
RNA_struct_blender_type_set(ksi->ext.srna, ksi);
/* set callbacks */
- // NOTE: we really should have all of these...
- ksi->poll= (have_function[0])? RKS_POLL_rna_internal: NULL;
- ksi->iter= (have_function[1])? RKS_ITER_rna_internal: NULL;
- ksi->generate= (have_function[2])? RKS_GEN_rna_internal: NULL;
+ /* NOTE: we really should have all of these... */
+ ksi->poll = (have_function[0])? RKS_POLL_rna_internal: NULL;
+ ksi->iter = (have_function[1])? RKS_ITER_rna_internal: NULL;
+ ksi->generate = (have_function[2])? RKS_GEN_rna_internal: NULL;
/* add and register with other info as needed */
ANIM_keyingset_info_register(ksi);
@@ -231,39 +231,39 @@ static StructRNA *rna_KeyingSetInfo_register(Main *bmain, ReportList *reports, v
static StructRNA *rna_ksPath_id_typef(PointerRNA *ptr)
{
- KS_Path *ksp= (KS_Path*)ptr->data;
+ KS_Path *ksp = (KS_Path*)ptr->data;
return ID_code_to_RNA_type(ksp->idtype);
}
static int rna_ksPath_id_editable(PointerRNA *ptr)
{
- KS_Path *ksp= (KS_Path*)ptr->data;
+ KS_Path *ksp = (KS_Path*)ptr->data;
return (ksp->idtype)? PROP_EDITABLE : 0;
}
static void rna_ksPath_id_type_set(PointerRNA *ptr, int value)
{
- KS_Path *data= (KS_Path*)(ptr->data);
+ KS_Path *data = (KS_Path*)(ptr->data);
/* set the driver type, then clear the id-block if the type is invalid */
- data->idtype= value;
+ data->idtype = value;
if ((data->id) && (GS(data->id->name) != data->idtype))
- data->id= NULL;
+ data->id = NULL;
}
static void rna_ksPath_RnaPath_get(PointerRNA *ptr, char *value)
{
- KS_Path *ksp= (KS_Path *)ptr->data;
+ KS_Path *ksp = (KS_Path *)ptr->data;
if (ksp->rna_path)
strcpy(value, ksp->rna_path);
else
- value[0]= '\0';
+ value[0] = '\0';
}
static int rna_ksPath_RnaPath_length(PointerRNA *ptr)
{
- KS_Path *ksp= (KS_Path *)ptr->data;
+ KS_Path *ksp = (KS_Path *)ptr->data;
if (ksp->rna_path)
return strlen(ksp->rna_path);
@@ -273,22 +273,22 @@ static int rna_ksPath_RnaPath_length(PointerRNA *ptr)
static void rna_ksPath_RnaPath_set(PointerRNA *ptr, const char *value)
{
- KS_Path *ksp= (KS_Path *)ptr->data;
+ KS_Path *ksp = (KS_Path *)ptr->data;
if (ksp->rna_path)
MEM_freeN(ksp->rna_path);
if (value[0])
- ksp->rna_path= BLI_strdup(value);
- else
- ksp->rna_path= NULL;
+ ksp->rna_path = BLI_strdup(value);
+ else
+ ksp->rna_path = NULL;
}
/* ****************************** */
static int rna_KeyingSet_active_ksPath_editable(PointerRNA *ptr)
{
- KeyingSet *ks= (KeyingSet *)ptr->data;
+ KeyingSet *ks = (KeyingSet *)ptr->data;
/* only editable if there are some paths to change to */
return (ks->paths.first != NULL);
@@ -296,45 +296,45 @@ static int rna_KeyingSet_active_ksPath_editable(PointerRNA *ptr)
static PointerRNA rna_KeyingSet_active_ksPath_get(PointerRNA *ptr)
{
- KeyingSet *ks= (KeyingSet *)ptr->data;
+ KeyingSet *ks = (KeyingSet *)ptr->data;
return rna_pointer_inherit_refine(ptr, &RNA_KeyingSetPath, BLI_findlink(&ks->paths, ks->active_path-1));
}
static void rna_KeyingSet_active_ksPath_set(PointerRNA *ptr, PointerRNA value)
{
- KeyingSet *ks= (KeyingSet *)ptr->data;
- KS_Path *ksp= (KS_Path*)value.data;
- ks->active_path= BLI_findindex(&ks->paths, ksp) + 1;
+ KeyingSet *ks = (KeyingSet *)ptr->data;
+ KS_Path *ksp = (KS_Path*)value.data;
+ ks->active_path = BLI_findindex(&ks->paths, ksp) + 1;
}
static int rna_KeyingSet_active_ksPath_index_get(PointerRNA *ptr)
{
- KeyingSet *ks= (KeyingSet *)ptr->data;
+ KeyingSet *ks = (KeyingSet *)ptr->data;
return MAX2(ks->active_path-1, 0);
}
static void rna_KeyingSet_active_ksPath_index_set(PointerRNA *ptr, int value)
{
- KeyingSet *ks= (KeyingSet *)ptr->data;
- ks->active_path= value+1;
+ KeyingSet *ks = (KeyingSet *)ptr->data;
+ ks->active_path = value+1;
}
static void rna_KeyingSet_active_ksPath_index_range(PointerRNA *ptr, int *min, int *max)
{
- KeyingSet *ks= (KeyingSet *)ptr->data;
+ KeyingSet *ks = (KeyingSet *)ptr->data;
- *min= 0;
- *max= BLI_countlist(&ks->paths)-1;
- *max= MAX2(0, *max);
+ *min = 0;
+ *max = BLI_countlist(&ks->paths)-1;
+ *max = MAX2(0, *max);
}
static PointerRNA rna_KeyingSet_typeinfo_get(PointerRNA *ptr)
{
- KeyingSet *ks= (KeyingSet *)ptr->data;
+ KeyingSet *ks = (KeyingSet *)ptr->data;
KeyingSetInfo *ksi = NULL;
/* keying set info is only for builtin Keying Sets */
- if ((ks->flag & KEYINGSET_ABSOLUTE)==0)
+ if ((ks->flag & KEYINGSET_ABSOLUTE) == 0)
ksi = ANIM_keyingset_info_find_named(ks->typeinfo);
return rna_pointer_inherit_refine(ptr, &RNA_KeyingSetInfo, ksi);
}
@@ -355,8 +355,8 @@ static KS_Path *rna_KeyingSet_paths_add(KeyingSet *keyingset, ReportList *report
/* if data is valid, call the API function for this */
if (keyingset) {
- ksp= BKE_keyingset_add_path(keyingset, id, group_name, rna_path, index, flag, group_method);
- keyingset->active_path= BLI_countlist(&keyingset->paths);
+ ksp = BKE_keyingset_add_path(keyingset, id, group_name, rna_path, index, flag, group_method);
+ keyingset->active_path = BLI_countlist(&keyingset->paths);
}
else {
BKE_report(reports, RPT_ERROR, "Keying Set Path could not be added");
@@ -374,7 +374,7 @@ static void rna_KeyingSet_paths_remove(KeyingSet *keyingset, ReportList *reports
BKE_keyingset_free_path(keyingset, ksp);
/* the active path number will most likely have changed */
- // TODO: we should get more fancy and actually check if it was removed, but this will do for now
+ /* TODO: we should get more fancy and actually check if it was removed, but this will do for now */
keyingset->active_path = 0;
}
else {
@@ -389,8 +389,8 @@ static void rna_KeyingSet_paths_clear(KeyingSet *keyingset, ReportList *reports)
KS_Path *ksp, *kspn;
/* free each path as we go to avoid looping twice */
- for (ksp= keyingset->paths.first; ksp; ksp= kspn) {
- kspn= ksp->next;
+ for (ksp = keyingset->paths.first; ksp; ksp = kspn) {
+ kspn = ksp->next;
BKE_keyingset_free_path(keyingset, ksp);
}
@@ -421,15 +421,15 @@ static void rna_NlaTrack_remove(AnimData *adt, bContext *C, NlaTrack *track)
static PointerRNA rna_NlaTrack_active_get(PointerRNA *ptr)
{
- AnimData *adt= (AnimData*)ptr->data;
- NlaTrack *track= BKE_nlatrack_find_active(&adt->nla_tracks);
+ AnimData *adt = (AnimData*)ptr->data;
+ NlaTrack *track = BKE_nlatrack_find_active(&adt->nla_tracks);
return rna_pointer_inherit_refine(ptr, &RNA_NlaTrack, track);
}
static void rna_NlaTrack_active_set(PointerRNA *ptr, PointerRNA value)
{
- AnimData *adt= (AnimData*)ptr->data;
- NlaTrack *track= (NlaTrack*)value.data;
+ AnimData *adt = (AnimData*)ptr->data;
+ NlaTrack *track = (NlaTrack*)value.data;
BKE_nlatrack_set_active(&adt->nla_tracks, track);
}
@@ -445,7 +445,7 @@ static FCurve *rna_Driver_from_existing(AnimData *adt, bContext *C, FCurve *src_
/* just make a copy of the existing one and add to self */
FCurve *new_fcu = copy_fcurve(src_driver);
- // XXX: if we impose any ordering on these someday, this will be problematic
+ /* XXX: if we impose any ordering on these someday, this will be problematic */
BLI_addtail(&adt->drivers, new_fcu);
return new_fcu;
}
@@ -464,7 +464,7 @@ static void rna_def_common_keying_flags(StructRNA *srna, short reg)
{INSERTKEY_XYZ2RGB, "INSERTKEY_XYZ_TO_RGB", 0, "F-Curve Colors - XYZ to RGB", "Color for newly added transformation F-Curves (Location, Rotation, Scale) and also Color is based on the transform axis"},
{0, NULL, 0, NULL, NULL}};
- prop= RNA_def_property(srna, "bl_options", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "bl_options", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "keyingflag");
RNA_def_property_enum_items(prop, keying_flag_items);
RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL|PROP_ENUM_FLAG);
@@ -480,7 +480,7 @@ static void rna_def_keyingset_info(BlenderRNA *brna)
FunctionRNA *func;
PropertyRNA *parm;
- srna= RNA_def_struct(brna, "KeyingSetInfo", NULL);
+ srna = RNA_def_struct(brna, "KeyingSetInfo", NULL);
RNA_def_struct_sdna(srna, "KeyingSetInfo");
RNA_def_struct_ui_text(srna, "Keying Set Info", "Callback function defines for builtin Keying Sets");
RNA_def_struct_refine_func(srna, "rna_KeyingSetInfo_refine");
@@ -488,14 +488,14 @@ static void rna_def_keyingset_info(BlenderRNA *brna)
/* Properties --------------------- */
- RNA_define_verify_sdna(0); // not in sdna
+ RNA_define_verify_sdna(0); /* not in sdna */
- prop= RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "idname");
RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);
/* Name */
- prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_TRANSLATE);
+ prop = RNA_def_property(srna, "bl_label", PROP_STRING, PROP_TRANSLATE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_struct_name_property(srna, prop);
@@ -507,31 +507,31 @@ static void rna_def_keyingset_info(BlenderRNA *brna)
/* Function Callbacks ------------- */
/* poll */
- func= RNA_def_function(srna, "poll", NULL);
+ func = RNA_def_function(srna, "poll", NULL);
RNA_def_function_ui_description(func, "Test if Keying Set can be used or not");
RNA_def_function_flag(func, FUNC_REGISTER);
RNA_def_function_return(func, RNA_def_boolean(func, "ok", 1, "", ""));
- parm= RNA_def_pointer(func, "context", "Context", "", "");
+ parm = RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* iterator */
- func= RNA_def_function(srna, "iterator", NULL);
+ func = RNA_def_function(srna, "iterator", NULL);
RNA_def_function_ui_description(func, "Call generate() on the structs which have properties to be keyframed");
RNA_def_function_flag(func, FUNC_REGISTER);
- parm= RNA_def_pointer(func, "context", "Context", "", "");
+ parm = RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "ks", "KeyingSet", "", "");
+ parm = RNA_def_pointer(func, "ks", "KeyingSet", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* generate */
- func= RNA_def_function(srna, "generate", NULL);
+ func = RNA_def_function(srna, "generate", NULL);
RNA_def_function_ui_description(func, "Add Paths to the Keying Set to keyframe the properties of the given data");
RNA_def_function_flag(func, FUNC_REGISTER);
- parm= RNA_def_pointer(func, "context", "Context", "", "");
+ parm = RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "ks", "KeyingSet", "", "");
+ parm = RNA_def_pointer(func, "ks", "KeyingSet", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "data", "AnyType", "", "");
+ parm = RNA_def_pointer(func, "data", "AnyType", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
}
@@ -540,56 +540,56 @@ static void rna_def_keyingset_path(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "KeyingSetPath", NULL);
+ srna = RNA_def_struct(brna, "KeyingSetPath", NULL);
RNA_def_struct_sdna(srna, "KS_Path");
RNA_def_struct_ui_text(srna, "Keying Set Path", "Path to a setting for use in a Keying Set");
/* ID */
- prop= RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ID");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_editable_func(prop, "rna_ksPath_id_editable");
RNA_def_property_pointer_funcs(prop, NULL, NULL, "rna_ksPath_id_typef", NULL);
RNA_def_property_ui_text(prop, "ID-Block", "ID-Block that keyframes for Keying Set should be added to (for Absolute Keying Sets only)");
- RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET|NA_EDITED, NULL); // XXX: maybe a bit too noisy
+ RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET|NA_EDITED, NULL); /* XXX: maybe a bit too noisy */
- prop= RNA_def_property(srna, "id_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "id_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "idtype");
RNA_def_property_enum_items(prop, id_type_items);
RNA_def_property_enum_default(prop, ID_OB);
RNA_def_property_enum_funcs(prop, NULL, "rna_ksPath_id_type_set", NULL);
RNA_def_property_ui_text(prop, "ID Type", "Type of ID-block that can be used");
- RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET|NA_EDITED, NULL); // XXX: maybe a bit too noisy
+ RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET|NA_EDITED, NULL); /* XXX: maybe a bit too noisy */
/* Group */
- prop= RNA_def_property(srna, "group", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "group", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Group Name", "Name of Action Group to assign setting(s) for this path to");
- RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET|NA_EDITED, NULL); // XXX: maybe a bit too noisy
+ RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET|NA_EDITED, NULL); /* XXX: maybe a bit too noisy */
/* Grouping */
- prop= RNA_def_property(srna, "group_method", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "group_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "groupmode");
RNA_def_property_enum_items(prop, keyingset_path_grouping_items);
RNA_def_property_ui_text(prop, "Grouping Method", "Method used to define which Group-name to use");
- RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET|NA_EDITED, NULL); // XXX: maybe a bit too noisy
+ RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET|NA_EDITED, NULL); /* XXX: maybe a bit too noisy */
/* Path + Array Index */
- prop= RNA_def_property(srna, "data_path", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "data_path", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ksPath_RnaPath_get", "rna_ksPath_RnaPath_length", "rna_ksPath_RnaPath_set");
RNA_def_property_ui_text(prop, "Data Path", "Path to property setting");
- RNA_def_struct_name_property(srna, prop); // XXX this is the best indicator for now...
+ RNA_def_struct_name_property(srna, prop); /* XXX this is the best indicator for now... */
RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET|NA_EDITED, NULL);
/* called 'index' when given as function arg */
- prop= RNA_def_property(srna, "array_index", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "array_index", PROP_INT, PROP_NONE);
RNA_def_property_ui_text(prop, "RNA Array Index", "Index to the specific setting if applicable");
- RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET|NA_EDITED, NULL); // XXX: maybe a bit too noisy
+ RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET|NA_EDITED, NULL); /* XXX: maybe a bit too noisy */
/* Flags */
- prop= RNA_def_property(srna, "use_entire_array", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_entire_array", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", KSP_FLAG_WHOLE_ARRAY);
RNA_def_property_ui_text(prop, "Entire Array", "When an 'array/vector' type is chosen (Location, Rotation, Color, etc.), entire array is to be used");
- RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET|NA_EDITED, NULL); // XXX: maybe a bit too noisy
+ RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET|NA_EDITED, NULL); /* XXX: maybe a bit too noisy */
/* Keyframing Settings */
rna_def_common_keying_flags(srna, 0);
@@ -607,23 +607,23 @@ static void rna_def_keyingset_paths(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "KeyingSetPaths");
- srna= RNA_def_struct(brna, "KeyingSetPaths", NULL);
+ srna = RNA_def_struct(brna, "KeyingSetPaths", NULL);
RNA_def_struct_sdna(srna, "KeyingSet");
RNA_def_struct_ui_text(srna, "Keying set paths", "Collection of keying set paths");
/* Add Path */
- func= RNA_def_function(srna, "add", "rna_KeyingSet_paths_add");
+ func = RNA_def_function(srna, "add", "rna_KeyingSet_paths_add");
RNA_def_function_ui_description(func, "Add a new path for the Keying Set");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
/* return arg */
- parm= RNA_def_pointer(func, "ksp", "KeyingSetPath", "New Path", "Path created and added to the Keying Set");
+ parm = RNA_def_pointer(func, "ksp", "KeyingSetPath", "New Path", "Path created and added to the Keying Set");
RNA_def_function_return(func, parm);
/* ID-block for target */
- parm= RNA_def_pointer(func, "target_id", "ID", "Target ID", "ID-Datablock for the destination");
+ parm = RNA_def_pointer(func, "target_id", "ID", "Target ID", "ID-Datablock for the destination");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* rna-path */
- parm= RNA_def_string(func, "data_path", "", 256, "Data-Path", "RNA-Path to destination property"); // xxx hopefully this is long enough
+ parm = RNA_def_string(func, "data_path", "", 256, "Data-Path", "RNA-Path to destination property"); /* xxx hopefully this is long enough */
RNA_def_property_flag(parm, PROP_REQUIRED);
/* index (defaults to -1 for entire array) */
RNA_def_int(func, "index", -1, -1, INT_MAX, "Index",
@@ -637,27 +637,27 @@ static void rna_def_keyingset_paths(BlenderRNA *brna, PropertyRNA *cprop)
/* Remove Path */
- func= RNA_def_function(srna, "remove", "rna_KeyingSet_paths_remove");
+ func = RNA_def_function(srna, "remove", "rna_KeyingSet_paths_remove");
RNA_def_function_ui_description(func, "Remove the given path from the Keying Set");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
/* path to remove */
- parm= RNA_def_pointer(func, "path", "KeyingSetPath", "Path", "");
+ parm = RNA_def_pointer(func, "path", "KeyingSetPath", "Path", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
/* Remove All Paths */
- func= RNA_def_function(srna, "clear", "rna_KeyingSet_paths_clear");
+ func = RNA_def_function(srna, "clear", "rna_KeyingSet_paths_clear");
RNA_def_function_ui_description(func, "Remove all the paths from the Keying Set");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "KeyingSetPath");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_editable_func(prop, "rna_KeyingSet_active_ksPath_editable");
RNA_def_property_pointer_funcs(prop, "rna_KeyingSet_active_ksPath_get", "rna_KeyingSet_active_ksPath_set", NULL, NULL);
RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes");
- prop= RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "active_path");
RNA_def_property_int_funcs(prop, "rna_KeyingSet_active_ksPath_index_get", "rna_KeyingSet_active_ksPath_index_set", "rna_KeyingSet_active_ksPath_index_range");
RNA_def_property_ui_text(prop, "Active Path Index", "Current Keying Set index");
@@ -668,31 +668,31 @@ static void rna_def_keyingset(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "KeyingSet", NULL);
+ srna = RNA_def_struct(brna, "KeyingSet", NULL);
RNA_def_struct_ui_text(srna, "Keying Set", "Settings that should be keyframed together");
/* Name */
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_struct_ui_icon(srna, ICON_KEYINGSET);
RNA_def_struct_name_property(srna, prop);
RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET|NA_RENAME, NULL);
/* KeyingSetInfo (Type Info) for Builtin Sets only */
- prop= RNA_def_property(srna, "type_info", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "type_info", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "KeyingSetInfo");
RNA_def_property_pointer_funcs(prop, "rna_KeyingSet_typeinfo_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Type Info", "Callback function defines for built-in Keying Sets");
/* Paths */
- prop= RNA_def_property(srna, "paths", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "paths", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "paths", NULL);
RNA_def_property_struct_type(prop, "KeyingSetPath");
RNA_def_property_ui_text(prop, "Paths", "Keying Set Paths to define settings that get keyframed together");
rna_def_keyingset_paths(brna, prop);
/* Flags */
- prop= RNA_def_property(srna, "is_path_absolute", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_path_absolute", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYINGSET_ABSOLUTE);
RNA_def_property_ui_text(prop, "Absolute", "Keying Set defines specific paths/settings to be keyframed (i.e. is not reliant on context info)");
@@ -716,7 +716,7 @@ static void rna_api_animdata_nla_tracks(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "NlaTracks");
- srna= RNA_def_struct(brna, "NlaTracks", NULL);
+ srna = RNA_def_struct(brna, "NlaTracks", NULL);
RNA_def_struct_sdna(srna, "AnimData");
RNA_def_struct_ui_text(srna, "NLA Tracks", "Collection of NLA Tracks");
@@ -734,7 +734,7 @@ static void rna_api_animdata_nla_tracks(BlenderRNA *brna, PropertyRNA *cprop)
parm = RNA_def_pointer(func, "track", "NlaTrack", "", "NLA Track to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "NlaTrack");
RNA_def_property_pointer_funcs(prop, "rna_NlaTrack_active_get", "rna_NlaTrack_active_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -749,10 +749,10 @@ static void rna_api_animdata_drivers(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *parm;
FunctionRNA *func;
- // PropertyRNA *prop;
+ /* PropertyRNA *prop; */
RNA_def_property_srna(cprop, "AnimDataDrivers");
- srna= RNA_def_struct(brna, "AnimDataDrivers", NULL);
+ srna = RNA_def_struct(brna, "AnimDataDrivers", NULL);
RNA_def_struct_sdna(srna, "AnimData");
RNA_def_struct_ui_text(srna, "Drivers", "Collection of Driver F-Curves");
@@ -769,7 +769,7 @@ void rna_def_animdata_common(StructRNA *srna)
{
PropertyRNA *prop;
- prop= RNA_def_property(srna, "animation_data", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "animation_data", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "adt");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Animation Data", "Animation data for this datablock");
@@ -780,11 +780,11 @@ void rna_def_animdata(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "AnimData", NULL);
+ srna = RNA_def_struct(brna, "AnimData", NULL);
RNA_def_struct_ui_text(srna, "Animation Data", "Animation data for datablock");
/* NLA */
- prop= RNA_def_property(srna, "nla_tracks", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "nla_tracks", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "nla_tracks", NULL);
RNA_def_property_struct_type(prop, "NlaTrack");
RNA_def_property_ui_text(prop, "NLA Tracks", "NLA Tracks (i.e. Animation Layers)");
@@ -792,7 +792,7 @@ void rna_def_animdata(BlenderRNA *brna)
rna_api_animdata_nla_tracks(brna, prop);
/* Active Action */
- prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE); /* this flag as well as the dynamic test must be defined for this to be editable... */
RNA_def_property_pointer_funcs(prop, NULL, "rna_AnimData_action_set", NULL, "rna_Action_id_poll");
RNA_def_property_editable_func(prop, "rna_AnimData_action_editable");
@@ -800,19 +800,19 @@ void rna_def_animdata(BlenderRNA *brna)
RNA_def_property_update(prop, NC_ANIMATION, NULL); /* this will do? */
/* Active Action Settings */
- prop= RNA_def_property(srna, "action_extrapolation", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "action_extrapolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "act_extendmode");
RNA_def_property_enum_items(prop, nla_mode_extend_items);
RNA_def_property_ui_text(prop, "Action Extrapolation", "Action to take for gaps past the Active Action's range (when evaluating with NLA)");
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
- prop= RNA_def_property(srna, "action_blend_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "action_blend_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "act_blendmode");
RNA_def_property_enum_items(prop, nla_mode_blend_items);
RNA_def_property_ui_text(prop, "Action Blending", "Method used for combining Active Action's result with result of NLA stack");
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
- prop= RNA_def_property(srna, "action_influence", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "action_influence", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "act_influence");
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_range(prop, 0.0f, 1.0f);
@@ -820,7 +820,7 @@ void rna_def_animdata(BlenderRNA *brna)
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
/* Drivers */
- prop= RNA_def_property(srna, "drivers", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "drivers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "drivers", NULL);
RNA_def_property_struct_type(prop, "FCurve");
RNA_def_property_ui_text(prop, "Drivers", "The Drivers/Expressions for this datablock");
@@ -828,7 +828,7 @@ void rna_def_animdata(BlenderRNA *brna)
rna_api_animdata_drivers(brna, prop);
/* General Settings */
- prop= RNA_def_property(srna, "use_nla", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_nla", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", ADT_NLA_EVAL_OFF);
RNA_def_property_ui_text(prop, "NLA Evaluation Enabled", "NLA stack is evaluated when evaluating this block");
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
diff --git a/source/blender/makesrna/intern/rna_animation_api.c b/source/blender/makesrna/intern/rna_animation_api.c
index 714a74ec424..f47f8eb88cf 100644
--- a/source/blender/makesrna/intern/rna_animation_api.c
+++ b/source/blender/makesrna/intern/rna_animation_api.c
@@ -49,7 +49,7 @@
static void rna_KeyingSet_context_refresh(KeyingSet *ks, bContext *C, ReportList *reports)
{
- // TODO: enable access to providing a list of overrides (dsources)?
+ /* TODO: enable access to providing a list of overrides (dsources)? */
int success = ANIM_validate_keyingset(C, NULL, ks);
if (success != 0) {
@@ -70,10 +70,10 @@ static void rna_KeyingSet_context_refresh(KeyingSet *ks, bContext *C, ReportList
void RNA_api_keyingset(StructRNA *srna)
{
FunctionRNA *func;
- //PropertyRNA *parm;
+ /*PropertyRNA *parm; */
/* validate relative Keying Set (used to ensure paths are ok for context) */
- func= RNA_def_function(srna, "refresh", "rna_KeyingSet_context_refresh");
+ func = RNA_def_function(srna, "refresh", "rna_KeyingSet_context_refresh");
RNA_def_function_ui_description(func, "Refresh Keying Set to ensure that it is valid for the current context. Call before each use of one");
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
}
diff --git a/source/blender/makesrna/intern/rna_animviz.c b/source/blender/makesrna/intern/rna_animviz.c
index 29133db8101..adc3640dae4 100644
--- a/source/blender/makesrna/intern/rna_animviz.c
+++ b/source/blender/makesrna/intern/rna_animviz.c
@@ -53,35 +53,35 @@ static PointerRNA rna_AnimViz_motion_paths_get(PointerRNA *ptr)
static void rna_AnimViz_ghost_start_frame_set(PointerRNA *ptr, int value)
{
- bAnimVizSettings *data= (bAnimVizSettings*)ptr->data;
+ bAnimVizSettings *data = (bAnimVizSettings*)ptr->data;
CLAMP(value, 1, data->ghost_ef);
- data->ghost_sf= value;
+ data->ghost_sf = value;
}
static void rna_AnimViz_ghost_end_frame_set(PointerRNA *ptr, int value)
{
- bAnimVizSettings *data= (bAnimVizSettings*)ptr->data;
+ bAnimVizSettings *data = (bAnimVizSettings*)ptr->data;
CLAMP(value, data->ghost_sf, (int)(MAXFRAMEF/2));
- data->ghost_ef= value;
+ data->ghost_ef = value;
}
static void rna_AnimViz_path_start_frame_set(PointerRNA *ptr, int value)
{
- bAnimVizSettings *data= (bAnimVizSettings*)ptr->data;
+ bAnimVizSettings *data = (bAnimVizSettings*)ptr->data;
CLAMP(value, 1, data->path_ef-1);
- data->path_sf= value;
+ data->path_sf = value;
}
static void rna_AnimViz_path_end_frame_set(PointerRNA *ptr, int value)
{
- bAnimVizSettings *data= (bAnimVizSettings*)ptr->data;
+ bAnimVizSettings *data = (bAnimVizSettings*)ptr->data;
- // XXX: watchit! Path Start > MAXFRAME/2 could be a problem...
+ /* XXX: watchit! Path Start > MAXFRAME/2 could be a problem... */
CLAMP(value, data->path_sf+1, (int)(MAXFRAMEF/2));
- data->path_ef= value;
+ data->path_ef = value;
}
#else
@@ -90,7 +90,7 @@ void rna_def_motionpath_common(StructRNA *srna)
{
PropertyRNA *prop;
- prop= RNA_def_property(srna, "motion_path", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "motion_path", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "mpath");
RNA_def_property_ui_text(prop, "Motion Path", "Motion Path for this element");
}
@@ -100,15 +100,15 @@ static void rna_def_animviz_motionpath_vert(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "MotionPathVert", NULL);
+ srna = RNA_def_struct(brna, "MotionPathVert", NULL);
RNA_def_struct_sdna(srna, "bMotionPathVert");
RNA_def_struct_ui_text(srna, "Motion Path Cache Point", "Cached location on path");
- prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "co", PROP_FLOAT, PROP_XYZ);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Coordinates", "");
- prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOTIONPATH_VERT_SEL);
RNA_def_property_ui_text(prop, "Select", "Path point is selected for editing");
}
@@ -118,38 +118,38 @@ static void rna_def_animviz_motion_path(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "MotionPath", NULL);
+ srna = RNA_def_struct(brna, "MotionPath", NULL);
RNA_def_struct_sdna(srna, "bMotionPath");
RNA_def_struct_ui_text(srna, "Motion Path", "Cache of the worldspace positions of an element over a frame range");
/* Collections */
- prop= RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "points", "length");
RNA_def_property_struct_type(prop, "MotionPathVert");
RNA_def_property_ui_text(prop, "Motion Path Points", "Cached positions per frame");
/* Playback Ranges */
- prop= RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "start_frame");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Start Frame", "Starting frame of the stored range");
- prop= RNA_def_property(srna, "frame_end", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_end", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "end_frame");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "End Frame", "End frame of the stored range");
- prop= RNA_def_property(srna, "length", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "length", PROP_INT, PROP_TIME);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Length", "Number of frames cached");
/* Settings */
- prop= RNA_def_property(srna, "use_bone_head", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_bone_head", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOTIONPATH_FLAG_BHEAD);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); // xxx
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* xxx */
RNA_def_property_ui_text(prop, "Use Bone Heads", "For PoseBone paths, use the bone head location when calculating this path");
- prop= RNA_def_property(srna, "is_modified", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_modified", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOTIONPATH_FLAG_EDIT);
RNA_def_property_ui_text(prop, "Edit Path", "Path is being edited");
}
@@ -169,51 +169,51 @@ static void rna_def_animviz_ghosts(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "AnimVizOnionSkinning", NULL);
+ srna = RNA_def_struct(brna, "AnimVizOnionSkinning", NULL);
RNA_def_struct_sdna(srna, "bAnimVizSettings");
RNA_def_struct_nested(brna, srna, "AnimViz");
RNA_def_struct_ui_text(srna, "Onion Skinning Settings", "Onion Skinning settings for animation visualisation");
/* Enums */
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ghost_type");
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Type", "Method used for determining what ghosts get drawn");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
/* Settings */
- prop= RNA_def_property(srna, "show_only_selected", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_only_selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ghost_flag", GHOST_FLAG_ONLYSEL);
RNA_def_property_ui_text(prop, "On Selected Bones Only", "For Pose-Mode drawing, only draw ghosts for selected bones");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
- prop= RNA_def_property(srna, "frame_step", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_step", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ghost_step");
RNA_def_property_range(prop, 1, 20);
RNA_def_property_ui_text(prop, "Frame Step", "Number of frames between ghosts shown (not for 'On Keyframes' Onion-skinning method)");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
/* Playback Ranges */
- prop= RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "ghost_sf");
RNA_def_property_int_funcs(prop, NULL, "rna_AnimViz_ghost_start_frame_set", NULL);
RNA_def_property_ui_text(prop, "Start Frame", "Starting frame of range of Ghosts to display (not for 'Around Current Frame' Onion-skinning method)");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
- prop= RNA_def_property(srna, "frame_end", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_end", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "ghost_ef");
RNA_def_property_int_funcs(prop, NULL, "rna_AnimViz_ghost_end_frame_set", NULL);
RNA_def_property_ui_text(prop, "End Frame", "End frame of range of Ghosts to display (not for 'Around Current Frame' Onion-skinning method)");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
/* Around Current Ranges */
- prop= RNA_def_property(srna, "frame_before", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_before", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "ghost_bc");
RNA_def_property_range(prop, 0, 30);
RNA_def_property_ui_text(prop, "Before Current", "Number of frames to show before the current frame (only for 'Around Current Frame' Onion-skinning method)");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
- prop= RNA_def_property(srna, "frame_after", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_after", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "ghost_ac");
RNA_def_property_range(prop, 0, 30);
RNA_def_property_ui_text(prop, "After Current", "Number of frames to show after the current frame (only for 'Around Current Frame' Onion-skinning method)");
@@ -225,55 +225,55 @@ static void rna_def_animviz_paths(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static const EnumPropertyItem prop_type_items[]= {
+ static const EnumPropertyItem prop_type_items[] = {
{MOTIONPATH_TYPE_ACFRA, "CURRENT_FRAME", 0, "Around Frame", "Display Paths of poses within a fixed number of frames around the current frame"},
{MOTIONPATH_TYPE_RANGE, "RANGE", 0, "In Range", "Display Paths of poses within specified range"},
{0, NULL, 0, NULL, NULL}};
- static const EnumPropertyItem prop_location_items[]= {
+ static const EnumPropertyItem prop_location_items[] = {
{MOTIONPATH_BAKE_HEADS, "HEADS", 0, "Heads", "Calculate bone paths from heads"},
{0, "TAILS", 0, "Tails", "Calculate bone paths from tails"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "AnimVizMotionPaths", NULL);
+ srna = RNA_def_struct(brna, "AnimVizMotionPaths", NULL);
RNA_def_struct_sdna(srna, "bAnimVizSettings");
RNA_def_struct_nested(brna, srna, "AnimViz");
RNA_def_struct_ui_text(srna, "Motion Path Settings", "Motion Path settings for animation visualisation");
/* Enums */
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "path_type");
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Paths Type", "Type of range to show for Motion Paths");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
- prop= RNA_def_property(srna, "bake_location", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "bake_location", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "path_bakeflag");
RNA_def_property_enum_items(prop, prop_location_items);
RNA_def_property_ui_text(prop, "Bake Location", "When calculating Bone Paths, use Head or Tips");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
/* Settings */
- prop= RNA_def_property(srna, "show_frame_numbers", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_frame_numbers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "path_viewflag", MOTIONPATH_VIEW_FNUMS);
RNA_def_property_ui_text(prop, "Show Frame Numbers", "Show frame numbers on Motion Paths");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
- prop= RNA_def_property(srna, "show_keyframe_highlight", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_keyframe_highlight", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "path_viewflag", MOTIONPATH_VIEW_KFRAS);
RNA_def_property_ui_text(prop, "Highlight Keyframes", "Emphasize position of keyframes on Motion Paths");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
- prop= RNA_def_property(srna, "show_keyframe_numbers", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_keyframe_numbers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "path_viewflag", MOTIONPATH_VIEW_KFNOS);
RNA_def_property_ui_text(prop, "Show Keyframe Numbers", "Show frame numbers of Keyframes on Motion Paths");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
- prop= RNA_def_property(srna, "show_keyframe_action_all", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_keyframe_action_all", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "path_viewflag", MOTIONPATH_VIEW_KFACT);
RNA_def_property_ui_text(prop, "All Action Keyframes", "For bone motion paths, search whole Action for keyframes instead of in group with matching name only (is slower)");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
- prop= RNA_def_property(srna, "frame_step", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_step", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "path_step");
RNA_def_property_range(prop, 1, 100);
RNA_def_property_ui_text(prop, "Frame Step", "Number of frames between paths shown (not for 'On Keyframes' Onion-skinning method)");
@@ -281,26 +281,26 @@ static void rna_def_animviz_paths(BlenderRNA *brna)
/* Playback Ranges */
- prop= RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "path_sf");
RNA_def_property_int_funcs(prop, NULL, "rna_AnimViz_path_start_frame_set", NULL);
RNA_def_property_ui_text(prop, "Start Frame", "Starting frame of range of paths to display/calculate (not for 'Around Current Frame' Onion-skinning method)");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
- prop= RNA_def_property(srna, "frame_end", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_end", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "path_ef");
RNA_def_property_int_funcs(prop, NULL, "rna_AnimViz_path_end_frame_set", NULL);
RNA_def_property_ui_text(prop, "End Frame", "End frame of range of paths to display/calculate (not for 'Around Current Frame' Onion-skinning method)");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
/* Around Current Ranges */
- prop= RNA_def_property(srna, "frame_before", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_before", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "path_bc");
RNA_def_property_range(prop, 1, MAXFRAMEF/2);
RNA_def_property_ui_text(prop, "Before Current", "Number of frames to show before the current frame (only for 'Around Current Frame' Onion-skinning method)");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
- prop= RNA_def_property(srna, "frame_after", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_after", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "path_ac");
RNA_def_property_range(prop, 1, MAXFRAMEF/2);
RNA_def_property_ui_text(prop, "After Current", "Number of frames to show after the current frame (only for 'Around Current Frame' Onion-skinning method)");
@@ -313,7 +313,7 @@ void rna_def_animviz_common(StructRNA *srna)
{
PropertyRNA *prop;
- prop= RNA_def_property(srna, "animation_visualisation", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "animation_visualisation", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "avs");
RNA_def_property_ui_text(prop, "Animation Visualisation", "Animation data for this datablock");
@@ -324,19 +324,19 @@ static void rna_def_animviz(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "AnimViz", NULL);
+ srna = RNA_def_struct(brna, "AnimViz", NULL);
RNA_def_struct_sdna(srna, "bAnimVizSettings");
RNA_def_struct_ui_text(srna, "Animation Visualisation", "Settings for the visualisation of motion");
/* onion-skinning settings (nested struct) */
- prop= RNA_def_property(srna, "onion_skin_frames", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "onion_skin_frames", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "AnimVizOnionSkinning");
RNA_def_property_pointer_funcs(prop, "rna_AnimViz_onion_skinning_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Onion Skinning", "Onion Skinning (ghosting) settings for visualisation");
/* motion path settings (nested struct) */
- prop= RNA_def_property(srna, "motion_path", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "motion_path", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "AnimVizMotionPaths");
RNA_def_property_pointer_funcs(prop, "rna_AnimViz_motion_paths_get", NULL, NULL, NULL);
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index 18ba3936e44..ba93f27e5a3 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -52,49 +52,49 @@
static void rna_Armature_update_data(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- ID *id= ptr->id.data;
+ ID *id = ptr->id.data;
DAG_id_tag_update(id, 0);
WM_main_add_notifier(NC_GEOM|ND_DATA, id);
- //WM_main_add_notifier(NC_OBJECT|ND_POSE, NULL);
+ /*WM_main_add_notifier(NC_OBJECT|ND_POSE, NULL); */
}
static void rna_Armature_act_bone_set(PointerRNA *ptr, PointerRNA value)
{
- bArmature *arm= (bArmature*)ptr->data;
+ bArmature *arm = (bArmature*)ptr->data;
- if(value.id.data==NULL && value.data==NULL) {
- arm->act_bone= NULL;
+ if (value.id.data == NULL && value.data == NULL) {
+ arm->act_bone = NULL;
}
else {
- if(value.id.data != arm) {
+ if (value.id.data != arm) {
Object *ob = (Object *)value.id.data;
- if(GS(ob->id.name)!=ID_OB || (ob->data != arm)) {
+ if (GS(ob->id.name) != ID_OB || (ob->data != arm)) {
printf("ERROR: armature set active bone - new active doesn't come from this armature\n");
return;
}
}
- arm->act_bone= value.data;
+ arm->act_bone = value.data;
arm->act_bone->flag |= BONE_SELECTED;
}
}
static void rna_Armature_act_edit_bone_set(PointerRNA *ptr, PointerRNA value)
{
- bArmature *arm= (bArmature*)ptr->data;
+ bArmature *arm = (bArmature*)ptr->data;
- if(value.id.data==NULL && value.data==NULL) {
- arm->act_edbone= NULL;
+ if (value.id.data == NULL && value.data == NULL) {
+ arm->act_edbone = NULL;
}
else {
- if(value.id.data != arm) {
+ if (value.id.data != arm) {
/* raise an error! */
}
else {
- arm->act_edbone= value.data;
+ arm->act_edbone = value.data;
((EditBone *)arm->act_edbone)->flag |= BONE_SELECTED;
}
}
@@ -102,7 +102,7 @@ static void rna_Armature_act_edit_bone_set(PointerRNA *ptr, PointerRNA value)
EditBone *rna_Armature_edit_bone_new(bArmature *arm, ReportList *reports, const char *name)
{
- if(arm->edbo==NULL) {
+ if (arm->edbo == NULL) {
BKE_reportf(reports, RPT_ERROR, "Armature '%s' not in editmode, cant add an editbone", arm->id.name+2);
return NULL;
}
@@ -111,12 +111,12 @@ EditBone *rna_Armature_edit_bone_new(bArmature *arm, ReportList *reports, const
void rna_Armature_edit_bone_remove(bArmature *arm, ReportList *reports, EditBone *ebone)
{
- if(arm->edbo==NULL) {
+ if (arm->edbo == NULL) {
BKE_reportf(reports, RPT_ERROR, "Armature '%s' not in editmode, cant remove an editbone", arm->id.name+2);
return;
}
- if(BLI_findindex(arm->edbo, ebone) == -1) {
+ if (BLI_findindex(arm->edbo, ebone) == -1) {
BKE_reportf(reports, RPT_ERROR, "Armature '%s' doesn't contain bone '%s'", arm->id.name+2, ebone->name);
return;
}
@@ -126,13 +126,13 @@ void rna_Armature_edit_bone_remove(bArmature *arm, ReportList *reports, EditBone
static void rna_Armature_update_layers(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
- bArmature *arm= ptr->id.data;
+ bArmature *arm = ptr->id.data;
Object *ob;
/* proxy lib exception, store it here so we can restore layers on file
load, since it would otherwise get lost due to being linked data */
- for(ob = bmain->object.first; ob; ob=ob->id.next)
- if(ob->data == arm && ob->pose)
+ for (ob = bmain->object.first; ob; ob = ob->id.next)
+ if (ob->data == arm && ob->pose)
ob->pose->proxy_layer = arm->layer;
WM_main_add_notifier(NC_GEOM|ND_DATA, arm);
@@ -140,7 +140,7 @@ static void rna_Armature_update_layers(Main *bmain, Scene *UNUSED(scene), Pointe
static void rna_Armature_redraw_data(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- ID *id= ptr->id.data;
+ ID *id = ptr->id.data;
WM_main_add_notifier(NC_GEOM|ND_DATA, id);
}
@@ -165,11 +165,11 @@ static char *rna_Bone_path(PointerRNA *ptr)
static IDProperty *rna_Bone_idprops(PointerRNA *ptr, int create)
{
- Bone *bone= ptr->data;
+ Bone *bone = ptr->data;
- if(create && !bone->prop) {
+ if (create && !bone->prop) {
IDPropertyTemplate val = {0};
- bone->prop= IDP_New(IDP_GROUP, &val, "RNA_Bone ID properties");
+ bone->prop = IDP_New(IDP_GROUP, &val, "RNA_Bone ID properties");
}
return bone->prop;
@@ -177,11 +177,11 @@ static IDProperty *rna_Bone_idprops(PointerRNA *ptr, int create)
static IDProperty *rna_EditBone_idprops(PointerRNA *ptr, int create)
{
- EditBone *ebone= ptr->data;
+ EditBone *ebone = ptr->data;
- if(create && !ebone->prop) {
+ if (create && !ebone->prop) {
IDPropertyTemplate val = {0};
- ebone->prop= IDP_New(IDP_GROUP, &val, "RNA_EditBone ID properties");
+ ebone->prop = IDP_New(IDP_GROUP, &val, "RNA_EditBone ID properties");
}
return ebone->prop;
@@ -189,67 +189,67 @@ static IDProperty *rna_EditBone_idprops(PointerRNA *ptr, int create)
static void rna_bone_layer_set(int *layer, const int *values)
{
- int i, tot= 0;
+ int i, tot = 0;
/* ensure we always have some layer selected */
- for(i=0; i<32; i++)
- if(values[i])
+ for (i = 0; i<32; i++)
+ if (values[i])
tot++;
- if(tot==0)
+ if (tot == 0)
return;
- for(i=0; i<32; i++) {
- if(values[i]) *layer |= (1<<i);
+ for (i = 0; i<32; i++) {
+ if (values[i]) *layer |= (1<<i);
else *layer &= ~(1<<i);
}
}
static void rna_Bone_layer_set(PointerRNA *ptr, const int *values)
{
- Bone *bone= (Bone*)ptr->data;
+ Bone *bone = (Bone*)ptr->data;
rna_bone_layer_set(&bone->layer, values);
}
static void rna_Armature_layer_set(PointerRNA *ptr, const int *values)
{
- bArmature *arm= (bArmature*)ptr->data;
- int i, tot= 0;
+ bArmature *arm = (bArmature*)ptr->data;
+ int i, tot = 0;
/* ensure we always have some layer selected */
- for(i=0; i<32; i++)
- if(values[i])
+ for (i = 0; i<32; i++)
+ if (values[i])
tot++;
- if(tot==0)
+ if (tot == 0)
return;
- for(i=0; i<32; i++) {
- if(values[i]) arm->layer |= (1<<i);
+ for (i = 0; i<32; i++) {
+ if (values[i]) arm->layer |= (1<<i);
else arm->layer &= ~(1<<i);
}
}
-// XXX depreceated.... old armature only animviz
+/* XXX depreceated.... old armature only animviz */
static void rna_Armature_ghost_start_frame_set(PointerRNA *ptr, int value)
{
- bArmature *data= (bArmature*)ptr->data;
+ bArmature *data = (bArmature*)ptr->data;
CLAMP(value, 1, data->ghostef);
- data->ghostsf= value;
+ data->ghostsf = value;
}
static void rna_Armature_ghost_end_frame_set(PointerRNA *ptr, int value)
{
- bArmature *data= (bArmature*)ptr->data;
+ bArmature *data = (bArmature*)ptr->data;
CLAMP(value, data->ghostsf, (int)(MAXFRAMEF/2));
- data->ghostef= value;
+ data->ghostef = value;
}
-// XXX depreceated... old armature only animviz
+/* XXX depreceated... old armature only animviz */
static void rna_EditBone_name_set(PointerRNA *ptr, const char *value)
{
- bArmature *arm= (bArmature*)ptr->id.data;
- EditBone *ebone= (EditBone*)ptr->data;
+ bArmature *arm = (bArmature*)ptr->id.data;
+ EditBone *ebone = (EditBone*)ptr->data;
char oldname[sizeof(ebone->name)], newname[sizeof(ebone->name)];
/* need to be on the stack */
@@ -261,8 +261,8 @@ static void rna_EditBone_name_set(PointerRNA *ptr, const char *value)
static void rna_Bone_name_set(PointerRNA *ptr, const char *value)
{
- bArmature *arm= (bArmature*)ptr->id.data;
- Bone *bone= (Bone*)ptr->data;
+ bArmature *arm = (bArmature*)ptr->id.data;
+ Bone *bone = (Bone*)ptr->data;
char oldname[sizeof(bone->name)], newname[sizeof(bone->name)];
/* need to be on the stack */
@@ -274,21 +274,21 @@ static void rna_Bone_name_set(PointerRNA *ptr, const char *value)
static void rna_EditBone_layer_set(PointerRNA *ptr, const int values[])
{
- EditBone *data= (EditBone*)(ptr->data);
+ EditBone *data = (EditBone*)(ptr->data);
rna_bone_layer_set(&data->layer, values);
}
static void rna_EditBone_connected_check(EditBone *ebone)
{
- if(ebone->parent) {
- if(ebone->flag & BONE_CONNECTED) {
+ if (ebone->parent) {
+ if (ebone->flag & BONE_CONNECTED) {
/* Attach this bone to its parent */
copy_v3_v3(ebone->head, ebone->parent->tail);
- if(ebone->flag & BONE_ROOTSEL)
+ if (ebone->flag & BONE_ROOTSEL)
ebone->parent->flag |= BONE_TIPSEL;
}
- else if(!(ebone->parent->flag & BONE_ROOTSEL)) {
+ else if (!(ebone->parent->flag & BONE_ROOTSEL)) {
ebone->parent->flag &= ~BONE_TIPSEL;
}
}
@@ -296,9 +296,9 @@ static void rna_EditBone_connected_check(EditBone *ebone)
static void rna_EditBone_connected_set(PointerRNA *ptr, int value)
{
- EditBone *ebone= (EditBone*)(ptr->data);
+ EditBone *ebone = (EditBone*)(ptr->data);
- if(value) ebone->flag |= BONE_CONNECTED;
+ if (value) ebone->flag |= BONE_CONNECTED;
else ebone->flag &= ~BONE_CONNECTED;
rna_EditBone_connected_check(ebone);
@@ -306,17 +306,17 @@ static void rna_EditBone_connected_set(PointerRNA *ptr, int value)
static PointerRNA rna_EditBone_parent_get(PointerRNA *ptr)
{
- EditBone *data= (EditBone*)(ptr->data);
+ EditBone *data = (EditBone*)(ptr->data);
return rna_pointer_inherit_refine(ptr, &RNA_EditBone, data->parent);
}
static void rna_EditBone_parent_set(PointerRNA *ptr, PointerRNA value)
{
- EditBone *ebone= (EditBone*)(ptr->data);
- EditBone *pbone, *parbone= (EditBone*)value.data;
+ EditBone *ebone = (EditBone*)(ptr->data);
+ EditBone *pbone, *parbone = (EditBone*)value.data;
- if(parbone == NULL) {
- if(ebone->parent && !(ebone->parent->flag & BONE_ROOTSEL))
+ if (parbone == NULL) {
+ if (ebone->parent && !(ebone->parent->flag & BONE_ROOTSEL))
ebone->parent->flag &= ~BONE_TIPSEL;
ebone->parent = NULL;
@@ -324,15 +324,15 @@ static void rna_EditBone_parent_set(PointerRNA *ptr, PointerRNA value)
}
else {
/* within same armature */
- if(value.id.data != ptr->id.data)
+ if (value.id.data != ptr->id.data)
return;
/* make sure this is a valid child */
- if(parbone == ebone)
+ if (parbone == ebone)
return;
- for(pbone= parbone->parent; pbone; pbone=pbone->parent)
- if(pbone == ebone)
+ for (pbone = parbone->parent; pbone; pbone = pbone->parent)
+ if (pbone == ebone)
return;
ebone->parent = parbone;
@@ -342,7 +342,7 @@ static void rna_EditBone_parent_set(PointerRNA *ptr, PointerRNA value)
static void rna_EditBone_matrix_get(PointerRNA *ptr, float *values)
{
- EditBone *ebone= (EditBone*)(ptr->data);
+ EditBone *ebone = (EditBone*)(ptr->data);
float delta[3], tmat[3][3], mat[4][4];
@@ -357,35 +357,35 @@ static void rna_EditBone_matrix_get(PointerRNA *ptr, float *values)
static void rna_Armature_editbone_transform_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- bArmature *arm= (bArmature*)ptr->id.data;
- EditBone *ebone= (EditBone*)ptr->data;
+ bArmature *arm = (bArmature*)ptr->id.data;
+ EditBone *ebone = (EditBone*)ptr->data;
EditBone *child, *eboflip;
/* update our parent */
- if(ebone->parent && ebone->flag & BONE_CONNECTED)
+ if (ebone->parent && ebone->flag & BONE_CONNECTED)
copy_v3_v3(ebone->parent->tail, ebone->head);
/* update our children if necessary */
- for(child = arm->edbo->first; child; child=child->next)
- if(child->parent == ebone && (child->flag & BONE_CONNECTED))
+ for (child = arm->edbo->first; child; child = child->next)
+ if (child->parent == ebone && (child->flag & BONE_CONNECTED))
copy_v3_v3(child->head, ebone->tail);
- if(arm->flag & ARM_MIRROR_EDIT) {
- eboflip= ED_armature_bone_get_mirrored(arm->edbo, ebone);
+ if (arm->flag & ARM_MIRROR_EDIT) {
+ eboflip = ED_armature_bone_get_mirrored(arm->edbo, ebone);
- if(eboflip) {
- eboflip->roll= -ebone->roll;
+ if (eboflip) {
+ eboflip->roll = -ebone->roll;
- eboflip->head[0]= -ebone->head[0];
- eboflip->tail[0]= -ebone->tail[0];
+ eboflip->head[0] = -ebone->head[0];
+ eboflip->tail[0] = -ebone->tail[0];
/* update our parent */
- if(eboflip->parent && eboflip->flag & BONE_CONNECTED)
+ if (eboflip->parent && eboflip->flag & BONE_CONNECTED)
copy_v3_v3(eboflip->parent->tail, eboflip->head);
/* update our children if necessary */
- for(child = arm->edbo->first; child; child=child->next)
- if(child->parent == eboflip && (child->flag & BONE_CONNECTED))
+ for (child = arm->edbo->first; child; child = child->next)
+ if (child->parent == eboflip && (child->flag & BONE_CONNECTED))
copy_v3_v3 (child->head, eboflip->tail);
}
}
@@ -395,174 +395,174 @@ static void rna_Armature_editbone_transform_update(Main *bmain, Scene *scene, Po
static void rna_Armature_bones_next(CollectionPropertyIterator *iter)
{
- ListBaseIterator *internal= iter->internal;
- Bone *bone= (Bone*)internal->link;
+ ListBaseIterator *internal = iter->internal;
+ Bone *bone = (Bone*)internal->link;
- if(bone->childbase.first)
- internal->link= (Link*)bone->childbase.first;
- else if(bone->next)
- internal->link= (Link*)bone->next;
+ if (bone->childbase.first)
+ internal->link = (Link*)bone->childbase.first;
+ else if (bone->next)
+ internal->link = (Link*)bone->next;
else {
- internal->link= NULL;
+ internal->link = NULL;
do {
- bone= bone->parent;
- if(bone && bone->next) {
- internal->link= (Link*)bone->next;
+ bone = bone->parent;
+ if (bone && bone->next) {
+ internal->link = (Link*)bone->next;
break;
}
- } while(bone);
+ } while (bone);
}
- iter->valid= (internal->link != NULL);
+ iter->valid = (internal->link != NULL);
}
#else
-static int rna_matrix_dimsize_4x4[]= {4, 4};
-static int rna_matrix_dimsize_3x3[]= {3, 3};
+static int rna_matrix_dimsize_4x4[] = {4, 4};
+static int rna_matrix_dimsize_3x3[] = {3, 3};
static void rna_def_bone_common(StructRNA *srna, int editbone)
{
PropertyRNA *prop;
/* strings */
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_struct_name_property(srna, prop);
- if(editbone) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_EditBone_name_set");
+ if (editbone) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_EditBone_name_set");
else RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Bone_name_set");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
/* flags */
- prop= RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
+ prop = RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
RNA_def_property_boolean_sdna(prop, NULL, "layer", 1);
RNA_def_property_array(prop, 32);
- if(editbone) RNA_def_property_boolean_funcs(prop, NULL, "rna_EditBone_layer_set");
+ if (editbone) RNA_def_property_boolean_funcs(prop, NULL, "rna_EditBone_layer_set");
else RNA_def_property_boolean_funcs(prop, NULL, "rna_Bone_layer_set");
RNA_def_property_ui_text(prop, "Layers", "Layers bone exists in");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
- prop= RNA_def_property(srna, "use_connect", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_connect", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_CONNECTED);
- if(editbone) RNA_def_property_boolean_funcs(prop, NULL, "rna_EditBone_connected_set");
+ if (editbone) RNA_def_property_boolean_funcs(prop, NULL, "rna_EditBone_connected_set");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Connected", "When bone has a parent, bone's head is stuck to the parent's tail");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
- prop= RNA_def_property(srna, "use_inherit_rotation", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_inherit_rotation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", BONE_HINGE);
RNA_def_property_ui_text(prop, "Inherit Rotation", "Bone inherits rotation or scale from parent bone");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
- prop= RNA_def_property(srna, "use_envelope_multiply", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_envelope_multiply", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_MULT_VG_ENV);
RNA_def_property_ui_text(prop, "Multiply Vertex Group with Envelope",
"When deforming bone, multiply effects of Vertex Group weights with Envelope influence");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
- prop= RNA_def_property(srna, "use_deform", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_deform", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", BONE_NO_DEFORM);
RNA_def_property_ui_text(prop, "Deform", "Bone does not deform any geometry");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
- prop= RNA_def_property(srna, "use_inherit_scale", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_inherit_scale", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "Inherit Scale", "Bone inherits scaling from parent bone");
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", BONE_NO_SCALE);
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
- prop= RNA_def_property(srna, "use_local_location", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_local_location", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "Local Location", "Bone location is set in local space");
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", BONE_NO_LOCAL_LOCATION);
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
- prop= RNA_def_property(srna, "show_wire", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_wire", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_DRAWWIRE);
RNA_def_property_ui_text(prop, "Draw Wire",
"Bone is always drawn as Wireframe regardless of viewport draw mode "
"(useful for non-obstructive custom bone shapes)");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
- prop= RNA_def_property(srna, "use_cyclic_offset", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_cyclic_offset", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", BONE_NO_CYCLICOFFSET);
RNA_def_property_ui_text(prop, "Cyclic Offset", "When bone doesn't have a parent, it receives cyclic offset effects");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
- prop= RNA_def_property(srna, "hide_select", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "hide_select", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_UNSELECTABLE);
RNA_def_property_ui_text(prop, "Selectable", "Bone is able to be selected");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
/* Number values */
/* envelope deform settings */
- prop= RNA_def_property(srna, "envelope_distance", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "envelope_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dist");
RNA_def_property_range(prop, 0.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Envelope Deform Distance", "Bone deformation distance (for Envelope deform only)");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
- prop= RNA_def_property(srna, "envelope_weight", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "envelope_weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "weight");
RNA_def_property_range(prop, 0.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Envelope Deform Weight", "Bone deformation weight (for Envelope deform only)");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
- prop= RNA_def_property(srna, "head_radius", PROP_FLOAT, PROP_UNSIGNED);
- if(editbone) RNA_def_property_update(prop, 0, "rna_Armature_editbone_transform_update");
+ prop = RNA_def_property(srna, "head_radius", PROP_FLOAT, PROP_UNSIGNED);
+ if (editbone) RNA_def_property_update(prop, 0, "rna_Armature_editbone_transform_update");
else RNA_def_property_update(prop, 0, "rna_Armature_update_data");
RNA_def_property_float_sdna(prop, NULL, "rad_head");
- //RNA_def_property_range(prop, 0, 1000); // XXX range is 0 to lim, where lim= 10000.0f*MAX2(1.0, view3d->grid);
+ /*RNA_def_property_range(prop, 0, 1000); *//* XXX range is 0 to lim, where lim= 10000.0f*MAX2(1.0, view3d->grid); */
RNA_def_property_ui_range(prop, 0.01, 100, 0.1, 3);
RNA_def_property_ui_text(prop, "Envelope Head Radius", "Radius of head of bone (for Envelope deform only)");
- prop= RNA_def_property(srna, "tail_radius", PROP_FLOAT, PROP_UNSIGNED);
- if(editbone) RNA_def_property_update(prop, 0, "rna_Armature_editbone_transform_update");
+ prop = RNA_def_property(srna, "tail_radius", PROP_FLOAT, PROP_UNSIGNED);
+ if (editbone) RNA_def_property_update(prop, 0, "rna_Armature_editbone_transform_update");
else RNA_def_property_update(prop, 0, "rna_Armature_update_data");
RNA_def_property_float_sdna(prop, NULL, "rad_tail");
- //RNA_def_property_range(prop, 0, 1000); // XXX range is 0 to lim, where lim= 10000.0f*MAX2(1.0, view3d->grid);
+ /*RNA_def_property_range(prop, 0, 1000); *//* XXX range is 0 to lim, where lim= 10000.0f*MAX2(1.0, view3d->grid); */
RNA_def_property_ui_range(prop, 0.01, 100, 0.1, 3);
RNA_def_property_ui_text(prop, "Envelope Tail Radius", "Radius of tail of bone (for Envelope deform only)");
/* b-bones deform settings */
- prop= RNA_def_property(srna, "bbone_segments", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "bbone_segments", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "segments");
RNA_def_property_range(prop, 1, 32);
RNA_def_property_ui_text(prop, "B-Bone Segments", "Number of subdivisions of bone (for B-Bones only)");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
- prop= RNA_def_property(srna, "bbone_in", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "bbone_in", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ease1");
RNA_def_property_range(prop, 0.0f, 2.0f);
RNA_def_property_ui_text(prop, "B-Bone Ease In", "Length of first Bezier Handle (for B-Bones only)");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
- prop= RNA_def_property(srna, "bbone_out", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "bbone_out", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ease2");
RNA_def_property_range(prop, 0.0f, 2.0f);
RNA_def_property_ui_text(prop, "B-Bone Ease Out", "Length of second Bezier Handle (for B-Bones only)");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
- prop= RNA_def_property(srna, "bbone_x", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "bbone_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xwidth");
RNA_def_property_range(prop, 0.0f, 1000.0f);
RNA_def_property_ui_text(prop, "B-Bone Display X Width", "B-Bone X size");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
- prop= RNA_def_property(srna, "bbone_z", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "bbone_z", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "zwidth");
RNA_def_property_range(prop, 0.0f, 1000.0f);
RNA_def_property_ui_text(prop, "B-Bone Display Z Width", "B-Bone Z size");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
}
-// err... bones should not be directly edited (only editbones should be...)
+/* err... bones should not be directly edited (only editbones should be...) */
static void rna_def_bone(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Bone", NULL);
+ srna = RNA_def_struct(brna, "Bone", NULL);
RNA_def_struct_ui_text(srna, "Bone", "Bone in an Armature datablock");
RNA_def_struct_ui_icon(srna, ICON_BONE_DATA);
RNA_def_struct_path_func(srna, "rna_Bone_path");
@@ -570,76 +570,76 @@ static void rna_def_bone(BlenderRNA *brna)
/* pointers/collections */
/* parent (pointer) */
- prop= RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Bone");
RNA_def_property_pointer_sdna(prop, NULL, "parent");
RNA_def_property_ui_text(prop, "Parent", "Parent bone (in same Armature)");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
/* children (collection) */
- prop= RNA_def_property(srna, "children", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "children", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "childbase", NULL);
RNA_def_property_struct_type(prop, "Bone");
RNA_def_property_ui_text(prop, "Children", "Bones which are children of this bone");
rna_def_bone_common(srna, 0);
- // XXX should we define this in PoseChannel wrapping code instead? but PoseChannels directly get some of their flags from here...
- prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
+ /* XXX should we define this in PoseChannel wrapping code instead? but PoseChannels directly get some of their flags from here... */
+ 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_update(prop, 0, "rna_Armature_redraw_data");
- prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_SELECTED);
RNA_def_property_ui_text(prop, "Select", "");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
- prop= RNA_def_property(srna, "select_head", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select_head", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_ROOTSEL);
RNA_def_property_ui_text(prop, "Select Head", "");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
- prop= RNA_def_property(srna, "select_tail", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select_tail", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_TIPSEL);
RNA_def_property_ui_text(prop, "Select Tail", "");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
/* XXX better matrix descriptions possible (Arystan) */
- prop= RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
+ prop = RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "bone_mat");
RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_3x3);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Bone Matrix", "3x3 bone matrix");
- prop= RNA_def_property(srna, "matrix_local", PROP_FLOAT, PROP_MATRIX);
+ prop = RNA_def_property(srna, "matrix_local", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "arm_mat");
RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Bone Armature-Relative Matrix", "4x4 bone matrix relative to armature");
- prop= RNA_def_property(srna, "tail", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "tail", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "tail");
RNA_def_property_array(prop, 3);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Tail", "Location of tail end of the bone");
- prop= RNA_def_property(srna, "tail_local", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "tail_local", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "arm_tail");
RNA_def_property_array(prop, 3);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Armature-Relative Tail", "Location of tail end of the bone relative to armature");
- prop= RNA_def_property(srna, "head", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "head", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "head");
RNA_def_property_array(prop, 3);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Head", "Location of head end of the bone relative to its parent");
- prop= RNA_def_property(srna, "head_local", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "head_local", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "arm_head");
RNA_def_property_array(prop, 3);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
@@ -653,36 +653,36 @@ static void rna_def_edit_bone(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "EditBone", NULL);
+ srna = RNA_def_struct(brna, "EditBone", NULL);
RNA_def_struct_sdna(srna, "EditBone");
RNA_def_struct_idprops_func(srna, "rna_EditBone_idprops");
RNA_def_struct_ui_text(srna, "Edit Bone", "Editmode bone in an Armature datablock");
RNA_def_struct_ui_icon(srna, ICON_BONE_DATA);
- RNA_define_verify_sdna(0); // not in sdna
+ RNA_define_verify_sdna(0); /* not in sdna */
- prop= RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "EditBone");
RNA_def_property_pointer_funcs(prop, "rna_EditBone_parent_get", "rna_EditBone_parent_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Parent", "Parent edit bone (in same Armature)");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
- prop= RNA_def_property(srna, "roll", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "roll", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "roll");
RNA_def_property_ui_range(prop, -M_PI * 2, M_PI * 2, 0.1, 2);
RNA_def_property_ui_text(prop, "Roll", "Bone rotation around head-tail axis");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, 0, "rna_Armature_editbone_transform_update");
- prop= RNA_def_property(srna, "head", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "head", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "head");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Head", "Location of head end of the bone");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, 0, "rna_Armature_editbone_transform_update");
- prop= RNA_def_property(srna, "tail", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "tail", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "tail");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Tail", "Location of tail end of the bone");
@@ -691,44 +691,44 @@ static void rna_def_edit_bone(BlenderRNA *brna)
rna_def_bone_common(srna, 1);
- prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_HIDDEN_A);
RNA_def_property_ui_text(prop, "Hide", "Bone is not visible when in Edit Mode");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
- prop= RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_EDITMODE_LOCKED);
RNA_def_property_ui_text(prop, "Lock", "Bone is not able to be transformed when in Edit Mode");
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);
+ prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_SELECTED);
RNA_def_property_ui_text(prop, "Select", "");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
- prop= RNA_def_property(srna, "select_head", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select_head", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_ROOTSEL);
RNA_def_property_ui_text(prop, "Head Select", "");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
- prop= RNA_def_property(srna, "select_tail", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select_tail", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_TIPSEL);
RNA_def_property_ui_text(prop, "Tail Select", "");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
/* calculated and read only, not actual data access */
- prop= RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
- //RNA_def_property_float_sdna(prop, NULL, ""); // doesnt access any real data
+ prop = RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
+ /*RNA_def_property_float_sdna(prop, NULL, ""); *//* doesnt access any real data */
RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_flag(prop, PROP_THICK_WRAP); /* no reference to original data */
RNA_def_property_ui_text(prop, "Editbone Matrix", "Read-only matrix calculated from the roll (armature space)");
- RNA_def_property_float_funcs(prop, "rna_EditBone_matrix_get", NULL, NULL); // TODO - this could be made writable also
+ RNA_def_property_float_funcs(prop, "rna_EditBone_matrix_get", NULL, NULL); /* TODO - this could be made writable also */
RNA_api_armature_edit_bone(srna);
@@ -742,16 +742,16 @@ static void rna_def_armature_bones(BlenderRNA *brna, PropertyRNA *cprop)
StructRNA *srna;
PropertyRNA *prop;
-// FunctionRNA *func;
-// PropertyRNA *parm;
+/* FunctionRNA *func; */
+/* PropertyRNA *parm; */
RNA_def_property_srna(cprop, "ArmatureBones");
- srna= RNA_def_struct(brna, "ArmatureBones", NULL);
+ srna = RNA_def_struct(brna, "ArmatureBones", NULL);
RNA_def_struct_sdna(srna, "bArmature");
RNA_def_struct_ui_text(srna, "Armature Bones", "Collection of armature bones");
- prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Bone");
RNA_def_property_pointer_sdna(prop, NULL, "act_bone");
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -759,7 +759,7 @@ static void rna_def_armature_bones(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_pointer_funcs(prop, NULL, "rna_Armature_act_bone_set", NULL, NULL);
/* todo, redraw */
-// RNA_def_property_collection_active(prop, prop_act);
+/* RNA_def_property_collection_active(prop, prop_act); */
}
/* armature.bones.* */
@@ -772,38 +772,38 @@ static void rna_def_armature_edit_bones(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *parm;
RNA_def_property_srna(cprop, "ArmatureEditBones");
- srna= RNA_def_struct(brna, "ArmatureEditBones", NULL);
+ srna = RNA_def_struct(brna, "ArmatureEditBones", NULL);
RNA_def_struct_sdna(srna, "bArmature");
RNA_def_struct_ui_text(srna, "Armature EditBones", "Collection of armature edit bones");
- prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "EditBone");
RNA_def_property_pointer_sdna(prop, NULL, "act_edbone");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Active EditBone", "Armatures active edit bone");
- //RNA_def_property_update(prop, 0, "rna_Armature_act_editbone_update");
+ /*RNA_def_property_update(prop, 0, "rna_Armature_act_editbone_update"); */
RNA_def_property_pointer_funcs(prop, NULL, "rna_Armature_act_edit_bone_set", NULL, NULL);
/* todo, redraw */
-// RNA_def_property_collection_active(prop, prop_act);
+/* RNA_def_property_collection_active(prop, prop_act); */
/* add target */
- func= RNA_def_function(srna, "new", "rna_Armature_edit_bone_new");
+ func = RNA_def_function(srna, "new", "rna_Armature_edit_bone_new");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Add a new bone");
- parm= RNA_def_string(func, "name", "Object", 0, "", "New name for the bone");
+ parm = RNA_def_string(func, "name", "Object", 0, "", "New name for the bone");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "bone", "EditBone", "", "Newly created edit bone");
+ parm = RNA_def_pointer(func, "bone", "EditBone", "", "Newly created edit bone");
RNA_def_function_return(func, parm);
/* remove target */
- func= RNA_def_function(srna, "remove", "rna_Armature_edit_bone_remove");
+ func = RNA_def_function(srna, "remove", "rna_Armature_edit_bone_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Remove an existing bone from the armature");
/* target to remove*/
- parm= RNA_def_pointer(func, "bone", "EditBone", "", "EditBone to remove");
+ parm = RNA_def_pointer(func, "bone", "EditBone", "", "EditBone to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
@@ -829,12 +829,12 @@ static void rna_def_armature(BlenderRNA *brna)
{ARM_GHOST_RANGE, "RANGE", 0, "In Range", "Display Ghosts of poses within specified range"},
{ARM_GHOST_KEYS, "KEYS", 0, "On Keyframes", "Display Ghosts of poses on Keyframes"},
{0, NULL, 0, NULL, NULL}};
- static const EnumPropertyItem prop_pose_position_items[]= {
+ static const EnumPropertyItem prop_pose_position_items[] = {
{0, "POSE", 0, "Pose Position", "Show armature in posed state"},
{ARM_RESTPOS, "REST", 0, "Rest Position", "Show Armature in binding pose state (no posing possible)"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "Armature", "ID");
+ srna = RNA_def_struct(brna, "Armature", "ID");
RNA_def_struct_ui_text(srna, "Armature",
"Armature datablock containing a hierarchy of bones, usually used for rigging characters");
RNA_def_struct_ui_icon(srna, ICON_ARMATURE_DATA);
@@ -844,53 +844,53 @@ static void rna_def_armature(BlenderRNA *brna)
rna_def_animdata_common(srna);
/* Collections */
- prop= RNA_def_property(srna, "bones", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "bones", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "bonebase", NULL);
RNA_def_property_collection_funcs(prop, 0, "rna_Armature_bones_next", NULL, NULL, NULL, NULL, NULL, NULL);
RNA_def_property_struct_type(prop, "Bone");
RNA_def_property_ui_text(prop, "Bones", "");
rna_def_armature_bones(brna, prop);
- prop= RNA_def_property(srna, "edit_bones", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "edit_bones", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "edbo", NULL);
RNA_def_property_struct_type(prop, "EditBone");
RNA_def_property_ui_text(prop, "Edit Bones", "");
rna_def_armature_edit_bones(brna, prop);
/* Enum values */
- prop= RNA_def_property(srna, "pose_position", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "pose_position", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, prop_pose_position_items);
RNA_def_property_ui_text(prop, "Pose Position", "Show armature in binding pose or final posed state");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
- prop= RNA_def_property(srna, "draw_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "draw_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "drawtype");
RNA_def_property_enum_items(prop, prop_drawtype_items);
RNA_def_property_ui_text(prop, "Draw Type", "");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
- prop= RNA_def_property(srna, "deform_method", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "deform_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "gevertdeformer");
RNA_def_property_enum_items(prop, prop_vdeformer);
RNA_def_property_ui_text(prop, "Vertex Deformer", "");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
-// XXX depreceated ....... old animviz for armatures only
- prop= RNA_def_property(srna, "ghost_type", PROP_ENUM, PROP_NONE);
+/* XXX depreceated ....... old animviz for armatures only */
+ prop = RNA_def_property(srna, "ghost_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ghosttype");
RNA_def_property_enum_items(prop, prop_ghost_type_items);
RNA_def_property_ui_text(prop, "Ghost Type", "Method of Onion-skinning for active Action");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
-// XXX depreceated ....... old animviz for armatures only
+/* XXX depreceated ....... old animviz for armatures only */
/* Boolean values */
/* layer */
- prop= RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
+ prop = RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
RNA_def_property_boolean_sdna(prop, NULL, "layer", 1);
RNA_def_property_array(prop, 32);
RNA_def_property_ui_text(prop, "Visible Layers", "Armature layer visibility");
@@ -899,7 +899,7 @@ static void rna_def_armature(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
/* layer protection */
- prop= RNA_def_property(srna, "layers_protected", PROP_BOOLEAN, PROP_LAYER);
+ prop = RNA_def_property(srna, "layers_protected", PROP_BOOLEAN, PROP_LAYER);
RNA_def_property_boolean_sdna(prop, NULL, "layer_protected", 1);
RNA_def_property_array(prop, 32);
RNA_def_property_ui_text(prop, "Layer Proxy Protection",
@@ -907,78 +907,78 @@ static void rna_def_armature(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
/* flag */
- prop= RNA_def_property(srna, "show_axes", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_axes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ARM_DRAWAXES);
RNA_def_property_ui_text(prop, "Draw Axes", "Draw bone axes");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
- prop= RNA_def_property(srna, "show_names", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_names", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ARM_DRAWNAMES);
RNA_def_property_ui_text(prop, "Draw Names", "Draw bone names");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
- prop= RNA_def_property(srna, "use_deform_delay", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_deform_delay", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ARM_DELAYDEFORM);
RNA_def_property_ui_text(prop, "Delay Deform", "Don't deform children when manipulating bones in Pose Mode");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
- prop= RNA_def_property(srna, "use_mirror_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_mirror_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ARM_MIRROR_EDIT);
RNA_def_property_ui_text(prop, "X-Axis Mirror", "Apply changes to matching bone on opposite side of X-Axis");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
- prop= RNA_def_property(srna, "use_auto_ik", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_auto_ik", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ARM_AUTO_IK);
RNA_def_property_ui_text(prop, "Auto IK", "Add temporaral IK constraints while grabbing bones in Pose Mode");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
- prop= RNA_def_property(srna, "show_bone_custom_shapes", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_bone_custom_shapes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", ARM_NO_CUSTOM);
RNA_def_property_ui_text(prop, "Draw Custom Bone Shapes", "Draw bones with their custom shapes");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
- prop= RNA_def_property(srna, "show_group_colors", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_group_colors", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ARM_COL_CUSTOM);
RNA_def_property_ui_text(prop, "Draw Bone Group Colors", "Draw bone group colors");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
-// XXX depreceated ....... old animviz for armatures only
- prop= RNA_def_property(srna, "show_only_ghost_selected", PROP_BOOLEAN, PROP_NONE);
+/* XXX depreceated ....... old animviz for armatures only */
+ prop = RNA_def_property(srna, "show_only_ghost_selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ARM_GHOST_ONLYSEL);
RNA_def_property_ui_text(prop, "Draw Ghosts on Selected Bones Only", "");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
-// XXX depreceated ....... old animviz for armatures only
+/* XXX depreceated ....... old animviz for armatures only */
/* deformflag */
- prop= RNA_def_property(srna, "use_deform_vertex_groups", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_deform_vertex_groups", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_VGROUP);
RNA_def_property_ui_text(prop, "Deform Vertex Groups", "Enable Vertex Groups when defining deform");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
- prop= RNA_def_property(srna, "use_deform_envelopes", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_deform_envelopes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_ENVELOPE);
RNA_def_property_ui_text(prop, "Deform Envelopes", "Enable Bone Envelopes when defining deform");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
- prop= RNA_def_property(srna, "use_deform_preserve_volume", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_deform_preserve_volume", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_QUATERNION);
RNA_def_property_ui_text(prop, "Use Dual Quaternion Deformation", "Enable deform rotation with Quaternions");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
- //prop= RNA_def_property(srna, "deform_invert_vertexgroups", PROP_BOOLEAN, PROP_NONE);
- //RNA_def_property_boolean_negative_sdna(prop, NULL, "deformflag", ARM_DEF_INVERT_VGROUP);
- //RNA_def_property_ui_text(prop, "Invert Vertex Group Influence", "Invert Vertex Group influence (only for Modifiers)");
- //RNA_def_property_update(prop, 0, "rna_Armature_update_data");
+ /*prop= RNA_def_property(srna, "deform_invert_vertexgroups", PROP_BOOLEAN, PROP_NONE); */
+ /*RNA_def_property_boolean_negative_sdna(prop, NULL, "deformflag", ARM_DEF_INVERT_VGROUP); */
+ /*RNA_def_property_ui_text(prop, "Invert Vertex Group Influence", "Invert Vertex Group influence (only for Modifiers)"); */
+ /*RNA_def_property_update(prop, 0, "rna_Armature_update_data"); */
/* Number fields */
-// XXX depreceated ....... old animviz for armatures only
+/* XXX depreceated ....... old animviz for armatures only */
/* ghost/onionskining settings */
- prop= RNA_def_property(srna, "ghost_step", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "ghost_step", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ghostep");
RNA_def_property_range(prop, 0, 30);
RNA_def_property_ui_text(prop, "Ghosting Step",
@@ -987,7 +987,7 @@ static void rna_def_armature(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
- prop= RNA_def_property(srna, "ghost_size", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "ghost_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ghostsize");
RNA_def_property_range(prop, 1, 20);
RNA_def_property_ui_text(prop, "Ghosting Frame Step",
@@ -995,7 +995,7 @@ static void rna_def_armature(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
- prop= RNA_def_property(srna, "ghost_frame_start", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "ghost_frame_start", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "ghostsf");
RNA_def_property_int_funcs(prop, NULL, "rna_Armature_ghost_start_frame_set", NULL);
RNA_def_property_ui_text(prop, "Ghosting Start Frame",
@@ -1004,14 +1004,14 @@ static void rna_def_armature(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
- prop= RNA_def_property(srna, "ghost_frame_end", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "ghost_frame_end", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "ghostef");
RNA_def_property_int_funcs(prop, NULL, "rna_Armature_ghost_end_frame_set", NULL);
RNA_def_property_ui_text(prop, "Ghosting End Frame",
"End frame of range of Ghosts to display (not for 'Around Current Frame' Onion-skinning method)");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
-// XXX depreceated ....... old animviz for armatures only
+/* XXX depreceated ....... old animviz for armatures only */
}
void RNA_def_armature(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_armature_api.c b/source/blender/makesrna/intern/rna_armature_api.c
index fa079486b95..08c0a5b54aa 100644
--- a/source/blender/makesrna/intern/rna_armature_api.c
+++ b/source/blender/makesrna/intern/rna_armature_api.c
@@ -44,7 +44,7 @@
void rna_EditBone_align_roll(EditBone *ebo, float no[3])
{
- ebo->roll= ED_rollBoneToVector(ebo, no, FALSE);
+ ebo->roll = ED_rollBoneToVector(ebo, no, FALSE);
}
float rna_Bone_do_envelope(Bone *bone, float *vec)
@@ -60,10 +60,10 @@ void RNA_api_armature_edit_bone(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
- func= RNA_def_function(srna, "align_roll", "rna_EditBone_align_roll");
+ func = RNA_def_function(srna, "align_roll", "rna_EditBone_align_roll");
RNA_def_function_ui_description(func, "Align the bone to a localspace roll so the Z axis "
"points in the direction of the vector given");
- parm= RNA_def_float_vector(func, "vector", 3, NULL, -FLT_MAX, FLT_MAX, "Vector", "", -FLT_MAX, FLT_MAX);
+ parm = RNA_def_float_vector(func, "vector", 3, NULL, -FLT_MAX, FLT_MAX, "Vector", "", -FLT_MAX, FLT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
}
@@ -72,13 +72,13 @@ void RNA_api_bone(StructRNA *srna)
PropertyRNA *parm;
FunctionRNA *func;
- func= RNA_def_function(srna, "evaluate_envelope", "rna_Bone_do_envelope");
+ func = RNA_def_function(srna, "evaluate_envelope", "rna_Bone_do_envelope");
RNA_def_function_ui_description(func, "Calculate bone envelope at given point");
- parm= RNA_def_float_vector_xyz(func, "point", 3, NULL, -FLT_MAX, FLT_MAX, "Point",
+ parm = RNA_def_float_vector_xyz(func, "point", 3, NULL, -FLT_MAX, FLT_MAX, "Point",
"Position in 3d space to evaluate", -FLT_MAX, FLT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return value */
- parm= RNA_def_float(func, "factor", 0, -FLT_MAX, FLT_MAX, "Factor", "Envelope factor", -FLT_MAX, FLT_MAX);
+ parm = RNA_def_float(func, "factor", 0, -FLT_MAX, FLT_MAX, "Factor", "Envelope factor", -FLT_MAX, FLT_MAX);
RNA_def_function_return(func, parm);
}
diff --git a/source/blender/makesrna/intern/rna_boid.c b/source/blender/makesrna/intern/rna_boid.c
index 702f06860f7..0db401334cd 100644
--- a/source/blender/makesrna/intern/rna_boid.c
+++ b/source/blender/makesrna/intern/rna_boid.c
@@ -46,7 +46,7 @@
#include "WM_api.h"
#include "WM_types.h"
-EnumPropertyItem boidrule_type_items[] ={
+EnumPropertyItem boidrule_type_items[] = {
{eBoidRuleType_Goal, "GOAL", 0, "Goal", "Go to assigned object or loudest assigned signal source"},
{eBoidRuleType_Avoid, "AVOID", 0, "Avoid", "Get away from assigned object or loudest assigned signal source"},
{eBoidRuleType_AvoidCollision, "AVOID_COLLISION", 0, "Avoid Collision", "Manoeuvre to avoid collisions with other boids and deflector objects in near future"},
@@ -55,13 +55,13 @@ EnumPropertyItem boidrule_type_items[] ={
{eBoidRuleType_FollowLeader, "FOLLOW_LEADER", 0, "Follow Leader", "Follow a boid or assigned object"},
{eBoidRuleType_AverageSpeed, "AVERAGE_SPEED", 0, "Average Speed", "Maintain speed, flight level or wander"},
{eBoidRuleType_Fight, "FIGHT", 0, "Fight", "Go to closest enemy and attack when in range"},
- //{eBoidRuleType_Protect, "PROTECT", 0, "Protect", "Go to enemy closest to target and attack when in range"},
- //{eBoidRuleType_Hide, "HIDE", 0, "Hide", "Find a deflector move to it's other side from closest enemy"},
- //{eBoidRuleType_FollowPath, "FOLLOW_PATH", 0, "Follow Path", "Move along a assigned curve or closest curve in a group"},
- //{eBoidRuleType_FollowWall, "FOLLOW_WALL", 0, "Follow Wall", "Move next to a deflector object's in direction of it's tangent"},
+ /*{eBoidRuleType_Protect, "PROTECT", 0, "Protect", "Go to enemy closest to target and attack when in range"}, */
+ /*{eBoidRuleType_Hide, "HIDE", 0, "Hide", "Find a deflector move to it's other side from closest enemy"}, */
+ /*{eBoidRuleType_FollowPath, "FOLLOW_PATH", 0, "Follow Path", "Move along a assigned curve or closest curve in a group"}, */
+ /*{eBoidRuleType_FollowWall, "FOLLOW_WALL", 0, "Follow Wall", "Move next to a deflector object's in direction of it's tangent"}, */
{0, NULL, 0, NULL, NULL}};
-EnumPropertyItem boidruleset_type_items[] ={
+EnumPropertyItem boidruleset_type_items[] = {
{eBoidRulesetType_Fuzzy, "FUZZY", 0, "Fuzzy", "Rules are gone through top to bottom. Only the first rule that effect above fuzziness threshold is evaluated"},
{eBoidRulesetType_Random, "RANDOM", 0, "Random", "A random rule is selected for each boid"},
{eBoidRulesetType_Average, "AVERAGE", 0, "Average", "All rules are averaged"},
@@ -76,7 +76,7 @@ EnumPropertyItem boidruleset_type_items[] ={
static void rna_Boids_reset(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- if(ptr->type==&RNA_ParticleSystem) {
+ if (ptr->type == &RNA_ParticleSystem) {
ParticleSystem *psys = (ParticleSystem*)ptr->data;
psys->recalc = PSYS_RECALC_RESET;
@@ -90,7 +90,7 @@ static void rna_Boids_reset(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRN
}
static void rna_Boids_reset_deps(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- if(ptr->type==&RNA_ParticleSystem) {
+ if (ptr->type == &RNA_ParticleSystem) {
ParticleSystem *psys = (ParticleSystem*)ptr->data;
psys->recalc = PSYS_RECALC_RESET;
@@ -107,9 +107,9 @@ static void rna_Boids_reset_deps(Main *bmain, Scene *scene, PointerRNA *ptr)
static StructRNA* rna_BoidRule_refine(struct PointerRNA *ptr)
{
- BoidRule *rule= (BoidRule*)ptr->data;
+ BoidRule *rule = (BoidRule*)ptr->data;
- switch(rule->type) {
+ switch (rule->type) {
case eBoidRuleType_Goal:
return &RNA_BoidRuleGoal;
case eBoidRuleType_Avoid:
@@ -129,36 +129,36 @@ static StructRNA* rna_BoidRule_refine(struct PointerRNA *ptr)
static char *rna_BoidRule_path(PointerRNA *ptr)
{
- return BLI_sprintfN("rules[\"%s\"]", ((BoidRule*)ptr->data)->name); // XXX not unique
+ return BLI_sprintfN("rules[\"%s\"]", ((BoidRule*)ptr->data)->name); /* XXX not unique */
}
static PointerRNA rna_BoidState_active_boid_rule_get(PointerRNA *ptr)
{
- BoidState *state= (BoidState*)ptr->data;
+ BoidState *state = (BoidState*)ptr->data;
BoidRule *rule = (BoidRule*)state->rules.first;
- for(; rule; rule=rule->next) {
- if(rule->flag & BOIDRULE_CURRENT)
+ for (; rule; rule = rule->next) {
+ if (rule->flag & BOIDRULE_CURRENT)
return rna_pointer_inherit_refine(ptr, &RNA_BoidRule, rule);
}
return rna_pointer_inherit_refine(ptr, &RNA_BoidRule, NULL);
}
static void rna_BoidState_active_boid_rule_index_range(PointerRNA *ptr, int *min, int *max)
{
- BoidState *state= (BoidState*)ptr->data;
- *min= 0;
- *max= BLI_countlist(&state->rules)-1;
- *max= MAX2(0, *max);
+ BoidState *state = (BoidState*)ptr->data;
+ *min = 0;
+ *max = BLI_countlist(&state->rules)-1;
+ *max = MAX2(0, *max);
}
static int rna_BoidState_active_boid_rule_index_get(PointerRNA *ptr)
{
- BoidState *state= (BoidState*)ptr->data;
+ BoidState *state = (BoidState*)ptr->data;
BoidRule *rule = (BoidRule*)state->rules.first;
- int i=0;
+ int i = 0;
- for(; rule; rule=rule->next, i++) {
- if(rule->flag & BOIDRULE_CURRENT)
+ for (; rule; rule = rule->next, i++) {
+ if (rule->flag & BOIDRULE_CURRENT)
return i;
}
return 0;
@@ -166,12 +166,12 @@ static int rna_BoidState_active_boid_rule_index_get(PointerRNA *ptr)
static void rna_BoidState_active_boid_rule_index_set(struct PointerRNA *ptr, int value)
{
- BoidState *state= (BoidState*)ptr->data;
+ BoidState *state = (BoidState*)ptr->data;
BoidRule *rule = (BoidRule*)state->rules.first;
- int i=0;
+ int i = 0;
- for(; rule; rule=rule->next, i++) {
- if(i==value)
+ for (; rule; rule = rule->next, i++) {
+ if (i == value)
rule->flag |= BOIDRULE_CURRENT;
else
rule->flag &= ~BOIDRULE_CURRENT;
@@ -180,7 +180,7 @@ static void rna_BoidState_active_boid_rule_index_set(struct PointerRNA *ptr, int
static int particle_id_check(PointerRNA *ptr)
{
- ID *id= ptr->id.data;
+ ID *id = ptr->id.data;
return (GS(id->name) == ID_PA);
}
@@ -189,7 +189,7 @@ static char *rna_BoidSettings_path(PointerRNA *ptr)
{
BoidSettings *boids = (BoidSettings *)ptr->data;
- if(particle_id_check(ptr)) {
+ if (particle_id_check(ptr)) {
ParticleSettings *part = (ParticleSettings*)ptr->id.data;
if (part->boids == boids)
@@ -200,31 +200,31 @@ static char *rna_BoidSettings_path(PointerRNA *ptr)
static PointerRNA rna_BoidSettings_active_boid_state_get(PointerRNA *ptr)
{
- BoidSettings *boids= (BoidSettings*)ptr->data;
+ BoidSettings *boids = (BoidSettings*)ptr->data;
BoidState *state = (BoidState*)boids->states.first;
- for(; state; state=state->next) {
- if(state->flag & BOIDSTATE_CURRENT)
+ for (; state; state = state->next) {
+ if (state->flag & BOIDSTATE_CURRENT)
return rna_pointer_inherit_refine(ptr, &RNA_BoidState, state);
}
return rna_pointer_inherit_refine(ptr, &RNA_BoidState, NULL);
}
static void rna_BoidSettings_active_boid_state_index_range(PointerRNA *ptr, int *min, int *max)
{
- BoidSettings *boids= (BoidSettings*)ptr->data;
- *min= 0;
- *max= BLI_countlist(&boids->states)-1;
- *max= MAX2(0, *max);
+ BoidSettings *boids = (BoidSettings*)ptr->data;
+ *min = 0;
+ *max = BLI_countlist(&boids->states)-1;
+ *max = MAX2(0, *max);
}
static int rna_BoidSettings_active_boid_state_index_get(PointerRNA *ptr)
{
- BoidSettings *boids= (BoidSettings*)ptr->data;
+ BoidSettings *boids = (BoidSettings*)ptr->data;
BoidState *state = (BoidState*)boids->states.first;
- int i=0;
+ int i = 0;
- for(; state; state=state->next, i++) {
- if(state->flag & BOIDSTATE_CURRENT)
+ for (; state; state = state->next, i++) {
+ if (state->flag & BOIDSTATE_CURRENT)
return i;
}
return 0;
@@ -232,12 +232,12 @@ static int rna_BoidSettings_active_boid_state_index_get(PointerRNA *ptr)
static void rna_BoidSettings_active_boid_state_index_set(struct PointerRNA *ptr, int value)
{
- BoidSettings *boids= (BoidSettings*)ptr->data;
+ BoidSettings *boids = (BoidSettings*)ptr->data;
BoidState *state = (BoidState*)boids->states.first;
- int i=0;
+ int i = 0;
- for(; state; state=state->next, i++) {
- if(i==value)
+ for (; state; state = state->next, i++) {
+ if (i == value)
state->flag |= BOIDSTATE_CURRENT;
else
state->flag &= ~BOIDSTATE_CURRENT;
@@ -251,17 +251,17 @@ static void rna_def_boidrule_goal(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "BoidRuleGoal", "BoidRule");
+ srna = RNA_def_struct(brna, "BoidRuleGoal", "BoidRule");
RNA_def_struct_ui_text(srna, "Goal", "");
RNA_def_struct_sdna(srna, "BoidRuleGoalAvoid");
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ob");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object", "Goal object");
RNA_def_property_update(prop, 0, "rna_Boids_reset_deps");
- prop= RNA_def_property(srna, "use_predict", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_predict", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BRULE_GOAL_AVOID_PREDICT);
RNA_def_property_ui_text(prop, "Predict", "Predict target movement");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
@@ -272,22 +272,22 @@ static void rna_def_boidrule_avoid(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "BoidRuleAvoid", "BoidRule");
+ srna = RNA_def_struct(brna, "BoidRuleAvoid", "BoidRule");
RNA_def_struct_ui_text(srna, "Avoid", "");
RNA_def_struct_sdna(srna, "BoidRuleGoalAvoid");
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ob");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object", "Object to avoid");
RNA_def_property_update(prop, 0, "rna_Boids_reset_deps");
- prop= RNA_def_property(srna, "use_predict", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_predict", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BRULE_GOAL_AVOID_PREDICT);
RNA_def_property_ui_text(prop, "Predict", "Predict target movement");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "fear_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "fear_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Fear factor", "Avoid object if danger from it is above this threshold");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
@@ -298,20 +298,20 @@ static void rna_def_boidrule_avoid_collision(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "BoidRuleAvoidCollision", "BoidRule");
+ srna = RNA_def_struct(brna, "BoidRuleAvoidCollision", "BoidRule");
RNA_def_struct_ui_text(srna, "Avoid Collision", "");
- prop= RNA_def_property(srna, "use_avoid", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_avoid", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BRULE_ACOLL_WITH_BOIDS);
RNA_def_property_ui_text(prop, "Boids", "Avoid collision with other boids");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "use_avoid_collision", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_avoid_collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BRULE_ACOLL_WITH_DEFLECTORS);
RNA_def_property_ui_text(prop, "Deflectors", "Avoid collision with deflector objects");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "look_ahead", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "look_ahead", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Look ahead", "Time to look ahead in seconds");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
@@ -322,27 +322,27 @@ static void rna_def_boidrule_follow_leader(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "BoidRuleFollowLeader", "BoidRule");
+ srna = RNA_def_struct(brna, "BoidRuleFollowLeader", "BoidRule");
RNA_def_struct_ui_text(srna, "Follow Leader", "");
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ob");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object", "Follow this object instead of a boid");
RNA_def_property_update(prop, 0, "rna_Boids_reset_deps");
- prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Distance", "Distance behind leader to follow");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "queue_count", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "queue_count", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "queue_size");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Queue Size", "How many boids in a line");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "use_line", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_line", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BRULE_LEADER_IN_LINE);
RNA_def_property_ui_text(prop, "Line", "Follow leader in a line");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
@@ -353,20 +353,20 @@ static void rna_def_boidrule_average_speed(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "BoidRuleAverageSpeed", "BoidRule");
+ srna = RNA_def_struct(brna, "BoidRuleAverageSpeed", "BoidRule");
RNA_def_struct_ui_text(srna, "Average Speed", "");
- prop= RNA_def_property(srna, "wander", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "wander", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Wander", "How fast velocity's direction is randomized");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "level", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "level", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Level", "How much velocity's z-component is kept constant");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "speed", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Speed", "Percentage of maximum speed");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
@@ -377,15 +377,15 @@ static void rna_def_boidrule_fight(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "BoidRuleFight", "BoidRule");
+ srna = RNA_def_struct(brna, "BoidRuleFight", "BoidRule");
RNA_def_struct_ui_text(srna, "Fight", "");
- prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Fight Distance", "Attack boids at max this distance");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "flee_distance", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "flee_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Flee Distance", "Flee to this distance");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
@@ -397,37 +397,37 @@ static void rna_def_boidrule(BlenderRNA *brna)
PropertyRNA *prop;
/* data */
- srna= RNA_def_struct(brna, "BoidRule", NULL);
+ srna = RNA_def_struct(brna, "BoidRule", NULL);
RNA_def_struct_ui_text(srna , "Boid Rule", "");
RNA_def_struct_refine_func(srna, "rna_BoidRule_refine");
RNA_def_struct_path_func(srna, "rna_BoidRule_path");
/* strings */
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "Boid rule name");
RNA_def_struct_name_property(srna, prop);
/* enums */
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, boidrule_type_items);
RNA_def_property_ui_text(prop, "Type", "");
/* flags */
- prop= RNA_def_property(srna, "use_in_air", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_in_air", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BOIDRULE_IN_AIR);
RNA_def_property_ui_text(prop, "In Air", "Use rule when boid is flying");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "use_on_land", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_on_land", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BOIDRULE_ON_LAND);
RNA_def_property_ui_text(prop, "On Land", "Use rule when boid is on land");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- //prop= RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
- //RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Expanded);
- //RNA_def_property_ui_text(prop, "Expanded", "Set modifier expanded in the user interface");
+ /*prop= RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE); */
+ /*RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Expanded); */
+ /*RNA_def_property_ui_text(prop, "Expanded", "Set modifier expanded in the user interface"); */
/* types */
rna_def_boidrule_goal(brna);
@@ -446,39 +446,39 @@ static void rna_def_boidstate(BlenderRNA *brna)
srna = RNA_def_struct(brna, "BoidState", NULL);
RNA_def_struct_ui_text(srna, "Boid State", "Boid state for boid physics");
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "Boid state name");
RNA_def_struct_name_property(srna, prop);
- prop= RNA_def_property(srna, "ruleset_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "ruleset_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, boidruleset_type_items);
RNA_def_property_ui_text(prop, "Rule Evaluation", "How the rules in the list are evaluated");
- prop= RNA_def_property(srna, "rules", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "rules", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "BoidRule");
RNA_def_property_ui_text(prop, "Boid Rules", "");
- prop= RNA_def_property(srna, "active_boid_rule", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active_boid_rule", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "BoidRule");
RNA_def_property_pointer_funcs(prop, "rna_BoidState_active_boid_rule_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Active Boid Rule", "");
- prop= RNA_def_property(srna, "active_boid_rule_index", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "active_boid_rule_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_funcs(prop, "rna_BoidState_active_boid_rule_index_get", "rna_BoidState_active_boid_rule_index_set", "rna_BoidState_active_boid_rule_index_range");
RNA_def_property_ui_text(prop, "Active Boid Rule Index", "");
- prop= RNA_def_property(srna, "rule_fuzzy", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "rule_fuzzy", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rule_fuzziness");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Rule Fuzziness", "");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Volume", "");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 10.0);
RNA_def_property_ui_text(prop, "Falloff", "");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
@@ -492,144 +492,144 @@ static void rna_def_boid_settings(BlenderRNA *brna)
RNA_def_struct_path_func(srna, "rna_BoidSettings_path");
RNA_def_struct_ui_text(srna, "Boid Settings", "Settings for boid physics");
- prop= RNA_def_property(srna, "land_smooth", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "land_smooth", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "landing_smoothness");
RNA_def_property_range(prop, 0.0, 10.0);
RNA_def_property_ui_text(prop, "Landing Smoothness", "How smoothly the boids land");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "bank", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "bank", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "banking");
RNA_def_property_range(prop, 0.0, 2.0);
RNA_def_property_ui_text(prop, "Banking", "Amount of rotation around velocity vector on turns");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "pitch", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "pitch", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "pitch");
RNA_def_property_range(prop, 0.0, 2.0);
RNA_def_property_ui_text(prop, "Pitch", "Amount of rotation around side vector");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "height", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 2.0);
RNA_def_property_ui_text(prop, "Height", "Boid height relative to particle size");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
/* states */
- prop= RNA_def_property(srna, "states", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "states", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "BoidState");
RNA_def_property_ui_text(prop, "Boid States", "");
- prop= RNA_def_property(srna, "active_boid_state", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active_boid_state", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "BoidRule");
RNA_def_property_pointer_funcs(prop, "rna_BoidSettings_active_boid_state_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Active Boid Rule", "");
- prop= RNA_def_property(srna, "active_boid_state_index", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "active_boid_state_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_funcs(prop, "rna_BoidSettings_active_boid_state_index_get", "rna_BoidSettings_active_boid_state_index_set", "rna_BoidSettings_active_boid_state_index_range");
RNA_def_property_ui_text(prop, "Active Boid State Index", "");
/* character properties */
- prop= RNA_def_property(srna, "health", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "health", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Health", "Initial boid health when born");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Strength", "Maximum caused damage on attack per second");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "aggression", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "aggression", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Aggression", "Boid will fight this times stronger enemy");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "accuracy", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "accuracy", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Accuracy", "Accuracy of attack");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "range", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "range", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Range", "Maximum distance from which a boid can attack");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
/* physical properties */
- prop= RNA_def_property(srna, "air_speed_min", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "air_speed_min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "air_min_speed");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Min Air Speed", "Minimum speed in air (relative to maximum speed)");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "air_speed_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "air_speed_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "air_max_speed");
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Max Air Speed", "Maximum speed in air");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "air_acc_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "air_acc_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "air_max_acc");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Max Air Acceleration", "Maximum acceleration in air (relative to maximum speed)");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "air_ave_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "air_ave_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "air_max_ave");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Max Air Angular Velocity", "Maximum angular velocity in air (relative to 180 degrees)");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "air_personal_space", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "air_personal_space", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 10.0);
RNA_def_property_ui_text(prop, "Air Personal Space", "Radius of boids personal space in air (% of particle size)");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "land_jump_speed", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "land_jump_speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Jump Speed", "Maximum speed for jumping");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "land_speed_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "land_speed_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "land_max_speed");
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Max Land Speed", "Maximum speed on land");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "land_acc_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "land_acc_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "land_max_acc");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Max Land Acceleration", "Maximum acceleration on land (relative to maximum speed)");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "land_ave_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "land_ave_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "land_max_ave");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Max Land Angular Velocity", "Maximum angular velocity on land (relative to 180 degrees)");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "land_personal_space", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "land_personal_space", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 10.0);
RNA_def_property_ui_text(prop, "Land Personal Space", "Radius of boids personal space on land (% of particle size)");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "land_stick_force", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "land_stick_force", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1000.0);
RNA_def_property_ui_text(prop, "Land Stick Force", "How strong a force must be to start effecting a boid on land");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
/* options */
- prop= RNA_def_property(srna, "use_flight", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_flight", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BOID_ALLOW_FLIGHT);
RNA_def_property_ui_text(prop, "Allow Flight", "Allow boids to move in air");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "use_land", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_land", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BOID_ALLOW_LAND);
RNA_def_property_ui_text(prop, "Allow Land", "Allow boids to move on land");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
- prop= RNA_def_property(srna, "use_climb", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_climb", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "options", BOID_ALLOW_CLIMB);
RNA_def_property_ui_text(prop, "Allow Climbing", "Allow boids to climb goal objects");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index c1f87240e77..49817e8e4b5 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -43,7 +43,7 @@
#include "WM_types.h"
-static EnumPropertyItem prop_direction_items[]= {
+static EnumPropertyItem prop_direction_items[] = {
{0, "ADD", 0, "Add", "Add effect of brush"},
{BRUSH_DIR_IN, "SUBTRACT", 0, "Subtract", "Subtract effect of brush"},
{0, NULL, 0, NULL, NULL}};
@@ -104,10 +104,10 @@ static void rna_Brush_reset_icon(Brush *br, const char *UNUSED(type))
{
ID *id = &br->id;
- if(br->flag & BRUSH_CUSTOM_ICON)
+ if (br->flag & BRUSH_CUSTOM_ICON)
return;
- if(id->icon_id >= BIFICONID_LAST) {
+ if (id->icon_id >= BIFICONID_LAST) {
BKE_icon_delete(id);
BKE_previewimg_free_id(id);
}
@@ -117,44 +117,44 @@ static void rna_Brush_reset_icon(Brush *br, const char *UNUSED(type))
static void rna_Brush_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Brush *br= (Brush*)ptr->data;
+ Brush *br = (Brush*)ptr->data;
WM_main_add_notifier(NC_BRUSH|NA_EDITED, br);
- //WM_main_add_notifier(NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ /*WM_main_add_notifier(NC_SPACE|ND_SPACE_VIEW3D, NULL); */
}
static void rna_Brush_sculpt_tool_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Brush *br= (Brush*)ptr->data;
+ Brush *br = (Brush*)ptr->data;
rna_Brush_reset_icon(br, "sculpt");
rna_Brush_update(bmain, scene, ptr);
}
static void rna_Brush_vertex_tool_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Brush *br= (Brush*)ptr->data;
+ Brush *br = (Brush*)ptr->data;
rna_Brush_reset_icon(br, "vertex_paint");
rna_Brush_update(bmain, scene, ptr);
}
static void rna_Brush_imagepaint_tool_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Brush *br= (Brush*)ptr->data;
+ Brush *br = (Brush*)ptr->data;
rna_Brush_reset_icon(br, "image_paint");
rna_Brush_update(bmain, scene, ptr);
}
static void rna_Brush_icon_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Brush *br= (Brush*)ptr->data;
+ Brush *br = (Brush*)ptr->data;
- if(br->icon_imbuf) {
+ if (br->icon_imbuf) {
IMB_freeImBuf(br->icon_imbuf);
- br->icon_imbuf= NULL;
+ br->icon_imbuf = NULL;
}
br->id.icon_id = 0;
- if(br->flag & BRUSH_CUSTOM_ICON) {
+ if (br->flag & BRUSH_CUSTOM_ICON) {
BKE_previewimg_get(&br->id);
BKE_icon_changed(BKE_icon_getid(&br->id));
}
@@ -169,7 +169,7 @@ static void rna_Brush_set_size(PointerRNA *ptr, int value)
/* scale unprojected radius so it stays consistent with brush size */
brush_scale_unprojected_radius(&brush->unprojected_radius,
value, brush->size);
- brush->size= value;
+ brush->size = value;
}
static void rna_Brush_set_unprojected_radius(PointerRNA *ptr, float value)
@@ -178,40 +178,40 @@ static void rna_Brush_set_unprojected_radius(PointerRNA *ptr, float value)
/* scale brush size so it stays consistent with unprojected_radius */
brush_scale_size(&brush->size, value, brush->unprojected_radius);
- brush->unprojected_radius= value;
+ brush->unprojected_radius = value;
}
static EnumPropertyItem *rna_Brush_direction_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *UNUSED(free))
{
- static EnumPropertyItem prop_default_items[]= {
+ static EnumPropertyItem prop_default_items[] = {
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem prop_flatten_contrast_items[]= {
+ static EnumPropertyItem prop_flatten_contrast_items[] = {
{0, "FLATTEN", 0, "Flatten", "Add effect of brush"},
{BRUSH_DIR_IN, "CONTRAST", 0, "Contrast", "Subtract effect of brush"},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem prop_fill_deepen_items[]= {
+ static EnumPropertyItem prop_fill_deepen_items[] = {
{0, "FILL", 0, "Fill", "Add effect of brush"},
{BRUSH_DIR_IN, "DEEPEN", 0, "Deepen", "Subtract effect of brush"},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem prop_scrape_peaks_items[]= {
+ static EnumPropertyItem prop_scrape_peaks_items[] = {
{0, "SCRAPE", 0, "Scrape", "Add effect of brush"},
{BRUSH_DIR_IN, "PEAKS", 0, "Peaks", "Subtract effect of brush"},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem prop_pinch_magnify_items[]= {
+ static EnumPropertyItem prop_pinch_magnify_items[] = {
{0, "PINCH", 0, "Pinch", "Add effect of brush"},
{BRUSH_DIR_IN, "MAGNIFY", 0, "Magnify", "Subtract effect of brush"},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem prop_inflate_deflate_items[]= {
+ static EnumPropertyItem prop_inflate_deflate_items[] = {
{0, "INFLATE", 0, "Inflate", "Add effect of brush"},
{BRUSH_DIR_IN, "DEFLATE", 0, "Deflate", "Subtract effect of brush"},
{0, NULL, 0, NULL, NULL}};
- Brush *me= (Brush*)(ptr->data);
+ Brush *me = (Brush*)(ptr->data);
switch (me->sculpt_tool) {
case SCULPT_TOOL_DRAW:
@@ -254,17 +254,17 @@ static void rna_def_brush_texture_slot(BlenderRNA *brna)
{MTEX_MAP_MODE_3D, "3D", 0, "3D", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "BrushTextureSlot", "TextureSlot");
+ srna = RNA_def_struct(brna, "BrushTextureSlot", "TextureSlot");
RNA_def_struct_sdna(srna, "MTex");
RNA_def_struct_ui_text(srna, "Brush Texture Slot", "Texture slot for textures in a Brush datablock");
- prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "rot");
RNA_def_property_range(prop, 0, M_PI*2);
RNA_def_property_ui_text(prop, "Angle", "Brush texture rotation");
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
- prop= RNA_def_property(srna, "map_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "map_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "brush_map_mode");
RNA_def_property_enum_items(prop, prop_map_mode_items);
RNA_def_property_ui_text(prop, "Mode", "");
@@ -314,115 +314,115 @@ static void rna_def_brush(BlenderRNA *brna)
{SCULPT_DISP_DIR_Z, "Z", 0, "Z Plane", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "Brush", "ID");
+ srna = RNA_def_struct(brna, "Brush", "ID");
RNA_def_struct_ui_text(srna, "Brush", "Brush datablock for storing brush settings for painting and sculpting");
RNA_def_struct_ui_icon(srna, ICON_BRUSH_DATA);
/* enums */
- prop= RNA_def_property(srna, "blend", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "blend", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_blend_items);
RNA_def_property_ui_text(prop, "Blending mode", "Brush blending mode");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "sculpt_tool", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "sculpt_tool", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, brush_sculpt_tool_items);
RNA_def_property_ui_text(prop, "Sculpt Tool", "");
RNA_def_property_update(prop, 0, "rna_Brush_sculpt_tool_update");
- prop= RNA_def_property(srna, "vertex_tool", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_tool", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "vertexpaint_tool");
RNA_def_property_enum_items(prop, brush_vertex_tool_items);
RNA_def_property_ui_text(prop, "Vertex/Weight Paint Tool", "");
RNA_def_property_update(prop, 0, "rna_Brush_vertex_tool_update");
- prop= RNA_def_property(srna, "image_tool", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "image_tool", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "imagepaint_tool");
RNA_def_property_enum_items(prop, brush_image_tool_items);
RNA_def_property_ui_text(prop, "Image Paint Tool", "");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_Brush_imagepaint_tool_update");
- prop= RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, prop_direction_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Brush_direction_itemf");
RNA_def_property_ui_text(prop, "Direction", "");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "stroke_method", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "stroke_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, brush_stroke_method_items);
RNA_def_property_ui_text(prop, "Stroke Method", "");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "texture_angle_source_random", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "texture_angle_source_random", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, texture_angle_source_items);
RNA_def_property_ui_text(prop, "Texture Angle Source", "");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "texture_angle_source_no_random", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "texture_angle_source_no_random", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, texture_angle_source_no_random_items);
RNA_def_property_ui_text(prop, "Texture Angle Source", "");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "sculpt_plane", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "sculpt_plane", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, brush_sculpt_plane_items);
RNA_def_property_ui_text(prop, "Sculpt Plane", "");
RNA_def_property_update(prop, 0, "rna_Brush_update");
/* number values */
- prop= RNA_def_property(srna, "size", PROP_INT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "size", PROP_INT, PROP_DISTANCE);
RNA_def_property_int_funcs(prop, NULL, "rna_Brush_set_size", NULL);
RNA_def_property_range(prop, 1, MAX_BRUSH_PIXEL_RADIUS*10);
RNA_def_property_ui_range(prop, 1, MAX_BRUSH_PIXEL_RADIUS, 1, 0);
RNA_def_property_ui_text(prop, "Radius", "Radius of the brush in pixels");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "unprojected_radius", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "unprojected_radius", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_funcs(prop, NULL, "rna_Brush_set_unprojected_radius", NULL);
RNA_def_property_range(prop, 0.001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.001, 1, 0, 0);
RNA_def_property_ui_text(prop, "Unprojected Radius", "Radius of brush in Blender units");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "jitter", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "jitter", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "jitter");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Jitter", "Jitter the position of the brush while painting");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "spacing", PROP_INT, PROP_PERCENTAGE);
+ prop = RNA_def_property(srna, "spacing", PROP_INT, PROP_PERCENTAGE);
RNA_def_property_int_sdna(prop, NULL, "spacing");
RNA_def_property_range(prop, 1, 1000);
RNA_def_property_ui_range(prop, 1, 500, 5, 0);
RNA_def_property_ui_text(prop, "Spacing", "Spacing between brush daubs as a percentage of brush diameter");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "smooth_stroke_radius", PROP_INT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "smooth_stroke_radius", PROP_INT, PROP_DISTANCE);
RNA_def_property_range(prop, 10, 200);
RNA_def_property_ui_text(prop, "Smooth Stroke Radius", "Minimum distance from last point before stroke continues");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "smooth_stroke_factor", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "smooth_stroke_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_range(prop, 0.5, 0.99);
RNA_def_property_ui_text(prop, "Smooth Stroke Factor", "Higher values give a smoother stroke");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "rate", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "rate", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rate");
RNA_def_property_range(prop, 0.0001f , 10000.0f);
RNA_def_property_ui_range(prop, 0.01f, 1.0f, 1, 3);
RNA_def_property_ui_text(prop, "Rate", "Interval between paints for Airbrush");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_float_sdna(prop, NULL, "rgb");
RNA_def_property_ui_text(prop, "Color", "");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "alpha");
RNA_def_property_float_default(prop, 0.5f);
RNA_def_property_range(prop, 0.0f, 10.0f);
@@ -430,7 +430,7 @@ static void rna_def_brush(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Strength", "How powerful the effect of the brush is when applied");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "plane_offset", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "plane_offset", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "plane_offset");
RNA_def_property_float_default(prop, 0);
RNA_def_property_range(prop, -2.0f, 2.0f);
@@ -438,42 +438,42 @@ static void rna_def_brush(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Plane Offset", "Adjust plane on which the brush acts towards or away from the object surface");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "plane_trim", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "plane_trim", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "plane_trim");
RNA_def_property_float_default(prop, 0.5f);
RNA_def_property_range(prop, 0, 1.0f);
RNA_def_property_ui_text(prop, "Plane Trim", "If a vertex is further away from offset plane than this, then it is not affected");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "height", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "height");
RNA_def_property_float_default(prop, 0.5f);
RNA_def_property_range(prop, 0, 1.0f);
RNA_def_property_ui_text(prop, "Brush Height", "Affectable height of brush (layer height for layer tool, i.e.)");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "texture_sample_bias", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "texture_sample_bias", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "texture_sample_bias");
RNA_def_property_float_default(prop, 0);
RNA_def_property_range(prop, -1, 1);
RNA_def_property_ui_text(prop, "Texture Sample Bias", "Value added to texture samples");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "normal_weight", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "normal_weight", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "normal_weight");
RNA_def_property_float_default(prop, 0);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Normal Weight", "How much grab will pull vertexes out of surface during a grab");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "crease_pinch_factor", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "crease_pinch_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "crease_pinch_factor");
RNA_def_property_float_default(prop, 2.0f/3.0f);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Crease Brush Pinch Factor", "How much the crease brush pinches");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "auto_smooth_factor", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "auto_smooth_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "autosmooth_factor");
RNA_def_property_float_default(prop, 0);
RNA_def_property_range(prop, 0.0f, 1.0f);
@@ -482,221 +482,221 @@ static void rna_def_brush(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Brush_update");
/* flag */
- prop= RNA_def_property(srna, "use_airbrush", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_airbrush", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_AIRBRUSH);
RNA_def_property_ui_text(prop, "Airbrush", "Keep applying paint effect while holding mouse (spray)");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "use_original_normal", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_original_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_ORIGINAL_NORMAL);
RNA_def_property_ui_text(prop, "Original Normal", "When locked keep using normal of surface where stroke was initiated");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "use_wrap", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_wrap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_TORUS);
RNA_def_property_ui_text(prop, "Wrap", "Enable torus wrapping while painting");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "use_pressure_strength", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pressure_strength", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_ALPHA_PRESSURE);
RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
RNA_def_property_ui_text(prop, "Strength Pressure", "Enable tablet pressure sensitivity for strength");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "use_offset_pressure", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_offset_pressure", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_OFFSET_PRESSURE);
RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
RNA_def_property_ui_text(prop, "Plane Offset Pressure", "Enable tablet pressure sensitivity for offset");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "use_pressure_size", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pressure_size", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SIZE_PRESSURE);
RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
RNA_def_property_ui_text(prop, "Size Pressure", "Enable tablet pressure sensitivity for size");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "use_pressure_jitter", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pressure_jitter", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_JITTER_PRESSURE);
RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
RNA_def_property_ui_text(prop, "Jitter Pressure", "Enable tablet pressure sensitivity for jitter");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "use_pressure_spacing", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pressure_spacing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SPACING_PRESSURE);
RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
RNA_def_property_ui_text(prop, "Spacing Pressure", "Enable tablet pressure sensitivity for spacing");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "use_inverse_smooth_pressure", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_inverse_smooth_pressure", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_INVERSE_SMOOTH_PRESSURE);
RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
RNA_def_property_ui_text(prop, "Inverse Smooth Pressure", "Lighter pressure causes more smoothing to be applied");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "use_rake", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_rake", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_RAKE);
RNA_def_property_ui_text(prop, "Rake", "Rotate the brush texture to match the stroke direction");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "use_random_rotation", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_random_rotation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_RANDOM_ROTATION);
RNA_def_property_ui_text(prop, "Random Rotation", "Rotate the brush texture at random");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "use_plane_trim", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_plane_trim", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_PLANE_TRIM);
RNA_def_property_ui_text(prop, "Use Plane Trim", "Enable Plane Trim");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "use_frontface", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_frontface", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_FRONTFACE);
RNA_def_property_ui_text(prop, "Use Front-Face", "Brush only affects vertexes that face the viewer");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "use_anchor", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_anchor", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_ANCHORED);
RNA_def_property_ui_text(prop, "Anchored", "Keep the brush anchored to the initial location");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "use_space", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_space", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SPACE);
RNA_def_property_ui_text(prop, "Space", "Limit brush application to the distance specified by spacing");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "use_smooth_stroke", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_smooth_stroke", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SMOOTH_STROKE);
RNA_def_property_ui_text(prop, "Smooth Stroke", "Brush lags behind mouse and follows a smoother path");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "use_persistent", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_persistent", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_PERSISTENT);
RNA_def_property_ui_text(prop, "Persistent", "Sculpt on a persistent layer of the mesh");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "use_accumulate", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_accumulate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_ACCUMULATE);
RNA_def_property_ui_text(prop, "Accumulate", "Accumulate stroke daubs on top of each other");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "use_space_atten", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_space_atten", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SPACE_ATTEN);
RNA_def_property_ui_text(prop, "Use Automatic Strength Adjustment", "Automatically adjust strength to give consistent results for different spacings");
RNA_def_property_update(prop, 0, "rna_Brush_update");
/* adaptive space is not implemented yet */
- prop= RNA_def_property(srna, "use_adaptive_space", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_adaptive_space", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_ADAPTIVE_SPACE);
RNA_def_property_ui_text(prop, "Adaptive Spacing", "Space daubs according to surface orientation instead of screen space");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "use_locked_size", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_locked_size", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_LOCK_SIZE);
RNA_def_property_ui_text(prop, "Use Blender Units", "When locked brush stays same size relative to object; when unlocked brush size is given in pixels");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "use_texture_overlay", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_texture_overlay", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_TEXTURE_OVERLAY);
RNA_def_property_ui_text(prop, "Use Texture Overlay", "Show texture in viewport");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "use_edge_to_edge", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_edge_to_edge", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_EDGE_TO_EDGE);
RNA_def_property_ui_text(prop, "Edge-to-edge", "Drag anchor brush from edge-to-edge");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "use_restore_mesh", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_restore_mesh", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_RESTORE_MESH);
RNA_def_property_ui_text(prop, "Restore Mesh", "Allow a single dot to be carefully positioned");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "use_fixed_texture", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_fixed_texture", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_FIXED_TEX);
RNA_def_property_ui_text(prop, "Fixed Texture", "Keep texture origin in fixed position");
RNA_def_property_update(prop, 0, "rna_Brush_update");
/* only for projection paint, TODO, other paint modes */
- prop= RNA_def_property(srna, "use_alpha", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_alpha", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", BRUSH_LOCK_ALPHA);
RNA_def_property_ui_text(prop, "Alpha", "When this is disabled, lock alpha while painting");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "curve", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "curve", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Curve", "Editable falloff curve");
RNA_def_property_update(prop, 0, "rna_Brush_update");
/* paint mode flags */
- prop= RNA_def_property(srna, "use_paint_sculpt", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_paint_sculpt", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ob_mode", OB_MODE_SCULPT);
RNA_def_property_ui_text(prop, "Use Sculpt", "Use this brush in sculpt mode");
- prop= RNA_def_property(srna, "use_paint_vertex", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_paint_vertex", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ob_mode", OB_MODE_VERTEX_PAINT);
RNA_def_property_ui_text(prop, "Use Vertex", "Use this brush in vertex paint mode");
- prop= RNA_def_property(srna, "use_paint_weight", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_paint_weight", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ob_mode", OB_MODE_WEIGHT_PAINT);
RNA_def_property_ui_text(prop, "Use Weight", "Use this brush in weight paint mode");
- prop= RNA_def_property(srna, "use_paint_image", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_paint_image", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ob_mode", OB_MODE_TEXTURE_PAINT);
RNA_def_property_ui_text(prop, "Use Texture", "Use this brush in texture paint mode");
/* texture */
- prop= RNA_def_property(srna, "texture_slot", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "texture_slot", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "BrushTextureSlot");
RNA_def_property_pointer_sdna(prop, NULL, "mtex");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Texture Slot", "");
- prop= RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "mtex.tex");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Texture", "");
RNA_def_property_update(prop, NC_TEXTURE, "rna_Brush_update");
- prop= RNA_def_property(srna, "texture_overlay_alpha", PROP_INT, PROP_PERCENTAGE);
+ prop = RNA_def_property(srna, "texture_overlay_alpha", PROP_INT, PROP_PERCENTAGE);
RNA_def_property_int_sdna(prop, NULL, "texture_overlay_alpha");
RNA_def_property_range(prop, 1, 100);
RNA_def_property_ui_text(prop, "Texture Overlay Alpha", "");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "cursor_color_add", PROP_FLOAT, PROP_COLOR);
+ prop = RNA_def_property(srna, "cursor_color_add", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "add_col");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Add Color", "Color of cursor when adding");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "cursor_color_subtract", PROP_FLOAT, PROP_COLOR);
+ prop = RNA_def_property(srna, "cursor_color_subtract", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "sub_col");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Subtract Color", "Color of cursor when subtracting");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "use_custom_icon", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_custom_icon", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_CUSTOM_ICON);
RNA_def_property_ui_text(prop, "Custom Icon", "Set the brush icon from an image file");
RNA_def_property_update(prop, 0, "rna_Brush_icon_update");
- prop= RNA_def_property(srna, "icon_filepath", PROP_STRING, PROP_FILEPATH);
+ prop = RNA_def_property(srna, "icon_filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "icon_filepath");
RNA_def_property_ui_text(prop, "Brush Icon Filepath", "File path to brush icon");
RNA_def_property_update(prop, 0, "rna_Brush_icon_update");
/* clone tool */
- prop= RNA_def_property(srna, "clone_image", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "clone_image", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "clone.image");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Clone Image", "Image for clone tool");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_Brush_update");
- prop= RNA_def_property(srna, "clone_alpha", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "clone_alpha", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clone.alpha");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Clone Alpha", "Opacity of clone image display");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_Brush_update");
- prop= RNA_def_property(srna, "clone_offset", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "clone_offset", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "clone.offset");
RNA_def_property_ui_text(prop, "Clone Offset", "");
RNA_def_property_ui_range(prop, -1.0f , 1.0f, 10.0f, 3);
@@ -719,42 +719,42 @@ static void rna_def_operator_stroke_element(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "OperatorStrokeElement", "PropertyGroup");
+ srna = RNA_def_struct(brna, "OperatorStrokeElement", "PropertyGroup");
RNA_def_struct_ui_text(srna, "Operator Stroke Element", "");
- prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_XYZ);
RNA_def_property_flag(prop, PROP_IDPROPERTY);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Location", "");
- prop= RNA_def_property(srna, "mouse", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "mouse", PROP_FLOAT, PROP_XYZ);
RNA_def_property_flag(prop, PROP_IDPROPERTY);
RNA_def_property_array(prop, 2);
RNA_def_property_ui_text(prop, "Mouse", "");
- prop= RNA_def_property(srna, "pressure", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "pressure", PROP_FLOAT, PROP_NONE);
RNA_def_property_flag(prop, PROP_IDPROPERTY);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Pressure", "Tablet pressure");
- prop= RNA_def_property(srna, "pen_flip", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "pen_flip", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_flag(prop, PROP_IDPROPERTY);
RNA_def_property_ui_text(prop, "Flip", "");
- // used in uv painting
- prop= RNA_def_property(srna, "time", PROP_FLOAT, PROP_UNSIGNED);
+ /* used in uv painting */
+ prop = RNA_def_property(srna, "time", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_flag(prop, PROP_IDPROPERTY);
RNA_def_property_ui_text(prop, "Time", "");
/* used for Grease Pencil sketching sessions */
- prop= RNA_def_property(srna, "is_start", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_start", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_flag(prop, PROP_IDPROPERTY);
RNA_def_property_ui_text(prop, "Is Stroke Start", "");
/* XXX: Tool (this will be for pressing a modifier key for a different brush,
e.g. switching to a Smooth brush in the middle of the stroke */
- // XXX: i don't think blender currently supports the ability to properly do a remappable modifier in the middle of a stroke
+ /* XXX: i don't think blender currently supports the ability to properly do a remappable modifier in the middle of a stroke */
}
void RNA_def_brush(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c
index 6f6a4baec92..084e299140d 100644
--- a/source/blender/makesrna/intern/rna_camera.c
+++ b/source/blender/makesrna/intern/rna_camera.c
@@ -45,45 +45,45 @@
static float rna_Camera_angle_get(PointerRNA *ptr)
{
- Camera *cam= ptr->id.data;
- float sensor= camera_sensor_size(cam->sensor_fit, cam->sensor_x, cam->sensor_y);
+ Camera *cam = ptr->id.data;
+ float sensor = camera_sensor_size(cam->sensor_fit, cam->sensor_x, cam->sensor_y);
return focallength_to_fov(cam->lens, sensor);
}
static void rna_Camera_angle_set(PointerRNA *ptr, float value)
{
- Camera *cam= ptr->id.data;
- float sensor= camera_sensor_size(cam->sensor_fit, cam->sensor_x, cam->sensor_y);
- cam->lens= fov_to_focallength(value, sensor);
+ Camera *cam = ptr->id.data;
+ float sensor = camera_sensor_size(cam->sensor_fit, cam->sensor_x, cam->sensor_y);
+ cam->lens = fov_to_focallength(value, sensor);
}
static float rna_Camera_angle_x_get(PointerRNA *ptr)
{
- Camera *cam= ptr->id.data;
+ Camera *cam = ptr->id.data;
return focallength_to_fov(cam->lens, cam->sensor_x);
}
static void rna_Camera_angle_x_set(PointerRNA *ptr, float value)
{
- Camera *cam= ptr->id.data;
- cam->lens= fov_to_focallength(value, cam->sensor_x);
+ Camera *cam = ptr->id.data;
+ cam->lens = fov_to_focallength(value, cam->sensor_x);
}
static float rna_Camera_angle_y_get(PointerRNA *ptr)
{
- Camera *cam= ptr->id.data;
+ Camera *cam = ptr->id.data;
return focallength_to_fov(cam->lens, cam->sensor_y);
}
static void rna_Camera_angle_y_set(PointerRNA *ptr, float value)
{
- Camera *cam= ptr->id.data;
- cam->lens= fov_to_focallength(value, cam->sensor_y);
+ Camera *cam = ptr->id.data;
+ cam->lens = fov_to_focallength(value, cam->sensor_y);
}
static void rna_Camera_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Camera *camera= (Camera*)ptr->id.data;
+ Camera *camera = (Camera*)ptr->id.data;
DAG_id_tag_update(&camera->id, 0);
}
@@ -118,24 +118,24 @@ void RNA_def_camera(BlenderRNA *brna)
{CAMERA_SENSOR_FIT_VERT, "VERTICAL", 0, "Vertical", "Fit to the sensor height"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "Camera", "ID");
+ srna = RNA_def_struct(brna, "Camera", "ID");
RNA_def_struct_ui_text(srna, "Camera", "Camera datablock for storing camera settings");
RNA_def_struct_ui_icon(srna, ICON_CAMERA_DATA);
/* Enums */
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Type", "Camera types");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Camera_update");
- prop= RNA_def_property(srna, "show_guide", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "show_guide", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "dtx");
RNA_def_property_enum_items(prop, prop_draw_type_extra_items);
RNA_def_property_flag(prop, PROP_ENUM_FLAG);
RNA_def_property_ui_text(prop, "Composition Guides", "Draw overlay");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "sensor_fit", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "sensor_fit", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "sensor_fit");
RNA_def_property_enum_items(prop, sensor_fit_items);
RNA_def_property_ui_text(prop, "Sensor Fit", "Method to fit image and field of view angle inside the sensor");
@@ -143,134 +143,134 @@ void RNA_def_camera(BlenderRNA *brna)
/* Number values */
- prop= RNA_def_property(srna, "passepartout_alpha", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "passepartout_alpha", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "passepartalpha");
RNA_def_property_ui_text(prop, "Passepartout Alpha", "Opacity (alpha) of the darkened overlay in Camera view");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "angle_x", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "angle_x", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_range(prop, M_PI * (0.367/180.0), M_PI * (172.847/180.0));
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Horizontal FOV", "Camera lens horizontal field of view in degrees");
RNA_def_property_float_funcs(prop, "rna_Camera_angle_x_get", "rna_Camera_angle_x_set", NULL);
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Camera_update");
- prop= RNA_def_property(srna, "angle_y", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "angle_y", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_range(prop, M_PI * (0.367/180.0), M_PI * (172.847/180.0));
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Vertical FOV", "Camera lens vertical field of view in degrees");
RNA_def_property_float_funcs(prop, "rna_Camera_angle_y_get", "rna_Camera_angle_y_set", NULL);
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Camera_update");
- prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_range(prop, M_PI * (0.367/180.0), M_PI * (172.847/180.0));
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Field of View", "Camera lens field of view in degrees");
RNA_def_property_float_funcs(prop, "rna_Camera_angle_get", "rna_Camera_angle_set", NULL);
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Camera_update");
- prop= RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "clipsta");
RNA_def_property_range(prop, 0.001f, FLT_MAX);
RNA_def_property_ui_text(prop, "Clip Start", "Camera near clipping distance");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "clipend");
RNA_def_property_range(prop, 1.0f, FLT_MAX);
RNA_def_property_ui_text(prop, "Clip End", "Camera far clipping distance");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "lens", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "lens", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "lens");
RNA_def_property_range(prop, 1.0f, 5000.0f);
RNA_def_property_ui_text(prop, "Focal Length", "Perspective Camera lens value in millimeters");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Camera_update");
- prop= RNA_def_property(srna, "sensor_width", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "sensor_width", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sensor_x");
RNA_def_property_range(prop, 1.0f, FLT_MAX);
RNA_def_property_ui_range(prop, 1.0f, 100.f, 1, 2);
RNA_def_property_ui_text(prop, "Sensor Width", "Horizontal size of the image sensor area in millimeters");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Camera_update");
- prop= RNA_def_property(srna, "sensor_height", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "sensor_height", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sensor_y");
RNA_def_property_range(prop, 1.0f, FLT_MAX);
RNA_def_property_ui_range(prop, 1.0f, 100.f, 1, 2);
RNA_def_property_ui_text(prop, "Sensor Height", "Vertical size of the image sensor area in millimeters");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Camera_update");
- prop= RNA_def_property(srna, "ortho_scale", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "ortho_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ortho_scale");
RNA_def_property_range(prop, 0.01f, 4000.0f);
RNA_def_property_ui_text(prop, "Orthographic Scale", "Orthographic Camera scale (similar to zoom)");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Camera_update");
- prop= RNA_def_property(srna, "draw_size", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "draw_size", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "drawsize");
RNA_def_property_range(prop, 0.01f, 1000.0f);
RNA_def_property_ui_range(prop, 0.01, 100, 1, 2);
RNA_def_property_ui_text(prop, "Draw Size", "Apparent size of the Camera object in the 3D View");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "shift_x", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "shift_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "shiftx");
RNA_def_property_range(prop, -10.0f, 10.0f);
RNA_def_property_ui_range(prop, -2.0, 2.0, 1, 3);
RNA_def_property_ui_text(prop, "Shift X", "Perspective Camera horizontal shift");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Camera_update");
- prop= RNA_def_property(srna, "shift_y", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "shift_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "shifty");
RNA_def_property_range(prop, -10.0f, 10.0f);
RNA_def_property_ui_range(prop, -2.0, 2.0, 1, 3);
RNA_def_property_ui_text(prop, "Shift Y", "Perspective Camera vertical shift");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Camera_update");
- prop= RNA_def_property(srna, "dof_distance", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "dof_distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "YF_dofdist");
RNA_def_property_range(prop, 0.0f, 5000.0f);
RNA_def_property_ui_text(prop, "DOF Distance", "Distance to the focus point for depth of field");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
/* flag */
- prop= RNA_def_property(srna, "show_limits", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_limits", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CAM_SHOWLIMITS);
RNA_def_property_ui_text(prop, "Show Limits", "Draw the clipping range and focus point on the camera");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "show_mist", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_mist", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CAM_SHOWMIST);
RNA_def_property_ui_text(prop, "Show Mist", "Draw a line from the Camera to indicate the mist area");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "show_passepartout", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_passepartout", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CAM_SHOWPASSEPARTOUT);
RNA_def_property_ui_text(prop, "Show Passepartout", "Show a darkened overlay outside the image area in Camera view");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "show_title_safe", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_title_safe", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CAM_SHOWTITLESAFE);
RNA_def_property_ui_text(prop, "Show Title Safe", "Show indicators for the title safe zone in Camera view");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "show_name", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_name", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CAM_SHOWNAME);
RNA_def_property_ui_text(prop, "Show Name", "Show the active Camera's name in Camera view");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "show_sensor", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_sensor", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CAM_SHOWSENSOR);
RNA_def_property_ui_text(prop, "Show Sensor Size", "Show sensor size (film gate) in Camera view");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "lens_unit", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "lens_unit", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, prop_lens_unit_items);
RNA_def_property_ui_text(prop, "Lens Unit", "Unit to edit lens in for the user interface");
- prop= RNA_def_property(srna, "use_panorama", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_panorama", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CAM_PANORAMA);
RNA_def_property_ui_text(prop, "Panorama", "Render the scene with a cylindrical camera for pseudo-fisheye lens effects");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
@@ -278,7 +278,7 @@ void RNA_def_camera(BlenderRNA *brna)
/* pointers */
rna_def_animdata_common(srna);
- prop= RNA_def_property(srna, "dof_object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "dof_object", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_pointer_sdna(prop, NULL, "dof_ob");
RNA_def_property_flag(prop, PROP_EDITABLE);
diff --git a/source/blender/makesrna/intern/rna_camera_api.c b/source/blender/makesrna/intern/rna_camera_api.c
index 2af0524861a..3cd33be1b86 100644
--- a/source/blender/makesrna/intern/rna_camera_api.c
+++ b/source/blender/makesrna/intern/rna_camera_api.c
@@ -61,25 +61,25 @@ void RNA_api_camera(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
- func= RNA_def_function(srna, "view_frame", "rna_camera_view_frame");
+ func = RNA_def_function(srna, "view_frame", "rna_camera_view_frame");
RNA_def_function_ui_description(func, "Return 4 points for the cameras frame (before object transformation)");
RNA_def_pointer(func, "scene", "Scene", "", "Scene to use for aspect calculation, when omitted 1:1 aspect is used");
/* return location and normal */
- parm= RNA_def_float_vector(func, "result_1", 3, NULL, -FLT_MAX, FLT_MAX, "Result", NULL, -1e4, 1e4);
+ parm = RNA_def_float_vector(func, "result_1", 3, NULL, -FLT_MAX, FLT_MAX, "Result", NULL, -1e4, 1e4);
RNA_def_property_flag(parm, PROP_THICK_WRAP);
RNA_def_function_output(func, parm);
- parm= RNA_def_float_vector(func, "result_2", 3, NULL, -FLT_MAX, FLT_MAX, "Result", NULL, -1e4, 1e4);
+ parm = RNA_def_float_vector(func, "result_2", 3, NULL, -FLT_MAX, FLT_MAX, "Result", NULL, -1e4, 1e4);
RNA_def_property_flag(parm, PROP_THICK_WRAP);
RNA_def_function_output(func, parm);
- parm= RNA_def_float_vector(func, "result_3", 3, NULL, -FLT_MAX, FLT_MAX, "Result", NULL, -1e4, 1e4);
+ parm = RNA_def_float_vector(func, "result_3", 3, NULL, -FLT_MAX, FLT_MAX, "Result", NULL, -1e4, 1e4);
RNA_def_property_flag(parm, PROP_THICK_WRAP);
RNA_def_function_output(func, parm);
- parm= RNA_def_float_vector(func, "result_4", 3, NULL, -FLT_MAX, FLT_MAX, "Result", NULL, -1e4, 1e4);
+ parm = RNA_def_float_vector(func, "result_4", 3, NULL, -FLT_MAX, FLT_MAX, "Result", NULL, -1e4, 1e4);
RNA_def_property_flag(parm, PROP_THICK_WRAP);
RNA_def_function_output(func, parm);
}
diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c
index 1327a205c19..34a9dc592b9 100644
--- a/source/blender/makesrna/intern/rna_cloth.c
+++ b/source/blender/makesrna/intern/rna_cloth.c
@@ -49,7 +49,7 @@
static void rna_cloth_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_main_add_notifier(NC_OBJECT|ND_MODIFIER, ob);
@@ -57,8 +57,8 @@ static void rna_cloth_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerR
static void rna_cloth_pinning_changed(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
-// ClothSimSettings *settings = (ClothSimSettings*)ptr->data;
+ Object *ob = (Object*)ptr->id.data;
+/* ClothSimSettings *settings = (ClothSimSettings*)ptr->data; */
ClothModifierData *clmd = (ClothModifierData*)modifiers_findByType(ob, eModifierType_Cloth);
cloth_free_modifier(clmd);
@@ -69,7 +69,7 @@ static void rna_cloth_pinning_changed(Main *UNUSED(bmain), Scene *UNUSED(scene),
static void rna_cloth_reset(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
ClothSimSettings *settings = (ClothSimSettings*)ptr->data;
settings->reset = 1;
@@ -84,7 +84,7 @@ static void rna_ClothSettings_max_bend_set(struct PointerRNA *ptr, float value)
ClothSimSettings *settings = (ClothSimSettings*)ptr->data;
/* check for clipping */
- if(value < settings->bending)
+ if (value < settings->bending)
value = settings->bending;
settings->max_bend = value;
@@ -95,7 +95,7 @@ static void rna_ClothSettings_max_struct_set(struct PointerRNA *ptr, float value
ClothSimSettings *settings = (ClothSimSettings*)ptr->data;
/* check for clipping */
- if(value < settings->structural)
+ if (value < settings->structural)
value = settings->structural;
settings->max_struct = value;
@@ -103,104 +103,104 @@ static void rna_ClothSettings_max_struct_set(struct PointerRNA *ptr, float value
static void rna_ClothSettings_mass_vgroup_get(PointerRNA *ptr, char *value)
{
- ClothSimSettings *sim= (ClothSimSettings*)ptr->data;
+ ClothSimSettings *sim = (ClothSimSettings*)ptr->data;
rna_object_vgroup_name_index_get(ptr, value, sim->vgroup_mass);
}
static int rna_ClothSettings_mass_vgroup_length(PointerRNA *ptr)
{
- ClothSimSettings *sim= (ClothSimSettings*)ptr->data;
+ ClothSimSettings *sim = (ClothSimSettings*)ptr->data;
return rna_object_vgroup_name_index_length(ptr, sim->vgroup_mass);
}
static void rna_ClothSettings_mass_vgroup_set(PointerRNA *ptr, const char *value)
{
- ClothSimSettings *sim= (ClothSimSettings*)ptr->data;
+ ClothSimSettings *sim = (ClothSimSettings*)ptr->data;
rna_object_vgroup_name_index_set(ptr, value, &sim->vgroup_mass);
}
static void rna_ClothSettings_struct_vgroup_get(PointerRNA *ptr, char *value)
{
- ClothSimSettings *sim= (ClothSimSettings*)ptr->data;
+ ClothSimSettings *sim = (ClothSimSettings*)ptr->data;
rna_object_vgroup_name_index_get(ptr, value, sim->vgroup_struct);
}
static int rna_ClothSettings_struct_vgroup_length(PointerRNA *ptr)
{
- ClothSimSettings *sim= (ClothSimSettings*)ptr->data;
+ ClothSimSettings *sim = (ClothSimSettings*)ptr->data;
return rna_object_vgroup_name_index_length(ptr, sim->vgroup_struct);
}
static void rna_ClothSettings_struct_vgroup_set(PointerRNA *ptr, const char *value)
{
- ClothSimSettings *sim= (ClothSimSettings*)ptr->data;
+ ClothSimSettings *sim = (ClothSimSettings*)ptr->data;
rna_object_vgroup_name_index_set(ptr, value, &sim->vgroup_struct);
}
static void rna_ClothSettings_bend_vgroup_get(PointerRNA *ptr, char *value)
{
- ClothSimSettings *sim= (ClothSimSettings*)ptr->data;
+ ClothSimSettings *sim = (ClothSimSettings*)ptr->data;
rna_object_vgroup_name_index_get(ptr, value, sim->vgroup_bend);
}
static int rna_ClothSettings_bend_vgroup_length(PointerRNA *ptr)
{
- ClothSimSettings *sim= (ClothSimSettings*)ptr->data;
+ ClothSimSettings *sim = (ClothSimSettings*)ptr->data;
return rna_object_vgroup_name_index_length(ptr, sim->vgroup_bend);
}
static void rna_ClothSettings_bend_vgroup_set(PointerRNA *ptr, const char *value)
{
- ClothSimSettings *sim= (ClothSimSettings*)ptr->data;
+ ClothSimSettings *sim = (ClothSimSettings*)ptr->data;
rna_object_vgroup_name_index_set(ptr, value, &sim->vgroup_bend);
}
static PointerRNA rna_ClothSettings_rest_shape_key_get(PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
- ClothSimSettings *sim= (ClothSimSettings*)ptr->data;
+ Object *ob = (Object*)ptr->id.data;
+ ClothSimSettings *sim = (ClothSimSettings*)ptr->data;
return rna_object_shapekey_index_get(ob->data, sim->shapekey_rest);
}
static void rna_ClothSettings_rest_shape_key_set(PointerRNA *ptr, PointerRNA value)
{
- Object *ob= (Object*)ptr->id.data;
- ClothSimSettings *sim= (ClothSimSettings*)ptr->data;
+ Object *ob = (Object*)ptr->id.data;
+ ClothSimSettings *sim = (ClothSimSettings*)ptr->data;
- sim->shapekey_rest= rna_object_shapekey_index_set(ob->data, value, sim->shapekey_rest);
+ sim->shapekey_rest = rna_object_shapekey_index_set(ob->data, value, sim->shapekey_rest);
}
static void rna_ClothSettings_gravity_get(PointerRNA *ptr, float *values)
{
- ClothSimSettings *sim= (ClothSimSettings*)ptr->data;
+ ClothSimSettings *sim = (ClothSimSettings*)ptr->data;
- values[0]= sim->gravity[0];
- values[1]= sim->gravity[1];
- values[2]= sim->gravity[2];
+ values[0] = sim->gravity[0];
+ values[1] = sim->gravity[1];
+ values[2] = sim->gravity[2];
}
static void rna_ClothSettings_gravity_set(PointerRNA *ptr, const float *values)
{
- ClothSimSettings *sim= (ClothSimSettings*)ptr->data;
+ ClothSimSettings *sim = (ClothSimSettings*)ptr->data;
- sim->gravity[0]= values[0];
- sim->gravity[1]= values[1];
- sim->gravity[2]= values[2];
+ sim->gravity[0] = values[0];
+ sim->gravity[1] = values[1];
+ sim->gravity[2] = values[2];
}
static char *rna_ClothSettings_path(PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
- ModifierData *md= modifiers_findByType(ob, eModifierType_Cloth);
+ Object *ob = (Object*)ptr->id.data;
+ ModifierData *md = modifiers_findByType(ob, eModifierType_Cloth);
return md ? BLI_sprintfN("modifiers[\"%s\"].settings", md->name) : NULL;
}
static char *rna_ClothCollisionSettings_path(PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
- ModifierData *md= modifiers_findByType(ob, eModifierType_Cloth);
+ Object *ob = (Object*)ptr->id.data;
+ ModifierData *md = modifiers_findByType(ob, eModifierType_Cloth);
return md ? BLI_sprintfN("modifiers[\"%s\"].collision_settings", md->name) : NULL;
}
@@ -219,43 +219,43 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
/* goal */
- prop= RNA_def_property(srna, "goal_min", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "goal_min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "mingoal");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Goal Minimum", "Goal minimum, vertex group weights are scaled to match this range");
RNA_def_property_update(prop, 0, "rna_cloth_update");
- prop= RNA_def_property(srna, "goal_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "goal_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxgoal");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Goal Maximum", "Goal maximum, vertex group weights are scaled to match this range");
RNA_def_property_update(prop, 0, "rna_cloth_update");
- prop= RNA_def_property(srna, "goal_default", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "goal_default", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "defgoal");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Goal Default", "Default Goal (vertex target position) value, when no Vertex Group used");
RNA_def_property_update(prop, 0, "rna_cloth_update");
- prop= RNA_def_property(srna, "goal_spring", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "goal_spring", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "goalspring");
RNA_def_property_range(prop, 0.0f, 0.999f);
RNA_def_property_ui_text(prop, "Goal Stiffness", "Goal (vertex target position) spring stiffness");
RNA_def_property_update(prop, 0, "rna_cloth_update");
- prop= RNA_def_property(srna, "goal_friction", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "goal_friction", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "goalfrict");
RNA_def_property_range(prop, 0.0f, 50.0f);
RNA_def_property_ui_text(prop, "Goal Damping", "Goal (vertex target position) friction");
RNA_def_property_update(prop, 0, "rna_cloth_update");
- prop= RNA_def_property(srna, "internal_friction", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "internal_friction", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "velocity_smooth");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Internal Friction", "");
RNA_def_property_update(prop, 0, "rna_cloth_update");
- prop= RNA_def_property(srna, "collider_friction", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "collider_friction", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "collider_friction");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Collider Friction", "");
@@ -263,18 +263,18 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
/* mass */
- prop= RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Mass", "Mass of cloth material");
RNA_def_property_update(prop, 0, "rna_cloth_update");
- prop= RNA_def_property(srna, "vertex_group_mass", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group_mass", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ClothSettings_mass_vgroup_get", "rna_ClothSettings_mass_vgroup_length",
"rna_ClothSettings_mass_vgroup_set");
RNA_def_property_ui_text(prop, "Mass Vertex Group", "Vertex Group for pinning of vertices");
RNA_def_property_update(prop, 0, "rna_cloth_pinning_changed");
- prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION);
+ prop = RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION);
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, -100.0, 100.0);
RNA_def_property_float_funcs(prop, "rna_ClothSettings_gravity_get", "rna_ClothSettings_gravity_set", NULL);
@@ -283,13 +283,13 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
/* various */
- prop= RNA_def_property(srna, "air_damping", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "air_damping", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "Cvi");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Air Damping", "Air has normally some thickness which slows falling things down");
RNA_def_property_update(prop, 0, "rna_cloth_update");
- prop= RNA_def_property(srna, "vel_damping", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "vel_damping", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "vel_damping");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Velocity Damping",
@@ -297,19 +297,19 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
"(1.0 = no damping, 0.0 = fully dampened)");
RNA_def_property_update(prop, 0, "rna_cloth_update");
- prop= RNA_def_property(srna, "use_pin_cloth", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pin_cloth", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", CLOTH_SIMSETTINGS_FLAG_GOAL);
RNA_def_property_ui_text(prop, "Pin Cloth", "Enable pinning of cloth vertices to other objects/positions");
RNA_def_property_update(prop, 0, "rna_cloth_pinning_changed");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- prop= RNA_def_property(srna, "pin_stiffness", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "pin_stiffness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "goalspring");
RNA_def_property_range(prop, 0.0f, 50.0);
RNA_def_property_ui_text(prop, "Pin Stiffness", "Pin (vertex target position) spring stiffness");
RNA_def_property_update(prop, 0, "rna_cloth_update");
- prop= RNA_def_property(srna, "quality", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "quality", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "stepsPerFrame");
RNA_def_property_range(prop, 4, 80);
RNA_def_property_ui_text(prop, "Quality",
@@ -318,70 +318,70 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
/* springs */
- prop= RNA_def_property(srna, "use_stiffness_scale", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_stiffness_scale", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", CLOTH_SIMSETTINGS_FLAG_SCALING);
RNA_def_property_ui_text(prop, "Stiffness Scaling",
"If enabled, stiffness can be scaled along a weight painted vertex group");
RNA_def_property_update(prop, 0, "rna_cloth_update");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- prop= RNA_def_property(srna, "spring_damping", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "spring_damping", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "Cdis");
RNA_def_property_range(prop, 0.0f, 50.0f);
RNA_def_property_ui_text(prop, "Spring Damping", "Damping of cloth velocity (higher = more smooth, less jiggling)");
RNA_def_property_update(prop, 0, "rna_cloth_update");
- prop= RNA_def_property(srna, "structural_stiffness", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "structural_stiffness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "structural");
RNA_def_property_range(prop, 0.0f, 10000.0f);
RNA_def_property_ui_text(prop, "Structural Stiffness", "Overall stiffness of structure");
RNA_def_property_update(prop, 0, "rna_cloth_update");
- prop= RNA_def_property(srna, "structural_stiffness_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "structural_stiffness_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max_struct");
RNA_def_property_range(prop, 0.0f, 10000.0f);
RNA_def_property_float_funcs(prop, NULL, "rna_ClothSettings_max_struct_set", NULL);
RNA_def_property_ui_text(prop, "Structural Stiffness Maximum", "Maximum structural stiffness value");
RNA_def_property_update(prop, 0, "rna_cloth_update");
- prop= RNA_def_property(srna, "vertex_group_structural_stiffness", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group_structural_stiffness", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ClothSettings_struct_vgroup_get", "rna_ClothSettings_struct_vgroup_length",
"rna_ClothSettings_struct_vgroup_set");
RNA_def_property_ui_text(prop, "Structural Stiffness Vertex Group",
"Vertex group for fine control over structural stiffness");
RNA_def_property_update(prop, 0, "rna_cloth_update");
- prop= RNA_def_property(srna, "bending_stiffness", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "bending_stiffness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bending");
RNA_def_property_range(prop, 0.0f, 10000.0f);
RNA_def_property_ui_text(prop, "Bending Stiffness", "Wrinkle coefficient (higher = less smaller but more big wrinkles)");
RNA_def_property_update(prop, 0, "rna_cloth_update");
- prop= RNA_def_property(srna, "bending_stiffness_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "bending_stiffness_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max_bend");
RNA_def_property_range(prop, 0.0f, 10000.0f);
RNA_def_property_float_funcs(prop, NULL, "rna_ClothSettings_max_bend_set", NULL);
RNA_def_property_ui_text(prop, "Bending Stiffness Maximum", "Maximum bending stiffness value");
RNA_def_property_update(prop, 0, "rna_cloth_update");
- prop= RNA_def_property(srna, "vertex_group_bending", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group_bending", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ClothSettings_bend_vgroup_get", "rna_ClothSettings_bend_vgroup_length",
"rna_ClothSettings_bend_vgroup_set");
RNA_def_property_ui_text(prop, "Bending Stiffness Vertex Group", "Vertex group for fine control over bending stiffness");
RNA_def_property_update(prop, 0, "rna_cloth_update");
- prop= RNA_def_property(srna, "effector_weights", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "effector_weights", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "EffectorWeights");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Effector Weights", "");
- prop= RNA_def_property(srna, "pre_roll", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "pre_roll", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "preroll");
RNA_def_property_range(prop, 0, 200);
RNA_def_property_ui_text(prop, "Pre Roll", "Simulation starts on this frame");
RNA_def_property_update(prop, 0, "rna_cloth_reset");
- prop= RNA_def_property(srna, "rest_shape_key", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "rest_shape_key", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "ShapeKey");
RNA_def_property_pointer_funcs(prop, "rna_ClothSettings_rest_shape_key_get",
@@ -440,19 +440,19 @@ static void rna_def_cloth_collision_settings(BlenderRNA *brna)
/* general collision */
- prop= RNA_def_property(srna, "use_collision", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", CLOTH_COLLSETTINGS_FLAG_ENABLED);
RNA_def_property_ui_text(prop, "Enable Collision", "Enable collisions with other objects");
RNA_def_property_update(prop, 0, "rna_cloth_update");
- prop= RNA_def_property(srna, "repel_force", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "repel_force", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "repel_force");
RNA_def_property_range(prop, 0.0f, 20.0f);
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_ui_text(prop, "Repulsion Force", "Repulsion force to apply on cloth when close to colliding");
RNA_def_property_update(prop, 0, "rna_cloth_update");
- prop= RNA_def_property(srna, "distance_repel", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "distance_repel", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "distance_repel");
RNA_def_property_range(prop, 0.001f, 10.0f);
RNA_def_property_float_default(prop, 0.005f);
@@ -460,19 +460,19 @@ static void rna_def_cloth_collision_settings(BlenderRNA *brna)
"Maximum distance to apply repulsion force, must be greater than minimum distance");
RNA_def_property_update(prop, 0, "rna_cloth_update");
- prop= RNA_def_property(srna, "distance_min", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "distance_min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "epsilon");
RNA_def_property_range(prop, 0.001f, 1.0f);
RNA_def_property_ui_text(prop, "Minimum Distance",
"Minimum distance between collision objects before collision response takes in");
RNA_def_property_update(prop, 0, "rna_cloth_update");
- prop= RNA_def_property(srna, "friction", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "friction", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 80.0f);
RNA_def_property_ui_text(prop, "Friction", "Friction force if a collision happened (higher = less movement)");
RNA_def_property_update(prop, 0, "rna_cloth_update");
- prop= RNA_def_property(srna, "collision_quality", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "collision_quality", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "loop_count");
RNA_def_property_range(prop, 1, 20);
RNA_def_property_ui_text(prop, "Collision Quality",
@@ -481,30 +481,30 @@ static void rna_def_cloth_collision_settings(BlenderRNA *brna)
/* self collision */
- prop= RNA_def_property(srna, "use_self_collision", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_self_collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", CLOTH_COLLSETTINGS_FLAG_SELF);
RNA_def_property_ui_text(prop, "Enable Self Collision", "Enable self collisions");
RNA_def_property_update(prop, 0, "rna_cloth_update");
- prop= RNA_def_property(srna, "self_distance_min", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "self_distance_min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "selfepsilon");
RNA_def_property_range(prop, 0.5f, 1.0f);
RNA_def_property_ui_text(prop, "Self Minimum Distance", "0.5 means no distance at all, 1.0 is maximum distance");
RNA_def_property_update(prop, 0, "rna_cloth_update");
- prop= RNA_def_property(srna, "self_friction", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "self_friction", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 80.0f);
RNA_def_property_ui_text(prop, "Self Friction", "Friction/damping with self contact");
RNA_def_property_update(prop, 0, "rna_cloth_update");
- prop= RNA_def_property(srna, "self_collision_quality", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "self_collision_quality", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "self_loop_count");
RNA_def_property_range(prop, 1, 10);
RNA_def_property_ui_text(prop, "Self Collision Quality",
"How many self collision iterations should be done (higher is better quality but slower)");
RNA_def_property_update(prop, 0, "rna_cloth_update");
- prop= RNA_def_property(srna, "group", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "group", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Collision Group", "Limit colliders to this Group");
RNA_def_property_update(prop, 0, "rna_cloth_update");
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c
index 60144e0cf7f..f60b61941d9 100644
--- a/source/blender/makesrna/intern/rna_color.c
+++ b/source/blender/makesrna/intern/rna_color.c
@@ -55,11 +55,11 @@
static int rna_CurveMapping_curves_length(PointerRNA *ptr)
{
- CurveMapping *cumap= (CurveMapping*)ptr->data;
+ CurveMapping *cumap = (CurveMapping*)ptr->data;
int len;
- for(len=0; len<CM_TOT; len++)
- if(!cumap->cm[len].curve)
+ for (len = 0; len<CM_TOT; len++)
+ if (!cumap->cm[len].curve)
break;
return len;
@@ -67,16 +67,16 @@ static int rna_CurveMapping_curves_length(PointerRNA *ptr)
static void rna_CurveMapping_curves_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- CurveMapping *cumap= (CurveMapping*)ptr->data;
+ CurveMapping *cumap = (CurveMapping*)ptr->data;
rna_iterator_array_begin(iter, cumap->cm, sizeof(CurveMap), rna_CurveMapping_curves_length(ptr), 0, NULL);
}
static void rna_CurveMapping_clip_set(PointerRNA *ptr, int value)
{
- CurveMapping *cumap= (CurveMapping*)ptr->data;
+ CurveMapping *cumap = (CurveMapping*)ptr->data;
- if(value) cumap->flag |= CUMA_DO_CLIP;
+ if (value) cumap->flag |= CUMA_DO_CLIP;
else cumap->flag &= ~CUMA_DO_CLIP;
curvemapping_changed(cumap, 0);
@@ -84,52 +84,52 @@ static void rna_CurveMapping_clip_set(PointerRNA *ptr, int value)
static void rna_CurveMapping_black_level_set(PointerRNA *ptr, const float *values)
{
- CurveMapping *cumap= (CurveMapping*)ptr->data;
- cumap->black[0]= values[0];
- cumap->black[1]= values[1];
- cumap->black[2]= values[2];
+ CurveMapping *cumap = (CurveMapping*)ptr->data;
+ cumap->black[0] = values[0];
+ cumap->black[1] = values[1];
+ cumap->black[2] = values[2];
curvemapping_set_black_white(cumap, NULL, NULL);
}
static void rna_CurveMapping_white_level_set(PointerRNA *ptr, const float *values)
{
- CurveMapping *cumap= (CurveMapping*)ptr->data;
- cumap->white[0]= values[0];
- cumap->white[1]= values[1];
- cumap->white[2]= values[2];
+ CurveMapping *cumap = (CurveMapping*)ptr->data;
+ cumap->white[0] = values[0];
+ cumap->white[1] = values[1];
+ cumap->white[2] = values[2];
curvemapping_set_black_white(cumap, NULL, NULL);
}
static void rna_CurveMapping_clipminx_range(PointerRNA *ptr, float *min, float *max)
{
- CurveMapping *cumap= (CurveMapping*)ptr->data;
+ CurveMapping *cumap = (CurveMapping*)ptr->data;
- *min= -100.0f;
- *max= cumap->clipr.xmax;
+ *min = -100.0f;
+ *max = cumap->clipr.xmax;
}
static void rna_CurveMapping_clipminy_range(PointerRNA *ptr, float *min, float *max)
{
- CurveMapping *cumap= (CurveMapping*)ptr->data;
+ CurveMapping *cumap = (CurveMapping*)ptr->data;
- *min= -100.0f;
- *max= cumap->clipr.ymax;
+ *min = -100.0f;
+ *max = cumap->clipr.ymax;
}
static void rna_CurveMapping_clipmaxx_range(PointerRNA *ptr, float *min, float *max)
{
- CurveMapping *cumap= (CurveMapping*)ptr->data;
+ CurveMapping *cumap = (CurveMapping*)ptr->data;
- *min= cumap->clipr.xmin;
- *max= 100.0f;
+ *min = cumap->clipr.xmin;
+ *max = 100.0f;
}
static void rna_CurveMapping_clipmaxy_range(PointerRNA *ptr, float *min, float *max)
{
- CurveMapping *cumap= (CurveMapping*)ptr->data;
+ CurveMapping *cumap = (CurveMapping*)ptr->data;
- *min= cumap->clipr.ymin;
- *max= 100.0f;
+ *min = cumap->clipr.ymin;
+ *max = 100.0f;
}
@@ -137,12 +137,12 @@ static char *rna_ColorRamp_path(PointerRNA *ptr)
{
/* handle the cases where a single datablock may have 2 ramp types */
if (ptr->id.data) {
- ID *id= ptr->id.data;
+ ID *id = ptr->id.data;
switch (GS(id->name)) {
case ID_MA: /* material has 2 cases - diffuse and specular */
{
- Material *ma= (Material*)id;
+ Material *ma = (Material*)id;
if (ptr->data == ma->ramp_col)
return BLI_strdup("diffuse_ramp");
@@ -170,26 +170,26 @@ static char *rna_ColorRampElement_path(PointerRNA *ptr)
#define COLRAMP_GETPATH \
{ \
- prop= RNA_struct_find_property(&ramp_ptr, "elements"); \
+ prop = RNA_struct_find_property(&ramp_ptr, "elements"); \
if (prop) { \
- index= RNA_property_collection_lookup_index(&ramp_ptr, prop, ptr); \
+ index = RNA_property_collection_lookup_index(&ramp_ptr, prop, ptr); \
if (index >= 0) { \
- char *texture_path= rna_ColorRamp_path(&ramp_ptr); \
- path= BLI_sprintfN("%s.elements[%d]", texture_path, index); \
+ char *texture_path = rna_ColorRamp_path(&ramp_ptr); \
+ path = BLI_sprintfN("%s.elements[%d]", texture_path, index); \
MEM_freeN(texture_path); \
} \
} \
}
/* determine the path from the ID-block to the ramp */
- // FIXME: this is a very slow way to do it, but it will have to suffice...
+ /* FIXME: this is a very slow way to do it, but it will have to suffice... */
if (ptr->id.data) {
- ID *id= ptr->id.data;
+ ID *id = ptr->id.data;
switch (GS(id->name)) {
case ID_MA: /* 2 cases for material - diffuse and spec */
{
- Material *ma= (Material *)id;
+ Material *ma = (Material *)id;
/* try diffuse first */
if (ma->ramp_col) {
@@ -204,13 +204,13 @@ static char *rna_ColorRampElement_path(PointerRNA *ptr)
}
break;
- // TODO: node trees need special attention
+ /* TODO: node trees need special attention */
case ID_NT:
{
bNodeTree *ntree = (bNodeTree *)id;
bNode *node;
- for(node=ntree->nodes.first; node; node=node->next) {
+ for (node = ntree->nodes.first; node; node = node->next) {
if (ELEM3(node->type, SH_NODE_VALTORGB, CMP_NODE_VALTORGB, TEX_NODE_VALTORGB)) {
RNA_pointer_create(id, &RNA_ColorRamp, node->storage, &ramp_ptr);
COLRAMP_GETPATH;
@@ -239,12 +239,12 @@ static char *rna_ColorRampElement_path(PointerRNA *ptr)
static void rna_ColorRamp_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
if (ptr->id.data) {
- ID *id= ptr->id.data;
+ ID *id = ptr->id.data;
switch (GS(id->name)) {
case ID_MA:
{
- Material *ma= ptr->id.data;
+ Material *ma = ptr->id.data;
DAG_id_tag_update(&ma->id, 0);
WM_main_add_notifier(NC_MATERIAL|ND_SHADING_DRAW, ma);
@@ -255,7 +255,7 @@ static void rna_ColorRamp_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *
bNodeTree *ntree = (bNodeTree *)id;
bNode *node;
- for(node=ntree->nodes.first; node; node=node->next) {
+ for (node = ntree->nodes.first; node; node = node->next) {
if (ELEM3(node->type, SH_NODE_VALTORGB, CMP_NODE_VALTORGB, TEX_NODE_VALTORGB)) {
ED_node_generic_update(bmain, ntree, node);
}
@@ -264,7 +264,7 @@ static void rna_ColorRamp_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *
break;
case ID_TE:
{
- Tex *tex= ptr->id.data;
+ Tex *tex = ptr->id.data;
DAG_id_tag_update(&tex->id, 0);
WM_main_add_notifier(NC_TEXTURE, tex);
@@ -283,9 +283,9 @@ static void rna_ColorRamp_eval(struct ColorBand *coba, float position, float col
static CBData *rna_ColorRampElement_new(struct ColorBand *coba, ReportList *reports, float position)
{
- CBData *element= colorband_element_add(coba, position);
+ CBData *element = colorband_element_add(coba, position);
- if(element==NULL)
+ if (element == NULL)
BKE_reportf(reports, RPT_ERROR, "Unable to add element to colorband (limit %d)", MAXCOLORBAND);
return element;
@@ -294,14 +294,14 @@ static CBData *rna_ColorRampElement_new(struct ColorBand *coba, ReportList *repo
static void rna_ColorRampElement_remove(struct ColorBand *coba, ReportList *reports, CBData *element)
{
int index = (int)(element - coba->data);
- if(colorband_element_remove(coba, index) == 0)
+ if (colorband_element_remove(coba, index) == 0)
BKE_report(reports, RPT_ERROR, "Element not found in element collection or last element");
}
static void rna_Scopes_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Scopes *s= (Scopes*)ptr->data;
+ Scopes *s = (Scopes*)ptr->data;
s->ok = 0;
}
@@ -317,24 +317,24 @@ static void rna_def_curvemappoint(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- srna= RNA_def_struct(brna, "CurveMapPoint", NULL);
+ srna = RNA_def_struct(brna, "CurveMapPoint", NULL);
RNA_def_struct_ui_text(srna, "CurveMapPoint", "Point of a curve used for a curve mapping");
/* not editable for now, need to have CurveMapping to do curvemapping_changed */
- prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "x");
RNA_def_property_array(prop, 2);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Location", "X/Y coordinates of the curve point");
- prop= RNA_def_property(srna, "handle_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "handle_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, prop_handle_type_items);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Handle Type", "Curve interpolation at this point: Bezier or vector");
- prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CUMA_SELECT);
RNA_def_property_ui_text(prop, "Select", "Selection state of the curve point");
}
@@ -349,18 +349,18 @@ static void rna_def_curvemap(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- srna= RNA_def_struct(brna, "CurveMap", NULL);
+ srna = RNA_def_struct(brna, "CurveMap", NULL);
RNA_def_struct_ui_text(srna, "CurveMap", "Curve in a curve mapping");
/* not editable for now, need to have CurveMapping to do curvemapping_changed */
- prop= RNA_def_property(srna, "extend", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "extend", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, prop_extend_items);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Extend", "Extrapolate the curve or extend it horizontally");
- prop= RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "curve", "totpoint");
RNA_def_property_struct_type(prop, "CurveMapPoint");
RNA_def_property_ui_text(prop, "Points", "");
@@ -371,50 +371,50 @@ static void rna_def_curvemapping(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "CurveMapping", NULL);
+ srna = RNA_def_struct(brna, "CurveMapping", NULL);
RNA_def_struct_ui_text(srna, "CurveMapping", "Curve mapping to map color, vector and scalar values to other values using a user defined curve");
- prop= RNA_def_property(srna, "use_clip", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_clip", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CUMA_DO_CLIP);
RNA_def_property_ui_text(prop, "Clip", "Force the curve view to fit a defined boundary");
RNA_def_property_boolean_funcs(prop, NULL, "rna_CurveMapping_clip_set");
- prop= RNA_def_property(srna, "clip_min_x", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "clip_min_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clipr.xmin");
RNA_def_property_range(prop, -100.0f, 100.0f);
RNA_def_property_ui_text(prop, "Clip Min X", "");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_CurveMapping_clipminx_range");
- prop= RNA_def_property(srna, "clip_min_y", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "clip_min_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clipr.ymin");
RNA_def_property_range(prop, -100.0f, 100.0f);
RNA_def_property_ui_text(prop, "Clip Min Y", "");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_CurveMapping_clipminy_range");
- prop= RNA_def_property(srna, "clip_max_x", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "clip_max_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clipr.xmax");
RNA_def_property_range(prop, -100.0f, 100.0f);
RNA_def_property_ui_text(prop, "Clip Max X", "");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_CurveMapping_clipmaxx_range");
- prop= RNA_def_property(srna, "clip_max_y", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "clip_max_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clipr.ymax");
RNA_def_property_range(prop, -100.0f, 100.0f);
RNA_def_property_ui_text(prop, "Clip Max Y", "");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_CurveMapping_clipmaxy_range");
- prop= RNA_def_property(srna, "curves", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "curves", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_funcs(prop, "rna_CurveMapping_curves_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_CurveMapping_curves_length", NULL, NULL, NULL);
RNA_def_property_struct_type(prop, "CurveMap");
RNA_def_property_ui_text(prop, "Curves", "");
- prop= RNA_def_property(srna, "black_level", PROP_FLOAT, PROP_COLOR);
+ prop = RNA_def_property(srna, "black_level", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "black");
RNA_def_property_range(prop, -1000.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Black Level", "For RGB curves, the color that black is mapped to");
RNA_def_property_float_funcs(prop, NULL, "rna_CurveMapping_black_level_set", NULL);
- prop= RNA_def_property(srna, "white_level", PROP_FLOAT, PROP_COLOR);
+ prop = RNA_def_property(srna, "white_level", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "white");
RNA_def_property_range(prop, -1000.0f, 1000.0f);
RNA_def_property_ui_text(prop, "White Level", "For RGB curves, the color that white is mapped to");
@@ -426,18 +426,18 @@ static void rna_def_color_ramp_element(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ColorRampElement", NULL);
+ srna = RNA_def_struct(brna, "ColorRampElement", NULL);
RNA_def_struct_sdna(srna, "CBData");
RNA_def_struct_path_func(srna, "rna_ColorRampElement_path");
RNA_def_struct_ui_text(srna, "Color Ramp Element", "Element defining a color at a position in the color ramp");
- prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
+ prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "r");
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Color", "Set color of selected color stop");
RNA_def_property_update(prop, 0, "rna_ColorRamp_update");
- prop= RNA_def_property(srna, "position", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "position", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "pos");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Position", "Set position of selected color stop");
@@ -451,7 +451,7 @@ static void rna_def_color_ramp_element_api(BlenderRNA *brna, PropertyRNA *cprop)
FunctionRNA *func;
RNA_def_property_srna(cprop, "ColorRampElements");
- srna= RNA_def_struct(brna, "ColorRampElements", NULL);
+ srna = RNA_def_struct(brna, "ColorRampElements", NULL);
RNA_def_struct_sdna(srna, "ColorBand");
RNA_def_struct_path_func(srna, "rna_ColorRampElement_path");
RNA_def_struct_ui_text(srna, "Color Ramp Elements", "Collection of Color Ramp Elements");
@@ -460,16 +460,16 @@ static void rna_def_color_ramp_element_api(BlenderRNA *brna, PropertyRNA *cprop)
func = RNA_def_function(srna, "new", "rna_ColorRampElement_new");
RNA_def_function_ui_description(func, "Add element to ColorRamp");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_float(func, "position", 0.0f, 0.0f, 1.0f, "Position", "Position to add element", 0.0f, 1.0f);
+ parm = RNA_def_float(func, "position", 0.0f, 0.0f, 1.0f, "Position", "Position to add element", 0.0f, 1.0f);
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "element", "ColorRampElement", "", "New element");
+ parm = RNA_def_pointer(func, "element", "ColorRampElement", "", "New element");
RNA_def_function_return(func, parm);
func = RNA_def_function(srna, "remove", "rna_ColorRampElement_remove");
RNA_def_function_ui_description(func, "Delete element from ColorRamp");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "element", "ColorRampElement", "", "Element to remove");
+ parm = RNA_def_pointer(func, "element", "ColorRampElement", "", "Element to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
@@ -487,26 +487,26 @@ static void rna_def_color_ramp(BlenderRNA *brna)
{4, "CONSTANT", 0, "Constant", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "ColorRamp", NULL);
+ srna = RNA_def_struct(brna, "ColorRamp", NULL);
RNA_def_struct_sdna(srna, "ColorBand");
RNA_def_struct_path_func(srna, "rna_ColorRamp_path");
RNA_def_struct_ui_text(srna, "Color Ramp", "Color ramp mapping a scalar value to a color");
- prop= RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_COLOR);
+ prop = RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_COLOR);
RNA_def_property_collection_sdna(prop, NULL, "data", "tot");
RNA_def_property_struct_type(prop, "ColorRampElement");
RNA_def_property_ui_text(prop, "Elements", "");
RNA_def_property_update(prop, 0, "rna_ColorRamp_update");
rna_def_color_ramp_element_api(brna, prop);
- prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ipotype");
RNA_def_property_enum_items(prop, prop_interpolation_items);
RNA_def_property_ui_text(prop, "Interpolation", "");
RNA_def_property_update(prop, 0, "rna_ColorRamp_update");
-#if 0 // use len(elements)
- prop= RNA_def_property(srna, "total", PROP_INT, PROP_NONE);
+#if 0 /* use len(elements) */
+ prop = RNA_def_property(srna, "total", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tot");
/* needs a function to do the right thing when adding elements like colorband_add_cb() */
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -517,7 +517,7 @@ static void rna_def_color_ramp(BlenderRNA *brna)
func = RNA_def_function(srna, "evaluate", "rna_ColorRamp_eval");
RNA_def_function_ui_description(func, "Evaluate ColorRamp");
- prop= RNA_def_float(func, "position", 1.0f, 0.0f, 1.0f, "Position", "Evaluate ColorRamp at position", 0.0f, 1.0f);
+ prop = RNA_def_float(func, "position", 1.0f, 0.0f, 1.0f, "Position", "Evaluate ColorRamp at position", 0.0f, 1.0f);
RNA_def_property_flag(prop, PROP_REQUIRED);
/* return */
prop = RNA_def_float_color(func, "color", 4, NULL, -FLT_MAX, FLT_MAX, "Color", "Color at given position", -FLT_MAX, FLT_MAX);
@@ -538,10 +538,10 @@ static void rna_def_histogram(BlenderRNA *brna)
{HISTO_MODE_B, "B", ICON_COLOR, "Blue", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "Histogram", NULL);
+ srna = RNA_def_struct(brna, "Histogram", NULL);
RNA_def_struct_ui_text(srna, "Histogram", "Statistical view of the levels of color in an image");
- prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, prop_mode_items);
RNA_def_property_ui_text(prop, "Mode", "Channels to display when drawing the histogram");
@@ -561,38 +561,38 @@ static void rna_def_scopes(BlenderRNA *brna)
{SCOPES_WAVEFRM_YCC_JPEG, "YCBCRJPG", ICON_COLOR, "YCbCr (Jpeg)", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "Scopes", NULL);
+ srna = RNA_def_struct(brna, "Scopes", NULL);
RNA_def_struct_ui_text(srna, "Scopes", "Scopes for statistical view of an image");
- prop= RNA_def_property(srna, "use_full_resolution", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_full_resolution", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, "Scopes", "sample_full", 1);
RNA_def_property_ui_text(prop, "Full Sample", "Sample every pixel of the image");
RNA_def_property_update(prop, 0, "rna_Scopes_update");
- prop= RNA_def_property(srna, "accuracy", PROP_FLOAT, PROP_PERCENTAGE);
+ prop = RNA_def_property(srna, "accuracy", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, "Scopes", "accuracy");
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_range(prop, 0.0, 100.0, 10, 1);
RNA_def_property_ui_text(prop, "Accuracy", "Proportion of original image source pixel lines to sample");
RNA_def_property_update(prop, 0, "rna_Scopes_update");
- prop= RNA_def_property(srna, "histogram", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "histogram", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, "Scopes", "hist");
RNA_def_property_struct_type(prop, "Histogram");
RNA_def_property_ui_text(prop, "Histogram", "Histogram for viewing image statistics");
- prop= RNA_def_property(srna, "waveform_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "waveform_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, "Scopes", "wavefrm_mode");
RNA_def_property_enum_items(prop, prop_wavefrm_mode_items);
RNA_def_property_ui_text(prop, "Waveform Mode", "");
RNA_def_property_update(prop, 0, "rna_Scopes_update");
- prop= RNA_def_property(srna, "waveform_alpha", PROP_FLOAT, PROP_PERCENTAGE);
+ prop = RNA_def_property(srna, "waveform_alpha", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, "Scopes", "wavefrm_alpha");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Waveform Opacity", "Opacity of the points");
- prop= RNA_def_property(srna, "vectorscope_alpha", PROP_FLOAT, PROP_PERCENTAGE);
+ prop = RNA_def_property(srna, "vectorscope_alpha", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, "Scopes", "vecscope_alpha");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Vectorscope Opacity", "Opacity of the points");
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index 8a1c56abedf..883b72ef832 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -42,7 +42,7 @@
#include "ED_object.h"
#include "WM_types.h"
-EnumPropertyItem constraint_type_items[] ={
+EnumPropertyItem constraint_type_items[] = {
{0, "", 0, "Motion Tracking", ""},
{CONSTRAINT_TYPE_CAMERASOLVER, "CAMERA_SOLVER", ICON_CONSTRAINT_DATA, "Camera Solver", ""},
{CONSTRAINT_TYPE_OBJECTSOLVER, "OBJECT_SOLVER", ICON_CONSTRAINT_DATA, "Object Solver", ""},
@@ -107,9 +107,9 @@ static EnumPropertyItem space_object_items[] = {
static StructRNA *rna_ConstraintType_refine(struct PointerRNA *ptr)
{
- bConstraint *con= (bConstraint*)ptr->data;
+ bConstraint *con = (bConstraint*)ptr->data;
- switch(con->type) {
+ switch (con->type) {
case CONSTRAINT_TYPE_CHILDOF:
return &RNA_ChildOfConstraint;
case CONSTRAINT_TYPE_TRACKTO:
@@ -173,7 +173,7 @@ static StructRNA *rna_ConstraintType_refine(struct PointerRNA *ptr)
static void rna_Constraint_name_set(PointerRNA *ptr, const char *value)
{
- bConstraint *con= ptr->data;
+ bConstraint *con = ptr->data;
char oldname[sizeof(con->name)];
/* make a copy of the old name first */
@@ -184,7 +184,7 @@ static void rna_Constraint_name_set(PointerRNA *ptr, const char *value)
/* make sure name is unique */
if (ptr->id.data) {
- Object *ob= ptr->id.data;
+ Object *ob = ptr->id.data;
ListBase *list = get_constraint_lb(ob, con, NULL);
/* if we have the list, check for unique name, otherwise give up */
@@ -198,15 +198,15 @@ static void rna_Constraint_name_set(PointerRNA *ptr, const char *value)
static char *rna_Constraint_path(PointerRNA *ptr)
{
- Object *ob= ptr->id.data;
- bConstraint *con= ptr->data;
+ Object *ob = ptr->id.data;
+ bConstraint *con = ptr->data;
bPoseChannel *pchan;
ListBase *lb = get_constraint_lb(ob, con, &pchan);
- if(lb == NULL)
+ if (lb == NULL)
printf("rna_Constraint_path: internal error, constraint '%s' not found in object '%s'\n", con->name, ob->id.name);
- if(pchan) {
+ if (pchan) {
return BLI_sprintfN("pose.bones[\"%s\"].constraints[\"%s\"]", pchan->name, con->name);
}
@@ -225,9 +225,9 @@ static void rna_Constraint_dependency_update(Main *bmain, Scene *scene, PointerR
static void rna_Constraint_influence_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Object *ob= ptr->id.data;
+ Object *ob = ptr->id.data;
- if(ob->pose)
+ if (ob->pose)
ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK);
rna_Constraint_update(bmain, scene, ptr);
@@ -239,8 +239,8 @@ static void rna_Constraint_ik_type_set(struct PointerRNA *ptr, int value)
bKinematicConstraint *ikdata = con->data;
if (ikdata->type != value) {
- // the type of IK constraint has changed, set suitable default values
- // in case constraints reuse same fields incompatible
+ /* the type of IK constraint has changed, set suitable default values */
+ /* in case constraints reuse same fields incompatible */
switch (value) {
case CONSTRAINT_IK_COPYPOSE:
break;
@@ -253,10 +253,10 @@ static void rna_Constraint_ik_type_set(struct PointerRNA *ptr, int value)
static EnumPropertyItem *rna_Constraint_owner_space_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *UNUSED(free))
{
- Object *ob= (Object*)ptr->id.data;
- bConstraint *con= (bConstraint*)ptr->data;
+ Object *ob = (Object*)ptr->id.data;
+ bConstraint *con = (bConstraint*)ptr->data;
- if(BLI_findindex(&ob->constraints, con) == -1)
+ if (BLI_findindex(&ob->constraints, con) == -1)
return owner_space_pchan_items;
else /* object */
return space_object_items;
@@ -264,22 +264,22 @@ static EnumPropertyItem *rna_Constraint_owner_space_itemf(bContext *UNUSED(C), P
static EnumPropertyItem *rna_Constraint_target_space_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *UNUSED(free))
{
- bConstraint *con= (bConstraint*)ptr->data;
- bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
+ bConstraint *con = (bConstraint*)ptr->data;
+ bConstraintTypeInfo *cti = constraint_get_typeinfo(con);
ListBase targets = {NULL, NULL};
bConstraintTarget *ct;
- if(cti && cti->get_constraint_targets) {
+ if (cti && cti->get_constraint_targets) {
cti->get_constraint_targets(con, &targets);
- for(ct=targets.first; ct; ct= ct->next)
- if(ct->tar && ct->tar->type == OB_ARMATURE)
+ for (ct = targets.first; ct; ct = ct->next)
+ if (ct->tar && ct->tar->type == OB_ARMATURE)
break;
- if(cti->flush_constraint_targets)
+ if (cti->flush_constraint_targets)
cti->flush_constraint_targets(con, &targets, 1);
- if(ct)
+ if (ct)
return target_space_pchan_items;
}
@@ -288,51 +288,51 @@ static EnumPropertyItem *rna_Constraint_target_space_itemf(bContext *UNUSED(C),
static void rna_ActionConstraint_minmax_range(PointerRNA *ptr, float *min, float *max)
{
- bConstraint *con= (bConstraint*)ptr->data;
+ bConstraint *con = (bConstraint*)ptr->data;
bActionConstraint *acon = (bActionConstraint *)con->data;
/* 0, 1, 2 = magic numbers for rotX, rotY, rotZ */
if (ELEM3(acon->type, 0, 1, 2)) {
- *min= -180.0f;
- *max= 180.0f;
+ *min = -180.0f;
+ *max = 180.0f;
} else {
- *min= -1000.f;
- *max= 1000.f;
+ *min = -1000.f;
+ *max = 1000.f;
}
}
static int rna_SplineIKConstraint_joint_bindings_get_length(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
{
- bConstraint *con= (bConstraint*)ptr->data;
- bSplineIKConstraint *ikData= (bSplineIKConstraint *)con->data;
+ bConstraint *con = (bConstraint*)ptr->data;
+ bSplineIKConstraint *ikData = (bSplineIKConstraint *)con->data;
if (ikData)
- length[0]= ikData->numpoints;
+ length[0] = ikData->numpoints;
else
- length[0]= 256; /* for raw_access, untested */
+ length[0] = 256; /* for raw_access, untested */
return length[0];
}
static void rna_SplineIKConstraint_joint_bindings_get(PointerRNA *ptr, float *values)
{
- bConstraint *con= (bConstraint*)ptr->data;
- bSplineIKConstraint *ikData= (bSplineIKConstraint *)con->data;
+ bConstraint *con = (bConstraint*)ptr->data;
+ bSplineIKConstraint *ikData = (bSplineIKConstraint *)con->data;
memcpy(values, ikData->points, ikData->numpoints * sizeof(float));
}
static void rna_SplineIKConstraint_joint_bindings_set(PointerRNA *ptr, const float *values)
{
- bConstraint *con= (bConstraint*)ptr->data;
- bSplineIKConstraint *ikData= (bSplineIKConstraint *)con->data;
+ bConstraint *con = (bConstraint*)ptr->data;
+ bSplineIKConstraint *ikData = (bSplineIKConstraint *)con->data;
memcpy(ikData->points, values, ikData->numpoints * sizeof(float));
}
static int rna_Constraint_cameraObject_poll(PointerRNA *ptr, PointerRNA value)
{
- Object *ob= (Object*)value.data;
+ Object *ob = (Object*)value.data;
if (ob) {
if (ob->type == OB_CAMERA && ob != (Object*)ptr->id.data) {
@@ -345,39 +345,39 @@ static int rna_Constraint_cameraObject_poll(PointerRNA *ptr, PointerRNA value)
static void rna_Constraint_followTrack_camera_set(PointerRNA *ptr, PointerRNA value)
{
- bConstraint *con= (bConstraint*)ptr->data;
- bFollowTrackConstraint *data= (bFollowTrackConstraint*)con->data;
- Object *ob= (Object*)value.data;
+ bConstraint *con = (bConstraint*)ptr->data;
+ bFollowTrackConstraint *data = (bFollowTrackConstraint*)con->data;
+ Object *ob = (Object*)value.data;
if (ob) {
if (ob->type == OB_CAMERA && ob != (Object*)ptr->id.data) {
- data->camera= ob;
+ data->camera = ob;
}
} else {
- data->camera= NULL;
+ data->camera = NULL;
}
}
static void rna_Constraint_followTrack_depthObject_set(PointerRNA *ptr, PointerRNA value)
{
- bConstraint *con= (bConstraint*)ptr->data;
- bFollowTrackConstraint *data= (bFollowTrackConstraint*)con->data;
- Object *ob= (Object*)value.data;
+ bConstraint *con = (bConstraint*)ptr->data;
+ bFollowTrackConstraint *data = (bFollowTrackConstraint*)con->data;
+ Object *ob = (Object*)value.data;
if (ob) {
if (ob->type == OB_MESH && ob != (Object*)ptr->id.data) {
- data->depth_ob= ob;
+ data->depth_ob = ob;
}
} else {
- data->depth_ob= NULL;
+ data->depth_ob = NULL;
}
}
static int rna_Constraint_followTrack_depthObject_poll(PointerRNA *ptr, PointerRNA value)
{
- Object *ob= (Object*)value.data;
+ Object *ob = (Object*)value.data;
- if(ob) {
+ if (ob) {
if (ob->type == OB_MESH && ob != (Object*)ptr->id.data) {
return 1;
}
@@ -388,16 +388,16 @@ static int rna_Constraint_followTrack_depthObject_poll(PointerRNA *ptr, PointerR
static void rna_Constraint_objectSolver_camera_set(PointerRNA *ptr, PointerRNA value)
{
- bConstraint *con= (bConstraint*)ptr->data;
- bObjectSolverConstraint *data= (bObjectSolverConstraint*)con->data;
- Object *ob= (Object*)value.data;
+ bConstraint *con = (bConstraint*)ptr->data;
+ bObjectSolverConstraint *data = (bObjectSolverConstraint*)con->data;
+ Object *ob = (Object*)value.data;
if (ob) {
if (ob->type == OB_CAMERA && ob != (Object*)ptr->id.data) {
- data->camera= ob;
+ data->camera = ob;
}
} else {
- data->camera= NULL;
+ data->camera = NULL;
}
}
@@ -416,91 +416,91 @@ static void rna_def_constrainttarget(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ConstraintTarget", NULL);
+ srna = RNA_def_struct(brna, "ConstraintTarget", NULL);
RNA_def_struct_ui_text(srna, "Constraint Target", "Target object for multi-target constraints");
RNA_def_struct_sdna(srna, "bConstraintTarget");
- prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Target Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "subtarget");
RNA_def_property_ui_text(prop, "Sub-Target", "");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- // space, flag and type still to do
+ /* space, flag and type still to do */
}
static void rna_def_constraint_childof(BlenderRNA *brna)
{
- static int rna_matrix_dimsize_4x4[]= {4, 4};
+ static int rna_matrix_dimsize_4x4[] = {4, 4};
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ChildOfConstraint", "Constraint");
+ srna = RNA_def_struct(brna, "ChildOfConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Child Of Constraint", "Create constraint-based parent-child relationship");
RNA_def_struct_sdna_from(srna, "bChildOfConstraint", "data");
- prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Target Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "subtarget");
RNA_def_property_ui_text(prop, "Sub-Target", "");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "use_location_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_location_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CHILDOF_LOCX);
RNA_def_property_ui_text(prop, "Location X", "Use X Location of Parent");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_location_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_location_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CHILDOF_LOCY);
RNA_def_property_ui_text(prop, "Location Y", "Use Y Location of Parent");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_location_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_location_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CHILDOF_LOCZ);
RNA_def_property_ui_text(prop, "Location Z", "Use Z Location of Parent");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_rotation_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_rotation_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CHILDOF_ROTX);
RNA_def_property_ui_text(prop, "Rotation X", "Use X Rotation of Parent");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_rotation_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_rotation_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CHILDOF_ROTY);
RNA_def_property_ui_text(prop, "Rotation Y", "Use Y Rotation of Parent");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_rotation_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_rotation_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CHILDOF_ROTZ);
RNA_def_property_ui_text(prop, "Rotation Z", "Use Z Rotation of Parent");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_scale_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_scale_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CHILDOF_SIZEX);
RNA_def_property_ui_text(prop, "Scale X", "Use X Scale of Parent");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_scale_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_scale_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CHILDOF_SIZEY);
RNA_def_property_ui_text(prop, "Scale Y", "Use Y Scale of Parent");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_scale_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_scale_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CHILDOF_SIZEZ);
RNA_def_property_ui_text(prop, "Scale Z", "Use Z Scale of Parent");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "inverse_matrix", PROP_FLOAT, PROP_MATRIX);
+ prop = RNA_def_property(srna, "inverse_matrix", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "invmat");
RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
@@ -513,31 +513,31 @@ static void rna_def_constraint_python(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "PythonConstraint", "Constraint");
+ srna = RNA_def_struct(brna, "PythonConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Python Constraint", "Use Python script for constraint evaluation");
RNA_def_struct_sdna_from(srna, "bPythonConstraint", "data");
- prop= RNA_def_property(srna, "targets", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "targets", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "targets", NULL);
RNA_def_property_struct_type(prop, "ConstraintTarget");
RNA_def_property_ui_text(prop, "Targets", "Target Objects");
- prop= RNA_def_property(srna, "target_count", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "target_count", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tarnum");
RNA_def_property_ui_text(prop, "Number of Targets", "Usually only 1-3 are needed");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "text", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "text", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Script", "The text object that contains the Python script");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_targets", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_targets", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PYCON_USETARGETS);
RNA_def_property_ui_text(prop, "Use Targets", "Use the targets indicated in the constraint panel");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "has_script_error", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "has_script_error", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PYCON_SCRIPTERROR);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Script Error", "The linked Python script has thrown an error");
@@ -548,146 +548,146 @@ static void rna_def_constraint_kinematic(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem constraint_ik_axisref_items[] ={
+ static EnumPropertyItem constraint_ik_axisref_items[] = {
{0, "BONE", 0, "Bone", ""},
{CONSTRAINT_IK_TARGETAXIS, "TARGET", 0, "Target", ""},
{0, NULL, 0, NULL, NULL},
};
- static EnumPropertyItem constraint_ik_type_items[] ={
+ static EnumPropertyItem constraint_ik_type_items[] = {
{CONSTRAINT_IK_COPYPOSE, "COPY_POSE", 0, "Copy Pose", ""},
{CONSTRAINT_IK_DISTANCE, "DISTANCE", 0, "Distance", ""},
{0, NULL, 0, NULL, NULL},
};
- srna= RNA_def_struct(brna, "KinematicConstraint", "Constraint");
+ srna = RNA_def_struct(brna, "KinematicConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Kinematic Constraint", "Inverse Kinematics");
RNA_def_struct_sdna_from(srna, "bKinematicConstraint", "data");
- prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Target Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "subtarget");
RNA_def_property_ui_text(prop, "Sub-Target", "");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "iterations", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "iterations", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1, 10000);
RNA_def_property_ui_text(prop, "Iterations", "Maximum number of solving iterations");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "pole_target", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "pole_target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "poletar");
RNA_def_property_ui_text(prop, "Pole Target", "Object for pole rotation");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "pole_subtarget", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "pole_subtarget", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "polesubtarget");
RNA_def_property_ui_text(prop, "Pole Sub-Target", "");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "pole_angle", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "pole_angle", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "poleangle");
RNA_def_property_range(prop, -M_PI, M_PI);
RNA_def_property_ui_text(prop, "Pole Angle", "Pole rotation offset");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "weight", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.01, 1.f);
RNA_def_property_ui_text(prop, "Weight", "For Tree-IK: Weight of position control for this target");
- prop= RNA_def_property(srna, "orient_weight", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "orient_weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "orientweight");
RNA_def_property_range(prop, 0.01, 1.f);
RNA_def_property_ui_text(prop, "Orientation Weight", "For Tree-IK: Weight of orientation control for this target");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "chain_count", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "chain_count", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "rootbone");
RNA_def_property_range(prop, 0, 255);
RNA_def_property_ui_text(prop, "Chain Length", "How many bones are included in the IK effect - 0 uses all bones");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "use_tail", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_tail", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_IK_TIP);
RNA_def_property_ui_text(prop, "Use Tail", "Include bone's tail as last element in chain");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "reference_axis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "reference_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, constraint_ik_axisref_items);
RNA_def_property_ui_text(prop, "Axis Reference", "Constraint axis Lock options relative to Bone or Target reference");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "use_location", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_location", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_IK_POS);
RNA_def_property_ui_text(prop, "Position", "Chain follows position of target");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "lock_location_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_location_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CONSTRAINT_IK_NO_POS_X);
RNA_def_property_ui_text(prop, "Lock X Pos", "Constraint position along X axis");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "lock_location_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_location_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CONSTRAINT_IK_NO_POS_Y);
RNA_def_property_ui_text(prop, "Lock Y Pos", "Constraint position along Y axis");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "lock_location_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_location_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CONSTRAINT_IK_NO_POS_Z);
RNA_def_property_ui_text(prop, "Lock Z Pos", "Constraint position along Z axis");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "use_rotation", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_rotation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_IK_ROT);
RNA_def_property_ui_text(prop, "Rotation", "Chain follows rotation of target");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "lock_rotation_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_rotation_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CONSTRAINT_IK_NO_ROT_X);
RNA_def_property_ui_text(prop, "Lock X Rot", "Constraint rotation along X axis");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "lock_rotation_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_rotation_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CONSTRAINT_IK_NO_ROT_Y);
RNA_def_property_ui_text(prop, "Lock Y Rot", "Constraint rotation along Y axis");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "lock_rotation_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_rotation_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CONSTRAINT_IK_NO_ROT_Z);
RNA_def_property_ui_text(prop, "Lock Z Rot", "Constraint rotation along Z axis");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "use_target", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_target", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CONSTRAINT_IK_AUTO);
RNA_def_property_ui_text(prop, "Target", "Disable for targetless IK");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "use_stretch", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_stretch", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_IK_STRETCH);
RNA_def_property_ui_text(prop, "Stretch", "Enable IK Stretching");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "ik_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "ik_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_funcs(prop, NULL, "rna_Constraint_ik_type_set", NULL);
RNA_def_property_enum_items(prop, constraint_ik_type_items);
RNA_def_property_ui_text(prop, "IK Type", "");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "limit_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "limit_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, constraint_distance_items);
RNA_def_property_ui_text(prop, "Limit Mode", "Distances in relation to sphere of influence to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dist");
RNA_def_property_range(prop, 0.0, 100.f);
RNA_def_property_ui_text(prop, "Distance", "Radius of limiting sphere");
@@ -714,40 +714,40 @@ static void rna_def_constraint_track_to(BlenderRNA *brna)
{TRACK_Z, "UP_Z", 0, "Z", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "TrackToConstraint", "Constraint");
+ srna = RNA_def_struct(brna, "TrackToConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Track To Constraint", "Aim the constrained object toward the target");
- prop= RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, "bConstraint", "headtail");
RNA_def_property_ui_text(prop, "Head/Tail", "Target along length of bone: Head=0, Tail=1");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
RNA_def_struct_sdna_from(srna, "bTrackToConstraint", "data");
- prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Target Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "subtarget");
RNA_def_property_ui_text(prop, "Sub-Target", "");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "track_axis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "track_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "reserved1");
RNA_def_property_enum_items(prop, track_items);
RNA_def_property_ui_text(prop, "Track Axis", "Axis that points to the target object");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "up_axis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "up_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "reserved2");
RNA_def_property_enum_items(prop, up_items);
RNA_def_property_ui_text(prop, "Up Axis", "Axis that points upward");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_target_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_target_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", TARGET_Z_UP);
RNA_def_property_ui_text(prop, "Target Z", "Target's Z axis, not World Z axis, will constraint the Up direction");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
@@ -758,59 +758,59 @@ static void rna_def_constraint_locate_like(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "CopyLocationConstraint", "Constraint");
+ srna = RNA_def_struct(brna, "CopyLocationConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Copy Location Constraint", "Copy the location of the target");
- prop= RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, "bConstraint", "headtail");
RNA_def_property_ui_text(prop, "Head/Tail", "Target along length of bone: Head=0, Tail=1");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
RNA_def_struct_sdna_from(srna, "bLocateLikeConstraint", "data");
- prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Target", "Target Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "subtarget");
RNA_def_property_ui_text(prop, "Sub-Target", "");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LOCLIKE_X);
RNA_def_property_ui_text(prop, "Copy X", "Copy the target's X location");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LOCLIKE_Y);
RNA_def_property_ui_text(prop, "Copy Y", "Copy the target's Y location");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LOCLIKE_Z);
RNA_def_property_ui_text(prop, "Copy Z", "Copy the target's Z location");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "invert_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LOCLIKE_X_INVERT);
RNA_def_property_ui_text(prop, "Invert X", "Invert the X location");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "invert_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LOCLIKE_Y_INVERT);
RNA_def_property_ui_text(prop, "Invert Y", "Invert the Y location");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "invert_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LOCLIKE_Z_INVERT);
RNA_def_property_ui_text(prop, "Invert Z", "Invert the Z location");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_offset", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_offset", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LOCLIKE_OFFSET);
RNA_def_property_ui_text(prop, "Offset", "Add original location into copied location");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
@@ -821,52 +821,52 @@ static void rna_def_constraint_rotate_like(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "CopyRotationConstraint", "Constraint");
+ srna = RNA_def_struct(brna, "CopyRotationConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Copy Rotation Constraint", "Copy the rotation of the target");
RNA_def_struct_sdna_from(srna, "bRotateLikeConstraint", "data");
- prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Target Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "subtarget");
RNA_def_property_ui_text(prop, "Sub-Target", "");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ROTLIKE_X);
RNA_def_property_ui_text(prop, "Copy X", "Copy the target's X rotation");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ROTLIKE_Y);
RNA_def_property_ui_text(prop, "Copy Y", "Copy the target's Y rotation");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ROTLIKE_Z);
RNA_def_property_ui_text(prop, "Copy Z", "Copy the target's Z rotation");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "invert_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ROTLIKE_X_INVERT);
RNA_def_property_ui_text(prop, "Invert X", "Invert the X rotation");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "invert_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ROTLIKE_Y_INVERT);
RNA_def_property_ui_text(prop, "Invert Y", "Invert the Y rotation");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "invert_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ROTLIKE_Z_INVERT);
RNA_def_property_ui_text(prop, "Invert Z", "Invert the Z rotation");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_offset", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_offset", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ROTLIKE_OFFSET);
RNA_def_property_ui_text(prop, "Offset", "Add original rotation into copied rotation");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
@@ -877,38 +877,38 @@ static void rna_def_constraint_size_like(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "CopyScaleConstraint", "Constraint");
+ srna = RNA_def_struct(brna, "CopyScaleConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Copy Scale Constraint", "Copy the scale of the target");
RNA_def_struct_sdna_from(srna, "bSizeLikeConstraint", "data");
- prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Target", "Target Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "subtarget");
RNA_def_property_ui_text(prop, "Sub-Target", "");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIZELIKE_X);
RNA_def_property_ui_text(prop, "Copy X", "Copy the target's X scale");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIZELIKE_Y);
RNA_def_property_ui_text(prop, "Copy Y", "Copy the target's Y scale");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIZELIKE_Z);
RNA_def_property_ui_text(prop, "Copy Z", "Copy the target's Z scale");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_offset", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_offset", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIZELIKE_OFFSET);
RNA_def_property_ui_text(prop, "Offset", "Add original scale into copied scale");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
@@ -925,17 +925,17 @@ static void rna_def_constraint_same_volume(BlenderRNA *brna)
{SAMEVOL_Z, "SAMEVOL_Z", 0, "Z", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "MaintainVolumeConstraint", "Constraint");
+ srna = RNA_def_struct(brna, "MaintainVolumeConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Maintain Volume Constraint", "Maintain a constant volume along a single scaling axis");
RNA_def_struct_sdna_from(srna, "bSameVolumeConstraint", "data");
- prop= RNA_def_property(srna, "free_axis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "free_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, volume_items);
RNA_def_property_ui_text(prop, "Free Axis", "The free scaling axis of the object");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "volume", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "volume", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_range(prop, 0.001, 100.f);
RNA_def_property_ui_text(prop, "Volume", "Volume of the bone at rest");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
@@ -947,23 +947,23 @@ static void rna_def_constraint_transform_like(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "CopyTransformsConstraint", "Constraint");
+ srna = RNA_def_struct(brna, "CopyTransformsConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Copy Transforms Constraint", "Copy all the transforms of the target");
- prop= RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, "bConstraint", "headtail");
RNA_def_property_ui_text(prop, "Head/Tail", "Target along length of bone: Head=0, Tail=1");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
RNA_def_struct_sdna_from(srna, "bTransLikeConstraint", "data");
- prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Target Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "subtarget");
RNA_def_property_ui_text(prop, "Sub-Target", "");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
@@ -983,38 +983,38 @@ static void rna_def_constraint_minmax(BlenderRNA *brna)
{TRACK_nZ, "FLOOR_NEGATIVE_Z", 0, "-Z", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "FloorConstraint", "Constraint");
+ srna = RNA_def_struct(brna, "FloorConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Floor Constraint", "Use the target object for location limitation");
RNA_def_struct_sdna_from(srna, "bMinMaxConstraint","data");
- prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Target Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "subtarget");
RNA_def_property_ui_text(prop, "Sub-Target", "");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "floor_location", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "floor_location", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "minmaxflag");
RNA_def_property_enum_items(prop, minmax_items);
RNA_def_property_ui_text(prop, "Floor Location", "Location of target that object will not pass through");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_sticky", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_sticky", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MINMAX_STICKY);
RNA_def_property_ui_text(prop, "Sticky", "Immobilize object while constrained");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_rotation", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_rotation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MINMAX_USEROT);
RNA_def_property_ui_text(prop, "Use Rotation", "Use the target's rotation to determine floor");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_range(prop, 0.0, 100.f);
RNA_def_property_ui_text(prop, "Offset", "Offset of floor from object origin");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
@@ -1037,53 +1037,53 @@ static void rna_def_constraint_action(BlenderRNA *brna)
{12, "SCALE_Z", 0, "Z Scale", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "ActionConstraint", "Constraint");
+ srna = RNA_def_struct(brna, "ActionConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Action Constraint", "Map an action to the transform axes of a bone");
RNA_def_struct_sdna_from(srna, "bActionConstraint", "data");
- prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Target Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "subtarget");
RNA_def_property_ui_text(prop, "Sub-Target", "");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "transform_channel", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "transform_channel", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, transform_channel_items);
RNA_def_property_ui_text(prop, "Transform Channel", "Transformation channel from the target that is used to key the Action");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "act");
RNA_def_property_ui_text(prop, "Action", "The constraining action");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "start");
RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
RNA_def_property_ui_text(prop, "Start Frame", "First frame of the Action to use");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "frame_end", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_end", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "end");
RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
RNA_def_property_ui_text(prop, "End Frame", "Last frame of the Action to use");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max");
RNA_def_property_range(prop, -1000.f, 1000.f);
RNA_def_property_ui_text(prop, "Maximum", "Maximum value for target channel range");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_ActionConstraint_minmax_range");
- prop= RNA_def_property(srna, "min", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "min");
RNA_def_property_range(prop, -1000.f, 1000.f);
RNA_def_property_ui_text(prop, "Minimum", "Minimum value for target channel range");
@@ -1111,34 +1111,34 @@ static void rna_def_constraint_locked_track(BlenderRNA *brna)
{TRACK_Z, "LOCK_Z", 0, "Z", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "LockedTrackConstraint", "Constraint");
+ srna = RNA_def_struct(brna, "LockedTrackConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Locked Track Constraint", "Point toward the target along the track axis, while locking the other axis");
- prop= RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, "bConstraint", "headtail");
RNA_def_property_ui_text(prop, "Head/Tail", "Target along length of bone: Head=0, Tail=1");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
RNA_def_struct_sdna_from(srna, "bLockTrackConstraint", "data");
- prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Target Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "subtarget");
RNA_def_property_ui_text(prop, "Sub-Target", "");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "track_axis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "track_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "trackflag");
RNA_def_property_enum_items(prop, locktrack_items);
RNA_def_property_ui_text(prop, "Track Axis", "Axis that points to the target object");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "lock_axis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "lockflag");
RNA_def_property_enum_items(prop, lock_items);
RNA_def_property_ui_text(prop, "Locked Axis", "Axis that points upward");
@@ -1165,51 +1165,51 @@ static void rna_def_constraint_follow_path(BlenderRNA *brna)
{TRACK_Z, "UP_Z", 0, "Z", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "FollowPathConstraint", "Constraint");
+ srna = RNA_def_struct(brna, "FollowPathConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Follow Path Constraint", "Lock motion to the target path");
RNA_def_struct_sdna_from(srna, "bFollowPathConstraint", "data");
- prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Curve_object_poll");
RNA_def_property_ui_text(prop, "Target", "Target Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_TIME);
+ prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_TIME);
RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
RNA_def_property_ui_text(prop, "Offset", "Offset from the position corresponding to the time frame");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "offset_factor", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "offset_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "offset_fac");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Offset Factor", "Percentage value defining target position along length of bone");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "forward_axis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "forward_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "trackflag");
RNA_def_property_enum_items(prop, forwardpath_items);
RNA_def_property_ui_text(prop, "Forward Axis", "Axis that points forward along the path");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "up_axis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "up_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "upflag");
RNA_def_property_enum_items(prop, pathup_items);
RNA_def_property_ui_text(prop, "Up Axis", "Axis that points upward");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_curve_follow", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_curve_follow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "followflag", FOLLOWPATH_FOLLOW);
RNA_def_property_ui_text(prop, "Follow Curve", "Object will follow the heading and banking of the curve");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_fixed_location", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_fixed_location", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "followflag", FOLLOWPATH_STATIC);
RNA_def_property_ui_text(prop, "Fixed Position", "Object will stay locked to a single point somewhere along the length of the curve regardless of time");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_curve_radius", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_curve_radius", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "followflag", FOLLOWPATH_RADIUS);
RNA_def_property_ui_text(prop, "Curve Radius", "Object is scaled by the curve radius");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
@@ -1232,46 +1232,46 @@ static void rna_def_constraint_stretch_to(BlenderRNA *brna)
{PLANE_Z, "PLANE_Z", 0, "Z", "Keep Z Axis"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "StretchToConstraint", "Constraint");
+ srna = RNA_def_struct(brna, "StretchToConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Stretch To Constraint", "Stretch to meet the target object");
- prop= RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, "bConstraint", "headtail");
RNA_def_property_ui_text(prop, "Head/Tail", "Target along length of bone: Head=0, Tail=1");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
RNA_def_struct_sdna_from(srna, "bStretchToConstraint", "data");
- prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Target Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "subtarget");
RNA_def_property_ui_text(prop, "Sub-Target", "");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "volume", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "volume", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "volmode");
RNA_def_property_enum_items(prop, volume_items);
RNA_def_property_ui_text(prop, "Maintain Volume", "Maintain the object's volume as it stretches");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "keep_axis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "keep_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "plane");
RNA_def_property_enum_items(prop, plane_items);
RNA_def_property_ui_text(prop, "Keep Axis", "Axis to maintain during stretch");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "rest_length", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "rest_length", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "orglength");
RNA_def_property_range(prop, 0.0, 100.f);
RNA_def_property_ui_text(prop, "Original Length", "Length at rest position");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "bulge", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "bulge", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.f);
RNA_def_property_ui_text(prop, "Volume Variation", "Factor between volume variation and stretching");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
@@ -1289,69 +1289,69 @@ static void rna_def_constraint_rigid_body_joint(BlenderRNA *brna)
{CONSTRAINT_RB_GENERIC6DOF, "GENERIC_6_DOF", 0, "Generic 6 DoF", "No constraints by default, limits can be set individually"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "RigidBodyJointConstraint", "Constraint");
+ srna = RNA_def_struct(brna, "RigidBodyJointConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Rigid Body Joint Constraint", "For use with the Game Engine");
RNA_def_struct_sdna_from(srna, "bRigidBodyJointConstraint", "data");
- prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Target Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "child", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "child", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Child Object", "Child object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "pivot_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "pivot_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, pivot_items);
RNA_def_property_ui_text(prop, "Pivot Type", "");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "pivot_x", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "pivot_x", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "pivX");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Pivot X", "Offset pivot on X");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "pivot_y", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "pivot_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "pivY");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Pivot Y", "Offset pivot on Y");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "pivot_z", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "pivot_z", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "pivZ");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Pivot Z", "Offset pivot on Z");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "axis_x", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "axis_x", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "axX");
RNA_def_property_range(prop, -M_PI*2, M_PI*2);
RNA_def_property_ui_text(prop, "Axis X", "Rotate pivot on X axis in degrees");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "axis_y", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "axis_y", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "axY");
RNA_def_property_range(prop, -M_PI*2, M_PI*2);
RNA_def_property_ui_text(prop, "Axis Y", "Rotate pivot on Y axis in degrees");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "axis_z", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "axis_z", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "axZ");
RNA_def_property_range(prop, -M_PI*2, M_PI*2);
RNA_def_property_ui_text(prop, "Axis Z", "Rotate pivot on Z axis in degrees");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_linked_collision", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_linked_collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_DISABLE_LINKED_COLLISION);
RNA_def_property_ui_text(prop, "Disable Linked Collision", "Disable collision between linked bodies");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "show_pivot", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_pivot", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_DRAW_PIVOT);
RNA_def_property_ui_text(prop, "Draw Pivot", "Display the pivot point and rotation in 3D view");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
@@ -1359,88 +1359,88 @@ static void rna_def_constraint_rigid_body_joint(BlenderRNA *brna)
/* Limits */
/* Limit Min/Max */
- prop= RNA_def_property(srna, "limit_min_x", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "limit_min_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "minLimit[0]");
RNA_def_property_ui_text(prop, "Minimum Limit X", "");
- prop= RNA_def_property(srna, "limit_min_y", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "limit_min_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "minLimit[1]");
RNA_def_property_ui_text(prop, "Minimum Limit Y", "");
- prop= RNA_def_property(srna, "limit_min_z", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "limit_min_z", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "minLimit[2]");
RNA_def_property_ui_text(prop, "Minimum Limit Z", "");
- prop= RNA_def_property(srna, "limit_max_x", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "limit_max_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxLimit[0]");
RNA_def_property_ui_text(prop, "Maximum Limit X", "");
- prop= RNA_def_property(srna, "limit_max_y", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "limit_max_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxLimit[1]");
RNA_def_property_ui_text(prop, "Maximum Limit Y", "");
- prop= RNA_def_property(srna, "limit_max_z", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "limit_max_z", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxLimit[2]");
RNA_def_property_ui_text(prop, "Maximum Limit Z", "");
/* Limit Min/Max for angle */
- prop= RNA_def_property(srna, "limit_angle_min_x", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "limit_angle_min_x", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "minLimit[3]");
RNA_def_property_range(prop, -M_PI*2, M_PI*2);
RNA_def_property_ui_text(prop, "Minimum Angular Limit X", "");
- prop= RNA_def_property(srna, "limit_angle_min_y", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "limit_angle_min_y", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "minLimit[4]");
RNA_def_property_range(prop, -M_PI*2, M_PI*2);
RNA_def_property_ui_text(prop, "Minimum Angular Limit Y", "");
- prop= RNA_def_property(srna, "limit_angle_min_z", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "limit_angle_min_z", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "minLimit[5]");
RNA_def_property_range(prop, -M_PI*2, M_PI*2);
RNA_def_property_ui_text(prop, "Minimum Angular Limit Z", "");
- prop= RNA_def_property(srna, "limit_angle_max_x", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "limit_angle_max_x", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "maxLimit[3]");
RNA_def_property_range(prop, -M_PI*2, M_PI*2);
RNA_def_property_ui_text(prop, "Maximum Angular Limit X", "");
- prop= RNA_def_property(srna, "limit_angle_max_y", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "limit_angle_max_y", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "maxLimit[4]");
RNA_def_property_range(prop, -M_PI*2, M_PI*2);
RNA_def_property_ui_text(prop, "Maximum Angular Limit Y", "");
- prop= RNA_def_property(srna, "limit_angle_max_z", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "limit_angle_max_z", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "maxLimit[5]");
RNA_def_property_range(prop, -M_PI*2, M_PI*2);
RNA_def_property_ui_text(prop, "Maximum Angular Limit Z", "");
/* Limit Booleans */
- prop= RNA_def_property(srna, "use_limit_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_limit_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", 1);
RNA_def_property_ui_text(prop, "Limit X", "Use minimum/maximum X limit");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_limit_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_limit_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", 2);
RNA_def_property_ui_text(prop, "Limit Y", "Use minimum/maximum y limit");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_limit_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_limit_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", 4);
RNA_def_property_ui_text(prop, "Limit Z", "Use minimum/maximum z limit");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_angular_limit_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_angular_limit_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", 8);
RNA_def_property_ui_text(prop, "Angular X Limit", "Use minimum/maximum X angular limit");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_angular_limit_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_angular_limit_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", 16);
RNA_def_property_ui_text(prop, "Angular Y Limit", "Use minimum/maximum Y angular limit");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_angular_limit_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_angular_limit_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", 32);
RNA_def_property_ui_text(prop, "Angular Z Limit", "Use minimum/maximum Z angular limit");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
@@ -1458,24 +1458,24 @@ static void rna_def_constraint_clamp_to(BlenderRNA *brna)
{CLAMPTO_Z, "CLAMPTO_Z", 0, "Z", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "ClampToConstraint", "Constraint");
+ srna = RNA_def_struct(brna, "ClampToConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Clamp To Constraint", "Constrains an object's location to the nearest point along the target path");
RNA_def_struct_sdna_from(srna, "bClampToConstraint", "data");
- prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Curve_object_poll");
RNA_def_property_ui_text(prop, "Target", "Target Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "main_axis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "main_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, clamp_items);
RNA_def_property_ui_text(prop, "Main Axis", "Main axis of movement");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_cyclic", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_cyclic", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag2", CLAMPTO_CYCLIC);
RNA_def_property_ui_text(prop, "Cyclic", "Treat curve as cyclic curve (no clamping to curve bounding box)");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
@@ -1498,123 +1498,123 @@ static void rna_def_constraint_transform(BlenderRNA *brna)
{2, "Z", 0, "Z", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "TransformConstraint", "Constraint");
+ srna = RNA_def_struct(brna, "TransformConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Transformation Constraint", "Maps transformations of the target to the object");
RNA_def_struct_sdna_from(srna, "bTransformConstraint", "data");
- prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Target Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "subtarget");
RNA_def_property_ui_text(prop, "Sub-Target", "");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "map_from", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "map_from", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "from");
RNA_def_property_enum_items(prop, transform_items);
RNA_def_property_ui_text(prop, "Map From", "The transformation type to use from the target");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "map_to", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "map_to", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "to");
RNA_def_property_enum_items(prop, transform_items);
RNA_def_property_ui_text(prop, "Map To", "The transformation type to affect of the constrained object");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "map_to_x_from", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "map_to_x_from", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "map[0]");
RNA_def_property_enum_items(prop, axis_map_items);
RNA_def_property_ui_text(prop, "Map To X From", "The source axis constrained object's X axis uses");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "map_to_y_from", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "map_to_y_from", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "map[1]");
RNA_def_property_enum_items(prop, axis_map_items);
RNA_def_property_ui_text(prop, "Map To Y From", "The source axis constrained object's Y axis uses");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "map_to_z_from", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "map_to_z_from", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "map[2]");
RNA_def_property_enum_items(prop, axis_map_items);
RNA_def_property_ui_text(prop, "Map To Z From", "The source axis constrained object's Z axis uses");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_motion_extrapolate", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_motion_extrapolate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "expo", CLAMPTO_CYCLIC);
RNA_def_property_ui_text(prop, "Extrapolate Motion", "Extrapolate ranges");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "from_min_x", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "from_min_x", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "from_min[0]");
RNA_def_property_ui_range(prop, -1000.0f, 1000.0f, 10, 3);
RNA_def_property_ui_text(prop, "From Minimum X", "Bottom range of X axis source motion");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "from_min_y", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "from_min_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "from_min[1]");
RNA_def_property_ui_range(prop, -1000.0f, 1000.0f, 10, 3);
RNA_def_property_ui_text(prop, "From Minimum Y", "Bottom range of Y axis source motion");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "from_min_z", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "from_min_z", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "from_min[2]");
RNA_def_property_ui_range(prop, -1000.0f, 1000.0f, 10, 3);
RNA_def_property_ui_text(prop, "From Minimum Z", "Bottom range of Z axis source motion");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "from_max_x", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "from_max_x", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "from_max[0]");
RNA_def_property_ui_range(prop, -1000.0f, 1000.0f, 10, 3);
RNA_def_property_ui_text(prop, "From Maximum X", "Top range of X axis source motion");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "from_max_y", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "from_max_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "from_max[1]");
RNA_def_property_ui_range(prop, -1000.0f, 1000.0f, 10, 3);
RNA_def_property_ui_text(prop, "From Maximum Y", "Top range of Y axis source motion");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "from_max_z", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "from_max_z", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "from_max[2]");
RNA_def_property_ui_range(prop, -1000.0f, 1000.0f, 10, 3);
RNA_def_property_ui_text(prop, "From Maximum Z", "Top range of Z axis source motion");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "to_min_x", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "to_min_x", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "to_min[0]");
RNA_def_property_ui_range(prop, -1000.0f, 1000.0f, 10, 3);
RNA_def_property_ui_text(prop, "To Minimum X", "Bottom range of X axis destination motion");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "to_min_y", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "to_min_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "to_min[1]");
RNA_def_property_ui_range(prop, -1000.0f, 1000.0f, 10, 3);
RNA_def_property_ui_text(prop, "To Minimum Y", "Bottom range of Y axis destination motion");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "to_min_z", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "to_min_z", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "to_min[2]");
RNA_def_property_ui_range(prop, -1000.0f, 1000.0f, 10, 3);
RNA_def_property_ui_text(prop, "To Minimum Z", "Bottom range of Z axis destination motion");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "to_max_x", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "to_max_x", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "to_max[0]");
RNA_def_property_ui_range(prop, -1000.0f, 1000.0f, 10, 3);
RNA_def_property_ui_text(prop, "To Maximum X", "Top range of X axis destination motion");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "to_max_y", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "to_max_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "to_max[1]");
RNA_def_property_ui_range(prop, -1000.0f, 1000.0f, 10, 3);
RNA_def_property_ui_text(prop, "To Maximum Y", "Top range of Y axis destination motion");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "to_max_z", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "to_max_z", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "to_max[2]");
RNA_def_property_ui_range(prop, -1000.0f, 1000.0f, 10, 3);
RNA_def_property_ui_text(prop, "To Maximum Z", "Top range of Z axis destination motion");
@@ -1626,77 +1626,77 @@ static void rna_def_constraint_location_limit(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "LimitLocationConstraint", "Constraint");
+ srna = RNA_def_struct(brna, "LimitLocationConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Limit Location Constraint", "Limit the location of the constrained object");
RNA_def_struct_sdna_from(srna, "bLocLimitConstraint", "data");
- prop= RNA_def_property(srna, "use_min_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_min_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_XMIN);
RNA_def_property_ui_text(prop, "Minimum X", "Use the minimum X value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_min_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_min_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_YMIN);
RNA_def_property_ui_text(prop, "Minimum Y", "Use the minimum Y value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_min_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_min_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_ZMIN);
RNA_def_property_ui_text(prop, "Minimum Z", "Use the minimum Z value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_max_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_max_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_XMAX);
RNA_def_property_ui_text(prop, "Maximum X", "Use the maximum X value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_max_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_max_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_YMAX);
RNA_def_property_ui_text(prop, "Maximum Y", "Use the maximum Y value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_max_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_max_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_ZMAX);
RNA_def_property_ui_text(prop, "Maximum Z", "Use the maximum Z value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "min_x", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "min_x", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "xmin");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Minimum X", "Lowest X value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "min_y", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "min_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "ymin");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Minimum Y", "Lowest Y value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "min_z", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "min_z", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "zmin");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Minimum Z", "Lowest Z value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "max_x", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "max_x", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "xmax");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Maximum X", "Highest X value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "max_y", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "max_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "ymax");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Maximum Y", "Highest Y value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "max_z", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "max_z", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "zmax");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Maximum Z", "Highest Z value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_transform_limit", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_transform_limit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag2", LIMIT_TRANSFORM);
RNA_def_property_ui_text(prop, "For Transform", "Transforms are affected by this constraint as well");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
@@ -1707,62 +1707,62 @@ static void rna_def_constraint_rotation_limit(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "LimitRotationConstraint", "Constraint");
+ srna = RNA_def_struct(brna, "LimitRotationConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Limit Rotation Constraint", "Limit the rotation of the constrained object");
RNA_def_struct_sdna_from(srna, "bRotLimitConstraint", "data");
- prop= RNA_def_property(srna, "use_limit_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_limit_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_XROT);
RNA_def_property_ui_text(prop, "Limit X", "Use the minimum X value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_limit_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_limit_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_YROT);
RNA_def_property_ui_text(prop, "Limit Y", "Use the minimum Y value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_limit_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_limit_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_ZROT);
RNA_def_property_ui_text(prop, "Limit Z", "Use the minimum Z value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "min_x", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "min_x", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "xmin");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Minimum X", "Lowest X value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "min_y", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "min_y", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "ymin");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Minimum Y", "Lowest Y value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "min_z", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "min_z", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "zmin");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Minimum Z", "Lowest Z value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "max_x", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "max_x", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "xmax");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Maximum X", "Highest X value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "max_y", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "max_y", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "ymax");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Maximum Y", "Highest Y value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "max_z", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "max_z", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "zmax");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Maximum Z", "Highest Z value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_transform_limit", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_transform_limit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag2", LIMIT_TRANSFORM);
RNA_def_property_ui_text(prop, "For Transform", "Transforms are affected by this constraint as well");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
@@ -1773,77 +1773,77 @@ static void rna_def_constraint_size_limit(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "LimitScaleConstraint", "Constraint");
+ srna = RNA_def_struct(brna, "LimitScaleConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Limit Size Constraint", "Limit the scaling of the constrained object");
RNA_def_struct_sdna_from(srna, "bSizeLimitConstraint", "data");
- prop= RNA_def_property(srna, "use_min_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_min_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_XMIN);
RNA_def_property_ui_text(prop, "Minimum X", "Use the minimum X value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_min_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_min_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_YMIN);
RNA_def_property_ui_text(prop, "Minimum Y", "Use the minimum Y value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_min_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_min_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_ZMIN);
RNA_def_property_ui_text(prop, "Minimum Z", "Use the minimum Z value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_max_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_max_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_XMAX);
RNA_def_property_ui_text(prop, "Maximum X", "Use the maximum X value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_max_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_max_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_YMAX);
RNA_def_property_ui_text(prop, "Maximum Y", "Use the maximum Y value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_max_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_max_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_ZMAX);
RNA_def_property_ui_text(prop, "Maximum Z", "Use the maximum Z value");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "min_x", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "min_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xmin");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Minimum X", "Lowest X value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "min_y", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "min_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ymin");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Minimum Y", "Lowest Y value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "min_z", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "min_z", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "zmin");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Minimum Z", "Lowest Z value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "max_x", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "max_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xmax");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Maximum X", "Highest X value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "max_y", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "max_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ymax");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Maximum Y", "Highest Y value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "max_z", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "max_z", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "zmax");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Maximum Z", "Highest Z value to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_transform_limit", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_transform_limit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag2", LIMIT_TRANSFORM);
RNA_def_property_ui_text(prop, "For Transform", "Transforms are affected by this constraint as well");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
@@ -1854,40 +1854,40 @@ static void rna_def_constraint_distance_limit(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "LimitDistanceConstraint", "Constraint");
+ srna = RNA_def_struct(brna, "LimitDistanceConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Limit Distance Constraint", "Limit the distance from target object");
- prop= RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, "bConstraint", "headtail");
RNA_def_property_ui_text(prop, "Head/Tail", "Target along length of bone: Head=0, Tail=1");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
RNA_def_struct_sdna_from(srna, "bDistLimitConstraint", "data");
- prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Target Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "subtarget");
RNA_def_property_ui_text(prop, "Sub-Target", "");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "dist");
RNA_def_property_range(prop, 0.0, 100.f);
RNA_def_property_ui_text(prop, "Distance", "Radius of limiting sphere");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "limit_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "limit_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, constraint_distance_items);
RNA_def_property_ui_text(prop, "Limit Mode", "Distances in relation to sphere of influence to allow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_transform_limit", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_transform_limit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMITDIST_TRANSFORM);
RNA_def_property_ui_text(prop, "For Transform", "Transforms are affected by this constraint as well");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
@@ -1904,40 +1904,40 @@ static void rna_def_constraint_shrinkwrap(BlenderRNA *brna)
{MOD_SHRINKWRAP_NEAREST_VERTEX, "NEAREST_VERTEX", 0, "Nearest Vertex", "Shrink the location to the nearest target vertex"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "ShrinkwrapConstraint", "Constraint");
+ srna = RNA_def_struct(brna, "ShrinkwrapConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Shrinkwrap Constraint", "Create constraint-based shrinkwrap relationship");
RNA_def_struct_sdna_from(srna, "bShrinkwrapConstraint", "data");
- prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "target"); /* TODO, mesh type */
RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Mesh_object_poll");
RNA_def_property_ui_text(prop, "Target", "Target Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "shrinkwrap_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "shrinkwrap_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "shrinkType");
RNA_def_property_enum_items(prop, type_items);
RNA_def_property_ui_text(prop, "Shrinkwrap Type", "Select type of shrinkwrap algorithm for target position");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "dist");
RNA_def_property_range(prop, 0.0, 100.f);
RNA_def_property_ui_text(prop, "Distance", "Distance to Target");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "projAxis", MOD_SHRINKWRAP_PROJECT_OVER_X_AXIS);
RNA_def_property_ui_text(prop, "Axis X", "Projection over X Axis");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "projAxis", MOD_SHRINKWRAP_PROJECT_OVER_Y_AXIS);
RNA_def_property_ui_text(prop, "Axis Y", "Projection over Y Axis");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "projAxis", MOD_SHRINKWRAP_PROJECT_OVER_Z_AXIS);
RNA_def_property_ui_text(prop, "Axis Z", "Projection over Z Axis");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
@@ -1957,28 +1957,28 @@ static void rna_def_constraint_damped_track(BlenderRNA *brna)
{TRACK_nZ, "TRACK_NEGATIVE_Z", 0, "-Z", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "DampedTrackConstraint", "Constraint");
+ srna = RNA_def_struct(brna, "DampedTrackConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Damped Track Constraint", "Point toward target by taking the shortest rotation path");
- prop= RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, "bConstraint", "headtail");
RNA_def_property_ui_text(prop, "Head/Tail", "Target along length of bone: Head=0, Tail=1");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
RNA_def_struct_sdna_from(srna, "bDampTrackConstraint", "data");
- prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Target Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "subtarget");
RNA_def_property_ui_text(prop, "Sub-Target", "");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "track_axis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "track_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "trackflag");
RNA_def_property_enum_items(prop, damptrack_items);
RNA_def_property_ui_text(prop, "Track Axis", "Axis that points to the target object");
@@ -1996,27 +1996,27 @@ static void rna_def_constraint_spline_ik(BlenderRNA *brna)
{CONSTRAINT_SPLINEIK_XZS_VOLUMETRIC, "VOLUME_PRESERVE", 0, "Volume Preservation", "Scale of the X and Z axes is the inverse of the Y-Scale"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "SplineIKConstraint", "Constraint");
+ srna = RNA_def_struct(brna, "SplineIKConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Spline IK Constraint", "Align 'n' bones along a curve");
RNA_def_struct_sdna_from(srna, "bSplineIKConstraint", "data");
/* target chain */
- prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Curve that controls this relationship");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "chain_count", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "chain_count", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "chainlen");
- RNA_def_property_range(prop, 1, 255); // TODO: this should really check the max length of the chain the constraint is attached to
+ RNA_def_property_range(prop, 1, 255); /* TODO: this should really check the max length of the chain the constraint is attached to */
RNA_def_property_ui_text(prop, "Chain Length", "How many bones are included in the chain");
- RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update"); // XXX: this update goes wrong... needs extra flush?
+ RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update"); /* XXX: this update goes wrong... needs extra flush? */
/* direct access to bindings */
- // NOTE: only to be used by experienced users
- prop= RNA_def_property(srna, "joint_bindings", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_array(prop, 32); // XXX this is the maximum value allowed - why?
+ /* NOTE: only to be used by experienced users */
+ prop = RNA_def_property(srna, "joint_bindings", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_array(prop, 32); /* XXX this is the maximum value allowed - why? */
RNA_def_property_flag(prop, PROP_DYNAMIC);
RNA_def_property_dynamic_array_funcs(prop, "rna_SplineIKConstraint_joint_bindings_get_length");
RNA_def_property_float_funcs(prop, "rna_SplineIKConstraint_joint_bindings_get", "rna_SplineIKConstraint_joint_bindings_set", NULL);
@@ -2024,27 +2024,27 @@ static void rna_def_constraint_spline_ik(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
/* settings */
- prop= RNA_def_property(srna, "use_chain_offset", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_chain_offset", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_SPLINEIK_NO_ROOT);
RNA_def_property_ui_text(prop, "Chain Offset", "Offset the entire chain relative to the root joint");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_even_divisions", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_even_divisions", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_SPLINEIK_EVENSPLITS);
RNA_def_property_ui_text(prop, "Even Divisions", "Ignore the relative lengths of the bones when fitting to the curve");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_y_stretch", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_y_stretch", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CONSTRAINT_SPLINEIK_SCALE_LIMITED);
RNA_def_property_ui_text(prop, "Y Stretch", "Stretch the Y axis of the bones to fit the curve");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "use_curve_radius", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_curve_radius", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CONSTRAINT_SPLINEIK_NO_CURVERAD);
RNA_def_property_ui_text(prop, "Use Curve Radius", "Average radius of the endpoints is used to tweak the X and Z Scaling of the bones, on top of XZ Scale mode");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "xz_scale_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "xz_scale_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "xzScaleMode");
RNA_def_property_enum_items(prop, splineik_xz_scale_mode);
RNA_def_property_ui_text(prop, "XZ Scale Mode", "Method used for determining the scaling of the X and Z axes of the bones");
@@ -2066,10 +2066,10 @@ static void rna_def_constraint_pivot(BlenderRNA *brna)
{PIVOTCON_AXIS_Z, "Z", 0, "Z Rot", "Use the pivot point in the positive rotation range around the Z-axis"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "PivotConstraint", "Constraint");
+ srna = RNA_def_struct(brna, "PivotConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Pivot Constraint", "Rotate around a different point");
- prop= RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, "bConstraint", "headtail");
RNA_def_property_ui_text(prop, "Head/Tail", "Target along length of bone: Head=0, Tail=1");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
@@ -2077,30 +2077,30 @@ static void rna_def_constraint_pivot(BlenderRNA *brna)
RNA_def_struct_sdna_from(srna, "bPivotConstraint", "data");
/* target-defined pivot */
- prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tar");
RNA_def_property_ui_text(prop, "Target", "Target Object, defining the position of the pivot when defined");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "subtarget");
RNA_def_property_ui_text(prop, "Sub-Target", "");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
/* pivot offset */
- prop= RNA_def_property(srna, "use_relative_location", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_relative_location", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", PIVOTCON_FLAG_OFFSET_ABS);
RNA_def_property_ui_text(prop, "Use Relative Offset", "Offset will be an absolute point in space instead of relative to the target");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "offset");
RNA_def_property_ui_text(prop, "Offset", "Offset of pivot from target (when set), or from owner's location (when Fixed Position is off), or the absolute pivot point");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
/* rotation-based activation */
- prop= RNA_def_property(srna, "rotation_range", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "rotation_range", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "rotAxis");
RNA_def_property_enum_items(prop, pivot_rotAxis_items);
RNA_def_property_ui_text(prop, "Enabled Rotation Range", "Rotation range on which pivoting should occur");
@@ -2112,43 +2112,43 @@ static void rna_def_constraint_follow_track(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "FollowTrackConstraint", "Constraint");
+ srna = RNA_def_struct(brna, "FollowTrackConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Follow Track Constraint", "Lock motion to the target motion track");
RNA_def_struct_sdna_from(srna, "bFollowTrackConstraint", "data");
/* movie clip */
- prop= RNA_def_property(srna, "clip", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "clip", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "clip");
RNA_def_property_ui_text(prop, "Movie Clip", "Movie Clip to get tracking data from");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
/* track */
- prop= RNA_def_property(srna, "track", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "track", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "track");
RNA_def_property_ui_text(prop, "Track", "Movie tracking track to follow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
/* use default clip */
- prop= RNA_def_property(srna, "use_active_clip", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_active_clip", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FOLLOWTRACK_ACTIVECLIP);
RNA_def_property_ui_text(prop, "Active Clip", "Use active clip defined in scene");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
/* use 3d position */
- prop= RNA_def_property(srna, "use_3d_position", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_3d_position", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FOLLOWTRACK_USE_3D_POSITION);
RNA_def_property_ui_text(prop, "3D Position", "Use 3D position of track to parent to");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
/* object */
- prop= RNA_def_property(srna, "object", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "object", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "object");
RNA_def_property_ui_text(prop, "Object", "Movie tracking object to follow (if empty, camera object is used)");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
/* camera */
- prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "camera");
RNA_def_property_ui_text(prop, "Camera", "Camera to which motion is parented (if empty active scene camera is used)");
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -2156,7 +2156,7 @@ static void rna_def_constraint_follow_track(BlenderRNA *brna)
RNA_def_property_pointer_funcs(prop, NULL, "rna_Constraint_followTrack_camera_set", NULL, "rna_Constraint_cameraObject_poll");
/* depth object */
- prop= RNA_def_property(srna, "depth_object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "depth_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "depth_ob");
RNA_def_property_ui_text(prop, "Depth Object", "Object used to define depth in camera space by projecting onto surface of this object");
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -2169,19 +2169,19 @@ static void rna_def_constraint_camera_solver(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "CameraSolverConstraint", "Constraint");
+ srna = RNA_def_struct(brna, "CameraSolverConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Camera Solver Constraint", "Lock motion to the reconstructed camera movement");
RNA_def_struct_sdna_from(srna, "bCameraSolverConstraint", "data");
/* movie clip */
- prop= RNA_def_property(srna, "clip", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "clip", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "clip");
RNA_def_property_ui_text(prop, "Movie Clip", "Movie Clip to get tracking data from");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
/* use default clip */
- prop= RNA_def_property(srna, "use_active_clip", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_active_clip", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CAMERASOLVER_ACTIVECLIP);
RNA_def_property_ui_text(prop, "Active Clip", "Use active clip defined in scene");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
@@ -2192,31 +2192,31 @@ static void rna_def_constraint_object_solver(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ObjectSolverConstraint", "Constraint");
+ srna = RNA_def_struct(brna, "ObjectSolverConstraint", "Constraint");
RNA_def_struct_ui_text(srna, "Object Solver Constraint", "Lock motion to the reconstructed object movement");
RNA_def_struct_sdna_from(srna, "bObjectSolverConstraint", "data");
/* movie clip */
- prop= RNA_def_property(srna, "clip", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "clip", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "clip");
RNA_def_property_ui_text(prop, "Movie Clip", "Movie Clip to get tracking data from");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
/* use default clip */
- prop= RNA_def_property(srna, "use_active_clip", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_active_clip", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CAMERASOLVER_ACTIVECLIP);
RNA_def_property_ui_text(prop, "Active Clip", "Use active clip defined in scene");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
/* object */
- prop= RNA_def_property(srna, "object", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "object", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "object");
RNA_def_property_ui_text(prop, "Object", "Movie tracking object to follow");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
/* camera */
- prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "camera");
RNA_def_property_ui_text(prop, "Camera", "Camera to which motion is parented (if empty active scene camera is used)");
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -2231,77 +2231,77 @@ void RNA_def_constraint(BlenderRNA *brna)
PropertyRNA *prop;
/* data */
- srna= RNA_def_struct(brna, "Constraint", NULL );
+ srna = RNA_def_struct(brna, "Constraint", NULL );
RNA_def_struct_ui_text(srna, "Constraint", "Constraint modifying the transformation of objects and bones");
RNA_def_struct_refine_func(srna, "rna_ConstraintType_refine");
RNA_def_struct_path_func(srna, "rna_Constraint_path");
RNA_def_struct_sdna(srna, "bConstraint");
/* strings */
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Constraint_name_set");
RNA_def_property_ui_text(prop, "Name", "Constraint name");
RNA_def_struct_name_property(srna, prop);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT|NA_RENAME, NULL);
/* enums */
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, constraint_type_items);
RNA_def_property_ui_text(prop, "Type", "");
- prop= RNA_def_property(srna, "owner_space", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "owner_space", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ownspace");
RNA_def_property_enum_items(prop, owner_space_pchan_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Constraint_owner_space_itemf");
RNA_def_property_ui_text(prop, "Owner Space", "Space that owner is evaluated in");
- prop= RNA_def_property(srna, "target_space", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "target_space", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "tarspace");
RNA_def_property_enum_items(prop, target_space_pchan_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Constraint_target_space_itemf");
RNA_def_property_ui_text(prop, "Target Space", "Space that target is evaluated in");
/* flags */
- prop= RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_OFF);
RNA_def_property_ui_text(prop, "Disable", "Enable/Disable Constraint");
- prop= RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_EXPAND);
RNA_def_property_ui_text(prop, "Expanded", "Constraint's panel is expanded in UI");
RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
- // XXX this is really an internal flag, but it may be useful for some tools to be able to access this...
- prop= RNA_def_property(srna, "is_valid", PROP_BOOLEAN, PROP_NONE);
+ /* XXX this is really an internal flag, but it may be useful for some tools to be able to access this... */
+ prop = RNA_def_property(srna, "is_valid", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CONSTRAINT_DISABLE);
RNA_def_property_ui_text(prop, "Valid", "Constraint has valid settings and can be evaluated");
- // TODO: setting this to true must ensure that all others in stack are turned off too...
- prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
+ /* TODO: setting this to true must ensure that all others in stack are turned off too... */
+ prop = RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_ACTIVE);
RNA_def_property_ui_text(prop, "Active", "Constraint is the one being edited ");
- prop= RNA_def_property(srna, "is_proxy_local", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_proxy_local", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_PROXY_LOCAL);
RNA_def_property_ui_text(prop, "Proxy Local", "Constraint was added in this proxy instance (i.e. did not belong to source Armature)");
/* values */
- prop= RNA_def_property(srna, "influence", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "influence", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "enforce");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Influence", "Amount of influence constraint will have on the final solution");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_influence_update");
/* readonly values */
- prop= RNA_def_property(srna, "error_location", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "error_location", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "lin_error");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Lin error", "Amount of residual error in Blender space unit for constraints that work on position");
- prop= RNA_def_property(srna, "error_rotation", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "error_rotation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rot_error");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Rot error", "Amount of residual error in radiant for constraints that work on orientation");
diff --git a/source/blender/makesrna/intern/rna_context.c b/source/blender/makesrna/intern/rna_context.c
index 043645aaf57..bd149b1f1f3 100644
--- a/source/blender/makesrna/intern/rna_context.c
+++ b/source/blender/makesrna/intern/rna_context.c
@@ -41,25 +41,25 @@
static PointerRNA rna_Context_manager_get(PointerRNA *ptr)
{
- bContext *C= (bContext*)ptr->data;
+ bContext *C = (bContext*)ptr->data;
return rna_pointer_inherit_refine(ptr, &RNA_WindowManager, CTX_wm_manager(C));
}
static PointerRNA rna_Context_window_get(PointerRNA *ptr)
{
- bContext *C= (bContext*)ptr->data;
+ bContext *C = (bContext*)ptr->data;
return rna_pointer_inherit_refine(ptr, &RNA_Window, CTX_wm_window(C));
}
static PointerRNA rna_Context_screen_get(PointerRNA *ptr)
{
- bContext *C= (bContext*)ptr->data;
+ bContext *C = (bContext*)ptr->data;
return rna_pointer_inherit_refine(ptr, &RNA_Screen, CTX_wm_screen(C));
}
static PointerRNA rna_Context_area_get(PointerRNA *ptr)
{
- bContext *C= (bContext*)ptr->data;
+ bContext *C = (bContext*)ptr->data;
PointerRNA newptr;
RNA_pointer_create((ID*)CTX_wm_screen(C), &RNA_Area, CTX_wm_area(C), &newptr);
return newptr;
@@ -67,7 +67,7 @@ static PointerRNA rna_Context_area_get(PointerRNA *ptr)
static PointerRNA rna_Context_space_data_get(PointerRNA *ptr)
{
- bContext *C= (bContext*)ptr->data;
+ bContext *C = (bContext*)ptr->data;
PointerRNA newptr;
RNA_pointer_create((ID*)CTX_wm_screen(C), &RNA_Space, CTX_wm_space_data(C), &newptr);
return newptr;
@@ -75,7 +75,7 @@ static PointerRNA rna_Context_space_data_get(PointerRNA *ptr)
static PointerRNA rna_Context_region_get(PointerRNA *ptr)
{
- bContext *C= (bContext*)ptr->data;
+ bContext *C = (bContext*)ptr->data;
PointerRNA newptr;
RNA_pointer_create((ID*)CTX_wm_screen(C), &RNA_Region, CTX_wm_region(C), &newptr);
return newptr;
@@ -83,10 +83,10 @@ static PointerRNA rna_Context_region_get(PointerRNA *ptr)
static PointerRNA rna_Context_region_data_get(PointerRNA *ptr)
{
- bContext *C= (bContext*)ptr->data;
+ bContext *C = (bContext*)ptr->data;
/* only exists for one space still, no generic system yet */
- if(CTX_wm_view3d(C)) {
+ if (CTX_wm_view3d(C)) {
PointerRNA newptr;
RNA_pointer_create((ID*)CTX_wm_screen(C), &RNA_RegionView3D, CTX_wm_region_data(C), &newptr);
return newptr;
@@ -97,20 +97,20 @@ static PointerRNA rna_Context_region_data_get(PointerRNA *ptr)
static PointerRNA rna_Context_main_get(PointerRNA *ptr)
{
- bContext *C= (bContext*)ptr->data;
+ bContext *C = (bContext*)ptr->data;
return rna_pointer_inherit_refine(ptr, &RNA_BlendData, CTX_data_main(C));
}
static PointerRNA rna_Context_scene_get(PointerRNA *ptr)
{
- bContext *C= (bContext*)ptr->data;
+ bContext *C = (bContext*)ptr->data;
return rna_pointer_inherit_refine(ptr, &RNA_Scene, CTX_data_scene(C));
}
static PointerRNA rna_Context_tool_settings_get(PointerRNA *ptr)
{
- bContext *C= (bContext*)ptr->data;
- ptr->id.data= CTX_data_scene(C);
+ bContext *C = (bContext*)ptr->data;
+ ptr->id.data = CTX_data_scene(C);
return rna_pointer_inherit_refine(ptr, &RNA_ToolSettings, CTX_data_tool_settings(C));
}
@@ -123,7 +123,7 @@ static PointerRNA rna_Context_user_preferences_get(PointerRNA *UNUSED(ptr))
static int rna_Context_mode_get(PointerRNA *ptr)
{
- bContext *C= (bContext*)ptr->data;
+ bContext *C = (bContext*)ptr->data;
return CTX_data_mode_enum(C);
}
@@ -139,7 +139,7 @@ void RNA_def_context(BlenderRNA *brna)
{CTX_MODE_EDIT_CURVE, "EDIT_CURVE", 0, "Curve Edit", ""},
{CTX_MODE_EDIT_SURFACE, "EDIT_SURFACE", 0, "Surface Edit", ""},
{CTX_MODE_EDIT_TEXT, "EDIT_TEXT", 0, "Edit Edit", ""},
- {CTX_MODE_EDIT_ARMATURE, "EDIT_ARMATURE", 0, "Armature Edit", ""}, // PARSKEL reuse will give issues
+ {CTX_MODE_EDIT_ARMATURE, "EDIT_ARMATURE", 0, "Armature Edit", ""}, /* PARSKEL reuse will give issues */
{CTX_MODE_EDIT_METABALL, "EDIT_METABALL", 0, "Metaball Edit", ""},
{CTX_MODE_EDIT_LATTICE, "EDIT_LATTICE", 0, "Lattice Edit", ""},
{CTX_MODE_POSE, "POSE", 0, "Pose ", ""},
@@ -151,68 +151,68 @@ void RNA_def_context(BlenderRNA *brna)
{CTX_MODE_OBJECT, "OBJECT", 0, "Object", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "Context", NULL);
+ srna = RNA_def_struct(brna, "Context", NULL);
RNA_def_struct_ui_text(srna, "Context", "Current windowmanager and data context");
RNA_def_struct_sdna(srna, "bContext");
/* WM */
- prop= RNA_def_property(srna, "window_manager", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "window_manager", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "WindowManager");
RNA_def_property_pointer_funcs(prop, "rna_Context_manager_get", NULL, NULL, NULL);
- prop= RNA_def_property(srna, "window", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "window", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Window");
RNA_def_property_pointer_funcs(prop, "rna_Context_window_get", NULL, NULL, NULL);
- prop= RNA_def_property(srna, "screen", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "screen", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Screen");
RNA_def_property_pointer_funcs(prop, "rna_Context_screen_get", NULL, NULL, NULL);
- prop= RNA_def_property(srna, "area", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "area", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Area");
RNA_def_property_pointer_funcs(prop, "rna_Context_area_get", NULL, NULL, NULL);
- prop= RNA_def_property(srna, "space_data", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "space_data", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Space");
RNA_def_property_pointer_funcs(prop, "rna_Context_space_data_get", NULL, NULL, NULL);
- prop= RNA_def_property(srna, "region", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "region", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Region");
RNA_def_property_pointer_funcs(prop, "rna_Context_region_get", NULL, NULL, NULL);
- prop= RNA_def_property(srna, "region_data", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "region_data", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "RegionView3D");
RNA_def_property_pointer_funcs(prop, "rna_Context_region_data_get", NULL, NULL, NULL);
/* Data */
- prop= RNA_def_property(srna, "blend_data", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "blend_data", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "BlendData");
RNA_def_property_pointer_funcs(prop, "rna_Context_main_get", NULL, NULL, NULL);
- prop= RNA_def_property(srna, "scene", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "scene", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Scene");
RNA_def_property_pointer_funcs(prop, "rna_Context_scene_get", NULL, NULL, NULL);
- prop= RNA_def_property(srna, "tool_settings", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "tool_settings", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "ToolSettings");
RNA_def_property_pointer_funcs(prop, "rna_Context_tool_settings_get", NULL, NULL, NULL);
- prop= RNA_def_property(srna, "user_preferences", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "user_preferences", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "UserPreferences");
RNA_def_property_pointer_funcs(prop, "rna_Context_user_preferences_get", NULL, NULL, NULL);
- prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, mode_items);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_enum_funcs(prop, "rna_Context_mode_get", NULL, NULL);
diff --git a/source/blender/makesrna/intern/rna_controller.c b/source/blender/makesrna/intern/rna_controller.c
index 7dfb3597a29..f81610a4024 100644
--- a/source/blender/makesrna/intern/rna_controller.c
+++ b/source/blender/makesrna/intern/rna_controller.c
@@ -34,7 +34,7 @@
#include "DNA_object_types.h"
#include "DNA_controller_types.h"
-EnumPropertyItem controller_type_items[] ={
+EnumPropertyItem controller_type_items[] = {
{CONT_LOGIC_AND, "LOGIC_AND", 0, "And", "Logic And"},
{CONT_LOGIC_OR, "LOGIC_OR", 0, "Or", "Logic Or"},
{CONT_LOGIC_NAND, "LOGIC_NAND", 0, "Nand", "Logic Nand"},
@@ -52,9 +52,9 @@ EnumPropertyItem controller_type_items[] ={
static struct StructRNA* rna_Controller_refine(struct PointerRNA *ptr)
{
- bController *controller= (bController*)ptr->data;
+ bController *controller = (bController*)ptr->data;
- switch(controller->type) {
+ switch (controller->type) {
case CONT_LOGIC_AND:
return &RNA_AndController;
case CONT_LOGIC_OR:
@@ -78,19 +78,19 @@ static struct StructRNA* rna_Controller_refine(struct PointerRNA *ptr)
void rna_Constroller_name_set(PointerRNA *ptr, const char *value)
{
- bController *cont= (bController *)ptr->data;
+ bController *cont = (bController *)ptr->data;
BLI_strncpy_utf8(cont->name, value, sizeof(cont->name));
if (ptr->id.data) {
- Object *ob= (Object *)ptr->id.data;
+ Object *ob = (Object *)ptr->id.data;
BLI_uniquename(&ob->controllers, cont, "Controller", '.', offsetof(bController, name), sizeof(cont->name));
}
}
static void rna_Controller_type_set(struct PointerRNA *ptr, int value)
{
- bController *cont= (bController *)ptr->data;
+ bController *cont = (bController *)ptr->data;
if (value != cont->type)
{
cont->type = value;
@@ -100,13 +100,13 @@ static void rna_Controller_type_set(struct PointerRNA *ptr, int value)
static void rna_Controller_mode_set(struct PointerRNA *ptr, int value)
{
- bController *cont= (bController *)ptr->data;
- bPythonCont *pycon= (bPythonCont *)cont->data;
+ bController *cont = (bController *)ptr->data;
+ bPythonCont *pycon = (bPythonCont *)cont->data;
- // if mode changed and previous mode were Script
+ /* if mode changed and previous mode were Script */
if (value != pycon->mode && pycon->mode == CONT_PY_SCRIPT)
{
- // clear script to avoid it to get linked with the controller
+ /* clear script to avoid it to get linked with the controller */
pycon->text = NULL;
}
pycon->mode = value;
@@ -114,10 +114,10 @@ static void rna_Controller_mode_set(struct PointerRNA *ptr, int value)
static int rna_Controller_state_number_get(struct PointerRNA *ptr)
{
- bController *cont= (bController *)ptr->data;
+ bController *cont = (bController *)ptr->data;
int bit;
- for (bit=0; bit<32; bit++) {
+ for (bit = 0; bit<32; bit++) {
if (cont->state_mask & (1<<bit))
return bit+1;
}
@@ -126,7 +126,7 @@ static int rna_Controller_state_number_get(struct PointerRNA *ptr)
static void rna_Controller_state_number_set(struct PointerRNA *ptr, const int value)
{
- bController *cont= (bController *)ptr->data;
+ bController *cont = (bController *)ptr->data;
if (value < 1 || value > OB_MAX_STATES)
return;
@@ -148,33 +148,33 @@ static int rna_Controller_actuators_length(PointerRNA *ptr)
#if 0 /* editable is set to false, comment for now. */
static void rna_Controller_state_get(PointerRNA *ptr, int *values)
{
- bController *cont= (bController *)ptr->data;
+ bController *cont = (bController *)ptr->data;
int i;
memset(values, 0, sizeof(int)*OB_MAX_STATES);
- for(i=0; i<OB_MAX_STATES; i++)
+ for (i = 0; i<OB_MAX_STATES; i++)
values[i] = (cont->state_mask & (1<<i));
}
static void rna_Controller_state_set(PointerRNA *ptr, const int *values)
{
- bController *cont= (bController *)ptr->data;
- int i, tot= 0;
+ bController *cont = (bController *)ptr->data;
+ int i, tot = 0;
/* ensure we always have some state selected */
- for(i=0; i<OB_MAX_STATES; i++)
- if(values[i])
+ for (i = 0; i<OB_MAX_STATES; i++)
+ if (values[i])
tot++;
- if(tot==0)
+ if (tot == 0)
return;
/* only works for one state at once */
- if(tot>1)
+ if (tot>1)
return;
- for(i=0; i<OB_MAX_STATES; i++) {
- if(values[i]) cont->state_mask |= (1<<i);
+ for (i = 0; i<OB_MAX_STATES; i++) {
+ if (values[i]) cont->state_mask |= (1<<i);
else cont->state_mask &= ~(1<<i);
}
}
@@ -187,45 +187,45 @@ void RNA_def_controller(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem python_controller_modes[] ={
+ static EnumPropertyItem python_controller_modes[] = {
{CONT_PY_SCRIPT, "SCRIPT", 0, "Script", ""},
{CONT_PY_MODULE, "MODULE", 0, "Module", ""},
{0, NULL, 0, NULL, NULL}};
/* Controller */
- srna= RNA_def_struct(brna, "Controller", NULL);
+ srna = RNA_def_struct(brna, "Controller", NULL);
RNA_def_struct_sdna(srna, "bController");
RNA_def_struct_refine_func(srna, "rna_Controller_refine");
RNA_def_struct_ui_text(srna, "Controller", "Game engine logic brick to process events, connecting sensors to actuators");
RNA_api_controller(srna);
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Constroller_name_set");
RNA_def_struct_name_property(srna, prop);
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_funcs(prop, NULL, "rna_Controller_type_set", NULL);
RNA_def_property_enum_items(prop, controller_type_items);
RNA_def_property_ui_text(prop, "Type", "");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONT_SHOW);
RNA_def_property_ui_text(prop, "Expanded", "Set controller expanded in the user interface");
RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_priority", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_priority", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONT_PRIO);
RNA_def_property_ui_text(prop, "Priority", "Mark controller for execution before all non-marked controllers (good for startup scripts)");
RNA_def_property_ui_icon(prop, ICON_BOOKMARKS, 1);
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "actuators", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "actuators", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "links", NULL);
RNA_def_property_struct_type(prop, "Actuator");
RNA_def_property_ui_text(prop, "Actuators", "The list containing the actuators connected to the controller");
@@ -233,16 +233,16 @@ void RNA_def_controller(BlenderRNA *brna)
/* State */
- // array of OB_MAX_STATES
- //prop= RNA_def_property(srna, "states", PROP_BOOLEAN, PROP_LAYER_MEMBER);
- //RNA_def_property_array(prop, OB_MAX_STATES);
- //RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- //RNA_def_property_ui_text(prop, "", "Set Controller state index (1 to 30)");
- //RNA_def_property_boolean_funcs(prop, "rna_Controller_state_get", "rna_Controller_state_set");
- //RNA_def_property_update(prop, NC_LOGIC, NULL);
-
- // number of the state
- prop= RNA_def_property(srna, "states", PROP_INT, PROP_UNSIGNED);
+ /* array of OB_MAX_STATES */
+ /*prop= RNA_def_property(srna, "states", PROP_BOOLEAN, PROP_LAYER_MEMBER); */
+ /*RNA_def_property_array(prop, OB_MAX_STATES); */
+ /*RNA_def_property_clear_flag(prop, PROP_EDITABLE); */
+ /*RNA_def_property_ui_text(prop, "", "Set Controller state index (1 to 30)"); */
+ /*RNA_def_property_boolean_funcs(prop, "rna_Controller_state_get", "rna_Controller_state_set"); */
+ /*RNA_def_property_update(prop, NC_LOGIC, NULL); */
+
+ /* number of the state */
+ prop = RNA_def_property(srna, "states", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "state_mask");
RNA_def_property_range(prop, 1, OB_MAX_STATES);
RNA_def_property_ui_text(prop, "", "Set Controller state index (1 to 30)");
@@ -250,58 +250,58 @@ void RNA_def_controller(BlenderRNA *brna)
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* Expression Controller */
- srna= RNA_def_struct(brna, "ExpressionController", "Controller");
+ srna = RNA_def_struct(brna, "ExpressionController", "Controller");
RNA_def_struct_sdna_from(srna, "bExpressionCont", "data");
RNA_def_struct_ui_text(srna, "Expression Controller", "Controller passing on events based on the evaluation of an expression");
- prop= RNA_def_property(srna, "expression", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "expression", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "str");
RNA_def_property_ui_text(prop, "Expression", "");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* Python Controller */
- srna= RNA_def_struct(brna, "PythonController", "Controller" );
+ srna = RNA_def_struct(brna, "PythonController", "Controller" );
RNA_def_struct_sdna_from(srna, "bPythonCont", "data");
RNA_def_struct_ui_text(srna, "Python Controller", "Controller executing a python script");
- prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, python_controller_modes);
RNA_def_property_enum_funcs(prop, NULL, "rna_Controller_mode_set", NULL);
RNA_def_property_ui_text(prop, "Execution Method", "Python script type (textblock or module - faster)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "text", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "text", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Text");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Text", "Text datablock with the python script");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "module", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "module", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Module", "Module name and function to run, e.g. \"someModule.main\" (internal texts and external python files can be used)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_debug", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_debug", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONT_PY_DEBUG);
RNA_def_property_ui_text(prop, "D", "Continuously reload the module from disk for editing external modules without restarting");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* Other Controllers */
- srna= RNA_def_struct(brna, "AndController", "Controller");
+ srna = RNA_def_struct(brna, "AndController", "Controller");
RNA_def_struct_ui_text(srna, "And Controller", "Controller passing on events based on a logical AND operation");
- srna= RNA_def_struct(brna, "OrController", "Controller");
+ srna = RNA_def_struct(brna, "OrController", "Controller");
RNA_def_struct_ui_text(srna, "Or Controller", "Controller passing on events based on a logical OR operation");
- srna= RNA_def_struct(brna, "NorController", "Controller");
+ srna = RNA_def_struct(brna, "NorController", "Controller");
RNA_def_struct_ui_text(srna, "Nor Controller", "Controller passing on events based on a logical NOR operation");
- srna= RNA_def_struct(brna, "NandController", "Controller");
+ srna = RNA_def_struct(brna, "NandController", "Controller");
RNA_def_struct_ui_text(srna, "Nand Controller", "Controller passing on events based on a logical NAND operation");
- srna= RNA_def_struct(brna, "XorController", "Controller");
+ srna = RNA_def_struct(brna, "XorController", "Controller");
RNA_def_struct_ui_text(srna, "Xor Controller", "Controller passing on events based on a logical XOR operation");
- srna= RNA_def_struct(brna, "XnorController", "Controller");
+ srna = RNA_def_struct(brna, "XnorController", "Controller");
RNA_def_struct_ui_text(srna, "Xnor Controller", "Controller passing on events based on a logical XNOR operation");
}
diff --git a/source/blender/makesrna/intern/rna_controller_api.c b/source/blender/makesrna/intern/rna_controller_api.c
index 5f766e28005..3c517868baf 100644
--- a/source/blender/makesrna/intern/rna_controller_api.c
+++ b/source/blender/makesrna/intern/rna_controller_api.c
@@ -44,17 +44,17 @@
static void rna_Controller_link(bController *cont, bSensor *sens, bActuator *act)
{
- if(sens)
+ if (sens)
link_logicbricks((void **)&cont, (void ***)&(sens->links), &sens->totlinks, sizeof(bController *));
- if(act)
+ if (act)
link_logicbricks((void **)&act, (void ***)&(cont->links), &cont->totlinks, sizeof(bActuator *));
}
static void rna_Controller_unlink(bController *cont, bSensor *sens, bActuator *act)
{
- if(sens)
+ if (sens)
unlink_logicbricks((void **)&cont, (void ***)&(sens->links), &sens->totlinks);
- if(act)
+ if (act)
unlink_logicbricks((void **)&act, (void ***)&(cont->links), &cont->totlinks);
}
@@ -65,18 +65,18 @@ void RNA_api_controller(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
- func= RNA_def_function(srna, "link", "rna_Controller_link");
+ func = RNA_def_function(srna, "link", "rna_Controller_link");
RNA_def_function_ui_description(func, "Link the controller with a sensor/actuator");
- parm= RNA_def_pointer(func, "sensor", "Sensor", "", "Sensor to link the controller to");
+ parm = RNA_def_pointer(func, "sensor", "Sensor", "", "Sensor to link the controller to");
RNA_def_property_update(parm, NC_LOGIC, NULL);
- parm= RNA_def_pointer(func, "actuator", "Actuator", "", "Actuator to link the controller to");
+ parm = RNA_def_pointer(func, "actuator", "Actuator", "", "Actuator to link the controller to");
RNA_def_property_update(parm, NC_LOGIC, NULL);
- func= RNA_def_function(srna, "unlink", "rna_Controller_unlink");
+ func = RNA_def_function(srna, "unlink", "rna_Controller_unlink");
RNA_def_function_ui_description(func, "Unlink the controller from a sensor/actuator");
- parm= RNA_def_pointer(func, "sensor", "Sensor", "", "Sensor to unlink the controller from");
+ parm = RNA_def_pointer(func, "sensor", "Sensor", "", "Sensor to unlink the controller from");
RNA_def_property_update(parm, NC_LOGIC, NULL);
- parm= RNA_def_pointer(func, "actuator", "Actuator", "", "Actuator to unlink the controller from");
+ parm = RNA_def_pointer(func, "actuator", "Actuator", "", "Actuator to unlink the controller from");
RNA_def_property_update(parm, NC_LOGIC, NULL);
}
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index 91d3c3a0d3f..dbd0320bd2f 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -72,14 +72,14 @@ EnumPropertyItem curve_type_items[] = {
{CU_NURBS, "NURBS", 0, "Ease", ""},
{0, NULL, 0, NULL, NULL}};
-static const EnumPropertyItem curve3d_fill_mode_items[]= {
+static const EnumPropertyItem curve3d_fill_mode_items[] = {
{0, "FULL", 0, "Full", ""},
{CU_BACK, "BACK", 0, "Back", ""},
{CU_FRONT, "FRONT", 0, "Front", ""},
{CU_FRONT|CU_BACK, "HALF", 0, "Half", ""},
{0, NULL, 0, NULL, NULL}};
-static const EnumPropertyItem curve2d_fill_mode_items[]= {
+static const EnumPropertyItem curve2d_fill_mode_items[] = {
{0, "NONE", 0, "None", ""},
{CU_BACK, "BACK", 0, "Back", ""},
{CU_FRONT, "FRONT", 0, "Front", ""},
@@ -105,31 +105,31 @@ static const EnumPropertyItem curve2d_fill_mode_items[]= {
/* highly irritating but from RNA we cant know this */
static Nurb *curve_nurb_from_point(Curve *cu, const void *point, int *nu_index, int *pt_index)
{
- ListBase *nurbs= BKE_curve_nurbs(cu);
+ ListBase *nurbs = BKE_curve_nurbs(cu);
Nurb *nu;
- int i= 0;
+ int i = 0;
- for(nu= nurbs->first; nu; nu= nu->next, i++) {
- if(nu->type == CU_BEZIER) {
- if(point >= (void *)nu->bezt && point < (void *)(nu->bezt + nu->pntsu)) {
+ for (nu = nurbs->first; nu; nu = nu->next, i++) {
+ if (nu->type == CU_BEZIER) {
+ if (point >= (void *)nu->bezt && point < (void *)(nu->bezt + nu->pntsu)) {
break;
}
}
else {
- if(point >= (void *)nu->bp && point < (void *)(nu->bp + (nu->pntsu * nu->pntsv))) {
+ if (point >= (void *)nu->bp && point < (void *)(nu->bp + (nu->pntsu * nu->pntsv))) {
break;
}
}
}
- if(nu) {
- if(nu_index) {
- *nu_index= i;
+ if (nu) {
+ if (nu_index) {
+ *nu_index = i;
}
- if(pt_index) {
- if(nu->type == CU_BEZIER) *pt_index= (int)((BezTriple *)point - nu->bezt);
- else *pt_index= (int)((BPoint *)point - nu->bp);
+ if (pt_index) {
+ if (nu->type == CU_BEZIER) *pt_index = (int)((BezTriple *)point - nu->bezt);
+ else *pt_index = (int)((BPoint *)point - nu->bp);
}
}
@@ -138,71 +138,71 @@ static Nurb *curve_nurb_from_point(Curve *cu, const void *point, int *nu_index,
static StructRNA *rna_Curve_refine(PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->data;
- short obtype= curve_type(cu);
+ Curve *cu = (Curve*)ptr->data;
+ short obtype = curve_type(cu);
- if(obtype == OB_FONT) return &RNA_TextCurve;
- else if(obtype == OB_SURF) return &RNA_SurfaceCurve;
+ if (obtype == OB_FONT) return &RNA_TextCurve;
+ else if (obtype == OB_SURF) return &RNA_SurfaceCurve;
else return &RNA_Curve;
}
static void rna_BezTriple_handle1_get(PointerRNA *ptr, float *values)
{
- BezTriple *bt= (BezTriple*)ptr->data;
+ BezTriple *bt = (BezTriple*)ptr->data;
- values[0]= bt->vec[0][0];
- values[1]= bt->vec[0][1];
- values[2]= bt->vec[0][2];
+ values[0] = bt->vec[0][0];
+ values[1] = bt->vec[0][1];
+ values[2] = bt->vec[0][2];
}
static void rna_BezTriple_handle1_set(PointerRNA *ptr, const float *values)
{
- BezTriple *bt= (BezTriple*)ptr->data;
+ BezTriple *bt = (BezTriple*)ptr->data;
- bt->vec[0][0]= values[0];
- bt->vec[0][1]= values[1];
- bt->vec[0][2]= values[2];
+ bt->vec[0][0] = values[0];
+ bt->vec[0][1] = values[1];
+ bt->vec[0][2] = values[2];
}
static void rna_BezTriple_handle2_get(PointerRNA *ptr, float *values)
{
- BezTriple *bt= (BezTriple*)ptr->data;
+ BezTriple *bt = (BezTriple*)ptr->data;
- values[0]= bt->vec[2][0];
- values[1]= bt->vec[2][1];
- values[2]= bt->vec[2][2];
+ values[0] = bt->vec[2][0];
+ values[1] = bt->vec[2][1];
+ values[2] = bt->vec[2][2];
}
static void rna_BezTriple_handle2_set(PointerRNA *ptr, const float *values)
{
- BezTriple *bt= (BezTriple*)ptr->data;
+ BezTriple *bt = (BezTriple*)ptr->data;
- bt->vec[2][0]= values[0];
- bt->vec[2][1]= values[1];
- bt->vec[2][2]= values[2];
+ bt->vec[2][0] = values[0];
+ bt->vec[2][1] = values[1];
+ bt->vec[2][2] = values[2];
}
static void rna_BezTriple_ctrlpoint_get(PointerRNA *ptr, float *values)
{
- BezTriple *bt= (BezTriple*)ptr->data;
+ BezTriple *bt = (BezTriple*)ptr->data;
- values[0]= bt->vec[1][0];
- values[1]= bt->vec[1][1];
- values[2]= bt->vec[1][2];
+ values[0] = bt->vec[1][0];
+ values[1] = bt->vec[1][1];
+ values[2] = bt->vec[1][2];
}
static void rna_BezTriple_ctrlpoint_set(PointerRNA *ptr, const float *values)
{
- BezTriple *bt= (BezTriple*)ptr->data;
+ BezTriple *bt = (BezTriple*)ptr->data;
- bt->vec[1][0]= values[0];
- bt->vec[1][1]= values[1];
- bt->vec[1][2]= values[2];
+ bt->vec[1][0] = values[0];
+ bt->vec[1][1] = values[1];
+ bt->vec[1][2] = values[2];
}
static void rna_Curve_texspace_set(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->data;
+ Curve *cu = (Curve*)ptr->data;
if (cu->texflag & CU_AUTOSPACE)
tex_space_curve(cu);
@@ -210,13 +210,13 @@ static void rna_Curve_texspace_set(Main *UNUSED(bmain), Scene *UNUSED(scene), Po
static int rna_Curve_texspace_editable(PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->data;
+ Curve *cu = (Curve*)ptr->data;
return (cu->texflag & CU_AUTOSPACE)? 0: PROP_EDITABLE;
}
static void rna_Curve_texspace_loc_get(PointerRNA *ptr, float *values)
{
- Curve *cu= (Curve *)ptr->data;
+ Curve *cu = (Curve *)ptr->data;
if (!cu->bb)
tex_space_curve(cu);
@@ -226,14 +226,14 @@ static void rna_Curve_texspace_loc_get(PointerRNA *ptr, float *values)
static void rna_Curve_texspace_loc_set(PointerRNA *ptr, const float *values)
{
- Curve *cu= (Curve *)ptr->data;
+ Curve *cu = (Curve *)ptr->data;
copy_v3_v3(cu->loc, values);
}
static void rna_Curve_texspace_size_get(PointerRNA *ptr, float *values)
{
- Curve *cu= (Curve *)ptr->data;
+ Curve *cu = (Curve *)ptr->data;
if (!cu->bb)
tex_space_curve(cu);
@@ -243,32 +243,32 @@ static void rna_Curve_texspace_size_get(PointerRNA *ptr, float *values)
static void rna_Curve_texspace_size_set(PointerRNA *ptr, const float *values)
{
- Curve *cu= (Curve *)ptr->data;
+ Curve *cu = (Curve *)ptr->data;
copy_v3_v3(cu->size, values);
}
static void rna_Curve_material_index_range(PointerRNA *ptr, int *min, int *max)
{
- Curve *cu= (Curve*)ptr->id.data;
- *min= 0;
- *max= cu->totcol-1;
- *max= MAX2(0, *max);
+ Curve *cu = (Curve*)ptr->id.data;
+ *min = 0;
+ *max = cu->totcol-1;
+ *max = MAX2(0, *max);
}
static void rna_Curve_active_textbox_index_range(PointerRNA *ptr, int *min, int *max)
{
- Curve *cu= (Curve*)ptr->id.data;
- *min= 0;
- *max= cu->totbox-1;
- *max= MAX2(0, *max);
+ Curve *cu = (Curve*)ptr->id.data;
+ *min = 0;
+ *max = cu->totbox-1;
+ *max = MAX2(0, *max);
}
static void rna_Curve_dimension_set(PointerRNA *ptr, int value)
{
- Curve *cu= (Curve*)ptr->id.data;
- if(value==CU_3D) cu->flag |= CU_3D;
+ Curve *cu = (Curve*)ptr->id.data;
+ if (value == CU_3D) cu->flag |= CU_3D;
else cu->flag &= ~CU_3D;
update_curve_dimension(cu);
@@ -276,7 +276,7 @@ static void rna_Curve_dimension_set(PointerRNA *ptr, int value)
static EnumPropertyItem *rna_Curve_fill_mode_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *UNUSED(free))
{
- Curve *cu= (Curve*)ptr->id.data;
+ Curve *cu = (Curve*)ptr->id.data;
/* cast to quiet warning it IS a const still */
return (EnumPropertyItem *)((cu->flag & CU_3D) ? curve3d_fill_mode_items : curve2d_fill_mode_items);
@@ -284,20 +284,20 @@ static EnumPropertyItem *rna_Curve_fill_mode_itemf(bContext *UNUSED(C), PointerR
static int rna_Nurb_length(PointerRNA *ptr)
{
- Nurb *nu= (Nurb*)ptr->data;
- if(nu->type == CU_BEZIER) return 0;
+ Nurb *nu = (Nurb*)ptr->data;
+ if (nu->type == CU_BEZIER) return 0;
return nu->pntsv>0 ? nu->pntsu*nu->pntsv : nu->pntsu;
}
static void rna_Nurb_type_set(PointerRNA *ptr, int value)
{
- Nurb *nu= (Nurb*)ptr->data;
+ Nurb *nu = (Nurb*)ptr->data;
ED_nurb_set_spline_type(nu, value);
}
static void rna_BPoint_array_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Nurb *nu= (Nurb*)ptr->data;
+ Nurb *nu = (Nurb*)ptr->data;
rna_iterator_array_begin(iter, (void*)nu->bp, sizeof(BPoint), nu->pntsv>0 ? nu->pntsu*nu->pntsv : nu->pntsu, 0, NULL);
}
@@ -320,10 +320,10 @@ static void rna_Curve_update_deps(Main *bmain, Scene *scene, PointerRNA *ptr)
static void rna_Curve_update_points(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->id.data;
- Nurb *nu= curve_nurb_from_point(cu, ptr->data, NULL, NULL);
+ Curve *cu = (Curve*)ptr->id.data;
+ Nurb *nu = curve_nurb_from_point(cu, ptr->data, NULL, NULL);
- if(nu)
+ if (nu)
calchandlesNurb(nu);
rna_Curve_update_data(bmain, scene, ptr);
@@ -331,10 +331,10 @@ static void rna_Curve_update_points(Main *bmain, Scene *scene, PointerRNA *ptr)
static PointerRNA rna_Curve_bevelObject_get(PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->id.data;
- Object *ob= cu->bevobj;
+ Curve *cu = (Curve*)ptr->id.data;
+ Object *ob = cu->bevobj;
- if(ob)
+ if (ob)
return rna_pointer_inherit_refine(ptr, &RNA_Object, ob);
return rna_pointer_inherit_refine(ptr, NULL, NULL);
@@ -342,8 +342,8 @@ static PointerRNA rna_Curve_bevelObject_get(PointerRNA *ptr)
static void rna_Curve_bevelObject_set(PointerRNA *ptr, PointerRNA value)
{
- Curve *cu= (Curve*)ptr->id.data;
- Object *ob= (Object*)value.data;
+ Curve *cu = (Curve*)ptr->id.data;
+ Object *ob = (Object*)value.data;
if (ob) {
/* if bevel object has got the save curve, as object, for which it's */
@@ -358,8 +358,8 @@ static void rna_Curve_bevelObject_set(PointerRNA *ptr, PointerRNA value)
static int rna_Curve_otherObject_poll(PointerRNA *ptr, PointerRNA value)
{
- Curve *cu= (Curve*)ptr->id.data;
- Object *ob= (Object*)value.data;
+ Curve *cu = (Curve*)ptr->id.data;
+ Object *ob = (Object*)value.data;
if (ob) {
if (ob->type == OB_CURVE && ob->data != cu) {
@@ -372,10 +372,10 @@ static int rna_Curve_otherObject_poll(PointerRNA *ptr, PointerRNA value)
static PointerRNA rna_Curve_taperObject_get(PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->id.data;
- Object *ob= cu->taperobj;
+ Curve *cu = (Curve*)ptr->id.data;
+ Object *ob = cu->taperobj;
- if(ob)
+ if (ob)
return rna_pointer_inherit_refine(ptr, &RNA_Object, ob);
return rna_pointer_inherit_refine(ptr, NULL, NULL);
@@ -383,8 +383,8 @@ static PointerRNA rna_Curve_taperObject_get(PointerRNA *ptr)
static void rna_Curve_taperObject_set(PointerRNA *ptr, PointerRNA value)
{
- Curve *cu= (Curve*)ptr->id.data;
- Object *ob= (Object*)value.data;
+ Curve *cu = (Curve*)ptr->id.data;
+ Object *ob = (Object*)value.data;
if (ob) {
/* if taper object has got the save curve, as object, for which it's */
@@ -399,13 +399,13 @@ static void rna_Curve_taperObject_set(PointerRNA *ptr, PointerRNA value)
static void rna_Curve_resolution_u_update_data(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->id.data;
- ListBase *nurbs= BKE_curve_nurbs(cu);
- Nurb *nu= nurbs->first;
+ Curve *cu = (Curve*)ptr->id.data;
+ ListBase *nurbs = BKE_curve_nurbs(cu);
+ Nurb *nu = nurbs->first;
- while(nu) {
- nu->resolu= cu->resolu;
- nu= nu->next;
+ while (nu) {
+ nu->resolu = cu->resolu;
+ nu = nu->next;
}
rna_Curve_update_data(bmain, scene, ptr);
@@ -413,14 +413,14 @@ static void rna_Curve_resolution_u_update_data(Main *bmain, Scene *scene, Pointe
static void rna_Curve_resolution_v_update_data(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->id.data;
- ListBase *nurbs= BKE_curve_nurbs(cu);
- Nurb *nu=nurbs->first;
+ Curve *cu = (Curve*)ptr->id.data;
+ ListBase *nurbs = BKE_curve_nurbs(cu);
+ Nurb *nu = nurbs->first;
- while(nu) {
- nu->resolv= cu->resolv;
- nu= nu->next;
+ while (nu) {
+ nu->resolv = cu->resolv;
+ nu = nu->next;
}
rna_Curve_update_data(bmain, scene, ptr);
@@ -428,52 +428,52 @@ static void rna_Curve_resolution_v_update_data(Main *bmain, Scene *scene, Pointe
static float rna_Curve_offset_get(PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->id.data;
+ Curve *cu = (Curve*)ptr->id.data;
return cu->width - 1.0f;
}
static void rna_Curve_offset_set(PointerRNA *ptr, float value)
{
- Curve *cu= (Curve*)ptr->id.data;
- cu->width= 1.0f + value;
+ Curve *cu = (Curve*)ptr->id.data;
+ cu->width = 1.0f + value;
}
/* name functions that ignore the first two ID characters */
void rna_Curve_body_get(PointerRNA *ptr, char *value)
{
- Curve *cu= (Curve*)ptr->id.data;
+ Curve *cu = (Curve*)ptr->id.data;
BLI_strncpy(value, cu->str, cu->len+1);
}
int rna_Curve_body_length(PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->id.data;
+ Curve *cu = (Curve*)ptr->id.data;
return cu->len;
}
/* TODO - check UTF & python play nice */
void rna_Curve_body_set(PointerRNA *ptr, const char *value)
{
- int len= strlen(value);
- Curve *cu= (Curve*)ptr->id.data;
+ int len = strlen(value);
+ Curve *cu = (Curve*)ptr->id.data;
- cu->len= cu->pos = len;
+ cu->len = cu->pos = len;
- if(cu->str) MEM_freeN(cu->str);
- if(cu->strinfo) MEM_freeN(cu->strinfo);
+ if (cu->str) MEM_freeN(cu->str);
+ if (cu->strinfo) MEM_freeN(cu->strinfo);
cu->str = MEM_callocN(len + sizeof(wchar_t), "str");
cu->strinfo = MEM_callocN( (len+4) *sizeof(CharInfo), "strinfo"); /* don't know why this is +4, just duplicating load_editText() */
- //BLI_strncpy_wchar_as_utf8(cu->str, value, len+1); // value is not wchar_t
+ /*BLI_strncpy_wchar_as_utf8(cu->str, value, len+1); *//* value is not wchar_t */
BLI_strncpy(cu->str, value, len+1);
}
static void rna_Nurb_update_cyclic_u(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Nurb *nu= (Nurb*)ptr->data;
+ Nurb *nu = (Nurb*)ptr->data;
- if(nu->type == CU_BEZIER) {
+ if (nu->type == CU_BEZIER) {
calchandlesNurb(nu);
} else {
nurbs_knot_calc_u(nu);
@@ -484,7 +484,7 @@ static void rna_Nurb_update_cyclic_u(Main *bmain, Scene *scene, PointerRNA *ptr)
static void rna_Nurb_update_cyclic_v(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Nurb *nu= (Nurb*)ptr->data;
+ Nurb *nu = (Nurb*)ptr->data;
nurbs_knot_calc_v(nu);
@@ -493,7 +493,7 @@ static void rna_Nurb_update_cyclic_v(Main *bmain, Scene *scene, PointerRNA *ptr)
static void rna_Nurb_update_knot_u(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Nurb *nu= (Nurb*)ptr->data;
+ Nurb *nu = (Nurb*)ptr->data;
clamp_nurb_order_u(nu);
nurbs_knot_calc_u(nu);
@@ -503,7 +503,7 @@ static void rna_Nurb_update_knot_u(Main *bmain, Scene *scene, PointerRNA *ptr)
static void rna_Nurb_update_knot_v(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Nurb *nu= (Nurb*)ptr->data;
+ Nurb *nu = (Nurb*)ptr->data;
clamp_nurb_order_v(nu);
nurbs_knot_calc_v(nu);
@@ -513,11 +513,11 @@ static void rna_Nurb_update_knot_v(Main *bmain, Scene *scene, PointerRNA *ptr)
static void rna_Curve_spline_points_add(ID *id, Nurb *nu, ReportList *reports, int number)
{
- if(nu->type == CU_BEZIER) {
+ if (nu->type == CU_BEZIER) {
BKE_report(reports, RPT_ERROR, "Bezier spline can't have points added");
}
- else if(number==0) {
- // do nothing
+ else if (number == 0) {
+ /* do nothing */
} else {
addNurbPoints(nu, number);
@@ -531,11 +531,11 @@ static void rna_Curve_spline_points_add(ID *id, Nurb *nu, ReportList *reports, i
static void rna_Curve_spline_bezpoints_add(ID *id, Nurb *nu, ReportList *reports, int number)
{
- if(nu->type != CU_BEZIER) {
+ if (nu->type != CU_BEZIER) {
BKE_report(reports, RPT_ERROR, "Only Bezier splines can be added");
}
- else if(number==0) {
- // do nothing
+ else if (number == 0) {
+ /* do nothing */
} else {
addNurbPointsBezier(nu, number);
@@ -548,26 +548,26 @@ static void rna_Curve_spline_bezpoints_add(ID *id, Nurb *nu, ReportList *reports
static Nurb *rna_Curve_spline_new(Curve *cu, int type)
{
- Nurb *nu= ( Nurb * ) MEM_callocN( sizeof( Nurb ), "spline.new" );
+ Nurb *nu = ( Nurb * ) MEM_callocN( sizeof( Nurb ), "spline.new" );
- if(type==CU_BEZIER) {
- BezTriple *bezt= (BezTriple *)MEM_callocN(sizeof(BezTriple), "spline.new.bezt");
- bezt->radius= 1.0;
- nu->bezt= bezt;
+ if (type == CU_BEZIER) {
+ BezTriple *bezt = (BezTriple *)MEM_callocN(sizeof(BezTriple), "spline.new.bezt");
+ bezt->radius = 1.0;
+ nu->bezt = bezt;
}
else {
- BPoint *bp= (BPoint *)MEM_callocN(sizeof(BPoint), "spline.new.bp");
- bp->radius= 1.0f;
- nu->bp= bp;
+ BPoint *bp = (BPoint *)MEM_callocN(sizeof(BPoint), "spline.new.bp");
+ bp->radius = 1.0f;
+ nu->bp = bp;
}
- nu->type= type;
- nu->pntsu= 1;
- nu->pntsv= 1;
+ nu->type = type;
+ nu->pntsu = 1;
+ nu->pntsv = 1;
- nu->orderu= nu->orderv= 4;
- nu->resolu= nu->resolv= 12;
- nu->flag= CU_SMOOTH;
+ nu->orderu = nu->orderv = 4;
+ nu->resolu = nu->resolv = 12;
+ nu->flag = CU_SMOOTH;
BLI_addtail(BKE_curve_nurbs(cu), nu);
@@ -576,12 +576,12 @@ static Nurb *rna_Curve_spline_new(Curve *cu, int type)
static void rna_Curve_spline_remove(Curve *cu, ReportList *reports, Nurb *nu)
{
- int found= 0;
- ListBase *nurbs= BKE_curve_nurbs(cu);
+ int found = 0;
+ ListBase *nurbs = BKE_curve_nurbs(cu);
- found= BLI_remlink_safe(nurbs, nu);
+ found = BLI_remlink_safe(nurbs, nu);
- if(!found) {
+ if (!found) {
BKE_reportf(reports, RPT_ERROR, "Curve \"%s\" does not contain spline given", cu->id.name+2);
return;
}
@@ -595,7 +595,7 @@ static void rna_Curve_spline_remove(Curve *cu, ReportList *reports, Nurb *nu)
static void rna_Curve_spline_clear(Curve *cu)
{
- ListBase *nurbs= BKE_curve_nurbs(cu);
+ ListBase *nurbs = BKE_curve_nurbs(cu);
freeNurblist(nurbs);
@@ -605,14 +605,14 @@ static void rna_Curve_spline_clear(Curve *cu)
static PointerRNA rna_Curve_active_spline_get(PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->data;
+ Curve *cu = (Curve*)ptr->data;
Nurb *nu;
- ListBase *nurbs= BKE_curve_nurbs(cu);
+ ListBase *nurbs = BKE_curve_nurbs(cu);
- // for curve outside editmode will set to -1, should be changed to be allowed outside of editmode.
- nu= BLI_findlink(nurbs, cu->actnu);
+ /* for curve outside editmode will set to -1, should be changed to be allowed outside of editmode. */
+ nu = BLI_findlink(nurbs, cu->actnu);
- if(nu)
+ if (nu)
return rna_pointer_inherit_refine(ptr, &RNA_Spline, nu);
return rna_pointer_inherit_refine(ptr, NULL, NULL);
@@ -620,23 +620,23 @@ static PointerRNA rna_Curve_active_spline_get(PointerRNA *ptr)
static void rna_Curve_active_spline_set(PointerRNA *ptr, PointerRNA value)
{
- Curve *cu= (Curve*)ptr->data;
- Nurb *nu= value.data;
- ListBase *nubase= BKE_curve_nurbs(cu);
+ Curve *cu = (Curve*)ptr->data;
+ Nurb *nu = value.data;
+ ListBase *nubase = BKE_curve_nurbs(cu);
/* -1 is ok for an unset index */
- if(nu==NULL)
- cu->actnu= -1;
+ if (nu == NULL)
+ cu->actnu = -1;
else
- cu->actnu= BLI_findindex(nubase, nu);
+ cu->actnu = BLI_findindex(nubase, nu);
}
static char *rna_Curve_spline_path(PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->id.data;
- ListBase *nubase= BKE_curve_nurbs(cu);
- Nurb *nu= ptr->data;
- int index= BLI_findindex(nubase, nu);
+ Curve *cu = (Curve*)ptr->id.data;
+ ListBase *nubase = BKE_curve_nurbs(cu);
+ Nurb *nu = ptr->data;
+ int index = BLI_findindex(nubase, nu);
if (index >= 0)
return BLI_sprintfN("splines[%d]", index);
@@ -647,20 +647,20 @@ static char *rna_Curve_spline_path(PointerRNA *ptr)
/* use for both bezier and nurbs */
static char *rna_Curve_spline_point_path(PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->id.data;
+ Curve *cu = (Curve*)ptr->id.data;
Nurb *nu;
- void *point= ptr->data;
+ void *point = ptr->data;
int nu_index, pt_index;
- nu= curve_nurb_from_point(cu, point, &nu_index, &pt_index);
+ nu = curve_nurb_from_point(cu, point, &nu_index, &pt_index);
if (nu) {
- if(nu->type == CU_BEZIER) {
+ if (nu->type == CU_BEZIER) {
return BLI_sprintfN("splines[%d].bezier_points[%d]", nu_index, pt_index);
}
else {
return BLI_sprintfN("splines[%d].points[%d]", nu_index, pt_index);
- }
+ }
}
else {
return BLI_strdup("");
@@ -670,9 +670,9 @@ static char *rna_Curve_spline_point_path(PointerRNA *ptr)
static char *rna_TextBox_path(PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->id.data;
- TextBox *tb= ptr->data;
- int index= (int)(tb - cu->tb);
+ Curve *cu = (Curve*)ptr->id.data;
+ TextBox *tb = ptr->data;
+ int index = (int)(tb - cu->tb);
if (index >= 0 && index < cu->totbox)
return BLI_sprintfN("text_boxes[%d]", index);
@@ -682,7 +682,7 @@ static char *rna_TextBox_path(PointerRNA *ptr)
static void rna_Curve_splines_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Curve *cu= (Curve*)ptr->id.data;
+ Curve *cu = (Curve*)ptr->id.data;
rna_iterator_listbase_begin(iter, BKE_curve_nurbs(cu), NULL);
}
@@ -693,47 +693,47 @@ static void rna_def_bpoint(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "SplinePoint", NULL);
+ srna = RNA_def_struct(brna, "SplinePoint", NULL);
RNA_def_struct_sdna(srna, "BPoint");
RNA_def_struct_ui_text(srna, "SplinePoint", "Spline point without handles");
/* Boolean values */
- prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "f1", 0);
RNA_def_property_ui_text(prop, "Select", "Selection status");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "hide", 0);
RNA_def_property_ui_text(prop, "Hide", "Visibility status");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* Vector value */
- prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
RNA_def_property_float_sdna(prop, NULL, "vec");
RNA_def_property_ui_text(prop, "Point", "Point coordinates");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "weight", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "vec[3]");
RNA_def_property_ui_text(prop, "Weight", "NURBS weight");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* Number values */
- prop= RNA_def_property(srna, "tilt", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "tilt", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "alfa");
/*RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);*/
RNA_def_property_ui_text(prop, "Tilt", "Tilt in 3D View");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "weight_softbody", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "weight_softbody", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "weight");
RNA_def_property_range(prop, 0.01f, 100.0f);
RNA_def_property_ui_text(prop, "Weight", "Softbody goal weight");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "radius");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_text(prop, "Bevel Radius", "Radius for bevelling");
@@ -747,76 +747,76 @@ static void rna_def_beztriple(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "BezierSplinePoint", NULL);
+ srna = RNA_def_struct(brna, "BezierSplinePoint", NULL);
RNA_def_struct_sdna(srna, "BezTriple");
RNA_def_struct_ui_text(srna, "Bezier Curve Point", "Bezier curve point with two handles");
/* Boolean values */
- prop= RNA_def_property(srna, "select_left_handle", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select_left_handle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "f1", 0);
RNA_def_property_ui_text(prop, "Handle 1 selected", "Handle 1 selection status");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "select_right_handle", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select_right_handle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "f3", 0);
RNA_def_property_ui_text(prop, "Handle 2 selected", "Handle 2 selection status");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "select_control_point", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select_control_point", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "f2", 0);
RNA_def_property_ui_text(prop, "Control Point selected", "Control point selection status");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "hide", 0);
RNA_def_property_ui_text(prop, "Hide", "Visibility status");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* Enums */
- prop= RNA_def_property(srna, "handle_left_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "handle_left_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "h1");
RNA_def_property_enum_items(prop, beztriple_handle_type_items);
RNA_def_property_ui_text(prop, "Handle 1 Type", "Handle types");
RNA_def_property_update(prop, 0, "rna_Curve_update_points");
- prop= RNA_def_property(srna, "handle_right_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "handle_right_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "h2");
RNA_def_property_enum_items(prop, beztriple_handle_type_items);
RNA_def_property_ui_text(prop, "Handle 2 Type", "Handle types");
RNA_def_property_update(prop, 0, "rna_Curve_update_points");
/* Vector values */
- prop= RNA_def_property(srna, "handle_left", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "handle_left", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_BezTriple_handle1_get", "rna_BezTriple_handle1_set", NULL);
RNA_def_property_ui_text(prop, "Handle 1", "Coordinates of the first handle");
RNA_def_property_update(prop, 0, "rna_Curve_update_points");
- prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_BezTriple_ctrlpoint_get", "rna_BezTriple_ctrlpoint_set", NULL);
RNA_def_property_ui_text(prop, "Control Point", "Coordinates of the control point");
RNA_def_property_update(prop, 0, "rna_Curve_update_points");
- prop= RNA_def_property(srna, "handle_right", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "handle_right", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_BezTriple_handle2_get", "rna_BezTriple_handle2_set", NULL);
RNA_def_property_ui_text(prop, "Handle 2", "Coordinates of the second handle");
RNA_def_property_update(prop, 0, "rna_Curve_update_points");
/* Number values */
- prop= RNA_def_property(srna, "tilt", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "tilt", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "alfa");
/*RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);*/
RNA_def_property_ui_text(prop, "Tilt", "Tilt in 3D View");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "weight", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.01f, 100.0f);
RNA_def_property_ui_text(prop, "Weight", "Softbody goal weight");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "radius");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_text(prop, "Bevel Radius", "Radius for bevelling");
@@ -830,41 +830,41 @@ static void rna_def_path(BlenderRNA *brna, StructRNA *srna)
PropertyRNA *prop;
/* number values */
- prop= RNA_def_property(srna, "path_duration", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "path_duration", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "pathlen");
RNA_def_property_range(prop, 1, MAXFRAME);
RNA_def_property_ui_text(prop, "Path Length", "The number of frames that are needed to traverse the path, defining the maximum value for the 'Evaluation Time' setting");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* flags */
- prop= RNA_def_property(srna, "use_path", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_path", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_PATH);
RNA_def_property_ui_text(prop, "Path", "Enable the curve to become a translation path");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "use_path_follow", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_path_follow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_FOLLOW);
RNA_def_property_ui_text(prop, "Follow", "Make curve path children to rotate along the path");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "use_stretch", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_stretch", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_STRETCH);
RNA_def_property_ui_text(prop, "Stretch", "Option for curve-deform: "
"make deformed child to stretch along entire path");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "use_deform_bounds", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_deform_bounds", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CU_DEFORM_BOUNDS_OFF);
RNA_def_property_ui_text(prop, "Bounds Clamp", "Option for curve-deform: "
"Use the mesh bounds to clamp the deformation");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "use_time_offset", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_time_offset", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_OFFS_PATHDIST);
RNA_def_property_ui_text(prop, "Offset Path Distance", "Children will use TimeOffs value as path distance offset");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "use_radius", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_radius", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_PATH_RADIUS);
RNA_def_property_ui_text(prop, "Radius", "Option for paths and curve-deform: "
"apply the curve radius with path following it and deforming");
@@ -876,7 +876,7 @@ static void rna_def_nurbs(BlenderRNA *brna, StructRNA *srna)
PropertyRNA *prop;
/* flags */
- prop= RNA_def_property(srna, "use_uv_as_generated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_uv_as_generated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_UV_ORCO);
RNA_def_property_ui_text(prop, "Use UV for Mapping", "Uses the UV values as Generated textured coordinates");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
@@ -895,141 +895,141 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna)
{0, NULL, 0, NULL, NULL}};
/* Enums */
- prop= RNA_def_property(srna, "align", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "align", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "spacemode");
RNA_def_property_enum_items(prop, prop_align_items);
RNA_def_property_ui_text(prop, "Text Align", "Text align from the object center");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* number values */
- prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fsize");
RNA_def_property_range(prop, 0.0001f, 10000.0f);
RNA_def_property_ui_range(prop, 0.01, 10, 1, 3);
RNA_def_property_ui_text(prop, "Font size", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "small_caps_scale", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "small_caps_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "smallcaps_scale");
RNA_def_property_ui_range(prop, 0, 1.0, 1, 2);
RNA_def_property_ui_text(prop, "Small Caps", "Scale of small capitals");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "space_line", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "space_line", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "linedist");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Distance between lines of text", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "space_word", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "space_word", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "wordspace");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Spacing between words", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "space_character", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "space_character", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "spacing");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Global spacing between characters", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "shear", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "shear", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "shear");
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Shear", "Italic angle of the characters");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "offset_x", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "offset_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xof");
RNA_def_property_range(prop, -50.0f, 50.0f);
RNA_def_property_ui_text(prop, "X Offset", "Horizontal offset from the object origin");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "offset_y", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "offset_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yof");
RNA_def_property_range(prop, -50.0f, 50.0f);
RNA_def_property_ui_text(prop, "Y Offset", "Vertical offset from the object origin");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "underline_position", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "underline_position", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ulpos");
RNA_def_property_range(prop, -0.2f, 0.8f);
RNA_def_property_ui_text(prop, "Underline Position", "Vertical position of underline");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "underline_height", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "underline_height", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ulheight");
RNA_def_property_range(prop, -0.2f, 0.8f);
RNA_def_property_ui_text(prop, "Underline Thickness", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "text_boxes", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "text_boxes", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "tb", "totbox");
RNA_def_property_struct_type(prop, "TextBox");
RNA_def_property_ui_text(prop, "Textboxes", "");
- prop= RNA_def_property(srna, "active_textbox", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "active_textbox", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "actbox");
RNA_def_property_ui_text(prop, "The active text box", "");
RNA_def_property_int_funcs(prop, NULL, NULL, "rna_Curve_active_textbox_index_range");
/* strings */
- prop= RNA_def_property(srna, "family", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "family", PROP_STRING, PROP_NONE);
RNA_def_property_string_maxlength(prop, MAX_ID_NAME-2);
RNA_def_property_ui_text(prop, "Object Font", "Use Blender Objects as font characters (give font objects a common name followed by the character they represent, eg. familya, familyb, etc, and turn on Verts Duplication)");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "body", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "body", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "str");
RNA_def_property_ui_text(prop, "Body Text", "Content of this text object");
RNA_def_property_string_funcs(prop, "rna_Curve_body_get", "rna_Curve_body_length", "rna_Curve_body_set");
RNA_def_property_string_maxlength(prop, 8192); /* note that originally str did not have a limit! */
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "body_format", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "body_format", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "strinfo", "len");
RNA_def_property_struct_type(prop, "TextCharacterFormat");
RNA_def_property_ui_text(prop, "Character Info", "Stores the style of each character");
/* pointers */
- prop= RNA_def_property(srna, "follow_curve", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "follow_curve", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "textoncurve");
RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Curve_otherObject_poll");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Text on Curve", "Curve deforming text object");
RNA_def_property_update(prop, 0, "rna_Curve_update_deps");
- prop= RNA_def_property(srna, "font", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "font", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "vfont");
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", PROP_POINTER, PROP_NONE);
+ 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 Bold", "");
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);
+ 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 Italic", "");
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);
+ 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 Bold Italic", "");
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);
+ 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);
+ prop = RNA_def_property(srna, "use_fast_edit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_FAST);
RNA_def_property_ui_text(prop, "Fast Editing", "Don't fill polygons while editing");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
@@ -1040,29 +1040,29 @@ static void rna_def_textbox(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "TextBox", NULL);
+ srna = RNA_def_struct(brna, "TextBox", NULL);
RNA_def_struct_ui_text(srna, "Text Box", "Text bounding box for layout");
/* number values */
- prop= RNA_def_property(srna, "x", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "x");
RNA_def_property_range(prop, -50.0f, 50.0f);
RNA_def_property_ui_text(prop, "Textbox X Offset", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "y", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "y");
RNA_def_property_range(prop, -50.0f, 50.0f);
RNA_def_property_ui_text(prop, "Textbox Y Offset", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "width", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "width", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "w");
RNA_def_property_range(prop, 0.0f, 50.0f);
RNA_def_property_ui_text(prop, "Textbox Width", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "height", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "h");
RNA_def_property_range(prop, 0.0f, 50.0f);
RNA_def_property_ui_text(prop, "Textbox Height", "");
@@ -1076,22 +1076,22 @@ static void rna_def_charinfo(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "TextCharacterFormat", NULL);
+ srna = RNA_def_struct(brna, "TextCharacterFormat", NULL);
RNA_def_struct_sdna(srna, "CharInfo");
RNA_def_struct_ui_text(srna, "Text Character Format", "Text character formatting settings");
/* flags */
- prop= RNA_def_property(srna, "use_bold", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_bold", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_CHINFO_BOLD);
RNA_def_property_ui_text(prop, "Bold", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "use_italic", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_italic", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_CHINFO_ITALIC);
RNA_def_property_ui_text(prop, "Italic", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "use_underline", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_underline", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_CHINFO_UNDERLINE);
RNA_def_property_ui_text(prop, "Underline", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
@@ -1102,7 +1102,7 @@ static void rna_def_charinfo(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Wrap", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data"); */
- prop= RNA_def_property(srna, "use_small_caps", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_small_caps", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_CHINFO_SMALLCAPS);
RNA_def_property_ui_text(prop, "Small Caps", "");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
@@ -1112,7 +1112,7 @@ static void rna_def_surface(BlenderRNA *brna)
{
StructRNA *srna;
- srna= RNA_def_struct(brna, "SurfaceCurve", "Curve");
+ srna = RNA_def_struct(brna, "SurfaceCurve", "Curve");
RNA_def_struct_sdna(srna, "Curve");
RNA_def_struct_ui_text(srna, "Surface Curve", "Curve datablock used for storing surfaces");
RNA_def_struct_ui_icon(srna, ICON_SURFACE_DATA);
@@ -1124,7 +1124,7 @@ static void rna_def_text(BlenderRNA *brna)
{
StructRNA *srna;
- srna= RNA_def_struct(brna, "TextCurve", "Curve");
+ srna = RNA_def_struct(brna, "TextCurve", "Curve");
RNA_def_struct_sdna(srna, "Curve");
RNA_def_struct_ui_text(srna, "Text Curve", "Curve datablock used for storing text");
RNA_def_struct_ui_icon(srna, ICON_FONT_DATA);
@@ -1138,17 +1138,17 @@ static void rna_def_text(BlenderRNA *brna)
static void rna_def_curve_spline_points(BlenderRNA *brna, PropertyRNA *cprop)
{
StructRNA *srna;
- //PropertyRNA *prop;
+ /*PropertyRNA *prop; */
FunctionRNA *func;
- //PropertyRNA *parm;
+ /*PropertyRNA *parm; */
RNA_def_property_srna(cprop, "SplinePoints");
- srna= RNA_def_struct(brna, "SplinePoints", NULL);
+ srna = RNA_def_struct(brna, "SplinePoints", NULL);
RNA_def_struct_sdna(srna, "Nurb");
RNA_def_struct_ui_text(srna, "Spline Points", "Collection of spline points");
- func= RNA_def_function(srna, "add", "rna_Curve_spline_points_add");
+ func = RNA_def_function(srna, "add", "rna_Curve_spline_points_add");
RNA_def_function_ui_description(func, "Add a number of points to this spline");
RNA_def_function_flag(func, FUNC_USE_SELF_ID|FUNC_USE_REPORTS);
RNA_def_int(func, "count", 1, 1, INT_MAX, "Number", "Number of points to add to the spline", 1, INT_MAX);
@@ -1165,17 +1165,17 @@ static void rna_def_curve_spline_points(BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_curve_spline_bezpoints(BlenderRNA *brna, PropertyRNA *cprop)
{
StructRNA *srna;
- //PropertyRNA *prop;
+ /*PropertyRNA *prop; */
FunctionRNA *func;
- //PropertyRNA *parm;
+ /*PropertyRNA *parm; */
RNA_def_property_srna(cprop, "SplineBezierPoints");
- srna= RNA_def_struct(brna, "SplineBezierPoints", NULL);
+ srna = RNA_def_struct(brna, "SplineBezierPoints", NULL);
RNA_def_struct_sdna(srna, "Nurb");
RNA_def_struct_ui_text(srna, "Spline Bezier Points", "Collection of spline bezirt points");
- func= RNA_def_function(srna, "add", "rna_Curve_spline_bezpoints_add");
+ func = RNA_def_function(srna, "add", "rna_Curve_spline_bezpoints_add");
RNA_def_function_ui_description(func, "Add a number of points to this spline");
RNA_def_function_flag(func, FUNC_USE_SELF_ID|FUNC_USE_REPORTS);
RNA_def_int(func, "count", 1, INT_MIN, INT_MAX, "Number", "Number of points to add to the spline", 0, INT_MAX);
@@ -1199,27 +1199,27 @@ static void rna_def_curve_splines(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *parm;
RNA_def_property_srna(cprop, "CurveSplines");
- srna= RNA_def_struct(brna, "CurveSplines", NULL);
+ srna = RNA_def_struct(brna, "CurveSplines", NULL);
RNA_def_struct_sdna(srna, "Curve");
RNA_def_struct_ui_text(srna, "Curve Splines", "Collection of curve splines");
- func= RNA_def_function(srna, "new", "rna_Curve_spline_new");
+ func = RNA_def_function(srna, "new", "rna_Curve_spline_new");
RNA_def_function_ui_description(func, "Add a new spline to the curve");
- parm= RNA_def_enum(func, "type", curve_type_items, CU_POLY, "", "type for the new spline");
+ parm = RNA_def_enum(func, "type", curve_type_items, CU_POLY, "", "type for the new spline");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "spline", "Spline", "", "The newly created spline");
+ parm = RNA_def_pointer(func, "spline", "Spline", "", "The newly created spline");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_Curve_spline_remove");
+ func = RNA_def_function(srna, "remove", "rna_Curve_spline_remove");
RNA_def_function_ui_description(func, "Remove a spline from a curve");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "spline", "Spline", "", "The spline to remove");
+ parm = RNA_def_pointer(func, "spline", "Spline", "", "The spline to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- func= RNA_def_function(srna, "clear", "rna_Curve_spline_clear");
+ func = RNA_def_function(srna, "clear", "rna_Curve_spline_clear");
RNA_def_function_ui_description(func, "Remove all spline from a curve");
- prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_pointer_funcs(prop, "rna_Curve_active_spline_get", "rna_Curve_active_spline_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -1241,24 +1241,24 @@ static void rna_def_curve(BlenderRNA *brna)
{CU_TWIST_TANGENT, "TANGENT", 0, "Tangent", "Use the tangent to calculate twist"},
{0, NULL, 0, NULL, NULL}};
- static const EnumPropertyItem curve_axis_items[]= {
+ static const EnumPropertyItem curve_axis_items[] = {
{0, "2D", 0, "2D", "Clamp the Z axis of the curve"},
{CU_3D, "3D", 0, "3D", "Allow editing on the Z axis of this curve, also allows tilt and curve radius to be used"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "Curve", "ID");
+ srna = RNA_def_struct(brna, "Curve", "ID");
RNA_def_struct_ui_text(srna, "Curve", "Curve datablock storing curves, splines and NURBS");
RNA_def_struct_ui_icon(srna, ICON_CURVE_DATA);
RNA_def_struct_refine_func(srna, "rna_Curve_refine");
rna_def_animdata_common(srna);
- prop= RNA_def_property(srna, "shape_keys", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "shape_keys", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "key");
RNA_def_property_ui_text(prop, "Shape Keys", "");
- prop= RNA_def_property(srna, "splines", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "splines", PROP_COLLECTION, PROP_NONE);
#if 0
RNA_def_property_collection_sdna(prop, NULL, "nurb", NULL);
#else
@@ -1269,12 +1269,12 @@ static void rna_def_curve(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Splines", "Collection of splines in this curve data object");
rna_def_curve_splines(brna, prop);
- prop= RNA_def_property(srna, "show_handles", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_handles", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "drawflag", CU_HIDE_HANDLES);
RNA_def_property_ui_text(prop, "Draw Handles", "Display Bezier handles in editmode");
RNA_def_property_update(prop, NC_GEOM|ND_DATA, NULL);
- prop= RNA_def_property(srna, "show_normal_face", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_normal_face", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "drawflag", CU_HIDE_NORMALS);
RNA_def_property_ui_text(prop, "Draw Normals", "Display 3D curve normals in editmode");
RNA_def_property_update(prop, NC_GEOM|ND_DATA, NULL);
@@ -1282,67 +1282,67 @@ static void rna_def_curve(BlenderRNA *brna)
rna_def_path(brna, srna);
/* Number values */
- prop= RNA_def_property(srna, "bevel_resolution", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "bevel_resolution", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "bevresol");
RNA_def_property_range(prop, 0, 32);
RNA_def_property_ui_range(prop, 0, 32, 1.0, 0);
RNA_def_property_ui_text(prop, "Bevel Resolution", "Bevel resolution when depth is non-zero and no specific bevel object has been defined");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE|PROP_UNIT_LENGTH);
+ prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE|PROP_UNIT_LENGTH);
RNA_def_property_float_sdna(prop, NULL, "width");
RNA_def_property_ui_range(prop, -1.0, 1.0, 0.1, 3);
RNA_def_property_float_funcs(prop, "rna_Curve_offset_get", "rna_Curve_offset_set", NULL);
RNA_def_property_ui_text(prop, "Offset", "Offset the curve to adjust the width of a text");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "extrude", PROP_FLOAT, PROP_NONE|PROP_UNIT_LENGTH);
+ prop = RNA_def_property(srna, "extrude", PROP_FLOAT, PROP_NONE|PROP_UNIT_LENGTH);
RNA_def_property_float_sdna(prop, NULL, "ext1");
RNA_def_property_ui_range(prop, 0, 100.0, 0.1, 3);
RNA_def_property_range(prop, 0.0, FLT_MAX);
RNA_def_property_ui_text(prop, "Extrude", "Amount of curve extrusion when not using a bevel object");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "bevel_depth", PROP_FLOAT, PROP_NONE|PROP_UNIT_LENGTH);
+ prop = RNA_def_property(srna, "bevel_depth", PROP_FLOAT, PROP_NONE|PROP_UNIT_LENGTH);
RNA_def_property_float_sdna(prop, NULL, "ext2");
RNA_def_property_ui_range(prop, 0, 100.0, 0.1, 3);
RNA_def_property_ui_text(prop, "Bevel Depth", "Bevel depth when not using a bevel object");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "resolution_u", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "resolution_u", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolu");
RNA_def_property_range(prop, 1, SHRT_MAX);
RNA_def_property_ui_range(prop, 1, 64, 1, 0);
RNA_def_property_ui_text(prop, "Resolution U", "Surface resolution in U direction");
RNA_def_property_update(prop, 0, "rna_Curve_resolution_u_update_data");
- prop= RNA_def_property(srna, "resolution_v", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "resolution_v", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolv");
RNA_def_property_ui_range(prop, 1, 64, 1, 0);
RNA_def_property_range(prop, 1, SHRT_MAX);
RNA_def_property_ui_text(prop, "Resolution V", "Surface resolution in V direction");
RNA_def_property_update(prop, 0, "rna_Curve_resolution_v_update_data");
- prop= RNA_def_property(srna, "render_resolution_u", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "render_resolution_u", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolu_ren");
RNA_def_property_range(prop, 0, SHRT_MAX);
RNA_def_property_ui_range(prop, 0, 64, 1, 0);
RNA_def_property_ui_text(prop, "Render Resolution U", "Surface resolution in U direction used while rendering (zero skips this property)");
- prop= RNA_def_property(srna, "render_resolution_v", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "render_resolution_v", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolv_ren");
RNA_def_property_ui_range(prop, 0, 64, 1, 0);
RNA_def_property_range(prop, 0, SHRT_MAX);
RNA_def_property_ui_text(prop, "Render Resolution V", "Surface resolution in V direction used while rendering (zero skips this property)");
- prop= RNA_def_property(srna, "eval_time", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "eval_time", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ctime");
RNA_def_property_ui_text(prop, "Evaluation Time", "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)");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* pointers */
- prop= RNA_def_property(srna, "bevel_object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "bevel_object", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_pointer_sdna(prop, NULL, "bevobj");
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -1350,7 +1350,7 @@ static void rna_def_curve(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Curve_update_deps");
RNA_def_property_pointer_funcs(prop, "rna_Curve_bevelObject_get", "rna_Curve_bevelObject_set", NULL, "rna_Curve_otherObject_poll");
- prop= RNA_def_property(srna, "taper_object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "taper_object", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_pointer_sdna(prop, NULL, "taperobj");
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -1360,57 +1360,57 @@ static void rna_def_curve(BlenderRNA *brna)
/* Flags */
- prop= RNA_def_property(srna, "dimensions", PROP_ENUM, PROP_NONE); /* as an enum */
+ prop = RNA_def_property(srna, "dimensions", PROP_ENUM, PROP_NONE); /* as an enum */
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, curve_axis_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_Curve_dimension_set", NULL);
RNA_def_property_ui_text(prop, "Dimensions", "Select 2D or 3D curve type");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "fill_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "fill_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, curve3d_fill_mode_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Curve_fill_mode_itemf");
RNA_def_property_ui_text(prop, "Fill Mode", "Mode of filling curve");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "twist_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "twist_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "twist_mode");
RNA_def_property_enum_items(prop, curve_twist_mode_items);
RNA_def_property_ui_text(prop, "Twist Method", "The type of tilt calculation for 3D Curves");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- // XXX - would be nice to have a better way to do this, only add for testing.
- prop= RNA_def_property(srna, "twist_smooth", PROP_FLOAT, PROP_NONE);
+ /* XXX - would be nice to have a better way to do this, only add for testing. */
+ prop = RNA_def_property(srna, "twist_smooth", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "twist_smooth");
RNA_def_property_ui_range(prop, 0, 100.0, 1, 2);
RNA_def_property_ui_text(prop, "Twist Smooth", "Smoothing iteration for tangents");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "use_fill_deform", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_fill_deform", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_DEFORM_FILL);
RNA_def_property_ui_text(prop, "Fill Deformed", "Fill curve after applying shape keys and all modifiers");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "use_fill_caps", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_fill_caps", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_FILL_CAPS);
RNA_def_property_ui_text(prop, "Fill Caps", "Fill caps for bevelled curves");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* texture space */
- prop= RNA_def_property(srna, "use_auto_texspace", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_auto_texspace", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", CU_AUTOSPACE);
RNA_def_property_ui_text(prop, "Auto Texture Space", "Adjust active object's texture space automatically when transforming object");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Curve_texspace_set");
- prop= RNA_def_property(srna, "texspace_location", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "texspace_location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Texture Space Location", "Texture space location");
RNA_def_property_editable_func(prop, "rna_Curve_texspace_editable");
RNA_def_property_float_funcs(prop, "rna_Curve_texspace_loc_get", "rna_Curve_texspace_loc_set", NULL);
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "texspace_size", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "texspace_size", PROP_FLOAT, PROP_XYZ);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Texture Space Size", "Texture space size");
RNA_def_property_editable_func(prop, "rna_Curve_texspace_editable");
@@ -1425,13 +1425,13 @@ static void rna_def_curve(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
*/
- prop= RNA_def_property(srna, "use_uv_as_generated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_uv_as_generated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_UV_ORCO);
RNA_def_property_ui_text(prop, "Use UV for mapping", "Uses the UV values as Generated textured coordinates");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* materials */
- prop= RNA_def_property(srna, "materials", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "materials", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "mat", "totcol");
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_ui_text(prop, "Materials", "");
@@ -1451,132 +1451,132 @@ static void rna_def_curve_nurb(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Spline", NULL);
+ srna = RNA_def_struct(brna, "Spline", NULL);
RNA_def_struct_sdna(srna, "Nurb");
RNA_def_struct_ui_text(srna, "Spline", "Element of a curve, either NURBS, Bezier or Polyline or a character with text objects");
- prop= RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "bp", NULL);
RNA_def_property_struct_type(prop, "SplinePoint");
RNA_def_property_collection_funcs(prop, "rna_BPoint_array_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_Nurb_length", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Points", "Collection of points that make up this poly or nurbs spline");
rna_def_curve_spline_points(brna, prop);
- prop= RNA_def_property(srna, "bezier_points", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "bezier_points", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "BezierSplinePoint");
RNA_def_property_collection_sdna(prop, NULL, "bezt", "pntsu");
RNA_def_property_ui_text(prop, "Bezier Points", "Collection of points for Bezier curves only");
rna_def_curve_spline_bezpoints(brna, prop);
- prop= RNA_def_property(srna, "tilt_interpolation", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "tilt_interpolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "tilt_interp");
RNA_def_property_enum_items(prop, spline_interpolation_items);
RNA_def_property_ui_text(prop, "Tilt Interpolation", "The type of tilt interpolation for 3D, Bezier curves");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "radius_interpolation", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "radius_interpolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "radius_interp");
RNA_def_property_enum_items(prop, spline_interpolation_items);
RNA_def_property_ui_text(prop, "Radius Interpolation", "The type of radius interpolation for Bezier curves");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, curve_type_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_Nurb_type_set", NULL);
RNA_def_property_ui_text(prop, "Type", "The interpolation type for this curve element");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "point_count_u", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "point_count_u", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* editing this needs knot recalc*/
RNA_def_property_int_sdna(prop, NULL, "pntsu");
RNA_def_property_ui_text(prop, "Points U", "Total number points for the curve or surface in the U direction");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "point_count_v", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "point_count_v", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* editing this needs knot recalc*/
RNA_def_property_int_sdna(prop, NULL, "pntsv");
RNA_def_property_ui_text(prop, "Points V", "Total number points for the surface on the V direction");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "order_u", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "order_u", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "orderu");
RNA_def_property_range(prop, 2, 6);
RNA_def_property_ui_text(prop, "Order U", "NURBS order in the U direction (for splines and surfaces, higher values let points influence a greater area)");
RNA_def_property_update(prop, 0, "rna_Nurb_update_knot_u");
- prop= RNA_def_property(srna, "order_v", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "order_v", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "orderv");
RNA_def_property_range(prop, 2, 6);
RNA_def_property_ui_text(prop, "Order V", "NURBS order in the V direction (for surfaces only, higher values let points influence a greater area)");
RNA_def_property_update(prop, 0, "rna_Nurb_update_knot_v");
- prop= RNA_def_property(srna, "resolution_u", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "resolution_u", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolu");
RNA_def_property_range(prop, 1, SHRT_MAX);
RNA_def_property_ui_range(prop, 1, 64, 1, 0);
RNA_def_property_ui_text(prop, "Resolution U", "Curve or Surface subdivisions per segment");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "resolution_v", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "resolution_v", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolv");
RNA_def_property_range(prop, 1, SHRT_MAX);
RNA_def_property_ui_range(prop, 1, 64, 1, 0);
RNA_def_property_ui_text(prop, "Resolution V", "Surface subdivisions per segment");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "use_cyclic_u", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_cyclic_u", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagu", CU_NURB_CYCLIC);
RNA_def_property_ui_text(prop, "Cyclic U", "Make this curve or surface a closed loop in the U direction");
RNA_def_property_update(prop, 0, "rna_Nurb_update_cyclic_u");
- prop= RNA_def_property(srna, "use_cyclic_v", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_cyclic_v", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagv", CU_NURB_CYCLIC);
RNA_def_property_ui_text(prop, "Cyclic V", "Make this surface a closed loop in the V direction");
RNA_def_property_update(prop, 0, "rna_Nurb_update_cyclic_v");
/* Note, endpoint and bezier flags should never be on at the same time! */
- prop= RNA_def_property(srna, "use_endpoint_u", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_endpoint_u", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagu", CU_NURB_ENDPOINT);
RNA_def_property_ui_text(prop, "Endpoint U", "Make this nurbs curve or surface meet the endpoints in the U direction (Cyclic U must be disabled)");
RNA_def_property_update(prop, 0, "rna_Nurb_update_knot_u");
- prop= RNA_def_property(srna, "use_endpoint_v", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_endpoint_v", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagv", CU_NURB_ENDPOINT);
RNA_def_property_ui_text(prop, "Endpoint V", "Make this nurbs surface meet the endpoints in the V direction (Cyclic V must be disabled)");
RNA_def_property_update(prop, 0, "rna_Nurb_update_knot_v");
- prop= RNA_def_property(srna, "use_bezier_u", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_bezier_u", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagu", CU_NURB_BEZIER);
RNA_def_property_ui_text(prop, "Bezier U", "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)");
RNA_def_property_update(prop, 0, "rna_Nurb_update_knot_u");
- prop= RNA_def_property(srna, "use_bezier_v", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_bezier_v", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagv", CU_NURB_BEZIER);
RNA_def_property_ui_text(prop, "Bezier V", "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)");
RNA_def_property_update(prop, 0, "rna_Nurb_update_knot_v");
- prop= RNA_def_property(srna, "use_smooth", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_smooth", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_SMOOTH);
RNA_def_property_ui_text(prop, "Smooth", "Smooth the normals of the surface or beveled curve");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "hide", 1);
RNA_def_property_ui_text(prop, "Hide", "Hide this curve in editmode");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "material_index", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "material_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "mat_nr");
RNA_def_property_ui_text(prop, "Material Index", "");
RNA_def_property_int_funcs(prop, NULL, NULL, "rna_Curve_material_index_range");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "character_index", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "character_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "charidx");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* editing this needs knot recalc*/
RNA_def_property_ui_text(prop, "Character Index", "Location of this character in the text data (only for text curves)");
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 2ea21baf257..a27ee0af828 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -58,9 +58,9 @@ BlenderDefRNA DefRNA = {NULL, {NULL, NULL}, {NULL, NULL}, NULL, 0, 0, 0, 1};
/* pedantic check for '.', do this since its a hassle for translators */
#ifndef NDEBUG
# define DESCR_CHECK(description, id1, id2) \
- if(description && (description)[0]) { \
+ if (description && (description)[0]) { \
int i = strlen(description); \
- if((description)[i - 1] == '.') { \
+ if ((description)[i - 1] == '.') { \
fprintf(stderr, "%s: '%s' '%s' description ends with a '.' !\n", \
__func__, id1 ? id1 : "", id2 ? id2 : ""); \
} \
@@ -72,7 +72,7 @@ BlenderDefRNA DefRNA = {NULL, {NULL, NULL}, {NULL, NULL}, NULL, 0, 0, 0, 1};
void rna_addtail(ListBase *listbase, void *vlink)
{
- Link *link= vlink;
+ Link *link = vlink;
link->next = NULL;
link->prev = listbase->last;
@@ -84,7 +84,7 @@ void rna_addtail(ListBase *listbase, void *vlink)
static void rna_remlink(ListBase *listbase, void *vlink)
{
- Link *link= vlink;
+ Link *link = vlink;
if (link->next) link->next->prev = link->prev;
if (link->prev) link->prev->next = link->next;
@@ -97,9 +97,9 @@ PropertyDefRNA *rna_findlink(ListBase *listbase, const char *identifier)
{
Link *link;
- for(link=listbase->first; link; link=link->next) {
- PropertyRNA *prop= ((PropertyDefRNA *)link)->prop;
- if(prop && (strcmp(prop->identifier, identifier)==0)) {
+ for (link = listbase->first; link; link = link->next) {
+ PropertyRNA *prop = ((PropertyDefRNA *)link)->prop;
+ if (prop && (strcmp(prop->identifier, identifier) == 0)) {
return (PropertyDefRNA *)link;
}
}
@@ -117,27 +117,27 @@ void rna_freelistN(ListBase *listbase)
{
Link *link, *next;
- for(link=listbase->first; link; link=next) {
- next= link->next;
+ for (link = listbase->first; link; link = next) {
+ next = link->next;
MEM_freeN(link);
}
- listbase->first= listbase->last= NULL;
+ listbase->first = listbase->last = NULL;
}
StructDefRNA *rna_find_struct_def(StructRNA *srna)
{
StructDefRNA *dsrna;
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
/* we should never get here */
fprintf(stderr, "%s: only at preprocess time.\n", __func__);
return NULL;
}
- dsrna= DefRNA.structs.last;
- for (; dsrna; dsrna= dsrna->cont.prev)
- if (dsrna->srna==srna)
+ dsrna = DefRNA.structs.last;
+ for (; dsrna; dsrna = dsrna->cont.prev)
+ if (dsrna->srna == srna)
return dsrna;
return NULL;
@@ -148,23 +148,23 @@ PropertyDefRNA *rna_find_struct_property_def(StructRNA *srna, PropertyRNA *prop)
StructDefRNA *dsrna;
PropertyDefRNA *dprop;
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
/* we should never get here */
fprintf(stderr, "%s: only at preprocess time.\n", __func__);
return NULL;
}
- dsrna= rna_find_struct_def(srna);
- dprop= dsrna->cont.properties.last;
- for (; dprop; dprop= dprop->prev)
- if (dprop->prop==prop)
+ dsrna = rna_find_struct_def(srna);
+ dprop = dsrna->cont.properties.last;
+ for (; dprop; dprop = dprop->prev)
+ if (dprop->prop == prop)
return dprop;
- dsrna= DefRNA.structs.last;
- for (; dsrna; dsrna= dsrna->cont.prev) {
- dprop= dsrna->cont.properties.last;
- for (; dprop; dprop= dprop->prev)
- if (dprop->prop==prop)
+ dsrna = DefRNA.structs.last;
+ for (; dsrna; dsrna = dsrna->cont.prev) {
+ dprop = dsrna->cont.properties.last;
+ for (; dprop; dprop = dprop->prev)
+ if (dprop->prop == prop)
return dprop;
}
@@ -176,17 +176,17 @@ static PropertyDefRNA *rna_find_property_def(PropertyRNA *prop)
{
PropertyDefRNA *dprop;
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
/* we should never get here */
fprintf(stderr, "%s: only at preprocess time.\n", __func__);
return NULL;
}
- dprop= rna_find_struct_property_def(DefRNA.laststruct, prop);
+ dprop = rna_find_struct_property_def(DefRNA.laststruct, prop);
if (dprop)
return dprop;
- dprop= rna_find_parameter_def(prop);
+ dprop = rna_find_parameter_def(prop);
if (dprop)
return dprop;
@@ -199,23 +199,23 @@ FunctionDefRNA *rna_find_function_def(FunctionRNA *func)
StructDefRNA *dsrna;
FunctionDefRNA *dfunc;
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
/* we should never get here */
fprintf(stderr, "%s: only at preprocess time.\n", __func__);
return NULL;
}
- dsrna= rna_find_struct_def(DefRNA.laststruct);
- dfunc= dsrna->functions.last;
- for (; dfunc; dfunc= dfunc->cont.prev)
- if (dfunc->func==func)
+ dsrna = rna_find_struct_def(DefRNA.laststruct);
+ dfunc = dsrna->functions.last;
+ for (; dfunc; dfunc = dfunc->cont.prev)
+ if (dfunc->func == func)
return dfunc;
- dsrna= DefRNA.structs.last;
- for (; dsrna; dsrna= dsrna->cont.prev) {
- dfunc= dsrna->functions.last;
- for (; dfunc; dfunc= dfunc->cont.prev)
- if (dfunc->func==func)
+ dsrna = DefRNA.structs.last;
+ for (; dsrna; dsrna = dsrna->cont.prev) {
+ dfunc = dsrna->functions.last;
+ for (; dfunc; dfunc = dfunc->cont.prev)
+ if (dfunc->func == func)
return dfunc;
}
@@ -228,28 +228,28 @@ PropertyDefRNA *rna_find_parameter_def(PropertyRNA *parm)
FunctionDefRNA *dfunc;
PropertyDefRNA *dparm;
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
/* we should never get here */
fprintf(stderr, "%s: only at preprocess time.\n", __func__);
return NULL;
}
- dsrna= rna_find_struct_def(DefRNA.laststruct);
- dfunc= dsrna->functions.last;
- for (; dfunc; dfunc= dfunc->cont.prev) {
- dparm= dfunc->cont.properties.last;
- for (; dparm; dparm= dparm->prev)
- if (dparm->prop==parm)
+ dsrna = rna_find_struct_def(DefRNA.laststruct);
+ dfunc = dsrna->functions.last;
+ for (; dfunc; dfunc = dfunc->cont.prev) {
+ dparm = dfunc->cont.properties.last;
+ for (; dparm; dparm = dparm->prev)
+ if (dparm->prop == parm)
return dparm;
}
- dsrna= DefRNA.structs.last;
- for (; dsrna; dsrna= dsrna->cont.prev) {
- dfunc= dsrna->functions.last;
- for (; dfunc; dfunc= dfunc->cont.prev) {
- dparm= dfunc->cont.properties.last;
- for (; dparm; dparm= dparm->prev)
- if (dparm->prop==parm)
+ dsrna = DefRNA.structs.last;
+ for (; dsrna; dsrna = dsrna->cont.prev) {
+ dfunc = dsrna->functions.last;
+ for (; dfunc; dfunc = dfunc->cont.prev) {
+ dparm = dfunc->cont.properties.last;
+ for (; dparm; dparm = dparm->prev)
+ if (dparm->prop == parm)
return dparm;
}
}
@@ -262,18 +262,18 @@ static ContainerDefRNA *rna_find_container_def(ContainerRNA *cont)
StructDefRNA *ds;
FunctionDefRNA *dfunc;
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
/* we should never get here */
fprintf(stderr, "%s: only at preprocess time.\n", __func__);
return NULL;
}
- ds= rna_find_struct_def((StructRNA*)cont);
- if(ds)
+ ds = rna_find_struct_def((StructRNA*)cont);
+ if (ds)
return &ds->cont;
- dfunc= rna_find_function_def((FunctionRNA*)cont);
- if(dfunc)
+ dfunc = rna_find_function_def((FunctionRNA*)cont);
+ if (dfunc)
return &dfunc->cont;
return NULL;
@@ -290,23 +290,23 @@ typedef struct DNAStructMember {
static int rna_member_cmp(const char *name, const char *oname)
{
- int a=0;
+ int a = 0;
/* compare without pointer or array part */
- while(name[0]=='*')
+ while (name[0] =='*')
name++;
- while(oname[0]=='*')
+ while (oname[0] =='*')
oname++;
- while(1) {
- if(name[a]=='[' && oname[a]==0) return 1;
- if(name[a]=='[' && oname[a]=='[') return 1;
- if(name[a]==0) break;
- if(name[a] != oname[a]) return 0;
+ while (1) {
+ if (name[a] =='[' && oname[a] == 0) return 1;
+ if (name[a] =='[' && oname[a] =='[') return 1;
+ if (name[a] == 0) break;
+ if (name[a] != oname[a]) return 0;
a++;
}
- if(name[a]==0 && oname[a] == '.') return 2;
- if(name[a]==0 && oname[a] == '-' && oname[a+1] == '>') return 3;
+ if (name[a] == 0 && oname[a] == '.') return 2;
+ if (name[a] == 0 && oname[a] == '-' && oname[a+1] == '>') return 3;
return (name[a] == oname[a]);
}
@@ -317,52 +317,52 @@ static int rna_find_sdna_member(SDNA *sdna, const char *structname, const char *
short *sp;
int a, b, structnr, totmember, cmp;
- structnr= DNA_struct_find_nr(sdna, structname);
- if(structnr == -1)
+ structnr = DNA_struct_find_nr(sdna, structname);
+ if (structnr == -1)
return 0;
- sp= sdna->structs[structnr];
- totmember= sp[1];
- sp+= 2;
+ sp = sdna->structs[structnr];
+ totmember = sp[1];
+ sp += 2;
- for(a=0; a<totmember; a++, sp+=2) {
- dnaname= sdna->names[sp[1]];
+ for (a = 0; a<totmember; a++, sp += 2) {
+ dnaname = sdna->names[sp[1]];
- cmp= rna_member_cmp(dnaname, membername);
+ cmp = rna_member_cmp(dnaname, membername);
- if(cmp == 1) {
- smember->type= sdna->types[sp[0]];
- smember->name= dnaname;
+ if (cmp == 1) {
+ smember->type = sdna->types[sp[0]];
+ smember->name = dnaname;
- if(strstr(membername, "["))
- smember->arraylength= 0;
+ if (strstr(membername, "["))
+ smember->arraylength = 0;
else
- smember->arraylength= DNA_elem_array_size(smember->name, strlen(smember->name));
+ smember->arraylength = DNA_elem_array_size(smember->name, strlen(smember->name));
- smember->pointerlevel= 0;
- for(b=0; dnaname[b] == '*'; b++)
+ smember->pointerlevel = 0;
+ for (b = 0; dnaname[b] == '*'; b++)
smember->pointerlevel++;
return 1;
}
- else if(cmp == 2) {
- smember->type= "";
- smember->name= dnaname;
- smember->pointerlevel= 0;
- smember->arraylength= 0;
+ else if (cmp == 2) {
+ smember->type = "";
+ smember->name = dnaname;
+ smember->pointerlevel = 0;
+ smember->arraylength = 0;
- membername= strstr(membername, ".") + strlen(".");
+ membername = strstr(membername, ".") + strlen(".");
rna_find_sdna_member(sdna, sdna->types[sp[0]], membername, smember);
return 1;
}
- else if(cmp == 3) {
- smember->type= "";
- smember->name= dnaname;
- smember->pointerlevel= 0;
- smember->arraylength= 0;
+ else if (cmp == 3) {
+ smember->type = "";
+ smember->name = dnaname;
+ smember->pointerlevel = 0;
+ smember->arraylength = 0;
- membername= strstr(membername, "->") + strlen("->");
+ membername = strstr(membername, "->") + strlen("->");
rna_find_sdna_member(sdna, sdna->types[sp[0]], membername, smember);
return 1;
@@ -374,7 +374,7 @@ static int rna_find_sdna_member(SDNA *sdna, const char *structname, const char *
static int rna_validate_identifier(const char *identifier, char *error, int property)
{
- int a=0;
+ int a = 0;
/* list from http://docs.python.org/reference/lexical_analysis.html#id5 */
static const char *kwlist[] = {
@@ -394,44 +394,44 @@ static int rna_validate_identifier(const char *identifier, char *error, int prop
return 0;
}
- for(a=0; identifier[a]; a++) {
- if(DefRNA.preprocess && property) {
- if(isalpha(identifier[a]) && isupper(identifier[a])) {
+ for (a = 0; identifier[a]; a++) {
+ if (DefRNA.preprocess && property) {
+ if (isalpha(identifier[a]) && isupper(identifier[a])) {
strcpy(error, "property names must contain lower case characters only");
return 0;
}
}
- if (identifier[a]=='_') {
+ if (identifier[a] =='_') {
continue;
}
- if (identifier[a]==' ') {
+ if (identifier[a] ==' ') {
strcpy(error, "spaces are not okay in identifier names");
return 0;
}
- if (isalnum(identifier[a])==0) {
+ if (isalnum(identifier[a]) == 0) {
strcpy(error, "one of the characters failed an isalnum() check and is not an underscore");
return 0;
}
}
- for(a=0; kwlist[a]; a++) {
+ for (a = 0; kwlist[a]; a++) {
if (strcmp(identifier, kwlist[a]) == 0) {
strcpy(error, "this keyword is reserved by python");
return 0;
}
}
- if(property) {
+ if (property) {
static const char *kwlist_prop[] = {
/* not keywords but reserved all the same because py uses */
"keys", "values", "items", "get",
NULL
};
- for(a=0; kwlist_prop[a]; a++) {
+ for (a = 0; kwlist_prop[a]; a++) {
if (strcmp(identifier, kwlist_prop[a]) == 0) {
strcpy(error, "this keyword is reserved by python");
return 0;
@@ -448,12 +448,12 @@ BlenderRNA *RNA_create(void)
{
BlenderRNA *brna;
- brna= MEM_callocN(sizeof(BlenderRNA), "BlenderRNA");
+ brna = MEM_callocN(sizeof(BlenderRNA), "BlenderRNA");
- DefRNA.sdna= DNA_sdna_from_data(DNAstr, DNAlen, 0);
- DefRNA.structs.first= DefRNA.structs.last= NULL;
- DefRNA.error= 0;
- DefRNA.preprocess= 1;
+ DefRNA.sdna = DNA_sdna_from_data(DNAstr, DNAlen, 0);
+ DefRNA.structs.first = DefRNA.structs.last = NULL;
+ DefRNA.error = 0;
+ DefRNA.preprocess = 1;
return brna;
}
@@ -464,12 +464,12 @@ void RNA_define_free(BlenderRNA *UNUSED(brna))
FunctionDefRNA *dfunc;
AllocDefRNA *alloc;
- for(alloc=DefRNA.allocs.first; alloc; alloc=alloc->next)
+ for (alloc = DefRNA.allocs.first; alloc; alloc = alloc->next)
MEM_freeN(alloc->mem);
rna_freelistN(&DefRNA.allocs);
- for(ds=DefRNA.structs.first; ds; ds=ds->cont.next) {
- for (dfunc= ds->functions.first; dfunc; dfunc= dfunc->cont.next)
+ for (ds = DefRNA.structs.first; ds; ds = ds->cont.next) {
+ for (dfunc = ds->functions.first; dfunc; dfunc = dfunc->cont.next)
rna_freelistN(&dfunc->cont.properties);
rna_freelistN(&ds->cont.properties);
@@ -478,17 +478,17 @@ void RNA_define_free(BlenderRNA *UNUSED(brna))
rna_freelistN(&DefRNA.structs);
- if(DefRNA.sdna) {
+ if (DefRNA.sdna) {
DNA_sdna_free(DefRNA.sdna);
- DefRNA.sdna= NULL;
+ DefRNA.sdna = NULL;
}
- DefRNA.error= 0;
+ DefRNA.error = 0;
}
void RNA_define_verify_sdna(int verify)
{
- DefRNA.verify= verify;
+ DefRNA.verify = verify;
}
void RNA_struct_free_extension(StructRNA *srna, ExtensionRNA *ext)
@@ -497,7 +497,7 @@ void RNA_struct_free_extension(StructRNA *srna, ExtensionRNA *ext)
ext->free(ext->data); /* decref's the PyObject that the srna owns */
RNA_struct_blender_type_set(srna, NULL); /* this gets accessed again - XXX fixme */
RNA_struct_py_type_set(srna, NULL); /* NULL the srna's value so RNA_struct_free wont complain of a leak */
-#endif
+#endif
}
void RNA_struct_free(BlenderRNA *brna, StructRNA *srna)
@@ -514,36 +514,36 @@ void RNA_struct_free(BlenderRNA *brna, StructRNA *srna)
}
} */
- for(prop=srna->cont.properties.first; prop; prop=nextprop) {
- nextprop= prop->next;
+ for (prop = srna->cont.properties.first; prop; prop = nextprop) {
+ nextprop = prop->next;
RNA_def_property_free_pointers(prop);
- if(prop->flag & PROP_RUNTIME)
+ if (prop->flag & PROP_RUNTIME)
rna_freelinkN(&srna->cont.properties, prop);
}
- for(func=srna->functions.first; func; func=nextfunc) {
- nextfunc= func->cont.next;
+ for (func = srna->functions.first; func; func = nextfunc) {
+ nextfunc = func->cont.next;
- for(parm=func->cont.properties.first; parm; parm=nextparm) {
- nextparm= parm->next;
+ for (parm = func->cont.properties.first; parm; parm = nextparm) {
+ nextparm = parm->next;
RNA_def_property_free_pointers(parm);
- if(parm->flag & PROP_RUNTIME)
+ if (parm->flag & PROP_RUNTIME)
rna_freelinkN(&func->cont.properties, parm);
}
RNA_def_func_free_pointers(func);
- if(func->flag & FUNC_RUNTIME)
+ if (func->flag & FUNC_RUNTIME)
rna_freelinkN(&srna->functions, func);
}
RNA_def_struct_free_pointers(srna);
- if(srna->flag & STRUCT_RUNTIME)
+ if (srna->flag & STRUCT_RUNTIME)
rna_freelinkN(&brna->structs, srna);
#endif
@@ -554,11 +554,11 @@ void RNA_free(BlenderRNA *brna)
StructRNA *srna, *nextsrna;
FunctionRNA *func;
- if(DefRNA.preprocess) {
+ if (DefRNA.preprocess) {
RNA_define_free(brna);
- for(srna=brna->structs.first; srna; srna=srna->cont.next) {
- for (func= srna->functions.first; func; func= func->cont.next)
+ for (srna = brna->structs.first; srna; srna = srna->cont.next) {
+ for (func = srna->functions.first; func; func = func->cont.next)
rna_freelistN(&func->cont.properties);
rna_freelistN(&srna->cont.properties);
@@ -570,8 +570,8 @@ void RNA_free(BlenderRNA *brna)
MEM_freeN(brna);
}
else {
- for(srna=brna->structs.first; srna; srna=nextsrna) {
- nextsrna= srna->cont.next;
+ for (srna = brna->structs.first; srna; srna = nextsrna) {
+ nextsrna = srna->cont.next;
RNA_struct_free(brna, srna);
}
}
@@ -579,7 +579,7 @@ void RNA_free(BlenderRNA *brna)
static size_t rna_property_type_sizeof(PropertyType type)
{
- switch(type) {
+ switch (type) {
case PROP_BOOLEAN: return sizeof(BoolPropertyRNA);
case PROP_INT: return sizeof(IntPropertyRNA);
case PROP_FLOAT: return sizeof(FloatPropertyRNA);
@@ -595,8 +595,8 @@ static StructDefRNA *rna_find_def_struct(StructRNA *srna)
{
StructDefRNA *ds;
- for(ds=DefRNA.structs.first; ds; ds=ds->cont.next)
- if(ds->srna == srna)
+ for (ds = DefRNA.structs.first; ds; ds = ds->cont.next)
+ if (ds->srna == srna)
return ds;
return NULL;
@@ -606,112 +606,112 @@ static StructDefRNA *rna_find_def_struct(StructRNA *srna)
StructRNA *RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
{
- StructRNA *srna, *srnafrom= NULL;
- StructDefRNA *ds= NULL, *dsfrom= NULL;
+ StructRNA *srna, *srnafrom = NULL;
+ StructDefRNA *ds = NULL, *dsfrom = NULL;
PropertyRNA *prop;
- if(DefRNA.preprocess) {
+ if (DefRNA.preprocess) {
char error[512];
if (rna_validate_identifier(identifier, error, 0) == 0) {
fprintf(stderr, "%s: struct identifier \"%s\" error - %s\n", __func__, identifier, error);
- DefRNA.error= 1;
+ DefRNA.error = 1;
}
}
- if(from) {
+ if (from) {
/* find struct to derive from */
- for(srnafrom= brna->structs.first; srnafrom; srnafrom=srnafrom->cont.next)
- if(strcmp(srnafrom->identifier, from) == 0)
+ for (srnafrom = brna->structs.first; srnafrom; srnafrom = srnafrom->cont.next)
+ if (strcmp(srnafrom->identifier, from) == 0)
break;
- if(!srnafrom) {
+ if (!srnafrom) {
fprintf(stderr, "%s: struct %s not found to define %s.\n", __func__, from, identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
}
}
- srna= MEM_callocN(sizeof(StructRNA), "StructRNA");
- DefRNA.laststruct= srna;
+ srna = MEM_callocN(sizeof(StructRNA), "StructRNA");
+ DefRNA.laststruct = srna;
- if(srnafrom) {
+ if (srnafrom) {
/* copy from struct to derive stuff, a bit clumsy since we can't
* use MEM_dupallocN, data structs may not be alloced but builtin */
memcpy(srna, srnafrom, sizeof(StructRNA));
- srna->cont.prophash= NULL;
- srna->cont.properties.first= srna->cont.properties.last= NULL;
- srna->functions.first= srna->functions.last= NULL;
- srna->py_type= NULL;
+ srna->cont.prophash = NULL;
+ srna->cont.properties.first = srna->cont.properties.last = NULL;
+ srna->functions.first = srna->functions.last = NULL;
+ srna->py_type = NULL;
- if(DefRNA.preprocess) {
- srna->base= srnafrom;
- dsfrom= rna_find_def_struct(srnafrom);
+ if (DefRNA.preprocess) {
+ srna->base = srnafrom;
+ dsfrom = rna_find_def_struct(srnafrom);
}
else
- srna->base= srnafrom;
+ srna->base = srnafrom;
}
- srna->identifier= identifier;
- srna->name= identifier; /* may be overwritten later RNA_def_struct_ui_text */
- srna->description= "";
+ srna->identifier = identifier;
+ srna->name = identifier; /* may be overwritten later RNA_def_struct_ui_text */
+ srna->description = "";
srna->flag |= STRUCT_UNDO;
- if(!srnafrom)
- srna->icon= ICON_DOT;
+ if (!srnafrom)
+ srna->icon = ICON_DOT;
rna_addtail(&brna->structs, srna);
- if(DefRNA.preprocess) {
- ds= MEM_callocN(sizeof(StructDefRNA), "StructDefRNA");
- ds->srna= srna;
+ if (DefRNA.preprocess) {
+ ds = MEM_callocN(sizeof(StructDefRNA), "StructDefRNA");
+ ds->srna = srna;
rna_addtail(&DefRNA.structs, ds);
- if(dsfrom)
- ds->dnafromname= dsfrom->dnaname;
+ if (dsfrom)
+ ds->dnafromname = dsfrom->dnaname;
}
/* in preprocess, try to find sdna */
- if(DefRNA.preprocess)
+ if (DefRNA.preprocess)
RNA_def_struct_sdna(srna, srna->identifier);
else
srna->flag |= STRUCT_RUNTIME;
- if(srnafrom) {
- srna->nameproperty= srnafrom->nameproperty;
- srna->iteratorproperty= srnafrom->iteratorproperty;
+ if (srnafrom) {
+ srna->nameproperty = srnafrom->nameproperty;
+ srna->iteratorproperty = srnafrom->iteratorproperty;
}
else {
/* define some builtin properties */
- prop= RNA_def_property(&srna->cont, "rna_properties", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(&srna->cont, "rna_properties", PROP_COLLECTION, PROP_NONE);
RNA_def_property_flag(prop, PROP_BUILTIN);
RNA_def_property_ui_text(prop, "Properties", "RNA property collection");
- if(DefRNA.preprocess) {
+ if (DefRNA.preprocess) {
RNA_def_property_struct_type(prop, "Property");
RNA_def_property_collection_funcs(prop, "rna_builtin_properties_begin", "rna_builtin_properties_next", "rna_iterator_listbase_end", "rna_builtin_properties_get", NULL, NULL, "rna_builtin_properties_lookup_string", NULL);
}
else {
#ifdef RNA_RUNTIME
- CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop;
- cprop->begin= rna_builtin_properties_begin;
- cprop->next= rna_builtin_properties_next;
- cprop->get= rna_builtin_properties_get;
- cprop->item_type= &RNA_Property;
+ CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)prop;
+ cprop->begin = rna_builtin_properties_begin;
+ cprop->next = rna_builtin_properties_next;
+ cprop->get = rna_builtin_properties_get;
+ cprop->item_type = &RNA_Property;
#endif
}
- prop= RNA_def_property(&srna->cont, "rna_type", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(&srna->cont, "rna_type", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_HIDDEN);
RNA_def_property_ui_text(prop, "RNA", "RNA type definition");
- if(DefRNA.preprocess) {
+ if (DefRNA.preprocess) {
RNA_def_property_struct_type(prop, "Struct");
RNA_def_property_pointer_funcs(prop, "rna_builtin_type_get", NULL, NULL, NULL);
}
else {
#ifdef RNA_RUNTIME
- PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop;
- pprop->get= rna_builtin_type_get;
- pprop->type= &RNA_Struct;
+ PointerPropertyRNA *pprop = (PointerPropertyRNA*)prop;
+ pprop->get = rna_builtin_type_get;
+ pprop->type = &RNA_Struct;
#endif
}
}
@@ -723,60 +723,60 @@ void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
{
StructDefRNA *ds;
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
- ds= rna_find_def_struct(srna);
+ ds = rna_find_def_struct(srna);
- if(!DNA_struct_find_nr(DefRNA.sdna, structname)) {
- if(!DefRNA.silent) {
+ if (!DNA_struct_find_nr(DefRNA.sdna, structname)) {
+ if (!DefRNA.silent) {
fprintf(stderr, "%s: %s not found.\n", __func__, structname);
- DefRNA.error= 1;
+ DefRNA.error = 1;
}
return;
}
- ds->dnaname= structname;
+ ds->dnaname = structname;
}
void RNA_def_struct_sdna_from(StructRNA *srna, const char *structname, const char *propname)
{
StructDefRNA *ds;
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
- ds= rna_find_def_struct(srna);
+ ds = rna_find_def_struct(srna);
- if(!ds->dnaname) {
+ if (!ds->dnaname) {
fprintf(stderr, "%s: %s base struct must know DNA already.\n", __func__, structname);
return;
}
- if(!DNA_struct_find_nr(DefRNA.sdna, structname)) {
- if(!DefRNA.silent) {
+ if (!DNA_struct_find_nr(DefRNA.sdna, structname)) {
+ if (!DefRNA.silent) {
fprintf(stderr, "%s: %s not found.\n", __func__, structname);
- DefRNA.error= 1;
+ DefRNA.error = 1;
}
return;
}
- ds->dnafromprop= propname;
- ds->dnaname= structname;
+ ds->dnafromprop = propname;
+ ds->dnaname = structname;
}
void RNA_def_struct_name_property(struct StructRNA *srna, struct PropertyRNA *prop)
{
- if(prop->type != PROP_STRING) {
+ if (prop->type != PROP_STRING) {
fprintf(stderr, "%s: \"%s.%s\", must be a string property.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
}
else
- srna->nameproperty= prop;
+ srna->nameproperty = prop;
}
void RNA_def_struct_nested(BlenderRNA *brna, StructRNA *srna, const char *structname)
@@ -784,16 +784,16 @@ void RNA_def_struct_nested(BlenderRNA *brna, StructRNA *srna, const char *struct
StructRNA *srnafrom;
/* find struct to derive from */
- for(srnafrom= brna->structs.first; srnafrom; srnafrom=srnafrom->cont.next)
- if(strcmp(srnafrom->identifier, structname) == 0)
+ for (srnafrom = brna->structs.first; srnafrom; srnafrom = srnafrom->cont.next)
+ if (strcmp(srnafrom->identifier, structname) == 0)
break;
- if(!srnafrom) {
+ if (!srnafrom) {
fprintf(stderr, "%s: struct %s not found for %s.\n", __func__, structname, srna->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
}
- srna->nested= srnafrom;
+ srna->nested = srnafrom;
}
void RNA_def_struct_flag(StructRNA *srna, int flag)
@@ -808,67 +808,67 @@ void RNA_def_struct_clear_flag(StructRNA *srna, int flag)
void RNA_def_struct_refine_func(StructRNA *srna, const char *refine)
{
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
- if(refine) srna->refine= (StructRefineFunc)refine;
+ if (refine) srna->refine = (StructRefineFunc)refine;
}
void RNA_def_struct_idprops_func(StructRNA *srna, const char *idproperties)
{
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
- if(idproperties) srna->idproperties= (IDPropertiesFunc)idproperties;
+ if (idproperties) srna->idproperties = (IDPropertiesFunc)idproperties;
}
void RNA_def_struct_register_funcs(StructRNA *srna, const char *reg, const char *unreg, const char *instance)
{
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
- if(reg) srna->reg= (StructRegisterFunc)reg;
- if(unreg) srna->unreg= (StructUnregisterFunc)unreg;
- if(instance) srna->instance= (StructInstanceFunc)instance;
+ if (reg) srna->reg = (StructRegisterFunc)reg;
+ if (unreg) srna->unreg = (StructUnregisterFunc)unreg;
+ if (instance) srna->instance = (StructInstanceFunc)instance;
}
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
{
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
- if(path) srna->path= (StructPathFunc)path;
+ if (path) srna->path = (StructPathFunc)path;
}
void RNA_def_struct_identifier(StructRNA *srna, const char *identifier)
{
- if(DefRNA.preprocess) {
+ if (DefRNA.preprocess) {
fprintf(stderr, "%s: only at runtime.\n", __func__);
return;
}
- srna->identifier= identifier;
+ srna->identifier = identifier;
}
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
{
DESCR_CHECK(description, srna->identifier, NULL);
- srna->name= name;
- srna->description= description;
+ srna->name = name;
+ srna->description = description;
}
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
{
- srna->icon= icon;
+ srna->icon = icon;
}
/* Property Definition */
@@ -876,74 +876,74 @@ void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
{
/*StructRNA *srna= DefRNA.laststruct;*/ /* invalid for python defined props */
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
ContainerDefRNA *dcont;
- PropertyDefRNA *dprop= NULL;
+ PropertyDefRNA *dprop = NULL;
PropertyRNA *prop;
- if(DefRNA.preprocess) {
+ if (DefRNA.preprocess) {
char error[512];
if (rna_validate_identifier(identifier, error, 1) == 0) {
fprintf(stderr, "%s: property identifier \"%s.%s\" - %s\n", __func__, CONTAINER_RNA_ID(cont), identifier, error);
- DefRNA.error= 1;
+ DefRNA.error = 1;
}
- dcont= rna_find_container_def(cont);
+ dcont = rna_find_container_def(cont);
/* XXX - toto, detect supertype collisions */
- if(rna_findlink(&dcont->properties, identifier)) {
+ if (rna_findlink(&dcont->properties, identifier)) {
fprintf(stderr, "%s: duplicate identifier \"%s.%s\"\n", __func__, CONTAINER_RNA_ID(cont), identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
}
- dprop= MEM_callocN(sizeof(PropertyDefRNA), "PropertyDefRNA");
+ dprop = MEM_callocN(sizeof(PropertyDefRNA), "PropertyDefRNA");
rna_addtail(&dcont->properties, dprop);
}
- prop= MEM_callocN(rna_property_type_sizeof(type), "PropertyRNA");
+ prop = MEM_callocN(rna_property_type_sizeof(type), "PropertyRNA");
- switch(type) {
+ switch (type) {
case PROP_BOOLEAN:
break;
case PROP_INT: {
- IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
+ IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
- iprop->hardmin= (subtype == PROP_UNSIGNED)? 0: INT_MIN;
- iprop->hardmax= INT_MAX;
+ iprop->hardmin = (subtype == PROP_UNSIGNED)? 0: INT_MIN;
+ iprop->hardmax = INT_MAX;
- iprop->softmin= (subtype == PROP_UNSIGNED)? 0: -10000; /* rather arbitrary .. */
- iprop->softmax= 10000;
- iprop->step= 1;
+ iprop->softmin = (subtype == PROP_UNSIGNED)? 0: -10000; /* rather arbitrary .. */
+ iprop->softmax = 10000;
+ iprop->step = 1;
break;
}
case PROP_FLOAT: {
- FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
+ FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
- fprop->hardmin= (subtype == PROP_UNSIGNED)? 0.0f: -FLT_MAX;
- fprop->hardmax= FLT_MAX;
+ fprop->hardmin = (subtype == PROP_UNSIGNED)? 0.0f: -FLT_MAX;
+ fprop->hardmax = FLT_MAX;
- if(ELEM(subtype, PROP_COLOR, PROP_COLOR_GAMMA)) {
- fprop->softmin= 0.0f;
- fprop->softmax= 1.0f;
+ if (ELEM(subtype, PROP_COLOR, PROP_COLOR_GAMMA)) {
+ fprop->softmin = 0.0f;
+ fprop->softmax = 1.0f;
}
- else if(subtype == PROP_FACTOR) {
- fprop->softmin= fprop->hardmin= 0.0f;
- fprop->softmax= fprop->hardmax= 1.0f;
+ else if (subtype == PROP_FACTOR) {
+ fprop->softmin = fprop->hardmin = 0.0f;
+ fprop->softmax = fprop->hardmax = 1.0f;
}
else {
- fprop->softmin= (subtype == PROP_UNSIGNED)? 0.0f: -10000.0f; /* rather arbitrary .. */
- fprop->softmax= 10000.0f;
+ fprop->softmin = (subtype == PROP_UNSIGNED)? 0.0f: -10000.0f; /* rather arbitrary .. */
+ fprop->softmax = 10000.0f;
}
- fprop->step= 10;
- fprop->precision= 3;
+ fprop->step = 10;
+ fprop->precision = 3;
break;
}
case PROP_STRING: {
- StringPropertyRNA *sprop= (StringPropertyRNA*)prop;
+ StringPropertyRNA *sprop = (StringPropertyRNA*)prop;
- sprop->defaultvalue= "";
- sprop->maxlength= 0;
+ sprop->defaultvalue = "";
+ sprop->maxlength = 0;
break;
}
case PROP_ENUM:
@@ -952,77 +952,77 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier
break;
default:
fprintf(stderr, "%s: \"%s.%s\", invalid property type.\n", __func__, CONTAINER_RNA_ID(cont), identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
return NULL;
}
- if(DefRNA.preprocess) {
- dprop->cont= cont;
- dprop->prop= prop;
+ if (DefRNA.preprocess) {
+ dprop->cont = cont;
+ dprop->prop = prop;
}
- prop->magic= RNA_MAGIC;
- prop->identifier= identifier;
- prop->type= type;
- prop->subtype= subtype;
- prop->name= identifier;
- prop->description= "";
+ prop->magic = RNA_MAGIC;
+ prop->identifier = identifier;
+ prop->type = type;
+ prop->subtype = subtype;
+ prop->name = identifier;
+ prop->description = "";
/* a priori not raw editable */
prop->rawtype = -1;
- if(type != PROP_COLLECTION && type != PROP_POINTER) {
- prop->flag= PROP_EDITABLE;
+ if (type != PROP_COLLECTION && type != PROP_POINTER) {
+ prop->flag = PROP_EDITABLE;
- if(type != PROP_STRING)
+ if (type != PROP_STRING)
prop->flag |= PROP_ANIMATABLE;
}
- if(DefRNA.preprocess) {
- switch(type) {
+ if (DefRNA.preprocess) {
+ switch (type) {
case PROP_BOOLEAN:
- DefRNA.silent= 1;
+ DefRNA.silent = 1;
RNA_def_property_boolean_sdna(prop, NULL, identifier, 0);
- DefRNA.silent= 0;
+ DefRNA.silent = 0;
break;
case PROP_INT: {
- DefRNA.silent= 1;
+ DefRNA.silent = 1;
RNA_def_property_int_sdna(prop, NULL, identifier);
- DefRNA.silent= 0;
+ DefRNA.silent = 0;
break;
}
case PROP_FLOAT: {
- DefRNA.silent= 1;
+ DefRNA.silent = 1;
RNA_def_property_float_sdna(prop, NULL, identifier);
- DefRNA.silent= 0;
+ DefRNA.silent = 0;
break;
}
case PROP_STRING: {
- DefRNA.silent= 1;
+ DefRNA.silent = 1;
RNA_def_property_string_sdna(prop, NULL, identifier);
- DefRNA.silent= 0;
+ DefRNA.silent = 0;
break;
}
case PROP_ENUM:
- DefRNA.silent= 1;
+ DefRNA.silent = 1;
RNA_def_property_enum_sdna(prop, NULL, identifier);
- DefRNA.silent= 0;
+ DefRNA.silent = 0;
break;
case PROP_POINTER:
- DefRNA.silent= 1;
+ DefRNA.silent = 1;
RNA_def_property_pointer_sdna(prop, NULL, identifier);
- DefRNA.silent= 0;
+ DefRNA.silent = 0;
break;
case PROP_COLLECTION:
- DefRNA.silent= 1;
+ DefRNA.silent = 1;
RNA_def_property_collection_sdna(prop, NULL, identifier, NULL);
- DefRNA.silent= 0;
+ DefRNA.silent = 0;
break;
}
}
else {
prop->flag |= PROP_IDPROPERTY|PROP_RUNTIME;
#ifdef RNA_RUNTIME
- if(cont->prophash)
+ if (cont->prophash)
BLI_ghash_insert(cont->prophash, (void*)prop->identifier, prop);
#endif
}
@@ -1044,76 +1044,76 @@ void RNA_def_property_clear_flag(PropertyRNA *prop, int flag)
void RNA_def_property_subtype(PropertyRNA *prop, PropertySubType subtype)
{
- prop->subtype= subtype;
+ prop->subtype = subtype;
}
void RNA_def_property_array(PropertyRNA *prop, int length)
{
- StructRNA *srna= DefRNA.laststruct;
+ StructRNA *srna = DefRNA.laststruct;
- if(length<0) {
+ if (length<0) {
fprintf(stderr, "%s: \"%s.%s\", array length must be zero of greater.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
return;
}
- if(length>RNA_MAX_ARRAY_LENGTH) {
+ if (length>RNA_MAX_ARRAY_LENGTH) {
fprintf(stderr, "%s: \"%s.%s\", array length must be smaller than %d.\n", __func__, srna->identifier, prop->identifier, RNA_MAX_ARRAY_LENGTH);
- DefRNA.error= 1;
+ DefRNA.error = 1;
return;
}
- if(prop->arraydimension > 1) {
+ if (prop->arraydimension > 1) {
fprintf(stderr, "%s: \"%s.%s\", array dimensions has been set to %u but would be overwritten as 1.\n", __func__, srna->identifier, prop->identifier, prop->arraydimension);
- DefRNA.error= 1;
+ DefRNA.error = 1;
return;
}
- switch(prop->type) {
+ switch (prop->type) {
case PROP_BOOLEAN:
case PROP_INT:
case PROP_FLOAT:
- prop->arraylength[0]= length;
- prop->totarraylength= length;
- prop->arraydimension= 1;
+ prop->arraylength[0] = length;
+ prop->totarraylength = length;
+ prop->arraydimension = 1;
break;
default:
fprintf(stderr, "%s: \"%s.%s\", only boolean/int/float can be array.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
break;
}
}
void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, const int length[])
{
- StructRNA *srna= DefRNA.laststruct;
+ StructRNA *srna = DefRNA.laststruct;
int i;
if (dimension < 1 || dimension > RNA_MAX_ARRAY_DIMENSION) {
fprintf(stderr, "%s: \"%s.%s\", array dimension must be between 1 and %d.\n", __func__, srna->identifier, prop->identifier, RNA_MAX_ARRAY_DIMENSION);
- DefRNA.error= 1;
+ DefRNA.error = 1;
return;
}
- switch(prop->type) {
+ switch (prop->type) {
case PROP_BOOLEAN:
case PROP_INT:
case PROP_FLOAT:
break;
default:
fprintf(stderr, "%s: \"%s.%s\", only boolean/int/float can be array.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
break;
}
- prop->arraydimension= dimension;
- prop->totarraylength= 0;
+ prop->arraydimension = dimension;
+ prop->totarraylength = 0;
- if(length) {
+ if (length) {
memcpy(prop->arraylength, length, sizeof(int)*dimension);
- prop->totarraylength= length[0];
- for(i=1; i<dimension; i++)
+ prop->totarraylength = length[0];
+ for (i = 1; i<dimension; i++)
prop->totarraylength *= length[i];
}
else
@@ -1126,151 +1126,151 @@ void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *d
{
DESCR_CHECK(description, prop->identifier, NULL);
- prop->name= name;
- prop->description= description;
+ prop->name = name;
+ prop->description = description;
}
void RNA_def_property_ui_icon(PropertyRNA *prop, int icon, int consecutive)
{
- prop->icon= icon;
- if(consecutive)
+ prop->icon = icon;
+ if (consecutive)
prop->flag |= PROP_ICONS_CONSECUTIVE;
}
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
{
- StructRNA *srna= DefRNA.laststruct;
+ StructRNA *srna = DefRNA.laststruct;
- switch(prop->type) {
+ switch (prop->type) {
case PROP_INT: {
- IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
- iprop->softmin= (int)min;
- iprop->softmax= (int)max;
- iprop->step= (int)step;
+ IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
+ iprop->softmin = (int)min;
+ iprop->softmax = (int)max;
+ iprop->step = (int)step;
break;
}
case PROP_FLOAT: {
- FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
- fprop->softmin= (float)min;
- fprop->softmax= (float)max;
- fprop->step= (float)step;
- fprop->precision= (int)precision;
+ FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
+ fprop->softmin = (float)min;
+ fprop->softmax = (float)max;
+ fprop->step = (float)step;
+ fprop->precision = (int)precision;
break;
}
default:
fprintf(stderr, "%s: \"%s.%s\", invalid type for ui range.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
break;
}
}
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
{
- StructRNA *srna= DefRNA.laststruct;
+ StructRNA *srna = DefRNA.laststruct;
- switch(prop->type) {
+ switch (prop->type) {
case PROP_INT: {
- IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
- iprop->hardmin= (int)min;
- iprop->hardmax= (int)max;
- iprop->softmin= MAX2((int)min, iprop->hardmin);
- iprop->softmax= MIN2((int)max, iprop->hardmax);
+ IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
+ iprop->hardmin = (int)min;
+ iprop->hardmax = (int)max;
+ iprop->softmin = MAX2((int)min, iprop->hardmin);
+ iprop->softmax = MIN2((int)max, iprop->hardmax);
break;
}
case PROP_FLOAT: {
- FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
- fprop->hardmin= (float)min;
- fprop->hardmax= (float)max;
- fprop->softmin= MAX2((float)min, fprop->hardmin);
- fprop->softmax= MIN2((float)max, fprop->hardmax);
+ FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
+ fprop->hardmin = (float)min;
+ fprop->hardmax = (float)max;
+ fprop->softmin = MAX2((float)min, fprop->hardmin);
+ fprop->softmax = MIN2((float)max, fprop->hardmax);
break;
}
default:
fprintf(stderr, "%s: \"%s.%s\", invalid type for range.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
break;
}
}
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
{
- StructRNA *srna= DefRNA.laststruct;
+ StructRNA *srna = DefRNA.laststruct;
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
fprintf(stderr, "%s \"%s.%s\": only during preprocessing.\n", __func__, srna->identifier, prop->identifier);
return;
}
- switch(prop->type) {
+ switch (prop->type) {
case PROP_POINTER: {
- PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop;
+ PointerPropertyRNA *pprop = (PointerPropertyRNA*)prop;
pprop->type = (StructRNA*)type;
break;
}
case PROP_COLLECTION: {
- CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop;
+ CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)prop;
cprop->item_type = (StructRNA*)type;
break;
}
default:
fprintf(stderr, "%s: \"%s.%s\", invalid type for struct type.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
break;
}
}
void RNA_def_property_struct_runtime(PropertyRNA *prop, StructRNA *type)
{
- StructRNA *srna= DefRNA.laststruct;
+ StructRNA *srna = DefRNA.laststruct;
- if(DefRNA.preprocess) {
+ if (DefRNA.preprocess) {
fprintf(stderr, "%s: only at runtime.\n", __func__);
return;
}
- switch(prop->type) {
+ switch (prop->type) {
case PROP_POINTER: {
- PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop;
+ PointerPropertyRNA *pprop = (PointerPropertyRNA*)prop;
pprop->type = type;
- if(type && (type->flag & STRUCT_ID_REFCOUNT))
+ if (type && (type->flag & STRUCT_ID_REFCOUNT))
prop->flag |= PROP_ID_REFCOUNT;
break;
}
case PROP_COLLECTION: {
- CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop;
+ CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)prop;
cprop->item_type = type;
break;
}
default:
fprintf(stderr, "%s: \"%s.%s\", invalid type for struct type.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
break;
}
}
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
{
- StructRNA *srna= DefRNA.laststruct;
- int i, defaultfound= 0;
+ StructRNA *srna = DefRNA.laststruct;
+ int i, defaultfound = 0;
- switch(prop->type) {
+ switch (prop->type) {
case PROP_ENUM: {
- EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
- eprop->item= (EnumPropertyItem*)item;
- eprop->totitem= 0;
- for(i=0; item[i].identifier; i++) {
+ EnumPropertyRNA *eprop = (EnumPropertyRNA*)prop;
+ eprop->item = (EnumPropertyItem*)item;
+ eprop->totitem = 0;
+ for (i = 0; item[i].identifier; i++) {
eprop->totitem++;
- if(item[i].identifier[0] && item[i].value == eprop->defaultvalue)
- defaultfound= 1;
+ if (item[i].identifier[0] && item[i].value == eprop->defaultvalue)
+ defaultfound = 1;
}
- if(!defaultfound) {
- for(i=0; item[i].identifier; i++) {
- if(item[i].identifier[0]) {
- eprop->defaultvalue= item[i].value;
+ if (!defaultfound) {
+ for (i = 0; item[i].identifier; i++) {
+ if (item[i].identifier[0]) {
+ eprop->defaultvalue = item[i].value;
break;
}
}
@@ -1280,184 +1280,184 @@ void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item
}
default:
fprintf(stderr, "%s: \"%s.%s\", invalid type for struct type.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
break;
}
}
void RNA_def_property_string_maxlength(PropertyRNA *prop, int maxlength)
{
- StructRNA *srna= DefRNA.laststruct;
+ StructRNA *srna = DefRNA.laststruct;
- switch(prop->type) {
+ switch (prop->type) {
case PROP_STRING: {
- StringPropertyRNA *sprop= (StringPropertyRNA*)prop;
- sprop->maxlength= maxlength;
+ StringPropertyRNA *sprop = (StringPropertyRNA*)prop;
+ sprop->maxlength = maxlength;
break;
}
default:
fprintf(stderr, "%s: \"%s.%s\", type is not string.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
break;
}
}
void RNA_def_property_boolean_default(PropertyRNA *prop, int value)
{
- StructRNA *srna= DefRNA.laststruct;
+ StructRNA *srna = DefRNA.laststruct;
- switch(prop->type) {
+ switch (prop->type) {
case PROP_BOOLEAN: {
- BoolPropertyRNA *bprop= (BoolPropertyRNA*)prop;
- bprop->defaultvalue= value;
+ BoolPropertyRNA *bprop = (BoolPropertyRNA*)prop;
+ bprop->defaultvalue = value;
break;
}
default:
fprintf(stderr, "%s: \"%s.%s\", type is not boolean.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
break;
}
}
void RNA_def_property_boolean_array_default(PropertyRNA *prop, const int *array)
{
- StructRNA *srna= DefRNA.laststruct;
+ StructRNA *srna = DefRNA.laststruct;
- switch(prop->type) {
+ switch (prop->type) {
case PROP_BOOLEAN: {
- BoolPropertyRNA *bprop= (BoolPropertyRNA*)prop;
- bprop->defaultarray= array;
+ BoolPropertyRNA *bprop = (BoolPropertyRNA*)prop;
+ bprop->defaultarray = array;
break;
}
default:
fprintf(stderr, "%s: \"%s.%s\", type is not boolean.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
break;
}
}
void RNA_def_property_int_default(PropertyRNA *prop, int value)
{
- StructRNA *srna= DefRNA.laststruct;
+ StructRNA *srna = DefRNA.laststruct;
- switch(prop->type) {
+ switch (prop->type) {
case PROP_INT: {
- IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
- iprop->defaultvalue= value;
+ IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
+ iprop->defaultvalue = value;
break;
}
default:
fprintf(stderr, "%s: \"%s.%s\", type is not int.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
break;
}
}
void RNA_def_property_int_array_default(PropertyRNA *prop, const int *array)
{
- StructRNA *srna= DefRNA.laststruct;
+ StructRNA *srna = DefRNA.laststruct;
- switch(prop->type) {
+ switch (prop->type) {
case PROP_INT: {
- IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
- iprop->defaultarray= array;
+ IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
+ iprop->defaultarray = array;
break;
}
default:
fprintf(stderr, "%s: \"%s.%s\", type is not int.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
break;
}
}
void RNA_def_property_float_default(PropertyRNA *prop, float value)
{
- StructRNA *srna= DefRNA.laststruct;
+ StructRNA *srna = DefRNA.laststruct;
- switch(prop->type) {
+ switch (prop->type) {
case PROP_FLOAT: {
- FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
- fprop->defaultvalue= value;
+ FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
+ fprop->defaultvalue = value;
break;
}
default:
fprintf(stderr, "%s: \"%s.%s\", type is not float.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
break;
}
}
/* array must remain valid after this function finishes */
void RNA_def_property_float_array_default(PropertyRNA *prop, const float *array)
{
- StructRNA *srna= DefRNA.laststruct;
+ StructRNA *srna = DefRNA.laststruct;
- switch(prop->type) {
+ switch (prop->type) {
case PROP_FLOAT: {
- FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
- fprop->defaultarray= array; /* WARNING, this array must not come from the stack and lost */
+ FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
+ fprop->defaultarray = array; /* WARNING, this array must not come from the stack and lost */
break;
}
default:
fprintf(stderr, "%s: \"%s.%s\", type is not float.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
break;
}
}
void RNA_def_property_string_default(PropertyRNA *prop, const char *value)
{
- StructRNA *srna= DefRNA.laststruct;
+ StructRNA *srna = DefRNA.laststruct;
- switch(prop->type) {
+ switch (prop->type) {
case PROP_STRING: {
- StringPropertyRNA *sprop= (StringPropertyRNA*)prop;
- sprop->defaultvalue= value;
+ StringPropertyRNA *sprop = (StringPropertyRNA*)prop;
+ sprop->defaultvalue = value;
break;
}
default:
fprintf(stderr, "%s: \"%s.%s\", type is not string.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
break;
}
}
void RNA_def_property_enum_default(PropertyRNA *prop, int value)
{
- StructRNA *srna= DefRNA.laststruct;
- int i, defaultfound= 0;
+ StructRNA *srna = DefRNA.laststruct;
+ int i, defaultfound = 0;
- switch(prop->type) {
+ switch (prop->type) {
case PROP_ENUM: {
- EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
- eprop->defaultvalue= value;
+ EnumPropertyRNA *eprop = (EnumPropertyRNA*)prop;
+ eprop->defaultvalue = value;
- if(prop->flag & PROP_ENUM_FLAG) {
+ if (prop->flag & PROP_ENUM_FLAG) {
/* check all bits are accounted for */
- int totflag= 0;
- for(i=0; i<eprop->totitem; i++) {
- if(eprop->item[i].identifier[0]) {
+ int totflag = 0;
+ for (i = 0; i<eprop->totitem; i++) {
+ if (eprop->item[i].identifier[0]) {
totflag |= eprop->item[i].value;
}
}
- if(eprop->defaultvalue & ~totflag) {
+ if (eprop->defaultvalue & ~totflag) {
fprintf(stderr, "%s: \"%s.%s\", default includes unused bits (%d).\n", __func__, srna->identifier, prop->identifier, eprop->defaultvalue & ~totflag);
- DefRNA.error= 1;
+ DefRNA.error = 1;
}
}
else {
- for(i=0; i<eprop->totitem; i++) {
- if(eprop->item[i].identifier[0] && eprop->item[i].value == eprop->defaultvalue)
- defaultfound= 1;
+ for (i = 0; i<eprop->totitem; i++) {
+ if (eprop->item[i].identifier[0] && eprop->item[i].value == eprop->defaultvalue)
+ defaultfound = 1;
}
- if(!defaultfound && eprop->totitem) {
- if(value == 0) {
- eprop->defaultvalue= eprop->item[0].value;
+ if (!defaultfound && eprop->totitem) {
+ if (value == 0) {
+ eprop->defaultvalue = eprop->item[0].value;
}
else {
fprintf(stderr, "%s: \"%s.%s\", default is not in items.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
}
}
}
@@ -1466,7 +1466,7 @@ void RNA_def_property_enum_default(PropertyRNA *prop, int value)
}
default:
fprintf(stderr, "%s: \"%s.%s\", type is not enum.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
break;
}
}
@@ -1479,55 +1479,55 @@ static PropertyDefRNA *rna_def_property_sdna(PropertyRNA *prop, const char *stru
StructDefRNA *ds;
PropertyDefRNA *dp;
- dp= rna_find_struct_property_def(DefRNA.laststruct, prop);
- if (dp==NULL) return NULL;
+ dp = rna_find_struct_property_def(DefRNA.laststruct, prop);
+ if (dp == NULL) return NULL;
- ds= rna_find_struct_def((StructRNA*)dp->cont);
+ ds = rna_find_struct_def((StructRNA*)dp->cont);
- if(!structname)
- structname= ds->dnaname;
- if(!propname)
- propname= prop->identifier;
+ if (!structname)
+ structname = ds->dnaname;
+ if (!propname)
+ propname = prop->identifier;
- if(!rna_find_sdna_member(DefRNA.sdna, structname, propname, &smember)) {
- if(DefRNA.silent) {
+ if (!rna_find_sdna_member(DefRNA.sdna, structname, propname, &smember)) {
+ if (DefRNA.silent) {
return NULL;
}
- else if(!DefRNA.verify) {
+ else if (!DefRNA.verify) {
/* some basic values to survive even with sdna info */
- dp->dnastructname= structname;
- dp->dnaname= propname;
- if(prop->type == PROP_BOOLEAN)
- dp->dnaarraylength= 1;
- if(prop->type == PROP_POINTER)
- dp->dnapointerlevel= 1;
+ dp->dnastructname = structname;
+ dp->dnaname = propname;
+ if (prop->type == PROP_BOOLEAN)
+ dp->dnaarraylength = 1;
+ if (prop->type == PROP_POINTER)
+ dp->dnapointerlevel = 1;
return dp;
}
else {
fprintf(stderr, "%s: \"%s.%s\" (identifier \"%s\") not found.\n",
__func__, structname, propname, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
return NULL;
}
}
- if(smember.arraylength > 1) {
- prop->arraylength[0]= smember.arraylength;
- prop->totarraylength= smember.arraylength;
- prop->arraydimension= 1;
+ if (smember.arraylength > 1) {
+ prop->arraylength[0] = smember.arraylength;
+ prop->totarraylength = smember.arraylength;
+ prop->arraydimension = 1;
}
else {
- prop->arraydimension= 0;
- prop->totarraylength= 0;
+ prop->arraydimension = 0;
+ prop->totarraylength = 0;
}
- dp->dnastructname= structname;
- dp->dnastructfromname= ds->dnafromname;
- dp->dnastructfromprop= ds->dnafromprop;
- dp->dnaname= propname;
- dp->dnatype= smember.type;
- dp->dnaarraylength= smember.arraylength;
- dp->dnapointerlevel= smember.pointerlevel;
+ dp->dnastructname = structname;
+ dp->dnastructfromname = ds->dnafromname;
+ dp->dnastructfromprop = ds->dnafromprop;
+ dp->dnaname = propname;
+ dp->dnatype = smember.type;
+ dp->dnaarraylength = smember.arraylength;
+ dp->dnapointerlevel = smember.pointerlevel;
return dp;
}
@@ -1535,31 +1535,31 @@ static PropertyDefRNA *rna_def_property_sdna(PropertyRNA *prop, const char *stru
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int bit)
{
PropertyDefRNA *dp;
- StructRNA *srna= DefRNA.laststruct;
+ StructRNA *srna = DefRNA.laststruct;
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
- if(prop->type != PROP_BOOLEAN) {
+ if (prop->type != PROP_BOOLEAN) {
fprintf(stderr, "%s: \"%s.%s\", type is not boolean.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
return;
}
- if((dp=rna_def_property_sdna(prop, structname, propname))) {
+ if ((dp = rna_def_property_sdna(prop, structname, propname))) {
- if(DefRNA.silent == 0) {
+ if (DefRNA.silent == 0) {
/* error check to ensure floats are not wrapped as ints/bools */
- if(dp->dnatype && *dp->dnatype && IS_DNATYPE_INT_COMPAT(dp->dnatype) == 0) {
+ if (dp->dnatype && *dp->dnatype && IS_DNATYPE_INT_COMPAT(dp->dnatype) == 0) {
fprintf(stderr, "%s: %s.%s is a '%s' but wrapped as type '%s'.\n", __func__, srna->identifier, prop->identifier, dp->dnatype, RNA_property_typename(prop->type));
- DefRNA.error= 1;
+ DefRNA.error = 1;
return;
}
}
- dp->booleanbit= bit;
+ dp->booleanbit = bit;
}
}
@@ -1569,94 +1569,94 @@ void RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *struc
RNA_def_property_boolean_sdna(prop, structname, propname, booleanbit);
- dp= rna_find_struct_property_def(DefRNA.laststruct, prop);
+ dp = rna_find_struct_property_def(DefRNA.laststruct, prop);
- if(dp)
- dp->booleannegative= 1;
+ if (dp)
+ dp->booleannegative = 1;
}
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
{
PropertyDefRNA *dp;
- IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
- StructRNA *srna= DefRNA.laststruct;
+ IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
+ StructRNA *srna = DefRNA.laststruct;
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
- if(prop->type != PROP_INT) {
+ if (prop->type != PROP_INT) {
fprintf(stderr, "%s: \"%s.%s\", type is not int.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
return;
}
- if((dp= rna_def_property_sdna(prop, structname, propname))) {
+ if ((dp = rna_def_property_sdna(prop, structname, propname))) {
/* error check to ensure floats are not wrapped as ints/bools */
- if(DefRNA.silent == 0) {
- if(dp->dnatype && *dp->dnatype && IS_DNATYPE_INT_COMPAT(dp->dnatype) == 0) {
+ if (DefRNA.silent == 0) {
+ if (dp->dnatype && *dp->dnatype && IS_DNATYPE_INT_COMPAT(dp->dnatype) == 0) {
fprintf(stderr, "%s: %s.%s is a '%s' but wrapped as type '%s'.\n", __func__, srna->identifier, prop->identifier, dp->dnatype, RNA_property_typename(prop->type));
- DefRNA.error= 1;
+ DefRNA.error = 1;
return;
}
}
/* SDNA doesn't pass us unsigned unfortunately .. */
- if(dp->dnatype && strcmp(dp->dnatype, "char") == 0) {
- iprop->hardmin= iprop->softmin= CHAR_MIN;
- iprop->hardmax= iprop->softmax= CHAR_MAX;
+ if (dp->dnatype && strcmp(dp->dnatype, "char") == 0) {
+ iprop->hardmin = iprop->softmin = CHAR_MIN;
+ iprop->hardmax = iprop->softmax = CHAR_MAX;
}
- else if(dp->dnatype && strcmp(dp->dnatype, "short") == 0) {
- iprop->hardmin= iprop->softmin= SHRT_MIN;
- iprop->hardmax= iprop->softmax= SHRT_MAX;
+ else if (dp->dnatype && strcmp(dp->dnatype, "short") == 0) {
+ iprop->hardmin = iprop->softmin = SHRT_MIN;
+ iprop->hardmax = iprop->softmax = SHRT_MAX;
}
- else if(dp->dnatype && strcmp(dp->dnatype, "int") == 0) {
- iprop->hardmin= INT_MIN;
- iprop->hardmax= INT_MAX;
+ else if (dp->dnatype && strcmp(dp->dnatype, "int") == 0) {
+ iprop->hardmin = INT_MIN;
+ iprop->hardmax = INT_MAX;
- iprop->softmin= -10000; /* rather arbitrary .. */
- iprop->softmax= 10000;
+ iprop->softmin = -10000; /* rather arbitrary .. */
+ iprop->softmax = 10000;
}
- if(prop->subtype == PROP_UNSIGNED || prop->subtype == PROP_PERCENTAGE || prop->subtype == PROP_FACTOR)
- iprop->hardmin= iprop->softmin= 0;
+ if (prop->subtype == PROP_UNSIGNED || prop->subtype == PROP_PERCENTAGE || prop->subtype == PROP_FACTOR)
+ iprop->hardmin = iprop->softmin = 0;
}
}
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
{
PropertyDefRNA *dp;
- FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
- StructRNA *srna= DefRNA.laststruct;
+ FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
+ StructRNA *srna = DefRNA.laststruct;
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
- if(prop->type != PROP_FLOAT) {
+ if (prop->type != PROP_FLOAT) {
fprintf(stderr, "%s: \"%s.%s\", type is not float.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
return;
}
- if((dp= rna_def_property_sdna(prop, structname, propname))) {
+ if ((dp = rna_def_property_sdna(prop, structname, propname))) {
/* silent is for internal use */
- if(DefRNA.silent == 0) {
- if(dp->dnatype && *dp->dnatype && IS_DNATYPE_FLOAT_COMPAT(dp->dnatype) == 0) {
- if(prop->subtype != PROP_COLOR_GAMMA) { /* colors are an exception. these get translated */
+ if (DefRNA.silent == 0) {
+ if (dp->dnatype && *dp->dnatype && IS_DNATYPE_FLOAT_COMPAT(dp->dnatype) == 0) {
+ if (prop->subtype != PROP_COLOR_GAMMA) { /* colors are an exception. these get translated */
fprintf(stderr, "%s: %s.%s is a '%s' but wrapped as type '%s'.\n", __func__, srna->identifier, prop->identifier, dp->dnatype, RNA_property_typename(prop->type));
- DefRNA.error= 1;
+ DefRNA.error = 1;
return;
}
}
}
- if(dp->dnatype && strcmp(dp->dnatype, "char") == 0) {
- fprop->hardmin= fprop->softmin= 0.0f;
- fprop->hardmax= fprop->softmax= 1.0f;
+ if (dp->dnatype && strcmp(dp->dnatype, "char") == 0) {
+ fprop->hardmin = fprop->softmin = 0.0f;
+ fprop->hardmax = fprop->softmax = 1.0f;
}
}
@@ -1666,27 +1666,27 @@ void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, cons
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
{
/* PropertyDefRNA *dp; */
- StructRNA *srna= DefRNA.laststruct;
+ StructRNA *srna = DefRNA.laststruct;
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
- if(prop->type != PROP_ENUM) {
+ if (prop->type != PROP_ENUM) {
fprintf(stderr, "%s: \"%s.%s\", type is not enum.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
return;
}
- if(( /* dp= */ rna_def_property_sdna(prop, structname, propname))) {
- if(prop->arraydimension) {
- prop->arraydimension= 0;
- prop->totarraylength= 0;
+ if (( /* dp= */ rna_def_property_sdna(prop, structname, propname))) {
+ if (prop->arraydimension) {
+ prop->arraydimension = 0;
+ prop->totarraylength = 0;
- if(!DefRNA.silent) {
+ if (!DefRNA.silent) {
fprintf(stderr, "%s: \"%s.%s\", array not supported for enum type.\n", __func__, structname, propname);
- DefRNA.error= 1;
+ DefRNA.error = 1;
}
}
}
@@ -1698,34 +1698,34 @@ void RNA_def_property_enum_bitflag_sdna(PropertyRNA *prop, const char *structnam
RNA_def_property_enum_sdna(prop, structname, propname);
- dp= rna_find_struct_property_def(DefRNA.laststruct, prop);
+ dp = rna_find_struct_property_def(DefRNA.laststruct, prop);
- if(dp)
- dp->enumbitflags= 1;
+ if (dp)
+ dp->enumbitflags = 1;
}
void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, const char *propname)
{
/* PropertyDefRNA *dp; */
- StringPropertyRNA *sprop= (StringPropertyRNA*)prop;
- StructRNA *srna= DefRNA.laststruct;
+ StringPropertyRNA *sprop = (StringPropertyRNA*)prop;
+ StructRNA *srna = DefRNA.laststruct;
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
- if(prop->type != PROP_STRING) {
+ if (prop->type != PROP_STRING) {
fprintf(stderr, "%s: \"%s.%s\", type is not string.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
return;
}
- if((/* dp= */ rna_def_property_sdna(prop, structname, propname))) {
- if(prop->arraydimension) {
- sprop->maxlength= prop->totarraylength;
- prop->arraydimension= 0;
- prop->totarraylength= 0;
+ if ((/* dp= */ rna_def_property_sdna(prop, structname, propname))) {
+ if (prop->arraydimension) {
+ sprop->maxlength = prop->totarraylength;
+ prop->arraydimension = 0;
+ prop->totarraylength = 0;
}
}
}
@@ -1733,27 +1733,27 @@ void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, con
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
{
/* PropertyDefRNA *dp; */
- StructRNA *srna= DefRNA.laststruct;
+ StructRNA *srna = DefRNA.laststruct;
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
- if(prop->type != PROP_POINTER) {
+ if (prop->type != PROP_POINTER) {
fprintf(stderr, "%s: \"%s.%s\", type is not pointer.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
return;
}
- if((/* dp= */ rna_def_property_sdna(prop, structname, propname))) {
- if(prop->arraydimension) {
- prop->arraydimension= 0;
- prop->totarraylength= 0;
+ if ((/* dp= */ rna_def_property_sdna(prop, structname, propname))) {
+ if (prop->arraydimension) {
+ prop->arraydimension = 0;
+ prop->totarraylength = 0;
- if(!DefRNA.silent) {
+ if (!DefRNA.silent) {
fprintf(stderr, "%s: \"%s.%s\", array not supported for pointer type.\n", __func__, structname, propname);
- DefRNA.error= 1;
+ DefRNA.error = 1;
}
}
}
@@ -1762,69 +1762,69 @@ void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, co
void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, const char *propname, const char *lengthpropname)
{
PropertyDefRNA *dp;
- CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop;
- StructRNA *srna= DefRNA.laststruct;
+ CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)prop;
+ StructRNA *srna = DefRNA.laststruct;
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
- if(prop->type != PROP_COLLECTION) {
+ if (prop->type != PROP_COLLECTION) {
fprintf(stderr, "%s: \"%s.%s\", type is not collection.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
return;
}
- if((dp=rna_def_property_sdna(prop, structname, propname))) {
- if(prop->arraydimension && !lengthpropname) {
- prop->arraydimension= 0;
- prop->totarraylength= 0;
+ if ((dp = rna_def_property_sdna(prop, structname, propname))) {
+ if (prop->arraydimension && !lengthpropname) {
+ prop->arraydimension = 0;
+ prop->totarraylength = 0;
- if(!DefRNA.silent) {
+ if (!DefRNA.silent) {
fprintf(stderr, "%s: \"%s.%s\", array of collections not supported.\n", __func__, structname, propname);
- DefRNA.error= 1;
+ DefRNA.error = 1;
}
}
- if(dp->dnatype && strcmp(dp->dnatype, "ListBase") == 0) {
- cprop->next= (PropCollectionNextFunc)"rna_iterator_listbase_next";
- cprop->get= (PropCollectionGetFunc)"rna_iterator_listbase_get";
- cprop->end= (PropCollectionEndFunc)"rna_iterator_listbase_end";
+ if (dp->dnatype && strcmp(dp->dnatype, "ListBase") == 0) {
+ cprop->next = (PropCollectionNextFunc)"rna_iterator_listbase_next";
+ cprop->get = (PropCollectionGetFunc)"rna_iterator_listbase_get";
+ cprop->end = (PropCollectionEndFunc)"rna_iterator_listbase_end";
}
}
- if(dp && lengthpropname) {
+ if (dp && lengthpropname) {
DNAStructMember smember;
- StructDefRNA *ds= rna_find_struct_def((StructRNA*)dp->cont);
+ StructDefRNA *ds = rna_find_struct_def((StructRNA*)dp->cont);
- if(!structname)
- structname= ds->dnaname;
+ if (!structname)
+ structname = ds->dnaname;
- if(lengthpropname[0] == 0 || rna_find_sdna_member(DefRNA.sdna, structname, lengthpropname, &smember)) {
- if(lengthpropname[0] == 0) {
- dp->dnalengthfixed= prop->totarraylength;
- prop->arraydimension= 0;
- prop->totarraylength= 0;
+ if (lengthpropname[0] == 0 || rna_find_sdna_member(DefRNA.sdna, structname, lengthpropname, &smember)) {
+ if (lengthpropname[0] == 0) {
+ dp->dnalengthfixed = prop->totarraylength;
+ prop->arraydimension = 0;
+ prop->totarraylength = 0;
}
else {
- dp->dnalengthstructname= structname;
- dp->dnalengthname= lengthpropname;
- prop->totarraylength= 0;
+ dp->dnalengthstructname = structname;
+ dp->dnalengthname = lengthpropname;
+ prop->totarraylength = 0;
}
- cprop->next= (PropCollectionNextFunc)"rna_iterator_array_next";
- cprop->end= (PropCollectionEndFunc)"rna_iterator_array_end";
+ cprop->next = (PropCollectionNextFunc)"rna_iterator_array_next";
+ cprop->end = (PropCollectionEndFunc)"rna_iterator_array_end";
- if(dp->dnapointerlevel >= 2)
- cprop->get= (PropCollectionGetFunc)"rna_iterator_array_dereference_get";
+ if (dp->dnapointerlevel >= 2)
+ cprop->get = (PropCollectionGetFunc)"rna_iterator_array_dereference_get";
else
- cprop->get= (PropCollectionGetFunc)"rna_iterator_array_get";
+ cprop->get = (PropCollectionGetFunc)"rna_iterator_array_get";
}
else {
- if(!DefRNA.silent) {
+ if (!DefRNA.silent) {
fprintf(stderr, "%s: \"%s.%s\" not found.\n", __func__, structname, lengthpropname);
- DefRNA.error= 1;
+ DefRNA.error = 1;
}
}
}
@@ -1832,279 +1832,279 @@ void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname,
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
{
- prop->translation_context= context;
+ prop->translation_context = context;
}
/* Functions */
void RNA_def_property_editable_func(PropertyRNA *prop, const char *editable)
{
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
- if(editable) prop->editable= (EditableFunc)editable;
+ if (editable) prop->editable = (EditableFunc)editable;
}
void RNA_def_property_editable_array_func(PropertyRNA *prop, const char *editable)
{
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
- if(editable) prop->itemeditable= (ItemEditableFunc)editable;
+ if (editable) prop->itemeditable = (ItemEditableFunc)editable;
}
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
{
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
- prop->noteflag= noteflag;
- prop->update= (UpdateFunc)func;
+ prop->noteflag = noteflag;
+ prop->update = (UpdateFunc)func;
}
void RNA_def_property_update_runtime(PropertyRNA *prop, void *func)
{
- prop->update= func;
+ prop->update = func;
}
void RNA_def_property_dynamic_array_funcs(PropertyRNA *prop, const char *getlength)
{
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
if (!(prop->flag & PROP_DYNAMIC)) {
fprintf(stderr, "%s: property is a not dynamic array.\n", __func__);
- DefRNA.error= 1;
+ DefRNA.error = 1;
return;
}
- if(getlength) prop->getlength= (PropArrayLengthGetFunc)getlength;
+ if (getlength) prop->getlength = (PropArrayLengthGetFunc)getlength;
}
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
{
- StructRNA *srna= DefRNA.laststruct;
+ StructRNA *srna = DefRNA.laststruct;
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
- switch(prop->type) {
+ switch (prop->type) {
case PROP_BOOLEAN: {
- BoolPropertyRNA *bprop= (BoolPropertyRNA*)prop;
+ BoolPropertyRNA *bprop = (BoolPropertyRNA*)prop;
- if(prop->arraydimension) {
- if(get) bprop->getarray= (PropBooleanArrayGetFunc)get;
- if(set) bprop->setarray= (PropBooleanArraySetFunc)set;
+ if (prop->arraydimension) {
+ if (get) bprop->getarray = (PropBooleanArrayGetFunc)get;
+ if (set) bprop->setarray = (PropBooleanArraySetFunc)set;
}
else {
- if(get) bprop->get= (PropBooleanGetFunc)get;
- if(set) bprop->set= (PropBooleanSetFunc)set;
+ if (get) bprop->get = (PropBooleanGetFunc)get;
+ if (set) bprop->set = (PropBooleanSetFunc)set;
}
break;
}
default:
fprintf(stderr, "%s: \"%s.%s\", type is not boolean.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
break;
}
}
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
{
- StructRNA *srna= DefRNA.laststruct;
+ StructRNA *srna = DefRNA.laststruct;
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
- switch(prop->type) {
+ switch (prop->type) {
case PROP_INT: {
- IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
+ IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
- if(prop->arraydimension) {
- if(get) iprop->getarray= (PropIntArrayGetFunc)get;
- if(set) iprop->setarray= (PropIntArraySetFunc)set;
+ if (prop->arraydimension) {
+ if (get) iprop->getarray = (PropIntArrayGetFunc)get;
+ if (set) iprop->setarray = (PropIntArraySetFunc)set;
}
else {
- if(get) iprop->get= (PropIntGetFunc)get;
- if(set) iprop->set= (PropIntSetFunc)set;
+ if (get) iprop->get = (PropIntGetFunc)get;
+ if (set) iprop->set = (PropIntSetFunc)set;
}
- if(range) iprop->range= (PropIntRangeFunc)range;
+ if (range) iprop->range = (PropIntRangeFunc)range;
break;
}
default:
fprintf(stderr, "%s: \"%s.%s\", type is not int.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
break;
}
}
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
{
- StructRNA *srna= DefRNA.laststruct;
+ StructRNA *srna = DefRNA.laststruct;
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
- switch(prop->type) {
+ switch (prop->type) {
case PROP_FLOAT: {
- FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
+ FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
- if(prop->arraydimension) {
- if(get) fprop->getarray= (PropFloatArrayGetFunc)get;
- if(set) fprop->setarray= (PropFloatArraySetFunc)set;
+ if (prop->arraydimension) {
+ if (get) fprop->getarray = (PropFloatArrayGetFunc)get;
+ if (set) fprop->setarray = (PropFloatArraySetFunc)set;
}
else {
- if(get) fprop->get= (PropFloatGetFunc)get;
- if(set) fprop->set= (PropFloatSetFunc)set;
+ if (get) fprop->get = (PropFloatGetFunc)get;
+ if (set) fprop->set = (PropFloatSetFunc)set;
}
- if(range) fprop->range= (PropFloatRangeFunc)range;
+ if (range) fprop->range = (PropFloatRangeFunc)range;
break;
}
default:
fprintf(stderr, "%s: \"%s.%s\", type is not float.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
break;
}
}
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
{
- StructRNA *srna= DefRNA.laststruct;
+ StructRNA *srna = DefRNA.laststruct;
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
- switch(prop->type) {
+ switch (prop->type) {
case PROP_ENUM: {
- EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
+ EnumPropertyRNA *eprop = (EnumPropertyRNA*)prop;
- if(get) eprop->get= (PropEnumGetFunc)get;
- if(set) eprop->set= (PropEnumSetFunc)set;
- if(item) eprop->itemf= (PropEnumItemFunc)item;
+ if (get) eprop->get = (PropEnumGetFunc)get;
+ if (set) eprop->set = (PropEnumSetFunc)set;
+ if (item) eprop->itemf = (PropEnumItemFunc)item;
break;
}
default:
fprintf(stderr, "%s: \"%s.%s\", type is not enum.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
break;
}
}
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
{
- StructRNA *srna= DefRNA.laststruct;
+ StructRNA *srna = DefRNA.laststruct;
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
- switch(prop->type) {
+ switch (prop->type) {
case PROP_STRING: {
- StringPropertyRNA *sprop= (StringPropertyRNA*)prop;
+ StringPropertyRNA *sprop = (StringPropertyRNA*)prop;
- if(get) sprop->get= (PropStringGetFunc)get;
- if(length) sprop->length= (PropStringLengthFunc)length;
- if(set) sprop->set= (PropStringSetFunc)set;
+ if (get) sprop->get = (PropStringGetFunc)get;
+ if (length) sprop->length = (PropStringLengthFunc)length;
+ if (set) sprop->set = (PropStringSetFunc)set;
break;
}
default:
fprintf(stderr, "%s: \"%s.%s\", type is not string.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
break;
}
}
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *typef, const char *poll)
{
- StructRNA *srna= DefRNA.laststruct;
+ StructRNA *srna = DefRNA.laststruct;
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
- switch(prop->type) {
+ switch (prop->type) {
case PROP_POINTER: {
- PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop;
+ PointerPropertyRNA *pprop = (PointerPropertyRNA*)prop;
- if(get) pprop->get= (PropPointerGetFunc)get;
- if(set) pprop->set= (PropPointerSetFunc)set;
- if(typef) pprop->typef= (PropPointerTypeFunc)typef;
- if(poll) pprop->poll= (PropPointerPollFunc)poll;
+ if (get) pprop->get = (PropPointerGetFunc)get;
+ if (set) pprop->set = (PropPointerSetFunc)set;
+ if (typef) pprop->typef = (PropPointerTypeFunc)typef;
+ if (poll) pprop->poll = (PropPointerPollFunc)poll;
break;
}
default:
fprintf(stderr, "%s: \"%s.%s\", type is not pointer.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
break;
}
}
void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring, const char *assignint)
{
- StructRNA *srna= DefRNA.laststruct;
+ StructRNA *srna = DefRNA.laststruct;
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
fprintf(stderr, "%s: only during preprocessing.\n", __func__);
return;
}
- switch(prop->type) {
+ switch (prop->type) {
case PROP_COLLECTION: {
- CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop;
-
- if(begin) cprop->begin= (PropCollectionBeginFunc)begin;
- if(next) cprop->next= (PropCollectionNextFunc)next;
- if(end) cprop->end= (PropCollectionEndFunc)end;
- if(get) cprop->get= (PropCollectionGetFunc)get;
- if(length) cprop->length= (PropCollectionLengthFunc)length;
- if(lookupint) cprop->lookupint= (PropCollectionLookupIntFunc)lookupint;
- if(lookupstring) cprop->lookupstring= (PropCollectionLookupStringFunc)lookupstring;
- if(assignint) cprop->assignint= (PropCollectionAssignIntFunc)assignint;
+ CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)prop;
+
+ if (begin) cprop->begin = (PropCollectionBeginFunc)begin;
+ if (next) cprop->next = (PropCollectionNextFunc)next;
+ if (end) cprop->end = (PropCollectionEndFunc)end;
+ if (get) cprop->get = (PropCollectionGetFunc)get;
+ if (length) cprop->length = (PropCollectionLengthFunc)length;
+ if (lookupint) cprop->lookupint = (PropCollectionLookupIntFunc)lookupint;
+ if (lookupstring) cprop->lookupstring = (PropCollectionLookupStringFunc)lookupstring;
+ if (assignint) cprop->assignint = (PropCollectionAssignIntFunc)assignint;
break;
}
default:
fprintf(stderr, "%s: \"%s.%s\", type is not collection.\n", __func__, srna->identifier, prop->identifier);
- DefRNA.error= 1;
+ DefRNA.error = 1;
break;
}
}
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
{
- prop->srna= (StructRNA*)type;
+ prop->srna = (StructRNA*)type;
}
void RNA_def_py_data(PropertyRNA *prop, void *py_data)
{
- prop->py_data= py_data;
+ prop->py_data = py_data;
}
/* Compact definitions */
PropertyRNA *RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, int default_value, const char *ui_name, const char *ui_description)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
PropertyRNA *prop;
- prop= RNA_def_property(cont, identifier, PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(cont, identifier, PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_default(prop, default_value);
RNA_def_property_ui_text(prop, ui_name, ui_description);
@@ -2114,12 +2114,12 @@ PropertyRNA *RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier,
PropertyRNA *RNA_def_boolean_array(StructOrFunctionRNA *cont_, const char *identifier, int len, int *default_value,
const char *ui_name, const char *ui_description)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
PropertyRNA *prop;
- prop= RNA_def_property(cont, identifier, PROP_BOOLEAN, PROP_NONE);
- if(len != 0) RNA_def_property_array(prop, len);
- if(default_value) RNA_def_property_boolean_array_default(prop, default_value);
+ prop = RNA_def_property(cont, identifier, PROP_BOOLEAN, PROP_NONE);
+ if (len != 0) RNA_def_property_array(prop, len);
+ if (default_value) RNA_def_property_boolean_array_default(prop, default_value);
RNA_def_property_ui_text(prop, ui_name, ui_description);
return prop;
@@ -2128,12 +2128,12 @@ PropertyRNA *RNA_def_boolean_array(StructOrFunctionRNA *cont_, const char *ident
PropertyRNA *RNA_def_boolean_layer(StructOrFunctionRNA *cont_, const char *identifier, int len, int *default_value,
const char *ui_name, const char *ui_description)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
PropertyRNA *prop;
- prop= RNA_def_property(cont, identifier, PROP_BOOLEAN, PROP_LAYER);
- if(len != 0) RNA_def_property_array(prop, len);
- if(default_value) RNA_def_property_boolean_array_default(prop, default_value);
+ prop = RNA_def_property(cont, identifier, PROP_BOOLEAN, PROP_LAYER);
+ if (len != 0) RNA_def_property_array(prop, len);
+ if (default_value) RNA_def_property_boolean_array_default(prop, default_value);
RNA_def_property_ui_text(prop, ui_name, ui_description);
return prop;
@@ -2142,12 +2142,12 @@ PropertyRNA *RNA_def_boolean_layer(StructOrFunctionRNA *cont_, const char *ident
PropertyRNA *RNA_def_boolean_layer_member(StructOrFunctionRNA *cont_, const char *identifier, int len, int *default_value,
const char *ui_name, const char *ui_description)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
PropertyRNA *prop;
- prop= RNA_def_property(cont, identifier, PROP_BOOLEAN, PROP_LAYER_MEMBER);
- if(len != 0) RNA_def_property_array(prop, len);
- if(default_value) RNA_def_property_boolean_array_default(prop, default_value);
+ prop = RNA_def_property(cont, identifier, PROP_BOOLEAN, PROP_LAYER_MEMBER);
+ if (len != 0) RNA_def_property_array(prop, len);
+ if (default_value) RNA_def_property_boolean_array_default(prop, default_value);
RNA_def_property_ui_text(prop, ui_name, ui_description);
return prop;
@@ -2156,12 +2156,12 @@ PropertyRNA *RNA_def_boolean_layer_member(StructOrFunctionRNA *cont_, const char
PropertyRNA *RNA_def_boolean_vector(StructOrFunctionRNA *cont_, const char *identifier, int len, int *default_value,
const char *ui_name, const char *ui_description)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
PropertyRNA *prop;
- prop= RNA_def_property(cont, identifier, PROP_BOOLEAN, PROP_XYZ); // XXX
- if(len != 0) RNA_def_property_array(prop, len);
- if(default_value) RNA_def_property_boolean_array_default(prop, default_value);
+ prop = RNA_def_property(cont, identifier, PROP_BOOLEAN, PROP_XYZ); /* XXX */
+ if (len != 0) RNA_def_property_array(prop, len);
+ if (default_value) RNA_def_property_boolean_array_default(prop, default_value);
RNA_def_property_ui_text(prop, ui_name, ui_description);
return prop;
@@ -2170,12 +2170,12 @@ PropertyRNA *RNA_def_boolean_vector(StructOrFunctionRNA *cont_, const char *iden
PropertyRNA *RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax,
const char *ui_name, const char *ui_description, int softmin, int softmax)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
PropertyRNA *prop;
- prop= RNA_def_property(cont, identifier, PROP_INT, PROP_NONE);
+ prop = RNA_def_property(cont, identifier, PROP_INT, PROP_NONE);
RNA_def_property_int_default(prop, default_value);
- if(hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
+ if (hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
RNA_def_property_ui_text(prop, ui_name, ui_description);
RNA_def_property_ui_range(prop, softmin, softmax, 1, 3);
@@ -2185,13 +2185,13 @@ PropertyRNA *RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int
PropertyRNA *RNA_def_int_vector(StructOrFunctionRNA *cont_, const char *identifier, int len, const int *default_value,
int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
PropertyRNA *prop;
- prop= RNA_def_property(cont, identifier, PROP_INT, PROP_XYZ); // XXX
- if(len != 0) RNA_def_property_array(prop, len);
- if(default_value) RNA_def_property_int_array_default(prop, default_value);
- if(hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
+ prop = RNA_def_property(cont, identifier, PROP_INT, PROP_XYZ); /* XXX */
+ if (len != 0) RNA_def_property_array(prop, len);
+ if (default_value) RNA_def_property_int_array_default(prop, default_value);
+ if (hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
RNA_def_property_ui_text(prop, ui_name, ui_description);
RNA_def_property_ui_range(prop, softmin, softmax, 1, 3);
@@ -2201,13 +2201,13 @@ PropertyRNA *RNA_def_int_vector(StructOrFunctionRNA *cont_, const char *identifi
PropertyRNA *RNA_def_int_array(StructOrFunctionRNA *cont_, const char *identifier, int len, const int *default_value,
int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
PropertyRNA *prop;
- prop= RNA_def_property(cont, identifier, PROP_INT, PROP_NONE);
- if(len != 0) RNA_def_property_array(prop, len);
- if(default_value) RNA_def_property_int_array_default(prop, default_value);
- if(hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
+ prop = RNA_def_property(cont, identifier, PROP_INT, PROP_NONE);
+ if (len != 0) RNA_def_property_array(prop, len);
+ if (default_value) RNA_def_property_int_array_default(prop, default_value);
+ if (hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
RNA_def_property_ui_text(prop, ui_name, ui_description);
RNA_def_property_ui_range(prop, softmin, softmax, 1, 3);
@@ -2217,12 +2217,12 @@ PropertyRNA *RNA_def_int_array(StructOrFunctionRNA *cont_, const char *identifie
PropertyRNA *RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen,
const char *ui_name, const char *ui_description)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
PropertyRNA *prop;
- prop= RNA_def_property(cont, identifier, PROP_STRING, PROP_NONE);
- if(maxlen != 0) RNA_def_property_string_maxlength(prop, maxlen);
- if(default_value) RNA_def_property_string_default(prop, default_value);
+ prop = RNA_def_property(cont, identifier, PROP_STRING, PROP_NONE);
+ if (maxlen != 0) RNA_def_property_string_maxlength(prop, maxlen);
+ if (default_value) RNA_def_property_string_default(prop, default_value);
RNA_def_property_ui_text(prop, ui_name, ui_description);
return prop;
@@ -2231,12 +2231,12 @@ PropertyRNA *RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier,
PropertyRNA *RNA_def_string_file_path(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen,
const char *ui_name, const char *ui_description)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
PropertyRNA *prop;
- prop= RNA_def_property(cont, identifier, PROP_STRING, PROP_FILEPATH);
- if(maxlen != 0) RNA_def_property_string_maxlength(prop, maxlen);
- if(default_value) RNA_def_property_string_default(prop, default_value);
+ prop = RNA_def_property(cont, identifier, PROP_STRING, PROP_FILEPATH);
+ if (maxlen != 0) RNA_def_property_string_maxlength(prop, maxlen);
+ if (default_value) RNA_def_property_string_default(prop, default_value);
RNA_def_property_ui_text(prop, ui_name, ui_description);
return prop;
@@ -2245,12 +2245,12 @@ PropertyRNA *RNA_def_string_file_path(StructOrFunctionRNA *cont_, const char *id
PropertyRNA *RNA_def_string_dir_path(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen,
const char *ui_name, const char *ui_description)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
PropertyRNA *prop;
- prop= RNA_def_property(cont, identifier, PROP_STRING, PROP_DIRPATH);
- if(maxlen != 0) RNA_def_property_string_maxlength(prop, maxlen);
- if(default_value) RNA_def_property_string_default(prop, default_value);
+ prop = RNA_def_property(cont, identifier, PROP_STRING, PROP_DIRPATH);
+ if (maxlen != 0) RNA_def_property_string_maxlength(prop, maxlen);
+ if (default_value) RNA_def_property_string_default(prop, default_value);
RNA_def_property_ui_text(prop, ui_name, ui_description);
return prop;
@@ -2259,12 +2259,12 @@ PropertyRNA *RNA_def_string_dir_path(StructOrFunctionRNA *cont_, const char *ide
PropertyRNA *RNA_def_string_file_name(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen,
const char *ui_name, const char *ui_description)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
PropertyRNA *prop;
- prop= RNA_def_property(cont, identifier, PROP_STRING, PROP_FILENAME);
- if(maxlen != 0) RNA_def_property_string_maxlength(prop, maxlen);
- if(default_value) RNA_def_property_string_default(prop, default_value);
+ prop = RNA_def_property(cont, identifier, PROP_STRING, PROP_FILENAME);
+ if (maxlen != 0) RNA_def_property_string_maxlength(prop, maxlen);
+ if (default_value) RNA_def_property_string_default(prop, default_value);
RNA_def_property_ui_text(prop, ui_name, ui_description);
return prop;
@@ -2273,12 +2273,12 @@ PropertyRNA *RNA_def_string_file_name(StructOrFunctionRNA *cont_, const char *id
PropertyRNA *RNA_def_string_translate(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen,
const char *ui_name, const char *ui_description)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
PropertyRNA *prop;
- prop= RNA_def_property(cont, identifier, PROP_STRING, PROP_TRANSLATE);
- if(maxlen != 0) RNA_def_property_string_maxlength(prop, maxlen);
- if(default_value) RNA_def_property_string_default(prop, default_value);
+ prop = RNA_def_property(cont, identifier, PROP_STRING, PROP_TRANSLATE);
+ if (maxlen != 0) RNA_def_property_string_maxlength(prop, maxlen);
+ if (default_value) RNA_def_property_string_default(prop, default_value);
RNA_def_property_ui_text(prop, ui_name, ui_description);
return prop;
@@ -2287,16 +2287,16 @@ PropertyRNA *RNA_def_string_translate(StructOrFunctionRNA *cont_, const char *id
PropertyRNA *RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value,
const char *ui_name, const char *ui_description)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
PropertyRNA *prop;
- if(!items) {
+ if (!items) {
printf("%s: items not allowed to be NULL.\n", __func__);
return NULL;
}
- prop= RNA_def_property(cont, identifier, PROP_ENUM, PROP_NONE);
- if(items) RNA_def_property_enum_items(prop, items);
+ prop = RNA_def_property(cont, identifier, PROP_ENUM, PROP_NONE);
+ if (items) RNA_def_property_enum_items(prop, items);
RNA_def_property_enum_default(prop, default_value);
RNA_def_property_ui_text(prop, ui_name, ui_description);
@@ -2307,17 +2307,17 @@ PropertyRNA *RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, co
PropertyRNA *RNA_def_enum_flag(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value,
const char *ui_name, const char *ui_description)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
PropertyRNA *prop;
- if(!items) {
+ if (!items) {
printf("%s: items not allowed to be NULL.\n", __func__);
return NULL;
}
- prop= RNA_def_property(cont, identifier, PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(cont, identifier, PROP_ENUM, PROP_NONE);
RNA_def_property_flag(prop, PROP_ENUM_FLAG); /* important to run before default set */
- if(items) RNA_def_property_enum_items(prop, items);
+ if (items) RNA_def_property_enum_items(prop, items);
RNA_def_property_enum_default(prop, default_value);
RNA_def_property_ui_text(prop, ui_name, ui_description);
@@ -2326,25 +2326,25 @@ PropertyRNA *RNA_def_enum_flag(StructOrFunctionRNA *cont_, const char *identifie
void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
{
- EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
- eprop->itemf= itemfunc;
+ EnumPropertyRNA *eprop = (EnumPropertyRNA*)prop;
+ eprop->itemf = itemfunc;
}
void RNA_def_enum_py_data(PropertyRNA *prop, void *py_data)
{
- EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
- eprop->py_data= py_data;
+ EnumPropertyRNA *eprop = (EnumPropertyRNA*)prop;
+ eprop->py_data = py_data;
}
PropertyRNA *RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, float default_value,
float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
PropertyRNA *prop;
- prop= RNA_def_property(cont, identifier, PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(cont, identifier, PROP_FLOAT, PROP_NONE);
RNA_def_property_float_default(prop, default_value);
- if(hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
+ if (hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
RNA_def_property_ui_text(prop, ui_name, ui_description);
RNA_def_property_ui_range(prop, softmin, softmax, 1, 3);
@@ -2354,13 +2354,13 @@ PropertyRNA *RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, f
PropertyRNA *RNA_def_float_vector(StructOrFunctionRNA *cont_, const char *identifier, int len, const float *default_value,
float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
PropertyRNA *prop;
- prop= RNA_def_property(cont, identifier, PROP_FLOAT, PROP_XYZ);
- if(len != 0) RNA_def_property_array(prop, len);
- if(default_value) RNA_def_property_float_array_default(prop, default_value);
- if(hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
+ prop = RNA_def_property(cont, identifier, PROP_FLOAT, PROP_XYZ);
+ if (len != 0) RNA_def_property_array(prop, len);
+ if (default_value) RNA_def_property_float_array_default(prop, default_value);
+ if (hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
RNA_def_property_ui_text(prop, ui_name, ui_description);
RNA_def_property_ui_range(prop, softmin, softmax, 1, 3);
@@ -2372,7 +2372,7 @@ PropertyRNA *RNA_def_float_vector_xyz(StructOrFunctionRNA *cont_, const char *id
{
PropertyRNA *prop;
- prop= RNA_def_float_vector(cont_, identifier, len, default_value, hardmin, hardmax, ui_name, ui_description, softmin, softmax);
+ prop = RNA_def_float_vector(cont_, identifier, len, default_value, hardmin, hardmax, ui_name, ui_description, softmin, softmax);
prop->subtype = PROP_XYZ_LENGTH;
return prop;
@@ -2381,13 +2381,13 @@ PropertyRNA *RNA_def_float_vector_xyz(StructOrFunctionRNA *cont_, const char *id
PropertyRNA *RNA_def_float_color(StructOrFunctionRNA *cont_, const char *identifier, int len, const float *default_value,
float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
PropertyRNA *prop;
- prop= RNA_def_property(cont, identifier, PROP_FLOAT, PROP_COLOR);
- if(len != 0) RNA_def_property_array(prop, len);
- if(default_value) RNA_def_property_float_array_default(prop, default_value);
- if(hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
+ prop = RNA_def_property(cont, identifier, PROP_FLOAT, PROP_COLOR);
+ if (len != 0) RNA_def_property_array(prop, len);
+ if (default_value) RNA_def_property_float_array_default(prop, default_value);
+ if (hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
RNA_def_property_ui_text(prop, ui_name, ui_description);
RNA_def_property_ui_range(prop, softmin, softmax, 1, 3);
@@ -2398,17 +2398,17 @@ PropertyRNA *RNA_def_float_color(StructOrFunctionRNA *cont_, const char *identif
PropertyRNA *RNA_def_float_matrix(StructOrFunctionRNA *cont_, const char *identifier, int rows, int columns, const float *default_value,
float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
PropertyRNA *prop;
int length[2];
- length[0]= rows;
- length[1]= columns;
+ length[0] = rows;
+ length[1] = columns;
- prop= RNA_def_property(cont, identifier, PROP_FLOAT, PROP_MATRIX);
+ prop = RNA_def_property(cont, identifier, PROP_FLOAT, PROP_MATRIX);
RNA_def_property_multi_array(prop, 2, length);
- if(default_value) RNA_def_property_float_array_default(prop, default_value);
- if(hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
+ if (default_value) RNA_def_property_float_array_default(prop, default_value);
+ if (hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
RNA_def_property_ui_text(prop, ui_name, ui_description);
RNA_def_property_ui_range(prop, softmin, softmax, 1, 3);
@@ -2418,19 +2418,19 @@ PropertyRNA *RNA_def_float_matrix(StructOrFunctionRNA *cont_, const char *identi
PropertyRNA *RNA_def_float_rotation(StructOrFunctionRNA *cont_, const char *identifier, int len, const float *default_value,
float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
PropertyRNA *prop;
- prop= RNA_def_property(cont, identifier, PROP_FLOAT, (len != 0) ? PROP_EULER : PROP_ANGLE);
- if(len != 0) {
+ prop = RNA_def_property(cont, identifier, PROP_FLOAT, (len != 0) ? PROP_EULER : PROP_ANGLE);
+ if (len != 0) {
RNA_def_property_array(prop, len);
- if(default_value) RNA_def_property_float_array_default(prop, default_value);
+ if (default_value) RNA_def_property_float_array_default(prop, default_value);
}
else {
/* RNA_def_property_float_default must be called outside */
BLI_assert(default_value == NULL);
}
- if(hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
+ if (hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
RNA_def_property_ui_text(prop, ui_name, ui_description);
RNA_def_property_ui_range(prop, softmin, softmax, 1, 3);
@@ -2440,13 +2440,13 @@ PropertyRNA *RNA_def_float_rotation(StructOrFunctionRNA *cont_, const char *iden
PropertyRNA *RNA_def_float_array(StructOrFunctionRNA *cont_, const char *identifier, int len, const float *default_value,
float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
PropertyRNA *prop;
- prop= RNA_def_property(cont, identifier, PROP_FLOAT, PROP_NONE);
- if(len != 0) RNA_def_property_array(prop, len);
- if(default_value) RNA_def_property_float_array_default(prop, default_value);
- if(hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
+ prop = RNA_def_property(cont, identifier, PROP_FLOAT, PROP_NONE);
+ if (len != 0) RNA_def_property_array(prop, len);
+ if (default_value) RNA_def_property_float_array_default(prop, default_value);
+ if (hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
RNA_def_property_ui_text(prop, ui_name, ui_description);
RNA_def_property_ui_range(prop, softmin, softmax, 1, 3);
@@ -2456,12 +2456,12 @@ PropertyRNA *RNA_def_float_array(StructOrFunctionRNA *cont_, const char *identif
PropertyRNA *RNA_def_float_percentage(StructOrFunctionRNA *cont_, const char *identifier, float default_value,
float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
PropertyRNA *prop;
- prop= RNA_def_property(cont, identifier, PROP_FLOAT, PROP_PERCENTAGE);
+ prop = RNA_def_property(cont, identifier, PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_default(prop, default_value);
- if(hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
+ if (hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
RNA_def_property_ui_text(prop, ui_name, ui_description);
RNA_def_property_ui_range(prop, softmin, softmax, 1, 3);
@@ -2471,12 +2471,12 @@ PropertyRNA *RNA_def_float_percentage(StructOrFunctionRNA *cont_, const char *id
PropertyRNA *RNA_def_float_factor(StructOrFunctionRNA *cont_, const char *identifier, float default_value,
float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
PropertyRNA *prop;
- prop= RNA_def_property(cont, identifier, PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(cont, identifier, PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_default(prop, default_value);
- if(hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
+ if (hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
RNA_def_property_ui_text(prop, ui_name, ui_description);
RNA_def_property_ui_range(prop, softmin, softmax, 1, 3);
@@ -2486,10 +2486,10 @@ PropertyRNA *RNA_def_float_factor(StructOrFunctionRNA *cont_, const char *identi
PropertyRNA *RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type,
const char *ui_name, const char *ui_description)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
PropertyRNA *prop;
- prop= RNA_def_property(cont, identifier, PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(cont, identifier, PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, type);
RNA_def_property_ui_text(prop, ui_name, ui_description);
@@ -2499,10 +2499,10 @@ PropertyRNA *RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier,
PropertyRNA *RNA_def_pointer_runtime(StructOrFunctionRNA *cont_, const char *identifier, StructRNA *type,
const char *ui_name, const char *ui_description)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
PropertyRNA *prop;
- prop= RNA_def_property(cont, identifier, PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(cont, identifier, PROP_POINTER, PROP_NONE);
RNA_def_property_struct_runtime(prop, type);
RNA_def_property_ui_text(prop, ui_name, ui_description);
@@ -2512,10 +2512,10 @@ PropertyRNA *RNA_def_pointer_runtime(StructOrFunctionRNA *cont_, const char *ide
PropertyRNA *RNA_def_collection(StructOrFunctionRNA *cont_, const char *identifier, const char *type,
const char *ui_name, const char *ui_description)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
PropertyRNA *prop;
- prop= RNA_def_property(cont, identifier, PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(cont, identifier, PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, type);
RNA_def_property_ui_text(prop, ui_name, ui_description);
@@ -2525,10 +2525,10 @@ PropertyRNA *RNA_def_collection(StructOrFunctionRNA *cont_, const char *identifi
PropertyRNA *RNA_def_collection_runtime(StructOrFunctionRNA *cont_, const char *identifier, StructRNA *type,
const char *ui_name, const char *ui_description)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
PropertyRNA *prop;
- prop= RNA_def_property(cont, identifier, PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(cont, identifier, PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_runtime(prop, type);
RNA_def_property_ui_text(prop, ui_name, ui_description);
@@ -2543,29 +2543,29 @@ static FunctionRNA *rna_def_function(StructRNA *srna, const char *identifier)
StructDefRNA *dsrna;
FunctionDefRNA *dfunc;
- if(DefRNA.preprocess) {
+ if (DefRNA.preprocess) {
char error[512];
if (rna_validate_identifier(identifier, error, 0) == 0) {
fprintf(stderr, "%s: function identifier \"%s\" - %s\n", __func__, identifier, error);
- DefRNA.error= 1;
+ DefRNA.error = 1;
}
}
- func= MEM_callocN(sizeof(FunctionRNA), "FunctionRNA");
- func->identifier= identifier;
- func->description= identifier;
+ func = MEM_callocN(sizeof(FunctionRNA), "FunctionRNA");
+ func->identifier = identifier;
+ func->description = identifier;
rna_addtail(&srna->functions, func);
- if(DefRNA.preprocess) {
- dsrna= rna_find_struct_def(srna);
- dfunc= MEM_callocN(sizeof(FunctionDefRNA), "FunctionDefRNA");
+ if (DefRNA.preprocess) {
+ dsrna = rna_find_struct_def(srna);
+ dfunc = MEM_callocN(sizeof(FunctionDefRNA), "FunctionDefRNA");
rna_addtail(&dsrna->functions, dfunc);
- dfunc->func= func;
+ dfunc->func = func;
}
else
- func->flag|= FUNC_RUNTIME;
+ func->flag |= FUNC_RUNTIME;
return func;
}
@@ -2575,15 +2575,15 @@ FunctionRNA *RNA_def_function(StructRNA *srna, const char *identifier, const cha
FunctionRNA *func;
FunctionDefRNA *dfunc;
- func= rna_def_function(srna, identifier);
+ func = rna_def_function(srna, identifier);
- if(!DefRNA.preprocess) {
+ if (!DefRNA.preprocess) {
fprintf(stderr, "%s: only at preprocess time.\n", __func__);
return func;
}
- dfunc= rna_find_function_def(func);
- dfunc->call= call;
+ dfunc = rna_find_function_def(func);
+ dfunc->call = call;
return func;
}
@@ -2592,14 +2592,14 @@ FunctionRNA *RNA_def_function_runtime(StructRNA *srna, const char *identifier, C
{
FunctionRNA *func;
- func= rna_def_function(srna, identifier);
+ func = rna_def_function(srna, identifier);
- if(DefRNA.preprocess) {
+ if (DefRNA.preprocess) {
fprintf(stderr, "%s: only at runtime.\n", __func__);
return func;
}
- func->call= call;
+ func->call = call;
return func;
@@ -2617,32 +2617,32 @@ void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
return;
}
- func->c_ret= ret;
+ func->c_ret = ret;
RNA_def_function_output(func, ret);
}
void RNA_def_function_output(FunctionRNA *UNUSED(func), PropertyRNA *ret)
{
- ret->flag|= PROP_OUTPUT;
+ ret->flag |= PROP_OUTPUT;
}
void RNA_def_function_flag(FunctionRNA *func, int flag)
{
- func->flag|= flag;
+ func->flag |= flag;
}
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
{
- func->description= description;
+ func->description = description;
}
int rna_parameter_size(PropertyRNA *parm)
{
- PropertyType ptype= parm->type;
- int len= parm->totarraylength; /* only supports fixed length at the moment */
+ PropertyType ptype = parm->type;
+ int len = parm->totarraylength; /* only supports fixed length at the moment */
- if(len > 0) {
+ if (len > 0) {
/* XXX in other parts is mentioned that strings can be dynamic as well */
if (parm->flag & PROP_DYNAMIC)
return sizeof(void *);
@@ -2667,19 +2667,19 @@ int rna_parameter_size(PropertyRNA *parm)
return sizeof(float);
case PROP_STRING:
/* return values don't store a pointer to the original */
- if(parm->flag & PROP_THICK_WRAP) {
- StringPropertyRNA *sparm= (StringPropertyRNA*)parm;
+ if (parm->flag & PROP_THICK_WRAP) {
+ StringPropertyRNA *sparm = (StringPropertyRNA*)parm;
return sizeof(char) * sparm->maxlength;
} else
return sizeof(char *);
case PROP_POINTER: {
#ifdef RNA_RUNTIME
- if(parm->flag & PROP_RNAPTR)
+ if (parm->flag & PROP_RNAPTR)
return sizeof(PointerRNA);
else
return sizeof(void *);
#else
- if(parm->flag & PROP_RNAPTR)
+ if (parm->flag & PROP_RNAPTR)
return sizeof(PointerRNA);
else
return sizeof(void *);
@@ -2700,7 +2700,7 @@ int rna_parameter_size_alloc(PropertyRNA *parm)
int size = rna_parameter_size(parm);
if (parm->flag & PROP_DYNAMIC)
- size+= sizeof(((ParameterDynAlloc *)NULL)->array_tot);
+ size += sizeof(((ParameterDynAlloc *)NULL)->array_tot);
return size;
}
@@ -2710,21 +2710,21 @@ int rna_parameter_size_alloc(PropertyRNA *parm)
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
{
EnumPropertyItem *newitems;
- int tot= *totitem;
+ int tot = *totitem;
- if(tot == 0) {
- *items= MEM_callocN(sizeof(EnumPropertyItem)*8, "RNA_enum_items_add");
+ if (tot == 0) {
+ *items = MEM_callocN(sizeof(EnumPropertyItem)*8, "RNA_enum_items_add");
}
- else if(tot >= 8 && (tot&(tot-1)) == 0){
+ else if (tot >= 8 && (tot&(tot-1)) == 0){
/* power of two > 8 */
- newitems= MEM_callocN(sizeof(EnumPropertyItem)*tot*2, "RNA_enum_items_add");
+ newitems = MEM_callocN(sizeof(EnumPropertyItem)*tot*2, "RNA_enum_items_add");
memcpy(newitems, *items, sizeof(EnumPropertyItem)*tot);
MEM_freeN(*items);
- *items= newitems;
+ *items = newitems;
}
- (*items)[tot]= *item;
- *totitem= tot+1;
+ (*items)[tot] = *item;
+ *totitem = tot+1;
}
void RNA_enum_item_add_separator(EnumPropertyItem **items, int *totitem)
@@ -2735,16 +2735,16 @@ void RNA_enum_item_add_separator(EnumPropertyItem **items, int *totitem)
void RNA_enum_items_add(EnumPropertyItem **items, int *totitem, EnumPropertyItem *item)
{
- for(; item->identifier; item++)
+ for (; item->identifier; item++)
RNA_enum_item_add(items, totitem, item);
}
void RNA_enum_items_add_value(EnumPropertyItem **items, int *totitem, EnumPropertyItem *item, int value)
{
- for(; item->identifier; item++) {
- if(item->value == value) {
+ for (; item->identifier; item++) {
+ if (item->value == value) {
RNA_enum_item_add(items, totitem, item);
- break; // break on first match - does this break anything? (is quick hack to get object->parent_type working ok for armature/lattice)
+ break; /* break on first match - does this break anything? (is quick hack to get object->parent_type working ok for armature/lattice) */
}
}
}
@@ -2760,111 +2760,111 @@ void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
#ifdef RNA_RUNTIME
void RNA_def_struct_duplicate_pointers(StructRNA *srna)
{
- if(srna->identifier) srna->identifier= BLI_strdup(srna->identifier);
- if(srna->name) srna->name= BLI_strdup(srna->name);
- if(srna->description) srna->description= BLI_strdup(srna->description);
+ if (srna->identifier) srna->identifier = BLI_strdup(srna->identifier);
+ if (srna->name) srna->name = BLI_strdup(srna->name);
+ if (srna->description) srna->description = BLI_strdup(srna->description);
srna->flag |= STRUCT_FREE_POINTERS;
}
void RNA_def_struct_free_pointers(StructRNA *srna)
{
- if(srna->flag & STRUCT_FREE_POINTERS) {
- if(srna->identifier) MEM_freeN((void*)srna->identifier);
- if(srna->name) MEM_freeN((void*)srna->name);
- if(srna->description) MEM_freeN((void*)srna->description);
+ if (srna->flag & STRUCT_FREE_POINTERS) {
+ if (srna->identifier) MEM_freeN((void*)srna->identifier);
+ if (srna->name) MEM_freeN((void*)srna->name);
+ if (srna->description) MEM_freeN((void*)srna->description);
}
}
void RNA_def_func_duplicate_pointers(FunctionRNA *func)
{
- if(func->identifier) func->identifier= BLI_strdup(func->identifier);
- if(func->description) func->description= BLI_strdup(func->description);
+ if (func->identifier) func->identifier = BLI_strdup(func->identifier);
+ if (func->description) func->description = BLI_strdup(func->description);
func->flag |= FUNC_FREE_POINTERS;
}
void RNA_def_func_free_pointers(FunctionRNA *func)
{
- if(func->flag & FUNC_FREE_POINTERS) {
- if(func->identifier) MEM_freeN((void*)func->identifier);
- if(func->description) MEM_freeN((void*)func->description);
+ if (func->flag & FUNC_FREE_POINTERS) {
+ if (func->identifier) MEM_freeN((void*)func->identifier);
+ if (func->description) MEM_freeN((void*)func->description);
}
}
void RNA_def_property_duplicate_pointers(StructOrFunctionRNA *cont_, PropertyRNA *prop)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
EnumPropertyItem *earray;
float *farray;
int *iarray;
int a;
/* annoying since we just added this to a hash, could make this add the correct key to the hash in the first place */
- if(prop->identifier) {
- if(cont->prophash) {
+ if (prop->identifier) {
+ if (cont->prophash) {
BLI_ghash_remove(cont->prophash, (void*)prop->identifier, NULL, NULL);
- prop->identifier= BLI_strdup(prop->identifier);
+ prop->identifier = BLI_strdup(prop->identifier);
BLI_ghash_insert(cont->prophash, (void*)prop->identifier, prop);
}
else {
- prop->identifier= BLI_strdup(prop->identifier);
+ prop->identifier = BLI_strdup(prop->identifier);
}
}
- if(prop->name) prop->name= BLI_strdup(prop->name);
- if(prop->description) prop->description= BLI_strdup(prop->description);
+ if (prop->name) prop->name = BLI_strdup(prop->name);
+ if (prop->description) prop->description = BLI_strdup(prop->description);
- switch(prop->type) {
+ switch (prop->type) {
case PROP_BOOLEAN: {
- BoolPropertyRNA *bprop= (BoolPropertyRNA*)prop;
+ BoolPropertyRNA *bprop = (BoolPropertyRNA*)prop;
- if(bprop->defaultarray) {
- iarray= MEM_callocN(sizeof(int)*prop->totarraylength, "RNA_def_property_store");
+ if (bprop->defaultarray) {
+ iarray = MEM_callocN(sizeof(int)*prop->totarraylength, "RNA_def_property_store");
memcpy(iarray, bprop->defaultarray, sizeof(int)*prop->totarraylength);
- bprop->defaultarray= iarray;
+ bprop->defaultarray = iarray;
}
break;
}
case PROP_INT: {
- IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
+ IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
- if(iprop->defaultarray) {
- iarray= MEM_callocN(sizeof(int)*prop->totarraylength, "RNA_def_property_store");
+ if (iprop->defaultarray) {
+ iarray = MEM_callocN(sizeof(int)*prop->totarraylength, "RNA_def_property_store");
memcpy(iarray, iprop->defaultarray, sizeof(int)*prop->totarraylength);
- iprop->defaultarray= iarray;
+ iprop->defaultarray = iarray;
}
break;
}
case PROP_ENUM: {
- EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
+ EnumPropertyRNA *eprop = (EnumPropertyRNA*)prop;
- if(eprop->item) {
- earray= MEM_callocN(sizeof(EnumPropertyItem)*(eprop->totitem+1), "RNA_def_property_store"),
+ if (eprop->item) {
+ earray = MEM_callocN(sizeof(EnumPropertyItem)*(eprop->totitem+1), "RNA_def_property_store"),
memcpy(earray, eprop->item, sizeof(EnumPropertyItem)*(eprop->totitem+1));
- eprop->item= earray;
+ eprop->item = earray;
- for(a=0; a<eprop->totitem; a++) {
- if(eprop->item[a].identifier) eprop->item[a].identifier= BLI_strdup(eprop->item[a].identifier);
- if(eprop->item[a].name) eprop->item[a].name= BLI_strdup(eprop->item[a].name);
- if(eprop->item[a].description) eprop->item[a].description= BLI_strdup(eprop->item[a].description);
+ for (a = 0; a<eprop->totitem; a++) {
+ if (eprop->item[a].identifier) eprop->item[a].identifier = BLI_strdup(eprop->item[a].identifier);
+ if (eprop->item[a].name) eprop->item[a].name = BLI_strdup(eprop->item[a].name);
+ if (eprop->item[a].description) eprop->item[a].description = BLI_strdup(eprop->item[a].description);
}
}
break;
}
case PROP_FLOAT: {
- FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
+ FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
- if(fprop->defaultarray) {
- farray= MEM_callocN(sizeof(float)*prop->totarraylength, "RNA_def_property_store");
+ if (fprop->defaultarray) {
+ farray = MEM_callocN(sizeof(float)*prop->totarraylength, "RNA_def_property_store");
memcpy(farray, fprop->defaultarray, sizeof(float)*prop->totarraylength);
- fprop->defaultarray= farray;
+ fprop->defaultarray = farray;
}
break;
}
case PROP_STRING: {
- StringPropertyRNA *sprop= (StringPropertyRNA*)prop;
- if(sprop->defaultvalue) sprop->defaultvalue= BLI_strdup(sprop->defaultvalue);
+ StringPropertyRNA *sprop = (StringPropertyRNA*)prop;
+ if (sprop->defaultvalue) sprop->defaultvalue = BLI_strdup(sprop->defaultvalue);
break;
}
default:
@@ -2876,45 +2876,45 @@ void RNA_def_property_duplicate_pointers(StructOrFunctionRNA *cont_, PropertyRNA
void RNA_def_property_free_pointers(PropertyRNA *prop)
{
- if(prop->flag & PROP_FREE_POINTERS) {
+ if (prop->flag & PROP_FREE_POINTERS) {
int a;
- if(prop->identifier) MEM_freeN((void*)prop->identifier);
- if(prop->name) MEM_freeN((void*)prop->name);
- if(prop->description) MEM_freeN((void*)prop->description);
- if(prop->py_data) MEM_freeN(prop->py_data);
+ if (prop->identifier) MEM_freeN((void*)prop->identifier);
+ if (prop->name) MEM_freeN((void*)prop->name);
+ if (prop->description) MEM_freeN((void*)prop->description);
+ if (prop->py_data) MEM_freeN(prop->py_data);
- switch(prop->type) {
+ switch (prop->type) {
case PROP_BOOLEAN: {
- BoolPropertyRNA *bprop= (BoolPropertyRNA*)prop;
- if(bprop->defaultarray) MEM_freeN((void*)bprop->defaultarray);
+ BoolPropertyRNA *bprop = (BoolPropertyRNA*)prop;
+ if (bprop->defaultarray) MEM_freeN((void*)bprop->defaultarray);
break;
}
case PROP_INT: {
- IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
- if(iprop->defaultarray) MEM_freeN((void*)iprop->defaultarray);
+ IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
+ if (iprop->defaultarray) MEM_freeN((void*)iprop->defaultarray);
break;
}
case PROP_FLOAT: {
- FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
- if(fprop->defaultarray) MEM_freeN((void*)fprop->defaultarray);
+ FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
+ if (fprop->defaultarray) MEM_freeN((void*)fprop->defaultarray);
break;
}
case PROP_ENUM: {
- EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
+ EnumPropertyRNA *eprop = (EnumPropertyRNA*)prop;
- for(a=0; a<eprop->totitem; a++) {
- if(eprop->item[a].identifier) MEM_freeN((void*)eprop->item[a].identifier);
- if(eprop->item[a].name) MEM_freeN((void*)eprop->item[a].name);
- if(eprop->item[a].description) MEM_freeN((void*)eprop->item[a].description);
+ for (a = 0; a<eprop->totitem; a++) {
+ if (eprop->item[a].identifier) MEM_freeN((void*)eprop->item[a].identifier);
+ if (eprop->item[a].name) MEM_freeN((void*)eprop->item[a].name);
+ if (eprop->item[a].description) MEM_freeN((void*)eprop->item[a].description);
}
- if(eprop->item) MEM_freeN((void*)eprop->item);
+ if (eprop->item) MEM_freeN((void*)eprop->item);
break;
}
case PROP_STRING: {
- StringPropertyRNA *sprop= (StringPropertyRNA*)prop;
- if(sprop->defaultvalue) MEM_freeN((void*)sprop->defaultvalue);
+ StringPropertyRNA *sprop = (StringPropertyRNA*)prop;
+ if (sprop->defaultvalue) MEM_freeN((void*)sprop->defaultvalue);
break;
}
default:
@@ -2925,10 +2925,10 @@ void RNA_def_property_free_pointers(PropertyRNA *prop)
static void rna_def_property_free(StructOrFunctionRNA *cont_, PropertyRNA *prop)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
- if(prop->flag & PROP_RUNTIME) {
- if(cont->prophash)
+ if (prop->flag & PROP_RUNTIME) {
+ if (cont->prophash)
BLI_ghash_remove(cont->prophash, (void*)prop->identifier, NULL, NULL);
RNA_def_property_free_pointers(prop);
@@ -2942,12 +2942,12 @@ static void rna_def_property_free(StructOrFunctionRNA *cont_, PropertyRNA *prop)
/* note: only intended for removing dynamic props */
int RNA_def_property_free_identifier(StructOrFunctionRNA *cont_, const char *identifier)
{
- ContainerRNA *cont= cont_;
+ ContainerRNA *cont = cont_;
PropertyRNA *prop;
- for(prop= cont->properties.first; prop; prop= prop->next) {
- if(strcmp(prop->identifier, identifier)==0) {
- if(prop->flag & PROP_RUNTIME) {
+ for (prop = cont->properties.first; prop; prop = prop->next) {
+ if (strcmp(prop->identifier, identifier) == 0) {
+ if (prop->flag & PROP_RUNTIME) {
rna_def_property_free(cont_, prop);
return 1;
}
@@ -2962,7 +2962,7 @@ int RNA_def_property_free_identifier(StructOrFunctionRNA *cont_, const char *ide
const char *RNA_property_typename(PropertyType type)
{
- switch(type) {
+ switch (type) {
case PROP_BOOLEAN: return "PROP_BOOLEAN";
case PROP_INT: return "PROP_INT";
case PROP_FLOAT: return "PROP_FLOAT";
diff --git a/source/blender/makesrna/intern/rna_dynamicpaint.c b/source/blender/makesrna/intern/rna_dynamicpaint.c
index 95770685077..fafa3a72174 100644
--- a/source/blender/makesrna/intern/rna_dynamicpaint.c
+++ b/source/blender/makesrna/intern/rna_dynamicpaint.c
@@ -45,7 +45,7 @@ EnumPropertyItem prop_dynamicpaint_type_items[] = {
static char *rna_DynamicPaintCanvasSettings_path(PointerRNA *ptr)
{
DynamicPaintCanvasSettings *settings = (DynamicPaintCanvasSettings*)ptr->data;
- ModifierData *md= (ModifierData *)settings->pmd;
+ ModifierData *md = (ModifierData *)settings->pmd;
return BLI_sprintfN("modifiers[\"%s\"].canvas_settings", md->name);
}
@@ -53,7 +53,7 @@ static char *rna_DynamicPaintCanvasSettings_path(PointerRNA *ptr)
static char *rna_DynamicPaintBrushSettings_path(PointerRNA *ptr)
{
DynamicPaintBrushSettings *settings = (DynamicPaintBrushSettings*)ptr->data;
- ModifierData *md= (ModifierData *)settings->pmd;
+ ModifierData *md = (ModifierData *)settings->pmd;
return BLI_sprintfN("modifiers[\"%s\"].brush_settings", md->name);
}
@@ -61,7 +61,7 @@ static char *rna_DynamicPaintBrushSettings_path(PointerRNA *ptr)
static char *rna_DynamicPaintSurface_path(PointerRNA *ptr)
{
DynamicPaintSurface *surface = (DynamicPaintSurface*)ptr->data;
- ModifierData *md= (ModifierData *)surface->canvas->pmd;
+ ModifierData *md = (ModifierData *)surface->canvas->pmd;
return BLI_sprintfN("modifiers[\"%s\"].canvas_settings.canvas_surfaces[\"%s\"]", md->name, surface->name);
}
@@ -103,8 +103,8 @@ static void rna_DynamicPaintSurface_changePreview(Main *bmain, Scene *scene, Poi
/* since only one color surface can show preview at time
* disable preview on other surfaces*/
- for(; surface; surface=surface->next) {
- if(surface != act_surface)
+ for (; surface; surface = surface->next) {
+ if (surface != act_surface)
surface->flags &= ~MOD_DPAINT_PREVIEW;
}
rna_DynamicPaint_redoModifier(bmain, scene, ptr);
@@ -140,12 +140,12 @@ static void rna_DynamicPaint_resetDependancy(Main *bmain, Scene *scene, PointerR
static PointerRNA rna_PaintSurface_active_get(PointerRNA *ptr)
{
- DynamicPaintCanvasSettings *canvas= (DynamicPaintCanvasSettings*)ptr->data;
+ DynamicPaintCanvasSettings *canvas = (DynamicPaintCanvasSettings*)ptr->data;
DynamicPaintSurface *surface = canvas->surfaces.first;
- int id=0;
+ int id = 0;
- for(; surface; surface=surface->next) {
- if(id == canvas->active_sur)
+ for (; surface; surface = surface->next) {
+ if (id == canvas->active_sur)
return rna_pointer_inherit_refine(ptr, &RNA_DynamicPaintSurface, surface);
id++;
}
@@ -154,41 +154,41 @@ static PointerRNA rna_PaintSurface_active_get(PointerRNA *ptr)
static void rna_DynamicPaint_surfaces_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- DynamicPaintCanvasSettings *canvas= (DynamicPaintCanvasSettings*)ptr->data;
- //rna_iterator_array_begin(iter, (void*)canvas->surfaces, sizeof(PaintSurface), canvas->totsur, 0, 0);
+ DynamicPaintCanvasSettings *canvas = (DynamicPaintCanvasSettings*)ptr->data;
+ /*rna_iterator_array_begin(iter, (void*)canvas->surfaces, sizeof(PaintSurface), canvas->totsur, 0, 0); */
rna_iterator_listbase_begin(iter, &canvas->surfaces, NULL);
}
static int rna_Surface_active_point_index_get(PointerRNA *ptr)
{
- DynamicPaintCanvasSettings *canvas= (DynamicPaintCanvasSettings*)ptr->data;
+ DynamicPaintCanvasSettings *canvas = (DynamicPaintCanvasSettings*)ptr->data;
return canvas->active_sur;
}
static void rna_Surface_active_point_index_set(struct PointerRNA *ptr, int value)
{
- DynamicPaintCanvasSettings *canvas= (DynamicPaintCanvasSettings*)ptr->data;
+ DynamicPaintCanvasSettings *canvas = (DynamicPaintCanvasSettings*)ptr->data;
canvas->active_sur = value;
return;
}
static void rna_Surface_active_point_range(PointerRNA *ptr, int *min, int *max)
{
- DynamicPaintCanvasSettings *canvas= (DynamicPaintCanvasSettings*)ptr->data;
+ DynamicPaintCanvasSettings *canvas = (DynamicPaintCanvasSettings*)ptr->data;
- *min= 0;
- *max= BLI_countlist(&canvas->surfaces)-1;
+ *min = 0;
+ *max = BLI_countlist(&canvas->surfaces)-1;
}
/* uvlayer */
static void rna_DynamicPaint_uvlayer_set(PointerRNA *ptr, const char *value)
{
- DynamicPaintCanvasSettings *canvas= ((DynamicPaintSurface*)ptr->data)->canvas;
+ DynamicPaintCanvasSettings *canvas = ((DynamicPaintSurface*)ptr->data)->canvas;
DynamicPaintSurface *surface = canvas->surfaces.first;
- int id=0;
+ int id = 0;
- for(; surface; surface=surface->next) {
- if(id == canvas->active_sur) {
+ for (; surface; surface = surface->next) {
+ if (id == canvas->active_sur) {
rna_object_uvlayer_name_set(ptr, value, surface->uvlayer_name, sizeof(surface->uvlayer_name));
return;
}
@@ -199,7 +199,7 @@ static void rna_DynamicPaint_uvlayer_set(PointerRNA *ptr, const char *value)
/* is point cache used */
static int rna_DynamicPaint_is_cache_user_get(PointerRNA *ptr)
{
- DynamicPaintSurface *surface= (DynamicPaintSurface*)ptr->data;
+ DynamicPaintSurface *surface = (DynamicPaintSurface*)ptr->data;
return (surface->format != MOD_DPAINT_SURFACE_F_IMAGESEQ) ? 1 : 0;
}
@@ -213,11 +213,11 @@ static int rna_DynamicPaint_is_output_exists(DynamicPaintSurface *surface, Objec
static EnumPropertyItem *rna_DynamicPaint_surface_type_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
- DynamicPaintSurface *surface= (DynamicPaintSurface*)ptr->data;
+ DynamicPaintSurface *surface = (DynamicPaintSurface*)ptr->data;
- EnumPropertyItem *item= NULL;
- EnumPropertyItem tmp= {0, "", 0, "", ""};
- int totitem= 0;
+ EnumPropertyItem *item = NULL;
+ EnumPropertyItem tmp = {0, "", 0, "", ""};
+ int totitem = 0;
/* Paint type - available for all formats */
tmp.value = MOD_DPAINT_SURFACE_T_PAINT;
@@ -265,16 +265,16 @@ static void rna_def_canvas_surfaces(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "DynamicPaintSurfaces");
- srna= RNA_def_struct(brna, "DynamicPaintSurfaces", NULL);
+ srna = RNA_def_struct(brna, "DynamicPaintSurfaces", NULL);
RNA_def_struct_sdna(srna, "DynamicPaintCanvasSettings");
RNA_def_struct_ui_text(srna, "Canvas Surfaces", "Collection of Dynamic Paint Canvas surfaces");
- prop= RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_funcs(prop, "rna_Surface_active_point_index_get", "rna_Surface_active_point_index_set", "rna_Surface_active_point_range");
RNA_def_property_ui_text(prop, "Active Point Cache Index", "");
- prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "DynamicPaintSurface");
RNA_def_property_pointer_funcs(prop, "rna_PaintSurface_active_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Active Surface", "Active Dynamic Paint surface being displayed");
@@ -291,7 +291,7 @@ static void rna_def_canvas_surface(BlenderRNA *brna)
/* Surface format */
static EnumPropertyItem prop_dynamicpaint_surface_format[] = {
- //{MOD_DPAINT_SURFACE_F_PTEX, "PTEX", ICON_TEXTURE_SHADED, "Ptex", ""},
+ /*{MOD_DPAINT_SURFACE_F_PTEX, "PTEX", ICON_TEXTURE_SHADED, "Ptex", ""}, */
{MOD_DPAINT_SURFACE_F_VERTEX, "VERTEX", ICON_OUTLINER_DATA_MESH, "Vertex", ""},
{MOD_DPAINT_SURFACE_F_IMAGESEQ, "IMAGE", ICON_FILE_IMAGE, "Image Sequence", ""},
{0, NULL, 0, NULL, NULL}};
@@ -340,19 +340,19 @@ static void rna_def_canvas_surface(BlenderRNA *brna)
/* Surface */
- srna= RNA_def_struct(brna, "DynamicPaintSurface", NULL);
+ srna = RNA_def_struct(brna, "DynamicPaintSurface", NULL);
RNA_def_struct_sdna(srna, "DynamicPaintSurface");
RNA_def_struct_ui_text(srna, "Paint Surface", "A canvas surface layer");
RNA_def_struct_path_func(srna, "rna_DynamicPaintSurface_path");
- prop= RNA_def_property(srna, "surface_format", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "surface_format", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_sdna(prop, NULL, "format");
RNA_def_property_enum_items(prop, prop_dynamicpaint_surface_format);
RNA_def_property_ui_text(prop, "Format", "Surface Format");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaintSurfaces_changeFormat");
- prop= RNA_def_property(srna, "surface_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "surface_type", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_dynamicpaint_surface_type);
@@ -360,22 +360,22 @@ static void rna_def_canvas_surface(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Surface Type", "Surface Type");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaintSurface_changeType");
- prop= RNA_def_property(srna, "is_active", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_active", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_ACTIVE);
RNA_def_property_ui_text(prop, "Is Active", "Toggle whether surface is processed or ignored");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaint_redoModifier");
- prop= RNA_def_property(srna, "show_preview", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_preview", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_PREVIEW);
RNA_def_property_ui_text(prop, "Show Preview", "Display surface preview in 3D-views");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaintSurface_changePreview");
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "Surface name");
RNA_def_property_update(prop, NC_OBJECT, "rna_DynamicPaintSurface_uniqueName");
RNA_def_struct_name_property(srna, prop);
- prop= RNA_def_property(srna, "brush_group", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "brush_group", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Group");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Brush Group", "Only use brush objects from this group");
@@ -386,21 +386,21 @@ static void rna_def_canvas_surface(BlenderRNA *brna)
* Paint, wet and displace
*/
- prop= RNA_def_property(srna, "use_dissolve", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_dissolve", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_DISSOLVE);
RNA_def_property_ui_text(prop, "Dissolve", "Enable to make surface changes disappear over time");
- prop= RNA_def_property(srna, "dissolve_speed", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "dissolve_speed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "diss_speed");
RNA_def_property_range(prop, 1.0, 10000.0);
RNA_def_property_ui_range(prop, 1.0, 10000.0, 5, 0);
RNA_def_property_ui_text(prop, "Dissolve Speed", "Approximately in how many frames should dissolve happen");
- prop= RNA_def_property(srna, "use_drying", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_drying", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_USE_DRYING);
RNA_def_property_ui_text(prop, "Dry", "Enable to make surface wetness dry over time");
- prop= RNA_def_property(srna, "dry_speed", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "dry_speed", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1.0, 10000.0);
RNA_def_property_ui_range(prop, 1.0, 10000.0, 5, 0);
RNA_def_property_ui_text(prop, "Dry Speed", "Approximately in how many frames should drying happen");
@@ -408,18 +408,18 @@ static void rna_def_canvas_surface(BlenderRNA *brna)
/*
* Simulation settings
*/
- prop= RNA_def_property(srna, "image_resolution", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "image_resolution", PROP_INT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 16.0, 4096.0);
RNA_def_property_ui_range(prop, 16.0, 4096.0, 1, 0);
RNA_def_property_ui_text(prop, "Resolution", "Output image resolution");
- prop= RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "uvlayer_name");
RNA_def_property_ui_text(prop, "UV Map", "UV map name");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_DynamicPaint_uvlayer_set");
- prop= RNA_def_property(srna, "frame_start", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "start_frame");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 1.0, 9999.0);
@@ -427,7 +427,7 @@ static void rna_def_canvas_surface(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Start Frame", "Simulation start frame");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaintSurfaces_updateFrames");
- prop= RNA_def_property(srna, "frame_end", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_end", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "end_frame");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 1.0, 9999.0);
@@ -435,26 +435,26 @@ static void rna_def_canvas_surface(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "End Frame", "Simulation end frame");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaintSurfaces_updateFrames");
- prop= RNA_def_property(srna, "frame_substeps", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_substeps", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "substeps");
RNA_def_property_range(prop, 0.0, 20.0);
RNA_def_property_ui_range(prop, 0.0, 10, 1, 0);
RNA_def_property_ui_text(prop, "Sub-Steps", "Do extra frames between scene frames to ensure smooth motion");
- prop= RNA_def_property(srna, "use_antialiasing", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_antialiasing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_ANTIALIAS);
RNA_def_property_ui_text(prop, "Anti-aliasing", "Use 5x multisampling to smoothen paint edges");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaintSurface_reset");
- prop= RNA_def_property(srna, "brush_influence_scale", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "brush_influence_scale", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "influence_scale");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 2);
RNA_def_property_ui_text(prop, "Influence Scale", "Adjust influence brush objects have on this surface");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaint_redoModifier");
- prop= RNA_def_property(srna, "brush_radius_scale", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "brush_radius_scale", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "radius_scale");
RNA_def_property_range(prop, 0.0, 10.0);
RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 2);
@@ -465,97 +465,97 @@ static void rna_def_canvas_surface(BlenderRNA *brna)
* Initial Color
*/
- prop= RNA_def_property(srna, "init_color_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "init_color_type", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, prop_dynamicpaint_init_color_type);
RNA_def_property_ui_text(prop, "Initial Color", "");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW|ND_MODIFIER, "rna_DynamicPaintSurface_initialcolortype");
- prop= RNA_def_property(srna, "init_color", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "init_color", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Color", "Initial color of the surface");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW|ND_MODIFIER, "rna_DynamicPaintSurface_reset");
- prop= RNA_def_property(srna, "init_texture", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "init_texture", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Texture", "");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW|ND_MODIFIER, "rna_DynamicPaintSurface_reset");
- prop= RNA_def_property(srna, "init_layername", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "init_layername", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Data Layer", "");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW|ND_MODIFIER, "rna_DynamicPaintSurface_reset");
/*
* Effect Settings
*/
- prop= RNA_def_property(srna, "effect_ui", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "effect_ui", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, prop_dynamicpaint_effecttype);
RNA_def_property_ui_text(prop, "Effect Type", "");
- prop= RNA_def_property(srna, "use_dry_log", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_dry_log", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_DRY_LOG);
RNA_def_property_ui_text(prop, "Slow", "Use logarithmic drying (makes high values to dry faster than low values)");
- prop= RNA_def_property(srna, "use_dissolve_log", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_dissolve_log", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_DISSOLVE_LOG);
RNA_def_property_ui_text(prop, "Slow", "Use logarithmic dissolve (makes high values to fade faster than low values)");
- prop= RNA_def_property(srna, "use_spread", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_spread", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_boolean_sdna(prop, NULL, "effect", MOD_DPAINT_EFFECT_DO_SPREAD);
RNA_def_property_ui_text(prop, "Use Spread", "Process spread effect (spread wet paint around surface)");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaintSurface_reset");
- prop= RNA_def_property(srna, "spread_speed", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "spread_speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "spread_speed");
RNA_def_property_range(prop, 0.001, 10.0);
RNA_def_property_ui_range(prop, 0.01, 5.0, 1, 2);
RNA_def_property_ui_text(prop, "Spread Speed", "How fast spread effect moves on the canvas surface");
- prop= RNA_def_property(srna, "color_dry_threshold", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "color_dry_threshold", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "color_dry_threshold");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 2);
RNA_def_property_ui_text(prop, "Color Dry", "The wetness level when colors start to shift to the background");
- prop= RNA_def_property(srna, "color_spread_speed", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "color_spread_speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "color_spread_speed");
RNA_def_property_range(prop, 0.0, 2.0);
RNA_def_property_ui_range(prop, 0.0, 2.0, 1, 2);
RNA_def_property_ui_text(prop, "Color Spread", "How fast colors get mixed within wet paint");
- prop= RNA_def_property(srna, "use_drip", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_drip", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_boolean_sdna(prop, NULL, "effect", MOD_DPAINT_EFFECT_DO_DRIP);
RNA_def_property_ui_text(prop, "Use Drip", "Process drip effect (drip wet paint to gravity direction)");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaintSurface_reset");
- prop= RNA_def_property(srna, "use_shrink", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_shrink", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_boolean_sdna(prop, NULL, "effect", MOD_DPAINT_EFFECT_DO_SHRINK);
RNA_def_property_ui_text(prop, "Use Shrink", "Process shrink effect (shrink paint areas)");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaintSurface_reset");
- prop= RNA_def_property(srna, "shrink_speed", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "shrink_speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "shrink_speed");
RNA_def_property_range(prop, 0.001, 10.0);
RNA_def_property_ui_range(prop, 0.01, 5.0, 1, 2);
RNA_def_property_ui_text(prop, "Shrink Speed", "How fast shrink effect moves on the canvas surface");
- prop= RNA_def_property(srna, "effector_weights", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "effector_weights", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "EffectorWeights");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Effector Weights", "");
- prop= RNA_def_property(srna, "drip_velocity", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "drip_velocity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "drip_vel");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Velocity", "How much surface velocity affects dripping");
- prop= RNA_def_property(srna, "drip_acceleration", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "drip_acceleration", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "drip_acc");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
@@ -564,34 +564,34 @@ static void rna_def_canvas_surface(BlenderRNA *brna)
/*
* Output settings
*/
- prop= RNA_def_property(srna, "use_premultiply", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_premultiply", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_MULALPHA);
RNA_def_property_ui_text(prop, "Premultiply alpha", "Multiply color by alpha (recommended for Blender input)");
- prop= RNA_def_property(srna, "image_output_path", PROP_STRING, PROP_DIRPATH);
+ prop = RNA_def_property(srna, "image_output_path", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "image_output_path");
RNA_def_property_ui_text(prop, "Output Path", "Directory to save the textures");
/* output for primary surface data */
- prop= RNA_def_property(srna, "output_name_a", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "output_name_a", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "output_name");
RNA_def_property_ui_text(prop, "Output Name", "Name used to save output from this surface");
- prop= RNA_def_property(srna, "use_output_a", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_output_a", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_OUT1);
RNA_def_property_ui_text(prop, "Use Output", "Save this output layer");
/* output for secondary sufrace data */
- prop= RNA_def_property(srna, "output_name_b", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "output_name_b", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "output_name2");
RNA_def_property_ui_text(prop, "Output Name", "Name used to save output from this surface");
- prop= RNA_def_property(srna, "use_output_b", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_output_b", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_OUT2);
RNA_def_property_ui_text(prop, "Use Output", "Save this output layer");
- prop= RNA_def_property(srna, "preview_id", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "preview_id", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_sdna(prop, NULL, "preview_id");
RNA_def_property_enum_items(prop, prop_dynamicpaint_surface_preview);
@@ -601,22 +601,22 @@ static void rna_def_canvas_surface(BlenderRNA *brna)
/* to check if output name exists */
func = RNA_def_function(srna, "output_exists", "rna_DynamicPaint_is_output_exists");
RNA_def_function_ui_description(func, "Checks if surface output layer of given name exists");
- parm= RNA_def_pointer(func, "object", "Object", "", "");
+ parm = RNA_def_pointer(func, "object", "Object", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- parm= RNA_def_int(func, "index", 0, 0, 1, "Index", "", 0, 1);
+ parm = RNA_def_int(func, "index", 0, 0, 1, "Index", "", 0, 1);
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_boolean(func, "exists", 0, "", "");
+ parm = RNA_def_boolean(func, "exists", 0, "", "");
RNA_def_function_return(func, parm);
- prop= RNA_def_property(srna, "depth_clamp", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "depth_clamp", PROP_FLOAT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.00, 50.0);
RNA_def_property_ui_range(prop, 0.00, 5.0, 1, 2);
RNA_def_property_ui_text(prop, "Max Displace", "Maximum level of depth intersection in object space (use 0.0 to disable)");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaint_redoModifier");
- prop= RNA_def_property(srna, "displace_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "displace_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "disp_factor");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, -50.0, 50.0);
@@ -624,57 +624,57 @@ static void rna_def_canvas_surface(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Displace Factor", "Strength of displace when applied to the mesh");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaint_redoModifier");
- prop= RNA_def_property(srna, "image_fileformat", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "image_fileformat", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, prop_dynamicpaint_image_fileformat);
RNA_def_property_ui_text(prop, "File Format", "");
- prop= RNA_def_property(srna, "displace_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "displace_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "disp_type");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, prop_dynamicpaint_displace_type);
RNA_def_property_ui_text(prop, "Data Type", "");
- prop= RNA_def_property(srna, "use_incremental_displace", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_incremental_displace", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_DISP_INCREMENTAL);
RNA_def_property_ui_text(prop, "Incremental", "New displace is added cumulatively on top of existing");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaintSurface_reset");
/* wave simulator settings */
- prop= RNA_def_property(srna, "wave_damping", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "wave_damping", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_range(prop, 0.01, 1.0, 1, 2);
RNA_def_property_ui_text(prop, "Damping", "Wave damping factor");
- prop= RNA_def_property(srna, "wave_speed", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "wave_speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.01, 5.0);
RNA_def_property_ui_range(prop, 0.20, 4.0, 1, 2);
RNA_def_property_ui_text(prop, "Speed", "Wave propogation speed");
- prop= RNA_def_property(srna, "wave_timescale", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "wave_timescale", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.01, 3.0);
RNA_def_property_ui_range(prop, 0.01, 1.5, 1, 2);
RNA_def_property_ui_text(prop, "Timescale", "Wave time scaling factor");
- prop= RNA_def_property(srna, "wave_spring", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "wave_spring", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_range(prop, 0.01, 1.0, 1, 2);
RNA_def_property_ui_text(prop, "Spring", "Spring force that pulls water level back to zero");
- prop= RNA_def_property(srna, "use_wave_open_border", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_wave_open_border", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_WAVE_OPEN_BORDERS);
RNA_def_property_ui_text(prop, "Open Borders", "Pass waves through mesh edges");
/* cache */
- prop= RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "pointcache");
RNA_def_property_ui_text(prop, "Point Cache", "");
/* is cache used */
- prop= RNA_def_property(srna, "is_cache_user", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_cache_user", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_DynamicPaint_is_cache_user_get", NULL);
RNA_def_property_ui_text(prop, "Use Cache", "");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE|PROP_EDITABLE);
@@ -693,7 +693,7 @@ static void rna_def_dynamic_paint_canvas_settings(BlenderRNA *brna)
/*
* Surface Slots
*/
- prop= RNA_def_property(srna, "canvas_surfaces", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "canvas_surfaces", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_funcs(prop, "rna_DynamicPaint_surfaces_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", NULL, NULL, NULL, NULL);
RNA_def_property_struct_type(prop, "DynamicPaintSurface");
RNA_def_property_ui_text(prop, "Paint Surface List", "Paint surface list");
@@ -741,87 +741,87 @@ static void rna_def_dynamic_paint_brush_settings(BlenderRNA *brna)
/*
* Paint
*/
- prop= RNA_def_property(srna, "paint_color", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "paint_color", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "r");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Paint Color", "Color of the paint");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaint_redoModifier");
- prop= RNA_def_property(srna, "paint_alpha", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "paint_alpha", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "alpha");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_range(prop, 0.0, 1.0, 5, 2);
RNA_def_property_ui_text(prop, "Paint Alpha", "Paint alpha");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaint_redoModifier");
- prop= RNA_def_property(srna, "use_material", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_material", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_USE_MATERIAL);
RNA_def_property_ui_text(prop, "Use object material", "Use object material to define color and influence");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaint_redoModifier");
- prop= RNA_def_property(srna, "material", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "material", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "mat");
RNA_def_property_ui_text(prop, "Material", "Material to use (if not defined, material linked to the mesh is used)");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaint_redoModifier");
- prop= RNA_def_property(srna, "use_absolute_alpha", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_absolute_alpha", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_ABS_ALPHA);
RNA_def_property_ui_text(prop, "Absolute Alpha", "Only increase alpha value if paint alpha is higher than existing");
- prop= RNA_def_property(srna, "paint_wetness", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "paint_wetness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "wetness");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_range(prop, 0.0, 1.0, 5, 2);
RNA_def_property_ui_text(prop, "Paint Wetness", "Paint wetness, visible in wetmap (some effects only affect wet paint)");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaint_redoModifier");
- prop= RNA_def_property(srna, "use_paint_erase", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_paint_erase", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_ERASE);
RNA_def_property_ui_text(prop, "Erase Paint", "Erase / remove paint instead of adding it");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaint_redoModifier");
- prop= RNA_def_property(srna, "wave_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "wave_type", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, prop_dynamicpaint_brush_wave_type);
RNA_def_property_ui_text(prop, "Wave Type", "");
- prop= RNA_def_property(srna, "wave_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "wave_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, -2.0, 2.0);
RNA_def_property_ui_range(prop, -1.0, 1.0, 5, 2);
RNA_def_property_ui_text(prop, "Factor", "Multiplier for wave influence of this brush");
- prop= RNA_def_property(srna, "wave_clamp", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "wave_clamp", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.00, 50.0);
RNA_def_property_ui_range(prop, 0.00, 5.0, 1, 2);
RNA_def_property_ui_text(prop, "Clamp Waves", "Maximum level of surface intersection used to influence waves (use 0.0 to disable)");
- prop= RNA_def_property(srna, "use_smudge", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_smudge", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_DO_SMUDGE);
RNA_def_property_ui_text(prop, "Do Smudge", "Make this brush to smudge existing paint as it moves");
- prop= RNA_def_property(srna, "smudge_strength", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "smudge_strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_range(prop, 0.0, 1.0, 5, 2);
RNA_def_property_ui_text(prop, "Smudge Strength", "Smudge effect strength");
- prop= RNA_def_property(srna, "velocity_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "velocity_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max_velocity");
RNA_def_property_range(prop, 0.0001, 10.0);
RNA_def_property_ui_range(prop, 0.1, 2.0, 5, 2);
RNA_def_property_ui_text(prop, "Max Velocity", "Velocity considered as maximum influence (Blender units per frame)");
- prop= RNA_def_property(srna, "use_velocity_alpha", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_velocity_alpha", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_VELOCITY_ALPHA);
RNA_def_property_ui_text(prop, "Multiply Alpha", "Multiply brush influence by velocity color ramp alpha");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaint_redoModifier");
- prop= RNA_def_property(srna, "use_velocity_depth", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_velocity_depth", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_VELOCITY_DEPTH);
RNA_def_property_ui_text(prop, "Multiply Depth", "Multiply brush intersection depth (displace, waves) by velocity ramp alpha");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaint_redoModifier");
- prop= RNA_def_property(srna, "use_velocity_color", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_velocity_color", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_VELOCITY_COLOR);
RNA_def_property_ui_text(prop, "Replace Color", "Replace brush color by velocity color ramp");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaint_redoModifier");
@@ -829,49 +829,49 @@ static void rna_def_dynamic_paint_brush_settings(BlenderRNA *brna)
/*
* Paint Area / Collision
*/
- prop= RNA_def_property(srna, "paint_source", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "paint_source", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_sdna(prop, NULL, "collision");
RNA_def_property_enum_items(prop, prop_dynamicpaint_collisiontype);
RNA_def_property_ui_text(prop, "Paint Source", "");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaint_redoModifier");
- prop= RNA_def_property(srna, "paint_distance", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "paint_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "paint_distance");
RNA_def_property_range(prop, 0.0, 500.0);
RNA_def_property_ui_range(prop, 0.0, 500.0, 10, 3);
RNA_def_property_ui_text(prop, "Proximity Distance", "Maximum distance from brush to mesh surface to affect paint");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaint_redoModifier");
- prop= RNA_def_property(srna, "use_proximity_ramp_alpha", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_proximity_ramp_alpha", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_RAMP_ALPHA);
RNA_def_property_ui_text(prop, "Only Use Alpha", "Only read color ramp alpha");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaint_redoModifier");
- prop= RNA_def_property(srna, "proximity_falloff", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "proximity_falloff", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_sdna(prop, NULL, "proximity_falloff");
RNA_def_property_enum_items(prop, prop_dynamicpaint_prox_falloff);
RNA_def_property_ui_text(prop, "Falloff", "Proximity falloff type");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaint_redoModifier");
- prop= RNA_def_property(srna, "use_proximity_project", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_proximity_project", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_PROX_PROJECT);
RNA_def_property_ui_text(prop, "Project", "Brush is projected to canvas from defined direction within brush proximity");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaint_redoModifier");
- prop= RNA_def_property(srna, "ray_direction", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "ray_direction", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ray_dir");
RNA_def_property_enum_items(prop, prop_dynamicpaint_brush_ray_dir);
RNA_def_property_ui_text(prop, "Ray Direction", "Ray direction to use for projection (if brush object is located in that direction it's painted)");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaint_redoModifier");
- prop= RNA_def_property(srna, "invert_proximity", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_proximity", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_INVERSE_PROX);
RNA_def_property_ui_text(prop, "Inner Proximity", "Proximity falloff is applied inside the volume");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaint_redoModifier");
- prop= RNA_def_property(srna, "use_negative_volume", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_negative_volume", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_NEGATE_VOLUME);
RNA_def_property_ui_text(prop, "Negate Volume", "Negate influence inside the volume");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaint_redoModifier");
@@ -880,7 +880,7 @@ static void rna_def_dynamic_paint_brush_settings(BlenderRNA *brna)
/*
* Particle
*/
- prop= RNA_def_property(srna, "particle_system", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "particle_system", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "psys");
RNA_def_property_struct_type(prop, "ParticleSystem");
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -888,19 +888,19 @@ static void rna_def_dynamic_paint_brush_settings(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaint_resetDependancy");
- prop= RNA_def_property(srna, "use_particle_radius", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_particle_radius", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_PART_RAD);
RNA_def_property_ui_text(prop, "Use Particle Radius", "Use radius from particle settings");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaint_redoModifier");
- prop= RNA_def_property(srna, "solid_radius", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "solid_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "particle_radius");
RNA_def_property_range(prop, 0.01, 10.0);
RNA_def_property_ui_range(prop, 0.01, 2.0, 5, 3);
RNA_def_property_ui_text(prop, "Solid Radius", "Radius that will be painted solid");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaint_redoModifier");
- prop= RNA_def_property(srna, "smooth_radius", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "smooth_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "particle_smooth");
RNA_def_property_range(prop, 0.0, 10.0);
RNA_def_property_ui_range(prop, 0.0, 1.0, 5, 0);
@@ -911,13 +911,13 @@ static void rna_def_dynamic_paint_brush_settings(BlenderRNA *brna)
/*
* Color ramps
*/
- prop= RNA_def_property(srna, "paint_ramp", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "paint_ramp", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "paint_ramp");
RNA_def_property_struct_type(prop, "ColorRamp");
RNA_def_property_ui_text(prop, "Paint Color Ramp", "Color ramp used to define proximity falloff");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaint_redoModifier");
- prop= RNA_def_property(srna, "velocity_ramp", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "velocity_ramp", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "vel_ramp");
RNA_def_property_struct_type(prop, "ColorRamp");
RNA_def_property_ui_text(prop, "Velocity Color Ramp", "Color ramp used to define brush velocity effect");
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index b8e21040c63..88878a5332f 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -56,7 +56,7 @@ EnumPropertyItem fmodifier_type_items[] = {
{FMODIFIER_TYPE_CYCLES, "CYCLES", 0, "Cycles", ""},
{FMODIFIER_TYPE_NOISE, "NOISE", 0, "Noise", ""},
{FMODIFIER_TYPE_FILTER, "FILTER", 0, "Filter", ""},
- //{FMODIFIER_TYPE_PYTHON, "PYTHON", 0, "Python", ""}, // FIXME: not implemented yet!
+ /*{FMODIFIER_TYPE_PYTHON, "PYTHON", 0, "Python", ""}, *//* FIXME: not implemented yet! */
{FMODIFIER_TYPE_LIMITS, "LIMITS", 0, "Limits", ""},
{FMODIFIER_TYPE_STEPPED, "STEPPED", 0, "Stepped Interpolation", ""},
{0, NULL, 0, NULL, NULL}};
@@ -74,7 +74,7 @@ EnumPropertyItem beztriple_keyframe_type_items[] = {
static StructRNA *rna_FModifierType_refine(struct PointerRNA *ptr)
{
- FModifier *fcm= (FModifier *)ptr->data;
+ FModifier *fcm = (FModifier *)ptr->data;
switch (fcm->type) {
case FMODIFIER_TYPE_GENERATOR:
@@ -87,8 +87,8 @@ static StructRNA *rna_FModifierType_refine(struct PointerRNA *ptr)
return &RNA_FModifierCycles;
case FMODIFIER_TYPE_NOISE:
return &RNA_FModifierNoise;
- //case FMODIFIER_TYPE_FILTER:
- // return &RNA_FModifierFilter;
+ /*case FMODIFIER_TYPE_FILTER: */
+ /* return &RNA_FModifierFilter; */
case FMODIFIER_TYPE_PYTHON:
return &RNA_FModifierPython;
case FMODIFIER_TYPE_LIMITS:
@@ -108,12 +108,12 @@ static StructRNA *rna_FModifierType_refine(struct PointerRNA *ptr)
static void rna_ChannelDriver_update_data(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- ID *id= ptr->id.data;
- ChannelDriver *driver= ptr->data;
+ ID *id = ptr->id.data;
+ ChannelDriver *driver = ptr->data;
driver->flag &= ~DRIVER_FLAG_INVALID;
- // TODO: this really needs an update guard...
+ /* TODO: this really needs an update guard... */
DAG_scene_sort(bmain, scene);
DAG_id_tag_update(id, OB_RECALC_OB|OB_RECALC_DATA);
@@ -122,7 +122,7 @@ static void rna_ChannelDriver_update_data(Main *bmain, Scene *scene, PointerRNA
static void rna_ChannelDriver_update_expr(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- ChannelDriver *driver= ptr->data;
+ ChannelDriver *driver = ptr->data;
driver->flag |= DRIVER_FLAG_RECOMPILE;
rna_ChannelDriver_update_data(bmain, scene, ptr);
}
@@ -132,16 +132,16 @@ static void rna_DriverTarget_update_data(Main *bmain, Scene *scene, PointerRNA *
PointerRNA driverptr;
ChannelDriver *driver;
FCurve *fcu;
- AnimData *adt= BKE_animdata_from_id(ptr->id.data);
+ AnimData *adt = BKE_animdata_from_id(ptr->id.data);
/* find the driver this belongs to and update it */
- for (fcu=adt->drivers.first; fcu; fcu=fcu->next) {
- driver= fcu->driver;
+ for (fcu = adt->drivers.first; fcu; fcu = fcu->next) {
+ driver = fcu->driver;
fcu->flag &= ~FCURVE_DISABLED;
if (driver) {
- // FIXME: need to be able to search targets for required one...
- //BLI_findindex(&driver->targets, ptr->data) != -1)
+ /* FIXME: need to be able to search targets for required one... */
+ /*BLI_findindex(&driver->targets, ptr->data) != -1) */
RNA_pointer_create(ptr->id.data, &RNA_Driver, driver, &driverptr);
rna_ChannelDriver_update_data(bmain, scene, &driverptr);
return;
@@ -151,7 +151,7 @@ static void rna_DriverTarget_update_data(Main *bmain, Scene *scene, PointerRNA *
static void rna_DriverTarget_update_name(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- ChannelDriver *driver= ptr->data;
+ ChannelDriver *driver = ptr->data;
rna_DriverTarget_update_data(bmain, scene, ptr);
driver->flag |= DRIVER_FLAG_RENAMEVAR;
@@ -163,25 +163,25 @@ static void rna_DriverTarget_update_name(Main *bmain, Scene *scene, PointerRNA *
/* note: this function exists only to avoid id refcounting */
static void rna_DriverTarget_id_set(PointerRNA *ptr, PointerRNA value)
{
- DriverTarget *dtar= (DriverTarget*)ptr->data;
- dtar->id= value.data;
+ DriverTarget *dtar = (DriverTarget*)ptr->data;
+ dtar->id = value.data;
}
static StructRNA *rna_DriverTarget_id_typef(PointerRNA *ptr)
{
- DriverTarget *dtar= (DriverTarget*)ptr->data;
+ DriverTarget *dtar = (DriverTarget*)ptr->data;
return ID_code_to_RNA_type(dtar->idtype);
}
static int rna_DriverTarget_id_editable(PointerRNA *ptr)
{
- DriverTarget *dtar= (DriverTarget*)ptr->data;
+ DriverTarget *dtar = (DriverTarget*)ptr->data;
return (dtar->idtype)? PROP_EDITABLE : 0;
}
static int rna_DriverTarget_id_type_editable(PointerRNA *ptr)
{
- DriverTarget *dtar= (DriverTarget*)ptr->data;
+ DriverTarget *dtar = (DriverTarget*)ptr->data;
/* when the id-type can only be object, don't allow editing
* otherwise, there may be strange crashes
@@ -191,36 +191,36 @@ static int rna_DriverTarget_id_type_editable(PointerRNA *ptr)
static void rna_DriverTarget_id_type_set(PointerRNA *ptr, int value)
{
- DriverTarget *data= (DriverTarget*)(ptr->data);
+ DriverTarget *data = (DriverTarget*)(ptr->data);
/* check if ID-type is settable */
if ((data->flag & DTAR_FLAG_ID_OB_ONLY) == 0) {
/* change ID-type to the new type */
- data->idtype= value;
+ data->idtype = value;
}
else {
/* make sure ID-type is Object */
- data->idtype= ID_OB;
+ data->idtype = ID_OB;
}
/* clear the id-block if the type is invalid */
if ((data->id) && (GS(data->id->name) != data->idtype))
- data->id= NULL;
+ data->id = NULL;
}
static void rna_DriverTarget_RnaPath_get(PointerRNA *ptr, char *value)
{
- DriverTarget *dtar= (DriverTarget *)ptr->data;
+ DriverTarget *dtar = (DriverTarget *)ptr->data;
if (dtar->rna_path)
strcpy(value, dtar->rna_path);
else
- value[0]= '\0';
+ value[0] = '\0';
}
static int rna_DriverTarget_RnaPath_length(PointerRNA *ptr)
{
- DriverTarget *dtar= (DriverTarget *)ptr->data;
+ DriverTarget *dtar = (DriverTarget *)ptr->data;
if (dtar->rna_path)
return strlen(dtar->rna_path);
@@ -230,21 +230,21 @@ static int rna_DriverTarget_RnaPath_length(PointerRNA *ptr)
static void rna_DriverTarget_RnaPath_set(PointerRNA *ptr, const char *value)
{
- DriverTarget *dtar= (DriverTarget *)ptr->data;
+ DriverTarget *dtar = (DriverTarget *)ptr->data;
- // XXX in this case we need to be very careful, as this will require some new dependencies to be added!
+ /* XXX in this case we need to be very careful, as this will require some new dependencies to be added! */
if (dtar->rna_path)
MEM_freeN(dtar->rna_path);
if (value[0])
- dtar->rna_path= BLI_strdup(value);
- else
- dtar->rna_path= NULL;
+ dtar->rna_path = BLI_strdup(value);
+ else
+ dtar->rna_path = NULL;
}
static void rna_DriverVariable_type_set(PointerRNA *ptr, int value)
{
- DriverVar *dvar= (DriverVar *)ptr->data;
+ DriverVar *dvar = (DriverVar *)ptr->data;
/* call the API function for this */
driver_change_variable_type(dvar, value);
@@ -254,67 +254,67 @@ static void rna_DriverVariable_type_set(PointerRNA *ptr, int value)
static void rna_FKeyframe_handle1_get(PointerRNA *ptr, float *values)
{
- BezTriple *bezt= (BezTriple*)ptr->data;
+ BezTriple *bezt = (BezTriple*)ptr->data;
- values[0]= bezt->vec[0][0];
- values[1]= bezt->vec[0][1];
+ values[0] = bezt->vec[0][0];
+ values[1] = bezt->vec[0][1];
}
static void rna_FKeyframe_handle1_set(PointerRNA *ptr, const float *values)
{
- BezTriple *bezt= (BezTriple*)ptr->data;
+ BezTriple *bezt = (BezTriple*)ptr->data;
- bezt->vec[0][0]= values[0];
- bezt->vec[0][1]= values[1];
+ bezt->vec[0][0] = values[0];
+ bezt->vec[0][1] = values[1];
}
static void rna_FKeyframe_handle2_get(PointerRNA *ptr, float *values)
{
- BezTriple *bezt= (BezTriple*)ptr->data;
+ BezTriple *bezt = (BezTriple*)ptr->data;
- values[0]= bezt->vec[2][0];
- values[1]= bezt->vec[2][1];
+ values[0] = bezt->vec[2][0];
+ values[1] = bezt->vec[2][1];
}
static void rna_FKeyframe_handle2_set(PointerRNA *ptr, const float *values)
{
- BezTriple *bezt= (BezTriple*)ptr->data;
+ BezTriple *bezt = (BezTriple*)ptr->data;
- bezt->vec[2][0]= values[0];
- bezt->vec[2][1]= values[1];
+ bezt->vec[2][0] = values[0];
+ bezt->vec[2][1] = values[1];
}
static void rna_FKeyframe_ctrlpoint_get(PointerRNA *ptr, float *values)
{
- BezTriple *bezt= (BezTriple*)ptr->data;
+ BezTriple *bezt = (BezTriple*)ptr->data;
- values[0]= bezt->vec[1][0];
- values[1]= bezt->vec[1][1];
+ values[0] = bezt->vec[1][0];
+ values[1] = bezt->vec[1][1];
}
static void rna_FKeyframe_ctrlpoint_set(PointerRNA *ptr, const float *values)
{
- BezTriple *bezt= (BezTriple*)ptr->data;
+ BezTriple *bezt = (BezTriple*)ptr->data;
- bezt->vec[1][0]= values[0];
- bezt->vec[1][1]= values[1];
+ bezt->vec[1][0] = values[0];
+ bezt->vec[1][1] = values[1];
}
/* ****************************** */
static void rna_FCurve_RnaPath_get(PointerRNA *ptr, char *value)
{
- FCurve *fcu= (FCurve *)ptr->data;
+ FCurve *fcu = (FCurve *)ptr->data;
if (fcu->rna_path)
strcpy(value, fcu->rna_path);
else
- value[0]= '\0';
+ value[0] = '\0';
}
static int rna_FCurve_RnaPath_length(PointerRNA *ptr)
{
- FCurve *fcu= (FCurve *)ptr->data;
+ FCurve *fcu = (FCurve *)ptr->data;
if (fcu->rna_path)
return strlen(fcu->rna_path);
@@ -324,24 +324,24 @@ static int rna_FCurve_RnaPath_length(PointerRNA *ptr)
static void rna_FCurve_RnaPath_set(PointerRNA *ptr, const char *value)
{
- FCurve *fcu= (FCurve *)ptr->data;
+ FCurve *fcu = (FCurve *)ptr->data;
if (fcu->rna_path)
MEM_freeN(fcu->rna_path);
if (value[0]) {
- fcu->rna_path= BLI_strdup(value);
+ fcu->rna_path = BLI_strdup(value);
fcu->flag &= ~FCURVE_DISABLED;
}
- else
- fcu->rna_path= NULL;
+ else
+ fcu->rna_path = NULL;
}
static void rna_FCurve_group_set(PointerRNA *ptr, PointerRNA value)
{
ID *pid = (ID *)ptr->id.data;
ID *vid = (ID *)value.id.data;
- FCurve *fcu= ptr->data;
+ FCurve *fcu = ptr->data;
bAction *act = NULL;
/* get action */
@@ -355,7 +355,7 @@ static void rna_FCurve_group_set(PointerRNA *ptr, PointerRNA value)
return;
}
- if (GS(pid->name)==ID_AC && GS(vid->name)==ID_AC) {
+ if (GS(pid->name) == ID_AC && GS(vid->name) == ID_AC) {
/* the ID given is the action already - usually when F-Curve is obtained from an action's pointer */
act = (bAction *)pid;
}
@@ -369,7 +369,7 @@ static void rna_FCurve_group_set(PointerRNA *ptr, PointerRNA value)
if (fcu->grp == value.data) {
/* nothing to do */
printf("ERROR: F-Curve already belongs to this group\n");
- return;
+ return;
}
/* can only change group if we have info about the action the F-Curve is in
@@ -390,7 +390,7 @@ static void rna_FCurve_group_set(PointerRNA *ptr, PointerRNA value)
action_groups_remove_channel(act, fcu);
/* add the F-Curve back to the action now in the right place */
- // TODO: make the api function handle the case where there isn't any group to assign to
+ /* TODO: make the api function handle the case where there isn't any group to assign to */
if (value.data) {
/* add to its group using API function, which makes sure everything goes ok */
action_groups_add_channel(act, value.data, fcu);
@@ -409,7 +409,7 @@ DriverVar *rna_Driver_new_variable(ChannelDriver *driver)
void rna_Driver_remove_variable(ChannelDriver *driver, ReportList *reports, DriverVar *dvar)
{
- if(BLI_findindex(&driver->variables, dvar) == -1) {
+ if (BLI_findindex(&driver->variables, dvar) == -1) {
BKE_report(reports, RPT_ERROR, "Variable does not exist in this driver");
return;
}
@@ -420,14 +420,14 @@ void rna_Driver_remove_variable(ChannelDriver *driver, ReportList *reports, Driv
static PointerRNA rna_FCurve_active_modifier_get(PointerRNA *ptr)
{
- FCurve *fcu= (FCurve*)ptr->data;
- FModifier *fcm= find_active_fmodifier(&fcu->modifiers);
+ FCurve *fcu = (FCurve*)ptr->data;
+ FModifier *fcm = find_active_fmodifier(&fcu->modifiers);
return rna_pointer_inherit_refine(ptr, &RNA_FModifier, fcm);
}
static void rna_FCurve_active_modifier_set(PointerRNA *ptr, PointerRNA value)
{
- FCurve *fcu= (FCurve*)ptr->data;
+ FCurve *fcu = (FCurve*)ptr->data;
set_active_fmodifier(&fcu->modifiers, (FModifier *)value.data);
}
@@ -438,7 +438,7 @@ static FModifier *rna_FCurve_modifiers_new(FCurve *fcu, int type)
static void rna_FCurve_modifiers_remove(FCurve *fcu, ReportList *reports, FModifier *fcm)
{
- if(BLI_findindex(&fcu->modifiers, fcm) == -1) {
+ if (BLI_findindex(&fcu->modifiers, fcm) == -1) {
BKE_reportf(reports, RPT_ERROR, "F-Curve modifier '%s' not found in F-Curve", fcm->name);
return;
}
@@ -447,7 +447,7 @@ static void rna_FCurve_modifiers_remove(FCurve *fcu, ReportList *reports, FModif
static void rna_FModifier_active_set(PointerRNA *ptr, int UNUSED(value))
{
- FModifier *fm= (FModifier*)ptr->data;
+ FModifier *fm = (FModifier*)ptr->data;
/* don't toggle, always switch on */
fm->flag |= FMODIFIER_FLAG_ACTIVE;
@@ -455,38 +455,38 @@ static void rna_FModifier_active_set(PointerRNA *ptr, int UNUSED(value))
static void rna_FModifier_start_frame_range(PointerRNA *ptr, float *min, float *max)
{
- FModifier *fcm= (FModifier*)ptr->data;
+ FModifier *fcm = (FModifier*)ptr->data;
- *min= MINAFRAMEF;
- *max= (fcm->flag & FMODIFIER_FLAG_RANGERESTRICT)? fcm->efra : MAXFRAMEF;
+ *min = MINAFRAMEF;
+ *max = (fcm->flag & FMODIFIER_FLAG_RANGERESTRICT)? fcm->efra : MAXFRAMEF;
}
static void rna_FModifier_end_frame_range(PointerRNA *ptr, float *min, float *max)
{
- FModifier *fcm= (FModifier*)ptr->data;
+ FModifier *fcm = (FModifier*)ptr->data;
- *min= (fcm->flag & FMODIFIER_FLAG_RANGERESTRICT)? fcm->sfra : MINAFRAMEF;
- *max= MAXFRAMEF;
+ *min = (fcm->flag & FMODIFIER_FLAG_RANGERESTRICT)? fcm->sfra : MINAFRAMEF;
+ *max = MAXFRAMEF;
}
static void rna_FModifier_blending_range(PointerRNA *ptr, float *min, float *max)
{
- FModifier *fcm= (FModifier*)ptr->data;
+ FModifier *fcm = (FModifier*)ptr->data;
- *min= 0.0f;
- *max= fcm->efra - fcm->sfra;
+ *min = 0.0f;
+ *max = fcm->efra - fcm->sfra;
}
static void rna_FModifier_active_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- FModifier *fm, *fmo= (FModifier*)ptr->data;
+ FModifier *fm, *fmo = (FModifier*)ptr->data;
/* clear active state of other FModifiers in this list */
- for (fm=fmo->prev; fm; fm=fm->prev)
+ for (fm = fmo->prev; fm; fm = fm->prev)
{
fm->flag &= ~FMODIFIER_FLAG_ACTIVE;
}
- for (fm=fmo->next; fm; fm=fm->next)
+ for (fm = fmo->next; fm; fm = fm->next)
{
fm->flag &= ~FMODIFIER_FLAG_ACTIVE;
}
@@ -495,114 +495,114 @@ static void rna_FModifier_active_update(Main *UNUSED(bmain), Scene *UNUSED(scene
static int rna_FModifierGenerator_coefficients_get_length(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
{
- FModifier *fcm= (FModifier*)ptr->data;
- FMod_Generator *gen= fcm->data;
+ FModifier *fcm = (FModifier*)ptr->data;
+ FMod_Generator *gen = fcm->data;
- if(gen)
- length[0]= gen->arraysize;
+ if (gen)
+ length[0] = gen->arraysize;
else
- length[0]= 100; /* for raw_access, untested */
+ length[0] = 100; /* for raw_access, untested */
return length[0];
}
static void rna_FModifierGenerator_coefficients_get(PointerRNA *ptr, float *values)
{
- FModifier *fcm= (FModifier*)ptr->data;
- FMod_Generator *gen= fcm->data;
+ FModifier *fcm = (FModifier*)ptr->data;
+ FMod_Generator *gen = fcm->data;
memcpy(values, gen->coefficients, gen->arraysize * sizeof(float));
}
static void rna_FModifierGenerator_coefficients_set(PointerRNA *ptr, const float *values)
{
- FModifier *fcm= (FModifier*)ptr->data;
- FMod_Generator *gen= fcm->data;
+ FModifier *fcm = (FModifier*)ptr->data;
+ FMod_Generator *gen = fcm->data;
memcpy(gen->coefficients, values, gen->arraysize * sizeof(float));
}
static void rna_FModifierLimits_minx_range(PointerRNA *ptr, float *min, float *max)
{
- FModifier *fcm= (FModifier*)ptr->data;
- FMod_Limits *data= fcm->data;
+ FModifier *fcm = (FModifier*)ptr->data;
+ FMod_Limits *data = fcm->data;
- *min= MINAFRAMEF;
- *max= (data->flag & FCM_LIMIT_XMAX)? data->rect.xmax : MAXFRAMEF;
+ *min = MINAFRAMEF;
+ *max = (data->flag & FCM_LIMIT_XMAX)? data->rect.xmax : MAXFRAMEF;
}
static void rna_FModifierLimits_maxx_range(PointerRNA *ptr, float *min, float *max)
{
- FModifier *fcm= (FModifier*)ptr->data;
- FMod_Limits *data= fcm->data;
+ FModifier *fcm = (FModifier*)ptr->data;
+ FMod_Limits *data = fcm->data;
- *min= (data->flag & FCM_LIMIT_XMIN)? data->rect.xmin : MINAFRAMEF;
- *max= MAXFRAMEF;
+ *min = (data->flag & FCM_LIMIT_XMIN)? data->rect.xmin : MINAFRAMEF;
+ *max = MAXFRAMEF;
}
static void rna_FModifierLimits_miny_range(PointerRNA *ptr, float *min, float *max)
{
- FModifier *fcm= (FModifier*)ptr->data;
- FMod_Limits *data= fcm->data;
+ FModifier *fcm = (FModifier*)ptr->data;
+ FMod_Limits *data = fcm->data;
- *min= -FLT_MAX;
- *max= (data->flag & FCM_LIMIT_YMAX)? data->rect.ymax : FLT_MAX;
+ *min = -FLT_MAX;
+ *max = (data->flag & FCM_LIMIT_YMAX)? data->rect.ymax : FLT_MAX;
}
static void rna_FModifierLimits_maxy_range(PointerRNA *ptr, float *min, float *max)
{
- FModifier *fcm= (FModifier*)ptr->data;
- FMod_Limits *data= fcm->data;
+ FModifier *fcm = (FModifier*)ptr->data;
+ FMod_Limits *data = fcm->data;
- *min= (data->flag & FCM_LIMIT_YMIN)? data->rect.ymin : -FLT_MAX;
- *max= FLT_MAX;
+ *min = (data->flag & FCM_LIMIT_YMIN)? data->rect.ymin : -FLT_MAX;
+ *max = FLT_MAX;
}
static void rna_FModifierStepped_start_frame_range(PointerRNA *ptr, float *min, float *max)
{
- FModifier *fcm= (FModifier*)ptr->data;
- FMod_Stepped *data= fcm->data;
+ FModifier *fcm = (FModifier*)ptr->data;
+ FMod_Stepped *data = fcm->data;
- *min= MINAFRAMEF;
- *max= (data->flag & FCM_STEPPED_NO_AFTER)? data->end_frame : MAXFRAMEF;
+ *min = MINAFRAMEF;
+ *max = (data->flag & FCM_STEPPED_NO_AFTER)? data->end_frame : MAXFRAMEF;
}
static void rna_FModifierStepped_end_frame_range(PointerRNA *ptr, float *min, float *max)
{
- FModifier *fcm= (FModifier*)ptr->data;
- FMod_Stepped *data= fcm->data;
+ FModifier *fcm = (FModifier*)ptr->data;
+ FMod_Stepped *data = fcm->data;
- *min= (data->flag & FCM_STEPPED_NO_BEFORE)? data->start_frame : MINAFRAMEF;
- *max= MAXFRAMEF;
+ *min = (data->flag & FCM_STEPPED_NO_BEFORE)? data->start_frame : MINAFRAMEF;
+ *max = MAXFRAMEF;
}
static BezTriple *rna_FKeyframe_points_insert(FCurve *fcu, float frame, float value, int flag)
{
- int index= insert_vert_fcurve(fcu, frame, value, flag);
+ int index = insert_vert_fcurve(fcu, frame, value, flag);
return ((fcu->bezt) && (index >= 0))? (fcu->bezt + index) : NULL;
}
static void rna_FKeyframe_points_add(FCurve *fcu, int tot)
{
- if(tot > 0) {
+ if (tot > 0) {
BezTriple *bezt;
- if(fcu->totvert) {
- BezTriple *nbezt= MEM_callocN(sizeof(BezTriple) * (fcu->totvert + tot), "rna_FKeyframe_points_add");
+ if (fcu->totvert) {
+ BezTriple *nbezt = MEM_callocN(sizeof(BezTriple) * (fcu->totvert + tot), "rna_FKeyframe_points_add");
memcpy(nbezt, fcu->bezt, sizeof(BezTriple) * fcu->totvert);
MEM_freeN(fcu->bezt);
- fcu->bezt= nbezt;
+ fcu->bezt = nbezt;
}
else {
- fcu->bezt= MEM_callocN(sizeof(BezTriple) * tot, "rna_FKeyframe_points_add");
+ fcu->bezt = MEM_callocN(sizeof(BezTriple) * tot, "rna_FKeyframe_points_add");
}
- bezt= fcu->bezt + fcu->totvert;
+ bezt = fcu->bezt + fcu->totvert;
fcu->totvert += tot;
- while(tot--) {
+ while (tot--) {
/* defaults, no userprefs gives predictable results for API */
- bezt->f1= bezt->f2= bezt->f3= SELECT;
- bezt->ipo= BEZT_IPO_BEZ;
- bezt->h1= bezt->h2= HD_AUTO_ANIM;
+ bezt->f1 = bezt->f2 = bezt->f3 = SELECT;
+ bezt->ipo = BEZT_IPO_BEZ;
+ bezt->h1 = bezt->h2 = HD_AUTO_ANIM;
bezt++;
}
}
@@ -610,7 +610,7 @@ static void rna_FKeyframe_points_add(FCurve *fcu, int tot)
static void rna_FKeyframe_points_remove(FCurve *fcu, ReportList *reports, BezTriple *bezt, int do_fast)
{
- int index= (int)(bezt - fcu->bezt);
+ int index = (int)(bezt - fcu->bezt);
if (index < 0 || index >= fcu->totvert) {
BKE_report(reports, RPT_ERROR, "Keyframe not in F-Curve");
return;
@@ -636,34 +636,34 @@ static void rna_def_fmodifier_generator(BlenderRNA *brna)
{FCM_GENERATOR_POLYNOMIAL_FACTORISED, "POLYNOMIAL_FACTORISED", 0, "Factorized Polynomial", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "FModifierGenerator", "FModifier");
+ srna = RNA_def_struct(brna, "FModifierGenerator", "FModifier");
RNA_def_struct_ui_text(srna, "Generator F-Modifier", "Deterministically generate values for the modified F-Curve");
RNA_def_struct_sdna_from(srna, "FMod_Generator", "data");
/* define common props */
- prop= RNA_def_property(srna, "use_additive", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_additive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FCM_GENERATOR_ADDITIVE);
RNA_def_property_ui_text(prop, "Additive",
"Values generated by this modifier are applied on top of "
"the existing values instead of overwriting them");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- // XXX this has a special validation func
- prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ /* XXX this has a special validation func */
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, generator_mode_items);
RNA_def_property_ui_text(prop, "Mode", "Type of generator to use");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
/* order of the polynomial */
- // XXX this has a special validation func
- prop= RNA_def_property(srna, "poly_order", PROP_INT, PROP_NONE);
+ /* XXX this has a special validation func */
+ prop = RNA_def_property(srna, "poly_order", PROP_INT, PROP_NONE);
RNA_def_property_ui_text(prop, "Polynomial Order",
"The highest power of 'x' for this polynomial (number of coefficients - 1)");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
/* coefficients array */
- prop= RNA_def_property(srna, "coefficients", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "coefficients", PROP_FLOAT, PROP_NONE);
RNA_def_property_array(prop, 32);
RNA_def_property_flag(prop, PROP_DYNAMIC);
RNA_def_property_dynamic_array_funcs(prop, "rna_FModifierGenerator_coefficients_get_length");
@@ -688,36 +688,36 @@ static void rna_def_fmodifier_function_generator(BlenderRNA *brna)
{5, "SINC", 0, "Normalised Sine", "sin(x) / x"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "FModifierFunctionGenerator", "FModifier");
+ srna = RNA_def_struct(brna, "FModifierFunctionGenerator", "FModifier");
RNA_def_struct_ui_text(srna, "Built-In Function F-Modifier", "Generate values using a Built-In Function");
RNA_def_struct_sdna_from(srna, "FMod_FunctionGenerator", "data");
/* coefficients */
- prop= RNA_def_property(srna, "amplitude", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "amplitude", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_text(prop, "Amplitude", "Scale factor determining the maximum/minimum values");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "phase_multiplier", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "phase_multiplier", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_text(prop, "Phase Multiplier", "Scale factor determining the 'speed' of the function");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "phase_offset", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "phase_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_text(prop, "Phase Offset", "Constant factor to offset time by for function");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "value_offset", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "value_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_text(prop, "Value Offset", "Constant factor to offset values by");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
/* flags */
- prop= RNA_def_property(srna, "use_additive", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_additive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FCM_GENERATOR_ADDITIVE);
RNA_def_property_ui_text(prop, "Additive",
"Values generated by this modifier are applied on top of "
"the existing values instead of overwriting them");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "function_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "function_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Type", "Type of built-in function to use");
@@ -731,7 +731,7 @@ static void rna_def_fmodifier_envelope_ctrl(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "FModifierEnvelopeControlPoint", NULL);
+ srna = RNA_def_struct(brna, "FModifierEnvelopeControlPoint", NULL);
RNA_def_struct_ui_text(srna, "Envelope Control Point", "Control point for envelope F-Modifier");
RNA_def_struct_sdna(srna, "FCM_EnvelopeData");
@@ -739,24 +739,24 @@ static void rna_def_fmodifier_envelope_ctrl(BlenderRNA *brna)
* - for now, these are allowed to go past each other, so that we can have inverted action
* - technically, the range is limited by the settings in the envelope-modifier data, not here...
*/
- prop= RNA_def_property(srna, "min", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "min");
RNA_def_property_ui_text(prop, "Minimum Value", "Lower bound of envelope at this control-point");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max");
RNA_def_property_ui_text(prop, "Maximum Value", "Upper bound of envelope at this control-point");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
/* Frame */
- prop= RNA_def_property(srna, "frame", PROP_FLOAT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "time");
RNA_def_property_ui_text(prop, "Frame", "Frame this control-point occurs on");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- // TODO:
- // - selection flags (not implemented in UI yet though)
+ /* TODO: */
+ /* - selection flags (not implemented in UI yet though) */
}
static void rna_def_fmodifier_envelope(BlenderRNA *brna)
@@ -764,28 +764,28 @@ static void rna_def_fmodifier_envelope(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "FModifierEnvelope", "FModifier");
+ srna = RNA_def_struct(brna, "FModifierEnvelope", "FModifier");
RNA_def_struct_ui_text(srna, "Envelope F-Modifier", "Scale the values of the modified F-Curve");
RNA_def_struct_sdna_from(srna, "FMod_Envelope", "data");
/* Collections */
- prop= RNA_def_property(srna, "control_points", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "control_points", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "data", "totvert");
RNA_def_property_struct_type(prop, "FModifierEnvelopeControlPoint");
RNA_def_property_ui_text(prop, "Control Points", "Control points defining the shape of the envelope");
/* Range Settings */
- prop= RNA_def_property(srna, "reference_value", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "reference_value", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "midval");
RNA_def_property_ui_text(prop, "Reference Value", "Value that envelope's influence is centered around / based on");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "default_min", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "default_min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "min");
RNA_def_property_ui_text(prop, "Default Minimum", "Lower distance from Reference Value for 1:1 default influence");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "default_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "default_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max");
RNA_def_property_ui_text(prop, "Default Maximum", "Upper distance from Reference Value for 1:1 default influence");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
@@ -807,30 +807,30 @@ static void rna_def_fmodifier_cycles(BlenderRNA *brna)
"Alternate between forward and reverse playback of keyframe range"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "FModifierCycles", "FModifier");
+ srna = RNA_def_struct(brna, "FModifierCycles", "FModifier");
RNA_def_struct_ui_text(srna, "Cycles F-Modifier", "Repeat the values of the modified F-Curve");
RNA_def_struct_sdna_from(srna, "FMod_Cycles", "data");
/* before */
- prop= RNA_def_property(srna, "mode_before", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mode_before", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "before_mode");
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Before Mode", "Cycling mode to use before first keyframe");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "cycles_before", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "cycles_before", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "before_cycles");
RNA_def_property_ui_text(prop, "Before Cycles", "Maximum number of cycles to allow before first keyframe (0 = infinite)");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
/* after */
- prop= RNA_def_property(srna, "mode_after", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mode_after", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "after_mode");
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "After Mode", "Cycling mode to use after last keyframe");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "cycles_after", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "cycles_after", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "after_cycles");
RNA_def_property_ui_text(prop, "After Cycles", "Maximum number of cycles to allow after last keyframe (0 = infinite)");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
@@ -841,9 +841,9 @@ static void rna_def_fmodifier_cycles(BlenderRNA *brna)
static void rna_def_fmodifier_python(BlenderRNA *brna)
{
StructRNA *srna;
- //PropertyRNA *prop;
+ /*PropertyRNA *prop; */
- srna= RNA_def_struct(brna, "FModifierPython", "FModifier");
+ srna = RNA_def_struct(brna, "FModifierPython", "FModifier");
RNA_def_struct_ui_text(srna, "Python F-Modifier", "Perform user-defined operation on the modified F-Curve");
RNA_def_struct_sdna_from(srna, "FMod_Python", "data");
}
@@ -855,49 +855,49 @@ static void rna_def_fmodifier_limits(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "FModifierLimits", "FModifier");
+ srna = RNA_def_struct(brna, "FModifierLimits", "FModifier");
RNA_def_struct_ui_text(srna, "Limit F-Modifier", "Limit the time/value ranges of the modified F-Curve");
RNA_def_struct_sdna_from(srna, "FMod_Limits", "data");
- prop= RNA_def_property(srna, "use_min_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_min_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FCM_LIMIT_XMIN);
RNA_def_property_ui_text(prop, "Minimum X", "Use the minimum X value");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "use_min_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_min_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FCM_LIMIT_YMIN);
RNA_def_property_ui_text(prop, "Minimum Y", "Use the minimum Y value");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "use_max_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_max_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FCM_LIMIT_XMAX);
RNA_def_property_ui_text(prop, "Maximum X", "Use the maximum X value");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "use_max_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_max_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FCM_LIMIT_YMAX);
RNA_def_property_ui_text(prop, "Maximum Y", "Use the maximum Y value");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "min_x", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "min_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rect.xmin");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_FModifierLimits_minx_range");
RNA_def_property_ui_text(prop, "Minimum X", "Lowest X value to allow");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "min_y", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "min_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rect.ymin");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_FModifierLimits_miny_range");
RNA_def_property_ui_text(prop, "Minimum Y", "Lowest Y value to allow");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "max_x", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "max_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rect.xmax");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_FModifierLimits_maxx_range");
RNA_def_property_ui_text(prop, "Maximum X", "Highest X value to allow");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "max_y", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "max_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rect.ymax");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_FModifierLimits_maxy_range");
RNA_def_property_ui_text(prop, "Maximum Y", "Highest Y value to allow");
@@ -918,32 +918,32 @@ static void rna_def_fmodifier_noise(BlenderRNA *brna)
{FCM_NOISE_MODIF_MULTIPLY, "MULTIPLY", 0, "Multiply", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "FModifierNoise", "FModifier");
+ srna = RNA_def_struct(brna, "FModifierNoise", "FModifier");
RNA_def_struct_ui_text(srna, "Noise F-Modifier", "Give randomness to the modified F-Curve");
RNA_def_struct_sdna_from(srna, "FMod_Noise", "data");
- prop= RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "modification");
RNA_def_property_enum_items(prop, prop_modification_items);
RNA_def_property_ui_text(prop, "Blend Type", "Method of modifying the existing F-Curve");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_ui_text(prop, "Scale", "Scaling (in time) of the noise");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "strength");
RNA_def_property_ui_text(prop, "Strength", "Amplitude of the noise - the amount that it modifies the underlying curve");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "phase", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "phase", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "phase");
RNA_def_property_ui_text(prop, "Phase", "A random seed for the noise effect");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "depth", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "depth", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "depth");
RNA_def_property_ui_text(prop, "Depth", "Amount of fine level detail present in the noise");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
@@ -957,41 +957,41 @@ static void rna_def_fmodifier_stepped(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "FModifierStepped", "FModifier");
+ srna = RNA_def_struct(brna, "FModifierStepped", "FModifier");
RNA_def_struct_ui_text(srna, "Stepped Interpolation F-Modifier",
"Hold each interpolated value from the F-Curve for several frames without changing the timing");
RNA_def_struct_sdna_from(srna, "FMod_Stepped", "data");
/* properties */
- prop= RNA_def_property(srna, "frame_step", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_step", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "step_size");
RNA_def_property_ui_text(prop, "Step Size", "Number of frames to hold each value");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "frame_offset", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "offset");
RNA_def_property_ui_text(prop, "Offset",
"Reference number of frames before frames get held "
"(use to get hold for '1-3' vs '5-7' holding patterns)");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "use_frame_start", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_frame_start", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FCM_STEPPED_NO_BEFORE);
RNA_def_property_ui_text(prop, "Use Start Frame", "Restrict modifier to only act after its 'start' frame");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "use_frame_end", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_frame_end", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FCM_STEPPED_NO_AFTER);
RNA_def_property_ui_text(prop, "Use End Frame", "Restrict modifier to only act before its 'end' frame");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "start_frame");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_FModifierStepped_start_frame_range");
RNA_def_property_ui_text(prop, "Start Frame", "Frame that modifier's influence starts (if applicable)");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "frame_end", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_end", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "end_frame");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_FModifierStepped_end_frame_range");
RNA_def_property_ui_text(prop, "End Frame", "Frame that modifier's influence ends (if applicable)");
@@ -1007,43 +1007,43 @@ static void rna_def_fmodifier(BlenderRNA *brna)
PropertyRNA *prop;
/* base struct definition */
- srna= RNA_def_struct(brna, "FModifier", NULL);
+ srna = RNA_def_struct(brna, "FModifier", NULL);
RNA_def_struct_refine_func(srna, "rna_FModifierType_refine");
RNA_def_struct_ui_text(srna, "F-Modifier", "Modifier for values of F-Curve");
-#if 0 // XXX not used yet
+#if 0 /* XXX not used yet */
/* name */
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
RNA_def_property_ui_text(prop, "Name", "Short description of F-Curve Modifier");
-#endif // XXX not used yet
+#endif /* XXX not used yet */
/* type */
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_enum_items(prop, fmodifier_type_items);
RNA_def_property_ui_text(prop, "Type", "F-Curve Modifier Type");
/* settings */
- prop= RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FMODIFIER_FLAG_EXPANDED);
RNA_def_property_ui_text(prop, "Expanded", "F-Curve Modifier's panel is expanded in UI");
RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
- prop= RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FMODIFIER_FLAG_MUTED);
RNA_def_property_ui_text(prop, "Muted", "F-Curve Modifier will not be evaluated");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
RNA_def_property_ui_icon(prop, ICON_MUTE_IPO_OFF, 1);
- prop= RNA_def_property(srna, "is_valid", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_valid", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", FMODIFIER_FLAG_DISABLED);
RNA_def_property_ui_text(prop, "Disabled", "F-Curve Modifier has invalid settings and will not be evaluated");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
- // TODO: setting this to true must ensure that all others in stack are turned off too...
- prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
+ /* TODO: setting this to true must ensure that all others in stack are turned off too... */
+ prop = RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FMODIFIER_FLAG_ACTIVE);
RNA_def_property_ui_text(prop, "Active", "F-Curve Modifier is the one being edited ");
RNA_def_property_boolean_funcs(prop, NULL, "rna_FModifier_active_set");
@@ -1051,52 +1051,52 @@ static void rna_def_fmodifier(BlenderRNA *brna)
RNA_def_property_ui_icon(prop, ICON_RADIOBUT_OFF, 1);
/* restricted range */
- prop= RNA_def_property(srna, "use_restricted_range", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_restricted_range", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FMODIFIER_FLAG_RANGERESTRICT);
RNA_def_property_ui_text(prop, "Restrict Frame Range",
"F-Curve Modifier is only applied for the specified frame range to help "
"mask off effects in order to chain them");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
- RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1); // XXX: depends on UI implementation
+ RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1); /* XXX: depends on UI implementation */
- prop= RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sfra");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_FModifier_start_frame_range");
RNA_def_property_ui_text(prop, "Start Frame", "Frame that modifier's influence starts (if Restrict Frame Range is in use)");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
- prop= RNA_def_property(srna, "frame_end", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_end", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "efra");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_FModifier_end_frame_range");
RNA_def_property_ui_text(prop, "End Frame", "Frame that modifier's influence ends (if Restrict Frame Range is in use)");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
- prop= RNA_def_property(srna, "blend_in", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "blend_in", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "blendin");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_FModifier_blending_range");
RNA_def_property_ui_text(prop, "Blend In", "Number of frames from start frame for influence to take effect");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
- prop= RNA_def_property(srna, "blend_out", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "blend_out", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "blendout");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_FModifier_blending_range");
RNA_def_property_ui_text(prop, "Blend Out", "Number of frames from end frame for influence to fade out");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
/* influence */
- prop= RNA_def_property(srna, "use_influence", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_influence", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FMODIFIER_FLAG_USEINFLUENCE);
RNA_def_property_ui_text(prop, "Use Influence", "F-Curve Modifier's effects will be tempered by a default factor");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
- RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1); // XXX: depends on UI implementation
+ RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1); /* XXX: depends on UI implementation */
- prop= RNA_def_property(srna, "influence", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "influence", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "influence");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_ui_text(prop, "Influence", "Amount of influence F-Curve Modifier will have when not fading in/out");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
-}
+}
/* *********************** */
@@ -1125,11 +1125,11 @@ static void rna_def_drivertarget(BlenderRNA *brna)
"Transforms include effects of constraints but not parenting/restpose"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "DriverTarget", NULL);
+ srna = RNA_def_struct(brna, "DriverTarget", NULL);
RNA_def_struct_ui_text(srna, "Driver Target", "Source of input values for driver variables");
/* Target Properties - ID-block to Drive */
- prop= RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ID");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_editable_func(prop, "rna_DriverTarget_id_editable");
@@ -1139,7 +1139,7 @@ static void rna_def_drivertarget(BlenderRNA *brna)
"ID-block that the specific property used can be found from (id_type property must be set first)");
RNA_def_property_update(prop, 0, "rna_DriverTarget_update_data");
- prop= RNA_def_property(srna, "id_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "id_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "idtype");
RNA_def_property_enum_items(prop, id_type_items);
RNA_def_property_enum_default(prop, ID_OB);
@@ -1149,24 +1149,24 @@ static void rna_def_drivertarget(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_DriverTarget_update_data");
/* Target Properties - Property to Drive */
- prop= RNA_def_property(srna, "data_path", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "data_path", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_DriverTarget_RnaPath_get", "rna_DriverTarget_RnaPath_length",
"rna_DriverTarget_RnaPath_set");
RNA_def_property_ui_text(prop, "Data Path", "RNA Path (from ID-block) to property used");
RNA_def_property_update(prop, 0, "rna_DriverTarget_update_data");
- prop= RNA_def_property(srna, "bone_target", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "bone_target", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "pchan_name");
RNA_def_property_ui_text(prop, "Bone Name", "Name of PoseBone to use as target");
RNA_def_property_update(prop, 0, "rna_DriverTarget_update_data");
- prop= RNA_def_property(srna, "transform_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "transform_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "transChan");
RNA_def_property_enum_items(prop, prop_trans_chan_items);
RNA_def_property_ui_text(prop, "Type", "Driver variable type");
RNA_def_property_update(prop, 0, "rna_DriverTarget_update_data");
- prop= RNA_def_property(srna, "transform_space", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "transform_space", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, prop_local_space_items);
RNA_def_property_ui_text(prop, "Transform Space", "Space in which transforms are used");
@@ -1186,28 +1186,28 @@ static void rna_def_drivervar(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "DriverVariable", NULL);
+ srna = RNA_def_struct(brna, "DriverVariable", NULL);
RNA_def_struct_sdna(srna, "DriverVar");
RNA_def_struct_ui_text(srna, "Driver Variable", "Variable from some source/target for driver relationship");
/* Variable Name */
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
RNA_def_property_ui_text(prop, "Name",
"Name to use in scripted expressions/functions (no spaces or dots are allowed, "
"and must start with a letter)");
- RNA_def_property_update(prop, 0, "rna_DriverTarget_update_name"); // XXX
+ RNA_def_property_update(prop, 0, "rna_DriverTarget_update_name"); /* XXX */
/* Enums */
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_DriverVariable_type_set", NULL);
RNA_def_property_ui_text(prop, "Type", "Driver variable type");
- RNA_def_property_update(prop, 0, "rna_ChannelDriver_update_data"); // XXX
+ RNA_def_property_update(prop, 0, "rna_ChannelDriver_update_data"); /* XXX */
/* Targets */
- // TODO: for nicer api, only expose the relevant props via subclassing, instead of exposing the collection of targets
- prop= RNA_def_property(srna, "targets", PROP_COLLECTION, PROP_NONE);
+ /* TODO: for nicer api, only expose the relevant props via subclassing, instead of exposing the collection of targets */
+ prop = RNA_def_property(srna, "targets", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "targets", "num_targets");
RNA_def_property_struct_type(prop, "DriverTarget");
RNA_def_property_ui_text(prop, "Targets", "Sources of input data for evaluating this variable");
@@ -1218,30 +1218,30 @@ static void rna_def_drivervar(BlenderRNA *brna)
static void rna_def_channeldriver_variables(BlenderRNA *brna, PropertyRNA *cprop)
{
StructRNA *srna;
-// PropertyRNA *prop;
+/* PropertyRNA *prop; */
FunctionRNA *func;
PropertyRNA *parm;
RNA_def_property_srna(cprop, "ChannelDriverVariables");
- srna= RNA_def_struct(brna, "ChannelDriverVariables", NULL);
+ srna = RNA_def_struct(brna, "ChannelDriverVariables", NULL);
RNA_def_struct_sdna(srna, "ChannelDriver");
RNA_def_struct_ui_text(srna, "ChannelDriver Variables", "Collection of channel driver Variables");
/* add variable */
- func= RNA_def_function(srna, "new", "rna_Driver_new_variable");
+ func = RNA_def_function(srna, "new", "rna_Driver_new_variable");
RNA_def_function_ui_description(func, "Add a new variable for the driver");
/* return type */
- parm= RNA_def_pointer(func, "var", "DriverVariable", "", "Newly created Driver Variable");
+ parm = RNA_def_pointer(func, "var", "DriverVariable", "", "Newly created Driver Variable");
RNA_def_function_return(func, parm);
/* remove variable */
- func= RNA_def_function(srna, "remove", "rna_Driver_remove_variable");
+ func = RNA_def_function(srna, "remove", "rna_Driver_remove_variable");
RNA_def_function_ui_description(func, "Remove an existing variable from the driver");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
/* target to remove */
- parm= RNA_def_pointer(func, "variable", "DriverVariable", "", "Variable to remove from the driver");
+ parm = RNA_def_pointer(func, "variable", "DriverVariable", "", "Variable to remove from the driver");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
@@ -1258,37 +1258,37 @@ static void rna_def_channeldriver(BlenderRNA *brna)
{DRIVER_TYPE_MAX, "MAX", 0, "Maximum Value", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "Driver", NULL);
+ srna = RNA_def_struct(brna, "Driver", NULL);
RNA_def_struct_sdna(srna, "ChannelDriver");
RNA_def_struct_ui_text(srna, "Driver", "Driver for the value of a setting based on an external value");
RNA_def_struct_ui_icon(srna, ICON_DRIVER);
/* Enums */
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Type", "Driver type");
RNA_def_property_update(prop, 0, "rna_ChannelDriver_update_data");
/* String values */
- prop= RNA_def_property(srna, "expression", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "expression", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Expression", "Expression to use for Scripted Expression");
RNA_def_property_update(prop, 0, "rna_ChannelDriver_update_expr");
/* Collections */
- prop= RNA_def_property(srna, "variables", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "variables", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "variables", NULL);
RNA_def_property_struct_type(prop, "DriverVariable");
RNA_def_property_ui_text(prop, "Variables", "Properties acting as inputs for this driver");
rna_def_channeldriver_variables(brna, prop);
/* Settings */
- prop= RNA_def_property(srna, "show_debug_info", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_debug_info", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", DRIVER_FLAG_SHOWDEBUG);
RNA_def_property_ui_text(prop, "Show Debug Info",
"Show intermediate values for the driver calculations to allow debugging of drivers");
/* State Info (for Debugging) */
- prop= RNA_def_property(srna, "is_valid", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_valid", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", DRIVER_FLAG_INVALID);
RNA_def_property_ui_text(prop, "Invalid", "Driver could not be evaluated in past, so should be skipped");
@@ -1304,18 +1304,18 @@ static void rna_def_fpoint(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "FCurveSample", NULL);
+ srna = RNA_def_struct(brna, "FCurveSample", NULL);
RNA_def_struct_sdna(srna, "FPoint");
RNA_def_struct_ui_text(srna, "F-Curve Sample", "Sample point for F-Curve");
/* Boolean values */
- prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", 1);
RNA_def_property_ui_text(prop, "Select", "Selection status");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL);
/* Vector value */
- prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_COORDS); /* keyframes are dimensionless */
+ prop = RNA_def_property(srna, "co", PROP_FLOAT, PROP_COORDS); /* keyframes are dimensionless */
RNA_def_property_float_sdna(prop, NULL, "vec");
RNA_def_property_array(prop, 2);
RNA_def_property_ui_text(prop, "Point", "Point coordinates");
@@ -1331,40 +1331,40 @@ static void rna_def_fkeyframe(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Keyframe", NULL);
+ srna = RNA_def_struct(brna, "Keyframe", NULL);
RNA_def_struct_sdna(srna, "BezTriple");
RNA_def_struct_ui_text(srna, "Keyframe", "Bezier curve point with two handles defining a Keyframe on an F-Curve");
/* Boolean values */
- prop= RNA_def_property(srna, "select_left_handle", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select_left_handle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "f1", 0);
RNA_def_property_ui_text(prop, "Handle 1 selected", "Left handle selection status");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL);
- prop= RNA_def_property(srna, "select_right_handle", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select_right_handle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "f3", 0);
RNA_def_property_ui_text(prop, "Handle 2 selected", "Right handle selection status");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL);
- prop= RNA_def_property(srna, "select_control_point", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select_control_point", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "f2", 0);
RNA_def_property_ui_text(prop, "Select", "Control point selection status");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL);
/* Enums */
- prop= RNA_def_property(srna, "handle_left_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "handle_left_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "h1");
RNA_def_property_enum_items(prop, keyframe_handle_type_items);
RNA_def_property_ui_text(prop, "Left Handle Type", "Handle types");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
- prop= RNA_def_property(srna, "handle_right_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "handle_right_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "h2");
RNA_def_property_enum_items(prop, keyframe_handle_type_items);
RNA_def_property_ui_text(prop, "Right Handle Type", "Handle types");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
- prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ipo");
RNA_def_property_enum_items(prop, beztriple_interpolation_mode_items);
RNA_def_property_ui_text(prop, "Interpolation",
@@ -1372,26 +1372,26 @@ static void rna_def_fkeyframe(BlenderRNA *brna)
"this Keyframe until the next Keyframe");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "hide");
RNA_def_property_enum_items(prop, beztriple_keyframe_type_items);
RNA_def_property_ui_text(prop, "Type", "Type of keyframe (for visual purposes only)");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
/* Vector values */
- prop= RNA_def_property(srna, "handle_left", PROP_FLOAT, PROP_COORDS); /* keyframes are dimensionless */
+ prop = RNA_def_property(srna, "handle_left", PROP_FLOAT, PROP_COORDS); /* keyframes are dimensionless */
RNA_def_property_array(prop, 2);
RNA_def_property_float_funcs(prop, "rna_FKeyframe_handle1_get", "rna_FKeyframe_handle1_set", NULL);
RNA_def_property_ui_text(prop, "Left Handle", "Coordinates of the left handle (before the control point)");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_COORDS); /* keyframes are dimensionless */
+ prop = RNA_def_property(srna, "co", PROP_FLOAT, PROP_COORDS); /* keyframes are dimensionless */
RNA_def_property_array(prop, 2);
RNA_def_property_float_funcs(prop, "rna_FKeyframe_ctrlpoint_get", "rna_FKeyframe_ctrlpoint_set", NULL);
RNA_def_property_ui_text(prop, "Control Point", "Coordinates of the control point");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "handle_right", PROP_FLOAT, PROP_COORDS); /* keyframes are dimensionless */
+ prop = RNA_def_property(srna, "handle_right", PROP_FLOAT, PROP_COORDS); /* keyframes are dimensionless */
RNA_def_property_array(prop, 2);
RNA_def_property_float_funcs(prop, "rna_FKeyframe_handle2_get", "rna_FKeyframe_handle2_set", NULL);
RNA_def_property_ui_text(prop, "Right Handle", "Coordinates of the right handle (after the control point)");
@@ -1408,33 +1408,33 @@ static void rna_def_fcurve_modifiers(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *parm;
RNA_def_property_srna(cprop, "FCurveModifiers");
- srna= RNA_def_struct(brna, "FCurveModifiers", NULL);
+ srna = RNA_def_struct(brna, "FCurveModifiers", NULL);
RNA_def_struct_sdna(srna, "FCurve");
RNA_def_struct_ui_text(srna, "F-Curve Modifiers", "Collection of F-Curve Modifiers");
/* Collection active property */
- prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "FModifier");
RNA_def_property_pointer_funcs(prop, "rna_FCurve_active_modifier_get", "rna_FCurve_active_modifier_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Active F-Curve Modifier", "Active F-Curve Modifier");
/* Constraint collection */
- func= RNA_def_function(srna, "new", "rna_FCurve_modifiers_new");
+ func = RNA_def_function(srna, "new", "rna_FCurve_modifiers_new");
RNA_def_function_ui_description(func, "Add a constraint to this object");
/* return type */
- parm= RNA_def_pointer(func, "fmodifier", "FModifier", "", "New fmodifier");
+ parm = RNA_def_pointer(func, "fmodifier", "FModifier", "", "New fmodifier");
RNA_def_function_return(func, parm);
/* object to add */
- parm= RNA_def_enum(func, "type", fmodifier_type_items, 1, "", "Constraint type to add");
+ parm = RNA_def_enum(func, "type", fmodifier_type_items, 1, "", "Constraint type to add");
RNA_def_property_flag(parm, PROP_REQUIRED);
- func= RNA_def_function(srna, "remove", "rna_FCurve_modifiers_remove");
+ func = RNA_def_function(srna, "remove", "rna_FCurve_modifiers_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Remove a modifier from this F-Curve");
/* modifier to remove */
- parm= RNA_def_pointer(func, "modifier", "FModifier", "", "Removed modifier");
+ parm = RNA_def_pointer(func, "modifier", "FModifier", "", "Removed modifier");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
@@ -1453,30 +1453,30 @@ static void rna_def_fcurve_keyframe_points(BlenderRNA *brna, PropertyRNA *cprop)
{0, NULL, 0, NULL, NULL}};
RNA_def_property_srna(cprop, "FCurveKeyframePoints");
- srna= RNA_def_struct(brna, "FCurveKeyframePoints", NULL);
+ srna = RNA_def_struct(brna, "FCurveKeyframePoints", NULL);
RNA_def_struct_sdna(srna, "FCurve");
RNA_def_struct_ui_text(srna, "Keyframe Points", "Collection of keyframe points");
- func= RNA_def_function(srna, "insert", "rna_FKeyframe_points_insert");
+ func = RNA_def_function(srna, "insert", "rna_FKeyframe_points_insert");
RNA_def_function_ui_description(func, "Add a keyframe point to a F-Curve");
- parm= RNA_def_float(func, "frame", 0.0f, -FLT_MAX, FLT_MAX, "", "X Value of this keyframe point", -FLT_MAX, FLT_MAX);
+ parm = RNA_def_float(func, "frame", 0.0f, -FLT_MAX, FLT_MAX, "", "X Value of this keyframe point", -FLT_MAX, FLT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_float(func, "value", 0.0f, -FLT_MAX, FLT_MAX, "", "Y Value of this keyframe point", -FLT_MAX, FLT_MAX);
+ parm = RNA_def_float(func, "value", 0.0f, -FLT_MAX, FLT_MAX, "", "Y Value of this keyframe point", -FLT_MAX, FLT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_enum_flag(func, "options", keyframe_flag_items, 0, "", "Keyframe options");
- parm= RNA_def_pointer(func, "keyframe", "Keyframe", "", "Newly created keyframe");
+ parm = RNA_def_pointer(func, "keyframe", "Keyframe", "", "Newly created keyframe");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "add", "rna_FKeyframe_points_add");
+ func = RNA_def_function(srna, "add", "rna_FKeyframe_points_add");
RNA_def_function_ui_description(func, "Add a keyframe point to a F-Curve");
RNA_def_int(func, "count", 1, 1, INT_MAX, "Number", "Number of points to add to the spline", 1, INT_MAX);
- func= RNA_def_function(srna, "remove", "rna_FKeyframe_points_remove");
+ func = RNA_def_function(srna, "remove", "rna_FKeyframe_points_remove");
RNA_def_function_ui_description(func, "Remove keyframe from an F-Curve");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "keyframe", "Keyframe", "", "Keyframe to remove");
+ parm = RNA_def_pointer(func, "keyframe", "Keyframe", "", "Keyframe to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
/* optional */
RNA_def_boolean(func, "fast", 0, "Fast", "Fast keyframe removal to avoid recalculating the curve each time");
@@ -1499,23 +1499,23 @@ static void rna_def_fcurve(BlenderRNA *brna)
{FCURVE_COLOR_CUSTOM, "CUSTOM", 0, "User Defined", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "FCurve", NULL);
+ srna = RNA_def_struct(brna, "FCurve", NULL);
RNA_def_struct_ui_text(srna, "F-Curve", "F-Curve defining values of a period of time");
RNA_def_struct_ui_icon(srna, ICON_ANIM_DATA);
/* Enums */
- prop= RNA_def_property(srna, "extrapolation", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "extrapolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "extend");
RNA_def_property_enum_items(prop, prop_mode_extend_items);
RNA_def_property_ui_text(prop, "Extrapolation", "");
- RNA_def_property_update(prop, NC_ANIMATION, NULL); // XXX need an update callback for this so that animation gets evaluated
+ RNA_def_property_update(prop, NC_ANIMATION, NULL); /* XXX need an update callback for this so that animation gets evaluated */
/* Pointers */
- prop= RNA_def_property(srna, "driver", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "driver", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Driver", "Channel Driver (only set for Driver F-Curves)");
- prop= RNA_def_property(srna, "group", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "group", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "grp");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Group", "Action Group that this F-Curve belongs to");
@@ -1523,86 +1523,86 @@ static void rna_def_fcurve(BlenderRNA *brna)
RNA_def_property_update(prop, NC_ANIMATION, NULL);
/* Path + Array Index */
- prop= RNA_def_property(srna, "data_path", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "data_path", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_FCurve_RnaPath_get", "rna_FCurve_RnaPath_length", "rna_FCurve_RnaPath_set");
RNA_def_property_ui_text(prop, "Data Path", "RNA Path to property affected by F-Curve");
- RNA_def_property_update(prop, NC_ANIMATION, NULL); // XXX need an update callback for this to that animation gets evaluated
+ RNA_def_property_update(prop, NC_ANIMATION, NULL); /* XXX need an update callback for this to that animation gets evaluated */
/* called 'index' when given as function arg */
- prop= RNA_def_property(srna, "array_index", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "array_index", PROP_INT, PROP_NONE);
RNA_def_property_ui_text(prop, "RNA Array Index", "Index to the specific property affected by F-Curve if applicable");
- RNA_def_property_update(prop, NC_ANIMATION, NULL); // XXX need an update callback for this so that animation gets evaluated
+ RNA_def_property_update(prop, NC_ANIMATION, NULL); /* XXX need an update callback for this so that animation gets evaluated */
/* Color */
- prop= RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_mode_color_items);
RNA_def_property_ui_text(prop, "Color Mode", "Method used to determine color of F-Curve in Graph Editor");
RNA_def_property_update(prop, NC_ANIMATION, NULL);
- prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_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 of the F-Curve in the Graph Editor");
RNA_def_property_update(prop, NC_ANIMATION, NULL);
/* Flags */
- prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FCURVE_SELECTED);
RNA_def_property_ui_text(prop, "Select", "F-Curve is selected for editing");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL);
- prop= RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FCURVE_PROTECTED);
RNA_def_property_ui_text(prop, "Lock", "F-Curve's settings cannot be edited");
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FCURVE_MUTED);
RNA_def_property_ui_text(prop, "Muted", "F-Curve is not evaluated");
RNA_def_property_update(prop, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", FCURVE_VISIBLE);
RNA_def_property_ui_text(prop, "Hide", "F-Curve and its keyframes are hidden in the Graph Editor graphs");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
/* State Info (for Debugging) */
- prop= RNA_def_property(srna, "is_valid", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_valid", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", FCURVE_DISABLED);
RNA_def_property_ui_text(prop, "Valid",
"False when F-Curve could not be evaluated in past, so should be skipped when evaluating");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
/* Collections */
- prop= RNA_def_property(srna, "sampled_points", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "sampled_points", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "fpt", "totvert");
RNA_def_property_struct_type(prop, "FCurveSample");
RNA_def_property_ui_text(prop, "Sampled Points", "Sampled animation data");
- prop= RNA_def_property(srna, "keyframe_points", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "keyframe_points", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "bezt", "totvert");
RNA_def_property_struct_type(prop, "Keyframe");
RNA_def_property_ui_text(prop, "Keyframes", "User-editable keyframes");
rna_def_fcurve_keyframe_points(brna, prop);
- prop= RNA_def_property(srna, "modifiers", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "modifiers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "FModifier");
RNA_def_property_ui_text(prop, "Modifiers", "Modifiers affecting the shape of the F-Curve");
rna_def_fcurve_modifiers(brna, prop);
/* Functions */
- func= RNA_def_function(srna, "evaluate", "evaluate_fcurve"); /* calls the C/API direct */
+ func = RNA_def_function(srna, "evaluate", "evaluate_fcurve"); /* calls the C/API direct */
RNA_def_function_ui_description(func, "Evaluate F-Curve");
- parm= RNA_def_float(func, "frame", 1.0f, -FLT_MAX, FLT_MAX, "Frame", "Evaluate F-Curve at given frame", -FLT_MAX, FLT_MAX);
+ parm = RNA_def_float(func, "frame", 1.0f, -FLT_MAX, FLT_MAX, "Frame", "Evaluate F-Curve at given frame", -FLT_MAX, FLT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return value */
- parm= RNA_def_float(func, "position", 0, -FLT_MAX, FLT_MAX, "Position", "F-Curve position", -FLT_MAX, FLT_MAX);
+ parm = RNA_def_float(func, "position", 0, -FLT_MAX, FLT_MAX, "Position", "F-Curve position", -FLT_MAX, FLT_MAX);
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "range", "rna_fcurve_range");
+ func = RNA_def_function(srna, "range", "rna_fcurve_range");
RNA_def_function_ui_description(func, "Get the time extents for F-Curve");
/* return value */
- parm= RNA_def_float_vector(func, "range", 2, NULL, -FLT_MAX, FLT_MAX, "Range", "Min/Max values", -FLT_MAX, FLT_MAX);
+ parm = RNA_def_float_vector(func, "range", 2, NULL, -FLT_MAX, FLT_MAX, "Range", "Min/Max values", -FLT_MAX, FLT_MAX);
RNA_def_property_flag(parm, PROP_THICK_WRAP);
RNA_def_function_output(func, parm);
}
diff --git a/source/blender/makesrna/intern/rna_fcurve_api.c b/source/blender/makesrna/intern/rna_fcurve_api.c
index 50698757ecb..4f596dd2b7d 100644
--- a/source/blender/makesrna/intern/rna_fcurve_api.c
+++ b/source/blender/makesrna/intern/rna_fcurve_api.c
@@ -49,8 +49,8 @@
void RNA_api_drivers(StructRNA *srna)
{
-// FunctionRNA *func;
-// PropertyRNA *parm;
+/* FunctionRNA *func; */
+/* PropertyRNA *parm; */
}
#endif
diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c
index c17f23bb3a0..5a68fdf1c68 100644
--- a/source/blender/makesrna/intern/rna_fluidsim.c
+++ b/source/blender/makesrna/intern/rna_fluidsim.c
@@ -53,9 +53,9 @@
static StructRNA* rna_FluidSettings_refine(struct PointerRNA *ptr)
{
- FluidsimSettings *fss= (FluidsimSettings*)ptr->data;
+ FluidsimSettings *fss = (FluidsimSettings*)ptr->data;
- switch(fss->type) {
+ switch (fss->type) {
case OB_FLUIDSIM_DOMAIN:
return &RNA_DomainFluidSettings;
case OB_FLUIDSIM_FLUID:
@@ -77,7 +77,7 @@ static StructRNA* rna_FluidSettings_refine(struct PointerRNA *ptr)
static void rna_fluid_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Object *ob= ptr->id.data;
+ Object *ob = ptr->id.data;
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_main_add_notifier(NC_OBJECT|ND_MODIFIER, ob);
@@ -95,17 +95,17 @@ static int fluidsim_find_lastframe(Object *ob, FluidsimSettings *fss)
do {
BLI_strncpy(targetFileTest, targetFile, sizeof(targetFileTest));
BLI_path_frame(targetFileTest, curFrame++, 0);
- } while(BLI_exists(targetFileTest));
+ } while (BLI_exists(targetFileTest));
return curFrame - 1;
}
static void rna_fluid_find_enframe(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Object *ob= ptr->id.data;
- FluidsimModifierData *fluidmd= (FluidsimModifierData*)modifiers_findByType(ob, eModifierType_Fluidsim);
+ Object *ob = ptr->id.data;
+ FluidsimModifierData *fluidmd = (FluidsimModifierData*)modifiers_findByType(ob, eModifierType_Fluidsim);
- if(fluidmd->fss->flag & OB_FLUIDSIM_REVERSE) {
+ if (fluidmd->fss->flag & OB_FLUIDSIM_REVERSE) {
fluidmd->fss->lastgoodframe = fluidsim_find_lastframe(ob, fluidmd->fss);
}
else {
@@ -116,46 +116,46 @@ static void rna_fluid_find_enframe(Main *bmain, Scene *scene, PointerRNA *ptr)
static void rna_FluidSettings_update_type(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
FluidsimModifierData *fluidmd;
ParticleSystemModifierData *psmd;
ParticleSystem *psys;
ParticleSettings *part;
- fluidmd= (FluidsimModifierData*)modifiers_findByType(ob, eModifierType_Fluidsim);
- fluidmd->fss->flag &= ~OB_FLUIDSIM_REVERSE; // clear flag
+ fluidmd = (FluidsimModifierData*)modifiers_findByType(ob, eModifierType_Fluidsim);
+ fluidmd->fss->flag &= ~OB_FLUIDSIM_REVERSE; /* clear flag */
/* remove fluidsim particle system */
- if(fluidmd->fss->type & OB_FLUIDSIM_PARTICLE) {
- for(psys=ob->particlesystem.first; psys; psys=psys->next)
- if(psys->part->type == PART_FLUID)
+ if (fluidmd->fss->type & OB_FLUIDSIM_PARTICLE) {
+ for (psys = ob->particlesystem.first; psys; psys = psys->next)
+ if (psys->part->type == PART_FLUID)
break;
- if(ob->type == OB_MESH && !psys) {
+ if (ob->type == OB_MESH && !psys) {
/* add particle system */
- part= psys_new_settings("ParticleSettings", bmain);
- psys= MEM_callocN(sizeof(ParticleSystem), "particle_system");
+ part = psys_new_settings("ParticleSettings", bmain);
+ psys = MEM_callocN(sizeof(ParticleSystem), "particle_system");
- part->type= PART_FLUID;
- psys->part= part;
- psys->pointcache= BKE_ptcache_add(&psys->ptcaches);
+ part->type = PART_FLUID;
+ psys->part = part;
+ psys->pointcache = BKE_ptcache_add(&psys->ptcaches);
psys->flag |= PSYS_ENABLED;
BLI_strncpy(psys->name, "FluidParticles", sizeof(psys->name));
BLI_addtail(&ob->particlesystem,psys);
/* add modifier */
- psmd= (ParticleSystemModifierData*)modifier_new(eModifierType_ParticleSystem);
+ psmd = (ParticleSystemModifierData*)modifier_new(eModifierType_ParticleSystem);
BLI_strncpy(psmd->modifier.name, "FluidParticleSystem", sizeof(psmd->modifier.name));
- psmd->psys= psys;
+ psmd->psys = psys;
BLI_addtail(&ob->modifiers, psmd);
modifier_unique_name(&ob->modifiers, (ModifierData *)psmd);
}
}
else {
- for(psys=ob->particlesystem.first; psys; psys=psys->next) {
- if(psys->part->type == PART_FLUID) {
+ for (psys = ob->particlesystem.first; psys; psys = psys->next) {
+ if (psys->part->type == PART_FLUID) {
/* clear modifier */
- psmd= psys_get_modifier(ob, psys);
+ psmd = psys_get_modifier(ob, psys);
BLI_remlink(&ob->modifiers, psmd);
modifier_free((ModifierData *)psmd);
@@ -173,10 +173,10 @@ static void rna_DomainFluidSettings_memory_estimate_get(PointerRNA *ptr, char *v
{
#ifndef WITH_MOD_FLUID
(void)ptr;
- value[0]= '\0';
+ value[0] = '\0';
#else
- Object *ob= (Object*)ptr->id.data;
- FluidsimSettings *fss= (FluidsimSettings*)ptr->data;
+ Object *ob = (Object*)ptr->id.data;
+ FluidsimSettings *fss = (FluidsimSettings*)ptr->data;
fluid_estimate_memory(ob, fss, value);
#endif
@@ -194,7 +194,7 @@ static int rna_DomainFluidSettings_memory_estimate_length(PointerRNA *UNUSED(ptr
static char *rna_FluidSettings_path(PointerRNA *ptr)
{
FluidsimSettings *fss = (FluidsimSettings*)ptr->data;
- ModifierData *md= (ModifierData *)fss->fmd;
+ ModifierData *md = (ModifierData *)fss->fmd;
return BLI_sprintfN("modifiers[\"%s\"].settings", md->name);
}
@@ -223,13 +223,13 @@ static void rna_def_fluidsim_slip(StructRNA *srna)
{OB_FSBND_FREESLIP, "FREESLIP", 0, "Free Slip", "Obstacle only causes zero normal velocity (=not sticky, non moving objects only!)"},
{0, NULL, 0, NULL, NULL}};
- prop= RNA_def_property(srna, "slip_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "slip_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "typeFlags");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, slip_items);
RNA_def_property_ui_text(prop, "Slip Type", "");
- prop= RNA_def_property(srna, "partial_slip_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "partial_slip_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "partSlipValue");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Partial Slip Amount", "Amount of mixing between no- and free-slip, 0 is no slip and 1 is free slip");
@@ -240,12 +240,12 @@ static void rna_def_fluid_mesh_vertices(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "FluidMeshVertex", NULL);
+ srna = RNA_def_struct(brna, "FluidMeshVertex", NULL);
RNA_def_struct_sdna(srna, "FluidVertexVelocity");
RNA_def_struct_ui_text(srna, "Fluid Mesh Vertex", "Vertex of a simulated fluid mesh");
RNA_def_struct_ui_icon(srna, ICON_VERTEXSEL);
- prop= RNA_def_property(srna, "velocity", PROP_FLOAT, PROP_VELOCITY);
+ prop = RNA_def_property(srna, "velocity", PROP_FLOAT, PROP_VELOCITY);
RNA_def_property_array(prop, 3);
RNA_def_property_float_sdna(prop, NULL, "vel");
RNA_def_property_ui_text(prop, "Velocity", "");
@@ -271,107 +271,107 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
{4, "HONEY", 0, "Honey", "Viscosity of 2.0 * 10^-3"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "DomainFluidSettings", "FluidSettings");
+ srna = RNA_def_struct(brna, "DomainFluidSettings", "FluidSettings");
RNA_def_struct_sdna(srna, "FluidsimSettings");
RNA_def_struct_ui_text(srna, "Domain Fluid Simulation Settings", "Fluid simulation settings for the domain of a fluid simulation");
/* standard settings */
- prop= RNA_def_property(srna, "resolution", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "resolution", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolutionxyz");
RNA_def_property_range(prop, 1, 1024);
RNA_def_property_ui_text(prop, "Resolution", "Domain resolution in X,Y and Z direction");
- prop= RNA_def_property(srna, "preview_resolution", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "preview_resolution", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "previewresxyz");
RNA_def_property_range(prop, 1, 100);
RNA_def_property_ui_text(prop, "Preview Resolution", "Preview resolution in X,Y and Z direction");
- prop= RNA_def_property(srna, "viewport_display_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "viewport_display_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "guiDisplayMode");
RNA_def_property_enum_items(prop, quality_items);
RNA_def_property_ui_text(prop, "Viewport Display Mode", "How to display the mesh in the viewport");
RNA_def_property_update(prop, 0, "rna_fluid_update");
- prop= RNA_def_property(srna, "render_display_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "render_display_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "renderDisplayMode");
RNA_def_property_enum_items(prop, quality_items);
RNA_def_property_ui_text(prop, "Render Display Mode", "How to display the mesh for rendering");
- prop= RNA_def_property(srna, "use_reverse_frames", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_reverse_frames", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", OB_FLUIDSIM_REVERSE);
RNA_def_property_ui_text(prop, "Reverse Frames", "Reverse fluid frames");
RNA_def_property_update(prop, 0, "rna_fluid_find_enframe");
- prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
+ prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_maxlength(prop, FILE_MAX);
RNA_def_property_string_sdna(prop, NULL, "surfdataPath");
RNA_def_property_ui_text(prop, "Path", "Directory (and/or filename prefix) to store baked fluid simulation files in");
RNA_def_property_update(prop, 0, "rna_fluid_update");
- prop= RNA_def_property(srna, "memory_estimate", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "memory_estimate", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_DomainFluidSettings_memory_estimate_get", "rna_DomainFluidSettings_memory_estimate_length", NULL);
RNA_def_property_ui_text(prop, "Memory Estimate", "Estimated amount of memory needed for baking the domain");
/* advanced settings */
- prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION);
+ prop = RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION);
RNA_def_property_float_sdna(prop, NULL, "grav");
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, -1000.1, 1000.1);
RNA_def_property_ui_text(prop, "Gravity", "Gravity in X, Y and Z direction");
- prop= RNA_def_property(srna, "use_time_override", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_time_override", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", OB_FLUIDSIM_OVERRIDE_TIME);
RNA_def_property_ui_text(prop, "Override Time", "Use a custom start and end time (in seconds) instead of the scene's timeline");
- prop= RNA_def_property(srna, "start_time", PROP_FLOAT, PROP_TIME);
+ prop = RNA_def_property(srna, "start_time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "animStart");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Start Time", "Simulation time of the first blender frame (in seconds)");
- prop= RNA_def_property(srna, "end_time", PROP_FLOAT, PROP_TIME);
+ prop = RNA_def_property(srna, "end_time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "animEnd");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "End Time", "Simulation time of the last blender frame (in seconds)");
- prop= RNA_def_property(srna, "frame_offset", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_offset", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "frameOffset");
RNA_def_property_ui_text(prop, "Cache Offset", "Offset when reading baked cache");
RNA_def_property_update(prop, NC_OBJECT, "rna_fluid_update");
- prop= RNA_def_property(srna, "simulation_scale", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "simulation_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "realsize");
RNA_def_property_range(prop, 0.001, 10);
RNA_def_property_ui_text(prop, "Real World Size", "Size of the simulation domain in metres");
- prop= RNA_def_property(srna, "simulation_rate", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "simulation_rate", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "animRate");
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Simulation Speed", "Fluid motion rate (0 = stationary, 1 = normal speed)");
- prop= RNA_def_property(srna, "viscosity_preset", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "viscosity_preset", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "viscosityMode");
RNA_def_property_enum_items(prop, viscosity_items);
RNA_def_property_ui_text(prop, "Viscosity Preset", "Set viscosity of the fluid to a preset value, or use manual input");
- prop= RNA_def_property(srna, "viscosity_base", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "viscosity_base", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "viscosityValue");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Viscosity Base", "Viscosity setting: value that is multiplied by 10 to the power of (exponent*-1)");
- prop= RNA_def_property(srna, "viscosity_exponent", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "viscosity_exponent", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "viscosityExponent");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Viscosity Exponent", "Negative exponent for the viscosity value (to simplify entering small values e.g. 5*10^-6)");
- prop= RNA_def_property(srna, "grid_levels", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "grid_levels", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "maxRefine");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, -1, 4);
RNA_def_property_ui_text(prop, "Grid Levels", "Number of coarsened grids to use (-1 for automatic)");
- prop= RNA_def_property(srna, "compressibility", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "compressibility", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "gstar");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.001, 0.1);
@@ -381,45 +381,45 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
rna_def_fluidsim_slip(srna);
- prop= RNA_def_property(srna, "surface_smooth", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "surface_smooth", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "surfaceSmoothing");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0, 5.0);
RNA_def_property_ui_text(prop, "Surface Smoothing", "Amount of surface smoothing (a value of 0 is off, 1 is normal smoothing and more than 1 is extra smoothing)");
- prop= RNA_def_property(srna, "surface_subdivisions", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "surface_subdivisions", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "surfaceSubdivs");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0, 5);
RNA_def_property_ui_text(prop, "Surface Subdivisions", "Number of isosurface subdivisions (this is necessary for the inclusion of particles into the surface generation - WARNING: can lead to longer computation times !)");
- prop= RNA_def_property(srna, "use_speed_vectors", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_speed_vectors", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "domainNovecgen", 0);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Generate Speed Vectors", "Generate speed vectors for vector blur");
/* no collision object surface */
- prop= RNA_def_property(srna, "surface_noobs", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "surface_noobs", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "typeFlags", OB_FSSG_NOOBS);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Hide fluid surface", "");
/* particles */
- prop= RNA_def_property(srna, "tracer_particles", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "tracer_particles", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "generateTracers");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0, 10000);
RNA_def_property_ui_text(prop, "Tracer Particles", "Number of tracer particles to generate");
- prop= RNA_def_property(srna, "generate_particles", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "generate_particles", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "generateParticles");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0, 10.0);
RNA_def_property_ui_text(prop, "Generate Particles", "Amount of particles to generate (0=off, 1=normal, >1=more)");
/* simulated fluid mesh data */
- prop= RNA_def_property(srna, "fluid_mesh_vertices", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "fluid_mesh_vertices", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "FluidMeshVertex");
RNA_def_property_ui_text(prop, "Fluid Mesh Vertices", "Vertices of the fluid mesh generated by simulation");
RNA_def_property_collection_funcs(prop, "rna_FluidMeshVertex_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_FluidMeshVertex_data_length", NULL, NULL, NULL);
@@ -436,13 +436,13 @@ static void rna_def_fluidsim_volume(StructRNA *srna)
{3, "BOTH", 0, "Both", "Use both the inner volume and the outer shell of the mesh"},
{0, NULL, 0, NULL, NULL}};
- prop= RNA_def_property(srna, "volume_initialization", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "volume_initialization", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "volumeInitType");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, volume_type_items);
RNA_def_property_ui_text(prop, "Volume Initialization", "Volume initialization type");
- prop= RNA_def_property(srna, "use_animated_mesh", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_animated_mesh", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "domainNovecgen", 0);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Export Animated Mesh", "Export this mesh as an animated one (slower, only use if really necessary [e.g. armatures or parented objects], animated pos/rot/scale F-Curves do not require it)");
@@ -452,7 +452,7 @@ static void rna_def_fluidsim_active(StructRNA *srna)
{
PropertyRNA *prop;
- prop= RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", OB_FLUIDSIM_ACTIVE);
RNA_def_property_ui_text(prop, "Enabled", "Object contributes to the fluid simulation");
}
@@ -462,14 +462,14 @@ static void rna_def_fluidsim_fluid(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "FluidFluidSettings", "FluidSettings");
+ srna = RNA_def_struct(brna, "FluidFluidSettings", "FluidSettings");
RNA_def_struct_sdna(srna, "FluidsimSettings");
RNA_def_struct_ui_text(srna, "Fluid Fluid Simulation Settings", "Fluid simulation settings for the fluid in the simulation");
rna_def_fluidsim_active(srna);
rna_def_fluidsim_volume(srna);
- prop= RNA_def_property(srna, "initial_velocity", PROP_FLOAT, PROP_VELOCITY);
+ prop = RNA_def_property(srna, "initial_velocity", PROP_FLOAT, PROP_VELOCITY);
RNA_def_property_float_sdna(prop, NULL, "iniVelx");
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, -1000.1, 1000.1);
@@ -481,7 +481,7 @@ static void rna_def_fluidsim_obstacle(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ObstacleFluidSettings", "FluidSettings");
+ srna = RNA_def_struct(brna, "ObstacleFluidSettings", "FluidSettings");
RNA_def_struct_sdna(srna, "FluidsimSettings");
RNA_def_struct_ui_text(srna, "Obstacle Fluid Simulation Settings", "Fluid simulation settings for obstacles in the simulation");
@@ -489,7 +489,7 @@ static void rna_def_fluidsim_obstacle(BlenderRNA *brna)
rna_def_fluidsim_volume(srna);
rna_def_fluidsim_slip(srna);
- prop= RNA_def_property(srna, "impact_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "impact_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "surfaceSmoothing");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, -2.0, 10.0);
@@ -501,20 +501,20 @@ static void rna_def_fluidsim_inflow(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "InflowFluidSettings", "FluidSettings");
+ srna = RNA_def_struct(brna, "InflowFluidSettings", "FluidSettings");
RNA_def_struct_sdna(srna, "FluidsimSettings");
RNA_def_struct_ui_text(srna, "Inflow Fluid Simulation Settings", "Fluid simulation settings for objects adding fluids in the simulation");
rna_def_fluidsim_active(srna);
rna_def_fluidsim_volume(srna);
- prop= RNA_def_property(srna, "inflow_velocity", PROP_FLOAT, PROP_VELOCITY);
+ prop = RNA_def_property(srna, "inflow_velocity", PROP_FLOAT, PROP_VELOCITY);
RNA_def_property_float_sdna(prop, NULL, "iniVelx");
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, -1000.1, 1000.1);
RNA_def_property_ui_text(prop, "Inflow Velocity", "Initial velocity of fluid");
- prop= RNA_def_property(srna, "use_local_coords", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_local_coords", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_boolean_sdna(prop, NULL, "typeFlags", OB_FSINFLOW_LOCALCOORD);
RNA_def_property_ui_text(prop, "Local Coordinates", "Use local coordinates for inflow (e.g. for rotating objects)");
@@ -524,7 +524,7 @@ static void rna_def_fluidsim_outflow(BlenderRNA *brna)
{
StructRNA *srna;
- srna= RNA_def_struct(brna, "OutflowFluidSettings", "FluidSettings");
+ srna = RNA_def_struct(brna, "OutflowFluidSettings", "FluidSettings");
RNA_def_struct_sdna(srna, "FluidsimSettings");
RNA_def_struct_ui_text(srna, "Outflow Fluid Simulation Settings", "Fluid simulation settings for objects removing fluids from the simulation");
@@ -537,33 +537,33 @@ static void rna_def_fluidsim_particle(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ParticleFluidSettings", "FluidSettings");
+ srna = RNA_def_struct(brna, "ParticleFluidSettings", "FluidSettings");
RNA_def_struct_sdna(srna, "FluidsimSettings");
RNA_def_struct_ui_text(srna, "Particle Fluid Simulation Settings", "Fluid simulation settings for objects storing fluid particles generated by the simulation");
- prop= RNA_def_property(srna, "use_drops", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_drops", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "typeFlags", OB_FSPART_DROP);
RNA_def_property_ui_text(prop, "Drops", "Show drop particles");
- prop= RNA_def_property(srna, "use_floats", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_floats", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "typeFlags", OB_FSPART_FLOAT);
RNA_def_property_ui_text(prop, "Floats", "Show floating foam particles");
- prop= RNA_def_property(srna, "show_tracer", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_tracer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "typeFlags", OB_FSPART_TRACER);
RNA_def_property_ui_text(prop, "Tracer", "Show tracer particles");
- prop= RNA_def_property(srna, "particle_influence", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "particle_influence", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "particleInfSize");
RNA_def_property_range(prop, 0.0, 2.0);
RNA_def_property_ui_text(prop, "Particle Influence", "Amount of particle size scaling: 0=off (all same size), 1=full (range 0.2-2.0), >1=stronger");
- prop= RNA_def_property(srna, "alpha_influence", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "alpha_influence", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "particleInfAlpha");
RNA_def_property_range(prop, 0.0, 2.0);
RNA_def_property_ui_text(prop, "Alpha Influence", "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)");
- prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
+ prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_maxlength(prop, FILE_MAX);
RNA_def_property_string_sdna(prop, NULL, "surfdataPath");
RNA_def_property_ui_text(prop, "Path", "Directory (and/or filename prefix) to store and load particles from");
@@ -575,49 +575,49 @@ static void rna_def_fluidsim_control(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ControlFluidSettings", "FluidSettings");
+ srna = RNA_def_struct(brna, "ControlFluidSettings", "FluidSettings");
RNA_def_struct_sdna(srna, "FluidsimSettings");
RNA_def_struct_ui_text(srna, "Control Fluid Simulation Settings", "Fluid simulation settings for objects controlling the motion of fluid in the simulation");
rna_def_fluidsim_active(srna);
- prop= RNA_def_property(srna, "start_time", PROP_FLOAT, PROP_TIME);
+ prop = RNA_def_property(srna, "start_time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "cpsTimeStart");
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Start Time", "Time when the control particles are activated");
- prop= RNA_def_property(srna, "end_time", PROP_FLOAT, PROP_TIME);
+ prop = RNA_def_property(srna, "end_time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "cpsTimeEnd");
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "End Time", "Time when the control particles are deactivated");
- prop= RNA_def_property(srna, "attraction_strength", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "attraction_strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "attractforceStrength");
RNA_def_property_range(prop, -10.0, 10.0);
RNA_def_property_ui_text(prop, "Attraction Strength", "Force strength for directional attraction towards the control object");
- prop= RNA_def_property(srna, "attraction_radius", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "attraction_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "attractforceRadius");
RNA_def_property_range(prop, 0.0, 10.0);
RNA_def_property_ui_text(prop, "Attraction Radius", "Force field radius around the control object");
- prop= RNA_def_property(srna, "velocity_strength", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "velocity_strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "velocityforceStrength");
RNA_def_property_range(prop, 0.0, 10.0);
RNA_def_property_ui_text(prop, "Velocity Strength", "Force strength of how much of the control object's velocity is influencing the fluid velocity");
- prop= RNA_def_property(srna, "velocity_radius", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "velocity_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "velocityforceRadius");
RNA_def_property_range(prop, 0.0, 10.0);
RNA_def_property_ui_text(prop, "Velocity Radius", "Force field radius around the control object");
- prop= RNA_def_property(srna, "quality", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "quality", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "cpsQuality");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 5.0, 100.0);
RNA_def_property_ui_text(prop, "Quality", "Quality which is used for object sampling (higher = better but slower)");
- prop= RNA_def_property(srna, "use_reverse_frames", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_reverse_frames", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", OB_FLUIDSIM_REVERSE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Reverse Frames", "Reverse control object movement");
@@ -641,21 +641,21 @@ void RNA_def_fluidsim(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "FluidSettings", NULL);
+ srna = RNA_def_struct(brna, "FluidSettings", NULL);
RNA_def_struct_sdna(srna, "FluidsimSettings");
RNA_def_struct_refine_func(srna, "rna_FluidSettings_refine");
RNA_def_struct_path_func(srna, "rna_FluidSettings_path");
RNA_def_struct_ui_text(srna, "Fluid Simulation Settings", "Fluid simulation settings for an object taking part in the simulation");
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_fluid_type_items);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Type", "Type of participation in the fluid simulation");
RNA_def_property_update(prop, 0, "rna_FluidSettings_update_type");
- //prop= RNA_def_property(srna, "ipo", PROP_POINTER, PROP_NONE);
- //RNA_def_property_ui_text(prop, "IPO Curves", "IPO curves used by fluid simulation settings");
+ /*prop= RNA_def_property(srna, "ipo", PROP_POINTER, PROP_NONE); */
+ /*RNA_def_property_ui_text(prop, "IPO Curves", "IPO curves used by fluid simulation settings"); */
/* types */
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index ccd1934b26a..21cc97bd1c0 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -42,7 +42,7 @@
static int rna_GPencilLayer_active_frame_editable(PointerRNA *ptr)
{
- bGPDlayer *gpl= (bGPDlayer *)ptr->data;
+ bGPDlayer *gpl = (bGPDlayer *)ptr->data;
/* surely there must be other criteria too... */
if (gpl->flag & GP_LAYER_LOCKED)
@@ -53,18 +53,18 @@ static int rna_GPencilLayer_active_frame_editable(PointerRNA *ptr)
static PointerRNA rna_GPencil_active_layer_get(PointerRNA *ptr)
{
- bGPdata *gpd= ptr->id.data;
+ bGPdata *gpd = ptr->id.data;
if (GS(gpd->id.name) == ID_GD) { /* why would this ever be not GD */
bGPDlayer *gl;
- for (gl= gpd->layers.first; gl; gl= gl->next) {
- if(gl->flag & GP_LAYER_ACTIVE) {
+ for (gl = gpd->layers.first; gl; gl = gl->next) {
+ if (gl->flag & GP_LAYER_ACTIVE) {
break;
}
}
- if(gl) {
+ if (gl) {
return rna_pointer_inherit_refine(ptr, &RNA_GPencilLayer, gl);
}
}
@@ -74,13 +74,13 @@ static PointerRNA rna_GPencil_active_layer_get(PointerRNA *ptr)
static void rna_GPencil_active_layer_set(PointerRNA *ptr, PointerRNA value)
{
- bGPdata *gpd= ptr->id.data;
+ bGPdata *gpd = ptr->id.data;
if (GS(gpd->id.name) == ID_GD) { /* why would this ever be not GD */
bGPDlayer *gl;
- for (gl= gpd->layers.first; gl; gl= gl->next) {
- if(gl == value.data) {
+ for (gl = gpd->layers.first; gl; gl = gl->next) {
+ if (gl == value.data) {
gl->flag |= GP_LAYER_ACTIVE;
}
else {
@@ -92,8 +92,8 @@ static void rna_GPencil_active_layer_set(PointerRNA *ptr, PointerRNA value)
void rna_GPencilLayer_info_set(PointerRNA *ptr, const char *value)
{
- bGPdata *gpd= ptr->id.data;
- bGPDlayer *gpl= ptr->data;
+ bGPdata *gpd = ptr->id.data;
+ bGPDlayer *gpl = ptr->data;
/* copy the new name into the name slot */
BLI_strncpy_utf8(gpl->info, value, sizeof(gpl->info));
@@ -108,17 +108,17 @@ static void rna_def_gpencil_stroke_point(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "GPencilStrokePoint", NULL);
+ srna = RNA_def_struct(brna, "GPencilStrokePoint", NULL);
RNA_def_struct_sdna(srna, "bGPDspoint");
RNA_def_struct_ui_text(srna, "Grease Pencil Stroke Point", "Data point for freehand stroke curve");
- prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "co", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "x");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Coordinates", "");
RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL);
- prop= RNA_def_property(srna, "pressure", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "pressure", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "pressure");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Pressure", "Pressure of tablet at point when drawing it");
@@ -130,18 +130,18 @@ static void rna_def_gpencil_stroke(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "GPencilStroke", NULL);
+ srna = RNA_def_struct(brna, "GPencilStroke", NULL);
RNA_def_struct_sdna(srna, "bGPDstroke");
RNA_def_struct_ui_text(srna, "Grease Pencil Stroke", "Freehand curve defining part of a sketch");
/* Points */
- prop= RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "points", "totpoints");
RNA_def_property_struct_type(prop, "GPencilStrokePoint");
RNA_def_property_ui_text(prop, "Stroke Points", "Stroke data points");
/* Flags - Readonly type-info really... */
- // TODO...
+ /* TODO... */
}
static void rna_def_gpencil_frame(BlenderRNA *brna)
@@ -149,28 +149,28 @@ static void rna_def_gpencil_frame(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "GPencilFrame", NULL);
+ srna = RNA_def_struct(brna, "GPencilFrame", NULL);
RNA_def_struct_sdna(srna, "bGPDframe");
RNA_def_struct_ui_text(srna, "Grease Pencil Frame", "Collection of related sketches on a particular frame");
/* Strokes */
- prop= RNA_def_property(srna, "strokes", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "strokes", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "strokes", NULL);
RNA_def_property_struct_type(prop, "GPencilStroke");
RNA_def_property_ui_text(prop, "Strokes", "Freehand curves defining the sketch on this frame");
/* Frame Number */
- prop= RNA_def_property(srna, "frame_number", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_number", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "framenum");
- RNA_def_property_range(prop, MINFRAME, MAXFRAME); // XXX note: this cannot occur on the same frame as another sketch
+ RNA_def_property_range(prop, MINFRAME, MAXFRAME); /* XXX note: this cannot occur on the same frame as another sketch */
RNA_def_property_ui_text(prop, "Frame Number", "The frame on which this sketch appears");
/* Flags */
- prop= RNA_def_property(srna, "is_edited", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_FRAME_PAINT); // XXX should it be editable?
+ prop = RNA_def_property(srna, "is_edited", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_FRAME_PAINT); /* XXX should it be editable? */
RNA_def_property_ui_text(prop, "Paint Lock", "Frame is being edited (painted on)");
- prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_FRAME_SELECT);
RNA_def_property_ui_text(prop, "Select", "Frame is selected for editing in the DopeSheet");
}
@@ -180,55 +180,55 @@ static void rna_def_gpencil_layer(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "GPencilLayer", NULL);
+ srna = RNA_def_struct(brna, "GPencilLayer", NULL);
RNA_def_struct_sdna(srna, "bGPDlayer");
RNA_def_struct_ui_text(srna, "Grease Pencil Layer", "Collection of related sketches");
/* Name */
- prop= RNA_def_property(srna, "info", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "info", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Info", "Layer name");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_GPencilLayer_info_set");
RNA_def_struct_name_property(srna, prop);
/* Frames */
- prop= RNA_def_property(srna, "frames", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "frames", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "frames", NULL);
RNA_def_property_struct_type(prop, "GPencilFrame");
RNA_def_property_ui_text(prop, "Frames", "Sketches for this layer on different frames");
/* Active Frame */
- prop= RNA_def_property(srna, "active_frame", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active_frame", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "actframe");
RNA_def_property_ui_text(prop, "Active Frame", "Frame currently being displayed for this layer");
RNA_def_property_editable_func(prop, "rna_GPencilLayer_active_frame_editable");
/* Drawing Color */
- prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_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);
- prop= RNA_def_property(srna, "alpha", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "alpha", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "color[3]");
RNA_def_property_range(prop, 0.3, 1.0f);
RNA_def_property_ui_text(prop, "Opacity", "Layer Opacity");
RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL);
/* Line Thickness */
- prop= RNA_def_property(srna, "line_width", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "line_width", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "thickness");
RNA_def_property_range(prop, 1, 10);
RNA_def_property_ui_text(prop, "Thickness", "Thickness of strokes (in pixels)");
RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL);
/* Onion-Skinning */
- prop= RNA_def_property(srna, "use_onion_skinning", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_onion_skinning", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_ONIONSKIN);
RNA_def_property_ui_text(prop, "Onion Skinning", "Ghost frames on either side of frame");
RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL);
- prop= RNA_def_property(srna, "ghost_range_max", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "ghost_range_max", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gstep");
RNA_def_property_range(prop, 0, 120);
RNA_def_property_ui_text(prop, "Max Ghost Range",
@@ -237,17 +237,17 @@ static void rna_def_gpencil_layer(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL);
/* Flags */
- prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_HIDE);
RNA_def_property_ui_text(prop, "Hide", "Set layer Visibility");
RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL);
- prop= RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_LOCKED);
RNA_def_property_ui_text(prop, "Locked", "Protect layer from further editing and/or frame changes");
RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL);
- prop= RNA_def_property(srna, "lock_frame", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_frame", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_FRAMELOCK);
RNA_def_property_ui_text(prop, "Frame Locked", "Lock current frame displayed by layer");
RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL);
@@ -261,19 +261,19 @@ static void rna_def_gpencil_layer(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL);
*/
- prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_SELECT);
RNA_def_property_ui_text(prop, "Select", "Layer is selected for editing in the DopeSheet");
RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL);
- // XXX keep this option?
- prop= RNA_def_property(srna, "show_points", PROP_BOOLEAN, PROP_NONE);
+ /* XXX keep this option? */
+ prop = RNA_def_property(srna, "show_points", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_DRAWDEBUG);
RNA_def_property_ui_text(prop, "Show Points", "Draw the points which make up the strokes (for debugging purposes)");
RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL);
/* X-Ray */
- prop= RNA_def_property(srna, "show_x_ray", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_x_ray", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GP_LAYER_NO_XRAY);
RNA_def_property_ui_text(prop, "X Ray", "Make the layer draw in front of objects");
RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL);
@@ -284,30 +284,30 @@ static void rna_def_gpencil_layers(BlenderRNA *brna, PropertyRNA *cprop)
StructRNA *srna;
PropertyRNA *prop;
-// FunctionRNA *func;
-// PropertyRNA *parm;
+/* FunctionRNA *func; */
+/* PropertyRNA *parm; */
RNA_def_property_srna(cprop, "GreasePencilLayers");
- srna= RNA_def_struct(brna, "GreasePencilLayers", NULL);
+ srna = RNA_def_struct(brna, "GreasePencilLayers", NULL);
RNA_def_struct_sdna(srna, "bGPdata");
RNA_def_struct_ui_text(srna, "Grease Pencil Layers", "Collection of grease pencil layers");
#if 0
- func= RNA_def_function(srna, "new", "rna_GPencil_layer_new");
+ func = RNA_def_function(srna, "new", "rna_GPencil_layer_new");
RNA_def_function_ui_description(func, "Add a new spline to the curve");
- parm= RNA_def_enum(func, "type", curve_type_items, CU_POLY, "", "type for the new spline");
+ parm = RNA_def_enum(func, "type", curve_type_items, CU_POLY, "", "type for the new spline");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "spline", "Spline", "", "The newly created spline");
+ parm = RNA_def_pointer(func, "spline", "Spline", "", "The newly created spline");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_GPencil_layer_remove");
+ func = RNA_def_function(srna, "remove", "rna_GPencil_layer_remove");
RNA_def_function_ui_description(func, "Remove a spline from a curve");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "spline", "Spline", "", "The spline to remove");
+ parm = RNA_def_pointer(func, "spline", "Spline", "", "The spline to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
#endif
- prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "GreasePencil");
RNA_def_property_pointer_funcs(prop, "rna_GPencil_active_layer_get", "rna_GPencil_active_layer_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -326,25 +326,25 @@ static void rna_def_gpencil_data(BlenderRNA *brna)
{GP_DATA_VIEWALIGN|GP_DATA_DEPTH_STROKE, "STROKE", 0, "Stroke", "Stick stroke to other strokes"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "GreasePencil", "ID");
+ srna = RNA_def_struct(brna, "GreasePencil", "ID");
RNA_def_struct_sdna(srna, "bGPdata");
RNA_def_struct_ui_text(srna, "Grease Pencil", "Freehand annotation sketchbook");
RNA_def_struct_ui_icon(srna, ICON_GREASEPENCIL);
/* Layers */
- prop= RNA_def_property(srna, "layers", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "layers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "layers", NULL);
RNA_def_property_struct_type(prop, "GPencilLayer");
RNA_def_property_ui_text(prop, "Layers", "");
rna_def_gpencil_layers(brna, prop);
/* Flags */
- prop= RNA_def_property(srna, "draw_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "draw_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, draw_mode_items);
RNA_def_property_ui_text(prop, "Draw Mode", "");
- prop= RNA_def_property(srna, "use_stroke_endpoints", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_stroke_endpoints", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_DATA_DEPTH_STROKE_ENDPOINTS);
RNA_def_property_ui_text(prop, "Only Endpoints", "Only use the first and last parts of the stroke for snapping");
diff --git a/source/blender/makesrna/intern/rna_group.c b/source/blender/makesrna/intern/rna_group.c
index 8fa92e712d9..7c66110cb85 100644
--- a/source/blender/makesrna/intern/rna_group.c
+++ b/source/blender/makesrna/intern/rna_group.c
@@ -45,7 +45,7 @@
static PointerRNA rna_Group_objects_get(CollectionPropertyIterator *iter)
{
- ListBaseIterator *internal= iter->internal;
+ ListBaseIterator *internal = iter->internal;
/* we are actually iterating a GroupObject list, so override get */
return rna_pointer_inherit_refine(&iter->parent, &RNA_Object, ((GroupObject*)internal->link)->ob);
@@ -53,7 +53,7 @@ static PointerRNA rna_Group_objects_get(CollectionPropertyIterator *iter)
static void rna_Group_objects_link(Group *group, bContext *C, ReportList *reports, Object *object)
{
- if(!add_to_group(group, object, CTX_data_scene(C), NULL)) {
+ if (!add_to_group(group, object, CTX_data_scene(C), NULL)) {
BKE_reportf(reports, RPT_ERROR, "Object \"%s\" already in group \"%s\"", object->id.name+2, group->id.name+2);
return;
}
@@ -63,7 +63,7 @@ static void rna_Group_objects_link(Group *group, bContext *C, ReportList *report
static void rna_Group_objects_unlink(Group *group, bContext *C, ReportList *reports, Object *object)
{
- if(!rem_from_group(group, object, CTX_data_scene(C), NULL)) {
+ if (!rem_from_group(group, object, CTX_data_scene(C), NULL)) {
BKE_reportf(reports, RPT_ERROR, "Object \"%s\" not in group \"%s\"", object->id.name+2, group->id.name+2);
return;
}
@@ -77,30 +77,30 @@ static void rna_Group_objects_unlink(Group *group, bContext *C, ReportList *repo
static void rna_def_group_objects(BlenderRNA *brna, PropertyRNA *cprop)
{
StructRNA *srna;
-// PropertyRNA *prop;
+/* PropertyRNA *prop; */
FunctionRNA *func;
PropertyRNA *parm;
RNA_def_property_srna(cprop, "GroupObjects");
- srna= RNA_def_struct(brna, "GroupObjects", NULL);
+ srna = RNA_def_struct(brna, "GroupObjects", NULL);
RNA_def_struct_sdna(srna, "Group");
RNA_def_struct_ui_text(srna, "Group Objects", "Collection of group objects");
/* add object */
- func= RNA_def_function(srna, "link", "rna_Group_objects_link");
+ func = RNA_def_function(srna, "link", "rna_Group_objects_link");
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Add this object to a group");
/* object to add */
- parm= RNA_def_pointer(func, "object", "Object", "", "Object to add");
+ parm = RNA_def_pointer(func, "object", "Object", "", "Object to add");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
/* remove object */
- func= RNA_def_function(srna, "unlink", "rna_Group_objects_unlink");
+ func = RNA_def_function(srna, "unlink", "rna_Group_objects_unlink");
RNA_def_function_ui_description(func, "Remove this object to a group");
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
/* object to remove */
- parm= RNA_def_pointer(func, "object", "Object", "", "Object to remove");
+ parm = RNA_def_pointer(func, "object", "Object", "", "Object to remove");
RNA_def_property_flag(parm, PROP_REQUIRED);
}
@@ -110,23 +110,23 @@ void RNA_def_group(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Group", "ID");
+ srna = RNA_def_struct(brna, "Group", "ID");
RNA_def_struct_ui_text(srna, "Group", "Group of Object datablocks");
RNA_def_struct_ui_icon(srna, ICON_GROUP);
RNA_def_struct_clear_flag(srna, STRUCT_ID_REFCOUNT); /* this is done on save/load in readfile.c, removed if no objects are in the group */
- prop= RNA_def_property(srna, "dupli_offset", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "dupli_offset", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "dupli_ofs");
RNA_def_property_ui_text(prop, "Dupli Offset", "Offset from the origin to use when instancing as DupliGroup");
RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 4);
- prop= RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER);
+ prop = RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER);
RNA_def_property_boolean_sdna(prop, NULL, "layer", 1);
RNA_def_property_array(prop, 20);
RNA_def_property_ui_text(prop, "Dupli Layers", "Layers visible when this group is instanced as a dupli");
- prop= RNA_def_property(srna, "objects", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "objects", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "gobject", NULL);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_ui_text(prop, "Objects", "A collection of this groups objects");
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index 7e3922a8f81..ebd77219dc0 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -42,7 +42,7 @@
#include "WM_types.h"
#include "WM_api.h"
-static EnumPropertyItem image_source_items[]= {
+static EnumPropertyItem image_source_items[] = {
{IMA_SRC_FILE, "FILE", 0, "Single Image", "Single image file"},
{IMA_SRC_SEQUENCE, "SEQUENCE", 0, "Image Sequence", "Multiple image files, as a sequence"},
{IMA_SRC_MOVIE, "MOVIE", 0, "Movie", "Movie file"},
@@ -56,24 +56,24 @@ static EnumPropertyItem image_source_items[]= {
static void rna_Image_animated_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Image *ima= (Image*)ptr->data;
+ Image *ima = (Image*)ptr->data;
int nr;
- if(ima->flag & IMA_TWINANIM) {
- nr= ima->xrep*ima->yrep;
- if(ima->twsta>=nr) ima->twsta= 1;
- if(ima->twend>=nr) ima->twend= nr-1;
- if(ima->twsta>ima->twend) ima->twsta= 1;
+ if (ima->flag & IMA_TWINANIM) {
+ nr = ima->xrep*ima->yrep;
+ if (ima->twsta >= nr) ima->twsta = 1;
+ if (ima->twend >= nr) ima->twend = nr-1;
+ if (ima->twsta>ima->twend) ima->twsta = 1;
}
}
static int rna_Image_dirty_get(PointerRNA *ptr)
{
- Image *ima= (Image*)ptr->data;
+ Image *ima = (Image*)ptr->data;
ImBuf *ibuf;
- for(ibuf=ima->ibufs.first; ibuf; ibuf=ibuf->next)
- if(ibuf->userflags & IB_BITMAPDIRTY)
+ for (ibuf = ima->ibufs.first; ibuf; ibuf = ibuf->next)
+ if (ibuf->userflags & IB_BITMAPDIRTY)
return 1;
return 0;
@@ -81,26 +81,26 @@ static int rna_Image_dirty_get(PointerRNA *ptr)
static void rna_Image_source_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Image *ima= ptr->id.data;
+ Image *ima = ptr->id.data;
BKE_image_signal(ima, NULL, IMA_SIGNAL_SRC_CHANGE);
DAG_id_tag_update(&ima->id, 0);
}
static void rna_Image_fields_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Image *ima= ptr->id.data;
+ Image *ima = ptr->id.data;
ImBuf *ibuf;
void *lock;
- ibuf= BKE_image_acquire_ibuf(ima, NULL, &lock);
+ ibuf = BKE_image_acquire_ibuf(ima, NULL, &lock);
- if(ibuf) {
- short nr= 0;
+ if (ibuf) {
+ short nr = 0;
- if(!(ima->flag & IMA_FIELDS) && (ibuf->flags & IB_fields)) nr= 1;
- if((ima->flag & IMA_FIELDS) && !(ibuf->flags & IB_fields)) nr= 1;
+ if (!(ima->flag & IMA_FIELDS) && (ibuf->flags & IB_fields)) nr = 1;
+ if ((ima->flag & IMA_FIELDS) && !(ibuf->flags & IB_fields)) nr = 1;
- if(nr)
+ if (nr)
BKE_image_signal(ima, NULL, IMA_SIGNAL_FREE);
}
@@ -109,7 +109,7 @@ static void rna_Image_fields_update(Main *UNUSED(bmain), Scene *UNUSED(scene), P
static void rna_Image_free_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Image *ima= ptr->id.data;
+ Image *ima = ptr->id.data;
BKE_image_signal(ima, NULL, IMA_SIGNAL_FREE);
WM_main_add_notifier(NC_IMAGE|NA_EDITED, &ima->id);
DAG_id_tag_update(&ima->id, 0);
@@ -118,7 +118,7 @@ static void rna_Image_free_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Poi
static void rna_Image_reload_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Image *ima= ptr->id.data;
+ Image *ima = ptr->id.data;
BKE_image_signal(ima, NULL, IMA_SIGNAL_RELOAD);
WM_main_add_notifier(NC_IMAGE|NA_EDITED, &ima->id);
DAG_id_tag_update(&ima->id, 0);
@@ -126,13 +126,13 @@ static void rna_Image_reload_update(Main *UNUSED(bmain), Scene *UNUSED(scene), P
static void rna_Image_generated_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Image *ima= ptr->id.data;
+ Image *ima = ptr->id.data;
BKE_image_signal(ima, NULL, IMA_SIGNAL_FREE);
}
static void rna_ImageUser_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
{
- ImageUser *iuser= ptr->data;
+ ImageUser *iuser = ptr->data;
BKE_image_user_calc_frame(iuser, scene->r.cfra, 0);
}
@@ -141,9 +141,9 @@ static void rna_ImageUser_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *
char *rna_ImageUser_path(PointerRNA *ptr)
{
if (ptr->id.data) {
- // ImageUser *iuser= ptr->data;
+ /* ImageUser *iuser= ptr->data; */
- switch(GS(((ID *)ptr->id.data)->name)) {
+ switch (GS(((ID *)ptr->id.data)->name)) {
case ID_TE:
return BLI_strdup("image_user");
}
@@ -154,11 +154,11 @@ char *rna_ImageUser_path(PointerRNA *ptr)
static EnumPropertyItem *rna_Image_source_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
- Image *ima= (Image*)ptr->data;
- EnumPropertyItem *item= NULL;
- int totitem= 0;
+ Image *ima = (Image*)ptr->data;
+ EnumPropertyItem *item = NULL;
+ int totitem = 0;
- if(ima->source == IMA_SRC_VIEWER) {
+ if (ima->source == IMA_SRC_VIEWER) {
RNA_enum_items_add_value(&item, &totitem, image_source_items, IMA_SRC_VIEWER);
}
else {
@@ -169,24 +169,24 @@ static EnumPropertyItem *rna_Image_source_itemf(bContext *UNUSED(C), PointerRNA
}
RNA_enum_item_end(&item, &totitem);
- *free= 1;
+ *free = 1;
return item;
}
static int rna_Image_file_format_get(PointerRNA *ptr)
{
- Image *image= (Image*)ptr->data;
- ImBuf *ibuf= BKE_image_get_ibuf(image, NULL);
+ Image *image = (Image*)ptr->data;
+ ImBuf *ibuf = BKE_image_get_ibuf(image, NULL);
return BKE_ftype_to_imtype(ibuf ? ibuf->ftype : 0);
}
static void rna_Image_file_format_set(PointerRNA *ptr, int value)
{
- Image *image= (Image*)ptr->data;
- if(BKE_imtype_is_movie(value) == 0) { /* should be able to throw an error here */
+ Image *image = (Image*)ptr->data;
+ if (BKE_imtype_is_movie(value) == 0) { /* should be able to throw an error here */
ImBuf *ibuf;
- int ftype= BKE_imtype_to_ftype(value);
+ int ftype = BKE_imtype_to_ftype(value);
/*
ibuf= BKE_image_get_ibuf(image, NULL);
@@ -195,15 +195,15 @@ static void rna_Image_file_format_set(PointerRNA *ptr, int value)
*/
/* to be safe change all buffer file types */
- for(ibuf= image->ibufs.first; ibuf; ibuf= ibuf->next) {
- ibuf->ftype= ftype;
+ for (ibuf = image->ibufs.first; ibuf; ibuf = ibuf->next) {
+ ibuf->ftype = ftype;
}
}
}
static int rna_Image_has_data_get(PointerRNA *ptr)
{
- Image *im= (Image*)ptr->data;
+ Image *im = (Image*)ptr->data;
if (im->ibufs.first)
return 1;
@@ -213,18 +213,18 @@ static int rna_Image_has_data_get(PointerRNA *ptr)
static void rna_Image_size_get(PointerRNA *ptr,int *values)
{
- Image *im= (Image*)ptr->data;
+ Image *im = (Image*)ptr->data;
ImBuf *ibuf;
void *lock;
ibuf = BKE_image_acquire_ibuf(im, NULL , &lock);
if (ibuf) {
- values[0]= ibuf->x;
- values[1]= ibuf->y;
+ values[0] = ibuf->x;
+ values[1] = ibuf->y;
}
else {
- values[0]= 0;
- values[1]= 0;
+ values[0] = 0;
+ values[1] = 0;
}
BKE_image_release_ibuf(im, lock);
@@ -232,18 +232,18 @@ static void rna_Image_size_get(PointerRNA *ptr,int *values)
static void rna_Image_resolution_get(PointerRNA *ptr, float *values)
{
- Image *im= (Image*)ptr->data;
+ Image *im = (Image*)ptr->data;
ImBuf *ibuf;
void *lock;
ibuf = BKE_image_acquire_ibuf(im, NULL , &lock);
if (ibuf) {
- values[0]= ibuf->ppm[0];
- values[1]= ibuf->ppm[1];
+ values[0] = ibuf->ppm[0];
+ values[1] = ibuf->ppm[1];
}
else {
- values[0]= 0;
- values[1]= 0;
+ values[0] = 0;
+ values[1] = 0;
}
BKE_image_release_ibuf(im, lock);
@@ -251,14 +251,14 @@ static void rna_Image_resolution_get(PointerRNA *ptr, float *values)
static void rna_Image_resolution_set(PointerRNA *ptr, const float *values)
{
- Image *im= (Image*)ptr->data;
+ Image *im = (Image*)ptr->data;
ImBuf *ibuf;
void *lock;
ibuf = BKE_image_acquire_ibuf(im, NULL , &lock);
if (ibuf) {
- ibuf->ppm[0]= values[0];
- ibuf->ppm[1]= values[1];
+ ibuf->ppm[0] = values[0];
+ ibuf->ppm[1] = values[1];
}
BKE_image_release_ibuf(im, lock);
@@ -266,19 +266,19 @@ static void rna_Image_resolution_set(PointerRNA *ptr, const float *values)
static int rna_Image_depth_get(PointerRNA *ptr)
{
- Image *im= (Image*)ptr->data;
+ Image *im = (Image*)ptr->data;
ImBuf *ibuf;
void *lock;
int planes;
- ibuf= BKE_image_acquire_ibuf(im, NULL, &lock);
+ ibuf = BKE_image_acquire_ibuf(im, NULL, &lock);
- if(!ibuf)
- planes= 0;
- else if(ibuf->rect_float)
- planes= ibuf->planes * 4;
+ if (!ibuf)
+ planes = 0;
+ else if (ibuf->rect_float)
+ planes = ibuf->planes * 4;
else
- planes= ibuf->planes;
+ planes = ibuf->planes;
BKE_image_release_ibuf(im, lock);
@@ -287,16 +287,16 @@ static int rna_Image_depth_get(PointerRNA *ptr)
static int rna_Image_pixels_get_length(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
{
- Image *ima= ptr->id.data;
+ Image *ima = ptr->id.data;
ImBuf *ibuf;
void *lock;
- ibuf= BKE_image_acquire_ibuf(ima, NULL, &lock);
+ ibuf = BKE_image_acquire_ibuf(ima, NULL, &lock);
- if(ibuf)
- length[0]= ibuf->x*ibuf->y*ibuf->channels;
+ if (ibuf)
+ length[0] = ibuf->x*ibuf->y*ibuf->channels;
else
- length[0]= 0;
+ length[0] = 0;
BKE_image_release_ibuf(ima, lock);
@@ -305,21 +305,21 @@ static int rna_Image_pixels_get_length(PointerRNA *ptr, int length[RNA_MAX_ARRAY
static void rna_Image_pixels_get(PointerRNA *ptr, float *values)
{
- Image *ima= ptr->id.data;
+ Image *ima = ptr->id.data;
ImBuf *ibuf;
void *lock;
int i, size;
- ibuf= BKE_image_acquire_ibuf(ima, NULL, &lock);
+ ibuf = BKE_image_acquire_ibuf(ima, NULL, &lock);
- if(ibuf) {
- size= ibuf->x*ibuf->y*ibuf->channels;
+ if (ibuf) {
+ size = ibuf->x*ibuf->y*ibuf->channels;
- if(ibuf->rect_float) {
+ if (ibuf->rect_float) {
memcpy(values, ibuf->rect_float, sizeof(float)*size);
}
else {
- for(i = 0; i < size; i++)
+ for (i = 0; i < size; i++)
values[i] = ((unsigned char*)ibuf->rect)[i]*(1.0f/255.0f);
}
}
@@ -329,21 +329,21 @@ static void rna_Image_pixels_get(PointerRNA *ptr, float *values)
static void rna_Image_pixels_set(PointerRNA *ptr, const float *values)
{
- Image *ima= ptr->id.data;
+ Image *ima = ptr->id.data;
ImBuf *ibuf;
void *lock;
int i, size;
- ibuf= BKE_image_acquire_ibuf(ima, NULL, &lock);
+ ibuf = BKE_image_acquire_ibuf(ima, NULL, &lock);
- if(ibuf) {
- size= ibuf->x*ibuf->y*ibuf->channels;
+ if (ibuf) {
+ size = ibuf->x*ibuf->y*ibuf->channels;
- if(ibuf->rect_float) {
+ if (ibuf->rect_float) {
memcpy(ibuf->rect_float, values, sizeof(float)*size);
}
else {
- for(i = 0; i < size; i++)
+ for (i = 0; i < size; i++)
((unsigned char*)ibuf->rect)[i] = FTOCHAR(values[i]);
}
@@ -360,51 +360,51 @@ static void rna_def_imageuser(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ImageUser", NULL);
+ srna = RNA_def_struct(brna, "ImageUser", NULL);
RNA_def_struct_ui_text(srna, "Image User", "Parameters defining how an Image datablock is used by another datablock");
RNA_def_struct_path_func(srna, "rna_ImageUser_path");
- prop= RNA_def_property(srna, "use_auto_refresh", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_auto_refresh", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMA_ANIM_ALWAYS);
RNA_def_property_ui_text(prop, "Auto Refresh", "Always refresh image on frame changes");
RNA_def_property_update(prop, 0, "rna_ImageUser_update");
/* animation */
- prop= RNA_def_property(srna, "use_cyclic", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_cyclic", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "cycl", 0);
RNA_def_property_ui_text(prop, "Cyclic", "Cycle the images in the movie");
RNA_def_property_update(prop, 0, "rna_ImageUser_update");
- prop= RNA_def_property(srna, "frame_duration", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_duration", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "frames");
RNA_def_property_range(prop, 0, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Frames", "Number of images of a movie to use");
RNA_def_property_update(prop, 0, "rna_ImageUser_update");
- prop= RNA_def_property(srna, "frame_offset", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_offset", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "offset");
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Offset", "Offset the number of the frame to use in the animation");
RNA_def_property_update(prop, 0, "rna_ImageUser_update");
- prop= RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "sfra");
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Start Frame", "Global starting frame of the movie/sequence, assuming first picture has a #1");
RNA_def_property_update(prop, 0, "rna_ImageUser_update");
- prop= RNA_def_property(srna, "fields_per_frame", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "fields_per_frame", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "fie_ima");
RNA_def_property_range(prop, 1, 200);
RNA_def_property_ui_text(prop, "Fields per Frame", "Number of fields per rendered frame (2 fields is 1 image)");
RNA_def_property_update(prop, 0, "rna_ImageUser_update");
- prop= RNA_def_property(srna, "multilayer_layer", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "multilayer_layer", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "layer");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* image_multi_cb */
RNA_def_property_ui_text(prop, "Layer", "Layer in multilayer image");
- prop= RNA_def_property(srna, "multilayer_pass", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "multilayer_pass", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "pass");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* image_multi_cb */
RNA_def_property_ui_text(prop, "Pass", "Pass in multilayer image");
@@ -414,178 +414,178 @@ static void rna_def_image(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- static const EnumPropertyItem prop_type_items[]= {
+ static const EnumPropertyItem prop_type_items[] = {
{IMA_TYPE_IMAGE, "IMAGE", 0, "Image", ""},
{IMA_TYPE_MULTILAYER, "MULTILAYER", 0, "Multilayer", ""},
{IMA_TYPE_UV_TEST, "UV_TEST", 0, "UV Test", ""},
{IMA_TYPE_R_RESULT, "RENDER_RESULT", 0, "Render Result", ""},
{IMA_TYPE_COMPOSITE, "COMPOSITING", 0, "Compositing", ""},
{0, NULL, 0, NULL, NULL}};
- static const EnumPropertyItem prop_generated_type_items[]= {
+ static const EnumPropertyItem prop_generated_type_items[] = {
{0, "BLANK", 0, "Blank", "Generate a blank image"},
{1, "UV_GRID", 0, "UV Grid", "Generated grid to test UV mappings"},
{2, "COLOR_GRID", 0, "Color Grid", "Generated improved UV grid to test UV mappings"},
{0, NULL, 0, NULL, NULL}};
- static const EnumPropertyItem prop_mapping_items[]= {
+ static const EnumPropertyItem prop_mapping_items[] = {
{0, "UV", 0, "UV Coordinates", "Use UV coordinates for mapping the image"},
{IMA_REFLECT, "REFLECTION", 0, "Reflection", "Use reflection mapping for mapping the image"},
{0, NULL, 0, NULL, NULL}};
- static const EnumPropertyItem prop_field_order_items[]= {
+ static const EnumPropertyItem prop_field_order_items[] = {
{0, "EVEN", 0, "Upper First", "Upper field first"},
{IMA_STD_FIELD, "ODD", 0, "Lower First", "Lower field first"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "Image", "ID");
+ srna = RNA_def_struct(brna, "Image", "ID");
RNA_def_struct_ui_text(srna, "Image", "Image datablock referencing an external or packed image");
RNA_def_struct_ui_icon(srna, ICON_IMAGE_DATA);
- prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
+ prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "File Name", "Image/Movie file name");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_reload_update");
/* eek. this is horrible but needed so we can save to a new name without blanking the data :( */
- prop= RNA_def_property(srna, "filepath_raw", PROP_STRING, PROP_FILEPATH);
+ prop = RNA_def_property(srna, "filepath_raw", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "File Name", "Image/Movie file name (without data refreshing)");
- prop= RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, image_type_items);
RNA_def_property_enum_funcs(prop, "rna_Image_file_format_get", "rna_Image_file_format_set", NULL);
RNA_def_property_ui_text(prop, "File Format", "Format used for re-saving this file");
- prop= RNA_def_property(srna, "source", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "source", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, image_source_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Image_source_itemf");
RNA_def_property_ui_text(prop, "Source", "Where the image comes from");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_source_update");
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Type", "How to generate the image");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
- prop= RNA_def_property(srna, "packed_file", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "packed_file", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "packedfile");
RNA_def_property_ui_text(prop, "Packed File", "");
- prop= RNA_def_property(srna, "field_order", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "field_order", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, prop_field_order_items);
RNA_def_property_ui_text(prop, "Field Order", "Order of video fields (select which lines are displayed first)");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
/* booleans */
- prop= RNA_def_property(srna, "use_fields", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_fields", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMA_FIELDS);
RNA_def_property_ui_text(prop, "Fields", "Use fields of the image");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_fields_update");
- prop= RNA_def_property(srna, "use_premultiply", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_premultiply", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMA_DO_PREMUL);
RNA_def_property_ui_text(prop, "Premultiply", "Convert RGB from key alpha to premultiplied alpha");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_free_update");
- prop= RNA_def_property(srna, "use_color_unpremultiply", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_color_unpremultiply", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMA_CM_PREDIVIDE);
RNA_def_property_ui_text(prop, "Color Unpremultiply", "For premultiplied alpha images, do color space conversion on colors without alpha, to avoid fringing for images with light backgrounds");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_free_update");
- prop= RNA_def_property(srna, "is_dirty", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_dirty", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_Image_dirty_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Dirty", "Image has changed and is not saved");
/* generated image (image_generated_change_cb) */
- prop= RNA_def_property(srna, "generated_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "generated_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "gen_type");
RNA_def_property_enum_items(prop, prop_generated_type_items);
RNA_def_property_ui_text(prop, "Generated Type", "Generated image type");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_generated_update");
- prop= RNA_def_property(srna, "generated_width", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "generated_width", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gen_x");
RNA_def_property_range(prop, 1, 16384);
RNA_def_property_ui_text(prop, "Generated Width", "Generated image width");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_generated_update");
- prop= RNA_def_property(srna, "generated_height", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "generated_height", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gen_y");
RNA_def_property_range(prop, 1, 16384);
RNA_def_property_ui_text(prop, "Generated Height", "Generated image height");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_generated_update");
- prop= RNA_def_property(srna, "use_generated_float", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_generated_float", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gen_flag", IMA_GEN_FLOAT);
RNA_def_property_ui_text(prop, "Float Buffer", "Generate floating point buffer");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_generated_update");
/* realtime properties */
- prop= RNA_def_property(srna, "mapping", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mapping", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, prop_mapping_items);
RNA_def_property_ui_text(prop, "Mapping", "Mapping type to use for this image in the game engine");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
- prop= RNA_def_property(srna, "display_aspect", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "display_aspect", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "aspx");
RNA_def_property_array(prop, 2);
RNA_def_property_range(prop, 0.1f, 5000.0f);
RNA_def_property_ui_text(prop, "Display Aspect", "Display Aspect for this image, does not affect rendering");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
- prop= RNA_def_property(srna, "use_animation", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_animation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "tpageflag", IMA_TWINANIM);
RNA_def_property_ui_text(prop, "Animated", "Use as animated texture in the game engine");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_animated_update");
- prop= RNA_def_property(srna, "frame_start", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "twsta");
RNA_def_property_range(prop, 0, 128);
RNA_def_property_ui_text(prop, "Animation Start", "Start frame of an animated texture");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_animated_update");
- prop= RNA_def_property(srna, "frame_end", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_end", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "twend");
RNA_def_property_range(prop, 0, 128);
RNA_def_property_ui_text(prop, "Animation End", "End frame of an animated texture");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, "rna_Image_animated_update");
- prop= RNA_def_property(srna, "fps", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "fps", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "animspeed");
RNA_def_property_range(prop, 1, 100);
RNA_def_property_ui_text(prop, "Animation Speed", "Speed of the animation in frames per second");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
- prop= RNA_def_property(srna, "use_tiles", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_tiles", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "tpageflag", IMA_TILES);
RNA_def_property_ui_text(prop, "Tiles", "Use of tilemode for faces (default shift-LMB to pick the tile for selected faces)");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
- prop= RNA_def_property(srna, "tiles_x", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "tiles_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "xrep");
RNA_def_property_range(prop, 1, 16);
RNA_def_property_ui_text(prop, "Tiles X", "Degree of repetition in the X direction");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
- prop= RNA_def_property(srna, "tiles_y", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "tiles_y", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "yrep");
RNA_def_property_range(prop, 1, 16);
RNA_def_property_ui_text(prop, "Tiles Y", "Degree of repetition in the Y direction");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
- prop= RNA_def_property(srna, "use_clamp_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_clamp_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "tpageflag", IMA_CLAMP_U);
RNA_def_property_ui_text(prop, "Clamp X", "Disable texture repeating horizontally");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
- prop= RNA_def_property(srna, "use_clamp_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_clamp_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "tpageflag", IMA_CLAMP_V);
RNA_def_property_ui_text(prop, "Clamp Y", "Disable texture repeating vertically");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
- prop= RNA_def_property(srna, "bindcode", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "bindcode", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "bindcode");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Bindcode", "OpenGL bindcode");
@@ -595,24 +595,24 @@ static void rna_def_image(BlenderRNA *brna)
Image.has_data and Image.depth are temporary,
Update import_obj.py when they are replaced (Arystan)
*/
- prop= RNA_def_property(srna, "has_data", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "has_data", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_Image_has_data_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Has data", "True if this image has data");
- prop= RNA_def_property(srna, "depth", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "depth", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_funcs(prop, "rna_Image_depth_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Depth", "Image bit depth");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_int_vector(srna, "size" , 2 , NULL , 0, 0, "Size" , "Width and height in pixels, zero when image data cant be loaded" , 0 , 0);
+ prop = RNA_def_int_vector(srna, "size" , 2 , NULL , 0, 0, "Size" , "Width and height in pixels, zero when image data cant be loaded" , 0 , 0);
RNA_def_property_int_funcs(prop, "rna_Image_size_get" , NULL, NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_float_vector(srna, "resolution" , 2 , NULL , 0, 0, "Resolution" , "X/Y pixels per meter" , 0 , 0);
+ prop = RNA_def_float_vector(srna, "resolution" , 2 , NULL , 0, 0, "Resolution" , "X/Y pixels per meter" , 0 , 0);
RNA_def_property_float_funcs(prop, "rna_Image_resolution_get" , "rna_Image_resolution_set", NULL);
- prop= RNA_def_property(srna, "pixels", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "pixels", PROP_FLOAT, PROP_NONE);
RNA_def_property_flag(prop, PROP_DYNAMIC);
RNA_def_property_multi_array(prop, 1, NULL);
RNA_def_property_ui_text(prop, "Pixels", "Image pixels in floating point values");
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index b28adeafbc8..39561536a67 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -82,15 +82,15 @@ static void rna_Image_save_render(Image *image, bContext *C, ReportList *reports
}
else {
/* temp swap out the color */
- const unsigned char imb_planes_back= ibuf->planes;
- const float dither_back= ibuf->dither;
- ibuf->planes= scene->r.im_format.planes;
- ibuf->dither= scene->r.dither_intensity;
+ const unsigned char imb_planes_back = ibuf->planes;
+ const float dither_back = ibuf->dither;
+ ibuf->planes = scene->r.im_format.planes;
+ ibuf->dither = scene->r.dither_intensity;
if (!BKE_write_ibuf(ibuf, path, &scene->r.im_format)) {
BKE_reportf(reports, RPT_ERROR, "Couldn't write image: %s", path);
}
- ibuf->planes= imb_planes_back;
- ibuf->dither= dither_back;
+ ibuf->planes = imb_planes_back;
+ ibuf->dither = dither_back;
}
BKE_image_release_ibuf(image, lock);
@@ -101,22 +101,22 @@ static void rna_Image_save_render(Image *image, bContext *C, ReportList *reports
static void rna_Image_save(Image *image, ReportList *reports)
{
- ImBuf *ibuf= BKE_image_get_ibuf(image, NULL);
- if(ibuf) {
+ ImBuf *ibuf = BKE_image_get_ibuf(image, NULL);
+ if (ibuf) {
char filename[FILE_MAX];
BLI_strncpy(filename, image->name, sizeof(filename));
BLI_path_abs(filename, G.main->name);
- if(image->packedfile) {
+ if (image->packedfile) {
if (writePackedFile(reports, image->name, image->packedfile, 0) != RET_OK) {
BKE_reportf(reports, RPT_ERROR, "Image \"%s\" could saved packed file to \"%s\"", image->id.name+2, image->name);
}
}
else if (IMB_saveiff(ibuf, filename, ibuf->flags)) {
- image->type= IMA_TYPE_IMAGE;
+ image->type = IMA_TYPE_IMAGE;
- if(image->source==IMA_SRC_GENERATED)
- image->source= IMA_SRC_FILE;
+ if (image->source == IMA_SRC_GENERATED)
+ image->source = IMA_SRC_FILE;
ibuf->userflags &= ~IB_BITMAPDIRTY;
}
@@ -137,11 +137,11 @@ static void rna_Image_pack(Image *image, ReportList *reports, int as_png)
BKE_reportf(reports, RPT_ERROR, "Can't pack edited image from disk, only as internal PNG");
}
else {
- if(as_png) {
+ if (as_png) {
BKE_image_memorypack(image);
}
else {
- image->packedfile= newPackedFile(reports, image->name, ID_BLEND_PATH(G.main, &image->id));
+ image->packedfile = newPackedFile(reports, image->name, ID_BLEND_PATH(G.main, &image->id));
}
}
}
@@ -151,7 +151,7 @@ static void rna_Image_unpack(Image *image, ReportList *reports, int method)
if (!image->packedfile) {
BKE_report(reports, RPT_ERROR, "Image not packed");
}
- else if (image->source==IMA_SRC_SEQUENCE || image->source==IMA_SRC_MOVIE) {
+ else if (image->source == IMA_SRC_SEQUENCE || image->source == IMA_SRC_MOVIE) {
BKE_report(reports, RPT_ERROR, "Unpacking movies or image sequences not supported");
return;
}
@@ -168,9 +168,9 @@ static void rna_Image_reload(Image *image)
static void rna_Image_update(Image *image, ReportList *reports)
{
- ImBuf *ibuf= BKE_image_get_ibuf(image, NULL);
+ ImBuf *ibuf = BKE_image_get_ibuf(image, NULL);
- if(ibuf == NULL) {
+ if (ibuf == NULL) {
BKE_reportf(reports, RPT_ERROR, "Image \"%s\" does not have any image data", image->id.name+2);
return;
}
@@ -184,12 +184,12 @@ static int rna_Image_gl_load(Image *image, ReportList *reports, int filter, int
unsigned int *bind = &image->bindcode;
int error = GL_NO_ERROR;
- if(*bind)
+ if (*bind)
return error;
- ibuf= BKE_image_get_ibuf(image, NULL);
+ ibuf = BKE_image_get_ibuf(image, NULL);
- if(ibuf == NULL || ibuf->rect == NULL ) {
+ if (ibuf == NULL || ibuf->rect == NULL ) {
BKE_reportf(reports, RPT_ERROR, "Image \"%s\" does not have any image data", image->id.name+2);
return (int)GL_INVALID_OPERATION;
}
@@ -234,35 +234,35 @@ void RNA_api_image(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
- func= RNA_def_function(srna, "save_render", "rna_Image_save_render");
+ func = RNA_def_function(srna, "save_render", "rna_Image_save_render");
RNA_def_function_ui_description(func, "Save image to a specific path using a scenes render settings");
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
- parm= RNA_def_string_file_path(func, "filepath", "", 0, "", "Save path");
+ parm = RNA_def_string_file_path(func, "filepath", "", 0, "", "Save path");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_pointer(func, "scene", "Scene", "", "Scene to take image parameters from");
- func= RNA_def_function(srna, "save", "rna_Image_save");
+ func = RNA_def_function(srna, "save", "rna_Image_save");
RNA_def_function_ui_description(func, "Save image to its source path");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- func= RNA_def_function(srna, "pack", "rna_Image_pack");
+ func = RNA_def_function(srna, "pack", "rna_Image_pack");
RNA_def_function_ui_description(func, "Pack an image as embedded data into the .blend file");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_boolean(func, "as_png", 0, "as_png", "Pack the image as PNG (needed for generated/dirty images)");
- func= RNA_def_function(srna, "unpack", "rna_Image_unpack");
+ func = RNA_def_function(srna, "unpack", "rna_Image_unpack");
RNA_def_function_ui_description(func, "Save an image packed in the .blend file to disk");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_enum(func, "method", unpack_method_items, PF_USE_LOCAL, "method", "How to unpack");
- func= RNA_def_function(srna, "reload", "rna_Image_reload");
+ func = RNA_def_function(srna, "reload", "rna_Image_reload");
RNA_def_function_ui_description(func, "Reload the image from its source path");
- func= RNA_def_function(srna, "update", "rna_Image_update");
+ func = RNA_def_function(srna, "update", "rna_Image_update");
RNA_def_function_ui_description(func, "Update the display image from the floating point buffer");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- func= RNA_def_function(srna, "gl_load", "rna_Image_gl_load");
+ func = RNA_def_function(srna, "gl_load", "rna_Image_gl_load");
RNA_def_function_ui_description(func, "Load the image into OpenGL graphics memory");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_int(func, "filter", GL_LINEAR_MIPMAP_NEAREST, -INT_MAX, INT_MAX, "Filter",
@@ -270,10 +270,10 @@ void RNA_api_image(StructRNA *srna)
RNA_def_int(func, "mag", GL_LINEAR, -INT_MAX, INT_MAX, "Magnification",
"The texture magnification function", -INT_MAX, INT_MAX);
/* return value */
- parm= RNA_def_int(func, "error", 0, -INT_MAX, INT_MAX, "Error", "OpenGL error value", -INT_MAX, INT_MAX);
+ parm = RNA_def_int(func, "error", 0, -INT_MAX, INT_MAX, "Error", "OpenGL error value", -INT_MAX, INT_MAX);
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "gl_free", "rna_Image_gl_free");
+ func = RNA_def_function(srna, "gl_free", "rna_Image_gl_free");
RNA_def_function_ui_description(func, "Free the image from OpenGL graphics memory");
/* TODO, pack/unpack, maybe should be generic functions? */
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index 4c66da1fdbb..6a9228dc8aa 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -377,7 +377,7 @@ PointerRNA rna_pointer_inherit_refine(struct PointerRNA *ptr, struct StructRNA *
int rna_parameter_size(struct PropertyRNA *parm);
int rna_parameter_size_alloc(struct PropertyRNA *parm);
-// XXX, these should not need to be defined here~!
+/* XXX, these should not need to be defined here~! */
struct MTex *rna_mtex_texture_slots_add(struct ID *self, struct bContext *C, struct ReportList *reports);
struct MTex *rna_mtex_texture_slots_create(struct ID *self, struct bContext *C, struct ReportList *reports, int index);
void rna_mtex_texture_slots_clear(struct ID *self, struct bContext *C, struct ReportList *reports, int index);
diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c
index 08836cc1865..54d258e2e72 100644
--- a/source/blender/makesrna/intern/rna_key.c
+++ b/source/blender/makesrna/intern/rna_key.c
@@ -55,7 +55,7 @@
static Key *rna_ShapeKey_find_key(ID *id)
{
- switch(GS(id->name)) {
+ switch (GS(id->name)) {
case ID_CU: return ((Curve*)id)->key;
case ID_KE: return (Key*)id;
case ID_LT: return ((Lattice*)id)->key;
@@ -67,7 +67,7 @@ static Key *rna_ShapeKey_find_key(ID *id)
void rna_ShapeKey_name_set(PointerRNA *ptr, const char *value)
{
- KeyBlock *kb= ptr->data;
+ KeyBlock *kb = ptr->data;
char oldname[sizeof(kb->name)];
/* make a copy of the old name first */
@@ -78,7 +78,7 @@ void rna_ShapeKey_name_set(PointerRNA *ptr, const char *value)
/* make sure the name is truly unique */
if (ptr->id.data) {
- Key *key= rna_ShapeKey_find_key(ptr->id.data);
+ Key *key = rna_ShapeKey_find_key(ptr->id.data);
BLI_uniquename(&key->block, kb, "Key", '.', offsetof(KeyBlock, name), sizeof(kb->name));
}
@@ -88,17 +88,17 @@ void rna_ShapeKey_name_set(PointerRNA *ptr, const char *value)
static void rna_ShapeKey_value_set(PointerRNA *ptr, float value)
{
- KeyBlock *data= (KeyBlock*)ptr->data;
+ KeyBlock *data = (KeyBlock*)ptr->data;
CLAMP(value, data->slidermin, data->slidermax);
- data->curval= value;
+ data->curval = value;
}
static void rna_ShapeKey_value_range(PointerRNA *ptr, float *min, float *max)
{
- KeyBlock *data= (KeyBlock*)ptr->data;
+ KeyBlock *data = (KeyBlock*)ptr->data;
- *min= data->slidermin;
- *max= data->slidermax;
+ *min = data->slidermin;
+ *max = data->slidermax;
}
/* epsilon for how close one end of shapekey range can get to the other */
@@ -106,15 +106,15 @@ static void rna_ShapeKey_value_range(PointerRNA *ptr, float *min, float *max)
static void rna_ShapeKey_slider_min_range(PointerRNA *ptr, float *min, float *max)
{
- KeyBlock *data= (KeyBlock*)ptr->data;
+ KeyBlock *data = (KeyBlock*)ptr->data;
- *min= -10.0f;
- *max= data->slidermax - SHAPEKEY_SLIDER_TOL;
+ *min = -10.0f;
+ *max = data->slidermax - SHAPEKEY_SLIDER_TOL;
}
static void rna_ShapeKey_slider_min_set(PointerRNA *ptr, float value)
{
- KeyBlock *data= (KeyBlock*)ptr->data;
+ KeyBlock *data = (KeyBlock*)ptr->data;
float min, max;
rna_ShapeKey_slider_min_range(ptr, &min, &max);
@@ -124,15 +124,15 @@ static void rna_ShapeKey_slider_min_set(PointerRNA *ptr, float value)
static void rna_ShapeKey_slider_max_range(PointerRNA *ptr, float *min, float *max)
{
- KeyBlock *data= (KeyBlock*)ptr->data;
+ KeyBlock *data = (KeyBlock*)ptr->data;
- *min= data->slidermin + SHAPEKEY_SLIDER_TOL;
- *max= 10.0f;
+ *min = data->slidermin + SHAPEKEY_SLIDER_TOL;
+ *max = 10.0f;
}
static void rna_ShapeKey_slider_max_set(PointerRNA *ptr, float value)
{
- KeyBlock *data= (KeyBlock*)ptr->data;
+ KeyBlock *data = (KeyBlock*)ptr->data;
float min, max;
rna_ShapeKey_slider_max_range(ptr, &min, &max);
@@ -144,8 +144,8 @@ static void rna_ShapeKey_slider_max_set(PointerRNA *ptr, float value)
PointerRNA rna_object_shapekey_index_get(ID *id, int value)
{
- Key *key= rna_ShapeKey_find_key(id);
- KeyBlock *kb= NULL;
+ Key *key = rna_ShapeKey_find_key(id);
+ KeyBlock *kb = NULL;
PointerRNA ptr;
if (key && value < key->totkey)
@@ -158,7 +158,7 @@ PointerRNA rna_object_shapekey_index_get(ID *id, int value)
int rna_object_shapekey_index_set(ID *id, PointerRNA value, int current)
{
- Key *key= rna_ShapeKey_find_key(id);
+ Key *key = rna_ShapeKey_find_key(id);
if (key) {
int a = BLI_findindex(&key->block, value.data);
@@ -170,100 +170,100 @@ int rna_object_shapekey_index_set(ID *id, PointerRNA value, int current)
static PointerRNA rna_ShapeKey_relative_key_get(PointerRNA *ptr)
{
- KeyBlock *kb= (KeyBlock*)ptr->data;
+ KeyBlock *kb = (KeyBlock*)ptr->data;
return rna_object_shapekey_index_get(ptr->id.data, kb->relative);
}
static void rna_ShapeKey_relative_key_set(PointerRNA *ptr, PointerRNA value)
{
- KeyBlock *kb= (KeyBlock*)ptr->data;
+ KeyBlock *kb = (KeyBlock*)ptr->data;
- kb->relative= rna_object_shapekey_index_set(ptr->id.data, value, kb->relative);
+ kb->relative = rna_object_shapekey_index_set(ptr->id.data, value, kb->relative);
}
static void rna_ShapeKeyPoint_co_get(PointerRNA *ptr, float *values)
{
- float *vec= (float*)ptr->data;
+ float *vec = (float*)ptr->data;
- values[0]= vec[0];
- values[1]= vec[1];
- values[2]= vec[2];
+ values[0] = vec[0];
+ values[1] = vec[1];
+ values[2] = vec[2];
}
static void rna_ShapeKeyPoint_co_set(PointerRNA *ptr, const float *values)
{
- float *vec= (float*)ptr->data;
+ float *vec = (float*)ptr->data;
- vec[0]= values[0];
- vec[1]= values[1];
- vec[2]= values[2];
+ vec[0] = values[0];
+ vec[1] = values[1];
+ vec[2] = values[2];
}
static float rna_ShapeKeyCurvePoint_tilt_get(PointerRNA *ptr)
{
- float *vec= (float*)ptr->data;
+ float *vec = (float*)ptr->data;
return vec[3];
}
static void rna_ShapeKeyCurvePoint_tilt_set(PointerRNA *ptr, float value)
{
- float *vec= (float*)ptr->data;
- vec[3]= value;
+ float *vec = (float*)ptr->data;
+ vec[3] = value;
}
static void rna_ShapeKeyBezierPoint_co_get(PointerRNA *ptr, float *values)
{
- float *vec= (float*)ptr->data;
+ float *vec = (float*)ptr->data;
- values[0]= vec[0+3];
- values[1]= vec[1+3];
- values[2]= vec[2+3];
+ values[0] = vec[0+3];
+ values[1] = vec[1+3];
+ values[2] = vec[2+3];
}
static void rna_ShapeKeyBezierPoint_co_set(PointerRNA *ptr, const float *values)
{
- float *vec= (float*)ptr->data;
+ float *vec = (float*)ptr->data;
- vec[0+3]= values[0];
- vec[1+3]= values[1];
- vec[2+3]= values[2];
+ vec[0+3] = values[0];
+ vec[1+3] = values[1];
+ vec[2+3] = values[2];
}
static void rna_ShapeKeyBezierPoint_handle_1_co_get(PointerRNA *ptr, float *values)
{
- float *vec= (float*)ptr->data;
+ float *vec = (float*)ptr->data;
- values[0]= vec[0];
- values[1]= vec[1];
- values[2]= vec[2];
+ values[0] = vec[0];
+ values[1] = vec[1];
+ values[2] = vec[2];
}
static void rna_ShapeKeyBezierPoint_handle_1_co_set(PointerRNA *ptr, const float *values)
{
- float *vec= (float*)ptr->data;
+ float *vec = (float*)ptr->data;
- vec[0]= values[0];
- vec[1]= values[1];
- vec[2]= values[2];
+ vec[0] = values[0];
+ vec[1] = values[1];
+ vec[2] = values[2];
}
static void rna_ShapeKeyBezierPoint_handle_2_co_get(PointerRNA *ptr, float *values)
{
- float *vec= (float*)ptr->data;
+ float *vec = (float*)ptr->data;
- values[0]= vec[6+0];
- values[1]= vec[6+1];
- values[2]= vec[6+2];
+ values[0] = vec[6+0];
+ values[1] = vec[6+1];
+ values[2] = vec[6+2];
}
static void rna_ShapeKeyBezierPoint_handle_2_co_set(PointerRNA *ptr, const float *values)
{
- float *vec= (float*)ptr->data;
+ float *vec = (float*)ptr->data;
- vec[6+0]= values[0];
- vec[6+1]= values[1];
- vec[6+2]= values[2];
+ vec[6+0] = values[0];
+ vec[6+1] = values[1];
+ vec[6+2] = values[2];
}
/*static float rna_ShapeKeyBezierPoint_tilt_get(PointerRNA *ptr)
@@ -280,17 +280,17 @@ static void rna_ShapeKeyBezierPoint_tilt_set(PointerRNA *ptr, float value)
static void rna_ShapeKey_data_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Key *key= rna_ShapeKey_find_key(ptr->id.data);
- KeyBlock *kb= (KeyBlock*)ptr->data;
+ Key *key = rna_ShapeKey_find_key(ptr->id.data);
+ KeyBlock *kb = (KeyBlock*)ptr->data;
Curve *cu;
Nurb *nu;
- int tot= kb->totelem, size= key->elemsize;
+ int tot = kb->totelem, size = key->elemsize;
- if(GS(key->from->name) == ID_CU) {
- cu= (Curve*)key->from;
- nu= cu->nurb.first;
+ if (GS(key->from->name) == ID_CU) {
+ cu = (Curve*)key->from;
+ nu = cu->nurb.first;
- if(nu->bezt) {
+ if (nu->bezt) {
tot /= 3;
size *= 3;
}
@@ -301,17 +301,17 @@ static void rna_ShapeKey_data_begin(CollectionPropertyIterator *iter, PointerRNA
static int rna_ShapeKey_data_length(PointerRNA *ptr)
{
- Key *key= rna_ShapeKey_find_key(ptr->id.data);
- KeyBlock *kb= (KeyBlock*)ptr->data;
+ Key *key = rna_ShapeKey_find_key(ptr->id.data);
+ KeyBlock *kb = (KeyBlock*)ptr->data;
Curve *cu;
Nurb *nu;
- int tot= kb->totelem;
+ int tot = kb->totelem;
- if(GS(key->from->name) == ID_CU) {
- cu= (Curve*)key->from;
- nu= cu->nurb.first;
+ if (GS(key->from->name) == ID_CU) {
+ cu = (Curve*)key->from;
+ nu = cu->nurb.first;
- if(nu->bezt)
+ if (nu->bezt)
tot /= 3;
}
@@ -320,30 +320,30 @@ static int rna_ShapeKey_data_length(PointerRNA *ptr)
static PointerRNA rna_ShapeKey_data_get(CollectionPropertyIterator *iter)
{
- Key *key= rna_ShapeKey_find_key(iter->parent.id.data);
+ Key *key = rna_ShapeKey_find_key(iter->parent.id.data);
StructRNA *type;
Curve *cu;
Nurb *nu;
- if(GS(key->from->name) == ID_CU) {
- cu= (Curve*)key->from;
- nu= cu->nurb.first;
+ if (GS(key->from->name) == ID_CU) {
+ cu = (Curve*)key->from;
+ nu = cu->nurb.first;
- if(nu->bezt)
- type= &RNA_ShapeKeyBezierPoint;
+ if (nu->bezt)
+ type = &RNA_ShapeKeyBezierPoint;
else
- type= &RNA_ShapeKeyCurvePoint;
+ type = &RNA_ShapeKeyCurvePoint;
}
else
- type= &RNA_ShapeKeyPoint;
+ type = &RNA_ShapeKeyPoint;
return rna_pointer_inherit_refine(&iter->parent, type, rna_iterator_array_get(iter));
}
static char *rna_ShapeKey_path(PointerRNA *ptr)
{
- KeyBlock *kb= (KeyBlock *)ptr->data;
- ID *id= ptr->id.data;
+ KeyBlock *kb = (KeyBlock *)ptr->data;
+ ID *id = ptr->id.data;
if ((id) && (GS(id->name) != ID_KE))
return BLI_sprintfN("shape_keys.key_blocks[\"%s\"]", kb->name);
@@ -353,11 +353,11 @@ static char *rna_ShapeKey_path(PointerRNA *ptr)
static void rna_Key_update_data(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
- Key *key= ptr->id.data;
+ Key *key = ptr->id.data;
Object *ob;
- for(ob=bmain->object.first; ob; ob= ob->id.next) {
- if(ob_get_key(ob) == key) {
+ for (ob = bmain->object.first; ob; ob = ob->id.next) {
+ if (ob_get_key(ob) == key) {
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_main_add_notifier(NC_OBJECT|ND_MODIFIER, ob);
}
@@ -437,7 +437,7 @@ static char *rna_ShapeKeyPoint_path(PointerRNA *ptr)
return BLI_sprintfN("shape_keys.key_blocks[\"%s\"].data[%d]", kb->name, index);
}
else
- return NULL; // XXX: there's really no way to resolve this...
+ return NULL; /* XXX: there's really no way to resolve this... */
}
#else
@@ -447,48 +447,48 @@ static void rna_def_keydata(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ShapeKeyPoint", NULL);
+ srna = RNA_def_struct(brna, "ShapeKeyPoint", NULL);
RNA_def_struct_ui_text(srna, "Shape Key Point", "Point in a shape key");
RNA_def_struct_path_func(srna, "rna_ShapeKeyPoint_path");
- prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_ShapeKeyPoint_co_get", "rna_ShapeKeyPoint_co_set", NULL);
RNA_def_property_ui_text(prop, "Location", "");
RNA_def_property_update(prop, 0, "rna_Key_update_data");
- srna= RNA_def_struct(brna, "ShapeKeyCurvePoint", NULL);
+ srna = RNA_def_struct(brna, "ShapeKeyCurvePoint", NULL);
RNA_def_struct_ui_text(srna, "Shape Key Curve Point", "Point in a shape key for curves");
RNA_def_struct_path_func(srna, "rna_ShapeKeyPoint_path"); /* there's nothing type specific here, so this is fine for now */
- prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_ShapeKeyPoint_co_get", "rna_ShapeKeyPoint_co_set", NULL);
RNA_def_property_ui_text(prop, "Location", "");
RNA_def_property_update(prop, 0, "rna_Key_update_data");
- prop= RNA_def_property(srna, "tilt", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "tilt", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_funcs(prop, "rna_ShapeKeyCurvePoint_tilt_get", "rna_ShapeKeyCurvePoint_tilt_set", NULL);
RNA_def_property_ui_text(prop, "Tilt", "");
RNA_def_property_update(prop, 0, "rna_Key_update_data");
- srna= RNA_def_struct(brna, "ShapeKeyBezierPoint", NULL);
+ srna = RNA_def_struct(brna, "ShapeKeyBezierPoint", NULL);
RNA_def_struct_ui_text(srna, "Shape Key Bezier Point", "Point in a shape key for Bezier curves");
RNA_def_struct_path_func(srna, "rna_ShapeKeyPoint_path"); /* there's nothing type specific here, so this is fine for now */
- prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_ShapeKeyBezierPoint_co_get", "rna_ShapeKeyBezierPoint_co_set", NULL);
RNA_def_property_ui_text(prop, "Location", "");
RNA_def_property_update(prop, 0, "rna_Key_update_data");
- prop= RNA_def_property(srna, "handle_left", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "handle_left", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_ShapeKeyBezierPoint_handle_1_co_get", "rna_ShapeKeyBezierPoint_handle_1_co_set", NULL);
RNA_def_property_ui_text(prop, "Handle 1 Location", "");
RNA_def_property_update(prop, 0, "rna_Key_update_data");
- prop= RNA_def_property(srna, "handle_right", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "handle_right", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_ShapeKeyBezierPoint_handle_2_co_get", "rna_ShapeKeyBezierPoint_handle_2_co_set", NULL);
RNA_def_property_ui_text(prop, "Handle 2 Location", "");
@@ -512,70 +512,70 @@ static void rna_def_keyblock(BlenderRNA *brna)
{KEY_BSPLINE, "KEY_BSPLINE", 0, "BSpline", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "ShapeKey", NULL);
+ srna = RNA_def_struct(brna, "ShapeKey", NULL);
RNA_def_struct_ui_text(srna, "Shape Key", "Shape key in a shape keys datablock");
RNA_def_struct_sdna(srna, "KeyBlock");
RNA_def_struct_path_func(srna, "rna_ShapeKey_path");
RNA_def_struct_ui_icon(srna, ICON_SHAPEKEY_DATA);
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "Name of Shape Key");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_ShapeKey_name_set");
RNA_def_struct_name_property(srna, prop);
/* keys need to be sorted to edit this */
- prop= RNA_def_property(srna, "frame", PROP_FLOAT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame", PROP_FLOAT, PROP_TIME);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_float_sdna(prop, NULL, "pos");
RNA_def_property_ui_text(prop, "Frame", "Frame for absolute keys");
RNA_def_property_update(prop, 0, "rna_Key_update_data");
/* for now, this is editable directly, as users can set this even if they're not animating them (to test results) */
- prop= RNA_def_property(srna, "value", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "value", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "curval");
RNA_def_property_float_funcs(prop, NULL, "rna_ShapeKey_value_set", "rna_ShapeKey_value_range");
RNA_def_property_ui_range(prop, -10.0f, 10.0f, 10, 3);
RNA_def_property_ui_text(prop, "Value", "Value of shape key at the current frame");
RNA_def_property_update(prop, 0, "rna_Key_update_data");
- prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_keyblock_type_items);
RNA_def_property_ui_text(prop, "Interpolation", "Interpolation type");
RNA_def_property_update(prop, 0, "rna_Key_update_data");
- prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "vgroup");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex weight group, to blend with basis shape");
RNA_def_property_update(prop, 0, "rna_Key_update_data");
- prop= RNA_def_property(srna, "relative_key", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "relative_key", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ShapeKey");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, "rna_ShapeKey_relative_key_get", "rna_ShapeKey_relative_key_set", NULL, NULL);
RNA_def_property_ui_text(prop, "Relative Key", "Shape used as a relative key");
RNA_def_property_update(prop, 0, "rna_Key_update_data");
- prop= RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYBLOCK_MUTE);
RNA_def_property_ui_text(prop, "Mute", "Mute this shape key");
RNA_def_property_ui_icon(prop, ICON_RESTRICT_VIEW_OFF, 1);
RNA_def_property_update(prop, 0, "rna_Key_update_data");
- prop= RNA_def_property(srna, "slider_min", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "slider_min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "slidermin");
RNA_def_property_range(prop, -10.0f, 10.0f);
RNA_def_property_float_funcs(prop, NULL, "rna_ShapeKey_slider_min_set", "rna_ShapeKey_slider_min_range");
RNA_def_property_ui_text(prop, "Slider Min", "Minimum for slider");
- prop= RNA_def_property(srna, "slider_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "slider_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "slidermax");
RNA_def_property_range(prop, -10.0f, 10.0f);
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_float_funcs(prop, NULL, "rna_ShapeKey_slider_max_set", "rna_ShapeKey_slider_max_range");
RNA_def_property_ui_text(prop, "Slider Max", "Maximum for slider");
- prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "data", "totelem");
RNA_def_property_struct_type(prop, "UnknownType");
RNA_def_property_ui_text(prop, "Data", "");
@@ -587,34 +587,34 @@ static void rna_def_key(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Key", "ID");
+ srna = RNA_def_struct(brna, "Key", "ID");
RNA_def_struct_ui_text(srna, "Key", "Shape keys datablock containing different shapes of geometric datablocks");
RNA_def_struct_ui_icon(srna, ICON_SHAPEKEY_DATA);
- prop= RNA_def_property(srna, "reference_key", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "reference_key", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_sdna(prop, NULL, "refkey");
RNA_def_property_ui_text(prop, "Reference Key", "");
- prop= RNA_def_property(srna, "key_blocks", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "key_blocks", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "block", NULL);
RNA_def_property_struct_type(prop, "ShapeKey");
RNA_def_property_ui_text(prop, "Key Blocks", "Shape keys");
rna_def_animdata_common(srna);
- prop= RNA_def_property(srna, "user", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "user", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "from");
RNA_def_property_ui_text(prop, "User", "Datablock using these shape keys");
- prop= RNA_def_property(srna, "use_relative", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_relative", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "type", KEY_RELATIVE);
RNA_def_property_ui_text(prop, "Relative", "Make shape keys relative");
RNA_def_property_update(prop, 0, "rna_Key_update_data");
- prop= RNA_def_property(srna, "slurph", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "slurph", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "slurph");
RNA_def_property_range(prop, -500, 500);
RNA_def_property_ui_text(prop, "Slurph", "Create a delay (in frames) in applying keypositions, first vertex goes first");
diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c
index 7de2d550875..f5ba7fbe816 100644
--- a/source/blender/makesrna/intern/rna_lamp.c
+++ b/source/blender/makesrna/intern/rna_lamp.c
@@ -52,10 +52,10 @@
static void rna_Lamp_buffer_size_set(PointerRNA *ptr, int value)
{
- Lamp *la= (Lamp*)ptr->data;
+ Lamp *la = (Lamp*)ptr->data;
CLAMP(value, 512, 10240);
- la->bufsize= value;
+ la->bufsize = value;
la->bufsize &= (~15); /* round to multiple of 16 */
}
@@ -66,31 +66,31 @@ static PointerRNA rna_Lamp_sky_settings_get(PointerRNA *ptr)
static void rna_Lamp_mtex_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Lamp *la= (Lamp*)ptr->data;
+ Lamp *la = (Lamp*)ptr->data;
rna_iterator_array_begin(iter, (void*)la->mtex, sizeof(MTex*), MAX_MTEX, 0, NULL);
}
static PointerRNA rna_Lamp_active_texture_get(PointerRNA *ptr)
{
- Lamp *la= (Lamp*)ptr->data;
+ Lamp *la = (Lamp*)ptr->data;
Tex *tex;
- tex= give_current_lamp_texture(la);
+ tex = give_current_lamp_texture(la);
return rna_pointer_inherit_refine(ptr, &RNA_Texture, tex);
}
static void rna_Lamp_active_texture_set(PointerRNA *ptr, PointerRNA value)
{
- Lamp *la= (Lamp*)ptr->data;
+ Lamp *la = (Lamp*)ptr->data;
set_current_lamp_texture(la, value.data);
}
static StructRNA* rna_Lamp_refine(struct PointerRNA *ptr)
{
- Lamp *la= (Lamp*)ptr->data;
+ Lamp *la = (Lamp*)ptr->data;
- switch(la->type) {
+ switch (la->type) {
case LA_LOCAL:
return &RNA_PointLamp;
case LA_SUN:
@@ -108,10 +108,10 @@ static StructRNA* rna_Lamp_refine(struct PointerRNA *ptr)
static void rna_Lamp_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
{
- Lamp *la= ptr->id.data;
+ Lamp *la = ptr->id.data;
DAG_id_tag_update(&la->id, 0);
- if(scene->gm.matmode == GAME_MAT_GLSL)
+ if (scene->gm.matmode == GAME_MAT_GLSL)
WM_main_add_notifier(NC_LAMP|ND_LIGHTING_DRAW, la);
else
WM_main_add_notifier(NC_LAMP|ND_LIGHTING, la);
@@ -119,7 +119,7 @@ static void rna_Lamp_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
static void rna_Lamp_draw_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Lamp *la= ptr->id.data;
+ Lamp *la = ptr->id.data;
DAG_id_tag_update(&la->id, 0);
WM_main_add_notifier(NC_LAMP|ND_LIGHTING_DRAW, la);
@@ -127,7 +127,7 @@ static void rna_Lamp_draw_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Poin
static void rna_Lamp_sky_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Lamp *la= ptr->id.data;
+ Lamp *la = ptr->id.data;
DAG_id_tag_update(&la->id, 0);
WM_main_add_notifier(NC_LAMP|ND_SKY, la);
@@ -136,21 +136,21 @@ static void rna_Lamp_sky_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Point
/* only for rad/deg conversion! can remove later */
static float rna_Lamp_spot_size_get(PointerRNA *ptr)
{
- Lamp *la= ptr->id.data;
+ Lamp *la = ptr->id.data;
return DEG2RADF(la->spotsize);
}
static void rna_Lamp_spot_size_set(PointerRNA *ptr, float value)
{
- Lamp *la= ptr->id.data;
- la->spotsize= RAD2DEGF(value);
+ Lamp *la = ptr->id.data;
+ la->spotsize = RAD2DEGF(value);
}
static void rna_Lamp_use_nodes_update(Main *blain, Scene *scene, PointerRNA *ptr)
{
- Lamp *la= (Lamp*)ptr->data;
+ Lamp *la = (Lamp*)ptr->data;
- if(la->use_nodes && la->nodetree==NULL)
+ if (la->use_nodes && la->nodetree == NULL)
ED_node_shader_default(scene, &la->id);
rna_Lamp_update(blain, scene, ptr);
@@ -177,38 +177,38 @@ static void rna_def_lamp_mtex(BlenderRNA *brna)
{TEXCO_OBJECT, "OBJECT", 0, "Object", "Use linked object's coordinates for texture coordinates"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "LampTextureSlot", "TextureSlot");
+ srna = RNA_def_struct(brna, "LampTextureSlot", "TextureSlot");
RNA_def_struct_sdna(srna, "MTex");
RNA_def_struct_ui_text(srna, "Lamp Texture Slot", "Texture slot for textures in a Lamp datablock");
- prop= RNA_def_property(srna, "texture_coords", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "texture_coords", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "texco");
RNA_def_property_enum_items(prop, prop_texture_coordinates_items);
RNA_def_property_ui_text(prop, "Texture Coordinates", "");
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "object");
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object", "Object to use for mapping with Object texture coordinates");
- prop= RNA_def_property(srna, "use_map_color", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_color", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", LAMAP_COL);
RNA_def_property_ui_text(prop, "Color", "Let the texture affect the basic color of the lamp");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop= RNA_def_property(srna, "use_map_shadow", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_shadow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", LAMAP_SHAD);
RNA_def_property_ui_text(prop, "Shadow", "Let the texture affect the shadow color of the lamp");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop= RNA_def_property(srna, "color_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "color_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "colfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Color Factor", "Amount texture affects color values");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop= RNA_def_property(srna, "shadow_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "shadow_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "shadowfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Shadow Factor", "Amount texture affects shadow");
@@ -226,18 +226,18 @@ static void rna_def_lamp_sky_settings(BlenderRNA *brna)
{2, "CIE", 0, "CIE", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "LampSkySettings", NULL);
+ srna = RNA_def_struct(brna, "LampSkySettings", NULL);
RNA_def_struct_sdna(srna, "Lamp");
RNA_def_struct_nested(brna, srna, "SunLamp");
RNA_def_struct_ui_text(srna, "Lamp Sky Settings", "Sky related settings for a sun lamp");
- prop= RNA_def_property(srna, "sky_color_space", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "sky_color_space", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "sky_colorspace");
RNA_def_property_enum_items(prop, prop_skycolorspace_items);
RNA_def_property_ui_text(prop, "Sky Color Space", "Color space to use for internal XYZ->RGB color conversion");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
- prop= RNA_def_property(srna, "sky_blend_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "sky_blend_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "skyblendtype");
RNA_def_property_enum_items(prop, ramp_blend_items);
RNA_def_property_ui_text(prop, "Sky Blend Mode", "Blend mode for combining sun sky with world sky");
@@ -245,80 +245,80 @@ static void rna_def_lamp_sky_settings(BlenderRNA *brna)
/* Number values */
- prop= RNA_def_property(srna, "horizon_brightness", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "horizon_brightness", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 20.0f);
RNA_def_property_ui_text(prop, "Horizon Brightness", "Horizon brightness");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
- prop= RNA_def_property(srna, "spread", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "spread", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Horizon Spread", "Horizon Spread");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
- prop= RNA_def_property(srna, "sun_brightness", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "sun_brightness", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Sun Brightness", "Sun brightness");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
- prop= RNA_def_property(srna, "sun_size", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "sun_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Sun Size", "Sun size");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
- prop= RNA_def_property(srna, "backscattered_light", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "backscattered_light", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Backscattered Light", "Backscattered light");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
- prop= RNA_def_property(srna, "sun_intensity", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "sun_intensity", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Sun Intensity", "Sun intensity");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
- prop= RNA_def_property(srna, "atmosphere_turbidity", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "atmosphere_turbidity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "atm_turbidity");
RNA_def_property_range(prop, 1.0f, 30.0f);
RNA_def_property_ui_range(prop, 2.0f, 10.0f, 1, 2);
RNA_def_property_ui_text(prop, "Atmosphere Turbidity", "Sky turbidity");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
- prop= RNA_def_property(srna, "atmosphere_inscattering", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "atmosphere_inscattering", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "atm_inscattering_factor");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Atmosphere Inscatter", "Scatter contribution factor");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
- prop= RNA_def_property(srna, "atmosphere_extinction", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "atmosphere_extinction", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "atm_extinction_factor");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Atmosphere Extinction", "Extinction scattering contribution factor");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
- prop= RNA_def_property(srna, "atmosphere_distance_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "atmosphere_distance_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "atm_distance_factor");
RNA_def_property_range(prop, 0.0f, 500.0f);
RNA_def_property_ui_text(prop, "Atmosphere Distance Factor", "Multiplier to convert blender units to physical distance");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
- prop= RNA_def_property(srna, "sky_blend", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "sky_blend", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "skyblendfac");
RNA_def_property_range(prop, 0.0f, 2.0f);
RNA_def_property_ui_text(prop, "Sky Blend", "Blend factor with sky");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
- prop= RNA_def_property(srna, "sky_exposure", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "sky_exposure", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 20.0f);
RNA_def_property_ui_text(prop, "Sky Exposure", "Strength of sky shading exponential exposure correction");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
/* boolean */
- prop= RNA_def_property(srna, "use_sky", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_sky", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "sun_effect_type", LA_SUN_EFFECT_SKY);
RNA_def_property_ui_text(prop, "Sky", "Apply sun effect on sky");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
- prop= RNA_def_property(srna, "use_atmosphere", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_atmosphere", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "sun_effect_type", LA_SUN_EFFECT_AP);
RNA_def_property_ui_text(prop, "Atmosphere", "Apply sun effect on atmosphere");
RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
@@ -329,60 +329,60 @@ static void rna_def_lamp(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Lamp", "ID");
+ srna = RNA_def_struct(brna, "Lamp", "ID");
RNA_def_struct_refine_func(srna, "rna_Lamp_refine");
RNA_def_struct_ui_text(srna, "Lamp", "Lamp datablock for lighting a scene");
RNA_def_struct_ui_icon(srna, ICON_LAMP_DATA);
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, lamp_type_items);
RNA_def_property_ui_text(prop, "Type", "Type of Lamp");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
- prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "dist");
RNA_def_property_range(prop, 0, INT_MAX);
RNA_def_property_ui_range(prop, 0, 1000, 1, 3);
RNA_def_property_ui_text(prop, "Distance", "Falloff distance - the light is at half the original intensity at this point");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
- prop= RNA_def_property(srna, "energy", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "energy", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_range(prop, 0, 10, 1, 3);
RNA_def_property_ui_text(prop, "Energy", "Amount of light that the lamp emits");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
- prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
+ 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", "Light color");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
- prop= RNA_def_property(srna, "use_own_layer", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_own_layer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_LAYER);
RNA_def_property_ui_text(prop, "Layer", "Illuminate objects only on the same layers the lamp is on");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop= RNA_def_property(srna, "use_negative", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_negative", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_NEG);
RNA_def_property_ui_text(prop, "Negative", "Cast negative light");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop= RNA_def_property(srna, "use_specular", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_specular", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", LA_NO_SPEC);
RNA_def_property_ui_text(prop, "Specular", "Create specular highlights");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop= RNA_def_property(srna, "use_diffuse", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_diffuse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", LA_NO_DIFF);
RNA_def_property_ui_text(prop, "Diffuse", "Do diffuse shading");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
/* nodes */
- prop= RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
RNA_def_property_ui_text(prop, "Node Tree", "Node tree for node based lamps");
- prop= RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "use_nodes", 1);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Use Nodes", "Use shader nodes to render the lamp");
@@ -408,28 +408,28 @@ static void rna_def_lamp_falloff(StructRNA *srna)
{LA_FALLOFF_SLIDERS, "LINEAR_QUADRATIC_WEIGHTED", 0, "Lin/Quad Weighted", ""},
{0, NULL, 0, NULL, NULL}};
- prop= RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_fallofftype_items);
RNA_def_property_ui_text(prop, "Falloff Type", "Intensity Decay with distance");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop= RNA_def_property(srna, "falloff_curve", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "falloff_curve", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "curfalloff");
RNA_def_property_ui_text(prop, "Falloff Curve", "Custom Lamp Falloff Curve");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop= RNA_def_property(srna, "use_sphere", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_sphere", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_SPHERE);
RNA_def_property_ui_text(prop, "Sphere", "Set light intensity to zero beyond lamp distance");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
- prop= RNA_def_property(srna, "linear_attenuation", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "linear_attenuation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "att1");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Linear Attenuation", "Linear distance attenuation");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
- prop= RNA_def_property(srna, "quadratic_attenuation", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "quadratic_attenuation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "att2");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Quadratic Attenuation", "Quadratic distance attenuation");
@@ -462,56 +462,56 @@ static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area)
{LA_SAMP_CONSTANT, "CONSTANT_JITTERED", 0, "Constant Jittered", ""},
{0, NULL, 0, NULL, NULL}};
- prop= RNA_def_property(srna, "shadow_method", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "shadow_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, (spot)? prop_spot_shadow_items: prop_shadow_items);
RNA_def_property_ui_text(prop, "Shadow Method", "Method to compute lamp shadow with");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
- prop= RNA_def_property(srna, "shadow_color", PROP_FLOAT, PROP_COLOR);
+ prop = RNA_def_property(srna, "shadow_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shdwr");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Shadow Color", "Color of shadows cast by the lamp");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop= RNA_def_property(srna, "use_only_shadow", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_only_shadow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_ONLYSHADOW);
RNA_def_property_ui_text(prop, "Only Shadow", "Cast shadows only, without illuminating objects");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop= RNA_def_property(srna, "shadow_ray_sample_method", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "shadow_ray_sample_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ray_samp_method");
RNA_def_property_enum_items(prop, (area)? prop_spot_ray_sampling_method_items: prop_ray_sampling_method_items);
RNA_def_property_ui_text(prop, "Shadow Ray Sampling Method", "Method for generating shadow samples: Adaptive QMC is fastest, Constant QMC is less noisy but slower");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop= RNA_def_property(srna, (area)? "shadow_ray_samples_x": "shadow_ray_samples", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, (area)? "shadow_ray_samples_x": "shadow_ray_samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ray_samp");
RNA_def_property_range(prop, 1, 64);
RNA_def_property_ui_text(prop, (area)? "Shadow Ray Samples": "Shadow Ray Samples X","Number of samples taken extra (samples x samples)");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- if(area) {
- prop= RNA_def_property(srna, "shadow_ray_samples_y", PROP_INT, PROP_NONE);
+ if (area) {
+ prop = RNA_def_property(srna, "shadow_ray_samples_y", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ray_sampy");
RNA_def_property_range(prop, 1, 64);
RNA_def_property_ui_text(prop, "Shadow Ray Samples Y", "Number of samples taken extra (samples x samples)");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
}
- prop= RNA_def_property(srna, "shadow_adaptive_threshold", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "shadow_adaptive_threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "adapt_thresh");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Shadow Adaptive Threshold", "Threshold for Adaptive Sampling (Raytraced shadows)");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop= RNA_def_property(srna, "shadow_soft_size", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "shadow_soft_size", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "area_size");
RNA_def_property_ui_range(prop, 0, 100, 0.1, 3);
RNA_def_property_ui_text(prop, "Shadow Soft Size", "Light size for ray shadow sampling (Raytraced shadows)");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop= RNA_def_property(srna, "use_shadow_layer", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_shadow_layer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_LAYER_SHADOW);
RNA_def_property_ui_text(prop, "Shadow Layer", "Objects on the same layers only cast shadows");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
@@ -521,7 +521,7 @@ static void rna_def_point_lamp(BlenderRNA *brna)
{
StructRNA *srna;
- srna= RNA_def_struct(brna, "PointLamp", "Lamp");
+ srna = RNA_def_struct(brna, "PointLamp", "Lamp");
RNA_def_struct_sdna(srna, "Lamp");
RNA_def_struct_ui_text(srna, "Point Lamp", "Omnidirectional point lamp");
RNA_def_struct_ui_icon(srna, ICON_LAMP_POINT);
@@ -540,47 +540,47 @@ static void rna_def_area_lamp(BlenderRNA *brna)
{LA_AREA_RECT, "RECTANGLE", 0, "Rectangle", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "AreaLamp", "Lamp");
+ srna = RNA_def_struct(brna, "AreaLamp", "Lamp");
RNA_def_struct_sdna(srna, "Lamp");
RNA_def_struct_ui_text(srna, "Area Lamp", "Directional area lamp");
RNA_def_struct_ui_icon(srna, ICON_LAMP_AREA);
rna_def_lamp_shadow(srna, 0, 1);
- prop= RNA_def_property(srna, "use_umbra", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_umbra", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ray_samp_type", LA_SAMP_UMBRA);
RNA_def_property_ui_text(prop, "Umbra", "Emphasize parts that are fully shadowed (Constant Jittered sampling)");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop= RNA_def_property(srna, "use_dither", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_dither", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ray_samp_type", LA_SAMP_DITHER);
RNA_def_property_ui_text(prop, "Dither", "Use 2x2 dithering for sampling (Constant Jittered sampling)");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop= RNA_def_property(srna, "use_jitter", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_jitter", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ray_samp_type", LA_SAMP_JITTER);
RNA_def_property_ui_text(prop, "Jitter", "Use noise for sampling (Constant Jittered sampling)");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop= RNA_def_property(srna, "shape", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "shape", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "area_shape");
RNA_def_property_enum_items(prop, prop_areashape_items);
RNA_def_property_ui_text(prop, "Shape", "Shape of the area lamp");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
- prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "size", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "area_size");
RNA_def_property_ui_range(prop, 0, 100, 0.1, 3);
RNA_def_property_ui_text(prop, "Size", "Size of the area of the area Lamp, X direction size for Rectangle shapes");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
- prop= RNA_def_property(srna, "size_y", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "size_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "area_sizey");
RNA_def_property_ui_range(prop, 0, 100, 0.1, 3);
RNA_def_property_ui_text(prop, "Size Y", "Size of the area of the area Lamp in the Y direction for Rectangle shapes");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
- prop= RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "k");
RNA_def_property_ui_range(prop, 0.001, 2.0, 0.1, 3);
RNA_def_property_ui_text(prop, "Gamma", "Light gamma correction value");
@@ -611,7 +611,7 @@ static void rna_def_spot_lamp(BlenderRNA *brna)
{9, "BUFFERS_9", 0, "9", "Render 9 buffers for better AA, this uses nine times more memory"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "SpotLamp", "Lamp");
+ srna = RNA_def_struct(brna, "SpotLamp", "Lamp");
RNA_def_struct_sdna(srna, "Lamp");
RNA_def_struct_ui_text(srna, "Spot Lamp", "Directional cone lamp");
RNA_def_struct_ui_icon(srna, ICON_LAMP_SPOT);
@@ -619,112 +619,112 @@ static void rna_def_spot_lamp(BlenderRNA *brna)
rna_def_lamp_falloff(srna);
rna_def_lamp_shadow(srna, 1, 0);
- prop= RNA_def_property(srna, "use_square", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_square", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_SQUARE);
RNA_def_property_ui_text(prop, "Square", "Cast a square spot light shape");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
- prop= RNA_def_property(srna, "use_halo", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_halo", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_HALO);
RNA_def_property_ui_text(prop, "Halo", "Render spotlight with a volumetric halo");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop= RNA_def_property(srna, "halo_intensity", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "halo_intensity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "haint");
RNA_def_property_ui_range(prop, 0, 5.0, 0.1, 3);
RNA_def_property_ui_text(prop, "Halo Intensity", "Brightness of the spotlight's halo cone");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop= RNA_def_property(srna, "halo_step", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "halo_step", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "shadhalostep");
RNA_def_property_range(prop, 0, 12);
RNA_def_property_ui_text(prop, "Halo Step", "Volumetric halo sampling frequency");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop= RNA_def_property(srna, "shadow_buffer_size", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "shadow_buffer_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "bufsize");
RNA_def_property_range(prop, 512, 10240);
RNA_def_property_ui_text(prop, "Shadow Buffer Size", "Resolution of the shadow buffer, higher values give crisper shadows but use more memory");
RNA_def_property_int_funcs(prop, NULL, "rna_Lamp_buffer_size_set", NULL);
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop= RNA_def_property(srna, "shadow_filter_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "shadow_filter_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "filtertype");
RNA_def_property_enum_items(prop, prop_shadbuffiltertype_items);
RNA_def_property_ui_text(prop, "Shadow Filter Type", "Type of shadow filter (Buffer Shadows)");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop= RNA_def_property(srna, "shadow_sample_buffers", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "shadow_sample_buffers", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "buffers");
RNA_def_property_enum_items(prop, prop_numbuffer_items);
RNA_def_property_ui_text(prop, "Shadow Sample Buffers", "Number of shadow buffers to render for better AA, this increases memory usage");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop= RNA_def_property(srna, "spot_blend", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "spot_blend", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "spotblend");
RNA_def_property_range(prop, 0.0f ,1.0f);
RNA_def_property_ui_text(prop, "Spot Blend", "The softness of the spotlight edge");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
- prop= RNA_def_property(srna, "spot_size", PROP_FLOAT, PROP_ANGLE);
- // RNA_def_property_float_sdna(prop, NULL, "spotsize");
+ prop = RNA_def_property(srna, "spot_size", PROP_FLOAT, PROP_ANGLE);
+ /* RNA_def_property_float_sdna(prop, NULL, "spotsize"); */
RNA_def_property_range(prop, M_PI/180.0, M_PI);
RNA_def_property_ui_text(prop, "Spot Size", "Angle of the spotlight beam");
RNA_def_property_float_funcs(prop, "rna_Lamp_spot_size_get", "rna_Lamp_spot_size_set", NULL); /* only for deg/rad conversion */
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
- prop= RNA_def_property(srna, "show_cone", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_cone", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_SHOW_CONE);
RNA_def_property_ui_text(prop, "Show Cone", "Draw transparent cone in 3D view to visualize which objects are contained in it");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
- prop= RNA_def_property(srna, "shadow_buffer_clip_start", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "shadow_buffer_clip_start", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "clipsta");
RNA_def_property_range(prop, 0.0f, 9999.0f);
RNA_def_property_ui_text(prop, "Shadow Buffer Clip Start", "Shadow map clip start, below which objects will not generate shadows");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
- prop= RNA_def_property(srna, "shadow_buffer_clip_end", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "shadow_buffer_clip_end", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "clipend");
RNA_def_property_range(prop, 0.0f, 9999.0f);
RNA_def_property_ui_text(prop, "Shadow Buffer Clip End", "Shadow map clip end, beyond which objects will not generate shadows");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
- prop= RNA_def_property(srna, "shadow_buffer_bias", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "shadow_buffer_bias", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bias");
RNA_def_property_range(prop, 0.001f, 5.0f);
RNA_def_property_ui_text(prop, "Shadow Buffer Bias", "Shadow buffer sampling bias");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop= RNA_def_property(srna, "shadow_buffer_soft", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "shadow_buffer_soft", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "soft");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Shadow Buffer Soft", "Size of shadow buffer sampling area");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop= RNA_def_property(srna, "shadow_buffer_samples", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "shadow_buffer_samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "samp");
RNA_def_property_range(prop, 1, 16);
RNA_def_property_ui_text(prop, "Samples", "Number of shadow buffer samples");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop= RNA_def_property(srna, "shadow_buffer_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "shadow_buffer_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "buftype");
RNA_def_property_enum_items(prop, prop_shadbuftype_items);
RNA_def_property_ui_text(prop, "Shadow Buffer Type", "Type of shadow buffer");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop= RNA_def_property(srna, "use_auto_clip_start", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_auto_clip_start", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bufflag", LA_SHADBUF_AUTO_START);
RNA_def_property_ui_text(prop, "Autoclip Start", "Automatic calculation of clipping-start, based on visible vertices");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
- prop= RNA_def_property(srna, "use_auto_clip_end", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_auto_clip_end", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bufflag", LA_SHADBUF_AUTO_END);
RNA_def_property_ui_text(prop, "Autoclip End", "Automatic calculation of clipping-end, based on visible vertices");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
- prop= RNA_def_property(srna, "compression_threshold", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "compression_threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "compressthresh");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Compress", "Deep shadow map compression threshold");
@@ -736,7 +736,7 @@ static void rna_def_sun_lamp(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "SunLamp", "Lamp");
+ srna = RNA_def_struct(brna, "SunLamp", "Lamp");
RNA_def_struct_sdna(srna, "Lamp");
RNA_def_struct_ui_text(srna, "Sun Lamp", "Constant direction parallel ray lamp");
RNA_def_struct_ui_icon(srna, ICON_LAMP_SUN);
@@ -744,7 +744,7 @@ static void rna_def_sun_lamp(BlenderRNA *brna)
rna_def_lamp_shadow(srna, 0, 0);
/* sky */
- prop= RNA_def_property(srna, "sky", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "sky", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "LampSkySettings");
RNA_def_property_pointer_funcs(prop, "rna_Lamp_sky_settings_get", NULL, NULL, NULL);
@@ -757,7 +757,7 @@ static void rna_def_hemi_lamp(BlenderRNA *brna)
{
StructRNA *srna;
- srna= RNA_def_struct(brna, "HemiLamp", "Lamp");
+ srna = RNA_def_struct(brna, "HemiLamp", "Lamp");
RNA_def_struct_sdna(srna, "Lamp");
RNA_def_struct_ui_text(srna, "Hemi Lamp", "180 degree constant lamp");
RNA_def_struct_ui_icon(srna, ICON_LAMP_HEMI);
diff --git a/source/blender/makesrna/intern/rna_lattice.c b/source/blender/makesrna/intern/rna_lattice.c
index 9fe6b236961..24445e652cc 100644
--- a/source/blender/makesrna/intern/rna_lattice.c
+++ b/source/blender/makesrna/intern/rna_lattice.c
@@ -51,25 +51,25 @@
static void rna_LatticePoint_co_get(PointerRNA *ptr, float *values)
{
- Lattice *lt= (Lattice*)ptr->id.data;
- BPoint *bp= (BPoint*)ptr->data;
- int a= bp - lt->def;
- int x= a % lt->pntsu;
- int y= (a/lt->pntsu) % lt->pntsv;
- int z= (a/(lt->pntsu*lt->pntsv));
-
- values[0]= lt->fu + x*lt->du;
- values[1]= lt->fv + y*lt->dv;
- values[2]= lt->fw + z*lt->dw;
+ Lattice *lt = (Lattice*)ptr->id.data;
+ BPoint *bp = (BPoint*)ptr->data;
+ int a = bp - lt->def;
+ int x = a % lt->pntsu;
+ int y = (a/lt->pntsu) % lt->pntsv;
+ int z = (a/(lt->pntsu*lt->pntsv));
+
+ values[0] = lt->fu + x*lt->du;
+ values[1] = lt->fv + y*lt->dv;
+ values[2] = lt->fw + z*lt->dw;
}
static void rna_LatticePoint_groups_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Lattice *lt= (Lattice*)ptr->id.data;
+ Lattice *lt = (Lattice*)ptr->id.data;
- if(lt->dvert) {
- BPoint *bp= (BPoint*)ptr->data;
- MDeformVert *dvert= lt->dvert + (bp-lt->def);
+ if (lt->dvert) {
+ BPoint *bp = (BPoint*)ptr->data;
+ MDeformVert *dvert = lt->dvert + (bp-lt->def);
rna_iterator_array_begin(iter, (void*)dvert->dw, sizeof(MDeformWeight), dvert->totweight, 0, NULL);
}
@@ -79,12 +79,12 @@ static void rna_LatticePoint_groups_begin(CollectionPropertyIterator *iter, Poin
static void rna_Lattice_points_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Lattice *lt= (Lattice*)ptr->data;
- int tot= lt->pntsu*lt->pntsv*lt->pntsw;
+ Lattice *lt = (Lattice*)ptr->data;
+ int tot = lt->pntsu*lt->pntsv*lt->pntsw;
- if(lt->editlatt && lt->editlatt->latt->def)
+ if (lt->editlatt && lt->editlatt->latt->def)
rna_iterator_array_begin(iter, (void*)lt->editlatt->latt->def, sizeof(BPoint), tot, 0, NULL);
- else if(lt->def)
+ else if (lt->def)
rna_iterator_array_begin(iter, (void*)lt->def, sizeof(BPoint), tot, 0, NULL);
else
rna_iterator_array_begin(iter, NULL, 0, 0, 0, NULL);
@@ -92,7 +92,7 @@ static void rna_Lattice_points_begin(CollectionPropertyIterator *iter, PointerRN
static void rna_Lattice_update_data(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- ID *id= ptr->id.data;
+ ID *id = ptr->id.data;
DAG_id_tag_update(id, 0);
WM_main_add_notifier(NC_GEOM|ND_DATA, id);
@@ -100,29 +100,29 @@ static void rna_Lattice_update_data(Main *UNUSED(bmain), Scene *UNUSED(scene), P
static void rna_Lattice_update_size(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Lattice *lt= ptr->id.data;
+ Lattice *lt = ptr->id.data;
Object *ob;
int newu, newv, neww;
/* we don't modify the actual pnts, but go through opnts instead */
- newu= (lt->opntsu > 0)? lt->opntsu: lt->pntsu;
- newv= (lt->opntsv > 0)? lt->opntsv: lt->pntsv;
- neww= (lt->opntsw > 0)? lt->opntsw: lt->pntsw;
+ newu = (lt->opntsu > 0)? lt->opntsu: lt->pntsu;
+ newv = (lt->opntsv > 0)? lt->opntsv: lt->pntsv;
+ neww = (lt->opntsw > 0)? lt->opntsw: lt->pntsw;
/* resizelattice needs an object, any object will have the same result */
- for(ob=bmain->object.first; ob; ob= ob->id.next) {
- if(ob->data == lt) {
+ for (ob = bmain->object.first; ob; ob = ob->id.next) {
+ if (ob->data == lt) {
resizelattice(lt, newu, newv, neww, ob);
- if(lt->editlatt)
+ if (lt->editlatt)
resizelattice(lt->editlatt->latt, newu, newv, neww, ob);
break;
}
}
/* otherwise without, means old points are not repositioned */
- if(!ob) {
+ if (!ob) {
resizelattice(lt, newu, newv, neww, NULL);
- if(lt->editlatt)
+ if (lt->editlatt)
resizelattice(lt->editlatt->latt, newu, newv, neww, NULL);
}
@@ -131,15 +131,15 @@ static void rna_Lattice_update_size(Main *bmain, Scene *scene, PointerRNA *ptr)
static void rna_Lattice_use_outside_set(PointerRNA *ptr, int value)
{
- Lattice *lt= ptr->data;
+ Lattice *lt = ptr->data;
- if(value) lt->flag |= LT_OUTSIDE;
+ if (value) lt->flag |= LT_OUTSIDE;
else lt->flag &= ~LT_OUTSIDE;
outside_lattice(lt);
- if(lt->editlatt) {
- if(value) lt->editlatt->latt->flag |= LT_OUTSIDE;
+ if (lt->editlatt) {
+ if (value) lt->editlatt->latt->flag |= LT_OUTSIDE;
else lt->editlatt->latt->flag &= ~LT_OUTSIDE;
outside_lattice(lt->editlatt->latt);
@@ -148,38 +148,38 @@ static void rna_Lattice_use_outside_set(PointerRNA *ptr, int value)
static int rna_Lattice_size_editable(PointerRNA *ptr)
{
- Lattice *lt= (Lattice*)ptr->data;
+ Lattice *lt = (Lattice*)ptr->data;
return lt->key == NULL;
}
static void rna_Lattice_points_u_set(PointerRNA *ptr, int value)
{
- Lattice *lt= (Lattice*)ptr->data;
+ Lattice *lt = (Lattice*)ptr->data;
- lt->opntsu= CLAMPIS(value, 1, 64);
+ lt->opntsu = CLAMPIS(value, 1, 64);
}
static void rna_Lattice_points_v_set(PointerRNA *ptr, int value)
{
- Lattice *lt= (Lattice*)ptr->data;
+ Lattice *lt = (Lattice*)ptr->data;
- lt->opntsv= CLAMPIS(value, 1, 64);
+ lt->opntsv = CLAMPIS(value, 1, 64);
}
static void rna_Lattice_points_w_set(PointerRNA *ptr, int value)
{
- Lattice *lt= (Lattice*)ptr->data;
+ Lattice *lt = (Lattice*)ptr->data;
- lt->opntsw= CLAMPIS(value, 1, 64);
+ lt->opntsw = CLAMPIS(value, 1, 64);
}
static void rna_Lattice_vg_name_set(PointerRNA *ptr, const char *value)
{
- Lattice *lt= ptr->data;
+ Lattice *lt = ptr->data;
BLI_strncpy(lt->vgroup, value, sizeof(lt->vgroup));
- if(lt->editlatt) {
+ if (lt->editlatt) {
BLI_strncpy(lt->editlatt->latt->vgroup, value, sizeof(lt->editlatt->latt->vgroup));
}
}
@@ -187,8 +187,8 @@ static void rna_Lattice_vg_name_set(PointerRNA *ptr, const char *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;
+ Lattice *lt = (Lattice*)ptr->id.data;
+ void *point = ptr->data;
BPoint *points = NULL;
if (lt->editlatt && lt->editlatt->latt->def)
@@ -197,7 +197,7 @@ static char *rna_LatticePoint_path(PointerRNA *ptr)
points = lt->def;
if (points && point) {
- int tot= lt->pntsu*lt->pntsv*lt->pntsw;
+ int tot = lt->pntsu*lt->pntsv*lt->pntsw;
/* only return index if in range */
if ((point >= (void *)points) && (point < (void *)(points + tot))) {
@@ -218,24 +218,24 @@ static void rna_def_latticepoint(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "LatticePoint", NULL);
+ 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);
+ prop = RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_float_funcs(prop, "rna_LatticePoint_co_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Location", "");
- prop= RNA_def_property(srna, "co_deform", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "co_deform", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "vec");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Deformed Location", "");
RNA_def_property_update(prop, 0, "rna_Lattice_update_data");
- prop= RNA_def_property(srna, "groups", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "groups", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_funcs(prop, "rna_LatticePoint_groups_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", NULL, NULL, NULL, NULL);
RNA_def_property_struct_type(prop, "VertexGroupElement");
RNA_def_property_ui_text(prop, "Groups", "Weights for the vertex groups this point is member of");
@@ -252,11 +252,11 @@ static void rna_def_lattice(BlenderRNA *brna)
{KEY_BSPLINE, "KEY_BSPLINE", 0, "BSpline", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "Lattice", "ID");
+ srna = RNA_def_struct(brna, "Lattice", "ID");
RNA_def_struct_ui_text(srna, "Lattice", "Lattice datablock defining a grid for deforming other objects");
RNA_def_struct_ui_icon(srna, ICON_LATTICE_DATA);
- prop= RNA_def_property(srna, "points_u", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "points_u", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "pntsu");
RNA_def_property_int_funcs(prop, NULL, "rna_Lattice_points_u_set", NULL);
RNA_def_property_range(prop, 1, 64);
@@ -264,7 +264,7 @@ static void rna_def_lattice(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Lattice_update_size");
RNA_def_property_editable_func(prop, "rna_Lattice_size_editable");
- prop= RNA_def_property(srna, "points_v", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "points_v", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "pntsv");
RNA_def_property_int_funcs(prop, NULL, "rna_Lattice_points_v_set", NULL);
RNA_def_property_range(prop, 1, 64);
@@ -272,7 +272,7 @@ static void rna_def_lattice(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Lattice_update_size");
RNA_def_property_editable_func(prop, "rna_Lattice_size_editable");
- prop= RNA_def_property(srna, "points_w", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "points_w", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "pntsw");
RNA_def_property_int_funcs(prop, NULL, "rna_Lattice_points_w_set", NULL);
RNA_def_property_range(prop, 1, 64);
@@ -280,41 +280,41 @@ static void rna_def_lattice(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Lattice_update_size");
RNA_def_property_editable_func(prop, "rna_Lattice_size_editable");
- prop= RNA_def_property(srna, "interpolation_type_u", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "interpolation_type_u", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "typeu");
RNA_def_property_enum_items(prop, prop_keyblock_type_items);
RNA_def_property_ui_text(prop, "Interpolation Type U", "");
RNA_def_property_update(prop, 0, "rna_Lattice_update_data");
- prop= RNA_def_property(srna, "interpolation_type_v", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "interpolation_type_v", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "typev");
RNA_def_property_enum_items(prop, prop_keyblock_type_items);
RNA_def_property_ui_text(prop, "Interpolation Type V", "");
RNA_def_property_update(prop, 0, "rna_Lattice_update_data");
- prop= RNA_def_property(srna, "interpolation_type_w", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "interpolation_type_w", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "typew");
RNA_def_property_enum_items(prop, prop_keyblock_type_items);
RNA_def_property_ui_text(prop, "Interpolation Type W", "");
RNA_def_property_update(prop, 0, "rna_Lattice_update_data");
- prop= RNA_def_property(srna, "use_outside", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_outside", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", LT_OUTSIDE);
RNA_def_property_boolean_funcs(prop, NULL, "rna_Lattice_use_outside_set");
RNA_def_property_ui_text(prop, "Outside", "Only draw, and take into account, the outer vertices");
RNA_def_property_update(prop, 0, "rna_Lattice_update_data");
- prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "vgroup");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group to apply the influence of the lattice");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Lattice_vg_name_set");
RNA_def_property_update(prop, 0, "rna_Lattice_update_data");
- prop= RNA_def_property(srna, "shape_keys", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "shape_keys", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "key");
RNA_def_property_ui_text(prop, "Shape Keys", "");
- prop= RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
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", NULL, NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Points", "Points of the lattice");
diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c
index dc1faa29be2..47dae6991e3 100644
--- a/source/blender/makesrna/intern/rna_main.c
+++ b/source/blender/makesrna/intern/rna_main.c
@@ -50,9 +50,9 @@ static int rna_Main_is_saved_get(PointerRNA *UNUSED(ptr))
static int rna_Main_is_dirty_get(PointerRNA *ptr)
{
/* XXX, not totally nice to do it this way, should store in main ? */
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
wmWindowManager *wm;
- for(wm= bmain->wm.first; wm; wm= wm->id.next) {
+ for (wm = bmain->wm.first; wm; wm = wm->id.next) {
return !wm->file_saved;
}
@@ -61,195 +61,195 @@ static int rna_Main_is_dirty_get(PointerRNA *ptr)
static void rna_Main_filepath_get(PointerRNA *ptr, char *value)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
BLI_strncpy(value, bmain->name, sizeof(bmain->name));
}
static int rna_Main_filepath_length(PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
return strlen(bmain->name);
}
#if 0
static void rna_Main_filepath_set(PointerRNA *ptr, const char *value)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
BLI_strncpy(bmain->name, value, sizeof(bmain->name));
}
#endif
static void rna_Main_scene_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->scene, NULL);
}
static void rna_Main_object_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->object, NULL);
}
static void rna_Main_lamp_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->lamp, NULL);
}
static void rna_Main_library_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->library, NULL);
}
static void rna_Main_mesh_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->mesh, NULL);
}
static void rna_Main_curve_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->curve, NULL);
}
static void rna_Main_mball_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->mball, NULL);
}
static void rna_Main_mat_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->mat, NULL);
}
static void rna_Main_tex_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->tex, NULL);
}
static void rna_Main_image_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->image, NULL);
}
static void rna_Main_latt_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->latt, NULL);
}
static void rna_Main_camera_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->camera, NULL);
}
static void rna_Main_key_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->key, NULL);
}
static void rna_Main_world_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->world, NULL);
}
static void rna_Main_screen_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->screen, NULL);
}
static void rna_Main_script_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->script, NULL);
}
static void rna_Main_font_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->vfont, NULL);
}
static void rna_Main_text_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->text, NULL);
}
static void rna_Main_speaker_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->speaker, NULL);
}
static void rna_Main_sound_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->sound, NULL);
}
static void rna_Main_group_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->group, NULL);
}
static void rna_Main_armature_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->armature, NULL);
}
static void rna_Main_action_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->action, NULL);
}
static void rna_Main_nodetree_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->nodetree, NULL);
}
static void rna_Main_brush_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->brush, NULL);
}
static void rna_Main_particle_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->particle, NULL);
}
static void rna_Main_gpencil_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->gpencil, NULL);
}
static void rna_Main_wm_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->wm, NULL);
}
static void rna_Main_movieclips_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Main *bmain= (Main*)ptr->data;
+ Main *bmain = (Main*)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->movieclip, NULL);
}
@@ -257,8 +257,8 @@ static void rna_Main_movieclips_begin(CollectionPropertyIterator *iter, PointerR
static PointerRNA rna_Test_test_get(PointerRNA *ptr)
{
- PointerRNA ret= *ptr;
- ret.type= &RNA_Test;
+ PointerRNA ret = *ptr;
+ ret.type = &RNA_Test;
return ret;
}
@@ -286,7 +286,7 @@ void RNA_def_main(BlenderRNA *brna)
CollectionDefFunc *func;
/* plural must match idtypes in readblenentry.c */
- MainCollectionDef lists[]= {
+ MainCollectionDef lists[] = {
{"cameras", "Camera", "rna_Main_camera_begin", "Cameras", "Camera datablocks", RNA_def_main_cameras},
{"scenes", "Scene", "rna_Main_scene_begin", "Scenes", "Scene datablocks", RNA_def_main_scenes},
{"objects", "Object", "rna_Main_object_begin", "Objects", "Object datablocks", RNA_def_main_objects},
@@ -320,36 +320,36 @@ void RNA_def_main(BlenderRNA *brna)
int i;
- srna= RNA_def_struct(brna, "BlendData", NULL);
+ srna = RNA_def_struct(brna, "BlendData", NULL);
RNA_def_struct_ui_text(srna, "Blendfile Data", "Main data structure representing a .blend file and all its datablocks");
RNA_def_struct_ui_icon(srna, ICON_BLENDER);
- prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
+ prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_maxlength(prop, FILE_MAX);
RNA_def_property_string_funcs(prop, "rna_Main_filepath_get", "rna_Main_filepath_length", "rna_Main_filepath_set");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Filename", "Path to the .blend file");
- prop= RNA_def_property(srna, "is_dirty", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_dirty", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Main_is_dirty_get", NULL);
RNA_def_property_ui_text(prop, "File Has Unsaved Changes", "Have recent edits been saved to disk");
- prop= RNA_def_property(srna, "is_saved", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_saved", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Main_is_saved_get", NULL);
RNA_def_property_ui_text(prop, "File is Saved", "Has the current session been saved to disk as a .blend file");
- for(i=0; lists[i].name; i++)
+ for (i = 0; lists[i].name; i++)
{
- prop= RNA_def_property(srna, lists[i].identifier, PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, lists[i].identifier, PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, lists[i].type);
RNA_def_property_collection_funcs(prop, lists[i].iter_begin, "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", NULL, NULL, NULL, NULL);
RNA_def_property_ui_text(prop, lists[i].name, lists[i].description);
/* collection functions */
- func= lists[i].func;
- if(func)
+ func = lists[i].func;
+ if (func)
func(brna, prop);
}
@@ -359,7 +359,7 @@ void RNA_def_main(BlenderRNA *brna)
RNA_define_verify_sdna(0);
- prop= RNA_def_property(srna, "test", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "test", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Test");
RNA_def_property_pointer_funcs(prop, "rna_Test_test_get", NULL, NULL, NULL);
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index 5f9c66abf4d..073624965ea 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -97,13 +97,13 @@ Tex *rna_Main_add_texture(Main *UNUSED(bmain), const char *name)
Camera *rna_Main_cameras_new(Main *UNUSED(bmain), const char *name)
{
- ID *id= add_camera(name);
+ ID *id = add_camera(name);
id_us_min(id);
return (Camera *)id;
}
void rna_Main_cameras_remove(Main *bmain, ReportList *reports, struct Camera *camera)
{
- if(ID_REAL_USERS(camera) <= 0)
+ if (ID_REAL_USERS(camera) <= 0)
free_libblock(&bmain->camera, camera);
else
BKE_reportf(reports, RPT_ERROR, "Camera \"%s\" must have zero users to be removed, found %d",
@@ -121,16 +121,16 @@ void rna_Main_scenes_remove(Main *bmain, bContext *C, ReportList *reports, struc
/* dont call free_libblock(...) directly */
Scene *newscene;
- if(scene->id.prev)
- newscene= scene->id.prev;
- else if(scene->id.next)
- newscene= scene->id.next;
+ if (scene->id.prev)
+ newscene = scene->id.prev;
+ else if (scene->id.next)
+ newscene = scene->id.next;
else {
BKE_reportf(reports, RPT_ERROR, "Scene \"%s\" is the last, cant ve removed", scene->id.name+2);
return;
}
- if(CTX_wm_screen(C)->scene == scene)
+ if (CTX_wm_screen(C)->scene == scene)
ED_screen_set_scene(C, newscene);
unlink_scene(bmain, scene, newscene);
@@ -139,38 +139,38 @@ void rna_Main_scenes_remove(Main *bmain, bContext *C, ReportList *reports, struc
Object *rna_Main_objects_new(Main *UNUSED(bmain), ReportList *reports, const char *name, ID *data)
{
Object *ob;
- int type= OB_EMPTY;
- if(data) {
- switch(GS(data->name)) {
+ int type = OB_EMPTY;
+ if (data) {
+ switch (GS(data->name)) {
case ID_ME:
- type= OB_MESH;
+ type = OB_MESH;
break;
case ID_CU:
- type= curve_type((struct Curve *)data);
+ type = curve_type((struct Curve *)data);
break;
case ID_MB:
- type= OB_MBALL;
+ type = OB_MBALL;
break;
case ID_LA:
- type= OB_LAMP;
+ type = OB_LAMP;
break;
case ID_SPK:
- type= OB_SPEAKER;
+ type = OB_SPEAKER;
break;
case ID_CA:
- type= OB_CAMERA;
+ type = OB_CAMERA;
break;
case ID_LT:
- type= OB_LATTICE;
+ type = OB_LATTICE;
break;
case ID_AR:
- type= OB_ARMATURE;
+ type = OB_ARMATURE;
break;
default:
{
const char *idname;
- if(RNA_enum_id_from_value(id_type_items, GS(data->name), &idname) == 0)
- idname= "UNKNOWN";
+ if (RNA_enum_id_from_value(id_type_items, GS(data->name), &idname) == 0)
+ idname = "UNKNOWN";
BKE_reportf(reports, RPT_ERROR, "ID type '%s' is not valid for a object", idname);
return NULL;
@@ -180,10 +180,10 @@ Object *rna_Main_objects_new(Main *UNUSED(bmain), ReportList *reports, const cha
id_us_plus(data);
}
- ob= add_only_object(type, name);
+ ob = add_only_object(type, name);
id_us_min(&ob->id);
- ob->data= data;
+ ob->data = data;
test_object_materials(ob->data);
return ob;
@@ -191,7 +191,7 @@ Object *rna_Main_objects_new(Main *UNUSED(bmain), ReportList *reports, const cha
void rna_Main_objects_remove(Main *bmain, ReportList *reports, struct Object *object)
{
- if(ID_REAL_USERS(object) <= 0) {
+ if (ID_REAL_USERS(object) <= 0) {
unlink_object(object); /* needed or ID pointers to this are not cleared */
free_libblock(&bmain->object, object);
}
@@ -203,13 +203,13 @@ void rna_Main_objects_remove(Main *bmain, ReportList *reports, struct Object *ob
struct Material *rna_Main_materials_new(Main *UNUSED(bmain), const char *name)
{
- ID *id= (ID *)add_material(name);
+ ID *id = (ID *)add_material(name);
id_us_min(id);
return (Material *)id;
}
void rna_Main_materials_remove(Main *bmain, ReportList *reports, struct Material *material)
{
- if(ID_REAL_USERS(material) <= 0)
+ if (ID_REAL_USERS(material) <= 0)
free_libblock(&bmain->mat, material);
else
BKE_reportf(reports, RPT_ERROR, "Material \"%s\" must have zero users to be removed, found %d",
@@ -227,7 +227,7 @@ struct bNodeTree *rna_Main_nodetree_new(Main *UNUSED(bmain), const char *name, i
}
void rna_Main_nodetree_remove(Main *bmain, ReportList *reports, struct bNodeTree *tree)
{
- if(ID_REAL_USERS(tree) <= 0)
+ if (ID_REAL_USERS(tree) <= 0)
free_libblock(&bmain->nodetree, tree);
else
BKE_reportf(reports, RPT_ERROR, "Node Tree \"%s\" must have zero users to be removed, found %d",
@@ -238,13 +238,13 @@ void rna_Main_nodetree_remove(Main *bmain, ReportList *reports, struct bNodeTree
Mesh *rna_Main_meshes_new(Main *UNUSED(bmain), const char *name)
{
- Mesh *me= add_mesh(name);
+ Mesh *me = add_mesh(name);
id_us_min(&me->id);
return me;
}
void rna_Main_meshes_remove(Main *bmain, ReportList *reports, Mesh *mesh)
{
- if(ID_REAL_USERS(mesh) <= 0)
+ if (ID_REAL_USERS(mesh) <= 0)
free_libblock(&bmain->mesh, mesh);
else
BKE_reportf(reports, RPT_ERROR, "Mesh \"%s\" must have zero users to be removed, found %d",
@@ -255,14 +255,14 @@ void rna_Main_meshes_remove(Main *bmain, ReportList *reports, Mesh *mesh)
Lamp *rna_Main_lamps_new(Main *UNUSED(bmain), const char *name, int type)
{
- Lamp *lamp= add_lamp(name);
- lamp->type= type;
+ Lamp *lamp = add_lamp(name);
+ lamp->type = type;
id_us_min(&lamp->id);
return lamp;
}
void rna_Main_lamps_remove(Main *bmain, ReportList *reports, Lamp *lamp)
{
- if(ID_REAL_USERS(lamp) <= 0)
+ if (ID_REAL_USERS(lamp) <= 0)
free_libblock(&bmain->lamp, lamp);
else
BKE_reportf(reports, RPT_ERROR, "Lamp \"%s\" must have zero users to be removed, found %d",
@@ -273,8 +273,8 @@ void rna_Main_lamps_remove(Main *bmain, ReportList *reports, Lamp *lamp)
Image *rna_Main_images_new(Main *UNUSED(bmain), const char *name, int width, int height, int alpha, int float_buffer)
{
- float color[4]= {0.0, 0.0, 0.0, 1.0};
- Image *image= BKE_add_image_size(width, height, name, alpha ? 32:24, float_buffer, 0, color);
+ float color[4] = {0.0, 0.0, 0.0, 1.0};
+ Image *image = BKE_add_image_size(width, height, name, alpha ? 32:24, float_buffer, 0, color);
id_us_min(&image->id);
return image;
}
@@ -282,10 +282,10 @@ Image *rna_Main_images_load(Main *UNUSED(bmain), ReportList *reports, const char
{
Image *ima;
- errno= 0;
- ima= BKE_add_image_file(filepath);
+ errno = 0;
+ ima = BKE_add_image_file(filepath);
- if(!ima)
+ if (!ima)
BKE_reportf(reports, RPT_ERROR, "Can't read: \"%s\", %s", filepath,
errno ? strerror(errno) : "Unsupported image format");
@@ -293,7 +293,7 @@ Image *rna_Main_images_load(Main *UNUSED(bmain), ReportList *reports, const char
}
void rna_Main_images_remove(Main *bmain, ReportList *reports, Image *image)
{
- if(ID_REAL_USERS(image) <= 0)
+ if (ID_REAL_USERS(image) <= 0)
free_libblock(&bmain->image, image);
else
BKE_reportf(reports, RPT_ERROR, "Image \"%s\" must have zero users to be removed, found %d",
@@ -304,13 +304,13 @@ void rna_Main_images_remove(Main *bmain, ReportList *reports, Image *image)
Lattice *rna_Main_lattices_new(Main *UNUSED(bmain), const char *name)
{
- Lattice *lt= add_lattice(name);
+ Lattice *lt = add_lattice(name);
id_us_min(&lt->id);
return lt;
}
void rna_Main_lattices_remove(Main *bmain, ReportList *reports, struct Lattice *lt)
{
- if(ID_REAL_USERS(lt) <= 0)
+ if (ID_REAL_USERS(lt) <= 0)
free_libblock(&bmain->latt, lt);
else
BKE_reportf(reports, RPT_ERROR, "Lattice \"%s\" must have zero users to be removed, found %d",
@@ -319,13 +319,13 @@ void rna_Main_lattices_remove(Main *bmain, ReportList *reports, struct Lattice *
Curve *rna_Main_curves_new(Main *UNUSED(bmain), const char *name, int type)
{
- Curve *cu= add_curve(name, type);
+ Curve *cu = add_curve(name, type);
id_us_min(&cu->id);
return cu;
}
void rna_Main_curves_remove(Main *bmain, ReportList *reports, struct Curve *cu)
{
- if(ID_REAL_USERS(cu) <= 0)
+ if (ID_REAL_USERS(cu) <= 0)
free_libblock(&bmain->curve, cu);
else
BKE_reportf(reports, RPT_ERROR, "Curve \"%s\" must have zero users to be removed, found %d",
@@ -334,13 +334,13 @@ void rna_Main_curves_remove(Main *bmain, ReportList *reports, struct Curve *cu)
MetaBall *rna_Main_metaballs_new(Main *UNUSED(bmain), const char *name)
{
- MetaBall *mb= add_mball(name);
+ MetaBall *mb = add_mball(name);
id_us_min(&mb->id);
return mb;
}
void rna_Main_metaballs_remove(Main *bmain, ReportList *reports, struct MetaBall *mb)
{
- if(ID_REAL_USERS(mb) <= 0)
+ if (ID_REAL_USERS(mb) <= 0)
free_libblock(&bmain->mball, mb);
else
BKE_reportf(reports, RPT_ERROR, "Metaball \"%s\" must have zero users to be removed, found %d",
@@ -351,10 +351,10 @@ VFont *rna_Main_fonts_load(Main *bmain, ReportList *reports, const char *filepat
{
VFont *font;
- errno= 0;
- font= load_vfont(bmain, filepath);
+ errno = 0;
+ font = load_vfont(bmain, filepath);
- if(!font)
+ if (!font)
BKE_reportf(reports, RPT_ERROR, "Can't read: \"%s\", %s", filepath,
errno ? strerror(errno) : "Unsupported font format");
@@ -363,7 +363,7 @@ VFont *rna_Main_fonts_load(Main *bmain, ReportList *reports, const char *filepat
}
void rna_Main_fonts_remove(Main *bmain, ReportList *reports, VFont *vfont)
{
- if(ID_REAL_USERS(vfont) <= 0)
+ if (ID_REAL_USERS(vfont) <= 0)
free_libblock(&bmain->vfont, vfont);
else
BKE_reportf(reports, RPT_ERROR, "Font \"%s\" must have zero users to be removed, found %d",
@@ -374,14 +374,14 @@ void rna_Main_fonts_remove(Main *bmain, ReportList *reports, VFont *vfont)
Tex *rna_Main_textures_new(Main *UNUSED(bmain), const char *name, int type)
{
- Tex *tex= add_texture(name);
+ Tex *tex = add_texture(name);
tex_set_type(tex, type);
id_us_min(&tex->id);
return tex;
}
void rna_Main_textures_remove(Main *bmain, ReportList *reports, struct Tex *tex)
{
- if(ID_REAL_USERS(tex) <= 0)
+ if (ID_REAL_USERS(tex) <= 0)
free_libblock(&bmain->tex, tex);
else
BKE_reportf(reports, RPT_ERROR, "Texture \"%s\" must have zero users to be removed, found %d",
@@ -396,7 +396,7 @@ Brush *rna_Main_brushes_new(Main *UNUSED(bmain), const char *name)
}
void rna_Main_brushes_remove(Main *bmain, ReportList *reports, struct Brush *brush)
{
- if(ID_REAL_USERS(brush) <= 0)
+ if (ID_REAL_USERS(brush) <= 0)
free_libblock(&bmain->brush, brush);
else
BKE_reportf(reports, RPT_ERROR, "Brush \"%s\" must have zero users to be removed, found %d",
@@ -411,7 +411,7 @@ World *rna_Main_worlds_new(Main *UNUSED(bmain), const char *name)
}
void rna_Main_worlds_remove(Main *bmain, ReportList *reports, struct World *world)
{
- if(ID_REAL_USERS(world) <= 0)
+ if (ID_REAL_USERS(world) <= 0)
free_libblock(&bmain->world, world);
else
BKE_reportf(reports, RPT_ERROR, "World \"%s\" must have zero users to be removed, found %d",
@@ -431,13 +431,13 @@ void rna_Main_groups_remove(Main *bmain, Group *group)
Speaker *rna_Main_speakers_new(Main *UNUSED(bmain), const char *name)
{
- Speaker *speaker= add_speaker(name);
+ Speaker *speaker = add_speaker(name);
id_us_min(&speaker->id);
return speaker;
}
void rna_Main_speakers_remove(Main *bmain, ReportList *reports, Speaker *speaker)
{
- if(ID_REAL_USERS(speaker) <= 0)
+ if (ID_REAL_USERS(speaker) <= 0)
free_libblock(&bmain->speaker, speaker);
else
BKE_reportf(reports, RPT_ERROR, "Speaker \"%s\" must have zero users to be removed, found %d",
@@ -461,10 +461,10 @@ Text *rna_Main_texts_load(Main *bmain, ReportList *reports, const char *filepath
{
Text *txt;
- errno= 0;
- txt= add_text(filepath, bmain->name);
+ errno = 0;
+ txt = add_text(filepath, bmain->name);
- if(!txt)
+ if (!txt)
BKE_reportf(reports, RPT_ERROR, "Can't read: \"%s\", %s", filepath,
errno ? strerror(errno) : "Unable to load text");
@@ -473,13 +473,13 @@ Text *rna_Main_texts_load(Main *bmain, ReportList *reports, const char *filepath
bArmature *rna_Main_armatures_new(Main *UNUSED(bmain), const char *name)
{
- bArmature *arm= add_armature(name);
+ bArmature *arm = add_armature(name);
id_us_min(&arm->id);
return arm;
}
void rna_Main_armatures_remove(Main *bmain, ReportList *reports, bArmature *arm)
{
- if(ID_REAL_USERS(arm) <= 0)
+ if (ID_REAL_USERS(arm) <= 0)
free_libblock(&bmain->armature, arm);
else
BKE_reportf(reports, RPT_ERROR, "Armature \"%s\" must have zero users to be removed, found %d",
@@ -490,14 +490,14 @@ void rna_Main_armatures_remove(Main *bmain, ReportList *reports, bArmature *arm)
bAction *rna_Main_actions_new(Main *UNUSED(bmain), const char *name)
{
- bAction *act= add_empty_action(name);
+ bAction *act = add_empty_action(name);
id_us_min(&act->id);
act->id.flag &= ~LIB_FAKEUSER;
return act;
}
void rna_Main_actions_remove(Main *bmain, ReportList *reports, bAction *act)
{
- if(ID_REAL_USERS(act) <= 0)
+ if (ID_REAL_USERS(act) <= 0)
free_libblock(&bmain->action, act);
else
BKE_reportf(reports, RPT_ERROR, "Action \"%s\" must have zero users to be removed, found %d",
@@ -514,7 +514,7 @@ ParticleSettings *rna_Main_particles_new(Main *bmain, const char *name)
}
void rna_Main_particles_remove(Main *bmain, ReportList *reports, ParticleSettings *part)
{
- if(ID_REAL_USERS(part) <= 0)
+ if (ID_REAL_USERS(part) <= 0)
free_libblock(&bmain->particle, part);
else
BKE_reportf(reports, RPT_ERROR, "Particle Settings \"%s\" must have zero users to be removed, found %d",
@@ -527,10 +527,10 @@ MovieClip *rna_Main_movieclip_load(Main *UNUSED(bmain), ReportList *reports, con
{
MovieClip *clip;
- errno= 0;
- clip= BKE_add_movieclip_file(filepath);
+ errno = 0;
+ clip = BKE_add_movieclip_file(filepath);
- if(!clip)
+ if (!clip)
BKE_reportf(reports, RPT_ERROR, "Can't read: \"%s\", %s.", filepath, errno ? strerror(errno) : "Unable to load movie clip");
return clip;
@@ -630,29 +630,29 @@ void RNA_def_main_cameras(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "BlendDataCameras");
- srna= RNA_def_struct(brna, "BlendDataCameras", NULL);
+ srna = RNA_def_struct(brna, "BlendDataCameras", NULL);
RNA_def_struct_sdna(srna, "Main");
RNA_def_struct_ui_text(srna, "Main Cameras", "Collection of cameras");
- func= RNA_def_function(srna, "new", "rna_Main_cameras_new");
+ func = RNA_def_function(srna, "new", "rna_Main_cameras_new");
RNA_def_function_ui_description(func, "Add a new camera to the main database");
- parm= RNA_def_string(func, "name", "Camera", 0, "", "New name for the datablock");
+ parm = RNA_def_string(func, "name", "Camera", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "camera", "Camera", "", "New camera datablock");
+ parm = RNA_def_pointer(func, "camera", "Camera", "", "New camera datablock");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_Main_cameras_remove");
+ func = RNA_def_function(srna, "remove", "rna_Main_cameras_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Remove a camera from the current blendfile");
- parm= RNA_def_pointer(func, "camera", "Camera", "", "Camera to remove");
+ parm = RNA_def_pointer(func, "camera", "Camera", "", "Camera to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- func= RNA_def_function(srna, "tag", "rna_Main_cameras_tag");
- parm= RNA_def_boolean(func, "value", 0, "Value", "");
+ func = RNA_def_function(srna, "tag", "rna_Main_cameras_tag");
+ parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- prop= RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Main_cameras_is_updated_get", NULL);
}
@@ -665,25 +665,25 @@ void RNA_def_main_scenes(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "BlendDataScenes");
- srna= RNA_def_struct(brna, "BlendDataScenes", NULL);
+ srna = RNA_def_struct(brna, "BlendDataScenes", NULL);
RNA_def_struct_sdna(srna, "Main");
RNA_def_struct_ui_text(srna, "Main Scenes", "Collection of scenes");
- func= RNA_def_function(srna, "new", "rna_Main_scenes_new");
+ func = RNA_def_function(srna, "new", "rna_Main_scenes_new");
RNA_def_function_ui_description(func, "Add a new scene to the main database");
- parm= RNA_def_string(func, "name", "Scene", 0, "", "New name for the datablock");
+ parm = RNA_def_string(func, "name", "Scene", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "scene", "Scene", "", "New scene datablock");
+ parm = RNA_def_pointer(func, "scene", "Scene", "", "New scene datablock");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_Main_scenes_remove");
+ func = RNA_def_function(srna, "remove", "rna_Main_scenes_remove");
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Remove a scene from the current blendfile");
- parm= RNA_def_pointer(func, "scene", "Scene", "", "Scene to remove");
+ parm = RNA_def_pointer(func, "scene", "Scene", "", "Scene to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- prop= RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Main_scenes_is_updated_get", NULL);
}
@@ -696,33 +696,33 @@ void RNA_def_main_objects(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "BlendDataObjects");
- srna= RNA_def_struct(brna, "BlendDataObjects", NULL);
+ srna = RNA_def_struct(brna, "BlendDataObjects", NULL);
RNA_def_struct_sdna(srna, "Main");
RNA_def_struct_ui_text(srna, "Main Objects", "Collection of objects");
- func= RNA_def_function(srna, "new", "rna_Main_objects_new");
+ func = RNA_def_function(srna, "new", "rna_Main_objects_new");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Add a new object to the main database");
- parm= RNA_def_string(func, "name", "Object", 0, "", "New name for the datablock");
+ parm = RNA_def_string(func, "name", "Object", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "object_data", "ID", "", "Object data or None for an empty object");
+ parm = RNA_def_pointer(func, "object_data", "ID", "", "Object data or None for an empty object");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "object", "Object", "", "New object datablock");
+ parm = RNA_def_pointer(func, "object", "Object", "", "New object datablock");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_Main_objects_remove");
+ func = RNA_def_function(srna, "remove", "rna_Main_objects_remove");
RNA_def_function_ui_description(func, "Remove a object from the current blendfile");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "object", "Object", "", "Object to remove");
+ parm = RNA_def_pointer(func, "object", "Object", "", "Object to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- func= RNA_def_function(srna, "tag", "rna_Main_objects_tag");
- parm= RNA_def_boolean(func, "value", 0, "Value", "");
+ func = RNA_def_function(srna, "tag", "rna_Main_objects_tag");
+ parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- prop= RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Main_objects_is_updated_get", NULL);
}
@@ -735,29 +735,29 @@ void RNA_def_main_materials(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "BlendDataMaterials");
- srna= RNA_def_struct(brna, "BlendDataMaterials", NULL);
+ srna = RNA_def_struct(brna, "BlendDataMaterials", NULL);
RNA_def_struct_sdna(srna, "Main");
RNA_def_struct_ui_text(srna, "Main Materials", "Collection of materials");
- func= RNA_def_function(srna, "new", "rna_Main_materials_new");
+ func = RNA_def_function(srna, "new", "rna_Main_materials_new");
RNA_def_function_ui_description(func, "Add a new material to the main database");
- parm= RNA_def_string(func, "name", "Material", 0, "", "New name for the datablock");
+ parm = RNA_def_string(func, "name", "Material", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "material", "Material", "", "New material datablock");
+ parm = RNA_def_pointer(func, "material", "Material", "", "New material datablock");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_Main_materials_remove");
+ func = RNA_def_function(srna, "remove", "rna_Main_materials_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Remove a material from the current blendfile");
- parm= RNA_def_pointer(func, "material", "Material", "", "Material to remove");
+ parm = RNA_def_pointer(func, "material", "Material", "", "Material to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- func= RNA_def_function(srna, "tag", "rna_Main_materials_tag");
- parm= RNA_def_boolean(func, "value", 0, "Value", "");
+ func = RNA_def_function(srna, "tag", "rna_Main_materials_tag");
+ parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- prop= RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Main_materials_is_updated_get", NULL);
}
@@ -775,31 +775,31 @@ void RNA_def_main_node_groups(BlenderRNA *brna, PropertyRNA *cprop)
{0, NULL, 0, NULL, NULL}};
RNA_def_property_srna(cprop, "BlendDataNodeTrees");
- srna= RNA_def_struct(brna, "BlendDataNodeTrees", NULL);
+ srna = RNA_def_struct(brna, "BlendDataNodeTrees", NULL);
RNA_def_struct_sdna(srna, "Main");
RNA_def_struct_ui_text(srna, "Main Node Trees", "Collection of node trees");
- func= RNA_def_function(srna, "new", "rna_Main_nodetree_new");
+ func = RNA_def_function(srna, "new", "rna_Main_nodetree_new");
RNA_def_function_ui_description(func, "Add a new node tree to the main database");
- parm= RNA_def_string(func, "name", "NodeGroup", 0, "", "New name for the datablock");
+ parm = RNA_def_string(func, "name", "NodeGroup", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_enum(func, "type", node_nodetree_items, 0, "Type", "The type of node_group to add");
+ parm = RNA_def_enum(func, "type", node_nodetree_items, 0, "Type", "The type of node_group to add");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "tree", "NodeTree", "", "New node tree datablock");
+ parm = RNA_def_pointer(func, "tree", "NodeTree", "", "New node tree datablock");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_Main_nodetree_remove");
+ func = RNA_def_function(srna, "remove", "rna_Main_nodetree_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Remove a node tree from the current blendfile");
- parm= RNA_def_pointer(func, "tree", "NodeTree", "", "Node tree to remove");
+ parm = RNA_def_pointer(func, "tree", "NodeTree", "", "Node tree to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- func= RNA_def_function(srna, "tag", "rna_Main_node_groups_tag");
- parm= RNA_def_boolean(func, "value", 0, "Value", "");
+ func = RNA_def_function(srna, "tag", "rna_Main_node_groups_tag");
+ parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- prop= RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Main_node_groups_is_updated_get", NULL);
}
@@ -811,29 +811,29 @@ void RNA_def_main_meshes(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "BlendDataMeshes");
- srna= RNA_def_struct(brna, "BlendDataMeshes", NULL);
+ srna = RNA_def_struct(brna, "BlendDataMeshes", NULL);
RNA_def_struct_sdna(srna, "Main");
RNA_def_struct_ui_text(srna, "Main Meshes", "Collection of meshes");
- func= RNA_def_function(srna, "new", "rna_Main_meshes_new");
+ func = RNA_def_function(srna, "new", "rna_Main_meshes_new");
RNA_def_function_ui_description(func, "Add a new mesh to the main database");
- parm= RNA_def_string(func, "name", "Mesh", 0, "", "New name for the datablock");
+ parm = RNA_def_string(func, "name", "Mesh", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "mesh", "Mesh", "", "New mesh datablock");
+ parm = RNA_def_pointer(func, "mesh", "Mesh", "", "New mesh datablock");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_Main_meshes_remove");
+ func = RNA_def_function(srna, "remove", "rna_Main_meshes_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Remove a mesh from the current blendfile");
- parm= RNA_def_pointer(func, "mesh", "Mesh", "", "Mesh to remove");
+ parm = RNA_def_pointer(func, "mesh", "Mesh", "", "Mesh to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- func= RNA_def_function(srna, "tag", "rna_Main_meshes_tag");
- parm= RNA_def_boolean(func, "value", 0, "Value", "");
+ func = RNA_def_function(srna, "tag", "rna_Main_meshes_tag");
+ parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- prop= RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Main_meshes_is_updated_get", NULL);
}
@@ -845,31 +845,31 @@ void RNA_def_main_lamps(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "BlendDataLamps");
- srna= RNA_def_struct(brna, "BlendDataLamps", NULL);
+ srna = RNA_def_struct(brna, "BlendDataLamps", NULL);
RNA_def_struct_sdna(srna, "Main");
RNA_def_struct_ui_text(srna, "Main Lamps", "Collection of lamps");
- func= RNA_def_function(srna, "new", "rna_Main_lamps_new");
+ func = RNA_def_function(srna, "new", "rna_Main_lamps_new");
RNA_def_function_ui_description(func, "Add a new lamp to the main database");
- parm= RNA_def_string(func, "name", "Lamp", 0, "", "New name for the datablock");
+ parm = RNA_def_string(func, "name", "Lamp", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_enum(func, "type", lamp_type_items, 0, "Type", "The type of texture to add");
+ parm = RNA_def_enum(func, "type", lamp_type_items, 0, "Type", "The type of texture to add");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "lamp", "Lamp", "", "New lamp datablock");
+ parm = RNA_def_pointer(func, "lamp", "Lamp", "", "New lamp datablock");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_Main_lamps_remove");
+ func = RNA_def_function(srna, "remove", "rna_Main_lamps_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Remove a lamp from the current blendfile");
- parm= RNA_def_pointer(func, "lamp", "Lamp", "", "Lamp to remove");
+ parm = RNA_def_pointer(func, "lamp", "Lamp", "", "Lamp to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- func= RNA_def_function(srna, "tag", "rna_Main_lamps_tag");
- parm= RNA_def_boolean(func, "value", 0, "Value", "");
+ func = RNA_def_function(srna, "tag", "rna_Main_lamps_tag");
+ parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- prop= RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Main_lamps_is_updated_get", NULL);
}
@@ -882,15 +882,15 @@ void RNA_def_main_libraries(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "BlendDataLibraries");
- srna= RNA_def_struct(brna, "BlendDataLibraries", NULL);
+ srna = RNA_def_struct(brna, "BlendDataLibraries", NULL);
RNA_def_struct_sdna(srna, "Main");
RNA_def_struct_ui_text(srna, "Main Libraries", "Collection of libraries");
- func= RNA_def_function(srna, "tag", "rna_Main_libraries_tag");
- parm= RNA_def_boolean(func, "value", 0, "Value", "");
+ func = RNA_def_function(srna, "tag", "rna_Main_libraries_tag");
+ parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- prop= RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Main_libraries_is_updated_get", NULL);
}
@@ -903,15 +903,15 @@ void RNA_def_main_screens(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "BlendDataScreens");
- srna= RNA_def_struct(brna, "BlendDataScreens", NULL);
+ srna = RNA_def_struct(brna, "BlendDataScreens", NULL);
RNA_def_struct_sdna(srna, "Main");
RNA_def_struct_ui_text(srna, "Main Screens", "Collection of screens");
- func= RNA_def_function(srna, "tag", "rna_Main_screens_tag");
- parm= RNA_def_boolean(func, "value", 0, "Value", "");
+ func = RNA_def_function(srna, "tag", "rna_Main_screens_tag");
+ parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- prop= RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Main_screens_is_updated_get", NULL);
}
@@ -924,15 +924,15 @@ void RNA_def_main_window_managers(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "BlendDataWindowManagers");
- srna= RNA_def_struct(brna, "BlendDataWindowManagers", NULL);
+ srna = RNA_def_struct(brna, "BlendDataWindowManagers", NULL);
RNA_def_struct_sdna(srna, "Main");
RNA_def_struct_ui_text(srna, "Main Window Managers", "Collection of window managers");
- func= RNA_def_function(srna, "tag", "rna_Main_window_managers_tag");
- parm= RNA_def_boolean(func, "value", 0, "Value", "");
+ func = RNA_def_function(srna, "tag", "rna_Main_window_managers_tag");
+ parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- prop= RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Main_window_managers_is_updated_get", NULL);
}
@@ -944,44 +944,44 @@ void RNA_def_main_images(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "BlendDataImages");
- srna= RNA_def_struct(brna, "BlendDataImages", NULL);
+ srna = RNA_def_struct(brna, "BlendDataImages", NULL);
RNA_def_struct_sdna(srna, "Main");
RNA_def_struct_ui_text(srna, "Main Images", "Collection of images");
- func= RNA_def_function(srna, "new", "rna_Main_images_new");
+ func = RNA_def_function(srna, "new", "rna_Main_images_new");
RNA_def_function_ui_description(func, "Add a new image to the main database");
- parm= RNA_def_string(func, "name", "Image", 0, "", "New name for the datablock");
+ parm = RNA_def_string(func, "name", "Image", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_int(func, "width", 1024, 1, INT_MAX, "", "Width of the image", 0, INT_MAX);
+ parm = RNA_def_int(func, "width", 1024, 1, INT_MAX, "", "Width of the image", 0, INT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_int(func, "height", 1024, 1, INT_MAX, "", "Height of the image", 0, INT_MAX);
+ parm = RNA_def_int(func, "height", 1024, 1, INT_MAX, "", "Height of the image", 0, INT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_boolean(func, "alpha", 0, "Alpha", "Use alpha channel");
RNA_def_boolean(func, "float_buffer", 0, "Float Buffer", "Create an image with floating point color");
/* return type */
- parm= RNA_def_pointer(func, "image", "Image", "", "New image datablock");
+ parm = RNA_def_pointer(func, "image", "Image", "", "New image datablock");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "load", "rna_Main_images_load");
+ func = RNA_def_function(srna, "load", "rna_Main_images_load");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Load a new image into the main database");
- parm= RNA_def_string_file_path(func, "filepath", "File Path", 0, "", "path of the file to load");
+ parm = RNA_def_string_file_path(func, "filepath", "File Path", 0, "", "path of the file to load");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "image", "Image", "", "New image datablock");
+ parm = RNA_def_pointer(func, "image", "Image", "", "New image datablock");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_Main_images_remove");
+ func = RNA_def_function(srna, "remove", "rna_Main_images_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Remove an image from the current blendfile");
- parm= RNA_def_pointer(func, "image", "Image", "", "Image to remove");
+ parm = RNA_def_pointer(func, "image", "Image", "", "Image to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- func= RNA_def_function(srna, "tag", "rna_Main_images_tag");
- parm= RNA_def_boolean(func, "value", 0, "Value", "");
+ func = RNA_def_function(srna, "tag", "rna_Main_images_tag");
+ parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- prop= RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Main_images_is_updated_get", NULL);
}
@@ -994,29 +994,29 @@ void RNA_def_main_lattices(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "BlendDataLattices");
- srna= RNA_def_struct(brna, "BlendDataLattices", NULL);
+ srna = RNA_def_struct(brna, "BlendDataLattices", NULL);
RNA_def_struct_sdna(srna, "Main");
RNA_def_struct_ui_text(srna, "Main Lattices", "Collection of lattices");
- func= RNA_def_function(srna, "new", "rna_Main_lattices_new");
+ func = RNA_def_function(srna, "new", "rna_Main_lattices_new");
RNA_def_function_ui_description(func, "Add a new lattice to the main database");
- parm= RNA_def_string(func, "name", "Lattice", 0, "", "New name for the datablock");
+ parm = RNA_def_string(func, "name", "Lattice", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "lattice", "Lattice", "", "New lattices datablock");
+ parm = RNA_def_pointer(func, "lattice", "Lattice", "", "New lattices datablock");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_Main_lattices_remove");
+ func = RNA_def_function(srna, "remove", "rna_Main_lattices_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Remove a lattice from the current blendfile");
- parm= RNA_def_pointer(func, "lattice", "Lattice", "", "Lattice to remove");
+ parm = RNA_def_pointer(func, "lattice", "Lattice", "", "Lattice to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- func= RNA_def_function(srna, "tag", "rna_Main_lattices_tag");
- parm= RNA_def_boolean(func, "value", 0, "Value", "");
+ func = RNA_def_function(srna, "tag", "rna_Main_lattices_tag");
+ parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- prop= RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Main_lattices_is_updated_get", NULL);
}
@@ -1028,31 +1028,31 @@ void RNA_def_main_curves(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "BlendDataCurves");
- srna= RNA_def_struct(brna, "BlendDataCurves", NULL);
+ srna = RNA_def_struct(brna, "BlendDataCurves", NULL);
RNA_def_struct_sdna(srna, "Main");
RNA_def_struct_ui_text(srna, "Main Curves", "Collection of curves");
- func= RNA_def_function(srna, "new", "rna_Main_curves_new");
+ func = RNA_def_function(srna, "new", "rna_Main_curves_new");
RNA_def_function_ui_description(func, "Add a new curve to the main database");
- parm= RNA_def_string(func, "name", "Curve", 0, "", "New name for the datablock");
+ parm = RNA_def_string(func, "name", "Curve", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_enum(func, "type", object_type_curve_items, 0, "Type", "The type of curve to add");
+ parm = RNA_def_enum(func, "type", object_type_curve_items, 0, "Type", "The type of curve to add");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "curve", "Curve", "", "New curve datablock");
+ parm = RNA_def_pointer(func, "curve", "Curve", "", "New curve datablock");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_Main_curves_remove");
+ func = RNA_def_function(srna, "remove", "rna_Main_curves_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Remove a curve from the current blendfile");
- parm= RNA_def_pointer(func, "curve", "Curve", "", "Curve to remove");
+ parm = RNA_def_pointer(func, "curve", "Curve", "", "Curve to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- func= RNA_def_function(srna, "tag", "rna_Main_curves_tag");
- parm= RNA_def_boolean(func, "value", 0, "Value", "");
+ func = RNA_def_function(srna, "tag", "rna_Main_curves_tag");
+ parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- prop= RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Main_curves_is_updated_get", NULL);
}
@@ -1064,29 +1064,29 @@ void RNA_def_main_metaballs(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "BlendDataMetaBalls");
- srna= RNA_def_struct(brna, "BlendDataMetaBalls", NULL);
+ srna = RNA_def_struct(brna, "BlendDataMetaBalls", NULL);
RNA_def_struct_sdna(srna, "Main");
RNA_def_struct_ui_text(srna, "Main Metaballs", "Collection of metaballs");
- func= RNA_def_function(srna, "new", "rna_Main_metaballs_new");
+ func = RNA_def_function(srna, "new", "rna_Main_metaballs_new");
RNA_def_function_ui_description(func, "Add a new metaball to the main database");
- parm= RNA_def_string(func, "name", "MetaBall", 0, "", "New name for the datablock");
+ parm = RNA_def_string(func, "name", "MetaBall", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "metaball", "MetaBall", "", "New metaball datablock");
+ parm = RNA_def_pointer(func, "metaball", "MetaBall", "", "New metaball datablock");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_Main_metaballs_remove");
+ func = RNA_def_function(srna, "remove", "rna_Main_metaballs_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Remove a metaball from the current blendfile");
- parm= RNA_def_pointer(func, "metaball", "MetaBall", "", "Metaball to remove");
+ parm = RNA_def_pointer(func, "metaball", "MetaBall", "", "Metaball to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- func= RNA_def_function(srna, "tag", "rna_Main_metaballs_tag");
- parm= RNA_def_boolean(func, "value", 0, "Value", "");
+ func = RNA_def_function(srna, "tag", "rna_Main_metaballs_tag");
+ parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- prop= RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Main_metaballs_is_updated_get", NULL);
}
@@ -1098,30 +1098,30 @@ void RNA_def_main_fonts(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "BlendDataFonts");
- srna= RNA_def_struct(brna, "BlendDataFonts", NULL);
+ srna = RNA_def_struct(brna, "BlendDataFonts", NULL);
RNA_def_struct_sdna(srna, "Main");
RNA_def_struct_ui_text(srna, "Main Fonts", "Collection of fonts");
- func= RNA_def_function(srna, "load", "rna_Main_fonts_load");
+ func = RNA_def_function(srna, "load", "rna_Main_fonts_load");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Load a new font into the main database");
- parm= RNA_def_string_file_path(func, "filepath", "File Path", 0, "", "path of the font to load");
+ parm = RNA_def_string_file_path(func, "filepath", "File Path", 0, "", "path of the font to load");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "vfont", "VectorFont", "", "New font datablock");
+ parm = RNA_def_pointer(func, "vfont", "VectorFont", "", "New font datablock");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_Main_fonts_remove");
+ func = RNA_def_function(srna, "remove", "rna_Main_fonts_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Remove a font from the current blendfile");
- parm= RNA_def_pointer(func, "vfont", "VectorFont", "", "Font to remove");
+ parm = RNA_def_pointer(func, "vfont", "VectorFont", "", "Font to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- func= RNA_def_function(srna, "tag", "rna_Main_fonts_tag");
- parm= RNA_def_boolean(func, "value", 0, "Value", "");
+ func = RNA_def_function(srna, "tag", "rna_Main_fonts_tag");
+ parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- prop= RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Main_fonts_is_updated_get", NULL);
}
@@ -1133,31 +1133,31 @@ void RNA_def_main_textures(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "BlendDataTextures");
- srna= RNA_def_struct(brna, "BlendDataTextures", NULL);
+ srna = RNA_def_struct(brna, "BlendDataTextures", NULL);
RNA_def_struct_sdna(srna, "Main");
RNA_def_struct_ui_text(srna, "Main Textures", "Collection of groups");
- func= RNA_def_function(srna, "new", "rna_Main_textures_new");
+ func = RNA_def_function(srna, "new", "rna_Main_textures_new");
RNA_def_function_ui_description(func, "Add a new texture to the main database");
- parm= RNA_def_string(func, "name", "Texture", 0, "", "New name for the datablock");
+ parm = RNA_def_string(func, "name", "Texture", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_enum(func, "type", texture_type_items, 0, "Type", "The type of texture to add");
+ parm = RNA_def_enum(func, "type", texture_type_items, 0, "Type", "The type of texture to add");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "texture", "Texture", "", "New texture datablock");
+ parm = RNA_def_pointer(func, "texture", "Texture", "", "New texture datablock");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_Main_textures_remove");
+ func = RNA_def_function(srna, "remove", "rna_Main_textures_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Remove a texture from the current blendfile");
- parm= RNA_def_pointer(func, "texture", "Texture", "", "Texture to remove");
+ parm = RNA_def_pointer(func, "texture", "Texture", "", "Texture to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- func= RNA_def_function(srna, "tag", "rna_Main_textures_tag");
- parm= RNA_def_boolean(func, "value", 0, "Value", "");
+ func = RNA_def_function(srna, "tag", "rna_Main_textures_tag");
+ parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- prop= RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Main_textures_is_updated_get", NULL);
}
@@ -1169,29 +1169,29 @@ void RNA_def_main_brushes(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "BlendDataBrushes");
- srna= RNA_def_struct(brna, "BlendDataBrushes", NULL);
+ srna = RNA_def_struct(brna, "BlendDataBrushes", NULL);
RNA_def_struct_sdna(srna, "Main");
RNA_def_struct_ui_text(srna, "Main Brushes", "Collection of brushes");
- func= RNA_def_function(srna, "new", "rna_Main_brushes_new");
+ func = RNA_def_function(srna, "new", "rna_Main_brushes_new");
RNA_def_function_ui_description(func, "Add a new brush to the main database");
- parm= RNA_def_string(func, "name", "Brush", 0, "", "New name for the datablock");
+ parm = RNA_def_string(func, "name", "Brush", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "brush", "Brush", "", "New brush datablock");
+ parm = RNA_def_pointer(func, "brush", "Brush", "", "New brush datablock");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_Main_brushes_remove");
+ func = RNA_def_function(srna, "remove", "rna_Main_brushes_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Remove a brush from the current blendfile");
- parm= RNA_def_pointer(func, "brush", "Brush", "", "Brush to remove");
+ parm = RNA_def_pointer(func, "brush", "Brush", "", "Brush to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- func= RNA_def_function(srna, "tag", "rna_Main_brushes_tag");
- parm= RNA_def_boolean(func, "value", 0, "Value", "");
+ func = RNA_def_function(srna, "tag", "rna_Main_brushes_tag");
+ parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- prop= RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Main_brushes_is_updated_get", NULL);
}
@@ -1204,29 +1204,29 @@ void RNA_def_main_worlds(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "BlendDataWorlds");
- srna= RNA_def_struct(brna, "BlendDataWorlds", NULL);
+ srna = RNA_def_struct(brna, "BlendDataWorlds", NULL);
RNA_def_struct_sdna(srna, "Main");
RNA_def_struct_ui_text(srna, "Main Worlds", "Collection of worlds");
- func= RNA_def_function(srna, "new", "rna_Main_worlds_new");
+ func = RNA_def_function(srna, "new", "rna_Main_worlds_new");
RNA_def_function_ui_description(func, "Add a new world to the main database");
- parm= RNA_def_string(func, "name", "World", 0, "", "New name for the datablock");
+ parm = RNA_def_string(func, "name", "World", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "world", "World", "", "New world datablock");
+ parm = RNA_def_pointer(func, "world", "World", "", "New world datablock");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_Main_worlds_remove");
+ func = RNA_def_function(srna, "remove", "rna_Main_worlds_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Remove a world from the current blendfile");
- parm= RNA_def_pointer(func, "world", "World", "", "World to remove");
+ parm = RNA_def_pointer(func, "world", "World", "", "World to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- func= RNA_def_function(srna, "tag", "rna_Main_worlds_tag");
- parm= RNA_def_boolean(func, "value", 0, "Value", "");
+ func = RNA_def_function(srna, "tag", "rna_Main_worlds_tag");
+ parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- prop= RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Main_worlds_is_updated_get", NULL);
}
@@ -1239,28 +1239,28 @@ void RNA_def_main_groups(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "BlendDataGroups");
- srna= RNA_def_struct(brna, "BlendDataGroups", NULL);
+ srna = RNA_def_struct(brna, "BlendDataGroups", NULL);
RNA_def_struct_sdna(srna, "Main");
RNA_def_struct_ui_text(srna, "Main Groups", "Collection of groups");
- func= RNA_def_function(srna, "new", "rna_Main_groups_new");
+ func = RNA_def_function(srna, "new", "rna_Main_groups_new");
RNA_def_function_ui_description(func, "Add a new group to the main database");
- parm= RNA_def_string(func, "name", "Group", 0, "", "New name for the datablock");
+ parm = RNA_def_string(func, "name", "Group", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "group", "Group", "", "New group datablock");
+ parm = RNA_def_pointer(func, "group", "Group", "", "New group datablock");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_Main_groups_remove");
+ func = RNA_def_function(srna, "remove", "rna_Main_groups_remove");
RNA_def_function_ui_description(func, "Remove a group from the current blendfile");
- parm= RNA_def_pointer(func, "group", "Group", "", "Group to remove");
+ parm = RNA_def_pointer(func, "group", "Group", "", "Group to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- func= RNA_def_function(srna, "tag", "rna_Main_groups_tag");
- parm= RNA_def_boolean(func, "value", 0, "Value", "");
+ func = RNA_def_function(srna, "tag", "rna_Main_groups_tag");
+ parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- prop= RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Main_groups_is_updated_get", NULL);
}
@@ -1273,29 +1273,29 @@ void RNA_def_main_speakers(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "BlendDataSpeakers");
- srna= RNA_def_struct(brna, "BlendDataSpeakers", NULL);
+ srna = RNA_def_struct(brna, "BlendDataSpeakers", NULL);
RNA_def_struct_sdna(srna, "Main");
RNA_def_struct_ui_text(srna, "Main Speakers", "Collection of speakers");
- func= RNA_def_function(srna, "new", "rna_Main_speakers_new");
+ func = RNA_def_function(srna, "new", "rna_Main_speakers_new");
RNA_def_function_ui_description(func, "Add a new speaker to the main database");
- parm= RNA_def_string(func, "name", "Speaker", 0, "", "New name for the datablock");
+ parm = RNA_def_string(func, "name", "Speaker", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "speaker", "Speaker", "", "New speaker datablock");
+ parm = RNA_def_pointer(func, "speaker", "Speaker", "", "New speaker datablock");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_Main_speakers_remove");
+ func = RNA_def_function(srna, "remove", "rna_Main_speakers_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Remove a speaker from the current blendfile");
- parm= RNA_def_pointer(func, "speaker", "Speaker", "", "Speaker to remove");
+ parm = RNA_def_pointer(func, "speaker", "Speaker", "", "Speaker to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- func= RNA_def_function(srna, "tag", "rna_Main_speakers_tag");
- parm= RNA_def_boolean(func, "value", 0, "Value", "");
+ func = RNA_def_function(srna, "tag", "rna_Main_speakers_tag");
+ parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- prop= RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Main_speakers_is_updated_get", NULL);
}
@@ -1308,38 +1308,38 @@ void RNA_def_main_texts(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "BlendDataTexts");
- srna= RNA_def_struct(brna, "BlendDataTexts", NULL);
+ srna = RNA_def_struct(brna, "BlendDataTexts", NULL);
RNA_def_struct_sdna(srna, "Main");
RNA_def_struct_ui_text(srna, "Main Texts", "Collection of texts");
- func= RNA_def_function(srna, "new", "rna_Main_texts_new");
+ func = RNA_def_function(srna, "new", "rna_Main_texts_new");
RNA_def_function_ui_description(func, "Add a new text to the main database");
- parm= RNA_def_string(func, "name", "Text", 0, "", "New name for the datablock");
+ parm = RNA_def_string(func, "name", "Text", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "text", "Text", "", "New text datablock");
+ parm = RNA_def_pointer(func, "text", "Text", "", "New text datablock");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_Main_texts_remove");
+ func = RNA_def_function(srna, "remove", "rna_Main_texts_remove");
RNA_def_function_ui_description(func, "Remove a text from the current blendfile");
- parm= RNA_def_pointer(func, "text", "Text", "", "Text to remove");
+ parm = RNA_def_pointer(func, "text", "Text", "", "Text to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
/* load func */
- func= RNA_def_function(srna, "load", "rna_Main_texts_load");
+ func = RNA_def_function(srna, "load", "rna_Main_texts_load");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Add a new text to the main database from a file");
- parm= RNA_def_string_file_path(func, "filepath", "Path", FILE_MAX, "", "path for the datablock");
+ parm = RNA_def_string_file_path(func, "filepath", "Path", FILE_MAX, "", "path for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "text", "Text", "", "New text datablock");
+ parm = RNA_def_pointer(func, "text", "Text", "", "New text datablock");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "tag", "rna_Main_texts_tag");
- parm= RNA_def_boolean(func, "value", 0, "Value", "");
+ func = RNA_def_function(srna, "tag", "rna_Main_texts_tag");
+ parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- prop= RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Main_texts_is_updated_get", NULL);
}
@@ -1352,17 +1352,17 @@ void RNA_def_main_sounds(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "BlendDataSounds");
- srna= RNA_def_struct(brna, "BlendDataSounds", NULL);
+ srna = RNA_def_struct(brna, "BlendDataSounds", NULL);
RNA_def_struct_sdna(srna, "Main");
RNA_def_struct_ui_text(srna, "Main Sounds", "Collection of sounds");
/* TODO, 'load' */
- func= RNA_def_function(srna, "tag", "rna_Main_sounds_tag");
- parm= RNA_def_boolean(func, "value", 0, "Value", "");
+ func = RNA_def_function(srna, "tag", "rna_Main_sounds_tag");
+ parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- prop= RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Main_sounds_is_updated_get", NULL);
}
@@ -1375,29 +1375,29 @@ void RNA_def_main_armatures(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "BlendDataArmatures");
- srna= RNA_def_struct(brna, "BlendDataArmatures", NULL);
+ srna = RNA_def_struct(brna, "BlendDataArmatures", NULL);
RNA_def_struct_sdna(srna, "Main");
RNA_def_struct_ui_text(srna, "Main Armatures", "Collection of armatures");
- func= RNA_def_function(srna, "new", "rna_Main_armatures_new");
+ func = RNA_def_function(srna, "new", "rna_Main_armatures_new");
RNA_def_function_ui_description(func, "Add a new armature to the main database");
- parm= RNA_def_string(func, "name", "Armature", 0, "", "New name for the datablock");
+ parm = RNA_def_string(func, "name", "Armature", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "armature", "Armature", "", "New armature datablock");
+ parm = RNA_def_pointer(func, "armature", "Armature", "", "New armature datablock");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_Main_armatures_remove");
+ func = RNA_def_function(srna, "remove", "rna_Main_armatures_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Remove a armature from the current blendfile");
- parm= RNA_def_pointer(func, "armature", "Armature", "", "Armature to remove");
+ parm = RNA_def_pointer(func, "armature", "Armature", "", "Armature to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- func= RNA_def_function(srna, "tag", "rna_Main_armatures_tag");
- parm= RNA_def_boolean(func, "value", 0, "Value", "");
+ func = RNA_def_function(srna, "tag", "rna_Main_armatures_tag");
+ parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- prop= RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Main_armatures_is_updated_get", NULL);
}
@@ -1409,29 +1409,29 @@ void RNA_def_main_actions(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "BlendDataActions");
- srna= RNA_def_struct(brna, "BlendDataActions", NULL);
+ srna = RNA_def_struct(brna, "BlendDataActions", NULL);
RNA_def_struct_sdna(srna, "Main");
RNA_def_struct_ui_text(srna, "Main Actions", "Collection of actions");
- func= RNA_def_function(srna, "new", "rna_Main_actions_new");
+ func = RNA_def_function(srna, "new", "rna_Main_actions_new");
RNA_def_function_ui_description(func, "Add a new action to the main database");
- parm= RNA_def_string(func, "name", "Action", 0, "", "New name for the datablock");
+ parm = RNA_def_string(func, "name", "Action", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "action", "Action", "", "New action datablock");
+ parm = RNA_def_pointer(func, "action", "Action", "", "New action datablock");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_Main_actions_remove");
+ func = RNA_def_function(srna, "remove", "rna_Main_actions_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Remove a action from the current blendfile");
- parm= RNA_def_pointer(func, "action", "Action", "", "Action to remove");
+ parm = RNA_def_pointer(func, "action", "Action", "", "Action to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- func= RNA_def_function(srna, "tag", "rna_Main_actions_tag");
- parm= RNA_def_boolean(func, "value", 0, "Value", "");
+ func = RNA_def_function(srna, "tag", "rna_Main_actions_tag");
+ parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- prop= RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Main_actions_is_updated_get", NULL);
}
@@ -1443,29 +1443,29 @@ void RNA_def_main_particles(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "BlendDataParticles");
- srna= RNA_def_struct(brna, "BlendDataParticles", NULL);
+ srna = RNA_def_struct(brna, "BlendDataParticles", NULL);
RNA_def_struct_sdna(srna, "Main");
RNA_def_struct_ui_text(srna, "Main Particle Settings", "Collection of particle settings");
- func= RNA_def_function(srna, "new", "rna_Main_particles_new");
+ func = RNA_def_function(srna, "new", "rna_Main_particles_new");
RNA_def_function_ui_description(func, "Add a new particle settings instance to the main database");
- parm= RNA_def_string(func, "name", "ParticleSettings", 0, "", "New name for the datablock");
+ parm = RNA_def_string(func, "name", "ParticleSettings", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "particle", "ParticleSettings", "", "New particle settings datablock");
+ parm = RNA_def_pointer(func, "particle", "ParticleSettings", "", "New particle settings datablock");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_Main_particles_remove");
+ func = RNA_def_function(srna, "remove", "rna_Main_particles_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Remove a particle settings instance from the current blendfile");
- parm= RNA_def_pointer(func, "particle", "ParticleSettings", "", "Particle Settings to remove");
+ parm = RNA_def_pointer(func, "particle", "ParticleSettings", "", "Particle Settings to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- func= RNA_def_function(srna, "tag", "rna_Main_particles_tag");
- parm= RNA_def_boolean(func, "value", 0, "Value", "");
+ func = RNA_def_function(srna, "tag", "rna_Main_particles_tag");
+ parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- prop= RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Main_particles_is_updated_get", NULL);
}
@@ -1478,15 +1478,15 @@ void RNA_def_main_gpencil(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "BlendDataGreasePencils");
- srna= RNA_def_struct(brna, "BlendDataGreasePencils", NULL);
+ srna = RNA_def_struct(brna, "BlendDataGreasePencils", NULL);
RNA_def_struct_sdna(srna, "Main");
RNA_def_struct_ui_text(srna, "Main Grease Pencils", "Collection of grease pencils");
- func= RNA_def_function(srna, "tag", "rna_Main_gpencil_tag");
- parm= RNA_def_boolean(func, "value", 0, "Value", "");
+ func = RNA_def_function(srna, "tag", "rna_Main_gpencil_tag");
+ parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- prop= RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Main_gpencil_is_updated_get", NULL);
}
@@ -1498,27 +1498,27 @@ void RNA_def_main_movieclips(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *parm;
RNA_def_property_srna(cprop, "BlendDataMovieClips");
- srna= RNA_def_struct(brna, "BlendDataMovieClips", NULL);
+ srna = RNA_def_struct(brna, "BlendDataMovieClips", NULL);
RNA_def_struct_sdna(srna, "Main");
RNA_def_struct_ui_text(srna, "Main Movie Clips", "Collection of movie clips");
- func= RNA_def_function(srna, "tag", "rna_Main_movieclips_tag");
- parm= RNA_def_boolean(func, "value", 0, "Value", "");
+ func = RNA_def_function(srna, "tag", "rna_Main_movieclips_tag");
+ parm = RNA_def_boolean(func, "value", 0, "Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- func= RNA_def_function(srna, "remove", "rna_Main_movieclips_remove");
+ func = RNA_def_function(srna, "remove", "rna_Main_movieclips_remove");
RNA_def_function_ui_description(func, "Remove a movie clip from the current blendfile.");
- parm= RNA_def_pointer(func, "clip", "MovieClip", "", "Movie clip to remove");
+ parm = RNA_def_pointer(func, "clip", "MovieClip", "", "Movie clip to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
/* load func */
- func= RNA_def_function(srna, "load", "rna_Main_movieclip_load");
+ func = RNA_def_function(srna, "load", "rna_Main_movieclip_load");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Add a new movie clip to the main database from a file");
- parm= RNA_def_string_file_path(func, "filepath", "Path", FILE_MAX, "", "path for the datablock");
+ parm = RNA_def_string_file_path(func, "filepath", "Path", FILE_MAX, "", "path for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "clip", "MovieClip", "", "New movie clip datablock");
+ parm = RNA_def_pointer(func, "clip", "MovieClip", "", "New movie clip datablock");
RNA_def_function_return(func, parm);
}
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index 21b9c830435..e62f85a1f08 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -90,7 +90,7 @@ EnumPropertyItem ramp_blend_items[] = {
static void rna_Material_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
{
- Material *ma= ptr->id.data;
+ Material *ma = ptr->id.data;
DAG_id_tag_update(&ma->id, 0);
if (scene) { /* can be NULL, see [#30025] */
@@ -105,7 +105,7 @@ static void rna_Material_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *p
static void rna_Material_draw_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Material *ma= ptr->id.data;
+ Material *ma = ptr->id.data;
DAG_id_tag_update(&ma->id, 0);
WM_main_add_notifier(NC_MATERIAL|ND_SHADING_DRAW, ma);
@@ -143,93 +143,93 @@ static PointerRNA rna_Material_physics_get(PointerRNA *ptr)
static void rna_Material_type_set(PointerRNA *ptr, int value)
{
- Material *ma= (Material*)ptr->data;
+ Material *ma = (Material*)ptr->data;
- if(ma->material_type == MA_TYPE_HALO && value != MA_TYPE_HALO)
+ if (ma->material_type == MA_TYPE_HALO && value != MA_TYPE_HALO)
ma->mode &= ~(MA_STAR|MA_HALO_XALPHA|MA_ZINV|MA_ENV);
- ma->material_type= value;
+ ma->material_type = value;
}
static void rna_Material_mtex_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Material *ma= (Material*)ptr->data;
+ Material *ma = (Material*)ptr->data;
rna_iterator_array_begin(iter, (void*)ma->mtex, sizeof(MTex*), MAX_MTEX, 0, NULL);
}
static PointerRNA rna_Material_active_texture_get(PointerRNA *ptr)
{
- Material *ma= (Material*)ptr->data;
+ Material *ma = (Material*)ptr->data;
Tex *tex;
- tex= give_current_material_texture(ma);
+ tex = give_current_material_texture(ma);
return rna_pointer_inherit_refine(ptr, &RNA_Texture, tex);
}
static void rna_Material_active_texture_set(PointerRNA *ptr, PointerRNA value)
{
- Material *ma= (Material*)ptr->data;
+ Material *ma = (Material*)ptr->data;
set_current_material_texture(ma, value.data);
}
static int rna_Material_active_texture_editable(PointerRNA *ptr)
{
- Material *ma= (Material*)ptr->id.data;
+ Material *ma = (Material*)ptr->id.data;
return has_current_material_texture(ma);
}
static PointerRNA rna_Material_active_node_material_get(PointerRNA *ptr)
{
- Material *ma= give_node_material((Material*)ptr->data);
+ Material *ma = give_node_material((Material*)ptr->data);
return rna_pointer_inherit_refine(ptr, &RNA_Material, ma);
}
static void rna_Material_active_node_material_set(PointerRNA *ptr, PointerRNA value)
{
- Material *ma= (Material*)ptr->data;
- Material *ma_act= value.data;
+ Material *ma = (Material*)ptr->data;
+ Material *ma_act = value.data;
nodeSetActiveID(ma->nodetree, ID_MA, &ma_act->id);
}
static void rna_MaterialStrand_start_size_range(PointerRNA *ptr, float *min, float *max)
{
- Material *ma= (Material*)ptr->id.data;
+ Material *ma = (Material*)ptr->id.data;
- if(ma->mode & MA_STR_B_UNITS) {
- *min= 0.0001f;
- *max= 2.0f;
+ if (ma->mode & MA_STR_B_UNITS) {
+ *min = 0.0001f;
+ *max = 2.0f;
}
else {
- *min= 0.25f;
- *max= 20.0f;
+ *min = 0.25f;
+ *max = 20.0f;
}
}
static void rna_MaterialStrand_end_size_range(PointerRNA *ptr, float *min, float *max)
{
- Material *ma= (Material*)ptr->id.data;
+ Material *ma = (Material*)ptr->id.data;
- if(ma->mode & MA_STR_B_UNITS) {
- *min= 0.0001f;
- *max= 1.0f;
+ if (ma->mode & MA_STR_B_UNITS) {
+ *min = 0.0001f;
+ *max = 1.0f;
}
else {
- *min= 0.25f;
- *max= 10.0f;
+ *min = 0.25f;
+ *max = 10.0f;
}
}
static int rna_MaterialTextureSlot_use_get(PointerRNA *ptr)
{
- Material *ma= (Material*)ptr->id.data;
- MTex *mtex= (MTex*)ptr->data;
+ Material *ma = (Material*)ptr->id.data;
+ MTex *mtex = (MTex*)ptr->data;
int a;
- for(a=0; a<MAX_MTEX; a++)
- if(ma->mtex[a] == mtex)
+ for (a = 0; a<MAX_MTEX; a++)
+ if (ma->mtex[a] == mtex)
return (ma->septex & (1<<a)) == 0;
return 0;
@@ -237,13 +237,13 @@ static int rna_MaterialTextureSlot_use_get(PointerRNA *ptr)
static void rna_MaterialTextureSlot_use_set(PointerRNA *ptr, int value)
{
- Material *ma= (Material*)ptr->id.data;
- MTex *mtex= (MTex*)ptr->data;
+ Material *ma = (Material*)ptr->id.data;
+ MTex *mtex = (MTex*)ptr->data;
int a;
- for(a=0; a<MAX_MTEX; a++) {
- if(ma->mtex[a] == mtex) {
- if(value)
+ for (a = 0; a<MAX_MTEX; a++) {
+ if (ma->mtex[a] == mtex) {
+ if (value)
ma->septex &= ~(1<<a);
else
ma->septex |= (1<<a);
@@ -253,31 +253,31 @@ static void rna_MaterialTextureSlot_use_set(PointerRNA *ptr, int value)
static void rna_Material_use_diffuse_ramp_set(PointerRNA *ptr, int value)
{
- Material *ma= (Material*)ptr->data;
+ Material *ma = (Material*)ptr->data;
- if(value) ma->mode |= MA_RAMP_COL;
+ if (value) ma->mode |= MA_RAMP_COL;
else ma->mode &= ~MA_RAMP_COL;
- if((ma->mode & MA_RAMP_COL) && ma->ramp_col == NULL)
- ma->ramp_col= add_colorband(0);
+ if ((ma->mode & MA_RAMP_COL) && ma->ramp_col == NULL)
+ ma->ramp_col = add_colorband(0);
}
static void rna_Material_use_specular_ramp_set(PointerRNA *ptr, int value)
{
- Material *ma= (Material*)ptr->data;
+ Material *ma = (Material*)ptr->data;
- if(value) ma->mode |= MA_RAMP_SPEC;
+ if (value) ma->mode |= MA_RAMP_SPEC;
else ma->mode &= ~MA_RAMP_SPEC;
- if((ma->mode & MA_RAMP_SPEC) && ma->ramp_spec == NULL)
- ma->ramp_spec= add_colorband(0);
+ if ((ma->mode & MA_RAMP_SPEC) && ma->ramp_spec == NULL)
+ ma->ramp_spec = add_colorband(0);
}
static void rna_Material_use_nodes_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Material *ma= (Material*)ptr->data;
+ Material *ma = (Material*)ptr->data;
- if(ma->use_nodes && ma->nodetree==NULL)
+ if (ma->use_nodes && ma->nodetree == NULL)
ED_node_shader_default(scene, &ma->id);
rna_Material_update(bmain, scene, ptr);
@@ -286,15 +286,15 @@ static void rna_Material_use_nodes_update(Main *bmain, Scene *scene, PointerRNA
static EnumPropertyItem *rna_Material_texture_coordinates_itemf(bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), int *free)
{
- Material *ma= (Material*)ptr->id.data;
- EnumPropertyItem *item= NULL;
- int totitem= 0;
+ Material *ma = (Material*)ptr->id.data;
+ EnumPropertyItem *item = NULL;
+ int totitem = 0;
RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_GLOB);
RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_OBJECT);
RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_ORCO);
- if(ma->material_type == MA_TYPE_VOLUME) {
+ if (ma->material_type == MA_TYPE_VOLUME) {
}
else if (ELEM3(ma->material_type, MA_TYPE_SURFACE, MA_TYPE_HALO, MA_TYPE_WIRE)) {
@@ -309,14 +309,14 @@ static EnumPropertyItem *rna_Material_texture_coordinates_itemf(bContext *UNUSED
}
RNA_enum_item_end(&item, &totitem);
- *free= 1;
+ *free = 1;
return item;
}
MTex *rna_mtex_texture_slots_add(ID *self_id, struct bContext *C, ReportList *reports)
{
- MTex *mtex= add_mtex_id(self_id, -1);
+ MTex *mtex = add_mtex_id(self_id, -1);
if (mtex == NULL) {
BKE_reportf(reports, RPT_ERROR, "maximum number of textures added %d", MAX_MTEX);
return NULL;
@@ -332,12 +332,12 @@ MTex *rna_mtex_texture_slots_create(ID *self_id, struct bContext *C, ReportList
{
MTex *mtex;
- if(index < 0 || index >= MAX_MTEX) {
+ if (index < 0 || index >= MAX_MTEX) {
BKE_reportf(reports, RPT_ERROR, "index %d is invalid", index);
return NULL;
}
- mtex= add_mtex_id(self_id, index);
+ mtex = add_mtex_id(self_id, index);
/* for redraw only */
WM_event_add_notifier(C, NC_TEXTURE, CTX_data_scene(C));
@@ -357,15 +357,15 @@ void rna_mtex_texture_slots_clear(ID *self_id, struct bContext *C, ReportList *r
return;
}
- if(index < 0 || index >= MAX_MTEX) {
+ if (index < 0 || index >= MAX_MTEX) {
BKE_reportf(reports, RPT_ERROR, "index %d is invalid", index);
return;
}
- if(mtex_ar[index]) {
+ if (mtex_ar[index]) {
id_us_min((ID *)mtex_ar[index]->tex);
MEM_freeN(mtex_ar[index]);
- mtex_ar[index]= NULL;
+ mtex_ar[index] = NULL;
}
/* for redraw only */
@@ -429,299 +429,299 @@ static void rna_def_material_mtex(BlenderRNA *brna)
{MTEX_BUMP_TEXTURESPACE, "BUMP_TEXTURESPACE", 0, "TextureSpace", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "MaterialTextureSlot", "TextureSlot");
+ srna = RNA_def_struct(brna, "MaterialTextureSlot", "TextureSlot");
RNA_def_struct_sdna(srna, "MTex");
RNA_def_struct_ui_text(srna, "Material Texture Slot", "Texture slot for textures in a Material datablock");
- prop= RNA_def_property(srna, "texture_coords", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "texture_coords", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "texco");
RNA_def_property_enum_items(prop, prop_texture_coordinates_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Material_texture_coordinates_itemf");
RNA_def_property_ui_text(prop, "Texture Coordinates", "");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "object");
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object", "Object to use for mapping with Object texture coordinates");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "uvname");
RNA_def_property_ui_text(prop, "UV Map", "UV map to use for mapping with UV texture coordinates");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_from_dupli", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_from_dupli", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_DUPLI_MAPTO);
RNA_def_property_ui_text(prop, "From Dupli",
"Dupli's instanced from verts, faces or particles, inherit texture coordinate from their parent");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_from_original", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_from_original", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_OB_DUPLI_ORIG);
RNA_def_property_ui_text(prop, "From Original",
"Dupli's derive their object coordinates from the original object's transformation");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_map_color_diffuse", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_color_diffuse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_COL);
RNA_def_property_ui_text(prop, "Diffuse Color", "The texture affects basic color of the material");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_map_normal", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_NORM);
RNA_def_property_ui_text(prop, "Normal", "The texture affects the rendered normal");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_map_color_spec", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_color_spec", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_COLSPEC);
RNA_def_property_ui_text(prop, "Specular Color", "The texture affects the specularity color");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_map_mirror", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_mirror", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_COLMIR);
RNA_def_property_ui_text(prop, "Mirror", "The texture affects the mirror color");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_map_diffuse", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_diffuse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_REF);
RNA_def_property_ui_text(prop, "Diffuse", "The texture affects the value of diffuse reflectivity");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_map_specular", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_specular", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_SPEC);
RNA_def_property_ui_text(prop, "Specular", "The texture affects the value of specular reflectivity");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_map_ambient", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_ambient", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_AMB);
RNA_def_property_ui_text(prop, "Ambient", "The texture affects the value of ambient");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_map_hardness", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_hardness", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_HAR);
RNA_def_property_ui_text(prop, "Hardness", "The texture affects the hardness value");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_map_raymir", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_raymir", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_RAYMIRR);
RNA_def_property_ui_text(prop, "Ray-Mirror", "The texture affects the ray-mirror value");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_map_alpha", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_alpha", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_ALPHA);
RNA_def_property_ui_text(prop, "Alpha", "The texture affects the alpha value");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_map_emit", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_emit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_EMIT);
RNA_def_property_ui_text(prop, "Emit", "The texture affects the emit value");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_map_translucency", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_translucency", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_TRANSLU);
RNA_def_property_ui_text(prop, "Translucency", "The texture affects the translucency value");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_map_displacement", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_displacement", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_DISPLACE);
RNA_def_property_ui_text(prop, "Displacement", "Let the texture displace the surface");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_map_warp", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_warp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_WARP);
RNA_def_property_ui_text(prop, "Warp", "Let the texture warp texture coordinates of next channels");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "mapping_x", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mapping_x", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "projx");
RNA_def_property_enum_items(prop, prop_x_mapping_items);
RNA_def_property_ui_text(prop, "X Mapping", "");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "mapping_y", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mapping_y", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "projy");
RNA_def_property_enum_items(prop, prop_y_mapping_items);
RNA_def_property_ui_text(prop, "Y Mapping", "");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "mapping_z", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mapping_z", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "projz");
RNA_def_property_enum_items(prop, prop_z_mapping_items);
RNA_def_property_ui_text(prop, "Z Mapping", "");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "mapping", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mapping", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_mapping_items);
RNA_def_property_ui_text(prop, "Mapping", "");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "normal_map_space", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "normal_map_space", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "normapspace");
RNA_def_property_enum_items(prop, prop_normal_map_space_items);
RNA_def_property_ui_text(prop, "Normal Map Space", "Set space of normal map image");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "normal_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "normal_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "norfac");
RNA_def_property_ui_range(prop, -5, 5, 10, 3);
RNA_def_property_ui_text(prop, "Normal Factor", "Amount texture affects normal values");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "displacement_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "displacement_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dispfac");
RNA_def_property_ui_range(prop, -1, 1, 10, 3);
RNA_def_property_ui_text(prop, "Displacement Factor", "Amount texture displaces the surface");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "warp_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "warp_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "warpfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Warp Factor", "Amount texture affects texture coordinates of next channels");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "specular_color_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "specular_color_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "colspecfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Specular Color Factor", "Amount texture affects specular color");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "diffuse_color_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "diffuse_color_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "colfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Diffuse Color Factor", "Amount texture affects diffuse color");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "mirror_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "mirror_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "mirrfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Mirror Factor", "Amount texture affects mirror color");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "alpha_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "alpha_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "alphafac");
RNA_def_property_ui_range(prop, -1, 1, 10, 3);
RNA_def_property_ui_text(prop, "Alpha Factor", "Amount texture affects alpha");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "diffuse_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "diffuse_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "difffac");
RNA_def_property_ui_range(prop, -1, 1, 10, 3);
RNA_def_property_ui_text(prop, "Diffuse Factor", "Amount texture affects diffuse reflectivity");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "specular_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "specular_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "specfac");
RNA_def_property_ui_range(prop, -1, 1, 10, 3);
RNA_def_property_ui_text(prop, "Specular Factor", "Amount texture affects specular reflectivity");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "emit_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "emit_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "emitfac");
RNA_def_property_ui_range(prop, -1, 1, 10, 3);
RNA_def_property_ui_text(prop, "Emit Factor", "Amount texture affects emission");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "hardness_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "hardness_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "hardfac");
RNA_def_property_ui_range(prop, -1, 1, 10, 3);
RNA_def_property_ui_text(prop, "Hardness Factor", "Amount texture affects hardness");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "raymir_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "raymir_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "raymirrfac");
RNA_def_property_ui_range(prop, -1, 1, 10, 3);
RNA_def_property_ui_text(prop, "Ray Mirror Factor", "Amount texture affects ray mirror");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "translucency_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "translucency_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "translfac");
RNA_def_property_ui_range(prop, -1, 1, 10, 3);
RNA_def_property_ui_text(prop, "Translucency Factor", "Amount texture affects translucency");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "ambient_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "ambient_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ambfac");
RNA_def_property_ui_range(prop, -1, 1, 10, 3);
RNA_def_property_ui_text(prop, "Ambient Factor", "Amount texture affects ambient");
RNA_def_property_update(prop, 0, "rna_Material_update");
/* volume material */
- prop= RNA_def_property(srna, "use_map_color_emission", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_color_emission", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_EMISSION_COL);
RNA_def_property_ui_text(prop, "Emission Color", "The texture affects the color of emission");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_map_color_reflection", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_color_reflection", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_REFLECTION_COL);
RNA_def_property_ui_text(prop, "Reflection Color", "The texture affects the color of scattered light");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_map_color_transmission", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_color_transmission", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_TRANSMISSION_COL);
RNA_def_property_ui_text(prop, "Transmission Color",
"The texture affects the result color after other light has been scattered/absorbed");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
- prop= RNA_def_property(srna, "use_map_density", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_density", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_DENSITY);
RNA_def_property_ui_text(prop, "Density", "The texture affects the volume's density");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_map_emission", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_emission", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_EMISSION);
RNA_def_property_ui_text(prop, "Emission", "The texture affects the volume's emission");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_map_scatter", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_scatter", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_SCATTERING);
RNA_def_property_ui_text(prop, "Scattering", "The texture affects the volume's scattering");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_map_reflect", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_reflect", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_REFLECTION);
RNA_def_property_ui_text(prop, "Reflection", "The texture affects the reflected light's brightness");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
- prop= RNA_def_property(srna, "emission_color_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "emission_color_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "colemitfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Emission Color Factor", "Amount texture affects emission color");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "reflection_color_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "reflection_color_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "colreflfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Reflection Color Factor", "Amount texture affects color of out-scattered light");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "transmission_color_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "transmission_color_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "coltransfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Transmission Color Factor",
"Amount texture affects result color after light has been scattered/absorbed");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
- prop= RNA_def_property(srna, "density_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "density_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "densfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Density Factor", "Amount texture affects density");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "emission_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "emission_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "emitfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Emission Factor", "Amount texture affects emission");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "scattering_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "scattering_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "scatterfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Scattering Factor", "Amount texture affects scattering");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "reflection_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "reflection_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "reflfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Reflection Factor", "Amount texture affects brightness of out-scattered light");
@@ -729,18 +729,18 @@ static void rna_def_material_mtex(BlenderRNA *brna)
/* end volume material */
- prop= RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_MaterialTextureSlot_use_get", "rna_MaterialTextureSlot_use_set");
RNA_def_property_ui_text(prop, "Enabled", "Enable this material texture slot");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "bump_method", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "bump_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "texflag");
RNA_def_property_enum_items(prop, prop_bump_method_items);
RNA_def_property_ui_text(prop, "Bump Method", "Method to use for bump mapping");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "bump_objectspace", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "bump_objectspace", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "texflag");
RNA_def_property_enum_items(prop, prop_bump_space_items);
RNA_def_property_ui_text(prop, "Bump Space", "Space to apply bump mapping in");
@@ -767,37 +767,37 @@ static void rna_def_material_gamesettings(BlenderRNA *brna)
{GEMAT_SHADOW, "SHADOW", 0, "Shadow", "Faces are used for shadow"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "MaterialGameSettings", NULL);
+ srna = RNA_def_struct(brna, "MaterialGameSettings", NULL);
RNA_def_struct_sdna(srna, "GameSettings");
RNA_def_struct_nested(brna, srna, "Material");
RNA_def_struct_ui_text(srna, "Material Game Settings", "Game Engine settings for a Material datablock");
- prop= RNA_def_property(srna, "use_backface_culling", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_backface_culling", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GEMAT_BACKCULL); /* use bitflags */
RNA_def_property_ui_text(prop, "Backface Culling", "Hide Back of the face in Game Engine ");
RNA_def_property_update(prop, 0, "rna_Material_draw_update");
- prop= RNA_def_property(srna, "text", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "text", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GEMAT_TEXT); /* use bitflags */
RNA_def_property_ui_text(prop, "Text", "Use material as text in Game Engine ");
RNA_def_property_update(prop, 0, "rna_Material_draw_update");
- prop= RNA_def_property(srna, "invisible", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invisible", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GEMAT_INVISIBLE); /* use bitflags */
RNA_def_property_ui_text(prop, "Invisible", "Make face invisible");
RNA_def_property_update(prop, 0, "rna_Material_draw_update");
- prop= RNA_def_property(srna, "alpha_blend", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "alpha_blend", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "alpha_blend");
RNA_def_property_enum_items(prop, prop_alpha_blend_items);
RNA_def_property_ui_text(prop, "Blend Mode", "Blend Mode for Transparent Faces");
RNA_def_property_update(prop, 0, "rna_Material_draw_update");
- prop= RNA_def_property(srna, "face_orientation", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "face_orientation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_face_orientation_items);
RNA_def_property_ui_text(prop, "Face Orientations", "Especial face orientation options");
- prop= RNA_def_property(srna, "physics", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "physics", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GEMAT_NOPHYSICS); /* use bitflags */
RNA_def_property_ui_text(prop, "Physics", "Use physics properties of materials ");
}
@@ -813,91 +813,91 @@ static void rna_def_material_colors(StructRNA *srna)
{MA_RAMP_IN_RESULT, "RESULT", 0, "Result", ""},
{0, NULL, 0, NULL, NULL}};
- prop= RNA_def_property(srna, "diffuse_color", PROP_FLOAT, PROP_COLOR);
+ prop = RNA_def_property(srna, "diffuse_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, "Diffuse Color", "Diffuse color of the material");
RNA_def_property_update(prop, 0, "rna_Material_draw_update");
- prop= RNA_def_property(srna, "specular_color", PROP_FLOAT, PROP_COLOR);
+ prop = RNA_def_property(srna, "specular_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "specr");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Specular Color", "Specular color of the material");
RNA_def_property_update(prop, 0, "rna_Material_draw_update");
- prop= RNA_def_property(srna, "mirror_color", PROP_FLOAT, PROP_COLOR);
+ prop = RNA_def_property(srna, "mirror_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "mirr");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Mirror Color", "Mirror color of the material");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "alpha", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "alpha", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Alpha", "Alpha transparency of the material");
RNA_def_property_update(prop, 0, "rna_Material_draw_update");
- prop= RNA_def_property(srna, "specular_alpha", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "specular_alpha", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "spectra");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Specular Alpha", "Alpha transparency for specular areas");
RNA_def_property_update(prop, 0, "rna_Material_update");
/* Color bands */
- prop= RNA_def_property(srna, "use_diffuse_ramp", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_diffuse_ramp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_RAMP_COL);
RNA_def_property_boolean_funcs(prop, NULL, "rna_Material_use_diffuse_ramp_set");
RNA_def_property_ui_text(prop, "Use Diffuse Ramp", "Toggle diffuse ramp operations");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "diffuse_ramp", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "diffuse_ramp", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ramp_col");
RNA_def_property_struct_type(prop, "ColorRamp");
RNA_def_property_ui_text(prop, "Diffuse Ramp", "Color ramp used to affect diffuse shading");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_specular_ramp", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_specular_ramp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_RAMP_SPEC);
RNA_def_property_boolean_funcs(prop, NULL, "rna_Material_use_specular_ramp_set");
RNA_def_property_ui_text(prop, "Use Specular Ramp", "Toggle specular ramp operations");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "specular_ramp", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "specular_ramp", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ramp_spec");
RNA_def_property_struct_type(prop, "ColorRamp");
RNA_def_property_ui_text(prop, "Specular Ramp", "Color ramp used to affect specular shading");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "diffuse_ramp_blend", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "diffuse_ramp_blend", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "rampblend_col");
RNA_def_property_enum_items(prop, ramp_blend_items);
RNA_def_property_ui_text(prop, "Diffuse Ramp Blend", "Blending method of the ramp and the diffuse color");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "specular_ramp_blend", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "specular_ramp_blend", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "rampblend_spec");
RNA_def_property_enum_items(prop, ramp_blend_items);
RNA_def_property_ui_text(prop, "Specular Ramp Blend", "Blending method of the ramp and the specular color");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "diffuse_ramp_input", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "diffuse_ramp_input", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "rampin_col");
RNA_def_property_enum_items(prop, prop_ramp_input_items);
RNA_def_property_ui_text(prop, "Diffuse Ramp Input", "How the ramp maps on the surface");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "specular_ramp_input", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "specular_ramp_input", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "rampin_spec");
RNA_def_property_enum_items(prop, prop_ramp_input_items);
RNA_def_property_ui_text(prop, "Specular Ramp Input", "How the ramp maps on the surface");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "diffuse_ramp_factor", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "diffuse_ramp_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "rampfac_col");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Diffuse Ramp Factor", "Blending factor (also uses alpha in Colorband)");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "specular_ramp_factor", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "specular_ramp_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "rampfac_spec");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Specular Ramp Factor", "Blending factor (also uses alpha in Colorband)");
@@ -916,48 +916,48 @@ static void rna_def_material_diffuse(StructRNA *srna)
{MA_DIFF_FRESNEL, "FRESNEL", 0, "Fresnel", "Use a Fresnel shader"},
{0, NULL, 0, NULL, NULL}};
- prop= RNA_def_property(srna, "diffuse_shader", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "diffuse_shader", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "diff_shader");
RNA_def_property_enum_items(prop, prop_diff_shader_items);
RNA_def_property_ui_text(prop, "Diffuse Shader Model", "");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "diffuse_intensity", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "diffuse_intensity", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "ref");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Diffuse Intensity", "Amount of diffuse reflection");
RNA_def_property_update(prop, 0, "rna_Material_draw_update");
- prop= RNA_def_property(srna, "roughness", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "roughness", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 3.14f);
RNA_def_property_ui_text(prop, "Roughness", "Oren-Nayar Roughness");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "diffuse_toon_size", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "diffuse_toon_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "param[0]");
RNA_def_property_range(prop, 0.0f, 3.14f);
RNA_def_property_ui_text(prop, "Diffuse Toon Size", "Size of diffuse toon area");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "diffuse_toon_smooth", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "diffuse_toon_smooth", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "param[1]");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Diffuse Toon Smooth", "Smoothness of diffuse toon area");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "diffuse_fresnel", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "diffuse_fresnel", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "param[1]");
RNA_def_property_range(prop, 0.0f, 5.0f);
RNA_def_property_ui_text(prop, "Diffuse Fresnel", "Power of Fresnel");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "diffuse_fresnel_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "diffuse_fresnel_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "param[0]");
RNA_def_property_range(prop, 0.0f, 5.0f);
RNA_def_property_ui_text(prop, "Diffuse Fresnel Factor", "Blending factor of Fresnel");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "darkness", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "darkness", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 2.0f);
RNA_def_property_ui_text(prop, "Darkness", "Minnaert darkness");
RNA_def_property_update(prop, 0, "rna_Material_update");
@@ -973,55 +973,55 @@ static void rna_def_material_raymirror(BlenderRNA *brna)
{MA_RAYMIR_FADETOMAT, "FADE_TO_MATERIAL", 0, "Material", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "MaterialRaytraceMirror", NULL);
+ srna = RNA_def_struct(brna, "MaterialRaytraceMirror", NULL);
RNA_def_struct_sdna(srna, "Material");
RNA_def_struct_nested(brna, srna, "Material");
RNA_def_struct_ui_text(srna, "Material Raytrace Mirror", "Raytraced reflection settings for a Material datablock");
- prop= RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_RAYMIRROR); /* use bitflags */
RNA_def_property_ui_text(prop, "Enabled", "Enable raytraced reflections");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "reflect_factor", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "reflect_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "ray_mirror");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Reflectivity", "Amount of mirror reflection for raytrace");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "fresnel", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "fresnel", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fresnel_mir");
RNA_def_property_range(prop, 0.0f, 5.0f);
RNA_def_property_ui_text(prop, "Fresnel", "Power of Fresnel for mirror reflection");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "fresnel_factor", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "fresnel_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "fresnel_mir_i");
RNA_def_property_range(prop, 0.0f, 5.0f);
RNA_def_property_ui_text(prop, "Fresnel Factor", "Blending factor for Fresnel");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "gloss_factor", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "gloss_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "gloss_mir");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Gloss Amount",
"The shininess of the reflection (values < 1.0 give diffuse, blurry reflections)");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "gloss_anisotropic", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "gloss_anisotropic", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "aniso_gloss_mir");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Gloss Anisotropy",
"The shape of the reflection, from 0.0 (circular) to 1.0 (fully stretched along the tangent");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "gloss_samples", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "gloss_samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "samp_gloss_mir");
RNA_def_property_range(prop, 0, 1024);
RNA_def_property_ui_text(prop, "Gloss Samples", "Number of cone samples averaged for blurry reflections");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "gloss_threshold", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "gloss_threshold", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "adapt_thresh_mir");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Gloss Threshold",
@@ -1029,13 +1029,13 @@ static void rna_def_material_raymirror(BlenderRNA *brna)
"this amount [as a percentage], sampling is stopped)");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "depth", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "depth", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "ray_depth");
RNA_def_property_ui_range(prop, 0, 100, 1, 3);
RNA_def_property_ui_text(prop, "Depth", "Maximum allowed number of light inter-reflections");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "dist_mir");
RNA_def_property_range(prop, 0.0f, 10000.0f);
RNA_def_property_ui_text(prop, "Maximum Distance",
@@ -1043,7 +1043,7 @@ static void rna_def_material_raymirror(BlenderRNA *brna)
"range fade to sky color or material color)");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "fade_to", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "fade_to", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "fadeto_mir");
RNA_def_property_enum_items(prop, prop_fadeto_mir_items);
RNA_def_property_ui_text(prop, "Fade-out Color",
@@ -1057,43 +1057,43 @@ static void rna_def_material_raytra(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "MaterialRaytraceTransparency", NULL);
+ srna = RNA_def_struct(brna, "MaterialRaytraceTransparency", NULL);
RNA_def_struct_sdna(srna, "Material");
RNA_def_struct_nested(brna, srna, "Material");
RNA_def_struct_ui_text(srna, "Material Raytrace Transparency", "Raytraced refraction settings for a Material datablock");
- prop= RNA_def_property(srna, "ior", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "ior", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ang");
RNA_def_property_range(prop, 0.25f, 4.0f);
RNA_def_property_ui_text(prop, "IOR", "Angular index of refraction for raytraced refraction");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "fresnel", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "fresnel", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fresnel_tra");
RNA_def_property_range(prop, 0.0f, 5.0f);
RNA_def_property_ui_text(prop, "Fresnel", "Power of Fresnel for transparency (Ray or ZTransp)");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "fresnel_factor", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "fresnel_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "fresnel_tra_i");
RNA_def_property_range(prop, 1.0f, 5.0f);
RNA_def_property_ui_text(prop, "Fresnel Factor", "Blending factor for Fresnel");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "gloss_factor", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "gloss_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "gloss_tra");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Gloss Amount",
"The clarity of the refraction. Values < 1.0 give diffuse, blurry refractions");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "gloss_samples", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "gloss_samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "samp_gloss_tra");
RNA_def_property_range(prop, 0, 1024);
RNA_def_property_ui_text(prop, "Gloss Samples", "Number of cone samples averaged for blurry refractions");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "gloss_threshold", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "gloss_threshold", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "adapt_thresh_tra");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Gloss Threshold",
@@ -1101,13 +1101,13 @@ static void rna_def_material_raytra(BlenderRNA *brna)
"this amount (as a percentage), sampling is stopped");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "depth", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "depth", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "ray_depth_tra");
RNA_def_property_ui_range(prop, 0, 100, 1, 3);
RNA_def_property_ui_text(prop, "Depth", "Maximum allowed number of light inter-refractions");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "filter", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "filter", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "filter");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Filter",
@@ -1115,7 +1115,7 @@ static void rna_def_material_raytra(BlenderRNA *brna)
"transparency (simulating absorption)");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "depth_max", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "depth_max", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "tx_limit");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Limit",
@@ -1123,7 +1123,7 @@ static void rna_def_material_raytra(BlenderRNA *brna)
"before becoming fully filtered (0.0 is disabled)");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "tx_falloff");
RNA_def_property_range(prop, 0.1f, 10.0f);
RNA_def_property_ui_text(prop, "Falloff", "Falloff power for transmissivity filter effect (1.0 is linear)");
@@ -1146,72 +1146,72 @@ static void rna_def_material_volume(BlenderRNA *brna)
static EnumPropertyItem prop_stepsize_items[] = {
{MA_VOL_STEP_RANDOMIZED, "RANDOMIZED", 0, "Randomized", ""},
{MA_VOL_STEP_CONSTANT, "CONSTANT", 0, "Constant", ""},
- //{MA_VOL_STEP_ADAPTIVE, "ADAPTIVE", 0, "Adaptive", ""},
+ /*{MA_VOL_STEP_ADAPTIVE, "ADAPTIVE", 0, "Adaptive", ""}, */
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "MaterialVolume", NULL);
+ srna = RNA_def_struct(brna, "MaterialVolume", NULL);
RNA_def_struct_sdna(srna, "VolumeSettings");
RNA_def_struct_nested(brna, srna, "Material");
RNA_def_struct_ui_text(srna, "Material Volume", "Volume rendering settings for a Material datablock");
- prop= RNA_def_property(srna, "step_method", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "step_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "stepsize_type");
RNA_def_property_enum_items(prop, prop_stepsize_items);
RNA_def_property_ui_text(prop, "Step Calculation", "Method of calculating the steps through the volume");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "step_size", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "step_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "stepsize");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_range(prop, 0.001f, 1.0f, 1, 3);
RNA_def_property_ui_text(prop, "Step Size", "Distance between subsequent volume depth samples");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "light_method", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "light_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "shade_type");
RNA_def_property_enum_items(prop, prop_lighting_items);
RNA_def_property_ui_text(prop, "Lighting Mode", "Method of shading, attenuating, and scattering light through the volume");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_external_shadows", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_external_shadows", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shadeflag", MA_VOL_RECV_EXT_SHADOW); /* use bitflags */
RNA_def_property_ui_text(prop, "External Shadows", "Receive shadows from sources outside the volume (temporary)");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_light_cache", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_light_cache", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shadeflag", MA_VOL_PRECACHESHADING); /* use bitflags */
RNA_def_property_ui_text(prop, "Light Cache",
"Pre-calculate the shading information into a voxel grid, "
"speeds up shading at slightly less accuracy");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "cache_resolution", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "cache_resolution", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "precache_resolution");
RNA_def_property_range(prop, 1, 1024);
RNA_def_property_ui_text(prop, "Resolution",
"Resolution of the voxel grid, low resolutions are faster, high resolutions use more memory");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "ms_diffusion", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "ms_diffusion", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ms_diff");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_text(prop, "Diffusion", "Diffusion factor, the strength of the blurring effect");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "ms_spread", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "ms_spread", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ms_spread");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 1, 3);
RNA_def_property_ui_text(prop, "Spread", "Proportional distance over which the light is diffused");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "ms_intensity", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "ms_intensity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ms_intensity");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_text(prop, "Intensity", "Multiplier for multiple scattered light energy");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "depth_threshold", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "depth_threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "depth_cutoff");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Depth Cutoff",
@@ -1219,20 +1219,20 @@ static void rna_def_material_volume(BlenderRNA *brna)
"higher values give speedups in dense volumes at the expense of accuracy");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "density", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "density", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "density");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Density", "The base density of the volume");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "density_scale", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "density_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "density_scale");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
RNA_def_property_ui_text(prop, "Density Scale", "Multiplier for the material's density");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "scattering", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "scattering", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "scattering");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1 ,3);
@@ -1241,21 +1241,21 @@ static void rna_def_material_volume(BlenderRNA *brna)
"the more out-scattering, the shallower the light will penetrate");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "transmission_color", PROP_FLOAT, PROP_COLOR);
+ prop = RNA_def_property(srna, "transmission_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "transmission_col");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Transmission Color",
"Result color of the volume, after other light has been scattered/absorbed");
RNA_def_property_update(prop, 0, "rna_Material_draw_update");
- prop= RNA_def_property(srna, "reflection_color", PROP_FLOAT, PROP_COLOR);
+ prop = RNA_def_property(srna, "reflection_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "reflection_col");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Reflection Color",
"Color of light scattered out of the volume (does not affect transmission)");
RNA_def_property_update(prop, 0, "rna_Material_draw_update");
- prop= RNA_def_property(srna, "reflection", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "reflection", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "reflection");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0f, 100.0f, 1 ,3);
@@ -1263,20 +1263,20 @@ static void rna_def_material_volume(BlenderRNA *brna)
"Multiplier to make out-scattered light brighter or darker (non-physically correct)");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "emission_color", PROP_FLOAT, PROP_COLOR);
+ prop = RNA_def_property(srna, "emission_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "emission_col");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Emission Color", "Color of emitted light");
RNA_def_property_update(prop, 0, "rna_Material_draw_update");
- prop= RNA_def_property(srna, "emission", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "emission", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "emission");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
RNA_def_property_ui_text(prop, "Emission", "Amount of light that gets emitted by the volume");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "asymmetry", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "asymmetry", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "asymmetry");
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Asymmetry", "Back scattering (-1.0) to Forward scattering (1.0) and the range in between");
@@ -1289,124 +1289,124 @@ static void rna_def_material_halo(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "MaterialHalo", NULL);
+ srna = RNA_def_struct(brna, "MaterialHalo", NULL);
RNA_def_struct_sdna(srna, "Material");
RNA_def_struct_nested(brna, srna, "Material");
RNA_def_struct_ui_text(srna, "Material Halo", "Halo particle effect settings for a Material datablock");
- prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "hasize");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Size", "Dimension of the halo");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "hardness", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "hardness", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "har");
RNA_def_property_range(prop, 0, 127);
RNA_def_property_ui_text(prop, "Hardness", "Hardness of the halo");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "add", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "add", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "add");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Add", "Strength of the add effect");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "ring_count", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "ring_count", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ringc");
RNA_def_property_range(prop, 0, 24);
RNA_def_property_ui_text(prop, "Rings", "Number of rings rendered over the halo");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "line_count", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "line_count", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "linec");
RNA_def_property_range(prop, 0, 250);
RNA_def_property_ui_text(prop, "Line Number", "Number of star shaped lines rendered over the halo");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "star_tip_count", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "star_tip_count", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "starc");
RNA_def_property_range(prop, 3, 50);
RNA_def_property_ui_text(prop, "Star Tips", "Number of points on the star shaped halo");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "seed", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "seed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "seed1");
RNA_def_property_range(prop, 0, 255);
RNA_def_property_ui_text(prop, "Seed", "Randomize ring dimension and line location");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_flare_mode", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_flare_mode", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_FLARE); /* use bitflags */
RNA_def_property_ui_text(prop, "Flare", "Render halo as a lens flare");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "flare_size", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "flare_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "flaresize");
RNA_def_property_range(prop, 0.1f, 25.0f);
RNA_def_property_ui_text(prop, "Flare Size", "Factor by which the flare is larger than the halo");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "flare_subflare_size", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "flare_subflare_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "subsize");
RNA_def_property_range(prop, 0.1f, 25.0f);
RNA_def_property_ui_text(prop, "Flare Subsize", "Dimension of the sub-flares, dots and circles");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "flare_boost", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "flare_boost", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "flareboost");
RNA_def_property_range(prop, 0.1f, 10.0f);
RNA_def_property_ui_text(prop, "Flare Boost", "Give the flare extra strength");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "flare_seed", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "flare_seed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "seed2");
RNA_def_property_range(prop, 0, 255);
RNA_def_property_ui_text(prop, "Flare Seed", "Offset in the flare seed table");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "flare_subflare_count", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "flare_subflare_count", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "flarec");
RNA_def_property_range(prop, 1, 32);
RNA_def_property_ui_text(prop, "Flares Sub", "Number of sub-flares");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_ring", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_ring", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_RINGS);
RNA_def_property_ui_text(prop, "Rings", "Render rings over halo");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_lines", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_lines", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_LINES);
RNA_def_property_ui_text(prop, "Lines", "Render star shaped lines over halo");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_star", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_star", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_STAR);
RNA_def_property_ui_text(prop, "Star", "Render halo as a star");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_texture", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_texture", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALOTEX);
RNA_def_property_ui_text(prop, "Texture", "Give halo a texture");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_vertex_normal", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_vertex_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALOPUNO);
RNA_def_property_ui_text(prop, "Vertex Normal", "Use the vertex normal to specify the dimension of the halo");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_extreme_alpha", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_extreme_alpha", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_XALPHA);
RNA_def_property_ui_text(prop, "Extreme Alpha", "Use extreme alpha");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_shaded", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_shaded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_SHADE);
RNA_def_property_ui_text(prop, "Shaded", "Let halo receive light and shadows from external objects");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_soft", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_soft", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_SOFT);
RNA_def_property_ui_text(prop, "Soft", "Soften the edges of halos at intersections with other geometry");
RNA_def_property_update(prop, 0, "rna_Material_update");
@@ -1417,67 +1417,67 @@ static void rna_def_material_sss(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "MaterialSubsurfaceScattering", NULL);
+ srna = RNA_def_struct(brna, "MaterialSubsurfaceScattering", NULL);
RNA_def_struct_sdna(srna, "Material");
RNA_def_struct_nested(brna, srna, "Material");
RNA_def_struct_ui_text(srna, "Material Subsurface Scattering",
"Diffuse subsurface scattering settings for a Material datablock");
- prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_COLOR|PROP_UNIT_LENGTH);
+ prop = RNA_def_property(srna, "radius", PROP_FLOAT, PROP_COLOR|PROP_UNIT_LENGTH);
RNA_def_property_float_sdna(prop, NULL, "sss_radius");
RNA_def_property_range(prop, 0.001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.001, 10000, 1, 3);
RNA_def_property_ui_text(prop, "Radius", "Mean red/green/blue scattering path length");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
+ prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "sss_col");
RNA_def_property_ui_text(prop, "Color", "Scattering color");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "error_threshold", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "error_threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sss_error");
RNA_def_property_ui_range(prop, 0.0001, 10, 1, 3);
RNA_def_property_ui_text(prop, "Error Tolerance", "Error tolerance (low values are slower and higher quality)");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sss_scale");
RNA_def_property_ui_range(prop, 0.001, 1000, 1, 3);
RNA_def_property_ui_text(prop, "Scale", "Object scale factor");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "ior", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "ior", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sss_ior");
RNA_def_property_ui_range(prop, 0.1, 2, 1, 3);
RNA_def_property_ui_text(prop, "IOR", "Index of refraction (higher values are denser)");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "color_factor", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "color_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "sss_colfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Color Factor", "Blend factor for SSS colors");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "texture_factor", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "texture_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "sss_texfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Texture Factor", "Texture scattering blend factor");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "front", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "front", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sss_front");
RNA_def_property_range(prop, 0, 2);
RNA_def_property_ui_text(prop, "Front", "Front scattering weight");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "back", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "back", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sss_back");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Back", "Back scattering weight");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "sss_flag", MA_DIFF_SSS);
RNA_def_property_ui_text(prop, "Enabled", "Enable diffuse subsurface scatting effects in a material");
RNA_def_property_update(prop, 0, "rna_Material_update");
@@ -1495,13 +1495,13 @@ static void rna_def_material_specularity(StructRNA *srna)
{MA_SPEC_WARDISO, "WARDISO", 0, "WardIso", "Use a Ward anisotropic shader"},
{0, NULL, 0, NULL, NULL}};
- prop= RNA_def_property(srna, "specular_shader", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "specular_shader", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "spec_shader");
RNA_def_property_enum_items(prop, prop_specular_shader_items);
RNA_def_property_ui_text(prop, "Specular Shader Model", "");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "specular_intensity", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "specular_intensity", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "spec");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Specular Intensity", "How intense (bright) the specular reflection is");
@@ -1512,31 +1512,31 @@ static void rna_def_material_specularity(StructRNA *srna)
* multiple times, which may give somewhat strange changes in the outliner,
* but in the UI they are never visible at the same time. */
- prop= RNA_def_property(srna, "specular_hardness", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "specular_hardness", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "har");
RNA_def_property_range(prop, 1, 511);
RNA_def_property_ui_text(prop, "Specular Hardness", "How hard (sharp) the specular reflection is");
RNA_def_property_update(prop, 0, "rna_Material_draw_update");
- prop= RNA_def_property(srna, "specular_ior", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "specular_ior", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "refrac");
RNA_def_property_range(prop, 1, 10);
RNA_def_property_ui_text(prop, "Specular IOR", "Specular index of refraction");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "specular_toon_size", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "specular_toon_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "param[2]");
RNA_def_property_range(prop, 0.0f, 1.53f);
RNA_def_property_ui_text(prop, "Specular Toon Size", "Size of specular toon area");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "specular_toon_smooth", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "specular_toon_smooth", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "param[3]");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Specular Toon Smooth", "Smoothness of specular toon area");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "specular_slope", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "specular_slope", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "rms");
RNA_def_property_range(prop, 0, 0.4);
RNA_def_property_ui_text(prop, "Specular Slope", "The standard deviation of surface slope");
@@ -1548,67 +1548,67 @@ static void rna_def_material_strand(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "MaterialStrand", NULL);
+ srna = RNA_def_struct(brna, "MaterialStrand", NULL);
RNA_def_struct_sdna(srna, "Material");
RNA_def_struct_nested(brna, srna, "Material");
RNA_def_struct_ui_text(srna, "Material Strand", "Strand settings for a Material datablock");
- prop= RNA_def_property(srna, "use_tangent_shading", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_tangent_shading", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_TANGENT_STR);
RNA_def_property_ui_text(prop, "Tangent Shading", "Use direction of strands as normal for tangent-shading");
RNA_def_property_update(prop, 0, "rna_Material_update");
/* this flag is only set when rendering, not to be edited manually */
- prop= RNA_def_property(srna, "use_surface_diffuse", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_surface_diffuse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_STR_SURFDIFF);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Surface Diffuse", "Make diffuse shading more similar to shading the surface");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "blend_distance", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "blend_distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "strand_surfnor");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Blend Distance", "Worldspace distance over which to blend in the surface normal");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_blender_units", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_blender_units", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_STR_B_UNITS);
RNA_def_property_ui_text(prop, "Blender Units", "Use Blender units for widths instead of pixels");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "root_size", PROP_FLOAT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "root_size", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "strand_sta");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_MaterialStrand_start_size_range");
RNA_def_property_ui_range(prop, 0, 10.0f, 10, 5);
RNA_def_property_ui_text(prop, "Root Size", "Start size of strands in pixels or Blender units");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "tip_size", PROP_FLOAT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "tip_size", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "strand_end");
RNA_def_property_ui_range(prop, 0, 10.0f, 10, 5);
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_MaterialStrand_end_size_range");
RNA_def_property_ui_text(prop, "Tip Size", "End size of strands in pixels or Blender units");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "size_min", PROP_FLOAT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "size_min", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "strand_min");
RNA_def_property_range(prop, 0.001, 10);
RNA_def_property_ui_text(prop, "Minimum Size", "Minimum size of strands in pixels");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "shape", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "shape", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "strand_ease");
RNA_def_property_range(prop, -0.9, 0.9);
RNA_def_property_ui_text(prop, "Shape", "Positive values make strands rounder, negative ones make strands spiky");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "width_fade", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "width_fade", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "strand_widthfade");
RNA_def_property_range(prop, 0, 2);
RNA_def_property_ui_text(prop, "Width Fade", "Transparency along the width of the strand");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "strand_uvname");
RNA_def_property_ui_text(prop, "UV Map", "Name of UV map to override");
RNA_def_property_update(prop, 0, "rna_Material_update");
@@ -1619,39 +1619,39 @@ static void rna_def_material_physics(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "MaterialPhysics", NULL);
+ srna = RNA_def_struct(brna, "MaterialPhysics", NULL);
RNA_def_struct_sdna(srna, "Material");
RNA_def_struct_nested(brna, srna, "Material");
RNA_def_struct_ui_text(srna, "Material Physics", "Physics settings for a Material datablock");
- prop= RNA_def_property(srna, "friction", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "friction", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "friction");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Friction", "Coulomb friction coefficient, when inside the physics distance area");
- prop= RNA_def_property(srna, "elasticity", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "elasticity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "reflect");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Elasticity", "Elasticity of collisions");
/* FH/Force Field Settings */
- prop= RNA_def_property(srna, "use_fh_normal", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_fh_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dynamode", MA_FH_NOR);
RNA_def_property_ui_text(prop, "Align to Normal",
"Align dynamic game objects along the surface normal, when inside the physics distance area");
- prop= RNA_def_property(srna, "fh_force", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "fh_force", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fh");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 2);
RNA_def_property_ui_text(prop, "Force", "Upward spring force, when inside the physics distance area");
- prop= RNA_def_property(srna, "fh_distance", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "fh_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fhdist");
RNA_def_property_range(prop, 0, 20);
RNA_def_property_ui_text(prop, "Distance", "Distance of the physics area");
- prop= RNA_def_property(srna, "fh_damping", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "fh_damping", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xyfrict");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Damping", "Damping of the spring force, when inside the physics distance area");
@@ -1691,213 +1691,213 @@ void RNA_def_material(BlenderRNA *brna)
"Improved shadow only method which also renders lightless areas as shadows"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "Material", "ID");
+ srna = RNA_def_struct(brna, "Material", "ID");
RNA_def_struct_ui_text(srna, "Material",
"Material datablock to define the appearance of geometric objects for rendering");
RNA_def_struct_ui_icon(srna, ICON_MATERIAL_DATA);
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "material_type");
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Type", "Material type defining how the object is rendered");
RNA_def_property_enum_funcs(prop, NULL, "rna_Material_type_set", NULL);
RNA_def_property_update(prop, 0, "rna_Material_draw_update");
- prop= RNA_def_property(srna, "use_transparency", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_transparency", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_TRANSP);
RNA_def_property_ui_text(prop, "Transparency", "Render material as transparent");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "transparency_method", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "transparency_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, transparency_items);
RNA_def_property_ui_text(prop, "Transparency Method", "Method to use for rendering transparency");
RNA_def_property_update(prop, 0, "rna_Material_update");
/* For Preview Render */
- prop= RNA_def_property(srna, "preview_render_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "preview_render_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "pr_type");
RNA_def_property_enum_items(prop, preview_type_items);
RNA_def_property_ui_text(prop, "Preview render type", "Type of preview render");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "ambient", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "ambient", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "amb");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Ambient", "Amount of global ambient color the material receives");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "emit", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "emit", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 2.0f, 1, 2);
RNA_def_property_ui_text(prop, "Emit", "Amount of light to emit");
RNA_def_property_update(prop, 0, "rna_Material_draw_update");
- prop= RNA_def_property(srna, "translucency", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "translucency", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Translucency", "Amount of diffuse shading on the back side");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_cubic", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_cubic", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shade_flag", MA_CUBIC);
RNA_def_property_ui_text(prop, "Cubic Interpolation",
"Use cubic interpolation for diffuse values, for smoother transitions");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_object_color", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_object_color", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shade_flag", MA_OBCOLOR);
RNA_def_property_ui_text(prop, "Object Color", "Modulate the result with a per-object color");
RNA_def_property_update(prop, 0, "rna_Material_draw_update");
- prop= RNA_def_property(srna, "shadow_ray_bias", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "shadow_ray_bias", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sbias");
RNA_def_property_range(prop, 0, 0.25);
RNA_def_property_ui_text(prop, "Shadow Ray Bias",
"Shadow raytracing bias to prevent terminator problems on shadow boundary");
- prop= RNA_def_property(srna, "shadow_buffer_bias", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "shadow_buffer_bias", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "lbias");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Shadow Buffer Bias", "Factor to multiply shadow buffer bias with (0 is ignore)");
- prop= RNA_def_property(srna, "shadow_cast_alpha", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "shadow_cast_alpha", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "shad_alpha");
RNA_def_property_range(prop, 0.001, 1);
RNA_def_property_ui_text(prop, "Shadow Casting Alpha",
"Shadow casting alpha, in use for Irregular and Deep shadow buffer");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "light_group", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "light_group", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "group");
RNA_def_property_struct_type(prop, "Group");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Light Group", "Limit lighting to lamps in this Group");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "pass_index", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "pass_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "index");
RNA_def_property_ui_text(prop, "Pass Index", "Index number for the IndexMA render pass");
RNA_def_property_update(prop, NC_OBJECT, NULL);
/* flags */
- prop= RNA_def_property(srna, "use_light_group_exclusive", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_light_group_exclusive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_GROUP_NOLAY);
RNA_def_property_ui_text(prop, "Light Group Exclusive",
"Material uses the light group exclusively - these lamps are excluded from other scene lighting");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_raytrace", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_raytrace", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_TRACEBLE);
RNA_def_property_ui_text(prop, "Traceable",
"Include this material and geometry that uses it in raytracing calculations");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_shadows", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_shadows", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_SHADOW);
RNA_def_property_ui_text(prop, "Shadows", "Allow this material to receive shadows");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_shadeless", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_shadeless", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_SHLESS);
RNA_def_property_ui_text(prop, "Shadeless", "Make this material insensitive to light or shadow");
RNA_def_property_update(prop, 0, "rna_Material_draw_update");
- prop= RNA_def_property(srna, "use_vertex_color_light", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_vertex_color_light", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_VERTEXCOL);
RNA_def_property_ui_text(prop, "Vertex Color Light", "Add vertex colors as additional lighting");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_vertex_color_paint", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_vertex_color_paint", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_VERTEXCOLP);
RNA_def_property_ui_text(prop, "Vertex Color Paint",
"Replace object base color with vertex colors (multiply with "
"'texture face' face assigned textures)");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "invert_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_ZINV);
RNA_def_property_ui_text(prop, "Invert Z Depth", "Render material's faces with an inverted Z buffer (scanline only)");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "offset_z", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "offset_z", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "zoffs");
RNA_def_property_ui_text(prop, "Z Offset", "Give faces an artificial offset in the Z buffer for Z transparency");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_sky", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_sky", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_ENV);
RNA_def_property_ui_text(prop, "Sky",
"Render this material with zero alpha, with sky background in place (scanline only)");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_only_shadow", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_only_shadow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_ONLYSHADOW);
RNA_def_property_ui_text(prop, "Only Shadow",
"Render shadows as the material's alpha value, making the material "
"transparent except for shadowed areas");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "shadow_only_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "shadow_only_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "shadowonly_flag");
RNA_def_property_enum_items(prop, prop_shadows_only_items);
RNA_def_property_ui_text(prop, "Shadow Type", "How to draw shadows");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_face_texture", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_face_texture", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_FACETEXTURE);
RNA_def_property_ui_text(prop, "Face Textures",
"Replace the object's base color with color from UV map image textures");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_face_texture_alpha", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_face_texture_alpha", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_FACETEXTURE_ALPHA);
RNA_def_property_ui_text(prop, "Face Textures Alpha",
"Replace the object's base alpha value with alpha from UV map image textures");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_cast_shadows_only", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_cast_shadows_only", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_ONLYCAST);
RNA_def_property_ui_text(prop, "Cast Shadows Only",
"Make objects with this material appear invisible (not rendered), only casting shadows");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_mist", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_mist", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", MA_NOMIST);
RNA_def_property_ui_text(prop, "Use Mist", "Use mist with this material (in world settings)");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_transparent_shadows", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_transparent_shadows", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_SHADOW_TRA);
RNA_def_property_ui_text(prop, "Receive Transparent Shadows",
"Allow this object to receive transparent shadows cast through other objects");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_ray_shadow_bias", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_ray_shadow_bias", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_RAYBIAS);
RNA_def_property_ui_text(prop, "Ray Shadow Bias",
"Prevent raytraced shadow errors on surfaces with smooth shaded normals (terminator problem)");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_full_oversampling", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_full_oversampling", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_FULL_OSA);
RNA_def_property_ui_text(prop, "Full Oversampling",
"Force this material to render full shading/textures for all anti-aliasing samples");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_cast_buffer_shadows", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_cast_buffer_shadows", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_SHADBUF);
RNA_def_property_ui_text(prop, "Cast Buffer Shadows",
"Allow this material to cast shadows from shadow buffer lamps");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_cast_approximate", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_cast_approximate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shade_flag", MA_APPROX_OCCLUSION);
RNA_def_property_ui_text(prop, "Cast Approximate",
"Allow this material to cast shadows when using approximate ambient occlusion");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop= RNA_def_property(srna, "use_tangent_shading", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_tangent_shading", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_TANGENT_V);
RNA_def_property_ui_text(prop, "Tangent Shading",
"Use the material's tangent vector instead of the normal for shading "
@@ -1905,67 +1905,67 @@ void RNA_def_material(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Material_update");
/* nested structs */
- prop= RNA_def_property(srna, "raytrace_mirror", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "raytrace_mirror", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "MaterialRaytraceMirror");
RNA_def_property_pointer_funcs(prop, "rna_Material_mirror_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Raytrace Mirror", "Raytraced reflection settings for the material");
- prop= RNA_def_property(srna, "raytrace_transparency", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "raytrace_transparency", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "MaterialRaytraceTransparency");
RNA_def_property_pointer_funcs(prop, "rna_Material_transp_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Raytrace Transparency", "Raytraced transparency settings for the material");
- prop= RNA_def_property(srna, "volume", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "volume", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "vol");
RNA_def_property_struct_type(prop, "MaterialVolume");
RNA_def_property_ui_text(prop, "Volume", "Volume settings for the material");
- prop= RNA_def_property(srna, "halo", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "halo", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "MaterialHalo");
RNA_def_property_pointer_funcs(prop, "rna_Material_halo_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Halo", "Halo settings for the material");
- prop= RNA_def_property(srna, "subsurface_scattering", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "subsurface_scattering", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "MaterialSubsurfaceScattering");
RNA_def_property_pointer_funcs(prop, "rna_Material_sss_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Subsurface Scattering", "Subsurface scattering settings for the material");
- prop= RNA_def_property(srna, "strand", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "strand", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "MaterialStrand");
RNA_def_property_pointer_funcs(prop, "rna_Material_strand_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Strand", "Strand settings for the material");
- prop= RNA_def_property(srna, "physics", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "physics", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "MaterialPhysics");
RNA_def_property_pointer_funcs(prop, "rna_Material_physics_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Physics", "Game physics settings");
/* game settings */
- prop= RNA_def_property(srna, "game_settings", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "game_settings", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "game");
RNA_def_property_struct_type(prop, "MaterialGameSettings");
RNA_def_property_ui_text(prop, "Game Settings", "Game material settings");
/* nodetree */
- prop= RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
RNA_def_property_ui_text(prop, "Node Tree", "Node tree for node based materials");
- prop= RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "use_nodes", 1);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Use Nodes", "Use shader nodes to render the material");
RNA_def_property_update(prop, 0, "rna_Material_use_nodes_update");
- prop= RNA_def_property(srna, "active_node_material", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active_node_material", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, "rna_Material_active_node_material_get",
@@ -1980,7 +1980,7 @@ void RNA_def_material(BlenderRNA *brna)
"MaterialTextureSlot", "MaterialTextureSlots", "rna_Material_update");
/* only material has this one */
- prop= RNA_def_property(srna, "use_textures", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_textures", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "septex", 1);
RNA_def_property_array(prop, 18);
RNA_def_property_ui_text(prop, "Use Textures", "Enable/Disable each texture");
@@ -2013,26 +2013,26 @@ static void rna_def_texture_slots(BlenderRNA *brna, PropertyRNA *cprop, const ch
PropertyRNA *parm;
RNA_def_property_srna(cprop, structname_slots);
- srna= RNA_def_struct(brna, structname_slots, NULL);
+ srna = RNA_def_struct(brna, structname_slots, NULL);
RNA_def_struct_sdna(srna, "ID");
RNA_def_struct_ui_text(srna, "Texture Slots", "Collection of texture slots");
/* functions */
- func= RNA_def_function(srna, "add", "rna_mtex_texture_slots_add");
+ func = RNA_def_function(srna, "add", "rna_mtex_texture_slots_add");
RNA_def_function_flag(func, FUNC_USE_SELF_ID|FUNC_NO_SELF|FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "mtex", structname, "", "The newly initialized mtex");
+ parm = RNA_def_pointer(func, "mtex", structname, "", "The newly initialized mtex");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "create", "rna_mtex_texture_slots_create");
+ func = RNA_def_function(srna, "create", "rna_mtex_texture_slots_create");
RNA_def_function_flag(func, FUNC_USE_SELF_ID|FUNC_NO_SELF|FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
- parm= RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "Slot index to initialize", 0, INT_MAX);
+ parm = RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "Slot index to initialize", 0, INT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "mtex", structname, "", "The newly initialized mtex");
+ parm = RNA_def_pointer(func, "mtex", structname, "", "The newly initialized mtex");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "clear", "rna_mtex_texture_slots_clear");
+ func = RNA_def_function(srna, "clear", "rna_mtex_texture_slots_clear");
RNA_def_function_flag(func, FUNC_USE_SELF_ID|FUNC_NO_SELF|FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
- parm= RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "Slot index to clear", 0, INT_MAX);
+ parm = RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "Slot index to clear", 0, INT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
}
@@ -2043,22 +2043,22 @@ void rna_def_mtex_common(BlenderRNA *brna, StructRNA *srna, const char *begin,
PropertyRNA *prop;
/* mtex */
- prop= RNA_def_property(srna, "texture_slots", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "texture_slots", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, structname);
RNA_def_property_collection_funcs(prop, begin, "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_dereference_get", NULL, NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Textures", "Texture slots defining the mapping and influence of textures");
rna_def_texture_slots(brna, prop, structname, structname_slots);
- prop= RNA_def_property(srna, "active_texture", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active_texture", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Texture");
RNA_def_property_flag(prop, PROP_EDITABLE);
- if(activeeditable)
+ if (activeeditable)
RNA_def_property_editable_func(prop, activeeditable);
RNA_def_property_pointer_funcs(prop, activeget, activeset, NULL, NULL);
RNA_def_property_ui_text(prop, "Active Texture", "Active texture slot being displayed");
RNA_def_property_update(prop, 0, update);
- prop= RNA_def_property(srna, "active_texture_index", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "active_texture_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "texact");
RNA_def_property_range(prop, 0, MAX_MTEX-1);
RNA_def_property_ui_text(prop, "Active Texture Index", "Index of active texture slot");
diff --git a/source/blender/makesrna/intern/rna_material_api.c b/source/blender/makesrna/intern/rna_material_api.c
index f563f53744b..473f2c03158 100644
--- a/source/blender/makesrna/intern/rna_material_api.c
+++ b/source/blender/makesrna/intern/rna_material_api.c
@@ -44,8 +44,8 @@
void RNA_api_material(StructRNA *srna)
{
- // FunctionRNA *func;
- // PropertyRNA *parm;
+ /* FunctionRNA *func; */
+ /* PropertyRNA *parm; */
}
#endif
diff --git a/source/blender/makesrna/intern/rna_mesh_api.c b/source/blender/makesrna/intern/rna_mesh_api.c
index 988eaccadb2..b58f568309a 100644
--- a/source/blender/makesrna/intern/rna_mesh_api.c
+++ b/source/blender/makesrna/intern/rna_mesh_api.c
@@ -57,31 +57,31 @@ void RNA_api_mesh(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
- func= RNA_def_function(srna, "transform", "ED_mesh_transform");
+ func = RNA_def_function(srna, "transform", "ED_mesh_transform");
RNA_def_function_ui_description(func, "Transform mesh vertices by a matrix");
- parm= RNA_def_float_matrix(func, "matrix", 4, 4, NULL, 0.0f, 0.0f, "", "Matrix", 0.0f, 0.0f);
+ parm = RNA_def_float_matrix(func, "matrix", 4, 4, NULL, 0.0f, 0.0f, "", "Matrix", 0.0f, 0.0f);
RNA_def_property_flag(parm, PROP_REQUIRED);
- func= RNA_def_function(srna, "calc_normals", "ED_mesh_calc_normals");
+ func = RNA_def_function(srna, "calc_normals", "ED_mesh_calc_normals");
RNA_def_function_ui_description(func, "Calculate vertex normals");
- func= RNA_def_function(srna, "update", "ED_mesh_update");
+ func = RNA_def_function(srna, "update", "ED_mesh_update");
RNA_def_boolean(func, "calc_edges", 0, "Calculate Edges", "Force recalculation of edges");
RNA_def_boolean(func, "calc_tessface", 0, "Calculate Tessellation", "Force recalculation of tessellation faces");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
- func= RNA_def_function(srna, "unit_test_compare", "rna_Mesh_unit_test_compare");
- parm= RNA_def_pointer(func, "mesh", "Mesh", "", "Mesh to compare to");
+ func = RNA_def_function(srna, "unit_test_compare", "rna_Mesh_unit_test_compare");
+ parm = RNA_def_pointer(func, "mesh", "Mesh", "", "Mesh to compare to");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
/* return value */
- parm= RNA_def_string(func, "result", "nothing", 64, "Return value", "String description of result of comparison");
+ parm = RNA_def_string(func, "result", "nothing", 64, "Return value", "String description of result of comparison");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "validate", "BKE_mesh_validate");
+ func = RNA_def_function(srna, "validate", "BKE_mesh_validate");
RNA_def_function_ui_description(func, "validate geometry, return True when the mesh has had "
"invalid geometry corrected/removed");
RNA_def_boolean(func, "verbose", 0, "Verbose", "Output information about the errors found");
- parm= RNA_def_boolean(func, "result", 0, "Result", "");
+ parm = RNA_def_boolean(func, "result", 0, "Result", "");
RNA_def_function_return(func, parm);
}
diff --git a/source/blender/makesrna/intern/rna_mesh_utils.h b/source/blender/makesrna/intern/rna_mesh_utils.h
index b946089b8d2..2bcda2e07f5 100644
--- a/source/blender/makesrna/intern/rna_mesh_utils.h
+++ b/source/blender/makesrna/intern/rna_mesh_utils.h
@@ -39,7 +39,7 @@
\
static int rna_##collection_name##_check(CollectionPropertyIterator *iter, void *data) \
{ \
- CustomDataLayer *layer= (CustomDataLayer*)data; \
+ CustomDataLayer *layer = (CustomDataLayer*)data; \
return (layer->type != layer_type); \
} \
\
@@ -57,11 +57,11 @@
\
static void rna_Mesh_##collection_name##_index_range(PointerRNA *ptr, int *min, int *max) \
{ \
- CustomData *data= rna_mesh_##customdata_type(ptr); \
+ CustomData *data = rna_mesh_##customdata_type(ptr); \
\
- *min= 0; \
- *max= data ? CustomData_number_of_layers(data, layer_type) - 1 : 0; \
- *max= MAX2(0, *max); \
+ *min = 0; \
+ *max = data ? CustomData_number_of_layers(data, layer_type) - 1 : 0; \
+ *max = MAX2(0, *max); \
}
/* Define the accessors for special CustomDataLayers in the collection
@@ -71,8 +71,8 @@
static PointerRNA rna_Mesh_##collection_name##_##active_type##_get(PointerRNA *ptr) \
{ \
CustomData *data = rna_mesh_##customdata_type(ptr); \
- int index= CustomData_get_##active_type##_layer_index(data, layer_type); \
- CustomDataLayer *cdl= (index == -1)? NULL: &data->layers[index]; \
+ int index = CustomData_get_##active_type##_layer_index(data, layer_type); \
+ CustomDataLayer *cdl = (index == -1)? NULL: &data->layers[index]; \
\
return rna_pointer_inherit_refine(ptr, &RNA_##layer_rna_type, cdl); \
} \
@@ -84,8 +84,8 @@
CustomDataLayer *cdl; \
int a; \
\
- for(cdl=data->layers, a=0; a<data->totlayer; cdl++, a++) { \
- if(value.data == cdl) { \
+ for (cdl = data->layers, a = 0; a<data->totlayer; cdl++, a++) { \
+ if (value.data == cdl) { \
CustomData_set_layer_##active_type##_index(data, layer_type, a); \
mesh_update_customdata_pointers(me, TRUE); \
return; \
diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c
index a6d256975c0..8ba391e1bb9 100644
--- a/source/blender/makesrna/intern/rna_meta.c
+++ b/source/blender/makesrna/intern/rna_meta.c
@@ -53,13 +53,13 @@
static int rna_Meta_texspace_editable(PointerRNA *ptr)
{
- MetaBall *mb= (MetaBall*)ptr->data;
+ MetaBall *mb = (MetaBall*)ptr->data;
return (mb->texflag & MB_AUTOSPACE)? 0: PROP_EDITABLE;
}
static void rna_Meta_texspace_loc_get(PointerRNA *ptr, float *values)
{
- MetaBall *mb= (MetaBall*)ptr->data;
+ MetaBall *mb = (MetaBall*)ptr->data;
/* tex_space_mball() needs object.. ugh */
@@ -68,14 +68,14 @@ static void rna_Meta_texspace_loc_get(PointerRNA *ptr, float *values)
static void rna_Meta_texspace_loc_set(PointerRNA *ptr, const float *values)
{
- MetaBall *mb= (MetaBall*)ptr->data;
+ MetaBall *mb = (MetaBall*)ptr->data;
copy_v3_v3(mb->loc, values);
}
static void rna_Meta_texspace_size_get(PointerRNA *ptr, float *values)
{
- MetaBall *mb= (MetaBall*)ptr->data;
+ MetaBall *mb = (MetaBall*)ptr->data;
/* tex_space_mball() needs object.. ugh */
@@ -84,7 +84,7 @@ static void rna_Meta_texspace_size_get(PointerRNA *ptr, float *values)
static void rna_Meta_texspace_size_set(PointerRNA *ptr, const float *values)
{
- MetaBall *mb= (MetaBall*)ptr->data;
+ MetaBall *mb = (MetaBall*)ptr->data;
copy_v3_v3(mb->size, values);
}
@@ -92,13 +92,13 @@ static void rna_Meta_texspace_size_set(PointerRNA *ptr, const float *values)
static void rna_MetaBall_update_data(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- MetaBall *mb= ptr->id.data;
+ MetaBall *mb = ptr->id.data;
Object *ob;
/* cheating way for importers to avoid slow updates */
- if(mb->id.us > 0) {
- for(ob=bmain->object.first; ob; ob= ob->id.next)
- if(ob->data == mb)
+ if (mb->id.us > 0) {
+ for (ob = bmain->object.first; ob; ob = ob->id.next)
+ if (ob->data == mb)
copy_mball_properties(scene, ob);
DAG_id_tag_update(&mb->id, 0);
@@ -108,17 +108,17 @@ 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;
+ 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);
+ MetaElem *ml = add_metaball_element(mb, type);
/* cheating way for importers to avoid slow updates */
- if(mb->id.us > 0) {
+ if (mb->id.us > 0) {
DAG_id_tag_update(&mb->id, 0);
WM_main_add_notifier(NC_GEOM|ND_DATA, &mb->id);
}
@@ -128,11 +128,11 @@ static MetaElem *rna_MetaBall_elements_new(MetaBall *mb, int type)
static void rna_MetaBall_elements_remove(MetaBall *mb, ReportList *reports, MetaElem *ml)
{
- int found= 0;
+ int found = 0;
- found= BLI_remlink_safe(&mb->elems, ml);
+ found = BLI_remlink_safe(&mb->elems, ml);
- if(!found) {
+ if (!found) {
BKE_reportf(reports, RPT_ERROR, "Metaball \"%s\" does not contain spline given", mb->id.name+2);
return;
}
@@ -141,7 +141,7 @@ static void rna_MetaBall_elements_remove(MetaBall *mb, ReportList *reports, Meta
/* invalidate pointer!, no can do */
/* cheating way for importers to avoid slow updates */
- if(mb->id.us > 0) {
+ if (mb->id.us > 0) {
DAG_id_tag_update(&mb->id, 0);
WM_main_add_notifier(NC_GEOM|ND_DATA, &mb->id);
}
@@ -152,7 +152,7 @@ static void rna_MetaBall_elements_clear(MetaBall *mb)
BLI_freelistN(&mb->elems);
/* cheating way for importers to avoid slow updates */
- if(mb->id.us > 0) {
+ if (mb->id.us > 0) {
DAG_id_tag_update(&mb->id, 0);
WM_main_add_notifier(NC_GEOM|ND_DATA, &mb->id);
}
@@ -165,66 +165,66 @@ static void rna_def_metaelement(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "MetaElement", NULL);
+ srna = RNA_def_struct(brna, "MetaElement", NULL);
RNA_def_struct_sdna(srna, "MetaElem");
RNA_def_struct_ui_text(srna, "Meta Element", "Blobby element in a Metaball datablock");
RNA_def_struct_ui_icon(srna, ICON_OUTLINER_DATA_META);
/* enums */
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, metaelem_type_items);
RNA_def_property_ui_text(prop, "Type", "Metaball types");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
/* number values */
- prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "x");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Location", "");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
- prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_QUATERNION);
+ 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", "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);
+ prop = RNA_def_property(srna, "radius", PROP_FLOAT, PROP_UNSIGNED|PROP_UNIT_LENGTH);
RNA_def_property_float_sdna(prop, NULL, "rad");
RNA_def_property_ui_text(prop, "Radius", "");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
- prop= RNA_def_property(srna, "size_x", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "size_x", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "expx");
RNA_def_property_range(prop, 0.0f, 20.0f);
RNA_def_property_ui_text(prop, "Size X", "Size of element, use of components depends on element type");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
- prop= RNA_def_property(srna, "size_y", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "size_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "expy");
RNA_def_property_range(prop, 0.0f, 20.0f);
RNA_def_property_ui_text(prop, "Size Y", "Size of element, use of components depends on element type");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
- prop= RNA_def_property(srna, "size_z", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "size_z", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "expz");
RNA_def_property_range(prop, 0.0f, 20.0f);
RNA_def_property_ui_text(prop, "Size Z", "Size of element, use of components depends on element type");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
- prop= RNA_def_property(srna, "stiffness", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "stiffness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "s");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Stiffness", "Stiffness defines how much of the element to fill");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
/* flags */
- prop= RNA_def_property(srna, "use_negative", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_negative", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MB_NEGATIVE);
RNA_def_property_ui_text(prop, "Negative", "Set metaball as negative one");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
- prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MB_HIDE);
RNA_def_property_ui_text(prop, "Hide", "Hide element");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
@@ -240,26 +240,26 @@ static void rna_def_metaball_elements(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *parm;
RNA_def_property_srna(cprop, "MetaBallElements");
- srna= RNA_def_struct(brna, "MetaBallElements", NULL);
+ srna = RNA_def_struct(brna, "MetaBallElements", NULL);
RNA_def_struct_sdna(srna, "MetaBall");
RNA_def_struct_ui_text(srna, "Meta Elements", "Collection of metaball elements");
- func= RNA_def_function(srna, "new", "rna_MetaBall_elements_new");
+ func = RNA_def_function(srna, "new", "rna_MetaBall_elements_new");
RNA_def_function_ui_description(func, "Add a new element to the metaball");
RNA_def_enum(func, "type", metaelem_type_items, MB_BALL, "", "type for the new meta-element");
- parm= RNA_def_pointer(func, "element", "MetaElement", "", "The newly created meta-element");
+ parm = RNA_def_pointer(func, "element", "MetaElement", "", "The newly created meta-element");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_MetaBall_elements_remove");
+ func = RNA_def_function(srna, "remove", "rna_MetaBall_elements_remove");
RNA_def_function_ui_description(func, "Remove an element from the metaball");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "element", "MetaElement", "", "The element to remove");
+ parm = RNA_def_pointer(func, "element", "MetaElement", "", "The element to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- func= RNA_def_function(srna, "clear", "rna_MetaBall_elements_clear");
+ func = RNA_def_function(srna, "clear", "rna_MetaBall_elements_clear");
RNA_def_function_ui_description(func, "Remove all elements from the metaball");
- prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "lastelem");
RNA_def_property_ui_text(prop, "Active Element", "Last selected element");
}
@@ -275,55 +275,55 @@ static void rna_def_metaball(BlenderRNA *brna)
{MB_UPDATE_NEVER, "NEVER", 0, "Never", "While editing, don't update metaball at all"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "MetaBall", "ID");
+ srna = RNA_def_struct(brna, "MetaBall", "ID");
RNA_def_struct_ui_text(srna, "MetaBall", "Metaball datablock to defined blobby surfaces");
RNA_def_struct_ui_icon(srna, ICON_META_DATA);
- prop= RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "elems", NULL);
RNA_def_property_struct_type(prop, "MetaElement");
RNA_def_property_ui_text(prop, "Elements", "Meta elements");
rna_def_metaball_elements(brna, prop);
/* enums */
- prop= RNA_def_property(srna, "update_method", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "update_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, prop_update_items);
RNA_def_property_ui_text(prop, "Update", "Metaball edit update behavior");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
/* number values */
- prop= RNA_def_property(srna, "resolution", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "resolution", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "wiresize");
RNA_def_property_range(prop, 0.050f, 1.0f);
RNA_def_property_ui_text(prop, "Wire Size", "Polygonization resolution in the 3D viewport");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
- prop= RNA_def_property(srna, "render_resolution", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "render_resolution", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "rendersize");
RNA_def_property_range(prop, 0.050f, 1.0f);
RNA_def_property_ui_text(prop, "Render Size", "Polygonization resolution in rendering");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
- prop= RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "thresh");
RNA_def_property_range(prop, 0.0f, 5.0f);
RNA_def_property_ui_text(prop, "Threshold", "Influence of meta elements");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
/* texture space */
- prop= RNA_def_property(srna, "use_auto_texspace", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_auto_texspace", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", MB_AUTOSPACE);
RNA_def_property_ui_text(prop, "Auto Texture Space", "Adjust active object's texture space automatically when transforming object");
- prop= RNA_def_property(srna, "texspace_location", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "texspace_location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Texture Space Location", "Texture space location");
RNA_def_property_editable_func(prop, "rna_Meta_texspace_editable");
RNA_def_property_float_funcs(prop, "rna_Meta_texspace_loc_get", "rna_Meta_texspace_loc_set", NULL);
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
- prop= RNA_def_property(srna, "texspace_size", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "texspace_size", PROP_FLOAT, PROP_XYZ);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Texture Space Size", "Texture space size");
RNA_def_property_editable_func(prop, "rna_Meta_texspace_editable");
@@ -339,7 +339,7 @@ static void rna_def_metaball(BlenderRNA *brna)
*/
/* materials */
- prop= RNA_def_property(srna, "materials", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "materials", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "mat", "totcol");
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_ui_text(prop, "Materials", "");
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 021ae87d60b..99440836028 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -54,7 +54,7 @@
#include "WM_api.h"
#include "WM_types.h"
-EnumPropertyItem modifier_type_items[] ={
+EnumPropertyItem modifier_type_items[] = {
{0, "", 0, "Modify", ""},
{eModifierType_UVProject, "UV_PROJECT", ICON_MOD_UVPROJECT, "UV Project", ""},
{eModifierType_WeightVGEdit, "VERTEX_WEIGHT_EDIT", ICON_MOD_VERTEX_WEIGHT, "Vertex Weight Edit", ""},
@@ -114,15 +114,15 @@ EnumPropertyItem modifier_type_items[] ={
static void rna_UVProject_projectors_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- UVProjectModifierData *uvp= (UVProjectModifierData*)ptr->data;
+ UVProjectModifierData *uvp = (UVProjectModifierData*)ptr->data;
rna_iterator_array_begin(iter, (void*)uvp->projectors, sizeof(Object*), uvp->num_projectors, 0, NULL);
}
static StructRNA* rna_Modifier_refine(struct PointerRNA *ptr)
{
- ModifierData *md= (ModifierData*)ptr->data;
+ ModifierData *md = (ModifierData*)ptr->data;
- switch(md->type) {
+ switch (md->type) {
case eModifierType_Subsurf:
return &RNA_SubsurfModifier;
case eModifierType_Lattice:
@@ -210,7 +210,7 @@ static StructRNA* rna_Modifier_refine(struct PointerRNA *ptr)
void rna_Modifier_name_set(PointerRNA *ptr, const char *value)
{
- ModifierData *md= ptr->data;
+ ModifierData *md = ptr->data;
char oldname[sizeof(md->name)];
/* make a copy of the old name first */
@@ -221,7 +221,7 @@ void rna_Modifier_name_set(PointerRNA *ptr, const char *value)
/* make sure the name is truly unique */
if (ptr->id.data) {
- Object *ob= ptr->id.data;
+ Object *ob = ptr->id.data;
modifier_unique_name(&ob->modifiers, md);
}
@@ -248,31 +248,31 @@ static void rna_Modifier_dependency_update(Main *bmain, Scene *scene, PointerRNA
static void rna_Smoke_set_type(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- SmokeModifierData *smd= (SmokeModifierData *)ptr->data;
- Object *ob= (Object*)ptr->id.data;
+ SmokeModifierData *smd = (SmokeModifierData *)ptr->data;
+ Object *ob = (Object*)ptr->id.data;
ParticleSystemModifierData *psmd = NULL;
ParticleSystem *psys = NULL;
ParticleSettings *part = NULL;
- // nothing changed
- if((smd->type & MOD_SMOKE_TYPE_DOMAIN) && smd->domain)
+ /* nothing changed */
+ if ((smd->type & MOD_SMOKE_TYPE_DOMAIN) && smd->domain)
return;
- smokeModifier_free(smd); // XXX TODO: completely free all 3 pointers
- smokeModifier_createType(smd); // create regarding of selected type
+ smokeModifier_free(smd); /* XXX TODO: completely free all 3 pointers */
+ smokeModifier_createType(smd); /* create regarding of selected type */
switch (smd->type) {
case MOD_SMOKE_TYPE_DOMAIN:
ob->dt = OB_WIRE;
break;
case MOD_SMOKE_TYPE_FLOW:
- for(psys=ob->particlesystem.first; psys; psys=psys->next)
- if(psys->part->type == PART_EMITTER)
+ for (psys = ob->particlesystem.first; psys; psys = psys->next)
+ if (psys->part->type == PART_EMITTER)
break;
- if(ob->type == OB_MESH && !psys) {
+ if (ob->type == OB_MESH && !psys) {
/* add particle system */
psmd = (ParticleSystemModifierData *)object_add_particle_system(scene, ob, NULL);
- if(psmd)
+ if (psmd)
{
psys = psmd->psys;
part = psys->part;
@@ -286,7 +286,7 @@ static void rna_Smoke_set_type(Main *bmain, Scene *scene, PointerRNA *ptr)
DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA);
}
}
- if(smd->flow)
+ if (smd->flow)
smd->flow->psys = psys;
case MOD_SMOKE_TYPE_COLL:
case 0:
@@ -295,103 +295,103 @@ static void rna_Smoke_set_type(Main *bmain, Scene *scene, PointerRNA *ptr)
break;
}
- // update dependency since a domain - other type switch could have happened
+ /* update dependency since a domain - other type switch could have happened */
rna_Modifier_dependency_update(bmain, scene, ptr);
}
static void rna_ExplodeModifier_vgroup_get(PointerRNA *ptr, char *value)
{
- ExplodeModifierData *emd= (ExplodeModifierData*)ptr->data;
+ ExplodeModifierData *emd = (ExplodeModifierData*)ptr->data;
rna_object_vgroup_name_index_get(ptr, value, emd->vgroup);
}
static int rna_ExplodeModifier_vgroup_length(PointerRNA *ptr)
{
- ExplodeModifierData *emd= (ExplodeModifierData*)ptr->data;
+ ExplodeModifierData *emd = (ExplodeModifierData*)ptr->data;
return rna_object_vgroup_name_index_length(ptr, emd->vgroup);
}
static void rna_ExplodeModifier_vgroup_set(PointerRNA *ptr, const char *value)
{
- ExplodeModifierData *emd= (ExplodeModifierData*)ptr->data;
+ ExplodeModifierData *emd = (ExplodeModifierData*)ptr->data;
rna_object_vgroup_name_index_set(ptr, value, &emd->vgroup);
}
static void rna_SimpleDeformModifier_vgroup_set(PointerRNA *ptr, const char *value)
{
- SimpleDeformModifierData *smd= (SimpleDeformModifierData*)ptr->data;
+ SimpleDeformModifierData *smd = (SimpleDeformModifierData*)ptr->data;
rna_object_vgroup_name_set(ptr, value, smd->vgroup_name, sizeof(smd->vgroup_name));
}
static void rna_ShrinkwrapModifier_vgroup_set(PointerRNA *ptr, const char *value)
{
- ShrinkwrapModifierData *smd= (ShrinkwrapModifierData*)ptr->data;
+ ShrinkwrapModifierData *smd = (ShrinkwrapModifierData*)ptr->data;
rna_object_vgroup_name_set(ptr, value, smd->vgroup_name, sizeof(smd->vgroup_name));
}
static void rna_LatticeModifier_vgroup_set(PointerRNA *ptr, const char *value)
{
- LatticeModifierData *lmd= (LatticeModifierData*)ptr->data;
+ LatticeModifierData *lmd = (LatticeModifierData*)ptr->data;
rna_object_vgroup_name_set(ptr, value, lmd->name, sizeof(lmd->name));
}
static void rna_ArmatureModifier_vgroup_set(PointerRNA *ptr, const char *value)
{
- ArmatureModifierData *lmd= (ArmatureModifierData*)ptr->data;
+ ArmatureModifierData *lmd = (ArmatureModifierData*)ptr->data;
rna_object_vgroup_name_set(ptr, value, lmd->defgrp_name, sizeof(lmd->defgrp_name));
}
static void rna_CurveModifier_vgroup_set(PointerRNA *ptr, const char *value)
{
- CurveModifierData *lmd= (CurveModifierData*)ptr->data;
+ CurveModifierData *lmd = (CurveModifierData*)ptr->data;
rna_object_vgroup_name_set(ptr, value, lmd->name, sizeof(lmd->name));
}
static void rna_DisplaceModifier_vgroup_set(PointerRNA *ptr, const char *value)
{
- DisplaceModifierData *lmd= (DisplaceModifierData*)ptr->data;
+ DisplaceModifierData *lmd = (DisplaceModifierData*)ptr->data;
rna_object_vgroup_name_set(ptr, value, lmd->defgrp_name, sizeof(lmd->defgrp_name));
}
static void rna_HookModifier_vgroup_set(PointerRNA *ptr, const char *value)
{
- HookModifierData *lmd= (HookModifierData*)ptr->data;
+ HookModifierData *lmd = (HookModifierData*)ptr->data;
rna_object_vgroup_name_set(ptr, value, lmd->name, sizeof(lmd->name));
}
static void rna_MaskModifier_vgroup_set(PointerRNA *ptr, const char *value)
{
- MaskModifierData *lmd= (MaskModifierData*)ptr->data;
+ MaskModifierData *lmd = (MaskModifierData*)ptr->data;
rna_object_vgroup_name_set(ptr, value, lmd->vgroup, sizeof(lmd->vgroup));
}
static void rna_MeshDeformModifier_vgroup_set(PointerRNA *ptr, const char *value)
{
- MeshDeformModifierData *lmd= (MeshDeformModifierData*)ptr->data;
+ MeshDeformModifierData *lmd = (MeshDeformModifierData*)ptr->data;
rna_object_vgroup_name_set(ptr, value, lmd->defgrp_name, sizeof(lmd->defgrp_name));
}
static void rna_SmoothModifier_vgroup_set(PointerRNA *ptr, const char *value)
{
- SmoothModifierData *lmd= (SmoothModifierData*)ptr->data;
+ SmoothModifierData *lmd = (SmoothModifierData*)ptr->data;
rna_object_vgroup_name_set(ptr, value, lmd->defgrp_name, sizeof(lmd->defgrp_name));
}
static void rna_WaveModifier_vgroup_set(PointerRNA *ptr, const char *value)
{
- WaveModifierData *lmd= (WaveModifierData*)ptr->data;
+ WaveModifierData *lmd = (WaveModifierData*)ptr->data;
rna_object_vgroup_name_set(ptr, value, lmd->defgrp_name, sizeof(lmd->defgrp_name));
}
static void rna_CastModifier_vgroup_set(PointerRNA *ptr, const char *value)
{
- CastModifierData *lmd= (CastModifierData*)ptr->data;
+ CastModifierData *lmd = (CastModifierData*)ptr->data;
rna_object_vgroup_name_set(ptr, value, lmd->defgrp_name, sizeof(lmd->defgrp_name));
}
static void rna_SolidifyModifier_vgroup_set(PointerRNA *ptr, const char *value)
{
- SolidifyModifierData *smd= (SolidifyModifierData*)ptr->data;
+ SolidifyModifierData *smd = (SolidifyModifierData*)ptr->data;
rna_object_vgroup_name_set(ptr, value, smd->defgrp_name, sizeof(smd->defgrp_name));
}
@@ -399,15 +399,15 @@ static void rna_WeightVGModifier_vgroup_set(PointerRNA *ptr, const char *value)
{
ModifierData *md = (ModifierData*)ptr->data;
if (md->type == eModifierType_WeightVGEdit) {
- WeightVGEditModifierData *wmd= (WeightVGEditModifierData*)md;
+ WeightVGEditModifierData *wmd = (WeightVGEditModifierData*)md;
rna_object_vgroup_name_set(ptr, value, wmd->defgrp_name, sizeof(wmd->defgrp_name));
}
else if (md->type == eModifierType_WeightVGMix) {
- WeightVGMixModifierData *wmd= (WeightVGMixModifierData*)md;
+ WeightVGMixModifierData *wmd = (WeightVGMixModifierData*)md;
rna_object_vgroup_name_set(ptr, value, wmd->defgrp_name_a, sizeof(wmd->defgrp_name_a));
}
else if (md->type == eModifierType_WeightVGProximity) {
- WeightVGProximityModifierData *wmd= (WeightVGProximityModifierData*)md;
+ WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*)md;
rna_object_vgroup_name_set(ptr, value, wmd->defgrp_name, sizeof(wmd->defgrp_name));
}
}
@@ -416,40 +416,40 @@ static void rna_WeightVGModifier_mask_vgroup_set(PointerRNA *ptr, const char *va
{
ModifierData *md = (ModifierData*)ptr->data;
if (md->type == eModifierType_WeightVGEdit) {
- WeightVGEditModifierData *wmd= (WeightVGEditModifierData*)md;
+ WeightVGEditModifierData *wmd = (WeightVGEditModifierData*)md;
rna_object_vgroup_name_set(ptr, value, wmd->mask_defgrp_name, sizeof(wmd->mask_defgrp_name));
}
else if (md->type == eModifierType_WeightVGMix) {
- WeightVGMixModifierData *wmd= (WeightVGMixModifierData*)md;
+ WeightVGMixModifierData *wmd = (WeightVGMixModifierData*)md;
rna_object_vgroup_name_set(ptr, value, wmd->mask_defgrp_name, sizeof(wmd->mask_defgrp_name));
}
else if (md->type == eModifierType_WeightVGProximity) {
- WeightVGProximityModifierData *wmd= (WeightVGProximityModifierData*)md;
+ WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*)md;
rna_object_vgroup_name_set(ptr, value, wmd->mask_defgrp_name, sizeof(wmd->mask_defgrp_name));
}
}
static void rna_WeightVGMixModifier_vgroup2_set(PointerRNA *ptr, const char *value)
{
- WeightVGMixModifierData *wmd= (WeightVGMixModifierData*)ptr->data;
+ WeightVGMixModifierData *wmd = (WeightVGMixModifierData*)ptr->data;
rna_object_vgroup_name_set(ptr, value, wmd->defgrp_name_b, sizeof(wmd->defgrp_name_b));
}
static void rna_MappingInfo_uvlayer_set(PointerRNA *ptr, const char *value)
{
- MappingInfoModifierData *mmd= (MappingInfoModifierData *)ptr->data;
+ MappingInfoModifierData *mmd = (MappingInfoModifierData *)ptr->data;
rna_object_uvlayer_name_set(ptr, value, mmd->uvlayer_name, sizeof(mmd->uvlayer_name));
}
static void rna_UVProjectModifier_uvlayer_set(PointerRNA *ptr, const char *value)
{
- UVProjectModifierData *umd= (UVProjectModifierData*)ptr->data;
+ UVProjectModifierData *umd = (UVProjectModifierData*)ptr->data;
rna_object_uvlayer_name_set(ptr, value, umd->uvlayer_name, sizeof(umd->uvlayer_name));
}
static void RNA_WarpModifier_vgroup_set(PointerRNA *ptr, const char *value)
{
- WarpModifierData *tmd= (WarpModifierData*)ptr->data;
+ WarpModifierData *tmd = (WarpModifierData*)ptr->data;
rna_object_vgroup_name_set(ptr, value, tmd->defgrp_name, sizeof(tmd->defgrp_name));
}
@@ -476,31 +476,31 @@ static void rna_MultiresModifier_level_range(PointerRNA *ptr, int *min, int *max
*min = 0;
*max = mmd->totlvl; /* intentionally _not_ -1 */
- *max= MAX2(0, *max);
+ *max = MAX2(0, *max);
}
static int rna_MultiresModifier_external_get(PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
- Mesh *me= ob->data;
+ Object *ob = (Object*)ptr->id.data;
+ Mesh *me = ob->data;
return CustomData_external_test(&me->ldata, CD_MDISPS);
}
static void rna_MultiresModifier_filepath_get(PointerRNA *ptr, char *value)
{
- Object *ob= (Object*)ptr->id.data;
- CustomDataExternal *external= ((Mesh*)ob->data)->fdata.external;
+ Object *ob = (Object*)ptr->id.data;
+ CustomDataExternal *external = ((Mesh*)ob->data)->fdata.external;
BLI_strncpy(value, (external)? external->filename: "", sizeof(external->filename));
}
static void rna_MultiresModifier_filepath_set(PointerRNA *ptr, const char *value)
{
- Object *ob= (Object*)ptr->id.data;
- CustomDataExternal *external= ((Mesh*)ob->data)->fdata.external;
+ Object *ob = (Object*)ptr->id.data;
+ CustomDataExternal *external = ((Mesh*)ob->data)->fdata.external;
- if(external && strcmp(external->filename, value)) {
+ if (external && strcmp(external->filename, value)) {
BLI_strncpy(external->filename, value, sizeof(external->filename));
multires_force_external_reload(ob);
}
@@ -508,20 +508,20 @@ static void rna_MultiresModifier_filepath_set(PointerRNA *ptr, const char *value
static int rna_MultiresModifier_filepath_length(PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
- CustomDataExternal *external= ((Mesh*)ob->data)->fdata.external;
+ Object *ob = (Object*)ptr->id.data;
+ CustomDataExternal *external = ((Mesh*)ob->data)->fdata.external;
return strlen((external)? external->filename: "");
}
static void modifier_object_set(Object *self, Object **ob_p, int type, PointerRNA value)
{
- Object *ob= value.data;
+ Object *ob = value.data;
- if(!self || ob != self) {
- if(!ob || type == OB_EMPTY || ob->type == type) {
+ if (!self || ob != self) {
+ if (!ob || type == OB_EMPTY || ob->type == type) {
id_lib_extern((ID *)ob);
- *ob_p= ob;
+ *ob_p = ob;
}
}
}
@@ -568,15 +568,15 @@ static void rna_ShrinkwrapModifier_target_set(PointerRNA *ptr, PointerRNA value)
static int rna_ShrinkwrapModifier_face_cull_get(PointerRNA *ptr)
{
- ShrinkwrapModifierData *swm= (ShrinkwrapModifierData*)ptr->data;
+ ShrinkwrapModifierData *swm = (ShrinkwrapModifierData*)ptr->data;
return swm->shrinkOpts & (MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE|MOD_SHRINKWRAP_CULL_TARGET_BACKFACE);
}
static void rna_ShrinkwrapModifier_face_cull_set(struct PointerRNA *ptr, int value)
{
- ShrinkwrapModifierData *swm= (ShrinkwrapModifierData*)ptr->data;
+ ShrinkwrapModifierData *swm = (ShrinkwrapModifierData*)ptr->data;
- swm->shrinkOpts= (swm->shrinkOpts & ~(MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE|MOD_SHRINKWRAP_CULL_TARGET_BACKFACE)) | value;
+ swm->shrinkOpts = (swm->shrinkOpts & ~(MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE|MOD_SHRINKWRAP_CULL_TARGET_BACKFACE)) | value;
}
static void rna_MeshDeformModifier_object_set(PointerRNA *ptr, PointerRNA value)
@@ -606,62 +606,62 @@ static int rna_MeshDeformModifier_is_bound_get(PointerRNA *ptr)
static PointerRNA rna_SoftBodyModifier_settings_get(PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
return rna_pointer_inherit_refine(ptr, &RNA_SoftBodySettings, ob->soft);
}
static PointerRNA rna_SoftBodyModifier_point_cache_get(PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
return rna_pointer_inherit_refine(ptr, &RNA_PointCache, ob->soft->pointcache);
}
static PointerRNA rna_CollisionModifier_settings_get(PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
return rna_pointer_inherit_refine(ptr, &RNA_CollisionSettings, ob->pd);
}
static PointerRNA rna_UVProjector_object_get(PointerRNA *ptr)
{
- Object **ob= (Object**)ptr->data;
+ Object **ob = (Object**)ptr->data;
return rna_pointer_inherit_refine(ptr, &RNA_Object, *ob);
}
static void rna_UVProjector_object_set(PointerRNA *ptr, PointerRNA value)
{
- Object **ob= (Object**)ptr->data;
+ Object **ob = (Object**)ptr->data;
- if(*ob)
+ if (*ob)
id_us_min((ID*)*ob);
- if(value.data)
+ if (value.data)
id_us_plus((ID*)value.data);
- *ob= value.data;
+ *ob = value.data;
}
static void rna_UVProjectModifier_num_projectors_set(PointerRNA *ptr, int value)
{
- UVProjectModifierData *md= (UVProjectModifierData*)ptr->data;
+ UVProjectModifierData *md = (UVProjectModifierData*)ptr->data;
int a;
- md->num_projectors= CLAMPIS(value, 1, MOD_UVPROJECT_MAX);
- for(a=md->num_projectors; a<MOD_UVPROJECT_MAX; a++)
- md->projectors[a]= NULL;
+ md->num_projectors = CLAMPIS(value, 1, MOD_UVPROJECT_MAX);
+ for (a = md->num_projectors; a<MOD_UVPROJECT_MAX; a++)
+ md->projectors[a] = NULL;
}
static int rna_OceanModifier_is_build_enabled_get(PointerRNA *UNUSED(ptr))
{
#ifdef WITH_OCEANSIM
return 1;
-#else // WITH_OCEANSIM
+#else /* WITH_OCEANSIM */
return 0;
-#endif // WITH_OCEANSIM
+#endif /* WITH_OCEANSIM */
}
static void rna_OceanModifier_init_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- OceanModifierData *omd= (OceanModifierData*)ptr->data;
+ OceanModifierData *omd = (OceanModifierData*)ptr->data;
omd->refresh |= (MOD_OCEAN_REFRESH_RESET|MOD_OCEAN_REFRESH_SIM|MOD_OCEAN_REFRESH_CLEAR_CACHE);
@@ -670,7 +670,7 @@ static void rna_OceanModifier_init_update(Main *bmain, Scene *scene, PointerRNA
static void rna_OceanModifier_sim_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- OceanModifierData *omd= (OceanModifierData*)ptr->data;
+ OceanModifierData *omd = (OceanModifierData*)ptr->data;
omd->refresh |= MOD_OCEAN_REFRESH_SIM;
@@ -679,7 +679,7 @@ static void rna_OceanModifier_sim_update(Main *bmain, Scene *scene, PointerRNA *
static void rna_OceanModifier_topology_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- OceanModifierData *omd= (OceanModifierData*)ptr->data;
+ OceanModifierData *omd = (OceanModifierData*)ptr->data;
omd->refresh |= MOD_OCEAN_REFRESH_TOPOLOGY;
@@ -688,7 +688,7 @@ static void rna_OceanModifier_topology_update(Main *bmain, Scene *scene, Pointer
static void rna_OceanModifier_ocean_chop_set(PointerRNA *ptr, float value)
{
- OceanModifierData *omd= (OceanModifierData*)ptr->data;
+ OceanModifierData *omd = (OceanModifierData*)ptr->data;
float old_value = omd->chop_amount;
omd->chop_amount = value;
@@ -703,30 +703,30 @@ static void rna_OceanModifier_ocean_chop_set(PointerRNA *ptr, float value)
static float rna_EdgeSplitModifier_split_angle_get(PointerRNA *ptr)
{
- EdgeSplitModifierData *md= (EdgeSplitModifierData*)ptr->data;
+ EdgeSplitModifierData *md = (EdgeSplitModifierData*)ptr->data;
return DEG2RADF(md->split_angle);
}
static void rna_EdgeSplitModifier_split_angle_set(PointerRNA *ptr, float value)
{
- EdgeSplitModifierData *md= (EdgeSplitModifierData*)ptr->data;
- value= RAD2DEGF(value);
+ EdgeSplitModifierData *md = (EdgeSplitModifierData*)ptr->data;
+ value = RAD2DEGF(value);
CLAMP(value, 0.0f, 180.0f);
- md->split_angle= (int)value;
+ md->split_angle = (int)value;
}
static float rna_BevelModifier_angle_limit_get(PointerRNA *ptr)
{
- BevelModifierData *md= (BevelModifierData*)ptr->data;
+ BevelModifierData *md = (BevelModifierData*)ptr->data;
return DEG2RADF(md->bevel_angle);
}
static void rna_BevelModifier_angle_limit_set(PointerRNA *ptr, float value)
{
- BevelModifierData *md= (BevelModifierData*)ptr->data;
- value= RAD2DEGF(value);
+ BevelModifierData *md = (BevelModifierData*)ptr->data;
+ value = RAD2DEGF(value);
CLAMP(value, 0.0f, 180.0f);
- md->bevel_angle= (int)value;
+ md->bevel_angle = (int)value;
}
#else
@@ -738,7 +738,7 @@ static void rna_def_property_subdivision_common(StructRNA *srna, const char type
{1, "SIMPLE", 0, "Simple", ""},
{0, NULL, 0, NULL, NULL}};
- PropertyRNA *prop= RNA_def_property(srna, "subdivision_type", PROP_ENUM, PROP_NONE);
+ PropertyRNA *prop = RNA_def_property(srna, "subdivision_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, type);
RNA_def_property_enum_items(prop, prop_subdivision_type_items);
RNA_def_property_ui_text(prop, "Subdivision Type", "Select type of subdivision algorithm");
@@ -750,30 +750,30 @@ static void rna_def_modifier_subsurf(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "SubsurfModifier", "Modifier");
+ srna = RNA_def_struct(brna, "SubsurfModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Subsurf Modifier", "Subdivision surface modifier");
RNA_def_struct_sdna(srna, "SubsurfModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_SUBSURF);
rna_def_property_subdivision_common(srna, "subdivType");
- prop= RNA_def_property(srna, "levels", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "levels", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "levels");
RNA_def_property_ui_range(prop, 0, 6, 1, 0);
RNA_def_property_ui_text(prop, "Levels", "Number of subdivisions to perform");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "render_levels", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "render_levels", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "renderLevels");
RNA_def_property_ui_range(prop, 0, 6, 1, 0);
RNA_def_property_ui_text(prop, "Render Levels", "Number of subdivisions to perform when rendering");
- prop= RNA_def_property(srna, "show_only_control_edges", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_only_control_edges", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", eSubsurfModifierFlag_ControlEdges);
RNA_def_property_ui_text(prop, "Optimal Display", "Skip drawing/rendering of interior subdivided edges");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_subsurf_uv", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_subsurf_uv", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", eSubsurfModifierFlag_SubsurfUv);
RNA_def_property_ui_text(prop, "Subdivide UVs", "Use subsurf to subdivide UVs");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
@@ -790,24 +790,24 @@ static void rna_def_modifier_generic_map_info(StructRNA *srna)
PropertyRNA *prop;
- prop= RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Texture", "");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "texture_coords", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "texture_coords", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "texmapping");
RNA_def_property_enum_items(prop, prop_texture_coordinates_items);
RNA_def_property_ui_text(prop, "Texture Coordinates", "");
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
- prop= RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "uvlayer_name");
RNA_def_property_ui_text(prop, "UV Map", "UV map name");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MappingInfo_uvlayer_set");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "texture_coords_object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "texture_coords_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "map_object");
RNA_def_property_ui_text(prop, "Texture Coordinate Object", "Object to set the texture coordinates");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
@@ -830,47 +830,47 @@ static void rna_def_modifier_warp(BlenderRNA *brna)
{eWarp_Falloff_Const, "CONSTANT", ICON_NOCURVE, "Constant", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "WarpModifier", "Modifier");
+ srna = RNA_def_struct(brna, "WarpModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Warp Modifier", "Warp modifier");
RNA_def_struct_sdna(srna, "WarpModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_WARP);
- prop= RNA_def_property(srna, "object_from", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "object_from", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "From", "Object to transform from");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
- prop= RNA_def_property(srna, "object_to", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "object_to", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "To", "Object to transform to");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
- prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -100, 100, 10, 2);
RNA_def_property_ui_text(prop, "Strength", "");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_falloff_items);
RNA_def_property_ui_text(prop, "Falloff Type", "");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "falloff_radius", PROP_FLOAT, PROP_UNSIGNED | PROP_DISTANCE);
+ prop = RNA_def_property(srna, "falloff_radius", PROP_FLOAT, PROP_UNSIGNED | PROP_DISTANCE);
RNA_def_property_ui_text(prop, "Radius", "Radius to apply");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "falloff_curve", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "falloff_curve", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "curfalloff");
RNA_def_property_ui_text(prop, "Falloff Curve", "Custom Lamp Falloff Curve");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_volume_preserve", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_volume_preserve", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WARP_VOLUME_PRESERVE);
RNA_def_property_ui_text(prop, "Preserve Volume", "Preserve volume when rotations are used");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name for modulating the deform");
RNA_def_property_string_funcs(prop, NULL, NULL, "RNA_WarpModifier_vgroup_set");
@@ -884,51 +884,51 @@ static void rna_def_modifier_multires(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "MultiresModifier", "Modifier");
+ srna = RNA_def_struct(brna, "MultiresModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Multires Modifier", "Multiresolution mesh modifier");
RNA_def_struct_sdna(srna, "MultiresModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_MULTIRES);
rna_def_property_subdivision_common(srna, "simple");
- prop= RNA_def_property(srna, "levels", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "levels", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "lvl");
RNA_def_property_ui_text(prop, "Levels", "Number of subdivisions to use in the viewport");
RNA_def_property_int_funcs(prop, NULL, NULL, "rna_MultiresModifier_level_range");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "sculpt_levels", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "sculpt_levels", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "sculptlvl");
RNA_def_property_ui_text(prop, "Sculpt Levels", "Number of subdivisions to use in sculpt mode");
RNA_def_property_int_funcs(prop, NULL, NULL, "rna_MultiresModifier_level_range");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "render_levels", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "render_levels", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "renderlvl");
RNA_def_property_ui_text(prop, "Render Levels", "The subdivision level visible at render time");
RNA_def_property_int_funcs(prop, NULL, NULL, "rna_MultiresModifier_level_range");
- prop= RNA_def_property(srna, "total_levels", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "total_levels", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "totlvl");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Total Levels", "Number of subdivisions for which displacements are stored");
- prop= RNA_def_property(srna, "is_external", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_external", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_MultiresModifier_external_get", NULL);
RNA_def_property_ui_text(prop, "External", "Store multires displacements outside the .blend file, to save memory");
- prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
+ prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_funcs(prop, "rna_MultiresModifier_filepath_get", "rna_MultiresModifier_filepath_length", "rna_MultiresModifier_filepath_set");
RNA_def_property_ui_text(prop, "File Path", "Path to external displacements file");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "show_only_control_edges", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_only_control_edges", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", eMultiresModifierFlag_ControlEdges);
RNA_def_property_ui_text(prop, "Optimal Display", "Skip drawing/rendering of interior subdivided edges");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_subsurf_uv", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_subsurf_uv", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flags", eMultiresModifierFlag_PlainUv);
RNA_def_property_ui_text(prop, "Subdivide UVs", "Use subsurf to subdivide UVs");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
@@ -939,18 +939,18 @@ static void rna_def_modifier_lattice(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "LatticeModifier", "Modifier");
+ srna = RNA_def_struct(brna, "LatticeModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Lattice Modifier", "Lattice deformation modifier");
RNA_def_struct_sdna(srna, "LatticeModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_LATTICE);
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Object", "Lattice object to deform with");
RNA_def_property_pointer_funcs(prop, NULL, "rna_LatticeModifier_object_set", NULL, "rna_Lattice_object_poll");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
- prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Vertex Group", "Name of Vertex Group which determines influence of modifier per point");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_LatticeModifier_vgroup_set");
@@ -971,24 +971,24 @@ static void rna_def_modifier_curve(BlenderRNA *brna)
{MOD_CURVE_NEGZ, "NEG_Z", 0, "-Z", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "CurveModifier", "Modifier");
+ srna = RNA_def_struct(brna, "CurveModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Curve Modifier", "Curve deformation modifier");
RNA_def_struct_sdna(srna, "CurveModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_CURVE);
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Object", "Curve object to deform with");
RNA_def_property_pointer_funcs(prop, NULL, "rna_CurveModifier_object_set", NULL, "rna_Curve_object_poll");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
- prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Vertex Group", "Name of Vertex Group which determines influence of modifier per point");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_CurveModifier_vgroup_set");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "deform_axis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "deform_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "defaxis");
RNA_def_property_enum_items(prop, prop_deform_axis_items);
RNA_def_property_ui_text(prop, "Deform Axis", "The axis that the curve deforms along");
@@ -1000,29 +1000,29 @@ static void rna_def_modifier_build(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "BuildModifier", "Modifier");
+ srna = RNA_def_struct(brna, "BuildModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Build Modifier", "Build effect modifier");
RNA_def_struct_sdna(srna, "BuildModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_BUILD);
- prop= RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "start");
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Start", "Start frame of the effect");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "frame_duration", PROP_FLOAT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_duration", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "length");
RNA_def_property_range(prop, 1, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Length", "Total time the build effect requires");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_random_order", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_random_order", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "randomize", 1);
RNA_def_property_ui_text(prop, "Randomize", "Randomize the faces or edges during build");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "seed", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "seed", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Seed", "Seed for random if used");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
@@ -1033,59 +1033,59 @@ static void rna_def_modifier_mirror(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "MirrorModifier", "Modifier");
+ srna = RNA_def_struct(brna, "MirrorModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Mirror Modifier", "Mirroring modifier");
RNA_def_struct_sdna(srna, "MirrorModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_MIRROR);
- prop= RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_AXIS_X);
RNA_def_property_ui_text(prop, "X", "Enable X axis mirror");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_AXIS_Y);
RNA_def_property_ui_text(prop, "Y", "Enable Y axis mirror");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_AXIS_Z);
RNA_def_property_ui_text(prop, "Z", "Enable Z axis mirror");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_clip", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_clip", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_CLIPPING);
RNA_def_property_ui_text(prop, "Clip", "Prevent vertices from going through the mirror during transform");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_mirror_vertex_groups", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_mirror_vertex_groups", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_VGROUP);
RNA_def_property_ui_text(prop, "Mirror Vertex Groups", "Mirror vertex groups (e.g. .R->.L)");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_mirror_merge", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_mirror_merge", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", MOD_MIR_NO_MERGE);
RNA_def_property_ui_text(prop, "Merge Vertices", "Merge vertices within the merge threshold");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_mirror_u", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_mirror_u", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_MIRROR_U);
RNA_def_property_ui_text(prop, "Mirror U", "Mirror the U texture coordinate around the 0.5 point");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_mirror_v", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_mirror_v", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MIR_MIRROR_V);
RNA_def_property_ui_text(prop, "Mirror V", "Mirror the V texture coordinate around the 0.5 point");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "merge_threshold", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "merge_threshold", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "tolerance");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 1, 0.01, 6);
RNA_def_property_ui_text(prop, "Merge Limit", "Distance from axis within which mirrored vertices are merged");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "mirror_object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "mirror_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "mirror_ob");
RNA_def_property_ui_text(prop, "Mirror Object", "Object to use as mirror");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
@@ -1097,19 +1097,19 @@ static void rna_def_modifier_decimate(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "DecimateModifier", "Modifier");
+ srna = RNA_def_struct(brna, "DecimateModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Decimate Modifier", "Decimation modifier");
RNA_def_struct_sdna(srna, "DecimateModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_DECIM);
- prop= RNA_def_property(srna, "ratio", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "ratio", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "percent");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_range(prop, 0, 1, 1, 2);
RNA_def_property_ui_text(prop, "Ratio", "Ratio of triangles to reduce to");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "face_count", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "face_count", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "faceCount");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Face Count", "The current number of faces in the decimated mesh");
@@ -1120,116 +1120,116 @@ static void rna_def_modifier_wave(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "WaveModifier", "Modifier");
+ srna = RNA_def_struct(brna, "WaveModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Wave Modifier", "Wave effect modifier");
RNA_def_struct_sdna(srna, "WaveModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_WAVE);
- prop= RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_X);
RNA_def_property_ui_text(prop, "X", "X axis motion");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_Y);
RNA_def_property_ui_text(prop, "Y", "Y axis motion");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_cyclic", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_cyclic", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_CYCL);
RNA_def_property_ui_text(prop, "Cyclic", "Cyclic wave effect");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_normal", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_NORM);
RNA_def_property_ui_text(prop, "Normals", "Displace along normals");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_normal_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_normal_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_NORM_X);
RNA_def_property_ui_text(prop, "X Normal", "Enable displacement along the X normal");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_normal_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_normal_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_NORM_Y);
RNA_def_property_ui_text(prop, "Y Normal", "Enable displacement along the Y normal");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_normal_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_normal_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WAVE_NORM_Z);
RNA_def_property_ui_text(prop, "Z Normal", "Enable displacement along the Z normal");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "time_offset", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "time_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "timeoffs");
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Time Offset", "Either the starting frame (for positive speed) or ending frame (for negative speed.)");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "lifetime", PROP_FLOAT, PROP_TIME);
+ prop = RNA_def_property(srna, "lifetime", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "lifetime");
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Lifetime", "Lifetime of the wave in frames, zero means infinite");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "damping_time", PROP_FLOAT, PROP_TIME);
+ prop = RNA_def_property(srna, "damping_time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "damp");
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Damping Time", "Number of frames in which the wave damps out after it dies");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "falloff_radius", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "falloff_radius", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "falloff");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 100, 100, 2);
RNA_def_property_ui_text(prop, "Falloff Radius", "Distance after which it fades out");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "start_position_x", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "start_position_x", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "startx");
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -100, 100, 100, 2);
RNA_def_property_ui_text(prop, "Start Position X", "X coordinate of the start position");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "start_position_y", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "start_position_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "starty");
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -100, 100, 100, 2);
RNA_def_property_ui_text(prop, "Start Position Y", "Y coordinate of the start position");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "start_position_object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "start_position_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "objectcenter");
RNA_def_property_ui_text(prop, "Start Position Object", "Object which defines the wave center");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
- prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name for modulating the wave");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WaveModifier_vgroup_set");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "speed", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -1, 1, 10, 2);
RNA_def_property_ui_text(prop, "Speed", "Speed of the wave, towards the starting point when negative");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "height", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -2, 2, 10, 2);
RNA_def_property_ui_text(prop, "Height", "Height of the wave");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "width", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "width", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 5, 10, 2);
RNA_def_property_ui_text(prop, "Width", "Distance between the waves");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "narrowness", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "narrowness", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "narrow");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 10, 10, 2);
@@ -1244,44 +1244,44 @@ static void rna_def_modifier_armature(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ArmatureModifier", "Modifier");
+ srna = RNA_def_struct(brna, "ArmatureModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Armature Modifier", "Armature deformation modifier");
RNA_def_struct_sdna(srna, "ArmatureModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_ARMATURE);
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Object", "Armature object to deform with");
RNA_def_property_pointer_funcs(prop, NULL, "rna_ArmatureModifier_object_set", NULL, "rna_Armature_object_poll");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
- prop= RNA_def_property(srna, "use_bone_envelopes", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_bone_envelopes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_ENVELOPE);
RNA_def_property_ui_text(prop, "Use Bone Envelopes", "Bind Bone envelopes to armature modifier");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_vertex_groups", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_vertex_groups", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_VGROUP);
RNA_def_property_ui_text(prop, "Use Vertex Groups", "Bind vertex groups to armature modifier");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_deform_preserve_volume", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_deform_preserve_volume", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_QUATERNION);
RNA_def_property_ui_text(prop, "Preserve Volume", "Deform rotation interpolation with quaternions");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_multi_modifier", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_multi_modifier", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "multi", 0);
RNA_def_property_ui_text(prop, "Multi Modifier", "Use same input as previous modifier, and mix results using overall vgroup");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Name of Vertex Group which determines influence of modifier per point");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_ArmatureModifier_vgroup_set");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_INVERT_VGROUP);
RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
@@ -1292,33 +1292,33 @@ static void rna_def_modifier_hook(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "HookModifier", "Modifier");
+ srna = RNA_def_struct(brna, "HookModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Hook Modifier", "Hook modifier to modify the location of vertices");
RNA_def_struct_sdna(srna, "HookModifierData");
RNA_def_struct_ui_icon(srna, ICON_HOOK);
- prop= RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 100, 100, 2);
RNA_def_property_ui_text(prop, "Falloff", "If not zero, the distance from the hook where influence ends");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "force", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "force", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Force", "Relative force of the hook");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Object", "Parent Object for hook, also recalculates and clears offset");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
- prop= RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "subtarget", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "subtarget");
RNA_def_property_ui_text(prop, "Sub-Target", "Name of Parent Bone for hook (if applicable), also recalculates and clears offset");
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
- prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Vertex Group", "Name of Vertex Group which determines influence of modifier per point");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_HookModifier_vgroup_set");
@@ -1330,18 +1330,18 @@ static void rna_def_modifier_softbody(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "SoftBodyModifier", "Modifier");
+ srna = RNA_def_struct(brna, "SoftBodyModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Soft Body Modifier", "Soft body simulation modifier");
RNA_def_struct_sdna(srna, "SoftbodyModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_SOFT);
- prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "SoftBodySettings");
RNA_def_property_pointer_funcs(prop, "rna_SoftBodyModifier_settings_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Soft Body Settings", "");
- prop= RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "PointCache");
RNA_def_property_pointer_funcs(prop, "rna_SoftBodyModifier_point_cache_get", NULL, NULL, NULL);
@@ -1359,18 +1359,18 @@ static void rna_def_modifier_boolean(BlenderRNA *brna)
{eBooleanModifierOp_Difference, "DIFFERENCE", 0, "Difference", "Combine two meshes in a subtractive way"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "BooleanModifier", "Modifier");
+ srna = RNA_def_struct(brna, "BooleanModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Boolean Modifier", "Boolean operations modifier");
RNA_def_struct_sdna(srna, "BooleanModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_BOOLEAN);
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Object", "Mesh object to use for Boolean operation");
RNA_def_property_pointer_funcs(prop, NULL, "rna_BooleanModifier_object_set", NULL, "rna_Mesh_object_poll");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
- prop= RNA_def_property(srna, "operation", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "operation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_operation_items);
RNA_def_property_ui_text(prop, "Operation", "");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
@@ -1387,31 +1387,31 @@ static void rna_def_modifier_array(BlenderRNA *brna)
{MOD_ARR_FITCURVE, "FIT_CURVE", 0, "Fit Curve", "Fit the duplicated objects to a curve"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "ArrayModifier", "Modifier");
+ srna = RNA_def_struct(brna, "ArrayModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Array Modifier", "Array duplication modifier");
RNA_def_struct_sdna(srna, "ArrayModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_ARRAY);
/* Length parameters */
- prop= RNA_def_property(srna, "fit_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "fit_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_fit_type_items);
RNA_def_property_ui_text(prop, "Fit Type", "Array length calculation method");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "count", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "count", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1, INT_MAX);
RNA_def_property_ui_range(prop, 1, 1000, 1, 0);
RNA_def_property_ui_text(prop, "Count", "Number of duplicates to make");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "fit_length", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "fit_length", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "length");
RNA_def_property_range(prop, 0, INT_MAX);
RNA_def_property_ui_range(prop, 0, 10000, 10, 2);
RNA_def_property_ui_text(prop, "Length", "Length to fit array within");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "curve", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "curve", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "curve_ob");
RNA_def_property_ui_text(prop, "Curve", "Curve object to fit array length to");
RNA_def_property_pointer_funcs(prop, NULL, "rna_ArrayModifier_curve_set", NULL, "rna_Curve_object_poll");
@@ -1419,38 +1419,38 @@ static void rna_def_modifier_array(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
/* Offset parameters */
- prop= RNA_def_property(srna, "use_constant_offset", PROP_BOOLEAN, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "use_constant_offset", PROP_BOOLEAN, PROP_TRANSLATION);
RNA_def_property_boolean_sdna(prop, NULL, "offset_type", MOD_ARR_OFF_CONST);
RNA_def_property_ui_text(prop, "Constant Offset", "Add a constant offset");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "constant_offset_displace", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "constant_offset_displace", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "offset");
RNA_def_property_ui_text(prop, "Constant Offset Displacement", "Value for the distance between arrayed items");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_relative_offset", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_relative_offset", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "offset_type", MOD_ARR_OFF_RELATIVE);
RNA_def_property_ui_text(prop, "Relative Offset", "Add an offset relative to the object's bounding box");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "relative_offset_displace", PROP_FLOAT, PROP_NONE); /* PROP_TRANSLATION causes units to be used which we dont want */
+ prop = RNA_def_property(srna, "relative_offset_displace", PROP_FLOAT, PROP_NONE); /* PROP_TRANSLATION causes units to be used which we dont want */
RNA_def_property_float_sdna(prop, NULL, "scale");
RNA_def_property_ui_text(prop, "Relative Offset Displacement", "The size of the geometry will determine the distance between arrayed items");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
/* Vertex merging parameters */
- prop= RNA_def_property(srna, "use_merge_vertices", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_merge_vertices", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_ARR_MERGE);
RNA_def_property_ui_text(prop, "Merge Vertices", "Merge vertices in adjacent duplicates");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_merge_vertices_cap", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_merge_vertices_cap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_ARR_MERGEFINAL);
RNA_def_property_ui_text(prop, "Merge Vertices", "Merge vertices in first and last duplicates");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "merge_threshold", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "merge_threshold", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "merge_dist");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 1, 1, 4);
@@ -1458,25 +1458,25 @@ static void rna_def_modifier_array(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Modifier_update");
/* Offset object */
- prop= RNA_def_property(srna, "use_object_offset", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_object_offset", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "offset_type", MOD_ARR_OFF_OBJ);
RNA_def_property_ui_text(prop, "Object Offset", "Add another object's transformation to the total offset");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "offset_object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "offset_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "offset_ob");
RNA_def_property_ui_text(prop, "Object Offset", "Use the location and rotation of another object to determine the distance and rotational change between arrayed items");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
/* Caps */
- prop= RNA_def_property(srna, "start_cap", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "start_cap", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Start Cap", "Mesh object to use as a start cap");
RNA_def_property_pointer_funcs(prop, NULL, "rna_ArrayModifier_start_cap_set", NULL, "rna_Mesh_object_poll");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "end_cap", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "end_cap", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "End Cap", "Mesh object to use as an end cap");
RNA_def_property_pointer_funcs(prop, NULL, "rna_ArrayModifier_end_cap_set", NULL, "rna_Mesh_object_poll");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
@@ -1488,30 +1488,30 @@ static void rna_def_modifier_edgesplit(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "EdgeSplitModifier", "Modifier");
+ srna = RNA_def_struct(brna, "EdgeSplitModifier", "Modifier");
RNA_def_struct_ui_text(srna, "EdgeSplit Modifier", "Edge splitting modifier to create sharp edges");
RNA_def_struct_sdna(srna, "EdgeSplitModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_EDGESPLIT);
#if 1 /* expose as radians */
- prop= RNA_def_property(srna, "split_angle", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "split_angle", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_funcs(prop, "rna_EdgeSplitModifier_split_angle_get", "rna_EdgeSplitModifier_split_angle_set", NULL);
RNA_def_property_range(prop, 0, DEG2RAD(180));
RNA_def_property_ui_range(prop, 0, DEG2RAD(180), 100, 2);
#else
- prop= RNA_def_property(srna, "split_angle", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "split_angle", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0, 180);
RNA_def_property_ui_range(prop, 0, 180, 100, 2);
#endif
RNA_def_property_ui_text(prop, "Split Angle", "Angle above which to split edges");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_edge_angle", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_edge_angle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_EDGESPLIT_FROMANGLE);
RNA_def_property_ui_text(prop, "Use Edge Angle", "Split edges with high angle between faces");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_edge_sharp", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_edge_sharp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_EDGESPLIT_FROMFLAG);
RNA_def_property_ui_text(prop, "Use Sharp Edges", "Split edges that are marked as sharp");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
@@ -1530,31 +1530,31 @@ static void rna_def_modifier_displace(BlenderRNA *brna)
{MOD_DISP_DIR_RGB_XYZ, "RGB_TO_XYZ", 0, "RGB to XYZ", "Use the texture's RGB values to displace the mesh in the XYZ direction"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "DisplaceModifier", "Modifier");
+ srna = RNA_def_struct(brna, "DisplaceModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Displace Modifier", "Displacement modifier");
RNA_def_struct_sdna(srna, "DisplaceModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_DISPLACE);
- prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Name of Vertex Group which determines influence of modifier per point");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_DisplaceModifier_vgroup_set");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "mid_level", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "mid_level", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "midlevel");
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Midlevel", "Material value that gives no displacement");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -100, 100, 10, 3);
RNA_def_property_ui_text(prop, "Strength", "Amount to displace geometry");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_direction_items);
RNA_def_property_ui_text(prop, "Direction", "");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
@@ -1567,71 +1567,71 @@ static void rna_def_modifier_uvproject(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "UVProjectModifier", "Modifier");
+ srna = RNA_def_struct(brna, "UVProjectModifier", "Modifier");
RNA_def_struct_ui_text(srna, "UV Project Modifier", "UV projection modifier to set UVs from a projector");
RNA_def_struct_sdna(srna, "UVProjectModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_UVPROJECT);
- prop= RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "uvlayer_name");
RNA_def_property_ui_text(prop, "UV Map", "UV map name");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_UVProjectModifier_uvlayer_set");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "projector_count", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "projector_count", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "num_projectors");
RNA_def_property_ui_text(prop, "Number of Projectors", "Number of projectors to use");
RNA_def_property_int_funcs(prop, NULL, "rna_UVProjectModifier_num_projectors_set", NULL);
RNA_def_property_range(prop, 1, MOD_UVPROJECT_MAX);
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "projectors", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "projectors", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "UVProjector");
RNA_def_property_collection_funcs(prop, "rna_UVProject_projectors_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", NULL, NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Projectors", "");
- prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Image", "");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "aspect_x", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "aspect_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aspectx");
RNA_def_property_range(prop, 1, FLT_MAX);
RNA_def_property_ui_range(prop, 1, 1000, 1, 3);
RNA_def_property_ui_text(prop, "Horizontal Aspect Ratio", "");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "aspect_y", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "aspect_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aspecty");
RNA_def_property_range(prop, 1, FLT_MAX);
RNA_def_property_ui_range(prop, 1, 1000, 1, 3);
RNA_def_property_ui_text(prop, "Vertical Aspect Ratio", "");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "scale_x", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "scale_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "scalex");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 1000, 1, 3);
RNA_def_property_ui_text(prop, "Horizontal Scale", "");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "scale_y", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "scale_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "scaley");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 1000, 1, 3);
RNA_def_property_ui_text(prop, "Vertical Scale", "");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_image_override", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_image_override", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_UVPROJECT_OVERRIDEIMAGE);
RNA_def_property_ui_text(prop, "Override Image", "Override faces' current images with the given image");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- srna= RNA_def_struct(brna, "UVProjector", NULL);
+ srna = RNA_def_struct(brna, "UVProjector", NULL);
RNA_def_struct_ui_text(srna, "UVProjector", "UV projector used by the UV project modifier");
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_pointer_funcs(prop, "rna_UVProjector_object_get", "rna_UVProjector_object_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
@@ -1644,40 +1644,40 @@ static void rna_def_modifier_smooth(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "SmoothModifier", "Modifier");
+ srna = RNA_def_struct(brna, "SmoothModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Smooth Modifier", "Smoothing effect modifier");
RNA_def_struct_sdna(srna, "SmoothModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_SMOOTH);
- prop= RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SMOOTH_X);
RNA_def_property_ui_text(prop, "X", "Smooth object along X axis");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SMOOTH_Y);
RNA_def_property_ui_text(prop, "Y", "Smooth object along Y axis");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SMOOTH_Z);
RNA_def_property_ui_text(prop, "Z", "Smooth object along Z axis");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fac");
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -10, 10, 1, 3);
RNA_def_property_ui_text(prop, "Factor", "Strength of modifier effect");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "iterations", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "iterations", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "repeat");
RNA_def_property_ui_range(prop, 0, 30, 1, 0);
RNA_def_property_ui_text(prop, "Repeat", "");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Name of Vertex Group which determines influence of modifier per point");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SmoothModifier_vgroup_set");
@@ -1695,68 +1695,68 @@ static void rna_def_modifier_cast(BlenderRNA *brna)
{MOD_CAST_TYPE_CUBOID, "CUBOID", 0, "Cuboid", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "CastModifier", "Modifier");
+ srna = RNA_def_struct(brna, "CastModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Cast Modifier", "Modifier to cast to other shapes");
RNA_def_struct_sdna(srna, "CastModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_CAST);
- prop= RNA_def_property(srna, "cast_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "cast_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_cast_type_items);
RNA_def_property_ui_text(prop, "Cast Type", "Target object shape");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Object", "Control object: if available, its location determines the center of the effect");
RNA_def_property_pointer_funcs(prop, NULL, "rna_CastModifier_object_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
- prop= RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_X);
RNA_def_property_ui_text(prop, "X", "");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_Y);
RNA_def_property_ui_text(prop, "Y", "");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_Z);
RNA_def_property_ui_text(prop, "Z", "");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_radius_as_size", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_radius_as_size", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_SIZE_FROM_RADIUS);
RNA_def_property_ui_text(prop, "From Radius", "Use radius as size of projection shape (0 = auto)");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_transform", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_transform", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_USE_OB_TRANSFORM);
RNA_def_property_ui_text(prop, "Use transform", "Use object transform to control projection shape");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fac");
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -10, 10, 5, 2);
RNA_def_property_ui_text(prop, "Factor", "");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "radius", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 100, 5, 2);
RNA_def_property_ui_text(prop, "Radius", "Only deform vertices within this distance from the center of the effect (leave as 0 for infinite.)");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 100, 5, 2);
RNA_def_property_ui_text(prop, "Size", "Size of projection shape (leave as 0 for auto)");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_CastModifier_vgroup_set");
@@ -1774,46 +1774,46 @@ static void rna_def_modifier_meshdeform(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
#endif
- srna= RNA_def_struct(brna, "MeshDeformModifier", "Modifier");
+ srna = RNA_def_struct(brna, "MeshDeformModifier", "Modifier");
RNA_def_struct_ui_text(srna, "MeshDeform Modifier", "Mesh deformation modifier to deform with other meshes");
RNA_def_struct_sdna(srna, "MeshDeformModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_MESHDEFORM);
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Object", "Mesh object to deform with");
RNA_def_property_pointer_funcs(prop, NULL, "rna_MeshDeformModifier_object_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
- prop= RNA_def_property(srna, "is_bound", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_bound", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_MeshDeformModifier_is_bound_get", NULL);
RNA_def_property_ui_text(prop, "Bound", "Whether geometry has been bound to control cage");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MDEF_INVERT_VGROUP);
RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MeshDeformModifier_vgroup_set");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "precision", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "precision", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gridsize");
RNA_def_property_range(prop, 2, 10);
RNA_def_property_ui_text(prop, "Precision", "The grid size for binding");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_dynamic_bind", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_dynamic_bind", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MDEF_DYNAMIC_BIND);
RNA_def_property_ui_text(prop, "Dynamic", "Recompute binding dynamically on top of other deformers (slower and more memory consuming)");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
#if 0
- prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_mode_items);
RNA_def_property_ui_text(prop, "Mode", "Method of binding vertices are bound to cage mesh");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
@@ -1825,12 +1825,12 @@ static void rna_def_modifier_particlesystem(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ParticleSystemModifier", "Modifier");
+ srna = RNA_def_struct(brna, "ParticleSystemModifier", "Modifier");
RNA_def_struct_ui_text(srna, "ParticleSystem Modifier", "Particle system simulation modifier");
RNA_def_struct_sdna(srna, "ParticleSystemModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_PARTICLES);
- prop= RNA_def_property(srna, "particle_system", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "particle_system", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "psys");
RNA_def_property_ui_text(prop, "Particle System", "Particle System that this modifier controls");
@@ -1848,76 +1848,76 @@ static void rna_def_modifier_particleinstance(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- srna= RNA_def_struct(brna, "ParticleInstanceModifier", "Modifier");
+ srna = RNA_def_struct(brna, "ParticleInstanceModifier", "Modifier");
RNA_def_struct_ui_text(srna, "ParticleInstance Modifier", "Particle system instancing modifier");
RNA_def_struct_sdna(srna, "ParticleInstanceModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_PARTICLES);
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ob");
RNA_def_property_ui_text(prop, "Object", "Object that has the particle system");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
- prop= RNA_def_property(srna, "particle_system_index", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "particle_system_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "psys");
RNA_def_property_range(prop, 1, 10);
RNA_def_property_ui_text(prop, "Particle System Number", "");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "axis");
RNA_def_property_enum_items(prop, particleinstance_axis);
RNA_def_property_ui_text(prop, "Axis", "Pole axis for rotation");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_normal", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Parents);
RNA_def_property_ui_text(prop, "Normal", "Create instances from normal particles");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_children", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_children", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Children);
RNA_def_property_ui_text(prop, "Children", "Create instances from child particles");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_path", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_path", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Path);
RNA_def_property_ui_text(prop, "Path", "Create instances along particle paths");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "show_unborn", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_unborn", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Unborn);
RNA_def_property_ui_text(prop, "Unborn", "Show instances when particles are unborn");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "show_alive", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_alive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Alive);
RNA_def_property_ui_text(prop, "Alive", "Show instances when particles are alive");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "show_dead", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_dead", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_Dead);
RNA_def_property_ui_text(prop, "Dead", "Show instances when particles are dead");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_preserve_shape", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_preserve_shape", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_KeepShape);
RNA_def_property_ui_text(prop, "Keep Shape", "Don't stretch the object");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_size", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_size", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eParticleInstanceFlag_UseSize);
RNA_def_property_ui_text(prop, "Size", "Use particle size to scale the instances");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "position", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "position", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "position");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Position", "Position along path");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "random_position", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "random_position", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "random_position");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Random Position", "Randomize position along path");
@@ -1929,46 +1929,46 @@ static void rna_def_modifier_explode(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ExplodeModifier", "Modifier");
+ srna = RNA_def_struct(brna, "ExplodeModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Explode Modifier", "Explosion effect modifier based on a particle system");
RNA_def_struct_sdna(srna, "ExplodeModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_EXPLODE);
- prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ExplodeModifier_vgroup_get", "rna_ExplodeModifier_vgroup_length", "rna_ExplodeModifier_vgroup_set");
RNA_def_property_ui_text(prop, "Vertex Group", "");
- prop= RNA_def_property(srna, "protect", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "protect", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Protect", "Clean vertex group edges");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_edge_cut", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_edge_cut", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eExplodeFlag_EdgeCut);
RNA_def_property_ui_text(prop, "Cut Edges", "Cut face edges for nicer shrapnel");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "show_unborn", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_unborn", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eExplodeFlag_Unborn);
RNA_def_property_ui_text(prop, "Unborn", "Show mesh when particles are unborn");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "show_alive", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_alive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eExplodeFlag_Alive);
RNA_def_property_ui_text(prop, "Alive", "Show mesh when particles are alive");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "show_dead", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_dead", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eExplodeFlag_Dead);
RNA_def_property_ui_text(prop, "Dead", "Show mesh when particles are dead");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_size", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_size", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", eExplodeFlag_PaSize);
RNA_def_property_ui_text(prop, "Size", "Use particle size for the shrapnel");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "particle_uv", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "particle_uv", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "uvname");
RNA_def_property_string_maxlength(prop, MAX_CUSTOMDATA_LAYER_NAME);
RNA_def_property_ui_text(prop, "Particle UV", "UV map to change with particle age");
@@ -1980,22 +1980,22 @@ static void rna_def_modifier_cloth(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ClothModifier", "Modifier");
+ srna = RNA_def_struct(brna, "ClothModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Cloth Modifier", "Cloth simulation modifier");
RNA_def_struct_sdna(srna, "ClothModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_CLOTH);
- prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "sim_parms");
RNA_def_property_ui_text(prop, "Cloth Settings", "");
- prop= RNA_def_property(srna, "collision_settings", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "collision_settings", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "coll_parms");
RNA_def_property_ui_text(prop, "Cloth Collision Settings", "");
- prop= RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Point Cache", "");
}
@@ -2012,24 +2012,24 @@ static void rna_def_modifier_smoke(BlenderRNA *brna)
{MOD_SMOKE_TYPE_COLL, "COLLISION", 0, "Collision", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "SmokeModifier", "Modifier");
+ srna = RNA_def_struct(brna, "SmokeModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Smoke Modifier", "Smoke simulation modifier");
RNA_def_struct_sdna(srna, "SmokeModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_SMOKE);
- prop= RNA_def_property(srna, "domain_settings", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "domain_settings", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "domain");
RNA_def_property_ui_text(prop, "Domain Settings", "");
- prop= RNA_def_property(srna, "flow_settings", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "flow_settings", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "flow");
RNA_def_property_ui_text(prop, "Flow Settings", "");
- prop= RNA_def_property(srna, "coll_settings", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "coll_settings", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "coll");
RNA_def_property_ui_text(prop, "Collision Settings", "");
- prop= RNA_def_property(srna, "smoke_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "smoke_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_smoke_type_items);
RNA_def_property_ui_text(prop, "Type", "");
@@ -2041,20 +2041,20 @@ static void rna_def_modifier_dynamic_paint(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "DynamicPaintModifier", "Modifier");
+ srna = RNA_def_struct(brna, "DynamicPaintModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Dynamic Paint Modifier", "Dynamic Paint modifier");
RNA_def_struct_sdna(srna, "DynamicPaintModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_DYNAMICPAINT);
- prop= RNA_def_property(srna, "canvas_settings", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "canvas_settings", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "canvas");
RNA_def_property_ui_text(prop, "Canvas Settings", "");
- prop= RNA_def_property(srna, "brush_settings", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "brush_settings", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "brush");
RNA_def_property_ui_text(prop, "Brush Settings", "");
- prop= RNA_def_property(srna, "ui_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "ui_type", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_dynamicpaint_type_items);
@@ -2066,12 +2066,12 @@ static void rna_def_modifier_collision(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "CollisionModifier", "Modifier");
+ srna = RNA_def_struct(brna, "CollisionModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Collision Modifier", "Collision modifier defining modifier stack position used for collision");
RNA_def_struct_sdna(srna, "CollisionModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_PHYSICS);
- prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "CollisionSettings");
RNA_def_property_pointer_funcs(prop, "rna_CollisionModifier_settings_get", NULL, NULL, NULL);
@@ -2095,42 +2095,42 @@ static void rna_def_modifier_bevel(BlenderRNA *brna)
{BME_BEVEL_EMAX, "LARGEST", 0, "Largest", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "BevelModifier", "Modifier");
+ srna = RNA_def_struct(brna, "BevelModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Bevel Modifier", "Bevel modifier to make edges and vertices more rounded");
RNA_def_struct_sdna(srna, "BevelModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_BEVEL);
- prop= RNA_def_property(srna, "width", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "width", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "value");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 10, 0.1, 4);
RNA_def_property_ui_text(prop, "Width", "Bevel value/amount");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_only_vertices", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_only_vertices", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", BME_BEVEL_VERT);
RNA_def_property_ui_text(prop, "Only Vertices", "Bevel verts/corners, not edges");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "limit_method", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "limit_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "lim_flags");
RNA_def_property_enum_items(prop, prop_limit_method_items);
RNA_def_property_ui_text(prop, "Limit Method", "");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "edge_weight_method", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "edge_weight_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "e_flags");
RNA_def_property_enum_items(prop, prop_edge_weight_method_items);
RNA_def_property_ui_text(prop, "Edge Weight Method", "What edge weight to use for weighting a vertex");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
#if 1 /* expose as radians */
- prop= RNA_def_property(srna, "angle_limit", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "angle_limit", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_funcs(prop, "rna_BevelModifier_angle_limit_get", "rna_BevelModifier_angle_limit_set", NULL);
RNA_def_property_range(prop, 0, DEG2RAD(180));
RNA_def_property_ui_range(prop, 0, DEG2RAD(180), 100, 2);
#else
- prop= RNA_def_property(srna, "angle_limit", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "angle_limit", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bevel_angle");
RNA_def_property_range(prop, 0, 180);
RNA_def_property_ui_range(prop, 0, 180, 100, 2);
@@ -2139,12 +2139,12 @@ static void rna_def_modifier_bevel(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Modifier_update");
/* BMESH_BRANCH ONLY */
- prop= RNA_def_property(srna, "use_even_offset", PROP_BOOLEAN, PROP_NONE); /* name matches solidify */
+ prop = RNA_def_property(srna, "use_even_offset", PROP_BOOLEAN, PROP_NONE); /* name matches solidify */
RNA_def_property_boolean_sdna(prop, NULL, "flags", BME_BEVEL_EVEN);
RNA_def_property_ui_text(prop, "Even", "Use even bevel distance correction");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
/* BMESH_BRANCH ONLY */
- prop= RNA_def_property(srna, "use_distance_offset", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_distance_offset", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", BME_BEVEL_DIST);
RNA_def_property_ui_text(prop, "Distance", "Use the width as a distance in rather then a factor of the face size");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
@@ -2169,83 +2169,83 @@ static void rna_def_modifier_shrinkwrap(BlenderRNA *brna)
{MOD_SHRINKWRAP_CULL_TARGET_BACKFACE, "BACK", 0, "Back", "No projection when behind the face"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "ShrinkwrapModifier", "Modifier");
+ srna = RNA_def_struct(brna, "ShrinkwrapModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Shrinkwrap Modifier", "Shrink wrapping modifier to shrink wrap and object to a target");
RNA_def_struct_sdna(srna, "ShrinkwrapModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_SHRINKWRAP);
- prop= RNA_def_property(srna, "wrap_method", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "wrap_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "shrinkType");
RNA_def_property_enum_items(prop, shrink_type_items);
RNA_def_property_ui_text(prop, "Mode", "");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "cull_face", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "cull_face", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "shrinkOpts");
RNA_def_property_enum_items(prop, shrink_face_cull_items);
RNA_def_property_enum_funcs(prop, "rna_ShrinkwrapModifier_face_cull_get", "rna_ShrinkwrapModifier_face_cull_set", NULL);
RNA_def_property_ui_text(prop, "Face Cull", "Stop vertices from projecting to a face on the target when facing towards/away");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Target", "Mesh target to shrink to");
RNA_def_property_pointer_funcs(prop, NULL, "rna_ShrinkwrapModifier_target_set", NULL, "rna_Mesh_object_poll");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
- prop= RNA_def_property(srna, "auxiliary_target", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "auxiliary_target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "auxTarget");
RNA_def_property_ui_text(prop, "Auxiliary Target", "Additional mesh target to shrink to");
RNA_def_property_pointer_funcs(prop, NULL, "rna_ShrinkwrapModifier_auxiliary_target_set", NULL, "rna_Mesh_object_poll");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
- prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "vgroup_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_ShrinkwrapModifier_vgroup_set");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "keepDist");
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -100, 100, 1, 2);
RNA_def_property_ui_text(prop, "Offset", "Distance to keep from the target");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_project_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_project_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "projAxis", MOD_SHRINKWRAP_PROJECT_OVER_X_AXIS);
RNA_def_property_ui_text(prop, "X", "");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_project_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_project_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "projAxis", MOD_SHRINKWRAP_PROJECT_OVER_Y_AXIS);
RNA_def_property_ui_text(prop, "Y", "");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_project_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_project_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "projAxis", MOD_SHRINKWRAP_PROJECT_OVER_Z_AXIS);
RNA_def_property_ui_text(prop, "Z", "");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "subsurf_levels", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "subsurf_levels", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "subsurfLevels");
RNA_def_property_range(prop, 0, 6);
RNA_def_property_ui_range(prop, 0, 6, 1, 0);
RNA_def_property_ui_text(prop, "Subsurf Levels", "Number of subdivisions that must be performed before extracting vertices' positions and normals");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_negative_direction", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_negative_direction", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shrinkOpts", MOD_SHRINKWRAP_PROJECT_ALLOW_NEG_DIR);
RNA_def_property_ui_text(prop, "Negative", "Allow vertices to move in the negative direction of axis");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_positive_direction", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_positive_direction", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shrinkOpts", MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR);
RNA_def_property_ui_text(prop, "Positive", "Allow vertices to move in the positive direction of axis");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_keep_above_surface", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_keep_above_surface", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shrinkOpts", MOD_SHRINKWRAP_KEEP_ABOVE_SURFACE);
RNA_def_property_ui_text(prop, "Keep Above Surface", "");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
@@ -2256,12 +2256,12 @@ static void rna_def_modifier_fluidsim(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "FluidSimulationModifier", "Modifier");
+ srna = RNA_def_struct(brna, "FluidSimulationModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Fluid Simulation Modifier", "Fluid simulation modifier");
RNA_def_struct_sdna(srna, "FluidsimModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_FLUIDSIM);
- prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "fss");
RNA_def_property_ui_text(prop, "Settings", "Settings for how this object is used in the fluid simulation");
@@ -2277,30 +2277,30 @@ static void rna_def_modifier_mask(BlenderRNA *brna)
{MOD_MASK_MODE_ARM, "ARMATURE", 0, "Armature", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "MaskModifier", "Modifier");
+ srna = RNA_def_struct(brna, "MaskModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Mask Modifier", "Mask modifier to hide parts of the mesh");
RNA_def_struct_sdna(srna, "MaskModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_MASK);
- prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, modifier_mask_mode_items);
RNA_def_property_ui_text(prop, "Mode", "");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "armature", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "armature", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ob_arm");
RNA_def_property_ui_text(prop, "Armature", "Armature to use as source of bones to mask");
RNA_def_property_pointer_funcs(prop, NULL, "rna_MaskModifier_armature_set", NULL, "rna_Armature_object_poll");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
- prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "vgroup");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_MaskModifier_vgroup_set");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_MASK_INV);
RNA_def_property_ui_text(prop, "Invert", "Use vertices that are not part of region defined");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
@@ -2318,40 +2318,40 @@ static void rna_def_modifier_simpledeform(BlenderRNA *brna)
{MOD_SIMPLEDEFORM_MODE_STRETCH, "STRETCH", 0, "Stretch", "Stretch the object along the Z axis of the modifier space"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "SimpleDeformModifier", "Modifier");
+ srna = RNA_def_struct(brna, "SimpleDeformModifier", "Modifier");
RNA_def_struct_ui_text(srna, "SimpleDeform Modifier", "Simple deformation modifier to apply effects such as twisting and bending");
RNA_def_struct_sdna(srna, "SimpleDeformModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_SIMPLEDEFORM);
- prop= RNA_def_property(srna, "deform_method", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "deform_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, simple_deform_mode_items);
RNA_def_property_ui_text(prop, "Mode", "");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "vgroup_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SimpleDeformModifier_vgroup_set");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "origin", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "origin", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Origin", "Origin of modifier space coordinates");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
- prop= RNA_def_property(srna, "use_relative", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_relative", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "originOpts", MOD_SIMPLEDEFORM_ORIGIN_LOCAL);
RNA_def_property_ui_text(prop, "Relative", "Set the origin of deform space to be relative to the object");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -10, 10, 1, 3);
RNA_def_property_ui_text(prop, "Factor", "Amount to deform object");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "limits", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "limits", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "limit");
RNA_def_property_array(prop, 2);
RNA_def_property_range(prop, 0, 1);
@@ -2359,12 +2359,12 @@ static void rna_def_modifier_simpledeform(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Limits", "Lower/Upper limits for deform");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "lock_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "axis", MOD_SIMPLEDEFORM_LOCK_AXIS_X);
RNA_def_property_ui_text(prop, "Lock X Axis", "Do not allow tapering along the X axis");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "lock_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "axis", MOD_SIMPLEDEFORM_LOCK_AXIS_Y);
RNA_def_property_ui_text(prop, "Lock Y Axis", "Do not allow tapering along the Y axis");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
@@ -2374,7 +2374,7 @@ static void rna_def_modifier_surface(BlenderRNA *brna)
{
StructRNA *srna;
- srna= RNA_def_struct(brna, "SurfaceModifier", "Modifier");
+ srna = RNA_def_struct(brna, "SurfaceModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Surface Modifier", "Surface modifier defining modifier stack position used for surface fields");
RNA_def_struct_sdna(srna, "SurfaceModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_PHYSICS);
@@ -2385,87 +2385,87 @@ static void rna_def_modifier_solidify(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "SolidifyModifier", "Modifier");
+ srna = RNA_def_struct(brna, "SolidifyModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Solidify Modifier", "Create a solid skin by extruding, compensating for sharp angles");
RNA_def_struct_sdna(srna, "SolidifyModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_SOLIDIFY);
- prop= RNA_def_property(srna, "thickness", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "thickness", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "offset");
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -10, 10, 0.1, 4);
RNA_def_property_ui_text(prop, "Thickness", "Thickness of the shell");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "thickness_vertex_group", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "thickness_vertex_group", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "offset_fac_vg");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_range(prop, 0, 1, 0.1, 3);
RNA_def_property_ui_text(prop, "Vertex Group Factor", "Thickness factor to use for zero vertex group influence");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "offset_fac");
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -1, 1, 0.1, 4);
RNA_def_property_ui_text(prop, "Offset", "Offset the thickness from the center");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "edge_crease_inner", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "edge_crease_inner", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "crease_inner");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_range(prop, 0, 1, 0.1, 3);
RNA_def_property_ui_text(prop, "Inner Crease", "Assign a crease to inner edges");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "edge_crease_outer", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "edge_crease_outer", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "crease_outer");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_range(prop, 0, 1, 0.1, 3);
RNA_def_property_ui_text(prop, "Outer Crease", "Assign a crease to outer edges");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "edge_crease_rim", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "edge_crease_rim", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "crease_rim");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_range(prop, 0, 1, 0.1, 3);
RNA_def_property_ui_text(prop, "Rim Crease", "Assign a crease to the edges making up the rim");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "material_offset", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "material_offset", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "mat_ofs");
RNA_def_property_range(prop, SHRT_MIN, SHRT_MAX);
RNA_def_property_ui_text(prop, "Material Offset", "Offset material index of generated faces");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "material_offset_rim", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "material_offset_rim", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "mat_ofs_rim");
RNA_def_property_range(prop, SHRT_MIN, SHRT_MAX);
RNA_def_property_ui_text(prop, "Rim Material Offset", "Offset material index of generated rim faces");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SolidifyModifier_vgroup_set");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_rim", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_rim", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SOLIDIFY_RIM);
RNA_def_property_ui_text(prop, "Fill Rim", "Create edge loops between the inner and outer surfaces on face edges (slow, disable when not needed)");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_even_offset", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_even_offset", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SOLIDIFY_EVEN);
RNA_def_property_ui_text(prop, "Even Thickness", "Maintain thickness by adjusting for sharp corners (slow, disable when not needed)");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_quality_normals", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_quality_normals", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SOLIDIFY_NORMAL_CALC);
RNA_def_property_ui_text(prop, "High Quality Normals", "Calculate normals which result in more even thickness (slow, disable when not needed)");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SOLIDIFY_VGROUP_INV);
RNA_def_property_ui_text(prop, "Vertex Group Invert", "Invert the vertex group influence");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
@@ -2475,7 +2475,7 @@ static void rna_def_modifier_solidify(BlenderRNA *brna)
static void rna_def_modifier_screw(BlenderRNA *brna)
{
- static EnumPropertyItem axis_items[]= {
+ static EnumPropertyItem axis_items[] = {
{0, "X", 0, "X Axis", ""},
{1, "Y", 0, "Y Axis", ""},
{2, "Z", 0, "Z Axis", ""},
@@ -2484,63 +2484,63 @@ static void rna_def_modifier_screw(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ScrewModifier", "Modifier");
+ srna = RNA_def_struct(brna, "ScrewModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Screw Modifier", "Revolve edges");
RNA_def_struct_sdna(srna, "ScrewModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_SCREW);
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ob_axis");
RNA_def_property_ui_text(prop, "Object", "Object to define the screw axis");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
- prop= RNA_def_property(srna, "steps", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "steps", PROP_INT, PROP_UNSIGNED);
RNA_def_property_range(prop, 2, 10000);
RNA_def_property_ui_range(prop, 3, 512, 1, 0);
RNA_def_property_ui_text(prop, "Steps", "Number of steps in the revolution");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "render_steps", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "render_steps", PROP_INT, PROP_UNSIGNED);
RNA_def_property_range(prop, 2, 10000);
RNA_def_property_ui_range(prop, 2, 512, 1, 0);
RNA_def_property_ui_text(prop, "Render Steps", "Number of steps in the revolution");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "iterations", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "iterations", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "iter");
RNA_def_property_range(prop, 1, 10000);
RNA_def_property_ui_range(prop, 1, 100, 1, 0);
RNA_def_property_ui_text(prop, "Iterations", "Number of times to apply the screw operation");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, axis_items);
RNA_def_property_ui_text(prop, "Axis", "Screw axis");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_ui_range(prop, 0, -M_PI*2, M_PI*2, 2);
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_text(prop, "Angle", "Angle of revolution");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "screw_offset", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "screw_offset", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "screw_ofs");
RNA_def_property_ui_text(prop, "Screw", "Offset the revolution along its axis");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_normal_flip", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_normal_flip", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SCREW_NORMAL_FLIP);
RNA_def_property_ui_text(prop, "Flip", "Flip normals of lathed faces");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_normal_calculate", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_normal_calculate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SCREW_NORMAL_CALC);
RNA_def_property_ui_text(prop, "Calc Order", "Calculate the order of edges (needed for meshes, but not curves)");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_object_screw_offset", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_object_screw_offset", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SCREW_OBJECT_OFFSET);
RNA_def_property_ui_text(prop, "Object Screw", "Use the distance between the objects to make a screw");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
@@ -2573,41 +2573,41 @@ static void rna_def_modifier_weightvg_mask(BlenderRNA *brna, StructRNA *srna)
PropertyRNA *prop;
- prop= RNA_def_property(srna, "mask_constant", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "mask_constant", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 0);
RNA_def_property_ui_text(prop, "Influence", "Global influence of current modifications on vgroup");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "mask_vertex_group", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "mask_vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "mask_defgrp_name");
RNA_def_property_ui_text(prop, "Mask VGroup", "Masking vertex group name");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGModifier_mask_vgroup_set");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "mask_texture", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "mask_texture", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Masking Tex", "Masking texture");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "mask_tex_use_channel", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mask_tex_use_channel", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, weightvg_mask_tex_used_items);
RNA_def_property_ui_text(prop, "Use Channel", "Which texture channel to use for masking");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "mask_tex_mapping", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mask_tex_mapping", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, weightvg_mask_tex_map_items);
RNA_def_property_ui_text(prop, "Texture Coordinates", "Which texture coordinates "
"to use for mapping");
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
- prop= RNA_def_property(srna, "mask_tex_uv_layer", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "mask_tex_uv_layer", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "mask_tex_uvlayer_name");
RNA_def_property_ui_text(prop, "UV Map", "UV map name");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGModifier_mask_uvlayer_set");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "mask_tex_map_object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "mask_tex_map_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "mask_tex_map_obj");
RNA_def_property_ui_text(prop, "Texture Coordinate Object", "Which object to take texture "
"coordinates from");
@@ -2632,48 +2632,48 @@ static void rna_def_modifier_weightvgedit(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "VertexWeightEditModifier", "Modifier");
+ srna = RNA_def_struct(brna, "VertexWeightEditModifier", "Modifier");
RNA_def_struct_ui_text(srna, "WeightVG Edit Modifier",
"Edit the weights of vertices in a group");
RNA_def_struct_sdna(srna, "WeightVGEditModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_VERTEX_WEIGHT);
- prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGModifier_vgroup_set");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, weightvg_edit_falloff_type_items);
RNA_def_property_ui_text(prop, "Falloff Type", "How weights are mapped to there new values");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_add", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_add", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_ADD2VG);
RNA_def_property_ui_text(prop, "Group Add", "Add vertices with weight over threshold "
"to vgroup");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "use_remove", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_remove", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_REMFVG);
RNA_def_property_ui_text(prop, "Group Remove", "Remove vertices with weight below threshold "
"from vgroup");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "default_weight", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "default_weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0f);
RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 0);
RNA_def_property_ui_text(prop, "Default Weight", "Default weight a vertex will have if "
"it is not in the vgroup");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "map_curve", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "map_curve", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "cmap_curve");
RNA_def_property_ui_text(prop, "Mapping Curve", "Custom mapping curve");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "add_threshold", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "add_threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "add_threshold");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 0);
@@ -2681,7 +2681,7 @@ static void rna_def_modifier_weightvgedit(BlenderRNA *brna)
"to be added to the vgroup");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "remove_threshold", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "remove_threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rem_threshold");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 0);
@@ -2716,45 +2716,45 @@ static void rna_def_modifier_weightvgmix(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "VertexWeightMixModifier", "Modifier");
+ srna = RNA_def_struct(brna, "VertexWeightMixModifier", "Modifier");
RNA_def_struct_ui_text(srna, "WeightVG Mix Modifier",
"Mix the weights of two vertex groups");
RNA_def_struct_sdna(srna, "WeightVGMixModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_VERTEX_WEIGHT);
- prop= RNA_def_property(srna, "vertex_group_a", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group_a", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "defgrp_name_a");
RNA_def_property_ui_text(prop, "Vertex Group A", "First vertex group name");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGModifier_vgroup_set");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "vertex_group_b", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group_b", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "defgrp_name_b");
RNA_def_property_ui_text(prop, "Vertex Group B", "Second vertex group name");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGMixModifier_vgroup2_set");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "default_weight_a", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "default_weight_a", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0f);
RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 0);
RNA_def_property_ui_text(prop, "Default Weight A", "Default weight a vertex will have if "
"it is not in the first A vgroup");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "default_weight_b", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "default_weight_b", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 1.0f);
RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 0);
RNA_def_property_ui_text(prop, "Default Weight B", "Default weight a vertex will have if "
"it is not in the second B vgroup");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "mix_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mix_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, weightvg_mix_modes_items);
RNA_def_property_ui_text(prop, "Mix Mode", "How weights from vgroup B affect weights "
"of vgroup A");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "mix_set", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mix_set", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, weightvg_mix_set_items);
RNA_def_property_ui_text(prop, "Vertex Set", "Which vertices should be affected");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
@@ -2794,26 +2794,26 @@ static void rna_def_modifier_weightvgproximity(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "VertexWeightProximityModifier", "Modifier");
+ srna = RNA_def_struct(brna, "VertexWeightProximityModifier", "Modifier");
RNA_def_struct_ui_text(srna, "WeightVG Proximity Modifier",
"Set the weights of vertices in a group from a target object's "
"distance");
RNA_def_struct_sdna(srna, "WeightVGProximityModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_VERTEX_WEIGHT);
- prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGModifier_vgroup_set");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "proximity_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "proximity_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, weightvg_proximity_modes_items);
RNA_def_property_enum_default(prop, MOD_WVG_PROXIMITY_GEOMETRY);
RNA_def_property_ui_text(prop, "Proximity Mode", "Which distances to target object to use");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "proximity_geometry", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "proximity_geometry", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "proximity_flags");
RNA_def_property_enum_items(prop, proximity_geometry_items);
RNA_def_property_flag(prop, PROP_ENUM_FLAG); /* important to run before default set */
@@ -2823,25 +2823,25 @@ static void rna_def_modifier_weightvgproximity(BlenderRNA *brna)
"as weight");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "proximity_ob_target");
RNA_def_property_ui_text(prop, "Target Object", "Object to calculate vertices distances from");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
- prop= RNA_def_property(srna, "min_dist", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "min_dist", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_range(prop, 0.0, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0, 1000.0, 10, 0);
RNA_def_property_ui_text(prop, "Lowest Dist", "Distance mapping to weight 0.0");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "max_dist", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "max_dist", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_range(prop, 0.0, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0, 1000.0, 10, 0);
RNA_def_property_ui_text(prop, "Highest Dist", "Distance mapping to weight 1.0");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, weightvg_proximity_falloff_type_items);
RNA_def_property_ui_text(prop, "Falloff Type", "How weights are mapped to there new values");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
@@ -2852,7 +2852,7 @@ static void rna_def_modifier_weightvgproximity(BlenderRNA *brna)
static void rna_def_modifier_remesh(BlenderRNA *brna)
{
- static EnumPropertyItem mode_items[]= {
+ static EnumPropertyItem mode_items[] = {
{MOD_REMESH_CENTROID, "BLOCKS", 0, "Blocks", "Output a blocky surface with no smoothing"},
{MOD_REMESH_MASS_POINT, "SMOOTH", 0, "Smooth", "Output a smooth surface with no sharp-features detection"},
{MOD_REMESH_SHARP_FEATURES, "SHARP", 0, "Sharp", "Output a surface that reproduces sharp edges and corners from the input mesh"},
@@ -2861,41 +2861,41 @@ static void rna_def_modifier_remesh(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "RemeshModifier", "Modifier");
+ srna = RNA_def_struct(brna, "RemeshModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Remesh Modifier", "Generate a new surface with regular topology that follows the shape of the input mesh");
RNA_def_struct_sdna(srna, "RemeshModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_REMESH);
- prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, mode_items);
RNA_def_property_ui_text(prop, "Mode", "");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_range(prop, 0, 0.99, 0.01, 3);
RNA_def_property_range(prop, 0, 0.99);
RNA_def_property_ui_text(prop, "Scale", "The ratio of the largest dimension of the model over the size of the grid");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_range(prop, 0, 1, 0.1, 3);
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Threshold", "If removing disconnected pieces, minimum size of components to preserve as a ratio of the number of polygons in the largest component");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "octree_depth", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "octree_depth", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "depth");
RNA_def_property_range(prop, 1, 10);
RNA_def_property_ui_text(prop, "Octree Depth", "Resolution of the octree; higher values give finer details");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "sharpness", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "sharpness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "hermite_num");
RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
RNA_def_property_ui_text(prop, "Sharpness", "Tolerance for outliers; lower values filter noise while higher values will reproduce edges closer to the input");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "remove_disconnected_pieces", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "remove_disconnected_pieces", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_REMESH_FLOOD_FILL);
RNA_def_property_ui_text(prop, "Remove Disconnected Pieces", "");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
@@ -2906,36 +2906,36 @@ static void rna_def_modifier_ocean(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem geometry_items[]= {
+ static EnumPropertyItem geometry_items[] = {
{MOD_OCEAN_GEOM_GENERATE, "GENERATE", 0, "Generate", "Generate ocean surface geometry at the specified resolution"},
{MOD_OCEAN_GEOM_DISPLACE, "DISPLACE", 0, "Displace", "Displace existing geometry according to simulation"},
- //{MOD_OCEAN_GEOM_SIM_ONLY, "SIM_ONLY", 0, "Sim Only", "Leaves geometry unchanged, but still runs simulation (to be used from texture)"},
+ /*{MOD_OCEAN_GEOM_SIM_ONLY, "SIM_ONLY", 0, "Sim Only", "Leaves geometry unchanged, but still runs simulation (to be used from texture)"}, */
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "OceanModifier", "Modifier");
+ srna = RNA_def_struct(brna, "OceanModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Ocean Modifier", "Simulate an ocean surface");
RNA_def_struct_sdna(srna, "OceanModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_OCEAN);
/* General check if blender was built with OceanSim modifier support */
- prop= RNA_def_property(srna, "is_build_enabled", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_build_enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_OceanModifier_is_build_enabled_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Build Enabled", "True if the OceanSim modifier is enabled in this build");
- prop= RNA_def_property(srna, "geometry_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "geometry_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "geometry_mode");
RNA_def_property_enum_items(prop, geometry_items);
RNA_def_property_ui_text(prop, "Geometry", "Method of modifying geometry");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "size", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_ui_text(prop, "Size", "");
RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, 0);
RNA_def_property_update(prop, 0, "rna_OceanModifier_topology_update");
- prop= RNA_def_property(srna, "repeat_x", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "repeat_x", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "repeat_x");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 1, 1024);
@@ -2943,7 +2943,7 @@ static void rna_def_modifier_ocean(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Repeat X", "Repetitions of the generated surface in X");
RNA_def_property_update(prop, 0, "rna_OceanModifier_topology_update");
- prop= RNA_def_property(srna, "repeat_y", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "repeat_y", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "repeat_y");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 1, 1024);
@@ -2951,19 +2951,19 @@ static void rna_def_modifier_ocean(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Repeat Y", "Repetitions of the generated surface in Y");
RNA_def_property_update(prop, 0, "rna_OceanModifier_topology_update");
- prop= RNA_def_property(srna, "use_normals", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_normals", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_OCEAN_GENERATE_NORMALS);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Generate Normals", "Output normals for bump mapping - disabling can speed up performance if its not needed");
RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
- prop= RNA_def_property(srna, "use_foam", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_foam", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_OCEAN_GENERATE_FOAM);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Generate Foam", "Generate foam mask as a vertex color channel");
RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
- prop= RNA_def_property(srna, "resolution", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "resolution", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "resolution");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 1, 1024);
@@ -2971,112 +2971,112 @@ static void rna_def_modifier_ocean(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Resolution", "Resolution of the generated surface");
RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
- prop= RNA_def_property(srna, "spatial_size", PROP_INT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "spatial_size", PROP_INT, PROP_DISTANCE);
RNA_def_property_int_sdna(prop, NULL, "spatial_size");
RNA_def_property_ui_range(prop, 1, 512, 2, 0);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Spatial Size", "Physical size of the simulation domain (m)");
RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
- prop= RNA_def_property(srna, "wind_velocity", PROP_FLOAT, PROP_VELOCITY);
+ prop = RNA_def_property(srna, "wind_velocity", PROP_FLOAT, PROP_VELOCITY);
RNA_def_property_float_sdna(prop, NULL, "wind_velocity");
RNA_def_property_ui_text(prop, "Wind Velocity", "Wind speed (m/s)");
RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
- prop= RNA_def_property(srna, "damping", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "damping", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "damp");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Damping", "Damp reflected waves going in opposite direction to the wind");
RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
- prop= RNA_def_property(srna, "wave_scale_min", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "wave_scale_min", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "smallest_wave");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0, FLT_MAX);
RNA_def_property_ui_text(prop, "Smallest Wave", "Shortest allowed wavelength (m)");
RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
- prop= RNA_def_property(srna, "wave_alignment", PROP_FLOAT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "wave_alignment", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "wave_alignment");
RNA_def_property_range(prop, 0.0, 10.0);
RNA_def_property_ui_text(prop, "Wave Alignment", "");
RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
- prop= RNA_def_property(srna, "wave_direction", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "wave_direction", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "wave_direction");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Wave Direction", "");
RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
- prop= RNA_def_property(srna, "wave_scale", PROP_FLOAT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "wave_scale", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "wave_scale");
RNA_def_property_ui_text(prop, "Wave Scale", "");
RNA_def_property_update(prop, 0, "rna_OceanModifier_sim_update");
- prop= RNA_def_property(srna, "depth", PROP_FLOAT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "depth", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "depth");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Depth", "");
RNA_def_property_ui_range(prop, 0, 250, 1, 0);
RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
- prop= RNA_def_property(srna, "foam_coverage", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "foam_coverage", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "foam_coverage");
RNA_def_property_ui_text(prop, "Foam Coverage", "");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "bake_foam_fade", PROP_FLOAT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "bake_foam_fade", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "foam_fade");
RNA_def_property_ui_text(prop, "Foam Fade", "");
RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, 0);
RNA_def_property_update(prop, 0, NULL);
- prop= RNA_def_property(srna, "foam_layer_name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "foam_layer_name", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "foamlayername");
RNA_def_property_ui_text(prop, "Foam Layer Name", "Name of the vertex color layer used for foam");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "choppiness", PROP_FLOAT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "choppiness", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "chop_amount");
RNA_def_property_ui_text(prop, "Choppiness", "");
RNA_def_property_ui_range(prop, 0.0, 4.0, 3, 0);
RNA_def_property_float_funcs(prop, NULL, "rna_OceanModifier_ocean_chop_set", NULL);
RNA_def_property_update(prop, 0, "rna_OceanModifier_sim_update");
- prop= RNA_def_property(srna, "time", PROP_FLOAT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "time", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "time");
RNA_def_property_ui_text(prop, "Time", "");
RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, 0);
RNA_def_property_update(prop, 0, "rna_OceanModifier_sim_update");
- prop= RNA_def_property(srna, "random_seed", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "random_seed", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "seed");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Random Seed", "");
RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
- prop= RNA_def_property(srna, "frame_start", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "bakestart");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Bake Start", "");
RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
- prop= RNA_def_property(srna, "frame_end", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "frame_end", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "bakeend");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Bake End", "");
RNA_def_property_update(prop, 0, "rna_OceanModifier_init_update");
- prop= RNA_def_property(srna, "is_cached", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_cached", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "cached", 1);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Ocean is Cached", "Whether the ocean is using cached data or simulating");
- prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_DIRPATH);
+ prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "cachepath");
RNA_def_property_ui_text(prop, "Cache Path", "Path to a folder to store external baked images");
- //RNA_def_property_update(prop, 0, "rna_Modifier_update");
- // XXX how to update?
+ /*RNA_def_property_update(prop, 0, "rna_Modifier_update"); */
+ /* XXX how to update? */
}
void RNA_def_modifier(BlenderRNA *brna)
@@ -3085,57 +3085,57 @@ void RNA_def_modifier(BlenderRNA *brna)
PropertyRNA *prop;
/* data */
- srna= RNA_def_struct(brna, "Modifier", NULL);
+ srna = RNA_def_struct(brna, "Modifier", NULL);
RNA_def_struct_ui_text(srna , "Modifier", "Modifier affecting the geometry data of an object");
RNA_def_struct_refine_func(srna, "rna_Modifier_refine");
RNA_def_struct_path_func(srna, "rna_Modifier_path");
RNA_def_struct_sdna(srna, "ModifierData");
/* strings */
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Modifier_name_set");
RNA_def_property_ui_text(prop, "Name", "Modifier name");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER|NA_RENAME, NULL);
RNA_def_struct_name_property(srna, prop);
/* enums */
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, modifier_type_items);
RNA_def_property_ui_text(prop, "Type", "");
/* flags */
- prop= RNA_def_property(srna, "show_viewport", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_viewport", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Realtime);
RNA_def_property_ui_text(prop, "Realtime", "Display modifier in realtime");
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
RNA_def_property_update(prop, 0, "rna_Modifier_update");
RNA_def_property_ui_icon(prop, ICON_RESTRICT_VIEW_OFF, 0);
- prop= RNA_def_property(srna, "show_render", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_render", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Render);
RNA_def_property_ui_text(prop, "Render", "Use modifier during rendering");
RNA_def_property_ui_icon(prop, ICON_SCENE, 0);
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, NULL);
- prop= RNA_def_property(srna, "show_in_editmode", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_in_editmode", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Editmode);
RNA_def_property_ui_text(prop, "Editmode", "Use modifier while in the edit mode");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
RNA_def_property_ui_icon(prop, ICON_EDITMODE_HLT, 0);
- prop= RNA_def_property(srna, "show_on_cage", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_on_cage", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_OnCage);
RNA_def_property_ui_text(prop, "On Cage", "Enable direct editing of modifier control cage");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop= RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Expanded);
RNA_def_property_ui_text(prop, "Expanded", "Set modifier expanded in the user interface");
RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
- prop= RNA_def_property(srna, "use_apply_on_spline", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_apply_on_spline", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_ApplyOnSpline);
RNA_def_property_ui_text(prop, "Apply on spline", "Apply this and all preceding deformation modifiers on splines' points rather than on filled curve/surface");
RNA_def_property_ui_icon(prop, ICON_SURFACE_DATA, 0);
diff --git a/source/blender/makesrna/intern/rna_movieclip.c b/source/blender/makesrna/intern/rna_movieclip.c
index a640f996b1a..9b558d9dcdf 100644
--- a/source/blender/makesrna/intern/rna_movieclip.c
+++ b/source/blender/makesrna/intern/rna_movieclip.c
@@ -52,7 +52,7 @@
static void rna_MovieClip_reload_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- MovieClip *clip= (MovieClip*)ptr->id.data;
+ MovieClip *clip = (MovieClip*)ptr->id.data;
BKE_movieclip_reload(clip);
DAG_id_tag_update(&clip->id, 0);
@@ -60,10 +60,10 @@ static void rna_MovieClip_reload_update(Main *UNUSED(bmain), Scene *UNUSED(scene
static void rna_MovieClip_size_get(PointerRNA *ptr, int *values)
{
- MovieClip *clip= (MovieClip*)ptr->id.data;
+ MovieClip *clip = (MovieClip*)ptr->id.data;
- values[0]= clip->lastsize[0];
- values[1]= clip->lastsize[1];
+ values[0] = clip->lastsize[0];
+ values[1] = clip->lastsize[1];
}
#else
@@ -73,7 +73,7 @@ static void rna_def_movieclip_proxy(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static const EnumPropertyItem clip_tc_items[]= {
+ static const EnumPropertyItem clip_tc_items[] = {
{IMB_TC_NONE, "NONE", 0, "No TC in use", ""},
{IMB_TC_RECORD_RUN, "RECORD_RUN", 0, "Record Run", "Use images in the order they are recorded"},
{IMB_TC_FREE_RUN, "FREE_RUN", 0, "Free Run", "Use global timestamp written by recording device"},
@@ -86,70 +86,70 @@ static void rna_def_movieclip_proxy(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "MovieClipProxy");
/* build proxy sized */
- prop= RNA_def_property(srna, "build_25", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "build_25", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "build_size_flag", MCLIP_PROXY_SIZE_25);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "25%", "Build proxy resolution 25% of the original footage dimension");
- prop= RNA_def_property(srna, "build_50", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "build_50", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "build_size_flag", MCLIP_PROXY_SIZE_50);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "50%", "Build proxy resolution 50% of the original footage dimension");
- prop= RNA_def_property(srna, "build_75", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "build_75", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "build_size_flag", MCLIP_PROXY_SIZE_75);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "75%", "Build proxy resolution 75% of the original footage dimension");
- prop= RNA_def_property(srna, "build_100", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "build_100", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "build_size_flag", MCLIP_PROXY_SIZE_100);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "100%", "Build proxy resolution 100% of the original footage dimension");
- prop= RNA_def_property(srna, "build_undistorted_25", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "build_undistorted_25", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "build_size_flag", MCLIP_PROXY_UNDISTORTED_SIZE_25);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "25%", "Build proxy resolution 25% of the original undistorted footage dimension");
- prop= RNA_def_property(srna, "build_undistorted_50", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "build_undistorted_50", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "build_size_flag", MCLIP_PROXY_UNDISTORTED_SIZE_50);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "50%", "Build proxy resolution 50% of the original undistorted footage dimension");
- prop= RNA_def_property(srna, "build_undistorted_75", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "build_undistorted_75", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "build_size_flag", MCLIP_PROXY_UNDISTORTED_SIZE_75);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "75%", "Build proxy resolution 75% of the original undistorted footage dimension");
- prop= RNA_def_property(srna, "build_undistorted_100", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "build_undistorted_100", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "build_size_flag", MCLIP_PROXY_UNDISTORTED_SIZE_100);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "100%", "Build proxy resolution 100% of the original undistorted footage dimension");
/* build timecodes */
- prop= RNA_def_property(srna, "build_record_run", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "build_record_run", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "build_tc_flag", IMB_TC_RECORD_RUN);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Rec Run", "Build record run time code index");
- prop= RNA_def_property(srna, "build_free_run", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "build_free_run", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "build_tc_flag", IMB_TC_FREE_RUN);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Free Run", "Build free run time code index");
- prop= RNA_def_property(srna, "build_free_run_rec_date", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "build_free_run_rec_date", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "build_tc_flag", IMB_TC_INTERPOLATED_REC_DATE_FREE_RUN);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Free Run (Rec Date)", "Build free run time code index using Record Date/Time");
/* quality of proxied image */
- prop= RNA_def_property(srna, "quality", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "quality", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "quality");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Quality", "JPEG quality of proxy images");
RNA_def_property_ui_range(prop, 1, 100, 1, 0);
- prop= RNA_def_property(srna, "timecode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "timecode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "tc");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, clip_tc_items);
@@ -157,7 +157,7 @@ static void rna_def_movieclip_proxy(BlenderRNA *brna)
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
/* directory */
- prop= RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
+ prop = RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "dir");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Directory", "Location to store the proxy files");
@@ -177,24 +177,24 @@ static void rna_def_moviecliUser(BlenderRNA *brna)
{MCLIP_PROXY_RENDER_SIZE_FULL, "FULL", 0, "No proxy, full render", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "MovieClipUser", NULL);
+ srna = RNA_def_struct(brna, "MovieClipUser", NULL);
RNA_def_struct_ui_text(srna, "Movie Clip User", "Parameters defining how a MovieClip datablock is used by another datablock");
- prop= RNA_def_property(srna, "current_frame", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "current_frame", PROP_INT, PROP_TIME);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_int_sdna(prop, NULL, "framenr");
RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
RNA_def_property_ui_text(prop, "Current Frame", "Current frame number in movie or image sequence");
/* render size */
- prop= RNA_def_property(srna, "proxy_render_size", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "proxy_render_size", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "render_size");
RNA_def_property_enum_items(prop, clip_render_size_items);
RNA_def_property_ui_text(prop, "Proxy render size", "Draw preview using full resolution or different proxy resolutions");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
/* render undistorted */
- prop= RNA_def_property(srna, "use_render_undistorted", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_render_undistorted", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "render_flag", MCLIP_PROXY_RENDER_UNDISTORT);
RNA_def_property_ui_text(prop, "Render Undistorted", "Render preview using undistorted proxy");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
@@ -204,7 +204,7 @@ static void rna_def_movieClipScopes(BlenderRNA *brna)
{
StructRNA *srna;
- srna= RNA_def_struct(brna, "MovieClipScopes", NULL);
+ srna = RNA_def_struct(brna, "MovieClipScopes", NULL);
RNA_def_struct_ui_text(srna, "MovieClipScopes", "Scopes for statistical view of a movie clip");
}
@@ -214,38 +214,38 @@ static void rna_def_movieclip(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem clip_source_items[]= {
+ static EnumPropertyItem clip_source_items[] = {
{MCLIP_SRC_SEQUENCE, "SEQUENCE", 0, "Image Sequence", "Multiple image files, as a sequence"},
{MCLIP_SRC_MOVIE, "MOVIE", 0, "Movie File", "Movie file"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "MovieClip", "ID");
+ srna = RNA_def_struct(brna, "MovieClip", "ID");
RNA_def_struct_ui_text(srna, "MovieClip", "MovieClip datablock referencing an external movie file");
RNA_def_struct_ui_icon(srna, ICON_SEQUENCE);
- prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
+ prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "File Path", "Filename of the movie or sequence file");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, "rna_MovieClip_reload_update");
- prop= RNA_def_property(srna, "tracking", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "tracking", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "MovieTracking");
- prop= RNA_def_property(srna, "proxy", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "proxy", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "MovieClipProxy");
/* use proxy */
- prop= RNA_def_property(srna, "use_proxy", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_proxy", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MCLIP_USE_PROXY);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Use Proxy / Timecode", "Use a preview proxy and/or timecode index for this clip");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
- prop= RNA_def_int_vector(srna, "size" , 2 , NULL , 0, 0, "Size" , "Width and height in pixels, zero when image data cant be loaded" , 0 , 0);
+ prop = RNA_def_int_vector(srna, "size" , 2 , NULL , 0, 0, "Size" , "Width and height in pixels, zero when image data cant be loaded" , 0 , 0);
RNA_def_property_int_funcs(prop, "rna_MovieClip_size_get" , NULL, NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "display_aspect", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "display_aspect", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "aspx");
RNA_def_property_array(prop, 2);
RNA_def_property_range(prop, 0.1f, 5000.0f);
@@ -254,20 +254,20 @@ static void rna_def_movieclip(BlenderRNA *brna)
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
/* source */
- prop= RNA_def_property(srna, "source", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "source", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, clip_source_items);
RNA_def_property_ui_text(prop, "Source", "Where the clip comes from");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
/* custom proxy directory */
- prop= RNA_def_property(srna, "use_proxy_custom_directory", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_proxy_custom_directory", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MCLIP_USE_PROXY_CUSTOM_DIR);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Proxy Custom Directory", "Create proxy images in a custom directory (default is movie location)");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, "rna_MovieClip_reload_update");
/* grease pencil */
- prop= RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "gpd");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "GreasePencil");
diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c
index b2ea4cd966b..f790f0c56d1 100644
--- a/source/blender/makesrna/intern/rna_nla.c
+++ b/source/blender/makesrna/intern/rna_nla.c
@@ -56,32 +56,32 @@
static void rna_NlaStrip_name_set(PointerRNA *ptr, const char *value)
{
- NlaStrip *data= (NlaStrip *)ptr->data;
+ NlaStrip *data = (NlaStrip *)ptr->data;
/* copy the name first */
BLI_strncpy_utf8(data->name, value, sizeof(data->name));
/* validate if there's enough info to do so */
if (ptr->id.data) {
- AnimData *adt= BKE_animdata_from_id(ptr->id.data);
+ AnimData *adt = BKE_animdata_from_id(ptr->id.data);
BKE_nlastrip_validate_name(adt, data);
}
}
static char *rna_NlaStrip_path(PointerRNA *ptr)
{
- NlaStrip *strip= (NlaStrip *)ptr->data;
- AnimData *adt= BKE_animdata_from_id(ptr->id.data);
+ NlaStrip *strip = (NlaStrip *)ptr->data;
+ AnimData *adt = BKE_animdata_from_id(ptr->id.data);
/* if we're attached to AnimData, try to resolve path back to AnimData */
if (adt) {
NlaTrack *nlt;
NlaStrip *nls;
- for (nlt= adt->nla_tracks.first; nlt; nlt= nlt->next) {
+ for (nlt = adt->nla_tracks.first; nlt; nlt = nlt->next) {
for (nls = nlt->strips.first; nls; nls = nls->next) {
if (nls == strip) {
- // XXX but if we animate like this, the control will never work...
+ /* XXX but if we animate like this, the control will never work... */
return BLI_sprintfN("animation_data.nla_tracks[\"%s\"].strips[\"%s\"]", nlt->name, strip->name);
}
}
@@ -94,14 +94,14 @@ static char *rna_NlaStrip_path(PointerRNA *ptr)
static void rna_NlaStrip_transform_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- NlaStrip *strip= (NlaStrip*)ptr->data;
+ NlaStrip *strip = (NlaStrip*)ptr->data;
BKE_nlameta_flush_transforms(strip);
}
static void rna_NlaStrip_start_frame_set(PointerRNA *ptr, float value)
{
- NlaStrip *data= (NlaStrip*)ptr->data;
+ NlaStrip *data = (NlaStrip*)ptr->data;
/* clamp value to lie within valid limits
* - cannot start past the end of the strip + some flexibility threshold
@@ -115,7 +115,7 @@ static void rna_NlaStrip_start_frame_set(PointerRNA *ptr, float value)
CLAMP(value, data->prev->start+NLASTRIP_MIN_LEN_THRESH, data->end-NLASTRIP_MIN_LEN_THRESH);
/* readjust the transition to stick to the endpoints of the action-clips */
- data->prev->end= value;
+ data->prev->end = value;
}
else {
CLAMP(value, data->prev->end, data->end-NLASTRIP_MIN_LEN_THRESH);
@@ -124,12 +124,12 @@ static void rna_NlaStrip_start_frame_set(PointerRNA *ptr, float value)
else {
CLAMP(value, MINAFRAME, data->end);
}
- data->start= value;
+ data->start = value;
}
static void rna_NlaStrip_end_frame_set(PointerRNA *ptr, float value)
{
- NlaStrip *data= (NlaStrip*)ptr->data;
+ NlaStrip *data = (NlaStrip*)ptr->data;
/* clamp value to lie within valid limits
* - must not have zero or negative length strip, so cannot start before the first frame
@@ -143,7 +143,7 @@ static void rna_NlaStrip_end_frame_set(PointerRNA *ptr, float value)
CLAMP(value, data->start+NLASTRIP_MIN_LEN_THRESH, data->next->end-NLASTRIP_MIN_LEN_THRESH);
/* readjust the transition to stick to the endpoints of the action-clips */
- data->next->start= value;
+ data->next->start = value;
}
else {
CLAMP(value, data->start+NLASTRIP_MIN_LEN_THRESH, data->next->start);
@@ -152,29 +152,29 @@ static void rna_NlaStrip_end_frame_set(PointerRNA *ptr, float value)
else {
CLAMP(value, data->start+NLASTRIP_MIN_LEN_THRESH, MAXFRAME);
}
- data->end= value;
+ data->end = value;
/* calculate the lengths the strip and its action (if applicable) */
if (data->type == NLASTRIP_TYPE_CLIP) {
float len, actlen;
- len= data->end - data->start;
- actlen= data->actend - data->actstart;
- if (IS_EQF(actlen, 0.0f)) actlen= 1.0f;
+ len = data->end - data->start;
+ actlen = data->actend - data->actstart;
+ if (IS_EQF(actlen, 0.0f)) actlen = 1.0f;
/* now, adjust the 'scale' setting to reflect this (so that this change can be valid) */
- data->scale= len / ((actlen) * data->repeat);
+ data->scale = len / ((actlen) * data->repeat);
}
}
static void rna_NlaStrip_scale_set(PointerRNA *ptr, float value)
{
- NlaStrip *data= (NlaStrip*)ptr->data;
+ NlaStrip *data = (NlaStrip*)ptr->data;
/* set scale value */
CLAMP(value, 0.0001f, 1000.0f); /* NOTE: these need to be synced with the values in the property definition in rna_def_nlastrip() */
- data->scale= value;
+ data->scale = value;
/* adjust the strip extents in response to this */
BKE_nlastrip_recalculate_bounds(data);
@@ -182,11 +182,11 @@ static void rna_NlaStrip_scale_set(PointerRNA *ptr, float value)
static void rna_NlaStrip_repeat_set(PointerRNA *ptr, float value)
{
- NlaStrip *data= (NlaStrip*)ptr->data;
+ NlaStrip *data = (NlaStrip*)ptr->data;
/* set repeat value */
CLAMP(value, 0.01f, 1000.0f); /* NOTE: these need to be synced with the values in the property definition in rna_def_nlastrip() */
- data->repeat= value;
+ data->repeat = value;
/* adjust the strip extents in response to this */
BKE_nlastrip_recalculate_bounds(data);
@@ -194,30 +194,30 @@ static void rna_NlaStrip_repeat_set(PointerRNA *ptr, float value)
static void rna_NlaStrip_blend_in_set(PointerRNA *ptr, float value)
{
- NlaStrip *data= (NlaStrip*)ptr->data;
+ NlaStrip *data = (NlaStrip*)ptr->data;
float len;
/* blend-in is limited to the length of the strip, and also cannot overlap with blendout */
- len= (data->end - data->start) - data->blendout;
+ len = (data->end - data->start) - data->blendout;
CLAMP(value, 0, len);
- data->blendin= value;
+ data->blendin = value;
}
static void rna_NlaStrip_blend_out_set(PointerRNA *ptr, float value)
{
- NlaStrip *data= (NlaStrip*)ptr->data;
+ NlaStrip *data = (NlaStrip*)ptr->data;
float len;
/* blend-out is limited to the length of the strip */
- len= (data->end - data->start);
+ len = (data->end - data->start);
CLAMP(value, 0, len);
/* it also cannot overlap with blendin */
if ((len - value) < data->blendin)
- value= len - data->blendin;
+ value = len - data->blendin;
- data->blendout= value;
+ data->blendout = value;
}
static int rna_NlaStrip_action_editable(PointerRNA *ptr)
@@ -245,24 +245,24 @@ static int rna_NlaStrip_action_editable(PointerRNA *ptr)
static void rna_NlaStrip_action_start_frame_set(PointerRNA *ptr, float value)
{
- NlaStrip *data= (NlaStrip*)ptr->data;
+ NlaStrip *data = (NlaStrip*)ptr->data;
/* prevent start frame from occurring after end of action */
CLAMP(value, MINAFRAME, data->actend);
- data->actstart= value;
+ data->actstart = value;
/* adjust the strip extents in response to this */
- // TODO: should the strip be moved backwards instead as a special case?
+ /* TODO: should the strip be moved backwards instead as a special case? */
BKE_nlastrip_recalculate_bounds(data);
}
static void rna_NlaStrip_action_end_frame_set(PointerRNA *ptr, float value)
{
- NlaStrip *data= (NlaStrip*)ptr->data;
+ NlaStrip *data = (NlaStrip*)ptr->data;
/* prevent end frame from starting before start of action */
CLAMP(value, data->actstart, MAXFRAME);
- data->actend= value;
+ data->actend = value;
/* adjust the strip extents in response to this */
BKE_nlastrip_recalculate_bounds(data);
@@ -270,7 +270,7 @@ static void rna_NlaStrip_action_end_frame_set(PointerRNA *ptr, float value)
static void rna_NlaStrip_animated_influence_set(PointerRNA *ptr, int value)
{
- NlaStrip *data= (NlaStrip*)ptr->data;
+ NlaStrip *data = (NlaStrip*)ptr->data;
if (value) {
/* set the flag, then make sure a curve for this exists */
@@ -283,7 +283,7 @@ static void rna_NlaStrip_animated_influence_set(PointerRNA *ptr, int value)
static void rna_NlaStrip_animated_time_set(PointerRNA *ptr, int value)
{
- NlaStrip *data= (NlaStrip*)ptr->data;
+ NlaStrip *data = (NlaStrip*)ptr->data;
if (value) {
/* set the flag, then make sure a curve for this exists */
@@ -343,7 +343,7 @@ static NlaStrip *rna_NlaStrip_new(NlaTrack *track, bContext *C, ReportList *repo
static void rna_NlaStrip_remove(NlaTrack *track, bContext *C, ReportList *reports, NlaStrip *strip)
{
- if(BLI_findindex(&track->strips, strip) == -1) {
+ if (BLI_findindex(&track->strips, strip) == -1) {
BKE_reportf(reports, RPT_ERROR, "NLA's Strip '%s' not found in track '%s'", strip->name, track->name);
return;
}
@@ -382,71 +382,71 @@ static void rna_def_nlastrip(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
/* struct definition */
- srna= RNA_def_struct(brna, "NlaStrip", NULL);
+ srna = RNA_def_struct(brna, "NlaStrip", NULL);
RNA_def_struct_ui_text(srna, "NLA Strip", "A container referencing an existing Action");
RNA_def_struct_path_func(srna, "rna_NlaStrip_path");
- RNA_def_struct_ui_icon(srna, ICON_NLA); // XXX
+ RNA_def_struct_ui_icon(srna, ICON_NLA); /* XXX */
/* name property */
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_NlaStrip_name_set");
RNA_def_struct_name_property(srna, prop);
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
/* Enums */
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); // XXX for now, not editable, since this is dangerous
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* XXX for now, not editable, since this is dangerous */
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Type", "Type of NLA Strip");
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
- prop= RNA_def_property(srna, "extrapolation", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "extrapolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "extendmode");
RNA_def_property_enum_items(prop, nla_mode_extend_items);
RNA_def_property_ui_text(prop, "Extrapolation", "Action to take for gaps past the strip extents");
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
- prop= RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "blendmode");
RNA_def_property_enum_items(prop, nla_mode_blend_items);
RNA_def_property_ui_text(prop, "Blending", "Method used for combining strip's result with accumulated result");
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
/* Strip extents */
- prop= RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "start");
RNA_def_property_float_funcs(prop, NULL, "rna_NlaStrip_start_frame_set", NULL);
RNA_def_property_ui_text(prop, "Start Frame", "");
RNA_def_property_update(prop, 0, "rna_NlaStrip_transform_update");
- prop= RNA_def_property(srna, "frame_end", PROP_FLOAT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_end", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "end");
RNA_def_property_float_funcs(prop, NULL, "rna_NlaStrip_end_frame_set", NULL);
RNA_def_property_ui_text(prop, "End Frame", "");
RNA_def_property_update(prop, 0, "rna_NlaStrip_transform_update");
/* Blending */
- prop= RNA_def_property(srna, "blend_in", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "blend_in", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "blendin");
RNA_def_property_float_funcs(prop, NULL, "rna_NlaStrip_blend_in_set", NULL);
RNA_def_property_ui_text(prop, "Blend In", "Number of frames at start of strip to fade in influence");
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
- prop= RNA_def_property(srna, "blend_out", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "blend_out", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "blendout");
RNA_def_property_float_funcs(prop, NULL, "rna_NlaStrip_blend_out_set", NULL);
RNA_def_property_ui_text(prop, "Blend Out", "");
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
- prop= RNA_def_property(srna, "use_auto_blend", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_auto_blend", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", NLASTRIP_FLAG_AUTO_BLENDS);
RNA_def_property_ui_text(prop, "Auto Blend In/Out", "Number of frames for Blending In/Out is automatically determined from overlapping strips");
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
/* Action */
- prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "act");
RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Action_id_poll");
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -455,27 +455,27 @@ static void rna_def_nlastrip(BlenderRNA *brna)
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
/* Action extents */
- prop= RNA_def_property(srna, "action_frame_start", PROP_FLOAT, PROP_TIME);
+ prop = RNA_def_property(srna, "action_frame_start", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "actstart");
RNA_def_property_float_funcs(prop, NULL, "rna_NlaStrip_action_start_frame_set", NULL);
RNA_def_property_ui_text(prop, "Action Start Frame", "");
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
- prop= RNA_def_property(srna, "action_frame_end", PROP_FLOAT, PROP_TIME);
+ prop = RNA_def_property(srna, "action_frame_end", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "actend");
RNA_def_property_float_funcs(prop, NULL, "rna_NlaStrip_action_end_frame_set", NULL);
RNA_def_property_ui_text(prop, "Action End Frame", "");
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
/* Action Reuse */
- prop= RNA_def_property(srna, "repeat", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "repeat", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "repeat");
RNA_def_property_float_funcs(prop, NULL, "rna_NlaStrip_repeat_set", NULL);
RNA_def_property_range(prop, 0.1f, 1000.0f); /* these limits have currently be chosen arbitarily, but could be extended (minimum should still be > 0 though) if needed... */
RNA_def_property_ui_text(prop, "Repeat", "Number of times to repeat the action range");
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
- prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "scale");
RNA_def_property_float_funcs(prop, NULL, "rna_NlaStrip_scale_set", NULL);
RNA_def_property_range(prop, 0.0001f, 1000.0f); /* these limits can be extended, but beyond this, we can get some crazy+annoying bugs due to numeric errors */
@@ -483,72 +483,72 @@ static void rna_def_nlastrip(BlenderRNA *brna)
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
/* Strip's F-Curves */
- prop= RNA_def_property(srna, "fcurves", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "fcurves", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "FCurve");
RNA_def_property_ui_text(prop, "F-Curves", "F-Curves for controlling the strip's influence and timing");
/* Strip's F-Modifiers */
- prop= RNA_def_property(srna, "modifiers", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "modifiers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "FModifier");
RNA_def_property_ui_text(prop, "Modifiers", "Modifiers affecting all the F-Curves in the referenced Action");
/* Strip's Sub-Strips (for Meta-Strips) */
- prop= RNA_def_property(srna, "strips", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "strips", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "NlaStrip");
RNA_def_property_ui_text(prop, "NLA Strips", "NLA Strips that this strip acts as a container for (if it is of type Meta)");
/* Settings - Values necessary for evaluation */
- prop= RNA_def_property(srna, "influence", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "influence", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Influence", "Amount the strip contributes to the current result");
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
- prop= RNA_def_property(srna, "strip_time", PROP_FLOAT, PROP_TIME);
+ prop = RNA_def_property(srna, "strip_time", PROP_FLOAT, PROP_TIME);
RNA_def_property_ui_text(prop, "Strip Time", "Frame of referenced Action to evaluate");
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
- // TODO: should the animated_influence/time settings be animatable themselves?
- prop= RNA_def_property(srna, "use_animated_influence", PROP_BOOLEAN, PROP_NONE);
+ /* TODO: should the animated_influence/time settings be animatable themselves? */
+ prop = RNA_def_property(srna, "use_animated_influence", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", NLASTRIP_FLAG_USR_INFLUENCE);
RNA_def_property_boolean_funcs(prop, NULL, "rna_NlaStrip_animated_influence_set");
RNA_def_property_ui_text(prop, "Animated Influence", "Influence setting is controlled by an F-Curve rather than automatically determined");
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
- prop= RNA_def_property(srna, "use_animated_time", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_animated_time", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", NLASTRIP_FLAG_USR_TIME);
RNA_def_property_boolean_funcs(prop, NULL, "rna_NlaStrip_animated_time_set");
RNA_def_property_ui_text(prop, "Animated Strip Time", "Strip time is controlled by an F-Curve rather than automatically determined");
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
- prop= RNA_def_property(srna, "use_animated_time_cyclic", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_animated_time_cyclic", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", NLASTRIP_FLAG_USR_TIME_CYCLIC);
RNA_def_property_ui_text(prop, "Cyclic Strip Time", "Cycle the animated time within the action start & end");
- RNA_def_property_update(prop, 0, "rna_NlaStrip_transform_update"); // is there a better update flag?
+ RNA_def_property_update(prop, 0, "rna_NlaStrip_transform_update"); /* is there a better update flag? */
/* settings */
- prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* can be made editable by hooking it up to the necessary NLA API methods */
RNA_def_property_boolean_sdna(prop, NULL, "flag", NLASTRIP_FLAG_ACTIVE);
RNA_def_property_ui_text(prop, "Active", "NLA Strip is active");
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
- prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", NLASTRIP_FLAG_SELECT);
RNA_def_property_ui_text(prop, "Select", "NLA Strip is selected");
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
- prop= RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", NLASTRIP_FLAG_MUTED);
RNA_def_property_ui_text(prop, "Muted", "NLA Strip is not evaluated");
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
- prop= RNA_def_property(srna, "use_reverse", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_reverse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", NLASTRIP_FLAG_REVERSE);
RNA_def_property_ui_text(prop, "Reversed", "NLA Strip is played back in reverse order (only when timing is automatically determined)");
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
- // TODO:
- // - sync length
+ /* TODO: */
+ /* - sync length */
}
static void rna_api_nlatrack_strips(BlenderRNA *brna, PropertyRNA *cprop)
@@ -558,14 +558,14 @@ static void rna_api_nlatrack_strips(BlenderRNA *brna, PropertyRNA *cprop)
FunctionRNA *func;
RNA_def_property_srna(cprop, "NlaStrips");
- srna= RNA_def_struct(brna, "NlaStrips", NULL);
+ srna = RNA_def_struct(brna, "NlaStrips", NULL);
RNA_def_struct_sdna(srna, "NlaTrack");
RNA_def_struct_ui_text(srna, "Nla Strips", "Collection of Nla Strips");
func = RNA_def_function(srna, "new", "rna_NlaStrip_new");
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Add a new Action-Clip strip to the track");
- parm= RNA_def_string(func, "name", "NlaStrip", 0, "", "Name for the NLA Strips");
+ parm = RNA_def_string(func, "name", "NlaStrip", 0, "", "Name for the NLA Strips");
RNA_def_property_flag(parm, PROP_REQUIRED);
parm = RNA_def_int(func, "start", 0, INT_MIN, INT_MAX, "Start Frame", "Start frame for this strip", INT_MIN, INT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
@@ -587,47 +587,47 @@ static void rna_def_nlatrack(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "NlaTrack", NULL);
+ srna = RNA_def_struct(brna, "NlaTrack", NULL);
RNA_def_struct_ui_text(srna, "NLA Track", "A animation layer containing Actions referenced as NLA strips");
RNA_def_struct_ui_icon(srna, ICON_NLA);
/* strips collection */
- prop= RNA_def_property(srna, "strips", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "strips", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "NlaStrip");
RNA_def_property_ui_text(prop, "NLA Strips", "NLA Strips on this NLA-track");
rna_api_nlatrack_strips(brna, prop);
/* name property */
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_struct_name_property(srna, prop);
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
/* settings */
- prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* can be made editable by hooking it up to the necessary NLA API methods */
RNA_def_property_boolean_sdna(prop, NULL, "flag", NLATRACK_ACTIVE);
RNA_def_property_ui_text(prop, "Active", "NLA Track is active");
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
- prop= RNA_def_property(srna, "is_solo", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_solo", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* can be made editable by hooking it up to the necessary NLA API methods */
RNA_def_property_boolean_sdna(prop, NULL, "flag", NLATRACK_SOLO);
RNA_def_property_ui_text(prop, "Solo", "NLA Track is evaluated itself (i.e. active Action and all other NLA Tracks in the same AnimData block are disabled)");
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
- prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", NLATRACK_SELECTED);
RNA_def_property_ui_text(prop, "Select", "NLA Track is selected");
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
- prop= RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", NLATRACK_MUTED);
RNA_def_property_ui_text(prop, "Muted", "NLA Track is not evaluated");
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
- prop= RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", NLATRACK_PROTECTED);
RNA_def_property_ui_text(prop, "Locked", "NLA Track is locked");
RNA_def_property_update(prop, NC_ANIMATION|ND_NLA, NULL); /* this will do? */
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 01131709f3b..07d52f1a8ba 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -187,7 +187,7 @@ static StructRNA *rna_Node_refine(struct PointerRNA *ptr)
{
bNode *node = (bNode*)ptr->data;
- switch(node->type) {
+ switch (node->type) {
#define DefNode(Category, ID, DefFunc, EnumName, StructName, UIName, UIDesc) \
case ID: return &RNA_##Category##StructName;
@@ -208,9 +208,9 @@ static StructRNA *rna_Node_refine(struct PointerRNA *ptr)
static StructRNA *rna_NodeTree_refine(struct PointerRNA *ptr)
{
- bNodeTree *ntree= (bNodeTree*)ptr->data;
+ bNodeTree *ntree = (bNodeTree*)ptr->data;
- switch(ntree->type) {
+ switch (ntree->type) {
case NTREE_SHADER:
return &RNA_ShaderNodeTree;
case NTREE_COMPOSIT:
@@ -224,14 +224,14 @@ static StructRNA *rna_NodeTree_refine(struct PointerRNA *ptr)
static char *rna_Node_path(PointerRNA *ptr)
{
- bNode *node= (bNode*)ptr->data;
+ bNode *node = (bNode*)ptr->data;
return BLI_sprintfN("nodes[\"%s\"]", node->name);
}
static StructRNA *rna_NodeSocket_refine(PointerRNA *ptr)
{
- bNodeSocket *sock= (bNodeSocket*)ptr->data;
+ bNodeSocket *sock = (bNodeSocket*)ptr->data;
if (sock->default_value) {
/* This returns the refined socket type with the full definition
@@ -240,8 +240,8 @@ static StructRNA *rna_NodeSocket_refine(PointerRNA *ptr)
#define SUBTYPE(socktype, stypename, id, idname) \
{ \
- bNodeSocketValue##stypename *value= (bNodeSocketValue##stypename*)sock->default_value; \
- if (value->subtype==PROP_##id) \
+ bNodeSocketValue##stypename *value = (bNodeSocketValue##stypename*)sock->default_value; \
+ if (value->subtype == PROP_##id) \
return &RNA_NodeSocket##stypename##idname; \
}
@@ -277,8 +277,8 @@ static StructRNA *rna_NodeSocket_refine(PointerRNA *ptr)
static char *rna_NodeSocket_path(PointerRNA *ptr)
{
- bNodeTree *ntree= (bNodeTree*)ptr->id.data;
- bNodeSocket *sock= (bNodeSocket*)ptr->data;
+ bNodeTree *ntree = (bNodeTree*)ptr->id.data;
+ bNodeSocket *sock = (bNodeSocket*)ptr->data;
bNode *node;
int socketindex;
@@ -308,21 +308,21 @@ static char *rna_NodeSocket_path(PointerRNA *ptr)
/* Button Set Funcs for Matte Nodes */
static void rna_Matte_t1_set(PointerRNA *ptr, float value)
{
- bNode *node= (bNode*)ptr->data;
+ bNode *node = (bNode*)ptr->data;
NodeChroma *chroma = node->storage;
chroma->t1 = value;
- if(value < chroma->t2)
+ if (value < chroma->t2)
chroma->t2 = value;
}
static void rna_Matte_t2_set(PointerRNA *ptr, float value)
{
- bNode *node= (bNode*)ptr->data;
+ bNode *node = (bNode*)ptr->data;
NodeChroma *chroma = node->storage;
- if(value > chroma->t1)
+ if (value > chroma->t1)
value = chroma->t1;
chroma->t2 = value;
@@ -330,14 +330,14 @@ static void rna_Matte_t2_set(PointerRNA *ptr, float value)
static void rna_Node_scene_set(PointerRNA *ptr, PointerRNA value)
{
- bNode *node= (bNode*)ptr->data;
+ bNode *node = (bNode*)ptr->data;
if (node->id) {
id_us_min(node->id);
- node->id= NULL;
+ node->id = NULL;
}
- node->id= value.data;
+ node->id = value.data;
id_us_plus(node->id);
}
@@ -351,16 +351,16 @@ static void node_update(Main *bmain, Scene *UNUSED(scene), bNodeTree *ntree, bNo
static void rna_Node_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- bNodeTree *ntree= (bNodeTree*)ptr->id.data;
- bNode *node= (bNode*)ptr->data;
+ bNodeTree *ntree = (bNodeTree*)ptr->id.data;
+ bNode *node = (bNode*)ptr->data;
node_update(bmain, scene, ntree, node);
}
static void rna_Node_image_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- bNodeTree *ntree= (bNodeTree*)ptr->id.data;
- bNode *node= (bNode*)ptr->data;
+ bNodeTree *ntree = (bNodeTree*)ptr->id.data;
+ bNode *node = (bNode*)ptr->data;
node_update(bmain, scene, ntree, node);
WM_main_add_notifier(NC_IMAGE, NULL);
@@ -368,10 +368,10 @@ static void rna_Node_image_update(Main *bmain, Scene *scene, PointerRNA *ptr)
static void rna_Node_material_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- bNodeTree *ntree= (bNodeTree*)ptr->id.data;
- bNode *node= (bNode*)ptr->data;
+ bNodeTree *ntree = (bNodeTree*)ptr->id.data;
+ bNode *node = (bNode*)ptr->data;
- if(node->id)
+ if (node->id)
nodeSetActive(ntree, node);
node_update(bmain, scene, ntree, node);
@@ -379,8 +379,8 @@ static void rna_Node_material_update(Main *bmain, Scene *scene, PointerRNA *ptr)
static void rna_NodeGroup_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- bNodeTree *ntree= (bNodeTree*)ptr->id.data;
- bNode *node= (bNode*)ptr->data;
+ bNodeTree *ntree = (bNodeTree*)ptr->id.data;
+ bNode *node = (bNode*)ptr->data;
ntreeUpdateTree((bNodeTree *)node->id);
@@ -389,8 +389,8 @@ static void rna_NodeGroup_update(Main *bmain, Scene *scene, PointerRNA *ptr)
static void rna_Node_name_set(PointerRNA *ptr, const char *value)
{
- bNodeTree *ntree= (bNodeTree*)ptr->id.data;
- bNode *node= (bNode*)ptr->data;
+ bNodeTree *ntree = (bNodeTree*)ptr->id.data;
+ bNode *node = (bNode*)ptr->data;
char oldname[sizeof(node->name)];
/* make a copy of the old name first */
@@ -406,8 +406,8 @@ static void rna_Node_name_set(PointerRNA *ptr, const char *value)
static void rna_NodeSocket_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- bNodeTree *ntree= (bNodeTree*)ptr->id.data;
- bNodeSocket *sock= (bNodeSocket*)ptr->data;
+ bNodeTree *ntree = (bNodeTree*)ptr->id.data;
+ bNodeSocket *sock = (bNodeSocket*)ptr->data;
bNode *node;
if (nodeFindNode(ntree, sock, &node, NULL, NULL))
@@ -416,8 +416,8 @@ static void rna_NodeSocket_update(Main *bmain, Scene *scene, PointerRNA *ptr)
static void rna_NodeGroupSocket_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- bNodeTree *ntree= (bNodeTree*)ptr->id.data;
- bNodeSocket *sock= (bNodeSocket*)ptr->data;
+ bNodeTree *ntree = (bNodeTree*)ptr->id.data;
+ bNodeSocket *sock = (bNodeSocket*)ptr->data;
bNode *node;
ntreeUpdateTree(ntree);
@@ -429,7 +429,7 @@ static void rna_NodeGroupSocket_update(Main *bmain, Scene *scene, PointerRNA *pt
#if 0 /* UNUSED */
static void rna_NodeLink_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- bNodeTree *ntree= (bNodeTree*)ptr->id.data;
+ bNodeTree *ntree = (bNodeTree*)ptr->id.data;
ntree->update |= NTREE_UPDATE_LINKS;
ntreeUpdateTree(ntree);
@@ -438,33 +438,33 @@ static void rna_NodeLink_update(Main *bmain, Scene *scene, PointerRNA *ptr)
static void rna_NodeSocketInt_range(PointerRNA *ptr, int *min, int *max)
{
- bNodeSocket *sock= (bNodeSocket*)ptr->data;
- bNodeSocketValueInt *val= (bNodeSocketValueInt*)sock->default_value;
+ bNodeSocket *sock = (bNodeSocket*)ptr->data;
+ bNodeSocketValueInt *val = (bNodeSocketValueInt*)sock->default_value;
*min = val->min;
*max = val->max;
}
static void rna_NodeSocketFloat_range(PointerRNA *ptr, float *min, float *max)
{
- bNodeSocket *sock= (bNodeSocket*)ptr->data;
- bNodeSocketValueFloat *val= (bNodeSocketValueFloat*)sock->default_value;
+ bNodeSocket *sock = (bNodeSocket*)ptr->data;
+ bNodeSocketValueFloat *val = (bNodeSocketValueFloat*)sock->default_value;
*min = val->min;
*max = val->max;
}
static void rna_NodeSocketVector_range(PointerRNA *ptr, float *min, float *max)
{
- bNodeSocket *sock= (bNodeSocket*)ptr->data;
- bNodeSocketValueVector *val= (bNodeSocketValueVector*)sock->default_value;
+ bNodeSocket *sock = (bNodeSocket*)ptr->data;
+ bNodeSocketValueVector *val = (bNodeSocketValueVector*)sock->default_value;
*min = val->min;
*max = val->max;
}
static void rna_Node_image_layer_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- bNode *node= (bNode*)ptr->data;
+ bNode *node = (bNode*)ptr->data;
Image *ima = (Image *)node->id;
- ImageUser *iuser= node->storage;
+ ImageUser *iuser = node->storage;
BKE_image_multilayer_index(ima->rr, iuser);
BKE_image_signal(ima, iuser, IMA_SIGNAL_SRC_CHANGE);
@@ -474,16 +474,16 @@ static void rna_Node_image_layer_update(Main *bmain, Scene *scene, PointerRNA *p
static EnumPropertyItem *renderresult_layers_add_enum(RenderLayer *rl)
{
- EnumPropertyItem *item= NULL;
+ EnumPropertyItem *item = NULL;
EnumPropertyItem tmp = {0, "", 0, "", ""};
- int i=0, totitem=0;
+ int i = 0, totitem = 0;
while (rl) {
tmp.identifier = rl->name;
- tmp.name= rl->name;
+ tmp.name = rl->name;
tmp.value = i++;
RNA_enum_item_add(&item, &totitem, &tmp);
- rl=rl->next;
+ rl = rl->next;
}
RNA_enum_item_end(&item, &totitem);
@@ -493,9 +493,9 @@ static EnumPropertyItem *renderresult_layers_add_enum(RenderLayer *rl)
static EnumPropertyItem *rna_Node_image_layer_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
- bNode *node= (bNode*)ptr->data;
+ bNode *node = (bNode*)ptr->data;
Image *ima = (Image *)node->id;
- EnumPropertyItem *item= NULL;
+ EnumPropertyItem *item = NULL;
RenderLayer *rl;
if (!ima || !(ima->rr)) return NULL;
@@ -503,16 +503,16 @@ static EnumPropertyItem *rna_Node_image_layer_itemf(bContext *UNUSED(C), Pointer
rl = ima->rr->layers.first;
item = renderresult_layers_add_enum(rl);
- *free= 1;
+ *free = 1;
return item;
}
static EnumPropertyItem *rna_Node_scene_layer_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
- bNode *node= (bNode*)ptr->data;
+ bNode *node = (bNode*)ptr->data;
Scene *sce = (Scene *)node->id;
- EnumPropertyItem *item= NULL;
+ EnumPropertyItem *item = NULL;
RenderLayer *rl;
if (!sce) return NULL;
@@ -520,49 +520,49 @@ static EnumPropertyItem *rna_Node_scene_layer_itemf(bContext *UNUSED(C), Pointer
rl = sce->r.layers.first;
item = renderresult_layers_add_enum(rl);
- *free= 1;
+ *free = 1;
return item;
}
static EnumPropertyItem *rna_Node_channel_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
- bNode *node= (bNode*)ptr->data;
- EnumPropertyItem *item= NULL;
+ bNode *node = (bNode*)ptr->data;
+ EnumPropertyItem *item = NULL;
EnumPropertyItem tmp = {0, "", 0, "", ""};
- int totitem=0;
+ int totitem = 0;
- switch(node->custom1) {
+ switch (node->custom1) {
case CMP_NODE_CHANNEL_MATTE_CS_RGB:
- tmp.identifier= "R"; tmp.name= "R"; tmp.value= 1;
+ tmp.identifier = "R"; tmp.name = "R"; tmp.value = 1;
RNA_enum_item_add(&item, &totitem, &tmp);
- tmp.identifier= "G"; tmp.name= "G"; tmp.value= 2;
+ tmp.identifier = "G"; tmp.name = "G"; tmp.value = 2;
RNA_enum_item_add(&item, &totitem, &tmp);
- tmp.identifier= "B"; tmp.name= "B"; tmp.value= 3;
+ tmp.identifier = "B"; tmp.name = "B"; tmp.value = 3;
RNA_enum_item_add(&item, &totitem, &tmp);
break;
case CMP_NODE_CHANNEL_MATTE_CS_HSV:
- tmp.identifier= "H"; tmp.name= "H"; tmp.value= 1;
+ tmp.identifier = "H"; tmp.name = "H"; tmp.value = 1;
RNA_enum_item_add(&item, &totitem, &tmp);
- tmp.identifier= "S"; tmp.name= "S"; tmp.value= 2;
+ tmp.identifier = "S"; tmp.name = "S"; tmp.value = 2;
RNA_enum_item_add(&item, &totitem, &tmp);
- tmp.identifier= "V"; tmp.name= "V"; tmp.value= 3;
+ tmp.identifier = "V"; tmp.name = "V"; tmp.value = 3;
RNA_enum_item_add(&item, &totitem, &tmp);
break;
case CMP_NODE_CHANNEL_MATTE_CS_YUV:
- tmp.identifier= "Y"; tmp.name= "Y"; tmp.value= 1;
+ tmp.identifier = "Y"; tmp.name = "Y"; tmp.value = 1;
RNA_enum_item_add(&item, &totitem, &tmp);
- tmp.identifier= "G"; tmp.name= "U"; tmp.value= 2;
+ tmp.identifier = "G"; tmp.name = "U"; tmp.value = 2;
RNA_enum_item_add(&item, &totitem, &tmp);
- tmp.identifier= "V"; tmp.name= "V"; tmp.value= 3;
+ tmp.identifier = "V"; tmp.name = "V"; tmp.value = 3;
RNA_enum_item_add(&item, &totitem, &tmp);
break;
case CMP_NODE_CHANNEL_MATTE_CS_YCC:
- tmp.identifier= "Y"; tmp.name= "Y"; tmp.value= 1;
+ tmp.identifier = "Y"; tmp.name = "Y"; tmp.value = 1;
RNA_enum_item_add(&item, &totitem, &tmp);
- tmp.identifier= "CB"; tmp.name= "Cr"; tmp.value= 2;
+ tmp.identifier = "CB"; tmp.name = "Cr"; tmp.value = 2;
RNA_enum_item_add(&item, &totitem, &tmp);
- tmp.identifier= "CR"; tmp.name= "Cb"; tmp.value= 3;
+ tmp.identifier = "CR"; tmp.name = "Cb"; tmp.value = 3;
RNA_enum_item_add(&item, &totitem, &tmp);
break;
default:
@@ -570,7 +570,7 @@ static EnumPropertyItem *rna_Node_channel_itemf(bContext *UNUSED(C), PointerRNA
}
RNA_enum_item_end(&item, &totitem);
- *free= 1;
+ *free = 1;
return item;
}
@@ -607,18 +607,18 @@ static bNode *rna_NodeTree_node_new(bNodeTree *ntree, bContext *UNUSED(C), Repor
static bNode *rna_NodeTree_node_composite_new(bNodeTree *ntree, bContext *C, ReportList *reports, int type, bNodeTree *group)
{
/* raises error on failure */
- bNode *node= rna_NodeTree_node_new(ntree, C, reports, type, group);
+ bNode *node = rna_NodeTree_node_new(ntree, C, reports, type, group);
if (node) {
- if(ELEM4(node->type, CMP_NODE_COMPOSITE, CMP_NODE_DEFOCUS, CMP_NODE_OUTPUT_FILE, CMP_NODE_R_LAYERS)) {
+ if (ELEM4(node->type, CMP_NODE_COMPOSITE, CMP_NODE_DEFOCUS, CMP_NODE_OUTPUT_FILE, CMP_NODE_R_LAYERS)) {
/* annoying, find the node tree we are in, scene can be NULL */
Scene *scene;
- for(scene= CTX_data_main(C)->scene.first; scene; scene= scene->id.next) {
- if(scene->nodetree == ntree) {
+ for (scene = CTX_data_main(C)->scene.first; scene; scene = scene->id.next) {
+ if (scene->nodetree == ntree) {
break;
}
}
- node->id= (ID *)scene;
+ node->id = (ID *)scene;
id_us_plus(node->id);
}
@@ -632,7 +632,7 @@ static bNode *rna_NodeTree_node_composite_new(bNodeTree *ntree, bContext *C, Rep
static bNode *rna_NodeTree_node_texture_new(bNodeTree *ntree, bContext *C, ReportList *reports, int type, bNodeTree *group)
{
/* raises error on failure */
- bNode *node= rna_NodeTree_node_new(ntree, C, reports, type, group);
+ bNode *node = rna_NodeTree_node_new(ntree, C, reports, type, group);
if (node) {
ntreeTexCheckCyclics(ntree);
@@ -659,17 +659,17 @@ static void rna_NodeTree_node_remove(bNodeTree *ntree, ReportList *reports, bNod
static void rna_NodeTree_node_clear(bNodeTree *ntree)
{
- bNode *node= ntree->nodes.first;
+ bNode *node = ntree->nodes.first;
- while(node) {
- bNode *next_node= node->next;
+ while (node) {
+ bNode *next_node = node->next;
if (node->id)
id_us_min(node->id);
nodeFreeNode(ntree, node);
- node= next_node;
+ node = next_node;
}
ntreeUpdateTree(ntree); /* update group node socket links*/
@@ -680,7 +680,7 @@ static void rna_NodeTree_node_clear(bNodeTree *ntree)
static bNodeLink *rna_NodeTree_link_new(bNodeTree *ntree, ReportList *reports, bNodeSocket *in, bNodeSocket *out)
{
bNodeLink *ret;
- bNode *fromnode= NULL, *tonode= NULL;
+ bNode *fromnode = NULL, *tonode = NULL;
int from_in_out, to_in_out;
nodeFindNode(ntree, in, &fromnode, NULL, &from_in_out);
@@ -694,9 +694,9 @@ static bNodeLink *rna_NodeTree_link_new(bNodeTree *ntree, ReportList *reports, b
/* unlink node input socket */
nodeRemSocketLinks(ntree, out);
- ret= nodeAddLink(ntree, fromnode, in, tonode, out);
+ ret = nodeAddLink(ntree, fromnode, in, tonode, out);
- if(ret) {
+ if (ret) {
nodeUpdate(ntree, tonode);
ntreeUpdateTree(ntree);
@@ -721,14 +721,14 @@ static void rna_NodeTree_link_remove(bNodeTree *ntree, ReportList *reports, bNod
static void rna_NodeTree_link_clear(bNodeTree *ntree)
{
- bNodeLink *link= ntree->links.first;
+ bNodeLink *link = ntree->links.first;
- while(link) {
- bNodeLink *next_link= link->next;
+ while (link) {
+ bNodeLink *next_link = link->next;
nodeRemLink(ntree, link);
- link= next_link;
+ link = next_link;
}
ntreeUpdateTree(ntree);
@@ -738,7 +738,7 @@ static void rna_NodeTree_link_clear(bNodeTree *ntree)
static bNodeSocket *rna_NodeTree_input_new(bNodeTree *ntree, ReportList *UNUSED(reports), const char *name, int type)
{
/* XXX should check if tree is a group here! no good way to do this currently. */
- bNodeSocket *gsock= node_group_add_socket(ntree, name, type, SOCK_IN);
+ bNodeSocket *gsock = node_group_add_socket(ntree, name, type, SOCK_IN);
ntree->update |= NTREE_UPDATE_GROUP_IN;
ntreeUpdateTree(ntree);
@@ -749,7 +749,7 @@ static bNodeSocket *rna_NodeTree_input_new(bNodeTree *ntree, ReportList *UNUSED(
static bNodeSocket *rna_NodeTree_output_new(bNodeTree *ntree, ReportList *UNUSED(reports), const char *name, int type)
{
/* XXX should check if tree is a group here! no good way to do this currently. */
- bNodeSocket *gsock= node_group_add_socket(ntree, name, type, SOCK_OUT);
+ bNodeSocket *gsock = node_group_add_socket(ntree, name, type, SOCK_OUT);
ntree->update |= NTREE_UPDATE_GROUP_OUT;
ntreeUpdateTree(ntree);
@@ -765,7 +765,7 @@ static bNodeSocket *rna_NodeTree_input_expose(bNodeTree *ntree, ReportList *repo
if (!nodeFindNode(ntree, sock, &node, &index, &in_out))
BKE_reportf(reports, RPT_ERROR, "Unable to locate socket in nodetree");
- else if (in_out!=SOCK_IN)
+ else if (in_out != SOCK_IN)
BKE_reportf(reports, RPT_ERROR, "Socket is not an input");
else {
/* XXX should check if tree is a group here! no good way to do this currently. */
@@ -789,7 +789,7 @@ static bNodeSocket *rna_NodeTree_output_expose(bNodeTree *ntree, ReportList *rep
if (!nodeFindNode(ntree, sock, &node, &index, &in_out))
BKE_reportf(reports, RPT_ERROR, "Unable to locate socket in nodetree");
- else if (in_out!=SOCK_OUT)
+ else if (in_out != SOCK_OUT)
BKE_reportf(reports, RPT_ERROR, "Socket is not an output");
else {
/* XXX should check if tree is a group here! no good way to do this currently. */
@@ -929,15 +929,15 @@ static void alloc_node_type_items(EnumPropertyItem *items, int category)
int count = 3;
EnumPropertyItem *item = items;
- for(i=0; i<MaxNodes; i++)
- if(nodes[i].defined && nodes[i].category == category)
+ for (i = 0; i<MaxNodes; i++)
+ if (nodes[i].defined && nodes[i].category == category)
count++;
/*item = items = MEM_callocN(count * sizeof(EnumPropertyItem), "alloc_node_type_items");*/
- for(i=0; i<MaxNodes; i++) {
+ for (i = 0; i<MaxNodes; i++) {
NodeInfo *node = nodes + i;
- if(node->defined && node->category == category) {
+ if (node->defined && node->category == category) {
item->value = i;
item->identifier = node->enum_name;
item->icon = node->icon;
@@ -1016,7 +1016,7 @@ static void def_whileloop(StructRNA *srna)
static void def_frame(StructRNA *srna)
{
-// PropertyRNA *prop;
+/* PropertyRNA *prop; */
}
@@ -1165,37 +1165,37 @@ static void def_sh_mapping(StructRNA *srna)
RNA_def_struct_sdna_from(srna, "TexMapping", "storage");
- prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "loc");
RNA_def_property_ui_text(prop, "Location", "");
RNA_def_property_update(prop, 0, "rna_Mapping_Node_update");
- prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_EULER); /* Not PROP_XYZ, this is now in radians, no more degrees */
+ prop = RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_EULER); /* Not PROP_XYZ, this is now in radians, no more degrees */
RNA_def_property_float_sdna(prop, NULL, "rot");
RNA_def_property_ui_text(prop, "Rotation", "");
RNA_def_property_update(prop, 0, "rna_Mapping_Node_update");
- prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "scale", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_ui_text(prop, "Scale", "");
RNA_def_property_update(prop, 0, "rna_Mapping_Node_update");
- prop= RNA_def_property(srna, "min", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "min", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "min");
RNA_def_property_ui_text(prop, "Minimum", "Minimum value for clipping");
RNA_def_property_update(prop, 0, "rna_Mapping_Node_update");
- prop= RNA_def_property(srna, "max", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "max", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "max");
RNA_def_property_ui_text(prop, "Maximum", "Maximum value for clipping");
RNA_def_property_update(prop, 0, "rna_Mapping_Node_update");
- prop= RNA_def_property(srna, "use_min", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_min", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEXMAP_CLIP_MIN);
RNA_def_property_ui_text(prop, "Has Minimum", "Whether to use minimum clipping value");
RNA_def_property_update(prop, 0, "rna_Mapping_Node_update");
- prop= RNA_def_property(srna, "use_max", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_max", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEXMAP_CLIP_MAX);
RNA_def_property_ui_text(prop, "Has Maximum", "Whether to use maximum clipping value");
RNA_def_property_update(prop, 0, "rna_Mapping_Node_update");
@@ -1234,12 +1234,12 @@ static void def_sh_tex(StructRNA *srna)
{
PropertyRNA *prop;
- prop= RNA_def_property(srna, "texture_mapping", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "texture_mapping", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "base.tex_mapping");
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Texture Mapping", "Texture coordinate mapping settings");
- prop= RNA_def_property(srna, "color_mapping", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "color_mapping", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "base.color_mapping");
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Color Mapping", "Color mapping settings");
@@ -1263,7 +1263,7 @@ static void def_sh_tex_sky(StructRNA *srna)
static void def_sh_tex_environment(StructRNA *srna)
{
- static const EnumPropertyItem prop_color_space_items[]= {
+ static const EnumPropertyItem prop_color_space_items[] = {
{SHD_COLORSPACE_SRGB, "SRGB", 0, "sRGB", "Image is in sRGB color space"},
{SHD_COLORSPACE_LINEAR, "LINEAR", 0, "Linear", "Image is in scene linear color space"},
{0, NULL, 0, NULL, NULL}};
@@ -1280,7 +1280,7 @@ static void def_sh_tex_environment(StructRNA *srna)
RNA_def_struct_sdna_from(srna, "NodeTexImage", "storage");
def_sh_tex(srna);
- prop= RNA_def_property(srna, "color_space", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "color_space", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_color_space_items);
RNA_def_property_ui_text(prop, "Color Space", "Image file color space");
RNA_def_property_update(prop, 0, "rna_Node_update");
@@ -1288,7 +1288,7 @@ static void def_sh_tex_environment(StructRNA *srna)
static void def_sh_tex_image(StructRNA *srna)
{
- static const EnumPropertyItem prop_color_space_items[]= {
+ static const EnumPropertyItem prop_color_space_items[] = {
{SHD_COLORSPACE_LINEAR, "LINEAR", 0, "Linear", "Image is in scene linear color space"},
{SHD_COLORSPACE_SRGB, "SRGB", 0, "sRGB", "Image is in sRGB color space"},
{0, NULL, 0, NULL, NULL}};
@@ -1305,7 +1305,7 @@ static void def_sh_tex_image(StructRNA *srna)
RNA_def_struct_sdna_from(srna, "NodeTexImage", "storage");
def_sh_tex(srna);
- prop= RNA_def_property(srna, "color_space", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "color_space", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_color_space_items);
RNA_def_property_ui_text(prop, "Color Space", "Image file color space");
RNA_def_property_update(prop, 0, "rna_Node_update");
@@ -1328,7 +1328,7 @@ static void def_sh_tex_gradient(StructRNA *srna)
RNA_def_struct_sdna_from(srna, "NodeTexGradient", "storage");
def_sh_tex(srna);
- prop= RNA_def_property(srna, "gradient_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "gradient_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_gradient_type);
RNA_def_property_ui_text(prop, "Gradient Type", "Style of the color blending");
RNA_def_property_update(prop, 0, "rna_Node_update");
@@ -1353,7 +1353,7 @@ static void def_sh_tex_magic(StructRNA *srna)
RNA_def_struct_sdna_from(srna, "NodeTexMagic", "storage");
def_sh_tex(srna);
- prop= RNA_def_property(srna, "turbulence_depth", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "turbulence_depth", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "depth");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Depth", "Level of detail in the added turbulent noise");
@@ -1375,7 +1375,7 @@ static void def_sh_tex_musgrave(StructRNA *srna)
RNA_def_struct_sdna_from(srna, "NodeTexMusgrave", "storage");
def_sh_tex(srna);
- prop= RNA_def_property(srna, "musgrave_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "musgrave_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "musgrave_type");
RNA_def_property_enum_items(prop, prop_musgrave_type);
RNA_def_property_ui_text(prop, "Type", "");
@@ -1394,7 +1394,7 @@ static void def_sh_tex_voronoi(StructRNA *srna)
RNA_def_struct_sdna_from(srna, "NodeTexVoronoi", "storage");
def_sh_tex(srna);
- prop= RNA_def_property(srna, "coloring", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "coloring", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "coloring");
RNA_def_property_enum_items(prop, prop_coloring_items);
RNA_def_property_ui_text(prop, "Coloring", "");
@@ -1413,7 +1413,7 @@ static void def_sh_tex_wave(StructRNA *srna)
RNA_def_struct_sdna_from(srna, "NodeTexWave", "storage");
def_sh_tex(srna);
- prop= RNA_def_property(srna, "wave_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "wave_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "wave_type");
RNA_def_property_enum_items(prop, prop_wave_type_items);
RNA_def_property_ui_text(prop, "Wave Type", "");
@@ -1437,7 +1437,7 @@ static void def_cmp_alpha_over(StructRNA *srna)
{
PropertyRNA *prop;
- // XXX: Tooltip
+ /* XXX: Tooltip */
prop = RNA_def_property(srna, "use_premultiply", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "custom1", 1);
RNA_def_property_ui_text(prop, "Convert Premul", "");
@@ -1720,7 +1720,7 @@ static void def_cmp_image(StructRNA *srna)
RNA_def_property_ui_text(prop, "Auto-Refresh", "Always refresh image on frame changes"); /* copied from the rna_image.c */
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
- prop= RNA_def_property(srna, "layer", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "layer", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "layer");
RNA_def_property_enum_items(prop, prop_image_layer_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Node_image_layer_itemf");
@@ -1740,7 +1740,7 @@ static void def_cmp_render_layers(StructRNA *srna)
RNA_def_property_ui_text(prop, "Scene", "");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
- prop= RNA_def_property(srna, "layer", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "layer", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "custom1");
RNA_def_property_enum_items(prop, prop_scene_layer_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Node_scene_layer_itemf");
@@ -2062,7 +2062,7 @@ static void def_cmp_channel_matte(StructRNA *srna)
RNA_def_property_ui_text(prop, "Color Space", "");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
- prop= RNA_def_property(srna, "matte_channel", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "matte_channel", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "custom2");
RNA_def_property_enum_items(prop, prop_tri_channel_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Node_channel_itemf");
@@ -2917,28 +2917,28 @@ static void rna_def_nodetree_link_api(BlenderRNA *brna, PropertyRNA *cprop)
FunctionRNA *func;
RNA_def_property_srna(cprop, "NodeLinks");
- srna= RNA_def_struct(brna, "NodeLinks", NULL);
+ srna = RNA_def_struct(brna, "NodeLinks", NULL);
RNA_def_struct_sdna(srna, "bNodeTree");
RNA_def_struct_ui_text(srna, "Node Links", "Collection of Node Links");
- func= RNA_def_function(srna, "new", "rna_NodeTree_link_new");
+ func = RNA_def_function(srna, "new", "rna_NodeTree_link_new");
RNA_def_function_ui_description(func, "Add a node link to this node tree");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "input", "NodeSocket", "", "The input socket");
+ parm = RNA_def_pointer(func, "input", "NodeSocket", "", "The input socket");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "output", "NodeSocket", "", "The output socket");
+ parm = RNA_def_pointer(func, "output", "NodeSocket", "", "The output socket");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return */
- parm= RNA_def_pointer(func, "link", "NodeLink", "", "New node link");
+ parm = RNA_def_pointer(func, "link", "NodeLink", "", "New node link");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_NodeTree_link_remove");
+ func = RNA_def_function(srna, "remove", "rna_NodeTree_link_remove");
RNA_def_function_ui_description(func, "remove a node link from the node tree");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "link", "NodeLink", "", "The node link to remove");
+ parm = RNA_def_pointer(func, "link", "NodeLink", "", "The node link to remove");
RNA_def_property_flag(parm, PROP_REQUIRED);
- func= RNA_def_function(srna, "clear", "rna_NodeTree_link_clear");
+ func = RNA_def_function(srna, "clear", "rna_NodeTree_link_clear");
RNA_def_function_ui_description(func, "remove all node links from the node tree");
}
@@ -2949,27 +2949,27 @@ static void rna_def_composite_nodetree_api(BlenderRNA *brna, PropertyRNA *cprop)
FunctionRNA *func;
RNA_def_property_srna(cprop, "CompositorNodes");
- srna= RNA_def_struct(brna, "CompositorNodes", NULL);
+ srna = RNA_def_struct(brna, "CompositorNodes", NULL);
RNA_def_struct_sdna(srna, "bNodeTree");
RNA_def_struct_ui_text(srna, "Compositor Nodes", "Collection of Compositor Nodes");
- func= RNA_def_function(srna, "new", "rna_NodeTree_node_composite_new");
+ func = RNA_def_function(srna, "new", "rna_NodeTree_node_composite_new");
RNA_def_function_ui_description(func, "Add a node to this node tree");
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
- parm= RNA_def_enum(func, "type", compositor_node_type_items, 0, "Type", "Type of node to add");
+ parm = RNA_def_enum(func, "type", compositor_node_type_items, 0, "Type", "Type of node to add");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_pointer(func, "group", "NodeTree", "", "The group tree");
/* return value */
- parm= RNA_def_pointer(func, "node", "Node", "", "New node");
+ parm = RNA_def_pointer(func, "node", "Node", "", "New node");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_NodeTree_node_remove");
+ func = RNA_def_function(srna, "remove", "rna_NodeTree_node_remove");
RNA_def_function_ui_description(func, "Remove a node from this node tree");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "node", "Node", "", "The node to remove");
+ parm = RNA_def_pointer(func, "node", "Node", "", "The node to remove");
RNA_def_property_flag(parm, PROP_REQUIRED);
- func= RNA_def_function(srna, "clear", "rna_NodeTree_node_clear");
+ func = RNA_def_function(srna, "clear", "rna_NodeTree_node_clear");
RNA_def_function_ui_description(func, "Remove all nodes from this node tree");
}
@@ -2980,27 +2980,27 @@ static void rna_def_shader_nodetree_api(BlenderRNA *brna, PropertyRNA *cprop)
FunctionRNA *func;
RNA_def_property_srna(cprop, "ShaderNodes");
- srna= RNA_def_struct(brna, "ShaderNodes", NULL);
+ srna = RNA_def_struct(brna, "ShaderNodes", NULL);
RNA_def_struct_sdna(srna, "bNodeTree");
RNA_def_struct_ui_text(srna, "Shader Nodes", "Collection of Shader Nodes");
- func= RNA_def_function(srna, "new", "rna_NodeTree_node_new");
+ func = RNA_def_function(srna, "new", "rna_NodeTree_node_new");
RNA_def_function_ui_description(func, "Add a node to this node tree");
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
- parm= RNA_def_enum(func, "type", shader_node_type_items, 0, "Type", "Type of node to add");
+ parm = RNA_def_enum(func, "type", shader_node_type_items, 0, "Type", "Type of node to add");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_pointer(func, "group", "NodeTree", "", "The group tree");
/* return value */
- parm= RNA_def_pointer(func, "node", "Node", "", "New node");
+ parm = RNA_def_pointer(func, "node", "Node", "", "New node");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_NodeTree_node_remove");
+ func = RNA_def_function(srna, "remove", "rna_NodeTree_node_remove");
RNA_def_function_ui_description(func, "Remove a node from this node tree");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "node", "Node", "", "The node to remove");
+ parm = RNA_def_pointer(func, "node", "Node", "", "The node to remove");
RNA_def_property_flag(parm, PROP_REQUIRED);
- func= RNA_def_function(srna, "clear", "rna_NodeTree_node_clear");
+ func = RNA_def_function(srna, "clear", "rna_NodeTree_node_clear");
RNA_def_function_ui_description(func, "Remove all nodes from this node tree");
}
@@ -3011,27 +3011,27 @@ static void rna_def_texture_nodetree_api(BlenderRNA *brna, PropertyRNA *cprop)
FunctionRNA *func;
RNA_def_property_srna(cprop, "TextureNodes");
- srna= RNA_def_struct(brna, "TextureNodes", NULL);
+ srna = RNA_def_struct(brna, "TextureNodes", NULL);
RNA_def_struct_sdna(srna, "bNodeTree");
RNA_def_struct_ui_text(srna, "Texture Nodes", "Collection of Texture Nodes");
- func= RNA_def_function(srna, "new", "rna_NodeTree_node_texture_new");
+ func = RNA_def_function(srna, "new", "rna_NodeTree_node_texture_new");
RNA_def_function_ui_description(func, "Add a node to this node tree");
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
- parm= RNA_def_enum(func, "type", texture_node_type_items, 0, "Type", "Type of node to add");
+ parm = RNA_def_enum(func, "type", texture_node_type_items, 0, "Type", "Type of node to add");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_pointer(func, "group", "NodeTree", "", "The group tree");
/* return value */
- parm= RNA_def_pointer(func, "node", "Node", "", "New node");
+ parm = RNA_def_pointer(func, "node", "Node", "", "New node");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_NodeTree_node_remove");
+ func = RNA_def_function(srna, "remove", "rna_NodeTree_node_remove");
RNA_def_function_ui_description(func, "Remove a node from this node tree");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "node", "Node", "", "The node to remove");
+ parm = RNA_def_pointer(func, "node", "Node", "", "The node to remove");
RNA_def_property_flag(parm, PROP_REQUIRED);
- func= RNA_def_function(srna, "clear", "rna_NodeTree_node_clear");
+ func = RNA_def_function(srna, "clear", "rna_NodeTree_node_clear");
RNA_def_function_ui_description(func, "Remove all nodes from this node tree");
}
@@ -3056,7 +3056,7 @@ static void rna_def_node_socket(BlenderRNA *brna)
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
/* XXX must be editable for group sockets. if necessary use a special rna definition for these */
-// RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+/* RNA_def_property_clear_flag(prop, PROP_EDITABLE); */
RNA_def_property_ui_text(prop, "Name", "Socket name");
RNA_def_struct_name_property(srna, prop);
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeGroupSocket_update");
@@ -3075,8 +3075,8 @@ static void rna_def_node_socket(BlenderRNA *brna)
static void rna_def_node_socket_subtype(BlenderRNA *brna, int type, int subtype, const char *name, const char *ui_name)
{
StructRNA *srna;
- PropertyRNA *prop=NULL;
- PropertySubType propsubtype= PROP_NONE;
+ PropertyRNA *prop = NULL;
+ PropertySubType propsubtype = PROP_NONE;
#define SUBTYPE(socktype, stypename, id, idname) { PROP_##id, #socktype "_" #id, 0, #idname, ""},
static EnumPropertyItem subtype_items[] = {
@@ -3252,28 +3252,28 @@ static void rna_def_group_sockets_api(BlenderRNA *brna, PropertyRNA *cprop, int
PropertyRNA *parm;
FunctionRNA *func;
- RNA_def_property_srna(cprop, (in_out==SOCK_IN ? "GroupInputs" : "GroupOutputs"));
- srna= RNA_def_struct(brna, (in_out==SOCK_IN ? "GroupInputs" : "GroupOutputs"), NULL);
+ RNA_def_property_srna(cprop, (in_out == SOCK_IN ? "GroupInputs" : "GroupOutputs"));
+ srna = RNA_def_struct(brna, (in_out == SOCK_IN ? "GroupInputs" : "GroupOutputs"), NULL);
RNA_def_struct_sdna(srna, "bNodeTree");
RNA_def_struct_ui_text(srna, "Group Sockets", "Collection of group sockets");
- func= RNA_def_function(srna, "new", (in_out==SOCK_IN ? "rna_NodeTree_input_new" : "rna_NodeTree_output_new"));
+ func = RNA_def_function(srna, "new", (in_out == SOCK_IN ? "rna_NodeTree_input_new" : "rna_NodeTree_output_new"));
RNA_def_function_ui_description(func, "Add a socket to the group tree");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_string(func, "name", "Socket", MAX_NAME, "Name", "Name of the socket");
RNA_def_enum(func, "type", node_socket_type_items, SOCK_FLOAT, "Type", "Type of socket");
/* return value */
- parm= RNA_def_pointer(func, "socket", "NodeSocket", "", "New socket");
+ parm = RNA_def_pointer(func, "socket", "NodeSocket", "", "New socket");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "expose", (in_out==SOCK_IN ? "rna_NodeTree_input_expose" : "rna_NodeTree_output_expose"));
+ func = RNA_def_function(srna, "expose", (in_out == SOCK_IN ? "rna_NodeTree_input_expose" : "rna_NodeTree_output_expose"));
RNA_def_function_ui_description(func, "Expose an internal socket in the group tree");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_pointer(func, "sock", "NodeSocket", "Socket", "Internal node socket to expose");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_boolean(func, "add_link", TRUE, "Add Link", "If TRUE, adds a link to the internal socket");
/* return value */
- parm= RNA_def_pointer(func, "socket", "NodeSocket", "", "New socket");
+ parm = RNA_def_pointer(func, "socket", "NodeSocket", "", "New socket");
RNA_def_function_return(func, parm);
}
@@ -3299,7 +3299,7 @@ static void rna_def_nodetree(BlenderRNA *brna)
rna_def_nodetree_link_api(brna, prop);
/* Grease Pencil */
- prop= RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "gpd");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "GreasePencil");
@@ -3386,7 +3386,7 @@ static void define_specific_node(BlenderRNA *brna, int id, void (*func)(StructRN
{
StructRNA *srna = def_node(brna, id);
- if(func)
+ if (func)
func(srna);
}
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index c9881efd73b..6f7c22389c6 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -71,7 +71,7 @@ static EnumPropertyItem parent_type_items[] = {
{PARCURVE, "CURVE", 0, "Curve", "The object is parented to a curve"},
{PARKEY, "KEY", 0, "Key", ""},
{PARSKEL, "ARMATURE", 0, "Armature", ""},
- {PARSKEL, "LATTICE", 0, "Lattice", "The object is parented to a lattice"}, // PARSKEL reuse will give issues
+ {PARSKEL, "LATTICE", 0, "Lattice", "The object is parented to a lattice"}, /* PARSKEL reuse will give issues */
{PARVERT1, "VERTEX", 0, "Vertex", "The object is parented to a vertex"},
{PARVERT3, "VERTEX_3", 0, "3 Vertices", ""},
{PARBONE, "BONE", 0, "Bone", "The object is parented to a bone"},
@@ -85,14 +85,14 @@ static EnumPropertyItem collision_bounds_items[] = {
{OB_BOUND_CONVEX_HULL, "CONVEX_HULL", 0, "Convex Hull", ""},
{OB_BOUND_TRIANGLE_MESH, "TRIANGLE_MESH", 0, "Triangle Mesh", ""},
{OB_BOUND_CAPSULE, "CAPSULE", 0, "Capsule", ""},
- //{OB_DYN_MESH, "DYNAMIC_MESH", 0, "Dynamic Mesh", ""},
+ /*{OB_DYN_MESH, "DYNAMIC_MESH", 0, "Dynamic Mesh", ""}, */
{0, NULL, 0, NULL, NULL}};
EnumPropertyItem metaelem_type_items[] = {
{MB_BALL, "BALL", ICON_META_BALL, "Ball", ""},
{MB_TUBE, "CAPSULE", ICON_META_CAPSULE, "Capsule", ""},
{MB_PLANE, "PLANE", ICON_META_PLANE, "Plane", ""},
- {MB_ELIPSOID, "ELLIPSOID", ICON_META_ELLIPSOID, "Ellipsoid", ""}, // NOTE: typo at original definition!
+ {MB_ELIPSOID, "ELLIPSOID", ICON_META_ELLIPSOID, "Ellipsoid", ""}, /* NOTE: typo at original definition! */
{MB_CUBE, "CUBE", ICON_META_CUBE, "Cube", ""},
{0, NULL, 0, NULL, NULL}};
@@ -168,9 +168,9 @@ static void rna_Object_matrix_world_update(Main *bmain, Scene *scene, PointerRNA
static void rna_Object_matrix_local_get(PointerRNA *ptr, float values[16])
{
- Object *ob= ptr->id.data;
+ Object *ob = ptr->id.data;
- if(ob->parent) {
+ if (ob->parent) {
float invmat[4][4]; /* for inverse of parent's matrix */
invert_m4_m4(invmat, ob->parent->obmat);
mult_m4_m4m4((float(*)[4])values, invmat, ob->obmat);
@@ -182,12 +182,12 @@ static void rna_Object_matrix_local_get(PointerRNA *ptr, float values[16])
static void rna_Object_matrix_local_set(PointerRNA *ptr, const float values[16])
{
- Object *ob= ptr->id.data;
+ Object *ob = ptr->id.data;
/* localspace matrix is truly relative to the parent, but parameters
* stored in object are relative to parentinv matrix. Undo the parent
* inverse part before updating obmat and calling apply_obmat() */
- if(ob->parent) {
+ if (ob->parent) {
float invmat[4][4];
invert_m4_m4(invmat, ob->parentinv);
mult_m4_m4m4(ob->obmat, invmat, (float(*)[4])values);
@@ -202,13 +202,13 @@ static void rna_Object_matrix_local_set(PointerRNA *ptr, const float values[16])
static void rna_Object_matrix_basis_get(PointerRNA *ptr, float values[16])
{
- Object *ob= ptr->id.data;
+ Object *ob = ptr->id.data;
object_to_mat4(ob, (float(*)[4])values);
}
static void rna_Object_matrix_basis_set(PointerRNA *ptr, const float values[16])
{
- Object *ob= ptr->id.data;
+ Object *ob = ptr->id.data;
object_apply_mat4(ob, (float(*)[4])values, FALSE, FALSE);
}
@@ -220,11 +220,11 @@ void rna_Object_internal_update_data(Main *UNUSED(bmain), Scene *UNUSED(scene),
void rna_Object_active_shape_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Object *ob= ptr->id.data;
+ Object *ob = ptr->id.data;
- if(scene->obedit == ob) {
+ if (scene->obedit == ob) {
/* exit/enter editmode to get new shape */
- switch(ob->type) {
+ switch (ob->type) {
case OB_MESH:
EDBM_LoadEditBMesh(scene, ob);
EDBM_MakeEditBMesh(scene->toolsettings, scene, ob);
@@ -258,7 +258,7 @@ static void rna_Object_dependency_update(Main *bmain, Scene *scene, PointerRNA *
static void rna_Object_select_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
{
if (scene) {
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
short mode = ob->flag & SELECT ? BA_SELECT : BA_DESELECT;
ED_base_object_select(object_in_scene(ob, scene), mode);
}
@@ -266,7 +266,7 @@ static void rna_Object_select_update(Main *UNUSED(bmain), Scene *scene, PointerR
static void rna_Base_select_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Base *base= (Base*)ptr->data;
+ Base *base = (Base*)ptr->data;
short mode = base->flag & BA_SELECT ? BA_SELECT : BA_DESELECT;
ED_base_object_select(base, mode);
}
@@ -274,13 +274,13 @@ static void rna_Base_select_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Po
static void rna_Object_layer_update__internal(Main *bmain, Scene *scene, Base *base, Object *ob)
{
/* try to avoid scene sort */
- if(scene == NULL) {
+ if (scene == NULL) {
/* pass - unlikely but when running scripts on startup it happens */
}
- else if((ob->lay & scene->lay) && (base->lay & scene->lay)) {
+ else if ((ob->lay & scene->lay) && (base->lay & scene->lay)) {
/* pass */
}
- else if((ob->lay & scene->lay)==0 && (base->lay & scene->lay)==0) {
+ else if ((ob->lay & scene->lay) == 0 && (base->lay & scene->lay) == 0) {
/* pass */
}
else {
@@ -292,42 +292,42 @@ static void rna_Object_layer_update__internal(Main *bmain, Scene *scene, Base *b
static void rna_Object_layer_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
Base *base;
- base= scene ? object_in_scene(ob, scene) : NULL;
- if(!base)
+ base = scene ? object_in_scene(ob, scene) : NULL;
+ if (!base)
return;
SWAP(int, base->lay, ob->lay);
rna_Object_layer_update__internal(bmain, scene, base, ob);
- ob->lay= base->lay;
+ ob->lay = base->lay;
WM_main_add_notifier(NC_SCENE|ND_LAYER_CONTENT, scene);
}
static void rna_Base_layer_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Base *base= (Base*)ptr->data;
- Object *ob= (Object*)base->object;
+ Base *base = (Base*)ptr->data;
+ Object *ob = (Object*)base->object;
rna_Object_layer_update__internal(bmain, scene, base, ob);
- ob->lay= base->lay;
+ ob->lay = base->lay;
WM_main_add_notifier(NC_SCENE|ND_LAYER_CONTENT, scene);
}
static void rna_Object_data_set(PointerRNA *ptr, PointerRNA value)
{
- Object *ob= (Object*)ptr->data;
- ID *id= value.data;
+ Object *ob = (Object*)ptr->data;
+ ID *id = value.data;
if (id == NULL || ob->mode & OB_MODE_EDIT)
return;
if (ob->type == OB_EMPTY) {
- if(ob->data) {
+ if (ob->data) {
id_us_min((ID*)ob->data);
ob->data = NULL;
}
@@ -337,30 +337,30 @@ static void rna_Object_data_set(PointerRNA *ptr, PointerRNA value)
ob->data = id;
}
}
- else if(ob->type == OB_MESH) {
+ else if (ob->type == OB_MESH) {
set_mesh(ob, (Mesh*)id);
}
else {
- if(ob->data)
+ if (ob->data)
id_us_min((ID*)ob->data);
- if(id)
+ if (id)
id_us_plus(id);
- ob->data= id;
+ ob->data = id;
test_object_materials(id);
- if(GS(id->name)==ID_CU)
+ if (GS(id->name) == ID_CU)
test_curve_type(ob);
- else if(ob->type==OB_ARMATURE)
+ else if (ob->type == OB_ARMATURE)
armature_rebuild_pose(ob, ob->data);
}
}
static StructRNA *rna_Object_data_typef(PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->data;
+ Object *ob = (Object*)ptr->data;
- switch(ob->type) {
+ switch (ob->type) {
case OB_EMPTY: return &RNA_Image;
case OB_MESH: return &RNA_Mesh;
case OB_CURVE: return &RNA_Curve;
@@ -378,15 +378,15 @@ static StructRNA *rna_Object_data_typef(PointerRNA *ptr)
static void rna_Object_parent_set(PointerRNA *ptr, PointerRNA value)
{
- Object *ob= (Object*)ptr->data;
- Object *par= (Object*)value.data;
+ Object *ob = (Object*)ptr->data;
+ Object *par = (Object*)value.data;
ED_object_parent(ob, par, ob->partype, ob->parsubstr);
}
static void rna_Object_parent_type_set(PointerRNA *ptr, int value)
{
- Object *ob= (Object*)ptr->data;
+ Object *ob = (Object*)ptr->data;
ED_object_parent(ob, ob->parent, value, ob->parsubstr);
}
@@ -394,31 +394,31 @@ static void rna_Object_parent_type_set(PointerRNA *ptr, int value)
static EnumPropertyItem *rna_Object_parent_type_itemf(bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), int *free)
{
- Object *ob= (Object*)ptr->data;
- EnumPropertyItem *item= NULL;
- int totitem= 0;
+ Object *ob = (Object*)ptr->data;
+ EnumPropertyItem *item = NULL;
+ int totitem = 0;
RNA_enum_items_add_value(&item, &totitem, parent_type_items, PAROBJECT);
- if(ob->parent) {
- Object *par= ob->parent;
+ if (ob->parent) {
+ Object *par = ob->parent;
- if(par->type == OB_CURVE)
+ if (par->type == OB_CURVE)
RNA_enum_items_add_value(&item, &totitem, parent_type_items, PARCURVE);
- else if(par->type == OB_LATTICE)
- RNA_enum_items_add_value(&item, &totitem, &parent_type_items[4], PARSKEL); // special hack: prevents this overriding others
- else if(par->type == OB_ARMATURE) {
- RNA_enum_items_add_value(&item, &totitem, &parent_type_items[3], PARSKEL); // special hack: prevents this being overrided
+ else if (par->type == OB_LATTICE)
+ RNA_enum_items_add_value(&item, &totitem, &parent_type_items[4], PARSKEL); /* special hack: prevents this overriding others */
+ else if (par->type == OB_ARMATURE) {
+ RNA_enum_items_add_value(&item, &totitem, &parent_type_items[3], PARSKEL); /* special hack: prevents this being overrided */
RNA_enum_items_add_value(&item, &totitem, parent_type_items, PARBONE);
}
- else if(par->type == OB_MESH) {
+ else if (par->type == OB_MESH) {
RNA_enum_items_add_value(&item, &totitem, parent_type_items, PARVERT1);
RNA_enum_items_add_value(&item, &totitem, parent_type_items, PARVERT3);
}
}
RNA_enum_item_end(&item, &totitem);
- *free= 1;
+ *free = 1;
return item;
}
@@ -426,14 +426,14 @@ static EnumPropertyItem *rna_Object_parent_type_itemf(bContext *UNUSED(C), Point
static EnumPropertyItem *rna_Object_collision_bounds_itemf(bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), int *free)
{
- Object *ob= (Object*)ptr->data;
- EnumPropertyItem *item= NULL;
- int totitem= 0;
+ Object *ob = (Object*)ptr->data;
+ EnumPropertyItem *item = NULL;
+ int totitem = 0;
RNA_enum_items_add_value(&item, &totitem, collision_bounds_items, OB_BOUND_TRIANGLE_MESH);
RNA_enum_items_add_value(&item, &totitem, collision_bounds_items, OB_BOUND_CONVEX_HULL);
- if(ob->body_type!=OB_BODY_TYPE_SOFT) {
+ if (ob->body_type != OB_BODY_TYPE_SOFT) {
RNA_enum_items_add_value(&item, &totitem, collision_bounds_items, OB_BOUND_CONE);
RNA_enum_items_add_value(&item, &totitem, collision_bounds_items, OB_BOUND_CYLINDER);
RNA_enum_items_add_value(&item, &totitem, collision_bounds_items, OB_BOUND_SPHERE);
@@ -442,21 +442,21 @@ static EnumPropertyItem *rna_Object_collision_bounds_itemf(bContext *UNUSED(C),
}
RNA_enum_item_end(&item, &totitem);
- *free= 1;
+ *free = 1;
return item;
}
static void rna_Object_parent_bone_set(PointerRNA *ptr, const char *value)
{
- Object *ob= (Object*)ptr->data;
+ Object *ob = (Object*)ptr->data;
ED_object_parent(ob, ob->parent, ob->partype, value);
}
static void rna_Object_dup_group_set(PointerRNA *ptr, PointerRNA value)
{
- Object *ob= (Object *)ptr->data;
+ Object *ob = (Object *)ptr->data;
Group *grp = (Group *)value.data;
/* must not let this be set if the object belongs in this group already,
@@ -470,169 +470,169 @@ static void rna_Object_dup_group_set(PointerRNA *ptr, PointerRNA value)
void rna_VertexGroup_name_set(PointerRNA *ptr, const char *value)
{
- Object *ob= (Object *)ptr->id.data;
- bDeformGroup *dg= (bDeformGroup *)ptr->data;
+ Object *ob = (Object *)ptr->id.data;
+ bDeformGroup *dg = (bDeformGroup *)ptr->data;
BLI_strncpy_utf8(dg->name, value, sizeof(dg->name));
defgroup_unique_name(dg, ob);
}
static int rna_VertexGroup_index_get(PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
return BLI_findindex(&ob->defbase, ptr->data);
}
static PointerRNA rna_Object_active_vertex_group_get(PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
return rna_pointer_inherit_refine(ptr, &RNA_VertexGroup, BLI_findlink(&ob->defbase, ob->actdef-1));
}
static int rna_Object_active_vertex_group_index_get(PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
return ob->actdef-1;
}
static void rna_Object_active_vertex_group_index_set(PointerRNA *ptr, int value)
{
- Object *ob= (Object*)ptr->id.data;
- ob->actdef= value+1;
+ Object *ob = (Object*)ptr->id.data;
+ ob->actdef = value+1;
}
static void rna_Object_active_vertex_group_index_range(PointerRNA *ptr, int *min, int *max)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
- *min= 0;
- *max= BLI_countlist(&ob->defbase)-1;
- *max= MAX2(0, *max);
+ *min = 0;
+ *max = BLI_countlist(&ob->defbase)-1;
+ *max = MAX2(0, *max);
}
void rna_object_vgroup_name_index_get(PointerRNA *ptr, char *value, int index)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
bDeformGroup *dg;
- dg= BLI_findlink(&ob->defbase, index-1);
+ dg = BLI_findlink(&ob->defbase, index-1);
- if(dg) BLI_strncpy(value, dg->name, sizeof(dg->name));
- else value[0]= '\0';
+ if (dg) BLI_strncpy(value, dg->name, sizeof(dg->name));
+ else value[0] = '\0';
}
int rna_object_vgroup_name_index_length(PointerRNA *ptr, int index)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
bDeformGroup *dg;
- dg= BLI_findlink(&ob->defbase, index-1);
+ dg = BLI_findlink(&ob->defbase, index-1);
return (dg)? strlen(dg->name): 0;
}
void rna_object_vgroup_name_index_set(PointerRNA *ptr, const char *value, short *index)
{
- Object *ob= (Object*)ptr->id.data;
- *index= defgroup_name_index(ob, value) + 1;
+ Object *ob = (Object*)ptr->id.data;
+ *index = defgroup_name_index(ob, value) + 1;
}
void rna_object_vgroup_name_set(PointerRNA *ptr, const char *value, char *result, int maxlen)
{
- Object *ob= (Object*)ptr->id.data;
- bDeformGroup *dg= defgroup_find_name(ob, value);
- if(dg) {
+ Object *ob = (Object*)ptr->id.data;
+ bDeformGroup *dg = defgroup_find_name(ob, value);
+ if (dg) {
BLI_strncpy(result, value, maxlen); /* no need for BLI_strncpy_utf8, since this matches an existing group */
return;
}
- result[0]= '\0';
+ result[0] = '\0';
}
void rna_object_uvlayer_name_set(PointerRNA *ptr, const char *value, char *result, int maxlen)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
Mesh *me;
CustomDataLayer *layer;
int a;
- if(ob->type == OB_MESH && ob->data) {
- me= (Mesh*)ob->data;
+ if (ob->type == OB_MESH && ob->data) {
+ me = (Mesh*)ob->data;
- for(a=0; a<me->fdata.totlayer; a++) {
- layer= &me->fdata.layers[a];
+ for (a = 0; a<me->fdata.totlayer; a++) {
+ layer = &me->fdata.layers[a];
- if(layer->type == CD_MTFACE && strcmp(layer->name, value) == 0) {
+ if (layer->type == CD_MTFACE && strcmp(layer->name, value) == 0) {
BLI_strncpy(result, value, maxlen);
return;
}
}
}
- result[0]= '\0';
+ result[0] = '\0';
}
void rna_object_vcollayer_name_set(PointerRNA *ptr, const char *value, char *result, int maxlen)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
Mesh *me;
CustomDataLayer *layer;
int a;
- if(ob->type == OB_MESH && ob->data) {
- me= (Mesh*)ob->data;
+ if (ob->type == OB_MESH && ob->data) {
+ me = (Mesh*)ob->data;
- for(a=0; a<me->fdata.totlayer; a++) {
- layer= &me->fdata.layers[a];
+ for (a = 0; a<me->fdata.totlayer; a++) {
+ layer = &me->fdata.layers[a];
- if(layer->type == CD_MCOL && strcmp(layer->name, value) == 0) {
+ if (layer->type == CD_MCOL && strcmp(layer->name, value) == 0) {
BLI_strncpy(result, value, maxlen);
return;
}
}
}
- result[0]= '\0';
+ result[0] = '\0';
}
static int rna_Object_active_material_index_get(PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
return MAX2(ob->actcol-1, 0);
}
static void rna_Object_active_material_index_set(PointerRNA *ptr, int value)
{
- Object *ob= (Object*)ptr->id.data;
- ob->actcol= value+1;
+ Object *ob = (Object*)ptr->id.data;
+ ob->actcol = value+1;
- if(ob->type==OB_MESH) {
- Mesh *me= ob->data;
+ if (ob->type == OB_MESH) {
+ Mesh *me = ob->data;
- if(me->edit_btmesh)
- me->edit_btmesh->mat_nr= value;
+ if (me->edit_btmesh)
+ me->edit_btmesh->mat_nr = value;
}
}
static void rna_Object_active_material_index_range(PointerRNA *ptr, int *min, int *max)
{
- Object *ob= (Object*)ptr->id.data;
- *min= 0;
- *max= MAX2(ob->totcol-1, 0);
+ Object *ob = (Object*)ptr->id.data;
+ *min = 0;
+ *max = MAX2(ob->totcol-1, 0);
}
/* returns active base material */
static PointerRNA rna_Object_active_material_get(PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
Material *ma;
- ma= (ob->totcol)? give_current_material(ob, ob->actcol): NULL;
+ ma = (ob->totcol)? give_current_material(ob, ob->actcol): NULL;
return rna_pointer_inherit_refine(ptr, &RNA_Material, ma);
}
static void rna_Object_active_material_set(PointerRNA *ptr, PointerRNA value)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
DAG_id_tag_update(value.data, 0);
assign_material(ob, value.data, ob->actcol);
@@ -640,27 +640,27 @@ static void rna_Object_active_material_set(PointerRNA *ptr, PointerRNA value)
static void rna_Object_active_particle_system_index_range(PointerRNA *ptr, int *min, int *max)
{
- Object *ob= (Object*)ptr->id.data;
- *min= 0;
- *max= BLI_countlist(&ob->particlesystem)-1;
- *max= MAX2(0, *max);
+ Object *ob = (Object*)ptr->id.data;
+ *min = 0;
+ *max = BLI_countlist(&ob->particlesystem)-1;
+ *max = MAX2(0, *max);
}
static int rna_Object_active_particle_system_index_get(PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
return psys_get_current_num(ob);
}
static void rna_Object_active_particle_system_index_set(PointerRNA *ptr, int value)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
psys_set_current_num(ob, value);
}
static void rna_Object_particle_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
PE_current_changed(scene, ob);
}
@@ -668,51 +668,51 @@ static void rna_Object_particle_update(Main *UNUSED(bmain), Scene *scene, Pointe
/* rotation - axis-angle */
static void rna_Object_rotation_axis_angle_get(PointerRNA *ptr, float *value)
{
- Object *ob= ptr->data;
+ Object *ob = ptr->data;
/* for now, assume that rotation mode is axis-angle */
- value[0]= ob->rotAngle;
+ value[0] = ob->rotAngle;
copy_v3_v3(&value[1], ob->rotAxis);
}
/* rotation - axis-angle */
static void rna_Object_rotation_axis_angle_set(PointerRNA *ptr, const float *value)
{
- Object *ob= ptr->data;
+ Object *ob = ptr->data;
/* for now, assume that rotation mode is axis-angle */
- ob->rotAngle= value[0];
+ ob->rotAngle = value[0];
copy_v3_v3(ob->rotAxis, (float *)&value[1]);
- // TODO: validate axis?
+ /* TODO: validate axis? */
}
static void rna_Object_rotation_mode_set(PointerRNA *ptr, int value)
{
- Object *ob= ptr->data;
+ Object *ob = ptr->data;
/* use API Method for conversions... */
BKE_rotMode_change_values(ob->quat, ob->rot, ob->rotAxis, &ob->rotAngle, ob->rotmode, (short)value);
/* finally, set the new rotation type */
- ob->rotmode= value;
+ ob->rotmode = value;
}
static void rna_Object_dimensions_get(PointerRNA *ptr, float *value)
{
- Object *ob= ptr->data;
+ Object *ob = ptr->data;
object_get_dimensions(ob, value);
}
static void rna_Object_dimensions_set(PointerRNA *ptr, const float *value)
{
- Object *ob= ptr->data;
+ Object *ob = ptr->data;
object_set_dimensions(ob, value);
}
static int rna_Object_location_editable(PointerRNA *ptr, int index)
{
- Object *ob= (Object *)ptr->data;
+ Object *ob = (Object *)ptr->data;
/* only if the axis in question is locked, not editable... */
if ((index == 0) && (ob->protectflag & OB_LOCK_LOCX))
@@ -727,7 +727,7 @@ static int rna_Object_location_editable(PointerRNA *ptr, int index)
static int rna_Object_scale_editable(PointerRNA *ptr, int index)
{
- Object *ob= (Object *)ptr->data;
+ Object *ob = (Object *)ptr->data;
/* only if the axis in question is locked, not editable... */
if ((index == 0) && (ob->protectflag & OB_LOCK_SCALEX))
@@ -742,7 +742,7 @@ static int rna_Object_scale_editable(PointerRNA *ptr, int index)
static int rna_Object_rotation_euler_editable(PointerRNA *ptr, int index)
{
- Object *ob= (Object *)ptr->data;
+ Object *ob = (Object *)ptr->data;
/* only if the axis in question is locked, not editable... */
if ((index == 0) && (ob->protectflag & OB_LOCK_ROTX))
@@ -757,7 +757,7 @@ static int rna_Object_rotation_euler_editable(PointerRNA *ptr, int index)
static int rna_Object_rotation_4d_editable(PointerRNA *ptr, int index)
{
- Object *ob= (Object *)ptr->data;
+ Object *ob = (Object *)ptr->data;
/* only consider locks if locking components individually... */
if (ob->protectflag & OB_LOCK_ROT4D) {
@@ -778,54 +778,54 @@ static int rna_Object_rotation_4d_editable(PointerRNA *ptr, int index)
static PointerRNA rna_MaterialSlot_material_get(PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
Material *ma;
- int index= (Material**)ptr->data - ob->mat;
+ int index = (Material**)ptr->data - ob->mat;
- ma= give_current_material(ob, index+1);
+ ma = give_current_material(ob, index+1);
return rna_pointer_inherit_refine(ptr, &RNA_Material, ma);
}
static void rna_MaterialSlot_material_set(PointerRNA *ptr, PointerRNA value)
{
- Object *ob= (Object*)ptr->id.data;
- int index= (Material**)ptr->data - ob->mat;
+ Object *ob = (Object*)ptr->id.data;
+ int index = (Material**)ptr->data - ob->mat;
assign_material(ob, value.data, index+1);
}
static int rna_MaterialSlot_link_get(PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
- int index= (Material**)ptr->data - ob->mat;
+ Object *ob = (Object*)ptr->id.data;
+ int index = (Material**)ptr->data - ob->mat;
return ob->matbits[index] != 0;
}
static void rna_MaterialSlot_link_set(PointerRNA *ptr, int value)
{
- Object *ob= (Object*)ptr->id.data;
- int index= (Material**)ptr->data - ob->mat;
+ Object *ob = (Object*)ptr->id.data;
+ int index = (Material**)ptr->data - ob->mat;
- if(value) {
- ob->matbits[index]= 1;
+ if (value) {
+ ob->matbits[index] = 1;
/* ob->colbits |= (1<<index); */ /* DEPRECATED */
}
else {
- ob->matbits[index]= 0;
+ ob->matbits[index] = 0;
/* ob->colbits &= ~(1<<index); */ /* DEPRECATED */
}
}
static int rna_MaterialSlot_name_length(PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
Material *ma;
- int index= (Material**)ptr->data - ob->mat;
+ int index = (Material**)ptr->data - ob->mat;
- ma= give_current_material(ob, index+1);
+ ma = give_current_material(ob, index+1);
- if(ma)
+ if (ma)
return strlen(ma->id.name+2);
return 0;
@@ -833,16 +833,16 @@ static int rna_MaterialSlot_name_length(PointerRNA *ptr)
static void rna_MaterialSlot_name_get(PointerRNA *ptr, char *str)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
Material *ma;
- int index= (Material**)ptr->data - ob->mat;
+ int index = (Material**)ptr->data - ob->mat;
- ma= give_current_material(ob, index+1);
+ ma = give_current_material(ob, index+1);
- if(ma)
+ if (ma)
strcpy(str, ma->id.name+2);
else
- str[0]= '\0';
+ str[0] = '\0';
}
static void rna_MaterialSlot_update(Main *bmain, Scene *scene, PointerRNA *ptr)
@@ -858,7 +858,7 @@ static void rna_MaterialSlot_update(Main *bmain, Scene *scene, PointerRNA *ptr)
* */
static int rna_GameObjectSettings_physics_type_get(PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
/* determine the body_type setting based on flags */
if (!(ob->gameflag & OB_COLLISION)) {
@@ -889,9 +889,9 @@ static int rna_GameObjectSettings_physics_type_get(PointerRNA *ptr)
static void rna_GameObjectSettings_physics_type_set(PointerRNA *ptr, int value)
{
- Object *ob= (Object*)ptr->id.data;
- const int was_navmesh= (ob->gameflag & OB_NAVMESH);
- ob->body_type= value;
+ Object *ob = (Object*)ptr->id.data;
+ const int was_navmesh = (ob->gameflag & OB_NAVMESH);
+ ob->body_type = value;
switch (ob->body_type) {
case OB_BODY_TYPE_SENSOR:
@@ -936,7 +936,7 @@ static void rna_GameObjectSettings_physics_type_set(PointerRNA *ptr, int value)
/* assume triangle mesh, if no bounds chosen for soft body */
if ((ob->gameflag & OB_BOUNDS) && (ob->boundtype<OB_BOUND_TRIANGLE_MESH))
{
- ob->boundtype= OB_BOUND_TRIANGLE_MESH;
+ ob->boundtype = OB_BOUND_TRIANGLE_MESH;
}
/* create a BulletSoftBody structure if not already existing */
if (!ob->bsoft)
@@ -956,8 +956,8 @@ static void rna_GameObjectSettings_physics_type_set(PointerRNA *ptr, int value)
static PointerRNA rna_Object_active_particle_system_get(PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
- ParticleSystem *psys= psys_get_current(ob);
+ Object *ob = (Object*)ptr->id.data;
+ ParticleSystem *psys = psys_get_current(ob);
return rna_pointer_inherit_refine(ptr, &RNA_ParticleSystem, psys);
}
@@ -969,18 +969,18 @@ static PointerRNA rna_Object_game_settings_get(PointerRNA *ptr)
static unsigned int rna_Object_layer_validate__internal(const int *values, unsigned int lay)
{
- int i, tot= 0;
+ int i, tot = 0;
/* ensure we always have some layer selected */
- for(i=0; i<20; i++)
- if(values[i])
+ for (i = 0; i<20; i++)
+ if (values[i])
tot++;
- if(tot==0)
+ if (tot == 0)
return 0;
- for(i=0; i<20; i++) {
- if(values[i]) lay |= (1<<i);
+ for (i = 0; i<20; i++) {
+ if (values[i]) lay |= (1<<i);
else lay &= ~(1<<i);
}
@@ -989,66 +989,66 @@ static unsigned int rna_Object_layer_validate__internal(const int *values, unsig
static void rna_Object_layer_set(PointerRNA *ptr, const int *values)
{
- Object *ob= (Object*)ptr->data;
+ Object *ob = (Object*)ptr->data;
unsigned int lay;
- lay= rna_Object_layer_validate__internal(values, ob->lay);
- if(lay)
- ob->lay= lay;
+ lay = rna_Object_layer_validate__internal(values, ob->lay);
+ if (lay)
+ ob->lay = lay;
}
static void rna_Base_layer_set(PointerRNA *ptr, const int *values)
{
- Base *base= (Base*)ptr->data;
+ Base *base = (Base*)ptr->data;
unsigned int lay;
- lay= rna_Object_layer_validate__internal(values, base->lay);
- if(lay)
- base->lay= lay;
+ lay = rna_Object_layer_validate__internal(values, base->lay);
+ if (lay)
+ base->lay = lay;
/* rna_Base_layer_update updates the objects layer */
}
static void rna_GameObjectSettings_state_get(PointerRNA *ptr, int *values)
{
- Object *ob= (Object*)ptr->data;
+ Object *ob = (Object*)ptr->data;
int i;
int all_states = (ob->scaflag & OB_ALLSTATE?1:0);
memset(values, 0, sizeof(int)*OB_MAX_STATES);
- for(i=0; i<OB_MAX_STATES; i++)
+ for (i = 0; i<OB_MAX_STATES; i++)
values[i] = (ob->state & (1<<i)) | all_states;
}
static void rna_GameObjectSettings_state_set(PointerRNA *ptr, const int *values)
{
- Object *ob= (Object*)ptr->data;
- int i, tot= 0;
+ Object *ob = (Object*)ptr->data;
+ int i, tot = 0;
/* ensure we always have some state selected */
- for(i=0; i<OB_MAX_STATES; i++)
- if(values[i])
+ for (i = 0; i<OB_MAX_STATES; i++)
+ if (values[i])
tot++;
- if(tot==0)
+ if (tot == 0)
return;
- for(i=0; i<OB_MAX_STATES; i++) {
- if(values[i]) ob->state |= (1<<i);
+ for (i = 0; i<OB_MAX_STATES; i++) {
+ if (values[i]) ob->state |= (1<<i);
else ob->state &= ~(1<<i);
}
}
static void rna_GameObjectSettings_used_state_get(PointerRNA *ptr, int *values)
{
- Object *ob= (Object*)ptr->data;
+ Object *ob = (Object*)ptr->data;
bController *cont;
memset(values, 0, sizeof(int)*OB_MAX_STATES);
- for (cont=ob->controllers.first; cont; cont=cont->next) {
+ for (cont = ob->controllers.first; cont; cont = cont->next) {
int i;
- for (i=0; i<OB_MAX_STATES; i++) {
+ for (i = 0; i<OB_MAX_STATES; i++) {
if (cont->state_mask & (1<<i))
values[i] = 1;
}
@@ -1057,83 +1057,83 @@ static void rna_GameObjectSettings_used_state_get(PointerRNA *ptr, int *values)
static void rna_Object_active_shape_key_index_range(PointerRNA *ptr, int *min, int *max)
{
- Object *ob= (Object*)ptr->id.data;
- Key *key= ob_get_key(ob);
+ Object *ob = (Object*)ptr->id.data;
+ Key *key = ob_get_key(ob);
- *min= 0;
- if(key) {
- *max= BLI_countlist(&key->block)-1;
- if(*max < 0) *max= 0;
+ *min = 0;
+ if (key) {
+ *max = BLI_countlist(&key->block)-1;
+ if (*max < 0) *max = 0;
}
else {
- *max= 0;
+ *max = 0;
}
}
static int rna_Object_active_shape_key_index_get(PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
return MAX2(ob->shapenr-1, 0);
}
static void rna_Object_active_shape_key_index_set(PointerRNA *ptr, int value)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
- ob->shapenr= value+1;
+ ob->shapenr = value+1;
}
static PointerRNA rna_Object_active_shape_key_get(PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
- Key *key= ob_get_key(ob);
+ Object *ob = (Object*)ptr->id.data;
+ Key *key = ob_get_key(ob);
KeyBlock *kb;
PointerRNA keyptr;
- if(key==NULL)
+ if (key == NULL)
return PointerRNA_NULL;
- kb= BLI_findlink(&key->block, ob->shapenr-1);
+ kb = BLI_findlink(&key->block, ob->shapenr-1);
RNA_pointer_create((ID *)key, &RNA_ShapeKey, kb, &keyptr);
return keyptr;
}
static PointerRNA rna_Object_field_get(PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
/* weak */
- if(!ob->pd)
- ob->pd= object_add_collision_fields(0);
+ if (!ob->pd)
+ ob->pd = object_add_collision_fields(0);
return rna_pointer_inherit_refine(ptr, &RNA_FieldSettings, ob->pd);
}
static PointerRNA rna_Object_collision_get(PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
- if(ob->type != OB_MESH)
+ if (ob->type != OB_MESH)
return PointerRNA_NULL;
/* weak */
- if(!ob->pd)
- ob->pd= object_add_collision_fields(0);
+ if (!ob->pd)
+ ob->pd = object_add_collision_fields(0);
return rna_pointer_inherit_refine(ptr, &RNA_CollisionSettings, ob->pd);
}
static PointerRNA rna_Object_active_constraint_get(PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
- bConstraint *con= constraints_get_active(&ob->constraints);
+ Object *ob = (Object*)ptr->id.data;
+ bConstraint *con = constraints_get_active(&ob->constraints);
return rna_pointer_inherit_refine(ptr, &RNA_Constraint, con);
}
static void rna_Object_active_constraint_set(PointerRNA *ptr, PointerRNA value)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
constraints_set_active(&ob->constraints, (bConstraint *)value.data);
}
@@ -1145,7 +1145,7 @@ static bConstraint *rna_Object_constraints_new(Object *object, int type)
static void rna_Object_constraints_remove(Object *object, ReportList *reports, bConstraint *con)
{
- if(BLI_findindex(&object->constraints, con) == -1) {
+ if (BLI_findindex(&object->constraints, con) == -1) {
BKE_reportf(reports, RPT_ERROR, "Constraint '%s' not found in object '%s'", con->name, object->id.name+2);
return;
}
@@ -1187,9 +1187,9 @@ static void rna_Object_modifier_clear(Object *object, bContext *C)
static void rna_Object_boundbox_get(PointerRNA *ptr, float *values)
{
- Object *ob= (Object*)ptr->id.data;
- BoundBox *bb= object_get_boundbox(ob);
- if(bb) {
+ Object *ob = (Object*)ptr->id.data;
+ BoundBox *bb = object_get_boundbox(ob);
+ if (bb) {
memcpy(values, bb->vec, sizeof(bb->vec));
}
else {
@@ -1226,12 +1226,12 @@ static void rna_VertexGroup_vertex_add(ID *id, bDeformGroup *def, ReportList *re
{
Object *ob = (Object *)id;
- if(ED_vgroup_object_is_edit_mode(ob)) {
+ if (ED_vgroup_object_is_edit_mode(ob)) {
BKE_reportf(reports, RPT_ERROR, "VertexGroup.add(): Can't be called while object is in edit mode");
return;
}
- while(index_len--)
+ while (index_len--)
ED_vgroup_vert_add(ob, def, *index++, weight, assignmode); /* XXX, not efficient calling within loop*/
WM_main_add_notifier(NC_GEOM|ND_DATA, (ID *)ob->data);
@@ -1241,12 +1241,12 @@ static void rna_VertexGroup_vertex_remove(ID *id, bDeformGroup *dg, ReportList *
{
Object *ob = (Object *)id;
- if(ED_vgroup_object_is_edit_mode(ob)) {
+ if (ED_vgroup_object_is_edit_mode(ob)) {
BKE_reportf(reports, RPT_ERROR, "VertexGroup.remove(): Can't be called while object is in edit mode");
return;
}
- while(index_len--)
+ while (index_len--)
ED_vgroup_vert_remove(ob, dg, *index++);
WM_main_add_notifier(NC_GEOM|ND_DATA, (ID *)ob->data);
@@ -1256,7 +1256,7 @@ static float rna_VertexGroup_weight(ID *id, bDeformGroup *dg, ReportList *report
{
float weight = ED_vgroup_vert_weight((Object *)id, dg, index);
- if(weight < 0) {
+ if (weight < 0) {
BKE_reportf(reports, RPT_ERROR, "Vertex not in group");
}
return weight;
@@ -1290,7 +1290,7 @@ int rna_Camera_object_poll(PointerRNA *UNUSED(ptr), PointerRNA value)
#else
-static int rna_matrix_dimsize_4x4[]= {4, 4};
+static int rna_matrix_dimsize_4x4[] = {4, 4};
static void rna_def_vertex_group(BlenderRNA *brna)
{
@@ -1305,51 +1305,51 @@ static void rna_def_vertex_group(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- srna= RNA_def_struct(brna, "VertexGroup", NULL);
+ srna = RNA_def_struct(brna, "VertexGroup", NULL);
RNA_def_struct_sdna(srna, "bDeformGroup");
RNA_def_struct_ui_text(srna, "Vertex Group", "Group of vertices, used for armature deform and other purposes");
RNA_def_struct_ui_icon(srna, ICON_GROUP_VERTEX);
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "Vertex group name");
RNA_def_struct_name_property(srna, prop);
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_VertexGroup_name_set");
RNA_def_property_update(prop, NC_GEOM|ND_DATA|NA_RENAME, "rna_Object_internal_update_data"); /* update data because modifiers may use [#24761] */
- prop= RNA_def_property(srna, "lock_weight", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_weight", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "", "Maintain the relative weights for the group");
RNA_def_property_boolean_sdna(prop, NULL, "flag", 0);
RNA_def_property_update(prop, NC_GEOM|ND_DATA|NA_RENAME, "rna_Object_internal_update_data"); /* update data because modifiers may use [#24761] */
- prop= RNA_def_property(srna, "index", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_int_funcs(prop, "rna_VertexGroup_index_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Index", "Index number of the vertex group");
- func= RNA_def_function(srna, "add", "rna_VertexGroup_vertex_add");
+ func = RNA_def_function(srna, "add", "rna_VertexGroup_vertex_add");
RNA_def_function_ui_description(func, "Add vertices to the group");
RNA_def_function_flag(func, FUNC_USE_REPORTS|FUNC_USE_SELF_ID);
/* TODO, see how array size of 0 works, this shouldnt be used */
- prop= RNA_def_int_array(func, "index", 1, NULL, 0, 0, "", "Index List", 0, 0);
+ prop = RNA_def_int_array(func, "index", 1, NULL, 0, 0, "", "Index List", 0, 0);
RNA_def_property_flag(prop, PROP_DYNAMIC|PROP_REQUIRED);
- prop= RNA_def_float(func, "weight", 0, 0.0f, 1.0f, "", "Vertex weight", 0.0f, 1.0f);
+ prop = RNA_def_float(func, "weight", 0, 0.0f, 1.0f, "", "Vertex weight", 0.0f, 1.0f);
RNA_def_property_flag(prop, PROP_REQUIRED);
- prop= RNA_def_enum(func, "type", assign_mode_items, 0, "", "Vertex assign mode");
+ prop = RNA_def_enum(func, "type", assign_mode_items, 0, "", "Vertex assign mode");
RNA_def_property_flag(prop, PROP_REQUIRED);
- func= RNA_def_function(srna, "remove", "rna_VertexGroup_vertex_remove");
+ func = RNA_def_function(srna, "remove", "rna_VertexGroup_vertex_remove");
RNA_def_function_ui_description(func, "Remove a vertex from the group");
RNA_def_function_flag(func, FUNC_USE_REPORTS|FUNC_USE_SELF_ID);
/* TODO, see how array size of 0 works, this shouldnt be used */
- prop= RNA_def_int_array(func, "index", 1, NULL, 0, 0, "", "Index List", 0, 0);
+ prop = RNA_def_int_array(func, "index", 1, NULL, 0, 0, "", "Index List", 0, 0);
RNA_def_property_flag(prop, PROP_DYNAMIC|PROP_REQUIRED);
- func= RNA_def_function(srna, "weight", "rna_VertexGroup_weight");
+ func = RNA_def_function(srna, "weight", "rna_VertexGroup_weight");
RNA_def_function_ui_description(func, "Get a vertex weight from the group");
RNA_def_function_flag(func, FUNC_USE_REPORTS|FUNC_USE_SELF_ID);
- prop=RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "The index of the vertex", 0, INT_MAX);
+ prop = RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "The index of the vertex", 0, INT_MAX);
RNA_def_property_flag(prop, PROP_REQUIRED);
- prop= RNA_def_float(func, "weight", 0, 0.0f, 1.0f, "", "Vertex weight", 0.0f, 1.0f);
+ prop = RNA_def_float(func, "weight", 0, 0.0f, 1.0f, "", "Vertex weight", 0.0f, 1.0f);
RNA_def_function_return(func, prop);
}
@@ -1367,24 +1367,24 @@ static void rna_def_material_slot(BlenderRNA *brna)
* pointer data points to ob->mat + index, and we manually implement
* get/set for the properties. */
- srna= RNA_def_struct(brna, "MaterialSlot", NULL);
+ srna = RNA_def_struct(brna, "MaterialSlot", NULL);
RNA_def_struct_ui_text(srna, "Material Slot", "Material slot in an object");
RNA_def_struct_ui_icon(srna, ICON_MATERIAL_DATA);
- prop= RNA_def_property(srna, "material", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "material", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, "rna_MaterialSlot_material_get", "rna_MaterialSlot_material_set", NULL, NULL);
RNA_def_property_ui_text(prop, "Material", "Material datablock used by this material slot");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_MaterialSlot_update");
- prop= RNA_def_property(srna, "link", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "link", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, link_items);
RNA_def_property_enum_funcs(prop, "rna_MaterialSlot_link_get", "rna_MaterialSlot_link_set", NULL);
RNA_def_property_ui_text(prop, "Link", "Link material to object or the object's data");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_MaterialSlot_update");
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_MaterialSlot_name_get", "rna_MaterialSlot_name_length", NULL);
RNA_def_property_ui_text(prop, "Name", "Material slot name");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -1408,7 +1408,7 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
{OB_BODY_TYPE_NAVMESH, "NAVMESH", 0, "Navigation Mesh", "Navigation mesh"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "GameObjectSettings", NULL);
+ srna = RNA_def_struct(brna, "GameObjectSettings", NULL);
RNA_def_struct_sdna(srna, "Object");
RNA_def_struct_nested(brna, srna, "Object");
RNA_def_struct_ui_text(srna, "Game Object Settings", "Game engine related settings for the object");
@@ -1416,209 +1416,209 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
/* logic */
- prop= RNA_def_property(srna, "sensors", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "sensors", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "Sensor");
RNA_def_property_ui_text(prop, "Sensors", "Game engine sensor to detect events");
- prop= RNA_def_property(srna, "controllers", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "controllers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "Controller");
RNA_def_property_ui_text(prop, "Controllers",
"Game engine controllers to process events, connecting sensors to actuators");
- prop= RNA_def_property(srna, "actuators", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "actuators", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "Actuator");
RNA_def_property_ui_text(prop, "Actuators", "Game engine actuators to act on events");
- prop= RNA_def_property(srna, "properties", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "properties", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "prop", NULL);
RNA_def_property_struct_type(prop, "GameProperty"); /* rna_property.c */
RNA_def_property_ui_text(prop, "Properties", "Game engine properties");
- prop= RNA_def_property(srna, "show_sensors", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_sensors", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scaflag", OB_SHOWSENS);
RNA_def_property_ui_text(prop, "Show Sensors", "Shows sensors for this object in the user interface");
- prop= RNA_def_property(srna, "show_controllers", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_controllers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scaflag", OB_SHOWCONT);
RNA_def_property_ui_text(prop, "Show Controllers", "Shows controllers for this object in the user interface");
- prop= RNA_def_property(srna, "show_actuators", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_actuators", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scaflag", OB_SHOWACT);
RNA_def_property_ui_text(prop, "Show Actuators", "Shows actuators for this object in the user interface");
/* physics */
- prop= RNA_def_property(srna, "physics_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "physics_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "body_type");
RNA_def_property_enum_items(prop, body_type_items);
RNA_def_property_enum_funcs(prop, "rna_GameObjectSettings_physics_type_get", "rna_GameObjectSettings_physics_type_set", NULL);
RNA_def_property_ui_text(prop, "Physics Type", "Select the type of physical representation");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_actor", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_actor", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_ACTOR);
RNA_def_property_ui_text(prop, "Actor", "Object is detected by the Near and Radar sensor");
- prop= RNA_def_property(srna, "use_ghost", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_ghost", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_GHOST);
RNA_def_property_ui_text(prop, "Ghost", "Object does not restitute collisions, like a ghost");
- prop= RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.01, 10000.0);
RNA_def_property_ui_text(prop, "Mass", "Mass of the object");
- prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_NONE|PROP_UNIT_LENGTH);
+ prop = RNA_def_property(srna, "radius", PROP_FLOAT, PROP_NONE|PROP_UNIT_LENGTH);
RNA_def_property_float_sdna(prop, NULL, "inertia");
RNA_def_property_range(prop, 0.01, 10.0);
RNA_def_property_ui_text(prop, "Radius", "Radius of bounding sphere and material physics");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "use_sleep", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_sleep", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_COLLISION_RESPONSE);
RNA_def_property_ui_text(prop, "No Sleeping", "Disable auto (de)activation in physics simulation");
- prop= RNA_def_property(srna, "damping", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "damping", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "damping");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Damping", "General movement damping");
- prop= RNA_def_property(srna, "rotation_damping", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "rotation_damping", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rdamping");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Rotation Damping", "General rotation damping");
- prop= RNA_def_property(srna, "velocity_min", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "velocity_min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "min_vel");
RNA_def_property_range(prop, 0.0, 1000.0);
RNA_def_property_ui_text(prop, "Velocity Min", "Clamp velocity to this minimum speed (except when totally still)");
- prop= RNA_def_property(srna, "velocity_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "velocity_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "max_vel");
RNA_def_property_range(prop, 0.0, 1000.0);
RNA_def_property_ui_text(prop, "Velocity Max", "Clamp velocity to this maximum speed");
/* lock position */
- prop= RNA_def_property(srna, "lock_location_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_location_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag2", OB_LOCK_RIGID_BODY_X_AXIS);
RNA_def_property_ui_text(prop, "Lock X Axis", "Disable simulation of linear motion along the X axis");
- prop= RNA_def_property(srna, "lock_location_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_location_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag2", OB_LOCK_RIGID_BODY_Y_AXIS);
RNA_def_property_ui_text(prop, "Lock Y Axis", "Disable simulation of linear motion along the Y axis");
- prop= RNA_def_property(srna, "lock_location_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_location_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag2", OB_LOCK_RIGID_BODY_Z_AXIS);
RNA_def_property_ui_text(prop, "Lock Z Axis", "Disable simulation of linear motion along the Z axis");
/* lock rotation */
- prop= RNA_def_property(srna, "lock_rotation_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_rotation_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag2", OB_LOCK_RIGID_BODY_X_ROT_AXIS);
RNA_def_property_ui_text(prop, "Lock X Rotation Axis", "Disable simulation of angular motion along the X axis");
- prop= RNA_def_property(srna, "lock_rotation_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_rotation_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag2", OB_LOCK_RIGID_BODY_Y_ROT_AXIS);
RNA_def_property_ui_text(prop, "Lock Y Rotation Axis", "Disable simulation of angular motion along the Y axis");
- prop= RNA_def_property(srna, "lock_rotation_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_rotation_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag2", OB_LOCK_RIGID_BODY_Z_ROT_AXIS);
RNA_def_property_ui_text(prop, "Lock Z Rotation Axis", "Disable simulation of angular motion along the Z axis");
/* is this used anywhere ? */
- prop= RNA_def_property(srna, "use_activity_culling", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_activity_culling", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflag2", OB_NEVER_DO_ACTIVITY_CULLING);
RNA_def_property_ui_text(prop, "Lock Z Rotation Axis", "Disable simulation of angular motion along the Z axis");
- prop= RNA_def_property(srna, "use_material_physics_fh", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_material_physics_fh", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_DO_FH);
RNA_def_property_ui_text(prop, "Use Material Force Field", "React to force field physics settings in materials");
- prop= RNA_def_property(srna, "use_rotate_from_normal", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_rotate_from_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_ROT_FH);
RNA_def_property_ui_text(prop, "Rotate From Normal",
"Use face normal to rotate object, so that it points away from the surface");
- prop= RNA_def_property(srna, "form_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "form_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "formfactor");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Form Factor", "Form factor scales the inertia tensor");
- prop= RNA_def_property(srna, "use_anisotropic_friction", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_anisotropic_friction", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_ANISOTROPIC_FRICTION);
RNA_def_property_ui_text(prop, "Anisotropic Friction", "Enable anisotropic friction");
- prop= RNA_def_property(srna, "friction_coefficients", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "friction_coefficients", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "anisotropicFriction");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Friction Coefficients",
"Relative friction coefficients in the in the X, Y and Z directions, "
"when anisotropic friction is enabled");
- prop= RNA_def_property(srna, "use_collision_bounds", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_collision_bounds", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_BOUNDS);
RNA_def_property_ui_text(prop, "Use Collision Bounds", "Specify a collision bounds type other than the default");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "collision_bounds_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "collision_bounds_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "collision_boundtype");
RNA_def_property_enum_items(prop, collision_bounds_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Object_collision_bounds_itemf");
RNA_def_property_ui_text(prop, "Collision Bounds", "Select the collision type");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "use_collision_compound", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_collision_compound", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_CHILD);
RNA_def_property_ui_text(prop, "Collision Compound", "Add children to form a compound collision object");
- prop= RNA_def_property(srna, "collision_margin", PROP_FLOAT, PROP_NONE|PROP_UNIT_LENGTH);
+ prop = RNA_def_property(srna, "collision_margin", PROP_FLOAT, PROP_NONE|PROP_UNIT_LENGTH);
RNA_def_property_float_sdna(prop, NULL, "margin");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Collision Margin",
"Extra margin around object for collision detection, small amount required for stability");
- prop= RNA_def_property(srna, "soft_body", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "soft_body", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "bsoft");
RNA_def_property_ui_text(prop, "Soft Body Settings", "Settings for Bullet soft body simulation");
- prop= RNA_def_property(srna, "use_obstacle_create", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_obstacle_create", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_HASOBSTACLE);
RNA_def_property_ui_text(prop, "Create obstacle", "Create representation for obstacle simulation");
- prop= RNA_def_property(srna, "obstacle_radius", PROP_FLOAT, PROP_NONE|PROP_UNIT_LENGTH);
+ prop = RNA_def_property(srna, "obstacle_radius", PROP_FLOAT, PROP_NONE|PROP_UNIT_LENGTH);
RNA_def_property_float_sdna(prop, NULL, "obstacleRad");
RNA_def_property_range(prop, 0.0, 1000.0);
RNA_def_property_ui_text(prop, "Obstacle Radius", "Radius of object representation in obstacle simulation");
/* state */
- prop= RNA_def_property(srna, "states_visible", PROP_BOOLEAN, PROP_LAYER_MEMBER);
+ prop = RNA_def_property(srna, "states_visible", PROP_BOOLEAN, PROP_LAYER_MEMBER);
RNA_def_property_boolean_sdna(prop, NULL, "state", 1);
RNA_def_property_array(prop, OB_MAX_STATES);
RNA_def_property_ui_text(prop, "State", "State determining which controllers are displayed");
RNA_def_property_boolean_funcs(prop, "rna_GameObjectSettings_state_get", "rna_GameObjectSettings_state_set");
- prop= RNA_def_property(srna, "used_states", PROP_BOOLEAN, PROP_LAYER_MEMBER);
+ prop = RNA_def_property(srna, "used_states", PROP_BOOLEAN, PROP_LAYER_MEMBER);
RNA_def_property_array(prop, OB_MAX_STATES);
RNA_def_property_ui_text(prop, "Used State", "States which are being used by controllers");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_GameObjectSettings_used_state_get", NULL);
- prop= RNA_def_property(srna, "states_initial", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "states_initial", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "init_state", 1);
RNA_def_property_array(prop, OB_MAX_STATES);
RNA_def_property_ui_text(prop, "Initial State", "Initial state when the game starts");
- prop= RNA_def_property(srna, "show_debug_state", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_debug_state", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scaflag", OB_DEBUGSTATE);
RNA_def_property_ui_text(prop, "Debug State", "Print state debug info in the game engine");
RNA_def_property_ui_icon(prop, ICON_INFO, 0);
- prop= RNA_def_property(srna, "use_all_states", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_all_states", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scaflag", OB_ALLSTATE);
RNA_def_property_ui_text(prop, "All", "Set all state bits");
- prop= RNA_def_property(srna, "show_state_panel", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_state_panel", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scaflag", OB_SHOWSTATE);
RNA_def_property_ui_text(prop, "States", "Show state panel");
RNA_def_property_ui_icon(prop, ICON_DISCLOSURE_TRI_RIGHT, 1);
@@ -1633,13 +1633,13 @@ static void rna_def_object_constraints(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *parm;
RNA_def_property_srna(cprop, "ObjectConstraints");
- srna= RNA_def_struct(brna, "ObjectConstraints", NULL);
+ srna = RNA_def_struct(brna, "ObjectConstraints", NULL);
RNA_def_struct_sdna(srna, "Object");
RNA_def_struct_ui_text(srna, "Object Constraints", "Collection of object constraints");
/* Collection active property */
- prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Constraint");
RNA_def_property_pointer_funcs(prop, "rna_Object_active_constraint_get", "rna_Object_active_constraint_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -1647,23 +1647,23 @@ static void rna_def_object_constraints(BlenderRNA *brna, PropertyRNA *cprop)
/* Constraint collection */
- func= RNA_def_function(srna, "new", "rna_Object_constraints_new");
+ func = RNA_def_function(srna, "new", "rna_Object_constraints_new");
RNA_def_function_ui_description(func, "Add a new constraint to this object");
/* object to add */
- parm= RNA_def_enum(func, "type", constraint_type_items, 1, "", "Constraint type to add");
+ parm = RNA_def_enum(func, "type", constraint_type_items, 1, "", "Constraint type to add");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "constraint", "Constraint", "", "New constraint");
+ parm = RNA_def_pointer(func, "constraint", "Constraint", "", "New constraint");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_Object_constraints_remove");
+ func = RNA_def_function(srna, "remove", "rna_Object_constraints_remove");
RNA_def_function_ui_description(func, "Remove a constraint from this object");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
/* constraint to remove */
- parm= RNA_def_pointer(func, "constraint", "Constraint", "", "Removed constraint");
+ parm = RNA_def_pointer(func, "constraint", "Constraint", "", "Removed constraint");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- func= RNA_def_function(srna, "clear", "rna_Object_constraints_clear");
+ func = RNA_def_function(srna, "clear", "rna_Object_constraints_clear");
RNA_def_function_ui_description(func, "Remove all constraint from this object");
}
@@ -1676,46 +1676,46 @@ static void rna_def_object_modifiers(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *parm;
RNA_def_property_srna(cprop, "ObjectModifiers");
- srna= RNA_def_struct(brna, "ObjectModifiers", NULL);
+ srna = RNA_def_struct(brna, "ObjectModifiers", NULL);
RNA_def_struct_sdna(srna, "Object");
RNA_def_struct_ui_text(srna, "Object Modifiers", "Collection of object modifiers");
#if 0
- prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "EditBone");
RNA_def_property_pointer_sdna(prop, NULL, "act_edbone");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Active EditBone", "Armatures active edit bone");
- //RNA_def_property_update(prop, 0, "rna_Armature_act_editbone_update");
+ /*RNA_def_property_update(prop, 0, "rna_Armature_act_editbone_update"); */
RNA_def_property_pointer_funcs(prop, NULL, "rna_Armature_act_edit_bone_set", NULL, NULL);
/* todo, redraw */
-// RNA_def_property_collection_active(prop, prop_act);
+/* RNA_def_property_collection_active(prop, prop_act); */
#endif
/* add target */
- func= RNA_def_function(srna, "new", "rna_Object_modifier_new");
+ func = RNA_def_function(srna, "new", "rna_Object_modifier_new");
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Add a new modifier");
- parm= RNA_def_string(func, "name", "Name", 0, "", "New name for the bone");
+ parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the bone");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* modifier to add */
- parm= RNA_def_enum(func, "type", modifier_type_items, 1, "", "Modifier type to add");
+ parm = RNA_def_enum(func, "type", modifier_type_items, 1, "", "Modifier type to add");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "modifier", "Modifier", "", "Newly created modifier");
+ parm = RNA_def_pointer(func, "modifier", "Modifier", "", "Newly created modifier");
RNA_def_function_return(func, parm);
/* remove target */
- func= RNA_def_function(srna, "remove", "rna_Object_modifier_remove");
+ func = RNA_def_function(srna, "remove", "rna_Object_modifier_remove");
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Remove an existing modifier from the object");
/* target to remove*/
- parm= RNA_def_pointer(func, "modifier", "Modifier", "", "Modifier to remove");
+ parm = RNA_def_pointer(func, "modifier", "Modifier", "", "Modifier to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
/* clear all modifiers */
- func= RNA_def_function(srna, "clear", "rna_Object_modifier_clear");
+ func = RNA_def_function(srna, "clear", "rna_Object_modifier_clear");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
RNA_def_function_ui_description(func, "Remove all modifiers from the object");
}
@@ -1727,21 +1727,21 @@ static void rna_def_object_particle_systems(BlenderRNA *brna, PropertyRNA *cprop
PropertyRNA *prop;
- // FunctionRNA *func;
- // PropertyRNA *parm;
+ /* FunctionRNA *func; */
+ /* PropertyRNA *parm; */
RNA_def_property_srna(cprop, "ParticleSystems");
- srna= RNA_def_struct(brna, "ParticleSystems", NULL);
+ srna = RNA_def_struct(brna, "ParticleSystems", NULL);
RNA_def_struct_sdna(srna, "Object");
RNA_def_struct_ui_text(srna, "Particle Systems", "Collection of particle systems");
- prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ParticleSystem");
RNA_def_property_pointer_funcs(prop, "rna_Object_active_particle_system_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Active Particle System", "Active particle system being displayed");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_funcs(prop, "rna_Object_active_particle_system_index_get",
"rna_Object_active_particle_system_index_set",
@@ -1762,18 +1762,18 @@ static void rna_def_object_vertex_groups(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *parm;
RNA_def_property_srna(cprop, "VertexGroups");
- srna= RNA_def_struct(brna, "VertexGroups", NULL);
+ srna = RNA_def_struct(brna, "VertexGroups", NULL);
RNA_def_struct_sdna(srna, "Object");
RNA_def_struct_ui_text(srna, "Vertex Groups", "Collection of vertex groups");
- prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "VertexGroup");
RNA_def_property_pointer_funcs(prop, "rna_Object_active_vertex_group_get",
"rna_Object_active_vertex_group_set", NULL, NULL);
RNA_def_property_ui_text(prop, "Active Vertex Group", "Vertex groups of the object");
RNA_def_property_update(prop, NC_GEOM|ND_DATA, "rna_Object_internal_update_data");
- prop= RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_sdna(prop, NULL, "actdef");
RNA_def_property_int_funcs(prop, "rna_Object_active_vertex_group_index_get", "rna_Object_active_vertex_group_index_set",
@@ -1781,19 +1781,19 @@ static void rna_def_object_vertex_groups(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_ui_text(prop, "Active Vertex Group Index", "Active index in vertex group array");
RNA_def_property_update(prop, NC_GEOM|ND_DATA, "rna_Object_internal_update_data");
- /* vertex groups */ // add_vertex_group
- func= RNA_def_function(srna, "new", "rna_Object_vgroup_new");
+ /* vertex groups */ /* add_vertex_group */
+ func = RNA_def_function(srna, "new", "rna_Object_vgroup_new");
RNA_def_function_ui_description(func, "Add vertex group to object");
RNA_def_string(func, "name", "Group", 0, "", "Vertex group name"); /* optional */
- parm= RNA_def_pointer(func, "group", "VertexGroup", "", "New vertex group");
+ parm = RNA_def_pointer(func, "group", "VertexGroup", "", "New vertex group");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_Object_vgroup_remove");
+ func = RNA_def_function(srna, "remove", "rna_Object_vgroup_remove");
RNA_def_function_ui_description(func, "Delete vertex group from object");
- parm= RNA_def_pointer(func, "group", "VertexGroup", "", "Vertex group to remove");
+ parm = RNA_def_pointer(func, "group", "VertexGroup", "", "Vertex group to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- func= RNA_def_function(srna, "clear", "rna_Object_vgroup_clear");
+ func = RNA_def_function(srna, "clear", "rna_Object_vgroup_clear");
RNA_def_function_ui_description(func, "Delete all vertex groups from object");
}
@@ -1851,7 +1851,7 @@ static void rna_def_object(BlenderRNA *brna)
{OB_DUPLIGROUP, "GROUP", 0, "Group", "Enable group instancing"},
{0, NULL, 0, NULL, NULL}};
- // XXX: this RNA enum define is currently duplicated for objects, since there is some text here which is not applicable
+ /* XXX: this RNA enum define is currently duplicated for objects, since there is some text here which is not applicable */
static EnumPropertyItem prop_rotmode_items[] = {
{ROT_MODE_QUAT, "QUATERNION", 0, "Quaternion (WXYZ)", "No Gimbal Lock"},
{ROT_MODE_XYZ, "XYZ", 0, "XYZ Euler", "XYZ Rotation Order - prone to Gimbal Lock (default)"},
@@ -1867,33 +1867,33 @@ static void rna_def_object(BlenderRNA *brna)
static float default_quat[4] = {1,0,0,0}; /* default quaternion values */
static float default_axisAngle[4] = {0,0,1,0}; /* default axis-angle rotation values */
static float default_scale[3] = {1,1,1}; /* default scale values */
- static int boundbox_dimsize[]= {8, 3};
+ static int boundbox_dimsize[] = {8, 3};
- srna= RNA_def_struct(brna, "Object", "ID");
+ srna = RNA_def_struct(brna, "Object", "ID");
RNA_def_struct_ui_text(srna, "Object", "Object datablock defining an object in a scene");
RNA_def_struct_clear_flag(srna, STRUCT_ID_REFCOUNT);
RNA_def_struct_ui_icon(srna, ICON_OBJECT_DATA);
- prop= RNA_def_property(srna, "data", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "data", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ID");
RNA_def_property_pointer_funcs(prop, NULL, "rna_Object_data_set", "rna_Object_data_typef", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_UNLINK);
RNA_def_property_ui_text(prop, "Data", "Object data");
RNA_def_property_update(prop, 0, "rna_Object_internal_update_data");
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, object_type_items);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Type", "Type of Object");
- prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, object_mode_items);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Mode", "Object interaction mode");
- prop= RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
+ prop = RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
RNA_def_property_array(prop, 20);
RNA_def_property_ui_text(prop, "Layers", "Layers the object is on");
@@ -1901,13 +1901,13 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_layer_update");
- prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT);
RNA_def_property_ui_text(prop, "Select", "Object selection state");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_select_update");
/* for data access */
- prop= RNA_def_property(srna, "bound_box", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "bound_box", PROP_FLOAT, PROP_NONE);
RNA_def_property_multi_array(prop, 2, boundbox_dimsize);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_float_funcs(prop, "rna_Object_boundbox_get", NULL, NULL);
@@ -1915,34 +1915,34 @@ static void rna_def_object(BlenderRNA *brna)
"Object's bounding box in object-space coordinates, all values are -1.0 when not available");
/* parent */
- prop= RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_funcs(prop, NULL, "rna_Object_parent_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
RNA_def_property_ui_text(prop, "Parent", "Parent Object");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_dependency_update");
- prop= RNA_def_property(srna, "parent_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "parent_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "partype");
RNA_def_property_enum_items(prop, parent_type_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_Object_parent_type_set", "rna_Object_parent_type_itemf");
RNA_def_property_ui_text(prop, "Parent Type", "Type of parent relation");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_dependency_update");
- prop= RNA_def_property(srna, "parent_vertices", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "parent_vertices", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "par1");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Parent Vertices", "Indices of vertices in case of a vertex parenting relation");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update");
- prop= RNA_def_property(srna, "parent_bone", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "parent_bone", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "parsubstr");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Object_parent_bone_set");
RNA_def_property_ui_text(prop, "Parent Bone", "Name of parent bone in case of a bone parenting relation");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_dependency_update");
/* Track and Up flags */
- // XXX: these have been saved here for a bit longer (after old track was removed), since some other tools still refer to this
- prop= RNA_def_property(srna, "track_axis", PROP_ENUM, PROP_NONE);
+ /* XXX: these have been saved here for a bit longer (after old track was removed), since some other tools still refer to this */
+ prop = RNA_def_property(srna, "track_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "trackflag");
RNA_def_property_enum_items(prop, track_items);
RNA_def_property_ui_text(prop, "Track Axis",
@@ -1950,7 +1950,7 @@ static void rna_def_object(BlenderRNA *brna)
"parent 'Follow' is enabled)");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update");
- prop= RNA_def_property(srna, "up_axis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "up_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "upflag");
RNA_def_property_enum_items(prop, up_items);
RNA_def_property_ui_text(prop, "Up Axis",
@@ -1959,27 +1959,27 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update");
/* proxy */
- prop= RNA_def_property(srna, "proxy", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "proxy", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Proxy", "Library object this proxy object controls");
- prop= RNA_def_property(srna, "proxy_group", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "proxy_group", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Proxy Group", "Library group duplicator object this proxy object controls");
/* materials */
- prop= RNA_def_property(srna, "material_slots", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "material_slots", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "mat", "totcol");
RNA_def_property_struct_type(prop, "MaterialSlot");
RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, "rna_iterator_array_get", NULL, NULL, NULL, NULL); /* don't dereference pointer! */
RNA_def_property_ui_text(prop, "Material Slots", "Material slots in the object");
- prop= RNA_def_property(srna, "active_material", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active_material", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_pointer_funcs(prop, "rna_Object_active_material_get", "rna_Object_active_material_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Active Material", "Active material being displayed");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_MaterialSlot_update");
- prop= RNA_def_property(srna, "active_material_index", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "active_material_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "actcol");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_funcs(prop, "rna_Object_active_material_index_get", "rna_Object_active_material_index_set",
@@ -1988,14 +1988,14 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
/* transform */
- prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "loc");
RNA_def_property_editable_array_func(prop, "rna_Object_location_editable");
RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, 3);
RNA_def_property_ui_text(prop, "Location", "Location of the object");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update");
- prop= RNA_def_property(srna, "rotation_quaternion", PROP_FLOAT, PROP_QUATERNION);
+ prop = RNA_def_property(srna, "rotation_quaternion", PROP_FLOAT, PROP_QUATERNION);
RNA_def_property_float_sdna(prop, NULL, "quat");
RNA_def_property_editable_array_func(prop, "rna_Object_rotation_4d_editable");
RNA_def_property_float_array_default(prop, default_quat);
@@ -2005,7 +2005,7 @@ static void rna_def_object(BlenderRNA *brna)
/* XXX: for axis-angle, it would have been nice to have 2 separate fields for UI purposes, but
* having a single one is better for Keyframing and other property-management situations...
*/
- prop= RNA_def_property(srna, "rotation_axis_angle", PROP_FLOAT, PROP_AXISANGLE);
+ prop = RNA_def_property(srna, "rotation_axis_angle", PROP_FLOAT, PROP_AXISANGLE);
RNA_def_property_array(prop, 4);
RNA_def_property_float_funcs(prop, "rna_Object_rotation_axis_angle_get", "rna_Object_rotation_axis_angle_set", NULL);
RNA_def_property_editable_array_func(prop, "rna_Object_rotation_4d_editable");
@@ -2013,20 +2013,20 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Axis-Angle Rotation", "Angle of Rotation for Axis-Angle rotation representation");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update");
- prop= RNA_def_property(srna, "rotation_euler", PROP_FLOAT, PROP_EULER);
+ prop = RNA_def_property(srna, "rotation_euler", PROP_FLOAT, PROP_EULER);
RNA_def_property_float_sdna(prop, NULL, "rot");
RNA_def_property_editable_array_func(prop, "rna_Object_rotation_euler_editable");
RNA_def_property_ui_text(prop, "Euler Rotation", "Rotation in Eulers");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update");
- prop= RNA_def_property(srna, "rotation_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "rotation_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "rotmode");
- RNA_def_property_enum_items(prop, prop_rotmode_items); // XXX move to using a single define of this someday
+ RNA_def_property_enum_items(prop, prop_rotmode_items); /* XXX move to using a single define of this someday */
RNA_def_property_enum_funcs(prop, NULL, "rna_Object_rotation_mode_set", NULL);
RNA_def_property_ui_text(prop, "Rotation Mode", "");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update");
- prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "scale", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_editable_array_func(prop, "rna_Object_scale_editable");
RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, 3);
@@ -2034,7 +2034,7 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Scale", "Scaling of the object");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update");
- prop= RNA_def_property(srna, "dimensions", PROP_FLOAT, PROP_XYZ_LENGTH);
+ prop = RNA_def_property(srna, "dimensions", PROP_FLOAT, PROP_XYZ_LENGTH);
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_Object_dimensions_get", "rna_Object_dimensions_set", NULL);
RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, 3);
@@ -2043,34 +2043,34 @@ static void rna_def_object(BlenderRNA *brna)
/* delta transforms */
- prop= RNA_def_property(srna, "delta_location", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "delta_location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "dloc");
RNA_def_property_ui_text(prop, "Delta Location", "Extra translation added to the location of the object");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update");
- prop= RNA_def_property(srna, "delta_rotation_euler", PROP_FLOAT, PROP_EULER);
+ prop = RNA_def_property(srna, "delta_rotation_euler", PROP_FLOAT, PROP_EULER);
RNA_def_property_float_sdna(prop, NULL, "drot");
RNA_def_property_ui_text(prop, "Delta Rotation (Euler)",
"Extra rotation added to the rotation of the object (when using Euler rotations)");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update");
- prop= RNA_def_property(srna, "delta_rotation_quaternion", PROP_FLOAT, PROP_QUATERNION);
+ prop = RNA_def_property(srna, "delta_rotation_quaternion", PROP_FLOAT, PROP_QUATERNION);
RNA_def_property_float_sdna(prop, NULL, "dquat");
RNA_def_property_float_array_default(prop, default_quat);
RNA_def_property_ui_text(prop, "Delta Rotation (Quaternion)",
"Extra rotation added to the rotation of the object (when using Quaternion rotations)");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update");
-#if 0 // XXX not supported well yet...
- prop= RNA_def_property(srna, "delta_rotation_axis_angle", PROP_FLOAT, PROP_AXISANGLE);
- RNA_def_property_float_sdna(prop, NULL, "dquat"); // FIXME: this is not a single field any more! (drotAxis and drotAngle)
+#if 0 /* XXX not supported well yet... */
+ prop = RNA_def_property(srna, "delta_rotation_axis_angle", PROP_FLOAT, PROP_AXISANGLE);
+ RNA_def_property_float_sdna(prop, NULL, "dquat"); /* FIXME: this is not a single field any more! (drotAxis and drotAngle) */
RNA_def_property_float_array_default(prop, default_axisAngle);
RNA_def_property_ui_text(prop, "Delta Rotation (Axis Angle)",
"Extra rotation added to the rotation of the object (when using Axis-Angle rotations)");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update");
#endif
- prop= RNA_def_property(srna, "delta_scale", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "delta_scale", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "dscale");
RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, 3);
RNA_def_property_float_array_default(prop, default_scale);
@@ -2078,33 +2078,33 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update");
/* transform locks */
- prop= RNA_def_property(srna, "lock_location", PROP_BOOLEAN, PROP_XYZ);
+ prop = RNA_def_property(srna, "lock_location", PROP_BOOLEAN, PROP_XYZ);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_LOCX);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Lock Location", "Lock editing of location in the interface");
RNA_def_property_ui_icon(prop, ICON_UNLOCKED, 1);
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update");
- prop= RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_XYZ);
+ prop = RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_XYZ);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROTX);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Lock Rotation", "Lock editing of rotation in the interface");
RNA_def_property_ui_icon(prop, ICON_UNLOCKED, 1);
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update");
- // XXX this is sub-optimal - it really should be included above, but due to technical reasons we can't do this!
- prop= RNA_def_property(srna, "lock_rotation_w", PROP_BOOLEAN, PROP_NONE);
+ /* XXX this is sub-optimal - it really should be included above, but due to technical reasons we can't do this! */
+ prop = RNA_def_property(srna, "lock_rotation_w", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROTW);
RNA_def_property_ui_icon(prop, ICON_UNLOCKED, 1);
RNA_def_property_ui_text(prop, "Lock Rotation (4D Angle)",
"Lock editing of 'angle' component of four-component rotations in the interface");
- // XXX this needs a better name
- prop= RNA_def_property(srna, "lock_rotations_4d", PROP_BOOLEAN, PROP_NONE);
+ /* XXX this needs a better name */
+ prop = RNA_def_property(srna, "lock_rotations_4d", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROT4D);
RNA_def_property_ui_text(prop, "Lock Rotations (4D)",
"Lock editing of four component rotations by components (instead of as Eulers)");
- prop= RNA_def_property(srna, "lock_scale", PROP_BOOLEAN, PROP_XYZ);
+ prop = RNA_def_property(srna, "lock_scale", PROP_BOOLEAN, PROP_XYZ);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_SCALEX);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Lock Scale", "Lock editing of scale in the interface");
@@ -2112,21 +2112,21 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update");
/* matrix */
- prop= RNA_def_property(srna, "matrix_world", PROP_FLOAT, PROP_MATRIX);
+ prop = RNA_def_property(srna, "matrix_world", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "obmat");
RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Matrix World", "Worldspace transformation matrix");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_matrix_world_update");
- prop= RNA_def_property(srna, "matrix_local", PROP_FLOAT, PROP_MATRIX);
+ prop = RNA_def_property(srna, "matrix_local", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Local Matrix", "Parent relative transformation matrix");
RNA_def_property_float_funcs(prop, "rna_Object_matrix_local_get", "rna_Object_matrix_local_set", NULL);
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, NULL);
- prop= RNA_def_property(srna, "matrix_basis", PROP_FLOAT, PROP_MATRIX);
+ prop = RNA_def_property(srna, "matrix_basis", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Input Matrix",
@@ -2136,108 +2136,108 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update");
/*parent_inverse*/
- prop= RNA_def_property(srna, "matrix_parent_inverse", PROP_FLOAT, PROP_MATRIX);
+ prop = RNA_def_property(srna, "matrix_parent_inverse", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "parentinv");
RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4);
RNA_def_property_ui_text(prop, "Matrix", "Inverse of object's parent matrix at time of parenting");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update");
/* modifiers */
- prop= RNA_def_property(srna, "modifiers", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "modifiers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "Modifier");
RNA_def_property_ui_text(prop, "Modifiers", "Modifiers affecting the geometric data of the object");
rna_def_object_modifiers(brna, prop);
/* constraints */
- prop= RNA_def_property(srna, "constraints", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "constraints", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "Constraint");
RNA_def_property_ui_text(prop, "Constraints", "Constraints affecting the transformation of the object");
-// RNA_def_property_collection_funcs(prop, 0, 0, 0, 0, 0, 0, 0, "constraints__add", "constraints__remove");
+/* RNA_def_property_collection_funcs(prop, 0, 0, 0, 0, 0, 0, 0, "constraints__add", "constraints__remove"); */
rna_def_object_constraints(brna, prop);
/* game engine */
- prop= RNA_def_property(srna, "game", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "game", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "GameObjectSettings");
RNA_def_property_pointer_funcs(prop, "rna_Object_game_settings_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Game Settings", "Game engine related settings for the object");
/* vertex groups */
- prop= RNA_def_property(srna, "vertex_groups", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_groups", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "defbase", NULL);
RNA_def_property_struct_type(prop, "VertexGroup");
RNA_def_property_ui_text(prop, "Vertex Groups", "Vertex groups of the object");
rna_def_object_vertex_groups(brna, prop);
/* empty */
- prop= RNA_def_property(srna, "empty_draw_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "empty_draw_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "empty_drawtype");
RNA_def_property_enum_items(prop, empty_drawtype_items);
RNA_def_property_ui_text(prop, "Empty Display Type", "Viewport display style for empties");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "empty_draw_size", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "empty_draw_size", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "empty_drawsize");
RNA_def_property_range(prop, 0.0001f, 1000.0f);
RNA_def_property_ui_range(prop, 0.01, 100, 1, 2);
RNA_def_property_ui_text(prop, "Empty Display Size", "Size of display for empties in the viewport");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "empty_image_offset", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "empty_image_offset", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "ima_ofs");
RNA_def_property_ui_text(prop, "Origin Offset", "Origin offset distance");
RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 0.1f, 2);
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
/* render */
- prop= RNA_def_property(srna, "pass_index", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "pass_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "index");
RNA_def_property_ui_text(prop, "Pass Index", "Index number for the IndexOB render pass");
RNA_def_property_update(prop, NC_OBJECT, NULL);
- prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
+ prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "col");
RNA_def_property_ui_text(prop, "Color", "Object color and alpha, used when faces have the ObColor mode enabled");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
/* physics */
- prop= RNA_def_property(srna, "field", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "field", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "pd");
RNA_def_property_struct_type(prop, "FieldSettings");
RNA_def_property_pointer_funcs(prop, "rna_Object_field_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Field Settings", "Settings for using the object as a field in physics simulation");
- prop= RNA_def_property(srna, "collision", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "collision", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "pd");
RNA_def_property_struct_type(prop, "CollisionSettings");
RNA_def_property_pointer_funcs(prop, "rna_Object_collision_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Collision Settings", "Settings for using the object as a collider in physics simulation");
- prop= RNA_def_property(srna, "soft_body", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "soft_body", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "soft");
RNA_def_property_struct_type(prop, "SoftBodySettings");
RNA_def_property_ui_text(prop, "Soft Body Settings", "Settings for soft body simulation");
- prop= RNA_def_property(srna, "particle_systems", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "particle_systems", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "particlesystem", NULL);
RNA_def_property_struct_type(prop, "ParticleSystem");
RNA_def_property_ui_text(prop, "Particle Systems", "Particle systems emitted from the object");
rna_def_object_particle_systems(brna, prop);
/* restrict */
- prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "restrictflag", OB_RESTRICT_VIEW);
RNA_def_property_ui_text(prop, "Restrict View", "Restrict visibility in the viewport");
RNA_def_property_ui_icon(prop, ICON_RESTRICT_VIEW_OFF, 1);
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "hide_select", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "hide_select", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "restrictflag", OB_RESTRICT_SELECT);
RNA_def_property_ui_text(prop, "Restrict Select", "Restrict selection in the viewport");
RNA_def_property_ui_icon(prop, ICON_RESTRICT_SELECT_OFF, 1);
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "hide_render", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "hide_render", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "restrictflag", OB_RESTRICT_RENDER);
RNA_def_property_ui_text(prop, "Restrict Render", "Restrict renderability");
RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
@@ -2250,139 +2250,139 @@ static void rna_def_object(BlenderRNA *brna)
rna_def_motionpath_common(srna);
/* slow parenting */
- // XXX: evil old crap
- prop= RNA_def_property(srna, "use_slow_parent", PROP_BOOLEAN, PROP_NONE);
+ /* XXX: evil old crap */
+ prop = RNA_def_property(srna, "use_slow_parent", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "partype", PARSLOW);
RNA_def_property_ui_text(prop, "Slow Parent", "Create a delay in the parent relationship (beware: this isn't renderfarm safe and may be invalid after jumping around the timeline)");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update");
- prop= RNA_def_property(srna, "slow_parent_offset", PROP_FLOAT, PROP_NONE|PROP_UNIT_TIME);
+ prop = RNA_def_property(srna, "slow_parent_offset", PROP_FLOAT, PROP_NONE|PROP_UNIT_TIME);
RNA_def_property_float_sdna(prop, NULL, "sf");
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Slow Parent Offset", "Delay in the parent relationship");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update");
/* duplicates */
- prop= RNA_def_property(srna, "dupli_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "dupli_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "transflag");
RNA_def_property_enum_items(prop, dupli_items);
RNA_def_property_ui_text(prop, "Dupli Type", "If not None, object duplication method to use");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_dependency_update");
- prop= RNA_def_property(srna, "use_dupli_frames_speed", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_dupli_frames_speed", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "transflag", OB_DUPLINOSPEED);
RNA_def_property_ui_text(prop, "Dupli Frames Speed", "Set dupliframes to use the current frame instead of parent curve's evaluation time");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update");
- prop= RNA_def_property(srna, "use_dupli_vertices_rotation", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_dupli_vertices_rotation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_DUPLIROT);
RNA_def_property_ui_text(prop, "Dupli Verts Rotation", "Rotate dupli according to vertex normal");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "use_dupli_faces_scale", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_dupli_faces_scale", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_DUPLIFACES_SCALE);
RNA_def_property_ui_text(prop, "Dupli Faces Inherit Scale", "Scale dupli based on face size");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update");
- prop= RNA_def_property(srna, "dupli_faces_scale", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "dupli_faces_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dupfacesca");
RNA_def_property_range(prop, 0.001f, 10000.0f);
RNA_def_property_ui_text(prop, "Dupli Faces Scale", "Scale the DupliFace objects");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "dupli_group", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "dupli_group", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "dup_group");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, NULL, "rna_Object_dup_group_set", NULL, NULL);
RNA_def_property_ui_text(prop, "Dupli Group", "Instance an existing group");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_dependency_update");
- prop= RNA_def_property(srna, "dupli_frames_start", PROP_INT, PROP_NONE|PROP_UNIT_TIME);
+ prop = RNA_def_property(srna, "dupli_frames_start", PROP_INT, PROP_NONE|PROP_UNIT_TIME);
RNA_def_property_int_sdna(prop, NULL, "dupsta");
RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
RNA_def_property_ui_text(prop, "Dupli Frames Start", "Start frame for DupliFrames");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update");
- prop= RNA_def_property(srna, "dupli_frames_end", PROP_INT, PROP_NONE|PROP_UNIT_TIME);
+ prop = RNA_def_property(srna, "dupli_frames_end", PROP_INT, PROP_NONE|PROP_UNIT_TIME);
RNA_def_property_int_sdna(prop, NULL, "dupend");
RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
RNA_def_property_ui_text(prop, "Dupli Frames End", "End frame for DupliFrames");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update");
- prop= RNA_def_property(srna, "dupli_frames_on", PROP_INT, PROP_NONE|PROP_UNIT_TIME);
+ prop = RNA_def_property(srna, "dupli_frames_on", PROP_INT, PROP_NONE|PROP_UNIT_TIME);
RNA_def_property_int_sdna(prop, NULL, "dupon");
RNA_def_property_range(prop, MINFRAME, MAXFRAME);
RNA_def_property_ui_range(prop, 1, 1500, 1, 0);
RNA_def_property_ui_text(prop, "Dupli Frames On", "Number of frames to use between DupOff frames");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update");
- prop= RNA_def_property(srna, "dupli_frames_off", PROP_INT, PROP_NONE|PROP_UNIT_TIME);
+ prop = RNA_def_property(srna, "dupli_frames_off", PROP_INT, PROP_NONE|PROP_UNIT_TIME);
RNA_def_property_int_sdna(prop, NULL, "dupoff");
RNA_def_property_range(prop, 0, MAXFRAME);
RNA_def_property_ui_range(prop, 0, 1500, 1, 0);
RNA_def_property_ui_text(prop, "Dupli Frames Off", "Recurring frames to exclude from the Dupliframes");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update");
- prop= RNA_def_property(srna, "dupli_list", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "dupli_list", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "duplilist", NULL);
RNA_def_property_struct_type(prop, "DupliObject");
RNA_def_property_ui_text(prop, "Dupli list", "Object duplis");
- prop= RNA_def_property(srna, "is_duplicator", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_duplicator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transflag", OB_DUPLI);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
/* drawing */
- prop= RNA_def_property(srna, "draw_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "draw_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "dt");
RNA_def_property_enum_items(prop, drawtype_items);
RNA_def_property_ui_text(prop, "Maximum Draw Type", "Maximum draw type to display object with in viewport");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "show_bounds", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_bounds", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_BOUNDBOX);
RNA_def_property_ui_text(prop, "Draw Bounds", "Display the object's bounds");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "draw_bounds_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "draw_bounds_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "boundtype");
RNA_def_property_enum_items(prop, boundtype_items);
RNA_def_property_ui_text(prop, "Draw Bounds Type", "Object boundary display type");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "show_name", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_name", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_DRAWNAME);
RNA_def_property_ui_text(prop, "Draw Name", "Display the object's name");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "show_axis", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_AXIS);
RNA_def_property_ui_text(prop, "Draw Axes", "Display the object's origin and axes");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "show_texture_space", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_texture_space", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_TEXSPACE);
RNA_def_property_ui_text(prop, "Draw Texture Space", "Display the object's texture space");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "show_wire", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_wire", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_DRAWWIRE);
RNA_def_property_ui_text(prop, "Draw Wire", "Add the object's wireframe over solid drawing");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "show_transparent", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_transparent", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_DRAWTRANSP);
RNA_def_property_ui_text(prop, "Draw Transparent",
"Display material transparency in the object (unsupported for duplicator drawing)");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "show_x_ray", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_x_ray", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dtx", OB_DRAWXRAY);
RNA_def_property_ui_text(prop, "X-Ray", "Make the object draw in front of others (unsupported for duplicator drawing)");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
/* Grease Pencil */
- prop= RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "gpd");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "GreasePencil");
@@ -2390,38 +2390,38 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
/* pose */
- prop= RNA_def_property(srna, "pose_library", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "pose_library", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "poselib");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Action");
RNA_def_property_ui_text(prop, "Pose Library", "Action used as a pose library for armatures");
- prop= RNA_def_property(srna, "pose", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "pose", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "pose");
RNA_def_property_struct_type(prop, "Pose");
RNA_def_property_ui_text(prop, "Pose", "Current pose for armatures");
/* shape keys */
- prop= RNA_def_property(srna, "show_only_shape_key", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_only_shape_key", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shapeflag", OB_SHAPE_LOCK);
RNA_def_property_ui_text(prop, "Shape Key Lock", "Always show the current Shape for this Object");
RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1);
RNA_def_property_update(prop, 0, "rna_Object_internal_update_data");
- prop= RNA_def_property(srna, "use_shape_key_edit_mode", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_shape_key_edit_mode", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shapeflag", OB_SHAPE_EDIT_MODE);
RNA_def_property_ui_text(prop, "Shape Key Edit Mode", "Apply shape keys in edit mode (for Meshes only)");
RNA_def_property_ui_icon(prop, ICON_EDITMODE_HLT, 0);
RNA_def_property_update(prop, 0, "rna_Object_internal_update_data");
- prop= RNA_def_property(srna, "active_shape_key", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active_shape_key", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ShapeKey");
RNA_def_property_pointer_funcs(prop, "rna_Object_active_shape_key_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Active Shape Key", "Current shape key");
- prop= RNA_def_property(srna, "active_shape_key_index", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "active_shape_key_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "shapenr");
- RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); // XXX this is really unpredictable...
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* XXX this is really unpredictable... */
RNA_def_property_int_funcs(prop, "rna_Object_active_shape_key_index_get", "rna_Object_active_shape_key_index_set", "rna_Object_active_shape_key_index_range");
RNA_def_property_ui_text(prop, "Active Shape Key Index", "Current shape key index");
RNA_def_property_update(prop, 0, "rna_Object_active_shape_update");
@@ -2434,29 +2434,29 @@ static void rna_def_dupli_object(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "DupliObject", NULL);
+ srna = RNA_def_struct(brna, "DupliObject", NULL);
RNA_def_struct_sdna(srna, "DupliObject");
RNA_def_struct_ui_text(srna, "Object Duplicate", "An object duplicate");
/* RNA_def_struct_ui_icon(srna, ICON_OBJECT_DATA); */
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ob");
/* RNA_def_property_pointer_funcs(prop, "rna_DupliObject_object_get", NULL, NULL, NULL); */
RNA_def_property_ui_text(prop, "Object", "Object being duplicated");
- prop= RNA_def_property(srna, "matrix_original", PROP_FLOAT, PROP_MATRIX);
+ prop = RNA_def_property(srna, "matrix_original", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "omat");
RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE|PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object Matrix", "The original matrix of this object before it was duplicated");
- prop= RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
+ prop = RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "mat");
RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE|PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object Duplicate Matrix", "Object duplicate transformation matrix");
- prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "no_draw", 0);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE|PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Hide", "Don't show dupli object in viewport or render");
@@ -2469,24 +2469,24 @@ static void rna_def_object_base(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ObjectBase", NULL);
+ srna = RNA_def_struct(brna, "ObjectBase", NULL);
RNA_def_struct_sdna(srna, "Base");
RNA_def_struct_ui_text(srna, "Object Base", "An object instance in a scene");
RNA_def_struct_ui_icon(srna, ICON_OBJECT_DATA);
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "object");
RNA_def_property_ui_text(prop, "Object", "Object this base links to");
/* same as object layer */
- prop= RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
+ prop = RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
RNA_def_property_array(prop, 20);
RNA_def_property_ui_text(prop, "Layers", "Layers the object base is on");
RNA_def_property_boolean_funcs(prop, NULL, "rna_Base_layer_set");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Base_layer_update");
- prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BA_SELECT);
RNA_def_property_ui_text(prop, "Select", "Object base selection state");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Base_select_update");
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index 78c3c665797..51fd52360e4 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -39,9 +39,9 @@
#include "DNA_object_types.h"
#include "DNA_modifier_types.h"
-// #include "BLO_sys_types.h" /* needed for intptr_t used in ED_mesh.h */
+/* #include "BLO_sys_types.h" *//* needed for intptr_t used in ED_mesh.h */
-// #include "ED_mesh.h"
+/* #include "ED_mesh.h" */
#ifdef RNA_RUNTIME
@@ -92,12 +92,12 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_
case OB_SURF:
/* copies object and modifiers (but not the data) */
- tmpobj= copy_object(ob);
+ tmpobj = copy_object(ob);
tmpcu = (Curve *)tmpobj->data;
tmpcu->id.us--;
/* if getting the original caged mesh, delete object modifiers */
- if( cage )
+ if ( cage )
object_free_modifiers(tmpobj);
/* copies the data */
@@ -133,12 +133,12 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_
/* todo, re-generatre for render-res */
/* metaball_polygonize(scene, ob) */
- if(ob != basis_ob)
+ if (ob != basis_ob)
return NULL; /* only do basis metaball */
tmpmesh = add_mesh("Mesh");
- if(render) {
+ if (render) {
ListBase disp = {NULL, NULL};
makeDispListMBall_forRender(sce, ob, &disp);
mball_to_mesh(&disp, tmpmesh);
@@ -187,8 +187,8 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_
tmpmesh->totcol = tmpcu->totcol;
/* free old material list (if it exists) and adjust user counts */
- if( tmpcu->mat ) {
- for( i = tmpcu->totcol; i-- > 0; ) {
+ if ( tmpcu->mat ) {
+ for ( i = tmpcu->totcol; i-- > 0; ) {
/* are we an object material or data based? */
tmpmesh->mat[i] = ob->matbits[i] ? ob->mat[i] : tmpcu->mat[i];
@@ -207,8 +207,8 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_
tmpmesh->totcol = tmpmb->totcol;
/* free old material list (if it exists) and adjust user counts */
- if( tmpmb->mat ) {
- for( i = tmpmb->totcol; i-- > 0; ) {
+ if ( tmpmb->mat ) {
+ for ( i = tmpmb->totcol; i-- > 0; ) {
tmpmesh->mat[i] = tmpmb->mat[i]; /* CRASH HERE ??? */
if (tmpmesh->mat[i]) {
tmpmb->mat[i]->id.us++;
@@ -220,13 +220,13 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_
case OB_MESH:
if (!cage) {
- Mesh *origmesh= ob->data;
- tmpmesh->flag= origmesh->flag;
+ Mesh *origmesh = ob->data;
+ tmpmesh->flag = origmesh->flag;
tmpmesh->mat = MEM_dupallocN(origmesh->mat);
tmpmesh->totcol = origmesh->totcol;
- tmpmesh->smoothresh= origmesh->smoothresh;
- if( origmesh->mat ) {
- for( i = origmesh->totcol; i-- > 0; ) {
+ tmpmesh->smoothresh = origmesh->smoothresh;
+ if ( origmesh->mat ) {
+ for ( i = origmesh->totcol; i-- > 0; ) {
/* are we an object material or data based? */
tmpmesh->mat[i] = ob->matbits[i] ? ob->mat[i] : origmesh->mat[i];
@@ -264,35 +264,35 @@ static void dupli_render_particle_set(Scene *scene, Object *ob, int level, int e
unit_m4(mat);
- if(level >= MAX_DUPLI_RECUR)
+ if (level >= MAX_DUPLI_RECUR)
return;
- if(ob->transflag & OB_DUPLIPARTS) {
- for(psys=ob->particlesystem.first; psys; psys=psys->next) {
- if(ELEM(psys->part->ren_as, PART_DRAW_OB, PART_DRAW_GR)) {
- if(enable)
+ if (ob->transflag & OB_DUPLIPARTS) {
+ for (psys = ob->particlesystem.first; psys; psys = psys->next) {
+ if (ELEM(psys->part->ren_as, PART_DRAW_OB, PART_DRAW_GR)) {
+ if (enable)
psys_render_set(ob, psys, mat, mat, 1, 1, 0.f);
else
psys_render_restore(ob, psys);
}
}
- if(level == 0 && enable) {
+ if (level == 0 && enable) {
/* this is to make sure we get render level duplis in groups:
* the derivedmesh must be created before init_render_mesh,
* since object_duplilist does dupliparticles before that */
dm = mesh_create_derived_render(scene, ob, CD_MASK_BAREMESH|CD_MASK_MTFACE|CD_MASK_MCOL);
dm->release(dm);
- for(psys=ob->particlesystem.first; psys; psys=psys->next)
+ for (psys = ob->particlesystem.first; psys; psys = psys->next)
psys_get_modifier(ob, psys)->flag &= ~eParticleSystemFlag_psys_updated;
}
}
- if(ob->dup_group==NULL) return;
- group= ob->dup_group;
+ if (ob->dup_group == NULL) return;
+ group = ob->dup_group;
- for(go= group->gobject.first; go; go= go->next)
+ for (go = group->gobject.first; go; go = go->next)
dupli_render_particle_set(scene, go->ob, level+1, enable);
}
/* When no longer needed, duplilist should be freed with Object.free_duplilist */
@@ -308,12 +308,12 @@ void rna_Object_create_duplilist(Object *ob, ReportList *reports, Scene *sce)
BKE_reportf(reports, RPT_WARNING, "Object.dupli_list has not been freed");
free_object_duplilist(ob->duplilist);
- ob->duplilist= NULL;
+ ob->duplilist = NULL;
}
- if(G.rendering)
+ if (G.rendering)
dupli_render_particle_set(sce, ob, 0, 1);
- ob->duplilist= object_duplilist(sce, ob);
- if(G.rendering)
+ ob->duplilist = object_duplilist(sce, ob);
+ if (G.rendering)
dupli_render_particle_set(sce, ob, 0, 0);
/* ob->duplilist should now be freed with Object.free_duplilist */
}
@@ -322,16 +322,16 @@ void rna_Object_free_duplilist(Object *ob)
{
if (ob->duplilist) {
free_object_duplilist(ob->duplilist);
- ob->duplilist= NULL;
+ ob->duplilist = NULL;
}
}
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;
+ Scene *scene = CTX_data_scene(C);
+ KeyBlock *kb = NULL;
- if((kb=object_insert_shape_key(scene, ob, name, from_mix))) {
+ if ((kb = object_insert_shape_key(scene, ob, name, from_mix))) {
PointerRNA keyptr;
RNA_pointer_create((ID *)ob->data, &RNA_ShapeKey, kb, &keyptr);
@@ -350,7 +350,7 @@ int rna_Object_is_visible(Object *ob, Scene *sce)
return !(ob->restrictflag & OB_RESTRICT_VIEW) && (ob->lay & sce->lay);
}
-/*
+#if 0
static void rna_Mesh_assign_verts_to_group(Object *ob, bDeformGroup *group, int *indices, int totindex, float weight, int assignmode)
{
if (ob->type != OB_MESH) {
@@ -370,13 +370,13 @@ static void rna_Mesh_assign_verts_to_group(Object *ob, bDeformGroup *group, int
return;
}
- // makes a set of dVerts corresponding to the mVerts
+ /* makes a set of dVerts corresponding to the mVerts */
if (!me->dvert)
create_dverts(&me->id);
- // loop list adding verts to group
- for (i= 0; i < totindex; i++) {
- if(i < 0 || i >= me->totvert) {
+ /* loop list adding verts to group */
+ for (i = 0; i < totindex; i++) {
+ if (i < 0 || i >= me->totvert) {
BKE_report(reports, RPT_ERROR, "Bad vertex index in list");
return;
}
@@ -384,13 +384,13 @@ static void rna_Mesh_assign_verts_to_group(Object *ob, bDeformGroup *group, int
add_vert_defnr(ob, group_index, i, weight, assignmode);
}
}
-*/
+#endif
void rna_Object_ray_cast(Object *ob, ReportList *reports, float ray_start[3], float ray_end[3], float r_location[3], float r_normal[3], int *index)
{
- BVHTreeFromMesh treeData= {NULL};
+ BVHTreeFromMesh treeData = {NULL};
- if(ob->derivedFinal==NULL) {
+ if (ob->derivedFinal == NULL) {
BKE_reportf(reports, RPT_ERROR, "object \"%s\" has no mesh data to be used for ray casting", ob->id.name+2);
return;
}
@@ -398,7 +398,7 @@ void rna_Object_ray_cast(Object *ob, ReportList *reports, float ray_start[3], fl
/* no need to managing allocation or freeing of the BVH data. this is generated and freed as needed */
bvhtree_from_mesh_faces(&treeData, ob->derivedFinal, 0.0f, 4, 6);
- if(treeData.tree==NULL) {
+ if (treeData.tree == NULL) {
BKE_reportf(reports, RPT_ERROR, "object \"%s\" could not create internal data for ray casting", ob->id.name+2);
return;
}
@@ -407,14 +407,14 @@ void rna_Object_ray_cast(Object *ob, ReportList *reports, float ray_start[3], fl
float ray_nor[3], dist;
sub_v3_v3v3(ray_nor, ray_end, ray_start);
- dist= hit.dist = normalize_v3(ray_nor);
+ dist = hit.dist = normalize_v3(ray_nor);
hit.index = -1;
- if(BLI_bvhtree_ray_cast(treeData.tree, ray_start, ray_nor, 0.0f, &hit, treeData.raycast_callback, &treeData) != -1) {
- if(hit.dist<=dist) {
+ if (BLI_bvhtree_ray_cast(treeData.tree, ray_start, ray_nor, 0.0f, &hit, treeData.raycast_callback, &treeData) != -1) {
+ if (hit.dist <= dist) {
copy_v3_v3(r_location, hit.co);
copy_v3_v3(r_normal, hit.no);
- *index= hit.index;
+ *index = hit.index;
return;
}
}
@@ -422,14 +422,14 @@ void rna_Object_ray_cast(Object *ob, ReportList *reports, float ray_start[3], fl
zero_v3(r_location);
zero_v3(r_normal);
- *index= -1;
+ *index = -1;
}
void rna_Object_closest_point_on_mesh(Object *ob, ReportList *reports, float point_co[3], float max_dist, float n_location[3], float n_normal[3], int *index)
{
- BVHTreeFromMesh treeData= {NULL};
+ BVHTreeFromMesh treeData = {NULL};
- if(ob->derivedFinal==NULL) {
+ if (ob->derivedFinal == NULL) {
BKE_reportf(reports, RPT_ERROR, "object \"%s\" has no mesh data to be used for finding nearest point", ob->id.name+2);
return;
}
@@ -437,7 +437,7 @@ void rna_Object_closest_point_on_mesh(Object *ob, ReportList *reports, float poi
/* no need to managing allocation or freeing of the BVH data. this is generated and freed as needed */
bvhtree_from_mesh_faces(&treeData, ob->derivedFinal, 0.0f, 4, 6);
- if(treeData.tree==NULL) {
+ if (treeData.tree == NULL) {
BKE_reportf(reports, RPT_ERROR, "object \"%s\" could not create internal data for finding nearest point", ob->id.name+2);
return;
}
@@ -447,24 +447,24 @@ void rna_Object_closest_point_on_mesh(Object *ob, ReportList *reports, float poi
nearest.index = -1;
nearest.dist = max_dist * max_dist;
- if(BLI_bvhtree_find_nearest(treeData.tree, point_co, &nearest, treeData.nearest_callback, &treeData) != -1) {
+ if (BLI_bvhtree_find_nearest(treeData.tree, point_co, &nearest, treeData.nearest_callback, &treeData) != -1) {
copy_v3_v3(n_location, nearest.co);
copy_v3_v3(n_normal, nearest.no);
- *index= nearest.index;
+ *index = nearest.index;
return;
}
}
zero_v3(n_location);
zero_v3(n_normal);
- *index= -1;
+ *index = -1;
}
/* ObjectBase */
void rna_ObjectBase_layers_from_view(Base *base, View3D *v3d)
{
- base->lay= base->object->lay= v3d->lay;
+ base->lay = base->object->lay = v3d->lay;
}
int rna_Object_is_modified(Object *ob, Scene *scene, int settings)
@@ -481,7 +481,7 @@ void rna_Object_dm_info(struct Object *ob, int type, char *result)
result[0] = '\0';
- switch(type) {
+ switch (type) {
case 0:
if (ob->type == OB_MESH) {
dm = CDDM_from_mesh(ob->data, ob);
@@ -533,118 +533,118 @@ void RNA_api_object(StructRNA *srna)
#endif
/* mesh */
- func= RNA_def_function(srna, "to_mesh", "rna_Object_to_mesh");
+ func = RNA_def_function(srna, "to_mesh", "rna_Object_to_mesh");
RNA_def_function_ui_description(func, "Create a Mesh datablock with modifiers applied");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "scene", "Scene", "", "Scene within which to evaluate modifiers");
+ parm = RNA_def_pointer(func, "scene", "Scene", "", "Scene within which to evaluate modifiers");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- parm= RNA_def_boolean(func, "apply_modifiers", 0, "", "Apply modifiers");
+ parm = RNA_def_boolean(func, "apply_modifiers", 0, "", "Apply modifiers");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_enum(func, "settings", mesh_type_items, 0, "", "Modifier settings to apply");
+ parm = RNA_def_enum(func, "settings", mesh_type_items, 0, "", "Modifier settings to apply");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "mesh", "Mesh", "", "Mesh created from object, remove it if it is only used for export");
+ parm = RNA_def_pointer(func, "mesh", "Mesh", "", "Mesh created from object, remove it if it is only used for export");
RNA_def_function_return(func, parm);
/* duplis */
- func= RNA_def_function(srna, "dupli_list_create", "rna_Object_create_duplilist");
+ func = RNA_def_function(srna, "dupli_list_create", "rna_Object_create_duplilist");
RNA_def_function_ui_description(func, "Create a list of dupli objects for this object, needs to "
"be freed manually with free_dupli_list to restore the "
"objects real matrix and layers");
- parm= RNA_def_pointer(func, "scene", "Scene", "", "Scene within which to evaluate duplis");
+ parm = RNA_def_pointer(func, "scene", "Scene", "", "Scene within which to evaluate duplis");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- func= RNA_def_function(srna, "dupli_list_clear", "rna_Object_free_duplilist");
+ func = RNA_def_function(srna, "dupli_list_clear", "rna_Object_free_duplilist");
RNA_def_function_ui_description(func, "Free the list of dupli objects");
/* Armature */
- func= RNA_def_function(srna, "find_armature", "modifiers_isDeformedByArmature");
+ func = RNA_def_function(srna, "find_armature", "modifiers_isDeformedByArmature");
RNA_def_function_ui_description(func, "Find armature influencing this object as a parent or via a modifier");
- parm= RNA_def_pointer(func, "ob_arm", "Object", "", "Armature object influencing this object or NULL");
+ parm = RNA_def_pointer(func, "ob_arm", "Object", "", "Armature object influencing this object or NULL");
RNA_def_function_return(func, parm);
/* Shape key */
- func= RNA_def_function(srna, "shape_key_add", "rna_Object_shape_key_add");
+ 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);
RNA_def_string(func, "name", "Key", 0, "", "Unique name for the new keylock"); /* optional */
RNA_def_boolean(func, "from_mix", 1, "", "Create new shape from existing mix of shapes");
- parm= RNA_def_pointer(func, "key", "ShapeKey", "", "New shape keyblock");
+ parm = RNA_def_pointer(func, "key", "ShapeKey", "", "New shape keyblock");
RNA_def_property_flag(parm, PROP_RNAPTR);
RNA_def_function_return(func, parm);
/* Ray Cast */
- func= RNA_def_function(srna, "ray_cast", "rna_Object_ray_cast");
+ func = RNA_def_function(srna, "ray_cast", "rna_Object_ray_cast");
RNA_def_function_ui_description(func, "Cast a ray onto in object space");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
/* ray start and end */
- parm= RNA_def_float_vector(func, "start", 3, NULL, -FLT_MAX, FLT_MAX, "", "", -1e4, 1e4);
+ parm = RNA_def_float_vector(func, "start", 3, NULL, -FLT_MAX, FLT_MAX, "", "", -1e4, 1e4);
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_float_vector(func, "end", 3, NULL, -FLT_MAX, FLT_MAX, "", "", -1e4, 1e4);
+ parm = RNA_def_float_vector(func, "end", 3, NULL, -FLT_MAX, FLT_MAX, "", "", -1e4, 1e4);
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return location and normal */
- parm= RNA_def_float_vector(func, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "The hit location of this ray cast", -1e4, 1e4);
+ parm = RNA_def_float_vector(func, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "The hit location of this ray cast", -1e4, 1e4);
RNA_def_property_flag(parm, PROP_THICK_WRAP);
RNA_def_function_output(func, parm);
- parm= RNA_def_float_vector(func, "normal", 3, NULL, -FLT_MAX, FLT_MAX, "Normal", "The face normal at the ray cast hit location", -1e4, 1e4);
+ parm = RNA_def_float_vector(func, "normal", 3, NULL, -FLT_MAX, FLT_MAX, "Normal", "The face normal at the ray cast hit location", -1e4, 1e4);
RNA_def_property_flag(parm, PROP_THICK_WRAP);
RNA_def_function_output(func, parm);
- parm= RNA_def_int(func, "index", 0, 0, 0, "", "The face index, -1 when no intersection is found", 0, 0);
+ parm = RNA_def_int(func, "index", 0, 0, 0, "", "The face index, -1 when no intersection is found", 0, 0);
RNA_def_function_output(func, parm);
/* Nearest Point */
- func= RNA_def_function(srna, "closest_point_on_mesh", "rna_Object_closest_point_on_mesh");
+ func = RNA_def_function(srna, "closest_point_on_mesh", "rna_Object_closest_point_on_mesh");
RNA_def_function_ui_description(func, "Find the nearest point on the object");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
/* location of point for test and max distance */
- parm= RNA_def_float_vector(func, "point", 3, NULL, -FLT_MAX, FLT_MAX, "", "", -1e4, 1e4);
+ parm = RNA_def_float_vector(func, "point", 3, NULL, -FLT_MAX, FLT_MAX, "", "", -1e4, 1e4);
RNA_def_property_flag(parm, PROP_REQUIRED);
/* default is sqrt(FLT_MAX) */
RNA_def_float(func, "max_dist", 1.844674352395373e+19, 0.0, FLT_MAX, "", "", 0.0, FLT_MAX);
/* return location and normal */
- parm= RNA_def_float_vector(func, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "The location on the object closest to the point", -1e4, 1e4);
+ parm = RNA_def_float_vector(func, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "The location on the object closest to the point", -1e4, 1e4);
RNA_def_property_flag(parm, PROP_THICK_WRAP);
RNA_def_function_output(func, parm);
- parm= RNA_def_float_vector(func, "normal", 3, NULL, -FLT_MAX, FLT_MAX, "Normal", "The face normal at the closest point", -1e4, 1e4);
+ parm = RNA_def_float_vector(func, "normal", 3, NULL, -FLT_MAX, FLT_MAX, "Normal", "The face normal at the closest point", -1e4, 1e4);
RNA_def_property_flag(parm, PROP_THICK_WRAP);
RNA_def_function_output(func, parm);
- parm= RNA_def_int(func, "index", 0, 0, 0, "", "The face index, -1 when no closest point is found", 0, 0);
+ parm = RNA_def_int(func, "index", 0, 0, 0, "", "The face index, -1 when no closest point is found", 0, 0);
RNA_def_function_output(func, parm);
/* View */
- func= RNA_def_function(srna, "is_visible", "rna_Object_is_visible");
+ func = RNA_def_function(srna, "is_visible", "rna_Object_is_visible");
RNA_def_function_ui_description(func, "Determine if object is visible in a given scene");
- parm= RNA_def_pointer(func, "scene", "Scene", "", "");
+ parm = RNA_def_pointer(func, "scene", "Scene", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- parm= RNA_def_boolean(func, "result", 0, "", "Object visibility");
+ parm = RNA_def_boolean(func, "result", 0, "", "Object visibility");
RNA_def_function_return(func, parm);
/* utility function for checking if the object is modified */
- func= RNA_def_function(srna, "is_modified", "rna_Object_is_modified");
+ func = RNA_def_function(srna, "is_modified", "rna_Object_is_modified");
RNA_def_function_ui_description(func, "Determine if this object is modified from the base mesh data");
- parm= RNA_def_pointer(func, "scene", "Scene", "", "");
+ parm = RNA_def_pointer(func, "scene", "Scene", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- parm= RNA_def_enum(func, "settings", mesh_type_items, 0, "", "Modifier settings to apply");
+ parm = RNA_def_enum(func, "settings", mesh_type_items, 0, "", "Modifier settings to apply");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_boolean(func, "result", 0, "", "Object visibility");
+ parm = RNA_def_boolean(func, "result", 0, "", "Object visibility");
RNA_def_function_return(func, parm);
#ifndef NDEBUG
/* mesh */
- func= RNA_def_function(srna, "dm_info", "rna_Object_dm_info");
+ func = RNA_def_function(srna, "dm_info", "rna_Object_dm_info");
RNA_def_function_ui_description(func, "Returns a string for derived mesh data");
- parm= RNA_def_enum(func, "type", mesh_dm_info_items, 0, "", "Modifier settings to apply");
+ parm = RNA_def_enum(func, "type", mesh_dm_info_items, 0, "", "Modifier settings to apply");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* weak!, no way to return dynamic string type */
- parm= RNA_def_string(func, "result", "", 16384, "result", "");
+ parm = RNA_def_string(func, "result", "", 16384, "result", "");
RNA_def_property_flag(parm, PROP_THICK_WRAP); /* needed for string return value */
RNA_def_function_output(func, parm);
#endif /* NDEBUG */
@@ -656,9 +656,9 @@ void RNA_api_object_base(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
- func= RNA_def_function(srna, "layers_from_view", "rna_ObjectBase_layers_from_view");
+ func = RNA_def_function(srna, "layers_from_view", "rna_ObjectBase_layers_from_view");
RNA_def_function_ui_description(func, "Sets the object layers from a 3D View (use when adding an object in local view)");
- parm= RNA_def_pointer(func, "view", "SpaceView3D", "", "");
+ parm = RNA_def_pointer(func, "view", "SpaceView3D", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index 2997acd2267..287303d4efe 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -105,7 +105,7 @@ static void rna_Cache_change(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerR
PTCacheID *pid = NULL;
ListBase pidlist;
- if(!ob)
+ if (!ob)
return;
cache->flag |= PTCACHE_OUTDATED;
@@ -114,14 +114,14 @@ static void rna_Cache_change(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerR
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- for(pid=pidlist.first; pid; pid=pid->next) {
- if(pid->cache==cache)
+ for (pid = pidlist.first; pid; pid = pid->next) {
+ if (pid->cache == cache)
break;
}
- if(pid) {
+ if (pid) {
/* Just make sure this wasn't changed. */
- if(pid->type == PTCACHE_TYPE_SMOKE_DOMAIN)
+ if (pid->type == PTCACHE_TYPE_SMOKE_DOMAIN)
cache->step = 1;
BKE_ptcache_update_info(pid);
}
@@ -136,18 +136,18 @@ static void rna_Cache_toggle_disk_cache(Main *UNUSED(bmain), Scene *UNUSED(scene
PTCacheID *pid = NULL;
ListBase pidlist;
- if(!ob)
+ if (!ob)
return;
BKE_ptcache_ids_from_object(&pidlist, ob, NULL, 0);
- for(pid=pidlist.first; pid; pid=pid->next) {
- if(pid->cache==cache)
+ for (pid = pidlist.first; pid; pid = pid->next) {
+ if (pid->cache == cache)
break;
}
/* smoke can only use disk cache */
- if(pid && pid->type != PTCACHE_TYPE_SMOKE_DOMAIN)
+ if (pid && pid->type != PTCACHE_TYPE_SMOKE_DOMAIN)
BKE_ptcache_toggle_disk_cache(pid);
else
cache->flag ^= PTCACHE_DISK_CACHE;
@@ -159,24 +159,24 @@ static void rna_Cache_idname_change(Main *UNUSED(bmain), Scene *UNUSED(scene), P
{
Object *ob = (Object*)ptr->id.data;
PointCache *cache = (PointCache*)ptr->data;
- PTCacheID *pid = NULL, *pid2= NULL;
+ PTCacheID *pid = NULL, *pid2 = NULL;
ListBase pidlist;
int new_name = 1;
- if(!ob)
+ if (!ob)
return;
/* TODO: check for proper characters */
BKE_ptcache_ids_from_object(&pidlist, ob, NULL, 0);
- if(cache->flag & PTCACHE_EXTERNAL) {
- for(pid=pidlist.first; pid; pid=pid->next) {
- if(pid->cache==cache)
+ if (cache->flag & PTCACHE_EXTERNAL) {
+ for (pid = pidlist.first; pid; pid = pid->next) {
+ if (pid->cache == cache)
break;
}
- if(!pid)
+ if (!pid)
return;
BKE_ptcache_load_external(pid);
@@ -184,18 +184,18 @@ static void rna_Cache_idname_change(Main *UNUSED(bmain), Scene *UNUSED(scene), P
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
else {
- for(pid=pidlist.first; pid; pid=pid->next) {
- if(pid->cache==cache)
+ for (pid = pidlist.first; pid; pid = pid->next) {
+ if (pid->cache == cache)
pid2 = pid;
- else if(cache->name[0] != '\0' && strcmp(cache->name,pid->cache->name)==0) {
+ else if (cache->name[0] != '\0' && strcmp(cache->name,pid->cache->name) == 0) {
/*TODO: report "name exists" to user */
BLI_strncpy(cache->name, cache->prev_name, sizeof(cache->name));
new_name = 0;
}
}
- if(new_name) {
- if(pid2 && cache->flag & PTCACHE_DISK_CACHE) {
+ if (new_name) {
+ if (pid2 && cache->flag & PTCACHE_DISK_CACHE) {
char old_name[80];
char new_name[80];
@@ -214,33 +214,33 @@ static void rna_Cache_idname_change(Main *UNUSED(bmain), Scene *UNUSED(scene), P
static void rna_Cache_list_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- PointCache *cache= ptr->data;
+ PointCache *cache = ptr->data;
ListBase lb;
- while(cache->prev)
- cache= cache->prev;
+ while (cache->prev)
+ cache = cache->prev;
- lb.first= cache;
- lb.last= NULL; /* not used by listbase_begin */
+ lb.first = cache;
+ lb.last = NULL; /* not used by listbase_begin */
rna_iterator_listbase_begin(iter, &lb, NULL);
}
static void rna_Cache_active_point_cache_index_range(PointerRNA *ptr, int *min, int *max)
{
Object *ob = ptr->id.data;
- PointCache *cache= ptr->data;
+ PointCache *cache = ptr->data;
PTCacheID *pid;
ListBase pidlist;
BKE_ptcache_ids_from_object(&pidlist, ob, NULL, 0);
- *min= 0;
- *max= 0;
+ *min = 0;
+ *max = 0;
- for(pid=pidlist.first; pid; pid=pid->next) {
- if(pid->cache == cache) {
- *max= BLI_countlist(pid->ptcaches)-1;
- *max= MAX2(0, *max);
+ for (pid = pidlist.first; pid; pid = pid->next) {
+ if (pid->cache == cache) {
+ *max = BLI_countlist(pid->ptcaches)-1;
+ *max = MAX2(0, *max);
break;
}
}
@@ -251,15 +251,15 @@ static void rna_Cache_active_point_cache_index_range(PointerRNA *ptr, int *min,
static int rna_Cache_active_point_cache_index_get(PointerRNA *ptr)
{
Object *ob = ptr->id.data;
- PointCache *cache= ptr->data;
+ PointCache *cache = ptr->data;
PTCacheID *pid;
ListBase pidlist;
int num = 0;
BKE_ptcache_ids_from_object(&pidlist, ob, NULL, 0);
- for(pid=pidlist.first; pid; pid=pid->next) {
- if(pid->cache == cache) {
+ for (pid = pidlist.first; pid; pid = pid->next) {
+ if (pid->cache == cache) {
num = BLI_findindex(pid->ptcaches, cache);
break;
}
@@ -273,14 +273,14 @@ static int rna_Cache_active_point_cache_index_get(PointerRNA *ptr)
static void rna_Cache_active_point_cache_index_set(struct PointerRNA *ptr, int value)
{
Object *ob = ptr->id.data;
- PointCache *cache= ptr->data;
+ PointCache *cache = ptr->data;
PTCacheID *pid;
ListBase pidlist;
BKE_ptcache_ids_from_object(&pidlist, ob, NULL, 0);
- for(pid=pidlist.first; pid; pid=pid->next) {
- if(pid->cache == cache) {
+ for (pid = pidlist.first; pid; pid = pid->next) {
+ if (pid->cache == cache) {
*(pid->cache_ptr) = BLI_findlink(pid->ptcaches, value);
break;
}
@@ -292,18 +292,18 @@ static void rna_Cache_active_point_cache_index_set(struct PointerRNA *ptr, int v
static void rna_PointCache_frame_step_range(PointerRNA *ptr, int *min, int *max)
{
Object *ob = ptr->id.data;
- PointCache *cache= ptr->data;
+ PointCache *cache = ptr->data;
PTCacheID *pid;
ListBase pidlist;
- *min= 1;
- *max= 20;
+ *min = 1;
+ *max = 20;
BKE_ptcache_ids_from_object(&pidlist, ob, NULL, 0);
- for(pid=pidlist.first; pid; pid=pid->next) {
- if(pid->cache == cache) {
- *max= pid->max_step;
+ for (pid = pidlist.first; pid; pid = pid->next) {
+ if (pid->cache == cache) {
+ *max = pid->max_step;
break;
}
}
@@ -315,10 +315,10 @@ static char *rna_CollisionSettings_path(PointerRNA *UNUSED(ptr))
{
/* both methods work ok, but return the shorter path */
#if 0
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
ModifierData *md = (ModifierData *)modifiers_findByType(ob, eModifierType_Collision);
- if(md) {
+ if (md) {
return BLI_sprintfN("modifiers[\"%s\"].settings", md->name);
}
else {
@@ -332,59 +332,59 @@ static char *rna_CollisionSettings_path(PointerRNA *UNUSED(ptr))
static int rna_SoftBodySettings_use_edges_get(PointerRNA *ptr)
{
- Object *data= (Object*)(ptr->id.data);
+ Object *data = (Object*)(ptr->id.data);
return (((data->softflag) & OB_SB_EDGES) != 0);
}
static void rna_SoftBodySettings_use_edges_set(PointerRNA *ptr, int value)
{
- Object *data= (Object*)(ptr->id.data);
- if(value) data->softflag |= OB_SB_EDGES;
+ Object *data = (Object*)(ptr->id.data);
+ if (value) data->softflag |= OB_SB_EDGES;
else data->softflag &= ~OB_SB_EDGES;
}
static int rna_SoftBodySettings_use_goal_get(PointerRNA *ptr)
{
- Object *data= (Object*)(ptr->id.data);
+ Object *data = (Object*)(ptr->id.data);
return (((data->softflag) & OB_SB_GOAL) != 0);
}
static void rna_SoftBodySettings_use_goal_set(PointerRNA *ptr, int value)
{
- Object *data= (Object*)(ptr->id.data);
- if(value) data->softflag |= OB_SB_GOAL;
+ Object *data = (Object*)(ptr->id.data);
+ if (value) data->softflag |= OB_SB_GOAL;
else data->softflag &= ~OB_SB_GOAL;
}
static int rna_SoftBodySettings_stiff_quads_get(PointerRNA *ptr)
{
- Object *data= (Object*)(ptr->id.data);
+ Object *data = (Object*)(ptr->id.data);
return (((data->softflag) & OB_SB_QUADS) != 0);
}
static void rna_SoftBodySettings_stiff_quads_set(PointerRNA *ptr, int value)
{
- Object *data= (Object*)(ptr->id.data);
- if(value) data->softflag |= OB_SB_QUADS;
+ Object *data = (Object*)(ptr->id.data);
+ if (value) data->softflag |= OB_SB_QUADS;
else data->softflag &= ~OB_SB_QUADS;
}
static int rna_SoftBodySettings_self_collision_get(PointerRNA *ptr)
{
- Object *data= (Object*)(ptr->id.data);
+ Object *data = (Object*)(ptr->id.data);
return (((data->softflag) & OB_SB_SELF) != 0);
}
static void rna_SoftBodySettings_self_collision_set(PointerRNA *ptr, int value)
{
- Object *data= (Object*)(ptr->id.data);
- if(value) data->softflag |= OB_SB_SELF;
+ Object *data = (Object*)(ptr->id.data);
+ if (value) data->softflag |= OB_SB_SELF;
else data->softflag &= ~OB_SB_SELF;
}
static int rna_SoftBodySettings_new_aero_get(PointerRNA *ptr)
{
- Object *data= (Object*)(ptr->id.data);
+ Object *data = (Object*)(ptr->id.data);
if (data->softflag & OB_SB_AERO_ANGLE)
return 1;
else
@@ -393,7 +393,7 @@ static int rna_SoftBodySettings_new_aero_get(PointerRNA *ptr)
static void rna_SoftBodySettings_new_aero_set(PointerRNA *ptr, int value)
{
- Object *data= (Object*)(ptr->id.data);
+ Object *data = (Object*)(ptr->id.data);
if (value == 1)
data->softflag |= OB_SB_AERO_ANGLE;
else /* value == 0 */
@@ -402,64 +402,64 @@ static void rna_SoftBodySettings_new_aero_set(PointerRNA *ptr, int value)
static int rna_SoftBodySettings_face_collision_get(PointerRNA *ptr)
{
- Object *data= (Object*)(ptr->id.data);
+ Object *data = (Object*)(ptr->id.data);
return (((data->softflag) & OB_SB_FACECOLL) != 0);
}
static void rna_SoftBodySettings_face_collision_set(PointerRNA *ptr, int value)
{
- Object *data= (Object*)(ptr->id.data);
- if(value) data->softflag |= OB_SB_FACECOLL;
+ Object *data = (Object*)(ptr->id.data);
+ if (value) data->softflag |= OB_SB_FACECOLL;
else data->softflag &= ~OB_SB_FACECOLL;
}
static int rna_SoftBodySettings_edge_collision_get(PointerRNA *ptr)
{
- Object *data= (Object*)(ptr->id.data);
+ Object *data = (Object*)(ptr->id.data);
return (((data->softflag) & OB_SB_EDGECOLL) != 0);
}
static void rna_SoftBodySettings_edge_collision_set(PointerRNA *ptr, int value)
{
- Object *data= (Object*)(ptr->id.data);
- if(value) data->softflag |= OB_SB_EDGECOLL;
+ Object *data = (Object*)(ptr->id.data);
+ if (value) data->softflag |= OB_SB_EDGECOLL;
else data->softflag &= ~OB_SB_EDGECOLL;
}
static void rna_SoftBodySettings_goal_vgroup_get(PointerRNA *ptr, char *value)
{
- SoftBody *sb= (SoftBody*)ptr->data;
+ SoftBody *sb = (SoftBody*)ptr->data;
rna_object_vgroup_name_index_get(ptr, value, sb->vertgroup);
}
static int rna_SoftBodySettings_goal_vgroup_length(PointerRNA *ptr)
{
- SoftBody *sb= (SoftBody*)ptr->data;
+ SoftBody *sb = (SoftBody*)ptr->data;
return rna_object_vgroup_name_index_length(ptr, sb->vertgroup);
}
static void rna_SoftBodySettings_goal_vgroup_set(PointerRNA *ptr, const char *value)
{
- SoftBody *sb= (SoftBody*)ptr->data;
+ SoftBody *sb = (SoftBody*)ptr->data;
rna_object_vgroup_name_index_set(ptr, value, &sb->vertgroup);
}
static void rna_SoftBodySettings_mass_vgroup_set(PointerRNA *ptr, const char *value)
{
- SoftBody *sb= (SoftBody*)ptr->data;
+ SoftBody *sb = (SoftBody*)ptr->data;
rna_object_vgroup_name_set(ptr, value, sb->namedVG_Mass, sizeof(sb->namedVG_Mass));
}
static void rna_SoftBodySettings_spring_vgroup_set(PointerRNA *ptr, const char *value)
{
- SoftBody *sb= (SoftBody*)ptr->data;
+ SoftBody *sb = (SoftBody*)ptr->data;
rna_object_vgroup_name_set(ptr, value, sb->namedVG_Spring_K, sizeof(sb->namedVG_Spring_K));
}
static char *rna_SoftBodySettings_path(PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
ModifierData *md = (ModifierData *)modifiers_findByType(ob, eModifierType_Softbody);
return BLI_sprintfN("modifiers[\"%s\"].settings", md->name);
@@ -467,24 +467,24 @@ static char *rna_SoftBodySettings_path(PointerRNA *ptr)
static int particle_id_check(PointerRNA *ptr)
{
- ID *id= ptr->id.data;
+ ID *id = ptr->id.data;
return (GS(id->name) == ID_PA);
}
static void rna_FieldSettings_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- if(particle_id_check(ptr)) {
+ if (particle_id_check(ptr)) {
ParticleSettings *part = (ParticleSettings*)ptr->id.data;
- if(part->pd->forcefield != PFIELD_TEXTURE && part->pd->tex) {
+ if (part->pd->forcefield != PFIELD_TEXTURE && part->pd->tex) {
part->pd->tex->id.us--;
- part->pd->tex= NULL;
+ part->pd->tex = NULL;
}
- if(part->pd2->forcefield != PFIELD_TEXTURE && part->pd2->tex) {
+ if (part->pd2->forcefield != PFIELD_TEXTURE && part->pd2->tex) {
part->pd2->tex->id.us--;
- part->pd2->tex= NULL;
+ part->pd2->tex = NULL;
}
DAG_id_tag_update(&part->id, OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME|PSYS_RECALC_RESET);
@@ -494,9 +494,9 @@ static void rna_FieldSettings_update(Main *UNUSED(bmain), Scene *UNUSED(scene),
else {
Object *ob = (Object*)ptr->id.data;
- if(ob->pd->forcefield != PFIELD_TEXTURE && ob->pd->tex) {
+ if (ob->pd->forcefield != PFIELD_TEXTURE && ob->pd->tex) {
ob->pd->tex->id.us--;
- ob->pd->tex= NULL;
+ ob->pd->tex = NULL;
}
DAG_id_tag_update(&ob->id, OB_RECALC_OB);
@@ -506,19 +506,19 @@ static void rna_FieldSettings_update(Main *UNUSED(bmain), Scene *UNUSED(scene),
static void rna_FieldSettings_shape_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- if(!particle_id_check(ptr)) {
- Object *ob= (Object*)ptr->id.data;
- PartDeflect *pd= ob->pd;
- ModifierData *md= modifiers_findByType(ob, eModifierType_Surface);
+ if (!particle_id_check(ptr)) {
+ Object *ob = (Object*)ptr->id.data;
+ PartDeflect *pd = ob->pd;
+ ModifierData *md = modifiers_findByType(ob, eModifierType_Surface);
/* add/remove modifier as needed */
- if(!md) {
- if(pd && (pd->shape == PFIELD_SHAPE_SURFACE) && ELEM(pd->forcefield,PFIELD_GUIDE,PFIELD_TEXTURE)==0)
- if(ELEM4(ob->type, OB_MESH, OB_SURF, OB_FONT, OB_CURVE))
+ if (!md) {
+ if (pd && (pd->shape == PFIELD_SHAPE_SURFACE) && ELEM(pd->forcefield,PFIELD_GUIDE,PFIELD_TEXTURE) == 0)
+ if (ELEM4(ob->type, OB_MESH, OB_SURF, OB_FONT, OB_CURVE))
ED_object_modifier_add(NULL, bmain, scene, ob, NULL, eModifierType_Surface);
}
else {
- if(!pd || pd->shape != PFIELD_SHAPE_SURFACE)
+ if (!pd || pd->shape != PFIELD_SHAPE_SURFACE)
ED_object_modifier_remove(NULL, bmain, scene, ob, md);
}
@@ -528,24 +528,26 @@ 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)) {
+ if (particle_id_check(ptr)) {
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;
+ Object *ob = (Object*)ptr->id.data;
/* do this before scene sort, that one checks for CU_PATH */
- /* XXX if(ob->type==OB_CURVE && ob->pd->forcefield==PFIELD_GUIDE) {
- Curve *cu= ob->data;
+#if 0 /* XXX */
+ if (ob->type == OB_CURVE && ob->pd->forcefield == PFIELD_GUIDE) {
+ Curve *cu = ob->data;
cu->flag |= (CU_PATH|CU_3D);
- do_curvebuts(B_CU3D); // all curves too
- }*/
+ do_curvebuts(B_CU3D); /* all curves too */
+ }
+#endif
rna_FieldSettings_shape_update(bmain, scene, ptr);
DAG_scene_sort(bmain, scene);
- if(ob->type == OB_CURVE && ob->pd->forcefield == PFIELD_GUIDE)
+ if (ob->type == OB_CURVE && ob->pd->forcefield == PFIELD_GUIDE)
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);
@@ -560,7 +562,7 @@ static char *rna_FieldSettings_path(PointerRNA *ptr)
/* Check through all possible places the settings can be to find the right one */
- if(particle_id_check(ptr)) {
+ if (particle_id_check(ptr)) {
/* particle system force field */
ParticleSettings *part = (ParticleSettings*)ptr->id.data;
@@ -570,7 +572,7 @@ static char *rna_FieldSettings_path(PointerRNA *ptr)
return BLI_sprintfN("force_field_2");
} else {
/* object force field */
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
if (ob->pd == pd)
return BLI_sprintfN("field");
@@ -599,14 +601,14 @@ static char *rna_EffectorWeight_path(PointerRNA *ptr)
EffectorWeights *ew = (EffectorWeights *)ptr->data;
/* Check through all possible places the settings can be to find the right one */
- if(particle_id_check(ptr)) {
+ if (particle_id_check(ptr)) {
/* particle effector weights */
ParticleSettings *part = (ParticleSettings*)ptr->id.data;
if (part->effector_weights == ew)
return BLI_sprintfN("effector_weights");
} else {
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
ModifierData *md;
/* check softbody modifier */
@@ -643,7 +645,7 @@ static char *rna_EffectorWeight_path(PointerRNA *ptr)
if (pmd->canvas) {
DynamicPaintSurface *surface = pmd->canvas->surfaces.first;
- for(; surface; surface=surface->next) {
+ for (; surface; surface = surface->next) {
if (surface->effector_weights == ew)
return BLI_sprintfN("modifiers[\"%s\"].canvas_settings.canvas_surfaces[\"%s\"].effector_weights",
md->name, surface->name);
@@ -656,13 +658,13 @@ static char *rna_EffectorWeight_path(PointerRNA *ptr)
static void rna_CollisionSettings_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
- ModifierData *md= modifiers_findByType(ob, eModifierType_Collision);
+ Object *ob = (Object*)ptr->id.data;
+ ModifierData *md = modifiers_findByType(ob, eModifierType_Collision);
/* add/remove modifier as needed */
- if(ob->pd->deflect && !md)
+ if (ob->pd->deflect && !md)
ED_object_modifier_add(NULL, bmain, scene, ob, NULL, eModifierType_Collision);
- else if(!ob->pd->deflect && md)
+ else if (!ob->pd->deflect && md)
ED_object_modifier_remove(NULL, bmain, scene, ob, md);
WM_main_add_notifier(NC_OBJECT|ND_DRAW, ob);
@@ -670,7 +672,7 @@ static void rna_CollisionSettings_dependency_update(Main *bmain, Scene *scene, P
static void rna_CollisionSettings_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
DAG_id_tag_update(&ob->id, OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME);
WM_main_add_notifier(NC_OBJECT|ND_DRAW, ob);
@@ -678,7 +680,7 @@ static void rna_CollisionSettings_update(Main *UNUSED(bmain), Scene *UNUSED(scen
static void rna_softbody_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
+ Object *ob = (Object*)ptr->id.data;
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_main_add_notifier(NC_OBJECT|ND_MODIFIER, ob);
@@ -688,27 +690,27 @@ static void rna_softbody_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Point
static EnumPropertyItem *rna_Effector_shape_itemf(bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), int *UNUSED(free))
{
- Object *ob= NULL;
+ Object *ob = NULL;
- if(particle_id_check(ptr))
+ if (particle_id_check(ptr))
return empty_shape_items;
- ob= (Object*)ptr->id.data;
+ ob = (Object*)ptr->id.data;
- if(ob->type == OB_CURVE) {
- if(ob->pd->forcefield == PFIELD_VORTEX)
+ if (ob->type == OB_CURVE) {
+ if (ob->pd->forcefield == PFIELD_VORTEX)
return curve_vortex_shape_items;
return curve_shape_items;
}
- else if(ELEM3(ob->type, OB_MESH, OB_SURF, OB_FONT)) {
- if(ob->pd->forcefield == PFIELD_VORTEX)
+ else if (ELEM3(ob->type, OB_MESH, OB_SURF, OB_FONT)) {
+ if (ob->pd->forcefield == PFIELD_VORTEX)
return vortex_shape_items;
return effector_shape_items;
}
else {
- if(ob->pd->forcefield == PFIELD_VORTEX)
+ if (ob->pd->forcefield == PFIELD_VORTEX)
return empty_vortex_shape_items;
return empty_shape_items;
@@ -723,15 +725,15 @@ static void rna_def_ptcache_point_caches(BlenderRNA *brna, PropertyRNA *cprop)
StructRNA *srna;
PropertyRNA *prop;
- // FunctionRNA *func;
- // PropertyRNA *parm;
+ /* FunctionRNA *func; */
+ /* PropertyRNA *parm; */
RNA_def_property_srna(cprop, "PointCaches");
- srna= RNA_def_struct(brna, "PointCaches", NULL);
+ srna = RNA_def_struct(brna, "PointCaches", NULL);
RNA_def_struct_sdna(srna, "PointCache");
RNA_def_struct_ui_text(srna, "Point Caches", "Collection of point caches");
- prop= RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_funcs(prop, "rna_Cache_active_point_cache_index_get", "rna_Cache_active_point_cache_index_set",
"rna_Cache_active_point_cache_index_range");
RNA_def_property_ui_text(prop, "Active Point Cache Index", "");
@@ -749,92 +751,92 @@ static void rna_def_pointcache(BlenderRNA *brna)
{PTCACHE_COMPRESS_LZMA, "HEAVY", 0, "Heavy", "Effective but slow compression"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "PointCache", NULL);
+ srna = RNA_def_struct(brna, "PointCache", NULL);
RNA_def_struct_ui_text(srna, "Point Cache", "Point cache for physics simulations");
RNA_def_struct_ui_icon(srna, ICON_PHYSICS);
- prop= RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "startframe");
RNA_def_property_range(prop, 1, MAXFRAME);
RNA_def_property_ui_text(prop, "Start", "Frame on which the simulation starts");
- prop= RNA_def_property(srna, "frame_end", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_end", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "endframe");
RNA_def_property_range(prop, 1, MAXFRAME);
RNA_def_property_ui_text(prop, "End", "Frame on which the simulation stops");
- prop= RNA_def_property(srna, "frame_step", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_step", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "step");
RNA_def_property_range(prop, 1, 20);
RNA_def_property_int_funcs(prop, NULL, NULL, "rna_PointCache_frame_step_range");
RNA_def_property_ui_text(prop, "Cache Step", "Number of frames between cached frames");
RNA_def_property_update(prop, NC_OBJECT, "rna_Cache_change");
- prop= RNA_def_property(srna, "index", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "index");
RNA_def_property_range(prop, -1, 100);
RNA_def_property_ui_text(prop, "Cache Index", "Index number of cache files");
RNA_def_property_update(prop, NC_OBJECT, "rna_Cache_idname_change");
- prop= RNA_def_property(srna, "compression", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "compression", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, point_cache_compress_items);
RNA_def_property_ui_text(prop, "Cache Compression", "Compression method to be used");
/* flags */
- prop= RNA_def_property(srna, "is_baked", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_baked", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PTCACHE_BAKED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "is_baking", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_baking", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PTCACHE_BAKING);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_disk_cache", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_disk_cache", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PTCACHE_DISK_CACHE);
RNA_def_property_ui_text(prop, "Disk Cache", "Save cache files to disk (.blend file must be saved first)");
RNA_def_property_update(prop, NC_OBJECT, "rna_Cache_toggle_disk_cache");
- prop= RNA_def_property(srna, "is_outdated", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_outdated", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PTCACHE_OUTDATED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Cache is outdated", "");
- prop= RNA_def_property(srna, "frames_skipped", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "frames_skipped", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PTCACHE_FRAMES_SKIPPED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Name", "Cache name");
RNA_def_property_update(prop, NC_OBJECT, "rna_Cache_idname_change");
RNA_def_struct_name_property(srna, prop);
- prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_DIRPATH);
+ prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "path");
RNA_def_property_ui_text(prop, "File Path", "Cache file path");
RNA_def_property_update(prop, NC_OBJECT, "rna_Cache_idname_change");
- prop= RNA_def_property(srna, "use_quick_cache", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_quick_cache", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PTCACHE_QUICK_CACHE);
RNA_def_property_ui_text(prop, "Quick Cache", "Update simulation with cache steps");
RNA_def_property_update(prop, NC_OBJECT, "rna_Cache_change");
- prop= RNA_def_property(srna, "info", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "info", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "info");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Cache Info", "Info on current cache status");
- prop= RNA_def_property(srna, "use_external", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_external", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PTCACHE_EXTERNAL);
RNA_def_property_ui_text(prop, "External", "Read cache from an external location");
RNA_def_property_update(prop, NC_OBJECT, "rna_Cache_idname_change");
- prop= RNA_def_property(srna, "use_library_path", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_library_path", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", PTCACHE_IGNORE_LIBPATH);
RNA_def_property_ui_text(prop, "Library Path", "Use this files path when library linked into another file");
RNA_def_property_update(prop, NC_OBJECT, "rna_Cache_idname_change");
- prop= RNA_def_property(srna, "point_caches", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "point_caches", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_funcs(prop, "rna_Cache_list_begin", "rna_iterator_listbase_next",
"rna_iterator_listbase_end", "rna_iterator_listbase_get", NULL, NULL, NULL, NULL);
RNA_def_property_struct_type(prop, "PointCache");
@@ -847,54 +849,54 @@ static void rna_def_collision(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "CollisionSettings", NULL);
+ srna = RNA_def_struct(brna, "CollisionSettings", NULL);
RNA_def_struct_sdna(srna, "PartDeflect");
RNA_def_struct_path_func(srna, "rna_CollisionSettings_path");
RNA_def_struct_ui_text(srna, "Collision Settings", "Collision settings for object in physics simulation");
- prop= RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "deflect", 1);
RNA_def_property_ui_text(prop, "Enabled", "Enable this objects as a collider for physics systems");
RNA_def_property_update(prop, 0, "rna_CollisionSettings_dependency_update");
/* Particle Interaction */
- prop= RNA_def_property(srna, "damping_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "damping_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "pdef_damp");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Damping Factor", "Amount of damping during particle collision");
RNA_def_property_update(prop, 0, "rna_CollisionSettings_update");
- prop= RNA_def_property(srna, "damping_random", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "damping_random", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "pdef_rdamp");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random Damping", "Random variation of damping");
RNA_def_property_update(prop, 0, "rna_CollisionSettings_update");
- prop= RNA_def_property(srna, "friction_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "friction_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "pdef_frict");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Friction Factor", "Amount of friction during particle collision");
RNA_def_property_update(prop, 0, "rna_CollisionSettings_update");
- prop= RNA_def_property(srna, "friction_random", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "friction_random", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "pdef_rfrict");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random Friction", "Random variation of friction");
RNA_def_property_update(prop, 0, "rna_CollisionSettings_update");
- prop= RNA_def_property(srna, "permeability", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "permeability", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "pdef_perm");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Permeability", "Chance that the particle will pass through the mesh");
RNA_def_property_update(prop, 0, "rna_CollisionSettings_update");
- prop= RNA_def_property(srna, "use_particle_kill", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_particle_kill", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PDEFLE_KILL_PART);
RNA_def_property_ui_text(prop, "Kill Particles", "Kill collided particles");
RNA_def_property_update(prop, 0, "rna_CollisionSettings_update");
- prop= RNA_def_property(srna, "stickness", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "stickness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "pdef_stickness");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Stickness", "Amount of stickness to surface collision");
@@ -902,25 +904,25 @@ static void rna_def_collision(BlenderRNA *brna)
/* Soft Body and Cloth Interaction */
- prop= RNA_def_property(srna, "thickness_inner", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "thickness_inner", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "pdef_sbift");
RNA_def_property_range(prop, 0.001f, 1.0f);
RNA_def_property_ui_text(prop, "Inner Thickness", "Inner face thickness");
RNA_def_property_update(prop, 0, "rna_CollisionSettings_update");
- prop= RNA_def_property(srna, "thickness_outer", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "thickness_outer", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "pdef_sboft");
RNA_def_property_range(prop, 0.001f, 1.0f);
RNA_def_property_ui_text(prop, "Outer Thickness", "Outer face thickness");
RNA_def_property_update(prop, 0, "rna_CollisionSettings_update");
- prop= RNA_def_property(srna, "damping", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "damping", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "pdef_sbdamp");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Damping", "Amount of damping during collision");
RNA_def_property_update(prop, 0, "rna_CollisionSettings_update");
- prop= RNA_def_property(srna, "absorption", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "absorption", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 1, 2);
RNA_def_property_ui_text(prop, "Absorption",
@@ -933,25 +935,25 @@ static void rna_def_effector_weight(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "EffectorWeights", NULL);
+ srna = RNA_def_struct(brna, "EffectorWeights", NULL);
RNA_def_struct_sdna(srna, "EffectorWeights");
RNA_def_struct_path_func(srna, "rna_EffectorWeight_path");
RNA_def_struct_ui_text(srna, "Effector Weights", "Effector weights for physics simulation");
RNA_def_struct_ui_icon(srna, ICON_PHYSICS);
/* Flags */
- prop= RNA_def_property(srna, "apply_to_hair_growing", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "apply_to_hair_growing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", EFF_WEIGHT_DO_HAIR);
RNA_def_property_ui_text(prop, "Use For Growing Hair", "Use force fields when growing hair");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
/* General */
- prop= RNA_def_property(srna, "group", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "group", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Effector Group", "Limit effectors to this Group");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_dependency_update");
- prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "global_gravity");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
@@ -959,91 +961,91 @@ static void rna_def_effector_weight(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
/* Effector weights */
- prop= RNA_def_property(srna, "all", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "all", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "weight[0]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "All", "All effector's weight");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
- prop= RNA_def_property(srna, "force", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "force", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "weight[1]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Force", "Force effector weight");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
- prop= RNA_def_property(srna, "vortex", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "vortex", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "weight[2]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Vortex", "Vortex effector weight");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
- prop= RNA_def_property(srna, "magnetic", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "magnetic", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "weight[3]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Magnetic", "Magnetic effector weight");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
- prop= RNA_def_property(srna, "wind", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "wind", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "weight[4]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Wind", "Wind effector weight");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
- prop= RNA_def_property(srna, "curve_guide", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "curve_guide", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "weight[5]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Curve Guide", "Curve guide effector weight");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
- prop= RNA_def_property(srna, "texture", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "texture", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "weight[6]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Texture", "Texture effector weight");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
- prop= RNA_def_property(srna, "harmonic", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "harmonic", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "weight[7]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Harmonic", "Harmonic effector weight");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
- prop= RNA_def_property(srna, "charge", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "charge", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "weight[8]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Charge", "Charge effector weight");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
- prop= RNA_def_property(srna, "lennardjones", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "lennardjones", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "weight[9]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Lennard-Jones", "Lennard-Jones effector weight");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
- prop= RNA_def_property(srna, "boid", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "boid", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "weight[10]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Boid", "Boid effector weight");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
- prop= RNA_def_property(srna, "turbulence", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "turbulence", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "weight[11]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Turbulence", "Turbulence effector weight");
RNA_def_property_update(prop, 0, "rna_EffectorWeight_update");
- prop= RNA_def_property(srna, "drag", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "drag", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "weight[12]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
@@ -1109,7 +1111,7 @@ static void rna_def_field(BlenderRNA *brna)
{2, "Z", 0, "Z", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "FieldSettings", NULL);
+ srna = RNA_def_struct(brna, "FieldSettings", NULL);
RNA_def_struct_sdna(srna, "PartDeflect");
RNA_def_struct_path_func(srna, "rna_FieldSettings_path");
RNA_def_struct_ui_text(srna, "Field Settings", "Field settings for an object in physics simulation");
@@ -1117,25 +1119,25 @@ static void rna_def_field(BlenderRNA *brna)
/* Enums */
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "forcefield");
RNA_def_property_enum_items(prop, field_type_items);
RNA_def_property_ui_text(prop, "Type", "Type of field");
RNA_def_property_update(prop, 0, "rna_FieldSettings_dependency_update");
- prop= RNA_def_property(srna, "shape", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "shape", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, effector_shape_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Effector_shape_itemf");
RNA_def_property_ui_text(prop, "Shape", "Which direction is used to calculate the effector force");
RNA_def_property_update(prop, 0, "rna_FieldSettings_shape_update");
- prop= RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "falloff");
RNA_def_property_enum_items(prop, falloff_items);
RNA_def_property_ui_text(prop, "Fall-Off", "");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "texture_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "texture_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "tex_mode");
RNA_def_property_enum_items(prop, texture_items);
RNA_def_property_ui_text(prop, "Texture Mode",
@@ -1143,7 +1145,7 @@ static void rna_def_field(BlenderRNA *brna)
"else Gradient will be used instead)");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "z_direction", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "z_direction", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "zdir");
RNA_def_property_enum_items(prop, zdirection_items);
RNA_def_property_ui_text(prop, "Z Direction", "Effect in full or only positive/negative Z direction");
@@ -1151,177 +1153,177 @@ static void rna_def_field(BlenderRNA *brna)
/* Float */
- prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "f_strength");
RNA_def_property_range(prop, -1000.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Strength", "Strength of force field");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
/* different ui range to above */
- prop= RNA_def_property(srna, "linear_drag", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "linear_drag", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "f_strength");
RNA_def_property_range(prop, -2.0f, 2.0f);
RNA_def_property_ui_text(prop, "Linear Drag", "Drag component proportional to velocity");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "harmonic_damping", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "harmonic_damping", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "f_damp");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Harmonic Damping", "Damping of the harmonic force");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
/* different ui range to above */
- prop= RNA_def_property(srna, "quadratic_drag", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "quadratic_drag", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "f_damp");
RNA_def_property_range(prop, -2.0f, 2.0f);
RNA_def_property_ui_text(prop, "Quadratic Drag", "Drag component proportional to the square of velocity");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "flow", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "flow", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "f_flow");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Flow", "Convert effector force into air flow velocity");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
/* different ui range to above */
- prop= RNA_def_property(srna, "inflow", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "inflow", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "f_flow");
RNA_def_property_range(prop, -10.0f, 10.0f);
RNA_def_property_ui_text(prop, "Inflow", "Inwards component of the vortex force");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "f_size");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Size", "Size of the turbulence");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "rest_length", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "rest_length", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "f_size");
RNA_def_property_range(prop, 0.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Rest Length", "Rest length of the harmonic force");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "falloff_power", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "falloff_power", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "f_power");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Falloff Power", "Falloff power (real gravitational falloff = 2)");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "distance_min", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "distance_min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "mindist");
RNA_def_property_range(prop, 0.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Minimum Distance", "Minimum distance for the field's fall-off");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "distance_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "distance_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxdist");
RNA_def_property_range(prop, 0.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Maximum Distance", "Maximum distance for the field to work");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "radial_min", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "radial_min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "minrad");
RNA_def_property_range(prop, 0.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Minimum Radial Distance", "Minimum radial distance for the field's fall-off");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "radial_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "radial_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxrad");
RNA_def_property_range(prop, 0.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Maximum Radial Distance", "Maximum radial distance for the field to work");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "radial_falloff", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "radial_falloff", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "f_power_r");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Radial Falloff Power", "Radial falloff power (real gravitational falloff = 2)");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "texture_nabla", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "texture_nabla", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "tex_nabla");
RNA_def_property_range(prop, 0.0001f, 1.0f);
RNA_def_property_ui_text(prop, "Nabla", "Defines size of derivative offset used for calculating gradient and curl");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "noise", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "noise", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "f_noise");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Noise", "Amount of noise for the force strength");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "seed", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "seed", PROP_INT, PROP_UNSIGNED);
RNA_def_property_range(prop, 1, 128);
RNA_def_property_ui_text(prop, "Seed", "Seed of the noise");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
/* Boolean */
- prop= RNA_def_property(srna, "use_min_distance", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_min_distance", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_USEMIN);
RNA_def_property_ui_text(prop, "Use Min", "Use a minimum distance for the field's fall-off");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "use_max_distance", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_max_distance", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_USEMAX);
RNA_def_property_ui_text(prop, "Use Max", "Use a maximum distance for the field to work");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "use_radial_min", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_radial_min", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_USEMINR);
RNA_def_property_ui_text(prop, "Use Min", "Use a minimum radial distance for the field's fall-off");
- // "Use a minimum angle for the field's fall-off"
+ /* "Use a minimum angle for the field's fall-off" */
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "use_radial_max", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_radial_max", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_USEMAXR);
RNA_def_property_ui_text(prop, "Use Max", "Use a maximum radial distance for the field to work");
- // "Use a maximum angle for the field to work"
+ /* "Use a maximum angle for the field to work" */
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "use_object_coords", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_object_coords", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_TEX_OBJECT);
RNA_def_property_ui_text(prop, "Use Coordinates", "Use object/global coordinates for texture");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "use_global_coords", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_global_coords", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_GLOBAL_CO);
RNA_def_property_ui_text(prop, "Use Global Coordinates", "Use effector/global coordinates for turbulence");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "use_2d_force", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_2d_force", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_TEX_2D);
RNA_def_property_ui_text(prop, "2D", "Apply force only in 2d");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "use_root_coords", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_root_coords", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_TEX_ROOTCO);
RNA_def_property_ui_text(prop, "Root Texture Coordinates", "Texture coordinates from root particle locations");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "apply_to_location", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "apply_to_location", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_DO_LOCATION);
RNA_def_property_ui_text(prop, "Location", "Effect particles' location");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "apply_to_rotation", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "apply_to_rotation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_DO_ROTATION);
RNA_def_property_ui_text(prop, "Rotation", "Effect particles' dynamic rotation");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "use_absorption", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_absorption", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_VISIBILITY);
RNA_def_property_ui_text(prop, "Absorption", "Force gets absorbed by collision objects");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "use_multiple_springs", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_multiple_springs", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_MULTIPLE_SPRINGS);
RNA_def_property_ui_text(prop, "Multiple Springs", "Every point is effected by multiple springs");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
/* Pointer */
- prop= RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tex");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Texture", "Texture to use as force");
@@ -1329,37 +1331,37 @@ static void rna_def_field(BlenderRNA *brna)
/********** Curve Guide Field Settings **********/
- prop= RNA_def_property(srna, "guide_minimum", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "guide_minimum", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "f_strength");
RNA_def_property_range(prop, 0.0f, 1000.0f);
RNA_def_property_ui_text(prop, "Minimum Distance", "The distance from which particles are affected fully");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "guide_free", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "guide_free", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "free_end");
RNA_def_property_range(prop, 0.0f, 0.99f);
RNA_def_property_ui_text(prop, "Free", "Guide-free time from particle life's end");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "use_guide_path_add", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_guide_path_add", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_GUIDE_PATH_ADD);
RNA_def_property_ui_text(prop, "Additive", "Based on distance/falloff it adds a portion of the entire path");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "use_guide_path_weight", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_guide_path_weight", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PFIELD_GUIDE_PATH_WEIGHT);
RNA_def_property_ui_text(prop, "Weights", "Use curve weights to influence the particle influence along the curve");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
/* Clump Settings */
- prop= RNA_def_property(srna, "guide_clump_amount", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "guide_clump_amount", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clump_fac");
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Amount", "Amount of clumping");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "guide_clump_shape", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "guide_clump_shape", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clump_pow");
RNA_def_property_range(prop, -0.999f, 0.999f);
RNA_def_property_ui_text(prop, "Shape", "Shape of clumping");
@@ -1367,38 +1369,38 @@ static void rna_def_field(BlenderRNA *brna)
/* Kink Settings */
- prop= RNA_def_property(srna, "guide_kink_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "guide_kink_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "kink");
RNA_def_property_enum_items(prop, guide_kink_items);
RNA_def_property_ui_text(prop, "Kink", "Type of periodic offset on the curve");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "guide_kink_axis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "guide_kink_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "kink_axis");
RNA_def_property_enum_items(prop, guide_kink_axis_items);
RNA_def_property_ui_text(prop, "Axis", "Which axis to use for offset");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "guide_kink_frequency", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "guide_kink_frequency", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "kink_freq");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Frequency", "The frequency of the offset (1/total length)");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "guide_kink_shape", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "guide_kink_shape", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "kink_shape");
RNA_def_property_range(prop, -0.999f, 0.999f);
RNA_def_property_ui_text(prop, "Shape", "Adjust the offset to the beginning/end");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
- prop= RNA_def_property(srna, "guide_kink_amplitude", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "guide_kink_amplitude", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "kink_amp");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Amplitude", "The amplitude of the offset");
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
/* Variables used for Curve Guide, already wrapped, used for other fields too */
- // falloff_power, use_max_distance, maximum_distance
+ /* falloff_power, use_max_distance, maximum_distance */
}
static void rna_def_game_softbody(BlenderRNA *brna)
@@ -1406,33 +1408,33 @@ static void rna_def_game_softbody(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "GameSoftBodySettings", NULL);
+ srna = RNA_def_struct(brna, "GameSoftBodySettings", NULL);
RNA_def_struct_sdna(srna, "BulletSoftBody");
RNA_def_struct_ui_text(srna, "Game Soft Body Settings", "Soft body simulation settings for an object in the game engine");
/* Floats */
- prop= RNA_def_property(srna, "linear_stiffness", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "linear_stiffness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "linStiff");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Linear Stiffness", "Linear stiffness of the soft body links");
- prop= RNA_def_property(srna, "dynamic_friction", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "dynamic_friction", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "kDF");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Friction", "Dynamic Friction");
- prop= RNA_def_property(srna, "shape_threshold", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "shape_threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "kMT");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Threshold", "Shape matching threshold");
- prop= RNA_def_property(srna, "collision_margin", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "collision_margin", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "margin");
RNA_def_property_range(prop, 0.01f, 1.0f);
RNA_def_property_ui_text(prop, "Margin", "Collision margin for soft body. Small value makes the algorithm unstable");
- prop= RNA_def_property(srna, "weld_threshold", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "weld_threshold", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "welding");
RNA_def_property_range(prop, 0.0f, 0.01f);
RNA_def_property_ui_text(prop, "Welding",
@@ -1442,31 +1444,31 @@ static void rna_def_game_softbody(BlenderRNA *brna)
/* Integers */
- prop= RNA_def_property(srna, "location_iterations", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "location_iterations", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "piterations");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Position Iterations", "Position solver iterations");
- prop= RNA_def_property(srna, "cluster_iterations", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "cluster_iterations", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "numclusteriterations");
RNA_def_property_range(prop, 1, 128);
RNA_def_property_ui_text(prop, "Cluster Iterations", "Number of cluster iterations");
/* Booleans */
- prop= RNA_def_property(srna, "use_shape_match", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_shape_match", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", OB_BSB_SHAPE_MATCHING);
RNA_def_property_ui_text(prop, "Shape Match", "Enable soft body shape matching goal");
- prop= RNA_def_property(srna, "use_bending_constraints", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_bending_constraints", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", OB_BSB_BENDING_CONSTRAINTS);
RNA_def_property_ui_text(prop, "Bending Const", "Enable bending constraints");
- prop= RNA_def_property(srna, "use_cluster_rigid_to_softbody", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_cluster_rigid_to_softbody", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "collisionflags", OB_BSB_COL_CL_RS);
RNA_def_property_ui_text(prop, "Rigid to Soft Body", "Enable cluster collision between soft and rigid body");
- prop= RNA_def_property(srna, "use_cluster_soft_to_softbody", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_cluster_soft_to_softbody", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "collisionflags", OB_BSB_COL_CL_SS);
RNA_def_property_ui_text(prop, "Soft to Soft Body", "Enable cluster collision between soft and soft body");
}
@@ -1475,7 +1477,7 @@ static void rna_def_softbody(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- const int matrix_dimsize[]= {3, 3};
+ const int matrix_dimsize[] = {3, 3};
static EnumPropertyItem collision_type_items[] = {
@@ -1491,39 +1493,39 @@ static void rna_def_softbody(BlenderRNA *brna)
{1, "LIFT_FORCE", 0, "Lift Force", "Edges receive a lift force when passing through surrounding media"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "SoftBodySettings", NULL);
+ srna = RNA_def_struct(brna, "SoftBodySettings", NULL);
RNA_def_struct_sdna(srna, "SoftBody");
RNA_def_struct_path_func(srna, "rna_SoftBodySettings_path");
RNA_def_struct_ui_text(srna, "Soft Body Settings", "Soft body simulation settings for an object");
/* General Settings */
- prop= RNA_def_property(srna, "friction", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "friction", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "mediafrict");
RNA_def_property_range(prop, 0.0f, 50.0f);
RNA_def_property_ui_text(prop, "Friction", "General media friction for point movements");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "nodemass");
RNA_def_property_range(prop, 0.0f, 50000.0f);
RNA_def_property_ui_text(prop, "Mass", "General Mass value");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "vertex_group_mass", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group_mass", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "namedVG_Mass");
RNA_def_property_ui_text(prop, "Mass Vertex Group", "Control point mass values");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SoftBodySettings_mass_vgroup_set");
RNA_def_property_update(prop, 0, "rna_softbody_update");
/* no longer used */
- prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION);
+ prop = RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION);
RNA_def_property_float_sdna(prop, NULL, "grav");
RNA_def_property_range(prop, -10.0f, 10.0f);
RNA_def_property_ui_text(prop, "Gravitation", "Apply gravitation to point movement");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "speed", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "physics_speed");
RNA_def_property_range(prop, 0.01f, 100.0f);
RNA_def_property_ui_text(prop, "Speed", "Tweak timing for physics to control frequency and speed");
@@ -1531,39 +1533,39 @@ static void rna_def_softbody(BlenderRNA *brna)
/* Goal */
- prop= RNA_def_property(srna, "vertex_group_goal", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group_goal", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "vertgroup");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* not impossible .. but not supported yet */
RNA_def_property_string_funcs(prop, "rna_SoftBodySettings_goal_vgroup_get", "rna_SoftBodySettings_goal_vgroup_length",
"rna_SoftBodySettings_goal_vgroup_set");
RNA_def_property_ui_text(prop, "Goal Vertex Group", "Control point weight values");
- prop= RNA_def_property(srna, "goal_min", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "goal_min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "mingoal");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Goal Minimum", "Goal minimum, vertex weights are scaled to match this range");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "goal_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "goal_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxgoal");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Goal Maximum", "Goal maximum, vertex weights are scaled to match this range");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "goal_default", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "goal_default", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "defgoal");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Goal Default", "Default Goal (vertex target position) value, when no Vertex Group used");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "goal_spring", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "goal_spring", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "goalspring");
RNA_def_property_range(prop, 0.0f, 0.999f);
RNA_def_property_ui_text(prop, "Goal Stiffness", "Goal (vertex target position) spring stiffness");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "goal_friction", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "goal_friction", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "goalfrict");
RNA_def_property_range(prop, 0.0f, 50.0f);
RNA_def_property_ui_text(prop, "Goal Damping", "Goal (vertex target position) friction");
@@ -1571,54 +1573,54 @@ static void rna_def_softbody(BlenderRNA *brna)
/* Edge Spring Settings */
- prop= RNA_def_property(srna, "pull", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "pull", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "inspring");
RNA_def_property_range(prop, 0.0f, 0.999f);
RNA_def_property_ui_text(prop, "Pull", "Edge spring stiffness when longer than rest length");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "push", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "push", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "inpush");
RNA_def_property_range(prop, 0.0f, 0.999f);
RNA_def_property_ui_text(prop, "Push", "Edge spring stiffness when shorter than rest length");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "damping", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "damping", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "infrict");
RNA_def_property_range(prop, 0.0f, 50.0f);
RNA_def_property_ui_text(prop, "Damp", "Edge spring friction");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "spring_length", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "spring_length", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "springpreload");
RNA_def_property_range(prop, 0.0f, 200.0f);
RNA_def_property_ui_text(prop, "SL", "Alter spring length to shrink/blow up (unit %) 0 to disable");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "aero", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "aero", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "aeroedge");
RNA_def_property_range(prop, 0.0f, 30000.0f);
RNA_def_property_ui_text(prop, "Aero", "Make edges 'sail'");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "plastic", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "plastic", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "plastic");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Plastic", "Permanent deform");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "bend", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "bend", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "secondspring");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Bending", "Bending Stiffness");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "shear", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "shear", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "shearstiff");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Shear", "Shear Stiffness");
- prop= RNA_def_property(srna, "vertex_group_spring", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group_spring", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "namedVG_Spring_K");
RNA_def_property_ui_text(prop, "Spring Vertex Group", "Control point spring strength values");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SoftBodySettings_spring_vgroup_set");
@@ -1626,27 +1628,27 @@ static void rna_def_softbody(BlenderRNA *brna)
/* Collision */
- prop= RNA_def_property(srna, "collision_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "collision_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "sbc_mode");
RNA_def_property_enum_items(prop, collision_type_items);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Collision Type", "Choose Collision Type");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "ball_size", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "ball_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "colball");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* code is not ready for that yet */
RNA_def_property_range(prop, -10.0f, 10.0f);
RNA_def_property_ui_text(prop, "Ball Size", "Absolute ball size or factor if not manual adjusted");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "ball_stiff", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "ball_stiff", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ballstiff");
RNA_def_property_range(prop, 0.001f, 100.0f);
RNA_def_property_ui_text(prop, "Ball Size", "Ball inflating pressure");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "ball_damp", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "ball_damp", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "balldamp");
RNA_def_property_range(prop, 0.001f, 1.0f);
RNA_def_property_ui_text(prop, "Ball Size", "Blending to inelastic collision");
@@ -1654,48 +1656,48 @@ static void rna_def_softbody(BlenderRNA *brna)
/* Solver */
- prop= RNA_def_property(srna, "error_threshold", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "error_threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rklimit");
RNA_def_property_range(prop, 0.001f, 10.0f);
RNA_def_property_ui_text(prop, "Error Limit",
"The Runge-Kutta ODE solver error limit, low value gives more precision, high values speed");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "step_min", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "step_min", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "minloops");
RNA_def_property_range(prop, 0, 30000);
RNA_def_property_ui_text(prop, "Min Step", "Minimal # solver steps/frame");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "step_max", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "step_max", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "maxloops");
RNA_def_property_range(prop, 0, 30000);
RNA_def_property_ui_text(prop, "Max Step", "Maximal # solver steps/frame");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "choke", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "choke", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "choke");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Choke", "'Viscosity' inside collision target");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "fuzzy", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "fuzzy", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "fuzzyness");
RNA_def_property_range(prop, 1, 100);
RNA_def_property_ui_text(prop, "Fuzzy",
"Fuzziness while on collision, high values make collision handling faster but less stable");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "use_auto_step", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_auto_step", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "solverflags", SBSO_OLDERR);
RNA_def_property_ui_text(prop, "V", "Use velocities for automagic step sizes");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "use_diagnose", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_diagnose", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "solverflags", SBSO_MONITOR);
RNA_def_property_ui_text(prop, "Print Performance to Console", "Turn on SB diagnose console prints");
- prop= RNA_def_property(srna, "use_estimate_matrix", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_estimate_matrix", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "solverflags", SBSO_ESTIMATEIPO);
RNA_def_property_ui_text(prop, "Estimate matrix", "Estimate matrix... split to COM, ROT, SCALE");
@@ -1705,17 +1707,17 @@ static void rna_def_softbody(BlenderRNA *brna)
/* but i did not want to start a new property struct */
/* so rather rename this from SoftBodySettings to SoftBody */
/* translation */
- prop= RNA_def_property(srna, "location_mass_center", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "location_mass_center", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "lcom");
RNA_def_property_ui_text(prop, "Center of mass", "Location of Center of mass");
/* matrix */
- prop= RNA_def_property(srna, "rotation_estimate", PROP_FLOAT, PROP_MATRIX);
+ prop = RNA_def_property(srna, "rotation_estimate", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "lrot");
RNA_def_property_multi_array(prop, 2, matrix_dimsize);
RNA_def_property_ui_text(prop, "Rot Matrix", "Estimated rotation matrix");
- prop= RNA_def_property(srna, "scale_estimate", PROP_FLOAT, PROP_MATRIX);
+ prop = RNA_def_property(srna, "scale_estimate", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "lscale");
RNA_def_property_multi_array(prop, 2, matrix_dimsize);
RNA_def_property_ui_text(prop, "Scale Matrix", "Estimated scale matrix");
@@ -1724,47 +1726,47 @@ static void rna_def_softbody(BlenderRNA *brna)
/* Flags */
- prop= RNA_def_property(srna, "use_goal", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_goal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SoftBodySettings_use_goal_get", "rna_SoftBodySettings_use_goal_set");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Use Goal", "Define forces for vertices to stick to animated position");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "use_edges", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_edges", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SoftBodySettings_use_edges_get", "rna_SoftBodySettings_use_edges_set");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Use Edges", "Use Edges as springs");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "use_stiff_quads", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_stiff_quads", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SoftBodySettings_stiff_quads_get", "rna_SoftBodySettings_stiff_quads_set");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Stiff Quads", "Add diagonal springs on 4-gons");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "use_edge_collision", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_edge_collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SoftBodySettings_edge_collision_get", "rna_SoftBodySettings_edge_collision_set");
RNA_def_property_ui_text(prop, "Edge Collision", "Edges collide too");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "use_face_collision", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_face_collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SoftBodySettings_face_collision_get", "rna_SoftBodySettings_face_collision_set");
RNA_def_property_ui_text(prop, "Face Collision", "Faces collide too, can be very slow");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "aerodynamics_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "aerodynamics_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, aerodynamics_type);
RNA_def_property_enum_funcs(prop, "rna_SoftBodySettings_new_aero_get", "rna_SoftBodySettings_new_aero_set", NULL);
RNA_def_property_ui_text(prop, "Aerodynamics Type", "Method of calculating aerodynamic interaction");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "use_self_collision", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_self_collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SoftBodySettings_self_collision_get", "rna_SoftBodySettings_self_collision_set");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Self Collision", "Enable naive vertex ball self collision");
RNA_def_property_update(prop, 0, "rna_softbody_update");
- prop= RNA_def_property(srna, "effector_weights", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "effector_weights", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "effector_weights");
RNA_def_property_struct_type(prop, "EffectorWeights");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
diff --git a/source/blender/makesrna/intern/rna_packedfile.c b/source/blender/makesrna/intern/rna_packedfile.c
index 3d19cc352f1..1fed98b33eb 100644
--- a/source/blender/makesrna/intern/rna_packedfile.c
+++ b/source/blender/makesrna/intern/rna_packedfile.c
@@ -48,10 +48,10 @@ void RNA_def_packedfile(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "PackedFile", NULL);
+ srna = RNA_def_struct(brna, "PackedFile", NULL);
RNA_def_struct_ui_text(srna, "Packed File", "External file packed into the .blend file");
- prop= RNA_def_property(srna, "size", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "size", PROP_INT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Size", "Size of packed file in bytes");
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 2c71fffb5b5..a4ed256b70c 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -134,16 +134,16 @@ EnumPropertyItem part_hair_ren_as_items[] = {
/* use for object space hair get/set */
static void rna_ParticleHairKey_location_object_info(PointerRNA *ptr, ParticleSystemModifierData **psmd_pt, ParticleData **pa_pt)
{
- HairKey *hkey= (HairKey *)ptr->data;
+ HairKey *hkey = (HairKey *)ptr->data;
Object *ob = (Object *)ptr->id.data;
ModifierData *md;
- ParticleSystemModifierData *psmd=NULL;
+ ParticleSystemModifierData *psmd = NULL;
ParticleSystem *psys;
ParticleData *pa;
int i;
- *psmd_pt= NULL;
- *pa_pt= NULL;
+ *psmd_pt = NULL;
+ *pa_pt = NULL;
/* given the pointer HairKey *hkey, we iterate over all particles in all
* particle systems in the object "ob" in order to find
@@ -159,12 +159,12 @@ static void rna_ParticleHairKey_location_object_info(PointerRNA *ptr, ParticleSy
* hairkey belongs.
*/
- for (md= ob->modifiers.first; md; md=md->next) {
+ for (md = ob->modifiers.first; md; md = md->next) {
if (md->type == eModifierType_ParticleSystem) {
- psmd= (ParticleSystemModifierData *) md;
+ psmd = (ParticleSystemModifierData *) md;
if (psmd && psmd->dm && psmd->psys) {
psys = psmd->psys;
- for(i= 0, pa= psys->particles; i < psys->totpart; i++, pa++) {
+ for (i = 0, pa = psys->particles; i < psys->totpart; i++, pa++) {
/* hairkeys are stored sequentially in memory, so we can
* find if it's the same particle by comparing pointers,
* without having to iterate over them all */
@@ -181,17 +181,17 @@ static void rna_ParticleHairKey_location_object_info(PointerRNA *ptr, ParticleSy
static void rna_ParticleHairKey_location_object_get(PointerRNA *ptr, float *values)
{
- HairKey *hkey= (HairKey *)ptr->data;
+ HairKey *hkey = (HairKey *)ptr->data;
Object *ob = (Object *)ptr->id.data;
ParticleSystemModifierData *psmd;
ParticleData *pa;
rna_ParticleHairKey_location_object_info(ptr, &psmd, &pa);
- if(pa) {
+ if (pa) {
DerivedMesh *hairdm = (psmd->psys->flag & PSYS_HAIR_DYNAMICS) ? psmd->psys->hair_out_dm : NULL;
- if(hairdm) {
+ if (hairdm) {
MVert *mvert = CDDM_get_vert(hairdm, pa->hair_index + (hkey - pa->hair));
copy_v3_v3(values, mvert->co);
}
@@ -209,17 +209,17 @@ static void rna_ParticleHairKey_location_object_get(PointerRNA *ptr, float *valu
static void rna_ParticleHairKey_location_object_set(PointerRNA *ptr, const float *values)
{
- HairKey *hkey= (HairKey *)ptr->data;
+ HairKey *hkey = (HairKey *)ptr->data;
Object *ob = (Object *)ptr->id.data;
ParticleSystemModifierData *psmd;
ParticleData *pa;
rna_ParticleHairKey_location_object_info(ptr, &psmd, &pa);
- if(pa) {
+ if (pa) {
DerivedMesh *hairdm = (psmd->psys->flag & PSYS_HAIR_DYNAMICS) ? psmd->psys->hair_out_dm : NULL;
- if(hairdm) {
+ if (hairdm) {
MVert *mvert = CDDM_get_vert(hairdm, pa->hair_index + (hkey - pa->hair));
copy_v3_v3(mvert->co, values);
}
@@ -241,7 +241,7 @@ static void rna_ParticleHairKey_location_object_set(PointerRNA *ptr, const float
/* property update functions */
static void particle_recalc(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr, short flag)
{
- if(ptr->type==&RNA_ParticleSystem) {
+ if (ptr->type == &RNA_ParticleSystem) {
ParticleSystem *psys = (ParticleSystem*)ptr->data;
psys->recalc = flag;
@@ -289,9 +289,9 @@ static ParticleSystem *rna_particle_system_for_target(Object *ob, ParticleTarget
ParticleSystem *psys;
ParticleTarget *pt;
- for(psys=ob->particlesystem.first; psys; psys=psys->next)
- for(pt=psys->targets.first; pt; pt=pt->next)
- if(pt == target)
+ for (psys = ob->particlesystem.first; psys; psys = psys->next)
+ for (pt = psys->targets.first; pt; pt = pt->next)
+ if (pt == target)
return psys;
return NULL;
@@ -299,24 +299,24 @@ static ParticleSystem *rna_particle_system_for_target(Object *ob, ParticleTarget
static void rna_Particle_target_reset(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- if(ptr->type==&RNA_ParticleTarget) {
+ if (ptr->type == &RNA_ParticleTarget) {
Object *ob = (Object*)ptr->id.data;
ParticleTarget *pt = (ParticleTarget*)ptr->data;
- ParticleSystem *kpsys=NULL, *psys=rna_particle_system_for_target(ob, pt);
+ ParticleSystem *kpsys = NULL, *psys = rna_particle_system_for_target(ob, pt);
- if(pt->ob==ob || pt->ob==NULL) {
+ if (pt->ob == ob || pt->ob == NULL) {
kpsys = BLI_findlink(&ob->particlesystem, pt->psys-1);
- if(kpsys)
+ if (kpsys)
pt->flag |= PTARGET_VALID;
else
pt->flag &= ~PTARGET_VALID;
}
else {
- if(pt->ob)
+ if (pt->ob)
kpsys = BLI_findlink(&pt->ob->particlesystem, pt->psys-1);
- if(kpsys)
+ if (kpsys)
pt->flag |= PTARGET_VALID;
else
pt->flag &= ~PTARGET_VALID;
@@ -333,7 +333,7 @@ static void rna_Particle_target_reset(Main *bmain, Scene *scene, PointerRNA *ptr
static void rna_Particle_target_redo(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- if(ptr->type==&RNA_ParticleTarget) {
+ if (ptr->type == &RNA_ParticleTarget) {
Object *ob = (Object*)ptr->id.data;
ParticleTarget *pt = (ParticleTarget*)ptr->data;
ParticleSystem *psys = rna_particle_system_for_target(ob, pt);
@@ -350,7 +350,7 @@ static void rna_Particle_hair_dynamics(Main *bmain, Scene *scene, PointerRNA *pt
Object *ob = (Object*)ptr->id.data;
ParticleSystem *psys = (ParticleSystem*)ptr->data;
- if(psys && !psys->clmd) {
+ if (psys && !psys->clmd) {
psys->clmd = (ClothModifierData*)modifier_new(eModifierType_Cloth);
psys->clmd->sim_parms->goalspring = 0.0f;
psys->clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_GOAL|CLOTH_SIMSETTINGS_FLAG_NO_SPRING_COMPRESS;
@@ -364,7 +364,7 @@ static void rna_Particle_hair_dynamics(Main *bmain, Scene *scene, PointerRNA *pt
}
static PointerRNA rna_particle_settings_get(PointerRNA *ptr)
{
- ParticleSystem *psys= (ParticleSystem*)ptr->data;
+ ParticleSystem *psys = (ParticleSystem*)ptr->data;
ParticleSettings *part = psys->part;
return rna_pointer_inherit_refine(ptr, &RNA_ParticleSettings, part);
@@ -372,21 +372,21 @@ static PointerRNA rna_particle_settings_get(PointerRNA *ptr)
static void rna_particle_settings_set(PointerRNA *ptr, PointerRNA value)
{
- ParticleSystem *psys= (ParticleSystem*)ptr->data;
+ ParticleSystem *psys = (ParticleSystem*)ptr->data;
int old_type = 0;
- if(psys->part) {
+ if (psys->part) {
old_type = psys->part->type;
psys->part->id.us--;
}
psys->part = (ParticleSettings *)value.data;
- if(psys->part) {
+ if (psys->part) {
psys->part->id.us++;
psys_check_boid_data(psys);
- if(old_type != psys->part->type)
+ if (old_type != psys->part->type)
psys->recalc |= PSYS_RECALC_TYPE;
}
}
@@ -394,7 +394,7 @@ static void rna_Particle_abspathtime_update(Main *bmain, Scene *scene, PointerRN
{
ParticleSettings *settings = (ParticleSettings*)ptr->data;
float delta = settings->end + settings->lifetime - settings->sta;
- if(settings->draw & PART_ABS_PATH_TIME) {
+ if (settings->draw & PART_ABS_PATH_TIME) {
settings->path_start = settings->sta + settings->path_start * delta;
settings->path_end = settings->sta + settings->path_end * delta;
}
@@ -409,12 +409,12 @@ static void rna_PartSettings_start_set(struct PointerRNA *ptr, float value)
ParticleSettings *settings = (ParticleSettings*)ptr->data;
/* check for clipping */
- if(value > settings->end)
+ if (value > settings->end)
value = settings->end;
- //if(settings->type==PART_REACTOR && value < 1.0)
- // value = 1.0;
- //else
+ /*if(settings->type==PART_REACTOR && value < 1.0) */
+ /* value = 1.0; */
+ /*else */
if (value < MINAFRAMEF)
value = MINAFRAMEF;
@@ -426,7 +426,7 @@ static void rna_PartSettings_end_set(struct PointerRNA *ptr, float value)
ParticleSettings *settings = (ParticleSettings*)ptr->data;
/* check for clipping */
- if(value < settings->sta)
+ if (value < settings->sta)
value = settings->sta;
settings->end = value;
@@ -473,13 +473,13 @@ static void rna_PartSetting_pathstartend_range(PointerRNA *ptr, float *min, floa
{
ParticleSettings *settings = (ParticleSettings*)ptr->data;
- if(settings->type==PART_HAIR) {
+ if (settings->type == PART_HAIR) {
*min = 0.0f;
*max = (settings->draw & PART_ABS_PATH_TIME) ? 100.0f : 1.0f;
}
else {
*min = (settings->draw & PART_ABS_PATH_TIME) ? settings->sta : 0.0f;
- *max= (settings->draw & PART_ABS_PATH_TIME) ? MAXFRAMEF : 1.0f;
+ *max = (settings->draw & PART_ABS_PATH_TIME) ? MAXFRAMEF : 1.0f;
}
}
static void rna_PartSetting_linelenhead_set(struct PointerRNA *ptr, float value)
@@ -497,15 +497,15 @@ static float rna_PartSetting_linelenhead_get(struct PointerRNA *ptr)
static int rna_PartSettings_is_fluid_get(PointerRNA *ptr)
{
- ParticleSettings *part= (ParticleSettings*)ptr->data;
+ ParticleSettings *part = (ParticleSettings*)ptr->data;
return part->type == PART_FLUID;
}
void rna_ParticleSystem_name_set(PointerRNA *ptr, const char *value)
{
- Object *ob= ptr->id.data;
- ParticleSystem *part= (ParticleSystem*)ptr->data;
+ Object *ob = ptr->id.data;
+ ParticleSystem *part = (ParticleSystem*)ptr->data;
/* copy the new name into the name slot */
BLI_strncpy_utf8(part->name, value, sizeof(part->name));
@@ -515,31 +515,31 @@ void rna_ParticleSystem_name_set(PointerRNA *ptr, const char *value)
static PointerRNA rna_ParticleSystem_active_particle_target_get(PointerRNA *ptr)
{
- ParticleSystem *psys= (ParticleSystem*)ptr->data;
+ ParticleSystem *psys = (ParticleSystem*)ptr->data;
ParticleTarget *pt = psys->targets.first;
- for(; pt; pt=pt->next) {
- if(pt->flag & PTARGET_CURRENT)
+ for (; pt; pt = pt->next) {
+ if (pt->flag & PTARGET_CURRENT)
return rna_pointer_inherit_refine(ptr, &RNA_ParticleTarget, pt);
}
return rna_pointer_inherit_refine(ptr, &RNA_ParticleTarget, NULL);
}
static void rna_ParticleSystem_active_particle_target_index_range(PointerRNA *ptr, int *min, int *max)
{
- ParticleSystem *psys= (ParticleSystem*)ptr->data;
- *min= 0;
- *max= BLI_countlist(&psys->targets)-1;
- *max= MAX2(0, *max);
+ ParticleSystem *psys = (ParticleSystem*)ptr->data;
+ *min = 0;
+ *max = BLI_countlist(&psys->targets)-1;
+ *max = MAX2(0, *max);
}
static int rna_ParticleSystem_active_particle_target_index_get(PointerRNA *ptr)
{
- ParticleSystem *psys= (ParticleSystem*)ptr->data;
+ ParticleSystem *psys = (ParticleSystem*)ptr->data;
ParticleTarget *pt = psys->targets.first;
- int i=0;
+ int i = 0;
- for(; pt; pt=pt->next, i++)
- if(pt->flag & PTARGET_CURRENT)
+ for (; pt; pt = pt->next, i++)
+ if (pt->flag & PTARGET_CURRENT)
return i;
return 0;
@@ -547,12 +547,12 @@ static int rna_ParticleSystem_active_particle_target_index_get(PointerRNA *ptr)
static void rna_ParticleSystem_active_particle_target_index_set(struct PointerRNA *ptr, int value)
{
- ParticleSystem *psys= (ParticleSystem*)ptr->data;
+ ParticleSystem *psys = (ParticleSystem*)ptr->data;
ParticleTarget *pt = psys->targets.first;
- int i=0;
+ int i = 0;
- for(; pt; pt=pt->next, i++) {
- if(i==value)
+ for (; pt; pt = pt->next, i++) {
+ if (i == value)
pt->flag |= PTARGET_CURRENT;
else
pt->flag &= ~PTARGET_CURRENT;
@@ -560,20 +560,20 @@ static void rna_ParticleSystem_active_particle_target_index_set(struct PointerRN
}
static int rna_ParticleTarget_name_length(PointerRNA *ptr)
{
- ParticleTarget *pt= ptr->data;
+ ParticleTarget *pt = ptr->data;
- if(pt->flag & PTARGET_VALID) {
+ if (pt->flag & PTARGET_VALID) {
ParticleSystem *psys = NULL;
- if(pt->ob)
+ if (pt->ob)
psys = BLI_findlink(&pt->ob->particlesystem, pt->psys-1);
else {
Object *ob = (Object*) ptr->id.data;
psys = BLI_findlink(&ob->particlesystem, pt->psys-1);
}
- if(psys) {
- if(pt->ob)
+ if (psys) {
+ if (pt->ob)
return strlen(pt->ob->id.name+2) + 2 + strlen(psys->name);
else
return strlen(psys->name);
@@ -587,20 +587,20 @@ static int rna_ParticleTarget_name_length(PointerRNA *ptr)
static void rna_ParticleTarget_name_get(PointerRNA *ptr, char *str)
{
- ParticleTarget *pt= ptr->data;
+ ParticleTarget *pt = ptr->data;
- if(pt->flag & PTARGET_VALID) {
+ if (pt->flag & PTARGET_VALID) {
ParticleSystem *psys = NULL;
- if(pt->ob)
+ if (pt->ob)
psys = BLI_findlink(&pt->ob->particlesystem, pt->psys-1);
else {
Object *ob = (Object*) ptr->id.data;
psys = BLI_findlink(&ob->particlesystem, pt->psys-1);
}
- if(psys) {
- if(pt->ob)
+ if (psys) {
+ if (pt->ob)
sprintf(str, "%s: %s", pt->ob->id.name+2, psys->name);
else
strcpy(str, psys->name);
@@ -614,7 +614,7 @@ static void rna_ParticleTarget_name_get(PointerRNA *ptr, char *str)
static int particle_id_check(PointerRNA *ptr)
{
- ID *id= ptr->id.data;
+ ID *id = ptr->id.data;
return (GS(id->name) == ID_PA);
}
@@ -623,7 +623,7 @@ static char *rna_SPHFluidSettings_path(PointerRNA *ptr)
{
SPHFluidSettings *fluid = (SPHFluidSettings *)ptr->data;
- if(particle_id_check(ptr)) {
+ if (particle_id_check(ptr)) {
ParticleSettings *part = (ParticleSettings*)ptr->id.data;
if (part->fluid == fluid)
@@ -634,52 +634,52 @@ static char *rna_SPHFluidSettings_path(PointerRNA *ptr)
static int rna_ParticleSystem_multiple_caches_get(PointerRNA *ptr)
{
- ParticleSystem *psys= (ParticleSystem*)ptr->data;
+ ParticleSystem *psys = (ParticleSystem*)ptr->data;
return (psys->ptcaches.first != psys->ptcaches.last);
}
static int rna_ParticleSystem_editable_get(PointerRNA *ptr)
{
- ParticleSystem *psys= (ParticleSystem*)ptr->data;
+ ParticleSystem *psys = (ParticleSystem*)ptr->data;
return psys_check_edited(psys);
}
static int rna_ParticleSystem_edited_get(PointerRNA *ptr)
{
- ParticleSystem *psys= (ParticleSystem*)ptr->data;
+ ParticleSystem *psys = (ParticleSystem*)ptr->data;
- if(psys->part && psys->part->type==PART_HAIR)
+ if (psys->part && psys->part->type == PART_HAIR)
return (psys->flag & PSYS_EDITED || (psys->edit && psys->edit->edited));
else
return (psys->pointcache->edit && psys->pointcache->edit->edited);
}
static PointerRNA rna_ParticleDupliWeight_active_get(PointerRNA *ptr)
{
- ParticleSettings *part= (ParticleSettings*)ptr->id.data;
+ ParticleSettings *part = (ParticleSettings*)ptr->id.data;
ParticleDupliWeight *dw = part->dupliweights.first;
- for(; dw; dw=dw->next) {
- if(dw->flag & PART_DUPLIW_CURRENT)
+ for (; dw; dw = dw->next) {
+ if (dw->flag & PART_DUPLIW_CURRENT)
return rna_pointer_inherit_refine(ptr, &RNA_ParticleDupliWeight, dw);
}
return rna_pointer_inherit_refine(ptr, &RNA_ParticleTarget, NULL);
}
static void rna_ParticleDupliWeight_active_index_range(PointerRNA *ptr, int *min, int *max)
{
- ParticleSettings *part= (ParticleSettings*)ptr->id.data;
- *min= 0;
- *max= BLI_countlist(&part->dupliweights)-1;
- *max= MAX2(0, *max);
+ ParticleSettings *part = (ParticleSettings*)ptr->id.data;
+ *min = 0;
+ *max = BLI_countlist(&part->dupliweights)-1;
+ *max = MAX2(0, *max);
}
static int rna_ParticleDupliWeight_active_index_get(PointerRNA *ptr)
{
- ParticleSettings *part= (ParticleSettings*)ptr->id.data;
+ ParticleSettings *part = (ParticleSettings*)ptr->id.data;
ParticleDupliWeight *dw = part->dupliweights.first;
- int i=0;
+ int i = 0;
- for(; dw; dw=dw->next, i++)
- if(dw->flag & PART_DUPLIW_CURRENT)
+ for (; dw; dw = dw->next, i++)
+ if (dw->flag & PART_DUPLIW_CURRENT)
return i;
return 0;
@@ -687,12 +687,12 @@ static int rna_ParticleDupliWeight_active_index_get(PointerRNA *ptr)
static void rna_ParticleDupliWeight_active_index_set(struct PointerRNA *ptr, int value)
{
- ParticleSettings *part= (ParticleSettings*)ptr->id.data;
+ ParticleSettings *part = (ParticleSettings*)ptr->id.data;
ParticleDupliWeight *dw = part->dupliweights.first;
- int i=0;
+ int i = 0;
- for(; dw; dw=dw->next, i++) {
- if(i==value)
+ for (; dw; dw = dw->next, i++) {
+ if (i == value)
dw->flag |= PART_DUPLIW_CURRENT;
else
dw->flag &= ~PART_DUPLIW_CURRENT;
@@ -710,9 +710,9 @@ static int rna_ParticleDupliWeight_name_length(PointerRNA *ptr)
static void rna_ParticleDupliWeight_name_get(PointerRNA *ptr, char *str)
{
- ParticleDupliWeight *dw= ptr->data;
+ ParticleDupliWeight *dw = ptr->data;
- if(dw->ob)
+ if (dw->ob)
sprintf(str, "%s: %i", dw->ob->id.name+2, dw->count);
else
strcpy(str, "No object");
@@ -720,9 +720,9 @@ static void rna_ParticleDupliWeight_name_get(PointerRNA *ptr, char *str)
static EnumPropertyItem *rna_Particle_from_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *UNUSED(free))
{
- //if(part->type==PART_REACTOR)
- // return part_reactor_from_items;
- //else
+ /*if(part->type==PART_REACTOR) */
+ /* return part_reactor_from_items; */
+ /*else */
return part_from_items;
}
@@ -730,7 +730,7 @@ static EnumPropertyItem *rna_Particle_dist_itemf(bContext *UNUSED(C), PointerRNA
{
ParticleSettings *part = ptr->id.data;
- if(part->type==PART_HAIR)
+ if (part->type == PART_HAIR)
return part_hair_dist_items;
else
return part_dist_items;
@@ -740,7 +740,7 @@ static EnumPropertyItem *rna_Particle_draw_as_itemf(bContext *UNUSED(C), Pointer
{
ParticleSettings *part = ptr->id.data;
- if(part->type==PART_HAIR)
+ if (part->type == PART_HAIR)
return part_hair_draw_as_items;
else
return part_draw_as_items;
@@ -750,7 +750,7 @@ static EnumPropertyItem *rna_Particle_ren_as_itemf(bContext *UNUSED(C), PointerR
{
ParticleSettings *part = ptr->id.data;
- if(part->type==PART_HAIR)
+ if (part->type == PART_HAIR)
return part_hair_ren_as_items;
else
return part_ren_as_items;
@@ -758,51 +758,51 @@ static EnumPropertyItem *rna_Particle_ren_as_itemf(bContext *UNUSED(C), PointerR
static PointerRNA rna_Particle_field1_get(PointerRNA *ptr)
{
- ParticleSettings *part= (ParticleSettings*)ptr->id.data;
+ ParticleSettings *part = (ParticleSettings*)ptr->id.data;
/* weak */
- if(!part->pd)
- part->pd= object_add_collision_fields(0);
+ if (!part->pd)
+ part->pd = object_add_collision_fields(0);
return rna_pointer_inherit_refine(ptr, &RNA_FieldSettings, part->pd);
}
static PointerRNA rna_Particle_field2_get(PointerRNA *ptr)
{
- ParticleSettings *part= (ParticleSettings*)ptr->id.data;
+ ParticleSettings *part = (ParticleSettings*)ptr->id.data;
/* weak */
- if(!part->pd2)
- part->pd2= object_add_collision_fields(0);
+ if (!part->pd2)
+ part->pd2 = object_add_collision_fields(0);
return rna_pointer_inherit_refine(ptr, &RNA_FieldSettings, part->pd2);
}
static void psys_vg_name_get__internal(PointerRNA *ptr, char *value, int index)
{
- Object *ob= ptr->id.data;
- ParticleSystem *psys= (ParticleSystem*)ptr->data;
+ Object *ob = ptr->id.data;
+ ParticleSystem *psys = (ParticleSystem*)ptr->data;
- if(psys->vgroup[index] > 0) {
- bDeformGroup *defGroup= BLI_findlink(&ob->defbase, psys->vgroup[index]-1);
+ if (psys->vgroup[index] > 0) {
+ bDeformGroup *defGroup = BLI_findlink(&ob->defbase, psys->vgroup[index]-1);
- if(defGroup) {
+ if (defGroup) {
strcpy(value, defGroup->name);
return;
}
}
- value[0]= '\0';
+ value[0] = '\0';
}
static int psys_vg_name_len__internal(PointerRNA *ptr, int index)
{
- Object *ob= ptr->id.data;
- ParticleSystem *psys= (ParticleSystem*)ptr->data;
+ Object *ob = ptr->id.data;
+ ParticleSystem *psys = (ParticleSystem*)ptr->data;
- if(psys->vgroup[index] > 0) {
- bDeformGroup *defGroup= BLI_findlink(&ob->defbase, psys->vgroup[index]-1);
+ if (psys->vgroup[index] > 0) {
+ bDeformGroup *defGroup = BLI_findlink(&ob->defbase, psys->vgroup[index]-1);
- if(defGroup) {
+ if (defGroup) {
return strlen(defGroup->name);
}
}
@@ -810,46 +810,46 @@ static int psys_vg_name_len__internal(PointerRNA *ptr, int index)
}
static void psys_vg_name_set__internal(PointerRNA *ptr, const char *value, int index)
{
- Object *ob= ptr->id.data;
- ParticleSystem *psys= (ParticleSystem*)ptr->data;
+ Object *ob = ptr->id.data;
+ ParticleSystem *psys = (ParticleSystem*)ptr->data;
- if(value[0]=='\0') {
- psys->vgroup[index]= 0;
+ if (value[0] =='\0') {
+ psys->vgroup[index] = 0;
}
else {
int vgroup_num = defgroup_name_index(ob, value);
- if(vgroup_num == -1)
+ if (vgroup_num == -1)
return;
- psys->vgroup[index]= vgroup_num + 1;
+ psys->vgroup[index] = vgroup_num + 1;
}
}
static char *rna_ParticleSystem_path(PointerRNA *ptr)
{
- ParticleSystem *psys= (ParticleSystem*)ptr->data;
+ ParticleSystem *psys = (ParticleSystem*)ptr->data;
return BLI_sprintfN("particle_systems[\"%s\"]", psys->name);
}
static void rna_ParticleSettings_mtex_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- ParticleSettings *part= (ParticleSettings*)ptr->data;
+ ParticleSettings *part = (ParticleSettings*)ptr->data;
rna_iterator_array_begin(iter, (void*)part->mtex, sizeof(MTex*), MAX_MTEX, 0, NULL);
}
static PointerRNA rna_ParticleSettings_active_texture_get(PointerRNA *ptr)
{
- ParticleSettings *part= (ParticleSettings*)ptr->data;
+ ParticleSettings *part = (ParticleSettings*)ptr->data;
Tex *tex;
- tex= give_current_particle_texture(part);
+ tex = give_current_particle_texture(part);
return rna_pointer_inherit_refine(ptr, &RNA_Texture, tex);
}
static void rna_ParticleSettings_active_texture_set(PointerRNA *ptr, PointerRNA value)
{
- ParticleSettings *part= (ParticleSettings*)ptr->data;
+ ParticleSettings *part = (ParticleSettings*)ptr->data;
set_current_particle_texture(part, value.data);
}
@@ -906,19 +906,19 @@ static void rna_def_particle_hair_key(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "HairKey");
RNA_def_struct_ui_text(srna, "Particle Hair Key", "Particle key for hair particle system");
- prop= RNA_def_property(srna, "time", PROP_FLOAT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "time", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_ui_text(prop, "Time", "Relative time of key over hair length");
- prop= RNA_def_property(srna, "weight", PROP_FLOAT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "weight", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Weight", "Weight for cloth simulation");
- prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Location (Object Space)", "Location of the hair key in object space");
RNA_def_property_float_funcs(prop, "rna_ParticleHairKey_location_object_get", "rna_ParticleHairKey_location_object_set", NULL);
- prop= RNA_def_property(srna, "co_hair_space", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "co_hair_space", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "co");
RNA_def_property_ui_text(prop, "Location", "Location of the hair key in its internal coordinate system, relative to the emitting face");
}
@@ -931,40 +931,40 @@ static void rna_def_particle_key(BlenderRNA *brna)
srna = RNA_def_struct(brna, "ParticleKey", NULL);
RNA_def_struct_ui_text(srna, "Particle Key", "Key location for a particle over time");
- prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "co");
RNA_def_property_ui_text(prop, "Location", "Key location");
- prop= RNA_def_property(srna, "velocity", PROP_FLOAT, PROP_VELOCITY);
+ prop = RNA_def_property(srna, "velocity", PROP_FLOAT, PROP_VELOCITY);
RNA_def_property_float_sdna(prop, NULL, "vel");
RNA_def_property_ui_text(prop, "Velocity", "Key velocity");
- prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_QUATERNION);
+ prop = RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_QUATERNION);
RNA_def_property_float_sdna(prop, NULL, "rot");
RNA_def_property_ui_text(prop, "Rotation", "Key rotation quaternion");
- prop= RNA_def_property(srna, "angular_velocity", PROP_FLOAT, PROP_VELOCITY);
+ prop = RNA_def_property(srna, "angular_velocity", PROP_FLOAT, PROP_VELOCITY);
RNA_def_property_float_sdna(prop, NULL, "ave");
RNA_def_property_ui_text(prop, "Angular Velocity", "Key angular velocity");
- prop= RNA_def_property(srna, "time", PROP_FLOAT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "time", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_ui_text(prop, "Time", "Time of key over the simulation");
}
static void rna_def_child_particle(BlenderRNA *brna)
{
StructRNA *srna;
- //PropertyRNA *prop;
+ /*PropertyRNA *prop; */
srna = RNA_def_struct(brna, "ChildParticle", NULL);
RNA_def_struct_ui_text(srna, "Child Particle", "Child particle interpolated from simulated or edited particles");
-// int num, parent; /* num is face index on the final derived mesh */
+/* int num, parent; *//* num is face index on the final derived mesh */
-// int pa[4]; /* nearest particles to the child, used for the interpolation */
-// float w[4]; /* interpolation weights for the above particles */
-// float fuv[4], foffset; /* face vertex weights and offset */
-// float rand[3];
+/* int pa[4]; *//* nearest particles to the child, used for the interpolation */
+/* float w[4]; *//* interpolation weights for the above particles */
+/* float fuv[4], foffset; *//* face vertex weights and offset */
+/* float rand[3]; */
}
static void rna_def_particle(BlenderRNA *brna)
@@ -973,7 +973,7 @@ static void rna_def_particle(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem alive_items[] = {
- //{PARS_KILLED, "KILLED", 0, "Killed", ""},
+ /*{PARS_KILLED, "KILLED", 0, "Killed", ""}, */
{PARS_DEAD, "DEAD", 0, "Dead", ""},
{PARS_UNBORN, "UNBORN", 0, "Unborn", ""},
{PARS_ALIVE, "ALIVE", 0, "Alive", ""},
@@ -986,95 +986,95 @@ static void rna_def_particle(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Particle", "Particle in a particle system");
/* Particle State & Previous State */
- prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "state.co");
RNA_def_property_ui_text(prop, "Particle Location", "");
- prop= RNA_def_property(srna, "velocity", PROP_FLOAT, PROP_VELOCITY);
+ prop = RNA_def_property(srna, "velocity", PROP_FLOAT, PROP_VELOCITY);
RNA_def_property_float_sdna(prop, NULL, "state.vel");
RNA_def_property_ui_text(prop, "Particle Velocity", "");
- prop= RNA_def_property(srna, "angular_velocity", PROP_FLOAT, PROP_VELOCITY);
+ prop = RNA_def_property(srna, "angular_velocity", PROP_FLOAT, PROP_VELOCITY);
RNA_def_property_float_sdna(prop, NULL, "state.ave");
RNA_def_property_ui_text(prop, "Angular Velocity", "");
- prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_QUATERNION);
+ prop = RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_QUATERNION);
RNA_def_property_float_sdna(prop, NULL, "state.rot");
RNA_def_property_ui_text(prop, "Rotation", "");
- prop= RNA_def_property(srna, "prev_location", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "prev_location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "prev_state.co");
RNA_def_property_ui_text(prop, "Previous Particle Location", "");
- prop= RNA_def_property(srna, "prev_velocity", PROP_FLOAT, PROP_VELOCITY);
+ prop = RNA_def_property(srna, "prev_velocity", PROP_FLOAT, PROP_VELOCITY);
RNA_def_property_float_sdna(prop, NULL, "prev_state.vel");
RNA_def_property_ui_text(prop, "Previous Particle Velocity", "");
- prop= RNA_def_property(srna, "prev_angular_velocity", PROP_FLOAT, PROP_VELOCITY);
+ prop = RNA_def_property(srna, "prev_angular_velocity", PROP_FLOAT, PROP_VELOCITY);
RNA_def_property_float_sdna(prop, NULL, "prev_state.ave");
RNA_def_property_ui_text(prop, "Previous Angular Velocity", "");
- prop= RNA_def_property(srna, "prev_rotation", PROP_FLOAT, PROP_QUATERNION);
+ prop = RNA_def_property(srna, "prev_rotation", PROP_FLOAT, PROP_QUATERNION);
RNA_def_property_float_sdna(prop, NULL, "prev_state.rot");
RNA_def_property_ui_text(prop, "Previous Rotation", "");
/* Hair & Keyed Keys */
- prop= RNA_def_property(srna, "hair_keys", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "hair_keys", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "hair", "totkey");
RNA_def_property_struct_type(prop, "ParticleHairKey");
RNA_def_property_ui_text(prop, "Hair", "");
- prop= RNA_def_property(srna, "particle_keys", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "particle_keys", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "keys", "totkey");
RNA_def_property_struct_type(prop, "ParticleKey");
RNA_def_property_ui_text(prop, "Keyed States", "");
-//
-// float fuv[4], foffset; /* coordinates on face/edge number "num" and depth along*/
-// /* face normal for volume emission */
+/* */
+/* float fuv[4], foffset; *//* coordinates on face/edge number "num" and depth along*/
+/* *//* face normal for volume emission */
- prop= RNA_def_property(srna, "birth_time", PROP_FLOAT, PROP_TIME);
+ prop = RNA_def_property(srna, "birth_time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "time");
-// RNA_def_property_range(prop, lowerLimitf, upperLimitf);
+/* RNA_def_property_range(prop, lowerLimitf, upperLimitf); */
RNA_def_property_ui_text(prop, "Birth Time", "");
- prop= RNA_def_property(srna, "lifetime", PROP_FLOAT, PROP_TIME);
-// RNA_def_property_range(prop, lowerLimitf, upperLimitf);
+ prop = RNA_def_property(srna, "lifetime", PROP_FLOAT, PROP_TIME);
+/* RNA_def_property_range(prop, lowerLimitf, upperLimitf); */
RNA_def_property_ui_text(prop, "Lifetime", "");
- prop= RNA_def_property(srna, "die_time", PROP_FLOAT, PROP_TIME);
+ prop = RNA_def_property(srna, "die_time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "dietime");
-// RNA_def_property_range(prop, lowerLimitf, upperLimitf);
+/* RNA_def_property_range(prop, lowerLimitf, upperLimitf); */
RNA_def_property_ui_text(prop, "Die Time", "");
- prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
-// RNA_def_property_range(prop, lowerLimitf, upperLimitf);
+ prop = RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
+/* RNA_def_property_range(prop, lowerLimitf, upperLimitf); */
RNA_def_property_ui_text(prop, "Size", "");
-//
-// int num; /* index to vert/edge/face */
-// int num_dmcache; /* index to derived mesh data (face) to avoid slow lookups */
-// int pad;
-//
-// int totkey;
+/* */
+/* int num; *//* index to vert/edge/face */
+/* int num_dmcache; *//* index to derived mesh data (face) to avoid slow lookups */
+/* int pad; */
+/* */
+/* int totkey; */
/* flag */
- prop= RNA_def_property(srna, "is_exist", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_exist", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", PARS_UNEXIST);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Exists", "");
- prop= RNA_def_property(srna, "is_visible", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_visible", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", PARS_NO_DISP);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Visible", "");
- prop= RNA_def_property(srna, "alive_state", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "alive_state", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "alive");
RNA_def_property_enum_items(prop, alive_items);
RNA_def_property_ui_text(prop, "Alive State", "");
-// short rt2;
+/* short rt2; */
}
static void rna_def_particle_dupliweight(BlenderRNA *brna)
@@ -1086,13 +1086,13 @@ static void rna_def_particle_dupliweight(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Particle Dupliobject Weight", "Weight of a particle dupliobject in a group");
RNA_def_struct_sdna(srna, "ParticleDupliWeight");
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ParticleDupliWeight_name_get", "rna_ParticleDupliWeight_name_length", NULL);
RNA_def_property_ui_text(prop, "Name", "Particle dupliobject name");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_struct_name_property(srna, prop);
- prop= RNA_def_property(srna, "count", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "count", PROP_INT, PROP_UNSIGNED);
RNA_def_property_range(prop, 0, SHRT_MAX);
RNA_def_property_ui_text(prop, "Count", "The number of times this object is repeated with respect to other objects");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
@@ -1108,61 +1108,61 @@ static void rna_def_fluid_settings(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "SPH Fluid Settings", "Settings for particle fluids physics");
/* Fluid settings */
- prop= RNA_def_property(srna, "spring_force", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "spring_force", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "spring_k");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
RNA_def_property_ui_text(prop, "Spring Force", "Spring force");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "fluid_radius", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "fluid_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "radius");
RNA_def_property_range(prop, 0.0f, 20.0f);
RNA_def_property_ui_range(prop, 0.0f, 2.0f, 1, 3);
RNA_def_property_ui_text(prop, "Interaction Radius", "Fluid interaction radius");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "rest_length", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "rest_length", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 2.0f);
RNA_def_property_ui_text(prop, "Rest Length", "Spring rest length (factor of particle radius)");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "use_viscoelastic_springs", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_viscoelastic_springs", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SPH_VISCOELASTIC_SPRINGS);
RNA_def_property_ui_text(prop, "Viscoelastic Springs", "Use viscoelastic springs instead of Hooke's springs");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "use_initial_rest_length", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_initial_rest_length", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SPH_CURRENT_REST_LENGTH);
RNA_def_property_ui_text(prop, "Initial Rest Length", "Use the initial length as spring rest length instead of 2 * particle size");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "plasticity", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "plasticity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "plasticity_constant");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Plasticity", "How much the spring rest length can change after the elastic limit is crossed");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "yield_ratio", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "yield_ratio", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yield_ratio");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Elastic Limit", "How much the spring has to be stretched/compressed in order to change it's rest length");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "spring_frames", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "spring_frames", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Spring Frames", "Create springs for this number of frames since particles birth (0 is always)");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
/* Viscosity */
- prop= RNA_def_property(srna, "linear_viscosity", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "linear_viscosity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "viscosity_omega");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
RNA_def_property_ui_text(prop, "Viscosity", "Linear viscosity");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "stiff_viscosity", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "stiff_viscosity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "viscosity_beta");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_range(prop, 0.0f, 2.0f, 1, 3);
@@ -1170,21 +1170,21 @@ static void rna_def_fluid_settings(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Particle_reset");
/* Double density relaxation */
- prop= RNA_def_property(srna, "stiffness", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "stiffness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "stiffness_k");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
RNA_def_property_ui_text(prop, "Stiffness", "How incompressible the fluid is");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "repulsion", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "repulsion", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "stiffness_knear");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_range(prop, 0.0f, 2.0f, 1, 3);
RNA_def_property_ui_text(prop, "Repulsion Factor", "How strongly the fluid tries to keep from clustering (factor of stiffness)");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "rest_density", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "rest_density", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rest_density");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_range(prop, 0.0f, 2.0f, 1, 3);
@@ -1192,7 +1192,7 @@ static void rna_def_fluid_settings(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Particle_reset");
/* Buoyancy */
- prop= RNA_def_property(srna, "buoyancy", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "buoyancy", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "buoyancy");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 1, 3);
@@ -1201,27 +1201,27 @@ static void rna_def_fluid_settings(BlenderRNA *brna)
/* Factor flags */
- prop= RNA_def_property(srna, "factor_repulsion", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "factor_repulsion", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SPH_FAC_REPULSION);
RNA_def_property_ui_text(prop, "Factor Repulsion", "Repulsion is a factor of stiffness");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "factor_density", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "factor_density", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SPH_FAC_DENSITY);
RNA_def_property_ui_text(prop, "Factor Density", "Density is calculated as a factor of default density (depends on particle size)");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "factor_radius", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "factor_radius", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SPH_FAC_RADIUS);
RNA_def_property_ui_text(prop, "Factor Radius", "Interaction radius is a factor of 4 * particle size");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "factor_stiff_viscosity", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "factor_stiff_viscosity", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SPH_FAC_VISCOSITY);
RNA_def_property_ui_text(prop, "Factor Stiff Viscosity", "Stiff viscosity is a factor of normal viscosity");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "factor_rest_length", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "factor_rest_length", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SPH_FAC_REST_LENGTH);
RNA_def_property_ui_text(prop, "Factor Rest Length", "Spring rest length is a factor of 2 * particle size");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
@@ -1268,183 +1268,183 @@ static void rna_def_particle_settings_mtex(BlenderRNA *brna)
{3, "Z", 0, "Z", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "ParticleSettingsTextureSlot", "TextureSlot");
+ srna = RNA_def_struct(brna, "ParticleSettingsTextureSlot", "TextureSlot");
RNA_def_struct_sdna(srna, "MTex");
RNA_def_struct_ui_text(srna, "Particle Settings Texture Slot", "Texture slot for textures in a Particle Settings datablock");
- prop= RNA_def_property(srna, "texture_coords", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "texture_coords", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "texco");
RNA_def_property_enum_items(prop, texco_items);
RNA_def_property_ui_text(prop, "Texture Coordinates", "Texture coordinates used to map the texture onto the background");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "object");
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object", "Object to use for mapping with Object texture coordinates");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "uvname");
RNA_def_property_ui_text(prop, "UV Map", "UV map to use for mapping with UV texture coordinates");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "mapping_x", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mapping_x", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "projx");
RNA_def_property_enum_items(prop, prop_x_mapping_items);
RNA_def_property_ui_text(prop, "X Mapping", "");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "mapping_y", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mapping_y", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "projy");
RNA_def_property_enum_items(prop, prop_y_mapping_items);
RNA_def_property_ui_text(prop, "Y Mapping", "");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "mapping_z", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mapping_z", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "projz");
RNA_def_property_enum_items(prop, prop_z_mapping_items);
RNA_def_property_ui_text(prop, "Z Mapping", "");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "mapping", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mapping", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_mapping_items);
RNA_def_property_ui_text(prop, "Mapping", "");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
/* map to */
- prop= RNA_def_property(srna, "use_map_time", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_time", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", PAMAP_TIME);
RNA_def_property_ui_text(prop, "Emission Time", "Affect the emission time of the particles");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "use_map_life", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_life", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", PAMAP_LIFE);
RNA_def_property_ui_text(prop, "Life Time", "Affect the life time of the particles");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "use_map_density", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_density", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", PAMAP_DENS);
RNA_def_property_ui_text(prop, "Density", "Affect the density of the particles");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "use_map_size", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_size", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", PAMAP_SIZE);
RNA_def_property_ui_text(prop, "Size", "Affect the particle size");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "use_map_velocity", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_velocity", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", PAMAP_IVEL);
RNA_def_property_ui_text(prop, "Initial Velocity", "Affect the particle initial velocity");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "use_map_field", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_field", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", PAMAP_FIELD);
RNA_def_property_ui_text(prop, "Force Field", "Affect the particle force fields");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "use_map_gravity", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_gravity", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", PAMAP_GRAVITY);
RNA_def_property_ui_text(prop, "Gravity", "Affect the particle gravity");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "use_map_damp", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_damp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", PAMAP_DAMP);
RNA_def_property_ui_text(prop, "Damp", "Affect the particle velocity damping");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "use_map_clump", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_clump", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", PAMAP_CLUMP);
RNA_def_property_ui_text(prop, "Clump", "Affect the child clumping");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "use_map_kink", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_kink", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", PAMAP_KINK);
RNA_def_property_ui_text(prop, "Kink", "Affect the child kink");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "use_map_rough", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_rough", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", PAMAP_ROUGH);
RNA_def_property_ui_text(prop, "Rough", "Affect the child rough");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "use_map_length", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_length", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", PAMAP_LENGTH);
RNA_def_property_ui_text(prop, "Length", "Affect the child hair length");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
/* influence factors */
- prop= RNA_def_property(srna, "time_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "time_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "timefac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Emission Time Factor", "Amount texture affects particle emission time");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "life_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "life_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "lifefac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Life Time Factor", "Amount texture affects particle life time");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "density_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "density_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "padensfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Density Factor", "Amount texture affects particle density");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "size_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "size_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sizefac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Size Factor", "Amount texture affects physical particle size");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "velocity_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "velocity_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ivelfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Velocity Factor", "Amount texture affects particle initial velocity");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "field_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "field_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fieldfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Field Factor", "Amount texture affects particle force fields");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "gravity_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "gravity_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "gravityfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Gravity Factor", "Amount texture affects particle gravity");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "damp_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "damp_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dampfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Damp Factor", "Amount texture affects particle damping");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "length_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "length_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "lengthfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Length Factor", "Amount texture affects child hair length");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "clump_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "clump_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clumpfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Clump Factor", "Amount texture affects child clump");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "kink_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "kink_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "kinkfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Kink Factor", "Amount texture affects child kink");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "rough_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "rough_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "roughfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Rough Factor", "Amount texture affects child roughness");
@@ -1458,7 +1458,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
static EnumPropertyItem type_items[] = {
{PART_EMITTER, "EMITTER", 0, "Emitter", ""},
- //{PART_REACTOR, "REACTOR", 0, "Reactor", ""},
+ /*{PART_REACTOR, "REACTOR", 0, "Reactor", ""}, */
{PART_HAIR, "HAIR", 0, "Hair", ""},
{0, NULL, 0, NULL, NULL}
};
@@ -1506,7 +1506,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- //TODO: names, tooltips
+ /*TODO: names, tooltips */
#if 0
static EnumPropertyItem rot_from_items[] = {
{PART_ROT_KEYS, "KEYS", 0, "keys", ""},
@@ -1571,7 +1571,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- srna= RNA_def_struct(brna, "ParticleSettings", "ID");
+ srna = RNA_def_struct(brna, "ParticleSettings", "ID");
RNA_def_struct_ui_text(srna, "Particle Settings", "Particle settings, reusable by multiple particle systems");
RNA_def_struct_ui_icon(srna, ICON_PARTICLE_DATA);
@@ -1579,129 +1579,129 @@ static void rna_def_particle_settings(BlenderRNA *brna)
"rna_ParticleSettings_active_texture_set", NULL, "ParticleSettingsTextureSlot", "ParticleSettingsTextureSlots", "rna_Particle_reset");
/* fluid particle type can't be checked from the type value in rna as it's not shown in the menu */
- prop= RNA_def_property(srna, "is_fluid", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_fluid", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_PartSettings_is_fluid_get", NULL);
RNA_def_property_ui_text(prop, "Fluid", "Particles were created by a fluid simulation");
/* flag */
- prop= RNA_def_property(srna, "use_react_start_end", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_react_start_end", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_REACT_STA_END);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Start/End", "Give birth to unreacted particles eventually");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "use_react_multiple", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_react_multiple", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_REACT_MULTIPLE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
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);
+ 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);
+ 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");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "use_dead", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_dead", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_DIED);
RNA_def_property_ui_text(prop, "Died", "Show particles after they have died");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "use_emit_random", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_emit_random", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_TRAND);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Random", "Emit in random order of elements");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "use_even_distribution", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_even_distribution", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_EDISTR);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Even Distribution", "Use even distribution from faces based on face areas or edge lengths");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "use_die_on_collision", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_die_on_collision", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_DIE_ON_COL);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Die on hit", "Particles die when they collide with a deflector object");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "use_size_deflect", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_size_deflect", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_SIZE_DEFL);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Size Deflect", "Use particle's size in deflection");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "use_dynamic_rotation", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_dynamic_rotation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_ROT_DYN);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Dynamic", "Set rotation to dynamic/constant");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "use_multiply_size_mass", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_multiply_size_mass", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_SIZEMASS);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Mass from Size", "Multiply mass by particle size");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "use_advanced_hair", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_advanced_hair", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", PART_HIDE_ADVANCED_HAIR);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Advanced", "Use full physics calculations for growing hair");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "lock_boids_to_surface", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_boids_to_surface", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_BOIDS_2D);
RNA_def_property_ui_text(prop, "Boids 2D", "Constrain boids to a surface");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "use_hair_bspline", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_hair_bspline", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_HAIR_BSPLINE);
RNA_def_property_ui_text(prop, "B-Spline", "Interpolate hair using B-Splines");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "invert_grid", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_grid", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_GRID_INVERT);
RNA_def_property_ui_text(prop, "Invert Grid", "Invert what is considered object and what is not");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "hexagonal_grid", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "hexagonal_grid", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_GRID_HEXAGONAL);
RNA_def_property_ui_text(prop, "Hexagonal Grid", "Create the grid in a hexagonal pattern");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "apply_effector_to_children", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "apply_effector_to_children", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_CHILD_EFFECT);
RNA_def_property_ui_text(prop, "Effect Children", "Apply effectors to children");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "create_long_hair_children", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "create_long_hair_children", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_CHILD_LONG_HAIR);
RNA_def_property_ui_text(prop, "Long Hair", "Calculate children that suit long hair well");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "apply_guide_to_children", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "apply_guide_to_children", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_CHILD_GUIDE);
RNA_def_property_ui_text(prop, "apply_guide_to_children", "");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "use_self_effect", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_self_effect", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_SELF_EFFECT);
RNA_def_property_ui_text(prop, "Self Effect", "Particle effectors effect themselves");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, type_items);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Type", "Particle Type");
RNA_def_property_update(prop, 0, "rna_Particle_change_type");
- prop= RNA_def_property(srna, "emit_from", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "emit_from", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "from");
RNA_def_property_enum_items(prop, part_reactor_from_items);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
@@ -1709,7 +1709,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Emit From", "Where to emit particles from");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "distribution", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "distribution", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "distr");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, part_dist_items);
@@ -1719,28 +1719,28 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Particle_reset");
/* physics modes */
- prop= RNA_def_property(srna, "physics_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "physics_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "phystype");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, phys_type_items);
RNA_def_property_ui_text(prop, "Physics Type", "Particle physics type");
RNA_def_property_update(prop, 0, "rna_Particle_change_physics");
- prop= RNA_def_property(srna, "rotation_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "rotation_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "rotmode");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, rot_mode_items);
RNA_def_property_ui_text(prop, "Rotation", "Particle rotation axis");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "angular_velocity_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "angular_velocity_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "avemode");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, ave_mode_items);
RNA_def_property_ui_text(prop, "Angular Velocity Mode", "Particle angular velocity mode");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "react_event", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "react_event", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "reactevent");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, react_event_items);
@@ -1748,232 +1748,232 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Particle_reset");
/*draw flag*/
- prop= RNA_def_property(srna, "show_velocity", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_velocity", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_VEL);
RNA_def_property_ui_text(prop, "Velocity", "Show particle velocity");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "show_size", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_size", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_SIZE);
RNA_def_property_ui_text(prop, "Size", "Show particle size");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "use_render_emitter", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_render_emitter", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_EMITTER);
RNA_def_property_ui_text(prop, "Emitter", "Render emitter Object also");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "show_health", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_health", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_HEALTH);
RNA_def_property_ui_text(prop, "Health", "Draw boid health");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "use_absolute_path_time", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_absolute_path_time", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_ABS_PATH_TIME);
RNA_def_property_ui_text(prop, "Absolute Path Time", "Path timing is in absolute frames");
RNA_def_property_update(prop, 0, "rna_Particle_abspathtime_update");
- prop= RNA_def_property(srna, "use_parent_particles", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_parent_particles", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_PARENT);
RNA_def_property_ui_text(prop, "Parents", "Render parent particles");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "show_number", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_number", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_NUM);
RNA_def_property_ui_text(prop, "Number", "Show particle number");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "use_group_pick_random", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_group_pick_random", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_RAND_GR);
RNA_def_property_ui_text(prop, "Pick Random", "Pick objects from group randomly");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "use_group_count", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_group_count", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_COUNT_GR);
RNA_def_property_ui_text(prop, "Use Count", "Use object multiple times in the same group");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "use_global_dupli", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_global_dupli", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_GLOBAL_OB);
RNA_def_property_ui_text(prop, "Global", "Use object's global coordinates for duplication");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "use_rotation_dupli", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_rotation_dupli", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_ROTATE_OB);
RNA_def_property_ui_text(prop, "Rotation", "Use object's rotation for duplication (global x-axis is aligned particle rotation axis)");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "use_render_adaptive", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_render_adaptive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_REN_ADAPT);
RNA_def_property_ui_text(prop, "Adaptive render", "Draw steps of the particle path");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "use_velocity_length", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_velocity_length", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_VEL_LENGTH);
RNA_def_property_ui_text(prop, "Speed", "Multiply line length by particle speed");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "use_whole_group", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_whole_group", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_WHOLE_GR);
RNA_def_property_ui_text(prop, "Whole Group", "Use whole group at once");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "use_strand_primitive", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_strand_primitive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_REN_STRAND);
RNA_def_property_ui_text(prop, "Strand render", "Use the strand primitive for rendering");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "draw_method", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "draw_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "draw_as");
RNA_def_property_enum_items(prop, part_draw_as_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Particle_draw_as_itemf");
RNA_def_property_ui_text(prop, "Particle Drawing", "How particles are drawn in viewport");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "render_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "render_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ren_as");
RNA_def_property_enum_items(prop, part_ren_as_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Particle_ren_as_itemf");
RNA_def_property_ui_text(prop, "Particle Rendering", "How particles are rendered");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "draw_color", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "draw_color", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "draw_col");
RNA_def_property_enum_items(prop, draw_col_items);
RNA_def_property_ui_text(prop, "Draw Color", "Draw additional particle data as a color");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "draw_size", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "draw_size", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 1000);
RNA_def_property_ui_range(prop, 0, 100, 1, 0);
RNA_def_property_ui_text(prop, "Draw Size", "Size of particles on viewport in pixels (0=default)");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "child_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "child_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "childtype");
RNA_def_property_enum_items(prop, child_type_items);
RNA_def_property_ui_text(prop, "Children From", "Create child particles");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "draw_step", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "draw_step", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_range(prop, 0, 7, 1, 0);
RNA_def_property_ui_text(prop, "Steps", "How many steps paths are drawn with (power of 2)");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "render_step", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "render_step", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ren_step");
RNA_def_property_range(prop, 0, 20);
RNA_def_property_ui_range(prop, 0, 9, 1, 0);
RNA_def_property_ui_text(prop, "Render", "How many steps paths are rendered with (power of 2)");
- prop= RNA_def_property(srna, "hair_step", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "hair_step", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 2, 50);
RNA_def_property_ui_text(prop, "Segments", "Number of hair segments");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- //TODO: not found in UI, readonly?
- prop= RNA_def_property(srna, "keys_step", PROP_INT, PROP_NONE);
- RNA_def_property_range(prop, 0, SHRT_MAX);//TODO:min,max
+ /*TODO: not found in UI, readonly? */
+ prop = RNA_def_property(srna, "keys_step", PROP_INT, PROP_NONE);
+ RNA_def_property_range(prop, 0, SHRT_MAX);/*TODO:min,max */
RNA_def_property_ui_text(prop, "Keys Step", "");
/* adaptive path rendering */
- prop= RNA_def_property(srna, "adaptive_angle", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "adaptive_angle", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "adapt_angle");
RNA_def_property_range(prop, 0, 45);
RNA_def_property_ui_text(prop, "Degrees", "How many degrees path has to curve to make another render segment");
- prop= RNA_def_property(srna, "adaptive_pixel", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "adaptive_pixel", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "adapt_pix");
RNA_def_property_range(prop, 0, 50);
RNA_def_property_ui_text(prop, "Pixel", "How many pixels path has to cover to make another render segment");
- prop= RNA_def_property(srna, "draw_percentage", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "draw_percentage", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "disp");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Display", "Percentage of particles to display in 3D view");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "material", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "material", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "omat");
RNA_def_property_range(prop, 1, 32767);
RNA_def_property_ui_text(prop, "Material", "Material used for the particles");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- // not used anywhere, why is this in DNA???
+ /* not used anywhere, why is this in DNA??? */
#if 0
- prop= RNA_def_property(srna, "rotate_from", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "rotate_from", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "rotfrom");
RNA_def_property_enum_items(prop, rot_from_items);
RNA_def_property_ui_text(prop, "Rotate From", "");
#endif
- prop= RNA_def_property(srna, "integrator", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "integrator", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, integrator_type_items);
RNA_def_property_ui_text(prop, "Integration",
"Algorithm used to calculate physics, from the fastest to the "
"most stable/accurate: Midpoint, Euler, Verlet, RK4 (Old)");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "kink", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "kink", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, kink_type_items);
RNA_def_property_ui_text(prop, "Kink", "Type of periodic offset on the path");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "kink_axis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "kink_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, kink_axis_items);
RNA_def_property_ui_text(prop, "Axis", "Which axis to use for offset");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
/* billboards */
- prop= RNA_def_property(srna, "lock_billboard", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_billboard", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_BB_LOCK);
RNA_def_property_ui_text(prop, "Lock Billboard", "Lock the billboards align axis");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "billboard_align", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "billboard_align", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "bb_align");
RNA_def_property_enum_items(prop, bb_align_items);
RNA_def_property_ui_text(prop, "Align to", "In respect to what the billboards are aligned");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "billboard_uv_split", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "billboard_uv_split", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "bb_uv_split");
RNA_def_property_range(prop, 1, 100);
RNA_def_property_ui_range(prop, 1, 10, 1, 0);
RNA_def_property_ui_text(prop, "UV Split", "Number of rows/columns to split UV coordinates for billboards");
- prop= RNA_def_property(srna, "billboard_animation", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "billboard_animation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "bb_anim");
RNA_def_property_enum_items(prop, bb_anim_items);
RNA_def_property_ui_text(prop, "Animate", "How to animate billboard textures");
- prop= RNA_def_property(srna, "billboard_offset_split", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "billboard_offset_split", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "bb_split_offset");
RNA_def_property_enum_items(prop, bb_split_offset_items);
RNA_def_property_ui_text(prop, "Offset", "How to offset billboard textures");
- prop= RNA_def_property(srna, "billboard_tilt", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "billboard_tilt", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bb_tilt");
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Tilt", "Tilt of the billboards");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "color_maximum", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "color_maximum", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "color_vec_max");
RNA_def_property_range(prop, 0.01f, 100.0f);
RNA_def_property_ui_text(prop, "Color Maximum", "Maximum length of the particle color vector");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "billboard_tilt_random", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "billboard_tilt_random", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bb_rand_tilt");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random Tilt", "Random tilt of the billboards");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "billboard_offset", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "billboard_offset", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "bb_offset");
RNA_def_property_array(prop, 2);
RNA_def_property_range(prop, -100.0f, 100.0f);
@@ -1981,61 +1981,61 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Billboard Offset", "");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "billboard_size", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "billboard_size", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "bb_size");
RNA_def_property_array(prop, 2);
RNA_def_property_range(prop, 0.001f, 10.0f);
RNA_def_property_ui_text(prop, "Billboard Scale", "Scale billboards relative to particle size");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "billboard_velocity_head", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "billboard_velocity_head", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "bb_vel_head");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Billboard Velocity Head", "Scale billboards by velocity");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "billboard_velocity_tail", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "billboard_velocity_tail", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "bb_vel_tail");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Billboard Velocity Tail", "Scale billboards by velocity");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
/* simplification */
- prop= RNA_def_property(srna, "use_simplify", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_simplify", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "simplify_flag", PART_SIMPLIFY_ENABLE);
RNA_def_property_ui_text(prop, "Child Simplification", "Remove child strands as the object becomes smaller on the screen");
- prop= RNA_def_property(srna, "use_simplify_viewport", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_simplify_viewport", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "simplify_flag", PART_SIMPLIFY_VIEWPORT);
RNA_def_property_ui_text(prop, "Viewport", "");
- prop= RNA_def_property(srna, "simplify_refsize", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "simplify_refsize", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "simplify_refsize");
RNA_def_property_range(prop, 1, 32768);
RNA_def_property_ui_text(prop, "Reference Size", "Reference size in pixels, after which simplification begins");
- prop= RNA_def_property(srna, "simplify_rate", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "simplify_rate", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Rate", "Speed of simplification");
- prop= RNA_def_property(srna, "simplify_transition", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "simplify_transition", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Transition", "Transition period for fading out strands");
- prop= RNA_def_property(srna, "simplify_viewport", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "simplify_viewport", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 0.999f);
RNA_def_property_ui_text(prop, "Rate", "Speed of Simplification");
/* general values */
- prop= RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "sta");//optional if prop names are the same
+ prop = RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "sta");/*optional if prop names are the same */
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_float_funcs(prop, NULL, "rna_PartSettings_start_set", NULL);
RNA_def_property_ui_text(prop, "Start", "Frame number to start emitting particles");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "frame_end", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_end", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "end");
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
@@ -2044,61 +2044,61 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "End", "Frame number to stop emitting particles");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "lifetime", PROP_FLOAT, PROP_TIME);
+ prop = RNA_def_property(srna, "lifetime", PROP_FLOAT, PROP_TIME);
RNA_def_property_range(prop, 1.0f, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Lifetime", "Life span of the particles");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "lifetime_random", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "lifetime_random", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "randlife");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random", "Give the particle life a random variation");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "time_tweak", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "time_tweak", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "timetweak");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_range(prop, 0, 10, 1, 3);
RNA_def_property_ui_text(prop, "Tweak", "A multiplier for physics timestep (1.0 means one frame = 1/25 seconds)");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "timestep", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "timestep", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_funcs(prop, "rna_PartSettings_timestep_get", "rna_PartSetings_timestep_set", NULL);
RNA_def_property_range(prop, 0.0001, 100.0);
RNA_def_property_ui_range(prop, 0.01, 10, 1, 3);
RNA_def_property_ui_text(prop, "Timestep", "The simulation timestep per frame (seconds per frame)");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "adaptive_subframes", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "adaptive_subframes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "time_flag", PART_TIME_AUTOSF);
RNA_def_property_ui_text(prop, "Automatic Subframes", "Automatically set the number of subframes");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "subframes", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "subframes", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 1000);
RNA_def_property_ui_text(prop, "Subframes", "Subframes to simulate for improved stability and finer granularity simulations (dt = timestep / (subframes + 1))");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "courant_target", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "courant_target", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.01, 10);
RNA_def_property_float_default(prop, 0.2);
RNA_def_property_ui_text(prop, "Adaptive Subframe Threshold", "The relative distance a particle can move before requiring more subframes (target Courant number); 0.1-0.3 is the recommended range");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "jitter_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "jitter_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_float_sdna(prop, NULL, "jitfac");
RNA_def_property_range(prop, 0.0f, 2.0f);
RNA_def_property_ui_text(prop, "Amount", "Amount of jitter applied to the sampling");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "effect_hair", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "effect_hair", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "eff_hair");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Stiffness", "Hair stiffness for effectors");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "count", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "count", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "totpart");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
/* This limit is for those freaks who have the machine power to handle it. */
@@ -2109,14 +2109,14 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Number", "Total number of particles");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "userjit", PROP_INT, PROP_UNSIGNED);//TODO: can we get a better name for userjit?
+ prop = RNA_def_property(srna, "userjit", PROP_INT, PROP_UNSIGNED);/*TODO: can we get a better name for userjit? */
RNA_def_property_int_sdna(prop, NULL, "userjit");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0, 1000);
RNA_def_property_ui_text(prop, "P/F", "Emission locations / face (0 = automatic)");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "grid_resolution", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "grid_resolution", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "grid_res");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 1, 250); /* ~15M particles in a cube (ouch!), but could be very usable in a plane */
@@ -2124,13 +2124,13 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Resolution", "The resolution of the particle grid");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "grid_random", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "grid_random", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "grid_rand");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Grid Randomness", "Add random offset to the grid locations");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "effector_amount", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "effector_amount", PROP_INT, PROP_UNSIGNED);
/* in theory PROP_ANIMATABLE perhaps should be cleared, but animating this can give some interesting results! */
RNA_def_property_range(prop, 0, 10000); /* 10000 effectors will bel SLOW, but who knows */
RNA_def_property_ui_range(prop, 0, 100, 1, 0);
@@ -2138,54 +2138,54 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Particle_reset");
/* initial velocity factors */
- prop= RNA_def_property(srna, "normal_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "normfac");//optional if prop names are the same
+ prop = RNA_def_property(srna, "normal_factor", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "normfac");/*optional if prop names are the same */
RNA_def_property_range(prop, -1000.0f, 1000.0f);
RNA_def_property_ui_range(prop, 0, 100, 1, 3);
RNA_def_property_ui_text(prop, "Normal", "Let the surface normal give the particle a starting speed");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "object_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "object_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "obfac");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, -1.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Object", "Let the object give the particle a starting speed");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "factor_random", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "randfac");//optional if prop names are the same
+ prop = RNA_def_property(srna, "factor_random", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "randfac");/*optional if prop names are the same */
RNA_def_property_range(prop, 0.0f, 200.0f);
RNA_def_property_ui_range(prop, 0, 100, 1, 3);
RNA_def_property_ui_text(prop, "Random", "Give the starting speed a random variation");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "particle_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "particle_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "partfac");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, -1.0f, 1.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Particle", "Let the target particle give the particle a starting speed");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "tangent_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "tangent_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "tanfac");
RNA_def_property_range(prop, -1000.0f, 1000.0f);
RNA_def_property_ui_range(prop, -100, 100, 1, 2);
RNA_def_property_ui_text(prop, "Tangent", "Let the surface tangent give the particle a starting speed");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "tangent_phase", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "tangent_phase", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "tanphase");
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Rot", "Rotate the surface tangent");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "reactor_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "reactor_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "reactfac");
RNA_def_property_range(prop, -10.0f, 10.0f);
RNA_def_property_ui_text(prop, "Reactor", "Let the vector away from the target particle's location give the particle a starting speed");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "object_align_factor", PROP_FLOAT, PROP_VELOCITY);
+ prop = RNA_def_property(srna, "object_align_factor", PROP_FLOAT, PROP_VELOCITY);
RNA_def_property_float_sdna(prop, NULL, "ob_vel");
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, -200.0f, 200.0f);
@@ -2193,32 +2193,32 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Object Aligned", "Let the emitter object orientation give the particle a starting speed");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "angular_velocity_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "angular_velocity_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "avefac");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_range(prop, -100, 100, 10, 3);
RNA_def_property_ui_text(prop, "Angular Velocity", "Angular velocity amount");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "phase_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "phase_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "phasefac");
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Phase", "Initial rotation phase");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "rotation_factor_random", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "rotation_factor_random", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "randrotfac");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random Rotation", "Randomize rotation");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "phase_factor_random", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "phase_factor_random", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "randphasefac");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random Phase", "Randomize rotation phase");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "hair_length", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "hair_length", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_funcs(prop, "rna_PartSetting_hairlength_get", "rna_PartSetting_hairlength_set", NULL);
RNA_def_property_range(prop, 0.0f, 1000.0f);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
@@ -2226,20 +2226,20 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Particle_reset");
/* physical properties */
- prop= RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.001f, 100000.0f);
RNA_def_property_ui_range(prop, 0.01, 100, 1, 3);
RNA_def_property_ui_text(prop, "Mass", "Mass of the particles");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "particle_size", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "particle_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_range(prop, 0.001f, 100000.0f);
RNA_def_property_ui_range(prop, 0.01, 100, 1, 3);
RNA_def_property_ui_text(prop, "Size", "The size of the particles");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "size_random", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "size_random", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "randsize");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random Size", "Give the particle size a random variation");
@@ -2247,85 +2247,85 @@ static void rna_def_particle_settings(BlenderRNA *brna)
/* global physical properties */
- prop= RNA_def_property(srna, "drag_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "drag_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dragfac");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Drag", "Amount of air-drag");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "brownian_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "brownian_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "brownfac");
RNA_def_property_range(prop, 0.0f, 200.0f);
RNA_def_property_ui_range(prop, 0, 20, 1, 3);
RNA_def_property_ui_text(prop, "Brownian", "Amount of Brownian motion");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "damping", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "damping", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dampfac");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Damp", "Amount of damping");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
/* random length */
- prop= RNA_def_property(srna, "length_random", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "length_random", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "randlength");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random Length", "Give path length a random variation");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
/* children */
- prop= RNA_def_property(srna, "child_nbr", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "child_nbr");//optional if prop names are the same
+ prop = RNA_def_property(srna, "child_nbr", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "child_nbr");/*optional if prop names are the same */
RNA_def_property_range(prop, 0, 100000);
RNA_def_property_ui_range(prop, 0, 1000, 1, 0);
RNA_def_property_ui_text(prop, "Children Per Parent", "Number of children/parent");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "rendered_child_count", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "rendered_child_count", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ren_child_nbr");
RNA_def_property_range(prop, 0, 100000);
RNA_def_property_ui_range(prop, 0, 10000, 1, 0);
RNA_def_property_ui_text(prop, "Rendered Children", "Number of children/parent for rendering");
- prop= RNA_def_property(srna, "virtual_parents", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "virtual_parents", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "parents");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Virtual Parents", "Relative amount of virtual parents");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "child_size", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "child_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "childsize");
RNA_def_property_range(prop, 0.001f, 100000.0f);
RNA_def_property_ui_range(prop, 0.01f, 100.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Child Size", "A multiplier for the child particle size");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "child_size_random", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "child_size_random", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "childrandsize");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Random Child Size", "Random variation to the size of the child particles");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "child_radius", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "child_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "childrad");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Child Radius", "Radius of children around parent");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "child_roundness", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "child_roundness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "childflat");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Child Roundness", "Roundness of children around parent");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
/* clumping */
- prop= RNA_def_property(srna, "clump_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "clump_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clumpfac");
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Clump", "Amount of clumping");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "clump_shape", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "clump_shape", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clumppow");
RNA_def_property_range(prop, -0.999f, 0.999f);
RNA_def_property_ui_text(prop, "Shape", "Shape of clumping");
@@ -2333,150 +2333,150 @@ static void rna_def_particle_settings(BlenderRNA *brna)
/* kink */
- prop= RNA_def_property(srna, "kink_amplitude", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "kink_amplitude", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "kink_amp");
RNA_def_property_range(prop, -100000.0f, 100000.0f);
RNA_def_property_ui_range(prop, -10.0f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Amplitude", "The amplitude of the offset");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "kink_amplitude_clump", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "kink_amplitude_clump", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "kink_amp_clump");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Amplitude Clump", "How much clump affects kink amplitude");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "kink_frequency", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "kink_frequency", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "kink_freq");
RNA_def_property_range(prop, -100000.0f, 100000.0f);
RNA_def_property_ui_range(prop, -10.0f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Frequency", "The frequency of the offset (1/total length)");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "kink_shape", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "kink_shape", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, -0.999f, 0.999f);
RNA_def_property_ui_text(prop, "Shape", "Adjust the offset to the beginning/end");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "kink_flat", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "kink_flat", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Flatness", "How flat the hairs are");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
/* rough */
- prop= RNA_def_property(srna, "roughness_1", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "roughness_1", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rough1");
RNA_def_property_range(prop, 0.0f, 100000.0f);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Rough1", "Amount of location dependent rough");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "roughness_1_size", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "roughness_1_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rough1_size");
RNA_def_property_range(prop, 0.01f, 100000.0f);
RNA_def_property_ui_range(prop, 0.01f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Size1", "Size of location dependent rough");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "roughness_2", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "roughness_2", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rough2");
RNA_def_property_range(prop, 0.0f, 100000.0f);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Rough2", "Amount of random rough");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "roughness_2_size", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "roughness_2_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rough2_size");
RNA_def_property_range(prop, 0.01f, 100000.0f);
RNA_def_property_ui_range(prop, 0.01f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Size2", "Size of random rough");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "roughness_2_threshold", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "roughness_2_threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rough2_thres");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Threshold", "Amount of particles left untouched by random rough");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "roughness_endpoint", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "roughness_endpoint", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rough_end");
RNA_def_property_range(prop, 0.0f, 100000.0f);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Rough Endpoint", "Amount of end point rough");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "roughness_end_shape", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "roughness_end_shape", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rough_end_shape");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Shape", "Shape of end point rough");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "child_length", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "child_length", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clength");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Length", "Length of child paths");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "child_length_threshold", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "child_length_threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clength_thres");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Threshold", "Amount of particles left untouched by child path length");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
/* parting */
- prop= RNA_def_property(srna, "child_parting_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "child_parting_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "parting_fac");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Parting Factor", "Create parting in the children based on parent strands");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "child_parting_min", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "child_parting_min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "parting_min");
RNA_def_property_range(prop, 0.0f, 180.0f);
RNA_def_property_ui_text(prop, "Parting Minimum", "Minimum root to tip angle (tip distance/root distance for long hair)");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "child_parting_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "child_parting_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "parting_max");
RNA_def_property_range(prop, 0.0f, 180.0f);
RNA_def_property_ui_text(prop, "Parting Maximum", "Maximum root to tip angle (tip distance/root distance for long hair)");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
/* branching */
- prop= RNA_def_property(srna, "branch_threshold", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "branch_threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "branch_thres");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Threshold", "Threshold of branching");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
/* drawing stuff */
- prop= RNA_def_property(srna, "line_length_tail", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "line_length_tail", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_funcs(prop, "rna_PartSetting_linelentail_get", "rna_PartSetting_linelentail_set", NULL);
RNA_def_property_range(prop, 0.0f, 100000.0f);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Back", "Length of the line's tail");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "line_length_head", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "line_length_head", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_funcs(prop, "rna_PartSetting_linelenhead_get", "rna_PartSetting_linelenhead_set", NULL);
RNA_def_property_range(prop, 0.0f, 100000.0f);
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 3);
RNA_def_property_ui_text(prop, "Head", "Length of the line's head");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "path_start", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "path_start", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "path_start");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_PartSetting_pathstartend_range");
RNA_def_property_ui_text(prop, "Path Start", "Starting time of drawn path");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "path_end", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "path_end", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "path_end");
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_PartSetting_pathstartend_range");
RNA_def_property_ui_text(prop, "Path End", "End time of drawn path");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "trail_count", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "trail_count", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "trail_count");
RNA_def_property_range(prop, 1, 100000);
RNA_def_property_ui_range(prop, 1, 100, 1, 0);
@@ -2484,7 +2484,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Particle_redo");
/* keyed particles */
- prop= RNA_def_property(srna, "keyed_loops", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "keyed_loops", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "keyed_loops");
RNA_def_property_range(prop, 1.0f, 10000.0f);
RNA_def_property_ui_range(prop, 1.0f, 100.0f, 0.1, 3);
@@ -2492,35 +2492,35 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Particle_redo");
/* draw objects & groups */
- prop= RNA_def_property(srna, "dupli_group", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "dupli_group", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "dup_group");
RNA_def_property_struct_type(prop, "Group");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Dupli Group", "Show Objects in this Group in place of particles");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "dupli_weights", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "dupli_weights", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "dupliweights", NULL);
RNA_def_property_struct_type(prop, "ParticleDupliWeight");
RNA_def_property_ui_text(prop, "Dupli Group Weights", "Weights for all of the objects in the dupli group");
- prop= RNA_def_property(srna, "active_dupliweight", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active_dupliweight", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ParticleDupliWeight");
RNA_def_property_pointer_funcs(prop, "rna_ParticleDupliWeight_active_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Active Dupli Object", "");
- prop= RNA_def_property(srna, "active_dupliweight_index", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "active_dupliweight_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_funcs(prop, "rna_ParticleDupliWeight_active_index_get", "rna_ParticleDupliWeight_active_index_set", "rna_ParticleDupliWeight_active_index_range");
RNA_def_property_ui_text(prop, "Active Dupli Object Index", "");
- prop= RNA_def_property(srna, "dupli_object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "dupli_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "dup_ob");
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Dupli Object", "Show this Object in place of particles");
RNA_def_property_update(prop, 0, "rna_Particle_redo_dependency");
- prop= RNA_def_property(srna, "billboard_object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "billboard_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "bb_ob");
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -2528,19 +2528,19 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Particle_redo");
/* boids */
- prop= RNA_def_property(srna, "boids", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "boids", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "BoidSettings");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Boid Settings", "");
/* Fluid particles */
- prop= RNA_def_property(srna, "fluid", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "fluid", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "SPHFluidSettings");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "SPH Fluid Settings", "");
/* Effector weights */
- prop= RNA_def_property(srna, "effector_weights", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "effector_weights", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "EffectorWeights");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Effector Weights", "");
@@ -2548,13 +2548,13 @@ static void rna_def_particle_settings(BlenderRNA *brna)
/* animation here? */
rna_def_animdata_common(srna);
- prop= RNA_def_property(srna, "force_field_1", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "force_field_1", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "pd");
RNA_def_property_struct_type(prop, "FieldSettings");
RNA_def_property_pointer_funcs(prop, "rna_Particle_field1_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Force Field 1", "");
- prop= RNA_def_property(srna, "force_field_2", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "force_field_2", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "pd2");
RNA_def_property_struct_type(prop, "FieldSettings");
RNA_def_property_pointer_funcs(prop, "rna_Particle_field2_get", NULL, NULL, NULL);
@@ -2577,42 +2577,42 @@ static void rna_def_particle_target(BlenderRNA *brna)
srna = RNA_def_struct(brna, "ParticleTarget", NULL);
RNA_def_struct_ui_text(srna, "Particle Target", "Target particle system");
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ParticleTarget_name_get", "rna_ParticleTarget_name_length", NULL);
RNA_def_property_ui_text(prop, "Name", "Particle target name");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_struct_name_property(srna, prop);
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ob");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Target Object", "The object that has the target particle system (empty if same object)");
RNA_def_property_update(prop, 0, "rna_Particle_target_reset");
- prop= RNA_def_property(srna, "system", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "system", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "psys");
RNA_def_property_range(prop, 1, INT_MAX);
RNA_def_property_ui_text(prop, "Target Particle System", "The index of particle system on the target object");
RNA_def_property_update(prop, 0, "rna_Particle_target_reset");
- prop= RNA_def_property(srna, "time", PROP_FLOAT, PROP_TIME);
+ prop = RNA_def_property(srna, "time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "time");
- RNA_def_property_range(prop, 0.0, 30000.0f); //TODO: replace 30000 with MAXFRAMEF when available in 2.5
+ RNA_def_property_range(prop, 0.0, 30000.0f); /*TODO: replace 30000 with MAXFRAMEF when available in 2.5 */
RNA_def_property_ui_text(prop, "Time", "");
RNA_def_property_update(prop, 0, "rna_Particle_target_redo");
- prop= RNA_def_property(srna, "duration", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "duration", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "duration");
- RNA_def_property_range(prop, 0.0, 30000.0f); //TODO: replace 30000 with MAXFRAMEF when available in 2.5
+ RNA_def_property_range(prop, 0.0, 30000.0f); /*TODO: replace 30000 with MAXFRAMEF when available in 2.5 */
RNA_def_property_ui_text(prop, "Duration", "");
RNA_def_property_update(prop, 0, "rna_Particle_target_redo");
- prop= RNA_def_property(srna, "is_valid", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_valid", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PTARGET_VALID);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Valid", "Keyed particles target is valid");
- prop= RNA_def_property(srna, "alliance", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "alliance", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, mode_items);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
@@ -2625,11 +2625,11 @@ static void rna_def_particle_system(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ParticleSystem", NULL);
+ srna = RNA_def_struct(brna, "ParticleSystem", NULL);
RNA_def_struct_ui_text(srna, "Particle System", "Particle system in an object");
RNA_def_struct_ui_icon(srna, ICON_PARTICLE_DATA);
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "Particle system name");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER|NA_RENAME, NULL);
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_ParticleSystem_name_set");
@@ -2637,44 +2637,44 @@ static void rna_def_particle_system(BlenderRNA *brna)
/* access to particle settings is redirected through functions */
/* to allow proper id-buttons functionality */
- prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
- //RNA_def_property_pointer_sdna(prop, NULL, "part");
+ prop = RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
+ /*RNA_def_property_pointer_sdna(prop, NULL, "part"); */
RNA_def_property_struct_type(prop, "ParticleSettings");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_NULL);
RNA_def_property_pointer_funcs(prop, "rna_particle_settings_get", "rna_particle_settings_set", NULL, NULL);
RNA_def_property_ui_text(prop, "Settings", "Particle system settings");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "particles", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "particles", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "particles", "totpart");
RNA_def_property_struct_type(prop, "Particle");
RNA_def_property_ui_text(prop, "Particles", "Particles generated by the particle system");
- prop= RNA_def_property(srna, "child_particles", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "child_particles", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "child", "totchild");
RNA_def_property_struct_type(prop, "ChildParticle");
RNA_def_property_ui_text(prop, "Child Particles", "Child particles generated by the particle system");
- prop= RNA_def_property(srna, "seed", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "seed", PROP_INT, PROP_UNSIGNED);
RNA_def_property_ui_text(prop, "Seed", "Offset in the random number table, to get a different randomized result");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "child_seed", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "child_seed", PROP_INT, PROP_UNSIGNED);
RNA_def_property_ui_text(prop, "Child Seed", "Offset in the random number table for child particles, to get a different randomized result");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
/* hair */
- prop= RNA_def_property(srna, "is_global_hair", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_global_hair", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PSYS_GLOBAL_HAIR);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Global Hair", "Hair keys are in global coordinate space");
- prop= RNA_def_property(srna, "use_hair_dynamics", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_hair_dynamics", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PSYS_HAIR_DYNAMICS);
RNA_def_property_ui_text(prop, "Hair Dynamics", "Enable hair dynamics using cloth simulation");
RNA_def_property_update(prop, 0, "rna_Particle_hair_dynamics");
- prop= RNA_def_property(srna, "cloth", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "cloth", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "clmd");
RNA_def_property_struct_type(prop, "ClothModifier");
RNA_def_property_flag(prop, PROP_NEVER_NULL);
@@ -2682,51 +2682,51 @@ static void rna_def_particle_system(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Cloth", "Cloth dynamics for hair");
/* reactor */
- prop= RNA_def_property(srna, "reactor_target_object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "reactor_target_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "target_ob");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Reactor Target Object", "For reactor systems, the object that has the target particle system (empty if same object)");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "reactor_target_particle_system", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "reactor_target_particle_system", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "target_psys");
RNA_def_property_range(prop, 1, SHRT_MAX);
RNA_def_property_ui_text(prop, "Reactor Target Particle System", "For reactor systems, index of particle system on the target object");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
/* keyed */
- prop= RNA_def_property(srna, "use_keyed_timing", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_keyed_timing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PSYS_KEYED_TIMING);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Keyed timing", "Use key times");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "targets", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "targets", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "ParticleTarget");
RNA_def_property_ui_text(prop, "Targets", "Target particle systems");
- prop= RNA_def_property(srna, "active_particle_target", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active_particle_target", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ParticleTarget");
RNA_def_property_pointer_funcs(prop, "rna_ParticleSystem_active_particle_target_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Active Particle Target", "");
- prop= RNA_def_property(srna, "active_particle_target_index", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "active_particle_target_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_funcs(prop, "rna_ParticleSystem_active_particle_target_index_get", "rna_ParticleSystem_active_particle_target_index_set", "rna_ParticleSystem_active_particle_target_index_range");
RNA_def_property_ui_text(prop, "Active Particle Target Index", "");
/* billboard */
- prop= RNA_def_property(srna, "billboard_normal_uv", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "billboard_normal_uv", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "bb_uvname[0]");
RNA_def_property_string_maxlength(prop, 32);
RNA_def_property_ui_text(prop, "Billboard Normal UV", "UV map to control billboard normals");
- prop= RNA_def_property(srna, "billboard_time_index_uv", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "billboard_time_index_uv", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "bb_uvname[1]");
RNA_def_property_string_maxlength(prop, 32);
RNA_def_property_ui_text(prop, "Billboard Time Index UV", "UV map to control billboard time index (X-Y)");
- prop= RNA_def_property(srna, "billboard_split_uv", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "billboard_split_uv", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "bb_uvname[2]");
RNA_def_property_string_maxlength(prop, 32);
RNA_def_property_ui_text(prop, "Billboard Split UV", "UV map to control billboard splitting");
@@ -2734,159 +2734,159 @@ static void rna_def_particle_system(BlenderRNA *brna)
/* vertex groups */
/* note, internally store as ints, access as strings */
-#if 0 // int access. works ok but isnt useful for the UI
- prop= RNA_def_property(srna, "vertex_group_density", PROP_INT, PROP_NONE);
+#if 0 /* int access. works ok but isnt useful for the UI */
+ prop = RNA_def_property(srna, "vertex_group_density", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vgroup[0]");
RNA_def_property_ui_text(prop, "Vertex Group Density", "Vertex group to control density");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
#endif
- prop= RNA_def_property(srna, "vertex_group_density", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group_density", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_0", "rna_ParticleVGroup_name_len_0", "rna_ParticleVGroup_name_set_0");
RNA_def_property_ui_text(prop, "Vertex Group Density", "Vertex group to control density");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "invert_vertex_group_density", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_vertex_group_density", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_DENSITY));
RNA_def_property_ui_text(prop, "Vertex Group Density Negate", "Negate the effect of the density vertex group");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "vertex_group_velocity", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group_velocity", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_1", "rna_ParticleVGroup_name_len_1", "rna_ParticleVGroup_name_set_1");
RNA_def_property_ui_text(prop, "Vertex Group Velocity", "Vertex group to control velocity");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "invert_vertex_group_velocity", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_vertex_group_velocity", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_VEL));
RNA_def_property_ui_text(prop, "Vertex Group Velocity Negate", "Negate the effect of the velocity vertex group");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "vertex_group_length", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group_length", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_2", "rna_ParticleVGroup_name_len_2", "rna_ParticleVGroup_name_set_2");
RNA_def_property_ui_text(prop, "Vertex Group Length", "Vertex group to control length");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "invert_vertex_group_length", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_vertex_group_length", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_LENGTH));
RNA_def_property_ui_text(prop, "Vertex Group Length Negate", "Negate the effect of the length vertex group");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
- prop= RNA_def_property(srna, "vertex_group_clump", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group_clump", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_3", "rna_ParticleVGroup_name_len_3", "rna_ParticleVGroup_name_set_3");
RNA_def_property_ui_text(prop, "Vertex Group Clump", "Vertex group to control clump");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "invert_vertex_group_clump", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_vertex_group_clump", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_CLUMP));
RNA_def_property_ui_text(prop, "Vertex Group Clump Negate", "Negate the effect of the clump vertex group");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "vertex_group_kink", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group_kink", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_4", "rna_ParticleVGroup_name_len_4", "rna_ParticleVGroup_name_set_4");
RNA_def_property_ui_text(prop, "Vertex Group Kink", "Vertex group to control kink");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "invert_vertex_group_kink", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_vertex_group_kink", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_KINK));
RNA_def_property_ui_text(prop, "Vertex Group Kink Negate", "Negate the effect of the kink vertex group");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "vertex_group_roughness_1", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group_roughness_1", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_5", "rna_ParticleVGroup_name_len_5", "rna_ParticleVGroup_name_set_5");
RNA_def_property_ui_text(prop, "Vertex Group Roughness 1", "Vertex group to control roughness 1");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "invert_vertex_group_roughness_1", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_vertex_group_roughness_1", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_ROUGH1));
RNA_def_property_ui_text(prop, "Vertex Group Roughness 1 Negate", "Negate the effect of the roughness 1 vertex group");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "vertex_group_roughness_2", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group_roughness_2", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_6", "rna_ParticleVGroup_name_len_6", "rna_ParticleVGroup_name_set_6");
RNA_def_property_ui_text(prop, "Vertex Group Roughness 2", "Vertex group to control roughness 2");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "invert_vertex_group_roughness_2", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_vertex_group_roughness_2", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_ROUGH2));
RNA_def_property_ui_text(prop, "Vertex Group Roughness 2 Negate", "Negate the effect of the roughness 2 vertex group");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "vertex_group_roughness_end", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group_roughness_end", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_7", "rna_ParticleVGroup_name_len_7", "rna_ParticleVGroup_name_set_7");
RNA_def_property_ui_text(prop, "Vertex Group Roughness End", "Vertex group to control roughness end");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "invert_vertex_group_roughness_end", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_vertex_group_roughness_end", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_ROUGHE));
RNA_def_property_ui_text(prop, "Vertex Group Roughness End Negate", "Negate the effect of the roughness end vertex group");
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
- prop= RNA_def_property(srna, "vertex_group_size", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group_size", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_8", "rna_ParticleVGroup_name_len_8", "rna_ParticleVGroup_name_set_8");
RNA_def_property_ui_text(prop, "Vertex Group Size", "Vertex group to control size");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "invert_vertex_group_size", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_vertex_group_size", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_SIZE));
RNA_def_property_ui_text(prop, "Vertex Group Size Negate", "Negate the effect of the size vertex group");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "vertex_group_tangent", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group_tangent", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_9", "rna_ParticleVGroup_name_len_9", "rna_ParticleVGroup_name_set_9");
RNA_def_property_ui_text(prop, "Vertex Group Tangent", "Vertex group to control tangent");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "invert_vertex_group_tangent", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_vertex_group_tangent", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_TAN));
RNA_def_property_ui_text(prop, "Vertex Group Tangent Negate", "Negate the effect of the tangent vertex group");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "vertex_group_rotation", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group_rotation", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_10", "rna_ParticleVGroup_name_len_10", "rna_ParticleVGroup_name_set_10");
RNA_def_property_ui_text(prop, "Vertex Group Rotation", "Vertex group to control rotation");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "invert_vertex_group_rotation", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_vertex_group_rotation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_ROT));
RNA_def_property_ui_text(prop, "Vertex Group Rotation Negate", "Negate the effect of the rotation vertex group");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "vertex_group_field", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_group_field", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ParticleVGroup_name_get_11", "rna_ParticleVGroup_name_len_11", "rna_ParticleVGroup_name_set_11");
RNA_def_property_ui_text(prop, "Vertex Group Field", "Vertex group to control field");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "invert_vertex_group_field", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_vertex_group_field", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "vg_neg", (1 << PSYS_VG_EFFECTOR));
RNA_def_property_ui_text(prop, "Vertex Group Field Negate", "Negate the effect of the field vertex group");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
/* pointcache */
- prop= RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "pointcache");
RNA_def_property_struct_type(prop, "PointCache");
RNA_def_property_ui_text(prop, "Point Cache", "");
- prop= RNA_def_property(srna, "has_multiple_caches", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "has_multiple_caches", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_ParticleSystem_multiple_caches_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Multiple Caches", "Particle system has multiple point caches");
/* offset ob */
- prop= RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "parent");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Parent", "Use this object's coordinate system instead of global coordinate system");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
/* hair or cache editing */
- prop= RNA_def_property(srna, "is_editable", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_editable", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_ParticleSystem_editable_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Editable", "Particle system can be edited in particle mode");
- prop= RNA_def_property(srna, "is_edited", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_edited", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_ParticleSystem_edited_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Edited", "Particle system has been edited in particle mode");
@@ -2894,7 +2894,7 @@ static void rna_def_particle_system(BlenderRNA *brna)
/* Read-only: this is calculated internally. Changing it would only affect
* the next time-step. The user should change ParticlSettings.subframes or
* ParticleSettings.courant_target instead. */
- prop= RNA_def_property(srna, "dt_frac", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "dt_frac", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 1.0f/101.0f, 1.0f);
RNA_def_property_ui_text(prop, "Timestep", "The current simulation time step size, as a fraction of a frame");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -2914,7 +2914,7 @@ void RNA_def_particle(BlenderRNA *brna)
rna_def_particle_dupliweight(brna);
rna_def_particle_system(brna);
rna_def_particle_settings_mtex(brna);
- rna_def_particle_settings(brna);
+ rna_def_particle_settings(brna);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index 9ed3f8f186f..e1abcb052be 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -45,7 +45,7 @@
-// XXX: this RNA enum define is currently duplicated for objects, since there is some text here which is not applicable
+/* XXX: this RNA enum define is currently duplicated for objects, since there is some text here which is not applicable */
EnumPropertyItem posebone_rotmode_items[] = {
{ROT_MODE_QUAT, "QUATERNION", 0, "Quaternion (WXYZ)", "No Gimbal Lock (default)"},
{ROT_MODE_XYZ, "XYZ", 0, "XYZ Euler", "XYZ Rotation Order (prone to Gimbal Lock)"},
@@ -86,15 +86,15 @@ EnumPropertyItem posebone_rotmode_items[] = {
static void rna_Pose_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- // XXX when to use this? ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK);
+ /* XXX when to use this? ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK); */
DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA);
}
static void rna_Pose_IK_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- // XXX when to use this? ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK);
- Object *ob= ptr->id.data;
+ /* XXX when to use this? ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK); */
+ Object *ob = ptr->id.data;
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
BIK_clear_data(ob->pose);
@@ -107,11 +107,11 @@ static char *rna_PoseBone_path(PointerRNA *ptr)
static void rna_BoneGroup_color_set_set(PointerRNA *ptr, int value)
{
- bActionGroup *grp= ptr->data;
+ bActionGroup *grp = ptr->data;
/* if valid value, set the new enum value, then copy the relevant colors? */
if ((value >= -1) && (value < 21))
- grp->customCol= value;
+ grp->customCol = value;
else
return;
@@ -119,8 +119,8 @@ static void rna_BoneGroup_color_set_set(PointerRNA *ptr, int value)
if (grp->customCol) {
if (grp->customCol > 0) {
/* copy theme colors on-to group's custom color in case user tries to edit color */
- bTheme *btheme= U.themes.first;
- ThemeWireColor *col_set= &btheme->tarm[(grp->customCol - 1)];
+ bTheme *btheme = U.themes.first;
+ ThemeWireColor *col_set = &btheme->tarm[(grp->customCol - 1)];
memcpy(&grp->cs, col_set, sizeof(ThemeWireColor));
}
@@ -128,7 +128,7 @@ static void rna_BoneGroup_color_set_set(PointerRNA *ptr, int value)
/* init custom colors with a generic multi-color rgb set, if not initialised already (for custom color set) */
if (grp->cs.solid[0] == 0) {
/* define for setting colors in theme below */
- #define SETCOL(col, r, g, b, a) col[0]=r; col[1]=g; col[2]= b; col[3]= a;
+ #define SETCOL(col, r, g, b, a) col[0] = r; col[1] = g; col[2] = b; col[3] = a;
SETCOL(grp->cs.solid, 0xff, 0x00, 0x00, 255);
SETCOL(grp->cs.select, 0x81, 0xe6, 0x14, 255);
@@ -142,8 +142,8 @@ static void rna_BoneGroup_color_set_set(PointerRNA *ptr, int value)
void rna_BoneGroup_name_set(PointerRNA *ptr, const char *value)
{
- Object *ob= ptr->id.data;
- bActionGroup *agrp= ptr->data;
+ Object *ob = ptr->id.data;
+ bActionGroup *agrp = ptr->data;
/* copy the new name into the name slot */
BLI_strncpy_utf8(agrp->name, value, sizeof(agrp->name));
@@ -153,11 +153,11 @@ void rna_BoneGroup_name_set(PointerRNA *ptr, const char *value)
static IDProperty *rna_PoseBone_idprops(PointerRNA *ptr, int create)
{
- bPoseChannel *pchan= ptr->data;
+ bPoseChannel *pchan = ptr->data;
- if(create && !pchan->prop) {
+ if (create && !pchan->prop) {
IDPropertyTemplate val = {0};
- pchan->prop= IDP_New(IDP_GROUP, &val, "RNA_PoseBone group");
+ pchan->prop = IDP_New(IDP_GROUP, &val, "RNA_PoseBone group");
}
return pchan->prop;
@@ -165,10 +165,10 @@ static IDProperty *rna_PoseBone_idprops(PointerRNA *ptr, int create)
static void rna_Pose_ik_solver_set(struct PointerRNA *ptr, int value)
{
- bPose *pose= (bPose*)ptr->data;
+ bPose *pose = (bPose*)ptr->data;
if (pose->iksolver != value) {
- // the solver has changed, must clean any temporary structures
+ /* the solver has changed, must clean any temporary structures */
BIK_clear_data(pose);
if (pose->ikparam) {
MEM_freeN(pose->ikparam);
@@ -181,10 +181,10 @@ static void rna_Pose_ik_solver_set(struct PointerRNA *ptr, int value)
static void rna_Pose_ik_solver_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Object *ob= ptr->id.data;
+ Object *ob = ptr->id.data;
bPose *pose = ptr->data;
- pose->flag |= POSE_RECALC; // checks & sorts pose channels
+ pose->flag |= POSE_RECALC; /* checks & sorts pose channels */
DAG_scene_sort(bmain, scene);
update_pose_constraint_flags(pose);
@@ -197,40 +197,40 @@ static void rna_Pose_ik_solver_update(Main *bmain, Scene *scene, PointerRNA *ptr
/* rotation - axis-angle */
static void rna_PoseChannel_rotation_axis_angle_get(PointerRNA *ptr, float *value)
{
- bPoseChannel *pchan= ptr->data;
+ bPoseChannel *pchan = ptr->data;
/* for now, assume that rotation mode is axis-angle */
- value[0]= pchan->rotAngle;
+ value[0] = pchan->rotAngle;
copy_v3_v3(&value[1], pchan->rotAxis);
}
/* rotation - axis-angle */
static void rna_PoseChannel_rotation_axis_angle_set(PointerRNA *ptr, const float *value)
{
- bPoseChannel *pchan= ptr->data;
+ bPoseChannel *pchan = ptr->data;
/* for now, assume that rotation mode is axis-angle */
- pchan->rotAngle= value[0];
+ pchan->rotAngle = value[0];
copy_v3_v3(pchan->rotAxis, (float *)&value[1]);
- // TODO: validate axis?
+ /* TODO: validate axis? */
}
static void rna_PoseChannel_rotation_mode_set(PointerRNA *ptr, int value)
{
- bPoseChannel *pchan= ptr->data;
+ bPoseChannel *pchan = ptr->data;
/* use API Method for conversions... */
BKE_rotMode_change_values(pchan->quat, pchan->eul, pchan->rotAxis, &pchan->rotAngle, pchan->rotmode, (short)value);
/* finally, set the new rotation type */
- pchan->rotmode= value;
+ pchan->rotmode = value;
}
static void rna_PoseChannel_name_set(PointerRNA *ptr, const char *value)
{
- Object *ob= (Object*)ptr->id.data;
- bPoseChannel *pchan= (bPoseChannel*)ptr->data;
+ Object *ob = (Object*)ptr->id.data;
+ bPoseChannel *pchan = (bPoseChannel*)ptr->data;
char oldname[sizeof(pchan->name)], newname[sizeof(pchan->name)];
/* need to be on the stack */
@@ -242,8 +242,8 @@ static void rna_PoseChannel_name_set(PointerRNA *ptr, const char *value)
static int rna_PoseChannel_has_ik_get(PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
- bPoseChannel *pchan= (bPoseChannel*)ptr->data;
+ Object *ob = (Object*)ptr->id.data;
+ bPoseChannel *pchan = (bPoseChannel*)ptr->data;
return ED_pose_channel_in_IK_chain(ob, pchan);
}
@@ -262,13 +262,13 @@ StructRNA *rna_IKParam_refine(PointerRNA *ptr)
PointerRNA rna_Pose_ikparam_get(struct PointerRNA *ptr)
{
- bPose *pose= (bPose*)ptr->data;
+ bPose *pose = (bPose*)ptr->data;
return rna_pointer_inherit_refine(ptr, &RNA_IKParam, pose->ikparam);
}
static StructRNA *rna_Pose_ikparam_typef(PointerRNA *ptr)
{
- bPose *pose= (bPose*)ptr->data;
+ bPose *pose = (bPose*)ptr->data;
switch (pose->iksolver) {
case IKSOLVER_ITASC:
@@ -305,10 +305,10 @@ static void rna_Itasc_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerR
static void rna_Itasc_update_rebuild(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Object *ob= ptr->id.data;
+ Object *ob = ptr->id.data;
bPose *pose = ob->pose;
- pose->flag |= POSE_RECALC; // checks & sorts pose channels
+ pose->flag |= POSE_RECALC; /* checks & sorts pose channels */
rna_Itasc_update(bmain, scene, ptr);
}
@@ -329,174 +329,174 @@ static void rna_PoseChannel_bone_custom_set(PointerRNA *ptr, PointerRNA value)
static PointerRNA rna_PoseChannel_bone_group_get(PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
- bPose *pose= (ob) ? ob->pose : NULL;
- bPoseChannel *pchan= (bPoseChannel*)ptr->data;
+ Object *ob = (Object*)ptr->id.data;
+ bPose *pose = (ob) ? ob->pose : NULL;
+ bPoseChannel *pchan = (bPoseChannel*)ptr->data;
bActionGroup *grp;
if (pose)
- grp= BLI_findlink(&pose->agroups, pchan->agrp_index-1);
+ grp = BLI_findlink(&pose->agroups, pchan->agrp_index-1);
else
- grp= NULL;
+ grp = NULL;
return rna_pointer_inherit_refine(ptr, &RNA_BoneGroup, grp);
}
static void rna_PoseChannel_bone_group_set(PointerRNA *ptr, PointerRNA value)
{
- Object *ob= (Object*)ptr->id.data;
- bPose *pose= (ob) ? ob->pose : NULL;
- bPoseChannel *pchan= (bPoseChannel*)ptr->data;
+ Object *ob = (Object*)ptr->id.data;
+ bPose *pose = (ob) ? ob->pose : NULL;
+ bPoseChannel *pchan = (bPoseChannel*)ptr->data;
if (pose)
- pchan->agrp_index= BLI_findindex(&pose->agroups, value.data) + 1;
+ pchan->agrp_index = BLI_findindex(&pose->agroups, value.data) + 1;
else
- pchan->agrp_index= 0;
+ pchan->agrp_index = 0;
}
static int rna_PoseChannel_bone_group_index_get(PointerRNA *ptr)
{
- bPoseChannel *pchan= (bPoseChannel*)ptr->data;
+ bPoseChannel *pchan = (bPoseChannel*)ptr->data;
return MAX2(pchan->agrp_index-1, 0);
}
static void rna_PoseChannel_bone_group_index_set(PointerRNA *ptr, int value)
{
- bPoseChannel *pchan= (bPoseChannel*)ptr->data;
- pchan->agrp_index= value+1;
+ bPoseChannel *pchan = (bPoseChannel*)ptr->data;
+ pchan->agrp_index = value+1;
}
static void rna_PoseChannel_bone_group_index_range(PointerRNA *ptr, int *min, int *max)
{
- Object *ob= (Object*)ptr->id.data;
- bPose *pose= (ob) ? ob->pose : NULL;
+ Object *ob = (Object*)ptr->id.data;
+ bPose *pose = (ob) ? ob->pose : NULL;
- *min= 0;
+ *min = 0;
if (pose) {
- *max= BLI_countlist(&pose->agroups)-1;
- *max= MAX2(0, *max);
+ *max = BLI_countlist(&pose->agroups)-1;
+ *max = MAX2(0, *max);
}
else
- *max= 0;
+ *max = 0;
}
static PointerRNA rna_Pose_active_bone_group_get(PointerRNA *ptr)
{
- bPose *pose= (bPose*)ptr->data;
+ bPose *pose = (bPose*)ptr->data;
return rna_pointer_inherit_refine(ptr, &RNA_BoneGroup, BLI_findlink(&pose->agroups, pose->active_group-1));
}
static void rna_Pose_active_bone_group_set(PointerRNA *ptr, PointerRNA value)
{
- bPose *pose= (bPose*)ptr->data;
- pose->active_group= BLI_findindex(&pose->agroups, value.data) + 1;
+ bPose *pose = (bPose*)ptr->data;
+ pose->active_group = BLI_findindex(&pose->agroups, value.data) + 1;
}
static int rna_Pose_active_bone_group_index_get(PointerRNA *ptr)
{
- bPose *pose= (bPose*)ptr->data;
+ bPose *pose = (bPose*)ptr->data;
return MAX2(pose->active_group-1, 0);
}
static void rna_Pose_active_bone_group_index_set(PointerRNA *ptr, int value)
{
- bPose *pose= (bPose*)ptr->data;
- pose->active_group= value+1;
+ bPose *pose = (bPose*)ptr->data;
+ pose->active_group = value+1;
}
static void rna_Pose_active_bone_group_index_range(PointerRNA *ptr, int *min, int *max)
{
- bPose *pose= (bPose*)ptr->data;
+ bPose *pose = (bPose*)ptr->data;
- *min= 0;
- *max= BLI_countlist(&pose->agroups)-1;
- *max= MAX2(0, *max);
+ *min = 0;
+ *max = BLI_countlist(&pose->agroups)-1;
+ *max = MAX2(0, *max);
}
#if 0
static void rna_pose_bgroup_name_index_get(PointerRNA *ptr, char *value, int index)
{
- bPose *pose= (bPose*)ptr->data;
+ bPose *pose = (bPose*)ptr->data;
bActionGroup *grp;
- grp= BLI_findlink(&pose->agroups, index-1);
+ grp = BLI_findlink(&pose->agroups, index-1);
- if(grp) BLI_strncpy(value, grp->name, sizeof(grp->name));
- else value[0]= '\0';
+ if (grp) BLI_strncpy(value, grp->name, sizeof(grp->name));
+ else value[0] = '\0';
}
static int rna_pose_bgroup_name_index_length(PointerRNA *ptr, int index)
{
- bPose *pose= (bPose*)ptr->data;
+ bPose *pose = (bPose*)ptr->data;
bActionGroup *grp;
- grp= BLI_findlink(&pose->agroups, index-1);
+ grp = BLI_findlink(&pose->agroups, index-1);
return (grp)? strlen(grp->name): 0;
}
static void rna_pose_bgroup_name_index_set(PointerRNA *ptr, const char *value, short *index)
{
- bPose *pose= (bPose*)ptr->data;
+ bPose *pose = (bPose*)ptr->data;
bActionGroup *grp;
int a;
- for (a=1, grp=pose->agroups.first; grp; grp=grp->next, a++) {
+ for (a = 1, grp = pose->agroups.first; grp; grp = grp->next, a++) {
if (strcmp(grp->name, value) == 0) {
- *index= a;
+ *index = a;
return;
}
}
- *index= 0;
+ *index = 0;
}
static void rna_pose_pgroup_name_set(PointerRNA *ptr, const char *value, char *result, int maxlen)
{
- bPose *pose= (bPose*)ptr->data;
+ bPose *pose = (bPose*)ptr->data;
bActionGroup *grp;
- for (grp= pose->agroups.first; grp; grp= grp->next) {
+ for (grp = pose->agroups.first; grp; grp = grp->next) {
if (strcmp(grp->name, value) == 0) {
BLI_strncpy(result, value, maxlen);
return;
}
}
- result[0]= '\0';
+ result[0] = '\0';
}
#endif
static PointerRNA rna_PoseChannel_active_constraint_get(PointerRNA *ptr)
{
- bPoseChannel *pchan= (bPoseChannel*)ptr->data;
- bConstraint *con= constraints_get_active(&pchan->constraints);
+ bPoseChannel *pchan = (bPoseChannel*)ptr->data;
+ bConstraint *con = constraints_get_active(&pchan->constraints);
return rna_pointer_inherit_refine(ptr, &RNA_Constraint, con);
}
static void rna_PoseChannel_active_constraint_set(PointerRNA *ptr, PointerRNA value)
{
- bPoseChannel *pchan= (bPoseChannel*)ptr->data;
+ bPoseChannel *pchan = (bPoseChannel*)ptr->data;
constraints_set_active(&pchan->constraints, (bConstraint *)value.data);
}
static bConstraint *rna_PoseChannel_constraints_new(bPoseChannel *pchan, int type)
{
- //WM_main_add_notifier(NC_OBJECT|ND_CONSTRAINT|NA_ADDED, object);
- // TODO, pass object also
- // TODO, new pose bones don't have updated draw flags
+ /*WM_main_add_notifier(NC_OBJECT|ND_CONSTRAINT|NA_ADDED, object); */
+ /* TODO, pass object also */
+ /* TODO, new pose bones don't have updated draw flags */
return add_pose_constraint(NULL, pchan, NULL, type);
}
static void rna_PoseChannel_constraints_remove(ID *id, bPoseChannel *pchan, ReportList *reports, bConstraint *con)
{
- if(BLI_findindex(&pchan->constraints, con) == -1) {
+ if (BLI_findindex(&pchan->constraints, con) == -1) {
BKE_reportf(reports, RPT_ERROR, "Constraint '%s' not found in pose bone '%s'", con->name, pchan->name);
return;
}
else {
- Object *ob= (Object *)id;
- const short is_ik= ELEM(con->type, CONSTRAINT_TYPE_KINEMATIC, CONSTRAINT_TYPE_SPLINEIK);
+ Object *ob = (Object *)id;
+ const short is_ik = ELEM(con->type, CONSTRAINT_TYPE_KINEMATIC, CONSTRAINT_TYPE_SPLINEIK);
remove_constraint(&pchan->constraints, con);
ED_object_constraint_update(ob);
@@ -511,16 +511,16 @@ static void rna_PoseChannel_constraints_remove(ID *id, bPoseChannel *pchan, Repo
static int rna_PoseChannel_proxy_editable(PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
- bArmature *arm= ob->data;
- bPoseChannel *pchan= (bPoseChannel*)ptr->data;
+ Object *ob = (Object*)ptr->id.data;
+ bArmature *arm = ob->data;
+ bPoseChannel *pchan = (bPoseChannel*)ptr->data;
return (ob->proxy && pchan->bone && (pchan->bone->layer & arm->layer_protected))? 0: PROP_EDITABLE;
}
static int rna_PoseChannel_location_editable(PointerRNA *ptr, int index)
{
- bPoseChannel *pchan= (bPoseChannel*)ptr->data;
+ bPoseChannel *pchan = (bPoseChannel*)ptr->data;
/* only if the axis in question is locked, not editable... */
if ((index == 0) && (pchan->protectflag & OB_LOCK_LOCX))
@@ -535,7 +535,7 @@ static int rna_PoseChannel_location_editable(PointerRNA *ptr, int index)
static int rna_PoseChannel_scale_editable(PointerRNA *ptr, int index)
{
- bPoseChannel *pchan= (bPoseChannel*)ptr->data;
+ bPoseChannel *pchan = (bPoseChannel*)ptr->data;
/* only if the axis in question is locked, not editable... */
if ((index == 0) && (pchan->protectflag & OB_LOCK_SCALEX))
@@ -550,7 +550,7 @@ static int rna_PoseChannel_scale_editable(PointerRNA *ptr, int index)
static int rna_PoseChannel_rotation_euler_editable(PointerRNA *ptr, int index)
{
- bPoseChannel *pchan= (bPoseChannel*)ptr->data;
+ bPoseChannel *pchan = (bPoseChannel*)ptr->data;
/* only if the axis in question is locked, not editable... */
if ((index == 0) && (pchan->protectflag & OB_LOCK_ROTX))
@@ -565,7 +565,7 @@ static int rna_PoseChannel_rotation_euler_editable(PointerRNA *ptr, int index)
static int rna_PoseChannel_rotation_4d_editable(PointerRNA *ptr, int index)
{
- bPoseChannel *pchan= (bPoseChannel*)ptr->data;
+ bPoseChannel *pchan = (bPoseChannel*)ptr->data;
/* only consider locks if locking components individually... */
if (pchan->protectflag & OB_LOCK_ROT4D) {
@@ -586,9 +586,9 @@ static int rna_PoseChannel_rotation_4d_editable(PointerRNA *ptr, int index)
/* not essential, but much faster then the default lookup function */
int rna_PoseBones_lookup_string(PointerRNA *ptr, const char *key, PointerRNA *r_ptr)
{
- bPose *pose= (bPose*)ptr->data;
- bPoseChannel *pchan= get_pose_channel(pose, key);
- if(pchan) {
+ bPose *pose = (bPose*)ptr->data;
+ bPoseChannel *pchan = get_pose_channel(pose, key);
+ if (pchan) {
RNA_pointer_create(ptr->id.data, &RNA_PoseBone, pchan, r_ptr);
return TRUE;
}
@@ -599,20 +599,20 @@ int rna_PoseBones_lookup_string(PointerRNA *ptr, const char *key, PointerRNA *r_
static void rna_PoseChannel_matrix_basis_get(PointerRNA *ptr, float *values)
{
- bPoseChannel *pchan= (bPoseChannel*)ptr->data;
+ bPoseChannel *pchan = (bPoseChannel*)ptr->data;
pchan_to_mat4(pchan, (float (*)[4])values);
}
static void rna_PoseChannel_matrix_basis_set(PointerRNA *ptr, const float *values)
{
- bPoseChannel *pchan= (bPoseChannel*)ptr->data;
+ bPoseChannel *pchan = (bPoseChannel*)ptr->data;
pchan_apply_mat4(pchan, (float (*)[4])values, FALSE); /* no compat for predictable result */
}
static void rna_PoseChannel_matrix_set(PointerRNA *ptr, const float *values)
{
- bPoseChannel *pchan= (bPoseChannel*)ptr->data;
- Object *ob= (Object*)ptr->id.data;
+ bPoseChannel *pchan = (bPoseChannel*)ptr->data;
+ Object *ob = (Object*)ptr->id.data;
float tmat[4][4];
armature_mat_pose_to_bone_ex(ob, pchan, (float (*)[4])values, tmat);
@@ -653,29 +653,29 @@ static void rna_def_bone_group(BlenderRNA *brna)
PropertyRNA *prop;
/* struct */
- srna= RNA_def_struct(brna, "BoneGroup", NULL);
+ srna = RNA_def_struct(brna, "BoneGroup", NULL);
RNA_def_struct_sdna(srna, "bActionGroup");
RNA_def_struct_ui_text(srna, "Bone Group", "Groups of Pose Channels (Bones)");
RNA_def_struct_ui_icon(srna, ICON_GROUP_BONE);
/* name */
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_BoneGroup_name_set");
RNA_def_struct_name_property(srna, prop);
- // TODO: add some runtime-collections stuff to access grouped bones
+ /* TODO: add some runtime-collections stuff to access grouped bones */
/* color set + colors */
- prop= RNA_def_property(srna, "color_set", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "color_set", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "customCol");
RNA_def_property_enum_items(prop, prop_colorSets_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_BoneGroup_color_set_set", NULL);
RNA_def_property_ui_text(prop, "Color Set", "Custom color set to use");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
- // TODO: editing the colors for this should result in changes to the color type...
- prop= RNA_def_property(srna, "colors", PROP_POINTER, PROP_NONE);
+ /* TODO: editing the colors for this should result in changes to the color type... */
+ prop = RNA_def_property(srna, "colors", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "ThemeBoneColorSet");
RNA_def_property_pointer_sdna(prop, NULL, "cs"); /* NOTE: the DNA data is not really a pointer, but this code works :) */
@@ -703,12 +703,12 @@ static void rna_def_pose_channel_constraints(BlenderRNA *brna, PropertyRNA *cpro
PropertyRNA *parm;
RNA_def_property_srna(cprop, "PoseBoneConstraints");
- srna= RNA_def_struct(brna, "PoseBoneConstraints", NULL);
+ srna = RNA_def_struct(brna, "PoseBoneConstraints", NULL);
RNA_def_struct_sdna(srna, "bPoseChannel");
RNA_def_struct_ui_text(srna, "PoseBone Constraints", "Collection of pose bone constraints");
/* Collection active property */
- prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Constraint");
RNA_def_property_pointer_funcs(prop, "rna_PoseChannel_active_constraint_get",
"rna_PoseChannel_active_constraint_set", NULL, NULL);
@@ -717,49 +717,49 @@ static void rna_def_pose_channel_constraints(BlenderRNA *brna, PropertyRNA *cpro
/* Constraint collection */
- func= RNA_def_function(srna, "new", "rna_PoseChannel_constraints_new");
+ func = RNA_def_function(srna, "new", "rna_PoseChannel_constraints_new");
RNA_def_function_ui_description(func, "Add a constraint to this object");
/* return type */
- parm= RNA_def_pointer(func, "constraint", "Constraint", "", "New constraint");
+ parm = RNA_def_pointer(func, "constraint", "Constraint", "", "New constraint");
RNA_def_function_return(func, parm);
/* constraint to add */
- parm= RNA_def_enum(func, "type", constraint_type_items, 1, "", "Constraint type to add");
+ parm = RNA_def_enum(func, "type", constraint_type_items, 1, "", "Constraint type to add");
RNA_def_property_flag(parm, PROP_REQUIRED);
- func= RNA_def_function(srna, "remove", "rna_PoseChannel_constraints_remove");
+ func = RNA_def_function(srna, "remove", "rna_PoseChannel_constraints_remove");
RNA_def_function_ui_description(func, "Remove a constraint from this object");
RNA_def_function_flag(func, FUNC_USE_REPORTS|FUNC_USE_SELF_ID); /* ID needed for refresh */
/* constraint to remove */
- parm= RNA_def_pointer(func, "constraint", "Constraint", "", "Removed constraint");
+ parm = RNA_def_pointer(func, "constraint", "Constraint", "", "Removed constraint");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
static void rna_def_pose_channel(BlenderRNA *brna)
-{
+{
static float default_quat[4] = {1,0,0,0}; /* default quaternion values */
static float default_axisAngle[4] = {0,0,1,0}; /* default axis-angle rotation values */
static float default_scale[3] = {1,1,1}; /* default scale values */
- const int matrix_dimsize[]= {4, 4};
+ const int matrix_dimsize[] = {4, 4};
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "PoseBone", NULL);
+ srna = RNA_def_struct(brna, "PoseBone", NULL);
RNA_def_struct_sdna(srna, "bPoseChannel");
RNA_def_struct_ui_text(srna, "Pose Bone", "Channel defining pose data for a bone in a Pose");
RNA_def_struct_path_func(srna, "rna_PoseBone_path");
RNA_def_struct_idprops_func(srna, "rna_PoseBone_idprops");
/* Bone Constraints */
- prop= RNA_def_property(srna, "constraints", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "constraints", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "Constraint");
RNA_def_property_ui_text(prop, "Constraints", "Constraints that act on this PoseChannel");
rna_def_pose_channel_constraints(brna, prop);
/* Name + Selection Status */
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_PoseChannel_name_set");
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
@@ -769,83 +769,83 @@ static void rna_def_pose_channel(BlenderRNA *brna)
rna_def_motionpath_common(srna);
/* Relationships to other bones */
- prop= RNA_def_property(srna, "bone", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "bone", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "Bone");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Bone", "Bone associated with this PoseBone");
- prop= RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "PoseBone");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Parent", "Parent of this pose bone");
- prop= RNA_def_property(srna, "child", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "child", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "PoseBone");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Child", "Child of this pose bone");
/* Transformation settings */
- prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "loc");
RNA_def_property_editable_array_func(prop, "rna_PoseChannel_location_editable");
RNA_def_property_ui_text(prop, "Location", "");
- RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable"); // XXX... disabled, since proxy-locked layers are currently used for ensuring proxy-syncing too
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable"); /* XXX... disabled, since proxy-locked layers are currently used for ensuring proxy-syncing too */
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
- prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "scale", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_editable_array_func(prop, "rna_PoseChannel_scale_editable");
RNA_def_property_float_array_default(prop, default_scale);
RNA_def_property_ui_text(prop, "Scale", "");
- RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable"); // XXX... disabled, since proxy-locked layers are currently used for ensuring proxy-syncing too
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable"); /* XXX... disabled, since proxy-locked layers are currently used for ensuring proxy-syncing too */
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
- prop= RNA_def_property(srna, "rotation_quaternion", PROP_FLOAT, PROP_QUATERNION);
+ prop = RNA_def_property(srna, "rotation_quaternion", PROP_FLOAT, PROP_QUATERNION);
RNA_def_property_float_sdna(prop, NULL, "quat");
RNA_def_property_editable_array_func(prop, "rna_PoseChannel_rotation_4d_editable");
RNA_def_property_float_array_default(prop, default_quat);
RNA_def_property_ui_text(prop, "Quaternion Rotation", "Rotation in Quaternions");
- RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable"); // XXX... disabled, since proxy-locked layers are currently used for ensuring proxy-syncing too
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable"); /* XXX... disabled, since proxy-locked layers are currently used for ensuring proxy-syncing too */
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
/* XXX: for axis-angle, it would have been nice to have 2 separate fields for UI purposes, but
* having a single one is better for Keyframing and other property-management situations...
*/
- prop= RNA_def_property(srna, "rotation_axis_angle", PROP_FLOAT, PROP_AXISANGLE);
+ prop = RNA_def_property(srna, "rotation_axis_angle", PROP_FLOAT, PROP_AXISANGLE);
RNA_def_property_array(prop, 4);
RNA_def_property_float_funcs(prop, "rna_PoseChannel_rotation_axis_angle_get",
"rna_PoseChannel_rotation_axis_angle_set", NULL);
RNA_def_property_editable_array_func(prop, "rna_PoseChannel_rotation_4d_editable");
RNA_def_property_float_array_default(prop, default_axisAngle);
RNA_def_property_ui_text(prop, "Axis-Angle Rotation", "Angle of Rotation for Axis-Angle rotation representation");
- RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable"); // XXX... disabled, since proxy-locked layers are currently used for ensuring proxy-syncing too
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable"); /* XXX... disabled, since proxy-locked layers are currently used for ensuring proxy-syncing too */
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
- prop= RNA_def_property(srna, "rotation_euler", PROP_FLOAT, PROP_EULER);
+ prop = RNA_def_property(srna, "rotation_euler", PROP_FLOAT, PROP_EULER);
RNA_def_property_float_sdna(prop, NULL, "eul");
RNA_def_property_editable_array_func(prop, "rna_PoseChannel_rotation_euler_editable");
- RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable"); // XXX... disabled, since proxy-locked layers are currently used for ensuring proxy-syncing too
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable"); /* XXX... disabled, since proxy-locked layers are currently used for ensuring proxy-syncing too */
RNA_def_property_ui_text(prop, "Euler Rotation", "Rotation in Eulers");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
- prop= RNA_def_property(srna, "rotation_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "rotation_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "rotmode");
- RNA_def_property_enum_items(prop, posebone_rotmode_items); // XXX move to using a single define of this someday
+ RNA_def_property_enum_items(prop, posebone_rotmode_items); /* XXX move to using a single define of this someday */
RNA_def_property_enum_funcs(prop, NULL, "rna_PoseChannel_rotation_mode_set", NULL);
- RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable"); // XXX... disabled, since proxy-locked layers are currently used for ensuring proxy-syncing too
+ RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable"); /* XXX... disabled, since proxy-locked layers are currently used for ensuring proxy-syncing too */
RNA_def_property_ui_text(prop, "Rotation Mode", "");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
/* transform matrices - should be read-only since these are set directly by AnimSys evaluation */
- prop= RNA_def_property(srna, "matrix_channel", PROP_FLOAT, PROP_MATRIX);
+ prop = RNA_def_property(srna, "matrix_channel", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "chan_mat");
RNA_def_property_multi_array(prop, 2, matrix_dimsize);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Channel Matrix", "4x4 matrix, before constraints");
/* writable because it touches loc/scale/rot directly */
- prop= RNA_def_property(srna, "matrix_basis", PROP_FLOAT, PROP_MATRIX);
+ prop = RNA_def_property(srna, "matrix_basis", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_multi_array(prop, 2, matrix_dimsize);
RNA_def_property_ui_text(prop, "Basis Matrix",
"Alternative access to location/scale/rotation relative to the parent and own rest bone");
@@ -854,7 +854,7 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
/* final matrix */
- prop= RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
+ prop = RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "pose_mat");
RNA_def_property_multi_array(prop, 2, matrix_dimsize);
RNA_def_property_float_funcs(prop, NULL, "rna_PoseChannel_matrix_set", NULL);
@@ -862,149 +862,149 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
/* Head/Tail Coordinates (in Pose Space) - Automatically calculated... */
- prop= RNA_def_property(srna, "head", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "head", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "pose_head");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Pose Head Position", "Location of head of the channel's bone");
- prop= RNA_def_property(srna, "tail", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "tail", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "pose_tail");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Pose Tail Position", "Location of tail of the channel's bone");
/* IK Settings */
- prop= RNA_def_property(srna, "is_in_ik_chain", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_in_ik_chain", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_PoseChannel_has_ik_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Has IK", "Is part of an IK chain");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
- prop= RNA_def_property(srna, "lock_ik_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_ik_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_NO_XDOF);
RNA_def_property_ui_text(prop, "IK X Lock", "Disallow movement around the X axis");
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
- prop= RNA_def_property(srna, "lock_ik_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_ik_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_NO_YDOF);
RNA_def_property_ui_text(prop, "IK Y Lock", "Disallow movement around the Y axis");
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
- prop= RNA_def_property(srna, "lock_ik_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_ik_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_NO_ZDOF);
RNA_def_property_ui_text(prop, "IK Z Lock", "Disallow movement around the Z axis");
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
- prop= RNA_def_property(srna, "use_ik_limit_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_ik_limit_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_XLIMIT);
RNA_def_property_ui_text(prop, "IK X Limit", "Limit movement around the X axis");
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
- prop= RNA_def_property(srna, "use_ik_limit_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_ik_limit_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_YLIMIT);
RNA_def_property_ui_text(prop, "IK Y Limit", "Limit movement around the Y axis");
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
- prop= RNA_def_property(srna, "use_ik_limit_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_ik_limit_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_ZLIMIT);
RNA_def_property_ui_text(prop, "IK Z Limit", "Limit movement around the Z axis");
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
- prop= RNA_def_property(srna, "use_ik_rotation_control", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_ik_rotation_control", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_ROTCTL);
RNA_def_property_ui_text(prop, "IK rot control", "Apply channel rotation as IK constraint");
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
- prop= RNA_def_property(srna, "use_ik_linear_control", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_ik_linear_control", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_LINCTL);
RNA_def_property_ui_text(prop, "IK rot control", "Apply channel size as IK constraint if stretching is enabled");
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
- prop= RNA_def_property(srna, "ik_min_x", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "ik_min_x", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmin[0]");
RNA_def_property_range(prop, -M_PI, 0.0f);
RNA_def_property_ui_text(prop, "IK X Minimum", "Minimum angles for IK Limit");
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
- prop= RNA_def_property(srna, "ik_max_x", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "ik_max_x", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmax[0]");
RNA_def_property_range(prop, 0.0f, M_PI);
RNA_def_property_ui_text(prop, "IK X Maximum", "Maximum angles for IK Limit");
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
- prop= RNA_def_property(srna, "ik_min_y", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "ik_min_y", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmin[1]");
RNA_def_property_range(prop, -M_PI, 0.0f);
RNA_def_property_ui_text(prop, "IK Y Minimum", "Minimum angles for IK Limit");
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
- prop= RNA_def_property(srna, "ik_max_y", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "ik_max_y", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmax[1]");
RNA_def_property_range(prop, 0.0f, M_PI);
RNA_def_property_ui_text(prop, "IK Y Maximum", "Maximum angles for IK Limit");
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
- prop= RNA_def_property(srna, "ik_min_z", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "ik_min_z", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmin[2]");
RNA_def_property_range(prop, -M_PI, 0.0f);
RNA_def_property_ui_text(prop, "IK Z Minimum", "Minimum angles for IK Limit");
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
- prop= RNA_def_property(srna, "ik_max_z", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "ik_max_z", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmax[2]");
RNA_def_property_range(prop, 0.0f, M_PI);
RNA_def_property_ui_text(prop, "IK Z Maximum", "Maximum angles for IK Limit");
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
- prop= RNA_def_property(srna, "ik_stiffness_x", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "ik_stiffness_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "stiffness[0]");
RNA_def_property_range(prop, 0.0f, 0.99f);
RNA_def_property_ui_text(prop, "IK X Stiffness", "IK stiffness around the X axis");
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
- prop= RNA_def_property(srna, "ik_stiffness_y", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "ik_stiffness_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "stiffness[1]");
RNA_def_property_range(prop, 0.0f, 0.99f);
RNA_def_property_ui_text(prop, "IK Y Stiffness", "IK stiffness around the Y axis");
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
- prop= RNA_def_property(srna, "ik_stiffness_z", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "ik_stiffness_z", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "stiffness[2]");
RNA_def_property_range(prop, 0.0f, 0.99f);
RNA_def_property_ui_text(prop, "IK Z Stiffness", "IK stiffness around the Z axis");
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
- prop= RNA_def_property(srna, "ik_stretch", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "ik_stretch", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ikstretch");
RNA_def_property_range(prop, 0.0f,1.0f);
RNA_def_property_ui_text(prop, "IK Stretch", "Allow scaling of the bone for IK");
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
- prop= RNA_def_property(srna, "ik_rotation_weight", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "ik_rotation_weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ikrotweight");
RNA_def_property_range(prop, 0.0f,1.0f);
RNA_def_property_ui_text(prop, "IK Rot Weight", "Weight of rotation constraint for IK");
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
- prop= RNA_def_property(srna, "ik_linear_weight", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "ik_linear_weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "iklinweight");
RNA_def_property_range(prop, 0.0f,1.0f);
RNA_def_property_ui_text(prop, "IK Lin Weight", "Weight of scale constraint for IK");
@@ -1012,7 +1012,7 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
/* custom bone shapes */
- prop= RNA_def_property(srna, "custom_shape", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "custom_shape", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "custom");
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -1021,7 +1021,7 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
- prop= RNA_def_property(srna, "custom_shape_transform", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "custom_shape_transform", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "custom_tx");
RNA_def_property_struct_type(prop, "PoseBone");
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -1030,7 +1030,7 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
/* bone groups */
- prop= RNA_def_property(srna, "bone_group_index", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "bone_group_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "agrp_index");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
@@ -1040,7 +1040,7 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
- prop= RNA_def_property(srna, "bone_group", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "bone_group", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "BoneGroup");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, "rna_PoseChannel_bone_group_get", "rna_PoseChannel_bone_group_set", NULL, NULL);
@@ -1049,7 +1049,7 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
/* transform locks */
- prop= RNA_def_property(srna, "lock_location", PROP_BOOLEAN, PROP_XYZ);
+ prop = RNA_def_property(srna, "lock_location", PROP_BOOLEAN, PROP_XYZ);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_LOCX);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Lock Location", "Lock editing of location in the interface");
@@ -1057,7 +1057,7 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
- prop= RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_XYZ);
+ prop = RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_XYZ);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROTX);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Lock Rotation", "Lock editing of rotation in the interface");
@@ -1065,8 +1065,8 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
- // XXX this is sub-optimal - it really should be included above, but due to technical reasons we can't do this!
- prop= RNA_def_property(srna, "lock_rotation_w", PROP_BOOLEAN, PROP_NONE);
+ /* XXX this is sub-optimal - it really should be included above, but due to technical reasons we can't do this! */
+ prop = RNA_def_property(srna, "lock_rotation_w", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROTW);
RNA_def_property_ui_text(prop, "Lock Rotation (4D Angle)",
"Lock editing of 'angle' component of four-component rotations in the interface");
@@ -1074,15 +1074,15 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
- // XXX this needs a better name
- prop= RNA_def_property(srna, "lock_rotations_4d", PROP_BOOLEAN, PROP_NONE);
+ /* XXX this needs a better name */
+ prop = RNA_def_property(srna, "lock_rotations_4d", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROT4D);
RNA_def_property_ui_text(prop, "Lock Rotations (4D)",
"Lock editing of four component rotations by components (instead of as Eulers)");
RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
- prop= RNA_def_property(srna, "lock_scale", PROP_BOOLEAN, PROP_XYZ);
+ prop = RNA_def_property(srna, "lock_scale", PROP_BOOLEAN, PROP_XYZ);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_SCALEX);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Lock Scale", "Lock editing of scale in the interface");
@@ -1095,13 +1095,13 @@ static void rna_def_pose_channel(BlenderRNA *brna)
static void rna_def_pose_itasc(BlenderRNA *brna)
{
- static const EnumPropertyItem prop_itasc_mode_items[]= {
+ static const EnumPropertyItem prop_itasc_mode_items[] = {
{0, "ANIMATION", 0, "Animation",
"Stateless solver computing pose starting from current action and non-IK constraints"},
{ITASC_SIMULATION, "SIMULATION", 0, "Simulation",
"Statefull solver running in real-time context and ignoring actions and non-IK constraints"},
{0, NULL, 0, NULL, NULL}};
- static const EnumPropertyItem prop_itasc_reiteration_items[]= {
+ static const EnumPropertyItem prop_itasc_reiteration_items[] = {
{0, "NEVER", 0, "Never", "The solver does not reiterate, not even on first frame (starts from rest pose)"},
{ITASC_INITIAL_REITERATION, "INITIAL", 0, "Initial",
"The solver reiterates (converges) on the first frame but not on subsequent frame"},
@@ -1112,35 +1112,35 @@ static void rna_def_pose_itasc(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Itasc", "IKParam");
+ srna = RNA_def_struct(brna, "Itasc", "IKParam");
RNA_def_struct_sdna(srna, "bItasc");
RNA_def_struct_ui_text(srna, "bItasc", "Parameters for the iTaSC IK solver");
- prop= RNA_def_property(srna, "precision", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "precision", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "precision");
RNA_def_property_range(prop, 0.0f,0.1f);
RNA_def_property_ui_text(prop, "Precision", "Precision of convergence in case of reiteration");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
- prop= RNA_def_property(srna, "iterations", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "iterations", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "numiter");
RNA_def_property_range(prop, 1.f,1000.f);
RNA_def_property_ui_text(prop, "Iterations", "Maximum number of iterations for convergence in case of reiteration");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
- prop= RNA_def_property(srna, "step_count", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "step_count", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "numstep");
RNA_def_property_range(prop, 1.f, 50.f);
RNA_def_property_ui_text(prop, "Num steps", "Divide the frame interval into this many steps");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
- prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, prop_itasc_mode_items);
RNA_def_property_ui_text(prop, "Mode", NULL);
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update_rebuild");
- prop= RNA_def_property(srna, "reiteration_method", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "reiteration_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, prop_itasc_reiteration_items);
RNA_def_property_ui_text(prop, "Reiteration",
@@ -1148,44 +1148,44 @@ static void rna_def_pose_itasc(BlenderRNA *brna)
"precision is met) on none, first or all frames");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
- prop= RNA_def_property(srna, "use_auto_step", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_auto_step", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", ITASC_AUTO_STEP);
RNA_def_property_ui_text(prop, "Auto step",
"Automatically determine the optimal number of steps for best performance/accuracy trade off");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
- prop= RNA_def_property(srna, "step_min", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "step_min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "minstep");
RNA_def_property_range(prop, 0.0f,0.1f);
RNA_def_property_ui_text(prop, "Min step", "Lower bound for timestep in second in case of automatic substeps");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
- prop= RNA_def_property(srna, "step_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "step_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxstep");
RNA_def_property_range(prop, 0.0f,1.0f);
RNA_def_property_ui_text(prop, "Max step", "Higher bound for timestep in second in case of automatic substeps");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
- prop= RNA_def_property(srna, "feedback", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "feedback", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "feedback");
RNA_def_property_range(prop, 0.0f,100.0f);
RNA_def_property_ui_text(prop, "Feedback",
"Feedback coefficient for error correction, average response time is 1/feedback (default=20)");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
- prop= RNA_def_property(srna, "velocity_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "velocity_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "maxvel");
RNA_def_property_range(prop, 0.0f,100.0f);
RNA_def_property_ui_text(prop, "Max Velocity", "Maximum joint velocity in rad/s (default=50)");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
- prop= RNA_def_property(srna, "solver", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "solver", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "solver");
RNA_def_property_enum_items(prop, prop_solver_items);
RNA_def_property_ui_text(prop, "Solver", "Solving method selection: automatic damping or manual damping");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update_rebuild");
- prop= RNA_def_property(srna, "damping_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "damping_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dampmax");
RNA_def_property_range(prop, 0.0f,1.0f);
RNA_def_property_ui_text(prop, "Damp",
@@ -1193,7 +1193,7 @@ static void rna_def_pose_itasc(BlenderRNA *brna)
"(higher values=more stability, less reactivity - default=0.5)");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
- prop= RNA_def_property(srna, "damping_epsilon", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "damping_epsilon", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dampeps");
RNA_def_property_range(prop, 0.0f,1.0f);
RNA_def_property_ui_text(prop, "Epsilon",
@@ -1207,12 +1207,12 @@ static void rna_def_pose_ikparam(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "IKParam", NULL);
+ srna = RNA_def_struct(brna, "IKParam", NULL);
RNA_def_struct_sdna(srna, "bIKParam");
RNA_def_struct_ui_text(srna, "IKParam", "Base type for IK solver parameters");
RNA_def_struct_refine_func(srna, "rna_IKParam_refine");
- prop= RNA_def_property(srna, "ik_solver", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "ik_solver", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "iksolver");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_enum_items(prop, prop_iksolver_items);
@@ -1225,22 +1225,22 @@ static void rna_def_bone_groups(BlenderRNA *brna, PropertyRNA *cprop)
StructRNA *srna;
PropertyRNA *prop;
-// FunctionRNA *func;
-// PropertyRNA *parm;
+/* FunctionRNA *func; */
+/* PropertyRNA *parm; */
RNA_def_property_srna(cprop, "BoneGroups");
- srna= RNA_def_struct(brna, "BoneGroups", NULL);
+ srna = RNA_def_struct(brna, "BoneGroups", NULL);
RNA_def_struct_sdna(srna, "bPose");
RNA_def_struct_ui_text(srna, "Bone Groups", "Collection of bone groups");
- prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "BoneGroup");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, "rna_Pose_active_bone_group_get", "rna_Pose_active_bone_group_set", NULL, NULL);
RNA_def_property_ui_text(prop, "Active Bone Group", "Active bone group for this pose");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
- prop= RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "active_group");
RNA_def_property_int_funcs(prop, "rna_Pose_active_bone_group_index_get", "rna_Pose_active_bone_group_index_set",
"rna_Pose_active_bone_group_index_range");
@@ -1254,25 +1254,25 @@ static void rna_def_pose(BlenderRNA *brna)
PropertyRNA *prop;
/* struct definition */
- srna= RNA_def_struct(brna, "Pose", NULL);
+ srna = RNA_def_struct(brna, "Pose", NULL);
RNA_def_struct_sdna(srna, "bPose");
RNA_def_struct_ui_text(srna, "Pose", "A collection of pose channels, including settings for animating bones");
/* pose channels */
- prop= RNA_def_property(srna, "bones", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "bones", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "chanbase", NULL);
RNA_def_property_struct_type(prop, "PoseBone");
RNA_def_property_ui_text(prop, "Pose Bones", "Individual pose bones for the armature");
RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, NULL, NULL, NULL, "rna_PoseBones_lookup_string", NULL); /* can be removed, only for fast lookup */
/* bone groups */
- prop= RNA_def_property(srna, "bone_groups", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "bone_groups", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "agroups", NULL);
RNA_def_property_struct_type(prop, "BoneGroup");
RNA_def_property_ui_text(prop, "Bone Groups", "Groups of the bones");
rna_def_bone_groups(brna, prop);
/* ik solvers */
- prop= RNA_def_property(srna, "ik_solver", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "ik_solver", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "iksolver");
RNA_def_property_enum_funcs(prop, NULL, "rna_Pose_ik_solver_set", NULL);
RNA_def_property_enum_items(prop, prop_iksolver_items);
@@ -1280,7 +1280,7 @@ static void rna_def_pose(BlenderRNA *brna)
"Selection of IK solver for IK chain, current choice is 0 for Legacy, 1 for iTaSC");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_ik_solver_update");
- prop= RNA_def_property(srna, "ik_param", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "ik_param", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "IKParam");
RNA_def_property_pointer_funcs(prop, "rna_Pose_ikparam_get", NULL, "rna_Pose_ikparam_typef", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
diff --git a/source/blender/makesrna/intern/rna_pose_api.c b/source/blender/makesrna/intern/rna_pose_api.c
index b8eda7828d5..2720b992874 100644
--- a/source/blender/makesrna/intern/rna_pose_api.c
+++ b/source/blender/makesrna/intern/rna_pose_api.c
@@ -68,13 +68,13 @@ void RNA_api_pose_channel(StructRNA *srna)
PropertyRNA *parm;
FunctionRNA *func;
- func= RNA_def_function(srna, "evaluate_envelope", "rna_PoseBone_do_envelope");
+ func = RNA_def_function(srna, "evaluate_envelope", "rna_PoseBone_do_envelope");
RNA_def_function_ui_description(func, "Calculate bone envelope at given point");
- parm= RNA_def_float_vector_xyz(func, "point", 3, NULL, -FLT_MAX, FLT_MAX, "Point",
+ parm = RNA_def_float_vector_xyz(func, "point", 3, NULL, -FLT_MAX, FLT_MAX, "Point",
"Position in 3d space to evaluate", -FLT_MAX, FLT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return value */
- parm= RNA_def_float(func, "factor", 0, -FLT_MAX, FLT_MAX, "Factor", "Envelope factor", -FLT_MAX, FLT_MAX);
+ parm = RNA_def_float(func, "factor", 0, -FLT_MAX, FLT_MAX, "Factor", "Envelope factor", -FLT_MAX, FLT_MAX);
RNA_def_function_return(func, parm);
}
diff --git a/source/blender/makesrna/intern/rna_property.c b/source/blender/makesrna/intern/rna_property.c
index dfdc175d18b..fd6c45c2828 100644
--- a/source/blender/makesrna/intern/rna_property.c
+++ b/source/blender/makesrna/intern/rna_property.c
@@ -35,7 +35,7 @@
#include "WM_types.h"
-EnumPropertyItem gameproperty_type_items[] ={
+EnumPropertyItem gameproperty_type_items[] = {
{GPROP_BOOL, "BOOL", 0, "Boolean", "Boolean Property"},
{GPROP_INT, "INT", 0, "Integer", "Integer Property"},
{GPROP_FLOAT, "FLOAT", 0, "Float", "Floating-Point Property"},
@@ -50,9 +50,9 @@ EnumPropertyItem gameproperty_type_items[] ={
static StructRNA* rna_GameProperty_refine(struct PointerRNA *ptr)
{
- bProperty *property= (bProperty*)ptr->data;
+ bProperty *property = (bProperty*)ptr->data;
- switch(property->type){
+ switch (property->type){
case GPROP_BOOL:
return &RNA_GameBooleanProperty;
case GPROP_INT:
@@ -71,30 +71,30 @@ static StructRNA* rna_GameProperty_refine(struct PointerRNA *ptr)
/* for both float and timer */
static float rna_GameFloatProperty_value_get(PointerRNA *ptr)
{
- bProperty *prop= (bProperty*)(ptr->data);
+ bProperty *prop = (bProperty*)(ptr->data);
return *(float*)(&prop->data);
}
static void rna_GameFloatProperty_value_set(PointerRNA *ptr, float value)
{
- bProperty *prop= (bProperty*)(ptr->data);
+ bProperty *prop = (bProperty*)(ptr->data);
CLAMP(value, -10000.0f, 10000.0f);
- *(float*)(&prop->data)= value;
+ *(float*)(&prop->data) = value;
}
static void rna_GameProperty_type_set(PointerRNA *ptr, int value)
{
- bProperty *prop= (bProperty*)(ptr->data);
+ bProperty *prop = (bProperty*)(ptr->data);
- if(prop->type != value) {
- prop->type= value;
+ if (prop->type != value) {
+ prop->type = value;
init_property(prop);
}
}
static void rna_GameProperty_name_set(PointerRNA *ptr, const char *value)
{
- bProperty *prop= (bProperty*)(ptr->data);
+ bProperty *prop = (bProperty*)(ptr->data);
BLI_strncpy_utf8(prop->name, value, sizeof(prop->name));
unique_property(NULL, prop, 1);
}
@@ -108,80 +108,80 @@ void RNA_def_gameproperty(BlenderRNA *brna)
PropertyRNA *prop;
/* Base Struct for GameProperty */
- srna= RNA_def_struct(brna, "GameProperty", NULL);
+ srna = RNA_def_struct(brna, "GameProperty", NULL);
RNA_def_struct_ui_text(srna , "Game Property", "Game engine user defined object property");
RNA_def_struct_sdna(srna, "bProperty");
RNA_def_struct_refine_func(srna, "rna_GameProperty_refine");
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "Available as GameObject attributes in the game engine's python API");
RNA_def_struct_name_property(srna, prop);
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_GameProperty_name_set");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, gameproperty_type_items);
RNA_def_property_ui_text(prop, "Type", "");
RNA_def_property_enum_funcs(prop, NULL, "rna_GameProperty_type_set", NULL);
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "show_debug", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_debug", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PROP_DEBUG);
RNA_def_property_ui_text(prop, "Debug", "Print debug information for this property");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* GameBooleanProperty */
- srna= RNA_def_struct(brna, "GameBooleanProperty", "GameProperty");
+ srna = RNA_def_struct(brna, "GameBooleanProperty", "GameProperty");
RNA_def_struct_ui_text(srna , "Game Boolean Property", "Game engine user defined Boolean property");
RNA_def_struct_sdna(srna, "bProperty");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "value", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "value", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "data", 1);
RNA_def_property_ui_text(prop, "Value", "Property value");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* GameIntProperty */
- srna= RNA_def_struct(brna, "GameIntProperty", "GameProperty");
+ srna = RNA_def_struct(brna, "GameIntProperty", "GameProperty");
RNA_def_struct_ui_text(srna , "Game Integer Property", "Game engine user defined integer number property");
RNA_def_struct_sdna(srna, "bProperty");
- prop= RNA_def_property(srna, "value", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "value", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "data");
RNA_def_property_ui_text(prop, "Value", "Property value");
RNA_def_property_range(prop, -10000, 10000);
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* GameFloatProperty */
- srna= RNA_def_struct(brna, "GameFloatProperty", "GameProperty");
+ srna = RNA_def_struct(brna, "GameFloatProperty", "GameProperty");
RNA_def_struct_ui_text(srna, "Game Float Property", "Game engine user defined floating point number property");
RNA_def_struct_sdna(srna, "bProperty");
- prop= RNA_def_property(srna, "value", PROP_FLOAT, PROP_NONE);
- // RNA_def_property_float_sdna(prop, NULL, "data");
+ prop = RNA_def_property(srna, "value", PROP_FLOAT, PROP_NONE);
+ /* RNA_def_property_float_sdna(prop, NULL, "data"); */
RNA_def_property_ui_text(prop, "Value", "Property value");
RNA_def_property_range(prop, -10000, 10000);
RNA_def_property_float_funcs(prop, "rna_GameFloatProperty_value_get", "rna_GameFloatProperty_value_set", NULL);
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* GameTimerProperty */
- srna= RNA_def_struct(brna, "GameTimerProperty", "GameProperty");
+ srna = RNA_def_struct(brna, "GameTimerProperty", "GameProperty");
RNA_def_struct_ui_text(srna, "Game Timer Property", "Game engine user defined timer property");
RNA_def_struct_sdna(srna, "bProperty");
- prop= RNA_def_property(srna, "value", PROP_FLOAT, PROP_NONE);
- // RNA_def_property_float_sdna(prop, NULL, "data");
+ prop = RNA_def_property(srna, "value", PROP_FLOAT, PROP_NONE);
+ /* RNA_def_property_float_sdna(prop, NULL, "data"); */
RNA_def_property_ui_text(prop, "Value", "Property value");
RNA_def_property_range(prop, -10000, 10000);
RNA_def_property_float_funcs(prop, "rna_GameFloatProperty_value_get", "rna_GameFloatProperty_value_set", NULL);
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* GameStringProperty */
- srna= RNA_def_struct(brna, "GameStringProperty", "GameProperty");
+ srna = RNA_def_struct(brna, "GameStringProperty", "GameProperty");
RNA_def_struct_ui_text(srna, "Game String Property", "Game engine user defined text string property");
RNA_def_struct_sdna(srna, "bProperty");
- prop= RNA_def_property(srna, "value", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "value", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "poin");
RNA_def_property_string_maxlength(prop, MAX_PROPSTRING);
RNA_def_property_ui_text(prop, "Value", "Property value");
diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c
index b88e452588e..30cb80ef617 100644
--- a/source/blender/makesrna/intern/rna_render.c
+++ b/source/blender/makesrna/intern/rna_render.c
@@ -68,7 +68,7 @@ static void engine_update(RenderEngine *engine, Main *bmain, Scene *scene)
FunctionRNA *func;
RNA_pointer_create(NULL, engine->type->ext.srna, engine, &ptr);
- func= &rna_RenderEngine_update_func;
+ func = &rna_RenderEngine_update_func;
RNA_parameter_list_create(&list, &ptr, func);
RNA_parameter_set_lookup(&list, "data", &bmain);
@@ -86,7 +86,7 @@ static void engine_render(RenderEngine *engine, struct Scene *scene)
FunctionRNA *func;
RNA_pointer_create(NULL, engine->type->ext.srna, engine, &ptr);
- func= &rna_RenderEngine_render_func;
+ func = &rna_RenderEngine_render_func;
RNA_parameter_list_create(&list, &ptr, func);
RNA_parameter_set_lookup(&list, "scene", &scene);
@@ -103,7 +103,7 @@ static void engine_view_update(RenderEngine *engine, const struct bContext *cont
FunctionRNA *func;
RNA_pointer_create(NULL, engine->type->ext.srna, engine, &ptr);
- func= &rna_RenderEngine_view_update_func;
+ func = &rna_RenderEngine_view_update_func;
RNA_parameter_list_create(&list, &ptr, func);
RNA_parameter_set_lookup(&list, "context", &context);
@@ -120,7 +120,7 @@ static void engine_view_draw(RenderEngine *engine, const struct bContext *contex
FunctionRNA *func;
RNA_pointer_create(NULL, engine->type->ext.srna, engine, &ptr);
- func= &rna_RenderEngine_view_draw_func;
+ func = &rna_RenderEngine_view_draw_func;
RNA_parameter_list_create(&list, &ptr, func);
RNA_parameter_set_lookup(&list, "context", &context);
@@ -133,9 +133,9 @@ static void engine_view_draw(RenderEngine *engine, const struct bContext *contex
static void rna_RenderEngine_unregister(Main *UNUSED(bmain), StructRNA *type)
{
- RenderEngineType *et= RNA_struct_blender_type_get(type);
+ RenderEngineType *et = RNA_struct_blender_type_get(type);
- if(!et)
+ if (!et)
return;
RNA_struct_free_extension(type, &et->ext);
@@ -146,47 +146,47 @@ static void rna_RenderEngine_unregister(Main *UNUSED(bmain), StructRNA *type)
static StructRNA *rna_RenderEngine_register(Main *bmain, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
{
RenderEngineType *et, dummyet = {NULL};
- RenderEngine dummyengine= {NULL};
+ RenderEngine dummyengine = {NULL};
PointerRNA dummyptr;
int have_function[4];
/* setup dummy engine & engine type to store static properties in */
- dummyengine.type= &dummyet;
+ dummyengine.type = &dummyet;
RNA_pointer_create(NULL, &RNA_RenderEngine, &dummyengine, &dummyptr);
/* validate the python class */
- if(validate(&dummyptr, data, have_function) != 0)
+ if (validate(&dummyptr, data, have_function) != 0)
return NULL;
- if(strlen(identifier) >= sizeof(dummyet.idname)) {
+ if (strlen(identifier) >= sizeof(dummyet.idname)) {
BKE_reportf(reports, RPT_ERROR, "registering render engine class: '%s' is too long, maximum length is %d",
identifier, (int)sizeof(dummyet.idname));
return NULL;
}
/* check if we have registered this engine type before, and remove it */
- for(et=R_engines.first; et; et=et->next) {
- if(strcmp(et->idname, dummyet.idname) == 0) {
- if(et->ext.srna)
+ for (et = R_engines.first; et; et = et->next) {
+ if (strcmp(et->idname, dummyet.idname) == 0) {
+ if (et->ext.srna)
rna_RenderEngine_unregister(bmain, et->ext.srna);
break;
}
}
/* create a new engine type */
- et= MEM_callocN(sizeof(RenderEngineType), "python render engine");
+ et = MEM_callocN(sizeof(RenderEngineType), "python render engine");
memcpy(et, &dummyet, sizeof(dummyet));
- et->ext.srna= RNA_def_struct(&BLENDER_RNA, et->idname, "RenderEngine");
- et->ext.data= data;
- et->ext.call= call;
- et->ext.free= free;
+ et->ext.srna = RNA_def_struct(&BLENDER_RNA, et->idname, "RenderEngine");
+ et->ext.data = data;
+ et->ext.call = call;
+ et->ext.free = free;
RNA_struct_blender_type_set(et->ext.srna, et);
- et->update= (have_function[0])? engine_update: NULL;
- et->render= (have_function[1])? engine_render: NULL;
- et->view_update= (have_function[2])? engine_view_update: NULL;
- et->view_draw= (have_function[3])? engine_view_draw: NULL;
+ et->update = (have_function[0])? engine_update: NULL;
+ et->render = (have_function[1])? engine_render: NULL;
+ et->view_update = (have_function[2])? engine_view_update: NULL;
+ et->view_draw = (have_function[3])? engine_view_draw: NULL;
BLI_addtail(&R_engines, et);
@@ -201,67 +201,67 @@ static void **rna_RenderEngine_instance(PointerRNA *ptr)
static StructRNA* rna_RenderEngine_refine(PointerRNA *ptr)
{
- RenderEngine *engine= (RenderEngine*)ptr->data;
+ RenderEngine *engine = (RenderEngine*)ptr->data;
return (engine->type && engine->type->ext.srna)? engine->type->ext.srna: &RNA_RenderEngine;
}
static void rna_RenderResult_layers_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- RenderResult *rr= (RenderResult*)ptr->data;
+ RenderResult *rr = (RenderResult*)ptr->data;
rna_iterator_listbase_begin(iter, &rr->layers, NULL);
}
static void rna_RenderLayer_passes_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- RenderLayer *rl= (RenderLayer*)ptr->data;
+ RenderLayer *rl = (RenderLayer*)ptr->data;
rna_iterator_listbase_begin(iter, &rl->passes, NULL);
}
static int rna_RenderLayer_rect_get_length(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
{
- RenderLayer *rl= (RenderLayer*)ptr->data;
+ RenderLayer *rl = (RenderLayer*)ptr->data;
- length[0]= rl->rectx*rl->recty;
- length[1]= 4;
+ length[0] = rl->rectx*rl->recty;
+ length[1] = 4;
return length[0]*length[1];
}
static void rna_RenderLayer_rect_get(PointerRNA *ptr, float *values)
{
- RenderLayer *rl= (RenderLayer*)ptr->data;
+ RenderLayer *rl = (RenderLayer*)ptr->data;
memcpy(values, rl->rectf, sizeof(float)*rl->rectx*rl->recty*4);
}
void rna_RenderLayer_rect_set(PointerRNA *ptr, const float *values)
{
- RenderLayer *rl= (RenderLayer*)ptr->data;
+ RenderLayer *rl = (RenderLayer*)ptr->data;
memcpy(rl->rectf, values, sizeof(float)*rl->rectx*rl->recty*4);
}
static int rna_RenderPass_rect_get_length(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
{
- RenderPass *rpass= (RenderPass*)ptr->data;
+ RenderPass *rpass = (RenderPass*)ptr->data;
- length[0]= rpass->rectx*rpass->recty;
- length[1]= rpass->channels;
+ length[0] = rpass->rectx*rpass->recty;
+ length[1] = rpass->channels;
return length[0]*length[1];
}
static void rna_RenderPass_rect_get(PointerRNA *ptr, float *values)
{
- RenderPass *rpass= (RenderPass*)ptr->data;
+ RenderPass *rpass = (RenderPass*)ptr->data;
memcpy(values, rpass->rect, sizeof(float)*rpass->rectx*rpass->recty*rpass->channels);
}
void rna_RenderPass_rect_set(PointerRNA *ptr, const float *values)
{
- RenderPass *rpass= (RenderPass*)ptr->data;
+ RenderPass *rpass = (RenderPass*)ptr->data;
memcpy(rpass->rect, values, sizeof(float)*rpass->rectx*rpass->recty*rpass->channels);
}
-#else // RNA_RUNTIME
+#else /* RNA_RUNTIME */
static void rna_def_render_engine(BlenderRNA *brna)
{
@@ -269,31 +269,31 @@ static void rna_def_render_engine(BlenderRNA *brna)
PropertyRNA *prop;
FunctionRNA *func;
- srna= RNA_def_struct(brna, "RenderEngine", NULL);
+ srna = RNA_def_struct(brna, "RenderEngine", NULL);
RNA_def_struct_sdna(srna, "RenderEngine");
RNA_def_struct_ui_text(srna, "Render Engine", "Render engine");
RNA_def_struct_refine_func(srna, "rna_RenderEngine_refine");
RNA_def_struct_register_funcs(srna, "rna_RenderEngine_register", "rna_RenderEngine_unregister", "rna_RenderEngine_instance");
/* final render callbacks */
- func= RNA_def_function(srna, "update", NULL);
+ func = RNA_def_function(srna, "update", NULL);
RNA_def_function_ui_description(func, "Export scene data for render");
RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
RNA_def_pointer(func, "data", "BlendData", "", "");
RNA_def_pointer(func, "scene", "Scene", "", "");
- func= RNA_def_function(srna, "render", NULL);
+ func = RNA_def_function(srna, "render", NULL);
RNA_def_function_ui_description(func, "Render scene into an image");
RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
RNA_def_pointer(func, "scene", "Scene", "", "");
/* viewport render callbacks */
- func= RNA_def_function(srna, "view_update", NULL);
+ func = RNA_def_function(srna, "view_update", NULL);
RNA_def_function_ui_description(func, "Update on data changes for viewport render");
RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
RNA_def_pointer(func, "context", "Context", "", "");
- func= RNA_def_function(srna, "view_draw", NULL);
+ func = RNA_def_function(srna, "view_draw", NULL);
RNA_def_function_ui_description(func, "Draw viewport render");
RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
RNA_def_pointer(func, "context", "Context", "", "");
@@ -306,73 +306,73 @@ static void rna_def_render_engine(BlenderRNA *brna)
RNA_def_function(srna, "tag_update", "engine_tag_update");
RNA_def_function_ui_description(func, "Request update call for viewport rendering");
- func= RNA_def_function(srna, "begin_result", "RE_engine_begin_result");
- prop= RNA_def_int(func, "x", 0, 0, INT_MAX, "X", "", 0, INT_MAX);
+ func = RNA_def_function(srna, "begin_result", "RE_engine_begin_result");
+ prop = RNA_def_int(func, "x", 0, 0, INT_MAX, "X", "", 0, INT_MAX);
RNA_def_property_flag(prop, PROP_REQUIRED);
- prop= RNA_def_int(func, "y", 0, 0, INT_MAX, "Y", "", 0, INT_MAX);
+ prop = RNA_def_int(func, "y", 0, 0, INT_MAX, "Y", "", 0, INT_MAX);
RNA_def_property_flag(prop, PROP_REQUIRED);
- prop= RNA_def_int(func, "w", 0, 0, INT_MAX, "Width", "", 0, INT_MAX);
+ prop = RNA_def_int(func, "w", 0, 0, INT_MAX, "Width", "", 0, INT_MAX);
RNA_def_property_flag(prop, PROP_REQUIRED);
- prop= RNA_def_int(func, "h", 0, 0, INT_MAX, "Height", "", 0, INT_MAX);
+ prop = RNA_def_int(func, "h", 0, 0, INT_MAX, "Height", "", 0, INT_MAX);
RNA_def_property_flag(prop, PROP_REQUIRED);
- prop= RNA_def_pointer(func, "result", "RenderResult", "Result", "");
+ prop = RNA_def_pointer(func, "result", "RenderResult", "Result", "");
RNA_def_function_return(func, prop);
- func= RNA_def_function(srna, "update_result", "RE_engine_update_result");
- prop= RNA_def_pointer(func, "result", "RenderResult", "Result", "");
+ func = RNA_def_function(srna, "update_result", "RE_engine_update_result");
+ prop = RNA_def_pointer(func, "result", "RenderResult", "Result", "");
RNA_def_property_flag(prop, PROP_REQUIRED);
- func= RNA_def_function(srna, "end_result", "RE_engine_end_result");
- prop= RNA_def_pointer(func, "result", "RenderResult", "Result", "");
+ func = RNA_def_function(srna, "end_result", "RE_engine_end_result");
+ prop = RNA_def_pointer(func, "result", "RenderResult", "Result", "");
RNA_def_property_flag(prop, PROP_REQUIRED);
- func= RNA_def_function(srna, "test_break", "RE_engine_test_break");
- prop= RNA_def_boolean(func, "do_break", 0, "Break", "");
+ func = RNA_def_function(srna, "test_break", "RE_engine_test_break");
+ prop = RNA_def_boolean(func, "do_break", 0, "Break", "");
RNA_def_function_return(func, prop);
- func= RNA_def_function(srna, "update_stats", "RE_engine_update_stats");
- prop= RNA_def_string(func, "stats", "", 0, "Stats", "");
+ func = RNA_def_function(srna, "update_stats", "RE_engine_update_stats");
+ prop = RNA_def_string(func, "stats", "", 0, "Stats", "");
RNA_def_property_flag(prop, PROP_REQUIRED);
- prop= RNA_def_string(func, "info", "", 0, "Info", "");
+ prop = RNA_def_string(func, "info", "", 0, "Info", "");
RNA_def_property_flag(prop, PROP_REQUIRED);
- func= RNA_def_function(srna, "update_progress", "RE_engine_update_progress");
- prop= RNA_def_float(func, "progress", 0, 0.0f, 1.0f, "", "Percentage of render that's done", 0.0f, 1.0f);
+ func = RNA_def_function(srna, "update_progress", "RE_engine_update_progress");
+ prop = RNA_def_float(func, "progress", 0, 0.0f, 1.0f, "", "Percentage of render that's done", 0.0f, 1.0f);
RNA_def_property_flag(prop, PROP_REQUIRED);
- func= RNA_def_function(srna, "report", "RE_engine_report");
- prop= RNA_def_enum_flag(func, "type", wm_report_items, 0, "Type", "");
+ func = RNA_def_function(srna, "report", "RE_engine_report");
+ prop = RNA_def_enum_flag(func, "type", wm_report_items, 0, "Type", "");
RNA_def_property_flag(prop, PROP_REQUIRED);
- prop= RNA_def_string(func, "message", "", 0, "Report Message", "");
+ prop = RNA_def_string(func, "message", "", 0, "Report Message", "");
RNA_def_property_flag(prop, PROP_REQUIRED);
RNA_define_verify_sdna(0);
- prop= RNA_def_property(srna, "is_animation", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_animation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", RE_ENGINE_ANIMATION);
- prop= RNA_def_property(srna, "is_preview", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_preview", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", RE_ENGINE_PREVIEW);
/* registration */
- prop= RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "type->idname");
RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);
- prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_TRANSLATE);
+ prop = RNA_def_property(srna, "bl_label", PROP_STRING, PROP_TRANSLATE);
RNA_def_property_string_sdna(prop, NULL, "type->name");
RNA_def_property_flag(prop, PROP_REGISTER);
- prop= RNA_def_property(srna, "bl_use_preview", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "bl_use_preview", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "type->flag", RE_USE_PREVIEW);
RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
- prop= RNA_def_property(srna, "bl_use_postprocess", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "bl_use_postprocess", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "type->flag", RE_USE_POSTPROCESS);
RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
- prop= RNA_def_property(srna, "bl_use_shading_nodes", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "bl_use_shading_nodes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "type->flag", RE_USE_SHADING_NODES);
RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
@@ -385,27 +385,27 @@ static void rna_def_render_result(BlenderRNA *brna)
FunctionRNA *func;
PropertyRNA *parm;
- srna= RNA_def_struct(brna, "RenderResult", NULL);
+ srna = RNA_def_struct(brna, "RenderResult", NULL);
RNA_def_struct_ui_text(srna, "Render Result", "Result of rendering, including all layers and passes");
- func= RNA_def_function(srna, "load_from_file", "RE_result_load_from_file");
+ func = RNA_def_function(srna, "load_from_file", "RE_result_load_from_file");
RNA_def_function_ui_description(func, "Copies the pixels of this render result from an image file");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_string_file_name(func, "filename", "", FILE_MAX, "File Name",
+ parm = RNA_def_string_file_name(func, "filename", "", FILE_MAX, "File Name",
"Filename to load into this render tile, must be no smaller than the render result");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_define_verify_sdna(0);
- parm= RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE);
+ parm = RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(parm, NULL, "rectx");
RNA_def_property_clear_flag(parm, PROP_EDITABLE);
- parm= RNA_def_property(srna, "resolution_y", PROP_INT, PROP_NONE);
+ parm = RNA_def_property(srna, "resolution_y", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(parm, NULL, "recty");
RNA_def_property_clear_flag(parm, PROP_EDITABLE);
- parm= RNA_def_property(srna, "layers", PROP_COLLECTION, PROP_NONE);
+ parm = RNA_def_property(srna, "layers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(parm, "RenderLayer");
RNA_def_property_collection_funcs(parm, "rna_RenderResult_layers_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", NULL, NULL, NULL, NULL);
@@ -418,13 +418,13 @@ static void rna_def_render_layer(BlenderRNA *brna)
PropertyRNA *prop;
FunctionRNA *func;
- srna= RNA_def_struct(brna, "RenderLayer", NULL);
+ srna = RNA_def_struct(brna, "RenderLayer", NULL);
RNA_def_struct_ui_text(srna, "Render Layer", "");
- func= RNA_def_function(srna, "load_from_file", "RE_layer_load_from_file");
+ func = RNA_def_function(srna, "load_from_file", "RE_layer_load_from_file");
RNA_def_function_ui_description(func, "Copies the pixels of this renderlayer from an image file");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- prop= RNA_def_string(func, "filename", "", 0, "Filename",
+ prop = RNA_def_string(func, "filename", "", 0, "Filename",
"Filename to load into this render tile, must be no smaller than the renderlayer");
RNA_def_property_flag(prop, PROP_REQUIRED);
RNA_def_int(func, "x", 0, 0, INT_MAX, "Offset X",
@@ -436,11 +436,11 @@ static void rna_def_render_layer(BlenderRNA *brna)
rna_def_render_layer_common(srna, 0);
- prop= RNA_def_property(srna, "passes", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "passes", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "RenderPass");
RNA_def_property_collection_funcs(prop, "rna_RenderLayer_passes_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", NULL, NULL, NULL, NULL);
- prop= RNA_def_property(srna, "rect", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "rect", PROP_FLOAT, PROP_NONE);
RNA_def_property_flag(prop, PROP_DYNAMIC);
RNA_def_property_multi_array(prop, 2, NULL);
RNA_def_property_dynamic_array_funcs(prop, "rna_RenderLayer_rect_get_length");
@@ -454,7 +454,7 @@ static void rna_def_render_pass(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem pass_type_items[]= {
+ static EnumPropertyItem pass_type_items[] = {
{SCE_PASS_COMBINED, "COMBINED", 0, "Combined", ""},
{SCE_PASS_Z, "Z", 0, "Z", ""},
{SCE_PASS_RGBA, "COLOR", 0, "Color", ""},
@@ -483,30 +483,30 @@ static void rna_def_render_pass(BlenderRNA *brna)
{SCE_PASS_TRANSM_COLOR, "TRANSMISSION_COLOR", 0, "Transmission Color", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "RenderPass", NULL);
+ srna = RNA_def_struct(brna, "RenderPass", NULL);
RNA_def_struct_ui_text(srna, "Render Pass", "");
RNA_define_verify_sdna(0);
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_struct_name_property(srna, prop);
- prop= RNA_def_property(srna, "channel_id", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "channel_id", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "chan_id");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "channels", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "channels", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "channels");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "passtype");
RNA_def_property_enum_items(prop, pass_type_items);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "rect", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "rect", PROP_FLOAT, PROP_NONE);
RNA_def_property_flag(prop, PROP_DYNAMIC);
RNA_def_property_multi_array(prop, 2, NULL);
RNA_def_property_dynamic_array_funcs(prop, "rna_RenderPass_rect_get_length");
@@ -523,5 +523,5 @@ void RNA_def_render(BlenderRNA *brna)
rna_def_render_pass(brna);
}
-#endif // RNA_RUNTIME
+#endif /* RNA_RUNTIME */
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index 676d5f2c44f..153e9288375 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -150,24 +150,24 @@ static PointerRNA rna_Struct_name_property_get(PointerRNA *ptr)
static int rna_idproperty_known(CollectionPropertyIterator *iter, void *data)
{
- IDProperty *idprop= (IDProperty*)data;
+ IDProperty *idprop = (IDProperty*)data;
PropertyRNA *prop;
- StructRNA *ptype= iter->builtin_parent.type;
+ StructRNA *ptype = iter->builtin_parent.type;
/* function to skip any id properties that are already known by RNA,
* for the second loop where we go over unknown id properties */
do {
- for(prop= ptype->cont.properties.first; prop; prop=prop->next)
- if((prop->flag & PROP_BUILTIN) == 0 && strcmp(prop->identifier, idprop->name) == 0)
+ for (prop = ptype->cont.properties.first; prop; prop = prop->next)
+ if ((prop->flag & PROP_BUILTIN) == 0 && strcmp(prop->identifier, idprop->name) == 0)
return 1;
- } while((ptype=ptype->base));
+ } while ((ptype = ptype->base));
return 0;
}
static int rna_property_builtin(CollectionPropertyIterator *UNUSED(iter), void *data)
{
- PropertyRNA *prop= (PropertyRNA*)data;
+ PropertyRNA *prop = (PropertyRNA*)data;
/* function to skip builtin rna properties */
@@ -176,7 +176,7 @@ static int rna_property_builtin(CollectionPropertyIterator *UNUSED(iter), void *
static int rna_function_builtin(CollectionPropertyIterator *UNUSED(iter), void *data)
{
- FunctionRNA *func= (FunctionRNA*)data;
+ FunctionRNA *func = (FunctionRNA*)data;
/* function to skip builtin rna functions */
@@ -186,14 +186,14 @@ static int rna_function_builtin(CollectionPropertyIterator *UNUSED(iter), void *
static void rna_inheritance_next_level_restart(CollectionPropertyIterator *iter, IteratorSkipFunc skip, int funcs)
{
/* RNA struct inheritance */
- while(!iter->valid && iter->level > 0) {
+ while (!iter->valid && iter->level > 0) {
StructRNA *srna;
int i;
- srna= (StructRNA*)iter->parent.data;
+ srna = (StructRNA*)iter->parent.data;
iter->level--;
- for(i=iter->level; i>0; i--)
- srna= srna->base;
+ for (i = iter->level; i>0; i--)
+ srna = srna->base;
rna_iterator_listbase_end(iter);
@@ -230,10 +230,10 @@ static void rna_inheritance_functions_listbase_next(CollectionPropertyIterator *
static void rna_Struct_properties_next(CollectionPropertyIterator *iter)
{
- ListBaseIterator *internal= iter->internal;
+ ListBaseIterator *internal = iter->internal;
IDProperty *group;
- if(internal->flag) {
+ if (internal->flag) {
/* id properties */
rna_iterator_listbase_next(iter);
}
@@ -242,14 +242,14 @@ static void rna_Struct_properties_next(CollectionPropertyIterator *iter)
rna_inheritance_properties_listbase_next(iter, rna_property_builtin);
/* try id properties */
- if(!iter->valid) {
- group= RNA_struct_idprops(&iter->builtin_parent, 0);
+ if (!iter->valid) {
+ group = RNA_struct_idprops(&iter->builtin_parent, 0);
- if(group) {
+ if (group) {
rna_iterator_listbase_end(iter);
rna_iterator_listbase_begin(iter, &group->data.group, rna_idproperty_known);
- internal= iter->internal;
- internal->flag= 1;
+ internal = iter->internal;
+ internal->flag = 1;
}
}
}
@@ -260,11 +260,11 @@ static void rna_Struct_properties_begin(CollectionPropertyIterator *iter, Pointe
StructRNA *srna;
/* here ptr->data should always be the same as iter->parent.type */
- srna= (StructRNA *)ptr->data;
+ srna = (StructRNA *)ptr->data;
- while(srna->base) {
+ while (srna->base) {
iter->level++;
- srna= srna->base;
+ srna = srna->base;
}
rna_inheritance_properties_listbase_begin(iter, &srna->cont.properties, rna_property_builtin);
@@ -272,7 +272,7 @@ static void rna_Struct_properties_begin(CollectionPropertyIterator *iter, Pointe
static PointerRNA rna_Struct_properties_get(CollectionPropertyIterator *iter)
{
- ListBaseIterator *internal= iter->internal;
+ ListBaseIterator *internal = iter->internal;
/* we return either PropertyRNA* or IDProperty*, the rna_access.c
* functions can handle both as PropertyRNA* with some tricks */
@@ -289,11 +289,11 @@ static void rna_Struct_functions_begin(CollectionPropertyIterator *iter, Pointer
StructRNA *srna;
/* here ptr->data should always be the same as iter->parent.type */
- srna= (StructRNA *)ptr->data;
+ srna = (StructRNA *)ptr->data;
- while(srna->base) {
+ while (srna->base) {
iter->level++;
- srna= srna->base;
+ srna = srna->base;
}
rna_inheritance_functions_listbase_begin(iter, &srna->functions, rna_function_builtin);
@@ -301,7 +301,7 @@ static void rna_Struct_functions_begin(CollectionPropertyIterator *iter, Pointer
static PointerRNA rna_Struct_functions_get(CollectionPropertyIterator *iter)
{
- ListBaseIterator *internal= iter->internal;
+ ListBaseIterator *internal = iter->internal;
/* we return either PropertyRNA* or IDProperty*, the rna_access.c
* functions can handle both as PropertyRNA* with some tricks */
@@ -317,15 +317,15 @@ void rna_builtin_properties_begin(CollectionPropertyIterator *iter, PointerRNA *
PointerRNA newptr;
/* we create a new pointer with the type as the data */
- newptr.type= &RNA_Struct;
- newptr.data= ptr->type;
+ newptr.type = &RNA_Struct;
+ newptr.data = ptr->type;
- if(ptr->type->flag & STRUCT_ID)
- newptr.id.data= ptr->data;
+ if (ptr->type->flag & STRUCT_ID)
+ newptr.id.data = ptr->data;
else
- newptr.id.data= NULL;
+ newptr.id.data = NULL;
- iter->parent= newptr;
+ iter->parent = newptr;
iter->builtin_parent = *ptr;
rna_Struct_properties_begin(iter, &newptr);
@@ -345,51 +345,51 @@ int rna_builtin_properties_lookup_string(PointerRNA *ptr, const char *key, Point
{
StructRNA *srna;
PropertyRNA *prop;
- PointerRNA propptr= {{NULL}};
+ PointerRNA propptr = {{NULL}};
- srna= ptr->type;
+ srna = ptr->type;
do {
- if(srna->cont.prophash) {
- prop= BLI_ghash_lookup(srna->cont.prophash, (void*)key);
+ if (srna->cont.prophash) {
+ prop = BLI_ghash_lookup(srna->cont.prophash, (void*)key);
- if(prop) {
- propptr.type= &RNA_Property;
- propptr.data= prop;
+ if (prop) {
+ propptr.type = &RNA_Property;
+ propptr.data = prop;
- *r_ptr= propptr;
+ *r_ptr = propptr;
return TRUE;
}
}
else {
- for(prop=srna->cont.properties.first; prop; prop=prop->next) {
- if(!(prop->flag & PROP_BUILTIN) && strcmp(prop->identifier, key)==0) {
- propptr.type= &RNA_Property;
- propptr.data= prop;
+ for (prop = srna->cont.properties.first; prop; prop = prop->next) {
+ if (!(prop->flag & PROP_BUILTIN) && strcmp(prop->identifier, key) == 0) {
+ propptr.type = &RNA_Property;
+ propptr.data = prop;
- *r_ptr= propptr;
+ *r_ptr = propptr;
return TRUE;
}
}
}
- } while((srna=srna->base));
+ } while ((srna = srna->base));
/* this was used pre 2.5beta0, now ID property access uses python's
* getitem style access
* - ob["foo"] rather than ob.foo */
#if 0
- if(ptr->data) {
+ if (ptr->data) {
IDProperty *group, *idp;
- group= RNA_struct_idprops(ptr, 0);
+ group = RNA_struct_idprops(ptr, 0);
- if(group) {
- for(idp=group->data.group.first; idp; idp=idp->next) {
- if(strcmp(idp->name, key) == 0) {
- propptr.type= &RNA_Property;
- propptr.data= idp;
+ if (group) {
+ for (idp = group->data.group.first; idp; idp = idp->next) {
+ if (strcmp(idp->name, key) == 0) {
+ propptr.type = &RNA_Property;
+ propptr.data = idp;
- *r_ptr= propptr;
+ *r_ptr = propptr;
return TRUE;
}
}
@@ -408,11 +408,11 @@ PointerRNA rna_builtin_type_get(PointerRNA *ptr)
static StructRNA *rna_Property_refine(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr); /* XXX ptr? */
- switch(prop->type) {
+ switch (prop->type) {
case PROP_BOOLEAN: return &RNA_BoolProperty;
case PROP_INT: return &RNA_IntProperty;
case PROP_FLOAT: return &RNA_FloatProperty;
@@ -426,354 +426,354 @@ static StructRNA *rna_Property_refine(PointerRNA *ptr)
static void rna_Property_identifier_get(PointerRNA *ptr, char *value)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
strcpy(value, ((PropertyRNA*)prop)->identifier);
}
static int rna_Property_identifier_length(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
return strlen(prop->identifier);
}
static void rna_Property_name_get(PointerRNA *ptr, char *value)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
strcpy(value, prop->name);
}
static int rna_Property_name_length(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
return strlen(prop->name);
}
static void rna_Property_description_get(PointerRNA *ptr, char *value)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
strcpy(value, prop->description ? prop->description:"");
}
static int rna_Property_description_length(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
return prop->description ? strlen(prop->description) : 0;
}
static void rna_Property_translation_context_get(PointerRNA *ptr, char *value)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
strcpy(value, prop->translation_context ? prop->translation_context:"");
}
static int rna_Property_translation_context_length(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
return prop->translation_context ? strlen(prop->translation_context) : 0;
}
static int rna_Property_type_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
return prop->type;
}
static int rna_Property_subtype_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
return prop->subtype;
}
static PointerRNA rna_Property_srna_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
return rna_pointer_inherit_refine(ptr, &RNA_Struct, prop->srna);
}
static int rna_Property_unit_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
return RNA_SUBTYPE_UNIT(prop->subtype);
}
static int rna_Property_readonly_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
/* dont use this becaure it will call functions that check the internal
* data for introspection we only need to know if it can be edited so the
* flag is better for this */
-// return RNA_property_editable(ptr, prop);
+/* return RNA_property_editable(ptr, prop); */
return prop->flag & PROP_EDITABLE ? 0:1;
}
static int rna_Property_animatable_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
return (prop->flag & PROP_ANIMATABLE) != 0;
}
static int rna_Property_use_output_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
return prop->flag & PROP_OUTPUT ? 1:0;
}
static int rna_Property_is_required_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
return prop->flag & PROP_REQUIRED ? 1:0;
}
static int rna_Property_is_never_none_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
return prop->flag & PROP_NEVER_NULL ? 1:0;
}
static int rna_Property_is_hidden_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
return prop->flag & PROP_HIDDEN ? 1:0;
}
static int rna_Property_is_skip_save_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
return prop->flag & PROP_SKIP_SAVE ? 1:0;
}
static int rna_Property_is_enum_flag_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
return prop->flag & PROP_ENUM_FLAG ? 1:0;
}
static int rna_Property_array_length_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
return prop->totarraylength;
}
static int rna_Property_registered_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
return prop->flag & PROP_REGISTER;
}
static int rna_Property_registered_optional_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
return prop->flag & PROP_REGISTER_OPTIONAL;
}
static int rna_Property_runtime_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
return prop->flag & PROP_RUNTIME;
}
static int rna_BoolProperty_default_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
return ((BoolPropertyRNA*)prop)->defaultvalue;
}
static int rna_IntProperty_default_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
return ((IntPropertyRNA*)prop)->defaultvalue;
}
/* int/float/bool */
static int rna_NumberProperty_default_array_get_length(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
- length[0]= prop->totarraylength;
+ length[0] = prop->totarraylength;
return length[0];
}
static void rna_IntProperty_default_array_get(PointerRNA *ptr, int *values)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
- IntPropertyRNA *nprop= (IntPropertyRNA*)prop;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
+ IntPropertyRNA *nprop = (IntPropertyRNA*)prop;
rna_idproperty_check(&prop, ptr);
- if(nprop->defaultarray) {
+ if (nprop->defaultarray) {
memcpy(values, nprop->defaultarray, prop->totarraylength * sizeof(int));
}
else {
int i;
- for(i=0; i < prop->totarraylength; i++)
- values[i]= nprop->defaultvalue;
+ for (i = 0; i < prop->totarraylength; i++)
+ values[i] = nprop->defaultvalue;
}
}
static void rna_BoolProperty_default_array_get(PointerRNA *ptr, int *values)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
- BoolPropertyRNA *nprop= (BoolPropertyRNA*)prop;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
+ BoolPropertyRNA *nprop = (BoolPropertyRNA*)prop;
rna_idproperty_check(&prop, ptr);
- if(nprop->defaultarray) {
+ if (nprop->defaultarray) {
memcpy(values, nprop->defaultarray, prop->totarraylength * sizeof(int));
}
else {
int i;
- for(i=0; i < prop->totarraylength; i++)
- values[i]= nprop->defaultvalue;
+ for (i = 0; i < prop->totarraylength; i++)
+ values[i] = nprop->defaultvalue;
}
}
static void rna_FloatProperty_default_array_get(PointerRNA *ptr, float *values)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
- FloatPropertyRNA *nprop= (FloatPropertyRNA*)prop;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
+ FloatPropertyRNA *nprop = (FloatPropertyRNA*)prop;
rna_idproperty_check(&prop, ptr);
- if(nprop->defaultarray) {
+ if (nprop->defaultarray) {
memcpy(values, nprop->defaultarray, prop->totarraylength * sizeof(float));
}
else {
int i;
- for(i=0; i < prop->totarraylength; i++)
- values[i]= nprop->defaultvalue;
+ for (i = 0; i < prop->totarraylength; i++)
+ values[i] = nprop->defaultvalue;
}
}
static int rna_IntProperty_hard_min_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
return ((IntPropertyRNA*)prop)->hardmin;
}
static int rna_IntProperty_hard_max_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
return ((IntPropertyRNA*)prop)->hardmax;
}
static int rna_IntProperty_soft_min_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
return ((IntPropertyRNA*)prop)->softmin;
}
static int rna_IntProperty_soft_max_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
return ((IntPropertyRNA*)prop)->softmax;
}
static int rna_IntProperty_step_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
return ((IntPropertyRNA*)prop)->step;
}
static float rna_FloatProperty_default_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
return ((FloatPropertyRNA*)prop)->defaultvalue;
}
static float rna_FloatProperty_hard_min_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
return ((FloatPropertyRNA*)prop)->hardmin;
}
static float rna_FloatProperty_hard_max_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
return ((FloatPropertyRNA*)prop)->hardmax;
}
static float rna_FloatProperty_soft_min_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
return ((FloatPropertyRNA*)prop)->softmin;
}
static float rna_FloatProperty_soft_max_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
return ((FloatPropertyRNA*)prop)->softmax;
}
static float rna_FloatProperty_step_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
return ((FloatPropertyRNA*)prop)->step;
}
static int rna_FloatProperty_precision_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
return ((FloatPropertyRNA*)prop)->precision;
}
static void rna_StringProperty_default_get(PointerRNA *ptr, char *value)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
strcpy(value, ((StringPropertyRNA*)prop)->defaultvalue);
}
static int rna_StringProperty_default_length(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
return strlen(((StringPropertyRNA*)prop)->defaultvalue);
}
static int rna_StringProperty_max_length_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
return ((StringPropertyRNA*)prop)->maxlength;
}
static EnumPropertyItem *rna_EnumProperty_default_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *prop_parent, int *free)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
EnumPropertyRNA *eprop;
rna_idproperty_check(&prop, ptr);
- eprop= (EnumPropertyRNA*)prop;
+ eprop = (EnumPropertyRNA*)prop;
/* incompatible default attributes */
if ((prop_parent->flag & PROP_ENUM_FLAG) != (prop->flag & PROP_ENUM_FLAG)) {
return NULL;
}
- if( (eprop->itemf == NULL) ||
+ if ( (eprop->itemf == NULL) ||
(eprop->itemf == rna_EnumProperty_default_itemf) ||
(ptr->type == &RNA_EnumProperty) ||
(C == NULL))
@@ -787,27 +787,27 @@ static EnumPropertyItem *rna_EnumProperty_default_itemf(bContext *C, PointerRNA
/* XXX - not sure this is needed? */
static int rna_EnumProperty_default_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
return ((EnumPropertyRNA*)prop)->defaultvalue;
}
static int rna_enum_check_separator(CollectionPropertyIterator *UNUSED(iter), void *data)
{
- EnumPropertyItem *item= (EnumPropertyItem*)data;
+ EnumPropertyItem *item = (EnumPropertyItem*)data;
return (item->identifier[0] == 0);
}
static void rna_EnumProperty_items_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
- // EnumPropertyRNA *eprop; // UNUSED
- EnumPropertyItem *item= NULL;
- int totitem, free= 0;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
+ /* EnumPropertyRNA *eprop; *//* UNUSED */
+ EnumPropertyItem *item = NULL;
+ int totitem, free = 0;
rna_idproperty_check(&prop, ptr);
- // eprop= (EnumPropertyRNA*)prop;
+ /* eprop= (EnumPropertyRNA*)prop; */
RNA_property_enum_items(NULL, ptr, prop, &item, &totitem, &free);
rna_iterator_array_begin(iter, (void*)item, sizeof(EnumPropertyItem), totitem, free, rna_enum_check_separator);
@@ -835,19 +835,19 @@ static int rna_EnumPropertyItem_name_length(PointerRNA *ptr)
static void rna_EnumPropertyItem_description_get(PointerRNA *ptr, char *value)
{
- EnumPropertyItem *eprop= (EnumPropertyItem*)ptr->data;
+ EnumPropertyItem *eprop = (EnumPropertyItem*)ptr->data;
- if(eprop->description)
+ if (eprop->description)
strcpy(value, eprop->description);
else
- value[0]= '\0';
+ value[0] = '\0';
}
static int rna_EnumPropertyItem_description_length(PointerRNA *ptr)
{
- EnumPropertyItem *eprop= (EnumPropertyItem*)ptr->data;
+ EnumPropertyItem *eprop = (EnumPropertyItem*)ptr->data;
- if(eprop->description)
+ if (eprop->description)
return strlen(eprop->description);
else
return 0;
@@ -860,14 +860,14 @@ static int rna_EnumPropertyItem_value_get(PointerRNA *ptr)
static PointerRNA rna_PointerProperty_fixed_type_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
return rna_pointer_inherit_refine(ptr, &RNA_Struct, ((PointerPropertyRNA*)prop)->type);
}
static PointerRNA rna_CollectionProperty_fixed_type_get(PointerRNA *ptr)
{
- PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ PropertyRNA *prop = (PropertyRNA*)ptr->data;
rna_idproperty_check(&prop, ptr);
return rna_pointer_inherit_refine(ptr, &RNA_Struct, ((CollectionPropertyRNA*)prop)->item_type);
}
@@ -901,19 +901,19 @@ static void rna_Function_parameters_begin(CollectionPropertyIterator *iter, Poin
static int rna_Function_registered_get(PointerRNA *ptr)
{
- FunctionRNA *func= (FunctionRNA*)ptr->data;
+ FunctionRNA *func = (FunctionRNA*)ptr->data;
return func->flag & FUNC_REGISTER;
}
static int rna_Function_registered_optional_get(PointerRNA *ptr)
{
- FunctionRNA *func= (FunctionRNA*)ptr->data;
+ FunctionRNA *func = (FunctionRNA*)ptr->data;
return func->flag & FUNC_REGISTER_OPTIONAL;
}
static int rna_Function_no_self_get(PointerRNA *ptr)
{
- FunctionRNA *func= (FunctionRNA*)ptr->data;
+ FunctionRNA *func = (FunctionRNA*)ptr->data;
return !(func->flag & FUNC_NO_SELF);
}
@@ -931,9 +931,9 @@ static int rna_BlenderRNA_structs_length(PointerRNA *ptr)
}
static int rna_BlenderRNA_structs_lookup_int(PointerRNA *ptr, int index, PointerRNA *r_ptr)
{
- StructRNA *srna= BLI_findlink(&((BlenderRNA*)ptr->data)->structs, index);
+ StructRNA *srna = BLI_findlink(&((BlenderRNA*)ptr->data)->structs, index);
- if(srna) {
+ if (srna) {
RNA_pointer_create(NULL, &RNA_Struct, srna, r_ptr);
return TRUE;
}
@@ -943,9 +943,9 @@ static int rna_BlenderRNA_structs_lookup_int(PointerRNA *ptr, int index, Pointer
}
static int rna_BlenderRNA_structs_lookup_string(PointerRNA *ptr, const char *key, PointerRNA *r_ptr)
{
- StructRNA *srna= ((BlenderRNA*)ptr->data)->structs.first;
- for(; srna; srna=srna->cont.next) {
- if(key[0] == srna->identifier[0] && strcmp(key, srna->identifier)==0) {
+ StructRNA *srna = ((BlenderRNA*)ptr->data)->structs.first;
+ for (; srna; srna = srna->cont.next) {
+ if (key[0] == srna->identifier[0] && strcmp(key, srna->identifier) == 0) {
RNA_pointer_create(NULL, &RNA_Struct, srna, r_ptr);
return TRUE;
}
@@ -962,51 +962,51 @@ static void rna_def_struct(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Struct", NULL);
+ srna = RNA_def_struct(brna, "Struct", NULL);
RNA_def_struct_ui_text(srna, "Struct Definition", "RNA structure definition");
RNA_def_struct_ui_icon(srna, ICON_RNA);
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_Struct_name_get", "rna_Struct_name_length", NULL);
RNA_def_property_ui_text(prop, "Name", "Human readable name");
- prop= RNA_def_property(srna, "identifier", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "identifier", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_Struct_identifier_get", "rna_Struct_identifier_length", NULL);
RNA_def_property_ui_text(prop, "Identifier", "Unique name used in the code and scripting");
RNA_def_struct_name_property(srna, prop);
- prop= RNA_def_property(srna, "description", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "description", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_Struct_description_get", "rna_Struct_description_length", NULL);
RNA_def_property_ui_text(prop, "Description", "Description of the Struct's purpose");
- prop= RNA_def_property(srna, "base", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "base", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Struct");
RNA_def_property_pointer_funcs(prop, "rna_Struct_base_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Base", "Struct definition this is derived from");
- prop= RNA_def_property(srna, "nested", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "nested", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Struct");
RNA_def_property_pointer_funcs(prop, "rna_Struct_nested_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Nested", "Struct in which this struct is always nested, and to which it logically belongs");
- prop= RNA_def_property(srna, "name_property", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "name_property", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "StringProperty");
RNA_def_property_pointer_funcs(prop, "rna_Struct_name_property_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Name Property", "Property that gives the name of the struct");
- prop= RNA_def_property(srna, "properties", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "properties", PROP_COLLECTION, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Property");
RNA_def_property_collection_funcs(prop, "rna_Struct_properties_begin", "rna_Struct_properties_next", "rna_iterator_listbase_end", "rna_Struct_properties_get", NULL, NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Properties", "Properties in the struct");
- prop= RNA_def_property(srna, "functions", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "functions", PROP_COLLECTION, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Function");
RNA_def_property_collection_funcs(prop, "rna_Struct_functions_begin", "rna_Struct_functions_next", "rna_iterator_listbase_end", "rna_Struct_functions_get", NULL, NULL, NULL, NULL);
@@ -1040,107 +1040,107 @@ static void rna_def_property(BlenderRNA *brna)
{PROP_LAYER_MEMBER, "LAYER_MEMBERSHIP", 0, "Layer Membership", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "Property", NULL);
+ srna = RNA_def_struct(brna, "Property", NULL);
RNA_def_struct_ui_text(srna, "Property Definition", "RNA property definition");
RNA_def_struct_refine_func(srna, "rna_Property_refine");
RNA_def_struct_ui_icon(srna, ICON_RNA);
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_Property_name_get", "rna_Property_name_length", NULL);
RNA_def_property_ui_text(prop, "Name", "Human readable name");
- prop= RNA_def_property(srna, "identifier", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "identifier", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_Property_identifier_get", "rna_Property_identifier_length", NULL);
RNA_def_property_ui_text(prop, "Identifier", "Unique name used in the code and scripting");
RNA_def_struct_name_property(srna, prop);
- prop= RNA_def_property(srna, "description", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "description", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_Property_description_get", "rna_Property_description_length", NULL);
RNA_def_property_ui_text(prop, "Description", "Description of the property for tooltips");
- prop= RNA_def_property(srna, "translation_context", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "translation_context", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_Property_translation_context_get", "rna_Property_translation_context_length", NULL);
RNA_def_property_ui_text(prop, "Translation Context", "Translation context of the property");
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_enum_items(prop, property_type_items);
RNA_def_property_enum_funcs(prop, "rna_Property_type_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Type", "Data type of the property");
- prop= RNA_def_property(srna, "subtype", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "subtype", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_enum_items(prop, subtype_items);
RNA_def_property_enum_funcs(prop, "rna_Property_subtype_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Subtype", "Semantic interpretation of the property");
- prop= RNA_def_property(srna, "srna", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "srna", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Struct");
RNA_def_property_pointer_funcs(prop, "rna_Property_srna_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Base", "Struct definition used for properties assigned to this item");
- prop= RNA_def_property(srna, "unit", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "unit", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_enum_items(prop, property_unit_items);
RNA_def_property_enum_funcs(prop, "rna_Property_unit_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Unit", "Type of units for this property");
- prop= RNA_def_property(srna, "is_readonly", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_readonly", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Property_readonly_get", NULL);
RNA_def_property_ui_text(prop, "Read Only", "Property is editable through RNA");
- prop= RNA_def_property(srna, "is_animatable", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_animatable", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Property_animatable_get", NULL);
RNA_def_property_ui_text(prop, "Animatable", "Property is animatable through RNA");
- prop= RNA_def_property(srna, "is_required", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_required", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Property_is_required_get", NULL);
RNA_def_property_ui_text(prop, "Required", "False when this property is an optional argument in an RNA function");
- prop= RNA_def_property(srna, "is_never_none", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_never_none", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Property_is_never_none_get", NULL);
RNA_def_property_ui_text(prop, "Never None", "True when this value can't be set to None");
- prop= RNA_def_property(srna, "is_hidden", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_hidden", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Property_is_hidden_get", NULL);
RNA_def_property_ui_text(prop, "Hidden", "True when the property is hidden");
- prop= RNA_def_property(srna, "is_skip_save", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_skip_save", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Property_is_skip_save_get", NULL);
RNA_def_property_ui_text(prop, "Skip Save", "True when the property is not saved in presets");
- prop= RNA_def_property(srna, "is_output", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_output", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Property_use_output_get", NULL);
RNA_def_property_ui_text(prop, "Return", "True when this property is an output value from an RNA function");
- prop= RNA_def_property(srna, "is_registered", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_registered", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Property_registered_get", NULL);
RNA_def_property_ui_text(prop, "Registered", "Property is registered as part of type registration");
- prop= RNA_def_property(srna, "is_registered_optional", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_registered_optional", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Property_registered_optional_get", NULL);
RNA_def_property_ui_text(prop, "Registered Optionally", "Property is optionally registered as part of type registration");
- prop= RNA_def_property(srna, "is_runtime", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_runtime", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Property_runtime_get", NULL);
RNA_def_property_ui_text(prop, "Runtime", "Property has been dynamically created at runtime");
- prop= RNA_def_property(srna, "is_enum_flag", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_enum_flag", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Property_is_enum_flag_get", NULL);
RNA_def_property_ui_text(prop, "Enum Flag", "True when multiple enums ");
@@ -1151,38 +1151,38 @@ static void rna_def_function(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Function", NULL);
+ srna = RNA_def_struct(brna, "Function", NULL);
RNA_def_struct_ui_text(srna, "Function Definition", "RNA function definition");
RNA_def_struct_ui_icon(srna, ICON_RNA);
- prop= RNA_def_property(srna, "identifier", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "identifier", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_Function_identifier_get", "rna_Function_identifier_length", NULL);
RNA_def_property_ui_text(prop, "Identifier", "Unique name used in the code and scripting");
RNA_def_struct_name_property(srna, prop);
- prop= RNA_def_property(srna, "description", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "description", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_Function_description_get", "rna_Function_description_length", NULL);
RNA_def_property_ui_text(prop, "Description", "Description of the Function's purpose");
- prop= RNA_def_property(srna, "parameters", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "parameters", PROP_COLLECTION, PROP_NONE);
/*RNA_def_property_clear_flag(prop, PROP_EDITABLE);*/
RNA_def_property_struct_type(prop, "Property");
RNA_def_property_collection_funcs(prop, "rna_Function_parameters_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", NULL, NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Parameters", "Parameters for the function");
- prop= RNA_def_property(srna, "is_registered", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_registered", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Function_registered_get", NULL);
RNA_def_property_ui_text(prop, "Registered", "Function is registered as callback as part of type registration");
- prop= RNA_def_property(srna, "is_registered_optional", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_registered_optional", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Function_registered_optional_get", NULL);
RNA_def_property_ui_text(prop, "Registered Optionally", "Function is optionally registered as callback part of type registration");
- prop= RNA_def_property(srna, "use_self", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_self", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Function_no_self_get", NULL);
RNA_def_property_ui_text(prop, "No Self", "Function does not pass its self as an argument (becomes a class method in python)");
@@ -1192,11 +1192,11 @@ static void rna_def_number_property(StructRNA *srna, PropertyType type)
{
PropertyRNA *prop;
- prop= RNA_def_property(srna, "default", type, PROP_NONE);
+ prop = RNA_def_property(srna, "default", type, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Default", "Default value for this number");
- switch(type) {
+ switch (type) {
case PROP_BOOLEAN:
RNA_def_property_boolean_funcs(prop, "rna_BoolProperty_default_get", NULL);
break;
@@ -1211,13 +1211,13 @@ static void rna_def_number_property(StructRNA *srna, PropertyType type)
}
- prop= RNA_def_property(srna, "default_array", type, PROP_NONE);
+ prop = RNA_def_property(srna, "default_array", type, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_array(prop, RNA_MAX_ARRAY_DIMENSION); /* no fixed default length, important its not 0 though */
RNA_def_property_flag(prop, PROP_DYNAMIC);
RNA_def_property_dynamic_array_funcs(prop, "rna_NumberProperty_default_array_get_length"); /* same for all types */
- switch(type) {
+ switch (type) {
case PROP_BOOLEAN:
RNA_def_property_boolean_funcs(prop, "rna_BoolProperty_default_array_get", NULL);
break;
@@ -1233,46 +1233,46 @@ static void rna_def_number_property(StructRNA *srna, PropertyType type)
RNA_def_property_ui_text(prop, "Default Array", "Default value for this array");
- prop= RNA_def_property(srna, "array_length", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "array_length", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_int_funcs(prop, "rna_Property_array_length_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Array Length", "Maximum length of the array, 0 means unlimited");
- if(type == PROP_BOOLEAN)
+ if (type == PROP_BOOLEAN)
return;
- prop= RNA_def_property(srna, "hard_min", type, PROP_NONE);
+ prop = RNA_def_property(srna, "hard_min", type, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- if(type == PROP_INT) RNA_def_property_int_funcs(prop, "rna_IntProperty_hard_min_get", NULL, NULL);
+ if (type == PROP_INT) RNA_def_property_int_funcs(prop, "rna_IntProperty_hard_min_get", NULL, NULL);
else RNA_def_property_float_funcs(prop, "rna_FloatProperty_hard_min_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Hard Minimum", "Minimum value used by buttons");
- prop= RNA_def_property(srna, "hard_max", type, PROP_NONE);
+ prop = RNA_def_property(srna, "hard_max", type, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- if(type == PROP_INT) RNA_def_property_int_funcs(prop, "rna_IntProperty_hard_max_get", NULL, NULL);
+ if (type == PROP_INT) RNA_def_property_int_funcs(prop, "rna_IntProperty_hard_max_get", NULL, NULL);
else RNA_def_property_float_funcs(prop, "rna_FloatProperty_hard_max_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Hard Maximum", "Maximum value used by buttons");
- prop= RNA_def_property(srna, "soft_min", type, PROP_NONE);
+ prop = RNA_def_property(srna, "soft_min", type, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- if(type == PROP_INT) RNA_def_property_int_funcs(prop, "rna_IntProperty_soft_min_get", NULL, NULL);
+ if (type == PROP_INT) RNA_def_property_int_funcs(prop, "rna_IntProperty_soft_min_get", NULL, NULL);
else RNA_def_property_float_funcs(prop, "rna_FloatProperty_soft_min_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Soft Minimum", "Minimum value used by buttons");
- prop= RNA_def_property(srna, "soft_max", type, PROP_NONE);
+ prop = RNA_def_property(srna, "soft_max", type, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- if(type == PROP_INT) RNA_def_property_int_funcs(prop, "rna_IntProperty_soft_max_get", NULL, NULL);
+ if (type == PROP_INT) RNA_def_property_int_funcs(prop, "rna_IntProperty_soft_max_get", NULL, NULL);
else RNA_def_property_float_funcs(prop, "rna_FloatProperty_soft_max_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Soft Maximum", "Maximum value used by buttons");
- prop= RNA_def_property(srna, "step", type, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "step", type, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- if(type == PROP_INT) RNA_def_property_int_funcs(prop, "rna_IntProperty_step_get", NULL, NULL);
+ if (type == PROP_INT) RNA_def_property_int_funcs(prop, "rna_IntProperty_step_get", NULL, NULL);
else RNA_def_property_float_funcs(prop, "rna_FloatProperty_step_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Step", "Step size used by number buttons, for floats 1/100th of the step size");
- if(type == PROP_FLOAT) {
- prop= RNA_def_property(srna, "precision", PROP_INT, PROP_UNSIGNED);
+ if (type == PROP_FLOAT) {
+ prop = RNA_def_property(srna, "precision", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_int_funcs(prop, "rna_FloatProperty_precision_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Precision", "Number of digits after the dot used by buttons");
@@ -1283,12 +1283,12 @@ static void rna_def_string_property(StructRNA *srna)
{
PropertyRNA *prop;
- prop= RNA_def_property(srna, "default", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "default", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_StringProperty_default_get", "rna_StringProperty_default_length", NULL);
RNA_def_property_ui_text(prop, "Default", "string default value");
- prop= RNA_def_property(srna, "length_max", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "length_max", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_int_funcs(prop, "rna_StringProperty_max_length_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Maximum Length", "Maximum length of the string, 0 means unlimited");
@@ -1303,47 +1303,47 @@ static void rna_def_enum_property(BlenderRNA *brna, StructRNA *srna)
{PROP_NONE, "DUMMY", 0, "Dummy", ""},
{0, NULL, 0, NULL, NULL}};
- prop= RNA_def_property(srna, "default", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "default", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_enum_items(prop, default_dummy_items);
RNA_def_property_enum_funcs(prop, "rna_EnumProperty_default_get", NULL, "rna_EnumProperty_default_itemf");
RNA_def_property_ui_text(prop, "Default", "Default value for this enum");
/* same 'default' but uses 'PROP_ENUM_FLAG' */
- prop= RNA_def_property(srna, "default_flag", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "default_flag", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_flag(prop, PROP_ENUM_FLAG);
RNA_def_property_enum_items(prop, default_dummy_items);
RNA_def_property_enum_funcs(prop, "rna_EnumProperty_default_get", NULL, "rna_EnumProperty_default_itemf");
RNA_def_property_ui_text(prop, "Default", "Default value for this enum");
- prop= RNA_def_property(srna, "enum_items", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "enum_items", PROP_COLLECTION, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "EnumPropertyItem");
RNA_def_property_collection_funcs(prop, "rna_EnumProperty_items_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", NULL, NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Items", "Possible values for the property");
- srna= RNA_def_struct(brna, "EnumPropertyItem", NULL);
+ srna = RNA_def_struct(brna, "EnumPropertyItem", NULL);
RNA_def_struct_ui_text(srna, "Enum Item Definition", "Definition of a choice in an RNA enum property");
RNA_def_struct_ui_icon(srna, ICON_RNA);
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_EnumPropertyItem_name_get", "rna_EnumPropertyItem_name_length", NULL);
RNA_def_property_ui_text(prop, "Name", "Human readable name");
- prop= RNA_def_property(srna, "description", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "description", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_EnumPropertyItem_description_get", "rna_EnumPropertyItem_description_length", NULL);
RNA_def_property_ui_text(prop, "Description", "Description of the item's purpose");
- prop= RNA_def_property(srna, "identifier", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "identifier", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_EnumPropertyItem_identifier_get", "rna_EnumPropertyItem_identifier_length", NULL);
RNA_def_property_ui_text(prop, "Identifier", "Unique name used in the code and scripting");
RNA_def_struct_name_property(srna, prop);
- prop= RNA_def_property(srna, "value", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "value", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_int_funcs(prop, "rna_EnumPropertyItem_value_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Value", "Value of the item");
@@ -1353,10 +1353,10 @@ static void rna_def_pointer_property(StructRNA *srna, PropertyType type)
{
PropertyRNA *prop;
- prop= RNA_def_property(srna, "fixed_type", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "fixed_type", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Struct");
- if(type == PROP_POINTER)
+ if (type == PROP_POINTER)
RNA_def_property_pointer_funcs(prop, "rna_PointerProperty_fixed_type_get", NULL, NULL, NULL);
else
RNA_def_property_pointer_funcs(prop, "rna_CollectionProperty_fixed_type_get", NULL, NULL, NULL);
@@ -1375,37 +1375,37 @@ void RNA_def_rna(BlenderRNA *brna)
rna_def_property(brna);
/* BoolProperty */
- srna= RNA_def_struct(brna, "BoolProperty", "Property");
+ srna = RNA_def_struct(brna, "BoolProperty", "Property");
RNA_def_struct_ui_text(srna, "Boolean Definition", "RNA boolean property definition");
rna_def_number_property(srna, PROP_BOOLEAN);
/* IntProperty */
- srna= RNA_def_struct(brna, "IntProperty", "Property");
+ srna = RNA_def_struct(brna, "IntProperty", "Property");
RNA_def_struct_ui_text(srna, "Int Definition", "RNA integer number property definition");
rna_def_number_property(srna, PROP_INT);
/* FloatProperty */
- srna= RNA_def_struct(brna, "FloatProperty", "Property");
+ srna = RNA_def_struct(brna, "FloatProperty", "Property");
RNA_def_struct_ui_text(srna, "Float Definition", "RNA floating pointer number property definition");
rna_def_number_property(srna, PROP_FLOAT);
/* StringProperty */
- srna= RNA_def_struct(brna, "StringProperty", "Property");
+ srna = RNA_def_struct(brna, "StringProperty", "Property");
RNA_def_struct_ui_text(srna, "String Definition", "RNA text string property definition");
rna_def_string_property(srna);
/* EnumProperty */
- srna= RNA_def_struct(brna, "EnumProperty", "Property");
+ srna = RNA_def_struct(brna, "EnumProperty", "Property");
RNA_def_struct_ui_text(srna, "Enum Definition", "RNA enumeration property definition, to choose from a number of predefined options");
rna_def_enum_property(brna, srna);
/* PointerProperty */
- srna= RNA_def_struct(brna, "PointerProperty", "Property");
+ srna = RNA_def_struct(brna, "PointerProperty", "Property");
RNA_def_struct_ui_text(srna, "Pointer Definition", "RNA pointer property to point to another RNA struct");
rna_def_pointer_property(srna, PROP_POINTER);
/* CollectionProperty */
- srna= RNA_def_struct(brna, "CollectionProperty", "Property");
+ srna = RNA_def_struct(brna, "CollectionProperty", "Property");
RNA_def_struct_ui_text(srna, "Collection Definition", "RNA collection property to define lists, arrays and mappings");
rna_def_pointer_property(srna, PROP_COLLECTION);
@@ -1413,11 +1413,11 @@ void RNA_def_rna(BlenderRNA *brna)
rna_def_function(brna);
/* Blender RNA */
- srna= RNA_def_struct(brna, "BlenderRNA", NULL);
+ srna = RNA_def_struct(brna, "BlenderRNA", NULL);
RNA_def_struct_ui_text(srna, "Blender RNA", "Blender RNA structure definitions");
RNA_def_struct_ui_icon(srna, ICON_RNA);
- prop= RNA_def_property(srna, "structs", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "structs", PROP_COLLECTION, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Struct");
RNA_def_property_collection_funcs(prop, "rna_BlenderRNA_structs_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get",
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index ad9e30ed55c..e6eb07cf44f 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -84,7 +84,7 @@ EnumPropertyItem snap_target_items[] = {
{SCE_SNAP_TARGET_ACTIVE, "ACTIVE", 0, "Active", "Snap active onto target"},
{0, NULL, 0, NULL, NULL}};
-EnumPropertyItem proportional_falloff_items[] ={
+EnumPropertyItem proportional_falloff_items[] = {
{PROP_SMOOTH, "SMOOTH", ICON_SMOOTHCURVE, "Smooth", "Smooth falloff"},
{PROP_SPHERE, "SPHERE", ICON_SPHERECURVE, "Sphere", "Spherical falloff"},
{PROP_ROOT, "ROOT", ICON_ROOTCURVE, "Root", "Root falloff"},
@@ -201,7 +201,7 @@ EnumPropertyItem image_type_items[] = {
{0, "", 0, "Movie", NULL},
#ifdef _WIN32
- {R_IMF_IMTYPE_AVICODEC, "AVICODEC", ICON_FILE_MOVIE, "AVI Codec", "Output video in AVI format"}, // XXX Missing codec menu
+ {R_IMF_IMTYPE_AVICODEC, "AVICODEC", ICON_FILE_MOVIE, "AVI Codec", "Output video in AVI format"}, /* XXX Missing codec menu */
#endif
{R_IMF_IMTYPE_AVIJPEG, "AVI_JPEG", ICON_FILE_MOVIE, "AVI JPEG", "Output video in AVI JPEG format"},
{R_IMF_IMTYPE_AVIRAW, "AVI_RAW", ICON_FILE_MOVIE, "AVI Raw", "Output video in AVI Raw format"},
@@ -225,7 +225,7 @@ EnumPropertyItem image_type_items[] = {
#endif
{0, NULL, 0, NULL, NULL}};
-EnumPropertyItem image_color_mode_items[] ={
+EnumPropertyItem image_color_mode_items[] = {
{R_IMF_PLANES_BW, "BW", 0, "BW", "Images get saved in 8 bits grayscale (only PNG, JPEG, TGA, TIF)"},
{R_IMF_PLANES_RGB, "RGB", 0, "RGB", "Images are saved with RGB (color) data"},
{R_IMF_PLANES_RGBA, "RGBA", 0, "RGBA", "Images are saved with RGB and Alpha data (if supported)"},
@@ -291,12 +291,12 @@ static void rna_SpaceImageEditor_uv_sculpt_update(Main *bmain, Scene *scene, Poi
static int rna_Scene_object_bases_lookup_string(PointerRNA *ptr, const char *key, PointerRNA *r_ptr)
{
- Scene *scene= (Scene*)ptr->data;
+ Scene *scene = (Scene*)ptr->data;
Base *base;
- for(base= scene->base.first; base; base= base->next) {
- if(strncmp(base->object->id.name+2, key, sizeof(base->object->id.name)-2)==0) {
- *r_ptr= rna_pointer_inherit_refine(ptr, &RNA_ObjectBase, base);
+ for (base = scene->base.first; base; base = base->next) {
+ if (strncmp(base->object->id.name+2, key, sizeof(base->object->id.name)-2) == 0) {
+ *r_ptr = rna_pointer_inherit_refine(ptr, &RNA_ObjectBase, base);
return TRUE;
}
}
@@ -306,7 +306,7 @@ static int rna_Scene_object_bases_lookup_string(PointerRNA *ptr, const char *key
static PointerRNA rna_Scene_objects_get(CollectionPropertyIterator *iter)
{
- ListBaseIterator *internal= iter->internal;
+ ListBaseIterator *internal = iter->internal;
/* we are actually iterating a Base list, so override get */
return rna_pointer_inherit_refine(&iter->parent, &RNA_Object, ((Base*)internal->link)->object);
@@ -314,7 +314,7 @@ static PointerRNA rna_Scene_objects_get(CollectionPropertyIterator *iter)
static Base *rna_Scene_object_link(Scene *scene, bContext *C, ReportList *reports, Object *ob)
{
- Scene *scene_act= CTX_data_scene(C);
+ Scene *scene_act = CTX_data_scene(C);
Base *base;
if (object_in_scene(ob, scene)) {
@@ -322,15 +322,15 @@ static Base *rna_Scene_object_link(Scene *scene, bContext *C, ReportList *report
return NULL;
}
- base= scene_add_base(scene, ob);
+ base = scene_add_base(scene, ob);
id_us_plus(&ob->id);
/* this is similar to what object_add_type and add_object do */
- base->lay= scene->lay;
+ base->lay = scene->lay;
/* when linking to an inactive scene dont touch the layer */
- if(scene == scene_act)
- ob->lay= base->lay;
+ if (scene == scene_act)
+ ob->lay = base->lay;
ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
@@ -344,17 +344,17 @@ static Base *rna_Scene_object_link(Scene *scene, bContext *C, ReportList *report
static void rna_Scene_object_unlink(Scene *scene, ReportList *reports, Object *ob)
{
- Base *base= object_in_scene(ob, scene);
+ Base *base = object_in_scene(ob, scene);
if (!base) {
BKE_reportf(reports, RPT_ERROR, "Object '%s' is not in this scene '%s'", ob->id.name+2, scene->id.name+2);
return;
}
- if (base==scene->basact && ob->mode != OB_MODE_OBJECT) {
+ if (base == scene->basact && ob->mode != OB_MODE_OBJECT) {
BKE_reportf(reports, RPT_ERROR, "Object '%s' must be in 'Object Mode' to unlink", ob->id.name+2);
return;
}
- if(scene->basact==base) {
- scene->basact= NULL;
+ if (scene->basact == base) {
+ scene->basact = NULL;
}
BLI_remlink(&scene->base, base);
@@ -372,7 +372,7 @@ static void rna_Scene_object_unlink(Scene *scene, ReportList *reports, Object *o
static void rna_Scene_skgen_etch_template_set(PointerRNA *ptr, PointerRNA value)
{
ToolSettings *ts = (ToolSettings*)ptr->data;
- if(value.data && ((Object*)value.data)->type == OB_ARMATURE)
+ if (value.data && ((Object*)value.data)->type == OB_ARMATURE)
ts->skgen_template = value.data;
else
ts->skgen_template = NULL;
@@ -380,43 +380,43 @@ static void rna_Scene_skgen_etch_template_set(PointerRNA *ptr, PointerRNA value)
static PointerRNA rna_Scene_active_object_get(PointerRNA *ptr)
{
- Scene *scene= (Scene*)ptr->data;
+ Scene *scene = (Scene*)ptr->data;
return rna_pointer_inherit_refine(ptr, &RNA_Object, scene->basact ? scene->basact->object : NULL);
}
static void rna_Scene_active_object_set(PointerRNA *ptr, PointerRNA value)
{
- Scene *scene= (Scene*)ptr->data;
- if(value.data)
- scene->basact= object_in_scene((Object*)value.data, scene);
+ Scene *scene = (Scene*)ptr->data;
+ if (value.data)
+ scene->basact = object_in_scene((Object*)value.data, scene);
else
- scene->basact= NULL;
+ scene->basact = NULL;
}
static void rna_Scene_set_set(PointerRNA *ptr, PointerRNA value)
{
- Scene *scene= (Scene*)ptr->data;
- Scene *set= (Scene*)value.data;
+ Scene *scene = (Scene*)ptr->data;
+ Scene *set = (Scene*)value.data;
Scene *nested_set;
- for(nested_set= set; nested_set; nested_set= nested_set->set) {
- if(nested_set==scene)
+ for (nested_set = set; nested_set; nested_set = nested_set->set) {
+ if (nested_set == scene)
return;
}
- scene->set= set;
+ scene->set = set;
}
static void rna_Scene_layer_set(PointerRNA *ptr, const int *values)
{
- Scene *scene= (Scene*)ptr->data;
+ Scene *scene = (Scene*)ptr->data;
- scene->lay= ED_view3d_scene_layer_set(scene->lay, values, &scene->layact);
+ scene->lay = ED_view3d_scene_layer_set(scene->lay, values, &scene->layact);
}
static void rna_Scene_view3d_update(Main *bmain, Scene *UNUSED(scene_unused), PointerRNA *ptr)
{
- Scene *scene= (Scene*)ptr->data;
+ Scene *scene = (Scene*)ptr->data;
BKE_screen_view3d_main_sync(&bmain->screen, scene);
}
@@ -440,52 +440,52 @@ static void rna_Scene_listener_update(Main *UNUSED(bmain), Scene *scene, Pointer
static void rna_Scene_volume_set(PointerRNA *ptr, float value)
{
- Scene *scene= (Scene*)(ptr->data);
+ Scene *scene = (Scene*)(ptr->data);
scene->audio.volume = value;
- if(scene->sound_scene)
+ if (scene->sound_scene)
sound_set_scene_volume(scene, value);
}
static void rna_Scene_framelen_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
-{
- scene->r.framelen= (float)scene->r.framapto/(float)scene->r.images;
+{
+ scene->r.framelen = (float)scene->r.framapto/(float)scene->r.images;
}
static void rna_Scene_current_frame_set(PointerRNA *ptr, int value)
{
- Scene *data= (Scene*)ptr->data;
+ Scene *data = (Scene*)ptr->data;
/* if negative frames aren't allowed, then we can't use them */
FRAMENUMBER_MIN_CLAMP(value);
- data->r.cfra= value;
+ data->r.cfra = value;
}
static void rna_Scene_start_frame_set(PointerRNA *ptr, int value)
{
- Scene *data= (Scene*)ptr->data;
+ Scene *data = (Scene*)ptr->data;
/* MINFRAME not MINAFRAME, since some output formats can't taken negative frames */
CLAMP(value, MINFRAME, data->r.efra);
- data->r.sfra= value;
+ data->r.sfra = value;
}
static void rna_Scene_end_frame_set(PointerRNA *ptr, int value)
{
- Scene *data= (Scene*)ptr->data;
+ Scene *data = (Scene*)ptr->data;
CLAMP(value, data->r.sfra, MAXFRAME);
- data->r.efra= value;
+ data->r.efra = value;
}
static void rna_Scene_use_preview_range_set(PointerRNA *ptr, int value)
{
- Scene *data= (Scene*)ptr->data;
+ Scene *data = (Scene*)ptr->data;
if (value) {
/* copy range from scene if not set before */
if ((data->r.psfra == data->r.pefra) && (data->r.psfra == 0)) {
- data->r.psfra= data->r.sfra;
- data->r.pefra= data->r.efra;
+ data->r.psfra = data->r.sfra;
+ data->r.pefra = data->r.efra;
}
data->r.flag |= SCER_PRV_RANGE;
@@ -497,54 +497,54 @@ static void rna_Scene_use_preview_range_set(PointerRNA *ptr, int value)
static void rna_Scene_preview_range_start_frame_set(PointerRNA *ptr, int value)
{
- Scene *data= (Scene*)ptr->data;
+ Scene *data = (Scene*)ptr->data;
/* check if enabled already */
if ((data->r.flag & SCER_PRV_RANGE) == 0) {
/* set end of preview range to end frame, then clamp as per normal */
- // TODO: or just refuse to set instead?
- data->r.pefra= data->r.efra;
+ /* TODO: or just refuse to set instead? */
+ data->r.pefra = data->r.efra;
}
/* now set normally */
CLAMP(value, MINAFRAME, data->r.pefra);
- data->r.psfra= value;
+ data->r.psfra = value;
}
static void rna_Scene_preview_range_end_frame_set(PointerRNA *ptr, int value)
{
- Scene *data= (Scene*)ptr->data;
+ Scene *data = (Scene*)ptr->data;
/* check if enabled already */
if ((data->r.flag & SCER_PRV_RANGE) == 0) {
/* set start of preview range to start frame, then clamp as per normal */
- // TODO: or just refuse to set instead?
- data->r.psfra= data->r.sfra;
+ /* TODO: or just refuse to set instead? */
+ data->r.psfra = data->r.sfra;
}
/* now set normally */
CLAMP(value, data->r.psfra, MAXFRAME);
- data->r.pefra= value;
+ data->r.pefra = value;
}
static void rna_Scene_frame_update(Main *bmain, Scene *UNUSED(current_scene), PointerRNA *ptr)
{
- Scene *scene= (Scene*)ptr->id.data;
+ Scene *scene = (Scene*)ptr->id.data;
sound_seek_scene(bmain, scene);
}
static PointerRNA rna_Scene_active_keying_set_get(PointerRNA *ptr)
{
- Scene *scene= (Scene *)ptr->data;
+ Scene *scene = (Scene *)ptr->data;
return rna_pointer_inherit_refine(ptr, &RNA_KeyingSet, ANIM_scene_get_active_keyingset(scene));
}
static void rna_Scene_active_keying_set_set(PointerRNA *ptr, PointerRNA value)
{
- Scene *scene= (Scene *)ptr->data;
- KeyingSet *ks= (KeyingSet*)value.data;
+ Scene *scene = (Scene *)ptr->data;
+ KeyingSet *ks = (KeyingSet*)value.data;
- scene->active_keyingset= ANIM_scene_get_keyingset_index(scene, ks);
+ scene->active_keyingset = ANIM_scene_get_keyingset_index(scene, ks);
}
/* get KeyingSet index stuff for list of Keying Sets editing UI
@@ -553,7 +553,7 @@ static void rna_Scene_active_keying_set_set(PointerRNA *ptr, PointerRNA value)
*/
static int rna_Scene_active_keying_set_index_get(PointerRNA *ptr)
{
- Scene *scene= (Scene *)ptr->data;
+ Scene *scene = (Scene *)ptr->data;
return scene->active_keyingset-1;
}
@@ -562,17 +562,17 @@ static int rna_Scene_active_keying_set_index_get(PointerRNA *ptr)
*/
static void rna_Scene_active_keying_set_index_set(PointerRNA *ptr, int value)
{
- Scene *scene= (Scene *)ptr->data;
- scene->active_keyingset= value+1;
+ Scene *scene = (Scene *)ptr->data;
+ scene->active_keyingset = value+1;
}
-// XXX: evil... builtin_keyingsets is defined in keyingsets.c!
-// TODO: make API function to retrieve this...
+/* XXX: evil... builtin_keyingsets is defined in keyingsets.c! */
+/* TODO: make API function to retrieve this... */
extern ListBase builtin_keyingsets;
static void rna_Scene_all_keyingsets_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Scene *scene= (Scene*)ptr->data;
+ Scene *scene = (Scene*)ptr->data;
/* start going over the scene KeyingSets first, while we still have pointer to it
* but only if we have any Keying Sets to use...
@@ -585,16 +585,16 @@ static void rna_Scene_all_keyingsets_begin(CollectionPropertyIterator *iter, Poi
static void rna_Scene_all_keyingsets_next(CollectionPropertyIterator *iter)
{
- ListBaseIterator *internal= iter->internal;
- KeyingSet *ks= (KeyingSet*)internal->link;
+ ListBaseIterator *internal = iter->internal;
+ KeyingSet *ks = (KeyingSet*)internal->link;
/* if we've run out of links in Scene list, jump over to the builtins list unless we're there already */
if ((ks->next == NULL) && (ks != builtin_keyingsets.last))
- internal->link= (Link*)builtin_keyingsets.first;
+ internal->link = (Link*)builtin_keyingsets.first;
else
- internal->link= (Link*)ks->next;
+ internal->link = (Link*)ks->next;
- iter->valid= (internal->link != NULL);
+ iter->valid = (internal->link != NULL);
}
@@ -605,9 +605,9 @@ static char *rna_RenderSettings_path(PointerRNA *UNUSED(ptr))
static int rna_RenderSettings_threads_get(PointerRNA *ptr)
{
- RenderData *rd= (RenderData*)ptr->data;
+ RenderData *rd = (RenderData*)ptr->data;
- if(rd->mode & R_FIXED_THREADS)
+ if (rd->mode & R_FIXED_THREADS)
return rd->threads;
else
return BLI_system_thread_count();
@@ -615,14 +615,14 @@ static int rna_RenderSettings_threads_get(PointerRNA *ptr)
static int rna_RenderSettings_is_movie_fomat_get(PointerRNA *ptr)
{
- RenderData *rd= (RenderData*)ptr->data;
+ RenderData *rd = (RenderData*)ptr->data;
return BKE_imtype_is_movie(rd->im_format.imtype);
}
static int rna_RenderSettings_save_buffers_get(PointerRNA *ptr)
{
- RenderData *rd= (RenderData*)ptr->data;
- if(rd->mode & R_BORDER)
+ RenderData *rd = (RenderData*)ptr->data;
+ if (rd->mode & R_BORDER)
return 0;
else
return (rd->scemode & (R_EXR_TILE_FILE|R_FULL_SAMPLE)) != 0;
@@ -630,34 +630,34 @@ static int rna_RenderSettings_save_buffers_get(PointerRNA *ptr)
static int rna_RenderSettings_full_sample_get(PointerRNA *ptr)
{
- RenderData *rd= (RenderData*)ptr->data;
+ RenderData *rd = (RenderData*)ptr->data;
return (rd->scemode & R_FULL_SAMPLE) && !(rd->mode & R_BORDER);
}
static void rna_ImageFormatSettings_file_format_set(PointerRNA *ptr, int value)
{
- ImageFormatData *imf= (ImageFormatData *)ptr->data;
- ID *id= ptr->id.data;
- const char is_render= (id && GS(id->name) == ID_SCE);
+ ImageFormatData *imf = (ImageFormatData *)ptr->data;
+ ID *id = ptr->id.data;
+ const char is_render = (id && GS(id->name) == ID_SCE);
/* see note below on why this is */
- const char chan_flag= BKE_imtype_valid_channels(imf->imtype) | (is_render ? IMA_CHAN_FLAG_BW : 0);
+ const char chan_flag = BKE_imtype_valid_channels(imf->imtype) | (is_render ? IMA_CHAN_FLAG_BW : 0);
- imf->imtype= value;
+ imf->imtype = value;
/* ensure depth and color settings match */
if ( ((imf->planes == R_IMF_PLANES_BW) && !(chan_flag & IMA_CHAN_FLAG_BW)) ||
((imf->planes == R_IMF_PLANES_RGBA) && !(chan_flag & IMA_CHAN_FLAG_ALPHA)))
{
- imf->planes= R_IMF_PLANES_RGB;
+ imf->planes = R_IMF_PLANES_RGB;
}
/* ensure usable depth */
{
- const int depth_ok= BKE_imtype_valid_depths(imf->imtype);
+ const int depth_ok = BKE_imtype_valid_depths(imf->imtype);
if ((imf->depth & depth_ok) == 0) {
/* set first available depth */
- char depth_ls[]= {R_IMF_CHAN_DEPTH_32,
+ char depth_ls[] = {R_IMF_CHAN_DEPTH_32,
R_IMF_CHAN_DEPTH_24,
R_IMF_CHAN_DEPTH_16,
R_IMF_CHAN_DEPTH_12,
@@ -666,9 +666,9 @@ static void rna_ImageFormatSettings_file_format_set(PointerRNA *ptr, int value)
0};
int i;
- for (i= 0; depth_ls[i]; i++) {
+ for (i = 0; depth_ls[i]; i++) {
if (depth_ok & depth_ls[i]) {
- imf->depth= depth_ls[i];
+ imf->depth = depth_ls[i];
break;
}
}
@@ -676,8 +676,8 @@ static void rna_ImageFormatSettings_file_format_set(PointerRNA *ptr, int value)
}
if (id && GS(id->name) == ID_SCE) {
- Scene *scene= ptr->id.data;
- RenderData *rd= &scene->r;
+ Scene *scene = ptr->id.data;
+ RenderData *rd = &scene->r;
#ifdef WITH_FFMPEG
ffmpeg_verify_image_type(rd, imf);
#endif
@@ -691,7 +691,7 @@ static void rna_ImageFormatSettings_file_format_set(PointerRNA *ptr, int value)
static EnumPropertyItem *rna_ImageFormatSettings_file_format_itemf(bContext *C, PointerRNA *ptr,
PropertyRNA *UNUSED(prop), int *free)
{
- ID *id= ptr->id.data;
+ ID *id = ptr->id.data;
if (id && GS(id->name) == ID_SCE) {
return image_type_items;
}
@@ -703,22 +703,22 @@ static EnumPropertyItem *rna_ImageFormatSettings_file_format_itemf(bContext *C,
static EnumPropertyItem *rna_ImageFormatSettings_color_mode_itemf(bContext *C, PointerRNA *ptr,
PropertyRNA *UNUSED(prop), int *free)
{
- ImageFormatData *imf= (ImageFormatData *)ptr->data;
- ID *id= ptr->id.data;
- const char is_render= (id && GS(id->name) == ID_SCE);
+ ImageFormatData *imf = (ImageFormatData *)ptr->data;
+ ID *id = ptr->id.data;
+ const char is_render = (id && GS(id->name) == ID_SCE);
/* note, we need to act differently for render
* where 'BW' will force greyscale even if the output format writes
* as RGBA, this is age old blender convention and not sure how useful
* it really is but keep it for now - campbell */
- char chan_flag= BKE_imtype_valid_channels(imf->imtype) | (is_render ? IMA_CHAN_FLAG_BW : 0);
+ char chan_flag = BKE_imtype_valid_channels(imf->imtype) | (is_render ? IMA_CHAN_FLAG_BW : 0);
#ifdef WITH_FFMPEG
/* a WAY more crappy case than B&W flag: depending on codec, file format MIGHT support
* alpha channel. for example MPEG format with h264 codec can't do alpha channel, but
* the same MPEG format with QTRLE codec can easily handle alpga channel.
* not sure how to deal with such cases in a nicer way (sergey) */
- if(is_render) {
+ if (is_render) {
Scene *scene = ptr->id.data;
RenderData *rd = &scene->r;
@@ -731,15 +731,15 @@ static EnumPropertyItem *rna_ImageFormatSettings_color_mode_itemf(bContext *C, P
return image_color_mode_items;
}
else {
- int totitem= 0;
- EnumPropertyItem *item= NULL;
+ int totitem = 0;
+ EnumPropertyItem *item = NULL;
if (chan_flag & IMA_CHAN_FLAG_BW) RNA_enum_item_add(&item, &totitem, &IMAGE_COLOR_MODE_BW);
if (chan_flag & IMA_CHAN_FLAG_RGB) RNA_enum_item_add(&item, &totitem, &IMAGE_COLOR_MODE_RGB);
if (chan_flag & IMA_CHAN_FLAG_ALPHA) RNA_enum_item_add(&item, &totitem, &IMAGE_COLOR_MODE_RGBA);
RNA_enum_item_end(&item, &totitem);
- *free= 1;
+ *free = 1;
return item;
}
@@ -748,22 +748,22 @@ static EnumPropertyItem *rna_ImageFormatSettings_color_mode_itemf(bContext *C, P
static EnumPropertyItem *rna_ImageFormatSettings_color_depth_itemf(bContext *C, PointerRNA *ptr,
PropertyRNA *UNUSED(prop), int *free)
{
- ImageFormatData *imf= (ImageFormatData *)ptr->data;
+ ImageFormatData *imf = (ImageFormatData *)ptr->data;
if (imf == NULL) {
return image_color_depth_items;
}
else {
- const int depth_ok= BKE_imtype_valid_depths(imf->imtype);
- const int is_float= ELEM3(imf->imtype, R_IMF_IMTYPE_RADHDR, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_MULTILAYER);
+ const int depth_ok = BKE_imtype_valid_depths(imf->imtype);
+ const int is_float = ELEM3(imf->imtype, R_IMF_IMTYPE_RADHDR, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_MULTILAYER);
- EnumPropertyItem *item_8bit= &image_color_depth_items[0];
- EnumPropertyItem *item_12bit= &image_color_depth_items[1];
- EnumPropertyItem *item_16bit= &image_color_depth_items[2];
- EnumPropertyItem *item_32bit= &image_color_depth_items[3];
+ EnumPropertyItem *item_8bit = &image_color_depth_items[0];
+ EnumPropertyItem *item_12bit = &image_color_depth_items[1];
+ EnumPropertyItem *item_16bit = &image_color_depth_items[2];
+ EnumPropertyItem *item_32bit = &image_color_depth_items[3];
- int totitem= 0;
- EnumPropertyItem *item= NULL;
+ int totitem = 0;
+ EnumPropertyItem *item = NULL;
EnumPropertyItem tmp = {0, "", 0, "", ""};
if (depth_ok & R_IMF_CHAN_DEPTH_8) {
@@ -776,8 +776,8 @@ static EnumPropertyItem *rna_ImageFormatSettings_color_depth_itemf(bContext *C,
if (depth_ok & R_IMF_CHAN_DEPTH_16) {
if (is_float) {
- tmp= *item_16bit;
- tmp.name= "Float (Half)";
+ tmp = *item_16bit;
+ tmp.name = "Float (Half)";
RNA_enum_item_add(&item, &totitem, &tmp);
}
else {
@@ -787,8 +787,8 @@ static EnumPropertyItem *rna_ImageFormatSettings_color_depth_itemf(bContext *C,
if (depth_ok & R_IMF_CHAN_DEPTH_32) {
if (is_float) {
- tmp= *item_32bit;
- tmp.name= "Float (Full)";
+ tmp = *item_32bit;
+ tmp.name = "Float (Full)";
RNA_enum_item_add(&item, &totitem, &tmp);
}
else {
@@ -797,7 +797,7 @@ static EnumPropertyItem *rna_ImageFormatSettings_color_depth_itemf(bContext *C,
}
RNA_enum_item_end(&item, &totitem);
- *free= 1;
+ *free = 1;
return item;
}
@@ -805,17 +805,17 @@ static EnumPropertyItem *rna_ImageFormatSettings_color_depth_itemf(bContext *C,
static int rna_SceneRender_file_ext_length(PointerRNA *ptr)
{
- RenderData *rd= (RenderData*)ptr->data;
+ RenderData *rd = (RenderData*)ptr->data;
char ext[8];
- ext[0]= '\0';
+ ext[0] = '\0';
BKE_add_image_extension(ext, rd->im_format.imtype);
return strlen(ext);
}
static void rna_SceneRender_file_ext_get(PointerRNA *ptr, char *str)
{
- RenderData *rd= (RenderData*)ptr->data;
- str[0]= '\0';
+ RenderData *rd = (RenderData*)ptr->data;
+ str[0] = '\0';
BKE_add_image_extension(str, rd->im_format.imtype);
}
@@ -837,26 +837,26 @@ static void rna_RenderSettings_qtcodecsettings_codecType_set(PointerRNA *ptr, in
static EnumPropertyItem *rna_RenderSettings_qtcodecsettings_codecType_itemf(bContext *C, PointerRNA *ptr,
PropertyRNA *UNUSED(prop), int *free)
{
- EnumPropertyItem *item= NULL;
+ EnumPropertyItem *item = NULL;
EnumPropertyItem tmp = {0, "", 0, "", ""};
QuicktimeCodecTypeDesc *codecTypeDesc;
- int i=1, totitem= 0;
+ int i = 1, totitem = 0;
char id[5];
- for(i=0;i<quicktime_get_num_videocodecs();i++) {
+ for (i = 0;i<quicktime_get_num_videocodecs();i++) {
codecTypeDesc = quicktime_get_videocodecType_desc(i);
if (!codecTypeDesc) break;
- tmp.value= codecTypeDesc->rnatmpvalue;
+ tmp.value = codecTypeDesc->rnatmpvalue;
*((int*)id) = codecTypeDesc->codecType;
id[4] = 0;
- tmp.identifier= id;
- tmp.name= codecTypeDesc->codecName;
+ tmp.identifier = id;
+ tmp.name = codecTypeDesc->codecName;
RNA_enum_item_add(&item, &totitem, &tmp);
}
RNA_enum_item_end(&item, &totitem);
- *free= 1;
+ *free = 1;
return item;
}
@@ -879,26 +879,26 @@ static void rna_RenderSettings_qtcodecsettings_audiocodecType_set(PointerRNA *pt
static EnumPropertyItem *rna_RenderSettings_qtcodecsettings_audiocodecType_itemf(bContext *C, PointerRNA *ptr,
PropertyRNA *UNUSED(prop), int *free)
{
- EnumPropertyItem *item= NULL;
+ EnumPropertyItem *item = NULL;
EnumPropertyItem tmp = {0, "", 0, "", ""};
QuicktimeCodecTypeDesc *codecTypeDesc;
- int i=1, totitem= 0;
+ int i = 1, totitem = 0;
- for(i=0;i<quicktime_get_num_audiocodecs();i++) {
+ for (i = 0;i<quicktime_get_num_audiocodecs();i++) {
codecTypeDesc = quicktime_get_audiocodecType_desc(i);
if (!codecTypeDesc) break;
- tmp.value= codecTypeDesc->rnatmpvalue;
- tmp.identifier= codecTypeDesc->codecName;
- tmp.name= codecTypeDesc->codecName;
+ tmp.value = codecTypeDesc->rnatmpvalue;
+ tmp.identifier = codecTypeDesc->codecName;
+ tmp.name = codecTypeDesc->codecName;
RNA_enum_item_add(&item, &totitem, &tmp);
}
RNA_enum_item_end(&item, &totitem);
- *free= 1;
+ *free = 1;
return item;
-}
+}
#endif
#endif
@@ -927,28 +927,28 @@ static void rna_FFmpegSettings_codec_settings_update(Main *UNUSED(bmain), Scene
static int rna_RenderSettings_active_layer_index_get(PointerRNA *ptr)
{
- RenderData *rd= (RenderData*)ptr->data;
+ RenderData *rd = (RenderData*)ptr->data;
return rd->actlay;
}
static void rna_RenderSettings_active_layer_index_set(PointerRNA *ptr, int value)
{
- RenderData *rd= (RenderData*)ptr->data;
- rd->actlay= value;
+ RenderData *rd = (RenderData*)ptr->data;
+ rd->actlay = value;
}
static void rna_RenderSettings_active_layer_index_range(PointerRNA *ptr, int *min, int *max)
{
- RenderData *rd= (RenderData*)ptr->data;
+ RenderData *rd = (RenderData*)ptr->data;
- *min= 0;
- *max= BLI_countlist(&rd->layers)-1;
- *max= MAX2(0, *max);
+ *min = 0;
+ *max = BLI_countlist(&rd->layers)-1;
+ *max = MAX2(0, *max);
}
static PointerRNA rna_RenderSettings_active_layer_get(PointerRNA *ptr)
{
- RenderData *rd= (RenderData*)ptr->data;
+ RenderData *rd = (RenderData*)ptr->data;
SceneRenderLayer *srl = BLI_findlink(&rd->layers, rd->actlay);
return rna_pointer_inherit_refine(ptr, &RNA_SceneRenderLayer, srl);
@@ -956,16 +956,16 @@ static PointerRNA rna_RenderSettings_active_layer_get(PointerRNA *ptr)
static void rna_RenderSettings_active_layer_set(PointerRNA *ptr, PointerRNA value)
{
- RenderData *rd= (RenderData*)ptr->data;
- SceneRenderLayer *srl= (SceneRenderLayer*)value.data;
- const int index= BLI_findindex(&rd->layers, srl);
- if (index != -1) rd->actlay= index;
+ RenderData *rd = (RenderData*)ptr->data;
+ SceneRenderLayer *srl = (SceneRenderLayer*)value.data;
+ const int index = BLI_findindex(&rd->layers, srl);
+ if (index != -1) rd->actlay = index;
}
static SceneRenderLayer *rna_RenderLayer_new(ID *id, RenderData *UNUSED(rd), const char *name)
{
- Scene *scene= (Scene *)id;
- SceneRenderLayer *srl= scene_add_render_layer(scene, name);
+ Scene *scene = (Scene *)id;
+ SceneRenderLayer *srl = scene_add_render_layer(scene, name);
WM_main_add_notifier(NC_SCENE|ND_RENDER_OPTIONS, NULL);
@@ -974,7 +974,7 @@ static SceneRenderLayer *rna_RenderLayer_new(ID *id, RenderData *UNUSED(rd), con
static void rna_RenderLayer_remove(ID *id, RenderData *UNUSED(rd), Main *bmain, ReportList *reports, SceneRenderLayer *srl)
{
- Scene *scene= (Scene *)id;
+ Scene *scene = (Scene *)id;
if (!scene_remove_render_layer(bmain, scene, srl)) {
BKE_reportf(reports, RPT_ERROR, "RenderLayer '%s' could not be removed from scene '%s'", srl->name, scene->id.name+2);
@@ -986,10 +986,10 @@ static void rna_RenderLayer_remove(ID *id, RenderData *UNUSED(rd), Main *bmain,
static void rna_RenderSettings_engine_set(PointerRNA *ptr, int value)
{
- RenderData *rd= (RenderData*)ptr->data;
- RenderEngineType *type= BLI_findlink(&R_engines, value);
+ RenderData *rd = (RenderData*)ptr->data;
+ RenderEngineType *type = BLI_findlink(&R_engines, value);
- if(type)
+ if (type)
BLI_strncpy_utf8(rd->engine, type->idname, sizeof(rd->engine));
}
@@ -997,31 +997,31 @@ static EnumPropertyItem *rna_RenderSettings_engine_itemf(bContext *UNUSED(C), Po
PropertyRNA *UNUSED(prop), int *free)
{
RenderEngineType *type;
- EnumPropertyItem *item= NULL;
+ EnumPropertyItem *item = NULL;
EnumPropertyItem tmp = {0, "", 0, "", ""};
- int a=0, totitem= 0;
+ int a = 0, totitem = 0;
- for(type=R_engines.first; type; type=type->next, a++) {
- tmp.value= a;
- tmp.identifier= type->idname;
- tmp.name= type->name;
+ for (type = R_engines.first; type; type = type->next, a++) {
+ tmp.value = a;
+ tmp.identifier = type->idname;
+ tmp.name = type->name;
RNA_enum_item_add(&item, &totitem, &tmp);
}
RNA_enum_item_end(&item, &totitem);
- *free= 1;
+ *free = 1;
return item;
}
static int rna_RenderSettings_engine_get(PointerRNA *ptr)
{
- RenderData *rd= (RenderData*)ptr->data;
+ RenderData *rd = (RenderData*)ptr->data;
RenderEngineType *type;
- int a= 0;
+ int a = 0;
- for(type=R_engines.first; type; type=type->next, a++)
- if(strcmp(type->idname, rd->engine) == 0)
+ for (type = R_engines.first; type; type = type->next, a++)
+ if (strcmp(type->idname, rd->engine) == 0)
return a;
return 0;
@@ -1034,7 +1034,7 @@ static void rna_RenderSettings_engine_update(Main *bmain, Scene *UNUSED(unused),
static void rna_Scene_glsl_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Scene *scene= (Scene*)ptr->id.data;
+ Scene *scene = (Scene*)ptr->id.data;
DAG_id_tag_update(&scene->id, 0);
}
@@ -1042,15 +1042,15 @@ static void rna_Scene_glsl_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Poi
static void rna_RenderSettings_color_management_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
/* reset image nodes */
- Scene *scene= (Scene*)ptr->id.data;
- bNodeTree *ntree=scene->nodetree;
+ Scene *scene = (Scene*)ptr->id.data;
+ bNodeTree *ntree = scene->nodetree;
bNode *node;
- if(ntree && scene->use_nodes) {
+ if (ntree && scene->use_nodes) {
/* XXX images are freed here, stop render and preview threads, until Image is threadsafe */
WM_jobs_stop_all(bmain->wm.first);
- for (node=ntree->nodes.first; node; node=node->next) {
+ for (node = ntree->nodes.first; node; node = node->next) {
if (ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_IMAGE)) {
ED_node_changed_update(&scene->id, node);
WM_main_add_notifier(NC_NODE|NA_EDITED, node);
@@ -1066,18 +1066,18 @@ static void rna_RenderSettings_color_management_update(Main *bmain, Scene *UNUSE
static void rna_SceneRenderLayer_name_set(PointerRNA *ptr, const char *value)
{
- Scene *scene= (Scene*)ptr->id.data;
- SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data;
+ Scene *scene = (Scene*)ptr->id.data;
+ SceneRenderLayer *rl = (SceneRenderLayer*)ptr->data;
BLI_strncpy_utf8(rl->name, value, sizeof(rl->name));
BLI_uniquename(&scene->r.layers, rl, "RenderLayer", '.', offsetof(SceneRenderLayer, name), sizeof(rl->name));
- if(scene->nodetree) {
+ if (scene->nodetree) {
bNode *node;
- int index= BLI_findindex(&scene->r.layers, rl);
+ int index = BLI_findindex(&scene->r.layers, rl);
- for(node= scene->nodetree->nodes.first; node; node= node->next) {
- if(node->type==CMP_NODE_R_LAYERS && node->id==NULL) {
- if(node->custom1==index)
+ for (node = scene->nodetree->nodes.first; node; node = node->next) {
+ if (node->type == CMP_NODE_R_LAYERS && node->id == NULL) {
+ if (node->custom1 == index)
BLI_strncpy(node->name, rl->name, NODE_MAXSTR);
}
}
@@ -1091,17 +1091,17 @@ static int rna_RenderSettings_multiple_engines_get(PointerRNA *UNUSED(ptr))
static int rna_RenderSettings_use_shading_nodes_get(PointerRNA *ptr)
{
- Scene *scene= (Scene*)ptr->id.data;
+ Scene *scene = (Scene*)ptr->id.data;
return scene_use_new_shading_nodes(scene);
}
static int rna_RenderSettings_use_game_engine_get(PointerRNA *ptr)
{
- RenderData *rd= (RenderData*)ptr->data;
+ RenderData *rd = (RenderData*)ptr->data;
RenderEngineType *type;
- for(type=R_engines.first; type; type=type->next)
- if(strcmp(type->idname, rd->engine) == 0)
+ for (type = R_engines.first; type; type = type->next)
+ if (strcmp(type->idname, rd->engine) == 0)
return (type->flag & RE_GAME);
return 0;
@@ -1109,49 +1109,49 @@ static int rna_RenderSettings_use_game_engine_get(PointerRNA *ptr)
static void rna_SceneRenderLayer_layer_set(PointerRNA *ptr, const int *values)
{
- SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data;
- rl->lay= ED_view3d_scene_layer_set(rl->lay, values, NULL);
+ SceneRenderLayer *rl = (SceneRenderLayer*)ptr->data;
+ rl->lay = ED_view3d_scene_layer_set(rl->lay, values, NULL);
}
static void rna_SceneRenderLayer_pass_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Scene *scene= (Scene*)ptr->id.data;
+ Scene *scene = (Scene*)ptr->id.data;
- if(scene->nodetree)
+ if (scene->nodetree)
ntreeCompositForceHidden(scene->nodetree, scene);
}
static void rna_Scene_use_nodes_set(PointerRNA *ptr, int value)
{
- Scene *scene= (Scene*)ptr->data;
+ Scene *scene = (Scene*)ptr->data;
- scene->use_nodes= value;
- if(scene->use_nodes && scene->nodetree==NULL)
+ scene->use_nodes = value;
+ if (scene->use_nodes && scene->nodetree == NULL)
ED_node_composit_default(scene);
}
static void rna_Physics_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Scene *scene= (Scene*)ptr->id.data;
+ Scene *scene = (Scene*)ptr->id.data;
Base *base;
- for(base = scene->base.first; base; base=base->next)
+ for (base = scene->base.first; base; base = base->next)
BKE_ptcache_object_reset(scene, base->object, PTCACHE_RESET_DEPSGRAPH);
}
static void rna_Scene_editmesh_select_mode_set(PointerRNA *ptr, const int *value)
{
- Scene *scene= (Scene*)ptr->id.data;
+ Scene *scene = (Scene*)ptr->id.data;
ToolSettings *ts = (ToolSettings*)ptr->data;
int flag = (value[0] ? SCE_SELECT_VERTEX:0) | (value[1] ? SCE_SELECT_EDGE:0) | (value[2] ? SCE_SELECT_FACE:0);
- if(flag) {
+ if (flag) {
ts->selectmode = flag;
- if(scene->basact) {
- Mesh *me= get_mesh(scene->basact->object);
- if(me && me->edit_btmesh && me->edit_btmesh->selectmode != flag) {
- me->edit_btmesh->selectmode= flag;
+ if (scene->basact) {
+ Mesh *me = get_mesh(scene->basact->object);
+ if (me && me->edit_btmesh && me->edit_btmesh->selectmode != flag) {
+ me->edit_btmesh->selectmode = flag;
EDBM_selectmode_set(me->edit_btmesh);
}
}
@@ -1160,12 +1160,12 @@ static void rna_Scene_editmesh_select_mode_set(PointerRNA *ptr, const int *value
static void rna_Scene_editmesh_select_mode_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
{
- Mesh *me= NULL;
+ Mesh *me = NULL;
- if(scene->basact) {
- me= get_mesh(scene->basact->object);
- if(me && me->edit_btmesh==NULL)
- me= NULL;
+ if (scene->basact) {
+ me = get_mesh(scene->basact->object);
+ if (me && me->edit_btmesh == NULL)
+ me = NULL;
}
WM_main_add_notifier(NC_GEOM|ND_SELECT, me);
@@ -1177,17 +1177,17 @@ static void object_simplify_update(Object *ob)
ModifierData *md;
ParticleSystem *psys;
- for(md=ob->modifiers.first; md; md=md->next)
- if(ELEM3(md->type, eModifierType_Subsurf, eModifierType_Multires, eModifierType_ParticleSystem))
+ for (md = ob->modifiers.first; md; md = md->next)
+ if (ELEM3(md->type, eModifierType_Subsurf, eModifierType_Multires, eModifierType_ParticleSystem))
ob->recalc |= OB_RECALC_DATA|PSYS_RECALC_CHILD;
- for(psys=ob->particlesystem.first; psys; psys=psys->next)
+ for (psys = ob->particlesystem.first; psys; psys = psys->next)
psys->recalc |= PSYS_RECALC_CHILD;
- if(ob->dup_group) {
+ if (ob->dup_group) {
GroupObject *gob;
- for(gob=ob->dup_group->gobject.first; gob; gob=gob->next)
+ for (gob = ob->dup_group->gobject.first; gob; gob = gob->next)
object_simplify_update(gob->ob);
}
}
@@ -1197,7 +1197,7 @@ static void rna_Scene_use_simplify_update(Main *bmain, Scene *scene, PointerRNA
Scene *sce_iter;
Base *base;
- for(SETLOOPER(scene, sce_iter, base))
+ for (SETLOOPER(scene, sce_iter, base))
object_simplify_update(base->object);
DAG_ids_flush_update(bmain, 0);
@@ -1206,21 +1206,21 @@ static void rna_Scene_use_simplify_update(Main *bmain, Scene *scene, PointerRNA
static void rna_Scene_simplify_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- if(scene->r.mode & R_SIMPLIFY)
+ if (scene->r.mode & R_SIMPLIFY)
rna_Scene_use_simplify_update(bmain, scene, ptr);
}
static int rna_Scene_use_audio_get(PointerRNA *ptr)
{
- Scene *scene= (Scene*)ptr->data;
+ Scene *scene = (Scene*)ptr->data;
return scene->audio.flag & AUDIO_MUTE;
}
static void rna_Scene_use_audio_set(PointerRNA *ptr, int value)
{
- Scene *scene= (Scene*)ptr->data;
+ Scene *scene = (Scene*)ptr->data;
- if(value)
+ if (value)
scene->audio.flag |= AUDIO_MUTE;
else
scene->audio.flag &= ~AUDIO_MUTE;
@@ -1230,19 +1230,19 @@ static void rna_Scene_use_audio_set(PointerRNA *ptr, int value)
static int rna_Scene_sync_mode_get(PointerRNA *ptr)
{
- Scene *scene= (Scene*)ptr->data;
- if(scene->audio.flag & AUDIO_SYNC)
+ Scene *scene = (Scene*)ptr->data;
+ if (scene->audio.flag & AUDIO_SYNC)
return AUDIO_SYNC;
return scene->flag & SCE_FRAME_DROP;
}
static void rna_Scene_sync_mode_set(PointerRNA *ptr, int value)
{
- Scene *scene= (Scene*)ptr->data;
+ Scene *scene = (Scene*)ptr->data;
- if(value == AUDIO_SYNC)
+ if (value == AUDIO_SYNC)
scene->audio.flag |= AUDIO_SYNC;
- else if(value == SCE_FRAME_DROP)
+ else if (value == SCE_FRAME_DROP)
{
scene->audio.flag &= ~AUDIO_SYNC;
scene->flag |= SCE_FRAME_DROP;
@@ -1264,7 +1264,7 @@ static int rna_GameSettings_auto_start_get(PointerRNA *UNUSED(ptr))
static void rna_GameSettings_auto_start_set(PointerRNA *UNUSED(ptr), int value)
{
- if(value)
+ if (value)
G.fileflags |= G_FILE_AUTOPLAY;
else
G.fileflags &= ~G_FILE_AUTOPLAY;
@@ -1274,15 +1274,15 @@ static void rna_GameSettings_exit_key_set(PointerRNA *ptr, int value)
{
GameData *gm = (GameData*)ptr->data;
- if(ISKEYBOARD(value))
- gm->exitkey=value;
+ if (ISKEYBOARD(value))
+ gm->exitkey = value;
}
static TimeMarker *rna_TimeLine_add(Scene *scene, const char name[])
{
TimeMarker *marker = MEM_callocN(sizeof(TimeMarker), "TimeMarker");
- marker->flag= SELECT;
- marker->frame= 1;
+ marker->flag = SELECT;
+ marker->frame = 1;
BLI_strncpy_utf8(marker->name, name, sizeof(marker->name));
BLI_addtail(&scene->markers, marker);
@@ -1316,13 +1316,13 @@ static void rna_TimeLine_clear(Scene *scene)
static KeyingSet *rna_Scene_keying_set_new(Scene *sce, ReportList *reports, const char name[])
{
- KeyingSet *ks= NULL;
+ KeyingSet *ks = NULL;
/* call the API func, and set the active keyingset index */
- ks= BKE_keyingset_add(&sce->keyingsets, name, KEYINGSET_ABSOLUTE, 0);
+ ks = BKE_keyingset_add(&sce->keyingsets, name, KEYINGSET_ABSOLUTE, 0);
if (ks) {
- sce->active_keyingset= BLI_countlist(&sce->keyingsets);
+ sce->active_keyingset = BLI_countlist(&sce->keyingsets);
return ks;
}
else {
@@ -1338,7 +1338,7 @@ static void rna_UnifiedPaintSettings_size_set(PointerRNA *ptr, int value)
/* scale unprojected radius so it stays consistent with brush size */
brush_scale_unprojected_radius(&ups->unprojected_radius,
value, ups->size);
- ups->size= value;
+ ups->size = value;
}
static void rna_UnifiedPaintSettings_unprojected_radius_set(PointerRNA *ptr, float value)
@@ -1347,7 +1347,7 @@ static void rna_UnifiedPaintSettings_unprojected_radius_set(PointerRNA *ptr, flo
/* scale brush size so it stays consistent with unprojected_radius */
brush_scale_size(&ups->size, value, ups->unprojected_radius);
- ups->unprojected_radius= value;
+ ups->unprojected_radius = value;
}
/* note: without this, when Multi-Paint is activated/deactivated, the colors
@@ -1357,8 +1357,8 @@ static void rna_UnifiedPaintSettings_unprojected_radius_set(PointerRNA *ptr, flo
* given its own notifier. */
static void rna_Scene_update_active_object_data(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
{
- Object *ob= OBACT;
- if(ob) {
+ Object *ob = OBACT;
+ if (ob) {
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_main_add_notifier(NC_OBJECT|ND_DRAW, &ob->id);
}
@@ -1366,10 +1366,10 @@ static void rna_Scene_update_active_object_data(Main *UNUSED(bmain), Scene *scen
static void rna_SceneCamera_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Scene *scene= (Scene*)ptr->id.data;
- Object *camera= scene->camera;
+ Scene *scene = (Scene*)ptr->id.data;
+ Object *camera = scene->camera;
- if(camera)
+ if (camera)
DAG_id_tag_update(&camera->id, 0);
}
@@ -1380,16 +1380,16 @@ static void rna_def_transform_orientation(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- const int matrix_dimsize[]= {3, 3};
+ const int matrix_dimsize[] = {3, 3};
- srna= RNA_def_struct(brna, "TransformOrientation", NULL);
+ srna = RNA_def_struct(brna, "TransformOrientation", NULL);
- prop= RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
+ prop = RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "mat");
RNA_def_property_multi_array(prop, 2, matrix_dimsize);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
RNA_def_property_ui_text(prop, "Name", "Name of the custom transform orientation");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
@@ -1438,10 +1438,10 @@ static void rna_def_tool_settings(BlenderRNA *brna)
{EDGE_MODE_TAG_BEVEL, "BEVEL", 0, "Tag Bevel", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "ToolSettings", NULL);
+ srna = RNA_def_struct(brna, "ToolSettings", NULL);
RNA_def_struct_ui_text(srna, "Tool Settings", "");
- prop= RNA_def_property(srna, "sculpt", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "sculpt", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Sculpt");
RNA_def_property_ui_text(prop, "Sculpt", "");
@@ -1459,124 +1459,124 @@ static void rna_def_tool_settings(BlenderRNA *brna)
"weight painting");
RNA_def_property_update(prop, 0, "rna_Scene_update_active_object_data");
- prop= RNA_def_property(srna, "vertex_paint", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_paint", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "vpaint");
RNA_def_property_ui_text(prop, "Vertex Paint", "");
- prop= RNA_def_property(srna, "weight_paint", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "weight_paint", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "wpaint");
RNA_def_property_ui_text(prop, "Weight Paint", "");
- prop= RNA_def_property(srna, "image_paint", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "image_paint", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "imapaint");
RNA_def_property_ui_text(prop, "Image Paint", "");
- prop= RNA_def_property(srna, "uv_sculpt", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "uv_sculpt", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "uvsculpt");
RNA_def_property_ui_text(prop, "UV Sculpt", "");
- prop= RNA_def_property(srna, "particle_edit", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "particle_edit", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "particle");
RNA_def_property_ui_text(prop, "Particle Edit", "");
- prop= RNA_def_property(srna, "use_uv_sculpt", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_uv_sculpt", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "use_uv_sculpt", 1);
RNA_def_property_ui_text(prop, "UV Sculpt", "Enable brush for UV sculpting");
RNA_def_property_ui_icon(prop, ICON_TPAINT_HLT, 0);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_SpaceImageEditor_uv_sculpt_update");
- prop= RNA_def_property(srna, "uv_sculpt_lock_borders", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "uv_sculpt_lock_borders", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uv_sculpt_settings", UV_SCULPT_LOCK_BORDERS);
RNA_def_property_ui_text(prop, "Lock Borders", "Disable editing of boundary edges");
- prop= RNA_def_property(srna, "uv_sculpt_all_islands", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "uv_sculpt_all_islands", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uv_sculpt_settings", UV_SCULPT_ALL_ISLANDS);
RNA_def_property_ui_text(prop, "Sculpt All Islands", "Brush operates on all islands");
- prop= RNA_def_property(srna, "uv_sculpt_tool", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "uv_sculpt_tool", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "uv_sculpt_tool");
RNA_def_property_enum_items(prop, uv_sculpt_tool_items);
RNA_def_property_ui_text(prop, "UV Sculpt Tools", "Select Tools for the UV sculpt brushes");
- prop= RNA_def_property(srna, "uv_relax_method", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "uv_relax_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "uv_relax_method");
RNA_def_property_enum_items(prop, uv_sculpt_relaxation_items);
RNA_def_property_ui_text(prop, "Relaxation Method", "Algorithm used for UV relaxation");
/* Transform */
- prop= RNA_def_property(srna, "proportional_edit", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "proportional_edit", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "proportional");
RNA_def_property_enum_items(prop, proportional_editing_items);
RNA_def_property_ui_text(prop, "Proportional Editing",
"Proportional Editing mode, allows transforms with distance fall-off");
RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
- prop= RNA_def_property(srna, "use_proportional_edit_objects", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_proportional_edit_objects", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "proportional_objects", 0);
RNA_def_property_ui_text(prop, "Proportional Editing Objects", "Proportional editing object mode");
RNA_def_property_ui_icon(prop, ICON_PROP_OFF, 1);
RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
- prop= RNA_def_property(srna, "proportional_edit_falloff", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "proportional_edit_falloff", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "prop_mode");
RNA_def_property_enum_items(prop, proportional_falloff_items);
RNA_def_property_ui_text(prop, "Proportional Editing Falloff", "Falloff type for proportional editing mode");
RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
- prop= RNA_def_property(srna, "proportional_size", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "proportional_size", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "proportional_size");
RNA_def_property_ui_text(prop, "Proportional Size", "Display size for proportional editing circle");
RNA_def_property_range(prop, 0.00001, 5000.0);
- prop= RNA_def_property(srna, "normal_size", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "normal_size", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "normalsize");
RNA_def_property_ui_text(prop, "Normal Size", "Display size for normals in the 3D view");
RNA_def_property_range(prop, 0.00001, 1000.0);
RNA_def_property_ui_range(prop, 0.01, 10.0, 10.0, 2);
RNA_def_property_update(prop, NC_GEOM|ND_DATA, NULL);
- prop= RNA_def_property(srna, "use_mesh_automerge", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_mesh_automerge", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "automerge", 0);
RNA_def_property_ui_text(prop, "AutoMerge Editing", "Automatically merge vertices moved to the same location");
- prop= RNA_def_property(srna, "use_snap", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_snap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP);
RNA_def_property_ui_text(prop, "Snap", "Snap during transform");
RNA_def_property_ui_icon(prop, ICON_SNAP_OFF, 1);
RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
- prop= RNA_def_property(srna, "use_snap_align_rotation", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_snap_align_rotation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_ROTATE);
RNA_def_property_ui_text(prop, "Snap Align Rotation", "Align rotation with the snapping target");
RNA_def_property_ui_icon(prop, ICON_SNAP_NORMAL, 0);
RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
- prop= RNA_def_property(srna, "snap_element", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "snap_element", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "snap_mode");
RNA_def_property_enum_items(prop, snap_element_items);
RNA_def_property_ui_text(prop, "Snap Element", "Type of element to snap to");
RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
- prop= RNA_def_property(srna, "snap_target", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "snap_target", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "snap_target");
RNA_def_property_enum_items(prop, snap_target_items);
RNA_def_property_ui_text(prop, "Snap Target", "Which part to snap onto the target");
RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
- prop= RNA_def_property(srna, "use_snap_peel_object", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_snap_peel_object", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_PEEL_OBJECT);
RNA_def_property_ui_text(prop, "Snap Peel Object", "Consider objects as whole when finding volume center");
RNA_def_property_ui_icon(prop, ICON_SNAP_PEEL_OBJECT, 0);
RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
- prop= RNA_def_property(srna, "use_snap_project", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_snap_project", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_PROJECT);
RNA_def_property_ui_text(prop, "Project Individual Elements",
"Project individual elements on the surface of other objects");
RNA_def_property_ui_icon(prop, ICON_RETOPO, 0);
RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
- prop= RNA_def_property(srna, "use_snap_self", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_snap_self", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "snap_flag", SCE_SNAP_NO_SELF);
RNA_def_property_ui_text(prop, "Project to Self", "Snap onto itself (editmode)");
RNA_def_property_ui_icon(prop, ICON_ORTHO, 0);
@@ -1586,137 +1586,137 @@ static void rna_def_tool_settings(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_grease_pencil_sessions", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gpencil_flags", GP_TOOL_FLAG_PAINTSESSIONS_ON);
RNA_def_property_ui_text(prop, "Use Sketching Sessions", "Allow drawing multiple strokes at a time with Grease Pencil");
- RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); // xxx: need toolbar to be redrawn...
+ RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* xxx: need toolbar to be redrawn... */
/* Auto Keying */
- prop= RNA_def_property(srna, "use_keyframe_insert_auto", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_keyframe_insert_auto", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON);
RNA_def_property_ui_text(prop, "Auto Keying", "Automatic keyframe insertion for Objects and Bones");
RNA_def_property_ui_icon(prop, ICON_REC, 0);
- prop= RNA_def_property(srna, "auto_keying_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "auto_keying_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "autokey_mode");
RNA_def_property_enum_items(prop, auto_key_items);
RNA_def_property_ui_text(prop, "Auto-Keying Mode", "Mode of automatic keyframe insertion for Objects and Bones");
- prop= RNA_def_property(srna, "use_record_with_nla", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_record_with_nla", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", ANIMRECORD_FLAG_WITHNLA);
RNA_def_property_ui_text(prop, "Layered",
"Add a new NLA Track + Strip for every loop/pass made over the animation "
"to allow non-destructive tweaking");
- prop= RNA_def_property(srna, "use_keyframe_insert_keyingset", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_keyframe_insert_keyingset", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_ONLYKEYINGSET);
RNA_def_property_ui_text(prop, "Auto Keyframe Insert Keying Set",
"Automatic keyframe insertion using active Keying Set only");
RNA_def_property_ui_icon(prop, ICON_KEYINGSET, 0);
/* UV */
- prop= RNA_def_property(srna, "uv_select_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "uv_select_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "uv_selectmode");
RNA_def_property_enum_items(prop, uv_select_mode_items);
RNA_def_property_ui_text(prop, "UV Selection Mode", "UV selection and display mode");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
- prop= RNA_def_property(srna, "use_uv_select_sync", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_uv_select_sync", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uv_flag", UV_SYNC_SELECTION);
RNA_def_property_ui_text(prop, "UV Sync Selection", "Keep UV and edit mode mesh selection in sync");
RNA_def_property_ui_icon(prop, ICON_EDIT, 0);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
- prop= RNA_def_property(srna, "show_uv_local_view", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_uv_local_view", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uv_flag", UV_SHOW_SAME_IMAGE);
RNA_def_property_ui_text(prop, "UV Local View", "Draw only faces with the currently displayed image assigned");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
/* Mesh */
- prop= RNA_def_property(srna, "mesh_select_mode", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "mesh_select_mode", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "selectmode", 1);
RNA_def_property_array(prop, 3);
RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_editmesh_select_mode_set");
RNA_def_property_ui_text(prop, "Mesh Selection Mode", "Which mesh elements selection works on");
RNA_def_property_update(prop, 0, "rna_Scene_editmesh_select_mode_update");
- prop= RNA_def_property(srna, "vertex_group_weight", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "vertex_group_weight", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "vgroup_weight");
RNA_def_property_ui_text(prop, "Vertex Group Weight", "Weight to assign in vertex groups");
/* use with MESH_OT_select_shortest_path */
- prop= RNA_def_property(srna, "edge_path_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "edge_path_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "edge_mode");
RNA_def_property_enum_items(prop, edge_tag_items);
RNA_def_property_ui_text(prop, "Edge Tag Mode", "The edge flag to tag when selecting the shortest path");
- prop= RNA_def_property(srna, "edge_path_live_unwrap", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "edge_path_live_unwrap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "edge_mode_live_unwrap", 1);
RNA_def_property_ui_text(prop, "Live Unwrap", "Changing edges seam re-calculates UV unwrap");
/* etch-a-ton */
- prop= RNA_def_property(srna, "use_bone_sketching", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_bone_sketching", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bone_sketching", BONE_SKETCHING);
RNA_def_property_ui_text(prop, "Use Bone Sketching", "DOC BROKEN");
-// RNA_def_property_ui_icon(prop, ICON_EDIT, 0);
+/* RNA_def_property_ui_icon(prop, ICON_EDIT, 0); */
- prop= RNA_def_property(srna, "use_etch_quick", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_etch_quick", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bone_sketching", BONE_SKETCHING_QUICK);
RNA_def_property_ui_text(prop, "Quick Sketching", "DOC BROKEN");
- prop= RNA_def_property(srna, "use_etch_overdraw", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_etch_overdraw", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bone_sketching", BONE_SKETCHING_ADJUST);
RNA_def_property_ui_text(prop, "Overdraw Sketching", "DOC BROKEN");
- prop= RNA_def_property(srna, "use_etch_autoname", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_etch_autoname", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "skgen_retarget_options", SK_RETARGET_AUTONAME);
RNA_def_property_ui_text(prop, "Autoname", "DOC BROKEN");
- prop= RNA_def_property(srna, "etch_number", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "etch_number", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "skgen_num_string");
RNA_def_property_ui_text(prop, "Number", "DOC BROKEN");
- prop= RNA_def_property(srna, "etch_side", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "etch_side", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "skgen_num_string");
RNA_def_property_ui_text(prop, "Side", "DOC BROKEN");
- prop= RNA_def_property(srna, "etch_template", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "etch_template", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "skgen_template");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_pointer_funcs(prop, NULL, "rna_Scene_skgen_etch_template_set", NULL, NULL);
RNA_def_property_ui_text(prop, "Template", "Template armature that will be retargeted to the stroke");
- prop= RNA_def_property(srna, "etch_subdivision_number", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "etch_subdivision_number", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "skgen_subdivision_number");
RNA_def_property_range(prop, 1, 255);
RNA_def_property_ui_text(prop, "Subdivisions", "Number of bones in the subdivided stroke");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "etch_adaptive_limit", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "etch_adaptive_limit", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "skgen_correlation_limit");
RNA_def_property_range(prop, 0.00001, 1.0);
RNA_def_property_ui_range(prop, 0.01, 1.0, 0.01, 2);
RNA_def_property_ui_text(prop, "Limit", "Number of bones in the subdivided stroke");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "etch_length_limit", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "etch_length_limit", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "skgen_length_limit");
RNA_def_property_range(prop, 0.00001, 100000.0);
RNA_def_property_ui_range(prop, 0.001, 100.0, 0.1, 3);
RNA_def_property_ui_text(prop, "Length", "Number of bones in the subdivided stroke");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "etch_roll_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "etch_roll_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "skgen_retarget_roll");
RNA_def_property_enum_items(prop, retarget_roll_items);
RNA_def_property_ui_text(prop, "Retarget roll mode", "Method used to adjust the roll of bones when retargeting");
- prop= RNA_def_property(srna, "etch_convert_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "etch_convert_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "bone_sketching_convert");
RNA_def_property_enum_items(prop, sketch_convert_items);
RNA_def_property_ui_text(prop, "Stroke conversion method", "Method used to convert stroke to bones");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
/* Unified Paint Settings */
- prop= RNA_def_property(srna, "unified_paint_settings", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "unified_paint_settings", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "UnifiedPaintSettings");
RNA_def_property_ui_text(prop, "Unified Paint Settings", NULL);
@@ -1727,52 +1727,52 @@ static void rna_def_unified_paint_settings(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "UnifiedPaintSettings", NULL);
+ srna = RNA_def_struct(brna, "UnifiedPaintSettings", NULL);
RNA_def_struct_ui_text(srna, "Unified Paint Settings", "Overrides for some of the active brush's settings");
/* high-level flags to enable or disable unified paint settings */
- prop= RNA_def_property(srna, "use_unified_size", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_unified_size", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_SIZE);
RNA_def_property_ui_text(prop, "Use Unified Radius",
"Instead of per-brush radius, the radius is shared across brushes");
- prop= RNA_def_property(srna, "use_unified_strength", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_unified_strength", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_ALPHA);
RNA_def_property_ui_text(prop, "Use Unified Strength",
"Instead of per-brush strength, the strength is shared across brushes");
/* unified paint settings that override the equivalent settings
from the active brush */
- prop= RNA_def_property(srna, "size", PROP_INT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "size", PROP_INT, PROP_DISTANCE);
RNA_def_property_int_funcs(prop, NULL, "rna_UnifiedPaintSettings_size_set", NULL);
RNA_def_property_range(prop, 1, MAX_BRUSH_PIXEL_RADIUS*10);
RNA_def_property_ui_range(prop, 1, MAX_BRUSH_PIXEL_RADIUS, 1, 0);
RNA_def_property_ui_text(prop, "Radius", "Radius of the brush in pixels");
- prop= RNA_def_property(srna, "unprojected_radius", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "unprojected_radius", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_funcs(prop, NULL, "rna_UnifiedPaintSettings_unprojected_radius_set", NULL);
RNA_def_property_range(prop, 0.001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.001, 1, 0, 0);
RNA_def_property_ui_text(prop, "Unprojected Radius", "Radius of brush in Blender units");
- prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "alpha");
RNA_def_property_float_default(prop, 0.5f);
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 0.001);
RNA_def_property_ui_text(prop, "Strength", "How powerful the effect of the brush is when applied");
- prop= RNA_def_property(srna, "use_pressure_size", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pressure_size", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_BRUSH_SIZE_PRESSURE);
RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
RNA_def_property_ui_text(prop, "Size Pressure", "Enable tablet pressure sensitivity for size");
- prop= RNA_def_property(srna, "use_pressure_strength", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pressure_strength", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_BRUSH_ALPHA_PRESSURE);
RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
RNA_def_property_ui_text(prop, "Strength Pressure", "Enable tablet pressure sensitivity for strength");
- prop= RNA_def_property(srna, "use_locked_size", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_locked_size", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_BRUSH_LOCK_SIZE);
RNA_def_property_ui_text(prop, "Use Blender Units", "When locked brush stays same size relative to object; when unlocked brush size is given in pixels");
}
@@ -1793,27 +1793,27 @@ static void rna_def_unit_settings(BlenderRNA *brna)
{USER_UNIT_ROT_RADIANS, "RADIANS", 0, "Radians", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "UnitSettings", NULL);
+ srna = RNA_def_struct(brna, "UnitSettings", NULL);
RNA_def_struct_ui_text(srna, "Unit Settings", "");
/* Units */
- prop= RNA_def_property(srna, "system", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "system", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, unit_systems);
RNA_def_property_ui_text(prop, "Unit System", "The unit system to use for button display");
RNA_def_property_update(prop, NC_WINDOW, NULL);
- prop= RNA_def_property(srna, "system_rotation", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "system_rotation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, rotation_units);
RNA_def_property_ui_text(prop, "Rotation Units", "Unit to use for displaying/editing rotation values");
RNA_def_property_update(prop, NC_WINDOW, NULL);
- prop= RNA_def_property(srna, "scale_length", PROP_FLOAT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "scale_length", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_ui_text(prop, "Unit Scale", "Scale to use when converting between blender units and dimensions");
RNA_def_property_range(prop, 0.00001, 100000.0);
RNA_def_property_ui_range(prop, 0.001, 100.0, 0.1, 3);
RNA_def_property_update(prop, NC_WINDOW, NULL);
- prop= RNA_def_property(srna, "use_separate", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_separate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_UNIT_OPT_SPLIT);
RNA_def_property_ui_text(prop, "Separate Units", "Display units in pairs (e.g. 1m 0cm)");
RNA_def_property_update(prop, NC_WINDOW, NULL);
@@ -1823,325 +1823,325 @@ void rna_def_render_layer_common(StructRNA *srna, int scene)
{
PropertyRNA *prop;
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
- if(scene) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SceneRenderLayer_name_set");
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ if (scene) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SceneRenderLayer_name_set");
else RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Name", "Render layer name");
RNA_def_struct_name_property(srna, prop);
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "material_override", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "material_override", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "mat_override");
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Material Override", "Material to override all other materials in this render layer");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "light_override", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "light_override", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "light_override");
RNA_def_property_struct_type(prop, "Group");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Light Override", "Group to override all other lights in this render layer");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
/* layers */
- prop= RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
+ prop = RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
RNA_def_property_array(prop, 20);
RNA_def_property_ui_text(prop, "Visible Layers", "Scene layers included in this render layer");
- if(scene) RNA_def_property_boolean_funcs(prop, NULL, "rna_SceneRenderLayer_layer_set");
+ if (scene) RNA_def_property_boolean_funcs(prop, NULL, "rna_SceneRenderLayer_layer_set");
else RNA_def_property_boolean_funcs(prop, NULL, "rna_RenderLayer_layer_set");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "layers_zmask", PROP_BOOLEAN, PROP_LAYER);
+ prop = RNA_def_property(srna, "layers_zmask", PROP_BOOLEAN, PROP_LAYER);
RNA_def_property_boolean_sdna(prop, NULL, "lay_zmask", 1);
RNA_def_property_array(prop, 20);
RNA_def_property_ui_text(prop, "Zmask Layers", "Zmask scene layers for solid faces");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
/* layer options */
- prop= RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "layflag", SCE_LAY_DISABLE);
RNA_def_property_ui_text(prop, "Enabled", "Disable or enable the render layer");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_zmask", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_zmask", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZMASK);
RNA_def_property_ui_text(prop, "Zmask", "Only render what's in front of the solid z values");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "invert_zmask", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_zmask", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_NEG_ZMASK);
RNA_def_property_ui_text(prop, "Zmask Negate", "For Zmask, only render what is behind solid z values instead of in front");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_all_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_all_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ALL_Z);
RNA_def_property_ui_text(prop, "All Z", "Fill in Z values for solid faces in invisible layers, for masking");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_solid", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_solid", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID);
RNA_def_property_ui_text(prop, "Solid", "Render Solid faces in this Layer");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_halo", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_halo", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_HALO);
RNA_def_property_ui_text(prop, "Halo", "Render Halos in this Layer (on top of Solid)");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_ztransp", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_ztransp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZTRA);
RNA_def_property_ui_text(prop, "ZTransp", "Render Z-Transparent faces in this Layer (on top of Solid and Halos)");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_sky", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_sky", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SKY);
RNA_def_property_ui_text(prop, "Sky", "Render Sky in this Layer");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_edge_enhance", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_edge_enhance", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_EDGE);
RNA_def_property_ui_text(prop, "Edge", "Render Edge-enhance in this Layer (only works for Solid faces)");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_strand", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_strand", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_STRAND);
RNA_def_property_ui_text(prop, "Strand", "Render Strands in this Layer");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
/* passes */
- prop= RNA_def_property(srna, "use_pass_combined", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pass_combined", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_COMBINED);
RNA_def_property_ui_text(prop, "Combined", "Deliver full combined RGBA buffer");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_pass_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pass_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_Z);
RNA_def_property_ui_text(prop, "Z", "Deliver Z values pass");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_pass_vector", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pass_vector", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_VECTOR);
RNA_def_property_ui_text(prop, "Vector", "Deliver speed vector pass");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_pass_normal", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pass_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_NORMAL);
RNA_def_property_ui_text(prop, "Normal", "Deliver normal pass");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_pass_uv", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pass_uv", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_UV);
RNA_def_property_ui_text(prop, "UV", "Deliver texture UV pass");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_pass_mist", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pass_mist", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_MIST);
RNA_def_property_ui_text(prop, "Mist", "Deliver mist factor pass (0.0-1.0)");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_pass_object_index", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pass_object_index", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDEXOB);
RNA_def_property_ui_text(prop, "Object Index", "Deliver object index pass");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_pass_material_index", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pass_material_index", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDEXMA);
RNA_def_property_ui_text(prop, "Material Index", "Deliver material index pass");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_pass_color", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pass_color", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_RGBA);
RNA_def_property_ui_text(prop, "Color", "Deliver shade-less color pass");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_pass_diffuse", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pass_diffuse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE);
RNA_def_property_ui_text(prop, "Diffuse", "Deliver diffuse pass");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_pass_specular", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pass_specular", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SPEC);
RNA_def_property_ui_text(prop, "Specular", "Deliver specular pass");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_pass_shadow", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pass_shadow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SHADOW);
RNA_def_property_ui_text(prop, "Shadow", "Deliver shadow pass");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_pass_ambient_occlusion", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pass_ambient_occlusion", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_AO);
RNA_def_property_ui_text(prop, "AO", "Deliver AO pass");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_pass_reflection", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pass_reflection", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFLECT);
RNA_def_property_ui_text(prop, "Reflection", "Deliver raytraced reflection pass");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_pass_refraction", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pass_refraction", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFRACT);
RNA_def_property_ui_text(prop, "Refraction", "Deliver raytraced refraction pass");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_pass_emit", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pass_emit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_EMIT);
RNA_def_property_ui_text(prop, "Emit", "Deliver emission pass");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_pass_environment", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pass_environment", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_ENVIRONMENT);
RNA_def_property_ui_text(prop, "Environment", "Deliver environment lighting pass");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_pass_indirect", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pass_indirect", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDIRECT);
RNA_def_property_ui_text(prop, "Indirect", "Deliver indirect lighting pass");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "exclude_specular", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "exclude_specular", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SPEC);
RNA_def_property_ui_text(prop, "Specular Exclude", "Exclude specular pass from combined");
RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "exclude_shadow", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "exclude_shadow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SHADOW);
RNA_def_property_ui_text(prop, "Shadow Exclude", "Exclude shadow pass from combined");
RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "exclude_ambient_occlusion", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "exclude_ambient_occlusion", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_AO);
RNA_def_property_ui_text(prop, "AO Exclude", "Exclude AO pass from combined");
RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "exclude_reflection", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "exclude_reflection", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFLECT);
RNA_def_property_ui_text(prop, "Reflection Exclude", "Exclude raytraced reflection pass from combined");
RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "exclude_refraction", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "exclude_refraction", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFRACT);
RNA_def_property_ui_text(prop, "Refraction Exclude", "Exclude raytraced refraction pass from combined");
RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "exclude_emit", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "exclude_emit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_EMIT);
RNA_def_property_ui_text(prop, "Emit Exclude", "Exclude emission pass from combined");
RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "exclude_environment", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "exclude_environment", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_ENVIRONMENT);
RNA_def_property_ui_text(prop, "Environment Exclude", "Exclude environment pass from combined");
RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "exclude_indirect", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "exclude_indirect", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_INDIRECT);
RNA_def_property_ui_text(prop, "Indirect Exclude", "Exclude indirect pass from combined");
RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_pass_diffuse_direct", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pass_diffuse_direct", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE_DIRECT);
RNA_def_property_ui_text(prop, "Diffuse Direct", "Deliver diffuse direct pass");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_pass_diffuse_indirect", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pass_diffuse_indirect", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE_INDIRECT);
RNA_def_property_ui_text(prop, "Diffuse Indirect", "Deliver diffuse indirect pass");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_pass_diffuse_color", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pass_diffuse_color", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE_COLOR);
RNA_def_property_ui_text(prop, "Diffuse Color", "Deliver diffuse color pass");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_pass_glossy_direct", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pass_glossy_direct", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_GLOSSY_DIRECT);
RNA_def_property_ui_text(prop, "Glossy Direct", "Deliver glossy direct pass");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_pass_glossy_indirect", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pass_glossy_indirect", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_GLOSSY_INDIRECT);
RNA_def_property_ui_text(prop, "Glossy Indirect", "Deliver glossy indirect pass");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_pass_glossy_color", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pass_glossy_color", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_GLOSSY_COLOR);
RNA_def_property_ui_text(prop, "Glossy Color", "Deliver glossy color pass");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_pass_transmission_direct", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pass_transmission_direct", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_TRANSM_DIRECT);
RNA_def_property_ui_text(prop, "Transmission Direct", "Deliver transmission direct pass");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_pass_transmission_indirect", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pass_transmission_indirect", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_TRANSM_INDIRECT);
RNA_def_property_ui_text(prop, "Transmission Indirect", "Deliver transmission indirect pass");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "use_pass_transmission_color", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pass_transmission_color", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_TRANSM_COLOR);
RNA_def_property_ui_text(prop, "Transmission Color", "Deliver transmission color pass");
- if(scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
+ if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
}
@@ -2150,85 +2150,85 @@ static void rna_def_scene_game_recast_data(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "SceneGameRecastData", NULL);
+ srna = RNA_def_struct(brna, "SceneGameRecastData", NULL);
RNA_def_struct_sdna(srna, "RecastData");
RNA_def_struct_nested(brna, srna, "Scene");
RNA_def_struct_ui_text(srna, "Recast Data", "Recast data for a Game datablock");
- prop= RNA_def_property(srna, "cell_size", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "cell_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "cellsize");
RNA_def_property_ui_range(prop, 0.1, 1, 1, 2);
RNA_def_property_ui_text(prop, "Cell Size", "Rasterized cell size");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "cell_height", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "cell_height", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "cellheight");
RNA_def_property_ui_range(prop, 0.1, 1, 1, 2);
RNA_def_property_ui_text(prop, "Cell Height", "Rasterized cell height");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "agent_height", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "agent_height", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "agentheight");
RNA_def_property_ui_range(prop, 0.1, 5, 1, 2);
RNA_def_property_ui_text(prop, "Agent Height", "Minimum height where the agent can still walk");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "agent_radius", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "agent_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "agentradius");
RNA_def_property_ui_range(prop, 0.1, 5, 1, 2);
RNA_def_property_ui_text(prop, "Agent Radius", "Radius of the agent");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "climb_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "climb_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "agentmaxclimb");
RNA_def_property_ui_range(prop, 0.1, 5, 1, 2);
RNA_def_property_ui_text(prop, "Max Climb", "Maximum height between grid cells the agent can climb");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "slope_max", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "slope_max", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "agentmaxslope");
RNA_def_property_range(prop, 0, M_PI/2);
RNA_def_property_ui_text(prop, "Max Slope", "Maximum walkable slope angle in degrees");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "region_min_size", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "region_min_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "regionminsize");
RNA_def_property_ui_range(prop, 0, 150, 1, 2);
RNA_def_property_ui_text(prop, "Min Region Size", "Minimum regions size (smaller regions will be deleted)");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "region_merge_size", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "region_merge_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "regionmergesize");
RNA_def_property_ui_range(prop, 0, 150, 1, 2);
RNA_def_property_ui_text(prop, "Merged Region Size", "Minimum regions size (smaller regions will be merged)");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "edge_max_len", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "edge_max_len", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "edgemaxlen");
RNA_def_property_ui_range(prop, 0, 50, 1, 2);
RNA_def_property_ui_text(prop, "Max Edge Length", "Maximum contour edge length");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "edge_max_error", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "edge_max_error", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "edgemaxerror");
RNA_def_property_ui_range(prop, 0.1, 3.0, 1, 2);
RNA_def_property_ui_text(prop, "Max Edge Error", "Maximum distance error from contour to cells");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "verts_per_poly", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "verts_per_poly", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "vertsperpoly");
RNA_def_property_ui_range(prop, 3, 12, 1, 0);
RNA_def_property_ui_text(prop, "Verts Per Poly", "Max number of vertices per polygon");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "sample_dist", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "sample_dist", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "detailsampledist");
RNA_def_property_ui_range(prop, 0.0, 16.0, 1, 2);
RNA_def_property_ui_text(prop, "Sample Distance", "Detail mesh sample spacing");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "sample_max_error", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "sample_max_error", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "detailsamplemaxerror");
RNA_def_property_ui_range(prop, 0.0, 16.0, 1, 2);
RNA_def_property_ui_text(prop, "Max Sample Error", "Detail mesh simplification max sample error");
@@ -2240,7 +2240,7 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem aasamples_items[] ={
+ static EnumPropertyItem aasamples_items[] = {
{0, "SAMPLES_0", 0, "Off", ""},
{2, "SAMPLES_2", 0, "2x", ""},
{4, "SAMPLES_4", 0, "4x", ""},
@@ -2248,7 +2248,7 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
{16, "SAMPLES_16", 0, "16x", ""},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem framing_types_items[] ={
+ static EnumPropertyItem framing_types_items[] = {
{SCE_GAMEFRAMING_BARS, "LETTERBOX", 0, "Letterbox",
"Show the entire viewport in the display window, using bar horizontally or vertically"},
{SCE_GAMEFRAMING_EXTEND, "EXTEND", 0, "Extend",
@@ -2256,7 +2256,7 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
{SCE_GAMEFRAMING_SCALE, "SCALE", 0, "Scale", "Stretch or squeeze the viewport to fill the display window"},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem dome_modes_items[] ={
+ static EnumPropertyItem dome_modes_items[] = {
{DOME_FISHEYE, "FISHEYE", 0, "Fisheye", ""},
{DOME_TRUNCATED_FRONT, "TRUNCATED_FRONT", 0, "Front-Truncated", ""},
{DOME_TRUNCATED_REAR, "TRUNCATED_REAR", 0, "Rear-Truncated", ""},
@@ -2264,7 +2264,7 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
{DOME_PANORAM_SPH, "PANORAM_SPH", 0, "Spherical Panoramic", ""},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem stereo_modes_items[] ={
+ static EnumPropertyItem stereo_modes_items[] = {
{STEREO_QUADBUFFERED, "QUADBUFFERED", 0, "Quad-Buffer", ""},
{STEREO_ABOVEBELOW, "ABOVEBELOW", 0, "Above-Below", ""},
{STEREO_INTERLACED, "INTERLACED", 0, "Interlaced", ""},
@@ -2273,7 +2273,7 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
{STEREO_VINTERLACE, "VINTERLACE", 0, "Vinterlace", ""},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem stereo_items[] ={
+ static EnumPropertyItem stereo_items[] = {
{STEREO_NOSTEREO, "NONE", 0, "None", "Disable Stereo and Dome environments"},
{STEREO_ENABLED, "STEREO", 0, "Stereo", "Enable Stereo environment"},
{STEREO_DOME, "DOME", 0, "Dome", "Enable Dome environment"},
@@ -2281,14 +2281,14 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
static EnumPropertyItem physics_engine_items[] = {
{WOPHY_NONE, "NONE", 0, "None", "Don't use a physics engine"},
- //{WOPHY_ENJI, "ENJI", 0, "Enji", ""},
- //{WOPHY_SUMO, "SUMO", 0, "Sumo (Deprecated)", ""},
- //{WOPHY_DYNAMO, "DYNAMO", 0, "Dynamo", ""},
- //{WOPHY_ODE, "ODE", 0, "ODE", ""},
+ /*{WOPHY_ENJI, "ENJI", 0, "Enji", ""}, */
+ /*{WOPHY_SUMO, "SUMO", 0, "Sumo (Deprecated)", ""}, */
+ /*{WOPHY_DYNAMO, "DYNAMO", 0, "Dynamo", ""}, */
+ /*{WOPHY_ODE, "ODE", 0, "ODE", ""}, */
{WOPHY_BULLET, "BULLET", 0, "Bullet", "Use the Bullet physics engine"},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem material_items[] ={
+ static EnumPropertyItem material_items[] = {
{GAME_MAT_TEXFACE, "SINGLETEXTURE", 0, "Singletexture", "Singletexture face materials"},
{GAME_MAT_MULTITEX, "MULTITEXTURE", 0, "Multitexture", "Multitexture materials"},
{GAME_MAT_GLSL, "GLSL", 0, "GLSL", "OpenGL shading language shaders"},
@@ -2300,66 +2300,66 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
{OBSTSIMULATION_TOI_cells, "RVO_CELLS", 0, "RVO (cells)", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "SceneGameData", NULL);
+ srna = RNA_def_struct(brna, "SceneGameData", NULL);
RNA_def_struct_sdna(srna, "GameData");
RNA_def_struct_nested(brna, srna, "Scene");
RNA_def_struct_ui_text(srna, "Game Data", "Game data for a Scene datablock");
- prop= RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "xplay");
RNA_def_property_range(prop, 4, 10000);
RNA_def_property_ui_text(prop, "Resolution X", "Number of horizontal pixels in the screen");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "resolution_y", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "resolution_y", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "yplay");
RNA_def_property_range(prop, 4, 10000);
RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical pixels in the screen");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "samples", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "samples", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "aasamples");
RNA_def_property_enum_items(prop, aasamples_items);
RNA_def_property_ui_text(prop, "AA Samples", "The number of AA Samples to use for MSAA");
- prop= RNA_def_property(srna, "depth", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "depth", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "depth");
RNA_def_property_range(prop, 8, 32);
RNA_def_property_ui_text(prop, "Bits", "Display bit depth of full screen display");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "exit_key", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "exit_key", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "exitkey");
RNA_def_property_enum_items(prop, event_type_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_GameSettings_exit_key_set", NULL);
RNA_def_property_ui_text(prop, "Exit Key", "The key that exits the Game Engine");
RNA_def_property_update(prop, NC_SCENE, NULL);
- // Do we need it here ? (since we already have it in World
- prop= RNA_def_property(srna, "frequency", PROP_INT, PROP_NONE);
+ /* Do we need it here ? (since we already have it in World */
+ prop = RNA_def_property(srna, "frequency", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "freqplay");
RNA_def_property_range(prop, 4, 2000);
RNA_def_property_ui_text(prop, "Freq", "Display clock frequency of fullscreen display");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "show_fullscreen", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_fullscreen", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "playerflag", GAME_PLAYER_FULLSCREEN);
RNA_def_property_ui_text(prop, "Fullscreen", "Start player in a new fullscreen display");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "use_desktop", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_desktop", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "playerflag", GAME_PLAYER_DESKTOP_RESOLUTION);
RNA_def_property_ui_text(prop, "Desktop", "Uses the current desktop resultion in fullscreen mode");
RNA_def_property_update(prop, NC_SCENE, NULL);
/* Framing */
- prop= RNA_def_property(srna, "frame_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "framing.type");
RNA_def_property_enum_items(prop, framing_types_items);
RNA_def_property_ui_text(prop, "Framing Types", "Select the type of Framing you want");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "frame_color", PROP_FLOAT, PROP_COLOR);
+ 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);
@@ -2367,19 +2367,19 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE, NULL);
/* Stereo */
- prop= RNA_def_property(srna, "stereo", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "stereo", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "stereoflag");
RNA_def_property_enum_items(prop, stereo_items);
RNA_def_property_ui_text(prop, "Stereo Options", "");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "stereo_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "stereo_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "stereomode");
RNA_def_property_enum_items(prop, stereo_modes_items);
RNA_def_property_ui_text(prop, "Stereo Mode", "Stereographic techniques");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "stereo_eye_separation", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "stereo_eye_separation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "eyeseparation");
RNA_def_property_range(prop, 0.01, 5.0);
RNA_def_property_ui_text(prop, "Eye Separation",
@@ -2387,37 +2387,37 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE, NULL);
/* Dome */
- prop= RNA_def_property(srna, "dome_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "dome_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "dome.mode");
RNA_def_property_enum_items(prop, dome_modes_items);
RNA_def_property_ui_text(prop, "Dome Mode", "Dome physical configurations");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "dome_tessellation", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "dome_tessellation", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "dome.res");
RNA_def_property_ui_range(prop, 1, 8, 1, 1);
RNA_def_property_ui_text(prop, "Tessellation", "Tessellation level - check the generated mesh in wireframe mode");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "dome_buffer_resolution", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "dome_buffer_resolution", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dome.resbuf");
RNA_def_property_ui_range(prop, 0.1, 1.0, 0.1, 0.1);
RNA_def_property_ui_text(prop, "Buffer Resolution", "Buffer Resolution - decrease it to increase speed");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "dome_angle", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "dome_angle", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "dome.angle");
RNA_def_property_ui_range(prop, 90, 250, 1, 1);
RNA_def_property_ui_text(prop, "Angle", "Field of View of the Dome - it only works in mode Fisheye and Truncated");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "dome_tilt", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "dome_tilt", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "dome.tilt");
RNA_def_property_ui_range(prop, -180, 180, 1, 1);
RNA_def_property_ui_text(prop, "Tilt", "Camera rotation in horizontal axis");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "dome_text", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "dome_text", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "dome.warptext");
RNA_def_property_struct_type(prop, "Text");
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -2425,27 +2425,27 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE, NULL);
/* physics */
- prop= RNA_def_property(srna, "physics_engine", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "physics_engine", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "physicsEngine");
RNA_def_property_enum_items(prop, physics_engine_items);
RNA_def_property_ui_text(prop, "Physics Engine", "Physics engine used for physics simulation in the game engine");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "physics_gravity", PROP_FLOAT, PROP_ACCELERATION);
+ prop = RNA_def_property(srna, "physics_gravity", PROP_FLOAT, PROP_ACCELERATION);
RNA_def_property_float_sdna(prop, NULL, "gravity");
RNA_def_property_ui_range(prop, 0.0, 25.0, 1, 2);
RNA_def_property_range(prop, 0.0, 10000.0);
RNA_def_property_ui_text(prop, "Physics Gravity", "Gravitational constant used for physics simulation in the game engine");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "occlusion_culling_resolution", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "occlusion_culling_resolution", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "occlusionRes");
RNA_def_property_range(prop, 128.0, 1024.0);
RNA_def_property_ui_text(prop, "Occlusion Resolution",
"Size of the occlusion buffer in pixel, use higher value for better precision (slower)");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "fps", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "fps", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ticrate");
RNA_def_property_ui_range(prop, 1, 60, 1, 1);
RNA_def_property_range(prop, 1, 250);
@@ -2454,7 +2454,7 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
"(physics fixed timestep = 1/fps, independently of actual frame rate)");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "logic_step_max", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "logic_step_max", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "maxlogicstep");
RNA_def_property_ui_range(prop, 1, 5, 1, 1);
RNA_def_property_range(prop, 1, 5);
@@ -2463,7 +2463,7 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
"higher value allows better synchronization with physics");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "physics_step_max", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "physics_step_max", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "maxphystep");
RNA_def_property_ui_range(prop, 1, 5, 1, 1);
RNA_def_property_range(prop, 1, 5);
@@ -2472,7 +2472,7 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
"higher value allows physics to keep up with realtime");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "physics_step_sub", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "physics_step_sub", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "physubstep");
RNA_def_property_ui_range(prop, 1, 5, 1, 1);
RNA_def_property_range(prop, 1, 5);
@@ -2482,17 +2482,17 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE, NULL);
/* mode */
- prop= RNA_def_property(srna, "use_occlusion_culling", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", (1 << 5)); //XXX mode hardcoded // WO_DBVT_CULLING
+ prop = RNA_def_property(srna, "use_occlusion_culling", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mode", (1 << 5)); /*XXX mode hardcoded *//* WO_DBVT_CULLING */
RNA_def_property_ui_text(prop, "DBVT culling", "Use optimized Bullet DBVT tree for view frustum and occlusion culling");
- // not used // deprecated !!!!!!!!!!!!!
- prop= RNA_def_property(srna, "use_activity_culling", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", (1 << 3)); //XXX mode hardcoded
+ /* not used *//* deprecated !!!!!!!!!!!!! */
+ prop = RNA_def_property(srna, "use_activity_culling", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mode", (1 << 3)); /*XXX mode hardcoded */
RNA_def_property_ui_text(prop, "Activity Culling", "Activity culling is enabled");
- // not used // deprecated !!!!!!!!!!!!!
- prop= RNA_def_property(srna, "activity_culling_box_radius", PROP_FLOAT, PROP_NONE);
+ /* not used *//* deprecated !!!!!!!!!!!!! */
+ prop = RNA_def_property(srna, "activity_culling_box_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "activityBoxRadius");
RNA_def_property_range(prop, 0.0, 1000.0);
RNA_def_property_ui_text(prop, "Box Radius",
@@ -2500,110 +2500,110 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
"(objects outside the box are activity-culled)");
/* booleans */
- prop= RNA_def_property(srna, "show_debug_properties", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_debug_properties", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_DEBUG_PROPS);
RNA_def_property_ui_text(prop, "Show Debug Properties", "Show properties marked for debugging while the game runs");
- prop= RNA_def_property(srna, "show_framerate_profile", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_framerate_profile", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_FRAMERATE);
RNA_def_property_ui_text(prop, "Show Framerate and Profile",
"Show framerate and profiling information while the game runs");
- prop= RNA_def_property(srna, "show_physics_visualization", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_physics_visualization", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_PHYSICS);
RNA_def_property_ui_text(prop, "Show Physics Visualization", "Show a visualization of physics bounds and interactions");
- prop= RNA_def_property(srna, "show_mouse", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_mouse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_MOUSE);
RNA_def_property_ui_text(prop, "Show Mouse", "Start player with a visible mouse cursor");
- prop= RNA_def_property(srna, "use_frame_rate", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_frame_rate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_ENABLE_ALL_FRAMES);
RNA_def_property_ui_text(prop, "Use Frame Rate", "Respect the frame rate rather than rendering as many frames as possible");
- prop= RNA_def_property(srna, "use_display_lists", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_display_lists", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_DISPLAY_LISTS);
RNA_def_property_ui_text(prop, "Display Lists", "Use display lists to speed up rendering by keeping geometry on the GPU");
- prop= RNA_def_property(srna, "use_deprecation_warnings", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_deprecation_warnings", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_IGNORE_DEPRECATION_WARNINGS);
RNA_def_property_ui_text(prop, "Deprecation Warnings", "Print warnings when using deprecated features in the python API");
- prop= RNA_def_property(srna, "use_animation_record", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_animation_record", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_ENABLE_ANIMATION_RECORD);
RNA_def_property_ui_text(prop, "Record Animation", "Record animation to F-Curves");
- prop= RNA_def_property(srna, "use_auto_start", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_auto_start", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_GameSettings_auto_start_get", "rna_GameSettings_auto_start_set");
RNA_def_property_ui_text(prop, "Auto Start", "Automatically start game at load time");
- prop= RNA_def_property(srna, "restrict_animation_updates", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "restrict_animation_updates", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_RESTRICT_ANIM_UPDATES);
RNA_def_property_ui_text(prop, "Restrict Animation Updates",
"Restrict the number of animation updates to the animation FPS (this is "
"better for performance, but can cause issues with smooth playback)");
/* materials */
- prop= RNA_def_property(srna, "material_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "material_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "matmode");
RNA_def_property_enum_items(prop, material_items);
RNA_def_property_ui_text(prop, "Material Mode", "Material mode to use for rendering");
RNA_def_property_update(prop, NC_SCENE|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "use_glsl_lights", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_glsl_lights", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_LIGHTS);
RNA_def_property_ui_text(prop, "GLSL Lights", "Use lights for GLSL rendering");
RNA_def_property_update(prop, NC_SCENE|NA_EDITED, "rna_Scene_glsl_update");
- prop= RNA_def_property(srna, "use_glsl_shaders", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_glsl_shaders", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_SHADERS);
RNA_def_property_ui_text(prop, "GLSL Shaders", "Use shaders for GLSL rendering");
RNA_def_property_update(prop, NC_SCENE|NA_EDITED, "rna_Scene_glsl_update");
- prop= RNA_def_property(srna, "use_glsl_shadows", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_glsl_shadows", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_SHADOWS);
RNA_def_property_ui_text(prop, "GLSL Shadows", "Use shadows for GLSL rendering");
RNA_def_property_update(prop, NC_SCENE|NA_EDITED, "rna_Scene_glsl_update");
- prop= RNA_def_property(srna, "use_glsl_ramps", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_glsl_ramps", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_RAMPS);
RNA_def_property_ui_text(prop, "GLSL Ramps", "Use ramps for GLSL rendering");
RNA_def_property_update(prop, NC_SCENE|NA_EDITED, "rna_Scene_glsl_update");
- prop= RNA_def_property(srna, "use_glsl_nodes", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_glsl_nodes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_NODES);
RNA_def_property_ui_text(prop, "GLSL Nodes", "Use nodes for GLSL rendering");
RNA_def_property_update(prop, NC_SCENE|NA_EDITED, "rna_Scene_glsl_update");
- prop= RNA_def_property(srna, "use_glsl_color_management", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_glsl_color_management", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_COLOR_MANAGEMENT);
RNA_def_property_ui_text(prop, "GLSL Color Management", "Use color management for GLSL rendering");
RNA_def_property_update(prop, NC_SCENE|NA_EDITED, "rna_Scene_glsl_update");
- prop= RNA_def_property(srna, "use_glsl_extra_textures", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_glsl_extra_textures", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_EXTRA_TEX);
RNA_def_property_ui_text(prop, "GLSL Extra Textures", "Use extra textures like normal or specular maps for GLSL rendering");
RNA_def_property_update(prop, NC_SCENE|NA_EDITED, "rna_Scene_glsl_update");
/* obstacle simulation */
- prop= RNA_def_property(srna, "obstacle_simulation", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "obstacle_simulation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "obstacleSimulation");
RNA_def_property_enum_items(prop, obstacle_simulation_items);
RNA_def_property_ui_text(prop, "Obstacle simulation", "Simulation used for obstacle avoidance in the game engine");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "level_height", PROP_FLOAT, PROP_ACCELERATION);
+ prop = RNA_def_property(srna, "level_height", PROP_FLOAT, PROP_ACCELERATION);
RNA_def_property_float_sdna(prop, NULL, "levelHeight");
RNA_def_property_range(prop, 0.0f, 200.0f);
RNA_def_property_ui_text(prop, "Level height", "Max difference in heights of obstacles to enable their interaction");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "show_obstacle_simulation", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_obstacle_simulation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_OBSTACLE_SIMULATION);
RNA_def_property_ui_text(prop, "Visualization", "Enable debug visualization for obstacle simulation");
/* Recast Settings */
- prop= RNA_def_property(srna, "recast_data", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "recast_data", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "recastData");
RNA_def_property_struct_type(prop, "SceneGameRecastData");
@@ -2617,7 +2617,7 @@ static void rna_def_scene_render_layer(BlenderRNA *brna)
{
StructRNA *srna;
- srna= RNA_def_struct(brna, "SceneRenderLayer", NULL);
+ srna = RNA_def_struct(brna, "SceneRenderLayer", NULL);
RNA_def_struct_ui_text(srna, "Scene Render Layer", "Render layer");
RNA_def_struct_ui_icon(srna, ICON_RENDERLAYERS);
@@ -2634,18 +2634,18 @@ static void rna_def_render_layers(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *parm;
RNA_def_property_srna(cprop, "RenderLayers");
- srna= RNA_def_struct(brna, "RenderLayers", NULL);
+ srna = RNA_def_struct(brna, "RenderLayers", NULL);
RNA_def_struct_sdna(srna, "RenderData");
RNA_def_struct_ui_text(srna, "Render Layers", "Collection of render layers");
- prop= RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "actlay");
RNA_def_property_int_funcs(prop, "rna_RenderSettings_active_layer_index_get", "rna_RenderSettings_active_layer_index_set",
"rna_RenderSettings_active_layer_index_range");
RNA_def_property_ui_text(prop, "Active Layer Index", "Active index in render layer array");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_UNSIGNED);
RNA_def_property_struct_type(prop, "SceneRenderLayer");
RNA_def_property_pointer_funcs(prop, "rna_RenderSettings_active_layer_get",
"rna_RenderSettings_active_layer_set", NULL, NULL);
@@ -2653,18 +2653,18 @@ static void rna_def_render_layers(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_ui_text(prop, "Active Render Layer", "Active Render Layer");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- func= RNA_def_function(srna, "new", "rna_RenderLayer_new");
+ func = RNA_def_function(srna, "new", "rna_RenderLayer_new");
RNA_def_function_ui_description(func, "Add a render layer to scene");
RNA_def_function_flag(func, FUNC_USE_SELF_ID);
- parm= RNA_def_string(func, "name", "RenderLayer", 0, "", "New name for the marker (not unique)");
+ parm = RNA_def_string(func, "name", "RenderLayer", 0, "", "New name for the marker (not unique)");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "result", "SceneRenderLayer", "", "Newly created render layer");
+ parm = RNA_def_pointer(func, "result", "SceneRenderLayer", "", "Newly created render layer");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_RenderLayer_remove");
+ func = RNA_def_function(srna, "remove", "rna_RenderLayer_remove");
RNA_def_function_ui_description(func, "Remove a render layer");
RNA_def_function_flag(func, FUNC_USE_MAIN|FUNC_USE_REPORTS|FUNC_USE_SELF_ID);
- parm= RNA_def_pointer(func, "layer", "SceneRenderLayer", "", "Timeline marker to remove");
+ parm = RNA_def_pointer(func, "layer", "SceneRenderLayer", "", "Timeline marker to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
@@ -2688,20 +2688,20 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ImageFormatSettings", NULL);
+ srna = RNA_def_struct(brna, "ImageFormatSettings", NULL);
RNA_def_struct_sdna(srna, "ImageFormatData");
RNA_def_struct_nested(brna, srna, "Scene");
- // RNA_def_struct_path_func(srna, "rna_RenderSettings_path"); // no need for the path, its not animated!
+ /* RNA_def_struct_path_func(srna, "rna_RenderSettings_path"); *//* no need for the path, its not animated! */
RNA_def_struct_ui_text(srna, "Image Format", "Settings for image formats");
- prop= RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "imtype");
RNA_def_property_enum_items(prop, image_type_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_ImageFormatSettings_file_format_set", "rna_ImageFormatSettings_file_format_itemf");
RNA_def_property_ui_text(prop, "File Format", "File format to save the rendered images as");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "planes");
RNA_def_property_enum_items(prop, image_color_mode_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_ImageFormatSettings_color_mode_itemf");
@@ -2710,7 +2710,7 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna)
"and RGBA for saving red, green, blue and alpha channels");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "color_depth", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "color_depth", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "depth");
RNA_def_property_enum_items(prop, image_color_depth_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_ImageFormatSettings_color_depth_itemf");
@@ -2718,26 +2718,26 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
/* was 'file_quality' */
- prop= RNA_def_property(srna, "quality", PROP_INT, PROP_PERCENTAGE);
+ prop = RNA_def_property(srna, "quality", PROP_INT, PROP_PERCENTAGE);
RNA_def_property_int_sdna(prop, NULL, "quality");
RNA_def_property_range(prop, 0, 100); /* 0 is needed for compression. */
RNA_def_property_ui_text(prop, "Quality", "Quality for image formats that support lossy compression");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
/* was shared with file_quality */
- prop= RNA_def_property(srna, "compression", PROP_INT, PROP_PERCENTAGE);
+ prop = RNA_def_property(srna, "compression", PROP_INT, PROP_PERCENTAGE);
RNA_def_property_int_sdna(prop, NULL, "compress");
RNA_def_property_range(prop, 0, 100); /* 0 is needed for compression. */
RNA_def_property_ui_text(prop, "Compression", "Compression level for formats that support lossless compression");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
/* flag */
- prop= RNA_def_property(srna, "use_zbuffer", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_zbuffer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", R_IMF_FLAG_ZBUF);
RNA_def_property_ui_text(prop, "Z Buffer", "Save the z-depth per pixel (32 bit unsigned int z-buffer)");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_preview", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_preview", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", R_IMF_FLAG_PREVIEW_JPG);
RNA_def_property_ui_text(prop, "Preview", "When rendering animations, save JPG preview images in same directory");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
@@ -2747,7 +2747,7 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna)
#ifdef WITH_OPENEXR
/* OpenEXR */
- prop= RNA_def_property(srna, "exr_codec", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "exr_codec", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "exr_codec");
RNA_def_property_enum_items(prop, exr_codec_items);
RNA_def_property_ui_text(prop, "Codec", "Codec settings for OpenEXR");
@@ -2758,17 +2758,17 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna)
#ifdef WITH_OPENJPEG
/* Jpeg 2000 */
- prop= RNA_def_property(srna, "use_jpeg2k_ycc", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_jpeg2k_ycc", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "jp2_flag", R_IMF_JP2_FLAG_YCC);
RNA_def_property_ui_text(prop, "YCC", "Save luminance-chrominance-chrominance channels instead of RGB colors");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_jpeg2k_cinema_preset", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_jpeg2k_cinema_preset", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "jp2_flag", R_IMF_JP2_FLAG_CINE_PRESET);
RNA_def_property_ui_text(prop, "Cinema", "Use Openjpeg Cinema Preset");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_jpeg2k_cinema_48", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_jpeg2k_cinema_48", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "jp2_flag", R_IMF_JP2_FLAG_CINE_48);
RNA_def_property_ui_text(prop, "Cinema (48)", "Use Openjpeg Cinema Preset (48fps)");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
@@ -2776,24 +2776,24 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna)
/* Cineon and DPX */
- prop= RNA_def_property(srna, "use_cineon_log", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_cineon_log", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "cineon_flag", R_CINEON_LOG);
RNA_def_property_ui_text(prop, "Log", "Convert to logarithmic color space");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "cineon_black", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "cineon_black", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "cineon_black");
RNA_def_property_range(prop, 0, 1024);
RNA_def_property_ui_text(prop, "B", "Log conversion reference blackpoint");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "cineon_white", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "cineon_white", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "cineon_white");
RNA_def_property_range(prop, 0, 1024);
RNA_def_property_ui_text(prop, "W", "Log conversion reference whitepoint");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "cineon_gamma", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "cineon_gamma", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "cineon_gamma");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "G", "Log conversion gamma");
@@ -2897,7 +2897,7 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Max Rate", "Rate control: max rate (kb/s)");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "muxrate", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "muxrate", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "mux_rate");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0, 100000000);
@@ -2925,7 +2925,7 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Mux Packet Size", "Mux packet size (byte)");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_autosplit", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_autosplit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", FFMPEG_AUTOSPLIT_OUTPUT);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Autosplit Output", "Autosplit output at 2GB boundary");
@@ -2953,7 +2953,7 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Bitrate", "Audio bitrate (kb/s)");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "audio_volume", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "audio_volume", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "audio_volume");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0f, 1.0f);
@@ -2961,15 +2961,15 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
#endif
- // the following two "ffmpeg" settings are general audio settings
- prop= RNA_def_property(srna, "audio_mixrate", PROP_INT, PROP_NONE);
+ /* the following two "ffmpeg" settings are general audio settings */
+ prop = RNA_def_property(srna, "audio_mixrate", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "audio_mixrate");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 8000, 192000);
RNA_def_property_ui_text(prop, "Samplerate", "Audio samplerate(samples/s)");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "audio_channels", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "audio_channels", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "audio_channels");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, audio_channel_items);
@@ -3062,12 +3062,12 @@ static void rna_def_scene_quicktime_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "HQ", "Use High Quality resampling algorithm");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "audio_codec_isvbr", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "audio_codec_isvbr", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "audioCodecFlags", QTAUDIO_FLAG_CODEC_ISCBR);
RNA_def_property_ui_text(prop, "VBR", "Use Variable Bit Rate compression (improves quality at same bitrate)");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "audio_bitrate", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "audio_bitrate", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "audioBitRate");
RNA_def_property_enum_items(prop, quicktime_audio_bitrate_items);
RNA_def_property_ui_text(prop, "Bitrate", "Compressed audio bitrate");
@@ -3081,7 +3081,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem pixel_filter_items[] ={
+ static EnumPropertyItem pixel_filter_items[] = {
{R_FILTER_BOX, "BOX", 0, "Box", "Use a box filter for anti-aliasing"},
{R_FILTER_TENT, "TENT", 0, "Tent", "Use a tent filter for anti-aliasing"},
{R_FILTER_QUAD, "QUADRATIC", 0, "Quadratic", "Use a quadratic filter for anti-aliasing"},
@@ -3091,13 +3091,13 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{R_FILTER_MITCH, "MITCHELL", 0, "Mitchell-Netravali", "Use a Mitchell-Netravali filter for anti-aliasing"},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem alpha_mode_items[] ={
+ static EnumPropertyItem alpha_mode_items[] = {
{R_ADDSKY, "SKY", 0, "Sky", "Transparent pixels are filled with sky color"},
{R_ALPHAPREMUL, "PREMUL", 0, "Premultiplied", "Transparent RGB pixels are multiplied by the alpha channel"},
{R_ALPHAKEY, "STRAIGHT", 0, "Straight Alpha", "Transparent RGB and alpha pixels are unmodified"},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem display_mode_items[] ={
+ static EnumPropertyItem display_mode_items[] = {
{R_OUTPUT_SCREEN, "SCREEN", 0, "Full Screen", "Images are rendered in full Screen"},
{R_OUTPUT_AREA, "AREA", 0, "Image Editor", "Images are rendered in Image Editor"},
{R_OUTPUT_WINDOW, "WINDOW", 0, "New Window", "Images are rendered in new Window"},
@@ -3105,7 +3105,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
/* Bake */
- static EnumPropertyItem bake_mode_items[] ={
+ static EnumPropertyItem bake_mode_items[] = {
{RE_BAKE_ALL, "FULL", 0, "Full Render", "Bake everything"},
{RE_BAKE_AO, "AO", 0, "Ambient Occlusion", "Bake ambient occlusion"},
{RE_BAKE_SHADOW, "SHADOW", 0, "Shadow", "Bake shadows"},
@@ -3120,14 +3120,14 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{RE_BAKE_SPEC_COLOR, "SPEC_COLOR", 0, "Specular Colors", "Bake Specular colors"},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem bake_normal_space_items[] ={
+ static EnumPropertyItem bake_normal_space_items[] = {
{R_BAKE_SPACE_CAMERA, "CAMERA", 0, "Camera", "Bake the normals in camera space"},
{R_BAKE_SPACE_WORLD, "WORLD", 0, "World", "Bake the normals in world space"},
{R_BAKE_SPACE_OBJECT, "OBJECT", 0, "Object", "Bake the normals in object space"},
{R_BAKE_SPACE_TANGENT, "TANGENT", 0, "Tangent", "Bake the normals in tangent space"},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem bake_qyad_split_items[] ={
+ static EnumPropertyItem bake_qyad_split_items[] = {
{0, "AUTO", 0, "Automatic", "Split quads to give the least distortion while baking"},
{1, "FIXED", 0, "Fixed", "Split quads predictably (0,1,2) (0,2,3)"},
{2, "FIXED_ALT", 0, "Fixed Alternate", "Split quads predictably (1,2,3) (1,3,0)"},
@@ -3176,34 +3176,34 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
rna_def_scene_quicktime_settings(brna);
#endif
- srna= RNA_def_struct(brna, "RenderSettings", NULL);
+ srna = RNA_def_struct(brna, "RenderSettings", NULL);
RNA_def_struct_sdna(srna, "RenderData");
RNA_def_struct_nested(brna, srna, "Scene");
RNA_def_struct_path_func(srna, "rna_RenderSettings_path");
RNA_def_struct_ui_text(srna, "Render Data", "Rendering settings for a Scene datablock");
/* Render Data */
- prop= RNA_def_property(srna, "image_settings", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "image_settings", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "im_format");
RNA_def_property_struct_type(prop, "ImageFormatSettings");
RNA_def_property_ui_text(prop, "Image Format", "");
- prop= RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "xsch");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 4, 10000);
RNA_def_property_ui_text(prop, "Resolution X", "Number of horizontal pixels in the rendered image");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneCamera_update");
- prop= RNA_def_property(srna, "resolution_y", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "resolution_y", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ysch");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 4, 10000);
RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical pixels in the rendered image");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneCamera_update");
- prop= RNA_def_property(srna, "resolution_percentage", PROP_INT, PROP_PERCENTAGE);
+ prop = RNA_def_property(srna, "resolution_percentage", PROP_INT, PROP_PERCENTAGE);
RNA_def_property_int_sdna(prop, NULL, "size");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 1, SHRT_MAX);
@@ -3211,26 +3211,26 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Resolution %", "Percentage scale for render resolution");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "parts_x", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "parts_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "xparts");
RNA_def_property_range(prop, 1, 512);
RNA_def_property_ui_text(prop, "Parts X", "Number of horizontal tiles to use while rendering");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "parts_y", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "parts_y", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "yparts");
RNA_def_property_range(prop, 1, 512);
RNA_def_property_ui_text(prop, "Parts Y", "Number of vertical tiles to use while rendering");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "pixel_aspect_x", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "pixel_aspect_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xasp");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 1.0f, 200.0f);
RNA_def_property_ui_text(prop, "Pixel Aspect X", "Horizontal aspect ratio - for anamorphic or non-square pixel output");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneCamera_update");
- prop= RNA_def_property(srna, "pixel_aspect_y", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "pixel_aspect_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yasp");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 1.0f, 200.0f);
@@ -3238,27 +3238,27 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneCamera_update");
#ifdef WITH_QUICKTIME
- prop= RNA_def_property(srna, "quicktime", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "quicktime", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "QuickTimeSettings");
RNA_def_property_pointer_sdna(prop, NULL, "qtcodecsettings");
RNA_def_property_flag(prop, PROP_NEVER_UNLINK);
RNA_def_property_ui_text(prop, "QuickTime Settings", "QuickTime related settings for the scene");
#endif
- prop= RNA_def_property(srna, "ffmpeg", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "ffmpeg", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "FFmpegSettings");
RNA_def_property_pointer_sdna(prop, NULL, "ffcodecdata");
RNA_def_property_flag(prop, PROP_NEVER_UNLINK);
RNA_def_property_ui_text(prop, "FFmpeg Settings", "FFmpeg related settings for the scene");
- prop= RNA_def_property(srna, "fps", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "fps", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "frs_sec");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 1, 120);
RNA_def_property_ui_text(prop, "FPS", "Framerate, expressed in frames per second");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_Scene_fps_update");
- prop= RNA_def_property(srna, "fps_base", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "fps_base", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "frs_sec_base");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.1f, 120.0f);
@@ -3266,14 +3266,14 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_Scene_fps_update");
/* frame mapping */
- prop= RNA_def_property(srna, "frame_map_old", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_map_old", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "framapto");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 1, 900);
RNA_def_property_ui_text(prop, "Frame Map Old", "Old mapping value in frames");
RNA_def_property_update(prop, NC_SCENE|ND_FRAME, "rna_Scene_framelen_update");
- prop= RNA_def_property(srna, "frame_map_new", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_map_new", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "images");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 1, 900);
@@ -3281,74 +3281,74 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE|ND_FRAME, "rna_Scene_framelen_update");
- prop= RNA_def_property(srna, "dither_intensity", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "dither_intensity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dither_intensity");
RNA_def_property_range(prop, 0.0f, 2.0f);
RNA_def_property_ui_text(prop, "Dither Intensity",
"Amount of dithering noise added to the rendered image to break up banding");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "pixel_filter_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "pixel_filter_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "filtertype");
RNA_def_property_enum_items(prop, pixel_filter_items);
RNA_def_property_ui_text(prop, "Pixel Filter", "Reconstruction filter used for combining anti-aliasing samples");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "filter_size", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "filter_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "gauss");
RNA_def_property_range(prop, 0.5f, 1.5f);
RNA_def_property_ui_text(prop, "Filter Size", "Pixel width over which the reconstruction filter combines samples");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "alpha_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "alpha_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "alphamode");
RNA_def_property_enum_items(prop, alpha_mode_items);
RNA_def_property_ui_text(prop, "Alpha Mode", "Representation of alpha information in the RGBA pixels");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "octree_resolution", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "octree_resolution", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ocres");
RNA_def_property_enum_items(prop, octree_resolution_items);
RNA_def_property_ui_text(prop, "Octree Resolution",
"Resolution of raytrace accelerator, use higher resolutions for larger scenes");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "raytrace_method", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "raytrace_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "raytrace_structure");
RNA_def_property_enum_items(prop, raytrace_structure_items);
RNA_def_property_ui_text(prop, "Raytrace Acceleration Structure", "Type of raytrace accelerator structure");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_instances", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_instances", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "raytrace_options", R_RAYTRACE_USE_INSTANCES);
RNA_def_property_ui_text(prop, "Use Instances",
"Instance support leads to effective memory reduction when using duplicates");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_local_coords", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_local_coords", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "raytrace_options", R_RAYTRACE_USE_LOCAL_COORDS);
RNA_def_property_ui_text(prop, "Use Local Coords",
"Vertex coordinates are stored locally on each primitive "
"(increases memory usage, but may have impact on speed)");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_antialiasing", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_antialiasing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_OSA);
RNA_def_property_ui_text(prop, "Anti-Aliasing", "Render and combine multiple samples per pixel to prevent jagged edges");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "antialiasing_samples", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "antialiasing_samples", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "osa");
RNA_def_property_enum_items(prop, fixed_oversample_items);
RNA_def_property_ui_text(prop, "Anti-Aliasing Samples", "Amount of anti-aliasing samples per pixel");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_fields", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_fields", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDS);
RNA_def_property_ui_text(prop, "Fields", "Render image to two fields per frame, for interlaced TV output");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "field_order", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "field_order", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, field_order_items);
RNA_def_property_ui_text(prop, "Field Order",
@@ -3356,61 +3356,61 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
"to create smooth motion for TV output)");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_fields_still", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_fields_still", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDSTILL);
RNA_def_property_ui_text(prop, "Fields Still", "Disable the time difference between fields");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
/* rendering features */
- prop= RNA_def_property(srna, "use_shadows", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_shadows", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SHADOW);
RNA_def_property_ui_text(prop, "Shadows", "Calculate shadows while rendering");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_envmaps", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_envmaps", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_ENVMAP);
RNA_def_property_ui_text(prop, "Environment Maps", "Calculate environment maps while rendering");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_radiosity", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_radiosity", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_RADIO);
RNA_def_property_ui_text(prop, "Radiosity", "Calculate radiosity in a pre-process before rendering");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_sss", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_sss", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SSS);
RNA_def_property_ui_text(prop, "Subsurface Scattering", "Calculate sub-surface scattering in materials rendering");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_raytrace", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_raytrace", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_RAYTRACE);
RNA_def_property_ui_text(prop, "Raytracing", "Pre-calculate the raytrace accelerator and render raytracing effects");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_textures", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_textures", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "scemode", R_NO_TEX);
RNA_def_property_ui_text(prop, "Textures", "Use textures to affect material properties");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_edge_enhance", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_edge_enhance", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_EDGE);
RNA_def_property_ui_text(prop, "Edge", "Create a toon outline around the edges of geometry");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "edge_threshold", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "edge_threshold", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "edgeint");
RNA_def_property_range(prop, 0, 255);
RNA_def_property_ui_text(prop, "Edge Threshold", "Threshold for drawing outlines on geometry edges");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "edge_color", PROP_FLOAT, PROP_COLOR);
+ prop = RNA_def_property(srna, "edge_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "edgeR");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Edge Color", "Edge color");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
/* threads */
- prop= RNA_def_property(srna, "threads", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "threads", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "threads");
RNA_def_property_range(prop, 1, BLENDER_MAX_THREADS);
RNA_def_property_int_funcs(prop, "rna_RenderSettings_threads_get", NULL, NULL);
@@ -3418,27 +3418,27 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
"Number of CPU threads to use simultaneously while rendering (for multi-core/CPU systems)");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "threads_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "threads_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, threads_mode_items);
RNA_def_property_ui_text(prop, "Threads Mode", "Determine the amount of render threads used");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
/* motion blur */
- prop= RNA_def_property(srna, "use_motion_blur", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_motion_blur", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_MBLUR);
RNA_def_property_ui_text(prop, "Motion Blur", "Use multi-sampled 3D scene motion blur");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "motion_blur_samples", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "motion_blur_samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "mblur_samples");
RNA_def_property_range(prop, 1, 32);
RNA_def_property_ui_text(prop, "Motion Samples", "Number of scene samples to take with motion blur");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "motion_blur_shutter", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "motion_blur_shutter", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "blurfac");
RNA_def_property_range(prop, 0.01f, 10.0f);
RNA_def_property_ui_range(prop, 0.01, 2.0f, 1, 0);
@@ -3446,7 +3446,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
/* border */
- prop= RNA_def_property(srna, "use_border", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_border", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_BORDER);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Border",
@@ -3454,78 +3454,78 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
"(note that this disables save_buffers and full_sample)");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "border_min_x", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "border_min_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "border.xmin");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Border Minimum X", "Minimum X value to for the render border");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "border_min_y", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "border_min_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "border.ymin");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Border Minimum Y", "Minimum Y value for the render border");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "border_max_x", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "border_max_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "border.xmax");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Border Maximum X", "Maximum X value for the render border");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "border_max_y", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "border_max_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "border.ymax");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Border Maximum Y", "Maximum Y value for the render border");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_crop_to_border", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_crop_to_border", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_CROP);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Crop to Border", "Crop the rendered frame to the defined border size");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_placeholder", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_placeholder", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_TOUCH);
RNA_def_property_ui_text(prop, "Placeholders",
"Create empty placeholder files while rendering frames (similar to Unix 'touch')");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_overwrite", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_overwrite", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", R_NO_OVERWRITE);
RNA_def_property_ui_text(prop, "Overwrite", "Overwrite existing files while rendering");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_compositing", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_compositing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOCOMP);
RNA_def_property_ui_text(prop, "Compositing",
"Process the render result through the compositing pipeline, if compositing nodes are enabled");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_sequencer", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_sequencer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOSEQ);
RNA_def_property_ui_text(prop, "Sequencer",
"Process the render (and composited) result through the video sequence "
"editor pipeline, if sequencer strips exist");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_color_management", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_color_management", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "color_mgt_flag", R_COLOR_MANAGEMENT);
RNA_def_property_ui_text(prop, "Color Management", "Use linear workflow - gamma corrected imaging pipeline");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_RenderSettings_color_management_update");
- prop= RNA_def_property(srna, "use_color_unpremultiply", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_color_unpremultiply", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "color_mgt_flag", R_COLOR_MANAGEMENT_PREDIVIDE);
RNA_def_property_ui_text(prop, "Color Unpremultipy", "For premultiplied alpha render output, do color space conversion on colors without alpha, to avoid fringing on light backgrounds");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_file_extension", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_file_extension", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXTENSION);
RNA_def_property_ui_text(prop, "File Extensions",
"Add the file format extensions to the rendered file name (eg: filename + .jpg)");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
#if 0 /* moved */
- prop= RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "imtype");
RNA_def_property_enum_items(prop, image_type_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_RenderSettings_file_format_set", NULL);
@@ -3533,29 +3533,29 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
#endif
- prop= RNA_def_property(srna, "file_extension", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "file_extension", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_SceneRender_file_ext_get", "rna_SceneRender_file_ext_length", NULL);
RNA_def_property_ui_text(prop, "Extension", "The file extension used for saving renders");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "is_movie_format", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_movie_format", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_is_movie_fomat_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Movie Format", "When true the format is a movie");
- prop= RNA_def_property(srna, "use_free_image_textures", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_free_image_textures", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FREE_IMAGE);
RNA_def_property_ui_text(prop, "Free Image Textures",
"Free all image textures from memory after render, to save memory before compositing");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_free_unused_nodes", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_free_unused_nodes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_COMP_FREE);
RNA_def_property_ui_text(prop, "Free Unused Nodes",
"Free Nodes that are not used while compositing, to save memory");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_save_buffers", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_save_buffers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXR_TILE_FILE);
RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_save_buffers_get", NULL);
RNA_def_property_ui_text(prop, "Save Buffers",
@@ -3563,7 +3563,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
"(saves memory, required for Full Sample)");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_full_sample", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_full_sample", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FULL_SAMPLE);
RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_full_sample_get", NULL);
RNA_def_property_ui_text(prop, "Full Sample",
@@ -3571,13 +3571,13 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
"(this solves anti-aliasing issues with compositing)");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "displaymode");
RNA_def_property_enum_items(prop, display_mode_items);
RNA_def_property_ui_text(prop, "Display", "Select where rendered images will be displayed");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
+ prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "pic");
RNA_def_property_ui_text(prop, "Output Path",
"Directory/name to save animations, # characters defines the position "
@@ -3586,149 +3586,149 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
/* Bake */
- prop= RNA_def_property(srna, "bake_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "bake_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_mode");
RNA_def_property_enum_items(prop, bake_mode_items);
RNA_def_property_ui_text(prop, "Bake Mode", "Choose shading information to bake into the image");
- prop= RNA_def_property(srna, "bake_normal_space", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "bake_normal_space", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_normal_space");
RNA_def_property_enum_items(prop, bake_normal_space_items);
RNA_def_property_ui_text(prop, "Normal Space", "Choose normal space for baking");
- prop= RNA_def_property(srna, "bake_quad_split", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "bake_quad_split", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, bake_qyad_split_items);
RNA_def_property_ui_text(prop, "Quad Split", "Choose the method used to split a quad into 2 triangles for baking");
- prop= RNA_def_property(srna, "bake_aa_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "bake_aa_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_osa");
RNA_def_property_enum_items(prop, fixed_oversample_items);
RNA_def_property_ui_text(prop, "Anti-Aliasing Level", "");
- prop= RNA_def_property(srna, "use_bake_selected_to_active", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_bake_selected_to_active", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_TO_ACTIVE);
RNA_def_property_ui_text(prop, "Selected to Active",
"Bake shading on the surface of selected objects to the active object");
- prop= RNA_def_property(srna, "use_bake_normalize", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_bake_normalize", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_NORMALIZE);
RNA_def_property_ui_text(prop, "Normalized",
"With displacement normalize to the distance, with ambient occlusion "
"normalize without using material settings");
- prop= RNA_def_property(srna, "use_bake_clear", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_bake_clear", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_CLEAR);
RNA_def_property_ui_text(prop, "Clear", "Clear Images before baking");
- prop= RNA_def_property(srna, "use_bake_antialiasing", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_bake_antialiasing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_OSA);
RNA_def_property_ui_text(prop, "Anti-Aliasing", "Enables Anti-aliasing");
- prop= RNA_def_property(srna, "bake_margin", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "bake_margin", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "bake_filter");
RNA_def_property_range(prop, 0, 64);
RNA_def_property_ui_text(prop, "Margin", "Amount of pixels to extend the baked result with, as post process filter");
- prop= RNA_def_property(srna, "bake_distance", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "bake_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bake_maxdist");
RNA_def_property_range(prop, 0.0, 1000.0);
RNA_def_property_ui_text(prop, "Distance", "Maximum distance from active object to other object (in blender units)");
- prop= RNA_def_property(srna, "bake_bias", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "bake_bias", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bake_biasdist");
RNA_def_property_range(prop, 0.0, 1000.0);
RNA_def_property_ui_text(prop, "Bias", "Bias towards faces further away from the object (in blender units)");
- prop= RNA_def_property(srna, "use_bake_multires", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_bake_multires", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_MULTIRES);
RNA_def_property_ui_text(prop, "Bake from Multires", "Bake directly from multires object");
- prop= RNA_def_property(srna, "use_bake_lores_mesh", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_bake_lores_mesh", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_LORES_MESH);
RNA_def_property_ui_text(prop, "Low Resolution Mesh", "Calculate heights against unsubdivided low resolution mesh");
/* stamp */
- prop= RNA_def_property(srna, "use_stamp_time", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_stamp_time", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_TIME);
RNA_def_property_ui_text(prop, "Stamp Time", "Include the rendered frame timecode as HH:MM:SS.FF in image metadata");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_stamp_date", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_stamp_date", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_DATE);
RNA_def_property_ui_text(prop, "Stamp Date", "Include the current date in image metadata");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_stamp_frame", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_stamp_frame", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_FRAME);
RNA_def_property_ui_text(prop, "Stamp Frame", "Include the frame number in image metadata");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_stamp_camera", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_stamp_camera", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_CAMERA);
RNA_def_property_ui_text(prop, "Stamp Camera", "Include the name of the active camera in image metadata");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_stamp_lens", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_stamp_lens", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_CAMERALENS);
RNA_def_property_ui_text(prop, "Stamp Lens", "Include the active camera's lens in image metadata");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_stamp_scene", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_stamp_scene", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_SCENE);
RNA_def_property_ui_text(prop, "Stamp Scene", "Include the name of the active scene in image metadata");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_stamp_note", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_stamp_note", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_NOTE);
RNA_def_property_ui_text(prop, "Stamp Note", "Include a custom note in image metadata");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_stamp_marker", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_stamp_marker", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_MARKER);
RNA_def_property_ui_text(prop, "Stamp Marker", "Include the name of the last marker in image metadata");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_stamp_filename", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_stamp_filename", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_FILENAME);
RNA_def_property_ui_text(prop, "Stamp Filename", "Include the .blend filename in image metadata");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_stamp_sequencer_strip", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_stamp_sequencer_strip", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_SEQSTRIP);
RNA_def_property_ui_text(prop, "Stamp Sequence Strip",
"Include the name of the foreground sequence strip in image metadata");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_stamp_render_time", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_stamp_render_time", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_RENDERTIME);
RNA_def_property_ui_text(prop, "Stamp Render Time", "Include the render time in image metadata");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "stamp_note_text", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "stamp_note_text", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "stamp_udata");
RNA_def_property_ui_text(prop, "Stamp Note Text", "Custom text to appear in the stamp note");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "use_stamp", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_stamp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_DRAW);
RNA_def_property_ui_text(prop, "Render Stamp", "Render the stamp info text in the rendered image");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "stamp_font_size", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "stamp_font_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "stamp_font_id");
RNA_def_property_range(prop, 8, 64);
RNA_def_property_ui_text(prop, "Font Size", "Size of the font used when rendering stamp text");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "stamp_foreground", PROP_FLOAT, PROP_COLOR);
+ prop = RNA_def_property(srna, "stamp_foreground", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "fg_stamp");
RNA_def_property_array(prop, 4);
RNA_def_property_range(prop,0.0,1.0);
RNA_def_property_ui_text(prop, "Text Color", "Color to use for stamp text");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "stamp_background", PROP_FLOAT, PROP_COLOR);
+ prop = RNA_def_property(srna, "stamp_background", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "bg_stamp");
RNA_def_property_array(prop, 4);
RNA_def_property_range(prop,0.0,1.0);
@@ -3737,91 +3737,91 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
/* sequencer draw options */
- prop= RNA_def_property(srna, "use_sequencer_gl_preview", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_sequencer_gl_preview", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "seq_flag", R_SEQ_GL_PREV);
RNA_def_property_ui_text(prop, "Sequencer OpenGL", "");
- prop= RNA_def_property(srna, "use_sequencer_gl_render", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_sequencer_gl_render", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "seq_flag", R_SEQ_GL_REND);
RNA_def_property_ui_text(prop, "Sequencer OpenGL", "");
- prop= RNA_def_property(srna, "sequencer_gl_preview", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "sequencer_gl_preview", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "seq_prev_type");
RNA_def_property_enum_items(prop, viewport_shade_items);
RNA_def_property_ui_text(prop, "Sequencer Preview Shading", "Method to draw in the sequencer view");
- prop= RNA_def_property(srna, "sequencer_gl_render", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "sequencer_gl_render", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "seq_rend_type");
RNA_def_property_enum_items(prop, viewport_shade_items);
RNA_def_property_ui_text(prop, "Sequencer Preview Shading", "Method to draw in the sequencer view");
/* layers */
- prop= RNA_def_property(srna, "layers", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "layers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "layers", NULL);
RNA_def_property_struct_type(prop, "SceneRenderLayer");
RNA_def_property_ui_text(prop, "Render Layers", "");
rna_def_render_layers(brna, prop);
- prop= RNA_def_property(srna, "use_single_layer", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_single_layer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_SINGLE_LAYER);
RNA_def_property_ui_text(prop, "Single Layer", "Only render the active layer");
RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1);
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
/* engine */
- prop= RNA_def_property(srna, "engine", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "engine", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, engine_items);
RNA_def_property_enum_funcs(prop, "rna_RenderSettings_engine_get", "rna_RenderSettings_engine_set",
"rna_RenderSettings_engine_itemf");
RNA_def_property_ui_text(prop, "Engine", "Engine to use for rendering");
RNA_def_property_update(prop, NC_WINDOW, "rna_RenderSettings_engine_update");
- prop= RNA_def_property(srna, "has_multiple_engines", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "has_multiple_engines", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_multiple_engines_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Multiple Engines", "More than one rendering engine is available");
- prop= RNA_def_property(srna, "use_shading_nodes", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_shading_nodes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_use_shading_nodes_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Use Shading Nodes", "Active render engine uses new shading nodes system");
- prop= RNA_def_property(srna, "use_game_engine", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_game_engine", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_use_game_engine_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Use Game Engine", "Current rendering engine is a game engine");
/* simplify */
- prop= RNA_def_property(srna, "use_simplify", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_simplify", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SIMPLIFY);
RNA_def_property_ui_text(prop, "Use Simplify", "Enable simplification of scene for quicker preview renders");
RNA_def_property_update(prop, 0, "rna_Scene_use_simplify_update");
- prop= RNA_def_property(srna, "simplify_subdivision", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "simplify_subdivision", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "simplify_subsurf");
RNA_def_property_ui_range(prop, 0, 6, 1, 0);
RNA_def_property_ui_text(prop, "Simplify Subdivision", "Global maximum subdivision level");
RNA_def_property_update(prop, 0, "rna_Scene_simplify_update");
- prop= RNA_def_property(srna, "simplify_child_particles", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "simplify_child_particles", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "simplify_particles");
RNA_def_property_ui_text(prop, "Simplify Child Particles", "Global child particles percentage");
RNA_def_property_update(prop, 0, "rna_Scene_simplify_update");
- prop= RNA_def_property(srna, "simplify_shadow_samples", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "simplify_shadow_samples", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "simplify_shadowsamples");
RNA_def_property_ui_range(prop, 1, 16, 1, 0);
RNA_def_property_ui_text(prop, "Simplify Shadow Samples", "Global maximum shadow samples");
RNA_def_property_update(prop, 0, "rna_Scene_simplify_update");
- prop= RNA_def_property(srna, "simplify_ao_sss", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "simplify_ao_sss", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "simplify_aosss");
RNA_def_property_ui_text(prop, "Simplify AO and SSS", "Global approximate AO and SSS quality factor");
RNA_def_property_update(prop, 0, "rna_Scene_simplify_update");
- prop= RNA_def_property(srna, "use_simplify_triangulate", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_simplify_triangulate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "simplify_flag", R_SIMPLE_NO_TRIANGULATE);
RNA_def_property_ui_text(prop, "Skip Quad to Triangles", "Disable non-planar quads being triangulated");
@@ -3839,25 +3839,25 @@ static void rna_def_scene_objects(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *parm;
RNA_def_property_srna(cprop, "SceneObjects");
- srna= RNA_def_struct(brna, "SceneObjects", NULL);
+ srna = RNA_def_struct(brna, "SceneObjects", NULL);
RNA_def_struct_sdna(srna, "Scene");
RNA_def_struct_ui_text(srna, "Scene Objects", "Collection of scene objects");
- func= RNA_def_function(srna, "link", "rna_Scene_object_link");
+ func = RNA_def_function(srna, "link", "rna_Scene_object_link");
RNA_def_function_ui_description(func, "Link object to scene, run scene.update() after");
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "object", "Object", "", "Object to add to scene");
+ parm = RNA_def_pointer(func, "object", "Object", "", "Object to add to scene");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- parm= RNA_def_pointer(func, "base", "ObjectBase", "", "The newly created base");
+ parm = RNA_def_pointer(func, "base", "ObjectBase", "", "The newly created base");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "unlink", "rna_Scene_object_unlink");
+ func = RNA_def_function(srna, "unlink", "rna_Scene_object_unlink");
RNA_def_function_ui_description(func, "Unlink object from scene");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "object", "Object", "", "Object to remove from scene");
+ parm = RNA_def_pointer(func, "object", "Object", "", "Object to remove from scene");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_pointer_funcs(prop, "rna_Scene_active_object_get", "rna_Scene_active_object_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_UNLINK);
@@ -3874,15 +3874,15 @@ static void rna_def_scene_bases(BlenderRNA *brna, PropertyRNA *cprop)
StructRNA *srna;
PropertyRNA *prop;
-// FunctionRNA *func;
-// PropertyRNA *parm;
+/* FunctionRNA *func; */
+/* PropertyRNA *parm; */
RNA_def_property_srna(cprop, "SceneBases");
- srna= RNA_def_struct(brna, "SceneBases", NULL);
+ srna = RNA_def_struct(brna, "SceneBases", NULL);
RNA_def_struct_sdna(srna, "Scene");
RNA_def_struct_ui_text(srna, "Scene Bases", "Collection of scene bases");
- prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ObjectBase");
RNA_def_property_pointer_sdna(prop, NULL, "basact");
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -3899,26 +3899,26 @@ static void rna_def_timeline_markers(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *parm;
RNA_def_property_srna(cprop, "TimelineMarkers");
- srna= RNA_def_struct(brna, "TimelineMarkers", NULL);
+ srna = RNA_def_struct(brna, "TimelineMarkers", NULL);
RNA_def_struct_sdna(srna, "Scene");
RNA_def_struct_ui_text(srna, "Timeline Markers", "Collection of timeline markers");
- func= RNA_def_function(srna, "new", "rna_TimeLine_add");
+ func = RNA_def_function(srna, "new", "rna_TimeLine_add");
RNA_def_function_ui_description(func, "Add a keyframe to the curve");
- parm= RNA_def_string(func, "name", "Marker", 0, "", "New name for the marker (not unique)");
+ parm = RNA_def_string(func, "name", "Marker", 0, "", "New name for the marker (not unique)");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "marker", "TimelineMarker", "", "Newly created timeline marker");
+ parm = RNA_def_pointer(func, "marker", "TimelineMarker", "", "Newly created timeline marker");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_TimeLine_remove");
+ func = RNA_def_function(srna, "remove", "rna_TimeLine_remove");
RNA_def_function_ui_description(func, "Remove a timeline marker");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "marker", "TimelineMarker", "", "Timeline marker to remove");
+ parm = RNA_def_pointer(func, "marker", "TimelineMarker", "", "Timeline marker to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- func= RNA_def_function(srna, "clear", "rna_TimeLine_clear");
+ func = RNA_def_function(srna, "clear", "rna_TimeLine_clear");
RNA_def_function_ui_description(func, "Remove all timeline markers");
}
@@ -3932,29 +3932,29 @@ static void rna_def_scene_keying_sets(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *parm;
RNA_def_property_srna(cprop, "KeyingSets");
- srna= RNA_def_struct(brna, "KeyingSets", NULL);
+ srna = RNA_def_struct(brna, "KeyingSets", NULL);
RNA_def_struct_sdna(srna, "Scene");
RNA_def_struct_ui_text(srna, "Keying Sets", "Scene keying sets");
/* Add Keying Set */
- func= RNA_def_function(srna, "new", "rna_Scene_keying_set_new");
+ func = RNA_def_function(srna, "new", "rna_Scene_keying_set_new");
RNA_def_function_ui_description(func, "Add a new Keying Set to Scene");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
/* name */
RNA_def_string(func, "name", "KeyingSet", 64, "Name", "Name of Keying Set");
/* returns the new KeyingSet */
- parm= RNA_def_pointer(func, "keyingset", "KeyingSet", "", "Newly created Keying Set");
+ parm = RNA_def_pointer(func, "keyingset", "KeyingSet", "", "Newly created Keying Set");
RNA_def_function_return(func, parm);
- prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "KeyingSet");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, "rna_Scene_active_keying_set_get", "rna_Scene_active_keying_set_set", NULL, NULL);
RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes");
RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
- prop= RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "active_keyingset");
RNA_def_property_int_funcs(prop, "rna_Scene_active_keying_set_index_get", "rna_Scene_active_keying_set_index_set", NULL);
RNA_def_property_ui_text(prop, "Active Keying Set Index",
@@ -3968,20 +3968,20 @@ static void rna_def_scene_keying_sets_all(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "KeyingSetsAll");
- srna= RNA_def_struct(brna, "KeyingSetsAll", NULL);
+ srna = RNA_def_struct(brna, "KeyingSetsAll", NULL);
RNA_def_struct_sdna(srna, "Scene");
RNA_def_struct_ui_text(srna, "Keying Sets All", "All available keying sets");
/* NOTE: no add/remove available here, without screwing up this amalgamated list... */
- prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "KeyingSet");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, "rna_Scene_active_keying_set_get", "rna_Scene_active_keying_set_set", NULL, NULL);
RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes");
RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
- prop= RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "active_keyingset");
RNA_def_property_int_funcs(prop, "rna_Scene_active_keying_set_index_get", "rna_Scene_active_keying_set_index_set", NULL);
RNA_def_property_ui_text(prop, "Active Keying Set Index",
@@ -3996,15 +3996,15 @@ static void rna_def_selected_uv_element(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "SelectedUvElement", "PropertyGroup");
+ srna = RNA_def_struct(brna, "SelectedUvElement", "PropertyGroup");
RNA_def_struct_ui_text(srna, "Selected UV Element", "");
/* store the index to the UV element selected */
- prop= RNA_def_property(srna, "element_index", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "element_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_flag(prop, PROP_IDPROPERTY);
RNA_def_property_ui_text(prop, "Element Index", "");
- prop= RNA_def_property(srna, "face_index", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "face_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_flag(prop, PROP_IDPROPERTY);
RNA_def_property_ui_text(prop, "Face Index", "");
}
@@ -4034,20 +4034,20 @@ void RNA_def_scene(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
/* Struct definition */
- srna= RNA_def_struct(brna, "Scene", "ID");
+ srna = RNA_def_struct(brna, "Scene", "ID");
RNA_def_struct_ui_text(srna, "Scene",
"Scene data block, consisting in objects and defining time and render related settings");
RNA_def_struct_ui_icon(srna, ICON_SCENE_DATA);
RNA_def_struct_clear_flag(srna, STRUCT_ID_REFCOUNT);
/* Global Settings */
- prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Camera_object_poll");
RNA_def_property_ui_text(prop, "Camera", "Active camera, used for rendering the scene");
RNA_def_property_update(prop, NC_SCENE|NA_EDITED, "rna_Scene_view3d_update");
- prop= RNA_def_property(srna, "background_set", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "background_set", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "set");
RNA_def_property_struct_type(prop, "Scene");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
@@ -4055,26 +4055,26 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Background Scene", "Background set scene");
RNA_def_property_update(prop, NC_SCENE|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "world", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "world", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "World", "World used for rendering the scene");
RNA_def_property_update(prop, NC_SCENE|ND_WORLD, "rna_Scene_glsl_update");
- prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ_LENGTH);
+ prop = RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ_LENGTH);
RNA_def_property_float_sdna(prop, NULL, "cursor");
RNA_def_property_ui_text(prop, "Cursor Location", "3D cursor location");
RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 4);
RNA_def_property_update(prop, NC_WINDOW, NULL);
/* Bases/Objects */
- prop= RNA_def_property(srna, "object_bases", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "object_bases", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "base", NULL);
RNA_def_property_struct_type(prop, "ObjectBase");
RNA_def_property_ui_text(prop, "Bases", "");
RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, NULL, NULL, NULL, "rna_Scene_object_bases_lookup_string", NULL);
rna_def_scene_bases(brna, prop);
- prop= RNA_def_property(srna, "objects", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "objects", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "base", NULL);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_ui_text(prop, "Objects", "");
@@ -4082,8 +4082,8 @@ void RNA_def_scene(BlenderRNA *brna)
rna_def_scene_objects(brna, prop);
/* Layers */
- prop= RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
- RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); // this seems to be too much trouble with depsgraph updates/etc. currently (20110420)
+ prop = RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* this seems to be too much trouble with depsgraph updates/etc. currently (20110420) */
RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
RNA_def_property_array(prop, 20);
RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_layer_set");
@@ -4091,7 +4091,7 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE|ND_LAYER, "rna_Scene_layer_update");
/* Frame Range Stuff */
- prop= RNA_def_property(srna, "frame_current", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_current", PROP_INT, PROP_TIME);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_sdna(prop, NULL, "r.cfra");
RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
@@ -4099,12 +4099,12 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Current Frame", "Current Frame, to update animation data from python frame_set() instead");
RNA_def_property_update(prop, NC_SCENE|ND_FRAME, "rna_Scene_frame_update");
- prop= RNA_def_property(srna, "frame_subframe", PROP_FLOAT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_subframe", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "r.subframe");
RNA_def_property_ui_text(prop, "Current Sub-Frame", "");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE|PROP_EDITABLE);
- prop= RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_sdna(prop, NULL, "r.sfra");
RNA_def_property_int_funcs(prop, NULL, "rna_Scene_start_frame_set", NULL);
@@ -4112,7 +4112,7 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Start Frame", "First frame of the playback/rendering range");
RNA_def_property_update(prop, NC_SCENE|ND_FRAME_RANGE, NULL);
- prop= RNA_def_property(srna, "frame_end", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_end", PROP_INT, PROP_TIME);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_sdna(prop, NULL, "r.efra");
RNA_def_property_int_funcs(prop, NULL, "rna_Scene_end_frame_set", NULL);
@@ -4120,7 +4120,7 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "End Frame", "Final frame of the playback/rendering range");
RNA_def_property_update(prop, NC_SCENE|ND_FRAME_RANGE, NULL);
- prop= RNA_def_property(srna, "frame_step", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_step", PROP_INT, PROP_TIME);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_sdna(prop, NULL, "r.frame_step");
RNA_def_property_range(prop, 0, MAXFRAME);
@@ -4129,7 +4129,7 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE|ND_FRAME, NULL);
/* Preview Range (frame-range for UI playback) */
- prop=RNA_def_property(srna, "use_preview_range", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_preview_range", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_boolean_sdna(prop, NULL, "r.flag", SCER_PRV_RANGE);
RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_use_preview_range_set");
@@ -4138,14 +4138,14 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE|ND_FRAME, NULL);
RNA_def_property_ui_icon(prop, ICON_PREVIEW_RANGE, 0);
- prop= RNA_def_property(srna, "frame_preview_start", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_preview_start", PROP_INT, PROP_TIME);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_sdna(prop, NULL, "r.psfra");
RNA_def_property_int_funcs(prop, NULL, "rna_Scene_preview_range_start_frame_set", NULL);
RNA_def_property_ui_text(prop, "Preview Range Start Frame", "Alternative start frame for UI playback");
RNA_def_property_update(prop, NC_SCENE|ND_FRAME, NULL);
- prop= RNA_def_property(srna, "frame_preview_end", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_preview_end", PROP_INT, PROP_TIME);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_sdna(prop, NULL, "r.pefra");
RNA_def_property_int_funcs(prop, NULL, "rna_Scene_preview_range_end_frame_set", NULL);
@@ -4153,7 +4153,7 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE|ND_FRAME, NULL);
/* Stamp */
- prop= RNA_def_property(srna, "use_stamp_note", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "use_stamp_note", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "r.stamp_udata");
RNA_def_property_ui_text(prop, "Stamp Note", "User defined note for the render stamping");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
@@ -4162,7 +4162,7 @@ void RNA_def_scene(BlenderRNA *brna)
rna_def_animdata_common(srna);
/* Readonly Properties */
- prop= RNA_def_property(srna, "is_nla_tweakmode", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_nla_tweakmode", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_NLA_EDIT_ON);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* DO NOT MAKE THIS EDITABLE, OR NLA EDITOR BREAKS */
RNA_def_property_ui_text(prop, "NLA TweakMode",
@@ -4170,12 +4170,12 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
/* Frame dropping flag for playback and sync enum */
- prop= RNA_def_property(srna, "use_frame_drop", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_frame_drop", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_FRAME_DROP);
RNA_def_property_ui_text(prop, "Frame Dropping", "Play back dropping frames if frame display is too slow");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "sync_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "sync_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_funcs(prop, "rna_Scene_sync_mode_get", "rna_Scene_sync_mode_set", NULL);
RNA_def_property_enum_items(prop, sync_mode_items);
RNA_def_property_ui_text(prop, "Sync Mode", "How to sync playback");
@@ -4183,31 +4183,31 @@ void RNA_def_scene(BlenderRNA *brna)
/* Nodes (Compositing) */
- prop= RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
RNA_def_property_ui_text(prop, "Node Tree", "Compositing node tree");
- prop= RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "use_nodes", 1);
RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_use_nodes_set");
RNA_def_property_ui_text(prop, "Use Nodes", "Enable the compositing node tree");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
/* Sequencer */
- prop= RNA_def_property(srna, "sequence_editor", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "sequence_editor", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ed");
RNA_def_property_struct_type(prop, "SequenceEditor");
RNA_def_property_ui_text(prop, "Sequence Editor", "");
/* Keying Sets */
- prop= RNA_def_property(srna, "keying_sets", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "keying_sets", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "keyingsets", NULL);
RNA_def_property_struct_type(prop, "KeyingSet");
RNA_def_property_ui_text(prop, "Absolute Keying Sets", "Absolute Keying Sets for this Scene");
RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
rna_def_scene_keying_sets(brna, prop);
- prop= RNA_def_property(srna, "keying_sets_all", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "keying_sets_all", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_funcs(prop, "rna_Scene_all_keyingsets_begin", "rna_Scene_all_keyingsets_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", NULL, NULL, NULL, NULL);
RNA_def_property_struct_type(prop, "KeyingSet");
RNA_def_property_ui_text(prop, "All Keying Sets",
@@ -4216,85 +4216,85 @@ void RNA_def_scene(BlenderRNA *brna)
rna_def_scene_keying_sets_all(brna, prop);
/* Tool Settings */
- prop= RNA_def_property(srna, "tool_settings", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "tool_settings", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "toolsettings");
RNA_def_property_struct_type(prop, "ToolSettings");
RNA_def_property_ui_text(prop, "Tool Settings", "");
/* Unit Settings */
- prop= RNA_def_property(srna, "unit_settings", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "unit_settings", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "unit");
RNA_def_property_struct_type(prop, "UnitSettings");
RNA_def_property_ui_text(prop, "Unit Settings", "Unit editing settings");
/* Physics Settings */
- prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION);
+ prop = RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION);
RNA_def_property_float_sdna(prop, NULL, "physics_settings.gravity");
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_text(prop, "Gravity", "Constant acceleration in a given direction");
RNA_def_property_update(prop, 0, "rna_Physics_update");
- prop= RNA_def_property(srna, "use_gravity", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_gravity", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "physics_settings.flag", PHYS_GLOBAL_GRAVITY);
RNA_def_property_ui_text(prop, "Global Gravity", "Use global gravity for all dynamics");
RNA_def_property_update(prop, 0, "rna_Physics_update");
/* Render Data */
- prop= RNA_def_property(srna, "render", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "render", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "r");
RNA_def_property_struct_type(prop, "RenderSettings");
RNA_def_property_ui_text(prop, "Render Data", "");
/* Markers */
- prop= RNA_def_property(srna, "timeline_markers", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "timeline_markers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "markers", NULL);
RNA_def_property_struct_type(prop, "TimelineMarker");
RNA_def_property_ui_text(prop, "Timeline Markers", "Markers used in all timelines for the current scene");
rna_def_timeline_markers(brna, prop);
/* Audio Settings */
- prop= RNA_def_property(srna, "use_audio", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_audio", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_Scene_use_audio_get", "rna_Scene_use_audio_set");
RNA_def_property_ui_text(prop, "Audio Muted", "Play back of audio from Sequence Editor will be muted");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "use_audio_sync", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_audio_sync", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_SYNC);
RNA_def_property_ui_text(prop, "Audio Sync",
"Play back and sync with audio clock, dropping frames if frame display is too slow");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "use_audio_scrub", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_audio_scrub", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_SCRUB);
RNA_def_property_ui_text(prop, "Audio Scrubbing", "Play audio from Sequence Editor while scrubbing");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "audio_doppler_speed", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "audio_doppler_speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "audio.speed_of_sound");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.01f, FLT_MAX);
RNA_def_property_ui_text(prop, "Speed of Sound", "Speed of sound for Doppler effect calculation");
RNA_def_property_update(prop, NC_SCENE, "rna_Scene_listener_update");
- prop= RNA_def_property(srna, "audio_doppler_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "audio_doppler_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "audio.doppler_factor");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0, FLT_MAX);
RNA_def_property_ui_text(prop, "Doppler Factor", "Pitch factor for Doppler effect calculation");
RNA_def_property_update(prop, NC_SCENE, "rna_Scene_listener_update");
- prop= RNA_def_property(srna, "audio_distance_model", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "audio_distance_model", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "audio.distance_model");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, audio_distance_model_items);
RNA_def_property_ui_text(prop, "Distance Model", "Distance model for distance attenuation calculation");
RNA_def_property_update(prop, NC_SCENE, "rna_Scene_listener_update");
- prop= RNA_def_property(srna, "audio_volume", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "audio_volume", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "audio.volume");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Volume", "Audio volume");
@@ -4302,19 +4302,19 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_float_funcs(prop, NULL, "rna_Scene_volume_set", NULL);
/* Game Settings */
- prop= RNA_def_property(srna, "game_settings", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "game_settings", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "gm");
RNA_def_property_struct_type(prop, "SceneGameData");
RNA_def_property_ui_text(prop, "Game Data", "");
/* Statistics */
- func= RNA_def_function(srna, "statistics", "ED_info_stats_string");
- prop= RNA_def_string(func, "statistics", "", 0, "Statistics", "");
+ func = RNA_def_function(srna, "statistics", "ED_info_stats_string");
+ prop = RNA_def_string(func, "statistics", "", 0, "Statistics", "");
RNA_def_function_return(func, prop);
/* Grease Pencil */
- prop= RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "gpd");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "GreasePencil");
@@ -4322,13 +4322,13 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE, NULL);
/* Transform Orientations */
- prop= RNA_def_property(srna, "orientations", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "orientations", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "transform_spaces", NULL);
RNA_def_property_struct_type(prop, "TransformOrientation");
RNA_def_property_ui_text(prop, "Transform Orientations", "");
/* active MovieClip */
- prop= RNA_def_property(srna, "active_clip", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active_clip", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "clip");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "MovieClip");
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c
index 6d588632c95..11659df3586 100644
--- a/source/blender/makesrna/intern/rna_scene_api.c
+++ b/source/blender/makesrna/intern/rna_scene_api.c
@@ -52,8 +52,8 @@
static void rna_Scene_frame_set(Scene *scene, int frame, float subframe)
{
- scene->r.cfra= frame;
- scene->r.subframe= subframe;
+ scene->r.cfra = frame;
+ scene->r.subframe = subframe;
CLAMP(scene->r.cfra, MINAFRAME, MAXFRAME);
scene_update_for_newframe(G.main, scene, (1<<20) - 1);
@@ -74,10 +74,10 @@ static void rna_Scene_update_tagged(Scene *scene)
static void rna_SceneRender_get_frame_path(RenderData *rd, int frame, char *name)
{
- if(BKE_imtype_is_movie(rd->im_format.imtype))
+ if (BKE_imtype_is_movie(rd->im_format.imtype))
BKE_makeanimstring(name, rd);
else
- BKE_makepicstring(name, rd->pic, G.main->name, (frame==INT_MIN) ? rd->cfra : frame, rd->im_format.imtype, rd->scemode & R_EXTENSION, TRUE);
+ BKE_makepicstring(name, rd->pic, G.main->name, (frame == INT_MIN) ? rd->cfra : frame, rd->im_format.imtype, rd->scemode & R_EXTENSION, TRUE);
}
#ifdef WITH_COLLADA
@@ -98,23 +98,23 @@ void RNA_api_scene(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
- func= RNA_def_function(srna, "frame_set", "rna_Scene_frame_set");
+ func = RNA_def_function(srna, "frame_set", "rna_Scene_frame_set");
RNA_def_function_ui_description(func, "Set scene frame updating all objects immediately");
- parm= RNA_def_int(func, "frame", 0, MINAFRAME, MAXFRAME, "", "Frame number to set", MINAFRAME, MAXFRAME);
+ parm = RNA_def_int(func, "frame", 0, MINAFRAME, MAXFRAME, "", "Frame number to set", MINAFRAME, MAXFRAME);
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_float(func, "subframe", 0.0, 0.0, 1.0, "", "Sub-frame time, between 0.0 and 1.0", 0.0, 1.0);
- func= RNA_def_function(srna, "update", "rna_Scene_update_tagged");
+ func = RNA_def_function(srna, "update", "rna_Scene_update_tagged");
RNA_def_function_ui_description(func, "Update data tagged to be updated from previous access to data or operators");
#ifdef WITH_COLLADA
/* don't remove this, as COLLADA exporting cannot be done through operators in render() callback. */
- func= RNA_def_function(srna, "collada_export", "rna_Scene_collada_export");
- parm= RNA_def_string(func, "filepath", "", FILE_MAX, "File Path", "File path to write Collada file");
+ func = RNA_def_function(srna, "collada_export", "rna_Scene_collada_export");
+ parm = RNA_def_string(func, "filepath", "", FILE_MAX, "File Path", "File path to write Collada file");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_property_subtype(parm, PROP_FILEPATH); /* allow non utf8 */
- parm= RNA_def_boolean(func, "selected", 0, "Export only selected", "Export only selected elements");
- parm= RNA_def_boolean(func, "second_life", 0, "Export for Second Life", "Compatibility mode for Second Life");
+ parm = RNA_def_boolean(func, "selected", 0, "Export only selected", "Export only selected elements");
+ parm = RNA_def_boolean(func, "second_life", 0, "Export for Second Life", "Compatibility mode for Second Life");
RNA_def_function_ui_description(func, "Export to collada file");
#endif
}
@@ -125,11 +125,11 @@ void RNA_api_scene_render(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
- func= RNA_def_function(srna, "frame_path", "rna_SceneRender_get_frame_path");
+ func = RNA_def_function(srna, "frame_path", "rna_SceneRender_get_frame_path");
RNA_def_function_ui_description(func, "Return the absolute path to the filename to be written for a given frame");
RNA_def_int(func, "frame", INT_MIN, INT_MIN, INT_MAX, "",
"Frame number to use, if unset the current frame will be used", MINAFRAME, MAXFRAME);
- parm= RNA_def_string_file_path(func, "filepath", "", FILE_MAX, "File Path",
+ parm = RNA_def_string_file_path(func, "filepath", "", FILE_MAX, "File Path",
"The resulting filepath from the scenes render settings");
RNA_def_property_flag(parm, PROP_THICK_WRAP); /* needed for string return value */
RNA_def_function_output(func, parm);
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index fa1f6c72430..d72b8c8f73b 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -58,33 +58,33 @@ EnumPropertyItem region_type_items[] = {
static void rna_Screen_scene_set(PointerRNA *ptr, PointerRNA value)
{
- bScreen *sc= (bScreen*)ptr->data;
+ bScreen *sc = (bScreen*)ptr->data;
- if(value.data == NULL)
+ if (value.data == NULL)
return;
- sc->newscene= value.data;
+ sc->newscene = value.data;
}
static void rna_Screen_scene_update(bContext *C, PointerRNA *ptr)
{
- bScreen *sc= (bScreen*)ptr->data;
+ bScreen *sc = (bScreen*)ptr->data;
/* exception: must use context so notifier gets to the right window */
- if(sc->newscene) {
+ if (sc->newscene) {
ED_screen_set_scene(C, sc->newscene);
WM_event_add_notifier(C, NC_SCENE|ND_SCENEBROWSE, sc->newscene);
- if(G.f & G_DEBUG)
+ if (G.f & G_DEBUG)
printf("scene set %p\n", sc->newscene);
- sc->newscene= NULL;
+ sc->newscene = NULL;
}
}
static void rna_Screen_redraw_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- bScreen *screen= (bScreen*)ptr->data;
+ bScreen *screen = (bScreen*)ptr->data;
/* the settings for this are currently only available from a menu in the TimeLine, hence refresh=SPACE_TIME */
ED_screen_animation_timer_update(screen, screen->redraws_flag, SPACE_TIME);
@@ -93,25 +93,25 @@ static void rna_Screen_redraw_update(Main *bmain, Scene *scene, PointerRNA *ptr)
static int rna_Screen_is_animation_playing_get(PointerRNA *ptr)
{
- bScreen *sc= (bScreen*)ptr->data;
+ bScreen *sc = (bScreen*)ptr->data;
return (sc->animtimer != NULL);
}
static int rna_Screen_fullscreen_get(PointerRNA *ptr)
{
- bScreen *sc= (bScreen*)ptr->data;
+ bScreen *sc = (bScreen*)ptr->data;
return (sc->full != 0);
}
static void rna_Area_type_set(PointerRNA *ptr, int value)
{
- ScrArea *sa= (ScrArea*)ptr->data;
- sa->butspacetype= value;
+ ScrArea *sa = (ScrArea*)ptr->data;
+ sa->butspacetype = value;
}
static void rna_Area_type_update(bContext *C, PointerRNA *ptr)
{
- ScrArea *sa= (ScrArea*)ptr->data;
+ ScrArea *sa = (ScrArea*)ptr->data;
ED_area_newspace(C, sa, sa->butspacetype); /* XXX - this uses the window */
ED_area_tag_redraw(sa);
@@ -126,11 +126,11 @@ static void rna_def_area_spaces(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "AreaSpaces");
- srna= RNA_def_struct(brna, "AreaSpaces", NULL);
+ srna = RNA_def_struct(brna, "AreaSpaces", NULL);
RNA_def_struct_sdna(srna, "ScrArea");
RNA_def_struct_ui_text(srna, "Area Spaces", "Collection of spaces");
- prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "spacedata.first");
RNA_def_property_struct_type(prop, "Space");
RNA_def_property_ui_text(prop, "Active Space", "Space currently being displayed in this area");
@@ -142,11 +142,11 @@ static void rna_def_area(BlenderRNA *brna)
PropertyRNA *prop;
FunctionRNA *func;
- srna= RNA_def_struct(brna, "Area", NULL);
+ srna = RNA_def_struct(brna, "Area", NULL);
RNA_def_struct_ui_text(srna, "Area", "Area in a subdivided screen, containing an editor");
RNA_def_struct_sdna(srna, "ScrArea");
- prop= RNA_def_property(srna, "spaces", PROP_COLLECTION, PROP_NONE);
+ 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",
@@ -155,16 +155,16 @@ static void rna_def_area(BlenderRNA *brna)
"in a certain area to get the old view orientation)");
rna_def_area_spaces(brna, prop);
- prop= RNA_def_property(srna, "regions", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "regions", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "regionbase", NULL);
RNA_def_property_struct_type(prop, "Region");
RNA_def_property_ui_text(prop, "Regions", "Regions this area is subdivided in");
- prop= RNA_def_property(srna, "show_menus", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_menus", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", HEADER_NO_PULLDOWN);
RNA_def_property_ui_text(prop, "Show Menus", "Show menus in the header");
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "spacetype");
RNA_def_property_enum_items(prop, space_type_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_Area_type_set", NULL);
@@ -172,19 +172,19 @@ static void rna_def_area(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
RNA_def_property_update(prop, 0, "rna_Area_type_update");
- prop= RNA_def_property(srna, "width", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "width", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "winx");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Width", "Area width");
- prop= RNA_def_property(srna, "height", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "height", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "winy");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Height", "Area height");
RNA_def_function(srna, "tag_redraw", "ED_area_tag_redraw");
- func= RNA_def_function(srna, "header_text_set", "ED_area_headerprint");
+ func = RNA_def_function(srna, "header_text_set", "ED_area_headerprint");
RNA_def_function_ui_description(func, "Set the header text");
RNA_def_string(func, "text", NULL, 0, "Text", "New string for the header, no argument clears the text");
}
@@ -194,27 +194,27 @@ static void rna_def_region(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Region", NULL);
+ srna = RNA_def_struct(brna, "Region", NULL);
RNA_def_struct_ui_text(srna, "Region", "Region in a subdivided screen area");
RNA_def_struct_sdna(srna, "ARegion");
- prop= RNA_def_property(srna, "id", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "id", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "swinid");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Region ID", "Unique ID for this region");
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "regiontype");
RNA_def_property_enum_items(prop, region_type_items);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Region Type", "Type of this region");
- prop= RNA_def_property(srna, "width", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "width", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "winx");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Width", "Region width");
- prop= RNA_def_property(srna, "height", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "height", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "winy");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Height", "Region height");
@@ -227,13 +227,13 @@ static void rna_def_screen(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Screen", "ID");
+ srna = RNA_def_struct(brna, "Screen", "ID");
RNA_def_struct_sdna(srna, "Screen"); /* it is actually bScreen but for 2.5 the dna is patched! */
RNA_def_struct_ui_text(srna, "Screen", "Screen datablock, defining the layout of areas in a window");
RNA_def_struct_ui_icon(srna, ICON_SPLITSCREEN);
/* pointers */
- prop= RNA_def_property(srna, "scene", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "scene", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_NULL);
RNA_def_property_pointer_funcs(prop, NULL, "rna_Screen_scene_set", NULL, NULL);
RNA_def_property_ui_text(prop, "Scene", "Active scene to be edited in the screen");
@@ -241,59 +241,59 @@ static void rna_def_screen(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Screen_scene_update");
/* collections */
- prop= RNA_def_property(srna, "areas", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "areas", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "areabase", NULL);
RNA_def_property_struct_type(prop, "Area");
RNA_def_property_ui_text(prop, "Areas", "Areas the screen is subdivided into");
/* readonly status indicators */
- prop= RNA_def_property(srna, "is_animation_playing", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_animation_playing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Screen_is_animation_playing_get", NULL);
RNA_def_property_ui_text(prop, "Animation Playing", "Animation playback is active");
- prop= RNA_def_property(srna, "show_fullscreen", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_fullscreen", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Screen_fullscreen_get", NULL);
RNA_def_property_ui_text(prop, "Fullscreen", "An area is maximised, filling this screen");
/* Define Anim Playback Areas */
- prop= RNA_def_property(srna, "use_play_top_left_3d_editor", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_play_top_left_3d_editor", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws_flag", TIME_REGION);
RNA_def_property_ui_text(prop, "Top-Left 3D Editor", "");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_Screen_redraw_update");
- prop= RNA_def_property(srna, "use_play_3d_editors", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_play_3d_editors", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws_flag", TIME_ALL_3D_WIN);
RNA_def_property_ui_text(prop, "All 3D View Editors", "");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_Screen_redraw_update");
- prop= RNA_def_property(srna, "use_play_animation_editors", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_play_animation_editors", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws_flag", TIME_ALL_ANIM_WIN);
RNA_def_property_ui_text(prop, "Animation Editors", "");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_Screen_redraw_update");
- prop= RNA_def_property(srna, "use_play_properties_editors", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_play_properties_editors", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws_flag", TIME_ALL_BUTS_WIN);
RNA_def_property_ui_text(prop, "Property Editors", "");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_Screen_redraw_update");
- prop= RNA_def_property(srna, "use_play_image_editors", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_play_image_editors", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws_flag", TIME_ALL_IMAGE_WIN);
RNA_def_property_ui_text(prop, "Image Editors", "");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_Screen_redraw_update");
- prop= RNA_def_property(srna, "use_play_sequence_editors", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_play_sequence_editors", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws_flag", TIME_SEQ);
RNA_def_property_ui_text(prop, "Sequencer Editors", "");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_Screen_redraw_update");
- prop= RNA_def_property(srna, "use_play_node_editors", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_play_node_editors", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws_flag", TIME_NODES);
RNA_def_property_ui_text(prop, "Node Editors", "");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_Screen_redraw_update");
- prop= RNA_def_property(srna, "use_play_clip_editors", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_play_clip_editors", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws_flag", TIME_CLIPS);
RNA_def_property_ui_text(prop, "Clip Editors", "");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "rna_Screen_redraw_update");
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index 7b747fcd224..f48224884ba 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -79,11 +79,11 @@ static EnumPropertyItem particle_edit_cache_brush_items[] = {
static PointerRNA rna_ParticleEdit_brush_get(PointerRNA *ptr)
{
- ParticleEditSettings *pset= (ParticleEditSettings*)ptr->data;
- ParticleBrushData *brush= NULL;
+ ParticleEditSettings *pset = (ParticleEditSettings*)ptr->data;
+ ParticleBrushData *brush = NULL;
- if(pset->brushtype != PE_BRUSH_NONE)
- brush= &pset->brush[pset->brushtype];
+ if (pset->brushtype != PE_BRUSH_NONE)
+ brush = &pset->brush[pset->brushtype];
return rna_pointer_inherit_refine(ptr, &RNA_ParticleBrush, brush);
}
@@ -95,10 +95,10 @@ static PointerRNA rna_ParticleBrush_curve_get(PointerRNA *ptr)
static void rna_ParticleEdit_redo(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
{
- Object *ob= (scene->basact)? scene->basact->object: NULL;
+ Object *ob = (scene->basact)? scene->basact->object: NULL;
PTCacheEdit *edit = PE_get_current(scene, ob);
- if(!edit)
+ if (!edit)
return;
psys_free_path_cache(edit->psys, edit);
@@ -106,18 +106,18 @@ static void rna_ParticleEdit_redo(Main *UNUSED(bmain), Scene *scene, PointerRNA
static void rna_ParticleEdit_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
{
- Object *ob= (scene->basact)? scene->basact->object: NULL;
+ Object *ob = (scene->basact)? scene->basact->object: NULL;
- if(ob) DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ if (ob) DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
static void rna_ParticleEdit_tool_set(PointerRNA *ptr, int value)
{
- ParticleEditSettings *pset= (ParticleEditSettings*)ptr->data;
+ ParticleEditSettings *pset = (ParticleEditSettings*)ptr->data;
/* redraw hair completely if weight brush is/was used */
- if((pset->brushtype == PE_BRUSH_WEIGHT || value == PE_BRUSH_WEIGHT) && pset->scene) {
+ if ((pset->brushtype == PE_BRUSH_WEIGHT || value == PE_BRUSH_WEIGHT) && pset->scene) {
Object *ob = (pset->scene->basact)? pset->scene->basact->object: NULL;
- if(ob) {
+ if (ob) {
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_main_add_notifier(NC_OBJECT|ND_PARTICLE|NA_EDITED, NULL);
}
@@ -128,20 +128,20 @@ static void rna_ParticleEdit_tool_set(PointerRNA *ptr, int value)
static EnumPropertyItem *rna_ParticleEdit_tool_itemf(bContext *C, PointerRNA *UNUSED(ptr),
PropertyRNA *UNUSED(prop), int *UNUSED(free))
{
- Scene *scene= CTX_data_scene(C);
- Object *ob= (scene->basact)? scene->basact->object: NULL;
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = (scene->basact)? scene->basact->object: NULL;
#if 0
PTCacheEdit *edit = PE_get_current(scene, ob);
- ParticleSystem *psys= edit ? edit->psys : NULL;
+ ParticleSystem *psys = edit ? edit->psys : NULL;
#else
/* use this rather than PE_get_current() - because the editing cache is
* dependent on the cache being updated which can happen after this UI
* draws causing a glitch [#28883] */
- ParticleSystem *psys= psys_get_current(ob);
+ ParticleSystem *psys = psys_get_current(ob);
#endif
- if(psys) {
- if(psys->flag & PSYS_GLOBAL_HAIR) {
+ if (psys) {
+ if (psys->flag & PSYS_GLOBAL_HAIR) {
return particle_edit_disconnected_hair_brush_items;
}
else {
@@ -154,15 +154,15 @@ static EnumPropertyItem *rna_ParticleEdit_tool_itemf(bContext *C, PointerRNA *UN
static int rna_ParticleEdit_editable_get(PointerRNA *ptr)
{
- ParticleEditSettings *pset= (ParticleEditSettings*)ptr->data;
+ ParticleEditSettings *pset = (ParticleEditSettings*)ptr->data;
return (pset->object && pset->scene && PE_get_current(pset->scene, pset->object));
}
static int rna_ParticleEdit_hair_get(PointerRNA *ptr)
{
- ParticleEditSettings *pset= (ParticleEditSettings*)ptr->data;
+ ParticleEditSettings *pset = (ParticleEditSettings*)ptr->data;
- if(pset->scene) {
+ if (pset->scene) {
PTCacheEdit *edit = PE_get_current(pset->scene, pset->object);
return (edit && edit->psys);
@@ -173,21 +173,21 @@ static int rna_ParticleEdit_hair_get(PointerRNA *ptr)
static int rna_Brush_mode_poll(PointerRNA *ptr, PointerRNA value)
{
- Scene *scene= (Scene *)ptr->id.data;
+ Scene *scene = (Scene *)ptr->id.data;
ToolSettings *ts = scene->toolsettings;
- Brush *brush= value.id.data;
+ Brush *brush = value.id.data;
int mode = 0;
/* check the origin of the Paint struct to see which paint
mode to select from */
- if(ptr->data == &ts->imapaint)
+ if (ptr->data == &ts->imapaint)
mode = OB_MODE_TEXTURE_PAINT;
- else if(ptr->data == ts->sculpt)
+ else if (ptr->data == ts->sculpt)
mode = OB_MODE_SCULPT;
- else if(ptr->data == ts->vpaint)
+ else if (ptr->data == ts->vpaint)
mode = OB_MODE_VERTEX_PAINT;
- else if(ptr->data == ts->wpaint)
+ else if (ptr->data == ts->wpaint)
mode = OB_MODE_WEIGHT_PAINT;
return brush->ob_mode & mode;
@@ -195,9 +195,9 @@ static int rna_Brush_mode_poll(PointerRNA *ptr, PointerRNA value)
static void rna_Sculpt_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
{
- Object *ob= (scene->basact)? scene->basact->object: NULL;
+ Object *ob = (scene->basact)? scene->basact->object: NULL;
- if(ob) {
+ if (ob) {
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_main_add_notifier(NC_OBJECT|ND_MODIFIER, ob);
}
@@ -210,25 +210,25 @@ static void rna_def_paint(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Paint", NULL);
+ srna = RNA_def_struct(brna, "Paint", NULL);
RNA_def_struct_ui_text(srna, "Paint", "");
/* Global Settings */
- prop= RNA_def_property(srna, "brush", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "brush", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Brush_mode_poll");
RNA_def_property_ui_text(prop, "Brush", "Active Brush");
RNA_def_property_update(prop, NC_BRUSH|NA_EDITED, NULL);
- prop= RNA_def_property(srna, "show_brush", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_brush", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", PAINT_SHOW_BRUSH);
RNA_def_property_ui_text(prop, "Show Brush", "");
- prop= RNA_def_property(srna, "show_brush_on_surface", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_brush_on_surface", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", PAINT_SHOW_BRUSH_ON_SURFACE);
RNA_def_property_ui_text(prop, "Show Brush On Surface", "");
- prop= RNA_def_property(srna, "show_low_resolution", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_low_resolution", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", PAINT_FAST_NAVIGATE);
RNA_def_property_ui_text(prop, "Fast Navigate", "For multires, show low resolution while navigating the view");
}
@@ -238,50 +238,50 @@ static void rna_def_sculpt(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Sculpt", "Paint");
+ srna = RNA_def_struct(brna, "Sculpt", "Paint");
RNA_def_struct_ui_text(srna, "Sculpt", "");
- prop= RNA_def_property(srna, "radial_symmetry", PROP_INT, PROP_XYZ);
+ prop = RNA_def_property(srna, "radial_symmetry", PROP_INT, PROP_XYZ);
RNA_def_property_int_sdna(prop, NULL, "radial_symm");
RNA_def_property_int_default(prop, 1);
RNA_def_property_range(prop, 1, 64);
RNA_def_property_ui_range(prop, 0, 32, 1, 1);
RNA_def_property_ui_text(prop, "Radial Symmetry Count X Axis", "Number of times to copy strokes across the surface");
- prop= RNA_def_property(srna, "use_symmetry_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_symmetry_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_SYMM_X);
RNA_def_property_ui_text(prop, "Symmetry X", "Mirror brush across the X axis");
- prop= RNA_def_property(srna, "use_symmetry_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_symmetry_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_SYMM_Y);
RNA_def_property_ui_text(prop, "Symmetry Y", "Mirror brush across the Y axis");
- prop= RNA_def_property(srna, "use_symmetry_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_symmetry_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_SYMM_Z);
RNA_def_property_ui_text(prop, "Symmetry Z", "Mirror brush across the Z axis");
- prop= RNA_def_property(srna, "lock_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_LOCK_X);
RNA_def_property_ui_text(prop, "Lock X", "Disallow changes to the X axis of vertices");
- prop= RNA_def_property(srna, "lock_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_LOCK_Y);
RNA_def_property_ui_text(prop, "Lock Y", "Disallow changes to the Y axis of vertices");
- prop= RNA_def_property(srna, "lock_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_LOCK_Z);
RNA_def_property_ui_text(prop, "Lock Z", "Disallow changes to the Z axis of vertices");
- prop= RNA_def_property(srna, "use_symmetry_feather", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_symmetry_feather", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_SYMMETRY_FEATHER);
RNA_def_property_ui_text(prop, "Symmetry Feathering",
"Reduce the strength of the brush where it overlaps symmetrical daubs");
- prop= RNA_def_property(srna, "use_threaded", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_threaded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_USE_OPENMP);
RNA_def_property_ui_text(prop, "Use OpenMP", "Take advantage of multiple CPU cores to improve sculpting performance");
- prop= RNA_def_property(srna, "use_deform_only", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_deform_only", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_ONLY_DEFORM);
RNA_def_property_ui_text(prop, "Use Deform Only",
"Use only deformation modifiers (temporary disable all "
@@ -294,7 +294,7 @@ static void rna_def_uv_sculpt(BlenderRNA *brna)
{
StructRNA *srna;
- srna= RNA_def_struct(brna, "UvSculpt", "Paint");
+ srna = RNA_def_struct(brna, "UvSculpt", "Paint");
RNA_def_struct_ui_text(srna, "UV Sculpting", "");
}
@@ -305,25 +305,25 @@ static void rna_def_vertex_paint(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "VertexPaint", "Paint");
+ srna = RNA_def_struct(brna, "VertexPaint", "Paint");
RNA_def_struct_sdna(srna, "VPaint");
RNA_def_struct_ui_text(srna, "Vertex Paint", "Properties of vertex and weight paint mode");
/* vertex paint only */
- prop= RNA_def_property(srna, "use_all_faces", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_all_faces", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", VP_AREA);
RNA_def_property_ui_text(prop, "All Faces", "Paint on all faces inside brush");
- prop= RNA_def_property(srna, "use_normal", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", VP_NORMALS);
RNA_def_property_ui_text(prop, "Normals", "Apply the vertex normal before painting");
- prop= RNA_def_property(srna, "use_spray", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_spray", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", VP_SPRAY);
RNA_def_property_ui_text(prop, "Spray", "Keep applying paint effect while holding mouse");
/* weight paint only */
- prop= RNA_def_property(srna, "use_group_restrict", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_group_restrict", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", VP_ONLYVGROUP);
RNA_def_property_ui_text(prop, "Restrict", "Restrict painting to verts already apart of the vertex group");
}
@@ -333,51 +333,51 @@ static void rna_def_image_paint(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ImagePaint", "Paint");
+ srna = RNA_def_struct(brna, "ImagePaint", "Paint");
RNA_def_struct_sdna(srna, "ImagePaintSettings");
RNA_def_struct_ui_text(srna, "Image Paint", "Properties of image and texture painting mode");
/* booleans */
- prop= RNA_def_property(srna, "use_projection", PROP_BOOLEAN, PROP_NONE);
+ 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");
- prop= RNA_def_property(srna, "use_occlude", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_occlude", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_XRAY);
RNA_def_property_ui_text(prop, "Occlude", "Only paint onto the faces directly under the brush (slower)");
- prop= RNA_def_property(srna, "use_backface_culling", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_backface_culling", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_BACKFACE);
RNA_def_property_ui_text(prop, "Cull", "Ignore faces pointing away from the view (faster)");
- prop= RNA_def_property(srna, "use_normal_falloff", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_normal_falloff", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_FLAT);
RNA_def_property_ui_text(prop, "Normal", "Paint most on faces pointing towards the view");
- prop= RNA_def_property(srna, "use_stencil_layer", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_stencil_layer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_LAYER_STENCIL);
RNA_def_property_ui_text(prop, "Stencil Layer", "Set the mask layer from the UV map buttons");
- prop= RNA_def_property(srna, "invert_stencil", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_stencil", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_LAYER_STENCIL_INV);
RNA_def_property_ui_text(prop, "Invert", "Invert the stencil layer");
- prop= RNA_def_property(srna, "use_clone_layer", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_clone_layer", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_LAYER_CLONE);
RNA_def_property_ui_text(prop, "Clone Map",
"Use another UV map as clone source, otherwise use the 3D cursor as the source");
/* integers */
- prop= RNA_def_property(srna, "seam_bleed", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "seam_bleed", PROP_INT, PROP_UNSIGNED);
RNA_def_property_ui_range(prop, 0, 8, 0, 0);
RNA_def_property_ui_text(prop, "Bleed", "Extend paint beyond the faces UVs to reduce seams (in pixels, slower)");
- prop= RNA_def_property(srna, "normal_angle", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "normal_angle", PROP_INT, PROP_UNSIGNED);
RNA_def_property_range(prop, 0, 90);
RNA_def_property_ui_text(prop, "Angle", "Paint most on faces pointing towards the view according to this angle");
- prop= RNA_def_int_array(srna, "screen_grab_size", 2, NULL, 0, 0, "screen_grab_size",
+ prop = RNA_def_int_array(srna, "screen_grab_size", 2, NULL, 0, 0, "screen_grab_size",
"Size to capture the image for re-projecting", 0, 0);
RNA_def_property_range(prop, 512, 16384);
}
@@ -403,7 +403,7 @@ static void rna_def_particle_edit(BlenderRNA *brna)
{1, "SHRINK", 0, "Shrink", "Make hairs shorter"},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem edit_type_items[]= {
+ static EnumPropertyItem edit_type_items[] = {
{PE_TYPE_PARTICLES, "PARTICLES", 0, "Particles", ""},
{PE_TYPE_SOFTBODY, "SOFT_BODY", 0, "Soft body", ""},
{PE_TYPE_CLOTH, "CLOTH", 0, "Cloth", ""},
@@ -413,142 +413,142 @@ static void rna_def_particle_edit(BlenderRNA *brna)
/* edit */
- srna= RNA_def_struct(brna, "ParticleEdit", NULL);
+ srna = RNA_def_struct(brna, "ParticleEdit", NULL);
RNA_def_struct_sdna(srna, "ParticleEditSettings");
RNA_def_struct_ui_text(srna, "Particle Edit", "Properties of particle editing mode");
- prop= RNA_def_property(srna, "tool", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "tool", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "brushtype");
RNA_def_property_enum_items(prop, particle_edit_hair_brush_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_ParticleEdit_tool_set", "rna_ParticleEdit_tool_itemf");
RNA_def_property_ui_text(prop, "Tool", "");
- prop= RNA_def_property(srna, "select_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "select_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "selectmode");
RNA_def_property_enum_items(prop, select_mode_items);
RNA_def_property_ui_text(prop, "Selection Mode", "Particle select and display mode");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_ParticleEdit_update");
- prop= RNA_def_property(srna, "use_preserve_length", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_preserve_length", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PE_KEEP_LENGTHS);
RNA_def_property_ui_text(prop, "Keep Lengths", "Keep path lengths constant");
- prop= RNA_def_property(srna, "use_preserve_root", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_preserve_root", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PE_LOCK_FIRST);
RNA_def_property_ui_text(prop, "Keep Root", "Keep root keys unmodified");
- prop= RNA_def_property(srna, "use_emitter_deflect", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_emitter_deflect", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PE_DEFLECT_EMITTER);
RNA_def_property_ui_text(prop, "Deflect Emitter", "Keep paths from intersecting the emitter");
- prop= RNA_def_property(srna, "emitter_distance", PROP_FLOAT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "emitter_distance", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "emitterdist");
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 10, 3);
RNA_def_property_ui_text(prop, "Emitter Distance", "Distance to keep particles away from the emitter");
- prop= RNA_def_property(srna, "use_fade_time", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_fade_time", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PE_FADE_TIME);
RNA_def_property_ui_text(prop, "Fade Time", "Fade paths and keys further away from current frame");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_ParticleEdit_update");
- prop= RNA_def_property(srna, "use_auto_velocity", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_auto_velocity", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PE_AUTO_VELOCITY);
RNA_def_property_ui_text(prop, "Auto Velocity", "Calculate point velocities automatically");
- prop= RNA_def_property(srna, "show_particles", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_particles", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PE_DRAW_PART);
RNA_def_property_ui_text(prop, "Draw Particles", "Draw actual particles");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_ParticleEdit_redo");
- prop= RNA_def_property(srna, "use_default_interpolate", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_default_interpolate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PE_INTERPOLATE_ADDED);
RNA_def_property_ui_text(prop, "Interpolate", "Interpolate new particles from the existing ones");
- prop= RNA_def_property(srna, "default_key_count", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "default_key_count", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "totaddkey");
RNA_def_property_range(prop, 2, SHRT_MAX);
RNA_def_property_ui_range(prop, 2, 20, 10, 3);
RNA_def_property_ui_text(prop, "Keys", "How many keys to make new particles with");
- prop= RNA_def_property(srna, "brush", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "brush", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ParticleBrush");
RNA_def_property_pointer_funcs(prop, "rna_ParticleEdit_brush_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Brush", "");
- prop= RNA_def_property(srna, "draw_step", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "draw_step", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1, 10);
RNA_def_property_ui_text(prop, "Steps", "How many steps to draw the path with");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_ParticleEdit_redo");
- prop= RNA_def_property(srna, "fade_frames", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "fade_frames", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1, 100);
RNA_def_property_ui_text(prop, "Frames", "How many frames to fade");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_ParticleEdit_update");
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "edittype");
RNA_def_property_enum_items(prop, edit_type_items);
RNA_def_property_ui_text(prop, "Type", "");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_ParticleEdit_redo");
- prop= RNA_def_property(srna, "is_editable", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_editable", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_ParticleEdit_editable_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Editable", "A valid edit mode exists");
- prop= RNA_def_property(srna, "is_hair", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_hair", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_ParticleEdit_hair_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Hair", "Editing hair");
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object", "The edited object");
/* brush */
- srna= RNA_def_struct(brna, "ParticleBrush", NULL);
+ srna = RNA_def_struct(brna, "ParticleBrush", NULL);
RNA_def_struct_sdna(srna, "ParticleBrushData");
RNA_def_struct_ui_text(srna, "Particle Brush", "Particle editing brush");
- prop= RNA_def_property(srna, "size", PROP_INT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "size", PROP_INT, PROP_DISTANCE);
RNA_def_property_range(prop, 1, SHRT_MAX);
RNA_def_property_ui_range(prop, 1, 100, 10, 3);
RNA_def_property_ui_text(prop, "Radius", "Radius of the brush in pixels");
- prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_range(prop, 0.001, 1.0);
RNA_def_property_ui_text(prop, "Strength", "Brush strength");
- prop= RNA_def_property(srna, "count", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "count", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1, 1000);
RNA_def_property_ui_range(prop, 1, 100, 10, 3);
RNA_def_property_ui_text(prop, "Count", "Particle count");
- prop= RNA_def_property(srna, "steps", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "steps", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "step");
RNA_def_property_range(prop, 1, SHRT_MAX);
RNA_def_property_ui_range(prop, 1, 50, 10, 3);
RNA_def_property_ui_text(prop, "Steps", "Brush steps");
- prop= RNA_def_property(srna, "puff_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "puff_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "invert");
RNA_def_property_enum_items(prop, puff_mode);
RNA_def_property_ui_text(prop, "Puff Mode", "");
- prop= RNA_def_property(srna, "use_puff_volume", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_puff_volume", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", PE_BRUSH_DATA_PUFF_VOLUME);
RNA_def_property_ui_text(prop, "Puff Volume",
"Apply puff to unselected end-points (helps maintain hair volume when puffing root)");
- prop= RNA_def_property(srna, "length_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "length_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "invert");
RNA_def_property_enum_items(prop, length_mode);
RNA_def_property_ui_text(prop, "Length Mode", "");
/* dummy */
- prop= RNA_def_property(srna, "curve", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "curve", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "CurveMapping");
RNA_def_property_pointer_funcs(prop, "rna_ParticleBrush_curve_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Curve", "");
diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c
index 4413eee9395..fb7813f0b4f 100644
--- a/source/blender/makesrna/intern/rna_sensor.c
+++ b/source/blender/makesrna/intern/rna_sensor.c
@@ -40,7 +40,7 @@
#include "WM_types.h"
/* Always keep in alphabetical order */
-EnumPropertyItem sensor_type_items[] ={
+EnumPropertyItem sensor_type_items[] = {
{SENS_ACTUATOR, "ACTUATOR", 0, "Actuator", ""},
{SENS_ALWAYS, "ALWAYS", 0, "Always", ""},
{SENS_ARMATURE, "ARMATURE", 0, "Armature", ""},
@@ -65,9 +65,9 @@ EnumPropertyItem sensor_type_items[] ={
static StructRNA* rna_Sensor_refine(struct PointerRNA *ptr)
{
- bSensor *sensor= (bSensor*)ptr->data;
+ bSensor *sensor = (bSensor*)ptr->data;
- switch(sensor->type) {
+ switch (sensor->type) {
case SENS_ALWAYS:
return &RNA_AlwaysSensor;
case SENS_TOUCH:
@@ -105,19 +105,19 @@ static StructRNA* rna_Sensor_refine(struct PointerRNA *ptr)
void rna_Sensor_name_set(PointerRNA *ptr, const char *value)
{
- bSensor *sens= (bSensor *)ptr->data;
+ bSensor *sens = (bSensor *)ptr->data;
BLI_strncpy_utf8(sens->name, value, sizeof(sens->name));
if (ptr->id.data) {
- Object *ob= (Object *)ptr->id.data;
+ Object *ob = (Object *)ptr->id.data;
BLI_uniquename(&ob->sensors, sens, "Sensor", '.', offsetof(bSensor, name), sizeof(sens->name));
}
}
static void rna_Sensor_type_set(struct PointerRNA *ptr, int value)
{
- bSensor *sens= (bSensor *)ptr->data;
+ bSensor *sens = (bSensor *)ptr->data;
if (value != sens->type)
{
sens->type = value;
@@ -141,9 +141,9 @@ static int rna_Sensor_controllers_length(PointerRNA *ptr)
EnumPropertyItem *rna_Sensor_type_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
- EnumPropertyItem *item= NULL;
- Object *ob=NULL;
- int totitem= 0;
+ EnumPropertyItem *item = NULL;
+ Object *ob = NULL;
+ int totitem = 0;
if (ptr->type == &RNA_Sensor || RNA_struct_is_a(ptr->type, &RNA_Sensor)) {
ob = (Object *)ptr->id.data;
@@ -156,7 +156,7 @@ EnumPropertyItem *rna_Sensor_type_itemf(bContext *C, PointerRNA *ptr, PropertyRN
RNA_enum_items_add_value(&item, &totitem, sensor_type_items, SENS_ALWAYS);
if (ob != NULL) {
- if (ob->type==OB_ARMATURE) {
+ if (ob->type == OB_ARMATURE) {
RNA_enum_items_add_value(&item, &totitem, sensor_type_items, SENS_ARMATURE);
}
}
@@ -174,14 +174,14 @@ EnumPropertyItem *rna_Sensor_type_itemf(bContext *C, PointerRNA *ptr, PropertyRN
RNA_enum_items_add_value(&item, &totitem, sensor_type_items, SENS_TOUCH);
RNA_enum_item_end(&item, &totitem);
- *free= 1;
+ *free = 1;
return item;
}
static void rna_Sensor_keyboard_key_set(struct PointerRNA *ptr, int value)
{
- bSensor *sens= (bSensor *)ptr->data;
+ bSensor *sens = (bSensor *)ptr->data;
bKeyboardSensor *ks = (bKeyboardSensor *)sens->data;
if (ISKEYBOARD(value))
@@ -192,7 +192,7 @@ static void rna_Sensor_keyboard_key_set(struct PointerRNA *ptr, int value)
static void rna_Sensor_keyboard_modifier_set(struct PointerRNA *ptr, int value)
{
- bSensor *sens= (bSensor *)ptr->data;
+ bSensor *sens = (bSensor *)ptr->data;
bKeyboardSensor *ks = (bKeyboardSensor *)sens->data;
if (ISKEYBOARD(value))
@@ -203,7 +203,7 @@ static void rna_Sensor_keyboard_modifier_set(struct PointerRNA *ptr, int value)
static void rna_Sensor_keyboard_modifier2_set(struct PointerRNA *ptr, int value)
{
- bSensor *sens= (bSensor *)ptr->data;
+ bSensor *sens = (bSensor *)ptr->data;
bKeyboardSensor *ks = (bKeyboardSensor *)sens->data;
if (ISKEYBOARD(value))
@@ -214,43 +214,43 @@ static void rna_Sensor_keyboard_modifier2_set(struct PointerRNA *ptr, int value)
static void rna_Sensor_tap_set(struct PointerRNA *ptr, int value)
{
- bSensor *sens= (bSensor*)ptr->data;
+ bSensor *sens = (bSensor*)ptr->data;
sens->tap = value;
- if(sens->tap == 1)
+ if (sens->tap == 1)
sens->level = 0;
}
static void rna_Sensor_level_set(struct PointerRNA *ptr, int value)
{
- bSensor *sens= (bSensor*)ptr->data;
+ bSensor *sens = (bSensor*)ptr->data;
sens->level = value;
- if(sens->level == 1)
+ if (sens->level == 1)
sens->tap = 0;
}
static void rna_Sensor_Armature_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- bSensor *sens= (bSensor *)ptr->data;
+ bSensor *sens = (bSensor *)ptr->data;
bArmatureSensor *as = sens->data;
Object *ob = (Object *)ptr->id.data;
- char *posechannel= as->posechannel;
- char *constraint= as->constraint;
+ char *posechannel = as->posechannel;
+ char *constraint = as->constraint;
/* check that bone exist in the active object */
if (ob->type == OB_ARMATURE && ob->pose) {
bPoseChannel *pchan;
bPose *pose = ob->pose;
- for (pchan=pose->chanbase.first; pchan; pchan=pchan->next) {
+ for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) {
if (!strcmp(pchan->name, posechannel)) {
/* found it, now look for constraint channel */
bConstraint *con;
- for (con=pchan->constraints.first; con; con=con->next) {
+ for (con = pchan->constraints.first; con; con = con->next) {
if (!strcmp(con->name, constraint)) {
/* found it, all ok */
- return;
+ return;
}
}
/* didn't find constraint, make empty */
@@ -279,69 +279,69 @@ static void rna_def_sensor(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Sensor", NULL);
+ srna = RNA_def_struct(brna, "Sensor", NULL);
RNA_def_struct_ui_text(srna, "Sensor", "Game engine logic brick to detect events");
RNA_def_struct_sdna(srna, "bSensor");
RNA_def_struct_refine_func(srna, "rna_Sensor_refine");
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "Sensor name");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Sensor_name_set");
RNA_def_struct_name_property(srna, prop);
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, sensor_type_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_Sensor_type_set", "rna_Sensor_type_itemf");
RNA_def_property_ui_text(prop, "Type", "");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "pin", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "pin", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SENS_PIN);
RNA_def_property_ui_text(prop, "Pinned", "Display when not linked to a visible states controller");
RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1);
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SENS_SHOW);
RNA_def_property_ui_text(prop, "Expanded", "Set sensor expanded in the user interface");
RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "invert", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "Invert Output", "Invert the level(output) of this sensor");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_level", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_level", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "level", 1);
RNA_def_property_ui_text(prop, "Level", "Level detector, trigger controllers of new states(only applicable upon logic state transition)");
RNA_def_property_boolean_funcs(prop, NULL, "rna_Sensor_level_set");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_pulse_true_level", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pulse_true_level", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pulse", SENS_PULSE_REPEAT);
RNA_def_property_ui_text(prop, "Pulse True Level", "Activate TRUE level triggering (pulse mode)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_pulse_false_level", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pulse_false_level", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pulse", SENS_NEG_PULSE_MODE);
RNA_def_property_ui_text(prop, "Pulse False Level", "Activate FALSE level triggering (pulse mode)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "frequency", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "frequency", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "freq");
RNA_def_property_ui_text(prop, "Frequency", "Delay between repeated pulses(in logic tics, 0=no delay)");
RNA_def_property_range(prop, 0, 10000);
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_tap", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_tap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "tap", 1);
RNA_def_property_boolean_funcs(prop, NULL, "rna_Sensor_tap_set");
RNA_def_property_ui_text(prop, "Tap", "Trigger controllers only for an instant, even while the sensor remains true");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "controllers", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "controllers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "links", NULL);
RNA_def_property_struct_type(prop, "Controller");
RNA_def_property_ui_text(prop, "Controllers", "The list containing the controllers connected to the sensor");
@@ -354,7 +354,7 @@ static void rna_def_sensor(BlenderRNA *brna)
static void rna_def_always_sensor(BlenderRNA *brna)
{
StructRNA *srna;
- srna= RNA_def_struct(brna, "AlwaysSensor", "Sensor");
+ srna = RNA_def_struct(brna, "AlwaysSensor", "Sensor");
RNA_def_struct_ui_text(srna, "Always Sensor", "Sensor to generate continuous pulses");
}
@@ -363,22 +363,22 @@ static void rna_def_near_sensor(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "NearSensor", "Sensor");
+ srna = RNA_def_struct(brna, "NearSensor", "Sensor");
RNA_def_struct_ui_text(srna , "Near Sensor", "Sensor to detect nearby objects");
RNA_def_struct_sdna_from(srna, "bNearSensor", "data");
- prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Property", "Only look for objects with this property (blank = all objects)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dist");
RNA_def_property_ui_text(prop, "Distance", "Trigger distance");
RNA_def_property_range(prop, 0.0f, 10000.0f);
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "reset_distance", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "reset_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "resetdist");
RNA_def_property_ui_text(prop, "Reset Distance", "The distance where the sensor forgets the actor");
RNA_def_property_range(prop, 0.0f, 10000.0f);
@@ -390,7 +390,7 @@ static void rna_def_mouse_sensor(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem mouse_event_items[] ={
+ static EnumPropertyItem mouse_event_items[] = {
{BL_SENS_MOUSE_LEFT_BUTTON, "LEFTCLICK", 0, "Left Button", ""},
{BL_SENS_MOUSE_MIDDLE_BUTTON, "MIDDLECLICK", 0, "Middle Button", ""},
{BL_SENS_MOUSE_RIGHT_BUTTON, "RIGHTCLICK", 0, "Right Button", ""},
@@ -401,11 +401,11 @@ static void rna_def_mouse_sensor(BlenderRNA *brna)
{BL_SENS_MOUSE_MOUSEOVER_ANY, "MOUSEOVERANY", 0, "Mouse Over Any", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "MouseSensor", "Sensor");
+ srna = RNA_def_struct(brna, "MouseSensor", "Sensor");
RNA_def_struct_ui_text(srna, "Mouse Sensor", "Sensor to detect mouse events");
RNA_def_struct_sdna_from(srna, "bMouseSensor", "data");
- prop= RNA_def_property(srna, "mouse_event", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mouse_event", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, mouse_event_items);
RNA_def_property_ui_text(prop, "Mouse Event", "Type of event this mouse sensor should trigger on");
@@ -417,11 +417,11 @@ static void rna_def_touch_sensor(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "TouchSensor", "Sensor");
+ srna = RNA_def_struct(brna, "TouchSensor", "Sensor");
RNA_def_struct_ui_text(srna, "Touch Sensor", "Sensor to detect objects colliding with the current object");
RNA_def_struct_sdna_from(srna, "bTouchSensor", "data");
- prop= RNA_def_property(srna, "material", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "material", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_pointer_sdna(prop, NULL, "ma");
RNA_def_property_flag(prop, PROP_EDITABLE);
@@ -436,42 +436,42 @@ static void rna_def_keyboard_sensor(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "KeyboardSensor", "Sensor");
+ srna = RNA_def_struct(brna, "KeyboardSensor", "Sensor");
RNA_def_struct_ui_text(srna, "Keyboard Sensor", "Sensor to detect keyboard events");
RNA_def_struct_sdna_from(srna, "bKeyboardSensor", "data");
- prop= RNA_def_property(srna, "key", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "key", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "key");
RNA_def_property_enum_items(prop, event_type_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_Sensor_keyboard_key_set", NULL);
RNA_def_property_ui_text(prop, "Key", "");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "modifier_key_1", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "modifier_key_1", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "qual");
RNA_def_property_enum_items(prop, event_type_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_Sensor_keyboard_modifier_set", NULL);
RNA_def_property_ui_text(prop, "Modifier Key", "Modifier key code");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "modifier_key_2", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "modifier_key_2", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "qual2");
RNA_def_property_enum_items(prop, event_type_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_Sensor_keyboard_modifier2_set", NULL);
RNA_def_property_ui_text(prop, "Second Modifier Key", "Modifier key code");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "target", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "target", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "targetName");
RNA_def_property_ui_text(prop, "Target", "Property that receives the keystrokes in case a string is logged");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "log", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "log", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "toggleName");
RNA_def_property_ui_text(prop, "Log Toggle", "Property that indicates whether to log keystrokes as a string");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_all_keys", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_all_keys", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "type", 1);
RNA_def_property_ui_text(prop, "All Keys", "Trigger this sensor on any keystroke");
RNA_def_property_update(prop, NC_LOGIC, NULL);
@@ -481,7 +481,7 @@ static void rna_def_property_sensor(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] ={
+ static EnumPropertyItem prop_type_items[] = {
{SENS_PROP_EQUAL, "PROPEQUAL", 0, "Equal", ""},
{SENS_PROP_NEQUAL, "PROPNEQUAL", 0, "Not Equal", ""},
{SENS_PROP_INTERVAL, "PROPINTERVAL", 0, "Interval", ""},
@@ -489,32 +489,32 @@ static void rna_def_property_sensor(BlenderRNA *brna)
/* {SENS_PROP_EXPRESSION, "PROPEXPRESSION", 0, "Expression", ""}, NOT_USED_IN_UI */
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "PropertySensor", "Sensor");
+ srna = RNA_def_struct(brna, "PropertySensor", "Sensor");
RNA_def_struct_ui_text(srna, "Property Sensor", "Sensor to detect values and changes in values of properties");
RNA_def_struct_sdna_from(srna, "bPropertySensor", "data");
- prop= RNA_def_property(srna, "evaluation_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "evaluation_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Evaluation Type", "Type of property evaluation");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Property", "");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "value", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "value", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "value");
RNA_def_property_ui_text(prop, "Value", "Check for this value in types in Equal or Not Equal types");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "value_min", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "value_min", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "value");
RNA_def_property_ui_text(prop, "Minimum Value", "Minimum value in Interval type");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "value_max", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "value_max", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "maxvalue");
RNA_def_property_ui_text(prop, "Maximum Value", "Maximum value in Interval type");
RNA_def_property_update(prop, NC_LOGIC, NULL);
@@ -524,7 +524,7 @@ static void rna_def_armature_sensor(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] ={
+ static EnumPropertyItem prop_type_items[] = {
{SENS_ARM_STATE_CHANGED, "STATECHG", 0, "State Changed", ""},
{SENS_ARM_LIN_ERROR_BELOW, "LINERRORBELOW", 0, "Lin error below", ""},
{SENS_ARM_LIN_ERROR_ABOVE, "LINERRORABOVE", 0, "Lin error above", ""},
@@ -532,27 +532,27 @@ static void rna_def_armature_sensor(BlenderRNA *brna)
{SENS_ARM_ROT_ERROR_ABOVE, "ROTERRORABOVE", 0, "Rot error above", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "ArmatureSensor", "Sensor");
+ srna = RNA_def_struct(brna, "ArmatureSensor", "Sensor");
RNA_def_struct_ui_text(srna, "Armature Sensor", "Sensor to detect values and changes in values of IK solver");
RNA_def_struct_sdna_from(srna, "bArmatureSensor", "data");
- prop= RNA_def_property(srna, "test_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "test_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Test", "Type of value and test");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "bone", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "bone", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "posechannel");
RNA_def_property_ui_text(prop, "Bone Name", "Identify the bone to check value from");
RNA_def_property_update(prop, NC_LOGIC, "rna_Sensor_Armature_update");
- prop= RNA_def_property(srna, "constraint", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "constraint", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "constraint");
RNA_def_property_ui_text(prop, "Constraint Name", "Identify the bone constraint to check value from");
RNA_def_property_update(prop, NC_LOGIC, "rna_Sensor_Armature_update");
- prop= RNA_def_property(srna, "value", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "value", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "value");
RNA_def_property_ui_text(prop, "Compare Value", "Value to be used in comparison");
RNA_def_property_update(prop, NC_LOGIC, NULL);
@@ -563,12 +563,12 @@ static void rna_def_actuator_sensor(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ActuatorSensor", "Sensor");
+ srna = RNA_def_struct(brna, "ActuatorSensor", "Sensor");
RNA_def_struct_ui_text(srna, "Actuator Sensor", "Sensor to detect state modifications of actuators");
RNA_def_struct_sdna_from(srna, "bActuatorSensor", "data");
- // XXX if eventually have Logics using RNA 100%, we could use the actuator datablock isntead of its name
- prop= RNA_def_property(srna, "actuator", PROP_STRING, PROP_NONE);
+ /* XXX if eventually have Logics using RNA 100%, we could use the actuator datablock isntead of its name */
+ prop = RNA_def_property(srna, "actuator", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Actuator", "Actuator name, actuator active state modifications will be detected");
RNA_def_property_update(prop, NC_LOGIC, NULL);
@@ -579,21 +579,21 @@ static void rna_def_delay_sensor(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "DelaySensor", "Sensor");
+ srna = RNA_def_struct(brna, "DelaySensor", "Sensor");
RNA_def_struct_ui_text(srna, "Delay Sensor", "Sensor to send delayed events");
RNA_def_struct_sdna_from(srna, "bDelaySensor", "data");
- prop= RNA_def_property(srna, "delay", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "delay", PROP_INT, PROP_NONE);
RNA_def_property_ui_text(prop, "Delay", "Delay in number of logic tics before the positive trigger (default 60 per second)");
RNA_def_property_range(prop, 0, 5000);
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "duration", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "duration", PROP_INT, PROP_NONE);
RNA_def_property_ui_text(prop, "Duration", "If >0, delay in number of logic tics before the negative trigger following the positive trigger");
RNA_def_property_range(prop, 0, 5000);
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_repeat", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_repeat", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SENS_DELAY_REPEAT);
RNA_def_property_ui_text(prop, "Repeat", "Toggle repeat option (if selected, the sensor restarts after Delay+Duration logic tics)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
@@ -604,46 +604,47 @@ static void rna_def_collision_sensor(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "CollisionSensor", "Sensor");
+ srna = RNA_def_struct(brna, "CollisionSensor", "Sensor");
RNA_def_struct_ui_text(srna, "Collision Sensor", "Sensor to detect objects colliding with the current object, with more settings than the Touch sensor");
RNA_def_struct_sdna_from(srna, "bCollisionSensor", "data");
- prop= RNA_def_property(srna, "use_pulse", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pulse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", SENS_COLLISION_PULSE);
RNA_def_property_ui_text(prop, "Pulse", "Change to the set of colliding objects generates pulse");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_material", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_material", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", SENS_COLLISION_MATERIAL);
RNA_def_property_ui_text(prop, "M/P", "Toggle collision on material or property");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Property", "Only look for objects with this property (blank = all objects)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- //XXX to make a setFunction to create a lookup with all materials in Blend File (not only this object mat.)
- prop= RNA_def_property(srna, "material", PROP_STRING, PROP_NONE);
+ /*XXX to make a setFunction to create a lookup with all materials in Blend File (not only this object mat.) */
+ prop = RNA_def_property(srna, "material", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "materialName");
RNA_def_property_ui_text(prop, "Material", "Only look for objects with this material (blank = all objects)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
-/*//XXX either use a datablock look up to store the string name (material)
- // or to do a doversion and use a material pointer.
- prop= RNA_def_property(srna, "material", PROP_POINTER, PROP_NONE);
+#if 0
+ /* XXX either use a datablock look up to store the string name (material)
+ * or to do a doversion and use a material pointer. */
+ prop = RNA_def_property(srna, "material", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_sdna(prop, NULL, "ma");
RNA_def_property_ui_text(prop, "Material", "Only look for objects with this material (blank = all objects)");
-*/
+#endif
}
static void rna_def_radar_sensor(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem axis_items[] ={
+ static EnumPropertyItem axis_items[] = {
{SENS_RADAR_X_AXIS, "XAXIS", 0, "+X axis", ""},
{SENS_RADAR_Y_AXIS, "YAXIS", 0, "+Y axis", ""},
{SENS_RADAR_Z_AXIS, "ZAXIS", 0, "+Z axis", ""},
@@ -652,27 +653,27 @@ static void rna_def_radar_sensor(BlenderRNA *brna)
{SENS_RADAR_NEG_Z_AXIS, "NEGZAXIS", 0, "-Z axis", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "RadarSensor", "Sensor");
+ srna = RNA_def_struct(brna, "RadarSensor", "Sensor");
RNA_def_struct_ui_text(srna, "Radar Sensor", "Sensor to detect objects in a cone shaped radar emanating from the current object");
RNA_def_struct_sdna_from(srna, "bRadarSensor", "data");
- prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Property", "Only look for objects with this property (blank = all objects)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, axis_items);
RNA_def_property_ui_text(prop, "Axis", "Along which axis the radar cone is cast");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- //XXX TODO - use radians internally then change to PROP_ANGLE
- prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_NONE);
+ /*XXX TODO - use radians internally then change to PROP_ANGLE */
+ prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 179.9);
RNA_def_property_ui_text(prop, "Angle", "Opening angle of the radar cone (in degrees)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "range");
RNA_def_property_range(prop, 0.0, 10000.0);
RNA_def_property_ui_text(prop, "Distance", "Depth of the radar cone");
@@ -684,11 +685,11 @@ static void rna_def_random_sensor(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "RandomSensor", "Sensor");
+ srna = RNA_def_struct(brna, "RandomSensor", "Sensor");
RNA_def_struct_ui_text(srna, "Random Sensor", "Sensor to send random events");
RNA_def_struct_sdna_from(srna, "bRandomSensor", "data");
- prop= RNA_def_property(srna, "seed", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "seed", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 1000);
RNA_def_property_ui_text(prop, "Seed", "Initial seed of the generator (choose 0 for not random)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
@@ -698,7 +699,7 @@ static void rna_def_ray_sensor(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem axis_items[] ={
+ static EnumPropertyItem axis_items[] = {
{SENS_RAY_X_AXIS, "XAXIS", 0, "+X axis", ""},
{SENS_RAY_Y_AXIS, "YAXIS", 0, "+Y axis", ""},
{SENS_RAY_Z_AXIS, "ZAXIS", 0, "+Z axis", ""},
@@ -707,51 +708,52 @@ static void rna_def_ray_sensor(BlenderRNA *brna)
{SENS_RAY_NEG_Z_AXIS, "NEGZAXIS", 0, "-Z axis", ""},
{0, NULL, 0, NULL, NULL}};
- static const EnumPropertyItem prop_ray_type_items[]= {
+ static const EnumPropertyItem prop_ray_type_items[] = {
{SENS_COLLISION_PROPERTY, "PROPERTY", ICON_LOGIC, "Property", "Use a material for ray intersections"},
{SENS_COLLISION_MATERIAL, "MATERIAL", ICON_MATERIAL_DATA, "Material", "Use a property for ray intersections"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "RaySensor", "Sensor");
+ srna = RNA_def_struct(brna, "RaySensor", "Sensor");
RNA_def_struct_ui_text(srna, "Ray Sensor", "Sensor to detect intersections with a ray emanating from the current object");
RNA_def_struct_sdna_from(srna, "bRaySensor", "data");
- prop= RNA_def_property(srna, "ray_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "ray_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, prop_ray_type_items);
RNA_def_property_ui_text(prop, "Ray Type", "Toggle collision on material or property");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "propname");
RNA_def_property_ui_text(prop, "Property", "Only look for objects with this property (blank = all objects)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "material", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "material", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "matname");
RNA_def_property_ui_text(prop, "Material", "Only look for objects with this material (blank = all objects)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- /* //XXX either use a datablock look up to store the string name (material)
- // or to do a doversion and use a material pointer.
- prop= RNA_def_property(srna, "material", PROP_POINTER, PROP_NONE);
+#if 0
+ /* XXX either use a datablock look up to store the string name (material)
+ * or to do a doversion and use a material pointer. */
+ prop = RNA_def_property(srna, "material", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_sdna(prop, NULL, "ma");
RNA_def_property_ui_text(prop, "Material", "Only look for objects with this material (blank = all objects)");
-*/
+#endif
- prop= RNA_def_property(srna, "use_x_ray", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_x_ray", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", SENS_RAY_XRAY);
RNA_def_property_ui_text(prop, "X-Ray Mode", "Toggle X-Ray option (see through objects that don't have the property)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "range", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "range", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.01, 10000.0);
RNA_def_property_ui_text(prop, "Range", "Sense objects no farther than this distance");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "axisflag");
RNA_def_property_enum_items(prop, axis_items);
RNA_def_property_ui_text(prop, "Axis", "Along which axis the ray is cast");
@@ -763,11 +765,11 @@ static void rna_def_message_sensor(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "MessageSensor", "Sensor");
+ srna = RNA_def_struct(brna, "MessageSensor", "Sensor");
RNA_def_struct_ui_text(srna, "Message Sensor", "Sensor to detect incoming messages");
RNA_def_struct_sdna_from(srna, "bMessageSensor", "data");
- prop= RNA_def_property(srna, "subject", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "subject", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Subject", "Optional subject filter: only accept messages with this subject, or empty to accept all");
RNA_def_property_update(prop, NC_LOGIC, NULL);
}
@@ -777,21 +779,21 @@ static void rna_def_joystick_sensor(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem event_type_items[] ={
+ static EnumPropertyItem event_type_items[] = {
{SENS_JOY_BUTTON, "BUTTON", 0, "Button", ""},
{SENS_JOY_AXIS, "AXIS", 0, "Axis", ""},
{SENS_JOY_HAT, "HAT", 0, "Hat", ""},
{SENS_JOY_AXIS_SINGLE, "AXIS_SINGLE", 0, "Single Axis", ""},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem axis_direction_items[] ={
+ static EnumPropertyItem axis_direction_items[] = {
{SENS_JOY_X_AXIS, "RIGHTAXIS", 0, "Right Axis", ""},
{SENS_JOY_Y_AXIS, "UPAXIS", 0, "Up Axis", ""},
{SENS_JOY_NEG_X_AXIS, "LEFTAXIS", 0, "Left Axis", ""},
{SENS_JOY_NEG_Y_AXIS, "DOWNAXIS", 0, "Down Axis", ""},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem hat_direction_items[] ={
+ static EnumPropertyItem hat_direction_items[] = {
{SENS_JOY_HAT_UP, "UP", 0, "Up", ""},
{SENS_JOY_HAT_DOWN, "DOWN", 0, "Down", ""},
{SENS_JOY_HAT_LEFT, "LEFT", 0, "Left", ""},
@@ -803,68 +805,68 @@ static void rna_def_joystick_sensor(BlenderRNA *brna)
{SENS_JOY_HAT_DOWN_RIGHT, "DOWNRIGHT", 0, "Down/Right", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "JoystickSensor", "Sensor");
+ srna = RNA_def_struct(brna, "JoystickSensor", "Sensor");
RNA_def_struct_ui_text(srna, "Joystick Sensor", "Sensor to detect joystick events");
RNA_def_struct_sdna_from(srna, "bJoystickSensor", "data");
- prop= RNA_def_property(srna, "joystick_index", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "joystick_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "joyindex");
RNA_def_property_ui_text(prop, "Index", "Which joystick to use");
RNA_def_property_range(prop, 0, SENS_JOY_MAXINDEX-1);
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "event_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "event_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, event_type_items);
RNA_def_property_ui_text(prop, "Event Type", "The type of event this joystick sensor is triggered on");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "use_all_events", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_all_events", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SENS_JOY_ANY_EVENT);
RNA_def_property_ui_text(prop, "All Events", "Triggered by all events on this joystick's current type (axis/button/hat)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* Button */
- prop= RNA_def_property(srna, "button_number", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "button_number", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "button");
RNA_def_property_ui_text(prop, "Button Number", "Which button to use");
RNA_def_property_range(prop, 0, 18);
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* Axis */
- prop= RNA_def_property(srna, "axis_number", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "axis_number", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "axis");
RNA_def_property_ui_text(prop, "Axis Number", "Which axis pair to use, 1 is usually the main direction input");
RNA_def_property_range(prop, 1, 8);
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "axis_threshold", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "axis_threshold", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "precision");
RNA_def_property_ui_text(prop, "Axis Threshold", "Precision of the axis");
RNA_def_property_range(prop, 0, 32768);
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "axis_direction", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "axis_direction", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "axisf");
RNA_def_property_enum_items(prop, axis_direction_items);
RNA_def_property_ui_text(prop, "Axis Direction", "The direction of the axis");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* Single Axis */
- prop= RNA_def_property(srna, "single_axis_number", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "single_axis_number", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "axis_single");
RNA_def_property_ui_text(prop, "Axis Number", "Single axis (vertical/horizontal/other) to detect");
RNA_def_property_range(prop, 1, 16);
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* Hat */
- prop= RNA_def_property(srna, "hat_number", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "hat_number", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "hat");
RNA_def_property_ui_text(prop, "Hat Number", "Which hat to use");
RNA_def_property_range(prop, 1, 2);
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "hat_direction", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "hat_direction", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "hatf");
RNA_def_property_enum_items(prop, hat_direction_items);
RNA_def_property_ui_text(prop, "Hat Direction", "Hat direction");
diff --git a/source/blender/makesrna/intern/rna_sensor_api.c b/source/blender/makesrna/intern/rna_sensor_api.c
index bb1afd81007..8a5b11eb773 100644
--- a/source/blender/makesrna/intern/rna_sensor_api.c
+++ b/source/blender/makesrna/intern/rna_sensor_api.c
@@ -58,15 +58,15 @@ void RNA_api_sensor(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
- func= RNA_def_function(srna, "link", "rna_Sensor_link");
+ func = RNA_def_function(srna, "link", "rna_Sensor_link");
RNA_def_function_ui_description(func, "Link the sensor to a controller");
- parm= RNA_def_pointer(func, "controller", "Controller", "", "Controller to link to");
+ parm = RNA_def_pointer(func, "controller", "Controller", "", "Controller to link to");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_property_update(parm, NC_LOGIC, NULL);
- func= RNA_def_function(srna, "unlink", "rna_Sensor_unlink");
+ func = RNA_def_function(srna, "unlink", "rna_Sensor_unlink");
RNA_def_function_ui_description(func, "Unlink the sensor from a controller");
- parm= RNA_def_pointer(func, "controller", "Controller", "", "Controller to unlink from");
+ parm = RNA_def_pointer(func, "controller", "Controller", "", "Controller to unlink from");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_property_update(parm, NC_LOGIC, NULL);
}
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index e4b0f430c2a..d414658f32d 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -53,9 +53,9 @@
/* build a temp referene to the parent */
static void meta_tmp_ref(Sequence *seq_par, Sequence *seq)
{
- for (; seq; seq= seq->next) {
- seq->tmp= seq_par;
- if(seq->type == SEQ_META) {
+ for (; seq; seq = seq->next) {
+ seq->tmp = seq_par;
+ if (seq->type == SEQ_META) {
meta_tmp_ref(seq, seq->seqbase.first);
}
}
@@ -63,8 +63,8 @@ static void meta_tmp_ref(Sequence *seq_par, Sequence *seq)
static void rna_SequenceEditor_sequences_all_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Scene *scene= (Scene*)ptr->id.data;
- Editing *ed= seq_give_editing(scene, FALSE);
+ Scene *scene = (Scene*)ptr->id.data;
+ Editing *ed = seq_give_editing(scene, FALSE);
meta_tmp_ref(NULL, ed->seqbase.first);
@@ -73,32 +73,32 @@ static void rna_SequenceEditor_sequences_all_begin(CollectionPropertyIterator *i
static void rna_SequenceEditor_sequences_all_next(CollectionPropertyIterator *iter)
{
- ListBaseIterator *internal= iter->internal;
- Sequence *seq= (Sequence*)internal->link;
+ ListBaseIterator *internal = iter->internal;
+ Sequence *seq = (Sequence*)internal->link;
- if(seq->seqbase.first)
- internal->link= (Link*)seq->seqbase.first;
- else if(seq->next)
- internal->link= (Link*)seq->next;
+ if (seq->seqbase.first)
+ internal->link = (Link*)seq->seqbase.first;
+ else if (seq->next)
+ internal->link = (Link*)seq->next;
else {
- internal->link= NULL;
+ internal->link = NULL;
do {
- seq= seq->tmp; // XXX - seq's dont reference their parents!
- if(seq && seq->next) {
- internal->link= (Link*)seq->next;
+ seq = seq->tmp; /* XXX - seq's dont reference their parents! */
+ if (seq && seq->next) {
+ internal->link = (Link*)seq->next;
break;
}
- } while(seq);
+ } while (seq);
}
- iter->valid= (internal->link != NULL);
+ iter->valid = (internal->link != NULL);
}
/* internal use */
static int rna_SequenceEditor_elements_length(PointerRNA *ptr)
{
- Sequence *seq= (Sequence*)ptr->data;
+ Sequence *seq = (Sequence*)ptr->data;
/* Hack? copied from sequencer.c::reload_sequence_new_file() */
size_t olen = MEM_allocN_len(seq->strip->stripdata)/sizeof(struct StripElem);
@@ -109,26 +109,26 @@ static int rna_SequenceEditor_elements_length(PointerRNA *ptr)
static void rna_SequenceEditor_elements_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- Sequence *seq= (Sequence*)ptr->data;
+ Sequence *seq = (Sequence*)ptr->data;
rna_iterator_array_begin(iter, (void*)seq->strip->stripdata, sizeof(StripElem), rna_SequenceEditor_elements_length(ptr), 0, NULL);
}
static void rna_Sequence_frame_change_update(Scene *scene, Sequence *seq)
{
- Editing *ed= seq_give_editing(scene, FALSE);
- ListBase *seqbase= seq_seqbase(&ed->seqbase, seq);
+ Editing *ed = seq_give_editing(scene, FALSE);
+ ListBase *seqbase = seq_seqbase(&ed->seqbase, seq);
calc_sequence_disp(scene, seq);
- if(seq_test_overlap(seqbase, seq)) {
- shuffle_seq(seqbase, seq, scene); // XXX - BROKEN!, uses context seqbasep
+ if (seq_test_overlap(seqbase, seq)) {
+ shuffle_seq(seqbase, seq, scene); /* XXX - BROKEN!, uses context seqbasep */
}
sort_seq(scene);
}
static void rna_Sequence_start_frame_set(PointerRNA *ptr, int value)
{
- Sequence *seq= (Sequence*)ptr->data;
- Scene *scene= (Scene*)ptr->id.data;
+ Sequence *seq = (Sequence*)ptr->data;
+ Scene *scene = (Scene*)ptr->id.data;
seq_translate(scene, seq, value - seq->start);
rna_Sequence_frame_change_update(scene, seq);
@@ -136,8 +136,8 @@ static void rna_Sequence_start_frame_set(PointerRNA *ptr, int value)
static void rna_Sequence_start_frame_final_set(PointerRNA *ptr, int value)
{
- Sequence *seq= (Sequence*)ptr->data;
- Scene *scene= (Scene*)ptr->id.data;
+ Sequence *seq = (Sequence*)ptr->data;
+ Scene *scene = (Scene*)ptr->id.data;
seq_tx_set_final_left(seq, value);
seq_single_fix(seq);
@@ -146,8 +146,8 @@ static void rna_Sequence_start_frame_final_set(PointerRNA *ptr, int value)
static void rna_Sequence_end_frame_final_set(PointerRNA *ptr, int value)
{
- Sequence *seq= (Sequence*)ptr->data;
- Scene *scene= (Scene*)ptr->id.data;
+ Sequence *seq = (Sequence*)ptr->data;
+ Scene *scene = (Scene*)ptr->id.data;
seq_tx_set_final_right(seq, value);
seq_single_fix(seq);
@@ -156,8 +156,8 @@ static void rna_Sequence_end_frame_final_set(PointerRNA *ptr, int value)
static void rna_Sequence_anim_startofs_final_set(PointerRNA *ptr, int value)
{
- Sequence *seq= (Sequence*)ptr->data;
- Scene *scene= (Scene*)ptr->id.data;
+ Sequence *seq = (Sequence*)ptr->data;
+ Scene *scene = (Scene*)ptr->id.data;
seq->anim_startofs = MIN2(value, seq->len + seq->anim_startofs);
@@ -167,8 +167,8 @@ static void rna_Sequence_anim_startofs_final_set(PointerRNA *ptr, int value)
static void rna_Sequence_anim_endofs_final_set(PointerRNA *ptr, int value)
{
- Sequence *seq= (Sequence*)ptr->data;
- Scene *scene= (Scene*)ptr->id.data;
+ Sequence *seq = (Sequence*)ptr->data;
+ Scene *scene = (Scene*)ptr->id.data;
seq->anim_endofs = MIN2(value, seq->len + seq->anim_endofs);
@@ -178,8 +178,8 @@ static void rna_Sequence_anim_endofs_final_set(PointerRNA *ptr, int value)
static void rna_Sequence_frame_length_set(PointerRNA *ptr, int value)
{
- Sequence *seq= (Sequence*)ptr->data;
- Scene *scene= (Scene*)ptr->id.data;
+ Sequence *seq = (Sequence*)ptr->data;
+ Scene *scene = (Scene*)ptr->id.data;
seq_tx_set_final_right(seq, seq->start+value);
rna_Sequence_frame_change_update(scene, seq);
@@ -187,7 +187,7 @@ static void rna_Sequence_frame_length_set(PointerRNA *ptr, int value)
static int rna_Sequence_frame_length_get(PointerRNA *ptr)
{
- Sequence *seq= (Sequence*)ptr->data;
+ Sequence *seq = (Sequence*)ptr->data;
return seq_tx_get_final_right(seq, 0)-seq_tx_get_final_left(seq, 0);
}
@@ -200,15 +200,15 @@ static int rna_Sequence_frame_editable(PointerRNA *ptr)
static void rna_Sequence_channel_set(PointerRNA *ptr, int value)
{
- Sequence *seq= (Sequence*)ptr->data;
- Scene *scene= (Scene*)ptr->id.data;
- Editing *ed= seq_give_editing(scene, FALSE);
- ListBase *seqbase= seq_seqbase(&ed->seqbase, seq);
+ Sequence *seq = (Sequence*)ptr->data;
+ Scene *scene = (Scene*)ptr->id.data;
+ Editing *ed = seq_give_editing(scene, FALSE);
+ ListBase *seqbase = seq_seqbase(&ed->seqbase, seq);
- seq->machine= value;
+ seq->machine = value;
- if( seq_test_overlap(seqbase, seq) ) {
- shuffle_seq(seqbase, seq, scene); // XXX - BROKEN!, uses context seqbasep
+ if ( seq_test_overlap(seqbase, seq) ) {
+ shuffle_seq(seqbase, seq, scene); /* XXX - BROKEN!, uses context seqbasep */
}
sort_seq(scene);
}
@@ -216,14 +216,14 @@ static void rna_Sequence_channel_set(PointerRNA *ptr, int value)
/* properties that need to allocate structs */
static void rna_Sequence_use_color_balance_set(PointerRNA *ptr, int value)
{
- Sequence *seq= (Sequence*)ptr->data;
+ Sequence *seq = (Sequence*)ptr->data;
int c;
- if(value) {
+ if (value) {
seq->flag |= SEQ_USE_COLOR_BALANCE;
- if(seq->strip->color_balance == NULL) {
+ if (seq->strip->color_balance == NULL) {
seq->strip->color_balance = MEM_callocN(sizeof(struct StripColorBalance), "StripColorBalance");
- for (c=0; c<3; c++) {
+ for (c = 0; c<3; c++) {
seq->strip->color_balance->lift[c] = 1.0f;
seq->strip->color_balance->gamma[c] = 1.0f;
seq->strip->color_balance->gain[c] = 1.0f;
@@ -236,14 +236,14 @@ static void rna_Sequence_use_color_balance_set(PointerRNA *ptr, int value)
static void rna_Sequence_use_proxy_set(PointerRNA *ptr, int value)
{
- Sequence *seq= (Sequence*)ptr->data;
- if(value) {
+ Sequence *seq = (Sequence*)ptr->data;
+ if (value) {
seq->flag |= SEQ_USE_PROXY;
- if(seq->strip->proxy == NULL) {
+ if (seq->strip->proxy == NULL) {
seq->strip->proxy = MEM_callocN(sizeof(struct StripProxy), "StripProxy");
seq->strip->proxy->quality = 90;
seq->strip->proxy->build_tc_flags = SEQ_PROXY_TC_ALL;
- seq->strip->proxy->build_size_flags
+ seq->strip->proxy->build_size_flags
= SEQ_PROXY_IMAGE_SIZE_25;
}
} else {
@@ -253,10 +253,10 @@ static void rna_Sequence_use_proxy_set(PointerRNA *ptr, int value)
static void rna_Sequence_use_translation_set(PointerRNA *ptr, int value)
{
- Sequence *seq= (Sequence*)ptr->data;
- if(value) {
+ Sequence *seq = (Sequence*)ptr->data;
+ if (value) {
seq->flag |= SEQ_USE_TRANSFORM;
- if(seq->strip->transform == NULL) {
+ if (seq->strip->transform == NULL) {
seq->strip->transform = MEM_callocN(sizeof(struct StripTransform), "StripTransform");
}
} else {
@@ -266,10 +266,10 @@ static void rna_Sequence_use_translation_set(PointerRNA *ptr, int value)
static void rna_Sequence_use_crop_set(PointerRNA *ptr, int value)
{
- Sequence *seq= (Sequence*)ptr->data;
- if(value) {
+ Sequence *seq = (Sequence*)ptr->data;
+ if (value) {
seq->flag |= SEQ_USE_CROP;
- if(seq->strip->crop == NULL) {
+ if (seq->strip->crop == NULL) {
seq->strip->crop = MEM_callocN(sizeof(struct StripCrop), "StripCrop");
}
} else {
@@ -279,10 +279,10 @@ static void rna_Sequence_use_crop_set(PointerRNA *ptr, int value)
static int transform_seq_cmp_cb(Sequence *seq, void *arg_pt)
{
- struct { Sequence *seq; void *transform; } *data= arg_pt;
+ struct { Sequence *seq; void *transform; } *data = arg_pt;
- if(seq->strip && seq->strip->transform == data->transform) {
- data->seq= seq;
+ if (seq->strip && seq->strip->transform == data->transform) {
+ data->seq = seq;
return -1; /* done so bail out */
}
return 1;
@@ -290,17 +290,17 @@ static int transform_seq_cmp_cb(Sequence *seq, void *arg_pt)
static char *rna_SequenceTransform_path(PointerRNA *ptr)
{
- Scene *scene= ptr->id.data;
- Editing *ed= seq_give_editing(scene, FALSE);
+ Scene *scene = ptr->id.data;
+ Editing *ed = seq_give_editing(scene, FALSE);
Sequence *seq;
struct { Sequence *seq; void *transform; } data;
- data.seq= NULL;
- data.transform= ptr->data;
+ data.seq = NULL;
+ data.transform = ptr->data;
/* irritating we need to search for our sequence! */
seqbase_recursive_apply(&ed->seqbase, transform_seq_cmp_cb, &data);
- seq= data.seq;
+ seq = data.seq;
if (seq && seq->name+2)
return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].transform", seq->name+2);
@@ -310,10 +310,10 @@ static char *rna_SequenceTransform_path(PointerRNA *ptr)
static int crop_seq_cmp_cb(Sequence *seq, void *arg_pt)
{
- struct { Sequence *seq; void *crop; } *data= arg_pt;
+ struct { Sequence *seq; void *crop; } *data = arg_pt;
- if(seq->strip && seq->strip->crop == data->crop) {
- data->seq= seq;
+ if (seq->strip && seq->strip->crop == data->crop) {
+ data->seq = seq;
return -1; /* done so bail out */
}
return 1;
@@ -321,17 +321,17 @@ static int crop_seq_cmp_cb(Sequence *seq, void *arg_pt)
static char *rna_SequenceCrop_path(PointerRNA *ptr)
{
- Scene *scene= ptr->id.data;
- Editing *ed= seq_give_editing(scene, FALSE);
+ Scene *scene = ptr->id.data;
+ Editing *ed = seq_give_editing(scene, FALSE);
Sequence *seq;
struct { Sequence *seq; void *crop; } data;
- data.seq= NULL;
- data.crop= ptr->data;
+ data.seq = NULL;
+ data.crop = ptr->data;
/* irritating we need to search for our sequence! */
seqbase_recursive_apply(&ed->seqbase, crop_seq_cmp_cb, &data);
- seq= data.seq;
+ seq = data.seq;
if (seq && seq->name+2)
return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].crop", seq->name+2);
@@ -343,20 +343,20 @@ static char *rna_SequenceCrop_path(PointerRNA *ptr)
/* name functions that ignore the first two characters */
static void rna_Sequence_name_get(PointerRNA *ptr, char *value)
{
- Sequence *seq= (Sequence*)ptr->data;
+ Sequence *seq = (Sequence*)ptr->data;
BLI_strncpy(value, seq->name+2, sizeof(seq->name)-2);
}
static int rna_Sequence_name_length(PointerRNA *ptr)
{
- Sequence *seq= (Sequence*)ptr->data;
+ Sequence *seq = (Sequence*)ptr->data;
return strlen(seq->name+2);
}
static void rna_Sequence_name_set(PointerRNA *ptr, const char *value)
{
- Scene *scene= (Scene*)ptr->id.data;
- Sequence *seq= (Sequence*)ptr->data;
+ Scene *scene = (Scene*)ptr->id.data;
+ Sequence *seq = (Sequence*)ptr->data;
char oldname[sizeof(seq->name)];
AnimData *adt;
@@ -373,16 +373,16 @@ static void rna_Sequence_name_set(PointerRNA *ptr, const char *value)
/* dont rename everywhere because these are per scene */
/* BKE_all_animdata_fix_paths_rename("sequence_editor.sequences_all", oldname, seq->name+2); */
- adt= BKE_animdata_from_id(&scene->id);
- if(adt)
+ adt = BKE_animdata_from_id(&scene->id);
+ if (adt)
BKE_animdata_fix_paths_rename(&scene->id, adt, "sequence_editor.sequences_all", oldname, seq->name+2, 0, 0, 1);
}
static StructRNA* rna_Sequence_refine(struct PointerRNA *ptr)
{
- Sequence *seq= (Sequence*)ptr->data;
+ Sequence *seq = (Sequence*)ptr->data;
- switch(seq->type) {
+ switch (seq->type) {
case SEQ_IMAGE:
return &RNA_ImageSequence;
case SEQ_META:
@@ -425,7 +425,7 @@ static StructRNA* rna_Sequence_refine(struct PointerRNA *ptr)
static char *rna_Sequence_path(PointerRNA *ptr)
{
- Sequence *seq= (Sequence*)ptr->data;
+ Sequence *seq = (Sequence*)ptr->data;
/* sequencer data comes from scene...
* TODO: would be nice to make SequenceEditor data a datablock of its own (for shorter paths)
@@ -438,8 +438,8 @@ static char *rna_Sequence_path(PointerRNA *ptr)
static PointerRNA rna_SequenceEditor_meta_stack_get(CollectionPropertyIterator *iter)
{
- ListBaseIterator *internal= iter->internal;
- MetaStack *ms= (MetaStack*)internal->link;
+ ListBaseIterator *internal = iter->internal;
+ MetaStack *ms = (MetaStack*)internal->link;
return rna_pointer_inherit_refine(&iter->parent, &RNA_Sequence, ms->parseq);
}
@@ -447,9 +447,9 @@ static PointerRNA rna_SequenceEditor_meta_stack_get(CollectionPropertyIterator *
/* TODO, expose seq path setting as a higher level sequencer BKE function */
static void rna_Sequence_filepath_set(PointerRNA *ptr, const char *value)
{
- Sequence *seq= (Sequence*)(ptr->data);
+ Sequence *seq = (Sequence*)(ptr->data);
- if(seq->type == SEQ_SOUND && seq->sound) {
+ if (seq->type == SEQ_SOUND && seq->sound) {
/* for sound strips we need to update the sound as well.
* arguably, this could load in a new sound rather than modify an existing one.
* but while using the sequencer its most likely your not using the sound in the game engine too.
@@ -466,14 +466,14 @@ static void rna_Sequence_filepath_set(PointerRNA *ptr, const char *value)
static void rna_Sequence_filepath_get(PointerRNA *ptr, char *value)
{
- Sequence *seq= (Sequence*)(ptr->data);
+ Sequence *seq = (Sequence*)(ptr->data);
BLI_join_dirfile(value, FILE_MAX, seq->strip->dir, seq->strip->stripdata->name);
}
static int rna_Sequence_filepath_length(PointerRNA *ptr)
{
- Sequence *seq= (Sequence*)(ptr->data);
+ Sequence *seq = (Sequence*)(ptr->data);
char path[FILE_MAX];
BLI_join_dirfile(path, sizeof(path), seq->strip->dir, seq->strip->stripdata->name);
@@ -482,20 +482,20 @@ static int rna_Sequence_filepath_length(PointerRNA *ptr)
static void rna_Sequence_proxy_filepath_set(PointerRNA *ptr, const char *value)
{
- StripProxy *proxy= (StripProxy*)(ptr->data);
+ StripProxy *proxy = (StripProxy*)(ptr->data);
BLI_split_dirfile(value, proxy->dir, proxy->file, sizeof(proxy->dir), sizeof(proxy->file));
}
static void rna_Sequence_proxy_filepath_get(PointerRNA *ptr, char *value)
{
- StripProxy *proxy= (StripProxy*)(ptr->data);
+ StripProxy *proxy = (StripProxy*)(ptr->data);
BLI_join_dirfile(value, FILE_MAX, proxy->dir, proxy->file);
}
static int rna_Sequence_proxy_filepath_length(PointerRNA *ptr)
{
- StripProxy *proxy= (StripProxy*)(ptr->data);
+ StripProxy *proxy = (StripProxy*)(ptr->data);
char path[FILE_MAX];
BLI_join_dirfile(path, sizeof(path), proxy->dir, proxy->file);
@@ -504,35 +504,35 @@ static int rna_Sequence_proxy_filepath_length(PointerRNA *ptr)
static void rna_Sequence_volume_set(PointerRNA *ptr, float value)
{
- Sequence *seq= (Sequence*)(ptr->data);
+ Sequence *seq = (Sequence*)(ptr->data);
seq->volume = value;
- if(seq->scene_sound)
+ if (seq->scene_sound)
sound_set_scene_sound_volume(seq->scene_sound, value, (seq->flag & SEQ_AUDIO_VOLUME_ANIMATED) != 0);
}
static void rna_Sequence_pitch_set(PointerRNA *ptr, float value)
{
- Sequence *seq= (Sequence*)(ptr->data);
+ Sequence *seq = (Sequence*)(ptr->data);
seq->pitch = value;
- if(seq->scene_sound)
+ if (seq->scene_sound)
sound_set_scene_sound_pitch(seq->scene_sound, value, (seq->flag & SEQ_AUDIO_PITCH_ANIMATED) != 0);
}
static void rna_Sequence_pan_set(PointerRNA *ptr, float value)
{
- Sequence *seq= (Sequence*)(ptr->data);
+ Sequence *seq = (Sequence*)(ptr->data);
seq->pan = value;
- if(seq->scene_sound)
+ if (seq->scene_sound)
sound_set_scene_sound_pan(seq->scene_sound, value, (seq->flag & SEQ_AUDIO_PAN_ANIMATED) != 0);
}
static int rna_Sequence_input_count_get(PointerRNA *ptr)
{
- Sequence *seq= (Sequence*)(ptr->data);
+ Sequence *seq = (Sequence*)(ptr->data);
return get_sequence_effect_num_inputs(seq->type);
}
@@ -550,25 +550,25 @@ static void rna_SequenceElement_filename_set(PointerRNA *ptr, const char *value)
static void rna_Sequence_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
{
- Editing *ed= seq_give_editing(scene, FALSE);
+ Editing *ed = seq_give_editing(scene, FALSE);
- if(ed)
+ if (ed)
free_imbuf_seq(scene, &ed->seqbase, FALSE, TRUE);
}
static void rna_Sequence_update_reopen_files(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
{
- Editing *ed= seq_give_editing(scene, FALSE);
+ Editing *ed = seq_give_editing(scene, FALSE);
free_imbuf_seq(scene, &ed->seqbase, FALSE, FALSE);
- if(RNA_struct_is_a(ptr->type, &RNA_SoundSequence))
+ if (RNA_struct_is_a(ptr->type, &RNA_SoundSequence))
seq_update_sound_bounds(scene, ptr->data);
}
static void rna_Sequence_mute_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Editing *ed= seq_give_editing(scene, FALSE);
+ Editing *ed = seq_give_editing(scene, FALSE);
seq_update_muting(ed);
rna_Sequence_update(bmain, scene, ptr);
@@ -576,7 +576,7 @@ static void rna_Sequence_mute_update(Main *bmain, Scene *scene, PointerRNA *ptr)
static void rna_Sequence_filepath_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Sequence *seq= (Sequence*)(ptr->data);
+ Sequence *seq = (Sequence*)(ptr->data);
reload_sequence_new_file(scene, seq, TRUE);
calc_sequence(scene, seq);
rna_Sequence_update(bmain, scene, ptr);
@@ -584,10 +584,10 @@ static void rna_Sequence_filepath_update(Main *bmain, Scene *scene, PointerRNA *
static int seqproxy_seq_cmp_cb(Sequence *seq, void *arg_pt)
{
- struct { Sequence *seq; void *seq_proxy; } *data= arg_pt;
+ struct { Sequence *seq; void *seq_proxy; } *data = arg_pt;
- if(seq->strip && seq->strip->proxy == data->seq_proxy) {
- data->seq= seq;
+ if (seq->strip && seq->strip->proxy == data->seq_proxy) {
+ data->seq = seq;
return -1; /* done so bail out */
}
return 1;
@@ -595,16 +595,16 @@ static int seqproxy_seq_cmp_cb(Sequence *seq, void *arg_pt)
static void rna_Sequence_tcindex_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Editing *ed= seq_give_editing(scene, FALSE);
+ Editing *ed = seq_give_editing(scene, FALSE);
Sequence *seq;
struct { Sequence *seq; void *seq_proxy; } data;
- data.seq= NULL;
+ data.seq = NULL;
data.seq_proxy = ptr->data;
seqbase_recursive_apply(&ed->seqbase, seqproxy_seq_cmp_cb, &data);
- seq= data.seq;
+ seq = data.seq;
reload_sequence_new_file(scene, seq, FALSE);
rna_Sequence_frame_change_update(scene, seq);
@@ -613,12 +613,12 @@ static void rna_Sequence_tcindex_update(Main *bmain, Scene *scene, PointerRNA *p
/* do_versions? */
static float rna_Sequence_opacity_get(PointerRNA *ptr)
{
- Sequence *seq= (Sequence*)(ptr->data);
+ Sequence *seq = (Sequence*)(ptr->data);
return seq->blend_opacity / 100.0f;
}
static void rna_Sequence_opacity_set(PointerRNA *ptr, float value)
{
- Sequence *seq= (Sequence*)(ptr->data);
+ Sequence *seq = (Sequence*)(ptr->data);
CLAMP(value, 0.0f, 1.0f);
seq->blend_opacity = value * 100.0f;
}
@@ -626,27 +626,27 @@ static void rna_Sequence_opacity_set(PointerRNA *ptr, float value)
static int colbalance_seq_cmp_cb(Sequence *seq, void *arg_pt)
{
- struct { Sequence *seq; void *color_balance; } *data= arg_pt;
+ struct { Sequence *seq; void *color_balance; } *data = arg_pt;
- if(seq->strip && seq->strip->color_balance == data->color_balance) {
- data->seq= seq;
+ if (seq->strip && seq->strip->color_balance == data->color_balance) {
+ data->seq = seq;
return -1; /* done so bail out */
}
return 1;
}
static char *rna_SequenceColorBalance_path(PointerRNA *ptr)
{
- Scene *scene= ptr->id.data;
- Editing *ed= seq_give_editing(scene, FALSE);
+ Scene *scene = ptr->id.data;
+ Editing *ed = seq_give_editing(scene, FALSE);
Sequence *seq;
struct { Sequence *seq; void *color_balance; } data;
- data.seq= NULL;
- data.color_balance= ptr->data;
+ data.seq = NULL;
+ data.color_balance = ptr->data;
/* irritating we need to search for our sequence! */
seqbase_recursive_apply(&ed->seqbase, colbalance_seq_cmp_cb, &data);
- seq= data.seq;
+ seq = data.seq;
if (seq && seq->name+2)
return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].color_balance", seq->name+2);
@@ -656,32 +656,32 @@ static char *rna_SequenceColorBalance_path(PointerRNA *ptr)
static void rna_SequenceEditor_overlay_lock_set(PointerRNA *ptr, int value)
{
- Scene *scene= ptr->id.data;
- Editing *ed= seq_give_editing(scene, FALSE);
+ Scene *scene = ptr->id.data;
+ Editing *ed = seq_give_editing(scene, FALSE);
- if(ed==NULL)
+ if (ed == NULL)
return;
/* convert from abs to relative and back */
- if((ed->over_flag & SEQ_EDIT_OVERLAY_ABS)==0 && value) {
- ed->over_cfra= scene->r.cfra + ed->over_ofs;
+ if ((ed->over_flag & SEQ_EDIT_OVERLAY_ABS) == 0 && value) {
+ ed->over_cfra = scene->r.cfra + ed->over_ofs;
ed->over_flag |= SEQ_EDIT_OVERLAY_ABS;
}
- else if((ed->over_flag & SEQ_EDIT_OVERLAY_ABS) && !value) {
- ed->over_ofs= ed->over_cfra - scene->r.cfra;
+ else if ((ed->over_flag & SEQ_EDIT_OVERLAY_ABS) && !value) {
+ ed->over_ofs = ed->over_cfra - scene->r.cfra;
ed->over_flag &= ~SEQ_EDIT_OVERLAY_ABS;
}
}
static int rna_SequenceEditor_overlay_frame_get(PointerRNA *ptr)
{
- Scene *scene= (Scene *)ptr->id.data;
- Editing *ed= seq_give_editing(scene, FALSE);
+ Scene *scene = (Scene *)ptr->id.data;
+ Editing *ed = seq_give_editing(scene, FALSE);
- if(ed==NULL)
+ if (ed == NULL)
return scene->r.cfra;
- if(ed->over_flag & SEQ_EDIT_OVERLAY_ABS)
+ if (ed->over_flag & SEQ_EDIT_OVERLAY_ABS)
return ed->over_cfra - scene->r.cfra;
else
return ed->over_ofs;
@@ -690,31 +690,31 @@ static int rna_SequenceEditor_overlay_frame_get(PointerRNA *ptr)
static void rna_SequenceEditor_overlay_frame_set(PointerRNA *ptr, int value)
{
- Scene *scene= (Scene *)ptr->id.data;
- Editing *ed= seq_give_editing(scene, FALSE);
+ Scene *scene = (Scene *)ptr->id.data;
+ Editing *ed = seq_give_editing(scene, FALSE);
- if(ed==NULL)
+ if (ed == NULL)
return;
- if(ed->over_flag & SEQ_EDIT_OVERLAY_ABS)
- ed->over_cfra= (scene->r.cfra + value);
+ if (ed->over_flag & SEQ_EDIT_OVERLAY_ABS)
+ ed->over_cfra = (scene->r.cfra + value);
else
- ed->over_ofs= value;
+ ed->over_ofs = value;
}
static void rna_WipeSequence_angle_set(PointerRNA *ptr, float value)
{
- Sequence *seq= (Sequence *)(ptr->data);
- value= RAD2DEGF(value);
+ Sequence *seq = (Sequence *)(ptr->data);
+ value = RAD2DEGF(value);
CLAMP(value, -90.0f, 90.0f);
- ((WipeVars *)seq->effectdata)->angle= value;
+ ((WipeVars *)seq->effectdata)->angle = value;
}
static float rna_WipeSequence_angle_get(PointerRNA *ptr)
{
- Sequence *seq= (Sequence *)(ptr->data);
+ Sequence *seq = (Sequence *)(ptr->data);
return DEG2RADF(((WipeVars *)seq->effectdata)->angle);
}
@@ -731,17 +731,17 @@ static void rna_def_strip_element(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Sequence Element", "Sequence strip data for a single frame");
RNA_def_struct_sdna(srna, "StripElem");
- prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILENAME);
+ prop = RNA_def_property(srna, "filename", PROP_STRING, PROP_FILENAME);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Filename", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "orig_width", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "orig_width", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "orig_width");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Orig Width", "Original image width");
- prop= RNA_def_property(srna, "orig_height", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "orig_height", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "orig_height");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Orig Height", "Original image height");
@@ -756,25 +756,25 @@ static void rna_def_strip_crop(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Sequence Crop", "Cropping parameters for a sequence strip");
RNA_def_struct_sdna(srna, "StripCrop");
- prop= RNA_def_property(srna, "max_y", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "max_y", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "top");
RNA_def_property_ui_text(prop, "Top", "");
RNA_def_property_ui_range(prop, 0, 4096, 1, 0);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "min_y", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "min_y", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "bottom");
RNA_def_property_ui_text(prop, "Bottom", "");
RNA_def_property_ui_range(prop, 0, 4096, 1, 0);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "min_x", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "min_x", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "left");
RNA_def_property_ui_text(prop, "Left", "");
RNA_def_property_ui_range(prop, 0, 4096, 1, 0);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "max_x", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "max_x", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "right");
RNA_def_property_ui_text(prop, "Right", "");
RNA_def_property_ui_range(prop, 0, 4096, 1, 0);
@@ -792,13 +792,13 @@ static void rna_def_strip_transform(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Sequence Transform", "Transform parameters for a sequence strip");
RNA_def_struct_sdna(srna, "StripTransform");
- prop= RNA_def_property(srna, "offset_x", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "offset_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "xofs");
RNA_def_property_ui_text(prop, "Offset X", "");
RNA_def_property_ui_range(prop, -4096, 4096, 1, 0);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "offset_y", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "offset_y", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "yofs");
RNA_def_property_ui_text(prop, "Offset Y", "");
RNA_def_property_ui_range(prop, -4096, 4096, 1, 0);
@@ -813,7 +813,7 @@ static void rna_def_strip_proxy(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static const EnumPropertyItem seq_tc_items[]= {
+ static const EnumPropertyItem seq_tc_items[] = {
{SEQ_PROXY_TC_NONE, "NONE", 0, "No TC in use", ""},
{SEQ_PROXY_TC_RECORD_RUN, "RECORD_RUN", 0, "Record Run",
"Use images in the order as they are recorded"},
@@ -831,51 +831,51 @@ static void rna_def_strip_proxy(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Sequence Proxy", "Proxy parameters for a sequence strip");
RNA_def_struct_sdna(srna, "StripProxy");
- prop= RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
+ prop = RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "dir");
RNA_def_property_ui_text(prop, "Directory", "Location to store the proxy files");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
+ prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_property_ui_text(prop, "Path", "Location of custom proxy file");
RNA_def_property_string_funcs(prop, "rna_Sequence_proxy_filepath_get", "rna_Sequence_proxy_filepath_length", "rna_Sequence_proxy_filepath_set");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "build_25", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "build_25", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "build_size_flags", SEQ_PROXY_IMAGE_SIZE_25);
RNA_def_property_ui_text(prop, "25%", "Build 25% proxy resolution");
- prop= RNA_def_property(srna, "build_50", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "build_50", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "build_size_flags", SEQ_PROXY_IMAGE_SIZE_50);
RNA_def_property_ui_text(prop, "50%", "Build 50% proxy resolution");
- prop= RNA_def_property(srna, "build_75", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "build_75", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "build_size_flags", SEQ_PROXY_IMAGE_SIZE_75);
RNA_def_property_ui_text(prop, "75%", "Build 75% proxy resolution");
- prop= RNA_def_property(srna, "build_100", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "build_100", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "build_size_flags", SEQ_PROXY_IMAGE_SIZE_100);
RNA_def_property_ui_text(prop, "100%", "Build 100% proxy resolution");
- prop= RNA_def_property(srna, "build_record_run", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "build_record_run", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "build_tc_flags", SEQ_PROXY_TC_RECORD_RUN);
RNA_def_property_ui_text(prop, "Rec Run", "Build record run time code index");
- prop= RNA_def_property(srna, "build_free_run", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "build_free_run", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "build_tc_flags", SEQ_PROXY_TC_FREE_RUN);
RNA_def_property_ui_text(prop, "Free Run", "Build free run time code index");
- prop= RNA_def_property(srna, "build_free_run_rec_date", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "build_free_run_rec_date", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "build_tc_flags", SEQ_PROXY_TC_INTERP_REC_DATE_FREE_RUN);
RNA_def_property_ui_text(prop, "Free Run (Rec Date)", "Build free run time code index using Record Date/Time");
- prop= RNA_def_property(srna, "quality", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "quality", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "quality");
RNA_def_property_ui_text(prop, "Quality", "JPEG Quality of proxies to build");
RNA_def_property_ui_range(prop, 1, 100, 1, 0);
- prop= RNA_def_property(srna, "timecode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "timecode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "tc");
RNA_def_property_enum_items(prop, seq_tc_items);
RNA_def_property_ui_text(prop, "Timecode", "");
@@ -892,32 +892,32 @@ static void rna_def_strip_color_balance(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Sequence Color Balance", "Color balance parameters for a sequence strip");
RNA_def_struct_sdna(srna, "StripColorBalance");
- prop= RNA_def_property(srna, "lift", PROP_FLOAT, PROP_COLOR);
+ prop = RNA_def_property(srna, "lift", PROP_FLOAT, PROP_COLOR);
RNA_def_property_ui_text(prop, "Lift", "Color balance lift (shadows)");
RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_COLOR);
+ prop = RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_COLOR);
RNA_def_property_ui_text(prop, "Gamma", "Color balance gamma (midtones)");
RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "gain", PROP_FLOAT, PROP_COLOR);
+ prop = RNA_def_property(srna, "gain", PROP_FLOAT, PROP_COLOR);
RNA_def_property_ui_text(prop, "Gain", "Color balance gain (highlights)");
RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "invert_gain", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_gain", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_COLOR_BALANCE_INVERSE_GAIN);
RNA_def_property_ui_text(prop, "Inverse Gain", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "invert_gamma", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_gamma", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_COLOR_BALANCE_INVERSE_GAMMA);
RNA_def_property_ui_text(prop, "Inverse Gamma", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "invert_lift", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_lift", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_COLOR_BALANCE_INVERSE_LIFT);
RNA_def_property_ui_text(prop, "Inverse Lift", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
@@ -941,7 +941,7 @@ static void rna_def_sequence(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static const EnumPropertyItem seq_type_items[]= {
+ static const EnumPropertyItem seq_type_items[] = {
{SEQ_IMAGE, "IMAGE", 0, "Image", ""},
{SEQ_META, "META", 0, "Meta", ""},
{SEQ_SCENE, "SCENE", 0, "Scene", ""},
@@ -965,7 +965,7 @@ static void rna_def_sequence(BlenderRNA *brna)
{SEQ_ADJUSTMENT, "ADJUSTMENT", 0, "Adjustment Layer", ""},
{0, NULL, 0, NULL, NULL}};
- static const EnumPropertyItem blend_mode_items[]= {
+ static const EnumPropertyItem blend_mode_items[] = {
{SEQ_BLEND_REPLACE, "REPLACE", 0, "Replace", ""},
{SEQ_CROSS, "CROSS", 0, "Cross", ""},
{SEQ_ADD, "ADD", 0, "Add", ""},
@@ -982,57 +982,57 @@ static void rna_def_sequence(BlenderRNA *brna)
RNA_def_struct_refine_func(srna, "rna_Sequence_refine");
RNA_def_struct_path_func(srna, "rna_Sequence_path");
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_Sequence_name_get", "rna_Sequence_name_length", "rna_Sequence_name_set");
RNA_def_property_string_maxlength(prop, sizeof(((Sequence*)NULL)->name)-2);
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_struct_name_property(srna, prop);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_enum_items(prop, seq_type_items);
RNA_def_property_ui_text(prop, "Type", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- //prop= RNA_def_property(srna, "ipo", PROP_POINTER, PROP_NONE);
- //RNA_def_property_ui_text(prop, "IPO Curves", "IPO curves used by this sequence");
+ /*prop= RNA_def_property(srna, "ipo", PROP_POINTER, PROP_NONE); */
+ /*RNA_def_property_ui_text(prop, "IPO Curves", "IPO curves used by this sequence"); */
/* flags */
- prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT);
RNA_def_property_ui_text(prop, "Select", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER|NA_SELECTED, NULL);
- prop= RNA_def_property(srna, "select_left_handle", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select_left_handle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_LEFTSEL);
RNA_def_property_ui_text(prop, "Left Handle Selected", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER|NA_SELECTED, NULL);
- prop= RNA_def_property(srna, "select_right_handle", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select_right_handle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_RIGHTSEL);
RNA_def_property_ui_text(prop, "Right Handle Selected", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER|NA_SELECTED, NULL);
- prop= RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MUTE);
RNA_def_property_ui_text(prop, "Mute", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_mute_update");
- prop= RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_LOCK);
RNA_def_property_ui_text(prop, "Lock", "Lock strip so that it can't be transformed");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
- prop= RNA_def_property(srna, "waveform", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "waveform", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_AUDIO_DRAW_WAVEFORM);
RNA_def_property_ui_text(prop, "Draw Waveform", "Whether to draw the sound's waveform");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
/* strip positioning */
- prop= RNA_def_property(srna, "frame_final_duration", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_final_duration", PROP_INT, PROP_TIME);
RNA_def_property_range(prop, 1, MAXFRAME);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Length", "The length of the contents of this strip after the handles are applied");
@@ -1040,115 +1040,115 @@ static void rna_def_sequence(BlenderRNA *brna)
RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "frame_duration", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_duration", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "len");
RNA_def_property_clear_flag(prop, PROP_EDITABLE|PROP_ANIMATABLE);
RNA_def_property_range(prop, 1, MAXFRAME);
RNA_def_property_ui_text(prop, "Length", "The length of the contents of this strip before the handles are applied");
- prop= RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "start");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Start Frame", "");
- RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_start_frame_set",NULL); // overlap tests and calc_seq_disp
+ RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_start_frame_set",NULL); /* overlap tests and calc_seq_disp */
RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "frame_final_start", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_final_start", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "startdisp");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Start Frame", "Start frame displayed in the sequence editor after offsets are applied, setting this is equivalent to moving the handle, not the actual start frame");
- RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_start_frame_final_set", NULL); // overlap tests and calc_seq_disp
+ RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_start_frame_final_set", NULL); /* overlap tests and calc_seq_disp */
RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "frame_final_end", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_final_end", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "enddisp");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "End Frame", "End frame displayed in the sequence editor after offsets are applied");
- RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_end_frame_final_set", NULL); // overlap tests and calc_seq_disp
+ RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_end_frame_final_set", NULL); /* overlap tests and calc_seq_disp */
RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "frame_offset_start", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_offset_start", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "startofs");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap tests
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
RNA_def_property_ui_text(prop, "Start Offset", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "frame_offset_end", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_offset_end", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "endofs");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap tests
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
RNA_def_property_ui_text(prop, "End Offset", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "frame_still_start", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_still_start", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "startstill");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap tests
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
RNA_def_property_range(prop, 0, MAXFRAME);
RNA_def_property_ui_text(prop, "Start Still", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "frame_still_end", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame_still_end", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "endstill");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap tests
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
RNA_def_property_range(prop, 0, MAXFRAME);
RNA_def_property_ui_text(prop, "End Still", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "channel", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "channel", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "machine");
RNA_def_property_range(prop, 0, MAXSEQ-1);
RNA_def_property_ui_text(prop, "Channel", "Y position of the sequence strip");
- RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_channel_set",NULL); // overlap test
+ RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_channel_set",NULL); /* overlap test */
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
/* blending */
- prop= RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "blend_mode");
RNA_def_property_enum_items(prop, blend_mode_items);
RNA_def_property_ui_text(prop, "Blend Mode", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "blend_alpha", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "blend_alpha", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Blend Opacity", "");
- RNA_def_property_float_funcs(prop, "rna_Sequence_opacity_get", "rna_Sequence_opacity_set", NULL); // stupid 0-100 -> 0-1
+ RNA_def_property_float_funcs(prop, "rna_Sequence_opacity_get", "rna_Sequence_opacity_set", NULL); /* stupid 0-100 -> 0-1 */
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "effect_fader", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "effect_fader", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_float_sdna(prop, NULL, "effect_fader");
RNA_def_property_ui_text(prop, "Effect fader position", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "use_default_fade", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_default_fade", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_EFFECT_DEFAULT_FADE);
RNA_def_property_ui_text(prop, "Use Default Fade", "Fade effect using the built-in default (usually make transition as long as effect strip)");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "speed_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "speed_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "speed_fader");
RNA_def_property_ui_text(prop, "Speed factor", "Multiply the current speed of the sequence with this number or remap current frame to this frame");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
/* effect strip inputs */
- prop= RNA_def_property(srna, "input_count", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "input_count", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_int_funcs(prop, "rna_Sequence_input_count_get", NULL, NULL);
- prop= RNA_def_property(srna, "input_1", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "input_1", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "seq1");
RNA_def_property_ui_text(prop, "Input 1", "First input for the effect strip");
- prop= RNA_def_property(srna, "input_2", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "input_2", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "seq2");
RNA_def_property_ui_text(prop, "Input 2", "Second input for the effect strip");
- prop= RNA_def_property(srna, "input_3", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "input_3", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "seq1");
RNA_def_property_ui_text(prop, "Input 3", "Third input for the effect strip");
@@ -1165,40 +1165,40 @@ static void rna_def_editor(BlenderRNA *brna)
RNA_def_struct_ui_icon(srna, ICON_SEQUENCE);
RNA_def_struct_sdna(srna, "Editing");
- prop= RNA_def_property(srna, "sequences", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "sequences", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "seqbase", NULL);
RNA_def_property_struct_type(prop, "Sequence");
RNA_def_property_ui_text(prop, "Sequences", "");
- prop= RNA_def_property(srna, "sequences_all", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "sequences_all", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "seqbase", NULL);
RNA_def_property_struct_type(prop, "Sequence");
RNA_def_property_ui_text(prop, "Sequences", "");
RNA_def_property_collection_funcs(prop, "rna_SequenceEditor_sequences_all_begin", "rna_SequenceEditor_sequences_all_next", NULL, NULL, NULL, NULL, NULL, NULL);
- prop= RNA_def_property(srna, "meta_stack", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "meta_stack", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "metastack", NULL);
RNA_def_property_struct_type(prop, "Sequence");
RNA_def_property_ui_text(prop, "Meta Stack", "Meta strip stack, last is currently edited meta strip");
RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, "rna_SequenceEditor_meta_stack_get", NULL, NULL, NULL, NULL);
- prop= RNA_def_property(srna, "active_strip", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active_strip", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "act_seq");
RNA_def_property_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "show_overlay", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_overlay", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "over_flag", SEQ_EDIT_OVERLAY_SHOW);
RNA_def_property_ui_text(prop, "Draw Axes", "Partial overlay on top of the sequencer");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
- prop= RNA_def_property(srna, "overlay_lock", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "overlay_lock", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "over_flag", SEQ_EDIT_OVERLAY_ABS);
RNA_def_property_ui_text(prop, "Overlay Lock", "");
RNA_def_property_boolean_funcs(prop, NULL, "rna_SequenceEditor_overlay_lock_set");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
/* access to fixed and relative frame */
- prop= RNA_def_property(srna, "overlay_frame", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "overlay_frame", PROP_INT, PROP_NONE);
RNA_def_property_ui_text(prop, "Overlay Offset", "");
RNA_def_property_int_funcs(prop, "rna_SequenceEditor_overlay_frame_get", "rna_SequenceEditor_overlay_frame_set", NULL);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
@@ -1209,81 +1209,81 @@ static void rna_def_filter_video(StructRNA *srna)
{
PropertyRNA *prop;
- prop= RNA_def_property(srna, "use_deinterlace", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_deinterlace", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_FILTERY);
RNA_def_property_ui_text(prop, "De-Interlace", "For video movies to remove fields");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update_reopen_files");
- prop= RNA_def_property(srna, "use_premultiply", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_premultiply", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MAKE_PREMUL);
RNA_def_property_ui_text(prop, "Premultiply", "Convert RGB from key alpha to premultiplied alpha");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
- prop= RNA_def_property(srna, "use_flip_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_flip_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_FLIPX);
RNA_def_property_ui_text(prop, "Flip X", "Flip on the X axis");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "use_flip_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_flip_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_FLIPY);
RNA_def_property_ui_text(prop, "Flip Y", "Flip on the Y axis");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "use_float", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_float", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MAKE_FLOAT);
RNA_def_property_ui_text(prop, "Convert Float", "Convert input to float data");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "use_reverse_frames", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_reverse_frames", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_REVERSE_FRAMES);
RNA_def_property_ui_text(prop, "Flip Time", "Reverse frame order");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "color_multiply", PROP_FLOAT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "color_multiply", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "mul");
RNA_def_property_range(prop, 0.0f, 20.0f);
RNA_def_property_ui_text(prop, "Multiply Colors", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "color_saturation", PROP_FLOAT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "color_saturation", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "sat");
RNA_def_property_range(prop, 0.0f, 20.0f);
RNA_def_property_ui_range(prop, 0.0f, 2.0f, 3, 3);
RNA_def_property_ui_text(prop, "Saturation", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "strobe", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "strobe", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 1.0f, 30.0f);
RNA_def_property_ui_text(prop, "Strobe", "Only display every nth frame");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "use_color_balance", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_color_balance", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_COLOR_BALANCE);
RNA_def_property_ui_text(prop, "Use Color Balance", "(3-Way color correction) on input");
RNA_def_property_boolean_funcs(prop, NULL, "rna_Sequence_use_color_balance_set");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "color_balance", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "color_balance", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "strip->color_balance");
RNA_def_property_ui_text(prop, "Color Balance", "");
- prop= RNA_def_property(srna, "use_translation", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_translation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_TRANSFORM);
RNA_def_property_ui_text(prop, "Use Translation", "Translate image before processing");
RNA_def_property_boolean_funcs(prop, NULL, "rna_Sequence_use_translation_set");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "transform", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "transform", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "strip->transform");
RNA_def_property_ui_text(prop, "Transform", "");
- prop= RNA_def_property(srna, "use_crop", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_crop", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_CROP);
RNA_def_property_ui_text(prop, "Use Crop", "Crop image before processing");
RNA_def_property_boolean_funcs(prop, NULL, "rna_Sequence_use_crop_set");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "crop", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "crop", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "strip->crop");
RNA_def_property_ui_text(prop, "Crop", "");
}
@@ -1292,21 +1292,21 @@ static void rna_def_proxy(StructRNA *srna)
{
PropertyRNA *prop;
- prop= RNA_def_property(srna, "use_proxy", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_proxy", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_PROXY);
RNA_def_property_ui_text(prop, "Use Proxy / Timecode", "Use a preview proxy and/or timecode index for this strip");
RNA_def_property_boolean_funcs(prop, NULL, "rna_Sequence_use_proxy_set");
- prop= RNA_def_property(srna, "proxy", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "proxy", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "strip->proxy");
RNA_def_property_ui_text(prop, "Proxy", "");
- prop= RNA_def_property(srna, "use_proxy_custom_directory", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_proxy_custom_directory", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_PROXY_CUSTOM_DIR);
RNA_def_property_ui_text(prop, "Proxy Custom Directory", "Use a custom directory to store data");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "use_proxy_custom_file", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_proxy_custom_file", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_PROXY_CUSTOM_FILE);
RNA_def_property_ui_text(prop, "Proxy Custom File", "Use a custom file to read proxy data from");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
@@ -1316,18 +1316,18 @@ static void rna_def_input(StructRNA *srna)
{
PropertyRNA *prop;
- prop= RNA_def_property(srna, "animation_offset_start", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "animation_offset_start", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "anim_startofs");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_anim_startofs_final_set", NULL); // overlap tests
+ RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_anim_startofs_final_set", NULL); /* overlap tests */
RNA_def_property_ui_text(prop, "Animation Start Offset", "Animation start offset (trim start)");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "animation_offset_end", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "animation_offset_end", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "anim_endofs");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_anim_endofs_final_set", NULL); // overlap tests
+ RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_anim_endofs_final_set", NULL); /* overlap tests */
RNA_def_property_ui_text(prop, "Animation End Offset", "Animation end offset (trim end)");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
}
@@ -1341,12 +1341,12 @@ static void rna_def_image(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Image Sequence", "Sequence strip to load one or more images");
RNA_def_struct_sdna(srna, "Sequence");
- prop= RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
+ prop = RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "strip->dir");
RNA_def_property_ui_text(prop, "Directory", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "strip->stripdata", NULL);
RNA_def_property_struct_type(prop, "SequenceElement");
RNA_def_property_ui_text(prop, "Elements", "");
@@ -1385,12 +1385,12 @@ static void rna_def_scene(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Scene Sequence", "Sequence strip to used the rendered image of a scene");
RNA_def_struct_sdna(srna, "Sequence");
- prop= RNA_def_property(srna, "scene", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "scene", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Scene", "Scene that this sequence uses");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "scene_camera", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "scene_camera", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Camera_object_poll");
RNA_def_property_ui_text(prop, "Camera Override", "Override the scenes active camera");
@@ -1410,25 +1410,25 @@ static void rna_def_movie(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Movie Sequence", "Sequence strip to load a video");
RNA_def_struct_sdna(srna, "Sequence");
- prop= RNA_def_property(srna, "mpeg_preseek", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "mpeg_preseek", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "anim_preseek");
RNA_def_property_range(prop, 0, 50);
RNA_def_property_ui_text(prop, "MPEG Preseek", "For MPEG movies, preseek this many frames");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "stream_index", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "stream_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "streamindex");
RNA_def_property_range(prop, 0, 20);
RNA_def_property_ui_text(prop, "Streamindex", "For files with several movie streams, use the stream with the given index");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update_reopen_files");
- prop= RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "strip->stripdata", NULL);
RNA_def_property_struct_type(prop, "SequenceElement");
RNA_def_property_ui_text(prop, "Elements", "");
RNA_def_property_collection_funcs(prop, "rna_SequenceEditor_elements_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_SequenceEditor_elements_length", NULL, NULL, NULL);
- prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
+ prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_property_ui_text(prop, "File", "");
RNA_def_property_string_funcs(prop, "rna_Sequence_filepath_get", "rna_Sequence_filepath_length",
"rna_Sequence_filepath_set");
@@ -1448,33 +1448,33 @@ static void rna_def_sound(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Sound Sequence", "Sequence strip defining a sound to be played over a period of time");
RNA_def_struct_sdna(srna, "Sequence");
- prop= RNA_def_property(srna, "sound", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "sound", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Sound");
RNA_def_property_ui_text(prop, "Sound", "Sound datablock used by this sequence");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "volume");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Volume", "Playback volume of the sound");
RNA_def_property_float_funcs(prop, NULL, "rna_Sequence_volume_set", NULL);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "pitch", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "pitch", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "pitch");
RNA_def_property_range(prop, 0.1f, 10.0f);
RNA_def_property_ui_text(prop, "Pitch", "Playback pitch of the sound");
RNA_def_property_float_funcs(prop, NULL, "rna_Sequence_pitch_set", NULL);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "pan", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "pan", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "pan");
RNA_def_property_range(prop, -2.0f, 2.0f);
RNA_def_property_ui_text(prop, "Pan", "Playback panning of the sound (only for Mono sources)");
RNA_def_property_float_funcs(prop, NULL, "rna_Sequence_pan_set", NULL);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
+ prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_property_ui_text(prop, "File", "");
RNA_def_property_string_funcs(prop, "rna_Sequence_filepath_get", "rna_Sequence_filepath_length",
"rna_Sequence_filepath_set");
@@ -1504,7 +1504,7 @@ static void rna_def_multicam(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Multicam Select Sequence", "Sequence strip to perform multicam editing: select channel from below");
RNA_def_struct_sdna(srna, "Sequence");
- prop= RNA_def_property(srna, "multicam_source", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "multicam_source", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "multicam_source");
RNA_def_property_range(prop, 0, MAXSEQ-1);
RNA_def_property_ui_text(prop, "Multicam Source Channel", "");
@@ -1518,7 +1518,7 @@ static void rna_def_multicam(BlenderRNA *brna)
static void rna_def_adjustment(BlenderRNA *brna)
{
StructRNA *srna;
-// PropertyRNA *prop;
+/* PropertyRNA *prop; */
srna = RNA_def_struct(brna, "AdjustmentSequence", "Sequence");
RNA_def_struct_ui_text(srna, "Adjustment Layer Sequence", "Sequence strip to perform filter adjustments to layers below");
@@ -1538,7 +1538,7 @@ static void rna_def_plugin(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Plugin Sequence", "Sequence strip applying an effect, loaded from an external plugin");
RNA_def_struct_sdna_from(srna, "PluginSeq", "plugin");
- prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILENAME);
+ prop = RNA_def_property(srna, "filename", PROP_STRING, PROP_FILENAME);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Filename", "");
@@ -1552,7 +1552,7 @@ static void rna_def_wipe(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static const EnumPropertyItem wipe_type_items[]= {
+ static const EnumPropertyItem wipe_type_items[] = {
{0, "SINGLE", 0, "Single", ""},
{1, "DOUBLE", 0, "Double", ""},
/* not used yet {2, "BOX", 0, "Box", ""}, */
@@ -1562,7 +1562,7 @@ static void rna_def_wipe(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static const EnumPropertyItem wipe_direction_items[]= {
+ static const EnumPropertyItem wipe_direction_items[] = {
{0, "OUT", 0, "Out", ""},
{1, "IN", 0, "In", ""},
{0, NULL, 0, NULL, NULL}
@@ -1572,31 +1572,31 @@ static void rna_def_wipe(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Wipe Sequence", "Sequence strip creating a wipe transition");
RNA_def_struct_sdna_from(srna, "WipeVars", "effectdata");
- prop= RNA_def_property(srna, "blur_width", PROP_FLOAT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "blur_width", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "edgeWidth");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Blur Width", "Width of the blur edge, in percentage relative to the image size");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
#if 1 /* expose as radians */
- prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
+ prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_funcs(prop, "rna_WipeSequence_angle_get", "rna_WipeSequence_angle_set", NULL);
RNA_def_property_range(prop, DEG2RAD(-90.0), DEG2RAD(90.0));
#else
- prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "angle");
RNA_def_property_range(prop, -90.0f, 90.0f);
#endif
RNA_def_property_ui_text(prop, "Angle", "Edge angle");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "forward");
RNA_def_property_enum_items(prop, wipe_direction_items);
RNA_def_property_ui_text(prop, "Direction", "Wipe direction");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "transition_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "transition_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "wipetype");
RNA_def_property_enum_items(prop, wipe_type_items);
RNA_def_property_ui_text(prop, "Transition Type", "");
@@ -1612,37 +1612,37 @@ static void rna_def_glow(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Glow Sequence", "Sequence strip creating a glow effect");
RNA_def_struct_sdna_from(srna, "GlowVars", "effectdata");
- prop= RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fMini");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Threshold", "Minimum intensity to trigger a glow");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "clamp", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "clamp", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fClamp");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Clamp", "Brightness limit of intensity");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "boost_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "boost_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fBoost");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Boost Factor", "Brightness multiplier");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "blur_radius", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "blur_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dDist");
RNA_def_property_range(prop, 0.5f, 20.0f);
RNA_def_property_ui_text(prop, "Blur Distance", "Radius of glow effect");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "quality", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "quality", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "dQuality");
RNA_def_property_range(prop, 1, 5);
RNA_def_property_ui_text(prop, "Quality", "Accuracy of the blur effect");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "use_only_boost", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_only_boost", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bNoComp", 0);
RNA_def_property_ui_text(prop, "Only Boost", "Show the glow buffer only");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
@@ -1653,14 +1653,14 @@ static void rna_def_transform(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static const EnumPropertyItem interpolation_items[]= {
+ static const EnumPropertyItem interpolation_items[] = {
{0, "NONE", 0, "None", "No interpolation"},
{1, "BILINEAR", 0, "Bilinear", "Bilinear interpolation"},
{2, "BICUBIC", 0, "Bicubic", "Bicubic interpolation"},
{0, NULL, 0, NULL, NULL}
};
- static const EnumPropertyItem translation_unit_items[]= {
+ static const EnumPropertyItem translation_unit_items[] = {
{0, "PIXELS", 0, "Pixels", ""},
{1, "PERCENT", 0, "Percent", ""},
{0, NULL, 0, NULL, NULL}
@@ -1670,49 +1670,49 @@ static void rna_def_transform(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Transform Sequence", "Sequence strip applying affine transformations to other strips");
RNA_def_struct_sdna_from(srna, "TransformVars", "effectdata");
- prop= RNA_def_property(srna, "scale_start_x", PROP_FLOAT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "scale_start_x", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "ScalexIni");
RNA_def_property_ui_text(prop, "Scale X", "");
RNA_def_property_ui_range(prop, 0, 10, 3, 10);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "scale_start_y", PROP_FLOAT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "scale_start_y", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "ScaleyIni");
RNA_def_property_ui_text(prop, "Scale Y", "");
RNA_def_property_ui_range(prop, 0, 10, 3, 10);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "use_uniform_scale", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_uniform_scale", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uniform_scale", 0);
RNA_def_property_ui_text(prop, "Uniform Scale", "Scale uniformly, preserving aspect ratio");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "translate_start_x", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "translate_start_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xIni");
RNA_def_property_ui_text(prop, "Translate X", "");
RNA_def_property_ui_range(prop, -500.0f, 500.0f, 3, 10);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "translate_start_y", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "translate_start_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yIni");
RNA_def_property_ui_text(prop, "Translate Y", "");
RNA_def_property_ui_range(prop, -500.0f, 500.0f, 3, 10);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "rotation_start", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "rotation_start", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rotIni");
RNA_def_property_range(prop, -360.0f, 360.0f);
RNA_def_property_ui_text(prop, "Rotation", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "translation_unit", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "translation_unit", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "percent");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* not meant to be animated */
RNA_def_property_enum_items(prop, translation_unit_items);
RNA_def_property_ui_text(prop, "Translation Unit", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, interpolation_items);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* not meant to be animated */
RNA_def_property_ui_text(prop, "Interpolation", "");
@@ -1728,7 +1728,7 @@ static void rna_def_solid_color(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Color Sequence", "Sequence strip creating an image filled with a single color");
RNA_def_struct_sdna_from(srna, "SolidColorVars", "effectdata");
- prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
+ prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "col");
RNA_def_property_ui_text(prop, "Color", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
@@ -1743,24 +1743,24 @@ static void rna_def_speed_control(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "SpeedControl Sequence", "Sequence strip to control the speed of other strips");
RNA_def_struct_sdna_from(srna, "SpeedControlVars", "effectdata");
- prop= RNA_def_property(srna, "multiply_speed", PROP_FLOAT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "multiply_speed", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "globalSpeed");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* seq->facf0 is used to animate this */
RNA_def_property_ui_text(prop, "Multiply Speed", "Multiply the resulting speed after the speed factor");
RNA_def_property_ui_range(prop, 0.0f, 100.0f, 1, 0);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "use_as_speed", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_as_speed", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SEQ_SPEED_INTEGRATE);
RNA_def_property_ui_text(prop, "Use as speed", "Interpret the value as speed instead of a frame number");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "use_frame_blend", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_frame_blend", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SEQ_SPEED_BLEND);
RNA_def_property_ui_text(prop, "Frame Blending", "Blend two frames into the target for a smoother result");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "scale_to_length", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "scale_to_length", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SEQ_SPEED_COMPRESS_IPO_Y);
RNA_def_property_ui_text(prop, "Scale to length", "Scale values from 0.0 to 1.0 to target sequence length");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c
index 98eb302b620..899f6a6d32f 100644
--- a/source/blender/makesrna/intern/rna_sequencer_api.c
+++ b/source/blender/makesrna/intern/rna_sequencer_api.c
@@ -51,7 +51,7 @@ static void rna_Sequence_swap_internal(Sequence *seq_self, ReportList *reports,
{
const char *error_msg;
- if(seq_swap(seq_self, seq_other, &error_msg) == 0)
+ if (seq_swap(seq_self, seq_other, &error_msg) == 0)
BKE_report(reports, RPT_ERROR, error_msg);
}
@@ -62,16 +62,16 @@ void RNA_api_sequence_strip(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
- func= RNA_def_function(srna, "getStripElem", "give_stripelem");
+ func = RNA_def_function(srna, "getStripElem", "give_stripelem");
RNA_def_function_ui_description(func, "Return the strip element from a given frame or None");
- parm= RNA_def_int(func, "frame", 0, -MAXFRAME, MAXFRAME, "Frame",
+ parm = RNA_def_int(func, "frame", 0, -MAXFRAME, MAXFRAME, "Frame",
"The frame to get the strip element from", -MAXFRAME, MAXFRAME);
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_function_return(func, RNA_def_pointer(func, "elem", "SequenceElement", "", "strip element of the current frame"));
- func= RNA_def_function(srna, "swap", "rna_Sequence_swap_internal");
+ func = RNA_def_function(srna, "swap", "rna_Sequence_swap_internal");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "other", "Sequence", "Other", "");
+ parm = RNA_def_pointer(func, "other", "Sequence", "Other", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c
index 30db0a300ab..ee1dd52a93f 100644
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@ -68,7 +68,7 @@ static void rna_Smoke_reset(Main *bmain, Scene *scene, PointerRNA *ptr)
smokeModifier_reset(settings->smd);
- if(settings->smd && settings->smd->domain)
+ if (settings->smd && settings->smd->domain)
settings->point_cache[0]->flag |= PTCACHE_OUTDATED;
rna_Smoke_update(bmain, scene, ptr);
@@ -80,7 +80,7 @@ static void rna_Smoke_reset_dependancy(Main *bmain, Scene *scene, PointerRNA *pt
smokeModifier_reset(settings->smd);
- if(settings->smd && settings->smd->domain)
+ if (settings->smd && settings->smd->domain)
settings->smd->domain->point_cache[0]->flag |= PTCACHE_OUTDATED;
rna_Smoke_dependency_update(bmain, scene, ptr);
@@ -89,7 +89,7 @@ static void rna_Smoke_reset_dependancy(Main *bmain, Scene *scene, PointerRNA *pt
static char *rna_SmokeDomainSettings_path(PointerRNA *ptr)
{
SmokeDomainSettings *settings = (SmokeDomainSettings*)ptr->data;
- ModifierData *md= (ModifierData *)settings->smd;
+ ModifierData *md = (ModifierData *)settings->smd;
return BLI_sprintfN("modifiers[\"%s\"].domain_settings", md->name);
}
@@ -97,7 +97,7 @@ static char *rna_SmokeDomainSettings_path(PointerRNA *ptr)
static char *rna_SmokeFlowSettings_path(PointerRNA *ptr)
{
SmokeFlowSettings *settings = (SmokeFlowSettings*)ptr->data;
- ModifierData *md= (ModifierData *)settings->smd;
+ ModifierData *md = (ModifierData *)settings->smd;
return BLI_sprintfN("modifiers[\"%s\"].flow_settings", md->name);
}
@@ -105,7 +105,7 @@ static char *rna_SmokeFlowSettings_path(PointerRNA *ptr)
static char *rna_SmokeCollSettings_path(PointerRNA *ptr)
{
SmokeCollSettings *settings = (SmokeCollSettings*)ptr->data;
- ModifierData *md= (ModifierData *)settings->smd;
+ ModifierData *md = (ModifierData *)settings->smd;
return BLI_sprintfN("modifiers[\"%s\"].coll_settings", md->name);
}
@@ -141,129 +141,129 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "SmokeDomainSettings");
RNA_def_struct_path_func(srna, "rna_SmokeDomainSettings_path");
- prop= RNA_def_property(srna, "resolution_max", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "resolution_max", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "maxres");
RNA_def_property_range(prop, 24, 512);
RNA_def_property_ui_range(prop, 24, 512, 2, 0);
RNA_def_property_ui_text(prop, "Max Res", "Maximal resolution used in the fluid domain");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
- prop= RNA_def_property(srna, "amplify", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "amplify", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "amplify");
RNA_def_property_range(prop, 1, 10);
RNA_def_property_ui_range(prop, 1, 10, 1, 0);
RNA_def_property_ui_text(prop, "Amplification", "Enhance the resolution of smoke by this factor using noise");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
- prop= RNA_def_property(srna, "use_high_resolution", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_high_resolution", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_HIGHRES);
RNA_def_property_ui_text(prop, "High res", "Enable high resolution (using amplification)");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
- prop= RNA_def_property(srna, "show_high_resolution", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_high_resolution", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "viewsettings", MOD_SMOKE_VIEW_SHOWBIG);
RNA_def_property_ui_text(prop, "Show High Resolution", "Show high resolution (using amplification)");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noise");
RNA_def_property_enum_items(prop, prop_noise_type_items);
RNA_def_property_ui_text(prop, "Noise Method", "Noise method which is used for creating the high resolution");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
- prop= RNA_def_property(srna, "alpha", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "alpha", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "alpha");
RNA_def_property_range(prop, -5.0, 5.0);
RNA_def_property_ui_range(prop, -5.0, 5.0, 0.02, 5);
RNA_def_property_ui_text(prop, "Density", "How much density affects smoke motion (higher value results in faster rising smoke)");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
- prop= RNA_def_property(srna, "beta", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "beta", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "beta");
RNA_def_property_range(prop, -5.0, 5.0);
RNA_def_property_ui_range(prop, -5.0, 5.0, 0.02, 5);
RNA_def_property_ui_text(prop, "Heat", "How much heat affects smoke motion (higher value results in faster rising smoke)");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
- prop= RNA_def_property(srna, "collision_group", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "collision_group", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "coll_group");
RNA_def_property_struct_type(prop, "Group");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Collision Group", "Limit collisions to this group");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset_dependancy");
- prop= RNA_def_property(srna, "fluid_group", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "fluid_group", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "fluid_group");
RNA_def_property_struct_type(prop, "Group");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Fluid Group", "Limit fluid objects to this group");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset_dependancy");
- prop= RNA_def_property(srna, "effector_group", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "effector_group", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "eff_group");
RNA_def_property_struct_type(prop, "Group");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Effector Group", "Limit effectors to this group");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset_dependancy");
- prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "strength");
RNA_def_property_range(prop, 0.0, 10.0);
RNA_def_property_ui_range(prop, 0.0, 10.0, 1, 2);
RNA_def_property_ui_text(prop, "Strength", "Strength of noise");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
- prop= RNA_def_property(srna, "dissolve_speed", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "dissolve_speed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "diss_speed");
RNA_def_property_range(prop, 1.0, 10000.0);
RNA_def_property_ui_range(prop, 1.0, 10000.0, 1, 0);
RNA_def_property_ui_text(prop, "Dissolve Speed", "Dissolve Speed");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
- prop= RNA_def_property(srna, "use_dissolve_smoke", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_dissolve_smoke", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_DISSOLVE);
RNA_def_property_ui_text(prop, "Dissolve Smoke", "Enable smoke to disappear over time");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
- prop= RNA_def_property(srna, "use_dissolve_smoke_log", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_dissolve_smoke_log", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_DISSOLVE_LOG);
RNA_def_property_ui_text(prop, "Logarithmic dissolve", "Using 1/x ");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
- prop= RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "point_cache[0]");
RNA_def_property_ui_text(prop, "Point Cache", "");
- prop= RNA_def_property(srna, "point_cache_compress_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "point_cache_compress_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "cache_comp");
RNA_def_property_enum_items(prop, smoke_cache_comp_items);
RNA_def_property_ui_text(prop, "Cache Compression", "Compression method to be used");
- prop= RNA_def_property(srna, "collision_extents", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "collision_extents", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "border_collisions");
RNA_def_property_enum_items(prop, smoke_domain_colli_items);
RNA_def_property_ui_text(prop, "Border Collisions", "Select which domain border will be treated as collision object");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
- prop= RNA_def_property(srna, "effector_weights", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "effector_weights", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "EffectorWeights");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Effector Weights", "");
- prop= RNA_def_property(srna, "smooth_emitter", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "smooth_emitter", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_HIGH_SMOOTH);
RNA_def_property_ui_text(prop, "Smooth Emitter", "Smoothen emitted smoke to avoid blockiness");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
- prop= RNA_def_property(srna, "time_scale", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "time_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "time_scale");
RNA_def_property_range(prop, 0.2, 1.5);
RNA_def_property_ui_range(prop, 0.2, 1.5, 0.02, 5);
RNA_def_property_ui_text(prop, "Time Scale", "Adjust simulation speed");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
- prop= RNA_def_property(srna, "vorticity", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "vorticity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "vorticity");
RNA_def_property_range(prop, 0.01, 4.0);
RNA_def_property_ui_range(prop, 0.01, 4.0, 0.02, 5);
@@ -282,43 +282,43 @@ static void rna_def_smoke_flow_settings(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "SmokeFlowSettings");
RNA_def_struct_path_func(srna, "rna_SmokeFlowSettings_path");
- prop= RNA_def_property(srna, "density", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "density", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "density");
RNA_def_property_range(prop, 0.001, 1);
RNA_def_property_ui_range(prop, 0.001, 1.0, 1.0, 4);
RNA_def_property_ui_text(prop, "Density", "");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
- prop= RNA_def_property(srna, "temperature", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "temperature", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "temp");
RNA_def_property_range(prop, -10, 10);
RNA_def_property_ui_range(prop, -10, 10, 1, 1);
RNA_def_property_ui_text(prop, "Temp. Diff.", "Temperature difference to ambient temperature");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
- prop= RNA_def_property(srna, "particle_system", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "particle_system", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "psys");
RNA_def_property_struct_type(prop, "ParticleSystem");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Particle Systems", "Particle systems emitted from the object");
RNA_def_property_update(prop, 0, "rna_Smoke_reset_dependancy");
- prop= RNA_def_property(srna, "use_outflow", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_outflow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "type", MOD_SMOKE_FLOW_TYPE_OUTFLOW);
RNA_def_property_ui_text(prop, "Outflow", "Delete smoke from simulation");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
- prop= RNA_def_property(srna, "use_absolute", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_absolute", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_FLOW_ABSOLUTE);
RNA_def_property_ui_text(prop, "Absolute Density", "Only allow given density value in emitter area");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
- prop= RNA_def_property(srna, "initial_velocity", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "initial_velocity", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_FLOW_INITVELOCITY);
RNA_def_property_ui_text(prop, "Initial Velocity", "Smoke inherits its velocity from the emitter particle");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
- prop= RNA_def_property(srna, "velocity_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "velocity_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "vel_multi");
RNA_def_property_range(prop, -2.0, 2.0);
RNA_def_property_ui_range(prop, -2.0, 2.0, 0.05, 5);
diff --git a/source/blender/makesrna/intern/rna_sound.c b/source/blender/makesrna/intern/rna_sound.c
index f5984d2f940..866b4787a9c 100644
--- a/source/blender/makesrna/intern/rna_sound.c
+++ b/source/blender/makesrna/intern/rna_sound.c
@@ -53,7 +53,7 @@ static int rna_Sound_caching_get(PointerRNA *ptr)
static void rna_Sound_caching_set(PointerRNA *ptr, const int value)
{
bSound *sound = (bSound*)(ptr->data);
- if(value)
+ if (value)
sound_cache(sound);
else
sound_delete_cache(sound);
@@ -71,28 +71,28 @@ static void rna_def_sound(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Sound", "ID");
+ srna = RNA_def_struct(brna, "Sound", "ID");
RNA_def_struct_sdna(srna, "bSound");
RNA_def_struct_ui_text(srna, "Sound", "Sound datablock referencing an external or packed sound file");
RNA_def_struct_ui_icon(srna, ICON_SOUND);
- //rna_def_ipo_common(srna);
+ /*rna_def_ipo_common(srna); */
- prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
+ prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "File Path", "Sound sample file used by this Sound datablock");
RNA_def_property_update(prop, 0, "rna_Sound_update");
- prop= RNA_def_property(srna, "packed_file", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "packed_file", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "packedfile");
RNA_def_property_ui_text(prop, "Packed File", "");
- prop= RNA_def_property(srna, "use_memory_cache", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_memory_cache", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_Sound_caching_get", "rna_Sound_caching_set");
RNA_def_property_ui_text(prop, "Caching", "The sound file is decoded and loaded into RAM");
RNA_def_property_update(prop, 0, "rna_Sound_caching_update");
- prop= RNA_def_property(srna, "use_mono", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_mono", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SOUND_FLAGS_MONO);
RNA_def_property_ui_text(prop, "Mono", "If the file contains multiple audio channels they are rendered to a single one");
RNA_def_property_update(prop, 0, "rna_Sound_update");
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 648dbc0e8d0..bf4814d8d0d 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -136,9 +136,9 @@ EnumPropertyItem viewport_shade_items[] = {
static StructRNA* rna_Space_refine(struct PointerRNA *ptr)
{
- SpaceLink *space= (SpaceLink*)ptr->data;
+ SpaceLink *space = (SpaceLink*)ptr->data;
- switch(space->spacetype) {
+ switch (space->spacetype) {
case SPACE_VIEW3D:
return &RNA_SpaceView3D;
case SPACE_IPO:
@@ -181,11 +181,11 @@ static StructRNA* rna_Space_refine(struct PointerRNA *ptr)
static ScrArea *rna_area_from_space(PointerRNA *ptr)
{
bScreen *sc = (bScreen*)ptr->id.data;
- SpaceLink *link= (SpaceLink*)ptr->data;
+ SpaceLink *link = (SpaceLink*)ptr->data;
ScrArea *sa;
- for(sa=sc->areabase.first; sa; sa=sa->next)
- if(BLI_findindex(&sa->spacedata, link) != -1)
+ for (sa = sc->areabase.first; sa; sa = sa->next)
+ if (BLI_findindex(&sa->spacedata, link) != -1)
return sa;
return NULL;
@@ -196,14 +196,14 @@ static void area_region_from_regiondata(bScreen *sc, void *regiondata, ScrArea *
ScrArea *sa;
ARegion *ar;
- *r_sa= NULL;
- *r_ar= NULL;
+ *r_sa = NULL;
+ *r_ar = NULL;
- for(sa=sc->areabase.first; sa; sa=sa->next) {
- for(ar=sa->regionbase.first; ar; ar=ar->next) {
- if(ar->regiondata == regiondata) {
- *r_sa= sa;
- *r_ar= ar;
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
+ for (ar = sa->regionbase.first; ar; ar = ar->next) {
+ if (ar->regiondata == regiondata) {
+ *r_sa = sa;
+ *r_ar = ar;
return;
}
}
@@ -221,7 +221,7 @@ static void rna_area_region_from_regiondata(PointerRNA *ptr, ScrArea **r_sa, ARe
static PointerRNA rna_CurrentOrientation_get(PointerRNA *ptr)
{
Scene *scene = ((bScreen*)ptr->id.data)->scene;
- View3D *v3d= (View3D*)ptr->data;
+ View3D *v3d = (View3D*)ptr->data;
if (v3d->twmode < V3D_MANIP_CUSTOM)
return rna_pointer_inherit_refine(ptr, &RNA_TransformOrientation, NULL);
@@ -234,10 +234,10 @@ EnumPropertyItem *rna_TransformOrientation_itemf(bContext *C, PointerRNA *ptr, P
{
Scene *scene = NULL;
ListBase *transform_spaces;
- TransformOrientation *ts= NULL;
+ TransformOrientation *ts = NULL;
EnumPropertyItem tmp = {0, "", 0, "", ""};
- EnumPropertyItem *item= NULL;
- int i = V3D_MANIP_CUSTOM, totitem= 0;
+ EnumPropertyItem *item = NULL;
+ int i = V3D_MANIP_CUSTOM, totitem = 0;
RNA_enum_items_add_value(&item, &totitem, transform_orientation_items, V3D_MANIP_GLOBAL);
RNA_enum_items_add_value(&item, &totitem, transform_orientation_items, V3D_MANIP_NORMAL);
@@ -250,25 +250,25 @@ EnumPropertyItem *rna_TransformOrientation_itemf(bContext *C, PointerRNA *ptr, P
else
scene = CTX_data_scene(C); /* can't use scene from ptr->id.data because that enum is also used by operators */
- if(scene) {
+ if (scene) {
transform_spaces = &scene->transform_spaces;
ts = transform_spaces->first;
}
- if(ts)
+ if (ts)
{
RNA_enum_item_add_separator(&item, &totitem);
- for(; ts; ts = ts->next) {
+ for (; ts; ts = ts->next) {
tmp.identifier = ts->name;
- tmp.name= ts->name;
+ tmp.name = ts->name;
tmp.value = i++;
RNA_enum_item_add(&item, &totitem, &tmp);
}
}
RNA_enum_item_end(&item, &totitem);
- *free= 1;
+ *free = 1;
return item;
}
@@ -276,32 +276,32 @@ EnumPropertyItem *rna_TransformOrientation_itemf(bContext *C, PointerRNA *ptr, P
/* Space 3D View */
static void rna_SpaceView3D_lock_camera_and_layers_set(PointerRNA *ptr, int value)
{
- View3D *v3d= (View3D*)(ptr->data);
- bScreen *sc= (bScreen*)ptr->id.data;
+ View3D *v3d = (View3D*)(ptr->data);
+ bScreen *sc = (bScreen*)ptr->id.data;
v3d->scenelock = value;
- if(value) {
+ if (value) {
int bit;
- v3d->lay= sc->scene->lay;
+ v3d->lay = sc->scene->lay;
/* seek for layact */
- bit= 0;
- while(bit<32) {
- if(v3d->lay & (1<<bit)) {
- v3d->layact= 1<<bit;
+ bit = 0;
+ while (bit<32) {
+ if (v3d->lay & (1<<bit)) {
+ v3d->layact = 1<<bit;
break;
}
bit++;
}
- v3d->camera= sc->scene->camera;
+ v3d->camera = sc->scene->camera;
}
}
static void rna_View3D_CursorLocation_get(PointerRNA *ptr, float *values)
{
- View3D *v3d= (View3D*)(ptr->data);
- bScreen *sc= (bScreen*)ptr->id.data;
- Scene *scene= (Scene *)sc->scene;
+ View3D *v3d = (View3D*)(ptr->data);
+ bScreen *sc = (bScreen*)ptr->id.data;
+ Scene *scene = (Scene *)sc->scene;
float *loc = give_cursor(scene, v3d);
copy_v3_v3(values, loc);
@@ -309,9 +309,9 @@ static void rna_View3D_CursorLocation_get(PointerRNA *ptr, float *values)
static void rna_View3D_CursorLocation_set(PointerRNA *ptr, const float *values)
{
- View3D *v3d= (View3D*)(ptr->data);
- bScreen *sc= (bScreen*)ptr->id.data;
- Scene *scene= (Scene *)sc->scene;
+ View3D *v3d = (View3D*)(ptr->data);
+ bScreen *sc = (bScreen*)ptr->id.data;
+ Scene *scene = (Scene *)sc->scene;
float *cursor = give_cursor(scene, v3d);
copy_v3_v3(cursor, values);
@@ -319,9 +319,9 @@ static void rna_View3D_CursorLocation_set(PointerRNA *ptr, const float *values)
static void rna_SpaceView3D_layer_set(PointerRNA *ptr, const int *values)
{
- View3D *v3d= (View3D*)(ptr->data);
+ View3D *v3d = (View3D*)(ptr->data);
- v3d->lay= ED_view3d_scene_layer_set(v3d->lay, values, &v3d->layact);
+ v3d->lay = ED_view3d_scene_layer_set(v3d->lay, values, &v3d->layact);
}
static void rna_SpaceView3D_layer_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
@@ -331,18 +331,18 @@ static void rna_SpaceView3D_layer_update(Main *bmain, Scene *UNUSED(scene), Poin
static void rna_SpaceView3D_viewport_shade_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- View3D *v3d= (View3D*)(ptr->data);
- ScrArea *sa= rna_area_from_space(ptr);
+ View3D *v3d = (View3D*)(ptr->data);
+ ScrArea *sa = rna_area_from_space(ptr);
- if(v3d->drawtype != OB_RENDER) {
+ if (v3d->drawtype != OB_RENDER) {
ARegion *ar;
- for(ar=sa->regionbase.first; ar; ar=ar->next) {
+ for (ar = sa->regionbase.first; ar; ar = ar->next) {
RegionView3D *rv3d = ar->regiondata;
- if(rv3d && rv3d->render_engine) {
+ if (rv3d && rv3d->render_engine) {
RE_engine_free(rv3d->render_engine);
- rv3d->render_engine= NULL;
+ rv3d->render_engine = NULL;
}
}
}
@@ -351,20 +351,20 @@ static void rna_SpaceView3D_viewport_shade_update(Main *UNUSED(bmain), Scene *UN
static void rna_SpaceView3D_pivot_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
if (U.uiflag & USER_LOCKAROUND) {
- View3D *v3d_act= (View3D*)(ptr->data);
+ View3D *v3d_act = (View3D*)(ptr->data);
/* TODO, space looper */
bScreen *screen;
- for(screen= bmain->screen.first; screen; screen= screen->id.next) {
+ for (screen = bmain->screen.first; screen; screen = screen->id.next) {
ScrArea *sa;
- for(sa= screen->areabase.first; sa; sa= sa->next) {
+ for (sa = screen->areabase.first; sa; sa = sa->next) {
SpaceLink *sl;
- for(sl= sa->spacedata.first; sl ;sl= sl->next) {
- if(sl->spacetype==SPACE_VIEW3D) {
- View3D *v3d= (View3D *)sl;
+ for (sl = sa->spacedata.first; sl ;sl = sl->next) {
+ if (sl->spacetype == SPACE_VIEW3D) {
+ View3D *v3d = (View3D *)sl;
if (v3d != v3d_act) {
- v3d->around= v3d_act->around;
- v3d->flag= (v3d->flag & ~V3D_ALIGN) | (v3d_act->flag & V3D_ALIGN);
+ v3d->around = v3d_act->around;
+ v3d->flag = (v3d->flag & ~V3D_ALIGN) | (v3d_act->flag & V3D_ALIGN);
ED_area_tag_redraw_regiontype(sa, RGN_TYPE_HEADER);
}
}
@@ -376,13 +376,13 @@ static void rna_SpaceView3D_pivot_update(Main *bmain, Scene *UNUSED(scene), Poin
static PointerRNA rna_SpaceView3D_region_3d_get(PointerRNA *ptr)
{
- View3D *v3d= (View3D*)(ptr->data);
- ScrArea *sa= rna_area_from_space(ptr);
- void *regiondata= NULL;
- if(sa) {
- ListBase *regionbase= (sa->spacedata.first == v3d)? &sa->regionbase: &v3d->regionbase;
- ARegion *ar= regionbase->last; /* always last in list, weak .. */
- regiondata= ar->regiondata;
+ View3D *v3d = (View3D*)(ptr->data);
+ ScrArea *sa = rna_area_from_space(ptr);
+ void *regiondata = NULL;
+ if (sa) {
+ ListBase *regionbase = (sa->spacedata.first == v3d)? &sa->regionbase: &v3d->regionbase;
+ ARegion *ar = regionbase->last; /* always last in list, weak .. */
+ regiondata = ar->regiondata;
}
return rna_pointer_inherit_refine(ptr, &RNA_RegionView3D, regiondata);
@@ -390,16 +390,16 @@ static PointerRNA rna_SpaceView3D_region_3d_get(PointerRNA *ptr)
static PointerRNA rna_SpaceView3D_region_quadview_get(PointerRNA *ptr)
{
- View3D *v3d= (View3D*)(ptr->data);
- ScrArea *sa= rna_area_from_space(ptr);
- void *regiondata= NULL;
- if(sa) {
- ListBase *regionbase= (sa->spacedata.first == v3d)? &sa->regionbase: &v3d->regionbase;
- ARegion *ar= regionbase->last; /* always before last in list, weak .. */
+ View3D *v3d = (View3D*)(ptr->data);
+ ScrArea *sa = rna_area_from_space(ptr);
+ void *regiondata = NULL;
+ if (sa) {
+ ListBase *regionbase = (sa->spacedata.first == v3d)? &sa->regionbase: &v3d->regionbase;
+ ARegion *ar = regionbase->last; /* always before last in list, weak .. */
- ar= (ar->alignment == RGN_ALIGN_QSPLIT)? ar->prev: NULL;
- if(ar) {
- regiondata= ar->regiondata;
+ ar = (ar->alignment == RGN_ALIGN_QSPLIT)? ar->prev: NULL;
+ if (ar) {
+ regiondata = ar->regiondata;
}
}
@@ -412,7 +412,7 @@ static void rna_RegionView3D_quadview_update(Main *UNUSED(main), Scene *UNUSED(s
ARegion *ar;
rna_area_region_from_regiondata(ptr, &sa, &ar);
- if(sa && ar && ar->alignment==RGN_ALIGN_QSPLIT)
+ if (sa && ar && ar->alignment == RGN_ALIGN_QSPLIT)
ED_view3d_quadview_update(sa, ar, FALSE);
}
@@ -423,37 +423,37 @@ static void rna_RegionView3D_quadview_clip_update(Main *UNUSED(main), Scene *UNU
ARegion *ar;
rna_area_region_from_regiondata(ptr, &sa, &ar);
- if(sa && ar && ar->alignment==RGN_ALIGN_QSPLIT)
+ if (sa && ar && ar->alignment == RGN_ALIGN_QSPLIT)
ED_view3d_quadview_update(sa, ar, TRUE);
}
static void rna_RegionView3D_view_location_get(PointerRNA *ptr, float *values)
{
- RegionView3D *rv3d= (RegionView3D *)(ptr->data);
+ RegionView3D *rv3d = (RegionView3D *)(ptr->data);
negate_v3_v3(values, rv3d->ofs);
}
static void rna_RegionView3D_view_location_set(PointerRNA *ptr, const float *values)
{
- RegionView3D *rv3d= (RegionView3D *)(ptr->data);
+ RegionView3D *rv3d = (RegionView3D *)(ptr->data);
negate_v3_v3(rv3d->ofs, values);
}
static void rna_RegionView3D_view_rotation_get(PointerRNA *ptr, float *values)
{
- RegionView3D *rv3d= (RegionView3D *)(ptr->data);
+ RegionView3D *rv3d = (RegionView3D *)(ptr->data);
invert_qt_qt(values, rv3d->viewquat);
}
static void rna_RegionView3D_view_rotation_set(PointerRNA *ptr, const float *values)
{
- RegionView3D *rv3d= (RegionView3D *)(ptr->data);
+ RegionView3D *rv3d = (RegionView3D *)(ptr->data);
invert_qt_qt(rv3d->viewquat, values);
}
static void rna_RegionView3D_view_matrix_set(PointerRNA *ptr, const float *values)
{
- RegionView3D *rv3d= (RegionView3D *)(ptr->data);
+ RegionView3D *rv3d = (RegionView3D *)(ptr->data);
negate_v3_v3(rv3d->ofs, values);
ED_view3d_from_m4((float (*)[4])values, rv3d->ofs, rv3d->viewquat, &rv3d->dist);
}
@@ -482,22 +482,22 @@ static EnumPropertyItem *rna_SpaceView3D_viewport_shade_itemf(bContext *UNUSED(C
Scene *scene = ((bScreen*)ptr->id.data)->scene;
RenderEngineType *type = RE_engines_find(scene->r.engine);
- EnumPropertyItem *item= NULL;
- int totitem= 0;
+ EnumPropertyItem *item = NULL;
+ int totitem = 0;
RNA_enum_items_add_value(&item, &totitem, viewport_shade_items, OB_BOUNDBOX);
RNA_enum_items_add_value(&item, &totitem, viewport_shade_items, OB_WIRE);
RNA_enum_items_add_value(&item, &totitem, viewport_shade_items, OB_SOLID);
RNA_enum_items_add_value(&item, &totitem, viewport_shade_items, OB_TEXTURE);
- if(scene_use_new_shading_nodes(scene))
+ if (scene_use_new_shading_nodes(scene))
RNA_enum_items_add_value(&item, &totitem, viewport_shade_items, OB_MATERIAL);
- if(type->view_draw)
+ if (type->view_draw)
RNA_enum_items_add_value(&item, &totitem, viewport_shade_items, OB_RENDER);
RNA_enum_item_end(&item, &totitem);
- *free= 1;
+ *free = 1;
return item;
}
@@ -518,27 +518,27 @@ static void rna_SpaceImageEditor_paint_update(Main *bmain, Scene *scene, Pointer
static int rna_SpaceImageEditor_show_render_get(PointerRNA *ptr)
{
- SpaceImage *sima= (SpaceImage*)(ptr->data);
+ SpaceImage *sima = (SpaceImage*)(ptr->data);
return ED_space_image_show_render(sima);
}
static int rna_SpaceImageEditor_show_paint_get(PointerRNA *ptr)
{
- SpaceImage *sima= (SpaceImage*)(ptr->data);
+ SpaceImage *sima = (SpaceImage*)(ptr->data);
return ED_space_image_show_paint(sima);
}
static int rna_SpaceImageEditor_show_uvedit_get(PointerRNA *ptr)
{
- SpaceImage *sima= (SpaceImage*)(ptr->data);
- bScreen *sc= (bScreen*)ptr->id.data;
+ SpaceImage *sima = (SpaceImage*)(ptr->data);
+ bScreen *sc = (bScreen*)ptr->id.data;
return ED_space_image_show_uvedit(sima, sc->scene->obedit);
}
static void rna_SpaceImageEditor_image_set(PointerRNA *ptr, PointerRNA value)
{
- SpaceImage *sima= (SpaceImage*)(ptr->data);
- bScreen *sc= (bScreen*)ptr->id.data;
+ SpaceImage *sima = (SpaceImage*)(ptr->data);
+ bScreen *sc = (bScreen*)ptr->id.data;
ED_space_image_set(sima, sc->scene, sc->scene->obedit, (Image*)value.data);
}
@@ -546,57 +546,57 @@ static void rna_SpaceImageEditor_image_set(PointerRNA *ptr, PointerRNA value)
static EnumPropertyItem *rna_SpaceImageEditor_draw_channels_itemf(bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), int *free)
{
- SpaceImage *sima= (SpaceImage*)ptr->data;
- EnumPropertyItem *item= NULL;
+ SpaceImage *sima = (SpaceImage*)ptr->data;
+ EnumPropertyItem *item = NULL;
ImBuf *ibuf;
void *lock;
- int zbuf, alpha, totitem= 0;
+ int zbuf, alpha, totitem = 0;
- ibuf= ED_space_image_acquire_buffer(sima, &lock);
+ ibuf = ED_space_image_acquire_buffer(sima, &lock);
- alpha= ibuf && (ibuf->channels == 4);
- zbuf= ibuf && (ibuf->zbuf || ibuf->zbuf_float || (ibuf->channels==1));
+ alpha = ibuf && (ibuf->channels == 4);
+ zbuf = ibuf && (ibuf->zbuf || ibuf->zbuf_float || (ibuf->channels == 1));
ED_space_image_release_buffer(sima, lock);
- if(alpha && zbuf)
+ if (alpha && zbuf)
return draw_channels_items;
RNA_enum_items_add_value(&item, &totitem, draw_channels_items, 0);
- if(alpha) {
+ if (alpha) {
RNA_enum_items_add_value(&item, &totitem, draw_channels_items, SI_USE_ALPHA);
RNA_enum_items_add_value(&item, &totitem, draw_channels_items, SI_SHOW_ALPHA);
}
- else if(zbuf) {
+ else if (zbuf) {
RNA_enum_items_add_value(&item, &totitem, draw_channels_items, SI_SHOW_ZBUF);
}
RNA_enum_item_end(&item, &totitem);
- *free= 1;
+ *free = 1;
return item;
}
static void rna_SpaceImageEditor_zoom_get(PointerRNA *ptr, float *values)
{
- SpaceImage *sima= (SpaceImage*)ptr->data;
+ SpaceImage *sima = (SpaceImage*)ptr->data;
ScrArea *sa;
ARegion *ar;
values[0] = values[1] = 1;
/* find aregion */
- sa= rna_area_from_space(ptr); /* can be NULL */
- ar= BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
- if(ar) {
+ sa = rna_area_from_space(ptr); /* can be NULL */
+ ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
+ if (ar) {
ED_space_image_zoom(sima, ar, &values[0], &values[1]);
}
}
static void rna_SpaceImageEditor_cursor_location_get(PointerRNA *ptr, float *values)
{
- SpaceImage *sima= (SpaceImage*)ptr->data;
+ SpaceImage *sima = (SpaceImage*)ptr->data;
if (sima->flag & SI_COORDFLOATS) {
copy_v2_v2(values, sima->cursor);
@@ -611,7 +611,7 @@ static void rna_SpaceImageEditor_cursor_location_get(PointerRNA *ptr, float *val
static void rna_SpaceImageEditor_cursor_location_set(PointerRNA *ptr, const float *values)
{
- SpaceImage *sima= (SpaceImage*)ptr->data;
+ SpaceImage *sima = (SpaceImage*)ptr->data;
if (sima->flag & SI_COORDFLOATS) {
copy_v2_v2(sima->cursor, values);
@@ -626,12 +626,12 @@ static void rna_SpaceImageEditor_cursor_location_set(PointerRNA *ptr, const floa
static void rna_SpaceImageEditor_curves_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- SpaceImage *sima= (SpaceImage*)ptr->data;
+ SpaceImage *sima = (SpaceImage*)ptr->data;
ImBuf *ibuf;
void *lock;
- ibuf= ED_space_image_acquire_buffer(sima, &lock);
- if(ibuf->rect_float)
+ ibuf = ED_space_image_acquire_buffer(sima, &lock);
+ if (ibuf->rect_float)
curvemapping_do_ibuf(sima->cumap, ibuf);
ED_space_image_release_buffer(sima, lock);
@@ -640,12 +640,12 @@ static void rna_SpaceImageEditor_curves_update(Main *UNUSED(bmain), Scene *UNUSE
static void rna_SpaceImageEditor_scopes_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
{
- SpaceImage *sima= (SpaceImage*)ptr->data;
+ SpaceImage *sima = (SpaceImage*)ptr->data;
ImBuf *ibuf;
void *lock;
- ibuf= ED_space_image_acquire_buffer(sima, &lock);
- if(ibuf) {
+ ibuf = ED_space_image_acquire_buffer(sima, &lock);
+ if (ibuf) {
scopes_update(&sima->scopes, ibuf, scene->r.color_mgt_flag & R_COLOR_MANAGEMENT);
WM_main_add_notifier(NC_IMAGE, sima->image);
}
@@ -656,26 +656,26 @@ static void rna_SpaceImageEditor_scopes_update(Main *UNUSED(bmain), Scene *scene
static void rna_SpaceTextEditor_word_wrap_set(PointerRNA *ptr, int value)
{
- SpaceText *st= (SpaceText*)(ptr->data);
+ SpaceText *st = (SpaceText*)(ptr->data);
- st->wordwrap= value;
- st->left= 0;
+ st->wordwrap = value;
+ st->left = 0;
}
static void rna_SpaceTextEditor_text_set(PointerRNA *ptr, PointerRNA value)
{
- SpaceText *st= (SpaceText*)(ptr->data);
+ SpaceText *st = (SpaceText*)(ptr->data);
- st->text= value.data;
+ st->text = value.data;
WM_main_add_notifier(NC_TEXT|NA_SELECTED, st->text);
}
static void rna_SpaceTextEditor_updateEdited(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- SpaceText *st= (SpaceText*)ptr->data;
+ SpaceText *st = (SpaceText*)ptr->data;
- if(st->text)
+ if (st->text)
WM_main_add_notifier(NC_TEXT|NA_EDITED, st->text);
}
@@ -685,15 +685,15 @@ static void rna_SpaceTextEditor_updateEdited(Main *UNUSED(bmain), Scene *UNUSED(
/* note: this function exists only to avoid id refcounting */
static void rna_SpaceProperties_pin_id_set(PointerRNA *ptr, PointerRNA value)
{
- SpaceButs *sbuts= (SpaceButs*)(ptr->data);
- sbuts->pinid= value.data;
+ SpaceButs *sbuts = (SpaceButs*)(ptr->data);
+ sbuts->pinid = value.data;
}
static StructRNA *rna_SpaceProperties_pin_id_typef(PointerRNA *ptr)
{
- SpaceButs *sbuts= (SpaceButs*)(ptr->data);
+ SpaceButs *sbuts = (SpaceButs*)(ptr->data);
- if(sbuts->pinid)
+ if (sbuts->pinid)
return ID_code_to_RNA_type(GS(sbuts->pinid->name));
return &RNA_ID;
@@ -701,7 +701,7 @@ static StructRNA *rna_SpaceProperties_pin_id_typef(PointerRNA *ptr)
static void rna_SpaceProperties_pin_id_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- SpaceButs *sbuts= (SpaceButs*)(ptr->data);
+ SpaceButs *sbuts = (SpaceButs*)(ptr->data);
ID *id = sbuts->pinid;
if (id == NULL) {
@@ -728,68 +728,68 @@ static void rna_SpaceProperties_pin_id_update(Main *UNUSED(bmain), Scene *UNUSED
static void rna_SpaceProperties_context_set(PointerRNA *ptr, int value)
{
- SpaceButs *sbuts= (SpaceButs*)(ptr->data);
+ SpaceButs *sbuts = (SpaceButs*)(ptr->data);
- sbuts->mainb= value;
+ sbuts->mainb = value;
sbuts->mainbuser = value;
}
static void rna_SpaceProperties_align_set(PointerRNA *ptr, int value)
{
- SpaceButs *sbuts= (SpaceButs*)(ptr->data);
+ SpaceButs *sbuts = (SpaceButs*)(ptr->data);
- sbuts->align= value;
- sbuts->re_align= 1;
+ sbuts->align = value;
+ sbuts->re_align = 1;
}
/* Space Console */
static void rna_ConsoleLine_body_get(PointerRNA *ptr, char *value)
{
- ConsoleLine *ci= (ConsoleLine*)ptr->data;
+ ConsoleLine *ci = (ConsoleLine*)ptr->data;
strcpy(value, ci->line);
}
static int rna_ConsoleLine_body_length(PointerRNA *ptr)
{
- ConsoleLine *ci= (ConsoleLine*)ptr->data;
+ ConsoleLine *ci = (ConsoleLine*)ptr->data;
return ci->len;
}
static void rna_ConsoleLine_body_set(PointerRNA *ptr, const char *value)
{
- ConsoleLine *ci= (ConsoleLine*)ptr->data;
- int len= strlen(value);
+ ConsoleLine *ci = (ConsoleLine*)ptr->data;
+ int len = strlen(value);
- if((len >= ci->len_alloc) || (len * 2 < ci->len_alloc) ) { /* allocate a new string */
+ if ((len >= ci->len_alloc) || (len * 2 < ci->len_alloc) ) { /* allocate a new string */
MEM_freeN(ci->line);
- ci->line= MEM_mallocN((len + 1) * sizeof(char), "rna_consoleline");
- ci->len_alloc= len + 1;
+ ci->line = MEM_mallocN((len + 1) * sizeof(char), "rna_consoleline");
+ ci->len_alloc = len + 1;
}
memcpy(ci->line, value, len + 1);
- ci->len= len;
+ ci->len = len;
- if(ci->cursor > len) /* clamp the cursor */
- ci->cursor= len;
+ if (ci->cursor > len) /* clamp the cursor */
+ ci->cursor = len;
}
static void rna_ConsoleLine_cursor_index_range(PointerRNA *ptr, int *min, int *max)
{
- ConsoleLine *ci= (ConsoleLine*)ptr->data;
+ ConsoleLine *ci = (ConsoleLine*)ptr->data;
- *min= 0;
- *max= ci->len; /* intentionally _not_ -1 */
+ *min = 0;
+ *max = ci->len; /* intentionally _not_ -1 */
}
/* Space Dopesheet */
static void rna_SpaceDopeSheetEditor_action_set(PointerRNA *ptr, PointerRNA value)
{
- SpaceAction *saction= (SpaceAction*)(ptr->data);
+ SpaceAction *saction = (SpaceAction*)(ptr->data);
bAction *act = (bAction*)value.data;
if ((act == NULL) || (act->idroot == 0)) {
/* just set if we're clearing the action or if the action is "amorphous" still */
- saction->action= act;
+ saction->action = act;
}
else {
/* action to set must strictly meet the mode criteria... */
@@ -817,21 +817,21 @@ static void rna_SpaceDopeSheetEditor_action_set(PointerRNA *ptr, PointerRNA valu
static void rna_SpaceDopeSheetEditor_action_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
{
- SpaceAction *saction= (SpaceAction*)(ptr->data);
- Object *obact= (scene->basact)? scene->basact->object: NULL;
+ SpaceAction *saction = (SpaceAction*)(ptr->data);
+ Object *obact = (scene->basact)? scene->basact->object: NULL;
/* we must set this action to be the one used by active object (if not pinned) */
if (obact/* && saction->pin == 0*/) {
AnimData *adt = NULL;
if (saction->mode == SACTCONT_ACTION) {
- // TODO: context selector could help decide this with more control?
- adt= BKE_id_add_animdata(&obact->id); /* this only adds if non-existant */
+ /* TODO: context selector could help decide this with more control? */
+ adt = BKE_id_add_animdata(&obact->id); /* this only adds if non-existant */
}
else if (saction->mode == SACTCONT_SHAPEKEY) {
Key *key = ob_get_key(obact);
if (key)
- adt= BKE_id_add_animdata(&key->id); /* this only adds if non-existant */
+ adt = BKE_id_add_animdata(&key->id); /* this only adds if non-existant */
}
/* set action */
@@ -840,7 +840,7 @@ static void rna_SpaceDopeSheetEditor_action_update(Main *UNUSED(bmain), Scene *s
id_us_min(&adt->action->id);
/* show new id-count of action we're replacing */
- adt->action= saction->action;
+ adt->action = saction->action;
id_us_plus(&adt->action->id);
}
@@ -851,8 +851,8 @@ static void rna_SpaceDopeSheetEditor_action_update(Main *UNUSED(bmain), Scene *s
static void rna_SpaceDopeSheetEditor_mode_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
{
- SpaceAction *saction= (SpaceAction*)(ptr->data);
- Object *obact= (scene->basact)? scene->basact->object: NULL;
+ SpaceAction *saction = (SpaceAction*)(ptr->data);
+ Object *obact = (scene->basact)? scene->basact->object: NULL;
/* special exceptions for ShapeKey Editor mode */
if (saction->mode == SACTCONT_SHAPEKEY) {
@@ -873,7 +873,7 @@ static void rna_SpaceDopeSheetEditor_mode_update(Main *UNUSED(bmain), Scene *sce
/* make sure action stored is valid */
else if (saction->mode == SACTCONT_ACTION) {
/* 1) update the action stored for the editor */
- // TODO: context selector could help decide this with more control?
+ /* TODO: context selector could help decide this with more control? */
if (obact)
saction->action = (obact->adt)? obact->adt->action : NULL;
else
@@ -885,7 +885,7 @@ static void rna_SpaceDopeSheetEditor_mode_update(Main *UNUSED(bmain), Scene *sce
static void rna_SpaceGraphEditor_display_mode_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- ScrArea *sa= rna_area_from_space(ptr);
+ ScrArea *sa = rna_area_from_space(ptr);
/* after changing view mode, must force recalculation of F-Curve colors
* which can only be achieved using refresh as opposed to redraw
@@ -895,31 +895,31 @@ static void rna_SpaceGraphEditor_display_mode_update(Main *UNUSED(bmain), Scene
static int rna_SpaceGraphEditor_has_ghost_curves_get(PointerRNA *ptr)
{
- SpaceIpo *sipo= (SpaceIpo*)(ptr->data);
+ SpaceIpo *sipo = (SpaceIpo*)(ptr->data);
return (sipo->ghostCurves.first != NULL);
}
static void rna_Sequencer_view_type_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- ScrArea *sa= rna_area_from_space(ptr);
+ ScrArea *sa = rna_area_from_space(ptr);
ED_area_tag_refresh(sa);
}
static float rna_BackgroundImage_opacity_get(PointerRNA *ptr)
{
- BGpic *bgpic= (BGpic *)ptr->data;
+ BGpic *bgpic = (BGpic *)ptr->data;
return 1.0f-bgpic->blend;
}
static void rna_BackgroundImage_opacity_set(PointerRNA *ptr, float value)
{
- BGpic *bgpic= (BGpic *)ptr->data;
+ BGpic *bgpic = (BGpic *)ptr->data;
bgpic->blend = 1.0f - value;
}
static BGpic *rna_BackgroundImage_new(View3D *v3d)
{
- BGpic *bgpic= ED_view3D_background_image_new(v3d);
+ BGpic *bgpic = ED_view3D_background_image_new(v3d);
WM_main_add_notifier(NC_SPACE|ND_SPACE_VIEW3D, v3d);
@@ -947,16 +947,16 @@ static void rna_BackgroundImage_clear(View3D *v3d)
static int rna_SpaceNodeEditor_node_tree_poll(PointerRNA *ptr, PointerRNA value)
{
- SpaceNode *snode= (SpaceNode*)ptr->data;
- bNodeTree *ntree= (bNodeTree*)value.data;
+ SpaceNode *snode = (SpaceNode*)ptr->data;
+ bNodeTree *ntree = (bNodeTree*)value.data;
/* exclude group trees, only trees of the active type */
- return (ntree->nodetype==0 && ntree->type == snode->treetype);
+ return (ntree->nodetype == 0 && ntree->type == snode->treetype);
}
static void rna_SpaceNodeEditor_node_tree_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
{
- SpaceNode *snode= (SpaceNode*)ptr->data;
+ SpaceNode *snode = (SpaceNode*)ptr->data;
ED_node_tree_update(snode, scene);
}
@@ -966,19 +966,19 @@ static EnumPropertyItem *rna_SpaceProperties_texture_context_itemf(bContext *C,
{
Scene *scene = CTX_data_scene(C);
Object *ob = CTX_data_active_object(C);
- EnumPropertyItem *item= NULL;
- EnumPropertyItem tmp= {0, "", 0, "", ""};
- int totitem= 0;
+ EnumPropertyItem *item = NULL;
+ EnumPropertyItem tmp = {0, "", 0, "", ""};
+ int totitem = 0;
- if(ob) {
- if(ob->type == OB_LAMP) {
+ if (ob) {
+ if (ob->type == OB_LAMP) {
tmp.value = SB_TEXC_MAT_OR_LAMP;
tmp.description = "Show Lamp Textures";
tmp.identifier = "LAMP";
tmp.icon = ICON_LAMP_POINT;
RNA_enum_item_add(&item, &totitem, &tmp);
}
- else if(ob->totcol) {
+ else if (ob->totcol) {
tmp.value = SB_TEXC_MAT_OR_LAMP;
tmp.description = "Show Material Textures";
tmp.identifier = "MATERIAL";
@@ -986,7 +986,7 @@ static EnumPropertyItem *rna_SpaceProperties_texture_context_itemf(bContext *C,
RNA_enum_item_add(&item, &totitem, &tmp);
}
- if(ob->particlesystem.first) {
+ if (ob->particlesystem.first) {
tmp.value = SB_TEXC_PARTICLES;
tmp.description = "Show Particle Textures";
tmp.identifier = "PARTICLE";
@@ -995,7 +995,7 @@ static EnumPropertyItem *rna_SpaceProperties_texture_context_itemf(bContext *C,
}
}
- if(scene && scene->world) {
+ if (scene && scene->world) {
tmp.value = SB_TEXC_WORLD;
tmp.description = "Show World Textures";
tmp.identifier = "WORLD";
@@ -1017,29 +1017,29 @@ static EnumPropertyItem *rna_SpaceProperties_texture_context_itemf(bContext *C,
static void rna_SpaceClipEditor_clip_set(PointerRNA *ptr, PointerRNA value)
{
- SpaceClip *sc= (SpaceClip*)(ptr->data);
+ SpaceClip *sc = (SpaceClip*)(ptr->data);
ED_space_clip_set(NULL, sc, (MovieClip*)value.data);
}
static void rna_SpaceClipEditor_clip_mode_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- SpaceClip *sc= (SpaceClip*)(ptr->data);
+ SpaceClip *sc = (SpaceClip*)(ptr->data);
- sc->scopes.ok= 0;
+ sc->scopes.ok = 0;
}
static void rna_SpaceClipEditor_lock_selection_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- SpaceClip *sc= (SpaceClip*)(ptr->data);
+ SpaceClip *sc = (SpaceClip*)(ptr->data);
- sc->xlockof= 0.f;
- sc->ylockof= 0.f;
+ sc->xlockof = 0.f;
+ sc->ylockof = 0.f;
}
static void rna_SpaceClipEditor_view_type_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- ScrArea *sa= rna_area_from_space(ptr);
+ ScrArea *sa = rna_area_from_space(ptr);
ED_area_tag_refresh(sa);
}
@@ -1050,12 +1050,12 @@ static void rna_def_space(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Space", NULL);
+ srna = RNA_def_struct(brna, "Space", NULL);
RNA_def_struct_sdna(srna, "SpaceLink");
RNA_def_struct_ui_text(srna, "Space", "Space data for a screen area");
RNA_def_struct_refine_func(srna, "rna_Space_refine");
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "spacetype");
RNA_def_property_enum_items(prop, space_type_items);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -1093,13 +1093,13 @@ static void rna_def_space_image_uv(BlenderRNA *brna)
{V3D_CURSOR, "CURSOR", ICON_CURSOR, "2D Cursor", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "SpaceUVEditor", NULL);
+ srna = RNA_def_struct(brna, "SpaceUVEditor", NULL);
RNA_def_struct_sdna(srna, "SpaceImage");
RNA_def_struct_nested(brna, srna, "SpaceImageEditor");
RNA_def_struct_ui_text(srna, "Space UV Editor", "UV editor data for the image editor space");
/* selection */
- prop= RNA_def_property(srna, "sticky_select_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "sticky_select_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "sticky");
RNA_def_property_enum_items(prop, sticky_mode_items);
RNA_def_property_ui_text(prop, "Sticky Selection Mode",
@@ -1107,51 +1107,51 @@ static void rna_def_space_image_uv(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
/* drawing */
- prop= RNA_def_property(srna, "edge_draw_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "edge_draw_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "dt_uv");
RNA_def_property_enum_items(prop, dt_uv_items);
RNA_def_property_ui_text(prop, "Edge Draw Type", "Draw type for drawing UV edges");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
- prop= RNA_def_property(srna, "show_smooth_edges", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_smooth_edges", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_SMOOTH_UV);
RNA_def_property_ui_text(prop, "Draw Smooth Edges", "Draw UV edges anti-aliased");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
- prop= RNA_def_property(srna, "show_stretch", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_stretch", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAW_STRETCH);
RNA_def_property_ui_text(prop, "Draw Stretch",
"Draw faces colored according to the difference in shape between UVs and "
"their 3D coordinates (blue for low distortion, red for high distortion)");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
- prop= RNA_def_property(srna, "draw_stretch_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "draw_stretch_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "dt_uvstretch");
RNA_def_property_enum_items(prop, dt_uvstretch_items);
RNA_def_property_ui_text(prop, "Draw Stretch Type", "Type of stretch to draw");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
- prop= RNA_def_property(srna, "show_modified_edges", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_modified_edges", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAWSHADOW);
RNA_def_property_ui_text(prop, "Draw Modified Edges", "Draw edges after modifiers are applied");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
- prop= RNA_def_property(srna, "show_other_objects", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_other_objects", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAW_OTHER);
RNA_def_property_ui_text(prop, "Draw Other Objects", "Draw other selected objects that share the same image");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
- prop= RNA_def_property(srna, "show_normalized_coords", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_normalized_coords", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_COORDFLOATS);
RNA_def_property_ui_text(prop, "Normalized Coordinates", "Display UV coordinates from 0.0 to 1.0 rather than in pixels");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
- prop= RNA_def_property(srna, "show_faces", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_faces", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SI_NO_DRAWFACES);
RNA_def_property_ui_text(prop, "Draw Faces", "Draw faces over the image");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
- prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ);
RNA_def_property_array(prop, 2);
RNA_def_property_float_funcs(prop, "rna_SpaceImageEditor_cursor_location_get",
"rna_SpaceImageEditor_cursor_location_set", NULL);
@@ -1160,23 +1160,23 @@ static void rna_def_space_image_uv(BlenderRNA *brna)
/* todo: move edge and face drawing options here from G.f */
- prop= RNA_def_property(srna, "use_snap_to_pixels", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_snap_to_pixels", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_PIXELSNAP);
RNA_def_property_ui_text(prop, "Snap to Pixels", "Snap UVs to pixel locations while editing");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
- prop= RNA_def_property(srna, "lock_bounds", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_bounds", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_CLIP_UV);
RNA_def_property_ui_text(prop, "Constrain to Image Bounds", "Constraint to stay within the image bounds while editing");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
- prop= RNA_def_property(srna, "use_live_unwrap", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_live_unwrap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_LIVE_UNWRAP);
RNA_def_property_ui_text(prop, "Live Unwrap",
"Continuously unwrap the selected UV island while transforming pinned vertices");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
- prop= RNA_def_property(srna, "pivot_point", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "pivot_point", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "around");
RNA_def_property_enum_items(prop, pivot_items);
RNA_def_property_ui_text(prop, "Pivot", "Rotation/Scaling Pivot");
@@ -1203,32 +1203,32 @@ static void rna_def_space_outliner(BlenderRNA *brna)
{SO_KEYMAP, "KEYMAPS", 0, "Key Maps", "Display keymap datablocks"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "SpaceOutliner", "Space");
+ srna = RNA_def_struct(brna, "SpaceOutliner", "Space");
RNA_def_struct_sdna(srna, "SpaceOops");
RNA_def_struct_ui_text(srna, "Space Outliner", "Outliner space data");
- prop= RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "outlinevis");
RNA_def_property_enum_items(prop, display_mode_items);
RNA_def_property_ui_text(prop, "Display Mode", "Type of information to display");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_OUTLINER, NULL);
- prop= RNA_def_property(srna, "filter_text", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "filter_text", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "search_string");
RNA_def_property_ui_text(prop, "Display Filter", "Live search filtering string");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_OUTLINER, NULL);
- prop= RNA_def_property(srna, "use_filter_case_sensitive", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_filter_case_sensitive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "search_flags", SO_FIND_CASE_SENSITIVE);
RNA_def_property_ui_text(prop, "Case Sensitive Matches Only", "Only use case sensitive matches of search string");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_OUTLINER, NULL);
- prop= RNA_def_property(srna, "use_filter_complete", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_filter_complete", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "search_flags", SO_FIND_COMPLETE);
RNA_def_property_ui_text(prop, "Complete Matches Only", "Only use complete matches of search string");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_OUTLINER, NULL);
- prop= RNA_def_property(srna, "show_restrict_columns", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_restrict_columns", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SO_HIDE_RESTRICTCOLS);
RNA_def_property_ui_text(prop, "Show Restriction Columns", "Show column");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_OUTLINER, NULL);
@@ -1264,81 +1264,81 @@ static void rna_def_background_image(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- srna= RNA_def_struct(brna, "BackgroundImage", NULL);
+ srna = RNA_def_struct(brna, "BackgroundImage", NULL);
RNA_def_struct_sdna(srna, "BGpic");
RNA_def_struct_ui_text(srna, "Background Image", "Image and settings for display in the 3d View background");
- prop= RNA_def_property(srna, "source", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "source", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "source");
RNA_def_property_enum_items(prop, bgpic_source_items);
RNA_def_property_ui_text(prop, "Background Source", "Data source used for background");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ima");
RNA_def_property_ui_text(prop, "Image", "Image displayed and edited in this space");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "clip", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "clip", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "clip");
RNA_def_property_ui_text(prop, "MovieClip", "Movie clip displayed and edited in this space");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "iuser");
RNA_def_property_ui_text(prop, "Image User", "Parameters defining which layer, pass and frame of the image is displayed");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "clip_user", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "clip_user", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "MovieClipUser");
RNA_def_property_pointer_sdna(prop, NULL, "cuser");
RNA_def_property_ui_text(prop, "Clip User", "Parameters defining which frame of the movie clip is displayed");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "offset_x", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "offset_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xof");
RNA_def_property_ui_text(prop, "X Offset", "Offset image horizontally from the world origin");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "offset_y", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "offset_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yof");
RNA_def_property_ui_text(prop, "Y Offset", "Offset image vertically from the world origin");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_ui_text(prop, "Size", "Scaling factor for the background image");
RNA_def_property_range(prop, 0.0, FLT_MAX);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "opacity", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "opacity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "blend");
RNA_def_property_float_funcs(prop, "rna_BackgroundImage_opacity_get", "rna_BackgroundImage_opacity_set", NULL);
RNA_def_property_ui_text(prop, "Opacity", "Image opacity to blend the image against the background color");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "view_axis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "view_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "view");
RNA_def_property_enum_items(prop, bgpic_axis_items);
RNA_def_property_ui_text(prop, "Image Axis", "The axis to display the image on");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_BGPIC_EXPANDED);
RNA_def_property_ui_text(prop, "Show Expanded", "Show the expanded in the user interface");
RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
- prop= RNA_def_property(srna, "use_camera_clip", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_camera_clip", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_BGPIC_CAMERACLIP);
RNA_def_property_ui_text(prop, "Camera Clip", "Use movie clip from active scene camera");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "show_background_image", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_background_image", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", V3D_BGPIC_DISABLED);
RNA_def_property_ui_text(prop, "Show Background Image", "Show this image as background");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
@@ -1351,22 +1351,22 @@ static void rna_def_backgroundImages(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *parm;
RNA_def_property_srna(cprop, "BackgroundImages");
- srna= RNA_def_struct(brna, "BackgroundImages", NULL);
+ srna = RNA_def_struct(brna, "BackgroundImages", NULL);
RNA_def_struct_sdna(srna, "View3D");
RNA_def_struct_ui_text(srna, "Background Images", "Collection of background images");
- func= RNA_def_function(srna, "new", "rna_BackgroundImage_new");
+ func = RNA_def_function(srna, "new", "rna_BackgroundImage_new");
RNA_def_function_ui_description(func, "Add new background image");
- parm= RNA_def_pointer(func, "image", "BackgroundImage", "", "Image displayed as viewport background");
+ parm = RNA_def_pointer(func, "image", "BackgroundImage", "", "Image displayed as viewport background");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_BackgroundImage_remove");
+ func = RNA_def_function(srna, "remove", "rna_BackgroundImage_remove");
RNA_def_function_ui_description(func, "Remove background image");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "image", "BackgroundImage", "", "Image displayed as viewport background");
+ parm = RNA_def_pointer(func, "image", "BackgroundImage", "", "Image displayed as viewport background");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- func= RNA_def_function(srna, "clear", "rna_BackgroundImage_clear");
+ func = RNA_def_function(srna, "clear", "rna_BackgroundImage_clear");
RNA_def_function_ui_description(func, "Remove all background images");
}
@@ -1374,7 +1374,7 @@ static void rna_def_space_view3d(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- const int matrix_dimsize[]= {4, 4};
+ const int matrix_dimsize[] = {4, 4};
static EnumPropertyItem pivot_items[] = {
{V3D_CENTER, "BOUNDING_BOX_CENTER", ICON_ROTATE, "Bounding Box Center",
@@ -1401,205 +1401,205 @@ static void rna_def_space_view3d(BlenderRNA *brna)
{OB_EMPTY_CONE, "CONE", 0, "Cone", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "SpaceView3D", "Space");
+ srna = RNA_def_struct(brna, "SpaceView3D", "Space");
RNA_def_struct_sdna(srna, "View3D");
RNA_def_struct_ui_text(srna, "3D View Space", "3D View space data");
- prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_sdna(prop, NULL, "camera");
RNA_def_property_ui_text(prop, "Camera", "Active camera used in this view (when unlocked from the scene's active camera)");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "lock_object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_object", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_sdna(prop, NULL, "ob_centre");
RNA_def_property_ui_text(prop, "Lock to Object", "3D View center is locked to this object's position");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "lock_bone", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_bone", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "ob_centre_bone");
RNA_def_property_ui_text(prop, "Lock to Bone", "3D View center is locked to this bone's position");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "lock_cursor", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_cursor", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ob_centre_cursor", 1);
RNA_def_property_ui_text(prop, "Lock to Cursor", "3D View center is locked to the cursor's position");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "viewport_shade", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "viewport_shade", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "drawtype");
RNA_def_property_enum_items(prop, viewport_shade_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_SpaceView3D_viewport_shade_itemf");
RNA_def_property_ui_text(prop, "Viewport Shading", "Method to display/shade objects in the 3D View");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_SpaceView3D_viewport_shade_update");
- prop= RNA_def_property(srna, "local_view", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "local_view", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "localvd");
RNA_def_property_ui_text(prop, "Local View", "Display an isolated sub-set of objects, apart from the scene visibility");
- prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ_LENGTH);
+ prop = RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ_LENGTH);
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_View3D_CursorLocation_get", "rna_View3D_CursorLocation_set", NULL);
RNA_def_property_ui_text(prop, "3D Cursor Location", "3D cursor location for this view (dependent on local view setting)");
RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 4);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "lens", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "lens", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "lens");
RNA_def_property_ui_text(prop, "Lens", "Lens angle (mm) in perspective view");
RNA_def_property_range(prop, 1.0f, 250.0f);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "near");
RNA_def_property_range(prop, 0.001f, FLT_MAX);
RNA_def_property_ui_text(prop, "Clip Start", "3D View near clipping distance");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "far");
RNA_def_property_range(prop, 1.0f, FLT_MAX);
RNA_def_property_ui_text(prop, "Clip End", "3D View far clipping distance");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "grid_scale", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "grid_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "grid");
RNA_def_property_ui_text(prop, "Grid Scale", "Distance between 3D View grid lines");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "grid_lines", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "grid_lines", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gridlines");
RNA_def_property_ui_text(prop, "Grid Lines", "Number of grid lines to display in perspective view");
RNA_def_property_range(prop, 0, 1024);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "grid_subdivisions", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "grid_subdivisions", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gridsubdiv");
RNA_def_property_ui_text(prop, "Grid Subdivisions", "Number of subdivisions between grid lines");
RNA_def_property_range(prop, 1, 1024);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "show_floor", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_floor", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_FLOOR);
RNA_def_property_ui_text(prop, "Display Grid Floor", "Show the ground plane grid in perspective view");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "show_axis_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_axis_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_X);
RNA_def_property_ui_text(prop, "Display X Axis", "Show the X axis line in perspective view");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "show_axis_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_axis_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_Y);
RNA_def_property_ui_text(prop, "Display Y Axis", "Show the Y axis line in perspective view");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "show_axis_z", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_axis_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_Z);
RNA_def_property_ui_text(prop, "Display Z Axis", "Show the Z axis line in perspective view");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "show_outline_selected", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_outline_selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_SELECT_OUTLINE);
RNA_def_property_ui_text(prop, "Outline Selected",
"Show an outline highlight around selected objects in non-wireframe views");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "show_all_objects_origin", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_all_objects_origin", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_DRAW_CENTERS);
RNA_def_property_ui_text(prop, "All Object Origins",
"Show the object origin center dot for all (selected and unselected) objects");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "show_relationship_lines", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_relationship_lines", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", V3D_HIDE_HELPLINES);
RNA_def_property_ui_text(prop, "Relationship Lines", "Show dashed lines indicating parent or constraint relationships");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "show_textured_solid", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_textured_solid", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_SOLID_TEX);
RNA_def_property_ui_text(prop, "Textured Solid", "Display face-assigned textures in solid view");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "lock_camera", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_camera", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_LOCK_CAMERA);
RNA_def_property_ui_text(prop, "Lock Camera to View", "Enable view navigation within the camera view");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "show_only_render", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_only_render", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_RENDER_OVERRIDE);
RNA_def_property_ui_text(prop, "Only Render", "Display only objects which will be rendered");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "use_occlude_geometry", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_occlude_geometry", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_ZBUF_SELECT);
RNA_def_property_ui_text(prop, "Occlude Geometry", "Limit selection to visible (clipped with depth buffer)");
RNA_def_property_ui_icon(prop, ICON_ORTHO, 0);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "background_images", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "background_images", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "bgpicbase", NULL);
RNA_def_property_struct_type(prop, "BackgroundImage");
RNA_def_property_ui_text(prop, "Background Images", "List of background images");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
rna_def_backgroundImages(brna, prop);
- prop= RNA_def_property(srna, "show_background_images", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_background_images", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_DISPBGPICS);
RNA_def_property_ui_text(prop, "Display Background Images", "Display reference images behind objects in the 3D View");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "pivot_point", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "pivot_point", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "around");
RNA_def_property_enum_items(prop, pivot_items);
RNA_def_property_ui_text(prop, "Pivot Point", "Pivot center for rotation/scaling");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_SpaceView3D_pivot_update");
- prop= RNA_def_property(srna, "use_pivot_point_align", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pivot_point_align", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_ALIGN);
RNA_def_property_ui_text(prop, "Align", "Manipulate center points (object and pose mode only)");
RNA_def_property_ui_icon(prop, ICON_ALIGN, 0);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_SpaceView3D_pivot_update");
- prop= RNA_def_property(srna, "show_manipulator", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_manipulator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "twflag", V3D_USE_MANIPULATOR);
RNA_def_property_ui_text(prop, "Manipulator", "Use a 3D manipulator widget for controlling transforms");
RNA_def_property_ui_icon(prop, ICON_MANIPUL, 0);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "use_manipulator_translate", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_manipulator_translate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "twtype", V3D_MANIP_TRANSLATE);
RNA_def_property_ui_text(prop, "Manipulator Translate", "Use the manipulator for movement transformations");
RNA_def_property_ui_icon(prop, ICON_MAN_TRANS, 0);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "use_manipulator_rotate", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_manipulator_rotate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "twtype", V3D_MANIP_ROTATE);
RNA_def_property_ui_text(prop, "Manipulator Rotate", "Use the manipulator for rotation transformations");
RNA_def_property_ui_icon(prop, ICON_MAN_ROT, 0);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "use_manipulator_scale", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_manipulator_scale", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "twtype", V3D_MANIP_SCALE);
RNA_def_property_ui_text(prop, "Manipulator Scale", "Use the manipulator for scale transformations");
RNA_def_property_ui_icon(prop, ICON_MAN_SCALE, 0);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "transform_orientation", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "transform_orientation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "twmode");
RNA_def_property_enum_items(prop, transform_orientation_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_TransformOrientation_itemf");
RNA_def_property_ui_text(prop, "Transform Orientation", "Transformation orientation");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "current_orientation", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "current_orientation", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "TransformOrientation");
RNA_def_property_pointer_funcs(prop, "rna_CurrentOrientation_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Current Transform Orientation", "Current transformation orientation");
- prop= RNA_def_property(srna, "lock_camera_and_layers", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_camera_and_layers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scenelock", 1);
RNA_def_property_boolean_funcs(prop, NULL, "rna_SpaceView3D_lock_camera_and_layers_set");
RNA_def_property_ui_text(prop, "Lock Camera and Layers",
@@ -1607,104 +1607,104 @@ static void rna_def_space_view3d(BlenderRNA *brna)
RNA_def_property_ui_icon(prop, ICON_LOCKVIEW_OFF, 1);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
+ prop = RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
RNA_def_property_array(prop, 20);
RNA_def_property_boolean_funcs(prop, NULL, "rna_SpaceView3D_layer_set");
RNA_def_property_ui_text(prop, "Visible Layers", "Layers visible in this 3D View");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_SpaceView3D_layer_update");
- prop= RNA_def_property(srna, "layers_used", PROP_BOOLEAN, PROP_LAYER_MEMBER);
+ prop = RNA_def_property(srna, "layers_used", PROP_BOOLEAN, PROP_LAYER_MEMBER);
RNA_def_property_boolean_sdna(prop, NULL, "lay_used", 1);
RNA_def_property_array(prop, 20);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Used Layers", "Layers that contain something");
- prop= RNA_def_property(srna, "region_3d", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "region_3d", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "RegionView3D");
RNA_def_property_pointer_funcs(prop, "rna_SpaceView3D_region_3d_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "3D Region", "3D region in this space, in case of quad view the camera region");
- prop= RNA_def_property(srna, "region_quadview", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "region_quadview", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "RegionView3D");
RNA_def_property_pointer_funcs(prop, "rna_SpaceView3D_region_quadview_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Quad View Region", "3D region that defines the quad view settings");
- prop= RNA_def_property(srna, "show_reconstruction", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_reconstruction", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_SHOW_RECONSTRUCTION);
RNA_def_property_ui_text(prop, "Show Reconstruction", "Display reconstruction data from active movie clip");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "tracks_draw_size", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "tracks_draw_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, FLT_MAX);
RNA_def_property_float_sdna(prop, NULL, "bundle_size");
RNA_def_property_ui_text(prop, "Tracks Size", "Display size of tracks from reconstructed data");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "tracks_draw_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "tracks_draw_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "bundle_drawtype");
RNA_def_property_enum_items(prop, bundle_drawtype_items);
RNA_def_property_ui_text(prop, "Tracks Display Type", "Viewport display style for tracks");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "show_camera_path", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_camera_path", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_SHOW_CAMERAPATH);
RNA_def_property_ui_text(prop, "Show Camera Path", "Show reconstructed camera path");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "show_bundle_names", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_bundle_names", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_SHOW_BUNDLENAME);
RNA_def_property_ui_text(prop, "Show 3D Marker Names", "Show names for reconstructed tracks objects");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
/* region */
- srna= RNA_def_struct(brna, "RegionView3D", NULL);
+ srna = RNA_def_struct(brna, "RegionView3D", NULL);
RNA_def_struct_sdna(srna, "RegionView3D");
RNA_def_struct_ui_text(srna, "3D View Region", "3D View region data");
- prop= RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "viewlock", RV3D_LOCKED);
RNA_def_property_ui_text(prop, "Lock", "Lock view rotation in side views");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_RegionView3D_quadview_update");
- prop= RNA_def_property(srna, "show_sync_view", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_sync_view", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "viewlock", RV3D_BOXVIEW);
RNA_def_property_ui_text(prop, "Box", "Sync view position between side views");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_RegionView3D_quadview_update");
- prop= RNA_def_property(srna, "use_box_clip", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_box_clip", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "viewlock", RV3D_BOXCLIP);
RNA_def_property_ui_text(prop, "Clip", "Clip objects based on what's visible in other side views");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_RegionView3D_quadview_clip_update");
- prop= RNA_def_property(srna, "perspective_matrix", PROP_FLOAT, PROP_MATRIX);
+ prop = RNA_def_property(srna, "perspective_matrix", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "persmat");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); // XXX: for now, it's too risky for users to do this
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* XXX: for now, it's too risky for users to do this */
RNA_def_property_multi_array(prop, 2, matrix_dimsize);
RNA_def_property_ui_text(prop, "Perspective Matrix", "Current perspective matrix of the 3D region");
- prop= RNA_def_property(srna, "view_matrix", PROP_FLOAT, PROP_MATRIX);
+ prop = RNA_def_property(srna, "view_matrix", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "viewmat");
RNA_def_property_multi_array(prop, 2, matrix_dimsize);
RNA_def_property_float_funcs(prop, NULL, "rna_RegionView3D_view_matrix_set", NULL);
RNA_def_property_ui_text(prop, "View Matrix", "Current view matrix of the 3D region");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "view_perspective", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "view_perspective", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "persp");
RNA_def_property_enum_items(prop, rv3d_persp_items);
RNA_def_property_ui_text(prop, "Perspective", "View Perspective");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "is_perspective", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_perspective", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "is_persp", 1);
RNA_def_property_ui_text(prop, "Is Perspective", "");
RNA_def_property_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "view_location", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "view_location", PROP_FLOAT, PROP_TRANSLATION);
#if 0
- RNA_def_property_float_sdna(prop, NULL, "ofs"); // cant use because its negated
+ RNA_def_property_float_sdna(prop, NULL, "ofs"); /* cant use because its negated */
#else
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_RegionView3D_view_location_get", "rna_RegionView3D_view_location_set", NULL);
@@ -1713,7 +1713,7 @@ static void rna_def_space_view3d(BlenderRNA *brna)
RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 4);
RNA_def_property_update(prop, NC_WINDOW, NULL);
- prop= RNA_def_property(srna, "view_rotation", PROP_FLOAT, PROP_QUATERNION); // cant use because its inverted
+ prop = RNA_def_property(srna, "view_rotation", PROP_FLOAT, PROP_QUATERNION); /* cant use because its inverted */
#if 0
RNA_def_property_float_sdna(prop, NULL, "viewquat");
#else
@@ -1724,17 +1724,17 @@ static void rna_def_space_view3d(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
/* not sure we need rna access to these but adding anyway */
- prop= RNA_def_property(srna, "view_distance", PROP_FLOAT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "view_distance", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "dist");
RNA_def_property_ui_text(prop, "Distance", "Distance to the view location");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "view_camera_zoom", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "view_camera_zoom", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "camzoom");
RNA_def_property_ui_text(prop, "Camera Zoom", "Zoom factor in camera view");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "view_camera_offset", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "view_camera_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "camdx");
RNA_def_property_array(prop, 2);
RNA_def_property_ui_text(prop, "Camera Offset", "View shift in camera view");
@@ -1778,34 +1778,34 @@ static void rna_def_space_buttons(BlenderRNA *brna)
static EnumPropertyItem buttons_texture_context_items[] = {
{SB_TEXC_MAT_OR_LAMP, "MATERIAL", ICON_MATERIAL, "Material", "Material"},
- {0, NULL, 0, NULL, NULL}}; //actually populated dynamically trough a function
+ {0, NULL, 0, NULL, NULL}}; /*actually populated dynamically trough a function */
- srna= RNA_def_struct(brna, "SpaceProperties", "Space");
+ srna = RNA_def_struct(brna, "SpaceProperties", "Space");
RNA_def_struct_sdna(srna, "SpaceButs");
RNA_def_struct_ui_text(srna, "Properties Space", "Properties space data");
- prop= RNA_def_property(srna, "context", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "context", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mainb");
RNA_def_property_enum_items(prop, buttons_context_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_SpaceProperties_context_set", NULL);
RNA_def_property_ui_text(prop, "Context", "Type of active data to display and edit");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_PROPERTIES, NULL);
- prop= RNA_def_property(srna, "align", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "align", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "align");
RNA_def_property_enum_items(prop, align_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_SpaceProperties_align_set", NULL);
RNA_def_property_ui_text(prop, "Align", "Arrangement of the panels");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_PROPERTIES, NULL);
- prop= RNA_def_property(srna, "texture_context", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "texture_context", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, buttons_texture_context_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_SpaceProperties_texture_context_itemf");
RNA_def_property_ui_text(prop, "Texture Context", "Type of texture data to display and edit");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
/* pinned data */
- prop= RNA_def_property(srna, "pin_id", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "pin_id", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "pinid");
RNA_def_property_struct_type(prop, "ID");
/* note: custom set function is ONLY to avoid rna setting a user for this. */
@@ -1813,7 +1813,7 @@ static void rna_def_space_buttons(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_PROPERTIES, "rna_SpaceProperties_pin_id_update");
- prop= RNA_def_property(srna, "use_pin_id", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_pin_id", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SB_PIN_CONTEXT);
RNA_def_property_ui_text(prop, "Pin ID", "Use the pinned context");
}
@@ -1823,58 +1823,58 @@ static void rna_def_space_image(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "SpaceImageEditor", "Space");
+ srna = RNA_def_struct(brna, "SpaceImageEditor", "Space");
RNA_def_struct_sdna(srna, "SpaceImage");
RNA_def_struct_ui_text(srna, "Space Image Editor", "Image and UV editor space data");
/* image */
- prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceImageEditor_image_set", NULL, NULL);
RNA_def_property_ui_text(prop, "Image", "Image displayed and edited in this space");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_GEOM|ND_DATA, NULL); // is handled in image editor too
+ RNA_def_property_update(prop, NC_GEOM|ND_DATA, NULL); /* is handled in image editor too */
- prop= RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "iuser");
RNA_def_property_ui_text(prop, "Image User", "Parameters defining which layer, pass and frame of the image is displayed");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
- prop= RNA_def_property(srna, "curve", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "curve", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "cumap");
RNA_def_property_ui_text(prop, "Curve", "Color curve mapping to use for displaying the image");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_SpaceImageEditor_curves_update");
- prop= RNA_def_property(srna, "scopes", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "scopes", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "scopes");
RNA_def_property_struct_type(prop, "Scopes");
RNA_def_property_ui_text(prop, "Scopes", "Scopes to visualize image statistics");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_SpaceImageEditor_scopes_update");
- prop= RNA_def_property(srna, "use_image_pin", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_image_pin", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pin", 0);
RNA_def_property_ui_text(prop, "Image Pin", "Display current image regardless of object selection");
RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
- prop= RNA_def_property(srna, "sample_histogram", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "sample_histogram", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "sample_line_hist");
RNA_def_property_struct_type(prop, "Histogram");
RNA_def_property_ui_text(prop, "Line sample", "Sampled colors along line");
- prop= RNA_def_property(srna, "zoom", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "zoom", PROP_FLOAT, PROP_NONE);
RNA_def_property_array(prop, 2);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_float_funcs(prop, "rna_SpaceImageEditor_zoom_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Zoom", "Zoom factor");
/* image draw */
- prop= RNA_def_property(srna, "show_repeat", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_repeat", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAW_TILE);
RNA_def_property_ui_text(prop, "Draw Repeated", "Draw the image repeated outside of the main view");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
- prop= RNA_def_property(srna, "draw_channels", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "draw_channels", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, draw_channels_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_SpaceImageEditor_draw_channels_itemf");
@@ -1882,50 +1882,50 @@ static void rna_def_space_image(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
/* uv */
- prop= RNA_def_property(srna, "uv_editor", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "uv_editor", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "SpaceUVEditor");
RNA_def_property_pointer_funcs(prop, "rna_SpaceImageEditor_uvedit_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "UV Editor", "UV editor settings");
/* paint */
- prop= RNA_def_property(srna, "use_image_paint", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_image_paint", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAWTOOL);
RNA_def_property_ui_text(prop, "Image Painting", "Enable image painting mode");
RNA_def_property_ui_icon(prop, ICON_TPAINT_HLT, 0);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_SpaceImageEditor_paint_update");
/* grease pencil */
- prop= RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "gpd");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "GreasePencil");
RNA_def_property_ui_text(prop, "Grease Pencil", "Grease pencil data for this space");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
- prop= RNA_def_property(srna, "use_grease_pencil", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_grease_pencil", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DISPGP);
RNA_def_property_ui_text(prop, "Use Grease Pencil", "Display and edit the grease pencil freehand annotations overlay");
/* update */
- prop= RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "lock", 0);
RNA_def_property_ui_text(prop, "Update Automatically",
"Update other affected window spaces automatically to reflect changes "
"during interactive operations such as transform");
/* state */
- prop= RNA_def_property(srna, "show_render", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_render", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SpaceImageEditor_show_render_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Show Render", "Show render related properties");
- prop= RNA_def_property(srna, "show_paint", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_paint", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SpaceImageEditor_show_paint_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Show Paint", "Show paint related properties");
- prop= RNA_def_property(srna, "show_uvedit", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_uvedit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_SpaceImageEditor_show_uvedit_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Show UV Editor", "Show UV editing related properties");
@@ -1961,81 +1961,81 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
{SEQ_PROXY_RENDER_SIZE_FULL, "FULL", 0, "No proxy, full render", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "SpaceSequenceEditor", "Space");
+ srna = RNA_def_struct(brna, "SpaceSequenceEditor", "Space");
RNA_def_struct_sdna(srna, "SpaceSeq");
RNA_def_struct_ui_text(srna, "Space Sequence Editor", "Sequence editor space data");
/* view type, fairly important */
- prop= RNA_def_property(srna, "view_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "view_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "view");
RNA_def_property_enum_items(prop, view_type_items);
RNA_def_property_ui_text(prop, "View Type", "Type of the Sequencer view (sequencer, preview or both)");
RNA_def_property_update(prop, 0, "rna_Sequencer_view_type_update");
/* display type, fairly important */
- prop= RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mainb");
RNA_def_property_enum_items(prop, display_mode_items);
RNA_def_property_ui_text(prop, "Display Mode", "View mode to use for displaying sequencer output");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
/* flag's */
- prop= RNA_def_property(srna, "show_frame_indicator", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_frame_indicator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SEQ_NO_DRAW_CFRANUM);
RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
- prop= RNA_def_property(srna, "show_frames", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_frames", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAWFRAMES);
RNA_def_property_ui_text(prop, "Draw Frames", "Draw frames rather than seconds");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
- prop= RNA_def_property(srna, "use_marker_sync", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_marker_sync", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MARKER_TRANS);
RNA_def_property_ui_text(prop, "Sync Markers", "Transform markers as well as strips");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
- prop= RNA_def_property(srna, "show_separate_color", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_separate_color", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAW_COLOR_SEPERATED);
RNA_def_property_ui_text(prop, "Separate Colors", "Separate color channels in preview");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
- prop= RNA_def_property(srna, "show_safe_margin", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_safe_margin", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAW_SAFE_MARGINS);
RNA_def_property_ui_text(prop, "Safe Margin", "Draw title safe margins in preview");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
- prop= RNA_def_property(srna, "use_grease_pencil", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_grease_pencil", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_DRAW_GPENCIL);
RNA_def_property_ui_text(prop, "Use Grease Pencil", "Display and edit the grease pencil freehand annotations overlay");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
- prop= RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SEQ_DRAWFRAMES);
RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
/* grease pencil */
- prop= RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "gpd");
RNA_def_property_struct_type(prop, "UnknownType");
RNA_def_property_ui_text(prop, "Grease Pencil", "Grease pencil data for this space");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
- prop= RNA_def_property(srna, "display_channel", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "display_channel", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "chanshown");
RNA_def_property_ui_text(prop, "Display Channel",
"The channel number shown in the image preview. 0 is the result of all strips combined");
RNA_def_property_range(prop, -5, MAXSEQ);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
- prop= RNA_def_property(srna, "draw_overexposed", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "draw_overexposed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "zebra");
RNA_def_property_ui_text(prop, "Show Overexposed", "Show overexposed areas with zebra stripes");
RNA_def_property_range(prop, 0, 110);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
- prop= RNA_def_property(srna, "proxy_render_size", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "proxy_render_size", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "render_size");
RNA_def_property_enum_items(prop, proxy_render_size_items);
RNA_def_property_ui_text(prop, "Proxy render size", "Draw preview using full resolution or different proxy resolutions");
@@ -2047,98 +2047,98 @@ static void rna_def_space_text(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "SpaceTextEditor", "Space");
+ srna = RNA_def_struct(brna, "SpaceTextEditor", "Space");
RNA_def_struct_sdna(srna, "SpaceText");
RNA_def_struct_ui_text(srna, "Space Text Editor", "Text editor space data");
/* text */
- prop= RNA_def_property(srna, "text", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "text", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Text", "Text displayed and edited in this space");
RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceTextEditor_text_set", NULL, NULL);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
/* display */
- prop= RNA_def_property(srna, "show_word_wrap", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_word_wrap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "wordwrap", 0);
RNA_def_property_boolean_funcs(prop, NULL, "rna_SpaceTextEditor_word_wrap_set");
RNA_def_property_ui_text(prop, "Word Wrap", "Wrap words if there is not enough horizontal space");
RNA_def_property_ui_icon(prop, ICON_WORDWRAP_OFF, 1);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
- prop= RNA_def_property(srna, "show_line_numbers", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_line_numbers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "showlinenrs", 0);
RNA_def_property_ui_text(prop, "Line Numbers", "Show line numbers next to the text");
RNA_def_property_ui_icon(prop, ICON_LINENUMBERS_OFF, 1);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
- prop= RNA_def_property(srna, "show_syntax_highlight", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_syntax_highlight", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "showsyntax", 0);
RNA_def_property_ui_text(prop, "Syntax Highlight", "Syntax highlight for scripting");
RNA_def_property_ui_icon(prop, ICON_SYNTAX_OFF, 1);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
- prop= RNA_def_property(srna, "show_line_highlight", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_line_highlight", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "line_hlight", 0);
RNA_def_property_ui_text(prop, "Highlight Line", "Highlight the current line");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
- prop= RNA_def_property(srna, "tab_width", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "tab_width", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tabnumber");
RNA_def_property_range(prop, 2, 8);
RNA_def_property_ui_text(prop, "Tab Width", "Number of spaces to display tabs with");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, "rna_SpaceTextEditor_updateEdited");
- prop= RNA_def_property(srna, "font_size", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "font_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "lheight");
RNA_def_property_range(prop, 8, 32);
RNA_def_property_ui_text(prop, "Font Size", "Font size to use for displaying the text");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
- prop= RNA_def_property(srna, "show_margin", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_margin", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", ST_SHOW_MARGIN);
RNA_def_property_ui_text(prop, "Show Margin", "Show right margin");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
- prop= RNA_def_property(srna, "margin_column", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "margin_column", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "margin_column");
RNA_def_property_range(prop, 0, 1024);
RNA_def_property_ui_text(prop, "Margin Column", "Column number to show right margin at");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
/* functionality options */
- prop= RNA_def_property(srna, "use_overwrite", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_overwrite", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "overwrite", 1);
RNA_def_property_ui_text(prop, "Overwrite", "Overwrite characters when typing rather than inserting them");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
- prop= RNA_def_property(srna, "use_live_edit", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_live_edit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "live_edit", 1);
RNA_def_property_ui_text(prop, "Live Edit", "Run python while editing");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
/* find */
- prop= RNA_def_property(srna, "use_find_all", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_find_all", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", ST_FIND_ALL);
RNA_def_property_ui_text(prop, "Find All", "Search in all text datablocks, instead of only the active one");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
- prop= RNA_def_property(srna, "use_find_wrap", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_find_wrap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", ST_FIND_WRAP);
RNA_def_property_ui_text(prop, "Find Wrap", "Search again from the start of the file when reaching the end");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
- prop= RNA_def_property(srna, "use_match_case", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_match_case", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", ST_MATCH_CASE);
RNA_def_property_ui_text(prop, "Match case", "Search string is sensitive to uppercase and lowercase letters");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
- prop= RNA_def_property(srna, "find_text", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "find_text", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "findstr");
RNA_def_property_ui_text(prop, "Find Text", "Text to search for with the find tool");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
- prop= RNA_def_property(srna, "replace_text", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "replace_text", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "replacestr");
RNA_def_property_ui_text(prop, "Replace Text", "Text to replace selected text with using the replace tool");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, NULL);
@@ -2149,7 +2149,7 @@ static void rna_def_space_dopesheet(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- // XXX: action-editor is currently for object-level only actions, so show that using object-icon hint
+ /* XXX: action-editor is currently for object-level only actions, so show that using object-icon hint */
static EnumPropertyItem mode_items[] = {
{SACTCONT_DOPESHEET, "DOPESHEET", ICON_OOPS, "DopeSheet", "DopeSheet Editor"},
{SACTCONT_ACTION, "ACTION", ICON_OBJECT_DATA, "Action Editor", "Action Editor"},
@@ -2158,41 +2158,41 @@ static void rna_def_space_dopesheet(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "SpaceDopeSheetEditor", "Space");
+ srna = RNA_def_struct(brna, "SpaceDopeSheetEditor", "Space");
RNA_def_struct_sdna(srna, "SpaceAction");
RNA_def_struct_ui_text(srna, "Space DopeSheet Editor", "DopeSheet space data");
/* data */
- prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceDopeSheetEditor_action_set", NULL, "rna_Action_actedit_assign_poll");
RNA_def_property_ui_text(prop, "Action", "Action displayed and edited in this space");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, "rna_SpaceDopeSheetEditor_action_update");
/* mode */
- prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, mode_items);
RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, "rna_SpaceDopeSheetEditor_mode_update");
/* display */
- prop= RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SACTION_DRAWTIME);
RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
- prop= RNA_def_property(srna, "show_frame_indicator", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_frame_indicator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NODRAWCFRANUM);
RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
- prop= RNA_def_property(srna, "show_sliders", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_sliders", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SACTION_SLIDERS);
RNA_def_property_ui_text(prop, "Show Sliders", "Show sliders beside F-Curve channels");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
- prop= RNA_def_property(srna, "show_pose_markers", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_pose_markers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SACTION_POSEMARKERS_SHOW);
RNA_def_property_ui_text(prop, "Show Pose Markers",
"Show markers belonging to the active action instead of Scene markers "
@@ -2200,29 +2200,29 @@ static void rna_def_space_dopesheet(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
/* editing */
- prop= RNA_def_property(srna, "use_auto_merge_keyframes", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_auto_merge_keyframes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NOTRANSKEYCULL);
RNA_def_property_ui_text(prop, "AutoMerge Keyframes", "Automatically merge nearby keyframes");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
- prop= RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NOREALTIMEUPDATES);
RNA_def_property_ui_text(prop, "Realtime Updates",
"When transforming keyframes, changes to the animation data are flushed to other views");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
- prop= RNA_def_property(srna, "use_marker_sync", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_marker_sync", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SACTION_MARKERS_MOVE);
RNA_def_property_ui_text(prop, "Sync Markers", "Sync Markers with keyframe edits");
/* dopesheet */
- prop= RNA_def_property(srna, "dopesheet", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "dopesheet", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "DopeSheet");
RNA_def_property_pointer_sdna(prop, NULL, "ads");
RNA_def_property_ui_text(prop, "DopeSheet", "Settings for filtering animation data");
/* autosnap */
- prop= RNA_def_property(srna, "auto_snap", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "auto_snap", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "autosnap");
RNA_def_property_enum_items(prop, autosnap_items);
RNA_def_property_ui_text(prop, "Auto Snap", "Automatic time snapping settings for transformations");
@@ -2244,104 +2244,104 @@ static void rna_def_space_graph(BlenderRNA *brna)
{V3D_CENTER, "BOUNDING_BOX_CENTER", ICON_ROTATE, "Bounding Box Center", ""},
{V3D_CURSOR, "CURSOR", ICON_CURSOR, "2D Cursor", ""},
{V3D_LOCAL, "INDIVIDUAL_ORIGINS", ICON_ROTATECOLLECTION, "Individual Centers", ""},
- //{V3D_CENTROID, "MEDIAN_POINT", 0, "Median Point", ""},
- //{V3D_ACTIVE, "ACTIVE_ELEMENT", 0, "Active Element", ""},
+ /*{V3D_CENTROID, "MEDIAN_POINT", 0, "Median Point", ""}, */
+ /*{V3D_ACTIVE, "ACTIVE_ELEMENT", 0, "Active Element", ""}, */
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "SpaceGraphEditor", "Space");
+ srna = RNA_def_struct(brna, "SpaceGraphEditor", "Space");
RNA_def_struct_sdna(srna, "SpaceIpo");
RNA_def_struct_ui_text(srna, "Space Graph Editor", "Graph Editor space data");
/* mode */
- prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, mode_items);
RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, "rna_SpaceGraphEditor_display_mode_update");
/* display */
- prop= RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_DRAWTIME);
RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
- prop= RNA_def_property(srna, "show_frame_indicator", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_frame_indicator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NODRAWCFRANUM);
RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
- prop= RNA_def_property(srna, "show_sliders", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_sliders", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_SLIDERS);
RNA_def_property_ui_text(prop, "Show Sliders", "Show sliders beside F-Curve channels");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
- prop= RNA_def_property(srna, "show_handles", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_handles", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NOHANDLES);
RNA_def_property_ui_text(prop, "Show Handles", "Show handles of Bezier control points");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
- prop= RNA_def_property(srna, "use_only_selected_curves_handles", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_only_selected_curves_handles", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_SELCUVERTSONLY);
RNA_def_property_ui_text(prop, "Only Selected Curve Keyframes",
"Only keyframes of selected F-Curves are visible and editable");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
- prop= RNA_def_property(srna, "use_only_selected_keyframe_handles", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_only_selected_keyframe_handles", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_SELVHANDLESONLY);
RNA_def_property_ui_text(prop, "Only Selected Keyframes Handles", "Only show and edit handles of selected keyframes");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
- prop= RNA_def_property(srna, "use_beauty_drawing", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_beauty_drawing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_BEAUTYDRAW_OFF);
RNA_def_property_ui_text(prop, "Use High Quality Drawing",
"Draw F-Curves using Anti-Aliasing and other fancy effects (disable for better performance)");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
/* editing */
- prop= RNA_def_property(srna, "use_auto_merge_keyframes", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_auto_merge_keyframes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NOTRANSKEYCULL);
RNA_def_property_ui_text(prop, "AutoMerge Keyframes", "Automatically merge nearby keyframes");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
- prop= RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NOREALTIMEUPDATES);
RNA_def_property_ui_text(prop, "Realtime Updates",
"When transforming keyframes, changes to the animation data are flushed to other views");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
/* cursor */
- prop= RNA_def_property(srna, "show_cursor", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_cursor", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NODRAWCURSOR);
RNA_def_property_ui_text(prop, "Show Cursor", "Show 2D cursor");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
- prop= RNA_def_property(srna, "cursor_position_y", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "cursor_position_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "cursorVal");
RNA_def_property_ui_text(prop, "Cursor Y-Value", "Graph Editor 2D-Value cursor - Y-Value component");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
- prop= RNA_def_property(srna, "pivot_point", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "pivot_point", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "around");
RNA_def_property_enum_items(prop, gpivot_items);
RNA_def_property_ui_text(prop, "Pivot Point", "Pivot center for rotation/scaling");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
/* dopesheet */
- prop= RNA_def_property(srna, "dopesheet", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "dopesheet", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "DopeSheet");
RNA_def_property_pointer_sdna(prop, NULL, "ads");
RNA_def_property_ui_text(prop, "DopeSheet", "Settings for filtering animation data");
/* autosnap */
- prop= RNA_def_property(srna, "auto_snap", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "auto_snap", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "autosnap");
RNA_def_property_enum_items(prop, autosnap_items);
RNA_def_property_ui_text(prop, "Auto Snap", "Automatic time snapping settings for transformations");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
/* readonly state info */
- prop= RNA_def_property(srna, "has_ghost_curves", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "has_ghost_curves", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", 0); /* XXX: hack to make this compile, since this property doesn't actually exist*/
RNA_def_property_boolean_funcs(prop, "rna_SpaceGraphEditor_has_ghost_curves_get", NULL);
RNA_def_property_ui_text(prop, "Has Ghost Curves", "Graph Editor instance has some ghost curves stored");
@@ -2353,41 +2353,41 @@ static void rna_def_space_nla(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "SpaceNLA", "Space");
+ srna = RNA_def_struct(brna, "SpaceNLA", "Space");
RNA_def_struct_sdna(srna, "SpaceNla");
RNA_def_struct_ui_text(srna, "Space Nla Editor", "NLA editor space data");
/* display */
- prop= RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SNLA_DRAWTIME);
RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL);
- prop= RNA_def_property(srna, "show_frame_indicator", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_frame_indicator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SNLA_NODRAWCFRANUM);
RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL);
- prop= RNA_def_property(srna, "show_strip_curves", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_strip_curves", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SNLA_NOSTRIPCURVES);
RNA_def_property_ui_text(prop, "Show Control F-Curves", "Show influence F-Curves on strips");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL);
/* editing */
- prop= RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SNLA_NOREALTIMEUPDATES);
RNA_def_property_ui_text(prop, "Realtime Updates",
"When transforming strips, changes to the animation data are flushed to other views");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL);
/* dopesheet */
- prop= RNA_def_property(srna, "dopesheet", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "dopesheet", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "DopeSheet");
RNA_def_property_pointer_sdna(prop, NULL, "ads");
RNA_def_property_ui_text(prop, "DopeSheet", "Settings for filtering animation data");
/* autosnap */
- prop= RNA_def_property(srna, "auto_snap", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "auto_snap", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "autosnap");
RNA_def_property_enum_items(prop, autosnap_items);
RNA_def_property_ui_text(prop, "Auto Snap", "Automatic time snapping settings for transformations");
@@ -2399,53 +2399,53 @@ static void rna_def_space_time(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "SpaceTimeline", "Space");
+ srna = RNA_def_struct(brna, "SpaceTimeline", "Space");
RNA_def_struct_sdna(srna, "SpaceTime");
RNA_def_struct_ui_text(srna, "Space Timeline Editor", "Timeline editor space data");
/* view settings */
- prop= RNA_def_property(srna, "show_only_selected", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_only_selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TIME_ONLYACTSEL);
RNA_def_property_ui_text(prop, "Only Selected Channels", "Show keyframes for active Object and/or its selected bones only");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL);
- prop= RNA_def_property(srna, "show_frame_indicator", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_frame_indicator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TIME_CFRA_NUM);
RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL);
- prop= RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", TIME_DRAWFRAMES);
RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL);
/* displaying cache status */
- prop= RNA_def_property(srna, "show_cache", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_cache", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_DISPLAY);
RNA_def_property_ui_text(prop, "Show Cache", "Show the status of cached frames in the timeline");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL);
- prop= RNA_def_property(srna, "cache_softbody", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "cache_softbody", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_SOFTBODY);
RNA_def_property_ui_text(prop, "Softbody", "Show the active object's softbody point cache");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL);
- prop= RNA_def_property(srna, "cache_particles", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "cache_particles", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_PARTICLES);
RNA_def_property_ui_text(prop, "Particles", "Show the active object's particle point cache");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL);
- prop= RNA_def_property(srna, "cache_cloth", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "cache_cloth", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_CLOTH);
RNA_def_property_ui_text(prop, "Cloth", "Show the active object's cloth point cache");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL);
- prop= RNA_def_property(srna, "cache_smoke", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "cache_smoke", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_SMOKE);
RNA_def_property_ui_text(prop, "Smoke", "Show the active object's smoke cache");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL);
- prop= RNA_def_property(srna, "cache_dynamicpaint", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "cache_dynamicpaint", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_DYNAMICPAINT);
RNA_def_property_ui_text(prop, "Dynamic Paint", "Show the active object's Dynamic Paint cache");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL);
@@ -2458,14 +2458,14 @@ static void rna_def_console_line(BlenderRNA *brna)
srna = RNA_def_struct(brna, "ConsoleLine", NULL);
RNA_def_struct_ui_text(srna, "Console Input", "Input line for the interactive console");
- // XXX using non-inited "prop", uh? RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
+ /* XXX using non-inited "prop", uh? RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL); */
- prop= RNA_def_property(srna, "body", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "body", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ConsoleLine_body_get", "rna_ConsoleLine_body_length", "rna_ConsoleLine_body_set");
RNA_def_property_ui_text(prop, "Line", "Text in the line");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
- prop= RNA_def_property(srna, "current_character", PROP_INT, PROP_NONE); /* copied from text editor */
+ prop = RNA_def_property(srna, "current_character", PROP_INT, PROP_NONE); /* copied from text editor */
RNA_def_property_int_sdna(prop, NULL, "cursor");
RNA_def_property_int_funcs(prop, NULL, NULL, "rna_ConsoleLine_cursor_index_range");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
@@ -2476,38 +2476,38 @@ static void rna_def_space_console(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "SpaceConsole", "Space");
+ srna = RNA_def_struct(brna, "SpaceConsole", "Space");
RNA_def_struct_sdna(srna, "SpaceConsole");
RNA_def_struct_ui_text(srna, "Space Console", "Interactive python console");
/* display */
- prop= RNA_def_property(srna, "font_size", PROP_INT, PROP_NONE); /* copied from text editor */
+ prop = RNA_def_property(srna, "font_size", PROP_INT, PROP_NONE); /* copied from text editor */
RNA_def_property_int_sdna(prop, NULL, "lheight");
RNA_def_property_range(prop, 8, 32);
RNA_def_property_ui_text(prop, "Font Size", "Font size to use for displaying the text");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
- prop= RNA_def_property(srna, "select_start", PROP_INT, PROP_UNSIGNED); /* copied from text editor */
+ prop = RNA_def_property(srna, "select_start", PROP_INT, PROP_UNSIGNED); /* copied from text editor */
RNA_def_property_int_sdna(prop, NULL, "sel_start");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
- prop= RNA_def_property(srna, "select_end", PROP_INT, PROP_UNSIGNED); /* copied from text editor */
+ prop = RNA_def_property(srna, "select_end", PROP_INT, PROP_UNSIGNED); /* copied from text editor */
RNA_def_property_int_sdna(prop, NULL, "sel_end");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CONSOLE, NULL);
- prop= RNA_def_property(srna, "prompt", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "prompt", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Prompt", "Command line prompt");
- prop= RNA_def_property(srna, "language", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "language", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Language", "Command line prompt language");
- prop= RNA_def_property(srna, "history", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "history", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "history", NULL);
RNA_def_property_struct_type(prop, "ConsoleLine");
RNA_def_property_ui_text(prop, "History", "Command history");
- prop= RNA_def_property(srna, "scrollback", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "scrollback", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "scrollback", NULL);
RNA_def_property_struct_type(prop, "ConsoleLine");
RNA_def_property_ui_text(prop, "Output", "Command output");
@@ -2531,95 +2531,95 @@ static void rna_def_fileselect_params(BlenderRNA *brna)
{FILE_SORT_SIZE, "FILE_SORT_SIZE", ICON_SORTSIZE, "Sort by size", "Sort files by size"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "FileSelectParams", NULL);
+ srna = RNA_def_struct(brna, "FileSelectParams", NULL);
RNA_def_struct_ui_text(srna, "File Select Parameters", "File Select Parameters");
- prop= RNA_def_property(srna, "title", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "title", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "title");
RNA_def_property_ui_text(prop, "Title", "Title for the file browser");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop= RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
+ prop = RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "dir");
RNA_def_property_ui_text(prop, "Directory", "Directory displayed in the file browser");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
- prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILENAME);
+ prop = RNA_def_property(srna, "filename", PROP_STRING, PROP_FILENAME);
RNA_def_property_string_sdna(prop, NULL, "file");
RNA_def_property_ui_text(prop, "File Name", "Active file in the file browser");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
- prop= RNA_def_property(srna, "display_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "display_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "display");
RNA_def_property_enum_items(prop, file_display_items);
RNA_def_property_ui_text(prop, "Display Mode", "Display mode for the file list");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
- prop= RNA_def_property(srna, "use_filter", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_filter", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FILE_FILTER);
RNA_def_property_ui_text(prop, "Filter Files", "Enable filtering of files");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
- prop= RNA_def_property(srna, "show_hidden", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_hidden", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", FILE_HIDE_DOT);
RNA_def_property_ui_text(prop, "Show Hidden", "Show hidden dot files");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS , NULL);
- prop= RNA_def_property(srna, "sort_method", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "sort_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "sort");
RNA_def_property_enum_items(prop, file_sort_items);
RNA_def_property_ui_text(prop, "Sort", "");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
- prop= RNA_def_property(srna, "use_filter_image", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_filter_image", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", IMAGEFILE);
RNA_def_property_ui_text(prop, "Filter Images", "Show image files");
RNA_def_property_ui_icon(prop, ICON_FILE_IMAGE, 0);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
- prop= RNA_def_property(srna, "use_filter_blender", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_filter_blender", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", BLENDERFILE);
RNA_def_property_ui_text(prop, "Filter Blender", "Show .blend files");
RNA_def_property_ui_icon(prop, ICON_FILE_BLEND, 0);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
- prop= RNA_def_property(srna, "use_filter_movie", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_filter_movie", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", MOVIEFILE);
RNA_def_property_ui_text(prop, "Filter Movies", "Show movie files");
RNA_def_property_ui_icon(prop, ICON_FILE_MOVIE, 0);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
- prop= RNA_def_property(srna, "use_filter_script", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_filter_script", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", PYSCRIPTFILE);
RNA_def_property_ui_text(prop, "Filter Script", "Show script files");
RNA_def_property_ui_icon(prop, ICON_FILE_SCRIPT, 0);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
- prop= RNA_def_property(srna, "use_filter_font", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_filter_font", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", FTFONTFILE);
RNA_def_property_ui_text(prop, "Filter Fonts", "Show font files");
RNA_def_property_ui_icon(prop, ICON_FILE_FONT, 0);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
- prop= RNA_def_property(srna, "use_filter_sound", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_filter_sound", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", SOUNDFILE);
RNA_def_property_ui_text(prop, "Filter Sound", "Show sound files");
RNA_def_property_ui_icon(prop, ICON_FILE_SOUND, 0);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
- prop= RNA_def_property(srna, "use_filter_text", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_filter_text", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", TEXTFILE);
RNA_def_property_ui_text(prop, "Filter Text", "Show text files");
RNA_def_property_ui_icon(prop, ICON_FILE_BLANK, 0);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
- prop= RNA_def_property(srna, "use_filter_folder", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_filter_folder", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "filter", FOLDERFILE);
RNA_def_property_ui_text(prop, "Filter Folder", "Show folders");
RNA_def_property_ui_icon(prop, ICON_FILE_FOLDER, 0);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_PARAMS, NULL);
- prop= RNA_def_property(srna, "filter_glob", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "filter_glob", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "filter_glob");
RNA_def_property_ui_text(prop, "Extension Filter", "");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_FILE_LIST, NULL);
@@ -2631,21 +2631,21 @@ static void rna_def_space_filebrowser(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "SpaceFileBrowser", "Space");
+ srna = RNA_def_struct(brna, "SpaceFileBrowser", "Space");
RNA_def_struct_sdna(srna, "SpaceFile");
RNA_def_struct_ui_text(srna, "Space File Browser", "File browser space data");
- prop= RNA_def_property(srna, "params", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "params", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "params");
RNA_def_property_ui_text(prop, "Filebrowser Parameter", "Parameters and Settings for the Filebrowser");
- prop= RNA_def_property(srna, "active_operator", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active_operator", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "op");
RNA_def_property_ui_text(prop, "Active Operator", "");
/* keep this for compatibility with existing presets,
not exposed in c++ api because of keyword conflict */
- prop= RNA_def_property(srna, "operator", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "operator", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "op");
RNA_def_property_ui_text(prop, "Active Operator", "");
}
@@ -2655,32 +2655,32 @@ static void rna_def_space_info(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "SpaceInfo", "Space");
+ srna = RNA_def_struct(brna, "SpaceInfo", "Space");
RNA_def_struct_sdna(srna, "SpaceInfo");
RNA_def_struct_ui_text(srna, "Space Info", "Info space data");
/* reporting display */
- prop= RNA_def_property(srna, "show_report_debug", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_report_debug", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", INFO_RPT_DEBUG);
RNA_def_property_ui_text(prop, "Show Debug", "Display debug reporting info");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_INFO_REPORT, NULL);
- prop= RNA_def_property(srna, "show_report_info", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_report_info", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", INFO_RPT_INFO);
RNA_def_property_ui_text(prop, "Show Info", "Display general information");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_INFO_REPORT, NULL);
- prop= RNA_def_property(srna, "show_report_operator", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_report_operator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", INFO_RPT_OP);
RNA_def_property_ui_text(prop, "Show Operator", "Display the operator log");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_INFO_REPORT, NULL);
- prop= RNA_def_property(srna, "show_report_warning", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_report_warning", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", INFO_RPT_WARN);
RNA_def_property_ui_text(prop, "Show Warn", "Display warnings");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_INFO_REPORT, NULL);
- prop= RNA_def_property(srna, "show_report_error", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_report_error", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", INFO_RPT_ERR);
RNA_def_property_ui_text(prop, "Show Error", "Display error text");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_INFO_REPORT, NULL);
@@ -2691,11 +2691,11 @@ static void rna_def_space_userpref(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "SpaceUserPreferences", "Space");
+ srna = RNA_def_struct(brna, "SpaceUserPreferences", "Space");
RNA_def_struct_sdna(srna, "SpaceUserPref");
RNA_def_struct_ui_text(srna, "Space User Preferences", "User preferences space data");
- prop= RNA_def_property(srna, "filter_text", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "filter_text", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "filter");
RNA_def_property_ui_text(prop, "Filter", "Search term for filtering in the UI");
@@ -2724,55 +2724,55 @@ static void rna_def_space_node(BlenderRNA *brna)
{SNODE_SHOW_ALPHA, "ALPHA", ICON_IMAGE_ALPHA, "Alpha", "Draw alpha transparency channel"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "SpaceNodeEditor", "Space");
+ srna = RNA_def_struct(brna, "SpaceNodeEditor", "Space");
RNA_def_struct_sdna(srna, "SpaceNode");
RNA_def_struct_ui_text(srna, "Space Node Editor", "Node editor space data");
- prop= RNA_def_property(srna, "tree_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "tree_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "treetype");
RNA_def_property_enum_items(prop, nodetree_type_items);
RNA_def_property_ui_text(prop, "Tree Type", "Node tree type to display and edit");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE, NULL);
- prop= RNA_def_property(srna, "texture_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "texture_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "texfrom");
RNA_def_property_enum_items(prop, texture_type_items);
RNA_def_property_ui_text(prop, "Texture Type", "Type of data to take texture from");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE, NULL);
- prop= RNA_def_property(srna, "shader_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "shader_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "shaderfrom");
RNA_def_property_enum_items(prop, shader_type_items);
RNA_def_property_ui_text(prop, "Shader Type", "Type of data to take shader from");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE, NULL);
- prop= RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "ID", "Datablock whose nodes are being edited");
- prop= RNA_def_property(srna, "id_from", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "id_from", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "from");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "ID From", "Datablock from which the edited datablock is linked");
- prop= RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_SpaceNodeEditor_node_tree_poll");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Node Tree", "Node tree being displayed and edited");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE, "rna_SpaceNodeEditor_node_tree_update");
- prop= RNA_def_property(srna, "show_backdrop", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_backdrop", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SNODE_BACKDRAW);
RNA_def_property_ui_text(prop, "Backdrop", "Use active Viewer Node output as backdrop for compositing nodes");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE_VIEW, NULL);
- prop= RNA_def_property(srna, "use_auto_render", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_auto_render", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SNODE_AUTO_RENDER);
RNA_def_property_ui_text(prop, "Auto Render", "Re-render and composite changed layers on 3D edits");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE_VIEW, NULL);
- prop= RNA_def_property(srna, "backdrop_zoom", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "backdrop_zoom", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "zoom");
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_range(prop, 0.01f, FLT_MAX);
@@ -2780,17 +2780,17 @@ static void rna_def_space_node(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Backdrop Zoom", "Backdrop zoom factor");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE_VIEW, NULL);
- prop= RNA_def_property(srna, "backdrop_x", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "backdrop_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xof");
RNA_def_property_ui_text(prop, "Backdrop X", "Backdrop X offset");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE_VIEW, NULL);
- prop= RNA_def_property(srna, "backdrop_y", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "backdrop_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yof");
RNA_def_property_ui_text(prop, "Backdrop Y", "Backdrop Y offset");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE_VIEW, NULL);
- prop= RNA_def_property(srna, "backdrop_channels", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "backdrop_channels", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, backdrop_channels_items);
RNA_def_property_ui_text(prop, "Draw Channels", "Channels of the image to draw");
@@ -2802,64 +2802,64 @@ static void rna_def_space_logic(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "SpaceLogicEditor", "Space");
+ srna = RNA_def_struct(brna, "SpaceLogicEditor", "Space");
RNA_def_struct_sdna(srna, "SpaceLogic");
RNA_def_struct_ui_text(srna, "Space Logic Editor", "Logic editor space data");
/* sensors */
- prop= RNA_def_property(srna, "show_sensors_selected_objects", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_sensors_selected_objects", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_SENS_SEL);
RNA_def_property_ui_text(prop, "Show Selected Object", "Show sensors of all selected objects");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "show_sensors_active_object", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_sensors_active_object", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_SENS_ACT);
RNA_def_property_ui_text(prop, "Show Active Object", "Show sensors of active object");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "show_sensors_linked_controller", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_sensors_linked_controller", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_SENS_LINK);
RNA_def_property_ui_text(prop, "Show Linked to Controller", "Show linked objects to the controller");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "show_sensors_active_states", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_sensors_active_states", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_SENS_STATE);
RNA_def_property_ui_text(prop, "Show Active States", "Show only sensors connected to active states");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* controllers */
- prop= RNA_def_property(srna, "show_controllers_selected_objects", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_controllers_selected_objects", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_CONT_SEL);
RNA_def_property_ui_text(prop, "Show Selected Object", "Show controllers of all selected objects");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "show_controllers_active_object", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_controllers_active_object", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_CONT_ACT);
RNA_def_property_ui_text(prop, "Show Active Object", "Show controllers of active object");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "show_controllers_linked_controller", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_controllers_linked_controller", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_CONT_LINK);
RNA_def_property_ui_text(prop, "Show Linked to Controller", "Show linked objects to sensor/actuator");
RNA_def_property_update(prop, NC_LOGIC, NULL);
/* actuators */
- prop= RNA_def_property(srna, "show_actuators_selected_objects", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_actuators_selected_objects", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_ACT_SEL);
RNA_def_property_ui_text(prop, "Show Selected Object", "Show actuators of all selected objects");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "show_actuators_active_object", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_actuators_active_object", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_ACT_ACT);
RNA_def_property_ui_text(prop, "Show Active Object", "Show actuators of active object");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "show_actuators_linked_controller", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_actuators_linked_controller", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_ACT_LINK);
RNA_def_property_ui_text(prop, "Show Linked to Actuator", "Show linked objects to the actuator");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "show_actuators_active_states", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_actuators_active_states", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scaflag", BUTS_ACT_STATE);
RNA_def_property_ui_text(prop, "Show Active States", "Show only actuators connected to active states");
RNA_def_property_update(prop, NC_LOGIC, NULL);
@@ -2882,19 +2882,19 @@ static void rna_def_space_clip(BlenderRNA *brna)
{SC_VIEW_GRAPH, "GRAPH", ICON_IPO, "Graph", "Show graph view for active element"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "SpaceClipEditor", "Space");
+ srna = RNA_def_struct(brna, "SpaceClipEditor", "Space");
RNA_def_struct_sdna(srna, "SpaceClip");
RNA_def_struct_ui_text(srna, "Space Clip Editor", "Clip editor space data");
/* movieclip */
- prop= RNA_def_property(srna, "clip", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "clip", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Movie Clip", "Movie clip displayed and edited in this space");
RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceClipEditor_clip_set", NULL, NULL);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
/* clip user */
- prop= RNA_def_property(srna, "clip_user", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "clip_user", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "MovieClipUser");
RNA_def_property_pointer_sdna(prop, NULL, "user");
@@ -2902,124 +2902,124 @@ static void rna_def_space_clip(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
/* mode */
- prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, mode_items);
RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, "rna_SpaceClipEditor_clip_mode_update");
/* view */
- prop= RNA_def_property(srna, "view", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "view", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "view");
RNA_def_property_enum_items(prop, view_items);
RNA_def_property_ui_text(prop, "View", "Type of the clip editor view");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, "rna_SpaceClipEditor_view_type_update");
/* show pattern */
- prop= RNA_def_property(srna, "show_marker_pattern", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_marker_pattern", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "Show Marker Pattern", "Show pattern boundbox for markers");
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_MARKER_PATTERN);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
/* show search */
- prop= RNA_def_property(srna, "show_marker_search", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_marker_search", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "Show Marker Search", "Show search boundbox for markers");
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_MARKER_SEARCH);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
/* lock to selection */
- prop= RNA_def_property(srna, "lock_selection", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_selection", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "Lock to Selection", "Lock viewport to selected markers during playback");
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_LOCK_SELECTION);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, "rna_SpaceClipEditor_lock_selection_update");
/* lock to time cursor */
- prop= RNA_def_property(srna, "lock_time_cursor", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock_time_cursor", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "Lock to Time Cursor", "Lock curves view to time cursor during playback and tracking");
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_LOCK_TIMECURSOR);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
/* show markers paths */
- prop= RNA_def_property(srna, "show_track_path", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_track_path", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_TRACK_PATH);
RNA_def_property_ui_text(prop, "Show Track Path", "Show path of how track moves");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
/* path length */
- prop= RNA_def_property(srna, "path_length", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "path_length", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "path_length");
RNA_def_property_range(prop, 0, 50);
RNA_def_property_ui_text(prop, "Path Length", "Length of displaying path, in frames");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
/* show tiny markers */
- prop= RNA_def_property(srna, "show_tiny_markers", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_tiny_markers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "Show Tiny Markers", "Show markers in a more compact manner");
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_TINY_MARKER);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
/* show bundles */
- prop= RNA_def_property(srna, "show_bundles", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_bundles", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "Show Bundles", "Show projection of 3D markers into footage");
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_BUNDLES);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
/* mute footage */
- prop= RNA_def_property(srna, "use_mute_footage", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_mute_footage", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "Mute Footage", "Mute footage and show black background instead");
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_MUTE_FOOTAGE);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
/* hide disabled */
- prop= RNA_def_property(srna, "show_disabled", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_disabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "Show Disabled", "Show disabled tracks from the footage");
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SC_HIDE_DISABLED);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
/* scopes */
- prop= RNA_def_property(srna, "scopes", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "scopes", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "scopes");
RNA_def_property_struct_type(prop, "MovieClipScopes");
RNA_def_property_ui_text(prop, "Scopes", "Scopes to visualize movie clip statistics");
/* show names */
- prop= RNA_def_property(srna, "show_names", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_names", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_NAMES);
RNA_def_property_ui_text(prop, "Show Names", "Show track names and status");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
/* show grid */
- prop= RNA_def_property(srna, "show_grid", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_grid", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_GRID);
RNA_def_property_ui_text(prop, "Show Grid", "Show grid showing lens distortion");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
/* show stable */
- prop= RNA_def_property(srna, "show_stable", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_stable", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_STABLE);
RNA_def_property_ui_text(prop, "Show Stable", "Show stable footage in editor (if stabilization is enabled)");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
/* manual calibration */
- prop= RNA_def_property(srna, "use_manual_calibration", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_manual_calibration", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_MANUAL_CALIBRATION);
RNA_def_property_ui_text(prop, "Manual Calibration", "Use manual calibration helpers");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
/* show filters */
- prop= RNA_def_property(srna, "show_filters", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_filters", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_FILTERS);
RNA_def_property_ui_text(prop, "Show Filters", "Show filters for graph editor");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
/* show graph_frames */
- prop= RNA_def_property(srna, "show_graph_frames", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_graph_frames", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_GRAPH_FRAMES);
RNA_def_property_ui_text(prop, "Show Frames", "Show curve for per-frame average error (camera motion should be solved first)");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
/* show graph_tracks */
- prop= RNA_def_property(srna, "show_graph_tracks", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_graph_tracks", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_GRAPH_TRACKS);
RNA_def_property_ui_text(prop, "Show Tracks", "Display the speed curves (in \"x\" direction red, in \"y\" direction green) for the selected tracks");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
@@ -3027,25 +3027,25 @@ static void rna_def_space_clip(BlenderRNA *brna)
/* ** channels ** */
/* show_red_channel */
- prop= RNA_def_property(srna, "show_red_channel", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_red_channel", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "postproc_flag", MOVIECLIP_DISABLE_RED);
RNA_def_property_ui_text(prop, "Show Red Channel", "Show red channel in the frame");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
/* show_green_channel */
- prop= RNA_def_property(srna, "show_green_channel", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_green_channel", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "postproc_flag", MOVIECLIP_DISABLE_GREEN);
RNA_def_property_ui_text(prop, "Show Green Channel", "Show green channel in the frame");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
/* show_blue_channel */
- prop= RNA_def_property(srna, "show_blue_channel", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_blue_channel", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "postproc_flag", MOVIECLIP_DISABLE_BLUE);
RNA_def_property_ui_text(prop, "Show Blue Channel", "Show blue channel in the frame");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
/* preview_grayscale */
- prop= RNA_def_property(srna, "use_grayscale_preview", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_grayscale_preview", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "postproc_flag", MOVIECLIP_PREVIEW_GRAYSCALE);
RNA_def_property_ui_text(prop, "Grayscale", "Display frame in grayscale mode");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
diff --git a/source/blender/makesrna/intern/rna_speaker.c b/source/blender/makesrna/intern/rna_speaker.c
index cb2b1fe4c60..1e3c8df9273 100644
--- a/source/blender/makesrna/intern/rna_speaker.c
+++ b/source/blender/makesrna/intern/rna_speaker.c
@@ -53,112 +53,113 @@ static void rna_def_speaker(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Speaker", "ID");
+ srna = RNA_def_struct(brna, "Speaker", "ID");
RNA_def_struct_ui_text(srna, "Speaker", "Speaker datablock for 3D audio speaker objects");
RNA_def_struct_ui_icon(srna, ICON_SPEAKER);
- prop= RNA_def_property(srna, "muted", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "muted", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SPK_MUTED);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Mute", "Mute the speaker");
- // RNA_def_property_update(prop, 0, "rna_Speaker_update");
+ /* RNA_def_property_update(prop, 0, "rna_Speaker_update"); */
- /* This shouldn't be changed actually, hiding it!
- prop= RNA_def_property(srna, "relative", PROP_BOOLEAN, PROP_NONE);
+#if 0 /* This shouldn't be changed actually, hiding it! */
+ prop = RNA_def_property(srna, "relative", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SPK_RELATIVE);
RNA_def_property_ui_text(prop, "Relative", "Whether the source is relative to the camera or not");
- // RNA_def_property_update(prop, 0, "rna_Speaker_update");*/
+ /* RNA_def_property_update(prop, 0, "rna_Speaker_update"); */
+#endif
- prop= RNA_def_property(srna, "sound", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "sound", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "sound");
RNA_def_property_struct_type(prop, "Sound");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Sound", "Sound datablock used by this speaker");
- // RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_sound_set", NULL);
- // RNA_def_property_update(prop, 0, "rna_Speaker_update");
+ /* RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_sound_set", NULL); */
+ /* RNA_def_property_update(prop, 0, "rna_Speaker_update"); */
- prop= RNA_def_property(srna, "volume_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "volume_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "volume_max");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Maximum Volume", "Maximum volume, no matter how near the object is");
- // RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_volume_max_set", NULL);
- // RNA_def_property_update(prop, 0, "rna_Speaker_update");
+ /* RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_volume_max_set", NULL); */
+ /* RNA_def_property_update(prop, 0, "rna_Speaker_update"); */
- prop= RNA_def_property(srna, "volume_min", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "volume_min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "volume_min");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Minimum Volume", "Minimum volume, no matter how far away the object is");
- // RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_volume_min_set", NULL);
- // RNA_def_property_update(prop, 0, "rna_Speaker_update");
+ /* RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_volume_min_set", NULL); */
+ /* RNA_def_property_update(prop, 0, "rna_Speaker_update"); */
- prop= RNA_def_property(srna, "distance_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "distance_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "distance_max");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_text(prop, "Maximum Distance",
"Maximum distance for volume calculation, no matter how far away the object is");
- // RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_distance_max_set", NULL);
- // RNA_def_property_update(prop, 0, "rna_Speaker_update");
+ /* RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_distance_max_set", NULL); */
+ /* RNA_def_property_update(prop, 0, "rna_Speaker_update"); */
- prop= RNA_def_property(srna, "distance_reference", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "distance_reference", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "distance_reference");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_text(prop, "Reference Distance", "Reference distance at which volume is 100 %");
- // RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_distance_reference_set", NULL);
- // RNA_def_property_update(prop, 0, "rna_Speaker_update");
+ /* RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_distance_reference_set", NULL); */
+ /* RNA_def_property_update(prop, 0, "rna_Speaker_update"); */
- prop= RNA_def_property(srna, "attenuation", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "attenuation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "attenuation");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_text(prop, "Attenuation", "How strong the distance affects volume, depending on distance model");
- // RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_attenuation_set", NULL);
- // RNA_def_property_update(prop, 0, "rna_Speaker_update");
+ /* RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_attenuation_set", NULL); */
+ /* RNA_def_property_update(prop, 0, "rna_Speaker_update"); */
- prop= RNA_def_property(srna, "cone_angle_outer", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "cone_angle_outer", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "cone_angle_outer");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0f, 360.0f);
RNA_def_property_ui_text(prop, "Outer Cone Angle",
"Angle of the outer cone, in degrees, outside this cone the volume is "
"the outer cone volume, between inner and outer cone the volume is interpolated");
- // RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_cone_angle_outer_set", NULL);
- // RNA_def_property_update(prop, 0, "rna_Speaker_update");
+ /* RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_cone_angle_outer_set", NULL); */
+ /* RNA_def_property_update(prop, 0, "rna_Speaker_update"); */
- prop= RNA_def_property(srna, "cone_angle_inner", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "cone_angle_inner", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "cone_angle_inner");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0f, 360.0f);
RNA_def_property_ui_text(prop, "Inner Cone Angle",
"Angle of the inner cone, in degrees, inside the cone the volume is 100 %");
- // RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_cone_angle_inner_set", NULL);
- // RNA_def_property_update(prop, 0, "rna_Speaker_update");
+ /* RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_cone_angle_inner_set", NULL); */
+ /* RNA_def_property_update(prop, 0, "rna_Speaker_update"); */
- prop= RNA_def_property(srna, "cone_volume_outer", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "cone_volume_outer", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "cone_volume_outer");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Outer Cone Volume", "Volume outside the outer cone");
- // RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_cone_volume_outer_set", NULL);
- // RNA_def_property_update(prop, 0, "rna_Speaker_update");
+ /* RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_cone_volume_outer_set", NULL); */
+ /* RNA_def_property_update(prop, 0, "rna_Speaker_update"); */
- prop= RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "volume");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Volume", "How loud the sound is");
- // RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_volume_set", NULL);
- // RNA_def_property_update(prop, 0, "rna_Speaker_update");
+ /* RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_volume_set", NULL); */
+ /* RNA_def_property_update(prop, 0, "rna_Speaker_update"); */
- prop= RNA_def_property(srna, "pitch", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "pitch", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "pitch");
RNA_def_property_range(prop, 0.1f, 10.0f);
RNA_def_property_ui_text(prop, "Pitch", "Playback pitch of the sound");
- // RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_pitch_set", NULL);
- // RNA_def_property_update(prop, 0, "rna_Speaker_update");
+ /* RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_pitch_set", NULL); */
+ /* RNA_def_property_update(prop, 0, "rna_Speaker_update"); */
/* common */
rna_def_animdata_common(srna);
diff --git a/source/blender/makesrna/intern/rna_test.c b/source/blender/makesrna/intern/rna_test.c
index c0f5e0735a6..175aa0046ae 100644
--- a/source/blender/makesrna/intern/rna_test.c
+++ b/source/blender/makesrna/intern/rna_test.c
@@ -50,10 +50,10 @@
#define DEF_VARS(type, prefix) \
static type prefix ## arr[ARRAY_SIZE]; \
static type prefix ## darr[DYNAMIC_ARRAY_SIZE]; \
- static int prefix ## darr_len= ARRAY_SIZE; \
+ static int prefix ## darr_len = ARRAY_SIZE; \
static type prefix ## marr MARRAY_DIM; \
static type prefix ## dmarr DYNAMIC_MARRAY_DIM; \
- static int prefix ## dmarr_len= sizeof(prefix ## dmarr);
+ static int prefix ## dmarr_len = sizeof(prefix ## dmarr);
#define DEF_GET_SET(type, arr) \
void rna_Test_ ## arr ## _get(PointerRNA *ptr, type *values) \
@@ -77,7 +77,7 @@
if (length > max) \
return 0; \
\
- arr ## _len= length; \
+ arr ## _len = length; \
\
return 1; \
} \
@@ -117,66 +117,66 @@ void RNA_def_test(BlenderRNA *brna)
#ifdef UNIT_TEST
StructRNA *srna;
PropertyRNA *prop;
- unsigned short dimsize[]= {MARRAY_DIMSIZE};
+ unsigned short dimsize[] = {MARRAY_DIMSIZE};
- srna= RNA_def_struct(brna, "Test", NULL);
+ srna = RNA_def_struct(brna, "Test", NULL);
RNA_def_struct_sdna(srna, "Test");
- prop= RNA_def_float_array(srna, "farr", ARRAY_SIZE, NULL, 0.0f, 0.0f, "farr", "float array", 0.0f, 0.0f);
+ prop = RNA_def_float_array(srna, "farr", ARRAY_SIZE, NULL, 0.0f, 0.0f, "farr", "float array", 0.0f, 0.0f);
RNA_def_property_float_funcs(prop, "rna_Test_farr_get", "rna_Test_farr_set", NULL);
- prop= RNA_def_int_array(srna, "iarr", ARRAY_SIZE, NULL, 0, 0, "iarr", "int array", 0, 0);
+ prop = RNA_def_int_array(srna, "iarr", ARRAY_SIZE, NULL, 0, 0, "iarr", "int array", 0, 0);
RNA_def_property_int_funcs(prop, "rna_Test_iarr_get", "rna_Test_iarr_set", NULL);
- prop= RNA_def_boolean_array(srna, "barr", ARRAY_SIZE, NULL, "barr", "boolean array");
+ prop = RNA_def_boolean_array(srna, "barr", ARRAY_SIZE, NULL, "barr", "boolean array");
RNA_def_property_boolean_funcs(prop, "rna_Test_barr_get", "rna_Test_barr_set");
/* dynamic arrays */
- prop= RNA_def_float_array(srna, "fdarr", DYNAMIC_ARRAY_SIZE, NULL, 0.0f, 0.0f, "fdarr", "dynamic float array", 0.0f, 0.0f);
+ prop = RNA_def_float_array(srna, "fdarr", DYNAMIC_ARRAY_SIZE, NULL, 0.0f, 0.0f, "fdarr", "dynamic float array", 0.0f, 0.0f);
RNA_def_property_flag(prop, PROP_DYNAMIC);
RNA_def_property_dynamic_array_funcs(prop, "rna_Test_fdarr_get_length", "rna_Test_fdarr_set_length");
RNA_def_property_float_funcs(prop, "rna_Test_fdarr_get", "rna_Test_fdarr_set", NULL);
- prop= RNA_def_int_array(srna, "idarr", DYNAMIC_ARRAY_SIZE, NULL, 0, 0, "idarr", "int array", 0, 0);
+ prop = RNA_def_int_array(srna, "idarr", DYNAMIC_ARRAY_SIZE, NULL, 0, 0, "idarr", "int array", 0, 0);
RNA_def_property_flag(prop, PROP_DYNAMIC);
RNA_def_property_dynamic_array_funcs(prop, "rna_Test_idarr_get_length", "rna_Test_idarr_set_length");
RNA_def_property_int_funcs(prop, "rna_Test_idarr_get", "rna_Test_idarr_set", NULL);
- prop= RNA_def_boolean_array(srna, "bdarr", DYNAMIC_ARRAY_SIZE, NULL, "bdarr", "boolean array");
+ prop = RNA_def_boolean_array(srna, "bdarr", DYNAMIC_ARRAY_SIZE, NULL, "bdarr", "boolean array");
RNA_def_property_flag(prop, PROP_DYNAMIC);
RNA_def_property_dynamic_array_funcs(prop, "rna_Test_bdarr_get_length", "rna_Test_bdarr_set_length");
RNA_def_property_boolean_funcs(prop, "rna_Test_bdarr_get", "rna_Test_bdarr_set");
/* multidimensional arrays */
- prop= RNA_def_property(srna, "fmarr", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "fmarr", PROP_FLOAT, PROP_NONE);
RNA_def_property_multidimensional_array(prop, MARRAY_SIZE(float), MARRAY_TOTDIM, dimsize);
RNA_def_property_float_funcs(prop, "rna_Test_fmarr_get", "rna_Test_fmarr_set", NULL);
- prop= RNA_def_property(srna, "imarr", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "imarr", PROP_INT, PROP_NONE);
RNA_def_property_multidimensional_array(prop, MARRAY_SIZE(int), MARRAY_TOTDIM, dimsize);
RNA_def_property_int_funcs(prop, "rna_Test_imarr_get", "rna_Test_imarr_set", NULL);
- prop= RNA_def_property(srna, "bmarr", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "bmarr", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_multidimensional_array(prop, MARRAY_SIZE(int), MARRAY_TOTDIM, dimsize);
RNA_def_property_boolean_funcs(prop, "rna_Test_bmarr_get", "rna_Test_bmarr_set");
/* dynamic multidimensional arrays */
- prop= RNA_def_property(srna, "fdmarr", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "fdmarr", PROP_FLOAT, PROP_NONE);
RNA_def_property_multidimensional_array(prop, DYNAMIC_MARRAY_SIZE(float), MARRAY_TOTDIM, dimsize);
RNA_def_property_flag(prop, PROP_DYNAMIC);
RNA_def_property_dynamic_array_funcs(prop, "rna_Test_fdmarr_get_length", "rna_Test_fdmarr_set_length");
RNA_def_property_float_funcs(prop, "rna_Test_fdmarr_get", "rna_Test_fdmarr_set", NULL);
- prop= RNA_def_property(srna, "idmarr", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "idmarr", PROP_INT, PROP_NONE);
RNA_def_property_multidimensional_array(prop, DYNAMIC_MARRAY_SIZE(int), MARRAY_TOTDIM, dimsize);
RNA_def_property_flag(prop, PROP_DYNAMIC);
RNA_def_property_dynamic_array_funcs(prop, "rna_Test_idmarr_get_length", "rna_Test_idmarr_set_length");
RNA_def_property_int_funcs(prop, "rna_Test_idmarr_get", "rna_Test_idmarr_set", NULL);
- prop= RNA_def_property(srna, "bdmarr", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "bdmarr", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_multidimensional_array(prop, DYNAMIC_MARRAY_SIZE(int), MARRAY_TOTDIM, dimsize);
RNA_def_property_flag(prop, PROP_DYNAMIC);
RNA_def_property_dynamic_array_funcs(prop, "rna_Test_bdmarr_get_length", "rna_Test_bdmarr_set_length");
diff --git a/source/blender/makesrna/intern/rna_text.c b/source/blender/makesrna/intern/rna_text.c
index 9e3611b4cc5..267c8124611 100644
--- a/source/blender/makesrna/intern/rna_text.c
+++ b/source/blender/makesrna/intern/rna_text.c
@@ -46,70 +46,70 @@ int text_file_modified(Text *text); /* XXX bad level call */
static void rna_Text_filename_get(PointerRNA *ptr, char *value)
{
- Text *text= (Text*)ptr->data;
+ Text *text = (Text*)ptr->data;
- if(text->name)
+ if (text->name)
strcpy(value, text->name);
else
- value[0]= '\0';
+ value[0] = '\0';
}
static int rna_Text_filename_length(PointerRNA *ptr)
{
- Text *text= (Text*)ptr->data;
+ Text *text = (Text*)ptr->data;
return (text->name)? strlen(text->name): 0;
}
static void rna_Text_filename_set(PointerRNA *ptr, const char *value)
{
- Text *text= (Text*)ptr->data;
+ Text *text = (Text*)ptr->data;
- if(text->name)
+ if (text->name)
MEM_freeN(text->name);
- if(value[0])
- text->name= BLI_strdup(value);
+ if (value[0])
+ text->name = BLI_strdup(value);
else
- text->name= NULL;
+ text->name = NULL;
}
static int rna_Text_modified_get(PointerRNA *ptr)
{
- Text *text= (Text*)ptr->data;
+ Text *text = (Text*)ptr->data;
return text_file_modified(text);
}
static void rna_TextLine_body_get(PointerRNA *ptr, char *value)
{
- TextLine *line= (TextLine*)ptr->data;
+ TextLine *line = (TextLine*)ptr->data;
- if(line->line)
+ if (line->line)
strcpy(value, line->line);
else
- value[0]= '\0';
+ value[0] = '\0';
}
static int rna_TextLine_body_length(PointerRNA *ptr)
{
- TextLine *line= (TextLine*)ptr->data;
+ TextLine *line = (TextLine*)ptr->data;
return line->len;
}
static void rna_TextLine_body_set(PointerRNA *ptr, const char *value)
{
- TextLine *line= (TextLine*)ptr->data;
- int len= strlen(value);
+ TextLine *line = (TextLine*)ptr->data;
+ int len = strlen(value);
- if(line->line)
+ if (line->line)
MEM_freeN(line->line);
- line->line= MEM_mallocN((len + 1) * sizeof(char), "rna_text_body");
- line->len= len;
+ line->line = MEM_mallocN((len + 1) * sizeof(char), "rna_text_body");
+ line->len = len;
memcpy(line->line, value, len + 1);
- if(line->format) {
+ if (line->format) {
MEM_freeN(line->format);
- line->format= NULL;
+ line->format = NULL;
}
}
@@ -123,7 +123,7 @@ static void rna_def_text_line(BlenderRNA *brna)
srna = RNA_def_struct(brna, "TextLine", NULL);
RNA_def_struct_ui_text(srna, "Text Line", "Line of text in a Text datablock");
- prop= RNA_def_property(srna, "body", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "body", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_TextLine_body_get", "rna_TextLine_body_length", "rna_TextLine_body_set");
RNA_def_property_ui_text(prop, "Line", "Text in the line");
RNA_def_property_update(prop, NC_TEXT|NA_EDITED, NULL);
@@ -137,37 +137,37 @@ static void rna_def_text_marker(BlenderRNA *brna)
srna = RNA_def_struct(brna, "TextMarker", NULL);
RNA_def_struct_ui_text(srna, "Text Marker", "Marker highlighting a portion of text in a Text datablock");
- prop= RNA_def_property(srna, "line", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "line", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "lineno");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Line", "Line in which the marker is located");
- prop= RNA_def_property(srna, "character_index_start", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "character_index_start", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "start");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Start", "Start position of the marker in the line");
- prop= RNA_def_property(srna, "character_index_end", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "character_index_end", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "end");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "End", "Start position of the marker in the line");
- prop= RNA_def_property(srna, "group", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "group", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_range(prop, 0, (int)0xFFFF);
RNA_def_property_ui_text(prop, "Group", "");
- prop= RNA_def_property(srna, "is_temporary", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_temporary", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", TMARK_TEMP);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Temporary", "Marker is temporary");
- prop= RNA_def_property(srna, "use_edit_all", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_edit_all", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", TMARK_EDITALL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
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_GAMMA);
+ prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Color", "Color to display the marker with");
}
@@ -182,62 +182,62 @@ static void rna_def_text(BlenderRNA *brna)
RNA_def_struct_ui_icon(srna, ICON_TEXT);
RNA_def_struct_clear_flag(srna, STRUCT_ID_REFCOUNT);
- prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_Text_filename_get", "rna_Text_filename_length", "rna_Text_filename_set");
RNA_def_property_ui_text(prop, "File Path", "Filename of the text file");
- prop= RNA_def_property(srna, "is_dirty", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_dirty", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", TXT_ISDIRTY);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Dirty", "Text file has been edited since last save");
- prop= RNA_def_property(srna, "is_modified", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_modified", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Text_modified_get", NULL);
RNA_def_property_ui_text(prop, "Modified", "Text file on disk is different than the one in memory");
- prop= RNA_def_property(srna, "is_in_memory", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_in_memory", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", TXT_ISMEM);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Memory", "Text file is in memory, without a corresponding file on disk");
- prop= RNA_def_property(srna, "use_module", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_module", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", TXT_ISSCRIPT);
RNA_def_property_ui_text(prop, "Register", "Register this text as a module on loading, Text name must end with \".py\"");
- prop= RNA_def_property(srna, "use_tabs_as_spaces", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_tabs_as_spaces", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", TXT_TABSTOSPACES);
RNA_def_property_ui_text(prop, "Tabs as Spaces", "Automatically converts all new tabs into spaces");
- prop= RNA_def_property(srna, "lines", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "lines", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "TextLine");
RNA_def_property_ui_text(prop, "Lines", "Lines of text");
- prop= RNA_def_property(srna, "current_line", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "current_line", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "curl");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "TextLine");
RNA_def_property_ui_text(prop, "Current Line", "Current line, and start line of selection if one exists");
- prop= RNA_def_property(srna, "current_character", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "current_character", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "curc");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Current Character", "Index of current character in current line, and also start index of character in selection if one exists");
- prop= RNA_def_property(srna, "select_end_line", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "select_end_line", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "sell");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "TextLine");
RNA_def_property_ui_text(prop, "Selection End Line", "End line of selection");
- prop= RNA_def_property(srna, "select_end_character", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "select_end_character", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "selc");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Selection End Character", "Index of character after end of selection in the selection end line");
- prop= RNA_def_property(srna, "markers", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "markers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "TextMarker");
RNA_def_property_ui_text(prop, "Markers", "Text markers highlighting part of the text");
diff --git a/source/blender/makesrna/intern/rna_text_api.c b/source/blender/makesrna/intern/rna_text_api.c
index acfcad80f19..3f511858332 100644
--- a/source/blender/makesrna/intern/rna_text_api.c
+++ b/source/blender/makesrna/intern/rna_text_api.c
@@ -54,12 +54,12 @@ void RNA_api_text(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *prop;
- func= RNA_def_function(srna, "clear", "rna_Text_clear");
+ func = RNA_def_function(srna, "clear", "rna_Text_clear");
RNA_def_function_ui_description(func, "clear the text block");
- func= RNA_def_function(srna, "write", "rna_Text_write");
+ func = RNA_def_function(srna, "write", "rna_Text_write");
RNA_def_function_ui_description(func, "write text at the cursor location and advance to the end of the text block");
- prop= RNA_def_string(func, "text", "Text", 0, "", "New text for this datablock");
+ prop = RNA_def_string(func, "text", "Text", 0, "", "New text for this datablock");
RNA_def_property_flag(prop, PROP_REQUIRED);
}
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index ba8460e5477..bfe23e97dd9 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -67,7 +67,7 @@ EnumPropertyItem texture_type_items[] = {
{TEX_MUSGRAVE, "MUSGRAVE", ICON_TEXTURE, "Musgrave", "Procedural - highly flexible fractal noise texture"},
{TEX_NOISE, "NOISE", ICON_TEXTURE, "Noise",
"Procedural - random noise, gives a different result every time, for every frame, for every pixel"},
- //{TEX_PLUGIN, "PLUGIN", ICON_PLUGIN, "Plugin", ""}, /* Nothing yet */
+ /*{TEX_PLUGIN, "PLUGIN", ICON_PLUGIN, "Plugin", ""}, *//* Nothing yet */
{TEX_POINTDENSITY, "POINT_DENSITY", ICON_TEXTURE, "Point Density", ""},
{TEX_STUCCI, "STUCCI", ICON_TEXTURE, "Stucci", "Procedural - create a fractal noise texture"},
{TEX_VORONOI, "VORONOI", ICON_TEXTURE, "Voronoi", "Procedural - create cell-like patterns based on Worley noise"},
@@ -113,9 +113,9 @@ EnumPropertyItem blend_type_items[] = {
static StructRNA *rna_Texture_refine(struct PointerRNA *ptr)
{
- Tex *tex= (Tex*)ptr->data;
+ Tex *tex = (Tex*)ptr->data;
- switch(tex->type) {
+ switch (tex->type) {
case TEX_BLEND:
return &RNA_BlendTexture;
case TEX_CLOUDS:
@@ -155,17 +155,17 @@ static StructRNA *rna_Texture_refine(struct PointerRNA *ptr)
static void rna_Texture_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
- ID *id= ptr->id.data;
+ ID *id = ptr->id.data;
- if(GS(id->name) == ID_TE) {
- Tex *tex= ptr->id.data;
+ if (GS(id->name) == ID_TE) {
+ Tex *tex = ptr->id.data;
DAG_id_tag_update(&tex->id, 0);
WM_main_add_notifier(NC_TEXTURE, tex);
WM_main_add_notifier(NC_MATERIAL|ND_SHADING_DRAW, NULL);
}
- else if(GS(id->name) == ID_NT) {
- bNodeTree *ntree= ptr->id.data;
+ else if (GS(id->name) == ID_NT) {
+ bNodeTree *ntree = ptr->id.data;
ED_node_generic_update(bmain, ntree, NULL);
}
}
@@ -184,7 +184,7 @@ static void rna_Color_mapping_update(Main *bmain, Scene *scene, PointerRNA *ptr)
static void rna_Texture_voxeldata_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Tex *tex= ptr->id.data;
+ Tex *tex = ptr->id.data;
tex->vd->ok = 0;
rna_Texture_update(bmain, scene, ptr);
@@ -192,9 +192,9 @@ static void rna_Texture_voxeldata_update(Main *bmain, Scene *scene, PointerRNA *
static void rna_Texture_voxeldata_image_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Tex *tex= ptr->id.data;
+ Tex *tex = ptr->id.data;
- if(tex->ima) { /* may be getting cleared too */
+ if (tex->ima) { /* may be getting cleared too */
tex->ima->source = IMA_SRC_SEQUENCE;
}
rna_Texture_voxeldata_update(bmain, scene, ptr);
@@ -204,7 +204,7 @@ static void rna_Texture_voxeldata_image_update(Main *bmain, Scene *scene, Pointe
/* Used for Texture Properties, used (also) for/in Nodes */
static void rna_Texture_nodes_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- Tex *tex= ptr->id.data;
+ Tex *tex = ptr->id.data;
DAG_id_tag_update(&tex->id, 0);
WM_main_add_notifier(NC_TEXTURE|ND_NODES, tex);
@@ -212,18 +212,18 @@ static void rna_Texture_nodes_update(Main *UNUSED(bmain), Scene *UNUSED(scene),
static void rna_Texture_type_set(PointerRNA *ptr, int value)
{
- Tex *tex= (Tex*)ptr->data;
+ Tex *tex = (Tex*)ptr->data;
tex_set_type(tex, value);
}
void rna_TextureSlot_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- ID *id= ptr->id.data;
+ ID *id = ptr->id.data;
DAG_id_tag_update(id, 0);
- switch(GS(id->name)) {
+ switch (GS(id->name)) {
case ID_MA:
WM_main_add_notifier(NC_MATERIAL|ND_SHADING, id);
WM_main_add_notifier(NC_MATERIAL|ND_SHADING_DRAW, id);
@@ -239,12 +239,12 @@ void rna_TextureSlot_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRN
break;
case ID_PA:
{
- MTex *mtex= ptr->data;
+ MTex *mtex = ptr->data;
int recalc = OB_RECALC_DATA;
- if(mtex->mapto & PAMAP_INIT)
+ if (mtex->mapto & PAMAP_INIT)
recalc |= PSYS_RECALC_RESET;
- if(mtex->mapto & PAMAP_CHILD)
+ if (mtex->mapto & PAMAP_CHILD)
recalc |= PSYS_RECALC_CHILD;
DAG_id_tag_update(id, recalc);
@@ -256,7 +256,7 @@ void rna_TextureSlot_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRN
char *rna_TextureSlot_path(PointerRNA *ptr)
{
- MTex *mtex= ptr->data;
+ MTex *mtex = ptr->data;
/* if there is ID-data, resolve the path using the index instead of by name,
* since the name used is the name of the texture assigned, but the texture
@@ -268,11 +268,11 @@ char *rna_TextureSlot_path(PointerRNA *ptr)
/* find the 'textures' property of the ID-struct */
RNA_id_pointer_create(ptr->id.data, &id_ptr);
- prop= RNA_struct_find_property(&id_ptr, "texture_slots");
+ prop = RNA_struct_find_property(&id_ptr, "texture_slots");
/* get an iterator for this property, and try to find the relevant index */
if (prop) {
- int index= RNA_property_collection_lookup_index(&id_ptr, prop, ptr);
+ int index = RNA_property_collection_lookup_index(&id_ptr, prop, ptr);
if (index >= 0)
return BLI_sprintfN("texture_slots[%d]", index);
@@ -288,9 +288,9 @@ char *rna_TextureSlot_path(PointerRNA *ptr)
static int rna_TextureSlot_name_length(PointerRNA *ptr)
{
- MTex *mtex= ptr->data;
+ MTex *mtex = ptr->data;
- if(mtex->tex)
+ if (mtex->tex)
return strlen(mtex->tex->id.name+2);
return 0;
@@ -298,49 +298,49 @@ static int rna_TextureSlot_name_length(PointerRNA *ptr)
static void rna_TextureSlot_name_get(PointerRNA *ptr, char *str)
{
- MTex *mtex= ptr->data;
+ MTex *mtex = ptr->data;
- if(mtex->tex)
+ if (mtex->tex)
strcpy(str, mtex->tex->id.name+2);
else
- str[0]= '\0';
+ str[0] = '\0';
}
static int rna_TextureSlot_output_node_get(PointerRNA *ptr)
{
- MTex *mtex= ptr->data;
- Tex *tex= mtex->tex;
- int cur= mtex->which_output;
+ MTex *mtex = ptr->data;
+ Tex *tex = mtex->tex;
+ int cur = mtex->which_output;
- if(tex) {
- bNodeTree *ntree= tex->nodetree;
+ if (tex) {
+ bNodeTree *ntree = tex->nodetree;
bNode *node;
- if(ntree) {
- for(node= ntree->nodes.first; node; node= node->next) {
- if(node->type == TEX_NODE_OUTPUT) {
- if(cur == node->custom1)
+ if (ntree) {
+ for (node = ntree->nodes.first; node; node = node->next) {
+ if (node->type == TEX_NODE_OUTPUT) {
+ if (cur == node->custom1)
return cur;
}
}
}
}
- mtex->which_output= 0;
+ mtex->which_output = 0;
return 0;
}
static EnumPropertyItem *rna_TextureSlot_output_node_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
{
- MTex *mtex= ptr->data;
- Tex *tex= mtex->tex;
- EnumPropertyItem *item= NULL;
- int totitem= 0;
-
- if(tex) {
- bNodeTree *ntree= tex->nodetree;
- if(ntree) {
- EnumPropertyItem tmp= {0, "", 0, "", ""};
+ MTex *mtex = ptr->data;
+ Tex *tex = mtex->tex;
+ EnumPropertyItem *item = NULL;
+ int totitem = 0;
+
+ if (tex) {
+ bNodeTree *ntree = tex->nodetree;
+ if (ntree) {
+ EnumPropertyItem tmp = {0, "", 0, "", ""};
bNode *node;
tmp.value = 0;
@@ -348,10 +348,10 @@ static EnumPropertyItem *rna_TextureSlot_output_node_itemf(bContext *C, PointerR
tmp.identifier = "NOT_SPECIFIED";
RNA_enum_item_add(&item, &totitem, &tmp);
- for(node= ntree->nodes.first; node; node= node->next) {
- if(node->type == TEX_NODE_OUTPUT) {
- tmp.value= node->custom1;
- tmp.name= ((TexNodeOutput*)node->storage)->name;
+ for (node = ntree->nodes.first; node; node = node->next) {
+ if (node->type == TEX_NODE_OUTPUT) {
+ tmp.value = node->custom1;
+ tmp.name = ((TexNodeOutput*)node->storage)->name;
tmp.identifier = tmp.name;
RNA_enum_item_add(&item, &totitem, &tmp);
}
@@ -367,37 +367,37 @@ static EnumPropertyItem *rna_TextureSlot_output_node_itemf(bContext *C, PointerR
static void rna_Texture_use_color_ramp_set(PointerRNA *ptr, int value)
{
- Tex *tex= (Tex*)ptr->data;
+ Tex *tex = (Tex*)ptr->data;
- if(value) tex->flag |= TEX_COLORBAND;
+ if (value) tex->flag |= TEX_COLORBAND;
else tex->flag &= ~TEX_COLORBAND;
- if((tex->flag & TEX_COLORBAND) && tex->coba == NULL)
- tex->coba= add_colorband(0);
+ if ((tex->flag & TEX_COLORBAND) && tex->coba == NULL)
+ tex->coba = add_colorband(0);
}
static void rna_Texture_use_nodes_set(PointerRNA *ptr, int v)
{
- Tex *tex= (Tex*)ptr->data;
+ Tex *tex = (Tex*)ptr->data;
tex->use_nodes = v;
tex->type = 0;
- if(v && tex->nodetree==NULL)
+ if (v && tex->nodetree == NULL)
ED_node_texture_default(tex);
}
static void rna_ImageTexture_mipmap_set(PointerRNA *ptr, int value)
{
- Tex *tex= (Tex*)ptr->data;
+ Tex *tex = (Tex*)ptr->data;
- if(value) tex->imaflag |= TEX_MIPMAP;
+ if (value) tex->imaflag |= TEX_MIPMAP;
else tex->imaflag &= ~TEX_MIPMAP;
}
static void rna_Envmap_source_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Tex *tex= ptr->id.data;
+ Tex *tex = ptr->id.data;
if (tex->env)
BKE_free_envmapdata(tex->env);
@@ -407,13 +407,13 @@ static void rna_Envmap_source_update(Main *bmain, Scene *scene, PointerRNA *ptr)
static PointerRNA rna_PointDensity_psys_get(PointerRNA *ptr)
{
- PointDensity *pd= ptr->data;
- Object *ob= pd->object;
- ParticleSystem *psys= NULL;
+ PointDensity *pd = ptr->data;
+ Object *ob = pd->object;
+ ParticleSystem *psys = NULL;
PointerRNA value;
- if(ob && pd->psys)
- psys= BLI_findlink(&ob->particlesystem, pd->psys-1);
+ if (ob && pd->psys)
+ psys = BLI_findlink(&ob->particlesystem, pd->psys-1);
RNA_pointer_create(&ob->id, &RNA_ParticleSystem, psys, &value);
return value;
@@ -421,11 +421,11 @@ static PointerRNA rna_PointDensity_psys_get(PointerRNA *ptr)
static void rna_PointDensity_psys_set(PointerRNA *ptr, PointerRNA value)
{
- PointDensity *pd= ptr->data;
- Object *ob= pd->object;
+ PointDensity *pd = ptr->data;
+ Object *ob = pd->object;
- if(ob && value.id.data == ob)
- pd->psys= BLI_findindex(&ob->particlesystem, value.data) + 1;
+ if (ob && value.id.data == ob)
+ pd->psys = BLI_findindex(&ob->particlesystem, value.data) + 1;
}
static char *rna_PointDensity_path(PointerRNA *UNUSED(ptr))
@@ -464,63 +464,63 @@ static void rna_def_texmapping(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "TexMapping", NULL);
+ srna = RNA_def_struct(brna, "TexMapping", NULL);
RNA_def_struct_ui_text(srna, "Texture Mapping", "Texture coordinate mapping settings");
- prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "loc");
RNA_def_property_ui_text(prop, "Location", "");
RNA_def_property_update(prop, 0, "rna_Texture_mapping_update");
- prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_EULER); /* Not PROP_XYZ, this is now in radians, no more degrees */
+ prop = RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_EULER); /* Not PROP_XYZ, this is now in radians, no more degrees */
RNA_def_property_float_sdna(prop, NULL, "rot");
RNA_def_property_ui_text(prop, "Rotation", "");
RNA_def_property_update(prop, 0, "rna_Texture_mapping_update");
- prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "scale", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_ui_text(prop, "Scale", "");
RNA_def_property_update(prop, 0, "rna_Texture_mapping_update");
- prop= RNA_def_property(srna, "min", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "min", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "min");
RNA_def_property_ui_text(prop, "Minimum", "Minimum value for clipping");
RNA_def_property_update(prop, 0, "rna_Texture_mapping_update");
- prop= RNA_def_property(srna, "max", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "max", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "max");
RNA_def_property_ui_text(prop, "Maximum", "Maximum value for clipping");
RNA_def_property_update(prop, 0, "rna_Texture_mapping_update");
- prop= RNA_def_property(srna, "use_min", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_min", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEXMAP_CLIP_MIN);
RNA_def_property_ui_text(prop, "Has Minimum", "Whether to use minimum clipping value");
RNA_def_property_update(prop, 0, "rna_Texture_mapping_update");
- prop= RNA_def_property(srna, "use_max", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_max", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEXMAP_CLIP_MAX);
RNA_def_property_ui_text(prop, "Has Maximum", "Whether to use maximum clipping value");
RNA_def_property_update(prop, 0, "rna_Texture_mapping_update");
- prop= RNA_def_property(srna, "mapping_x", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mapping_x", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "projx");
RNA_def_property_enum_items(prop, prop_xyz_mapping_items);
RNA_def_property_ui_text(prop, "X Mapping", "");
RNA_def_property_update(prop, 0, "rna_Texture_mapping_update");
- prop= RNA_def_property(srna, "mapping_y", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mapping_y", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "projy");
RNA_def_property_enum_items(prop, prop_xyz_mapping_items);
RNA_def_property_ui_text(prop, "Y Mapping", "");
RNA_def_property_update(prop, 0, "rna_Texture_mapping_update");
- prop= RNA_def_property(srna, "mapping_z", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mapping_z", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "projz");
RNA_def_property_enum_items(prop, prop_xyz_mapping_items);
RNA_def_property_ui_text(prop, "Z Mapping", "");
RNA_def_property_update(prop, 0, "rna_Texture_mapping_update");
- prop= RNA_def_property(srna, "mapping", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mapping", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_mapping_items);
RNA_def_property_ui_text(prop, "Mapping", "");
RNA_def_property_update(prop, 0, "rna_Texture_mapping_update");
@@ -531,47 +531,47 @@ static void rna_def_colormapping(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ColorMapping", NULL);
+ srna = RNA_def_struct(brna, "ColorMapping", NULL);
RNA_def_struct_ui_text(srna, "Color Mapping", "Color mapping settings");
- prop= RNA_def_property(srna, "use_color_ramp", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_color_ramp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", COLORMAP_USE_RAMP);
RNA_def_property_ui_text(prop, "Use Color Ramp", "Toggle color ramp operations");
RNA_def_property_update(prop, 0, "rna_Color_mapping_update");
- prop= RNA_def_property(srna, "color_ramp", PROP_POINTER, PROP_NEVER_NULL);
+ prop = RNA_def_property(srna, "color_ramp", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "coba");
RNA_def_property_struct_type(prop, "ColorRamp");
RNA_def_property_ui_text(prop, "Color Ramp", "");
RNA_def_property_update(prop, 0, "rna_Color_mapping_update");
- prop= RNA_def_property(srna, "brightness", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "brightness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bright");
RNA_def_property_range(prop, 0, 2);
RNA_def_property_ui_text(prop, "Brightness", "Adjust the brightness of the texture");
RNA_def_property_update(prop, 0, "rna_Color_mapping_update");
- prop= RNA_def_property(srna, "contrast", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "contrast", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.01, 5);
RNA_def_property_ui_text(prop, "Contrast", "Adjust the contrast of the texture");
RNA_def_property_update(prop, 0, "rna_Color_mapping_update");
- prop= RNA_def_property(srna, "saturation", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "saturation", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0, 2);
RNA_def_property_ui_text(prop, "Saturation", "Adjust the saturation of colors in the texture");
RNA_def_property_update(prop, 0, "rna_Color_mapping_update");
- prop= RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, blend_type_items);
RNA_def_property_ui_text(prop, "Blend Type", "Mode used to mix with texture output color");
RNA_def_property_update(prop, 0, "rna_Color_mapping_update");
- prop= RNA_def_property(srna, "blend_color", PROP_FLOAT, PROP_COLOR);
+ prop = RNA_def_property(srna, "blend_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Color", "Blend color to mix with texture output color");
RNA_def_property_update(prop, 0, "rna_Color_mapping_update");
- prop= RNA_def_property(srna, "blend_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "blend_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_ui_text(prop, "Blend Factor", "");
RNA_def_property_update(prop, 0, "rna_Color_mapping_update");
}
@@ -585,20 +585,20 @@ static void rna_def_mtex(BlenderRNA *brna)
{0, "DUMMY", 0, "Dummy", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "TextureSlot", NULL);
+ srna = RNA_def_struct(brna, "TextureSlot", NULL);
RNA_def_struct_sdna(srna, "MTex");
RNA_def_struct_ui_text(srna, "Texture Slot", "Texture slot defining the mapping and influence of a texture");
RNA_def_struct_path_func(srna, "rna_TextureSlot_path");
RNA_def_struct_ui_icon(srna, ICON_TEXTURE_DATA);
- prop= RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tex");
RNA_def_property_struct_type(prop, "Texture");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Texture", "Texture datablock used by this texture slot");
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_TextureSlot_name_get", "rna_TextureSlot_name_length", NULL);
RNA_def_property_ui_text(prop, "Name", "Texture slot name");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -606,53 +606,53 @@ static void rna_def_mtex(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
/* mapping */
- prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "ofs");
RNA_def_property_ui_range(prop, -10, 10, 10, 2);
RNA_def_property_ui_text(prop, "Offset", "Fine tune of the texture mapping X, Y and Z locations");
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
- prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "scale", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_ui_range(prop, -100, 100, 10, 2);
RNA_def_property_ui_text(prop, "Size", "Set scaling for the texture's X, Y and Z sizes");
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
- prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
+ 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",
"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);
+ prop = RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "blendtype");
RNA_def_property_enum_items(prop, blend_type_items);
RNA_def_property_ui_text(prop, "Blend Type", "Mode used to apply the texture");
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
- prop= RNA_def_property(srna, "use_stencil", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_stencil", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_STENCIL);
RNA_def_property_ui_text(prop, "Stencil", "Use this texture as a blending value on the next texture");
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
- prop= RNA_def_property(srna, "invert", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_NEGATIVE);
RNA_def_property_ui_text(prop, "Negate", "Invert the values of the texture to reverse its effect");
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
- prop= RNA_def_property(srna, "use_rgb_to_intensity", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_rgb_to_intensity", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_RGBTOINT);
RNA_def_property_ui_text(prop, "RGB to Intensity", "Convert texture RGB values to intensity (gray) values");
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
- prop= RNA_def_property(srna, "default_value", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "default_value", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "def_var");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Default Value", "Value to use for Ref, Spec, Amb, Emit, Alpha, RayMir, TransLu and Hard");
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
- prop= RNA_def_property(srna, "output_node", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "output_node", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "which_output");
RNA_def_property_enum_items(prop, output_node_items);
RNA_def_property_enum_funcs(prop, "rna_TextureSlot_output_node_get", NULL, "rna_TextureSlot_output_node_itemf");
@@ -664,43 +664,43 @@ static void rna_def_filter_common(StructRNA *srna)
{
PropertyRNA *prop;
- prop= RNA_def_property(srna, "use_mipmap", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_mipmap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_MIPMAP);
RNA_def_property_boolean_funcs(prop, NULL, "rna_ImageTexture_mipmap_set");
RNA_def_property_ui_text(prop, "MIP Map", "Use auto-generated MIP maps for the image");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "use_mipmap_gauss", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_mipmap_gauss", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_GAUSS_MIP);
RNA_def_property_ui_text(prop, "MIP Map Gaussian filter", "Use Gauss filter to sample down MIP maps");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "filter_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "filter_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "texfilter");
RNA_def_property_enum_items(prop, texture_filter_items);
RNA_def_property_ui_text(prop, "Filter", "Texture filter to use for sampling image");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "filter_probes", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "filter_probes", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "afmax");
RNA_def_property_range(prop, 1, 256);
RNA_def_property_ui_text(prop, "Filter Probes",
"Maximum number of samples (higher gives less blur at distant/oblique angles, but is also slower)");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "filter_eccentricity", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "filter_eccentricity", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "afmax");
RNA_def_property_range(prop, 1, 256);
RNA_def_property_ui_text(prop, "Filter Eccentricity",
"Maximum eccentricity (higher gives less blur at distant/oblique angles, but is also slower)");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "use_filter_size_min", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_filter_size_min", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_FILTER_MIN);
RNA_def_property_ui_text(prop, "Minimum Filter Size", "Use Filter Size as a minimal filter value in pixels");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "filter_size", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "filter_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "filtersize");
RNA_def_property_range(prop, 0.1, 50.0);
RNA_def_property_ui_range(prop, 0.1, 50.0, 1, 0.2);
@@ -724,67 +724,67 @@ static void rna_def_environment_map(BlenderRNA *brna)
{ENV_PLANE, "PLANE", 0, "Plane", "Only one side is rendered, with Z axis pointing in direction of image"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "EnvironmentMap", NULL);
+ srna = RNA_def_struct(brna, "EnvironmentMap", NULL);
RNA_def_struct_sdna(srna, "EnvMap");
RNA_def_struct_ui_text(srna, "EnvironmentMap", "Environment map created by the renderer and cached for subsequent renders");
- prop= RNA_def_property(srna, "source", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "source", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "stype");
RNA_def_property_enum_items(prop, prop_source_items);
RNA_def_property_ui_text(prop, "Source", "");
RNA_def_property_update(prop, 0, "rna_Envmap_source_update");
- prop= RNA_def_property(srna, "viewpoint_object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "viewpoint_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "object");
RNA_def_property_ui_text(prop, "Viewpoint Object", "Object to use as the environment map's viewpoint location");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "mapping", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "mapping", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, prop_mapping_items);
RNA_def_property_ui_text(prop, "Mapping", "");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clipsta");
RNA_def_property_range(prop, 0.001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.01, 50, 100, 2);
RNA_def_property_ui_text(prop, "Clip Start", "Objects nearer than this are not visible to map");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "clipend");
RNA_def_property_range(prop, 0.01, FLT_MAX);
RNA_def_property_ui_range(prop, 0.10, 20000, 100, 2);
RNA_def_property_ui_text(prop, "Clip End", "Objects further than this are not visible to map");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "zoom", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "zoom", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "viewscale");
RNA_def_property_range(prop, 0.1, 5.0);
RNA_def_property_ui_range(prop, 0.5, 1.5, 1, 2);
RNA_def_property_ui_text(prop, "Zoom", "");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "layers_ignore", PROP_BOOLEAN, PROP_LAYER_MEMBER);
+ prop = RNA_def_property(srna, "layers_ignore", PROP_BOOLEAN, PROP_LAYER_MEMBER);
RNA_def_property_boolean_sdna(prop, NULL, "notlay", 1);
RNA_def_property_array(prop, 20);
RNA_def_property_ui_text(prop, "Ignore Layers", "Hide objects on these layers when generating the Environment Map");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "resolution", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "resolution", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "cuberes");
RNA_def_property_range(prop, 50, 4096);
RNA_def_property_ui_text(prop, "Resolution", "Pixel resolution of the rendered environment map");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "depth", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "depth", PROP_INT, PROP_UNSIGNED);
RNA_def_property_range(prop, 0, 5);
RNA_def_property_ui_text(prop, "Depth", "Number of times a map will be rendered recursively (mirror effects)");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "is_valid", PROP_BOOLEAN, 0);
+ prop = RNA_def_property(srna, "is_valid", PROP_BOOLEAN, 0);
RNA_def_property_boolean_sdna(prop, NULL, "ok", 2);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Validity", "True if this map is ready for use, False if it needs rendering");
@@ -830,43 +830,43 @@ static void rna_def_texture_clouds(BlenderRNA *brna)
{TEX_COLOR, "COLOR", 0, "Color", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "CloudsTexture", "Texture");
+ srna = RNA_def_struct(brna, "CloudsTexture", "Texture");
RNA_def_struct_ui_text(srna, "Clouds Texture", "Procedural noise texture");
RNA_def_struct_sdna(srna, "Tex");
- prop= RNA_def_property(srna, "noise_scale", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "noise_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "noisesize");
RNA_def_property_range(prop, 0.0001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2);
RNA_def_property_ui_text(prop, "Noise Size", "Scaling for noise input");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "noise_depth", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "noise_depth", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "noisedepth");
RNA_def_property_range(prop, 0, 30);
RNA_def_property_ui_range(prop, 0, 24, 0, 2);
RNA_def_property_ui_text(prop, "Noise Depth", "Depth of the cloud calculation");
RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
- prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noisebasis");
RNA_def_property_enum_items(prop, prop_noise_basis_items);
RNA_def_property_ui_text(prop, "Noise Basis", "Noise basis used for turbulence");
RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
- prop= RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noisetype");
RNA_def_property_enum_items(prop, prop_noise_type);
RNA_def_property_ui_text(prop, "Noise Type", "");
RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
- prop= RNA_def_property(srna, "cloud_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "cloud_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "stype");
RNA_def_property_enum_items(prop, prop_clouds_stype);
RNA_def_property_ui_text(prop, "Color", "Determine whether Noise returns grayscale or RGB values");
RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
- prop= RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.001, 0.1);
RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2);
RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal");
@@ -891,49 +891,49 @@ static void rna_def_texture_wood(BlenderRNA *brna)
{TEX_TRI, "TRI", 0, "Tri", "Use a triangle wave to produce bands"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "WoodTexture", "Texture");
+ srna = RNA_def_struct(brna, "WoodTexture", "Texture");
RNA_def_struct_ui_text(srna, "Wood Texture", "Procedural noise texture");
RNA_def_struct_sdna(srna, "Tex");
- prop= RNA_def_property(srna, "noise_scale", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "noise_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "noisesize");
RNA_def_property_range(prop, 0.0001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2);
RNA_def_property_ui_text(prop, "Noise Size", "Scaling for noise input");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "turbulence", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "turbulence", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "turbul");
RNA_def_property_range(prop, 0.0001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0001, 200, 10, 2);
RNA_def_property_ui_text(prop, "Turbulence", "Turbulence of the bandnoise and ringnoise types");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noisebasis");
RNA_def_property_enum_items(prop, prop_noise_basis_items);
RNA_def_property_ui_text(prop, "Noise Basis", "Noise basis used for turbulence");
RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
- prop= RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noisetype");
RNA_def_property_enum_items(prop, prop_noise_type);
RNA_def_property_ui_text(prop, "Noise Type", "");
RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
- prop= RNA_def_property(srna, "wood_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "wood_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "stype");
RNA_def_property_enum_items(prop, prop_wood_stype);
RNA_def_property_ui_text(prop, "Pattern", "");
RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
- prop= RNA_def_property(srna, "noise_basis_2", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "noise_basis_2", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noisebasis2");
RNA_def_property_enum_items(prop, prop_wood_noisebasis2);
RNA_def_property_ui_text(prop, "Noise Basis 2", "");
RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
- prop= RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.001, 0.1);
RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2);
RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal");
@@ -958,56 +958,56 @@ static void rna_def_texture_marble(BlenderRNA *brna)
{TEX_TRI, "TRI", 0, "Tri", "Use a triangle wave to produce bands"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "MarbleTexture", "Texture");
+ srna = RNA_def_struct(brna, "MarbleTexture", "Texture");
RNA_def_struct_ui_text(srna, "Marble Texture", "Procedural noise texture");
RNA_def_struct_sdna(srna, "Tex");
- prop= RNA_def_property(srna, "noise_scale", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "noise_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "noisesize");
RNA_def_property_range(prop, 0.0001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2);
RNA_def_property_ui_text(prop, "Noise Size", "Scaling for noise input");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "turbulence", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "turbulence", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "turbul");
RNA_def_property_range(prop, 0.0001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0001, 200, 10, 2);
RNA_def_property_ui_text(prop, "Turbulence", "Turbulence of the bandnoise and ringnoise types");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "noise_depth", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "noise_depth", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "noisedepth");
RNA_def_property_range(prop, 0, 30);
RNA_def_property_ui_range(prop, 0, 24, 0, 2);
RNA_def_property_ui_text(prop, "Noise Depth", "Depth of the cloud calculation");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noisetype");
RNA_def_property_enum_items(prop, prop_noise_type);
RNA_def_property_ui_text(prop, "Noise Type", "");
RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
- prop= RNA_def_property(srna, "marble_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "marble_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "stype");
RNA_def_property_enum_items(prop, prop_marble_stype);
RNA_def_property_ui_text(prop, "Pattern", "");
RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
- prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noisebasis");
RNA_def_property_enum_items(prop, prop_noise_basis_items);
RNA_def_property_ui_text(prop, "Noise Basis", "Noise basis used for turbulence");
RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
- prop= RNA_def_property(srna, "noise_basis_2", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "noise_basis_2", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noisebasis2");
RNA_def_property_enum_items(prop, prop_marble_noisebasis2);
RNA_def_property_ui_text(prop, "Noise Basis 2", "");
RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
- prop= RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.001, 0.1);
RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2);
RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal");
@@ -1020,18 +1020,18 @@ static void rna_def_texture_magic(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "MagicTexture", "Texture");
+ srna = RNA_def_struct(brna, "MagicTexture", "Texture");
RNA_def_struct_ui_text(srna, "Magic Texture", "Procedural noise texture");
RNA_def_struct_sdna(srna, "Tex");
- prop= RNA_def_property(srna, "turbulence", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "turbulence", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "turbul");
RNA_def_property_range(prop, 0.0001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0001, 200, 10, 2);
RNA_def_property_ui_text(prop, "Turbulence", "Turbulence of the noise");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "noise_depth", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "noise_depth", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "noisedepth");
RNA_def_property_range(prop, 0, 30);
RNA_def_property_ui_range(prop, 0, 24, 0, 2);
@@ -1054,22 +1054,22 @@ static void rna_def_texture_blend(BlenderRNA *brna)
{TEX_RAD, "RADIAL", 0, "Radial", "Create a radial progression"},
{0, NULL, 0, NULL, NULL}};
- static const EnumPropertyItem prop_flip_axis_items[]= {
+ static const EnumPropertyItem prop_flip_axis_items[] = {
{0, "HORIZONTAL", 0, "Horizontal", "No flipping"},
{TEX_FLIPBLEND, "VERTICAL", 0, "Vertical", "Flip the texture's X and Y axis"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "BlendTexture", "Texture");
+ srna = RNA_def_struct(brna, "BlendTexture", "Texture");
RNA_def_struct_ui_text(srna, "Blend Texture", "Procedural color blending texture");
RNA_def_struct_sdna(srna, "Tex");
- prop= RNA_def_property(srna, "progression", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "progression", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "stype");
RNA_def_property_enum_items(prop, prop_blend_progression);
RNA_def_property_ui_text(prop, "Progression", "Style of the color blending");
RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
- prop= RNA_def_property(srna, "use_flip_axis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "use_flip_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, prop_flip_axis_items);
RNA_def_property_ui_text(prop, "Flip Axis", "Flip the texture's X and Y axis");
@@ -1088,37 +1088,37 @@ static void rna_def_texture_stucci(BlenderRNA *brna)
{TEX_WALLOUT, "WALL_OUT", 0, "Wall out", "Create Ridges"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "StucciTexture", "Texture");
+ srna = RNA_def_struct(brna, "StucciTexture", "Texture");
RNA_def_struct_ui_text(srna, "Stucci Texture", "Procedural noise texture");
RNA_def_struct_sdna(srna, "Tex");
- prop= RNA_def_property(srna, "turbulence", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "turbulence", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "turbul");
RNA_def_property_range(prop, 0.0001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0001, 200, 10, 2);
RNA_def_property_ui_text(prop, "Turbulence", "Turbulence of the noise");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noisebasis");
RNA_def_property_enum_items(prop, prop_noise_basis_items);
RNA_def_property_ui_text(prop, "Noise Basis", "Noise basis used for turbulence");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "noise_scale", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "noise_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "noisesize");
RNA_def_property_range(prop, 0.0001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2);
RNA_def_property_ui_text(prop, "Noise Size", "Scaling for noise input");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noisetype");
RNA_def_property_enum_items(prop, prop_noise_type);
RNA_def_property_ui_text(prop, "Noise Type", "");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "stucci_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "stucci_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "stype");
RNA_def_property_enum_items(prop, prop_stucci_stype);
RNA_def_property_ui_text(prop, "Pattern", "");
@@ -1129,7 +1129,7 @@ static void rna_def_texture_noise(BlenderRNA *brna)
{
StructRNA *srna;
- srna= RNA_def_struct(brna, "NoiseTexture", "Texture");
+ srna = RNA_def_struct(brna, "NoiseTexture", "Texture");
RNA_def_struct_ui_text(srna, "Noise Texture", "Procedural noise texture");
RNA_def_struct_sdna(srna, "Tex");
}
@@ -1148,77 +1148,77 @@ static void rna_def_texture_image(BlenderRNA *brna)
{TEX_CHECKER, "CHECKER", 0, "Checker", "Cause the image to repeat in checker board pattern"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "ImageTexture", "Texture");
+ srna = RNA_def_struct(brna, "ImageTexture", "Texture");
RNA_def_struct_ui_text(srna, "Image Texture", "");
RNA_def_struct_sdna(srna, "Tex");
- prop= RNA_def_property(srna, "use_interpolation", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_interpolation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_INTERPOL);
RNA_def_property_ui_text(prop, "Interpolation", "Interpolate pixels using selected filter");
RNA_def_property_update(prop, 0, "rna_Texture_update");
/* XXX: I think flip_axis should be a generic Texture property, enabled for all the texture types */
- prop= RNA_def_property(srna, "use_flip_axis", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_flip_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_IMAROT);
RNA_def_property_ui_text(prop, "Flip Axis", "Flip the texture's X and Y axis");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "use_alpha", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_alpha", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_USEALPHA);
RNA_def_property_ui_text(prop, "Use Alpha", "Use the alpha channel information in the image");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "use_calculate_alpha", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_calculate_alpha", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_CALCALPHA);
RNA_def_property_ui_text(prop, "Calculate Alpha", "Calculate an alpha channel based on RGB values in the image");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "invert_alpha", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_alpha", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_NEGALPHA);
RNA_def_property_ui_text(prop, "Invert Alpha", "Invert all the alpha values in the image");
RNA_def_property_update(prop, 0, "rna_Texture_update");
rna_def_filter_common(srna);
- prop= RNA_def_property(srna, "extension", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "extension", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "extend");
RNA_def_property_enum_items(prop, prop_image_extension);
RNA_def_property_ui_text(prop, "Extension", "How the image is extrapolated past its original bounds");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "repeat_x", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "repeat_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "xrepeat");
RNA_def_property_range(prop, 1, 512);
RNA_def_property_ui_text(prop, "Repeat X", "Repetition multiplier in the X direction");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "repeat_y", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "repeat_y", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "yrepeat");
RNA_def_property_range(prop, 1, 512);
RNA_def_property_ui_text(prop, "Repeat Y", "Repetition multiplier in the Y direction");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "use_mirror_x", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_mirror_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_REPEAT_XMIR);
RNA_def_property_ui_text(prop, "Mirror X", "Mirror the image repetition on the X direction");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "use_mirror_y", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_mirror_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_REPEAT_YMIR);
RNA_def_property_ui_text(prop, "Mirror Y", "Mirror the image repetition on the Y direction");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "use_checker_odd", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_checker_odd", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_CHECKER_ODD);
RNA_def_property_ui_text(prop, "Checker Odd", "Odd checker tiles");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "use_checker_even", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_checker_even", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_CHECKER_EVEN);
RNA_def_property_ui_text(prop, "Checker Even", "Even checker tiles");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "checker_distance", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "checker_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "checkerdist");
RNA_def_property_range(prop, 0.0, 0.99);
RNA_def_property_ui_range(prop, 0.0, 0.99, 0.1, 0.01);
@@ -1230,7 +1230,7 @@ static void rna_def_texture_image(BlenderRNA *brna)
/* XXX: did this as an array, but needs better descriptions than "1 2 3 4"
perhaps a new subtype could be added?
--I actually used single values for this, maybe change later with a RNA_Rect thing? */
- prop= RNA_def_property(srna, "crop_rectangle", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "crop_rectangle", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "cropxmin");
RNA_def_property_array(prop, 4);
RNA_def_property_range(prop, -10, 10);
@@ -1239,54 +1239,54 @@ static void rna_def_texture_image(BlenderRNA *brna)
#endif
- prop= RNA_def_property(srna, "crop_min_x", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "crop_min_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "cropxmin");
RNA_def_property_range(prop, -10.0, 10.0);
RNA_def_property_ui_range(prop, -10.0, 10.0, 1, 0.2);
RNA_def_property_ui_text(prop, "Crop Minimum X", "Minimum X value to crop the image");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "crop_min_y", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "crop_min_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "cropymin");
RNA_def_property_range(prop, -10.0, 10.0);
RNA_def_property_ui_range(prop, -10.0, 10.0, 1, 0.2);
RNA_def_property_ui_text(prop, "Crop Minimum Y", "Minimum Y value to crop the image");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "crop_max_x", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "crop_max_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "cropxmax");
RNA_def_property_range(prop, -10.0, 10.0);
RNA_def_property_ui_range(prop, -10.0, 10.0, 1, 0.2);
RNA_def_property_ui_text(prop, "Crop Maximum X", "Maximum X value to crop the image");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "crop_max_y", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "crop_max_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "cropymax");
RNA_def_property_range(prop, -10.0, 10.0);
RNA_def_property_ui_range(prop, -10.0, 10.0, 1, 0.2);
RNA_def_property_ui_text(prop, "Crop Maximum Y", "Maximum Y value to crop the image");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ima");
RNA_def_property_struct_type(prop, "Image");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Image", "");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NEVER_NULL);
+ prop = RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "iuser");
RNA_def_property_ui_text(prop, "Image User", "Parameters defining which layer, pass and frame of the image is displayed");
RNA_def_property_update(prop, 0, "rna_Texture_update");
/* Normal Map */
- prop= RNA_def_property(srna, "use_normal_map", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_normal_map", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_NORMALMAP);
RNA_def_property_ui_text(prop, "Normal Map", "Use image RGB values for normal mapping");
RNA_def_property_update(prop, 0, "rna_Texture_update");
/* Derivative Map */
- prop= RNA_def_property(srna, "use_derivative_map", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_derivative_map", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_DERIVATIVEMAP);
RNA_def_property_ui_text(prop, "Derivative Map", "Use red and green as derivative values");
RNA_def_property_update(prop, 0, "rna_Texture_update");
@@ -1296,7 +1296,7 @@ static void rna_def_texture_plugin(BlenderRNA *brna)
{
StructRNA *srna;
- srna= RNA_def_struct(brna, "PluginTexture", "Texture");
+ srna = RNA_def_struct(brna, "PluginTexture", "Texture");
RNA_def_struct_ui_text(srna, "Plugin", "External plugin texture");
RNA_def_struct_sdna(srna, "Tex");
@@ -1308,25 +1308,25 @@ static void rna_def_texture_environment_map(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "EnvironmentMapTexture", "Texture");
+ srna = RNA_def_struct(brna, "EnvironmentMapTexture", "Texture");
RNA_def_struct_ui_text(srna, "Environment Map", "Environment map texture");
RNA_def_struct_sdna(srna, "Tex");
- prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ima");
RNA_def_property_struct_type(prop, "Image");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Image", "Source image file to read the environment map from");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NEVER_NULL);
+ prop = RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "iuser");
RNA_def_property_ui_text(prop, "Image User", "Parameters defining which layer, pass and frame of the image is displayed");
RNA_def_property_update(prop, 0, "rna_Texture_update");
rna_def_filter_common(srna);
- prop= RNA_def_property(srna, "environment_map", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "environment_map", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "env");
RNA_def_property_struct_type(prop, "EnvironmentMap");
RNA_def_property_ui_text(prop, "Environment Map", "Get the environment map associated with this texture");
@@ -1348,66 +1348,66 @@ static void rna_def_texture_musgrave(BlenderRNA *brna)
{TEX_HTERRAIN, "HETERO_TERRAIN", 0, "Hetero Terrain", "Similar to multifractal"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "MusgraveTexture", "Texture");
+ srna = RNA_def_struct(brna, "MusgraveTexture", "Texture");
RNA_def_struct_ui_text(srna, "Musgrave", "Procedural musgrave texture");
RNA_def_struct_sdna(srna, "Tex");
- prop= RNA_def_property(srna, "musgrave_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "musgrave_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "stype");
RNA_def_property_enum_items(prop, prop_musgrave_type);
RNA_def_property_ui_text(prop, "Type", "Fractal noise algorithm");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "dimension_max", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "dimension_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "mg_H");
RNA_def_property_range(prop, 0.0001, 2);
RNA_def_property_ui_text(prop, "Highest Dimension", "Highest fractal dimension");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "lacunarity", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "lacunarity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "mg_lacunarity");
RNA_def_property_range(prop, 0, 6);
RNA_def_property_ui_text(prop, "Lacunarity", "Gap between successive frequencies");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "octaves", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "octaves", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "mg_octaves");
RNA_def_property_range(prop, 0, 8);
RNA_def_property_ui_text(prop, "Octaves", "Number of frequencies used");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "mg_offset");
RNA_def_property_range(prop, 0, 6);
RNA_def_property_ui_text(prop, "Offset", "The fractal offset");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "gain", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "gain", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "mg_gain");
RNA_def_property_range(prop, 0, 6);
RNA_def_property_ui_text(prop, "Gain", "The gain multiplier");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "noise_intensity", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "noise_intensity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ns_outscale");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Noise Intensity", "Intensity of the noise");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "noise_scale", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "noise_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "noisesize");
RNA_def_property_range(prop, 0.0001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2);
RNA_def_property_ui_text(prop, "Noise Size", "Scaling for noise input");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noisebasis");
RNA_def_property_enum_items(prop, prop_noise_basis_items);
RNA_def_property_ui_text(prop, "Noise Basis", "Noise basis used for turbulence");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.001, 0.1);
RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2);
RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal");
@@ -1444,66 +1444,66 @@ static void rna_def_texture_voronoi(BlenderRNA *brna)
"Multiply position and outline by intensity"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "VoronoiTexture", "Texture");
+ srna = RNA_def_struct(brna, "VoronoiTexture", "Texture");
RNA_def_struct_ui_text(srna, "Voronoi", "Procedural voronoi texture");
RNA_def_struct_sdna(srna, "Tex");
- prop= RNA_def_property(srna, "weight_1", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "weight_1", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "vn_w1");
RNA_def_property_range(prop, -2, 2);
RNA_def_property_ui_text(prop, "Weight 1", "Voronoi feature weight 1");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "weight_2", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "weight_2", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "vn_w2");
RNA_def_property_range(prop, -2, 2);
RNA_def_property_ui_text(prop, "Weight 2", "Voronoi feature weight 2");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "weight_3", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "weight_3", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "vn_w3");
RNA_def_property_range(prop, -2, 2);
RNA_def_property_ui_text(prop, "Weight 3", "Voronoi feature weight 3");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "weight_4", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "weight_4", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "vn_w4");
RNA_def_property_range(prop, -2, 2);
RNA_def_property_ui_text(prop, "Weight 4", "Voronoi feature weight 4");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "minkovsky_exponent", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "minkovsky_exponent", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "vn_mexp");
RNA_def_property_range(prop, 0.01, 10);
RNA_def_property_ui_text(prop, "Minkovsky Exponent", "Minkovsky exponent");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "distance_metric", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "distance_metric", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "vn_distm");
RNA_def_property_enum_items(prop, prop_distance_metric_items);
RNA_def_property_ui_text(prop, "Distance Metric", "Algorithm used to calculate distance of sample points to feature points");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "vn_coltype");
RNA_def_property_enum_items(prop, prop_coloring_items);
RNA_def_property_ui_text(prop, "Coloring", "");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "noise_intensity", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "noise_intensity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ns_outscale");
RNA_def_property_range(prop, 0.01, 10);
RNA_def_property_ui_text(prop, "Noise Intensity", "Scales the intensity of the noise");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "noise_scale", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "noise_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "noisesize");
RNA_def_property_range(prop, 0.0001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2);
RNA_def_property_ui_text(prop, "Noise Size", "Scaling for noise input");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.001, 0.1);
RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2);
RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal");
@@ -1515,36 +1515,36 @@ static void rna_def_texture_distorted_noise(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "DistortedNoiseTexture", "Texture");
+ srna = RNA_def_struct(brna, "DistortedNoiseTexture", "Texture");
RNA_def_struct_ui_text(srna, "Distorted Noise", "Procedural distorted noise texture");
RNA_def_struct_sdna(srna, "Tex");
- prop= RNA_def_property(srna, "distortion", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "distortion", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dist_amount");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Distortion Amount", "Amount of distortion");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "noise_scale", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "noise_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "noisesize");
RNA_def_property_range(prop, 0.0001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2);
RNA_def_property_ui_text(prop, "Noise Size", "Scaling for noise input");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noisebasis2");
RNA_def_property_enum_items(prop, prop_noise_basis_items);
RNA_def_property_ui_text(prop, "Noise Basis", "Noise basis used for turbulence");
RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
- prop= RNA_def_property(srna, "noise_distortion", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "noise_distortion", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noisebasis");
RNA_def_property_enum_items(prop, prop_noise_basis_items);
RNA_def_property_ui_text(prop, "Noise Distortion", "Noise basis for the distortion");
RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
- prop= RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "nabla", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.001, 0.1);
RNA_def_property_ui_range(prop, 0.001, 0.1, 1, 2);
RNA_def_property_ui_text(prop, "Nabla", "Size of derivative offset used for calculating normal");
@@ -1559,7 +1559,7 @@ static void rna_def_texture_pointdensity(BlenderRNA *brna)
static EnumPropertyItem point_source_items[] = {
{TEX_PD_PSYS, "PARTICLE_SYSTEM", 0, "Particle System", "Generate point density from a particle system"},
{TEX_PD_OBJECT, "OBJECT", 0, "Object Vertices", "Generate point density from an object's vertices"},
- //{TEX_PD_FILE, "FILE", 0 , "File", ""},
+ /*{TEX_PD_FILE, "FILE", 0 , "File", ""}, */
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem particle_cache_items[] = {
@@ -1600,137 +1600,137 @@ static void rna_def_texture_pointdensity(BlenderRNA *brna)
{TEX_PD_NOISE_TIME, "GLOBAL_TIME", 0, "Global Time", "Turbulent noise driven by the global current frame"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "PointDensity", NULL);
+ srna = RNA_def_struct(brna, "PointDensity", NULL);
RNA_def_struct_sdna(srna, "PointDensity");
RNA_def_struct_ui_text(srna, "PointDensity", "Point density settings");
RNA_def_struct_path_func(srna, "rna_PointDensity_path");
- prop= RNA_def_property(srna, "point_source", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "point_source", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "source");
RNA_def_property_enum_items(prop, point_source_items);
RNA_def_property_ui_text(prop, "Point Source", "Point data to use as renderable point density");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "object");
RNA_def_property_ui_text(prop, "Object", "Object to take point data from");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "particle_system", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "particle_system", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Particle System", "Particle System to render as points");
RNA_def_property_struct_type(prop, "ParticleSystem");
RNA_def_property_pointer_funcs(prop, "rna_PointDensity_psys_get", "rna_PointDensity_psys_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "particle_cache_space", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "particle_cache_space", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "psys_cache_space");
RNA_def_property_enum_items(prop, particle_cache_items);
RNA_def_property_ui_text(prop, "Particle Cache", "Coordinate system to cache particles in");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "vertex_cache_space", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_cache_space", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ob_cache_space");
RNA_def_property_enum_items(prop, vertice_cache_items);
RNA_def_property_ui_text(prop, "Vertices Cache", "Coordinate system to cache vertices in");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "radius");
RNA_def_property_range(prop, 0.001, FLT_MAX);
RNA_def_property_ui_text(prop, "Radius", "Radius from the shaded sample to look for points within");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "falloff", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "falloff", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "falloff_type");
RNA_def_property_enum_items(prop, falloff_items);
RNA_def_property_ui_text(prop, "Falloff", "Method of attenuating density by distance from the point");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "falloff_soft", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "falloff_soft", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "falloff_softness");
RNA_def_property_range(prop, 0.01, FLT_MAX);
RNA_def_property_ui_text(prop, "Softness", "Softness of the 'soft' falloff option");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "color_source", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "color_source", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "color_source");
RNA_def_property_enum_items(prop, color_source_items);
RNA_def_property_ui_text(prop, "Color Source", "Data to derive color results from");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "speed_scale", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "speed_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "speed_scale");
RNA_def_property_range(prop, 0.001, 100.0);
RNA_def_property_ui_text(prop, "Scale", "Multiplier to bring particle speed within an acceptable range");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "falloff_speed_scale", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "falloff_speed_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "falloff_speed_scale");
RNA_def_property_range(prop, 0.001, 100.0);
RNA_def_property_ui_text(prop, "Velocity Scale", "Multiplier to bring particle speed within an acceptable range");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "color_ramp", PROP_POINTER, PROP_NEVER_NULL);
+ prop = RNA_def_property(srna, "color_ramp", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "coba");
RNA_def_property_struct_type(prop, "ColorRamp");
RNA_def_property_ui_text(prop, "Color Ramp", "");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "falloff_curve", PROP_POINTER, PROP_NEVER_NULL);
+ prop = RNA_def_property(srna, "falloff_curve", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "falloff_curve");
RNA_def_property_struct_type(prop, "CurveMapping");
RNA_def_property_ui_text(prop, "Falloff Curve", "");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "use_falloff_curve", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_falloff_curve", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_PD_FALLOFF_CURVE);
RNA_def_property_ui_text(prop, "Falloff Curve", "Use a custom falloff curve");
RNA_def_property_update(prop, 0, "rna_Texture_update");
/* Turbulence */
- prop= RNA_def_property(srna, "use_turbulence", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_turbulence", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_PD_TURBULENCE);
RNA_def_property_ui_text(prop, "Turbulence", "Add directed noise to the density at render-time");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "turbulence_scale", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "turbulence_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "noise_size");
RNA_def_property_range(prop, 0.01, FLT_MAX);
RNA_def_property_ui_text(prop, "Size", "Scale of the added turbulent noise");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "turbulence_strength", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "turbulence_strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "noise_fac");
RNA_def_property_range(prop, 0.01, FLT_MAX);
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "turbulence_depth", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "turbulence_depth", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "noise_depth");
RNA_def_property_range(prop, 0, 30);
RNA_def_property_ui_text(prop, "Depth", "Level of detail in the added turbulent noise");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "turbulence_influence", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "turbulence_influence", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noise_influence");
RNA_def_property_enum_items(prop, turbulence_influence_items);
RNA_def_property_ui_text(prop, "Turbulence Influence", "Method for driving added turbulent noise");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noise_basis");
RNA_def_property_enum_items(prop, prop_noise_basis_items);
RNA_def_property_ui_text(prop, "Noise Basis", "Noise formula used for turbulence");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- srna= RNA_def_struct(brna, "PointDensityTexture", "Texture");
+ srna = RNA_def_struct(brna, "PointDensityTexture", "Texture");
RNA_def_struct_sdna(srna, "Tex");
RNA_def_struct_ui_text(srna, "Point Density", "Settings for the Point Density texture");
- prop= RNA_def_property(srna, "point_density", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "point_density", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "pd");
RNA_def_property_struct_type(prop, "PointDensity");
RNA_def_property_ui_text(prop, "Point Density", "The point density settings associated with this texture");
@@ -1753,7 +1753,7 @@ static void rna_def_texture_voxeldata(BlenderRNA *brna)
static EnumPropertyItem file_format_items[] = {
{TEX_VD_BLENDERVOXEL, "BLENDER_VOXEL", 0, "Blender Voxel", "Default binary voxel file format"},
{TEX_VD_RAW_8BIT, "RAW_8BIT", 0, "8 bit RAW", "8 bit greyscale binary data"},
- //{TEX_VD_RAW_16BIT, "RAW_16BIT", 0, "16 bit RAW", ""},
+ /*{TEX_VD_RAW_16BIT, "RAW_16BIT", 0, "16 bit RAW", ""}, */
{TEX_VD_IMAGE_SEQUENCE, "IMAGE_SEQUENCE", 0, "Image Sequence", "Generate voxels from a sequence of image slices"},
{TEX_VD_SMOKE, "SMOKE", 0, "Smoke", "Render voxels from a Blender smoke simulation"},
{0, NULL, 0, NULL, NULL}};
@@ -1770,88 +1770,88 @@ static void rna_def_texture_voxeldata(BlenderRNA *brna)
{TEX_VD_SMOKEVEL, "SMOKEVEL", 0, "Velocity", "Use smoke velocity as texture data"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "VoxelData", NULL);
+ srna = RNA_def_struct(brna, "VoxelData", NULL);
RNA_def_struct_sdna(srna, "VoxelData");
RNA_def_struct_ui_text(srna, "VoxelData", "Voxel data settings");
RNA_def_struct_path_func(srna, "rna_VoxelData_path");
- prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "interp_type");
RNA_def_property_enum_items(prop, interpolation_type_items);
RNA_def_property_ui_text(prop, "Interpolation", "Method to interpolate/smooth values between voxel cells");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "smoke_data_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "smoke_data_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "smoked_type");
RNA_def_property_enum_items(prop, smoked_type_items);
RNA_def_property_ui_text(prop, "Source", "Simulation value to be used as a texture");
RNA_def_property_update(prop, 0, "rna_Texture_voxeldata_update");
- prop= RNA_def_property(srna, "extension", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "extension", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "extend");
RNA_def_property_enum_items(prop, voxeldata_extension);
RNA_def_property_ui_text(prop, "Extension", "How the texture is extrapolated past its original bounds");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "intensity", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "intensity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "int_multiplier");
RNA_def_property_range(prop, 0.01, FLT_MAX);
RNA_def_property_ui_text(prop, "Intensity", "Multiplier for intensity values");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "file_format");
RNA_def_property_enum_items(prop, file_format_items);
RNA_def_property_ui_text(prop, "File Format", "Format of the source data set to render ");
RNA_def_property_update(prop, 0, "rna_Texture_voxeldata_update");
- prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
+ prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "source_path");
RNA_def_property_ui_text(prop, "Source Path", "The external source data file to use");
RNA_def_property_update(prop, 0, "rna_Texture_voxeldata_update");
- prop= RNA_def_property(srna, "resolution", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "resolution", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resol");
RNA_def_property_range(prop, 1, 100000);
RNA_def_property_ui_text(prop, "Resolution", "Resolution of the voxel grid");
RNA_def_property_update(prop, 0, "rna_Texture_voxeldata_update");
- prop= RNA_def_property(srna, "use_still_frame", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_still_frame", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_VD_STILL);
RNA_def_property_ui_text(prop, "Still Frame Only", "Always render a still frame from the voxel data sequence");
RNA_def_property_update(prop, 0, "rna_Texture_voxeldata_update");
- prop= RNA_def_property(srna, "still_frame", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "still_frame", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "still_frame");
RNA_def_property_range(prop, -MAXFRAME, MAXFRAME);
RNA_def_property_ui_text(prop, "Still Frame Number", "The frame number to always use");
RNA_def_property_update(prop, 0, "rna_Texture_voxeldata_update");
- prop= RNA_def_property(srna, "domain_object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "domain_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "object");
RNA_def_property_ui_text(prop, "Domain Object", "Object used as the smoke simulation domain");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, 0, "rna_Texture_voxeldata_update");
- srna= RNA_def_struct(brna, "VoxelDataTexture", "Texture");
+ srna = RNA_def_struct(brna, "VoxelDataTexture", "Texture");
RNA_def_struct_sdna(srna, "Tex");
RNA_def_struct_ui_text(srna, "Voxel Data", "Settings for the Voxel Data texture");
- prop= RNA_def_property(srna, "voxel_data", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "voxel_data", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "vd");
RNA_def_property_struct_type(prop, "VoxelData");
RNA_def_property_ui_text(prop, "Voxel Data", "The voxel data associated with this texture");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ima");
RNA_def_property_struct_type(prop, "Image");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Image", "");
RNA_def_property_update(prop, 0, "rna_Texture_voxeldata_image_update");
- prop= RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NEVER_NULL);
+ prop = RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "iuser");
RNA_def_property_ui_text(prop, "Image User", "Parameters defining which layer, pass and frame of the image is displayed");
RNA_def_property_update(prop, 0, "rna_Texture_voxeldata_update");
@@ -1864,36 +1864,36 @@ static void rna_def_texture_ocean(BlenderRNA *brna)
static EnumPropertyItem ocean_output_items[] = {
{TEX_OCN_DISPLACEMENT, "DISPLACEMENT", 0, "Displacement", "Output XYZ displacement in RGB channels"},
- //{TEX_OCN_NORMALS, "NORMALS", 0, "Normals", "Outputs wave normals"}, // these are in nor channel now
+ /*{TEX_OCN_NORMALS, "NORMALS", 0, "Normals", "Outputs wave normals"}, *//* these are in nor channel now */
{TEX_OCN_FOAM, "FOAM", 0, "Foam", "Output Foam (wave overlap) amount in single channel"},
{TEX_OCN_JPLUS, "JPLUS", 0, "Eigenvalues", "Positive Eigenvalues"},
{TEX_OCN_EMINUS, "EMINUS", 0, "Eigenvectors (-)", "Negative Eigenvectors"},
{TEX_OCN_EPLUS, "EPLUS", 0, "Eigenvectors (+)", "Positive Eigenvectors"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "OceanTexData", NULL);
+ srna = RNA_def_struct(brna, "OceanTexData", NULL);
RNA_def_struct_sdna(srna, "OceanTex");
RNA_def_struct_ui_text(srna, "Ocean", "Ocean Texture settings");
RNA_def_struct_path_func(srna, "rna_OceanTex_path");
- prop= RNA_def_property(srna, "output", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "output", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "output");
RNA_def_property_enum_items(prop, ocean_output_items);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Output", "The data that is output by the texture");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "ocean_object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "ocean_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "object");
RNA_def_property_ui_text(prop, "Modifier Object", "Object containing the ocean modifier");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, 0, "rna_Texture_update");
- srna= RNA_def_struct(brna, "OceanTexture", "Texture");
+ srna = RNA_def_struct(brna, "OceanTexture", "Texture");
RNA_def_struct_sdna(srna, "Tex");
RNA_def_struct_ui_text(srna, "Ocean", "Settings for the Ocean texture");
- prop= RNA_def_property(srna, "ocean", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "ocean", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "ot");
RNA_def_property_struct_type(prop, "OceanTexData");
RNA_def_property_ui_text(prop, "Ocean", "The ocean data associated with this texture");
@@ -1905,81 +1905,81 @@ static void rna_def_texture(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Texture", "ID");
+ srna = RNA_def_struct(brna, "Texture", "ID");
RNA_def_struct_sdna(srna, "Tex");
RNA_def_struct_ui_text(srna, "Texture", "Texture datablock used by materials, lamps, worlds and brushes");
RNA_def_struct_ui_icon(srna, ICON_TEXTURE_DATA);
RNA_def_struct_refine_func(srna, "rna_Texture_refine");
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
- //RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ /*RNA_def_property_clear_flag(prop, PROP_EDITABLE); */
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, texture_type_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_Texture_type_set", NULL);
RNA_def_property_ui_text(prop, "Type", "");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "use_color_ramp", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_color_ramp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_COLORBAND);
RNA_def_property_boolean_funcs(prop, NULL, "rna_Texture_use_color_ramp_set");
RNA_def_property_ui_text(prop, "Use Color Ramp", "Toggle color ramp operations");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "color_ramp", PROP_POINTER, PROP_NEVER_NULL);
+ prop = RNA_def_property(srna, "color_ramp", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "coba");
RNA_def_property_struct_type(prop, "ColorRamp");
RNA_def_property_ui_text(prop, "Color Ramp", "");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "intensity", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "intensity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bright");
RNA_def_property_range(prop, 0, 2);
RNA_def_property_ui_text(prop, "Brightness", "Adjust the brightness of the texture");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "contrast", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "contrast", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.01, 5);
RNA_def_property_ui_text(prop, "Contrast", "Adjust the contrast of the texture");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "saturation", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "saturation", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0, 2);
RNA_def_property_ui_text(prop, "Saturation", "Adjust the saturation of colors in the texture");
RNA_def_property_update(prop, 0, "rna_Texture_update");
/* RGB Factor */
- prop= RNA_def_property(srna, "factor_red", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "factor_red", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rfac");
RNA_def_property_range(prop, 0, 2);
RNA_def_property_ui_text(prop, "Factor Red", "");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "factor_green", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "factor_green", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "gfac");
RNA_def_property_range(prop, 0, 2);
RNA_def_property_ui_text(prop, "Factor Green", "");
RNA_def_property_update(prop, 0, "rna_Texture_update");
- prop= RNA_def_property(srna, "factor_blue", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "factor_blue", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bfac");
RNA_def_property_range(prop, 0, 2);
RNA_def_property_ui_text(prop, "Factor Blue", "");
RNA_def_property_update(prop, 0, "rna_Texture_update");
/* Alpha for preview render */
- prop= RNA_def_property(srna, "use_preview_alpha", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_preview_alpha", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_PRV_ALPHA);
RNA_def_property_ui_text(prop, "Show Alpha", "Show Alpha in Preview Render");
RNA_def_property_update(prop, 0, "rna_Texture_update");
/* nodetree */
- prop= RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "use_nodes", 1);
RNA_def_property_boolean_funcs(prop, NULL, "rna_Texture_use_nodes_set");
RNA_def_property_ui_text(prop, "Use Nodes", "Make this a node-based texture");
RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
- prop= RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
RNA_def_property_ui_text(prop, "Node Tree", "Node tree for node-based textures");
RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
diff --git a/source/blender/makesrna/intern/rna_texture_api.c b/source/blender/makesrna/intern/rna_texture_api.c
index 88ea78cd0da..a3176ae4d34 100644
--- a/source/blender/makesrna/intern/rna_texture_api.c
+++ b/source/blender/makesrna/intern/rna_texture_api.c
@@ -59,7 +59,7 @@ void clear_envmap(struct EnvMap *env, bContext *C)
BKE_free_envmapdata(env);
- for (tex=bmain->tex.first; tex; tex=tex->id.next)
+ for (tex = bmain->tex.first; tex; tex = tex->id.next)
if (tex->env == env) {
WM_event_add_notifier(C, NC_TEXTURE|NA_EDITED, tex);
break;
@@ -68,7 +68,7 @@ void clear_envmap(struct EnvMap *env, bContext *C)
void texture_evaluate(struct Tex *tex, float value[3], float color_r[4])
{
- TexResult texres= {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, NULL};
+ TexResult texres = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, NULL};
multitex_ext(tex, value, NULL, NULL, 1, &texres);
color_r[0] = texres.tr;
@@ -84,14 +84,14 @@ void RNA_api_texture(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
- func= RNA_def_function(srna, "evaluate", "texture_evaluate");
+ func = RNA_def_function(srna, "evaluate", "texture_evaluate");
RNA_def_function_ui_description(func, "Evaluate the texture at the coordinates given");
- parm= RNA_def_float_vector(func, "value", 3, NULL, -FLT_MAX, FLT_MAX, "", "", -1e4, 1e4);
+ parm = RNA_def_float_vector(func, "value", 3, NULL, -FLT_MAX, FLT_MAX, "", "", -1e4, 1e4);
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return location and normal */
- parm= RNA_def_float_vector(func, "result", 4, NULL, -FLT_MAX, FLT_MAX, "Result", NULL, -1e4, 1e4);
+ parm = RNA_def_float_vector(func, "result", 4, NULL, -FLT_MAX, FLT_MAX, "Result", NULL, -1e4, 1e4);
RNA_def_property_flag(parm, PROP_THICK_WRAP);
RNA_def_function_output(func, parm);
@@ -104,16 +104,16 @@ void RNA_api_environment_map(StructRNA *srna)
static const float default_layout[] = { 0,0, 1,0, 2,0, 0,1, 1,1, 2,1 };
- func= RNA_def_function(srna, "clear", "clear_envmap");
+ func = RNA_def_function(srna, "clear", "clear_envmap");
RNA_def_function_ui_description(func, "Discard the environment map and free it from memory");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
- func= RNA_def_function(srna,"save", "save_envmap");
+ func = RNA_def_function(srna,"save", "save_envmap");
RNA_def_function_ui_description(func, "Save the environment map to disc using the scene render settings");
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
- parm= RNA_def_string_file_name(func,"filepath","",FILE_MAX,"File path","Location of the output file");
+ parm = RNA_def_string_file_name(func,"filepath","",FILE_MAX,"File path","Location of the output file");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_pointer(func, "scene", "Scene", "", "Overrides the scene from which image parameters are taken");
diff --git a/source/blender/makesrna/intern/rna_timeline.c b/source/blender/makesrna/intern/rna_timeline.c
index 1dba222fea7..93c28ce2720 100644
--- a/source/blender/makesrna/intern/rna_timeline.c
+++ b/source/blender/makesrna/intern/rna_timeline.c
@@ -44,27 +44,27 @@ static void rna_def_timeline_marker(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "TimelineMarker", NULL);
+ srna = RNA_def_struct(brna, "TimelineMarker", NULL);
RNA_def_struct_sdna(srna, "TimeMarker");
RNA_def_struct_ui_text(srna, "Marker", "Marker for noting points in the timeline");
/* String values */
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_struct_name_property(srna, prop);
RNA_def_property_update(prop, NC_ANIMATION, NULL);
- prop= RNA_def_property(srna, "frame", PROP_INT, PROP_TIME);
+ prop = RNA_def_property(srna, "frame", PROP_INT, PROP_TIME);
RNA_def_property_ui_text(prop, "Frame", "The frame on which the timeline marker appears");
RNA_def_property_update(prop, NC_ANIMATION, NULL);
- prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", 1 /*SELECT*/);
RNA_def_property_ui_text(prop, "Select", "Marker selection state");
RNA_def_property_update(prop, NC_ANIMATION, NULL);
#ifdef DURIAN_CAMERA_SWITCH
- prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
RNA_def_property_ui_text(prop, "Camera", "Camera this timeline sets to active");
diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c
index cb3f30c9284..83c4b235d20 100644
--- a/source/blender/makesrna/intern/rna_tracking.c
+++ b/source/blender/makesrna/intern/rna_tracking.c
@@ -61,36 +61,36 @@ static char *rna_tracking_path(PointerRNA *UNUSED(ptr))
static void rna_tracking_defaultSettings_levelsUpdate(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- MovieClip *clip= (MovieClip*)ptr->id.data;
- MovieTracking *tracking= &clip->tracking;
- MovieTrackingSettings *settings= &tracking->settings;
+ MovieClip *clip = (MovieClip*)ptr->id.data;
+ MovieTracking *tracking = &clip->tracking;
+ MovieTrackingSettings *settings = &tracking->settings;
- if(settings->default_tracker==TRACKER_KLT) {
- int max_pyramid_level_factor= 1 << (settings->default_pyramid_levels - 1);
- float search_ratio= 2.3f * max_pyramid_level_factor;
+ if (settings->default_tracker == TRACKER_KLT) {
+ int max_pyramid_level_factor = 1 << (settings->default_pyramid_levels - 1);
+ float search_ratio = 2.3f * max_pyramid_level_factor;
- settings->default_search_size= settings->default_pattern_size*search_ratio;
+ settings->default_search_size = settings->default_pattern_size*search_ratio;
}
}
static void rna_tracking_defaultSettings_patternUpdate(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- MovieClip *clip= (MovieClip*)ptr->id.data;
- MovieTracking *tracking= &clip->tracking;
- MovieTrackingSettings *settings= &tracking->settings;
+ MovieClip *clip = (MovieClip*)ptr->id.data;
+ MovieTracking *tracking = &clip->tracking;
+ MovieTrackingSettings *settings = &tracking->settings;
- if(settings->default_search_size<settings->default_pattern_size)
- settings->default_search_size= settings->default_pattern_size;
+ if (settings->default_search_size<settings->default_pattern_size)
+ settings->default_search_size = settings->default_pattern_size;
}
static void rna_tracking_defaultSettings_searchUpdate(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- MovieClip *clip= (MovieClip*)ptr->id.data;
- MovieTracking *tracking= &clip->tracking;
- MovieTrackingSettings *settings= &tracking->settings;
+ MovieClip *clip = (MovieClip*)ptr->id.data;
+ MovieTracking *tracking = &clip->tracking;
+ MovieTrackingSettings *settings = &tracking->settings;
- if(settings->default_pattern_size>settings->default_search_size)
- settings->default_pattern_size= settings->default_search_size;
+ if (settings->default_pattern_size>settings->default_search_size)
+ settings->default_pattern_size = settings->default_search_size;
}
static char *rna_trackingTrack_path(PointerRNA *ptr)
@@ -102,84 +102,84 @@ static char *rna_trackingTrack_path(PointerRNA *ptr)
static void rna_trackingTracks_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- MovieClip *clip= (MovieClip*)ptr->id.data;
+ MovieClip *clip = (MovieClip*)ptr->id.data;
rna_iterator_listbase_begin(iter, &clip->tracking.tracks, NULL);
}
static void rna_trackingObjects_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- MovieClip *clip= (MovieClip*)ptr->id.data;
+ MovieClip *clip = (MovieClip*)ptr->id.data;
rna_iterator_listbase_begin(iter, &clip->tracking.objects, NULL);
}
static int rna_tracking_active_object_index_get(PointerRNA *ptr)
{
- MovieClip *clip= (MovieClip*)ptr->id.data;
+ MovieClip *clip = (MovieClip*)ptr->id.data;
return clip->tracking.objectnr;
}
static void rna_tracking_active_object_index_set(PointerRNA *ptr, int value)
{
- MovieClip *clip= (MovieClip*)ptr->id.data;
+ MovieClip *clip = (MovieClip*)ptr->id.data;
- clip->tracking.objectnr= value;
+ clip->tracking.objectnr = value;
}
static void rna_tracking_active_object_index_range(PointerRNA *ptr, int *min, int *max)
{
- MovieClip *clip= (MovieClip*)ptr->id.data;
+ MovieClip *clip = (MovieClip*)ptr->id.data;
- *min= 0;
- *max= clip->tracking.tot_object-1;
- *max= MAX2(0, *max);
+ *min = 0;
+ *max = clip->tracking.tot_object-1;
+ *max = MAX2(0, *max);
}
static PointerRNA rna_tracking_active_track_get(PointerRNA *ptr)
{
- MovieClip *clip= (MovieClip*)ptr->id.data;
- MovieTrackingTrack *act_track= BKE_tracking_active_track(&clip->tracking);
+ MovieClip *clip = (MovieClip*)ptr->id.data;
+ MovieTrackingTrack *act_track = BKE_tracking_active_track(&clip->tracking);
return rna_pointer_inherit_refine(ptr, &RNA_MovieTrackingTrack, act_track);
}
static void rna_tracking_active_track_set(PointerRNA *ptr, PointerRNA value)
{
- MovieClip *clip= (MovieClip*)ptr->id.data;
- MovieTrackingTrack *track= (MovieTrackingTrack *)value.data;
- ListBase *tracksbase= BKE_tracking_get_tracks(&clip->tracking);
- int index= BLI_findindex(tracksbase, track);
+ MovieClip *clip = (MovieClip*)ptr->id.data;
+ MovieTrackingTrack *track = (MovieTrackingTrack *)value.data;
+ ListBase *tracksbase = BKE_tracking_get_tracks(&clip->tracking);
+ int index = BLI_findindex(tracksbase, track);
- if(index>=0)
- clip->tracking.act_track= track;
+ if (index >= 0)
+ clip->tracking.act_track = track;
else
- clip->tracking.act_track= NULL;
+ clip->tracking.act_track = NULL;
}
void rna_trackingTrack_name_set(PointerRNA *ptr, const char *value)
{
- MovieClip *clip= (MovieClip *)ptr->id.data;
- MovieTracking *tracking= &clip->tracking;
- MovieTrackingTrack *track= (MovieTrackingTrack *)ptr->data;
- ListBase *tracksbase= &tracking->tracks;
+ MovieClip *clip = (MovieClip *)ptr->id.data;
+ MovieTracking *tracking = &clip->tracking;
+ MovieTrackingTrack *track = (MovieTrackingTrack *)ptr->data;
+ ListBase *tracksbase = &tracking->tracks;
BLI_strncpy(track->name, value, sizeof(track->name));
/* TODO: it's a bit difficult to find list track came from knowing just
movie clip ID and MovieTracking structure, so keep this naive
search for a while */
- if(BLI_findindex(tracksbase, track) < 0) {
- MovieTrackingObject *object= tracking->objects.first;
+ if (BLI_findindex(tracksbase, track) < 0) {
+ MovieTrackingObject *object = tracking->objects.first;
- while(object) {
- if(BLI_findindex(&object->tracks, track)) {
- tracksbase= &object->tracks;
+ while (object) {
+ if (BLI_findindex(&object->tracks, track)) {
+ tracksbase = &object->tracks;
break;
}
- object= object->next;
+ object = object->next;
}
}
@@ -188,46 +188,46 @@ void rna_trackingTrack_name_set(PointerRNA *ptr, const char *value)
static int rna_trackingTrack_select_get(PointerRNA *ptr)
{
- MovieTrackingTrack *track= (MovieTrackingTrack *)ptr->data;
+ MovieTrackingTrack *track = (MovieTrackingTrack *)ptr->data;
return TRACK_SELECTED(track);
}
static void rna_trackingTrack_select_set(PointerRNA *ptr, int value)
{
- MovieTrackingTrack *track= (MovieTrackingTrack *)ptr->data;
+ MovieTrackingTrack *track = (MovieTrackingTrack *)ptr->data;
- if(value) {
- track->flag|= SELECT;
- track->pat_flag|= SELECT;
- track->search_flag|= SELECT;
+ if (value) {
+ track->flag |= SELECT;
+ track->pat_flag |= SELECT;
+ track->search_flag |= SELECT;
}
else {
- track->flag&= ~SELECT;
- track->pat_flag&= ~SELECT;
- track->search_flag&= ~SELECT;
+ track->flag &= ~SELECT;
+ track->pat_flag &= ~SELECT;
+ track->search_flag &= ~SELECT;
}
}
static void rna_tracking_trackerPattern_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- MovieTrackingTrack *track= (MovieTrackingTrack *)ptr->data;
+ MovieTrackingTrack *track = (MovieTrackingTrack *)ptr->data;
BKE_tracking_clamp_track(track, CLAMP_PAT_DIM);
}
static void rna_tracking_trackerSearch_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- MovieTrackingTrack *track= (MovieTrackingTrack *)ptr->data;
+ MovieTrackingTrack *track = (MovieTrackingTrack *)ptr->data;
BKE_tracking_clamp_track(track, CLAMP_SEARCH_DIM);
}
static void rna_tracking_trackerAlgorithm_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- MovieTrackingTrack *track= (MovieTrackingTrack *)ptr->data;
+ MovieTrackingTrack *track = (MovieTrackingTrack *)ptr->data;
- if(track->tracker==TRACKER_KLT)
+ if (track->tracker == TRACKER_KLT)
BKE_tracking_clamp_track(track, CLAMP_PYRAMID_LEVELS);
else
BKE_tracking_clamp_track(track, CLAMP_SEARCH_DIM);
@@ -235,7 +235,7 @@ static void rna_tracking_trackerAlgorithm_update(Main *UNUSED(bmain), Scene *UNU
static void rna_tracking_trackerPyramid_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- MovieTrackingTrack *track= (MovieTrackingTrack *)ptr->data;
+ MovieTrackingTrack *track = (MovieTrackingTrack *)ptr->data;
BKE_tracking_clamp_track(track, CLAMP_PYRAMID_LEVELS);
}
@@ -247,26 +247,26 @@ static char *rna_trackingCamera_path(PointerRNA *UNUSED(ptr))
static float rna_trackingCamera_focal_mm_get(PointerRNA *ptr)
{
- MovieClip *clip= (MovieClip*)ptr->id.data;
- MovieTrackingCamera *camera= &clip->tracking.camera;
- float val= camera->focal;
+ MovieClip *clip = (MovieClip*)ptr->id.data;
+ MovieTrackingCamera *camera = &clip->tracking.camera;
+ float val = camera->focal;
- if(clip->lastsize[0])
- val= val*camera->sensor_width/(float)clip->lastsize[0];
+ if (clip->lastsize[0])
+ val = val*camera->sensor_width/(float)clip->lastsize[0];
return val;
}
static void rna_trackingCamera_focal_mm_set(PointerRNA *ptr, float value)
{
- MovieClip *clip= (MovieClip*)ptr->id.data;
- MovieTrackingCamera *camera= &clip->tracking.camera;
+ MovieClip *clip = (MovieClip*)ptr->id.data;
+ MovieTrackingCamera *camera = &clip->tracking.camera;
- if(clip->lastsize[0])
- value= clip->lastsize[0]*value/camera->sensor_width;
+ if (clip->lastsize[0])
+ value = clip->lastsize[0]*value/camera->sensor_width;
- if(value>=0.0001)
- camera->focal= value;
+ if (value >= 0.0001)
+ camera->focal = value;
}
static char *rna_trackingStabilization_path(PointerRNA *UNUSED(ptr))
@@ -276,9 +276,9 @@ static char *rna_trackingStabilization_path(PointerRNA *UNUSED(ptr))
static int rna_track_2d_stabilization(CollectionPropertyIterator *UNUSED(iter), void *data)
{
- MovieTrackingTrack *track= (MovieTrackingTrack*)data;
+ MovieTrackingTrack *track = (MovieTrackingTrack*)data;
- if((track->flag&TRACK_USE_2D_STAB)==0)
+ if ((track->flag&TRACK_USE_2D_STAB) == 0)
return 1;
return 0;
@@ -286,37 +286,37 @@ static int rna_track_2d_stabilization(CollectionPropertyIterator *UNUSED(iter),
static void rna_tracking_stabTracks_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- MovieClip *clip= (MovieClip*)ptr->id.data;
+ MovieClip *clip = (MovieClip*)ptr->id.data;
rna_iterator_listbase_begin(iter, &clip->tracking.tracks, rna_track_2d_stabilization);
}
static int rna_tracking_stabTracks_active_index_get(PointerRNA *ptr)
{
- MovieClip *clip= (MovieClip*)ptr->id.data;
+ MovieClip *clip = (MovieClip*)ptr->id.data;
return clip->tracking.stabilization.act_track;
}
static void rna_tracking_stabTracks_active_index_set(PointerRNA *ptr, int value)
{
- MovieClip *clip= (MovieClip*)ptr->id.data;
- clip->tracking.stabilization.act_track= value;
+ MovieClip *clip = (MovieClip*)ptr->id.data;
+ clip->tracking.stabilization.act_track = value;
}
static void rna_tracking_stabTracks_active_index_range(PointerRNA *ptr, int *min, int *max)
{
- MovieClip *clip= (MovieClip*)ptr->id.data;
+ MovieClip *clip = (MovieClip*)ptr->id.data;
- *min= 0;
- *max= clip->tracking.stabilization.tot_track-1;
- *max= MAX2(0, *max);
+ *min = 0;
+ *max = clip->tracking.stabilization.tot_track-1;
+ *max = MAX2(0, *max);
}
static void rna_tracking_flushUpdate(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
{
- MovieClip *clip= (MovieClip*)ptr->id.data;
- MovieTrackingStabilization *stab= &clip->tracking.stabilization;
+ MovieClip *clip = (MovieClip*)ptr->id.data;
+ MovieTrackingStabilization *stab = &clip->tracking.stabilization;
- stab->ok= 0;
+ stab->ok = 0;
nodeUpdateID(scene->nodetree, &clip->id);
@@ -326,10 +326,10 @@ static void rna_tracking_flushUpdate(Main *UNUSED(bmain), Scene *scene, PointerR
static void rna_trackingObject_tracks_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- MovieTrackingObject *object= (MovieTrackingObject* )ptr->data;
+ MovieTrackingObject *object = (MovieTrackingObject* )ptr->data;
- if(object->flag&TRACKING_OBJECT_CAMERA) {
- MovieClip *clip= (MovieClip*)ptr->id.data;
+ if (object->flag&TRACKING_OBJECT_CAMERA) {
+ MovieClip *clip = (MovieClip*)ptr->id.data;
rna_iterator_listbase_begin(iter, &clip->tracking.tracks, NULL);
}
@@ -340,26 +340,26 @@ static void rna_trackingObject_tracks_begin(CollectionPropertyIterator *iter, Po
static PointerRNA rna_tracking_active_object_get(PointerRNA *ptr)
{
- MovieClip *clip= (MovieClip*)ptr->id.data;
- MovieTrackingObject *object= BLI_findlink(&clip->tracking.objects, clip->tracking.objectnr);
+ MovieClip *clip = (MovieClip*)ptr->id.data;
+ MovieTrackingObject *object = BLI_findlink(&clip->tracking.objects, clip->tracking.objectnr);
return rna_pointer_inherit_refine(ptr, &RNA_MovieTrackingObject, object);
}
static void rna_tracking_active_object_set(PointerRNA *ptr, PointerRNA value)
{
- MovieClip *clip= (MovieClip*)ptr->id.data;
- MovieTrackingObject *object= (MovieTrackingObject *)value.data;
- int index= BLI_findindex(&clip->tracking.objects, object);
+ MovieClip *clip = (MovieClip*)ptr->id.data;
+ MovieTrackingObject *object = (MovieTrackingObject *)value.data;
+ int index = BLI_findindex(&clip->tracking.objects, object);
- if(index>=0) clip->tracking.objectnr= index;
- else clip->tracking.objectnr= 0;
+ if (index >= 0) clip->tracking.objectnr = index;
+ else clip->tracking.objectnr = 0;
}
void rna_trackingObject_name_set(PointerRNA *ptr, const char *value)
{
- MovieClip *clip= (MovieClip *)ptr->id.data;
- MovieTrackingObject *object= (MovieTrackingObject *)ptr->data;
+ MovieClip *clip = (MovieClip *)ptr->id.data;
+ MovieTrackingObject *object = (MovieTrackingObject *)ptr->data;
BLI_strncpy(object->name, value, sizeof(object->name));
@@ -368,7 +368,7 @@ void rna_trackingObject_name_set(PointerRNA *ptr, const char *value)
static void rna_trackingObject_flushUpdate(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- MovieClip *clip= (MovieClip*)ptr->id.data;
+ MovieClip *clip = (MovieClip*)ptr->id.data;
WM_main_add_notifier(NC_OBJECT|ND_TRANSFORM, NULL);
DAG_id_tag_update(&clip->id, 0);
@@ -404,19 +404,19 @@ static void rna_trackingMarker_frame_set(PointerRNA *ptr, int value)
static void add_tracks_to_base(MovieClip *clip, MovieTracking *tracking, ListBase *tracksbase, int frame, int number)
{
int a, width, height;
- MovieClipUser user= {0};
+ MovieClipUser user = {0};
- user.framenr= 1;
+ user.framenr = 1;
BKE_movieclip_get_size(clip, &user, &width, &height);
- for(a= 0; a<number; a++)
+ for (a = 0; a<number; a++)
BKE_tracking_add_track(tracking, tracksbase, 0, 0, frame, width, height);
}
static void rna_trackingTracks_add(ID *id, MovieTracking *tracking, int frame, int number)
{
- MovieClip *clip= (MovieClip *) id;
+ MovieClip *clip = (MovieClip *) id;
add_tracks_to_base(clip, tracking, &tracking->tracks, frame, number);
@@ -425,11 +425,11 @@ static void rna_trackingTracks_add(ID *id, MovieTracking *tracking, int frame, i
static void rna_trackingObject_tracks_add(ID *id, MovieTrackingObject *object, int frame, int number)
{
- MovieClip *clip= (MovieClip *) id;
- ListBase *tracksbase= &object->tracks;
+ MovieClip *clip = (MovieClip *) id;
+ ListBase *tracksbase = &object->tracks;
- if(object->flag&TRACKING_OBJECT_CAMERA)
- tracksbase= &clip->tracking.tracks;
+ if (object->flag&TRACKING_OBJECT_CAMERA)
+ tracksbase = &clip->tracking.tracks;
add_tracks_to_base(clip, &clip->tracking, tracksbase, frame, number);
@@ -438,7 +438,7 @@ static void rna_trackingObject_tracks_add(ID *id, MovieTrackingObject *object, i
static MovieTrackingObject *rna_trackingObject_new(MovieTracking *tracking, const char *name)
{
- MovieTrackingObject *object= BKE_tracking_new_object(tracking, name);
+ MovieTrackingObject *object = BKE_tracking_new_object(tracking, name);
WM_main_add_notifier(NC_MOVIECLIP|NA_EDITED, NULL);
@@ -474,7 +474,7 @@ static MovieTrackingMarker* rna_trackingMarkers_insert_frame(MovieTrackingTrack
void rna_trackingMarkers_delete_frame(MovieTrackingTrack *track, int framenr)
{
- if(track->markersnr==1)
+ if (track->markersnr == 1)
return;
BKE_tracking_delete_marker(track, framenr);
@@ -495,7 +495,7 @@ static EnumPropertyItem pattern_match_items[] = {
{TRACK_MATCH_PREVFRAME, "PREV_FRAME", 0, "Previous frame", "Track pattern from current frame to next frame"},
{0, NULL, 0, NULL, NULL}};
-static int rna_matrix_dimsize_4x4[]= {4, 4};
+static int rna_matrix_dimsize_4x4[] = {4, 4};
static void rna_def_trackingSettings(BlenderRNA *brna)
{
@@ -534,29 +534,29 @@ static void rna_def_trackingSettings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- srna= RNA_def_struct(brna, "MovieTrackingSettings", NULL);
+ srna = RNA_def_struct(brna, "MovieTrackingSettings", NULL);
RNA_def_struct_ui_text(srna, "Movie tracking settings", "Match moving settings");
/* speed */
- prop= RNA_def_property(srna, "speed", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "speed", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, speed_items);
RNA_def_property_ui_text(prop, "Speed", "Limit speed of tracking to make visual feedback easier (this does not affect the tracking quality)");
/* keyframe_a */
- prop= RNA_def_property(srna, "keyframe_a", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "keyframe_a", PROP_INT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_sdna(prop, NULL, "keyframe1");
RNA_def_property_ui_text(prop, "Keyframe A", "First keyframe used for reconstruction initialization");
/* keyframe_b */
- prop= RNA_def_property(srna, "keyframe_b", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "keyframe_b", PROP_INT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_sdna(prop, NULL, "keyframe2");
RNA_def_property_ui_text(prop, "Keyframe B", "Second keyframe used for reconstruction initialization");
/* intrinsics refinement during bundle adjustment */
- prop= RNA_def_property(srna, "refine_intrinsics", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "refine_intrinsics", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "refine_camera_intrinsics");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, refine_items);
@@ -565,63 +565,63 @@ static void rna_def_trackingSettings(BlenderRNA *brna)
/* tool settings */
/* distance */
- prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_float_sdna(prop, NULL, "dist");
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_ui_text(prop, "Distance", "Distance between two bundles used for scene scaling");
/* frames count */
- prop= RNA_def_property(srna, "clean_frames", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "clean_frames", PROP_INT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_sdna(prop, NULL, "clean_frames");
RNA_def_property_range(prop, 0, INT_MAX);
RNA_def_property_ui_text(prop, "Tracked Frames", "Effect on tracks which are tracked less than the specified amount of frames");
/* reprojection error */
- prop= RNA_def_property(srna, "clean_error", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "clean_error", PROP_FLOAT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_float_sdna(prop, NULL, "clean_error");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_text(prop, "Reprojection Error", "Effect on tracks which have a larger reprojection error");
/* cleanup action */
- prop= RNA_def_property(srna, "clean_action", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "clean_action", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "clean_action");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, cleanup_items);
RNA_def_property_ui_text(prop, "Action", "Cleanup action to execute");
/* ** default tracker settings ** */
- prop= RNA_def_property(srna, "show_default_expanded", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_default_expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TRACKING_SETTINGS_SHOW_DEFAULT_EXPANDED);
RNA_def_property_ui_text(prop, "Show Expanded", "Show the expanded in the user interface");
RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
/* limit frames */
- prop= RNA_def_property(srna, "default_frames_limit", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "default_frames_limit", PROP_INT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_sdna(prop, NULL, "default_frames_limit");
RNA_def_property_range(prop, 0, SHRT_MAX);
RNA_def_property_ui_text(prop, "Frames Limit", "Every tracking cycle, this number of frames are tracked");
/* pattern match */
- prop= RNA_def_property(srna, "default_pattern_match", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "default_pattern_match", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_sdna(prop, NULL, "default_pattern_match");
RNA_def_property_enum_items(prop, pattern_match_items);
RNA_def_property_ui_text(prop, "Pattern Match", "Track pattern from given frame when tracking marker to next frame");
/* margin */
- prop= RNA_def_property(srna, "default_margin", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "default_margin", PROP_INT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_sdna(prop, NULL, "default_margin");
RNA_def_property_range(prop, 0, 300);
RNA_def_property_ui_text(prop, "Margin", "Default distance from image boudary at which marker stops tracking");
/* tracking algorithm */
- prop= RNA_def_property(srna, "default_tracker", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "default_tracker", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, tracker_items);
@@ -629,7 +629,7 @@ static void rna_def_trackingSettings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Tracker", "Default tracking algorithm to use");
/* pyramid level for pyramid klt tracking */
- prop= RNA_def_property(srna, "default_pyramid_levels", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "default_pyramid_levels", PROP_INT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_sdna(prop, NULL, "default_pyramid_levels");
@@ -638,7 +638,7 @@ static void rna_def_trackingSettings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Pyramid levels", "Default number of pyramid levels (increase on blurry footage)");
/* minmal correlation - only used for SAD tracker */
- prop= RNA_def_property(srna, "default_correlation_min", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "default_correlation_min", PROP_FLOAT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_float_sdna(prop, NULL, "default_minimum_correlation");
@@ -647,7 +647,7 @@ static void rna_def_trackingSettings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Correlation", "Default minimal value of correlation between matched pattern and reference which is still treated as successful tracking");
/* default pattern size */
- prop= RNA_def_property(srna, "default_pattern_size", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "default_pattern_size", PROP_INT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_sdna(prop, NULL, "default_pattern_size");
RNA_def_property_range(prop, 5, 1000);
@@ -655,7 +655,7 @@ static void rna_def_trackingSettings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Pattern Size", "Size of pattern area for newly created tracks");
/* default search size */
- prop= RNA_def_property(srna, "default_search_size", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "default_search_size", PROP_INT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_sdna(prop, NULL, "default_search_size");
RNA_def_property_range(prop, 5, 1000);
@@ -663,19 +663,19 @@ static void rna_def_trackingSettings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Search Size", "Size of search area for newly created tracks");
/* use_red_channel */
- prop= RNA_def_property(srna, "use_default_red_channel", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_default_red_channel", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "default_flag", TRACK_DISABLE_RED);
RNA_def_property_ui_text(prop, "Use Red Channel", "Use red channel from footage for tracking");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
/* use_green_channel */
- prop= RNA_def_property(srna, "use_default_green_channel", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_default_green_channel", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "default_flag", TRACK_DISABLE_GREEN);
RNA_def_property_ui_text(prop, "Use Green Channel", "Use green channel from footage for tracking");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
/* use_blue_channel */
- prop= RNA_def_property(srna, "use_default_blue_channel", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_default_blue_channel", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "default_flag", TRACK_DISABLE_BLUE);
RNA_def_property_ui_text(prop, "Use Blue Channel", "Use blue channel from footage for tracking");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
@@ -683,7 +683,7 @@ static void rna_def_trackingSettings(BlenderRNA *brna)
/* ** object tracking ** */
/* object distance */
- prop= RNA_def_property(srna, "object_distance", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "object_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_float_sdna(prop, NULL, "object_distance");
RNA_def_property_ui_text(prop, "Distance", "Distance between two bundles used for object scaling");
@@ -702,12 +702,12 @@ static void rna_def_trackingCamera(BlenderRNA *brna)
{CAMERA_UNITS_MM, "MILLIMETERS", 0, "mm", "Use millimeters for units of focal length"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "MovieTrackingCamera", NULL);
+ srna = RNA_def_struct(brna, "MovieTrackingCamera", NULL);
RNA_def_struct_path_func(srna, "rna_trackingCamera_path");
RNA_def_struct_ui_text(srna, "Movie tracking camera data", "Match-moving camera data for tracking");
/* Sensor */
- prop= RNA_def_property(srna, "sensor_width", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "sensor_width", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sensor_width");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0f, 500.0f);
@@ -715,7 +715,7 @@ static void rna_def_trackingCamera(BlenderRNA *brna)
RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, NULL);
/* Focal Length */
- prop= RNA_def_property(srna, "focal_length", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "focal_length", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "focal");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0001f, 5000.0f);
@@ -724,7 +724,7 @@ static void rna_def_trackingCamera(BlenderRNA *brna)
RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, NULL);
/* Focal Length in pixels */
- prop= RNA_def_property(srna, "focal_length_pixels", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "focal_length_pixels", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "focal");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0f, 5000.0f);
@@ -732,7 +732,7 @@ static void rna_def_trackingCamera(BlenderRNA *brna)
RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, NULL);
/* Units */
- prop= RNA_def_property(srna, "units", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "units", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "units");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
@@ -740,7 +740,7 @@ static void rna_def_trackingCamera(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Units", "Units used for camera focal length");
/* Principal Point */
- prop= RNA_def_property(srna, "principal", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "principal", PROP_FLOAT, PROP_NONE);
RNA_def_property_array(prop, 2);
RNA_def_property_float_sdna(prop, NULL, "principal");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
@@ -748,21 +748,21 @@ static void rna_def_trackingCamera(BlenderRNA *brna)
RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, NULL);
/* Radial distortion parameters */
- prop= RNA_def_property(srna, "k1", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "k1", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "k1");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_range(prop, -10, 10, .1, 3);
RNA_def_property_ui_text(prop, "K1", "First coefficient of third order polynomial radial distortion");
RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, "rna_tracking_flushUpdate");
- prop= RNA_def_property(srna, "k2", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "k2", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "k2");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_range(prop, -10, 10, .1, 3);
RNA_def_property_ui_text(prop, "K2", "Second coefficient of third order polynomial radial distortion");
RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, "rna_tracking_flushUpdate");
- prop= RNA_def_property(srna, "k3", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "k3", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "k3");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_range(prop, -10, 10, .1, 3);
@@ -770,7 +770,7 @@ static void rna_def_trackingCamera(BlenderRNA *brna)
RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, "rna_tracking_flushUpdate");
/* pixel aspect */
- prop= RNA_def_property(srna, "pixel_aspect", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "pixel_aspect", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "pixel_aspect");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.1f, 5000.0f);
@@ -785,11 +785,11 @@ static void rna_def_trackingMarker(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "MovieTrackingMarker", NULL);
+ srna = RNA_def_struct(brna, "MovieTrackingMarker", NULL);
RNA_def_struct_ui_text(srna, "Movie tracking marker data", "Match-moving marker data for tracking");
/* position */
- prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 2);
RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, 5);
RNA_def_property_float_sdna(prop, NULL, "pos");
@@ -797,14 +797,14 @@ static void rna_def_trackingMarker(BlenderRNA *brna)
RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, NULL);
/* frame */
- prop= RNA_def_property(srna, "frame", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "framenr");
RNA_def_property_ui_text(prop, "Frame", "Frame number marker is keyframed on");
RNA_def_property_int_funcs(prop, NULL, "rna_trackingMarker_frame_set", NULL);
RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, 0);
/* enable */
- prop= RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MARKER_DISABLED);
RNA_def_property_ui_text(prop, "Mode", "Is marker muted for current frame");
RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, NULL);
@@ -817,32 +817,32 @@ static void rna_def_trackingMarkers(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *parm;
RNA_def_property_srna(cprop, "MovieTrackingMarkers");
- srna= RNA_def_struct(brna, "MovieTrackingMarkers", NULL);
+ srna = RNA_def_struct(brna, "MovieTrackingMarkers", NULL);
RNA_def_struct_sdna(srna, "MovieTrackingTrack");
RNA_def_struct_ui_text(srna, "Movie Tracking Markers", "Collection of markers for movie tracking track");
- func= RNA_def_function(srna, "find_frame", "rna_trackingMarkers_find_frame");
+ func = RNA_def_function(srna, "find_frame", "rna_trackingMarkers_find_frame");
RNA_def_function_ui_description(func, "Get marker for specified frame");
- parm= RNA_def_int(func, "frame", 1, MINFRAME, MAXFRAME, "Frame",
+ parm = RNA_def_int(func, "frame", 1, MINFRAME, MAXFRAME, "Frame",
"Frame number to find marker for", MINFRAME, MAXFRAME);
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "marker", "MovieTrackingMarker", "", "Marker for specified frame");
+ parm = RNA_def_pointer(func, "marker", "MovieTrackingMarker", "", "Marker for specified frame");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "insert_frame", "rna_trackingMarkers_insert_frame");
+ func = RNA_def_function(srna, "insert_frame", "rna_trackingMarkers_insert_frame");
RNA_def_function_ui_description(func, "Add a number of tracks to this movie clip");
- parm= RNA_def_int(func, "frame", 1, MINFRAME, MAXFRAME, "Frame",
+ parm = RNA_def_int(func, "frame", 1, MINFRAME, MAXFRAME, "Frame",
"Frame number to insert marker to", MINFRAME, MAXFRAME);
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_float_vector(func, "co", 2, 0, -1.0, 1.0, "Coordinate",
"Place new marker at the given frame using specified in normalized space coordinates", -1.0, 1.0);
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "marker", "MovieTrackingMarker", "", "Newly created marker");
+ parm = RNA_def_pointer(func, "marker", "MovieTrackingMarker", "", "Newly created marker");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "delete_frame", "rna_trackingMarkers_delete_frame");
+ func = RNA_def_function(srna, "delete_frame", "rna_trackingMarkers_delete_frame");
RNA_def_function_ui_description(func, "Delete marker at specified frame");
- parm= RNA_def_int(func, "frame", 1, MINFRAME, MAXFRAME, "Frame",
+ parm = RNA_def_int(func, "frame", 1, MINFRAME, MAXFRAME, "Frame",
"Frame number to delete marker from", MINFRAME, MAXFRAME);
RNA_def_property_flag(parm, PROP_REQUIRED);
}
@@ -854,13 +854,13 @@ static void rna_def_trackingTrack(BlenderRNA *brna)
rna_def_trackingMarker(brna);
- srna= RNA_def_struct(brna, "MovieTrackingTrack", NULL);
+ srna = RNA_def_struct(brna, "MovieTrackingTrack", NULL);
RNA_def_struct_path_func(srna, "rna_trackingTrack_path");
RNA_def_struct_ui_text(srna, "Movie tracking track data", "Match-moving track data for tracking");
RNA_def_struct_ui_icon(srna, ICON_ANIM_DATA);
/* name */
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "Unique name of track");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_trackingTrack_name_set");
RNA_def_property_string_maxlength(prop, MAX_ID_NAME-2);
@@ -868,7 +868,7 @@ static void rna_def_trackingTrack(BlenderRNA *brna)
RNA_def_struct_name_property(srna, prop);
/* Pattern */
- prop= RNA_def_property(srna, "pattern_min", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "pattern_min", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 2);
RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, 5);
RNA_def_property_float_sdna(prop, NULL, "pat_min");
@@ -876,7 +876,7 @@ static void rna_def_trackingTrack(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Pattern Min", "Left-bottom corner of pattern area in normalized coordinates relative to marker position");
RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, "rna_tracking_trackerPattern_update");
- prop= RNA_def_property(srna, "pattern_max", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "pattern_max", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 2);
RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, 5);
RNA_def_property_float_sdna(prop, NULL, "pat_max");
@@ -885,7 +885,7 @@ static void rna_def_trackingTrack(BlenderRNA *brna)
RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, "rna_tracking_trackerPattern_update");
/* Search */
- prop= RNA_def_property(srna, "search_min", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "search_min", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 2);
RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, 5);
RNA_def_property_float_sdna(prop, NULL, "search_min");
@@ -893,7 +893,7 @@ static void rna_def_trackingTrack(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Search Min", "Left-bottom corner of search area in normalized coordinates relative to marker position");
RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, "rna_tracking_trackerSearch_update");
- prop= RNA_def_property(srna, "search_max", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "search_max", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 2);
RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, 5);
RNA_def_property_float_sdna(prop, NULL, "search_max");
@@ -902,7 +902,7 @@ static void rna_def_trackingTrack(BlenderRNA *brna)
RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, "rna_tracking_trackerSearch_update");
/* limit frames */
- prop= RNA_def_property(srna, "frames_limit", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "frames_limit", PROP_INT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_sdna(prop, NULL, "frames_limit");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
@@ -910,7 +910,7 @@ static void rna_def_trackingTrack(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Frames Limit", "Every tracking cycle, this number of frames are tracked");
/* pattern match */
- prop= RNA_def_property(srna, "pattern_match", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "pattern_match", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_sdna(prop, NULL, "pattern_match");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
@@ -918,7 +918,7 @@ static void rna_def_trackingTrack(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Pattern Match", "Track pattern from given frame when tracking marker to next frame");
/* margin */
- prop= RNA_def_property(srna, "margin", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "margin", PROP_INT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_sdna(prop, NULL, "margin");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
@@ -926,7 +926,7 @@ static void rna_def_trackingTrack(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Margin", "Distance from image boudary at which marker stops tracking");
/* tracking algorithm */
- prop= RNA_def_property(srna, "tracker", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "tracker", PROP_ENUM, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, tracker_items);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
@@ -934,7 +934,7 @@ static void rna_def_trackingTrack(BlenderRNA *brna)
RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, "rna_tracking_trackerAlgorithm_update");
/* pyramid level for pyramid klt tracking */
- prop= RNA_def_property(srna, "pyramid_levels", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "pyramid_levels", PROP_INT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_sdna(prop, NULL, "pyramid_levels");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
@@ -943,7 +943,7 @@ static void rna_def_trackingTrack(BlenderRNA *brna)
RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, "rna_tracking_trackerPyramid_update");
/* minmal correlation - only used for SAD tracker */
- prop= RNA_def_property(srna, "correlation_min", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "correlation_min", PROP_FLOAT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_float_sdna(prop, NULL, "minimum_correlation");
RNA_def_property_range(prop, -1.0f, 1.0f);
@@ -951,7 +951,7 @@ static void rna_def_trackingTrack(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Correlation", "Minimal value of correlation between matched pattern and reference which is still treated as successful tracking");
/* markers */
- prop= RNA_def_property(srna, "markers", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "markers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MovieTrackingMarker");
RNA_def_property_collection_sdna(prop, NULL, "markers", "markersnr");
RNA_def_property_ui_text(prop, "Markers", "Collection of markers in track");
@@ -960,100 +960,100 @@ static void rna_def_trackingTrack(BlenderRNA *brna)
/* ** channels ** */
/* use_red_channel */
- prop= RNA_def_property(srna, "use_red_channel", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_red_channel", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", TRACK_DISABLE_RED);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Use Red Channel", "Use red channel from footage for tracking");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
/* use_green_channel */
- prop= RNA_def_property(srna, "use_green_channel", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_green_channel", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", TRACK_DISABLE_GREEN);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Use Green Channel", "Use green channel from footage for tracking");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
/* use_blue_channel */
- prop= RNA_def_property(srna, "use_blue_channel", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_blue_channel", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", TRACK_DISABLE_BLUE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Use Blue Channel", "Use blue channel from footage for tracking");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
/* preview_grayscale */
- prop= RNA_def_property(srna, "use_grayscale_preview", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_grayscale_preview", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TRACK_PREVIEW_GRAYSCALE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Grayscale", "Display what the tracking algorithm sees in the preview");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
/* has bundle */
- prop= RNA_def_property(srna, "has_bundle", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "has_bundle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TRACK_HAS_BUNDLE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Has Bundle", "True if track has a valid bundle");
/* bundle position */
- prop= RNA_def_property(srna, "bundle", PROP_FLOAT, PROP_TRANSLATION);
+ prop = RNA_def_property(srna, "bundle", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
RNA_def_property_float_sdna(prop, NULL, "bundle_pos");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Bundle", "Position of bundle reconstructed from this track");
/* hide */
- prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TRACK_HIDDEN);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Hide", "Track is hidden");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
/* select */
- prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_trackingTrack_select_get", "rna_trackingTrack_select_set");
RNA_def_property_ui_text(prop, "Select", "Track is selected");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
/* select_anchor */
- prop= RNA_def_property(srna, "select_anchor", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select_anchor", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT);
RNA_def_property_ui_text(prop, "Select Anchor", "Track's anchor point is selected");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
/* select_pattern */
- prop= RNA_def_property(srna, "select_pattern", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select_pattern", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "pat_flag", SELECT);
RNA_def_property_ui_text(prop, "Select Pattern", "Track's pattern area is selected");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
/* select_search */
- prop= RNA_def_property(srna, "select_search", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "select_search", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "search_flag", SELECT);
RNA_def_property_ui_text(prop, "Select Search", "Track's search area is selected");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
/* locked */
- prop= RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TRACK_LOCKED);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Lock", "Track is locked and all changes to it are disabled");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
/* custom color */
- prop= RNA_def_property(srna, "use_custom_color", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_custom_color", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TRACK_CUSTOMCOLOR);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Custom Color", "Use custom color instead of theme-defined");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
/* color */
- prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_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 of the track in the Movie Track Editor and the 3D viewport after a solve");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
/* average error */
- prop= RNA_def_property(srna, "average_error", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "average_error", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "error");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Average Error", "Average error of re-projection");
@@ -1070,75 +1070,75 @@ static void rna_def_trackingStabilization(BlenderRNA *brna)
{TRACKING_FILTER_BICUBIC, "BICUBIC", 0, "Bicubic", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "MovieTrackingStabilization", NULL);
+ srna = RNA_def_struct(brna, "MovieTrackingStabilization", NULL);
RNA_def_struct_path_func(srna, "rna_trackingStabilization_path");
RNA_def_struct_ui_text(srna, "Movie tracking stabilization data", "Match-moving stabilization data for tracking");
/* 2d stabilization */
- prop= RNA_def_property(srna, "use_2d_stabilization", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_2d_stabilization", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TRACKING_2D_STABILIZATION);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Use 2D stabilization", "Use 2D stabilization for footage");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, "rna_tracking_flushUpdate");
/* tracks */
- prop= RNA_def_property(srna, "tracks", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "tracks", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_funcs(prop, "rna_tracking_stabTracks_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0, 0);
RNA_def_property_struct_type(prop, "MovieTrackingTrack");
RNA_def_property_ui_text(prop, "Tracks", "Collection of tracks used for stabilization");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, "rna_tracking_flushUpdate");
/* rotation track */
- prop= RNA_def_property(srna, "rotation_track", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "rotation_track", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "rot_track");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Rotation Track", "Track used to compensate rotation");
RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, "rna_tracking_flushUpdate");
/* active track index */
- prop= RNA_def_property(srna, "active_track_index", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "active_track_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "act_track");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_funcs(prop, "rna_tracking_stabTracks_active_index_get", "rna_tracking_stabTracks_active_index_set", "rna_tracking_stabTracks_active_index_range");
RNA_def_property_ui_text(prop, "Active Track Index", "Index of active track in stabilization tracks list");
/* autoscale */
- prop= RNA_def_property(srna, "use_autoscale", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_autoscale", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TRACKING_AUTOSCALE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Autoscale", "Automatically scale footage to cover unfilled areas when stabilizating");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, "rna_tracking_flushUpdate");
/* max scale */
- prop= RNA_def_property(srna, "scale_max", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "scale_max", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "maxscale");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Maximal Scale", "Limit the amount of automatic scaling");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, "rna_tracking_flushUpdate");
/* influence_location */
- prop= RNA_def_property(srna, "influence_location", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "influence_location", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "locinf");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Location Influence", "Influence of stabilization algorithm on footage location");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, "rna_tracking_flushUpdate");
/* influence_scale */
- prop= RNA_def_property(srna, "influence_scale", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "influence_scale", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "scaleinf");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Scale Influence", "Influence of stabilization algorithm on footage scale");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, "rna_tracking_flushUpdate");
/* use_stabilize_rotation */
- prop= RNA_def_property(srna, "use_stabilize_rotation", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_stabilize_rotation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TRACKING_STABILIZE_ROTATION);
RNA_def_property_ui_text(prop, "Stabilize Rotation", "Stabilize horizon line on the shot");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, "rna_tracking_flushUpdate");
/* influence_rotation */
- prop= RNA_def_property(srna, "influence_rotation", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "influence_rotation", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "rotinf");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Rotation Influence", "Influence of stabilization algorithm on footage rotation");
@@ -1157,24 +1157,24 @@ static void rna_def_reconstructedCamera(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "MovieReconstructedCamera", NULL);
+ srna = RNA_def_struct(brna, "MovieReconstructedCamera", NULL);
RNA_def_struct_ui_text(srna, "Movie tracking reconstructed camera data", "Match-moving reconstructed camera data from tracker");
/* frame */
- prop= RNA_def_property(srna, "frame", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame", PROP_INT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_int_sdna(prop, NULL, "framenr");
RNA_def_property_ui_text(prop, "Frame", "Frame number marker is keyframed on");
/* matrix */
- prop= RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
+ prop = RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "mat");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4);
RNA_def_property_ui_text(prop, "Matrix", "Worldspace transformation matrix");
/* average_error */
- prop= RNA_def_property(srna, "average_error", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "average_error", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "error");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Average Error", "Average error of resonctruction");
@@ -1187,23 +1187,23 @@ static void rna_def_trackingReconstruction(BlenderRNA *brna)
rna_def_reconstructedCamera(brna);
- srna= RNA_def_struct(brna, "MovieTrackingReconstruction", NULL);
+ srna = RNA_def_struct(brna, "MovieTrackingReconstruction", NULL);
RNA_def_struct_ui_text(srna, "Movie tracking reconstruction data", "Match-moving reconstruction data from tracker");
/* is_valid */
- prop= RNA_def_property(srna, "is_valid", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_valid", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TRACKING_RECONSTRUCTED);
RNA_def_property_ui_text(prop, "Reconstructed", "Is tracking data contains valid reconstruction information");
/* average_error */
- prop= RNA_def_property(srna, "average_error", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "average_error", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "error");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Average Error", "Average error of resonctruction");
/* cameras */
- prop= RNA_def_property(srna, "cameras", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "cameras", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MovieReconstructedCamera");
RNA_def_property_collection_sdna(prop, NULL, "cameras", "camnr");
RNA_def_property_ui_text(prop, "Cameras", "Collection of solved cameras");
@@ -1215,18 +1215,18 @@ static void rna_def_trackingTracks(BlenderRNA *brna)
FunctionRNA *func;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "MovieTrackingTracks", NULL);
+ srna = RNA_def_struct(brna, "MovieTrackingTracks", NULL);
RNA_def_struct_sdna(srna, "MovieTracking");
RNA_def_struct_ui_text(srna, "Movie Tracks", "Collection of movie tracking tracks");
- func= RNA_def_function(srna, "add", "rna_trackingTracks_add");
+ func = RNA_def_function(srna, "add", "rna_trackingTracks_add");
RNA_def_function_flag(func, FUNC_USE_SELF_ID);
RNA_def_function_ui_description(func, "Add a number of tracks to this movie clip");
RNA_def_int(func, "frame", 1, MINFRAME, MAXFRAME, "Frame", "Frame number to add tracks on", MINFRAME, MAXFRAME);
RNA_def_int(func, "count", 1, 0, INT_MAX, "Number", "Number of tracks to add to the movie clip", 0, INT_MAX);
/* active track */
- prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "MovieTrackingTrack");
RNA_def_property_pointer_funcs(prop, "rna_tracking_active_track_get", "rna_tracking_active_track_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_UNLINK);
@@ -1239,18 +1239,18 @@ static void rna_def_trackingObjectTracks(BlenderRNA *brna)
FunctionRNA *func;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "MovieTrackingObjectTracks", NULL);
+ srna = RNA_def_struct(brna, "MovieTrackingObjectTracks", NULL);
RNA_def_struct_sdna(srna, "MovieTrackingObject");
RNA_def_struct_ui_text(srna, "Movie Tracks", "Collection of movie tracking tracks");
- func= RNA_def_function(srna, "add", "rna_trackingObject_tracks_add");
+ func = RNA_def_function(srna, "add", "rna_trackingObject_tracks_add");
RNA_def_function_flag(func, FUNC_USE_SELF_ID);
RNA_def_function_ui_description(func, "Add a number of tracks to this movie clip");
RNA_def_int(func, "frame", 1, MINFRAME, MAXFRAME, "Frame", "Frame number to add tracks on", MINFRAME, MAXFRAME);
RNA_def_int(func, "count", 1, 0, INT_MAX, "Number", "Number of tracks to add to the movie clip", 0, INT_MAX);
/* active track */
- prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "MovieTrackingTrack");
RNA_def_property_pointer_funcs(prop, "rna_tracking_active_track_get", "rna_tracking_active_track_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_UNLINK);
@@ -1262,11 +1262,11 @@ static void rna_def_trackingObject(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "MovieTrackingObject", NULL);
+ srna = RNA_def_struct(brna, "MovieTrackingObject", NULL);
RNA_def_struct_ui_text(srna, "Movie tracking object data", "Match-moving object tracking and reconstruction data");
/* name */
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "Unique name of object");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_trackingObject_name_set");
RNA_def_property_string_maxlength(prop, MAX_ID_NAME-2);
@@ -1274,25 +1274,25 @@ static void rna_def_trackingObject(BlenderRNA *brna)
RNA_def_struct_name_property(srna, prop);
/* is_camera */
- prop= RNA_def_property(srna, "is_camera", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_camera", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TRACKING_OBJECT_CAMERA);
RNA_def_property_ui_text(prop, "Camera", "Object is used for camera tracking");
RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
/* tracks */
- prop= RNA_def_property(srna, "tracks", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "tracks", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_funcs(prop, "rna_trackingObject_tracks_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0, 0);
RNA_def_property_struct_type(prop, "MovieTrackingTrack");
RNA_def_property_ui_text(prop, "Tracks", "Collection of tracks in this tracking data object");
RNA_def_property_srna(prop, "MovieTrackingObjectTracks");
/* reconstruction */
- prop= RNA_def_property(srna, "reconstruction", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "reconstruction", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "MovieTrackingReconstruction");
/* scale */
- prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_float_sdna(prop, NULL, "scale");
RNA_def_property_range(prop, 0.0001f, 10000.0f);
@@ -1311,22 +1311,22 @@ static void rna_def_trackingObjects(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *parm;
RNA_def_property_srna(cprop, "MovieTrackingObjects");
- srna= RNA_def_struct(brna, "MovieTrackingObjects", NULL);
+ srna = RNA_def_struct(brna, "MovieTrackingObjects", NULL);
RNA_def_struct_sdna(srna, "MovieTracking");
RNA_def_struct_ui_text(srna, "Movie Objects", "Collection of movie trackingobjects");
- func= RNA_def_function(srna, "new", "rna_trackingObject_new");
+ func = RNA_def_function(srna, "new", "rna_trackingObject_new");
RNA_def_function_ui_description(func, "Add tracking object to this movie clip");
RNA_def_string(func, "name", "", 0, "", "Name of new object");
- parm= RNA_def_pointer(func, "object", "MovieTrackingObject", "", "New motion tracking object");
+ parm = RNA_def_pointer(func, "object", "MovieTrackingObject", "", "New motion tracking object");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_trackingObject_remove");
+ func = RNA_def_function(srna, "remove", "rna_trackingObject_remove");
RNA_def_function_ui_description(func, "Remove tracking object from this movie clip");
RNA_def_pointer(func, "object", "MovieTrackingObject", "", "Motion tracking object to be removed");
/* active object */
- prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "MovieTrackingObject");
RNA_def_property_pointer_funcs(prop, "rna_tracking_active_object_get", "rna_tracking_active_object_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_UNLINK);
@@ -1347,42 +1347,42 @@ static void rna_def_tracking(BlenderRNA *brna)
rna_def_trackingReconstruction(brna);
rna_def_trackingObject(brna);
- srna= RNA_def_struct(brna, "MovieTracking", NULL);
+ srna = RNA_def_struct(brna, "MovieTracking", NULL);
RNA_def_struct_path_func(srna, "rna_tracking_path");
RNA_def_struct_ui_text(srna, "Movie tracking data", "Match-moving data for tracking");
/* settings */
- prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "MovieTrackingSettings");
/* camera properties */
- prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "MovieTrackingCamera");
/* tracks */
- prop= RNA_def_property(srna, "tracks", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "tracks", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_funcs(prop, "rna_trackingTracks_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0, 0);
RNA_def_property_struct_type(prop, "MovieTrackingTrack");
RNA_def_property_ui_text(prop, "Tracks", "Collection of tracks in this tracking data object");
RNA_def_property_srna(prop, "MovieTrackingTracks");
/* stabilization */
- prop= RNA_def_property(srna, "stabilization", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "stabilization", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "MovieTrackingStabilization");
/* reconstruction */
- prop= RNA_def_property(srna, "reconstruction", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "reconstruction", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "MovieTrackingReconstruction");
/* objects */
- prop= RNA_def_property(srna, "objects", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "objects", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_funcs(prop, "rna_trackingObjects_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0, 0);
RNA_def_property_struct_type(prop, "MovieTrackingObject");
RNA_def_property_ui_text(prop, "Objects", "Collection of objects in this tracking data object");
rna_def_trackingObjects(brna, prop);
/* active object index */
- prop= RNA_def_property(srna, "active_object_index", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "active_object_index", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "objectnr");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_int_funcs(prop, "rna_tracking_active_object_index_get", "rna_tracking_active_object_index_set", "rna_tracking_active_object_index_range");
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c
index 1bfed372626..a9c154fa43e 100644
--- a/source/blender/makesrna/intern/rna_ui.c
+++ b/source/blender/makesrna/intern/rna_ui.c
@@ -75,15 +75,15 @@ static ARegionType *region_type_find(ReportList *reports, int space_type, int re
SpaceType *st;
ARegionType *art;
- st= BKE_spacetype_from_id(space_type);
+ st = BKE_spacetype_from_id(space_type);
- for(art= (st)? st->regiontypes.first: NULL; art; art= art->next) {
- if (art->regionid==region_type)
+ for (art = (st)? st->regiontypes.first: NULL; art; art = art->next) {
+ if (art->regionid == region_type)
break;
}
/* region type not found? abort */
- if (art==NULL) {
+ if (art == NULL) {
BKE_report(reports, RPT_ERROR, "Region not found in spacetype");
return NULL;
}
@@ -104,14 +104,14 @@ static int panel_poll(const bContext *C, PanelType *pt)
int visible;
RNA_pointer_create(NULL, pt->ext.srna, NULL, &ptr); /* dummy */
- func= &rna_Panel_poll_func; /* RNA_struct_find_function(&ptr, "poll"); */
+ func = &rna_Panel_poll_func; /* RNA_struct_find_function(&ptr, "poll"); */
RNA_parameter_list_create(&list, &ptr, func);
RNA_parameter_set_lookup(&list, "context", &C);
pt->ext.call((bContext *)C, &ptr, func, &list);
RNA_parameter_get_lookup(&list, "visible", &ret);
- visible= *(int*)ret;
+ visible = *(int*)ret;
RNA_parameter_list_free(&list);
@@ -127,7 +127,7 @@ static void panel_draw(const bContext *C, Panel *pnl)
FunctionRNA *func;
RNA_pointer_create(&CTX_wm_screen(C)->id, pnl->type->ext.srna, pnl, &ptr);
- func= &rna_Panel_draw_func;/* RNA_struct_find_function(&ptr, "draw"); */
+ func = &rna_Panel_draw_func;/* RNA_struct_find_function(&ptr, "draw"); */
RNA_parameter_list_create(&list, &ptr, func);
RNA_parameter_set_lookup(&list, "context", &C);
@@ -145,7 +145,7 @@ static void panel_draw_header(const bContext *C, Panel *pnl)
FunctionRNA *func;
RNA_pointer_create(&CTX_wm_screen(C)->id, pnl->type->ext.srna, pnl, &ptr);
- func= &rna_Panel_draw_header_func; /* RNA_struct_find_function(&ptr, "draw_header"); */
+ func = &rna_Panel_draw_header_func; /* RNA_struct_find_function(&ptr, "draw_header"); */
RNA_parameter_list_create(&list, &ptr, func);
RNA_parameter_set_lookup(&list, "context", &C);
@@ -157,11 +157,11 @@ static void panel_draw_header(const bContext *C, Panel *pnl)
static void rna_Panel_unregister(Main *UNUSED(bmain), StructRNA *type)
{
ARegionType *art;
- PanelType *pt= RNA_struct_blender_type_get(type);
+ PanelType *pt = RNA_struct_blender_type_get(type);
- if(!pt)
+ if (!pt)
return;
- if(!(art=region_type_find(NULL, pt->space_type, pt->region_type)))
+ if (!(art = region_type_find(NULL, pt->space_type, pt->region_type)))
return;
RNA_struct_free_extension(type, &pt->ext);
@@ -178,31 +178,31 @@ static StructRNA *rna_Panel_register(Main *bmain, ReportList *reports, void *dat
{
ARegionType *art;
PanelType *pt, dummypt = {NULL};
- Panel dummypanel= {NULL};
+ Panel dummypanel = {NULL};
PointerRNA dummyptr;
int have_function[3];
/* setup dummy panel & panel type to store static properties in */
- dummypanel.type= &dummypt;
+ dummypanel.type = &dummypt;
RNA_pointer_create(NULL, &RNA_Panel, &dummypanel, &dummyptr);
/* validate the python class */
- if(validate(&dummyptr, data, have_function) != 0)
+ if (validate(&dummyptr, data, have_function) != 0)
return NULL;
- if(strlen(identifier) >= sizeof(dummypt.idname)) {
+ if (strlen(identifier) >= sizeof(dummypt.idname)) {
BKE_reportf(reports, RPT_ERROR, "registering panel class: '%s' is too long, maximum length is %d",
identifier, (int)sizeof(dummypt.idname));
return NULL;
}
- if(!(art=region_type_find(reports, dummypt.space_type, dummypt.region_type)))
+ if (!(art = region_type_find(reports, dummypt.space_type, dummypt.region_type)))
return NULL;
/* check if we have registered this panel type before, and remove it */
- for(pt=art->paneltypes.first; pt; pt=pt->next) {
- if(strcmp(pt->idname, dummypt.idname) == 0) {
- if(pt->ext.srna)
+ for (pt = art->paneltypes.first; pt; pt = pt->next) {
+ if (strcmp(pt->idname, dummypt.idname) == 0) {
+ if (pt->ext.srna)
rna_Panel_unregister(bmain, pt->ext.srna);
else
BLI_freelinkN(&art->paneltypes, pt);
@@ -211,27 +211,27 @@ static StructRNA *rna_Panel_register(Main *bmain, ReportList *reports, void *dat
}
/* create a new panel type */
- pt= MEM_callocN(sizeof(PanelType), "python buttons panel");
+ pt = MEM_callocN(sizeof(PanelType), "python buttons panel");
memcpy(pt, &dummypt, sizeof(dummypt));
- pt->ext.srna= RNA_def_struct(&BLENDER_RNA, pt->idname, "Panel");
- pt->ext.data= data;
- pt->ext.call= call;
- pt->ext.free= free;
+ pt->ext.srna = RNA_def_struct(&BLENDER_RNA, pt->idname, "Panel");
+ pt->ext.data = data;
+ pt->ext.call = call;
+ pt->ext.free = free;
RNA_struct_blender_type_set(pt->ext.srna, pt);
RNA_def_struct_flag(pt->ext.srna, STRUCT_NO_IDPROPERTIES);
- pt->poll= (have_function[0])? panel_poll: NULL;
- pt->draw= (have_function[1])? panel_draw: NULL;
- pt->draw_header= (have_function[2])? panel_draw_header: NULL;
+ pt->poll = (have_function[0])? panel_poll: NULL;
+ pt->draw = (have_function[1])? panel_draw: NULL;
+ pt->draw_header = (have_function[2])? panel_draw_header: NULL;
/* XXX use "no header" flag for some ordering of panels until we have real panel ordering */
- if(pt->flag & PNL_NO_HEADER) {
+ if (pt->flag & PNL_NO_HEADER) {
PanelType *pth = art->paneltypes.first;
- while(pth && pth->flag & PNL_NO_HEADER)
- pth=pth->next;
+ while (pth && pth->flag & PNL_NO_HEADER)
+ pth = pth->next;
- if(pth)
+ if (pth)
BLI_insertlinkbefore(&art->paneltypes, pth, pt);
else
BLI_addtail(&art->paneltypes, pt);
@@ -247,7 +247,7 @@ static StructRNA *rna_Panel_register(Main *bmain, ReportList *reports, void *dat
static StructRNA* rna_Panel_refine(PointerRNA *ptr)
{
- Panel *hdr= (Panel*)ptr->data;
+ Panel *hdr = (Panel*)ptr->data;
return (hdr->type && hdr->type->ext.srna)? hdr->type->ext.srna: &RNA_Panel;
}
@@ -262,7 +262,7 @@ static void header_draw(const bContext *C, Header *hdr)
FunctionRNA *func;
RNA_pointer_create(&CTX_wm_screen(C)->id, hdr->type->ext.srna, hdr, &htr);
- func= &rna_Header_draw_func; /* RNA_struct_find_function(&htr, "draw"); */
+ func = &rna_Header_draw_func; /* RNA_struct_find_function(&htr, "draw"); */
RNA_parameter_list_create(&list, &htr, func);
RNA_parameter_set_lookup(&list, "context", &C);
@@ -274,11 +274,11 @@ static void header_draw(const bContext *C, Header *hdr)
static void rna_Header_unregister(Main *UNUSED(bmain), StructRNA *type)
{
ARegionType *art;
- HeaderType *ht= RNA_struct_blender_type_get(type);
+ HeaderType *ht = RNA_struct_blender_type_get(type);
- if(!ht)
+ if (!ht)
return;
- if(!(art=region_type_find(NULL, ht->space_type, RGN_TYPE_HEADER)))
+ if (!(art = region_type_find(NULL, ht->space_type, RGN_TYPE_HEADER)))
return;
RNA_struct_free_extension(type, &ht->ext);
@@ -295,47 +295,47 @@ static StructRNA *rna_Header_register(Main *bmain, ReportList *reports, void *da
{
ARegionType *art;
HeaderType *ht, dummyht = {NULL};
- Header dummyheader= {NULL};
+ Header dummyheader = {NULL};
PointerRNA dummyhtr;
int have_function[1];
/* setup dummy header & header type to store static properties in */
- dummyheader.type= &dummyht;
+ dummyheader.type = &dummyht;
RNA_pointer_create(NULL, &RNA_Header, &dummyheader, &dummyhtr);
/* validate the python class */
- if(validate(&dummyhtr, data, have_function) != 0)
+ if (validate(&dummyhtr, data, have_function) != 0)
return NULL;
- if(strlen(identifier) >= sizeof(dummyht.idname)) {
+ if (strlen(identifier) >= sizeof(dummyht.idname)) {
BKE_reportf(reports, RPT_ERROR, "registering header class: '%s' is too long, maximum length is %d",
identifier, (int)sizeof(dummyht.idname));
return NULL;
}
- if(!(art=region_type_find(reports, dummyht.space_type, RGN_TYPE_HEADER)))
+ if (!(art = region_type_find(reports, dummyht.space_type, RGN_TYPE_HEADER)))
return NULL;
/* check if we have registered this header type before, and remove it */
- for(ht=art->headertypes.first; ht; ht=ht->next) {
- if(strcmp(ht->idname, dummyht.idname) == 0) {
- if(ht->ext.srna)
+ for (ht = art->headertypes.first; ht; ht = ht->next) {
+ if (strcmp(ht->idname, dummyht.idname) == 0) {
+ if (ht->ext.srna)
rna_Header_unregister(bmain, ht->ext.srna);
break;
}
}
/* create a new header type */
- ht= MEM_callocN(sizeof(HeaderType), "python buttons header");
+ ht = MEM_callocN(sizeof(HeaderType), "python buttons header");
memcpy(ht, &dummyht, sizeof(dummyht));
- ht->ext.srna= RNA_def_struct(&BLENDER_RNA, ht->idname, "Header");
- ht->ext.data= data;
- ht->ext.call= call;
- ht->ext.free= free;
+ ht->ext.srna = RNA_def_struct(&BLENDER_RNA, ht->idname, "Header");
+ ht->ext.data = data;
+ ht->ext.call = call;
+ ht->ext.free = free;
RNA_struct_blender_type_set(ht->ext.srna, ht);
- ht->draw= (have_function[0])? header_draw: NULL;
+ ht->draw = (have_function[0])? header_draw: NULL;
BLI_addtail(&art->headertypes, ht);
@@ -347,7 +347,7 @@ static StructRNA *rna_Header_register(Main *bmain, ReportList *reports, void *da
static StructRNA* rna_Header_refine(PointerRNA *htr)
{
- Header *hdr= (Header*)htr->data;
+ Header *hdr = (Header*)htr->data;
return (hdr->type && hdr->type->ext.srna)? hdr->type->ext.srna: &RNA_Header;
}
@@ -364,14 +364,14 @@ static int menu_poll(const bContext *C, MenuType *pt)
int visible;
RNA_pointer_create(NULL, pt->ext.srna, NULL, &ptr); /* dummy */
- func= &rna_Menu_poll_func; /* RNA_struct_find_function(&ptr, "poll"); */
+ func = &rna_Menu_poll_func; /* RNA_struct_find_function(&ptr, "poll"); */
RNA_parameter_list_create(&list, &ptr, func);
RNA_parameter_set_lookup(&list, "context", &C);
pt->ext.call((bContext *)C, &ptr, func, &list);
RNA_parameter_get_lookup(&list, "visible", &ret);
- visible= *(int*)ret;
+ visible = *(int*)ret;
RNA_parameter_list_free(&list);
@@ -387,7 +387,7 @@ static void menu_draw(const bContext *C, Menu *hdr)
FunctionRNA *func;
RNA_pointer_create(&CTX_wm_screen(C)->id, hdr->type->ext.srna, hdr, &mtr);
- func= &rna_Menu_draw_func; /* RNA_struct_find_function(&mtr, "draw"); */
+ func = &rna_Menu_draw_func; /* RNA_struct_find_function(&mtr, "draw"); */
RNA_parameter_list_create(&list, &mtr, func);
RNA_parameter_set_lookup(&list, "context", &C);
@@ -398,9 +398,9 @@ static void menu_draw(const bContext *C, Menu *hdr)
static void rna_Menu_unregister(Main *UNUSED(bmain), StructRNA *type)
{
- MenuType *mt= RNA_struct_blender_type_get(type);
+ MenuType *mt = RNA_struct_blender_type_get(type);
- if(!mt)
+ if (!mt)
return;
RNA_struct_free_extension(type, &mt->ext);
@@ -418,59 +418,59 @@ static StructRNA *rna_Menu_register(Main *bmain, ReportList *reports, void *data
StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
{
MenuType *mt, dummymt = {NULL};
- Menu dummymenu= {NULL};
+ Menu dummymenu = {NULL};
PointerRNA dummymtr;
int have_function[2];
- size_t over_alloc= 0; /* warning, if this becomes a bess, we better do another alloc */
- size_t description_size= 0;
+ size_t over_alloc = 0; /* warning, if this becomes a bess, we better do another alloc */
+ size_t description_size = 0;
/* setup dummy menu & menu type to store static properties in */
- dummymenu.type= &dummymt;
- dummymenu.type->description= _menu_descr;
+ dummymenu.type = &dummymt;
+ dummymenu.type->description = _menu_descr;
RNA_pointer_create(NULL, &RNA_Menu, &dummymenu, &dummymtr);
/* clear incase they are left unset */
- _menu_descr[0]= '\0';
+ _menu_descr[0] = '\0';
/* validate the python class */
- if(validate(&dummymtr, data, have_function) != 0)
+ if (validate(&dummymtr, data, have_function) != 0)
return NULL;
- if(strlen(identifier) >= sizeof(dummymt.idname)) {
+ if (strlen(identifier) >= sizeof(dummymt.idname)) {
BKE_reportf(reports, RPT_ERROR, "registering menu class: '%s' is too long, maximum length is %d",
identifier, (int)sizeof(dummymt.idname));
return NULL;
}
/* check if we have registered this menu type before, and remove it */
- mt= WM_menutype_find(dummymt.idname, TRUE);
- if(mt && mt->ext.srna)
+ mt = WM_menutype_find(dummymt.idname, TRUE);
+ if (mt && mt->ext.srna)
rna_Menu_unregister(bmain, mt->ext.srna);
/* create a new menu type */
if (_menu_descr[0]) {
- description_size= strlen(_menu_descr) + 1;
+ description_size = strlen(_menu_descr) + 1;
over_alloc += description_size;
}
- mt= MEM_callocN(sizeof(MenuType) + over_alloc, "python buttons menu");
+ mt = MEM_callocN(sizeof(MenuType) + over_alloc, "python buttons menu");
memcpy(mt, &dummymt, sizeof(dummymt));
if (_menu_descr[0]) {
- char *buf= (char *)(mt + 1);
+ char *buf = (char *)(mt + 1);
memcpy(buf, _menu_descr, description_size);
- mt->description= buf;
+ mt->description = buf;
}
- mt->ext.srna= RNA_def_struct(&BLENDER_RNA, mt->idname, "Menu");
- mt->ext.data= data;
- mt->ext.call= call;
- mt->ext.free= free;
+ mt->ext.srna = RNA_def_struct(&BLENDER_RNA, mt->idname, "Menu");
+ mt->ext.data = data;
+ mt->ext.call = call;
+ mt->ext.free = free;
RNA_struct_blender_type_set(mt->ext.srna, mt);
RNA_def_struct_flag(mt->ext.srna, STRUCT_NO_IDPROPERTIES);
- mt->poll= (have_function[0])? menu_poll: NULL;
- mt->draw= (have_function[1])? menu_draw: NULL;
+ mt->poll = (have_function[0])? menu_poll: NULL;
+ mt->draw = (have_function[1])? menu_draw: NULL;
WM_menutype_add(mt);
@@ -482,15 +482,15 @@ static StructRNA *rna_Menu_register(Main *bmain, ReportList *reports, void *data
static StructRNA* rna_Menu_refine(PointerRNA *mtr)
{
- Menu *hdr= (Menu*)mtr->data;
+ Menu *hdr = (Menu*)mtr->data;
return (hdr->type && hdr->type->ext.srna)? hdr->type->ext.srna: &RNA_Menu;
}
static void rna_Menu_bl_description_set(PointerRNA *ptr, const char *value)
{
- Menu *data= (Menu*)(ptr->data);
- char *str= (char *)data->type->description;
- if(!str[0]) BLI_strncpy(str, value, RNA_DYN_DESCR_MAX); /* utf8 already ensured */
+ Menu *data = (Menu*)(ptr->data);
+ char *str = (char *)data->type->description;
+ if (!str[0]) BLI_strncpy(str, value, RNA_DYN_DESCR_MAX); /* utf8 already ensured */
else assert(!"setting the bl_description on a non-builtin menu");
}
@@ -586,7 +586,7 @@ static void rna_UILayout_scale_y_set(PointerRNA *ptr, float value)
uiLayoutSetScaleY(ptr->data, value);
}
-#else // RNA_RUNTIME
+#else /* RNA_RUNTIME */
static void rna_def_ui_layout(BlenderRNA *brna)
{
@@ -602,38 +602,38 @@ static void rna_def_ui_layout(BlenderRNA *brna)
/* layout */
- srna= RNA_def_struct(brna, "UILayout", NULL);
+ srna = RNA_def_struct(brna, "UILayout", NULL);
RNA_def_struct_sdna(srna, "uiLayout");
RNA_def_struct_ui_text(srna, "UI Layout", "User interface layout in a panel or header");
- prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_UILayout_active_get", "rna_UILayout_active_set");
- prop= RNA_def_property(srna, "operator_context", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "operator_context", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, operator_context_items);
RNA_def_property_enum_funcs(prop, "rna_UILayout_op_context_get", "rna_UILayout_op_context_set", NULL);
- prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_UILayout_enabled_get", "rna_UILayout_enabled_set");
RNA_def_property_ui_text(prop, "Enabled", "When false, this (sub)layout is greyed out");
- prop= RNA_def_property(srna, "alert", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "alert", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_UILayout_alert_get", "rna_UILayout_alert_set");
- prop= RNA_def_property(srna, "alignment", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "alignment", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, alignment_items);
RNA_def_property_enum_funcs(prop, "rna_UILayout_alignment_get", "rna_UILayout_alignment_set", NULL);
#if 0
- prop= RNA_def_property(srna, "keep_aspect", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "keep_aspect", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_UILayout_keep_aspect_get", "rna_UILayout_keep_aspect_set");
#endif
- prop= RNA_def_property(srna, "scale_x", PROP_FLOAT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "scale_x", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_funcs(prop, "rna_UILayout_scale_x_get", "rna_UILayout_scale_x_set", NULL);
RNA_def_property_ui_text(prop, "Scale X", "Scale factor along the X for items in this (sub)layout");
- prop= RNA_def_property(srna, "scale_y", PROP_FLOAT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "scale_y", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_funcs(prop, "rna_UILayout_scale_y_get", "rna_UILayout_scale_y_set", NULL);
RNA_def_property_ui_text(prop, "Scale Y", "Scale factor along the Y for items in this (sub)layout");
RNA_api_ui_layout(srna);
@@ -654,43 +654,43 @@ static void rna_def_panel(BlenderRNA *brna)
"arrow to collapse the panel and the label (see bl_label)"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "Panel", NULL);
+ srna = RNA_def_struct(brna, "Panel", NULL);
RNA_def_struct_ui_text(srna, "Panel", "Panel containing UI elements");
RNA_def_struct_sdna(srna, "Panel");
RNA_def_struct_refine_func(srna, "rna_Panel_refine");
RNA_def_struct_register_funcs(srna, "rna_Panel_register", "rna_Panel_unregister", NULL);
/* poll */
- func= RNA_def_function(srna, "poll", NULL);
+ func = RNA_def_function(srna, "poll", NULL);
RNA_def_function_ui_description(func, "If this method returns a non-null output, then the panel can be drawn");
RNA_def_function_flag(func, FUNC_NO_SELF|FUNC_REGISTER_OPTIONAL);
RNA_def_function_return(func, RNA_def_boolean(func, "visible", 1, "", ""));
- parm= RNA_def_pointer(func, "context", "Context", "", "");
+ parm = RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
/* draw */
- func= RNA_def_function(srna, "draw", NULL);
+ func = RNA_def_function(srna, "draw", NULL);
RNA_def_function_ui_description(func, "Draw UI elements into the panel UI layout");
RNA_def_function_flag(func, FUNC_REGISTER);
- parm= RNA_def_pointer(func, "context", "Context", "", "");
+ parm = RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- func= RNA_def_function(srna, "draw_header", NULL);
+ func = RNA_def_function(srna, "draw_header", NULL);
RNA_def_function_ui_description(func, "Draw UI elements into the panel's header UI layout");
RNA_def_function_flag(func, FUNC_REGISTER);
- parm= RNA_def_pointer(func, "context", "Context", "", "");
+ parm = RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- prop= RNA_def_property(srna, "layout", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "layout", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "UILayout");
RNA_def_property_ui_text(prop, "Layout", "Defines the structure of the panel in the UI");
- prop= RNA_def_property(srna, "text", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "text", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "drawname");
RNA_def_property_ui_text(prop, "Text", "XXX todo");
/* registration */
- prop= RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "type->idname");
RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);
RNA_def_property_ui_text(prop, "ID Name",
@@ -702,33 +702,33 @@ static void rna_def_panel(BlenderRNA *brna)
/* panel's label indeed doesn't need PROP_TRANSLATE flag: translation of label happens in runtime
* when drawing panel and having this flag set will make runtime switching of language much more tricky
* because label will be stored translated */
- prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "type->label");
RNA_def_property_flag(prop, PROP_REGISTER);
RNA_def_property_ui_text(prop, "Label",
"The panel label, shows up in the panel header at the right of the "
"triangle used to collapse the panel");
- prop= RNA_def_property(srna, "bl_space_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "bl_space_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type->space_type");
RNA_def_property_enum_items(prop, space_type_items);
RNA_def_property_flag(prop, PROP_REGISTER);
RNA_def_property_ui_text(prop, "Space type", "The space where the panel is going to be used in");
- prop= RNA_def_property(srna, "bl_region_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "bl_region_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type->region_type");
RNA_def_property_enum_items(prop, region_type_items);
RNA_def_property_flag(prop, PROP_REGISTER);
RNA_def_property_ui_text(prop, "Region Type", "The region where the panel is going to be used in");
- prop= RNA_def_property(srna, "bl_context", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "bl_context", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "type->context");
RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); /* should this be optional? - Campbell */
RNA_def_property_ui_text(prop, "Context",
"The context in which the panel belongs to. (TODO: explain the "
"possible combinations bl_context/bl_region_type/bl_space_type)");
- prop= RNA_def_property(srna, "bl_options", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "bl_options", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type->flag");
RNA_def_property_enum_items(prop, panel_flag_items);
RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL|PROP_ENUM_FLAG);
@@ -742,28 +742,28 @@ static void rna_def_header(BlenderRNA *brna)
PropertyRNA *parm;
FunctionRNA *func;
- srna= RNA_def_struct(brna, "Header", NULL);
+ srna = RNA_def_struct(brna, "Header", NULL);
RNA_def_struct_ui_text(srna, "Header", "Editor header containing UI elements");
RNA_def_struct_sdna(srna, "Header");
RNA_def_struct_refine_func(srna, "rna_Header_refine");
RNA_def_struct_register_funcs(srna, "rna_Header_register", "rna_Header_unregister", NULL);
/* draw */
- func= RNA_def_function(srna, "draw", NULL);
+ func = RNA_def_function(srna, "draw", NULL);
RNA_def_function_ui_description(func, "Draw UI elements into the header UI layout");
RNA_def_function_flag(func, FUNC_REGISTER);
- parm= RNA_def_pointer(func, "context", "Context", "", "");
+ parm = RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- RNA_define_verify_sdna(0); // not in sdna
+ RNA_define_verify_sdna(0); /* not in sdna */
- prop= RNA_def_property(srna, "layout", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "layout", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "layout");
RNA_def_property_struct_type(prop, "UILayout");
RNA_def_property_ui_text(prop, "Layout", "Structure of the header in the UI");
/* registration */
- prop= RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "type->idname");
RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);
RNA_def_property_ui_text(prop, "ID Name",
@@ -772,7 +772,7 @@ static void rna_def_header(BlenderRNA *brna)
"class name is \"OBJECT_HT_hello\", and bl_idname is not set by the "
"script, then bl_idname = \"OBJECT_HT_hello\"");
- prop= RNA_def_property(srna, "bl_space_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "bl_space_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type->space_type");
RNA_def_property_enum_items(prop, space_type_items);
RNA_def_property_flag(prop, PROP_REGISTER);
@@ -788,36 +788,36 @@ static void rna_def_menu(BlenderRNA *brna)
PropertyRNA *parm;
FunctionRNA *func;
- srna= RNA_def_struct(brna, "Menu", NULL);
+ srna = RNA_def_struct(brna, "Menu", NULL);
RNA_def_struct_ui_text(srna, "Menu", "Editor menu containing buttons");
RNA_def_struct_sdna(srna, "Menu");
RNA_def_struct_refine_func(srna, "rna_Menu_refine");
RNA_def_struct_register_funcs(srna, "rna_Menu_register", "rna_Menu_unregister", NULL);
/* poll */
- func= RNA_def_function(srna, "poll", NULL);
+ func = RNA_def_function(srna, "poll", NULL);
RNA_def_function_ui_description(func, "If this method returns a non-null output, then the menu can be drawn");
RNA_def_function_flag(func, FUNC_NO_SELF|FUNC_REGISTER_OPTIONAL);
RNA_def_function_return(func, RNA_def_boolean(func, "visible", 1, "", ""));
- parm= RNA_def_pointer(func, "context", "Context", "", "");
+ parm = RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* draw */
- func= RNA_def_function(srna, "draw", NULL);
+ func = RNA_def_function(srna, "draw", NULL);
RNA_def_function_ui_description(func, "Draw UI elements into the menu UI layout");
RNA_def_function_flag(func, FUNC_REGISTER);
- parm= RNA_def_pointer(func, "context", "Context", "", "");
+ parm = RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- RNA_define_verify_sdna(0); // not in sdna
+ RNA_define_verify_sdna(0); /* not in sdna */
- prop= RNA_def_property(srna, "layout", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "layout", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "layout");
RNA_def_property_struct_type(prop, "UILayout");
RNA_def_property_ui_text(prop, "Layout", "Defines the structure of the menu in the UI");
/* registration */
- prop= RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "type->idname");
RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);
RNA_def_property_ui_text(prop, "ID Name",
@@ -829,16 +829,16 @@ static void rna_def_menu(BlenderRNA *brna)
/* menu's label indeed doesn't need PROP_TRANSLATE flag: translation of label happens in runtime
* when drawing panel and having this flag set will make runtime switching of language much more tricky
* because label will be stored translated */
- prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "type->label");
RNA_def_property_flag(prop, PROP_REGISTER);
RNA_def_property_ui_text(prop, "Label", "The menu label");
- prop= RNA_def_property(srna, "bl_description", PROP_STRING, PROP_TRANSLATE);
+ prop = RNA_def_property(srna, "bl_description", PROP_STRING, PROP_TRANSLATE);
RNA_def_property_string_sdna(prop, NULL, "type->description");
RNA_def_property_string_maxlength(prop, RNA_DYN_DESCR_MAX); /* else it uses the pointer size! */
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Menu_bl_description_set");
- // RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ /* RNA_def_property_clear_flag(prop, PROP_EDITABLE); */
RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
RNA_define_verify_sdna(1);
@@ -852,5 +852,5 @@ void RNA_def_ui(BlenderRNA *brna)
rna_def_menu(brna);
}
-#endif // RNA_RUNTIME
+#endif /* RNA_RUNTIME */
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index 52ffdec7174..d390bedaa04 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -40,10 +40,10 @@
static void rna_uiItemR(uiLayout *layout, PointerRNA *ptr, const char *propname, const char *name, int icon, int expand, int slider, int toggle, int icon_only, int event, int full_event, int emboss, int index)
{
- PropertyRNA *prop= RNA_struct_find_property(ptr, propname);
- int flag= 0;
+ PropertyRNA *prop = RNA_struct_find_property(ptr, propname);
+ int flag = 0;
- if(!prop) {
+ if (!prop) {
RNA_warning("property not found: %s.%s", RNA_struct_identifier(ptr->type), propname);
return;
}
@@ -61,7 +61,7 @@ static void rna_uiItemR(uiLayout *layout, PointerRNA *ptr, const char *propname,
static PointerRNA rna_uiItemO(uiLayout *layout, const char *opname, const char *name, int icon, int emboss)
{
- int flag= UI_ITEM_O_RETURN_PROPS;
+ int flag = UI_ITEM_O_RETURN_PROPS;
flag |= (emboss)? 0: UI_ITEM_R_NO_BG;
return uiItemFullO(layout, opname, name, icon, NULL, uiLayoutGetOperatorContext(layout), flag);
}
@@ -84,7 +84,7 @@ static void api_ui_item_common(FunctionRNA *func)
RNA_def_string_translate(func, "text", "", 0, "", "Override automatic text of the item");
- prop= RNA_def_property(func, "icon", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(func, "icon", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, icon_items);
RNA_def_property_ui_text(prop, "Icon", "Override automatic icon of the item");
@@ -93,7 +93,7 @@ static void api_ui_item_common(FunctionRNA *func)
static void api_ui_item_op(FunctionRNA *func)
{
PropertyRNA *parm;
- parm= RNA_def_string(func, "operator", "", 0, "", "Identifier of the operator");
+ parm = RNA_def_string(func, "operator", "", 0, "", "Identifier of the operator");
RNA_def_property_flag(parm, PROP_REQUIRED);
}
@@ -107,9 +107,9 @@ static void api_ui_item_rna_common(FunctionRNA *func)
{
PropertyRNA *parm;
- parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property");
+ parm = RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
- parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data");
+ parm = RNA_def_string(func, "property", "", 0, "", "Identifier of property in data");
RNA_def_property_flag(parm, PROP_REQUIRED);
}
@@ -131,40 +131,40 @@ void RNA_api_ui_layout(StructRNA *srna)
{0, NULL, 0, NULL, NULL}};
/* simple layout specifiers */
- func= RNA_def_function(srna, "row", "uiLayoutRow");
- parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
+ func = RNA_def_function(srna, "row", "uiLayoutRow");
+ parm = RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
RNA_def_function_return(func, parm);
RNA_def_function_ui_description(func, "Sub-layout. Items placed in this sublayout are placed next to each other in a row");
RNA_def_boolean(func, "align", 0, "", "Align buttons to each other");
- func= RNA_def_function(srna, "column", "uiLayoutColumn");
- parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
+ func = RNA_def_function(srna, "column", "uiLayoutColumn");
+ parm = RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
RNA_def_function_return(func, parm);
RNA_def_function_ui_description(func, "Sub-layout. Items placed in this sublayout are placed under each other in a column");
RNA_def_boolean(func, "align", 0, "", "Align buttons to each other");
- func= RNA_def_function(srna, "column_flow", "uiLayoutColumnFlow");
+ func = RNA_def_function(srna, "column_flow", "uiLayoutColumnFlow");
RNA_def_int(func, "columns", 0, 0, INT_MAX, "", "Number of columns, 0 is automatic", 0, INT_MAX);
- parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
+ parm = RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
RNA_def_function_return(func, parm);
RNA_def_boolean(func, "align", 0, "", "Align buttons to each other");
/* box layout */
- func= RNA_def_function(srna, "box", "uiLayoutBox");
- parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
+ func = RNA_def_function(srna, "box", "uiLayoutBox");
+ parm = RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
RNA_def_function_return(func, parm);
RNA_def_function_ui_description(func, "Sublayout (items placed in this sublayout are placed "
"under each other in a column and are surrounded by a box)");
/* split layout */
- func= RNA_def_function(srna, "split", "uiLayoutSplit");
- parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
+ func = RNA_def_function(srna, "split", "uiLayoutSplit");
+ parm = RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
RNA_def_function_return(func, parm);
RNA_def_float(func, "percentage", 0.0f, 0.0f, 1.0f, "Percentage", "Percentage of width to split at", 0.0f, 1.0f);
RNA_def_boolean(func, "align", 0, "", "Align buttons to each other");
/* items */
- func= RNA_def_function(srna, "prop", "rna_uiItemR");
+ func = RNA_def_function(srna, "prop", "rna_uiItemR");
RNA_def_function_ui_description(func, "Item. Exposes an RNA item and places it into the layout");
api_ui_item_rna_common(func);
api_ui_item_common(func);
@@ -179,31 +179,31 @@ void RNA_api_ui_layout(StructRNA *srna)
"The index of this button, when set a single member of an array can be accessed, "
"when set to -1 all array members are used", -2, INT_MAX); /* RNA_NO_INDEX == -1 */
- func= RNA_def_function(srna, "props_enum", "uiItemsEnumR");
+ func = RNA_def_function(srna, "props_enum", "uiItemsEnumR");
api_ui_item_rna_common(func);
- func= RNA_def_function(srna, "prop_menu_enum", "uiItemMenuEnumR");
+ func = RNA_def_function(srna, "prop_menu_enum", "uiItemMenuEnumR");
api_ui_item_rna_common(func);
api_ui_item_common(func);
- func= RNA_def_function(srna, "prop_enum", "uiItemEnumR_string");
+ func = RNA_def_function(srna, "prop_enum", "uiItemEnumR_string");
api_ui_item_rna_common(func);
- parm= RNA_def_string(func, "value", "", 0, "", "Enum property value");
+ parm = RNA_def_string(func, "value", "", 0, "", "Enum property value");
RNA_def_property_flag(parm, PROP_REQUIRED);
api_ui_item_common(func);
- func= RNA_def_function(srna, "prop_search", "uiItemPointerR");
+ func = RNA_def_function(srna, "prop_search", "uiItemPointerR");
api_ui_item_rna_common(func);
- parm= RNA_def_pointer(func, "search_data", "AnyType", "", "Data from which to take collection to search in");
+ parm = RNA_def_pointer(func, "search_data", "AnyType", "", "Data from which to take collection to search in");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
- parm= RNA_def_string(func, "search_property", "", 0, "", "Identifier of search collection property");
+ parm = RNA_def_string(func, "search_property", "", 0, "", "Identifier of search collection property");
RNA_def_property_flag(parm, PROP_REQUIRED);
api_ui_item_common(func);
- func= RNA_def_function(srna, "operator", "rna_uiItemO");
+ func = RNA_def_function(srna, "operator", "rna_uiItemO");
api_ui_item_op_common(func);
RNA_def_boolean(func, "emboss", 1, "", "Draw the button itself, just the icon/text");
- parm= RNA_def_pointer(func, "properties", "OperatorProperties", "",
+ parm = RNA_def_pointer(func, "properties", "OperatorProperties", "",
"Operator properties to fill in, return when 'properties' is set to true");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
RNA_def_function_return(func, parm);
@@ -216,15 +216,15 @@ void RNA_api_ui_layout(StructRNA *srna)
parm= RNA_def_string(func, "value", "", 0, "", "Enum property value");
RNA_def_property_flag(parm, PROP_REQUIRED); */
- func= RNA_def_function(srna, "operator_enum", "uiItemsEnumO");
- parm= RNA_def_string(func, "operator", "", 0, "", "Identifier of the operator");
+ func = RNA_def_function(srna, "operator_enum", "uiItemsEnumO");
+ parm = RNA_def_string(func, "operator", "", 0, "", "Identifier of the operator");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator");
+ parm = RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator");
RNA_def_property_flag(parm, PROP_REQUIRED);
- func= RNA_def_function(srna, "operator_menu_enum", "uiItemMenuEnumO");
+ func = RNA_def_function(srna, "operator_menu_enum", "uiItemMenuEnumO");
api_ui_item_op(func); /* cant use api_ui_item_op_common because property must come right after */
- parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator");
+ parm = RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator");
RNA_def_property_flag(parm, PROP_REQUIRED);
api_ui_item_common(func);
@@ -258,39 +258,39 @@ void RNA_api_ui_layout(StructRNA *srna)
parm= RNA_def_string(func, "value", "", 0, "", "Value of the property to call the operator with");
RNA_def_property_flag(parm, PROP_REQUIRED); */
- func= RNA_def_function(srna, "label", "uiItemL");
+ func = RNA_def_function(srna, "label", "uiItemL");
RNA_def_function_ui_description(func, "Item. Display text in the layout");
api_ui_item_common(func);
- func= RNA_def_function(srna, "menu", "uiItemM");
+ func = RNA_def_function(srna, "menu", "uiItemM");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
- parm= RNA_def_string(func, "menu", "", 0, "", "Identifier of the menu");
+ parm = RNA_def_string(func, "menu", "", 0, "", "Identifier of the menu");
api_ui_item_common(func);
RNA_def_property_flag(parm, PROP_REQUIRED);
- func= RNA_def_function(srna, "separator", "uiItemS");
+ func = RNA_def_function(srna, "separator", "uiItemS");
RNA_def_function_ui_description(func, "Item. Inserts empty space into the layout between items");
/* context */
- func= RNA_def_function(srna, "context_pointer_set", "uiLayoutSetContextPointer");
- parm= RNA_def_string(func, "name", "", 0, "Name", "Name of entry in the context");
+ func = RNA_def_function(srna, "context_pointer_set", "uiLayoutSetContextPointer");
+ parm = RNA_def_string(func, "name", "", 0, "Name", "Name of entry in the context");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "data", "AnyType", "", "Pointer to put in context");
+ parm = RNA_def_pointer(func, "data", "AnyType", "", "Pointer to put in context");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
/* templates */
- func= RNA_def_function(srna, "template_header", "uiTemplateHeader");
+ func = RNA_def_function(srna, "template_header", "uiTemplateHeader");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
RNA_def_boolean(func, "menus", 1, "", "The header has menus, and should show menu expander");
- func= RNA_def_function(srna, "template_ID", "uiTemplateID");
+ func = RNA_def_function(srna, "template_ID", "uiTemplateID");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
api_ui_item_rna_common(func);
RNA_def_string(func, "new", "", 0, "", "Operator identifier to create a new ID block");
RNA_def_string(func, "open", "", 0, "", "Operator identifier to open a file for creating a new ID block");
RNA_def_string(func, "unlink", "", 0, "", "Operator identifier to unlink the ID block");
- func= RNA_def_function(srna, "template_ID_preview", "uiTemplateIDPreview");
+ func = RNA_def_function(srna, "template_ID_preview", "uiTemplateIDPreview");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
api_ui_item_rna_common(func);
RNA_def_string(func, "new", "", 0, "", "Operator identifier to create a new ID block");
@@ -299,82 +299,82 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_int(func, "rows", 0, 0, INT_MAX, "Number of thumbnail preview rows to display", "", 0, INT_MAX);
RNA_def_int(func, "cols", 0, 0, INT_MAX, "Number of thumbnail preview columns to display", "", 0, INT_MAX);
- func= RNA_def_function(srna, "template_any_ID", "uiTemplateAnyID");
- parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property");
+ func = RNA_def_function(srna, "template_any_ID", "uiTemplateAnyID");
+ parm = RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
- parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data");
+ parm = RNA_def_string(func, "property", "", 0, "", "Identifier of property in data");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_string(func, "type_property", "", 0, "",
+ parm = RNA_def_string(func, "type_property", "", 0, "",
"Identifier of property in data giving the type of the ID-blocks to use");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_string_translate(func, "text", "", 0, "", "Custom label to display in UI");
- func= RNA_def_function(srna, "template_path_builder", "uiTemplatePathBuilder");
- parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property");
+ func = RNA_def_function(srna, "template_path_builder", "uiTemplatePathBuilder");
+ parm = RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
- parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data");
+ parm = RNA_def_string(func, "property", "", 0, "", "Identifier of property in data");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "root", "ID", "", "ID-block from which path is evaluated from");
+ parm = RNA_def_pointer(func, "root", "ID", "", "ID-block from which path is evaluated from");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
RNA_def_string_translate(func, "text", "", 0, "", "Custom label to display in UI");
- func= RNA_def_function(srna, "template_modifier", "uiTemplateModifier");
+ func = RNA_def_function(srna, "template_modifier", "uiTemplateModifier");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
RNA_def_function_ui_description(func, "Layout . Generates the UI layout for modifiers");
- parm= RNA_def_pointer(func, "data", "Modifier", "", "Modifier data");
+ parm = RNA_def_pointer(func, "data", "Modifier", "", "Modifier data");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
- parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
+ parm = RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "template_constraint", "uiTemplateConstraint");
+ func = RNA_def_function(srna, "template_constraint", "uiTemplateConstraint");
RNA_def_function_ui_description(func, "Layout . Generates the UI layout for constraints");
- parm= RNA_def_pointer(func, "data", "Constraint", "", "Constraint data");
+ parm = RNA_def_pointer(func, "data", "Constraint", "", "Constraint data");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
- parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
+ parm = RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "template_preview", "uiTemplatePreview");
+ func = RNA_def_function(srna, "template_preview", "uiTemplatePreview");
RNA_def_function_ui_description(func, "Item. A preview window for materials, textures, lamps, etc");
- parm= RNA_def_pointer(func, "id", "ID", "", "ID datablock");
+ parm = RNA_def_pointer(func, "id", "ID", "", "ID datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_boolean(func, "show_buttons", 1, "", "Show preview buttons?");
RNA_def_pointer(func, "parent", "ID", "", "ID datablock");
RNA_def_pointer(func, "slot", "TextureSlot", "", "Texture slot");
- func= RNA_def_function(srna, "template_curve_mapping", "uiTemplateCurveMapping");
+ func = RNA_def_function(srna, "template_curve_mapping", "uiTemplateCurveMapping");
RNA_def_function_ui_description(func, "Item. A curve mapping widget used for e.g falloff curves for lamps");
api_ui_item_rna_common(func);
RNA_def_enum(func, "type", curve_type_items, 0, "Type", "Type of curves to display");
RNA_def_boolean(func, "levels", 0, "", "Show black/white levels");
RNA_def_boolean(func, "brush", 0, "", "Show brush options");
- func= RNA_def_function(srna, "template_color_ramp", "uiTemplateColorRamp");
+ func = RNA_def_function(srna, "template_color_ramp", "uiTemplateColorRamp");
RNA_def_function_ui_description(func, "Item. A color ramp widget");
api_ui_item_rna_common(func);
RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail");
- func= RNA_def_function(srna, "template_histogram", "uiTemplateHistogram");
+ func = RNA_def_function(srna, "template_histogram", "uiTemplateHistogram");
RNA_def_function_ui_description(func, "Item. A histogramm widget to analyze imaga data");
api_ui_item_rna_common(func);
- func= RNA_def_function(srna, "template_waveform", "uiTemplateWaveform");
+ func = RNA_def_function(srna, "template_waveform", "uiTemplateWaveform");
RNA_def_function_ui_description(func, "Item. A waveform widget to analyze imaga data");
api_ui_item_rna_common(func);
- func= RNA_def_function(srna, "template_vectorscope", "uiTemplateVectorscope");
+ func = RNA_def_function(srna, "template_vectorscope", "uiTemplateVectorscope");
RNA_def_function_ui_description(func, "Item. A vectorscope widget to analyze imaga data");
api_ui_item_rna_common(func);
- func= RNA_def_function(srna, "template_layers", "uiTemplateLayers");
+ func = RNA_def_function(srna, "template_layers", "uiTemplateLayers");
api_ui_item_rna_common(func);
- parm= RNA_def_pointer(func, "used_layers_data", "AnyType", "", "Data from which to take property");
+ parm = RNA_def_pointer(func, "used_layers_data", "AnyType", "", "Data from which to take property");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
- parm= RNA_def_string(func, "used_layers_property", "", 0, "", "Identifier of property in data");
+ parm = RNA_def_string(func, "used_layers_property", "", 0, "", "Identifier of property in data");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_int(func, "active_layer", 0, 0, INT_MAX, "Active Layer", "", 0, INT_MAX);
+ parm = RNA_def_int(func, "active_layer", 0, 0, INT_MAX, "Active Layer", "", 0, INT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
- func= RNA_def_function(srna, "template_color_wheel", "uiTemplateColorWheel");
+ func = RNA_def_function(srna, "template_color_wheel", "uiTemplateColorWheel");
RNA_def_function_ui_description(func, "Item. A color wheel widget to pick colors");
api_ui_item_rna_common(func);
RNA_def_boolean(func, "value_slider", 0, "", "Display the value slider to the right of the color wheel");
@@ -382,55 +382,55 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_boolean(func, "lock_luminosity", 0, "", "Keep the color at its original vector length");
RNA_def_boolean(func, "cubic", 1, "", "Cubic saturation for picking values close to white");
- func= RNA_def_function(srna, "template_image_layers", "uiTemplateImageLayers");
+ func = RNA_def_function(srna, "template_image_layers", "uiTemplateImageLayers");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
- parm= RNA_def_pointer(func, "image", "Image", "", "");
+ parm = RNA_def_pointer(func, "image", "Image", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "image_user", "ImageUser", "", "");
+ parm = RNA_def_pointer(func, "image_user", "ImageUser", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- func= RNA_def_function(srna, "template_image", "uiTemplateImage");
+ func = RNA_def_function(srna, "template_image", "uiTemplateImage");
RNA_def_function_ui_description(func, "Item(s). User interface for selecting images and their source paths");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
api_ui_item_rna_common(func);
- parm= RNA_def_pointer(func, "image_user", "ImageUser", "", "");
+ parm = RNA_def_pointer(func, "image_user", "ImageUser", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
RNA_def_boolean(func, "compact", 0, "", "Use more compact layout");
- func= RNA_def_function(srna, "template_image_settings", "uiTemplateImageSettings");
+ func = RNA_def_function(srna, "template_image_settings", "uiTemplateImageSettings");
RNA_def_function_ui_description(func, "User interface for setting image format options");
- parm= RNA_def_pointer(func, "image_settings", "ImageFormatSettings", "", "");
+ parm = RNA_def_pointer(func, "image_settings", "ImageFormatSettings", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
- func= RNA_def_function(srna, "template_movieclip", "uiTemplateMovieClip");
+ func = RNA_def_function(srna, "template_movieclip", "uiTemplateMovieClip");
RNA_def_function_ui_description(func, "Item(s). User interface for selecting movie clips and their source paths");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
api_ui_item_rna_common(func);
RNA_def_boolean(func, "compact", 0, "", "Use more compact layout");
- func= RNA_def_function(srna, "template_track", "uiTemplateTrack");
+ func = RNA_def_function(srna, "template_track", "uiTemplateTrack");
RNA_def_function_ui_description(func, "Item. A movie-track widget to preview tracking image.");
api_ui_item_rna_common(func);
- func= RNA_def_function(srna, "template_marker", "uiTemplateMarker");
+ func = RNA_def_function(srna, "template_marker", "uiTemplateMarker");
RNA_def_function_ui_description(func, "Item. A widget to control single marker settings.");
api_ui_item_rna_common(func);
- parm= RNA_def_pointer(func, "clip_user", "MovieClipUser", "", "");
+ parm = RNA_def_pointer(func, "clip_user", "MovieClipUser", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
- parm= RNA_def_pointer(func, "track", "MovieTrackingTrack", "", "");
+ parm = RNA_def_pointer(func, "track", "MovieTrackingTrack", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
RNA_def_boolean(func, "compact", 0, "", "Use more compact layout");
- func= RNA_def_function(srna, "template_list", "uiTemplateList");
+ func = RNA_def_function(srna, "template_list", "uiTemplateList");
RNA_def_function_ui_description(func, "Item. A list widget to display data. e.g. vertexgroups");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
- parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property");
+ parm = RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
- parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data");
+ parm = RNA_def_string(func, "property", "", 0, "", "Identifier of property in data");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "active_data", "AnyType", "", "Data from which to take property for the active element");
+ parm = RNA_def_pointer(func, "active_data", "AnyType", "", "Data from which to take property for the active element");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
- parm= RNA_def_string(func, "active_property", "", 0, "", "Identifier of property in data, for the active element");
+ parm = RNA_def_string(func, "active_property", "", 0, "", "Identifier of property in data, for the active element");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_string(func, "prop_list", "", 0, "",
"Identifier of a string property in each data member, specifying which "
@@ -440,46 +440,46 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_int(func, "maxrows", 5, 0, INT_MAX, "", "Maximum number of rows to display", 0, INT_MAX);
RNA_def_enum(func, "type", list_type_items, 0, "Type", "Type of list to use");
- func= RNA_def_function(srna, "template_running_jobs", "uiTemplateRunningJobs");
+ func = RNA_def_function(srna, "template_running_jobs", "uiTemplateRunningJobs");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
RNA_def_function(srna, "template_operator_search", "uiTemplateOperatorSearch");
- func= RNA_def_function(srna, "template_header_3D", "uiTemplateHeader3D");
+ func = RNA_def_function(srna, "template_header_3D", "uiTemplateHeader3D");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
- func= RNA_def_function(srna, "template_edit_mode_selection", "uiTemplateEditModeSelection");
+ func = RNA_def_function(srna, "template_edit_mode_selection", "uiTemplateEditModeSelection");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
- func= RNA_def_function(srna, "template_reports_banner", "uiTemplateReportsBanner");
+ func = RNA_def_function(srna, "template_reports_banner", "uiTemplateReportsBanner");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
- func= RNA_def_function(srna, "template_node_link", "uiTemplateNodeLink");
- parm= RNA_def_pointer(func, "ntree", "NodeTree", "", "");
+ func = RNA_def_function(srna, "template_node_link", "uiTemplateNodeLink");
+ parm = RNA_def_pointer(func, "ntree", "NodeTree", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "node", "Node", "", "");
+ parm = RNA_def_pointer(func, "node", "Node", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "socket", "NodeSocket", "", "");
+ parm = RNA_def_pointer(func, "socket", "NodeSocket", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- func= RNA_def_function(srna, "template_node_view", "uiTemplateNodeView");
+ func = RNA_def_function(srna, "template_node_view", "uiTemplateNodeView");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
- parm= RNA_def_pointer(func, "ntree", "NodeTree", "", "");
+ parm = RNA_def_pointer(func, "ntree", "NodeTree", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "node", "Node", "", "");
+ parm = RNA_def_pointer(func, "node", "Node", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "socket", "NodeSocket", "", "");
+ parm = RNA_def_pointer(func, "socket", "NodeSocket", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- func= RNA_def_function(srna, "template_texture_user", "uiTemplateTextureUser");
+ func = RNA_def_function(srna, "template_texture_user", "uiTemplateTextureUser");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
- func= RNA_def_function(srna, "template_keymap_item_properties", "uiTemplateKeymapItemProperties");
- parm= RNA_def_pointer(func, "item", "KeyMapItem", "", "");
+ func = RNA_def_function(srna, "template_keymap_item_properties", "uiTemplateKeymapItemProperties");
+ parm = RNA_def_pointer(func, "item", "KeyMapItem", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
- func= RNA_def_function(srna, "introspect", "uiLayoutIntrospect");
- parm= RNA_def_string(func, "string", "", 1024*1024, "Descr", "DESCR");
+ func = RNA_def_function(srna, "introspect", "uiLayoutIntrospect");
+ parm = RNA_def_string(func, "string", "", 1024*1024, "Descr", "DESCR");
RNA_def_function_return(func, parm);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index d14f33ca4de..833385b410b 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -105,12 +105,12 @@ static void rna_userdef_show_manipulator_update(Main *bmain, Scene *scene, Point
SpaceLink *sl;
/* from scene copy to the other views */
- for(sc=bmain->screen.first; sc; sc=sc->id.next) {
- for(sa=sc->areabase.first; sa; sa=sa->next) {
- for(sl=sa->spacedata.first; sl; sl=sl->next) {
- if(sl->spacetype==SPACE_VIEW3D) {
- View3D *v3d= (View3D *)sl;
- if(userdef->tw_flag & V3D_USE_MANIPULATOR)
+ for (sc = bmain->screen.first; sc; sc = sc->id.next) {
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_VIEW3D) {
+ View3D *v3d = (View3D *)sl;
+ if (userdef->tw_flag & V3D_USE_MANIPULATOR)
v3d->twflag |= V3D_USE_MANIPULATOR;
else
v3d->twflag &= ~V3D_USE_MANIPULATOR;
@@ -158,7 +158,7 @@ static void rna_userdef_select_mouse_set(PointerRNA *ptr,int value)
{
UserDef *userdef = (UserDef*)ptr->data;
- if(value) {
+ if (value) {
userdef->flag |= USER_LMOUSESELECT;
userdef->flag &= ~USER_TWOBUTTONMOUSE;
}
@@ -171,7 +171,7 @@ static int rna_userdef_autokeymode_get(PointerRNA *ptr)
UserDef *userdef = (UserDef*)ptr->data;
short retval = userdef->autokey_mode;
- if(!(userdef->autokey_mode & AUTOKEY_ON))
+ if (!(userdef->autokey_mode & AUTOKEY_ON))
retval |= AUTOKEY_ON;
return retval;
@@ -181,11 +181,11 @@ static void rna_userdef_autokeymode_set(PointerRNA *ptr,int value)
{
UserDef *userdef = (UserDef*)ptr->data;
- if(value == AUTOKEY_MODE_NORMAL) {
+ if (value == AUTOKEY_MODE_NORMAL) {
userdef->autokey_mode |= (AUTOKEY_MODE_NORMAL - AUTOKEY_ON);
userdef->autokey_mode &= ~(AUTOKEY_MODE_EDITKEYS - AUTOKEY_ON);
}
- else if(value == AUTOKEY_MODE_EDITKEYS) {
+ else if (value == AUTOKEY_MODE_EDITKEYS) {
userdef->autokey_mode |= (AUTOKEY_MODE_EDITKEYS - AUTOKEY_ON);
userdef->autokey_mode &= ~(AUTOKEY_MODE_NORMAL - AUTOKEY_ON);
}
@@ -197,7 +197,7 @@ static void rna_userdef_timecode_style_set(PointerRNA *ptr, int value)
int required_size = userdef->v2d_min_gridsize;
/* set the timecode style */
- userdef->timecode_style= value;
+ userdef->timecode_style = value;
/* adjust the v2d gridsize if needed so that timecodes don't overlap
* NOTE: most of these have been hand-picked to avoid overlaps while still keeping
@@ -207,22 +207,22 @@ static void rna_userdef_timecode_style_set(PointerRNA *ptr, int value)
case USER_TIMECODE_MINIMAL:
case USER_TIMECODE_SECONDS_ONLY:
/* 35 is great most of the time, but not that great for full-blown */
- required_size= 35;
+ required_size = 35;
break;
case USER_TIMECODE_SMPTE_MSF:
- required_size= 50;
+ required_size = 50;
break;
case USER_TIMECODE_SMPTE_FULL:
/* the granddaddy! */
- required_size= 65;
+ required_size = 65;
break;
case USER_TIMECODE_MILLISECONDS:
- required_size= 45;
+ required_size = 45;
break;
}
if (U.v2d_min_gridsize < required_size)
- U.v2d_min_gridsize= required_size;
+ U.v2d_min_gridsize = required_size;
}
static PointerRNA rna_UserDef_view_get(PointerRNA *ptr)
@@ -266,8 +266,8 @@ static void rna_UserDef_weight_color_update(Main *bmain, Scene *scene, PointerRN
vDM_ColorBand_store((U.flag & USER_CUSTOM_RANGE) ? (&U.coba_weight):NULL);
- for(ob= bmain->object.first; ob; ob= ob->id.next) {
- if(ob->mode & OB_MODE_WEIGHT_PAINT)
+ for (ob = bmain->object.first; ob; ob = ob->id.next) {
+ if (ob->mode & OB_MODE_WEIGHT_PAINT)
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
@@ -278,8 +278,8 @@ static void rna_UserDef_viewport_lights_update(Main *bmain, Scene *scene, Pointe
{
/* if all lights are off gpu_draw resets them all, [#27627]
* so disallow them all to be disabled */
- if(U.light[0].flag==0 && U.light[1].flag==0 && U.light[2].flag==0) {
- SolidLight *light= ptr->data;
+ if (U.light[0].flag == 0 && U.light[1].flag == 0 && U.light[2].flag == 0) {
+ SolidLight *light = ptr->data;
light->flag |= 1;
}
@@ -289,16 +289,16 @@ static void rna_UserDef_viewport_lights_update(Main *bmain, Scene *scene, Pointe
static void rna_userdef_autosave_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- wmWindowManager *wm= bmain->wm.first;
+ wmWindowManager *wm = bmain->wm.first;
- if(wm)
+ if (wm)
WM_autosave_init(wm);
rna_userdef_update(bmain, scene, ptr);
}
static bAddon *rna_userdef_addon_new(void)
{
- bAddon *bext= MEM_callocN(sizeof(bAddon), "bAddon");
+ bAddon *bext = MEM_callocN(sizeof(bAddon), "bAddon");
BLI_addtail(&U.addons, bext);
return bext;
}
@@ -333,14 +333,14 @@ static PointerRNA rna_Theme_space_list_generic_get(PointerRNA *ptr)
#ifdef WITH_CYCLES
static EnumPropertyItem *rna_userdef_compute_device_type_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
{
- EnumPropertyItem *item= NULL;
- int totitem= 0;
+ EnumPropertyItem *item = NULL;
+ int totitem = 0;
/* add supported device types */
RNA_enum_items_add_value(&item, &totitem, compute_device_type_items, USER_COMPUTE_DEVICE_NONE);
- if(CCL_compute_device_list(0))
+ if (CCL_compute_device_list(0))
RNA_enum_items_add_value(&item, &totitem, compute_device_type_items, USER_COMPUTE_DEVICE_CUDA);
- if(CCL_compute_device_list(1))
+ if (CCL_compute_device_list(1))
RNA_enum_items_add_value(&item, &totitem, compute_device_type_items, USER_COMPUTE_DEVICE_OPENCL);
RNA_enum_item_end(&item, &totitem);
@@ -351,7 +351,7 @@ static EnumPropertyItem *rna_userdef_compute_device_type_itemf(bContext *UNUSED(
static int rna_userdef_compute_device_get(PointerRNA *UNUSED(ptr))
{
- if(U.compute_device_type == USER_COMPUTE_DEVICE_NONE)
+ if (U.compute_device_type == USER_COMPUTE_DEVICE_NONE)
return 0;
return U.compute_device_id;
@@ -359,11 +359,11 @@ static int rna_userdef_compute_device_get(PointerRNA *UNUSED(ptr))
static EnumPropertyItem *rna_userdef_compute_device_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
{
- EnumPropertyItem tmp= {0, "", 0, "", ""};
- EnumPropertyItem *item= NULL;
- int totitem= 0;
+ EnumPropertyItem tmp = {0, "", 0, "", ""};
+ EnumPropertyItem *item = NULL;
+ int totitem = 0;
- if(U.compute_device_type == USER_COMPUTE_DEVICE_NONE) {
+ if (U.compute_device_type == USER_COMPUTE_DEVICE_NONE) {
/* only add a single CPU device */
tmp.value = 0;
tmp.name = "CPU";
@@ -377,8 +377,8 @@ static EnumPropertyItem *rna_userdef_compute_device_itemf(bContext *UNUSED(C), P
CCLDeviceInfo *devices = CCL_compute_device_list(opencl);
int a;
- if(devices) {
- for(a = 0; devices[a].name; a++) {
+ if (devices) {
+ for (a = 0; devices[a].name; a++) {
tmp.value = devices[a].value;
tmp.identifier = devices[a].identifier;
tmp.name = devices[a].name;
@@ -412,49 +412,49 @@ static void rna_def_userdef_theme_ui_font_style(BlenderRNA *brna)
{1, "DEFAULT", 0, "Default", "Use scaled and grid-fitted kerning distances"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "ThemeFontStyle", NULL);
+ srna = RNA_def_struct(brna, "ThemeFontStyle", NULL);
RNA_def_struct_sdna(srna, "uiFontStyle");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Font Style", "Theme settings for Font");
- prop= RNA_def_property(srna, "points", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "points", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 6, 48);
RNA_def_property_ui_text(prop, "Points", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "font_kerning_style", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "font_kerning_style", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "kerning");
RNA_def_property_enum_items(prop, font_kerning_style);
RNA_def_property_ui_text(prop, "Kerning Style", "Which style to use for font kerning");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "shadow", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "shadow", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 5);
RNA_def_property_ui_text(prop, "Shadow Size", "Shadow size in pixels (0, 3 and 5 supported)");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "shadow_offset_x", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "shadow_offset_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "shadx");
RNA_def_property_range(prop, -10, 10);
RNA_def_property_ui_text(prop, "Shadow X Offset", "Shadow offset in pixels");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "shadow_offset_y", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "shadow_offset_y", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "shady");
RNA_def_property_range(prop, -10, 10);
RNA_def_property_ui_text(prop, "Shadow Y Offset", "Shadow offset in pixels");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "shadowalpha", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "shadowalpha", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Shadow Alpha", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "shadowcolor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "shadowcolor", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Shadow Brightness", "Shadow color in grey value");
RNA_def_property_update(prop, 0, "rna_userdef_update");
-}
+}
static void rna_def_userdef_theme_ui_style(BlenderRNA *brna)
{
@@ -463,7 +463,7 @@ static void rna_def_userdef_theme_ui_style(BlenderRNA *brna)
rna_def_userdef_theme_ui_font_style(brna);
- srna= RNA_def_struct(brna, "ThemeStyle", NULL);
+ srna = RNA_def_struct(brna, "ThemeStyle", NULL);
RNA_def_struct_sdna(srna, "uiStyle");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Style", "Theme settings for style sets");
@@ -473,7 +473,7 @@ static void rna_def_userdef_theme_ui_style(BlenderRNA *brna)
RNA_def_property_range(prop, 0.5, 2.0);
RNA_def_property_ui_text(prop, "Panel Zoom", "Default zoom level for panel areas");
*/
- prop= RNA_def_property(srna, "panel_title", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "panel_title", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "paneltitle");
RNA_def_property_struct_type(prop, "ThemeFontStyle");
@@ -487,73 +487,73 @@ static void rna_def_userdef_theme_ui_style(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Group Label Font", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
*/
- prop= RNA_def_property(srna, "widget_label", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "widget_label", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "widgetlabel");
RNA_def_property_struct_type(prop, "ThemeFontStyle");
RNA_def_property_ui_text(prop, "Widget Label Style", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "widget", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "widget", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "widget");
RNA_def_property_struct_type(prop, "ThemeFontStyle");
RNA_def_property_ui_text(prop, "Widget Style", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
-}
+}
static void rna_def_userdef_theme_ui_wcol(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ThemeWidgetColors", NULL);
+ srna = RNA_def_struct(brna, "ThemeWidgetColors", NULL);
RNA_def_struct_sdna(srna, "uiWidgetColors");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Widget Color Set", "Theme settings for widget color sets");
- prop= RNA_def_property(srna, "outline", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "outline", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Outline", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "inner", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "inner", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Inner", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "inner_sel", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "inner_sel", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Inner Selected", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "item", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "item", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Item", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "text", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "text", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Text", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "text_sel", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "text_sel", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Text Selected", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "show_shaded", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_shaded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shaded", 1);
RNA_def_property_ui_text(prop, "Shaded", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "shadetop", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "shadetop", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, -100, 100);
RNA_def_property_ui_text(prop, "Shade Top", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "shadedown", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "shadedown", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, -100, 100);
RNA_def_property_ui_text(prop, "Shade Down", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
@@ -564,42 +564,42 @@ static void rna_def_userdef_theme_ui_wcol_state(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ThemeWidgetStateColors", NULL);
+ srna = RNA_def_struct(brna, "ThemeWidgetStateColors", NULL);
RNA_def_struct_sdna(srna, "uiWidgetStateColors");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Widget State Color", "Theme settings for widget state colors");
- prop= RNA_def_property(srna, "inner_anim", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "inner_anim", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Animated", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "inner_anim_sel", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "inner_anim_sel", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Animated Selected", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "inner_key", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "inner_key", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Keyframe", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "inner_key_sel", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "inner_key_sel", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Keyframe Selected", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "inner_driven", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "inner_driven", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Driven", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "inner_driven_sel", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "inner_driven_sel", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Driven Selected", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "blend", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "blend", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_ui_text(prop, "Blend", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
}
@@ -609,16 +609,16 @@ static void rna_def_userdef_theme_ui_panel(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ThemePanelColors", NULL);
+ srna = RNA_def_struct(brna, "ThemePanelColors", NULL);
RNA_def_struct_sdna(srna, "uiPanelColors");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Panel Color", "Theme settings for panel colors");
- prop= RNA_def_property(srna, "header", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "header", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_ui_text(prop, "Header", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "show_header", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_header", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "Show Header", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
}
@@ -632,107 +632,107 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna)
rna_def_userdef_theme_ui_wcol_state(brna);
rna_def_userdef_theme_ui_panel(brna);
- srna= RNA_def_struct(brna, "ThemeUserInterface", NULL);
+ srna = RNA_def_struct(brna, "ThemeUserInterface", NULL);
RNA_def_struct_sdna(srna, "ThemeUI");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme User Interface", "Theme settings for user interface elements");
- prop= RNA_def_property(srna, "wcol_regular", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "wcol_regular", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Regular Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_tool", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "wcol_tool", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Tool Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_radio", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "wcol_radio", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Radio Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_text", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "wcol_text", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Text Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_option", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "wcol_option", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Option Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_toggle", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "wcol_toggle", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Toggle Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_num", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "wcol_num", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Number Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_numslider", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "wcol_numslider", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Slider Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_box", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "wcol_box", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Box Backdrop Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_menu", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "wcol_menu", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Menu Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_pulldown", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "wcol_pulldown", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Pulldown Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_menu_back", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "wcol_menu_back", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Menu Backdrop Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_menu_item", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "wcol_menu_item", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Menu Item Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_scroll", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "wcol_scroll", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Scroll Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_progress", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "wcol_progress", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Progress Bar Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_list_item", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "wcol_list_item", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "List Item Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wcol_state", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "wcol_state", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "State Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "panel", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "panel", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Panel Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "icon_file", PROP_STRING, PROP_FILEPATH);
+ prop = RNA_def_property(srna, "icon_file", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "iconfile");
RNA_def_property_ui_text(prop, "Icon File", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "icon_alpha", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "icon_alpha", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_ui_text(prop, "Icon Alpha", "Transparency of icons in the interface, to reduce contrast");
RNA_def_property_update(prop, 0, "rna_userdef_update");
}
@@ -742,69 +742,69 @@ static void rna_def_userdef_theme_space_generic(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ThemeSpaceGeneric", NULL);
+ srna = RNA_def_struct(brna, "ThemeSpaceGeneric", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
RNA_def_struct_ui_text(srna, "Theme Space Settings", "");
/* window */
- prop= RNA_def_property(srna, "back", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "back", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Window Background", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "title", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "title", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Title", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "text", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "text", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Text", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "text_hi", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "text_hi", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Text Highlight", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
/* header */
- prop= RNA_def_property(srna, "header", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "header", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Header", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "header_text", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "header_text", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Header Text", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "header_text_hi", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "header_text_hi", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Header Text Highlight", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
/* buttons */
-// if(! ELEM(spacetype, SPACE_BUTS, SPACE_OUTLINER)) {
- prop= RNA_def_property(srna, "button", PROP_FLOAT, PROP_COLOR_GAMMA);
+/* if(! ELEM(spacetype, SPACE_BUTS, SPACE_OUTLINER)) { */
+ prop = RNA_def_property(srna, "button", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Region Background", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "button_title", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "button_title", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Region Text Titles", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "button_text", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "button_text", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Region Text", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "button_text_hi", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "button_text_hi", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Region Text Highlight", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
-// }
+/* } */
}
/* list / channels */
@@ -813,26 +813,26 @@ static void rna_def_userdef_theme_space_list_generic(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ThemeSpaceListGeneric", NULL);
+ srna = RNA_def_struct(brna, "ThemeSpaceListGeneric", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
RNA_def_struct_ui_text(srna, "Theme Space List Settings", "");
- prop= RNA_def_property(srna, "list", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "list", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Source List", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "list_title", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "list_title", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Source List Title", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "list_text", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "list_text", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Source List Text", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "list_text_hi", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "list_text_hi", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Source List Text Highlight", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
@@ -842,7 +842,7 @@ static void rna_def_userdef_theme_spaces_main(StructRNA *srna)
{
PropertyRNA *prop;
- prop= RNA_def_property(srna, "space", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "space", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "ThemeSpaceGeneric");
RNA_def_property_pointer_funcs(prop, "rna_Theme_space_generic_get", NULL, NULL, NULL);
@@ -853,7 +853,7 @@ static void rna_def_userdef_theme_spaces_list_main(StructRNA *srna)
{
PropertyRNA *prop;
- prop= RNA_def_property(srna, "space_list", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "space_list", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "ThemeSpaceListGeneric");
RNA_def_property_pointer_funcs(prop, "rna_Theme_space_list_generic_get", NULL, NULL, NULL);
@@ -864,17 +864,17 @@ static void rna_def_userdef_theme_spaces_vertex(StructRNA *srna)
{
PropertyRNA *prop;
- prop= RNA_def_property(srna, "vertex", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "vertex", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Vertex", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "vertex_select", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "vertex_select", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Vertex Select", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "vertex_size", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "vertex_size", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1, 10);
RNA_def_property_ui_text(prop, "Vertex Size", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
@@ -884,27 +884,27 @@ static void rna_def_userdef_theme_spaces_edge(StructRNA *srna)
{
PropertyRNA *prop;
- prop= RNA_def_property(srna, "edge_select", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "edge_select", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Edge Select", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "edge_seam", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "edge_seam", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Edge Seam", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "edge_sharp", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "edge_sharp", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Edge Sharp", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "edge_crease", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "edge_crease", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Edge Crease", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "edge_facesel", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "edge_facesel", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Edge UV Face Select", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
@@ -914,22 +914,22 @@ static void rna_def_userdef_theme_spaces_face(StructRNA *srna)
{
PropertyRNA *prop;
- prop= RNA_def_property(srna, "face", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "face", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Face", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "face_select", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "face_select", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Face Selected", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "face_dot", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "face_dot", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Face Dot Selected", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "facedot_size", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "facedot_size", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1, 10);
RNA_def_property_ui_text(prop, "Face Dot Size", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
@@ -940,80 +940,80 @@ static void rna_def_userdef_theme_spaces_curves(StructRNA *srna, short incl_nurb
PropertyRNA *prop;
if (incl_nurbs) {
- prop= RNA_def_property(srna, "nurb_uline", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "nurb_uline", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "nurb_uline");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "NURBS U-lines", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "nurb_vline", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "nurb_vline", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "nurb_vline");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "NURBS V-lines", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "nurb_sel_uline", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "nurb_sel_uline", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "nurb_sel_uline");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "NURBS active U-lines", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "nurb_sel_vline", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "nurb_sel_vline", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "nurb_sel_vline");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "NURBS active V-lines", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "act_spline", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "act_spline", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "act_spline");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Active spline", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
}
- prop= RNA_def_property(srna, "handle_free", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "handle_free", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "handle_free");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Free handle color", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "handle_auto", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "handle_auto", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "handle_auto");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Auto handle color", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "handle_vect", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "handle_vect", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "handle_vect");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Vector handle color", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "handle_align", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "handle_align", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "handle_align");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Align handle color", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "handle_sel_free", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "handle_sel_free", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "handle_sel_free");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Free handle selected color", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "handle_sel_auto", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "handle_sel_auto", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "handle_sel_auto");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Auto handle selected color", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "handle_sel_vect", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "handle_sel_vect", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "handle_sel_vect");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Vector handle selected color", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "handle_sel_align", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "handle_sel_align", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "handle_sel_align");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Align handle selected color", "");
@@ -1021,20 +1021,20 @@ static void rna_def_userdef_theme_spaces_curves(StructRNA *srna, short incl_nurb
if (incl_nurbs == 0) {
/* assume that when nurbs are off, this is for 2D (i.e. anim) editors */
- prop= RNA_def_property(srna, "handle_auto_clamped", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "handle_auto_clamped", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "handle_auto_clamped");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Auto-Clamped handle color", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "handle_sel_auto_clamped", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "handle_sel_auto_clamped", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "handle_sel_auto_clamped");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Auto-Clamped handle selected color", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
}
- prop= RNA_def_property(srna, "lastsel_point", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "lastsel_point", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "lastsel_point");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Last selected point", "");
@@ -1048,63 +1048,63 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
/* space_view3d */
- srna= RNA_def_struct(brna, "ThemeView3D", NULL);
+ srna = RNA_def_struct(brna, "ThemeView3D", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme 3D View", "Theme settings for the 3D View");
rna_def_userdef_theme_spaces_main(srna);
- prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Grid", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Panel", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wire", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "wire", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Wire", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "lamp", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "lamp", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Lamp", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "speaker", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "speaker", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Speaker", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "object_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "object_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "select");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Object Selected", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "object_active", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "object_active", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "active");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Active Object", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "object_grouped", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "object_grouped", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "group");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Object Grouped", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "object_grouped_active", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "object_grouped_active", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "group_active");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Object Grouped Active", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "transform", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "transform", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Transform", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
@@ -1114,64 +1114,64 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
rna_def_userdef_theme_spaces_face(srna);
rna_def_userdef_theme_spaces_curves(srna, 1);
- prop= RNA_def_property(srna, "extra_edge_len", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "extra_edge_len", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Edge Length Text", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "extra_face_angle", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "extra_face_angle", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Face Angle Text", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "extra_face_area", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "extra_face_area", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Face Area Text", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "editmesh_active", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "editmesh_active", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Active Vert/Edge/Face", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "normal", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "normal", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Face Normal", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "vertex_normal", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "vertex_normal", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Vertex Normal", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "bone_solid", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "bone_solid", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Bone Solid", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "bone_pose", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "bone_pose", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Bone Pose", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "cframe");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Current Frame", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "outline_width", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "outline_width", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 1, 5);
RNA_def_property_ui_text(prop, "Outline Width", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "bundle_solid", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "bundle_solid", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "bundle_solid");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Bundle Solid", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "camera_path", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "camera_path", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "camera_path");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Camera Path", "");
@@ -1186,7 +1186,7 @@ static void rna_def_userdef_theme_space_graph(BlenderRNA *brna)
/* space_graph */
- srna= RNA_def_struct(brna, "ThemeGraphEditor", NULL);
+ srna = RNA_def_struct(brna, "ThemeGraphEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Graph Editor", "Theme settings for the graph editor");
@@ -1194,23 +1194,23 @@ static void rna_def_userdef_theme_space_graph(BlenderRNA *brna)
rna_def_userdef_theme_spaces_main(srna);
rna_def_userdef_theme_spaces_list_main(srna);
- prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Grid", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Panel", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "window_sliders", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "window_sliders", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "shade1");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Window Sliders", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "channels_region", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "channels_region", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "shade2");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Channels Region", "");
@@ -1219,46 +1219,46 @@ static void rna_def_userdef_theme_space_graph(BlenderRNA *brna)
rna_def_userdef_theme_spaces_vertex(srna);
rna_def_userdef_theme_spaces_curves(srna, 0);
- prop= RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "cframe");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Current Frame", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "handle_vertex", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "handle_vertex", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Handle Vertex", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "handle_vertex_select", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "handle_vertex_select", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Handle Vertex Select", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "handle_vertex_size", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "handle_vertex_size", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 255);
RNA_def_property_ui_text(prop, "Handle Vertex Size", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "channel_group", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "channel_group", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "group");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Channel Group", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "active_channels_group", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "active_channels_group", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "group_active");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Active Channel Group", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "dopesheet_channel", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "dopesheet_channel", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "ds_channel");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "DopeSheet Channel", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "dopesheet_subchannel", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "dopesheet_subchannel", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "ds_subchannel");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "DopeSheet Sub-Channel", "");
@@ -1272,7 +1272,7 @@ static void rna_def_userdef_theme_space_file(BlenderRNA *brna)
/* space_file */
- srna= RNA_def_struct(brna, "ThemeFileBrowser", NULL);
+ srna = RNA_def_struct(brna, "ThemeFileBrowser", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme File Browser", "Theme settings for the File Browser");
@@ -1280,37 +1280,37 @@ static void rna_def_userdef_theme_space_file(BlenderRNA *brna)
rna_def_userdef_theme_spaces_main(srna);
rna_def_userdef_theme_spaces_list_main(srna);
- prop= RNA_def_property(srna, "selected_file", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "selected_file", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "hilite");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Selected File", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "tiles", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "tiles", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "panel");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Tiles", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "scrollbar", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "scrollbar", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "shade1");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Scrollbar", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "scroll_handle", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "scroll_handle", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "shade2");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Scroll Handle", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "active_file", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "active_file", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "active");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Active File", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "active_file_text", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "active_file_text", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "grid");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Active File Text", "");
@@ -1324,19 +1324,19 @@ static void rna_def_userdef_theme_space_outliner(BlenderRNA *brna)
/* space_outliner */
- srna= RNA_def_struct(brna, "ThemeOutliner", NULL);
+ srna = RNA_def_struct(brna, "ThemeOutliner", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Outliner", "Theme settings for the Outliner");
rna_def_userdef_theme_spaces_main(srna);
- prop= RNA_def_property(srna, "match", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "match", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Filter Match", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "selected_highlight", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "selected_highlight", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Selected Highlight", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
@@ -1348,7 +1348,7 @@ static void rna_def_userdef_theme_space_userpref(BlenderRNA *brna)
/* space_userpref */
- srna= RNA_def_struct(brna, "ThemeUserPreferences", NULL);
+ srna = RNA_def_struct(brna, "ThemeUserPreferences", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme User Preferences", "Theme settings for the User Preferences");
@@ -1363,38 +1363,38 @@ static void rna_def_userdef_theme_space_console(BlenderRNA *brna)
/* space_console */
- srna= RNA_def_struct(brna, "ThemeConsole", NULL);
+ srna = RNA_def_struct(brna, "ThemeConsole", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Console", "Theme settings for the Console");
rna_def_userdef_theme_spaces_main(srna);
- prop= RNA_def_property(srna, "line_output", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "line_output", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "console_output");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Line Output", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "line_input", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "line_input", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "console_input");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Line Input", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "line_info", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "line_info", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "console_info");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Line Info", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "line_error", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "line_error", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "console_error");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Line Error", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "cursor", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "cursor", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "console_cursor");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Cursor", "");
@@ -1407,7 +1407,7 @@ static void rna_def_userdef_theme_space_info(BlenderRNA *brna)
/* space_info */
- srna= RNA_def_struct(brna, "ThemeInfo", NULL);
+ srna = RNA_def_struct(brna, "ThemeInfo", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Info", "Theme settings for Info");
@@ -1423,62 +1423,62 @@ static void rna_def_userdef_theme_space_text(BlenderRNA *brna)
/* space_text */
- srna= RNA_def_struct(brna, "ThemeTextEditor", NULL);
+ srna = RNA_def_struct(brna, "ThemeTextEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Text Editor", "Theme settings for the Text Editor");
rna_def_userdef_theme_spaces_main(srna);
- prop= RNA_def_property(srna, "line_numbers_background", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "line_numbers_background", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "grid");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Line Numbers Background", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "scroll_bar", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "scroll_bar", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "shade1");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Scroll Bar", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "selected_text", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "selected_text", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "shade2");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Selected Text", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "cursor", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "cursor", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "hilite");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Cursor", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "syntax_builtin", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "syntax_builtin", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "syntaxb");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Syntax Built-in", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "syntax_special", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "syntax_special", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "syntaxv");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Syntax Special", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "syntax_comment", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "syntax_comment", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "syntaxc");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Syntax Comment", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "syntax_string", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "syntax_string", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "syntaxl");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Syntax String", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "syntax_numbers", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "syntax_numbers", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "syntaxn");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Syntax Numbers", "");
@@ -1492,7 +1492,7 @@ static void rna_def_userdef_theme_space_node(BlenderRNA *brna)
/* space_node */
- srna= RNA_def_struct(brna, "ThemeNodeEditor", NULL);
+ srna = RNA_def_struct(brna, "ThemeNodeEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Node Editor", "Theme settings for the Node Editor");
@@ -1500,55 +1500,55 @@ static void rna_def_userdef_theme_space_node(BlenderRNA *brna)
rna_def_userdef_theme_spaces_main(srna);
rna_def_userdef_theme_spaces_list_main(srna);
- prop= RNA_def_property(srna, "wire", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "wire", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "wire");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Wires", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "wire_select", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "wire_select", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "edge_select");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Wire Select", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "selected_text", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "selected_text", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "shade2");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Selected Text", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "node_backdrop", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "node_backdrop", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "syntaxl");
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Node Backdrop", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "in_out_node", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "in_out_node", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "syntaxn");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "In/Out Node", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "converter_node", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "converter_node", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "syntaxv");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Converter Node", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "operator_node", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "operator_node", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "syntaxb");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Operator Node", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "group_node", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "group_node", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "syntaxc");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Group Node", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "noodle_curving", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "noodle_curving", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "noodle_curving");
RNA_def_property_int_default(prop, 5);
RNA_def_property_range(prop, 0, 10);
@@ -1563,14 +1563,14 @@ static void rna_def_userdef_theme_space_logic(BlenderRNA *brna)
/* space_logic */
- srna= RNA_def_struct(brna, "ThemeLogicEditor", NULL);
+ srna = RNA_def_struct(brna, "ThemeLogicEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Logic Editor", "Theme settings for the Logic Editor");
rna_def_userdef_theme_spaces_main(srna);
- prop= RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Panel", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
@@ -1584,14 +1584,14 @@ static void rna_def_userdef_theme_space_buts(BlenderRNA *brna)
/* space_buts */
- srna= RNA_def_struct(brna, "ThemeProperties", NULL);
+ srna = RNA_def_struct(brna, "ThemeProperties", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Properties", "Theme settings for the Properties");
rna_def_userdef_theme_spaces_main(srna);
- prop= RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Panel", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
@@ -1604,19 +1604,19 @@ static void rna_def_userdef_theme_space_time(BlenderRNA *brna)
/* space_time */
- srna= RNA_def_struct(brna, "ThemeTimeline", NULL);
+ srna = RNA_def_struct(brna, "ThemeTimeline", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Timeline", "Theme settings for the Timeline");
rna_def_userdef_theme_spaces_main(srna);
- prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Grid", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "cframe");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Current Frame", "");
@@ -1630,7 +1630,7 @@ static void rna_def_userdef_theme_space_image(BlenderRNA *brna)
/* space_image */
- srna= RNA_def_struct(brna, "ThemeImageEditor", NULL);
+ srna = RNA_def_struct(brna, "ThemeImageEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Image Editor", "Theme settings for the Image Editor");
@@ -1639,48 +1639,48 @@ static void rna_def_userdef_theme_space_image(BlenderRNA *brna)
rna_def_userdef_theme_spaces_vertex(srna);
rna_def_userdef_theme_spaces_face(srna);
- prop= RNA_def_property(srna, "editmesh_active", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "editmesh_active", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Active Vert/Edge/Face", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "scope_back", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "scope_back", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "preview_back");
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Scope region background color", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "preview_stitch_face", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "preview_stitch_face", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "preview_stitch_face");
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Stitch preview face color", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "preview_stitch_edge", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "preview_stitch_edge", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "preview_stitch_edge");
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Stitch preview edge color", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "preview_stitch_vert", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "preview_stitch_vert", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "preview_stitch_vert");
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Stitch preview vertex color", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "preview_stitch_stitchable", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "preview_stitch_stitchable", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "preview_stitch_stitchable");
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Stitch preview stitchable color", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "preview_stitch_unstitchable", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "preview_stitch_unstitchable", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "preview_stitch_unstitchable");
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Stitch preview unstitchable color", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "preview_stitch_active", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "preview_stitch_active", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "preview_stitch_active");
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "Stitch preview active island", "");
@@ -1694,85 +1694,85 @@ static void rna_def_userdef_theme_space_seq(BlenderRNA *brna)
/* space_seq */
- srna= RNA_def_struct(brna, "ThemeSequenceEditor", NULL);
+ srna = RNA_def_struct(brna, "ThemeSequenceEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Sequence Editor", "Theme settings for the Sequence Editor");
rna_def_userdef_theme_spaces_main(srna);
- prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Grid", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "window_sliders", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "window_sliders", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "shade1");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Window Sliders", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "movie_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "movie_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "movie");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Movie Strip", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "image_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "image_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "image");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Image Strip", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "scene_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "scene_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "scene");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Scene Strip", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "audio_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "audio_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "audio");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Audio Strip", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "effect_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "effect_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "effect");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Effect Strip", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "plugin_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "plugin_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "plugin");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Plugin Strip", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "transition_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "transition_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "transition");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Transition Strip", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "meta_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "meta_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "meta");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Meta Strip", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "cframe");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Current Frame", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "keyframe", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "keyframe", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "vertex_select");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Keyframe", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "draw_action", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "draw_action", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "bone_pose");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Draw Action", "");
@@ -1786,7 +1786,7 @@ static void rna_def_userdef_theme_space_action(BlenderRNA *brna)
/* space_action */
- srna= RNA_def_struct(brna, "ThemeDopeSheet", NULL);
+ srna = RNA_def_struct(brna, "ThemeDopeSheet", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme DopeSheet", "Theme settings for the DopeSheet");
@@ -1794,72 +1794,72 @@ static void rna_def_userdef_theme_space_action(BlenderRNA *brna)
rna_def_userdef_theme_spaces_main(srna);
rna_def_userdef_theme_spaces_list_main(srna);
- prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Grid", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "value_sliders", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "value_sliders", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "face");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Value Sliders", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "view_sliders", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "view_sliders", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "shade1");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "View Sliders", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "channels", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "channels", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "shade2");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Channels", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "channels_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "channels_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "hilite");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Channels Selected", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "channel_group", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "channel_group", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "group");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Channel Group", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "active_channels_group", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "active_channels_group", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "group_active");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Active Channel Group", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "long_key", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "long_key", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "strip");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Long Key", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "long_key_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "long_key_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "strip_select");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Long Key Selected", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "cframe");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Current Frame", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "dopesheet_channel", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "dopesheet_channel", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "ds_channel");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "DopeSheet Channel", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "dopesheet_subchannel", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "dopesheet_subchannel", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "ds_subchannel");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "DopeSheet Sub-Channel", "");
@@ -1873,7 +1873,7 @@ static void rna_def_userdef_theme_space_nla(BlenderRNA *brna)
/* space_nla */
- srna= RNA_def_struct(brna, "ThemeNLAEditor", NULL);
+ srna = RNA_def_struct(brna, "ThemeNLAEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme NLA Editor", "Theme settings for the NLA Editor");
@@ -1881,42 +1881,42 @@ static void rna_def_userdef_theme_space_nla(BlenderRNA *brna)
rna_def_userdef_theme_spaces_main(srna);
rna_def_userdef_theme_spaces_list_main(srna);
- prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Grid", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "view_sliders", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "view_sliders", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "shade1");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "View Sliders", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "bars", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "bars", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "shade2");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Bars", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "bars_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "bars_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "hilite");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Bars Selected", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "strips", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "strips", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "strip");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Strips", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "strips_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "strips_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "strip_select");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Strips Selected", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "cframe");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Current Frame", "");
@@ -1928,29 +1928,29 @@ static void rna_def_userdef_theme_colorset(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "ThemeBoneColorSet", NULL);
+ srna = RNA_def_struct(brna, "ThemeBoneColorSet", NULL);
RNA_def_struct_sdna(srna, "ThemeWireColor");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Bone Color Set", "Theme settings for bone color sets");
- prop= RNA_def_property(srna, "normal", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "normal", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "solid");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Normal", "Color used for the surface of bones");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "select", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "select", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "select");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Select", "Color used for selected bones");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "active", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "active", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Active", "Color used for active bones");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "show_colored_constraints", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_colored_constraints", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TH_WIRECOLOR_CONSTCOLS);
RNA_def_property_ui_text(prop, "Colored Constraints", "Allow the use of colors indicating constraints/keyed status");
RNA_def_property_update(prop, 0, "rna_userdef_update");
@@ -1963,83 +1963,83 @@ static void rna_def_userdef_theme_space_clip(BlenderRNA *brna)
/* space_clip */
- srna= RNA_def_struct(brna, "ThemeClipEditor", NULL);
+ srna = RNA_def_struct(brna, "ThemeClipEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Clip Editor", "Theme settings for the Movie Clip Editor");
rna_def_userdef_theme_spaces_main(srna);
- prop= RNA_def_property(srna, "marker_outline", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "marker_outline", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "marker_outline");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Marker Outline Color", "Color of marker's outile");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "marker", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "marker", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "marker");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Marker Color", "Color of marker");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "active_marker", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "active_marker", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "act_marker");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Active Marker", "Color of active marker");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "selected_marker", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "selected_marker", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "sel_marker");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Selected Marker", "Color of sleected marker");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "disabled_marker", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "disabled_marker", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "dis_marker");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Disabled Marker", "Color of disabled marker");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "locked_marker", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "locked_marker", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "lock_marker");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Locked Marker", "Color of locked marker");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "path_before", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "path_before", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "path_before");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Path Before", "Color of path before current frame");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "path_after", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "path_after", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "path_after");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Path After", "Color of path after current frame");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Grid", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "cframe");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Current Frame", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "handle_vertex", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "handle_vertex", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Handle Vertex", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "handle_vertex_select", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "handle_vertex_select", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Handle Vertex Select", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "handle_vertex_size", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "handle_vertex_size", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 255);
RNA_def_property_ui_text(prop, "Handle Vertex Size", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
@@ -2072,131 +2072,131 @@ static void rna_def_userdef_themes(BlenderRNA *brna)
{20, "CLIP_EDITOR", ICON_CLIP, "Movie Clip Editor", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "Theme", NULL);
+ srna = RNA_def_struct(brna, "Theme", NULL);
RNA_def_struct_sdna(srna, "bTheme");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme", "Theme settings defining draw style and colors in the user interface");
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "Name of the theme");
RNA_def_struct_name_property(srna, prop);
RNA_def_property_flag(prop, PROP_SKIP_SAVE); /* XXX: for now putting this in presets is silly - its just Default */
- prop= RNA_def_property(srna, "theme_area", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "theme_area", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "active_theme_area");
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
RNA_def_property_enum_items(prop, active_theme_area);
RNA_def_property_ui_text(prop, "Active Theme Area", "");
- prop= RNA_def_property(srna, "user_interface", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "user_interface", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tui");
RNA_def_property_struct_type(prop, "ThemeUserInterface");
RNA_def_property_ui_text(prop, "User Interface", "");
- prop= RNA_def_property(srna, "view_3d", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "view_3d", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tv3d");
RNA_def_property_struct_type(prop, "ThemeView3D");
RNA_def_property_ui_text(prop, "3D View", "");
- prop= RNA_def_property(srna, "graph_editor", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "graph_editor", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tipo");
RNA_def_property_struct_type(prop, "ThemeGraphEditor");
RNA_def_property_ui_text(prop, "Graph Editor", "");
- prop= RNA_def_property(srna, "file_browser", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "file_browser", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tfile");
RNA_def_property_struct_type(prop, "ThemeFileBrowser");
RNA_def_property_ui_text(prop, "File Browser", "");
- prop= RNA_def_property(srna, "nla_editor", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "nla_editor", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tnla");
RNA_def_property_struct_type(prop, "ThemeNLAEditor");
RNA_def_property_ui_text(prop, "NLA Editor", "");
- prop= RNA_def_property(srna, "dopesheet_editor", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "dopesheet_editor", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tact");
RNA_def_property_struct_type(prop, "ThemeDopeSheet");
RNA_def_property_ui_text(prop, "DopeSheet", "");
- prop= RNA_def_property(srna, "image_editor", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "image_editor", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tima");
RNA_def_property_struct_type(prop, "ThemeImageEditor");
RNA_def_property_ui_text(prop, "Image Editor", "");
- prop= RNA_def_property(srna, "sequence_editor", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "sequence_editor", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tseq");
RNA_def_property_struct_type(prop, "ThemeSequenceEditor");
RNA_def_property_ui_text(prop, "Sequence Editor", "");
- prop= RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tbuts");
RNA_def_property_struct_type(prop, "ThemeProperties");
RNA_def_property_ui_text(prop, "Properties", "");
- prop= RNA_def_property(srna, "text_editor", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "text_editor", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "text");
RNA_def_property_struct_type(prop, "ThemeTextEditor");
RNA_def_property_ui_text(prop, "Text Editor", "");
- prop= RNA_def_property(srna, "timeline", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "timeline", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "ttime");
RNA_def_property_struct_type(prop, "ThemeTimeline");
RNA_def_property_ui_text(prop, "Timeline", "");
- prop= RNA_def_property(srna, "node_editor", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "node_editor", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tnode");
RNA_def_property_struct_type(prop, "ThemeNodeEditor");
RNA_def_property_ui_text(prop, "Node Editor", "");
- prop= RNA_def_property(srna, "logic_editor", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "logic_editor", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tlogic");
RNA_def_property_struct_type(prop, "ThemeLogicEditor");
RNA_def_property_ui_text(prop, "Logic Editor", "");
- prop= RNA_def_property(srna, "outliner", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "outliner", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "toops");
RNA_def_property_struct_type(prop, "ThemeOutliner");
RNA_def_property_ui_text(prop, "Outliner", "");
- prop= RNA_def_property(srna, "info", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "info", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tinfo");
RNA_def_property_struct_type(prop, "ThemeInfo");
RNA_def_property_ui_text(prop, "Info", "");
- prop= RNA_def_property(srna, "user_preferences", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "user_preferences", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tuserpref");
RNA_def_property_struct_type(prop, "ThemeUserPreferences");
RNA_def_property_ui_text(prop, "User Preferences", "");
- prop= RNA_def_property(srna, "console", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "console", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tconsole");
RNA_def_property_struct_type(prop, "ThemeConsole");
RNA_def_property_ui_text(prop, "Console", "");
- prop= RNA_def_property(srna, "bone_color_sets", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "bone_color_sets", PROP_COLLECTION, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_collection_sdna(prop, NULL, "tarm", "");
RNA_def_property_struct_type(prop, "ThemeBoneColorSet");
RNA_def_property_ui_text(prop, "Bone Color Sets", "");
- prop= RNA_def_property(srna, "clip_editor", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "clip_editor", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tclip");
RNA_def_property_struct_type(prop, "ThemeClipEditor");
@@ -2208,12 +2208,12 @@ static void rna_def_userdef_addon(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Addon", NULL);
+ srna = RNA_def_struct(brna, "Addon", NULL);
RNA_def_struct_sdna(srna, "bAddon");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Addon", "Python addons to be loaded automatically");
- prop= RNA_def_property(srna, "module", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "module", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Module", "Module name");
RNA_def_struct_name_property(srna, prop);
}
@@ -2255,30 +2255,30 @@ static void rna_def_userdef_solidlight(BlenderRNA *brna)
PropertyRNA *prop;
static float default_dir[3] = {0.f, 1.f, 0.f};
- srna= RNA_def_struct(brna, "UserSolidLight", NULL);
+ srna = RNA_def_struct(brna, "UserSolidLight", NULL);
RNA_def_struct_sdna(srna, "SolidLight");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Solid Light", "Light used for OpenGL lighting in solid draw mode");
- prop= RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", 1);
RNA_def_property_ui_text(prop, "Enabled", "Enable this OpenGL light in solid draw mode");
RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update");
- prop= RNA_def_property(srna, "direction", PROP_FLOAT, PROP_DIRECTION);
+ prop = RNA_def_property(srna, "direction", PROP_FLOAT, PROP_DIRECTION);
RNA_def_property_float_sdna(prop, NULL, "vec");
RNA_def_property_array(prop, 3);
RNA_def_property_float_array_default(prop, default_dir);
RNA_def_property_ui_text(prop, "Direction", "Direction that the OpenGL light is shining");
RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update");
- prop= RNA_def_property(srna, "diffuse_color", PROP_FLOAT, PROP_COLOR);
+ prop = RNA_def_property(srna, "diffuse_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "col");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Diffuse Color", "Diffuse color of the OpenGL light");
RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update");
- prop= RNA_def_property(srna, "specular_color", PROP_FLOAT, PROP_COLOR);
+ prop = RNA_def_property(srna, "specular_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "spec");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Specular Color", "Color of the light's specular highlight");
@@ -2304,7 +2304,7 @@ static void rna_def_userdef_view(BlenderRNA *brna)
PropertyRNA *prop;
StructRNA *srna;
- srna= RNA_def_struct(brna, "UserPreferencesView", NULL);
+ srna = RNA_def_struct(brna, "UserPreferencesView", NULL);
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_nested(brna, srna, "UserPreferences");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
@@ -2313,185 +2313,185 @@ static void rna_def_userdef_view(BlenderRNA *brna)
/* View */
/* display */
- prop= RNA_def_property(srna, "show_tooltips", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_tooltips", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_TOOLTIPS);
RNA_def_property_ui_text(prop, "Tooltips", "Display tooltips");
- prop= RNA_def_property(srna, "show_tooltips_python", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_tooltips_python", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_TOOLTIPS_PYTHON);
RNA_def_property_ui_text(prop, "Show Python Tooltips", "Show Python references in tooltips");
- prop= RNA_def_property(srna, "show_object_info", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_object_info", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_DRAWVIEWINFO);
RNA_def_property_ui_text(prop, "Display Object Info", "Display objects name and frame number in 3D view");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "use_global_scene", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_global_scene", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_SCENEGLOBAL);
RNA_def_property_ui_text(prop, "Global Scene", "Force the current Scene to be displayed in all Screens");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "show_large_cursors", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_large_cursors", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "curssize", 0);
RNA_def_property_ui_text(prop, "Large Cursors", "Use large mouse cursors when available");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "show_view_name", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_view_name", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_VIEWPORTNAME);
RNA_def_property_ui_text(prop, "Show View Name", "Show the name of the view's direction in each 3D View");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "show_splash", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_splash", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_SPLASH_DISABLE);
RNA_def_property_ui_text(prop, "Show Splash", "Display splash screen on startup");
- prop= RNA_def_property(srna, "show_playback_fps", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_playback_fps", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_FPS);
RNA_def_property_ui_text(prop, "Show Playback FPS",
"Show the frames per second screen refresh rate, while animation is played back");
RNA_def_property_update(prop, 0, "rna_userdef_update");
/* menus */
- prop= RNA_def_property(srna, "use_mouse_over_open", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_mouse_over_open", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_MENUOPENAUTO);
RNA_def_property_ui_text(prop, "Open On Mouse Over",
"Open menu buttons and pulldowns automatically when the mouse is hovering");
- prop= RNA_def_property(srna, "open_toplevel_delay", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "open_toplevel_delay", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "menuthreshold1");
RNA_def_property_range(prop, 1, 40);
RNA_def_property_ui_text(prop, "Top Level Menu Open Delay",
"Time delay in 1/10 seconds before automatically opening top level menus");
- prop= RNA_def_property(srna, "open_sublevel_delay", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "open_sublevel_delay", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "menuthreshold2");
RNA_def_property_range(prop, 1, 40);
RNA_def_property_ui_text(prop, "Sub Level Menu Open Delay",
"Time delay in 1/10 seconds before automatically opening sub level menus");
/* Toolbox click-hold delay */
- prop= RNA_def_property(srna, "open_left_mouse_delay", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "open_left_mouse_delay", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tb_leftmouse");
RNA_def_property_range(prop, 1, 40);
RNA_def_property_ui_text(prop, "Hold LMB Open Toolbox Delay",
"Time in 1/10 seconds to hold the Left Mouse Button before opening the toolbox");
- prop= RNA_def_property(srna, "open_right_mouse_delay", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "open_right_mouse_delay", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tb_rightmouse");
RNA_def_property_range(prop, 1, 40);
RNA_def_property_ui_text(prop, "Hold RMB Open Toolbox Delay",
"Time in 1/10 seconds to hold the Right Mouse Button before opening the toolbox");
- prop= RNA_def_property(srna, "show_column_layout", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_column_layout", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_PLAINMENUS);
RNA_def_property_ui_text(prop, "Toolbox Column Layout", "Use a column layout for toolbox");
- prop= RNA_def_property(srna, "use_directional_menus", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_directional_menus", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_MENUFIXEDORDER);
RNA_def_property_ui_text(prop, "Contents Follow Opening Direction",
"Otherwise menus, etc will always be top to bottom, left to right, no matter opening direction");
- prop= RNA_def_property(srna, "use_global_pivot", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_global_pivot", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_LOCKAROUND);
RNA_def_property_ui_text(prop, "Global Pivot", "Lock the same rotation/scaling pivot in all 3D Views");
- prop= RNA_def_property(srna, "use_mouse_auto_depth", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_mouse_auto_depth", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ORBIT_ZBUF);
RNA_def_property_ui_text(prop, "Auto Depth", "Use the depth under the mouse to improve view pan/rotate/zoom functionality");
- prop= RNA_def_property(srna, "use_camera_lock_parent", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_camera_lock_parent", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_CAM_LOCK_NO_PARENT);
RNA_def_property_ui_text(prop, "Camera Parent Lock",
"When the camera is locked to the view and in fly mode, "
"transform the parent rather than the camera");
/* view zoom */
- prop= RNA_def_property(srna, "use_zoom_to_mouse", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_zoom_to_mouse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZOOM_TO_MOUSEPOS);
RNA_def_property_ui_text(prop, "Zoom To Mouse Position",
"Zoom in towards the mouse pointer's position in the 3D view, rather than the 2D window center");
/* view rotation */
- prop= RNA_def_property(srna, "use_auto_perspective", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_auto_perspective", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_AUTOPERSP);
RNA_def_property_ui_text(prop, "Auto Perspective",
"Automatically switch between orthographic and perspective when changing "
"from top/front/side views");
- prop= RNA_def_property(srna, "use_rotate_around_active", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_rotate_around_active", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ORBIT_SELECTION);
RNA_def_property_ui_text(prop, "Rotate Around Selection", "Use selection as the pivot point");
/* mini axis */
- prop= RNA_def_property(srna, "show_mini_axis", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_mini_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_ROTVIEWICON);
RNA_def_property_ui_text(prop, "Show Mini Axes", "Show a small rotating 3D axes in the bottom left corner of the 3D View");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "mini_axis_size", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "mini_axis_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "rvisize");
RNA_def_property_range(prop, 10, 64);
RNA_def_property_ui_text(prop, "Mini Axes Size", "The axes icon's size");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "mini_axis_brightness", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "mini_axis_brightness", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "rvibright");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Mini Axes Brightness", "Brightness of the icon");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "smooth_view", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "smooth_view", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "smooth_viewtx");
RNA_def_property_range(prop, 0, 1000);
RNA_def_property_ui_text(prop, "Smooth View", "Time to animate the view in milliseconds, zero to disable");
- prop= RNA_def_property(srna, "rotation_angle", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "rotation_angle", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "pad_rot_angle");
RNA_def_property_range(prop, 0, 90);
RNA_def_property_ui_text(prop, "Rotation Angle", "Rotation step for numerical pad keys (2 4 6 8)");
/* 3D transform widget */
- prop= RNA_def_property(srna, "show_manipulator", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_manipulator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "tw_flag", V3D_USE_MANIPULATOR);
RNA_def_property_ui_text(prop, "Manipulator", "Use 3D transform manipulator");
RNA_def_property_update(prop, 0, "rna_userdef_show_manipulator_update");
- prop= RNA_def_property(srna, "manipulator_size", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "manipulator_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tw_size");
RNA_def_property_range(prop, 2, 40);
RNA_def_property_int_default(prop, 15);
RNA_def_property_ui_text(prop, "Manipulator Size", "Diameter of widget, in 10 pixel units");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "manipulator_handle_size", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "manipulator_handle_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tw_handlesize");
RNA_def_property_range(prop, 2, 40);
RNA_def_property_int_default(prop, 25);
RNA_def_property_ui_text(prop, "Manipulator Handle Size", "Size of widget handles as percentage of widget radius");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "manipulator_hotspot", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "manipulator_hotspot", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tw_hotspot");
RNA_def_property_range(prop, 4, 40);
RNA_def_property_int_default(prop, 14);
RNA_def_property_ui_text(prop, "Manipulator Hotspot", "Pixel distance around the handles to accept mouse clicks");
- prop= RNA_def_property(srna, "object_origin_size", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "object_origin_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "obcenter_dia");
RNA_def_property_range(prop, 4, 10);
RNA_def_property_ui_text(prop, "Object Origin Size", "Diameter in Pixels for Object/Lamp origin display");
RNA_def_property_update(prop, 0, "rna_userdef_update");
/* View2D Grid Displays */
- prop= RNA_def_property(srna, "view2d_grid_spacing_min", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "view2d_grid_spacing_min", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "v2d_min_gridsize");
- RNA_def_property_range(prop, 1, 500); // XXX: perhaps the lower range should only go down to 5?
+ RNA_def_property_range(prop, 1, 500); /* XXX: perhaps the lower range should only go down to 5? */
RNA_def_property_ui_text(prop, "2D View Minimum Grid Spacing",
"Minimum number of pixels between each gridline in 2D Viewports");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- // TODO: add a setter for this, so that we can bump up the minimum size as necessary...
- prop= RNA_def_property(srna, "timecode_style", PROP_ENUM, PROP_NONE);
+ /* TODO: add a setter for this, so that we can bump up the minimum size as necessary... */
+ prop = RNA_def_property(srna, "timecode_style", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, timecode_styles);
RNA_def_property_enum_sdna(prop, NULL, "timecode_style");
RNA_def_property_enum_funcs(prop, NULL, "rna_userdef_timecode_style_set", NULL);
@@ -2510,17 +2510,17 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
{AUTOKEY_MODE_EDITKEYS, "REPLACE_KEYS", 0, "Replace", ""},
{0, NULL, 0, NULL, NULL}};
- static const EnumPropertyItem material_link_items[]= {
+ static const EnumPropertyItem material_link_items[] = {
{0, "OBDATA", 0, "ObData", "Toggle whether the material is linked to object data or the object block"},
{USER_MAT_ON_OB, "OBJECT", 0, "Object", "Toggle whether the material is linked to object data or the object block"},
{0, NULL, 0, NULL, NULL}};
- static const EnumPropertyItem object_align_items[]= {
+ static const EnumPropertyItem object_align_items[] = {
{0, "WORLD", 0, "World", "Align newly added objects to the world coordinate system"},
{USER_ADD_VIEWALIGNED, "VIEW", 0, "View", "Align newly added objects facing the active 3D View direction"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "UserPreferencesEdit", NULL);
+ srna = RNA_def_struct(brna, "UserPreferencesEdit", NULL);
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_nested(brna, srna, "UserPreferences");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
@@ -2528,171 +2528,171 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
/* Edit Methods */
- prop= RNA_def_property(srna, "material_link", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "material_link", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, material_link_items);
RNA_def_property_ui_text(prop, "Material Link To",
"Toggle whether the material is linked to object data or the object block");
- prop= RNA_def_property(srna, "object_align", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "object_align", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, object_align_items);
RNA_def_property_ui_text(prop, "Align Object To",
"When adding objects from a 3D View menu, either align them with that view or with the world");
- prop= RNA_def_property(srna, "use_enter_edit_mode", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_enter_edit_mode", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_ADD_EDITMODE);
RNA_def_property_ui_text(prop, "Enter Edit Mode", "Enter Edit Mode automatically after adding a new object");
- prop= RNA_def_property(srna, "use_drag_immediately", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_drag_immediately", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_RELEASECONFIRM);
RNA_def_property_ui_text(prop, "Release confirms", "Moving things with a mouse drag confirms when releasing the button");
/* Undo */
- prop= RNA_def_property(srna, "undo_steps", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "undo_steps", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "undosteps");
RNA_def_property_range(prop, 0, 64);
RNA_def_property_ui_text(prop, "Undo Steps", "Number of undo steps available (smaller values conserve memory)");
- prop= RNA_def_property(srna, "undo_memory_limit", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "undo_memory_limit", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "undomemory");
RNA_def_property_range(prop, 0, 32767);
RNA_def_property_ui_text(prop, "Undo Memory Size", "Maximum memory usage in megabytes (0 means unlimited)");
- prop= RNA_def_property(srna, "use_global_undo", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_global_undo", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_GLOBALUNDO);
RNA_def_property_ui_text(prop, "Global Undo",
"Global undo works by keeping a full copy of the file itself in memory, so takes extra memory");
/* auto keyframing */
- prop= RNA_def_property(srna, "use_auto_keying", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_auto_keying", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON);
RNA_def_property_ui_text(prop, "Auto Keying Enable",
"Automatic keyframe insertion for Objects and Bones (default setting used for new Scenes)");
RNA_def_property_ui_icon(prop, ICON_REC, 0);
- prop= RNA_def_property(srna, "auto_keying_mode", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "auto_keying_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, auto_key_modes);
RNA_def_property_enum_funcs(prop, "rna_userdef_autokeymode_get", "rna_userdef_autokeymode_set", NULL);
RNA_def_property_ui_text(prop, "Auto Keying Mode",
"Mode of automatic keyframe insertion for Objects and Bones "
"(default setting used for new Scenes)");
- prop= RNA_def_property(srna, "use_keyframe_insert_available", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_keyframe_insert_available", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_INSERTAVAIL);
RNA_def_property_ui_text(prop, "Auto Keyframe Insert Available", "Automatic keyframe insertion in available F-Curves");
/* keyframing settings */
- prop= RNA_def_property(srna, "use_keyframe_insert_needed", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_keyframe_insert_needed", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_INSERTNEEDED);
RNA_def_property_ui_text(prop, "Keyframe Insert Needed", "Keyframe insertion only when keyframe needed");
- prop= RNA_def_property(srna, "use_visual_keying", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_visual_keying", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_AUTOMATKEY);
RNA_def_property_ui_text(prop, "Visual Keying", "Use Visual keying automatically for constrained objects");
- prop= RNA_def_property(srna, "use_insertkey_xyz_to_rgb", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_insertkey_xyz_to_rgb", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_XYZ2RGB);
RNA_def_property_ui_text(prop, "New F-Curve Colors - XYZ to RGB",
"Color for newly added transformation F-Curves (Location, Rotation, Scale) "
"and also Color is based on the transform axis");
- prop= RNA_def_property(srna, "keyframe_new_interpolation_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "keyframe_new_interpolation_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, beztriple_interpolation_mode_items);
RNA_def_property_enum_sdna(prop, NULL, "ipo_new");
RNA_def_property_ui_text(prop, "New Interpolation Type",
"Interpolation mode used for first keyframe on newly added F-Curves "
"(subsequent keyframes take interpolation from preceeding keyframe)");
- prop= RNA_def_property(srna, "keyframe_new_handle_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "keyframe_new_handle_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, keyframe_handle_type_items);
RNA_def_property_enum_sdna(prop, NULL, "keyhandles_new");
RNA_def_property_ui_text(prop, "New Handles Type", "Handle type for handles of new keyframes");
/* frame numbers */
- prop= RNA_def_property(srna, "use_negative_frames", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_negative_frames", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_NONEGFRAMES);
RNA_def_property_ui_text(prop, "Allow Negative Frames", "Current frame number can be manually set to a negative value");
/* grease pencil */
- prop= RNA_def_property(srna, "grease_pencil_manhattan_distance", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "grease_pencil_manhattan_distance", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gp_manhattendist");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Grease Pencil Manhattan Distance", "Pixels moved by mouse per axis when drawing stroke");
- prop= RNA_def_property(srna, "grease_pencil_euclidean_distance", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "grease_pencil_euclidean_distance", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gp_euclideandist");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Grease Pencil Euclidean Distance",
"Distance moved by mouse when drawing stroke (in pixels) to include");
- prop= RNA_def_property(srna, "use_grease_pencil_smooth_stroke", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_grease_pencil_smooth_stroke", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gp_settings", GP_PAINT_DOSMOOTH);
RNA_def_property_ui_text(prop, "Grease Pencil Smooth Stroke", "Smooth the final stroke");
- prop= RNA_def_property(srna, "use_grease_pencil_simplify_stroke", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_grease_pencil_simplify_stroke", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gp_settings", GP_PAINT_DOSIMPLIFY);
RNA_def_property_ui_text(prop, "Grease Pencil Simplify Stroke", "Simplify the final stroke");
- prop= RNA_def_property(srna, "grease_pencil_eraser_radius", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "grease_pencil_eraser_radius", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gp_eraser");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Grease Pencil Eraser Radius", "Radius of eraser 'brush'");
/* sculpt and paint */
- prop= RNA_def_property(srna, "sculpt_paint_overlay_color", PROP_FLOAT, PROP_COLOR_GAMMA);
+ prop = RNA_def_property(srna, "sculpt_paint_overlay_color", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "sculpt_paint_overlay_col");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Sculpt/Paint Overlay Color", "Color of texture overlay");
/* duplication linking */
- prop= RNA_def_property(srna, "use_duplicate_mesh", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_duplicate_mesh", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MESH);
RNA_def_property_ui_text(prop, "Duplicate Mesh", "Causes mesh data to be duplicated with the object");
- prop= RNA_def_property(srna, "use_duplicate_surface", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_duplicate_surface", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_SURF);
RNA_def_property_ui_text(prop, "Duplicate Surface", "Causes surface data to be duplicated with the object");
- prop= RNA_def_property(srna, "use_duplicate_curve", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_duplicate_curve", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_CURVE);
RNA_def_property_ui_text(prop, "Duplicate Curve", "Causes curve data to be duplicated with the object");
- prop= RNA_def_property(srna, "use_duplicate_text", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_duplicate_text", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_FONT);
RNA_def_property_ui_text(prop, "Duplicate Text", "Causes text data to be duplicated with the object");
- prop= RNA_def_property(srna, "use_duplicate_metaball", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_duplicate_metaball", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MBALL);
RNA_def_property_ui_text(prop, "Duplicate Metaball", "Causes metaball data to be duplicated with the object");
- prop= RNA_def_property(srna, "use_duplicate_armature", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_duplicate_armature", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_ARM);
RNA_def_property_ui_text(prop, "Duplicate Armature", "Causes armature data to be duplicated with the object");
- prop= RNA_def_property(srna, "use_duplicate_lamp", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_duplicate_lamp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_LAMP);
RNA_def_property_ui_text(prop, "Duplicate Lamp", "Causes lamp data to be duplicated with the object");
- prop= RNA_def_property(srna, "use_duplicate_material", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_duplicate_material", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MAT);
RNA_def_property_ui_text(prop, "Duplicate Material", "Causes material data to be duplicated with the object");
- prop= RNA_def_property(srna, "use_duplicate_texture", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_duplicate_texture", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_TEX);
RNA_def_property_ui_text(prop, "Duplicate Texture", "Causes texture data to be duplicated with the object");
- // xxx
- prop= RNA_def_property(srna, "use_duplicate_fcurve", PROP_BOOLEAN, PROP_NONE);
+ /* xxx */
+ prop = RNA_def_property(srna, "use_duplicate_fcurve", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_IPO);
RNA_def_property_ui_text(prop, "Duplicate F-Curve", "Causes F-curve data to be duplicated with the object");
- // xxx
- prop= RNA_def_property(srna, "use_duplicate_action", PROP_BOOLEAN, PROP_NONE);
+ /* xxx */
+ prop = RNA_def_property(srna, "use_duplicate_action", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_ACT);
RNA_def_property_ui_text(prop, "Duplicate Action", "Causes actions to be duplicated with the object");
- prop= RNA_def_property(srna, "use_duplicate_particle", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_duplicate_particle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_PSYS);
RNA_def_property_ui_text(prop, "Duplicate Particle", "Causes particle systems to be duplicated with the object");
}
@@ -2713,7 +2713,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{128, "CLAMP_128", 0, "128", ""},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem anisotropic_items[] ={
+ static EnumPropertyItem anisotropic_items[] = {
{1, "FILTER_0", 0, "Off", ""},
{2, "FILTER_2", 0, "2x", ""},
{4, "FILTER_4", 0, "4x", ""},
@@ -2746,14 +2746,14 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem audio_rate_items[] = {
-// {8000, "RATE_8000", 0, "8 kHz", "Set audio sampling rate to 8000 samples per second"},
-// {11025, "RATE_11025", 0, "11.025 kHz", "Set audio sampling rate to 11025 samples per second"},
-// {16000, "RATE_16000", 0, "16 kHz", "Set audio sampling rate to 16000 samples per second"},
-// {22050, "RATE_22050", 0, "22.05 kHz", "Set audio sampling rate to 22050 samples per second"},
-// {32000, "RATE_32000", 0, "32 kHz", "Set audio sampling rate to 32000 samples per second"},
+/* {8000, "RATE_8000", 0, "8 kHz", "Set audio sampling rate to 8000 samples per second"}, */
+/* {11025, "RATE_11025", 0, "11.025 kHz", "Set audio sampling rate to 11025 samples per second"}, */
+/* {16000, "RATE_16000", 0, "16 kHz", "Set audio sampling rate to 16000 samples per second"}, */
+/* {22050, "RATE_22050", 0, "22.05 kHz", "Set audio sampling rate to 22050 samples per second"}, */
+/* {32000, "RATE_32000", 0, "32 kHz", "Set audio sampling rate to 32000 samples per second"}, */
{44100, "RATE_44100", 0, "44.1 kHz", "Set audio sampling rate to 44100 samples per second"},
{48000, "RATE_48000", 0, "48 kHz", "Set audio sampling rate to 48000 samples per second"},
-// {88200, "RATE_88200", 0, "88.2 kHz", "Set audio sampling rate to 88200 samples per second"},
+/* {88200, "RATE_88200", 0, "88.2 kHz", "Set audio sampling rate to 88200 samples per second"}, */
{96000, "RATE_96000", 0, "96 kHz", "Set audio sampling rate to 96000 samples per second"},
{192000, "RATE_192000", 0, "192 kHz", "Set audio sampling rate to 192000 samples per second"},
{0, NULL, 0, NULL, NULL}};
@@ -2842,7 +2842,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{ 0, NULL, 0, NULL, NULL}};
#endif
- srna= RNA_def_struct(brna, "UserPreferencesSystem", NULL);
+ srna = RNA_def_struct(brna, "UserPreferencesSystem", NULL);
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_nested(brna, srna, "UserPreferences");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
@@ -2850,134 +2850,134 @@ static void rna_def_userdef_system(BlenderRNA *brna)
/* Language */
- prop= RNA_def_property(srna, "use_international_fonts", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_international_fonts", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_DOTRANSLATE);
RNA_def_property_ui_text(prop, "International Fonts", "Use international fonts");
RNA_def_property_update(prop, NC_WINDOW, "rna_userdef_language_update");
- prop= RNA_def_property(srna, "dpi", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "dpi", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "dpi");
RNA_def_property_range(prop, 48, 128);
RNA_def_property_ui_text(prop, "DPI", "Font size and resolution for display");
RNA_def_property_update(prop, 0, "rna_userdef_dpi_update");
- prop= RNA_def_property(srna, "scrollback", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "scrollback", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "scrollback");
RNA_def_property_range(prop, 32, 32768);
RNA_def_property_ui_text(prop, "Scrollback", "Maximum number of lines to store for the console buffer");
- prop= RNA_def_property(srna, "author", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "author", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "author");
RNA_def_property_string_maxlength(prop, 80);
RNA_def_property_ui_text(prop, "Author", "Name that will be used in exported files when format supports such feature");
/* Language Selection */
- prop= RNA_def_property(srna, "language", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "language", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, language_items);
RNA_def_property_ui_text(prop, "Language", "Language used for translation");
RNA_def_property_update(prop, NC_WINDOW, "rna_userdef_language_update");
- prop= RNA_def_property(srna, "use_translate_tooltips", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_translate_tooltips", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_TOOLTIPS);
RNA_def_property_ui_text(prop, "Translate Tooltips", "Translate Tooltips");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "use_translate_interface", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_translate_interface", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_IFACE);
RNA_def_property_ui_text(prop, "Translate Interface", "Translate Interface");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "use_textured_fonts", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_textured_fonts", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_USETEXTUREFONT);
RNA_def_property_ui_text(prop, "Textured Fonts", "Use textures for drawing international fonts");
RNA_def_property_update(prop, 0, "rna_userdef_update");
/* System & OpenGL */
- prop= RNA_def_property(srna, "solid_lights", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "solid_lights", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "light", "");
RNA_def_property_struct_type(prop, "UserSolidLight");
RNA_def_property_ui_text(prop, "Solid Lights", "Lights user to display objects in solid draw mode");
- prop= RNA_def_property(srna, "use_weight_color_range", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_weight_color_range", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_CUSTOM_RANGE);
RNA_def_property_ui_text(prop, "Use Weight Color Range",
"Enable color range used for weight visualization in weight painting mode");
RNA_def_property_update(prop, 0, "rna_UserDef_weight_color_update");
- prop= RNA_def_property(srna, "weight_color_range", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "weight_color_range", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "coba_weight");
RNA_def_property_struct_type(prop, "ColorRamp");
RNA_def_property_ui_text(prop, "Weight Color Range", "Color range used for weight visualization in weight painting mode");
RNA_def_property_update(prop, 0, "rna_UserDef_weight_color_update");
- prop= RNA_def_property(srna, "color_picker_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "color_picker_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, color_picker_types);
RNA_def_property_enum_sdna(prop, NULL, "color_picker_type");
RNA_def_property_ui_text(prop, "Color Picker Type", "Different styles of displaying the color picker widget");
- prop= RNA_def_property(srna, "use_preview_images", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_preview_images", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ALLWINCODECS);
RNA_def_property_ui_text(prop, "Enable All Codecs",
"Allow user to choose any codec (Windows only, might generate instability)");
- prop= RNA_def_property(srna, "use_scripts_auto_execute", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_scripts_auto_execute", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_SCRIPT_AUTOEXEC_DISABLE);
RNA_def_property_ui_text(prop, "Auto Run Python Scripts",
"Allow any .blend file to run scripts automatically "
"(unsafe with blend files from an untrusted source)");
RNA_def_property_update(prop, 0, "rna_userdef_script_autoexec_update");
- prop= RNA_def_property(srna, "use_tabs_as_spaces", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_tabs_as_spaces", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_TXT_TABSTOSPACES_DISABLE);
RNA_def_property_ui_text(prop, "Tabs as Spaces",
"Automatically convert all new tabs into spaces for new and loaded text files");
- prop= RNA_def_property(srna, "prefetch_frames", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "prefetch_frames", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "prefetchframes");
RNA_def_property_range(prop, 0, 500);
RNA_def_property_ui_text(prop, "Prefetch Frames", "Number of frames to render ahead during playback");
- prop= RNA_def_property(srna, "memory_cache_limit", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "memory_cache_limit", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "memcachelimit");
- RNA_def_property_range(prop, 0, (sizeof(void *) ==8)? 1024*16: 1024); /* 32 bit 2 GB, 64 bit 16 GB */
+ RNA_def_property_range(prop, 0, (sizeof(void *) == 8)? 1024*16: 1024); /* 32 bit 2 GB, 64 bit 16 GB */
RNA_def_property_ui_text(prop, "Memory Cache Limit", "Memory cache limit in sequencer (megabytes)");
RNA_def_property_update(prop, 0, "rna_Userdef_memcache_update");
- prop= RNA_def_property(srna, "frame_server_port", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "frame_server_port", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "frameserverport");
RNA_def_property_range(prop, 0, 32727);
RNA_def_property_ui_text(prop, "Frame Server Port", "Frameserver Port for Frameserver Rendering");
- prop= RNA_def_property(srna, "gl_clip_alpha", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "gl_clip_alpha", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "glalphaclip");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Clip Alpha", "Clip alpha below this threshold in the 3D textured view");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "use_mipmaps", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_mipmaps", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DISABLE_MIPMAP);
RNA_def_property_ui_text(prop, "Mipmaps",
"Scale textures for the 3D View (looks nicer but uses more memory and slows image reloading)");
RNA_def_property_update(prop, 0, "rna_userdef_mipmap_update");
- prop= RNA_def_property(srna, "use_16bit_textures", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_16bit_textures", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "use_16bit_textures", 1);
RNA_def_property_ui_text(prop, "16 Bit Float Textures", "Use 16 bit per component texture for float images");
RNA_def_property_update(prop, 0, "rna_userdef_gl_use_16bit_textures");
- prop= RNA_def_property(srna, "use_vertex_buffer_objects", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_vertex_buffer_objects", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DISABLE_VBO);
RNA_def_property_ui_text(prop, "VBOs", "Use Vertex Buffer Objects (or Vertex Arrays, if unsupported) for viewport rendering");
RNA_def_property_update(prop, NC_WINDOW, NULL); /* this isnt essential but nice to check if VBO draws any differently */
- prop= RNA_def_property(srna, "use_antialiasing", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_antialiasing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DISABLE_AA);
RNA_def_property_ui_text(prop, "Anti-aliasing", "Use anti-aliasing for the 3D view (may impact redraw performance)");
- prop= RNA_def_property(srna, "anisotropic_filter", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "anisotropic_filter", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "anisotropic_filter");
RNA_def_property_enum_items(prop, anisotropic_items);
RNA_def_property_enum_default(prop, 1);
@@ -2985,85 +2985,85 @@ static void rna_def_userdef_system(BlenderRNA *brna)
"Quality of the anisotropic filtering (values greater than 1.0 enable anisotropic filtering)");
RNA_def_property_update(prop, 0, "rna_userdef_anisotropic_update");
- prop= RNA_def_property(srna, "gl_texture_limit", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "gl_texture_limit", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "glreslimit");
RNA_def_property_enum_items(prop, gl_texture_clamp_items);
RNA_def_property_ui_text(prop, "GL Texture Limit", "Limit the texture size to save graphics memory");
RNA_def_property_update(prop, 0, "rna_userdef_gl_texture_limit_update");
- prop= RNA_def_property(srna, "texture_time_out", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "texture_time_out", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "textimeout");
RNA_def_property_range(prop, 0, 3600);
RNA_def_property_ui_text(prop, "Texture Time Out",
"Time since last access of a GL texture in seconds after which it is freed "
"(set to 0 to keep textures allocated)");
- prop= RNA_def_property(srna, "texture_collection_rate", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "texture_collection_rate", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "texcollectrate");
RNA_def_property_range(prop, 1, 3600);
RNA_def_property_ui_text(prop, "Texture Collection Rate",
"Number of seconds between each run of the GL texture garbage collector");
- prop= RNA_def_property(srna, "window_draw_method", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "window_draw_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "wmdrawmethod");
RNA_def_property_enum_items(prop, draw_method_items);
RNA_def_property_ui_text(prop, "Window Draw Method", "Drawing method used by the window manager");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "audio_mixing_buffer", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "audio_mixing_buffer", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mixbufsize");
RNA_def_property_enum_items(prop, audio_mixing_samples_items);
RNA_def_property_ui_text(prop, "Audio Mixing Buffer", "Number of samples used by the audio mixing buffer");
RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
- prop= RNA_def_property(srna, "audio_device", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "audio_device", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "audiodevice");
RNA_def_property_enum_items(prop, audio_device_items);
RNA_def_property_ui_text(prop, "Audio Device", "Audio output device");
RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
- prop= RNA_def_property(srna, "audio_sample_rate", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "audio_sample_rate", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "audiorate");
RNA_def_property_enum_items(prop, audio_rate_items);
RNA_def_property_ui_text(prop, "Audio Sample Rate", "Audio sample rate");
RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
- prop= RNA_def_property(srna, "audio_sample_format", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "audio_sample_format", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "audioformat");
RNA_def_property_enum_items(prop, audio_format_items);
RNA_def_property_ui_text(prop, "Audio Sample Format", "Audio sample format");
RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
- prop= RNA_def_property(srna, "audio_channels", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "audio_channels", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "audiochannels");
RNA_def_property_enum_items(prop, audio_channel_items);
RNA_def_property_ui_text(prop, "Audio Channels", "Audio channel count");
RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
- prop= RNA_def_property(srna, "screencast_fps", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "screencast_fps", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "scrcastfps");
RNA_def_property_range(prop, 10, 50);
RNA_def_property_ui_text(prop, "FPS", "Frame rate for the screencast to be played back");
- prop= RNA_def_property(srna, "screencast_wait_time", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "screencast_wait_time", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "scrcastwait");
RNA_def_property_range(prop, 50, 1000);
RNA_def_property_ui_text(prop, "Wait Timer (ms)", "Time in milliseconds between each frame recorded for screencast");
- prop= RNA_def_property(srna, "use_text_antialiasing", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_text_antialiasing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "text_render", USER_TEXT_DISABLE_AA);
RNA_def_property_ui_text(prop, "Text Anti-aliasing", "Draw user interface text anti-aliased");
RNA_def_property_update(prop, 0, "rna_userdef_text_update");
#ifdef WITH_CYCLES
- prop= RNA_def_property(srna, "compute_device_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "compute_device_type", PROP_ENUM, PROP_NONE);
RNA_def_property_flag(prop, PROP_ENUM_NO_CONTEXT);
RNA_def_property_enum_sdna(prop, NULL, "compute_device_type");
RNA_def_property_enum_items(prop, compute_device_type_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_userdef_compute_device_type_itemf");
RNA_def_property_ui_text(prop, "Compute Device Type", "Device to use for computation (rendering with Cycles)");
- prop= RNA_def_property(srna, "compute_device", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "compute_device", PROP_ENUM, PROP_NONE);
RNA_def_property_flag(prop, PROP_ENUM_NO_CONTEXT);
RNA_def_property_enum_sdna(prop, NULL, "compute_device_id");
RNA_def_property_enum_items(prop, compute_device_items);
@@ -3098,142 +3098,142 @@ static void rna_def_userdef_input(BlenderRNA *brna)
{USER_ZOOM_HORIZ, "HORIZONTAL", 0, "Horizontal", "Zoom in and out based on horizontal mouse movement"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "UserPreferencesInput", NULL);
+ srna = RNA_def_struct(brna, "UserPreferencesInput", NULL);
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_nested(brna, srna, "UserPreferences");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Input", "Settings for input devices");
- prop= RNA_def_property(srna, "select_mouse", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "select_mouse", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, select_mouse_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_userdef_select_mouse_set", NULL);
RNA_def_property_ui_text(prop, "Select Mouse", "Mouse button used for selection");
- prop= RNA_def_property(srna, "view_zoom_method", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "view_zoom_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "viewzoom");
RNA_def_property_enum_items(prop, view_zoom_styles);
RNA_def_property_ui_text(prop, "Zoom Style", "Which style to use for viewport scaling");
- prop= RNA_def_property(srna, "view_zoom_axis", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "view_zoom_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "uiflag");
RNA_def_property_enum_items(prop, view_zoom_axes);
RNA_def_property_ui_text(prop, "Zoom Axis", "Axis of mouse movement to zoom in or out on");
- prop= RNA_def_property(srna, "invert_mouse_zoom", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_mouse_zoom", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZOOM_INVERT);
RNA_def_property_ui_text(prop, "Invert Zoom Direction", "Invert the axis of mouse movement for zooming");
- prop= RNA_def_property(srna, "view_rotate_method", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "view_rotate_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, view_rotation_items);
RNA_def_property_ui_text(prop, "View Rotation", "Rotation style in the viewport");
- prop= RNA_def_property(srna, "use_mouse_continuous", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_mouse_continuous", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_CONTINUOUS_MOUSE);
RNA_def_property_ui_text(prop, "Continuous Grab",
"Allow moving the mouse outside the view on some manipulations (transform, ui control drag)");
/* tweak tablet & mouse preset */
- prop= RNA_def_property(srna, "drag_threshold", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "drag_threshold", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "dragthreshold");
RNA_def_property_range(prop, 3, 40);
RNA_def_property_ui_text(prop, "Drag Threshold", "Amount of pixels you have to drag before dragging UI items happens");
- prop= RNA_def_property(srna, "tweak_threshold", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "tweak_threshold", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tweak_threshold");
RNA_def_property_range(prop, 3, 1024);
RNA_def_property_ui_text(prop, "Tweak Threshold", "Number of pixels you have to drag before tweak event is triggered");
/* 3D mouse settings */
/* global options */
- prop= RNA_def_property(srna, "ndof_sensitivity", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "ndof_sensitivity", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.25f, 4.0f);
RNA_def_property_ui_text(prop, "Sensitivity", "Overall sensitivity of the 3D Mouse");
- prop= RNA_def_property(srna, "ndof_zoom_updown", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "ndof_zoom_updown", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_ZOOM_UPDOWN);
RNA_def_property_ui_text(prop, "Zoom = Up/Down", "Zoom using up/down on the device (otherwise forward/backward)");
- prop= RNA_def_property(srna, "ndof_zoom_invert", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "ndof_zoom_invert", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_ZOOM_INVERT);
RNA_def_property_ui_text(prop, "Invert Zoom", "Zoom using opposite direction");
/* 3D view */
- prop= RNA_def_property(srna, "ndof_show_guide", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "ndof_show_guide", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_SHOW_GUIDE);
RNA_def_property_ui_text(prop, "Show Navigation Guide", "Display the center and axis during rotation");
/* TODO: update description when fly-mode visuals are in place ("projected position in fly mode")*/
/* 3D view: roll */
- prop= RNA_def_property(srna, "ndof_roll_invert_axis", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "ndof_roll_invert_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_ROLL_INVERT_AXIS);
RNA_def_property_ui_text(prop, "Invert roll Axis", "Invert roll axis");
/* 3D view: tilt */
- prop= RNA_def_property(srna, "ndof_tilt_invert_axis", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "ndof_tilt_invert_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_TILT_INVERT_AXIS);
RNA_def_property_ui_text(prop, "Invert tilt Axis", "Invert tilt axis");
/* 3D view: rotate */
- prop= RNA_def_property(srna, "ndof_rotate_invert_axis", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "ndof_rotate_invert_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_ROTATE_INVERT_AXIS);
RNA_def_property_ui_text(prop, "Invert rotation Axis", "Invert rotation axis");
/* 3D view: pan x */
- prop= RNA_def_property(srna, "ndof_panx_invert_axis", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "ndof_panx_invert_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_PANX_INVERT_AXIS);
RNA_def_property_ui_text(prop, "Invert x Axis", "Invert x axis");
/* 3D view: pan y */
- prop= RNA_def_property(srna, "ndof_pany_invert_axis", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "ndof_pany_invert_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_PANY_INVERT_AXIS);
RNA_def_property_ui_text(prop, "Invert y Axis", "Invert y axis");
/* 3D view: pan z */
- prop= RNA_def_property(srna, "ndof_panz_invert_axis", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "ndof_panz_invert_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_PANZ_INVERT_AXIS);
RNA_def_property_ui_text(prop, "Invert z Axis", "Invert z axis");
/* 3D view: fly */
- prop= RNA_def_property(srna, "ndof_lock_horizon", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "ndof_lock_horizon", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_LOCK_HORIZON);
RNA_def_property_ui_text(prop, "Lock Horizon", "Keep horizon level while flying with 3D Mouse");
- prop= RNA_def_property(srna, "ndof_fly_helicopter", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "ndof_fly_helicopter", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_FLY_HELICOPTER);
RNA_def_property_ui_text(prop, "Helicopter Mode", "Device up/down directly controls your Z position");
- prop= RNA_def_property(srna, "mouse_double_click_time", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "mouse_double_click_time", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "dbl_click_time");
RNA_def_property_range(prop, 1, 1000);
RNA_def_property_ui_text(prop, "Double Click Timeout", "Time/delay (in ms) for a double click");
- prop= RNA_def_property(srna, "use_mouse_emulate_3_button", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_mouse_emulate_3_button", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_TWOBUTTONMOUSE);
RNA_def_property_ui_text(prop, "Emulate 3 Button Mouse",
"Emulate Middle Mouse with Alt+Left Mouse (doesn't work with Left Mouse Select option)");
- prop= RNA_def_property(srna, "use_emulate_numpad", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_emulate_numpad", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_NONUMPAD);
RNA_def_property_ui_text(prop, "Emulate Numpad", "Main 1 to 0 keys act as the numpad ones (useful for laptops)");
/* middle mouse button */
- prop= RNA_def_property(srna, "use_mouse_mmb_paste", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_mouse_mmb_paste", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_MMB_PASTE);
RNA_def_property_ui_text(prop, "Middle Mouse Paste", "In text window, paste with middle mouse button instead of panning");
- prop= RNA_def_property(srna, "invert_zoom_wheel", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_zoom_wheel", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_WHEELZOOMDIR);
RNA_def_property_ui_text(prop, "Wheel Invert Zoom", "Swap the Mouse Wheel zoom direction");
- prop= RNA_def_property(srna, "wheel_scroll_lines", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "wheel_scroll_lines", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "wheellinescroll");
RNA_def_property_range(prop, 0, 32);
RNA_def_property_ui_text(prop, "Wheel Scroll Lines", "Number of lines scrolled at a time with the mouse wheel");
- prop= RNA_def_property(srna, "active_keyconfig", PROP_STRING, PROP_DIRPATH);
+ prop = RNA_def_property(srna, "active_keyconfig", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "keyconfigstr");
RNA_def_property_ui_text(prop, "Key Config", "The name of the active key configuration");
}
@@ -3244,7 +3244,7 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
StructRNA *srna;
static EnumPropertyItem anim_player_presets[] = {
- //{0, "INTERNAL", 0, "Internal", "Built-in animation player"}, // doesn't work yet!
+ /*{0, "INTERNAL", 0, "Internal", "Built-in animation player"}, *//* doesn't work yet! */
{1, "BLENDER24", 0, "Blender 2.4", "Blender command line animation playback - path to Blender 2.4"},
{2, "DJV", 0, "Djv", "Open source frame player: http://djv.sourceforge.net"},
{3, "FRAMECYCLER", 0, "FrameCycler", "Frame player from IRIDAS"},
@@ -3253,85 +3253,85 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
{50, "CUSTOM", 0, "Custom", "Custom animation player executable path"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "UserPreferencesFilePaths", NULL);
+ srna = RNA_def_struct(brna, "UserPreferencesFilePaths", NULL);
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_nested(brna, srna, "UserPreferences");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "File Paths", "Default paths for external files");
- prop= RNA_def_property(srna, "show_hidden_files_datablocks", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_hidden_files_datablocks", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_HIDE_DOT);
RNA_def_property_ui_text(prop, "Hide Dot Files/Datablocks", "Hide files/datablocks that start with a dot (.*)");
- prop= RNA_def_property(srna, "use_filter_files", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_filter_files", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_FILTERFILEEXTS);
RNA_def_property_ui_text(prop, "Filter File Extensions", "Display only files with extensions in the image select window");
- prop= RNA_def_property(srna, "hide_recent_locations", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "hide_recent_locations", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_HIDE_RECENT);
RNA_def_property_ui_text(prop, "Hide Recent Locations", "Hide recent locations in the file selector");
- prop= RNA_def_property(srna, "show_thumbnails", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_thumbnails", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_THUMBNAILS);
RNA_def_property_ui_text(prop, "Show Thumbnails", "Open in thumbnail view for images and movies");
- prop= RNA_def_property(srna, "use_relative_paths", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_relative_paths", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_RELPATHS);
RNA_def_property_ui_text(prop, "Relative Paths", "Default relative path option for the file selector");
- prop= RNA_def_property(srna, "use_file_compression", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_file_compression", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_FILECOMPRESS);
RNA_def_property_ui_text(prop, "Compress File", "Enable file compression when saving .blend files");
- prop= RNA_def_property(srna, "use_load_ui", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_load_ui", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_FILENOUI);
RNA_def_property_ui_text(prop, "Load UI", "Load user interface setup when loading .blend files");
- prop= RNA_def_property(srna, "font_directory", PROP_STRING, PROP_DIRPATH);
+ prop = RNA_def_property(srna, "font_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "fontdir");
RNA_def_property_ui_text(prop, "Fonts Directory", "The default directory to search for loading fonts");
- prop= RNA_def_property(srna, "texture_directory", PROP_STRING, PROP_DIRPATH);
+ prop = RNA_def_property(srna, "texture_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "textudir");
RNA_def_property_ui_text(prop, "Textures Directory", "The default directory to search for textures");
- prop= RNA_def_property(srna, "texture_plugin_directory", PROP_STRING, PROP_DIRPATH);
+ prop = RNA_def_property(srna, "texture_plugin_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "plugtexdir");
RNA_def_property_ui_text(prop, "Texture Plugin Directory", "The default directory to search for texture plugins");
- prop= RNA_def_property(srna, "sequence_plugin_directory", PROP_STRING, PROP_DIRPATH);
+ prop = RNA_def_property(srna, "sequence_plugin_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "plugseqdir");
RNA_def_property_ui_text(prop, "Sequence Plugin Directory", "The default directory to search for sequence plugins");
- prop= RNA_def_property(srna, "render_output_directory", PROP_STRING, PROP_DIRPATH);
+ prop = RNA_def_property(srna, "render_output_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "renderdir");
RNA_def_property_ui_text(prop, "Render Output Directory", "The default directory for rendering output, for new scenes");
- prop= RNA_def_property(srna, "script_directory", PROP_STRING, PROP_DIRPATH);
+ prop = RNA_def_property(srna, "script_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "pythondir");
RNA_def_property_ui_text(prop, "Python Scripts Directory",
"Alternate script path, matching the default layout with subdirs: "
"startup, addons & modules (requires restart)");
/* TODO, editing should reset sys.path! */
- prop= RNA_def_property(srna, "sound_directory", PROP_STRING, PROP_DIRPATH);
+ prop = RNA_def_property(srna, "sound_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "sounddir");
RNA_def_property_ui_text(prop, "Sounds Directory", "The default directory to search for sounds");
- prop= RNA_def_property(srna, "temporary_directory", PROP_STRING, PROP_DIRPATH);
+ prop = RNA_def_property(srna, "temporary_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "tempdir");
RNA_def_property_ui_text(prop, "Temporary Directory", "The directory for storing temporary save files");
RNA_def_property_update(prop, 0, "rna_userdef_temp_update");
- prop= RNA_def_property(srna, "image_editor", PROP_STRING, PROP_FILEPATH);
+ prop = RNA_def_property(srna, "image_editor", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "image_editor");
RNA_def_property_ui_text(prop, "Image Editor", "Path to an image editor");
- prop= RNA_def_property(srna, "animation_player", PROP_STRING, PROP_FILEPATH);
+ prop = RNA_def_property(srna, "animation_player", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "anim_player");
RNA_def_property_ui_text(prop, "Animation Player", "Path to a custom animation/frame sequence player");
- prop= RNA_def_property(srna, "animation_player_preset", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "animation_player_preset", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "anim_player_preset");
RNA_def_property_enum_items(prop, anim_player_presets);
RNA_def_property_ui_text(prop, "Animation Player Preset", "Preset configs for external animation players");
@@ -3339,29 +3339,29 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
/* Autosave */
- prop= RNA_def_property(srna, "save_version", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "save_version", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "versions");
RNA_def_property_range(prop, 0, 32);
RNA_def_property_ui_text(prop, "Save Versions",
"The number of old versions to maintain in the current directory, when manually saving");
- prop= RNA_def_property(srna, "use_auto_save_temporary_files", PROP_BOOLEAN, PROP_NONE);
+ 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 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);
+ prop = RNA_def_property(srna, "auto_save_time", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "savetime");
RNA_def_property_range(prop, 1, 60);
RNA_def_property_ui_text(prop, "Auto Save Time", "The time (in minutes) to wait between automatic temporary saves");
RNA_def_property_update(prop, 0, "rna_userdef_autosave_update");
- prop= RNA_def_property(srna, "recent_files", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "recent_files", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 30);
RNA_def_property_ui_text(prop, "Recent Files", "Maximum number of recently opened files to remember");
- prop= RNA_def_property(srna, "use_save_preview_images", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_save_preview_images", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_SAVE_PREVIEWS);
RNA_def_property_ui_text(prop, "Save Preview Images", "Enables automatic saving of preview images in the .blend file");
}
@@ -3373,21 +3373,21 @@ void rna_def_userdef_addon_collection(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *parm;
RNA_def_property_srna(cprop, "Addons");
- srna= RNA_def_struct(brna, "Addons", NULL);
+ srna = RNA_def_struct(brna, "Addons", NULL);
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "User Addons", "Collection of addons");
- func= RNA_def_function(srna, "new", "rna_userdef_addon_new");
+ func = RNA_def_function(srna, "new", "rna_userdef_addon_new");
RNA_def_function_flag(func, FUNC_NO_SELF);
RNA_def_function_ui_description(func, "Add a new addon");
/* return type */
- parm= RNA_def_pointer(func, "addon", "Addon", "", "Addon datablock");
+ parm = RNA_def_pointer(func, "addon", "Addon", "", "Addon datablock");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "rna_userdef_addon_remove");
+ func = RNA_def_function(srna, "remove", "rna_userdef_addon_remove");
RNA_def_function_flag(func, FUNC_NO_SELF);
RNA_def_function_ui_description(func, "Remove addon");
- parm= RNA_def_pointer(func, "addon", "Addon", "", "Addon to remove");
+ parm = RNA_def_pointer(func, "addon", "Addon", "", "Addon to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
@@ -3409,28 +3409,28 @@ void RNA_def_userdef(BlenderRNA *brna)
rna_def_userdef_dothemes(brna);
rna_def_userdef_solidlight(brna);
- srna= RNA_def_struct(brna, "UserPreferences", NULL);
+ srna = RNA_def_struct(brna, "UserPreferences", NULL);
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "User Preferences", "Global user preferences");
- prop= RNA_def_property(srna, "active_section", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "active_section", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "userpref");
RNA_def_property_enum_items(prop, user_pref_sections);
RNA_def_property_ui_text(prop, "Active Section", "Active section of the user preferences shown in the user interface");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "themes", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "themes", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "themes", NULL);
RNA_def_property_struct_type(prop, "Theme");
RNA_def_property_ui_text(prop, "Themes", "");
- prop= RNA_def_property(srna, "ui_styles", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "ui_styles", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "uistyles", NULL);
RNA_def_property_struct_type(prop, "ThemeStyle");
RNA_def_property_ui_text(prop, "Styles", "");
- prop= RNA_def_property(srna, "addons", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "addons", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "addons", NULL);
RNA_def_property_struct_type(prop, "Addon");
RNA_def_property_ui_text(prop, "Addon", "");
@@ -3438,31 +3438,31 @@ void RNA_def_userdef(BlenderRNA *brna)
/* nested structs */
- prop= RNA_def_property(srna, "view", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "view", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "UserPreferencesView");
RNA_def_property_pointer_funcs(prop, "rna_UserDef_view_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "View & Controls", "Preferences related to viewing data");
- prop= RNA_def_property(srna, "edit", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "edit", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "UserPreferencesEdit");
RNA_def_property_pointer_funcs(prop, "rna_UserDef_edit_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Edit Methods", "Settings for interacting with Blender data");
- prop= RNA_def_property(srna, "inputs", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "inputs", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "UserPreferencesInput");
RNA_def_property_pointer_funcs(prop, "rna_UserDef_input_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Inputs", "Settings for input devices");
- prop= RNA_def_property(srna, "filepaths", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "filepaths", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "UserPreferencesFilePaths");
RNA_def_property_pointer_funcs(prop, "rna_UserDef_filepaths_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "File Paths", "Default paths for external files");
- prop= RNA_def_property(srna, "system", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "system", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "UserPreferencesSystem");
RNA_def_property_pointer_funcs(prop, "rna_UserDef_system_get", NULL, NULL, NULL);
diff --git a/source/blender/makesrna/intern/rna_vfont.c b/source/blender/makesrna/intern/rna_vfont.c
index e5ea4809cd9..aca25252d2e 100644
--- a/source/blender/makesrna/intern/rna_vfont.c
+++ b/source/blender/makesrna/intern/rna_vfont.c
@@ -42,17 +42,17 @@ void RNA_def_vfont(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "VectorFont", "ID");
+ srna = RNA_def_struct(brna, "VectorFont", "ID");
RNA_def_struct_ui_text(srna, "Vector Font", "Vector font for Text objects");
RNA_def_struct_sdna(srna, "VFont");
RNA_def_struct_ui_icon(srna, ICON_FILE_FONT);
- prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
+ prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "File Path", "");
- prop= RNA_def_property(srna, "packed_file", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "packed_file", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "packedfile");
RNA_def_property_ui_text(prop, "Packed File", "");
}
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 44dc90787fa..5e76c07cb60 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -48,7 +48,7 @@ EnumPropertyItem event_keymouse_value_items[] = {
{KM_DBL_CLICK, "DOUBLE_CLICK", 0, "Double Click", ""},
{0, NULL, 0, NULL, NULL}};
-EnumPropertyItem event_tweak_value_items[]= {
+EnumPropertyItem event_tweak_value_items[] = {
{KM_ANY, "ANY", 0, "Any", ""},
{EVT_GESTURE_N, "NORTH", 0, "North", ""},
{EVT_GESTURE_NE, "NORTH_EAST", 0, "North-East", ""},
@@ -77,7 +77,7 @@ EnumPropertyItem event_value_items[] = {
{EVT_GESTURE_NW, "NORTH_WEST", 0, "North-West", ""},
{0, NULL, 0, NULL, NULL}};
-EnumPropertyItem event_tweak_type_items[]= {
+EnumPropertyItem event_tweak_type_items[] = {
{EVT_TWEAK_L, "EVT_TWEAK_L", 0, "Left", ""},
{EVT_TWEAK_M, "EVT_TWEAK_M", 0, "Middle", ""},
{EVT_TWEAK_R, "EVT_TWEAK_R", 0, "Right", ""},
@@ -85,7 +85,7 @@ EnumPropertyItem event_tweak_type_items[]= {
{EVT_TWEAK_S, "EVT_TWEAK_S", 0, "Select", ""},
{0, NULL, 0, NULL, NULL}};
-EnumPropertyItem event_mouse_type_items[]= {
+EnumPropertyItem event_mouse_type_items[] = {
{LEFTMOUSE, "LEFTMOUSE", 0, "Left", ""},
{MIDDLEMOUSE, "MIDDLEMOUSE", 0, "Middle", ""},
{RIGHTMOUSE, "RIGHTMOUSE", 0, "Right", ""},
@@ -105,14 +105,14 @@ EnumPropertyItem event_mouse_type_items[]= {
{WHEELOUTMOUSE, "WHEELOUTMOUSE", 0, "Wheel Out", ""},
{0, NULL, 0, NULL, NULL}};
-EnumPropertyItem event_timer_type_items[]= {
+EnumPropertyItem event_timer_type_items[] = {
{TIMER, "TIMER", 0, "Timer", ""},
{TIMER0, "TIMER0", 0, "Timer 0", ""},
{TIMER1, "TIMER1", 0, "Timer 1", ""},
{TIMER2, "TIMER2", 0, "Timer 2", ""},
{0, NULL, 0, NULL, NULL}};
-EnumPropertyItem event_ndof_type_items[]= {
+EnumPropertyItem event_ndof_type_items[] = {
/* buttons on all 3dconnexion devices */
{NDOF_BUTTON_MENU, "NDOF_BUTTON_MENU", 0, "Menu", ""},
{NDOF_BUTTON_FIT, "NDOF_BUTTON_FIT", 0, "Fit", ""},
@@ -386,7 +386,7 @@ EnumPropertyItem operator_return_items[] = {
{OPERATOR_RUNNING_MODAL, "RUNNING_MODAL", 0, "Running Modal", "Keep the operator running with blender"},
{OPERATOR_CANCELLED, "CANCELLED", 0, "Cancelled", "When no action has been taken, operator exits"},
{OPERATOR_FINISHED, "FINISHED", 0, "Finished", "When the operator is complete, operator exits"},
- {OPERATOR_PASS_THROUGH, "PASS_THROUGH", 0, "Pass Through", "Do nothing and pass the event on"}, // used as a flag
+ {OPERATOR_PASS_THROUGH, "PASS_THROUGH", 0, "Pass Through", "Do nothing and pass the event on"}, /* used as a flag */
{0, NULL, 0, NULL, NULL}};
/* flag/enum */
@@ -420,13 +420,13 @@ EnumPropertyItem wm_report_items[] = {
static wmOperator *rna_OperatorProperties_find_operator(PointerRNA *ptr)
{
- wmWindowManager *wm= ptr->id.data;
- IDProperty *properties= (IDProperty*)ptr->data;
+ wmWindowManager *wm = ptr->id.data;
+ IDProperty *properties = (IDProperty*)ptr->data;
wmOperator *op;
- if(wm)
- for(op=wm->operators.first; op; op=op->next)
- if(op->properties == properties)
+ if (wm)
+ for (op = wm->operators.first; op; op = op->next)
+ if (op->properties == properties)
return op;
return NULL;
@@ -434,9 +434,9 @@ static wmOperator *rna_OperatorProperties_find_operator(PointerRNA *ptr)
static StructRNA *rna_OperatorProperties_refine(PointerRNA *ptr)
{
- wmOperator *op= rna_OperatorProperties_find_operator(ptr);
+ wmOperator *op = rna_OperatorProperties_find_operator(ptr);
- if(op)
+ if (op)
return op->type->srna;
else
return ptr->type;
@@ -444,9 +444,9 @@ static StructRNA *rna_OperatorProperties_refine(PointerRNA *ptr)
static IDProperty *rna_OperatorProperties_idprops(PointerRNA *ptr, int create)
{
- if(create && !ptr->data) {
+ if (create && !ptr->data) {
IDPropertyTemplate val = {0};
- ptr->data= IDP_New(IDP_GROUP, &val, "RNA_OperatorProperties group");
+ ptr->data = IDP_New(IDP_GROUP, &val, "RNA_OperatorProperties group");
}
return ptr->data;
@@ -454,53 +454,53 @@ static IDProperty *rna_OperatorProperties_idprops(PointerRNA *ptr, int create)
static void rna_Operator_name_get(PointerRNA *ptr, char *value)
{
- wmOperator *op= (wmOperator*)ptr->data;
+ wmOperator *op = (wmOperator*)ptr->data;
strcpy(value, op->type->name);
}
static int rna_Operator_name_length(PointerRNA *ptr)
{
- wmOperator *op= (wmOperator*)ptr->data;
+ wmOperator *op = (wmOperator*)ptr->data;
return strlen(op->type->name);
}
static int rna_Operator_has_reports_get(PointerRNA *ptr)
{
- wmOperator *op= (wmOperator*)ptr->data;
+ wmOperator *op = (wmOperator*)ptr->data;
return (op->reports && op->reports->list.first);
}
static PointerRNA rna_Operator_properties_get(PointerRNA *ptr)
{
- wmOperator *op= (wmOperator*)ptr->data;
+ wmOperator *op = (wmOperator*)ptr->data;
return rna_pointer_inherit_refine(ptr, op->type->srna, op->properties);
}
static PointerRNA rna_OperatorMacro_properties_get(PointerRNA *ptr)
{
- wmOperatorTypeMacro *otmacro= (wmOperatorTypeMacro*)ptr->data;
+ wmOperatorTypeMacro *otmacro = (wmOperatorTypeMacro*)ptr->data;
wmOperatorType *ot = WM_operatortype_find(otmacro->idname, TRUE);
return rna_pointer_inherit_refine(ptr, ot->srna, otmacro->properties);
}
static void rna_Event_ascii_get(PointerRNA *ptr, char *value)
{
- wmEvent *event= (wmEvent*)ptr->data;
- value[0]= event->ascii;
- value[1]= '\0';
+ wmEvent *event = (wmEvent*)ptr->data;
+ value[0] = event->ascii;
+ value[1] = '\0';
}
static int rna_Event_ascii_length(PointerRNA *ptr)
{
- wmEvent *event= (wmEvent*)ptr->data;
+ wmEvent *event = (wmEvent*)ptr->data;
return (event->ascii)? 1 : 0;
}
static void rna_Event_unicode_get(PointerRNA *ptr, char *value)
{
/* utf8 buf isnt \0 terminated */
- wmEvent *event= (wmEvent*)ptr->data;
- size_t len= 0;
+ wmEvent *event = (wmEvent*)ptr->data;
+ size_t len = 0;
if (event->utf8_buf[0]) {
BLI_str_utf8_as_unicode_and_size(event->utf8_buf, &len);
@@ -509,13 +509,13 @@ static void rna_Event_unicode_get(PointerRNA *ptr, char *value)
}
}
- value[len]= '\0';
+ value[len] = '\0';
}
static int rna_Event_unicode_length(PointerRNA *ptr)
{
- wmEvent *event= (wmEvent*)ptr->data;
+ wmEvent *event = (wmEvent*)ptr->data;
if (event->utf8_buf[0]) {
return BLI_str_utf8_size(event->utf8_buf); /* invalid value is checked on assignment so we dont need to account for this */
}
@@ -526,77 +526,77 @@ static int rna_Event_unicode_length(PointerRNA *ptr)
static void rna_Window_screen_set(PointerRNA *ptr, PointerRNA value)
{
- wmWindow *win= (wmWindow*)ptr->data;
+ wmWindow *win = (wmWindow*)ptr->data;
- if(value.data == NULL)
+ if (value.data == NULL)
return;
/* exception: can't set screens inside of area/region handers */
- win->newscreen= value.data;
+ win->newscreen = value.data;
}
static void rna_Window_screen_update(bContext *C, PointerRNA *ptr)
{
- wmWindow *win= (wmWindow*)ptr->data;
+ wmWindow *win = (wmWindow*)ptr->data;
/* exception: can't set screens inside of area/region handers, and must
use context so notifier gets to the right window */
- if(win->newscreen) {
+ if (win->newscreen) {
WM_event_add_notifier(C, NC_SCREEN|ND_SCREENBROWSE, win->newscreen);
- win->newscreen= NULL;
+ win->newscreen = NULL;
}
}
static PointerRNA rna_KeyMapItem_properties_get(PointerRNA *ptr)
{
- wmKeyMapItem *kmi= ptr->data;
+ wmKeyMapItem *kmi = ptr->data;
- if(kmi->ptr)
+ if (kmi->ptr)
return *(kmi->ptr);
- //return rna_pointer_inherit_refine(ptr, &RNA_OperatorProperties, op->properties);
+ /*return rna_pointer_inherit_refine(ptr, &RNA_OperatorProperties, op->properties); */
return PointerRNA_NULL;
}
static int rna_wmKeyMapItem_map_type_get(PointerRNA *ptr)
{
- wmKeyMapItem *kmi= ptr->data;
+ wmKeyMapItem *kmi = ptr->data;
- if(ISTIMER(kmi->type)) return KMI_TYPE_TIMER;
- if(ISKEYBOARD(kmi->type)) return KMI_TYPE_KEYBOARD;
- if(ISTWEAK(kmi->type)) return KMI_TYPE_TWEAK;
- if(ISMOUSE(kmi->type)) return KMI_TYPE_MOUSE;
- if(ISNDOF(kmi->type)) return KMI_TYPE_NDOF;
- if(kmi->type == KM_TEXTINPUT) return KMI_TYPE_TEXTINPUT;
+ if (ISTIMER(kmi->type)) return KMI_TYPE_TIMER;
+ if (ISKEYBOARD(kmi->type)) return KMI_TYPE_KEYBOARD;
+ if (ISTWEAK(kmi->type)) return KMI_TYPE_TWEAK;
+ if (ISMOUSE(kmi->type)) return KMI_TYPE_MOUSE;
+ if (ISNDOF(kmi->type)) return KMI_TYPE_NDOF;
+ if (kmi->type == KM_TEXTINPUT) return KMI_TYPE_TEXTINPUT;
return KMI_TYPE_KEYBOARD;
}
static void rna_wmKeyMapItem_map_type_set(PointerRNA *ptr, int value)
{
- wmKeyMapItem *kmi= ptr->data;
- int map_type= rna_wmKeyMapItem_map_type_get(ptr);
+ wmKeyMapItem *kmi = ptr->data;
+ int map_type = rna_wmKeyMapItem_map_type_get(ptr);
- if(value != map_type) {
- switch(value) {
+ if (value != map_type) {
+ switch (value) {
case KMI_TYPE_KEYBOARD:
- kmi->type= AKEY;
- kmi->val= KM_PRESS;
+ kmi->type = AKEY;
+ kmi->val = KM_PRESS;
break;
case KMI_TYPE_TWEAK:
- kmi->type= EVT_TWEAK_L;
- kmi->val= KM_ANY;
+ kmi->type = EVT_TWEAK_L;
+ kmi->val = KM_ANY;
break;
case KMI_TYPE_MOUSE:
- kmi->type= LEFTMOUSE;
- kmi->val= KM_PRESS;
+ kmi->type = LEFTMOUSE;
+ kmi->val = KM_PRESS;
break;
case KMI_TYPE_TEXTINPUT:
- kmi->type= KM_TEXTINPUT;
- kmi->val= KM_NOTHING;
+ kmi->type = KM_TEXTINPUT;
+ kmi->val = KM_NOTHING;
break;
case KMI_TYPE_TIMER:
- kmi->type= TIMER;
- kmi->val= KM_NOTHING;
+ kmi->type = TIMER;
+ kmi->val = KM_NOTHING;
break;
case KMI_TYPE_NDOF:
kmi->type = NDOF_BUTTON_MENU;
@@ -608,21 +608,21 @@ static void rna_wmKeyMapItem_map_type_set(PointerRNA *ptr, int value)
static EnumPropertyItem *rna_KeyMapItem_type_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *UNUSED(free))
{
- int map_type= rna_wmKeyMapItem_map_type_get(ptr);
+ int map_type = rna_wmKeyMapItem_map_type_get(ptr);
- if(map_type == KMI_TYPE_MOUSE) return event_mouse_type_items;
- if(map_type == KMI_TYPE_TWEAK) return event_tweak_type_items;
- if(map_type == KMI_TYPE_TIMER) return event_timer_type_items;
- if(map_type == KMI_TYPE_NDOF) return event_ndof_type_items;
+ if (map_type == KMI_TYPE_MOUSE) return event_mouse_type_items;
+ if (map_type == KMI_TYPE_TWEAK) return event_tweak_type_items;
+ if (map_type == KMI_TYPE_TIMER) return event_timer_type_items;
+ if (map_type == KMI_TYPE_NDOF) return event_ndof_type_items;
else return event_type_items;
}
static EnumPropertyItem *rna_KeyMapItem_value_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *UNUSED(free))
{
- int map_type= rna_wmKeyMapItem_map_type_get(ptr);
+ int map_type = rna_wmKeyMapItem_map_type_get(ptr);
- if(map_type == KMI_TYPE_MOUSE || map_type == KMI_TYPE_KEYBOARD || map_type == KMI_TYPE_NDOF) return event_keymouse_value_items;
- if(map_type == KMI_TYPE_TWEAK) return event_tweak_value_items;
+ if (map_type == KMI_TYPE_MOUSE || map_type == KMI_TYPE_KEYBOARD || map_type == KMI_TYPE_NDOF) return event_keymouse_value_items;
+ if (map_type == KMI_TYPE_TWEAK) return event_tweak_value_items;
else return event_value_items;
}
@@ -632,12 +632,12 @@ static EnumPropertyItem *rna_KeyMapItem_propvalue_itemf(bContext *C, PointerRNA
wmKeyConfig *kc;
wmKeyMap *km;
- for(kc=wm->keyconfigs.first; kc; kc=kc->next) {
- for(km=kc->keymaps.first; km; km=km->next) {
+ for (kc = wm->keyconfigs.first; kc; kc = kc->next) {
+ for (km = kc->keymaps.first; km; km = km->next) {
/* only check if it's a modal keymap */
if (km->modal_items) {
wmKeyMapItem *kmi;
- for (kmi=km->items.first; kmi; kmi=kmi->next) {
+ for (kmi = km->items.first; kmi; kmi = kmi->next) {
if (kmi == ptr->data) {
return km->modal_items;
}
@@ -668,48 +668,48 @@ static void rna_KeyMapItem_any_setf(PointerRNA *ptr, int value)
{
wmKeyMapItem *kmi = (wmKeyMapItem*)ptr->data;
- if(value) {
- kmi->shift= kmi->ctrl= kmi->alt= kmi->oskey= KM_ANY;
+ if (value) {
+ kmi->shift = kmi->ctrl = kmi->alt = kmi->oskey = KM_ANY;
}
else {
- kmi->shift= kmi->ctrl= kmi->alt= kmi->oskey= 0;
+ kmi->shift = kmi->ctrl = kmi->alt = kmi->oskey = 0;
}
}
static PointerRNA rna_WindowManager_active_keyconfig_get(PointerRNA *ptr)
{
- wmWindowManager *wm= ptr->data;
+ wmWindowManager *wm = ptr->data;
wmKeyConfig *kc;
- for(kc=wm->keyconfigs.first; kc; kc=kc->next)
- if(strcmp(kc->idname, U.keyconfigstr) == 0)
+ for (kc = wm->keyconfigs.first; kc; kc = kc->next)
+ if (strcmp(kc->idname, U.keyconfigstr) == 0)
break;
- if(!kc)
- kc= wm->defaultconf;
+ if (!kc)
+ kc = wm->defaultconf;
return rna_pointer_inherit_refine(ptr, &RNA_KeyConfig, kc);
}
static void rna_WindowManager_active_keyconfig_set(PointerRNA *ptr, PointerRNA value)
{
- wmWindowManager *wm= ptr->data;
- wmKeyConfig *kc= value.data;
+ wmWindowManager *wm = ptr->data;
+ wmKeyConfig *kc = value.data;
- if(kc)
+ if (kc)
WM_keyconfig_set_active(wm, kc->idname);
}
static void rna_wmKeyMapItem_idname_get(PointerRNA *ptr, char *value)
{
- wmKeyMapItem *kmi= ptr->data;
+ wmKeyMapItem *kmi = ptr->data;
WM_operator_py_idname(value, kmi->idname);
}
static int rna_wmKeyMapItem_idname_length(PointerRNA *ptr)
{
- wmKeyMapItem *kmi= ptr->data;
+ wmKeyMapItem *kmi = ptr->data;
char pyname[OP_MAX_TYPENAME];
WM_operator_py_idname(pyname, kmi->idname);
@@ -718,12 +718,12 @@ static int rna_wmKeyMapItem_idname_length(PointerRNA *ptr)
static void rna_wmKeyMapItem_idname_set(PointerRNA *ptr, const char *value)
{
- wmKeyMapItem *kmi= ptr->data;
+ wmKeyMapItem *kmi = ptr->data;
char idname[OP_MAX_TYPENAME];
WM_operator_bl_idname(idname, value);
- if(strcmp(idname, kmi->idname) != 0) {
+ if (strcmp(idname, kmi->idname) != 0) {
BLI_strncpy(kmi->idname, idname, sizeof(kmi->idname));
WM_keymap_properties_reset(kmi, NULL);
@@ -732,21 +732,21 @@ static void rna_wmKeyMapItem_idname_set(PointerRNA *ptr, const char *value)
static void rna_wmKeyMapItem_name_get(PointerRNA *ptr, char *value)
{
- wmKeyMapItem *kmi= ptr->data;
- wmOperatorType *ot= WM_operatortype_find(kmi->idname, 1);
+ wmKeyMapItem *kmi = ptr->data;
+ wmOperatorType *ot = WM_operatortype_find(kmi->idname, 1);
strcpy(value, ot ? ot->name : kmi->idname);
}
static int rna_wmKeyMapItem_name_length(PointerRNA *ptr)
{
- wmKeyMapItem *kmi= ptr->data;
- wmOperatorType *ot= WM_operatortype_find(kmi->idname, 1);
+ wmKeyMapItem *kmi = ptr->data;
+ wmOperatorType *ot = WM_operatortype_find(kmi->idname, 1);
return strlen(ot ? ot->name : kmi->idname);
}
static int rna_KeyMapItem_userdefined_get(PointerRNA *ptr)
{
- wmKeyMapItem *kmi= ptr->data;
+ wmKeyMapItem *kmi = ptr->data;
return kmi->id < 0;
}
@@ -754,13 +754,13 @@ static void rna_wmClipboard_get(PointerRNA *UNUSED(ptr), char *value)
{
char *pbuf;
- pbuf= WM_clipboard_text_get(FALSE);
- if(pbuf) {
+ pbuf = WM_clipboard_text_get(FALSE);
+ if (pbuf) {
strcpy(value, pbuf);
MEM_freeN(pbuf);
}
else {
- value[0]= '\0';
+ value[0] = '\0';
}
}
@@ -770,12 +770,12 @@ static int rna_wmClipboard_length(PointerRNA *UNUSED(ptr))
int length;
pbuf = WM_clipboard_text_get(FALSE);
- if(pbuf) {
+ if (pbuf) {
length = strlen(pbuf);
MEM_freeN(pbuf);
}
else {
- length= 0;
+ length = 0;
}
@@ -791,21 +791,21 @@ static void rna_wmClipboard_set(PointerRNA *UNUSED(ptr), const char *value)
static void rna_Operator_unregister(struct Main *bmain, StructRNA *type)
{
const char *idname;
- wmOperatorType *ot= RNA_struct_blender_type_get(type);
+ wmOperatorType *ot = RNA_struct_blender_type_get(type);
wmWindowManager *wm;
- if(!ot)
+ if (!ot)
return;
/* update while blender is running */
- wm= bmain->wm.first;
- if(wm)
+ wm = bmain->wm.first;
+ if (wm)
WM_operator_stack_clear(wm);
WM_main_add_notifier(NC_SCREEN|NA_EDITED, NULL);
RNA_struct_free_extension(type, &ot->ext);
- idname= ot->idname;
+ idname = ot->idname;
WM_operatortype_remove(ot->idname);
MEM_freeN((void *)idname);
@@ -824,14 +824,14 @@ static int operator_poll(bContext *C, wmOperatorType *ot)
int visible;
RNA_pointer_create(NULL, ot->ext.srna, NULL, &ptr); /* dummy */
- func= &rna_Operator_poll_func; /* RNA_struct_find_function(&ptr, "poll"); */
+ func = &rna_Operator_poll_func; /* RNA_struct_find_function(&ptr, "poll"); */
RNA_parameter_list_create(&list, &ptr, func);
RNA_parameter_set_lookup(&list, "context", &C);
ot->ext.call(C, &ptr, func, &list);
RNA_parameter_get_lookup(&list, "visible", &ret);
- visible= *(int*)ret;
+ visible = *(int*)ret;
RNA_parameter_list_free(&list);
@@ -849,14 +849,14 @@ static int operator_execute(bContext *C, wmOperator *op)
int result;
RNA_pointer_create(NULL, op->type->ext.srna, op, &opr);
- func= &rna_Operator_execute_func; /* RNA_struct_find_function(&opr, "execute"); */
+ func = &rna_Operator_execute_func; /* RNA_struct_find_function(&opr, "execute"); */
RNA_parameter_list_create(&list, &opr, func);
RNA_parameter_set_lookup(&list, "context", &C);
op->type->ext.call(C, &opr, func, &list);
RNA_parameter_get_lookup(&list, "result", &ret);
- result= *(int*)ret;
+ result = *(int*)ret;
RNA_parameter_list_free(&list);
@@ -875,14 +875,14 @@ static int operator_check(bContext *C, wmOperator *op)
int result;
RNA_pointer_create(NULL, op->type->ext.srna, op, &opr);
- func= &rna_Operator_check_func; /* RNA_struct_find_function(&opr, "check"); */
+ func = &rna_Operator_check_func; /* RNA_struct_find_function(&opr, "check"); */
RNA_parameter_list_create(&list, &opr, func);
RNA_parameter_set_lookup(&list, "context", &C);
op->type->ext.call(C, &opr, func, &list);
RNA_parameter_get_lookup(&list, "result", &ret);
- result= *(int*)ret;
+ result = *(int*)ret;
RNA_parameter_list_free(&list);
@@ -900,7 +900,7 @@ static int operator_invoke(bContext *C, wmOperator *op, wmEvent *event)
int result;
RNA_pointer_create(NULL, op->type->ext.srna, op, &opr);
- func= &rna_Operator_invoke_func; /* RNA_struct_find_function(&opr, "invoke"); */
+ func = &rna_Operator_invoke_func; /* RNA_struct_find_function(&opr, "invoke"); */
RNA_parameter_list_create(&list, &opr, func);
RNA_parameter_set_lookup(&list, "context", &C);
@@ -908,7 +908,7 @@ static int operator_invoke(bContext *C, wmOperator *op, wmEvent *event)
op->type->ext.call(C, &opr, func, &list);
RNA_parameter_get_lookup(&list, "result", &ret);
- result= *(int*)ret;
+ result = *(int*)ret;
RNA_parameter_list_free(&list);
@@ -927,7 +927,7 @@ static int operator_modal(bContext *C, wmOperator *op, wmEvent *event)
int result;
RNA_pointer_create(NULL, op->type->ext.srna, op, &opr);
- func= &rna_Operator_modal_func; /* RNA_struct_find_function(&opr, "modal"); */
+ func = &rna_Operator_modal_func; /* RNA_struct_find_function(&opr, "modal"); */
RNA_parameter_list_create(&list, &opr, func);
RNA_parameter_set_lookup(&list, "context", &C);
@@ -935,7 +935,7 @@ static int operator_modal(bContext *C, wmOperator *op, wmEvent *event)
op->type->ext.call(C, &opr, func, &list);
RNA_parameter_get_lookup(&list, "result", &ret);
- result= *(int*)ret;
+ result = *(int*)ret;
RNA_parameter_list_free(&list);
@@ -951,7 +951,7 @@ static void operator_draw(bContext *C, wmOperator *op)
FunctionRNA *func;
RNA_pointer_create(NULL, op->type->ext.srna, op, &opr);
- func= &rna_Operator_draw_func; /* RNA_struct_find_function(&opr, "draw"); */
+ func = &rna_Operator_draw_func; /* RNA_struct_find_function(&opr, "draw"); */
RNA_parameter_list_create(&list, &opr, func);
RNA_parameter_set_lookup(&list, "context", &C);
@@ -972,14 +972,14 @@ static int operator_cancel(bContext *C, wmOperator *op)
int result;
RNA_pointer_create(NULL, op->type->ext.srna, op, &opr);
- func= &rna_Operator_cancel_func; /* RNA_struct_find_function(&opr, "cancel"); */
+ func = &rna_Operator_cancel_func; /* RNA_struct_find_function(&opr, "cancel"); */
RNA_parameter_list_create(&list, &opr, func);
RNA_parameter_set_lookup(&list, "context", &C);
op->type->ext.call(C, &opr, func, &list);
RNA_parameter_get_lookup(&list, "result", &ret);
- result= *(int*)ret;
+ result = *(int*)ret;
RNA_parameter_list_free(&list);
@@ -995,22 +995,22 @@ static char _operator_descr[RNA_DYN_DESCR_MAX];
static StructRNA *rna_Operator_register(Main *bmain, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
{
wmOperatorType dummyot = {NULL};
- wmOperator dummyop= {NULL};
+ wmOperator dummyop = {NULL};
PointerRNA dummyotr;
int have_function[7];
/* setup dummy operator & operator type to store static properties in */
- dummyop.type= &dummyot;
- dummyot.idname= _operator_idname; /* only assigne the pointer, string is NULL'd */
- dummyot.name= _operator_name; /* only assigne the pointer, string is NULL'd */
- dummyot.description= _operator_descr; /* only assigne the pointer, string is NULL'd */
+ dummyop.type = &dummyot;
+ dummyot.idname = _operator_idname; /* only assigne the pointer, string is NULL'd */
+ dummyot.name = _operator_name; /* only assigne the pointer, string is NULL'd */
+ dummyot.description = _operator_descr; /* only assigne the pointer, string is NULL'd */
RNA_pointer_create(NULL, &RNA_Operator, &dummyop, &dummyotr);
/* clear incase they are left unset */
- _operator_idname[0]= _operator_name[0]= _operator_descr[0]= '\0';
+ _operator_idname[0] = _operator_name[0] = _operator_descr[0] = '\0';
/* validate the python class */
- if(validate(&dummyotr, data, have_function) != 0)
+ if (validate(&dummyotr, data, have_function) != 0)
return NULL;
{ /* convert foo.bar to FOO_OT_bar
@@ -1018,14 +1018,14 @@ static StructRNA *rna_Operator_register(Main *bmain, ReportList *reports, void *
/* inconveniently long name sanity check */
{
- char *ch= _operator_idname;
+ char *ch = _operator_idname;
int i;
- int dot= 0;
- for(i=0; *ch; i++) {
- if((*ch >= 'a' && *ch <= 'z') || (*ch >= '0' && *ch <= '9') || *ch == '_') {
+ int dot = 0;
+ for (i = 0; *ch; i++) {
+ if ((*ch >= 'a' && *ch <= 'z') || (*ch >= '0' && *ch <= '9') || *ch == '_') {
/* pass */
}
- else if(*ch == '.') {
+ else if (*ch == '.') {
dot++;
}
else {
@@ -1036,14 +1036,14 @@ static StructRNA *rna_Operator_register(Main *bmain, ReportList *reports, void *
ch++;
}
- if(i > ((int)sizeof(dummyop.idname)) - 3) {
+ if (i > ((int)sizeof(dummyop.idname)) - 3) {
BKE_reportf(reports, RPT_ERROR, "registering operator class: '%s', invalid bl_idname '%s', "
"is too long, maximum length is %d", identifier, _operator_idname,
(int)sizeof(dummyop.idname) - 3);
return NULL;
}
- if(dot != 1) {
+ if (dot != 1) {
BKE_reportf(reports, RPT_ERROR, "registering operator class: '%s', invalid bl_idname '%s', "
"must contain 1 '.' character", identifier, _operator_idname);
return NULL;
@@ -1056,9 +1056,9 @@ static StructRNA *rna_Operator_register(Main *bmain, ReportList *reports, void *
int namelen = strlen(_operator_name) + 1;
int desclen = strlen(_operator_descr) + 1;
char *ch;
- ch= MEM_callocN(sizeof(char) * (idlen + namelen + desclen), "_operator_idname"); /* 2 terminators and 3 to convert a.b -> A_OT_b */
+ ch = MEM_callocN(sizeof(char) * (idlen + namelen + desclen), "_operator_idname"); /* 2 terminators and 3 to convert a.b -> A_OT_b */
WM_operator_bl_idname(ch, _operator_idname); /* convert the idname from python */
- dummyot.idname= ch;
+ dummyot.idname = ch;
ch += idlen;
strcpy(ch, _operator_name);
dummyot.name = ch;
@@ -1070,8 +1070,8 @@ static StructRNA *rna_Operator_register(Main *bmain, ReportList *reports, void *
/* check if we have registered this operator type before, and remove it */
{
- wmOperatorType *ot= WM_operatortype_find(dummyot.idname, TRUE);
- if(ot && ot->ext.srna)
+ wmOperatorType *ot = WM_operatortype_find(dummyot.idname, TRUE);
+ if (ot && ot->ext.srna)
rna_Operator_unregister(bmain, ot->ext.srna);
}
@@ -1079,19 +1079,19 @@ static StructRNA *rna_Operator_register(Main *bmain, ReportList *reports, void *
* for now just remove from dir(bpy.types) */
/* create a new operator type */
- dummyot.ext.srna= RNA_def_struct(&BLENDER_RNA, dummyot.idname, "Operator");
+ dummyot.ext.srna = RNA_def_struct(&BLENDER_RNA, dummyot.idname, "Operator");
RNA_def_struct_flag(dummyot.ext.srna, STRUCT_NO_IDPROPERTIES); /* operator properties are registered separately */
- dummyot.ext.data= data;
- dummyot.ext.call= call;
- dummyot.ext.free= free;
-
- dummyot.pyop_poll= (have_function[0])? operator_poll: NULL;
- dummyot.exec= (have_function[1])? operator_execute: NULL;
- dummyot.check= (have_function[2])? operator_check: NULL;
- dummyot.invoke= (have_function[3])? operator_invoke: NULL;
- dummyot.modal= (have_function[4])? operator_modal: NULL;
- dummyot.ui= (have_function[5])? operator_draw: NULL;
- dummyot.cancel= (have_function[6])? operator_cancel: NULL;
+ dummyot.ext.data = data;
+ dummyot.ext.call = call;
+ dummyot.ext.free = free;
+
+ dummyot.pyop_poll = (have_function[0])? operator_poll: NULL;
+ dummyot.exec = (have_function[1])? operator_execute: NULL;
+ dummyot.check = (have_function[2])? operator_check: NULL;
+ dummyot.invoke = (have_function[3])? operator_invoke: NULL;
+ dummyot.modal = (have_function[4])? operator_modal: NULL;
+ dummyot.ui = (have_function[5])? operator_draw: NULL;
+ dummyot.cancel = (have_function[6])? operator_cancel: NULL;
WM_operatortype_append_ptr(operator_wrapper, (void *)&dummyot);
/* update while blender is running */
@@ -1109,19 +1109,19 @@ void **rna_Operator_instance(PointerRNA *ptr)
static StructRNA *rna_MacroOperator_register(Main *bmain, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
{
wmOperatorType dummyot = {NULL};
- wmOperator dummyop= {NULL};
+ wmOperator dummyop = {NULL};
PointerRNA dummyotr;
int have_function[4];
/* setup dummy operator & operator type to store static properties in */
- dummyop.type= &dummyot;
- dummyot.idname= _operator_idname; /* only assigne the pointer, string is NULL'd */
- dummyot.name= _operator_name; /* only assigne the pointer, string is NULL'd */
- dummyot.description= _operator_descr; /* only assigne the pointer, string is NULL'd */
+ dummyop.type = &dummyot;
+ dummyot.idname = _operator_idname; /* only assigne the pointer, string is NULL'd */
+ dummyot.name = _operator_name; /* only assigne the pointer, string is NULL'd */
+ dummyot.description = _operator_descr; /* only assigne the pointer, string is NULL'd */
RNA_pointer_create(NULL, &RNA_Macro, &dummyop, &dummyotr);
/* validate the python class */
- if(validate(&dummyotr, data, have_function) != 0)
+ if (validate(&dummyotr, data, have_function) != 0)
return NULL;
{ /* convert foo.bar to FOO_OT_bar
@@ -1130,9 +1130,9 @@ static StructRNA *rna_MacroOperator_register(Main *bmain, ReportList *reports, v
int namelen = strlen(_operator_name) + 1;
int desclen = strlen(_operator_descr) + 1;
char *ch;
- ch= MEM_callocN(sizeof(char) * (idlen + namelen + desclen), "_operator_idname"); /* 2 terminators and 3 to convert a.b -> A_OT_b */
+ ch = MEM_callocN(sizeof(char) * (idlen + namelen + desclen), "_operator_idname"); /* 2 terminators and 3 to convert a.b -> A_OT_b */
WM_operator_bl_idname(ch, _operator_idname); /* convert the idname from python */
- dummyot.idname= ch;
+ dummyot.idname = ch;
ch += idlen;
strcpy(ch, _operator_name);
dummyot.name = ch;
@@ -1141,7 +1141,7 @@ static StructRNA *rna_MacroOperator_register(Main *bmain, ReportList *reports, v
dummyot.description = ch;
}
- if(strlen(identifier) >= sizeof(dummyop.idname)) {
+ if (strlen(identifier) >= sizeof(dummyop.idname)) {
BKE_reportf(reports, RPT_ERROR, "registering operator class: '%s' is too long, maximum length is %d",
identifier, (int)sizeof(dummyop.idname));
return NULL;
@@ -1149,8 +1149,8 @@ static StructRNA *rna_MacroOperator_register(Main *bmain, ReportList *reports, v
/* check if we have registered this operator type before, and remove it */
{
- wmOperatorType *ot= WM_operatortype_find(dummyot.idname, TRUE);
- if(ot && ot->ext.srna)
+ wmOperatorType *ot = WM_operatortype_find(dummyot.idname, TRUE);
+ if (ot && ot->ext.srna)
rna_Operator_unregister(bmain, ot->ext.srna);
}
@@ -1158,13 +1158,13 @@ static StructRNA *rna_MacroOperator_register(Main *bmain, ReportList *reports, v
* for now just remove from dir(bpy.types) */
/* create a new operator type */
- dummyot.ext.srna= RNA_def_struct(&BLENDER_RNA, dummyot.idname, "Operator");
- dummyot.ext.data= data;
- dummyot.ext.call= call;
- dummyot.ext.free= free;
+ dummyot.ext.srna = RNA_def_struct(&BLENDER_RNA, dummyot.idname, "Operator");
+ dummyot.ext.data = data;
+ dummyot.ext.call = call;
+ dummyot.ext.free = free;
- dummyot.pyop_poll= (have_function[0])? operator_poll: NULL;
- dummyot.ui= (have_function[3])? operator_draw: NULL;
+ dummyot.pyop_poll = (have_function[0])? operator_poll: NULL;
+ dummyot.ui = (have_function[3])? operator_draw: NULL;
WM_operatortype_append_macro_ptr(macro_wrapper, (void *)&dummyot);
@@ -1177,44 +1177,44 @@ static StructRNA *rna_MacroOperator_register(Main *bmain, ReportList *reports, v
static StructRNA* rna_Operator_refine(PointerRNA *opr)
{
- wmOperator *op= (wmOperator*)opr->data;
+ wmOperator *op = (wmOperator*)opr->data;
return (op->type && op->type->ext.srna)? op->type->ext.srna: &RNA_Operator;
}
static StructRNA* rna_MacroOperator_refine(PointerRNA *opr)
{
- wmOperator *op= (wmOperator*)opr->data;
+ wmOperator *op = (wmOperator*)opr->data;
return (op->type && op->type->ext.srna)? op->type->ext.srna: &RNA_Macro;
}
/* 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]) BLI_strncpy(str, value, RNA_DYN_DESCR_MAX); /* utf8 already ensured */
+ wmOperator *data = (wmOperator*)(ptr->data);
+ char *str = (char *)data->type->idname;
+ if (!str[0]) BLI_strncpy(str, value, RNA_DYN_DESCR_MAX); /* utf8 already ensured */
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]) BLI_strncpy(str, value, RNA_DYN_DESCR_MAX); /* utf8 already ensured */
+ wmOperator *data = (wmOperator*)(ptr->data);
+ char *str = (char *)data->type->name;
+ if (!str[0]) BLI_strncpy(str, value, RNA_DYN_DESCR_MAX); /* utf8 already ensured */
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]) BLI_strncpy(str, value, RNA_DYN_DESCR_MAX); /* utf8 already ensured */
+ wmOperator *data = (wmOperator*)(ptr->data);
+ char *str = (char *)data->type->description;
+ if (!str[0]) BLI_strncpy(str, value, RNA_DYN_DESCR_MAX); /* utf8 already ensured */
else assert(!"setting the bl_description on a non-builtin operator");
}
static void rna_KeyMapItem_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- wmKeyMapItem *kmi= ptr->data;
+ wmKeyMapItem *kmi = ptr->data;
WM_keyconfig_update_tag(NULL, kmi);
}
@@ -1225,7 +1225,7 @@ static void rna_def_operator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Operator", NULL);
+ srna = RNA_def_struct(brna, "Operator", NULL);
RNA_def_struct_ui_text(srna, "Operator", "Storage of an operator being executed, or registered after execution");
RNA_def_struct_sdna(srna, "wmOperator");
RNA_def_struct_refine_func(srna, "rna_Operator_refine");
@@ -1233,52 +1233,52 @@ static void rna_def_operator(BlenderRNA *brna)
RNA_def_struct_register_funcs(srna, "rna_Operator_register", "rna_Operator_unregister", "rna_Operator_instance");
#endif
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_Operator_name_get", "rna_Operator_name_length", NULL);
RNA_def_property_ui_text(prop, "Name", "");
- prop= RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "OperatorProperties");
RNA_def_property_ui_text(prop, "Properties", "");
RNA_def_property_pointer_funcs(prop, "rna_Operator_properties_get", NULL, NULL, NULL);
- prop= RNA_def_property(srna, "has_reports", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "has_reports", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* this is 'virtual' property */
RNA_def_property_boolean_funcs(prop, "rna_Operator_has_reports_get", NULL);
RNA_def_property_ui_text(prop, "Has Reports", "Operator has a set of reports (warnings and errors) from last execution");
- prop= RNA_def_property(srna, "layout", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "layout", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "UILayout");
/* Registration */
- prop= RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
+ 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-3); /* else it uses the pointer size!. -3 because '.' -> '_OT_' */
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Operator_bl_idname_set");
- // RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ /* RNA_def_property_clear_flag(prop, PROP_EDITABLE); */
RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);
RNA_def_struct_name_property(srna, prop);
/* operator's label indeed doesn't need PROP_TRANSLATE flag: translation of label happens in runtime
* when drawing panel and having this flag set will make runtime switching of language much more tricky
* because label will be stored translated */
- prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
+ 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, RNA_DYN_DESCR_MAX); /* 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_clear_flag(prop, PROP_EDITABLE); */
RNA_def_property_flag(prop, PROP_REGISTER);
- prop= RNA_def_property(srna, "bl_description", PROP_STRING, PROP_TRANSLATE);
+ prop = RNA_def_property(srna, "bl_description", PROP_STRING, PROP_TRANSLATE);
RNA_def_property_string_sdna(prop, NULL, "type->description");
RNA_def_property_string_maxlength(prop, RNA_DYN_DESCR_MAX); /* 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_clear_flag(prop, PROP_EDITABLE); */
RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
- prop= RNA_def_property(srna, "bl_options", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "bl_options", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type->flag");
RNA_def_property_enum_items(prop, operator_flag_items);
RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL|PROP_ENUM_FLAG);
@@ -1286,7 +1286,7 @@ static void rna_def_operator(BlenderRNA *brna)
RNA_api_operator(srna);
- srna= RNA_def_struct(brna, "OperatorProperties", NULL);
+ srna = RNA_def_struct(brna, "OperatorProperties", NULL);
RNA_def_struct_ui_text(srna, "Operator Properties", "Input properties of an Operator");
RNA_def_struct_refine_func(srna, "rna_OperatorProperties_refine");
RNA_def_struct_idprops_func(srna, "rna_OperatorProperties_idprops");
@@ -1297,7 +1297,7 @@ static void rna_def_macro_operator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Macro", NULL);
+ srna = RNA_def_struct(brna, "Macro", NULL);
RNA_def_struct_ui_text(srna, "Macro Operator", "Storage of a macro operator being executed, or registered after execution");
RNA_def_struct_sdna(srna, "wmOperator");
RNA_def_struct_refine_func(srna, "rna_MacroOperator_refine");
@@ -1305,44 +1305,44 @@ static void rna_def_macro_operator(BlenderRNA *brna)
RNA_def_struct_register_funcs(srna, "rna_MacroOperator_register", "rna_Operator_unregister", "rna_Operator_instance");
#endif
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_Operator_name_get", "rna_Operator_name_length", NULL);
RNA_def_property_ui_text(prop, "Name", "");
- prop= RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "OperatorProperties");
RNA_def_property_ui_text(prop, "Properties", "");
RNA_def_property_pointer_funcs(prop, "rna_Operator_properties_get", NULL, NULL, NULL);
/* Registration */
- prop= RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
+ 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_clear_flag(prop, PROP_EDITABLE); */
RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);
RNA_def_struct_name_property(srna, prop);
/* menu's label indeed doesn't need PROP_TRANSLATE flag: translation of label happens in runtime
* when drawing panel and having this flag set will make runtime switching of language much more tricky
* because label will be stored translated */
- prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
+ 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, RNA_DYN_DESCR_MAX); /* 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_clear_flag(prop, PROP_EDITABLE); */
RNA_def_property_flag(prop, PROP_REGISTER);
- prop= RNA_def_property(srna, "bl_description", PROP_STRING, PROP_TRANSLATE);
+ prop = RNA_def_property(srna, "bl_description", PROP_STRING, PROP_TRANSLATE);
RNA_def_property_string_sdna(prop, NULL, "type->description");
RNA_def_property_string_maxlength(prop, RNA_DYN_DESCR_MAX); /* 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_clear_flag(prop, PROP_EDITABLE); */
RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
- prop= RNA_def_property(srna, "bl_options", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "bl_options", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type->flag");
RNA_def_property_enum_items(prop, operator_flag_items);
RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL|PROP_ENUM_FLAG);
@@ -1356,17 +1356,17 @@ static void rna_def_operator_type_macro(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "OperatorMacro", NULL);
+ srna = RNA_def_struct(brna, "OperatorMacro", NULL);
RNA_def_struct_ui_text(srna, "Operator Macro", "Storage of a sub operator in a macro after it has been added");
RNA_def_struct_sdna(srna, "wmOperatorTypeMacro");
-// prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
-// RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-// RNA_def_property_string_sdna(prop, NULL, "idname");
-// RNA_def_property_ui_text(prop, "Name", "Name of the sub operator");
-// RNA_def_struct_name_property(srna, prop);
+/* prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); */
+/* RNA_def_property_clear_flag(prop, PROP_EDITABLE); */
+/* RNA_def_property_string_sdna(prop, NULL, "idname"); */
+/* RNA_def_property_ui_text(prop, "Name", "Name of the sub operator"); */
+/* RNA_def_struct_name_property(srna, prop); */
- prop= RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "OperatorProperties");
RNA_def_property_ui_text(prop, "Properties", "");
@@ -1378,15 +1378,15 @@ static void rna_def_operator_utils(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "OperatorMousePath", "PropertyGroup");
+ srna = RNA_def_struct(brna, "OperatorMousePath", "PropertyGroup");
RNA_def_struct_ui_text(srna, "Operator Mouse Path", "Mouse path values for operators that record such paths");
- prop= RNA_def_property(srna, "loc", PROP_FLOAT, PROP_XYZ);
+ prop = RNA_def_property(srna, "loc", PROP_FLOAT, PROP_XYZ);
RNA_def_property_flag(prop, PROP_IDPROPERTY);
RNA_def_property_array(prop, 2);
RNA_def_property_ui_text(prop, "Location", "Mouse location");
- prop= RNA_def_property(srna, "time", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "time", PROP_FLOAT, PROP_NONE);
RNA_def_property_flag(prop, PROP_IDPROPERTY);
RNA_def_property_ui_text(prop, "Time", "Time of mouse location");
}
@@ -1396,11 +1396,11 @@ static void rna_def_operator_filelist_element(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "OperatorFileListElement", "PropertyGroup");
+ srna = RNA_def_struct(brna, "OperatorFileListElement", "PropertyGroup");
RNA_def_struct_ui_text(srna, "Operator File List Element", "");
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_FILENAME);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_FILENAME);
RNA_def_property_flag(prop, PROP_IDPROPERTY);
RNA_def_property_ui_text(prop, "Name", "Name of a file or directory within a file list");
}
@@ -1410,32 +1410,32 @@ static void rna_def_event(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Event", NULL);
+ srna = RNA_def_struct(brna, "Event", NULL);
RNA_def_struct_ui_text(srna, "Event", "Window Manager Event");
RNA_def_struct_sdna(srna, "wmEvent");
- RNA_define_verify_sdna(0); // not in sdna
+ RNA_define_verify_sdna(0); /* not in sdna */
/* strings */
- prop= RNA_def_property(srna, "ascii", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "ascii", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_Event_ascii_get", "rna_Event_ascii_length", NULL);
RNA_def_property_ui_text(prop, "ASCII", "Single ASCII character for this event");
- prop= RNA_def_property(srna, "unicode", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "unicode", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_string_funcs(prop, "rna_Event_unicode_get", "rna_Event_unicode_length", NULL);
RNA_def_property_ui_text(prop, "Unicode", "Single unicode character for this event");
/* enums */
- prop= RNA_def_property(srna, "value", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "value", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "val");
RNA_def_property_enum_items(prop, event_value_items);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Value", "The type of event, only applies to some");
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, event_type_items);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -1443,59 +1443,59 @@ static void rna_def_event(BlenderRNA *brna)
/* mouse */
- prop= RNA_def_property(srna, "mouse_x", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "mouse_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "x");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Mouse X Position", "The window relative vertical location of the mouse");
- prop= RNA_def_property(srna, "mouse_y", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "mouse_y", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "y");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Mouse Y Position", "The window relative horizontal location of the mouse");
- prop= RNA_def_property(srna, "mouse_region_x", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "mouse_region_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "mval[0]");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Mouse X Position", "The region relative vertical location of the mouse");
- prop= RNA_def_property(srna, "mouse_region_y", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "mouse_region_y", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "mval[1]");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Mouse Y Position", "The region relative horizontal location of the mouse");
- prop= RNA_def_property(srna, "mouse_prev_x", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "mouse_prev_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "prevx");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Mouse Previous X Position", "The window relative vertical location of the mouse");
- prop= RNA_def_property(srna, "mouse_prev_y", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "mouse_prev_y", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "prevy");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Mouse Previous Y Position", "The window relative horizontal location of the mouse");
/* modifiers */
- prop= RNA_def_property(srna, "shift", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "shift", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shift", 1);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Shift", "True when the Shift key is held");
- prop= RNA_def_property(srna, "ctrl", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "ctrl", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ctrl", 1);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Ctrl", "True when the Ctrl key is held");
- prop= RNA_def_property(srna, "alt", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "alt", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "alt", 1);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Alt", "True when the Alt/Option key is held");
- prop= RNA_def_property(srna, "oskey", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "oskey", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "oskey", 1);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "OS Key", "True when the Cmd key is held");
- RNA_define_verify_sdna(1); // not in sdna
+ RNA_define_verify_sdna(1); /* not in sdna */
}
static void rna_def_timer(BlenderRNA *brna)
@@ -1503,29 +1503,29 @@ static void rna_def_timer(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Timer", NULL);
+ srna = RNA_def_struct(brna, "Timer", NULL);
RNA_def_struct_ui_text(srna, "Timer", "Window event timer");
RNA_def_struct_sdna(srna, "wmTimer");
- RNA_define_verify_sdna(0); // not in sdna
+ RNA_define_verify_sdna(0); /* not in sdna */
/* could wrap more, for now this is enough */
- prop= RNA_def_property(srna, "time_step", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "time_step", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "timestep");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Time Step", "");
- prop= RNA_def_property(srna, "time_delta", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "time_delta", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "delta");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Delta", "Time since last step in seconds");
- prop= RNA_def_property(srna, "time_duration", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "time_duration", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "duration");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Delta", "Time since last step in seconds");
- RNA_define_verify_sdna(1); // not in sdna
+ RNA_define_verify_sdna(1); /* not in sdna */
}
static void rna_def_window(BlenderRNA *brna)
@@ -1533,11 +1533,11 @@ static void rna_def_window(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Window", NULL);
+ srna = RNA_def_struct(brna, "Window", NULL);
RNA_def_struct_ui_text(srna, "Window", "Open window");
RNA_def_struct_sdna(srna, "wmWindow");
- prop= RNA_def_property(srna, "screen", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "screen", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "Screen");
RNA_def_property_ui_text(prop, "Screen", "Active screen showing in the window");
@@ -1554,27 +1554,27 @@ static void rna_def_wm_keyconfigs(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
RNA_def_property_srna(cprop, "KeyConfigurations");
- srna= RNA_def_struct(brna, "KeyConfigurations", NULL);
+ srna = RNA_def_struct(brna, "KeyConfigurations", NULL);
RNA_def_struct_sdna(srna, "wmWindowManager");
RNA_def_struct_ui_text(srna, "KeyConfigs", "Collection of KeyConfigs");
- prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "KeyConfig");
RNA_def_property_pointer_funcs(prop, "rna_WindowManager_active_keyconfig_get", "rna_WindowManager_active_keyconfig_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Active KeyConfig", "Active key configuration (preset)");
- prop= RNA_def_property(srna, "default", PROP_POINTER, PROP_NEVER_NULL);
+ prop = RNA_def_property(srna, "default", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "defaultconf");
RNA_def_property_struct_type(prop, "KeyConfig");
RNA_def_property_ui_text(prop, "Default Key Configuration", "Default builtin key configuration");
- prop= RNA_def_property(srna, "addon", PROP_POINTER, PROP_NEVER_NULL);
+ prop = RNA_def_property(srna, "addon", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "addonconf");
RNA_def_property_struct_type(prop, "KeyConfig");
RNA_def_property_ui_text(prop, "Addon Key Configuration", "Key configuration that can be extended by addons, and is added to the active configuration when handling events");
- prop= RNA_def_property(srna, "user", PROP_POINTER, PROP_NEVER_NULL);
+ prop = RNA_def_property(srna, "user", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "userconf");
RNA_def_property_struct_type(prop, "KeyConfig");
RNA_def_property_ui_text(prop, "User Key Configuration", "Final key configuration that combines keymaps from the active and addon configurations, and can be edited by the user");
@@ -1587,25 +1587,25 @@ static void rna_def_windowmanager(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "WindowManager", "ID");
+ srna = RNA_def_struct(brna, "WindowManager", "ID");
RNA_def_struct_ui_text(srna, "Window Manager", "Window manager datablock defining open windows and other user interface data");
RNA_def_struct_clear_flag(srna, STRUCT_ID_REFCOUNT);
RNA_def_struct_sdna(srna, "wmWindowManager");
- prop= RNA_def_property(srna, "operators", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "operators", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "Operator");
RNA_def_property_ui_text(prop, "Operators", "Operator registry");
- prop= RNA_def_property(srna, "windows", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "windows", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "Window");
RNA_def_property_ui_text(prop, "Windows", "Open windows");
- prop= RNA_def_property(srna, "keyconfigs", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "keyconfigs", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "KeyConfig");
RNA_def_property_ui_text(prop, "Key Configurations", "Registered key configurations");
rna_def_wm_keyconfigs(brna, prop);
- prop= RNA_def_property(srna, "clipboard", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "clipboard", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_wmClipboard_get", "rna_wmClipboard_length", "rna_wmClipboard_set");
RNA_def_property_ui_text(prop, "Text Clipboard", "");
@@ -1618,7 +1618,7 @@ static void rna_def_keymap_items(BlenderRNA *brna, PropertyRNA *cprop)
StructRNA *srna;
RNA_def_property_srna(cprop, "KeyMapItems");
- srna= RNA_def_struct(brna, "KeyMapItems", NULL);
+ srna = RNA_def_struct(brna, "KeyMapItems", NULL);
RNA_def_struct_sdna(srna, "wmKeyMap");
RNA_def_struct_ui_text(srna, "KeyMap Items", "Collection of keymap items");
@@ -1630,7 +1630,7 @@ static void rna_def_wm_keymaps(BlenderRNA *brna, PropertyRNA *cprop)
StructRNA *srna;
RNA_def_property_srna(cprop, "KeyMaps");
- srna= RNA_def_struct(brna, "KeyMaps", NULL);
+ srna = RNA_def_struct(brna, "KeyMaps", NULL);
RNA_def_struct_sdna(srna, "wmKeyConfig");
RNA_def_struct_ui_text(srna, "Key Maps", "Collection of keymaps");
@@ -1652,21 +1652,21 @@ static void rna_def_keyconfig(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
/* KeyConfig */
- srna= RNA_def_struct(brna, "KeyConfig", NULL);
+ srna = RNA_def_struct(brna, "KeyConfig", NULL);
RNA_def_struct_sdna(srna, "wmKeyConfig");
RNA_def_struct_ui_text(srna, "Key Configuration", "Input configuration, including keymaps");
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "idname");
RNA_def_property_ui_text(prop, "Name", "Name of the key configuration");
RNA_def_struct_name_property(srna, prop);
- prop= RNA_def_property(srna, "keymaps", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "keymaps", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "KeyMap");
RNA_def_property_ui_text(prop, "Key Maps", "Key maps configured as part of this configuration");
rna_def_wm_keymaps(brna, prop);
- prop= RNA_def_property(srna, "is_user_defined", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_user_defined", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYCONF_USER);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "User Defined", "Indicates that a keyconfig was defined by the user");
@@ -1674,49 +1674,49 @@ static void rna_def_keyconfig(BlenderRNA *brna)
RNA_api_keyconfig(srna);
/* KeyMap */
- srna= RNA_def_struct(brna, "KeyMap", NULL);
+ srna = RNA_def_struct(brna, "KeyMap", NULL);
RNA_def_struct_sdna(srna, "wmKeyMap");
RNA_def_struct_ui_text(srna, "Key Map", "Input configuration, including keymaps");
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "idname");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Name", "Name of the key map");
RNA_def_struct_name_property(srna, prop);
- prop= RNA_def_property(srna, "space_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "space_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "spaceid");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_enum_items(prop, space_type_items);
RNA_def_property_ui_text(prop, "Space Type", "Optional space type keymap is associated with");
- prop= RNA_def_property(srna, "region_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "region_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "regionid");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_enum_items(prop, region_type_items);
RNA_def_property_ui_text(prop, "Region Type", "Optional region type keymap is associated with");
- prop= RNA_def_property(srna, "keymap_items", PROP_COLLECTION, PROP_NONE);
+ prop = RNA_def_property(srna, "keymap_items", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "items", NULL);
RNA_def_property_struct_type(prop, "KeyMapItem");
RNA_def_property_ui_text(prop, "Items", "Items in the keymap, linking an operator to an input event");
rna_def_keymap_items(brna, prop);
- prop= RNA_def_property(srna, "is_user_modified", PROP_BOOLEAN, PROP_NEVER_NULL);
+ prop = RNA_def_property(srna, "is_user_modified", PROP_BOOLEAN, PROP_NEVER_NULL);
RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYMAP_USER_MODIFIED);
RNA_def_property_ui_text(prop, "User Defined", "Keymap is defined by the user");
- prop= RNA_def_property(srna, "is_modal", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_modal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYMAP_MODAL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Modal Keymap", "Indicates that a keymap is used for translate modal events for an operator");
- prop= RNA_def_property(srna, "show_expanded_items", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_expanded_items", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYMAP_EXPANDED);
RNA_def_property_ui_text(prop, "Items Expanded", "Expanded in the user interface");
RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
- prop= RNA_def_property(srna, "show_expanded_children", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_expanded_children", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYMAP_CHILDREN_EXPANDED);
RNA_def_property_ui_text(prop, "Children Expanded", "Children expanded in the user interface");
RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
@@ -1725,11 +1725,11 @@ static void rna_def_keyconfig(BlenderRNA *brna)
RNA_api_keymap(srna);
/* KeyMapItem */
- srna= RNA_def_struct(brna, "KeyMapItem", NULL);
+ srna = RNA_def_struct(brna, "KeyMapItem", NULL);
RNA_def_struct_sdna(srna, "wmKeyMapItem");
RNA_def_struct_ui_text(srna, "Key Map Item", "Item in a Key Map");
- prop= RNA_def_property(srna, "idname", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "idname", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "idname");
RNA_def_property_ui_text(prop, "Identifier", "Identifier of operator to call on input event");
RNA_def_property_string_funcs(prop, "rna_wmKeyMapItem_idname_get", "rna_wmKeyMapItem_idname_length", "rna_wmKeyMapItem_idname_set");
@@ -1738,107 +1738,107 @@ static void rna_def_keyconfig(BlenderRNA *brna)
/* this is infact the operator name, but if the operator can't be found we
* fallback on the operator ID */
- prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Name", "Name of operator to call on input event");
RNA_def_property_string_funcs(prop, "rna_wmKeyMapItem_name_get", "rna_wmKeyMapItem_name_length", NULL);
- prop= RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "OperatorProperties");
RNA_def_property_pointer_funcs(prop, "rna_KeyMapItem_properties_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Properties", "Properties to set when the operator is called");
RNA_def_property_update(prop, 0, "rna_KeyMapItem_update");
- prop= RNA_def_property(srna, "map_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "map_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "maptype");
RNA_def_property_enum_items(prop, map_type_items);
RNA_def_property_enum_funcs(prop, "rna_wmKeyMapItem_map_type_get", "rna_wmKeyMapItem_map_type_set", NULL);
RNA_def_property_ui_text(prop, "Map Type", "Type of event mapping");
RNA_def_property_update(prop, 0, "rna_KeyMapItem_update");
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, event_type_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_KeyMapItem_type_itemf");
RNA_def_property_ui_text(prop, "Type", "Type of event");
RNA_def_property_update(prop, 0, "rna_KeyMapItem_update");
- prop= RNA_def_property(srna, "value", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "value", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "val");
RNA_def_property_enum_items(prop, event_value_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_KeyMapItem_value_itemf");
RNA_def_property_ui_text(prop, "Value", "");
RNA_def_property_update(prop, 0, "rna_KeyMapItem_update");
- prop= RNA_def_property(srna, "id", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "id", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "id");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "ID", "ID of the item");
RNA_def_property_update(prop, 0, "rna_KeyMapItem_update");
- prop= RNA_def_property(srna, "any", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "any", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_KeyMapItem_any_getf", "rna_KeyMapItem_any_setf");
RNA_def_property_ui_text(prop, "Any", "Any modifier keys pressed");
RNA_def_property_update(prop, 0, "rna_KeyMapItem_update");
- prop= RNA_def_property(srna, "shift", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "shift", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shift", 0);
-// RNA_def_property_enum_sdna(prop, NULL, "shift");
-// RNA_def_property_enum_items(prop, keymap_modifiers_items);
+/* RNA_def_property_enum_sdna(prop, NULL, "shift"); */
+/* RNA_def_property_enum_items(prop, keymap_modifiers_items); */
RNA_def_property_ui_text(prop, "Shift", "Shift key pressed");
RNA_def_property_update(prop, 0, "rna_KeyMapItem_update");
- prop= RNA_def_property(srna, "ctrl", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "ctrl", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ctrl", 0);
-// RNA_def_property_enum_sdna(prop, NULL, "ctrl");
-// RNA_def_property_enum_items(prop, keymap_modifiers_items);
+/* RNA_def_property_enum_sdna(prop, NULL, "ctrl"); */
+/* RNA_def_property_enum_items(prop, keymap_modifiers_items); */
RNA_def_property_ui_text(prop, "Ctrl", "Control key pressed");
RNA_def_property_update(prop, 0, "rna_KeyMapItem_update");
- prop= RNA_def_property(srna, "alt", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "alt", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "alt", 0);
-// RNA_def_property_enum_sdna(prop, NULL, "alt");
-// RNA_def_property_enum_items(prop, keymap_modifiers_items);
+/* RNA_def_property_enum_sdna(prop, NULL, "alt"); */
+/* RNA_def_property_enum_items(prop, keymap_modifiers_items); */
RNA_def_property_ui_text(prop, "Alt", "Alt key pressed");
RNA_def_property_update(prop, 0, "rna_KeyMapItem_update");
- prop= RNA_def_property(srna, "oskey", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "oskey", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "oskey", 0);
-// RNA_def_property_enum_sdna(prop, NULL, "oskey");
-// RNA_def_property_enum_items(prop, keymap_modifiers_items);
+/* RNA_def_property_enum_sdna(prop, NULL, "oskey"); */
+/* RNA_def_property_enum_items(prop, keymap_modifiers_items); */
RNA_def_property_ui_text(prop, "OS Key", "Operating system key pressed");
RNA_def_property_update(prop, 0, "rna_KeyMapItem_update");
- prop= RNA_def_property(srna, "key_modifier", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "key_modifier", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "keymodifier");
RNA_def_property_enum_items(prop, event_type_items);
RNA_def_property_ui_text(prop, "Key Modifier", "Regular key pressed as a modifier");
RNA_def_property_update(prop, 0, "rna_KeyMapItem_update");
- prop= RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", KMI_EXPANDED);
RNA_def_property_ui_text(prop, "Expanded", "Show key map event and property details in the user interface");
RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
- prop= RNA_def_property(srna, "propvalue", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "propvalue", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "propvalue");
RNA_def_property_enum_items(prop, keymap_propvalue_items);
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_KeyMapItem_propvalue_itemf");
RNA_def_property_ui_text(prop, "Property Value", "The value this event translates to in a modal keymap");
RNA_def_property_update(prop, 0, "rna_KeyMapItem_update");
- prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", KMI_INACTIVE);
RNA_def_property_ui_text(prop, "Active", "Activate or deactivate item");
RNA_def_property_ui_icon(prop, ICON_CHECKBOX_DEHLT, 1);
RNA_def_property_update(prop, 0, "rna_KeyMapItem_update");
- prop= RNA_def_property(srna, "is_user_modified", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "is_user_modified", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", KMI_USER_MODIFIED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "User Modified", "Is this keymap item modified by the user");
- prop= RNA_def_property(srna, "is_user_defined", PROP_BOOLEAN, PROP_NONE);
+ 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 replace a builtin item)");
RNA_def_property_boolean_funcs(prop, "rna_KeyMapItem_userdefined_get", NULL);
diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c
index 35f12114a4e..131cc39933f 100644
--- a/source/blender/makesrna/intern/rna_wm_api.c
+++ b/source/blender/makesrna/intern/rna_wm_api.c
@@ -84,9 +84,9 @@ void rna_event_timer_remove(struct wmWindowManager *wm, wmTimer *timer)
static wmKeyMapItem *rna_KeyMap_item_new(wmKeyMap *km, ReportList *reports, const char *idname, int type, int value, int any, int shift, int ctrl, int alt, int oskey, int keymodifier)
{
-// wmWindowManager *wm = CTX_wm_manager(C);
+/* wmWindowManager *wm = CTX_wm_manager(C); */
char idname_bl[OP_MAX_TYPENAME];
- int modifier= 0;
+ int modifier = 0;
/* only on non-modal maps */
if (km->flag & KEYMAP_MODAL) {
@@ -96,19 +96,19 @@ static wmKeyMapItem *rna_KeyMap_item_new(wmKeyMap *km, ReportList *reports, cons
WM_operator_bl_idname(idname_bl, idname);
- if(shift) modifier |= KM_SHIFT;
- if(ctrl) modifier |= KM_CTRL;
- if(alt) modifier |= KM_ALT;
- if(oskey) modifier |= KM_OSKEY;
+ if (shift) modifier |= KM_SHIFT;
+ if (ctrl) modifier |= KM_CTRL;
+ if (alt) modifier |= KM_ALT;
+ if (oskey) modifier |= KM_OSKEY;
- if(any) modifier = KM_ANY;
+ if (any) modifier = KM_ANY;
return WM_keymap_add_item(km, idname_bl, type, value, modifier, keymodifier);
}
static wmKeyMapItem *rna_KeyMap_item_new_modal(wmKeyMap *km, ReportList *reports, const char *propvalue_str, int type, int value, int any, int shift, int ctrl, int alt, int oskey, int keymodifier)
{
- int modifier= 0;
+ int modifier = 0;
int propvalue = 0;
/* only modal maps */
@@ -123,16 +123,16 @@ static wmKeyMapItem *rna_KeyMap_item_new_modal(wmKeyMap *km, ReportList *reports
}
- if(RNA_enum_value_from_id(km->modal_items, propvalue_str, &propvalue)==0) {
+ if (RNA_enum_value_from_id(km->modal_items, propvalue_str, &propvalue) == 0) {
BKE_report(reports, RPT_WARNING, "Property value not in enumeration");
}
- if(shift) modifier |= KM_SHIFT;
- if(ctrl) modifier |= KM_CTRL;
- if(alt) modifier |= KM_ALT;
- if(oskey) modifier |= KM_OSKEY;
+ if (shift) modifier |= KM_SHIFT;
+ if (ctrl) modifier |= KM_CTRL;
+ if (alt) modifier |= KM_ALT;
+ if (oskey) modifier |= KM_OSKEY;
- if(any) modifier = KM_ANY;
+ if (any) modifier = KM_ANY;
return WM_modalkeymap_add_item(km, type, value, modifier, keymodifier, propvalue);
}
@@ -172,21 +172,21 @@ static void rna_generic_op_invoke(FunctionRNA *func, int flag)
PropertyRNA *parm;
RNA_def_function_flag(func, FUNC_NO_SELF|FUNC_USE_CONTEXT);
- parm= RNA_def_pointer(func, "operator", "Operator", "", "Operator to call");
+ parm = RNA_def_pointer(func, "operator", "Operator", "", "Operator to call");
RNA_def_property_flag(parm, PROP_REQUIRED);
- if(flag & WM_GEN_INVOKE_EVENT) {
- parm= RNA_def_pointer(func, "event", "Event", "", "Event");
+ if (flag & WM_GEN_INVOKE_EVENT) {
+ parm = RNA_def_pointer(func, "event", "Event", "", "Event");
RNA_def_property_flag(parm, PROP_REQUIRED);
}
- if(flag & WM_GEN_INVOKE_SIZE) {
+ if (flag & WM_GEN_INVOKE_SIZE) {
RNA_def_int(func, "width", 300, 0, INT_MAX, "", "Width of the popup", 0, INT_MAX);
RNA_def_int(func, "height", 20, 0, INT_MAX, "", "Height of the popup", 0, INT_MAX);
}
- if(flag & WM_GEN_INVOKE_RETURN) {
- parm= RNA_def_enum_flag(func, "result", operator_return_items, OPERATOR_CANCELLED, "result", "");
+ if (flag & WM_GEN_INVOKE_RETURN) {
+ parm = RNA_def_enum_flag(func, "result", operator_return_items, OPERATOR_CANCELLED, "result", "");
RNA_def_function_return(func, parm);
}
}
@@ -196,54 +196,54 @@ void RNA_api_wm(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
- func= RNA_def_function(srna, "fileselect_add", "WM_event_add_fileselect");
+ func = RNA_def_function(srna, "fileselect_add", "WM_event_add_fileselect");
RNA_def_function_ui_description(func, "Opens a file selector with an operator. "
"The string properties 'filepath', 'filename', 'directory' and a 'files' collection "
"are assigned when present in the operator");
rna_generic_op_invoke(func, 0);
- func= RNA_def_function(srna, "modal_handler_add", "rna_event_modal_handler_add");
+ 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");
+ parm = RNA_def_pointer(func, "operator", "Operator", "", "Operator to call");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_function_return(func, RNA_def_boolean(func, "handle", 1, "", ""));
- func= RNA_def_function(srna, "event_timer_add", "rna_event_timer_add");
- parm= RNA_def_property(func, "time_step", PROP_FLOAT, PROP_NONE);
+ func = RNA_def_function(srna, "event_timer_add", "rna_event_timer_add");
+ parm = RNA_def_property(func, "time_step", PROP_FLOAT, PROP_NONE);
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_property_range(parm, 0.0, FLT_MAX);
RNA_def_property_ui_text(parm, "Time Step", "Interval in seconds between timer events");
RNA_def_pointer(func, "window", "Window", "", "Window to attach the timer to or None");
- parm= RNA_def_pointer(func, "result", "Timer", "", "");
+ parm = RNA_def_pointer(func, "result", "Timer", "", "");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "event_timer_remove", "rna_event_timer_remove");
- parm= RNA_def_pointer(func, "timer", "Timer", "", "");
+ func = RNA_def_function(srna, "event_timer_remove", "rna_event_timer_remove");
+ parm = RNA_def_pointer(func, "timer", "Timer", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
/* invoke functions, for use with python */
- func= RNA_def_function(srna, "invoke_props_popup", "WM_operator_props_popup");
+ func = RNA_def_function(srna, "invoke_props_popup", "WM_operator_props_popup");
RNA_def_function_ui_description(func, "Operator popup invoke");
rna_generic_op_invoke(func, WM_GEN_INVOKE_EVENT|WM_GEN_INVOKE_RETURN);
/* invoked dialog opens popup with OK button, does not auto-exec operator. */
- func= RNA_def_function(srna, "invoke_props_dialog", "WM_operator_props_dialog_popup");
+ func = RNA_def_function(srna, "invoke_props_dialog", "WM_operator_props_dialog_popup");
RNA_def_function_ui_description(func, "Operator dialog (non-autoexec popup) invoke");
rna_generic_op_invoke(func, WM_GEN_INVOKE_SIZE|WM_GEN_INVOKE_RETURN);
/* invoke enum */
- func= RNA_def_function(srna, "invoke_search_popup", "rna_Operator_enum_search_invoke");
+ func = RNA_def_function(srna, "invoke_search_popup", "rna_Operator_enum_search_invoke");
rna_generic_op_invoke(func, 0);
/* invoke functions, for use with python */
- func= RNA_def_function(srna, "invoke_popup", "WM_operator_ui_popup");
+ func = RNA_def_function(srna, "invoke_popup", "WM_operator_ui_popup");
RNA_def_function_ui_description(func, "Operator popup invoke");
rna_generic_op_invoke(func, WM_GEN_INVOKE_SIZE|WM_GEN_INVOKE_RETURN);
- func= RNA_def_function(srna, "invoke_confirm", "WM_operator_confirm");
+ func = RNA_def_function(srna, "invoke_confirm", "WM_operator_confirm");
RNA_def_function_ui_description(func, "Operator confirmation");
rna_generic_op_invoke(func, WM_GEN_INVOKE_EVENT|WM_GEN_INVOKE_RETURN);
@@ -255,81 +255,81 @@ void RNA_api_operator(StructRNA *srna)
PropertyRNA *parm;
/* utility, not for registering */
- func= RNA_def_function(srna, "report", "rna_Operator_report");
- parm= RNA_def_enum_flag(func, "type", wm_report_items, 0, "Type", "");
+ func = RNA_def_function(srna, "report", "rna_Operator_report");
+ parm = RNA_def_enum_flag(func, "type", wm_report_items, 0, "Type", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_string(func, "message", "", 0, "Report Message", "");
+ parm = RNA_def_string(func, "message", "", 0, "Report Message", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* Registration */
/* poll */
- func= RNA_def_function(srna, "poll", NULL);
+ func = RNA_def_function(srna, "poll", NULL);
RNA_def_function_ui_description(func, "Test if the operator can be called or not");
RNA_def_function_flag(func, FUNC_NO_SELF|FUNC_REGISTER_OPTIONAL);
RNA_def_function_return(func, RNA_def_boolean(func, "visible", 1, "", ""));
- parm= RNA_def_pointer(func, "context", "Context", "", "");
+ parm = RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
/* exec */
- func= RNA_def_function(srna, "execute", NULL);
+ func = RNA_def_function(srna, "execute", NULL);
RNA_def_function_ui_description(func, "Execute the operator");
RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
- parm= RNA_def_pointer(func, "context", "Context", "", "");
+ parm = RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- parm= RNA_def_enum_flag(func, "result", operator_return_items, OPERATOR_CANCELLED, "result", ""); // better name?
+ parm = RNA_def_enum_flag(func, "result", operator_return_items, OPERATOR_CANCELLED, "result", ""); /* better name? */
RNA_def_function_return(func, parm);
/* check */
- func= RNA_def_function(srna, "check", NULL);
+ func = RNA_def_function(srna, "check", NULL);
RNA_def_function_ui_description(func, "Check the operator settings, return True to signal a change to redraw");
RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
- parm= RNA_def_pointer(func, "context", "Context", "", "");
+ parm = RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- parm= RNA_def_boolean(func, "result", 0, "result", ""); // better name?
+ parm = RNA_def_boolean(func, "result", 0, "result", ""); /* better name? */
RNA_def_function_return(func, parm);
/* invoke */
- func= RNA_def_function(srna, "invoke", NULL);
+ func = RNA_def_function(srna, "invoke", NULL);
RNA_def_function_ui_description(func, "Invoke the operator");
RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
- parm= RNA_def_pointer(func, "context", "Context", "", "");
+ parm = RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- parm= RNA_def_pointer(func, "event", "Event", "", "");
+ parm = RNA_def_pointer(func, "event", "Event", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- parm= RNA_def_enum_flag(func, "result", operator_return_items, OPERATOR_CANCELLED, "result", ""); // better name?
+ parm = RNA_def_enum_flag(func, "result", operator_return_items, OPERATOR_CANCELLED, "result", ""); /* better name? */
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "modal", NULL); /* same as invoke */
+ func = RNA_def_function(srna, "modal", NULL); /* same as invoke */
RNA_def_function_ui_description(func, "Modal operator function");
RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
- parm= RNA_def_pointer(func, "context", "Context", "", "");
+ parm = RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- parm= RNA_def_pointer(func, "event", "Event", "", "");
+ parm = RNA_def_pointer(func, "event", "Event", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- parm= RNA_def_enum_flag(func, "result", operator_return_items, OPERATOR_CANCELLED, "result", ""); // better name?
+ parm = RNA_def_enum_flag(func, "result", operator_return_items, OPERATOR_CANCELLED, "result", ""); /* better name? */
RNA_def_function_return(func, parm);
/* draw */
- func= RNA_def_function(srna, "draw", NULL);
+ func = RNA_def_function(srna, "draw", NULL);
RNA_def_function_ui_description(func, "Draw function for the operator");
RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
- parm= RNA_def_pointer(func, "context", "Context", "", "");
+ parm = RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
/* cancel */
- func= RNA_def_function(srna, "cancel", NULL);
+ func = RNA_def_function(srna, "cancel", NULL);
RNA_def_function_ui_description(func, "Called when the operator is cancelled");
RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
- parm= RNA_def_pointer(func, "context", "Context", "", "");
+ parm = RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- parm= RNA_def_enum_flag(func, "result", operator_return_items, OPERATOR_CANCELLED, "result", ""); // better name?
+ parm = RNA_def_enum_flag(func, "result", operator_return_items, OPERATOR_CANCELLED, "result", ""); /* better name? */
RNA_def_function_return(func, parm);
}
@@ -339,35 +339,35 @@ void RNA_api_macro(StructRNA *srna)
PropertyRNA *parm;
/* utility, not for registering */
- func= RNA_def_function(srna, "report", "rna_Operator_report");
- parm= RNA_def_enum_flag(func, "type", wm_report_items, 0, "Type", "");
+ func = RNA_def_function(srna, "report", "rna_Operator_report");
+ parm = RNA_def_enum_flag(func, "type", wm_report_items, 0, "Type", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_string(func, "message", "", 0, "Report Message", "");
+ parm = RNA_def_string(func, "message", "", 0, "Report Message", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* Registration */
/* poll */
- func= RNA_def_function(srna, "poll", NULL);
+ func = RNA_def_function(srna, "poll", NULL);
RNA_def_function_ui_description(func, "Test if the operator can be called or not");
RNA_def_function_flag(func, FUNC_NO_SELF|FUNC_REGISTER_OPTIONAL);
RNA_def_function_return(func, RNA_def_boolean(func, "visible", 1, "", ""));
- parm= RNA_def_pointer(func, "context", "Context", "", "");
+ parm = RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
/* draw */
- func= RNA_def_function(srna, "draw", NULL);
+ func = RNA_def_function(srna, "draw", NULL);
RNA_def_function_ui_description(func, "Draw function for the operator");
RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
- parm= RNA_def_pointer(func, "context", "Context", "", "");
+ parm = RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
void RNA_api_keyconfig(StructRNA *srna)
{
- // FunctionRNA *func;
- // PropertyRNA *parm;
+ /* FunctionRNA *func; */
+ /* PropertyRNA *parm; */
}
void RNA_api_keymap(StructRNA *srna)
@@ -375,17 +375,17 @@ void RNA_api_keymap(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
- func= RNA_def_function(srna, "active", "rna_keymap_active");
+ func = RNA_def_function(srna, "active", "rna_keymap_active");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
- parm= RNA_def_pointer(func, "keymap", "KeyMap", "Key Map", "Active key map");
+ parm = RNA_def_pointer(func, "keymap", "KeyMap", "Key Map", "Active key map");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "restore_to_default", "WM_keymap_restore_to_default");
+ func = RNA_def_function(srna, "restore_to_default", "WM_keymap_restore_to_default");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
- func= RNA_def_function(srna, "restore_item_to_default", "rna_keymap_restore_item_to_default");
+ func = RNA_def_function(srna, "restore_item_to_default", "rna_keymap_restore_item_to_default");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
- parm= RNA_def_pointer(func, "item", "KeyMapItem", "Item", "");
+ parm = RNA_def_pointer(func, "item", "KeyMapItem", "Item", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
@@ -394,10 +394,10 @@ void RNA_api_keymapitem(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
- func= RNA_def_function(srna, "compare", "WM_keymap_item_compare");
- parm= RNA_def_pointer(func, "item", "KeyMapItem", "Item", "");
+ func = RNA_def_function(srna, "compare", "WM_keymap_item_compare");
+ parm = RNA_def_pointer(func, "item", "KeyMapItem", "Item", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_boolean(func, "result", 0, "Comparison result", "");
+ parm = RNA_def_boolean(func, "result", 0, "Comparison result", "");
RNA_def_function_return(func, parm);
}
@@ -406,13 +406,13 @@ void RNA_api_keymapitems(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
- func= RNA_def_function(srna, "new", "rna_KeyMap_item_new");
+ func = RNA_def_function(srna, "new", "rna_KeyMap_item_new");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_string(func, "idname", "", 0, "Operator Identifier", "");
+ parm = RNA_def_string(func, "idname", "", 0, "Operator Identifier", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_enum(func, "type", event_type_items, 0, "Type", "");
+ parm = RNA_def_enum(func, "type", event_type_items, 0, "Type", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_enum(func, "value", event_value_items, 0, "Value", "");
+ parm = RNA_def_enum(func, "value", event_value_items, 0, "Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_boolean(func, "any", 0, "Any", "");
RNA_def_boolean(func, "shift", 0, "Shift", "");
@@ -420,16 +420,16 @@ void RNA_api_keymapitems(StructRNA *srna)
RNA_def_boolean(func, "alt", 0, "Alt", "");
RNA_def_boolean(func, "oskey", 0, "OS Key", "");
RNA_def_enum(func, "key_modifier", event_type_items, 0, "Key Modifier", "");
- parm= RNA_def_pointer(func, "item", "KeyMapItem", "Item", "Added key map item");
+ parm = RNA_def_pointer(func, "item", "KeyMapItem", "Item", "Added key map item");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "new_modal", "rna_KeyMap_item_new_modal");
+ func = RNA_def_function(srna, "new_modal", "rna_KeyMap_item_new_modal");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_string(func, "propvalue", "", 0, "Property Value", "");
+ parm = RNA_def_string(func, "propvalue", "", 0, "Property Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_enum(func, "type", event_type_items, 0, "Type", "");
+ parm = RNA_def_enum(func, "type", event_type_items, 0, "Type", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_enum(func, "value", event_value_items, 0, "Value", "");
+ parm = RNA_def_enum(func, "value", event_value_items, 0, "Value", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_boolean(func, "any", 0, "Any", "");
RNA_def_boolean(func, "shift", 0, "Shift", "");
@@ -437,18 +437,18 @@ void RNA_api_keymapitems(StructRNA *srna)
RNA_def_boolean(func, "alt", 0, "Alt", "");
RNA_def_boolean(func, "oskey", 0, "OS Key", "");
RNA_def_enum(func, "key_modifier", event_type_items, 0, "Key Modifier", "");
- parm= RNA_def_pointer(func, "item", "KeyMapItem", "Item", "Added key map item");
+ parm = RNA_def_pointer(func, "item", "KeyMapItem", "Item", "Added key map item");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "WM_keymap_remove_item");
- parm= RNA_def_pointer(func, "item", "KeyMapItem", "Item", "");
+ func = RNA_def_function(srna, "remove", "WM_keymap_remove_item");
+ parm = RNA_def_pointer(func, "item", "KeyMapItem", "Item", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- func= RNA_def_function(srna, "from_id", "WM_keymap_item_find_id");
- parm= RNA_def_property(func, "id", PROP_INT, PROP_NONE);
+ func = RNA_def_function(srna, "from_id", "WM_keymap_item_find_id");
+ parm = RNA_def_property(func, "id", PROP_INT, PROP_NONE);
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_property_ui_text(parm, "id", "ID of the item");
- parm= RNA_def_pointer(func, "item", "KeyMapItem", "Item", "");
+ parm = RNA_def_pointer(func, "item", "KeyMapItem", "Item", "");
RNA_def_function_return(func, parm);
}
@@ -457,27 +457,27 @@ void RNA_api_keymaps(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
- func= RNA_def_function(srna, "new", "rna_keymap_new"); // add_keymap
- parm= RNA_def_string(func, "name", "", 0, "Name", "");
+ func = RNA_def_function(srna, "new", "rna_keymap_new"); /* add_keymap */
+ parm = RNA_def_string(func, "name", "", 0, "Name", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_enum(func, "space_type", space_type_items, SPACE_EMPTY, "Space Type", "");
RNA_def_enum(func, "region_type", region_type_items, RGN_TYPE_WINDOW, "Region Type", "");
RNA_def_boolean(func, "modal", 0, "Modal", "");
- parm= RNA_def_pointer(func, "keymap", "KeyMap", "Key Map", "Added key map");
+ parm = RNA_def_pointer(func, "keymap", "KeyMap", "Key Map", "Added key map");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "find", "rna_keymap_find"); // find_keymap
- parm= RNA_def_string(func, "name", "", 0, "Name", "");
+ func = RNA_def_function(srna, "find", "rna_keymap_find"); /* find_keymap */
+ parm = RNA_def_string(func, "name", "", 0, "Name", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_enum(func, "space_type", space_type_items, SPACE_EMPTY, "Space Type", "");
RNA_def_enum(func, "region_type", region_type_items, RGN_TYPE_WINDOW, "Region Type", "");
- parm= RNA_def_pointer(func, "keymap", "KeyMap", "Key Map", "Corresponding key map");
+ parm = RNA_def_pointer(func, "keymap", "KeyMap", "Key Map", "Corresponding key map");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "find_modal", "rna_keymap_find_modal"); // find_keymap_modal
- parm= RNA_def_string(func, "name", "", 0, "Operator Name", "");
+ func = RNA_def_function(srna, "find_modal", "rna_keymap_find_modal"); /* find_keymap_modal */
+ parm = RNA_def_string(func, "name", "", 0, "Operator Name", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "keymap", "KeyMap", "Key Map", "Corresponding key map");
+ parm = RNA_def_pointer(func, "keymap", "KeyMap", "Key Map", "Corresponding key map");
RNA_def_function_return(func, parm);
}
@@ -486,14 +486,14 @@ void RNA_api_keyconfigs(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
- func= RNA_def_function(srna, "new", "WM_keyconfig_new_user"); // add_keyconfig
- parm= RNA_def_string(func, "name", "", 0, "Name", "");
+ func = RNA_def_function(srna, "new", "WM_keyconfig_new_user"); /* add_keyconfig */
+ parm = RNA_def_string(func, "name", "", 0, "Name", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "keyconfig", "KeyConfig", "Key Configuration", "Added key configuration");
+ parm = RNA_def_pointer(func, "keyconfig", "KeyConfig", "Key Configuration", "Added key configuration");
RNA_def_function_return(func, parm);
- func= RNA_def_function(srna, "remove", "WM_keyconfig_remove"); // remove_keyconfig
- parm= RNA_def_pointer(func, "keyconfig", "KeyConfig", "Key Configuration", "Removed key configuration");
+ func = RNA_def_function(srna, "remove", "WM_keyconfig_remove"); /* remove_keyconfig */
+ parm = RNA_def_pointer(func, "keyconfig", "KeyConfig", "Key Configuration", "Removed key configuration");
RNA_def_property_flag(parm, PROP_REQUIRED);
}
diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c
index 279cda535b1..4c641062954 100644
--- a/source/blender/makesrna/intern/rna_world.c
+++ b/source/blender/makesrna/intern/rna_world.c
@@ -67,29 +67,29 @@ static PointerRNA rna_World_mist_get(PointerRNA *ptr)
static void rna_World_mtex_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
- World *wo= (World*)ptr->data;
+ World *wo = (World*)ptr->data;
rna_iterator_array_begin(iter, (void*)wo->mtex, sizeof(MTex*), MAX_MTEX, 0, NULL);
}
static PointerRNA rna_World_active_texture_get(PointerRNA *ptr)
{
- World *wo= (World*)ptr->data;
+ World *wo = (World*)ptr->data;
Tex *tex;
- tex= give_current_world_texture(wo);
+ tex = give_current_world_texture(wo);
return rna_pointer_inherit_refine(ptr, &RNA_Texture, tex);
}
static void rna_World_active_texture_set(PointerRNA *ptr, PointerRNA value)
{
- World *wo= (World*)ptr->data;
+ World *wo = (World*)ptr->data;
set_current_world_texture(wo, value.data);
}
static void rna_World_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- World *wo= ptr->id.data;
+ World *wo = ptr->id.data;
DAG_id_tag_update(&wo->id, 0);
WM_main_add_notifier(NC_WORLD, wo);
@@ -97,7 +97,7 @@ static void rna_World_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerR
static void rna_World_draw_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- World *wo= ptr->id.data;
+ World *wo = ptr->id.data;
DAG_id_tag_update(&wo->id, 0);
WM_main_add_notifier(NC_WORLD|ND_WORLD_DRAW, wo);
@@ -106,7 +106,7 @@ static void rna_World_draw_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Poi
/* so camera mist limits redraw */
static void rna_World_draw_mist_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- World *wo= ptr->id.data;
+ World *wo = ptr->id.data;
DAG_id_tag_update(&wo->id, 0);
WM_main_add_notifier(NC_WORLD|ND_WORLD_DRAW, wo);
@@ -115,7 +115,7 @@ static void rna_World_draw_mist_update(Main *UNUSED(bmain), Scene *UNUSED(scene)
static void rna_World_stars_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- World *wo= ptr->id.data;
+ World *wo = ptr->id.data;
DAG_id_tag_update(&wo->id, 0);
WM_main_add_notifier(NC_WORLD|ND_WORLD_STARS, wo);
@@ -123,9 +123,9 @@ static void rna_World_stars_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Po
static void rna_World_use_nodes_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- World *wrld= (World*)ptr->data;
+ World *wrld = (World*)ptr->data;
- if(wrld->use_nodes && wrld->nodetree==NULL)
+ if (wrld->use_nodes && wrld->nodetree == NULL)
ED_node_shader_default(scene, &wrld->id);
rna_World_update(bmain, scene, ptr);
@@ -148,63 +148,63 @@ static void rna_def_world_mtex(BlenderRNA *brna)
{TEXCO_OBJECT, "OBJECT", 0, "Object", "Use linked object's coordinates for texture coordinates"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "WorldTextureSlot", "TextureSlot");
+ srna = RNA_def_struct(brna, "WorldTextureSlot", "TextureSlot");
RNA_def_struct_sdna(srna, "MTex");
RNA_def_struct_ui_text(srna, "World Texture Slot", "Texture slot for textures in a World datablock");
/* map to */
- prop= RNA_def_property(srna, "use_map_blend", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_blend", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_BLEND);
RNA_def_property_ui_text(prop, "Blend", "Affect the color progression of the background");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "use_map_horizon", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_horizon", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_HORIZ);
RNA_def_property_ui_text(prop, "Horizon", "Affect the color of the horizon");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "use_map_zenith_up", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_zenith_up", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_ZENUP);
RNA_def_property_ui_text(prop, "Zenith Up", "Affect the color of the zenith above");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "use_map_zenith_down", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_map_zenith_down", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_ZENDOWN);
RNA_def_property_ui_text(prop, "Zenith Down", "Affect the color of the zenith below");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "texture_coords", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "texture_coords", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "texco");
RNA_def_property_enum_items(prop, texco_items);
RNA_def_property_ui_text(prop, "Texture Coordinates", "Texture coordinates used to map the texture onto the background");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "object");
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Object", "Object to use for mapping with Object texture coordinates");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "blend_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "blend_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "blendfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Blend Factor", "Amount texture affects color progression of the background");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "horizon_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "horizon_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "colfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Horizon Factor", "Amount texture affects color of the horizon");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "zenith_up_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "zenith_up_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "zenupfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Zenith Up Factor", "Amount texture affects color of the zenith above");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "zenith_down_factor", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "zenith_down_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "zendownfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Zenith Down Factor", "Amount texture affects color of the zenith below");
@@ -238,138 +238,138 @@ static void rna_def_lighting(BlenderRNA *brna)
{WO_AOGATHER_APPROX, "APPROXIMATE", 0, "Approximate", "Inaccurate, but faster and without noise"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "WorldLighting", NULL);
+ srna = RNA_def_struct(brna, "WorldLighting", NULL);
RNA_def_struct_sdna(srna, "World");
RNA_def_struct_nested(brna, srna, "World");
RNA_def_struct_ui_text(srna, "Lighting", "Lighting for a World datablock");
/* ambient occlusion */
- prop= RNA_def_property(srna, "use_ambient_occlusion", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_ambient_occlusion", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_AMB_OCC);
RNA_def_property_ui_text(prop, "Use Ambient Occlusion", "Use Ambient Occlusion to add shadowing based on distance between objects");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "ao_factor", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "ao_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "aoenergy");
RNA_def_property_range(prop, 0, INT_MAX);
RNA_def_property_ui_range(prop, 0, 1, 0.1, 2);
RNA_def_property_ui_text(prop, "Factor", "Factor for ambient occlusion blending");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "ao_blend_type", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "ao_blend_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "aomix");
RNA_def_property_enum_items(prop, blend_mode_items);
RNA_def_property_ui_text(prop, "Blend Mode", "Defines how AO mixes with material shading");
RNA_def_property_update(prop, 0, "rna_World_update");
/* environment lighting */
- prop= RNA_def_property(srna, "use_environment_light", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_environment_light", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_ENV_LIGHT);
RNA_def_property_ui_text(prop, "Use Environment Lighting", "Add light coming from the environment");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "environment_energy", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "environment_energy", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ao_env_energy");
RNA_def_property_ui_range(prop, 0, FLT_MAX, 1, 3);
RNA_def_property_ui_text(prop, "Environment Color", "Defines the strength of environment light");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "environment_color", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "environment_color", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "aocolor");
RNA_def_property_enum_items(prop, prop_color_items);
RNA_def_property_ui_text(prop, "Environment Color", "Defines where the color of the environment light comes from");
RNA_def_property_update(prop, 0, "rna_World_update");
/* indirect lighting */
- prop= RNA_def_property(srna, "use_indirect_light", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_indirect_light", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_INDIRECT_LIGHT);
RNA_def_property_ui_text(prop, "Use Indirect Lighting", "Add indirect light bouncing of surrounding objects");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "indirect_factor", PROP_FLOAT, PROP_FACTOR);
+ prop = RNA_def_property(srna, "indirect_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "ao_indirect_energy");
RNA_def_property_range(prop, 0, INT_MAX);
RNA_def_property_ui_range(prop, 0, 1, 0.1, 2);
RNA_def_property_ui_text(prop, "Indirect Factor", "Factor for how much surrounding objects contribute to light");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "indirect_bounces", PROP_INT, PROP_UNSIGNED);
+ prop = RNA_def_property(srna, "indirect_bounces", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "ao_indirect_bounces");
RNA_def_property_range(prop, 1, SHRT_MAX);
RNA_def_property_ui_text(prop, "Bounces", "Number of indirect diffuse light bounces");
RNA_def_property_update(prop, 0, "rna_World_update");
/* gathering parameters */
- prop= RNA_def_property(srna, "gather_method", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "gather_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ao_gather_method");
RNA_def_property_enum_items(prop, prop_gather_method_items);
RNA_def_property_ui_text(prop, "Gather Method", "");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "passes", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "passes", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ao_approx_passes");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Passes", "Number of preprocessing passes to reduce overocclusion");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "aodist");
RNA_def_property_ui_text(prop, "Distance", "Length of rays, defines how far away other faces give occlusion effect");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "falloff_strength", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "falloff_strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aodistfac");
RNA_def_property_ui_text(prop, "Strength", "Attenuation falloff strength, the higher, the less influence distant objects have");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "bias", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "bias", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aobias");
RNA_def_property_range(prop, 0, 0.5);
RNA_def_property_ui_text(prop, "Bias", "Bias (in radians) to prevent smoothed faces from showing banding (for Raytrace Constant Jittered)");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ao_adapt_thresh");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Threshold", "Samples below this threshold will be considered fully shadowed/unshadowed and skipped (for Raytrace Adaptive QMC)");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "adapt_to_speed", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "adapt_to_speed", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ao_adapt_speed_fac");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Adapt To Speed", "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)");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "error_threshold", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "error_threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ao_approx_error");
RNA_def_property_range(prop, 0.0001, 10);
RNA_def_property_ui_text(prop, "Error Tolerance", "Low values are slower and higher quality");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "correction", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "correction", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ao_approx_correction");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_range(prop, 0, 1, 0.1, 2);
RNA_def_property_ui_text(prop, "Correction", "Ad-hoc correction for over-occlusion due to the approximation");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "use_falloff", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_falloff", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "aomode", WO_AODIST);
RNA_def_property_ui_text(prop, "Falloff", "Distance will be used to attenuate shadows");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "use_cache", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_cache", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "aomode", WO_AOCACHE);
RNA_def_property_ui_text(prop, "Pixel Cache", "Cache AO results in pixels and interpolate over neighboring pixels for speedup");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "samples", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "aosamp");
RNA_def_property_range(prop, 1, 128);
RNA_def_property_ui_text(prop, "Samples", "Amount of ray samples. Higher values give smoother results and longer rendering times");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "sample_method", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "sample_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ao_samp_method");
RNA_def_property_enum_items(prop, prop_sample_method_items);
RNA_def_property_ui_text(prop, "Sample Method", "Method for generating shadow samples (for Raytrace)");
@@ -387,43 +387,43 @@ static void rna_def_world_mist(BlenderRNA *brna)
{2, "INVERSE_QUADRATIC", 0, "Inverse Quadratic", "Use inverse quadratic progression"},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "WorldMistSettings", NULL);
+ srna = RNA_def_struct(brna, "WorldMistSettings", NULL);
RNA_def_struct_sdna(srna, "World");
RNA_def_struct_nested(brna, srna, "World");
RNA_def_struct_ui_text(srna, "World Mist", "Mist settings for a World data-block");
- prop= RNA_def_property(srna, "use_mist", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_mist", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_MIST);
RNA_def_property_ui_text(prop, "Use Mist", "Occlude objects with the environment color as they are further away");
RNA_def_property_update(prop, 0, "rna_World_draw_update");
- prop= RNA_def_property(srna, "intensity", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "intensity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "misi");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Minimum", "Overall minimum intensity of the mist effect");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "start", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "start", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "miststa");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 10000, 10, 2);
RNA_def_property_ui_text(prop, "Start", "Starting distance of the mist, measured from the camera");
RNA_def_property_update(prop, 0, "rna_World_draw_mist_update");
- prop= RNA_def_property(srna, "depth", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "depth", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "mistdist");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 10000, 10, 2);
RNA_def_property_ui_text(prop, "Depth", "Distance over which the mist effect fades in");
RNA_def_property_update(prop, 0, "rna_World_draw_mist_update");
- prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "height", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "misthi");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Height", "Control how much mist density decreases with height");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "falloff", PROP_ENUM, PROP_NONE);
+ prop = RNA_def_property(srna, "falloff", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mistype");
RNA_def_property_enum_items(prop, falloff_items);
RNA_def_property_ui_text(prop, "Falloff", "Type of transition used to fade mist");
@@ -435,35 +435,35 @@ static void rna_def_world_stars(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "WorldStarsSettings", NULL);
+ srna = RNA_def_struct(brna, "WorldStarsSettings", NULL);
RNA_def_struct_sdna(srna, "World");
RNA_def_struct_nested(brna, srna, "World");
RNA_def_struct_ui_text(srna, "World Stars", "Stars settings for a World data-block");
- prop= RNA_def_property(srna, "use_stars", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_stars", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_STARS);
RNA_def_property_ui_text(prop, "Use Stars", "Enable starfield generation");
RNA_def_property_update(prop, 0, "rna_World_stars_update");
- prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "starsize");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Size", "Average screen dimension of stars");
RNA_def_property_update(prop, 0, "rna_World_draw_update"); /* use normal update since this isnt visualized */
- prop= RNA_def_property(srna, "distance_min", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "distance_min", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "starmindist");
RNA_def_property_range(prop, 0, 1000);
RNA_def_property_ui_text(prop, "Minimum Distance", "Minimum distance to the camera for stars");
RNA_def_property_update(prop, 0, "rna_World_stars_update");
- prop= RNA_def_property(srna, "average_separation", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "average_separation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "stardist");
RNA_def_property_range(prop, 2, 1000);
RNA_def_property_ui_text(prop, "Average Separation", "Average distance between any two stars");
RNA_def_property_update(prop, 0, "rna_World_stars_update");
- prop= RNA_def_property(srna, "color_random", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "color_random", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "starcolnoise");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Color Randomization", "Randomize star colors");
@@ -475,18 +475,18 @@ void RNA_def_world(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
-/*
+#if 0
static EnumPropertyItem physics_engine_items[] = {
{WOPHY_NONE, "NONE", 0, "None", ""},
- //{WOPHY_ENJI, "ENJI", 0, "Enji", ""},
- //{WOPHY_SUMO, "SUMO", 0, "Sumo (Deprecated)", ""},
- //{WOPHY_DYNAMO, "DYNAMO", 0, "Dynamo", ""},
- //{WOPHY_ODE, "ODE", 0, "ODE", ""},
+ /*{WOPHY_ENJI, "ENJI", 0, "Enji", ""}, */
+ /*{WOPHY_SUMO, "SUMO", 0, "Sumo (Deprecated)", ""}, */
+ /*{WOPHY_DYNAMO, "DYNAMO", 0, "Dynamo", ""}, */
+ /*{WOPHY_ODE, "ODE", 0, "ODE", ""}, */
{WOPHY_BULLET, "BULLET", 0, "Bullet", ""},
{0, NULL, 0, NULL, NULL}};
-*/
+#endif
- srna= RNA_def_struct(brna, "World", "ID");
+ srna = RNA_def_struct(brna, "World", "ID");
RNA_def_struct_ui_text(srna, "World", "World datablock describing the environment and ambient lighting of a scene");
RNA_def_struct_ui_icon(srna, ICON_WORLD_DATA);
@@ -495,7 +495,7 @@ void RNA_def_world(BlenderRNA *brna)
"rna_World_active_texture_set", NULL, "WorldTextureSlot", "WorldTextureSlots", "rna_World_update");
/* colors */
- prop= RNA_def_property(srna, "horizon_color", PROP_FLOAT, PROP_COLOR);
+ prop = RNA_def_property(srna, "horizon_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "horr");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Horizon Color", "Color at the horizon");
@@ -504,72 +504,72 @@ void RNA_def_world(BlenderRNA *brna)
RNA_def_property_update(prop, NC_WORLD|ND_WORLD_DRAW, "rna_World_update");
- prop= RNA_def_property(srna, "zenith_color", PROP_FLOAT, PROP_COLOR);
+ prop = RNA_def_property(srna, "zenith_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "zenr");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Zenith Color", "Color at the zenith");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "ambient_color", PROP_FLOAT, PROP_COLOR);
+ prop = RNA_def_property(srna, "ambient_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "ambr");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Ambient Color", "Ambient color of the world");
RNA_def_property_update(prop, 0, "rna_World_update");
/* exp, range */
- prop= RNA_def_property(srna, "exposure", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "exposure", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "exp");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Exposure", "Amount of exponential color correction for light");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "color_range", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "color_range", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "range");
RNA_def_property_range(prop, 0.2, 5.0);
RNA_def_property_ui_text(prop, "Range", "The color range that will be mapped to 0-1");
RNA_def_property_update(prop, 0, "rna_World_update");
/* sky type */
- prop= RNA_def_property(srna, "use_sky_blend", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_sky_blend", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "skytype", WO_SKYBLEND);
RNA_def_property_ui_text(prop, "Blend Sky", "Render background with natural progression from horizon to zenith");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "use_sky_paper", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_sky_paper", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "skytype", WO_SKYPAPER);
RNA_def_property_ui_text(prop, "Paper Sky", "Flatten blend or texture coordinates");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop= RNA_def_property(srna, "use_sky_real", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_sky_real", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "skytype", WO_SKYREAL);
RNA_def_property_ui_text(prop, "Real Sky", "Render background with a real horizon, relative to the camera angle");
RNA_def_property_update(prop, 0, "rna_World_update");
/* nested structs */
- prop= RNA_def_property(srna, "light_settings", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "light_settings", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "WorldLighting");
RNA_def_property_pointer_funcs(prop, "rna_World_lighting_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Lighting", "World lighting settings");
- prop= RNA_def_property(srna, "mist_settings", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "mist_settings", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "WorldMistSettings");
RNA_def_property_pointer_funcs(prop, "rna_World_mist_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Mist", "World mist settings");
- prop= RNA_def_property(srna, "star_settings", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "star_settings", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "WorldStarsSettings");
RNA_def_property_pointer_funcs(prop, "rna_World_stars_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Stars", "World stars settings");
/* nodes */
- prop= RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
+ prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
RNA_def_property_ui_text(prop, "Node Tree", "Node tree for node based worlds");
- prop= RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "use_nodes", 1);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Use Nodes", "Use shader nodes to render the world");