[Bf-blender-cvs] [fb565ddb681] master: Cleanup: trailing space in RNA
Campbell Barton
noreply at git.blender.org
Sat Jun 9 14:41:14 CEST 2018
Commit: fb565ddb681f39cbe47e91d11e5b728bb4314a7b
Author: Campbell Barton
Date: Sat Jun 9 14:40:09 2018 +0200
Branches: master
https://developer.blender.org/rBfb565ddb681f39cbe47e91d11e5b728bb4314a7b
Cleanup: trailing space in RNA
===================================================================
M source/blender/makesrna/RNA_types.h
M source/blender/makesrna/intern/makesrna.c
M source/blender/makesrna/intern/rna_ID.c
M source/blender/makesrna/intern/rna_access.c
M source/blender/makesrna/intern/rna_action.c
M source/blender/makesrna/intern/rna_action_api.c
M source/blender/makesrna/intern/rna_actuator.c
M source/blender/makesrna/intern/rna_animation.c
M source/blender/makesrna/intern/rna_animation_api.c
M source/blender/makesrna/intern/rna_animviz.c
M source/blender/makesrna/intern/rna_armature.c
M source/blender/makesrna/intern/rna_boid.c
M source/blender/makesrna/intern/rna_brush.c
M source/blender/makesrna/intern/rna_cloth.c
M source/blender/makesrna/intern/rna_color.c
M source/blender/makesrna/intern/rna_constraint.c
M source/blender/makesrna/intern/rna_controller.c
M source/blender/makesrna/intern/rna_curve.c
M source/blender/makesrna/intern/rna_define.c
M source/blender/makesrna/intern/rna_dynamicpaint.c
M source/blender/makesrna/intern/rna_fcurve.c
M source/blender/makesrna/intern/rna_fluidsim.c
M source/blender/makesrna/intern/rna_gpencil.c
M source/blender/makesrna/intern/rna_group.c
M source/blender/makesrna/intern/rna_image.c
M source/blender/makesrna/intern/rna_key.c
M source/blender/makesrna/intern/rna_lamp.c
M source/blender/makesrna/intern/rna_lattice.c
M source/blender/makesrna/intern/rna_main.c
M source/blender/makesrna/intern/rna_material.c
M source/blender/makesrna/intern/rna_mesh.c
M source/blender/makesrna/intern/rna_mesh_api.c
M source/blender/makesrna/intern/rna_mesh_utils.h
M source/blender/makesrna/intern/rna_meta.c
M source/blender/makesrna/intern/rna_modifier.c
M source/blender/makesrna/intern/rna_nla.c
M source/blender/makesrna/intern/rna_nodetree.c
M source/blender/makesrna/intern/rna_object.c
M source/blender/makesrna/intern/rna_object_api.c
M source/blender/makesrna/intern/rna_object_force.c
M source/blender/makesrna/intern/rna_particle.c
M source/blender/makesrna/intern/rna_pose.c
M source/blender/makesrna/intern/rna_render.c
M source/blender/makesrna/intern/rna_rigidbody.c
M source/blender/makesrna/intern/rna_rna.c
M source/blender/makesrna/intern/rna_scene.c
M source/blender/makesrna/intern/rna_scene_api.c
M source/blender/makesrna/intern/rna_screen.c
M source/blender/makesrna/intern/rna_sculpt_paint.c
M source/blender/makesrna/intern/rna_sensor.c
M source/blender/makesrna/intern/rna_sequencer.c
M source/blender/makesrna/intern/rna_sequencer_api.c
M source/blender/makesrna/intern/rna_smoke.c
M source/blender/makesrna/intern/rna_test.c
M source/blender/makesrna/intern/rna_text.c
M source/blender/makesrna/intern/rna_texture.c
M source/blender/makesrna/intern/rna_texture_api.c
M source/blender/makesrna/intern/rna_ui.c
M source/blender/makesrna/intern/rna_ui_api.c
M source/blender/makesrna/intern/rna_userdef.c
M source/blender/makesrna/intern/rna_vfont.c
M source/blender/makesrna/intern/rna_wm.c
M source/blender/makesrna/intern/rna_wm_api.c
M source/blender/makesrna/intern/rna_world.c
M source/blender/makesrna/rna_cleanup/rna_cleaner.py
M source/blender/makesrna/rna_cleanup/rna_cleaner_merge.py
===================================================================
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h
index 705d3914a52..912ea0084d7 100644
--- a/source/blender/makesrna/RNA_types.h
+++ b/source/blender/makesrna/RNA_types.h
@@ -492,7 +492,7 @@ typedef struct ExtensionRNA {
StructRNA *srna;
StructCallbackFunc call;
StructFreeFunc free;
-
+
} ExtensionRNA;
#ifdef __cplusplus
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index e197a8a3a4d..85b5e1f7186 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -290,7 +290,7 @@ static void rna_sortlist(ListBase *listbase, int (*cmp)(const void *, const void
Link *link;
void **array;
int a, size;
-
+
if (listbase->first == listbase->last)
return;
@@ -497,7 +497,7 @@ static int rna_enum_bitmask(PropertyRNA *prop)
if (eprop->item[a].identifier[0])
mask |= eprop->item[a].value;
}
-
+
return mask;
}
@@ -1416,7 +1416,7 @@ static void rna_set_raw_property(PropertyDefRNA *dp, PropertyRNA *prop)
return;
if (!dp->dnatype || !dp->dnaname || !dp->dnastructname)
return;
-
+
if (STREQ(dp->dnatype, "char")) {
prop->rawtype = PROP_RAW_CHAR;
prop->flag_internal |= PROP_INTERN_RAW_ACCESS;
@@ -1677,7 +1677,7 @@ static void rna_def_property_funcs_header(FILE *f, StructRNA *srna, PropertyDefR
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);
@@ -1733,7 +1733,7 @@ static void rna_def_property_funcs_header_cpp(FILE *f, StructRNA *srna, Property
if (prop->flag & PROP_IDPROPERTY || prop->flag_internal & PROP_INTERN_BUILTIN) {
return;
}
-
+
/* disabled for now to avoid msvc compiler error due to large file size */
#if 0
if (prop->name && prop->description && prop->description[0] != '\0')
@@ -2259,7 +2259,7 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
fprintf(f, "\n{\n");
/* variable definitions */
-
+
if (func->flag & FUNC_USE_SELF_ID) {
fprintf(f, "\tstruct ID *_selfid;\n");
}
@@ -2301,7 +2301,7 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
/* for dynamic parameters we pass an additional int for the length of the parameter */
if (flag & PROP_DYNAMIC)
fprintf(f, "\tint %s%s_len;\n", pout ? "*" : "", dparm->prop->identifier);
-
+
fprintf(f, "\t%s%s %s%s;\n", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop),
ptrstr, dparm->prop->identifier);
}
@@ -2317,7 +2317,7 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA
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->dnafromprop) fprintf(f, "\t_self = (struct %s *)_ptr->data;\n", dsrna->dnafromname);
else if (dsrna->dnaname) fprintf(f, "\t_self = (struct %s *)_ptr->data;\n", dsrna->dnaname);
@@ -2874,7 +2874,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
{
char *strnest = (char *)"", *errnest = (char *)"";
int len, freenest = 0;
-
+
if (nest != NULL) {
len = strlen(nest);
@@ -3404,7 +3404,7 @@ static void rna_generate(BlenderRNA *brna, FILE *f, const char *filename, const
StructDefRNA *ds;
PropertyDefRNA *dp;
FunctionDefRNA *dfunc;
-
+
fprintf(f,
"\n"
"/* Automatically generated struct definitions for the Data API.\n"
@@ -3900,7 +3900,7 @@ static void rna_generate_header_cpp(BlenderRNA *UNUSED(brna), FILE *f)
fprintf(f,
"/* Automatically generated classes for the Data API.\n"
" * Do not edit manually, changes will be overwritten. */\n\n");
-
+
fprintf(f, "#include \"RNA_blender.h\"\n");
fprintf(f, "#include \"RNA_types.h\"\n");
fprintf(f, "#include \"RNA_access.h\"\n");
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index 0520e639adf..d3331e6ca52 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -127,13 +127,13 @@ void rna_ID_name_set(PointerRNA *ptr, const char *value)
static int rna_ID_name_editable(PointerRNA *ptr, const char **UNUSED(r_info))
{
ID *id = (ID *)ptr->data;
-
+
if (GS(id->name) == ID_VF) {
VFont *vfont = (VFont *)id;
if (BKE_vfont_is_builtin(vfont))
return false;
}
-
+
return PROP_EDITABLE;
}
@@ -300,7 +300,7 @@ static ID *rna_ID_copy(ID *id, Main *bmain)
if (newid) id_us_min(newid);
return newid;
}
-
+
return NULL;
}
@@ -775,7 +775,7 @@ static void rna_def_ID_properties(BlenderRNA *brna)
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);
RNA_def_property_flag(prop, PROP_EXPORT | PROP_IDPROPERTY);
@@ -861,7 +861,7 @@ static void rna_def_ID_materials(BlenderRNA *brna)
StructRNA *srna;
FunctionRNA *func;
PropertyRNA *parm;
-
+
/* for mesh/mball/curve materials */
srna = RNA_def_struct(brna, "IDMaterials", NULL);
RNA_def_struct_sdna(srna, "ID");
@@ -1102,7 +1102,7 @@ static void rna_def_library(BlenderRNA *brna)
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);
RNA_def_property_struct_type(prop, "Library");
RNA_def_property_ui_text(prop, "Parent", "");
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index c0871baca45..daa01f58e12 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -98,9 +98,9 @@ void RNA_init(void)
void RNA_exit(void)
{
StructRNA *srna;
-
+
RNA_property_update_cache_free();
-
+
for (srna = BLENDER_RNA.structs.first; srna; srna = srna->cont.next) {
if (srna->cont.prophash) {
BLI_ghash_free(srna->cont.prophash, NULL, NULL);
@@ -128,7 +128,7 @@ void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr)
PointerRNA tmp = {{NULL}};
tmp.data = id;
idtype = rna_ID_refine(&tmp);
-
+
while (idtype->refine) {
type = idtype->refine(&tmp);
@@ -138,7 +138,7 @@ void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr)
idtype = type;
}
}
-
+
r_ptr->id.data = id;
r_ptr->type = idtype;
r_ptr->data = id;
@@ -280,7 +280,7 @@ IDProperty *RNA_struct_idprops(PointerRNA *ptr, bool create)
if (type && type->idproperties) {
return type->idproperties(ptr, create);
}
-
+
return NULL;
}
@@ -371,7 +371,7 @@ static bool rna_idproperty_verify_valid(PointerRNA *ptr, PropertyRNA *prop, IDPr
* description and otherwise removes it. this is to ensure that
* 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) {
case IDP_IDPARRAY:
if (prop->type != PROP_COLLECTION)
@@ -670,7 +670,7 @@ bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
for (base = type; base; base = base->base)
if (base == srna)
return true;
-
+
return false;
}
@@ -695,7 +695,7 @@ PropertyRNA *RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
if (RNA_property_collection_lookup_string(ptr, iterprop, identifier, &propptr))
return propptr.data;
}
-
+
return NULL;
}
@@ -1152,7 +1152,7 @@ void RNA_property_int_ui_range(PointerRNA *ptr, PropertyRNA *prop, int *softmin,
{
IntPropertyRNA *iprop = (IntPropertyRNA *)rna_ensure_property(prop);
int hardmin, hardmax;
-
+
if (prop->magic != RNA_MAGIC) {
/* attempt to get the local ID values */
IDProperty *idp_ui = rna_idproperty_ui(prop);
@@ -1665,7 +1665,7 @@ bool RNA_property_enum_identifier(bContext *C, PointerRNA *ptr, PropertyRNA *pro
{
const EnumPropertyItem *item = NULL;
bool free;
-
+
RNA_property_enum_items(C, ptr, prop, &item, NULL, &free);
if (item) {
bool result;
@@ -1682,7 +1682,7 @@ bool RNA_property_enum_name(bContext *C, PointerRNA *ptr, PropertyRNA *prop, con
{
const EnumPropertyItem *item = NULL;
bool free;
-
+
RNA_property_enum_items(C, ptr, prop, &item, NULL, &free);
if (item) {
bool result;
@@ -1690,7 +1690,7 @@ bool RNA_property_enum_name(bContext *C, PointerRNA *ptr, PropertyRNA *prop, con
if (free) {
MEM_freeN((void *)item);
}
-
+
return result;
}
return false;
@@ -1895,7 +1895,7 @@ bool RNA_property_animateable(PointerRNA *ptr, PropertyRNA *prop)
/* check that base ID-block can support animation data */
if (!id_can_have_animdata(ptr->id.data))
return false;
-
+
prop = rna_ensure_property(prop);
if (!(prop->flag & PROP_ANIMATABLE))
@@ -1971,7 +1971,7 @@ static void rna_property_update(bContext *C, Main *bmain, Scene *scene, PointerR
if (prop->noteflag)
WM_main_add_notifier(prop->noteflag, ptr->id.data);
}
-
+
if (!is_rna || (prop->flag & PROP_IDPROPERTY)) {
/* WARNING! This is so property drivers update the display!
* not especially nice */
@@ -2025,7 +2025,7 @@ void RNA_property_update_main(Main *bmain, Scene *scene, PointerRNA *ptr, Proper
/* cache element */
typedef struct tRnaUpdateCacheElem {
struct tRnaUpdateCacheElem *next, *prev;
-
+
PointerRNA ptr; /* L1 key - id as primary, data secondary/ignored? */
ListBase L2Funcs; /* L2 functions (LinkData<RnaUpdateFuncRef>) */
} tRnaUpdateCacheElem;
@@ -2041,18 +2041,18 @@ void RNA_property_update_cache_add(PointerRNA *ptr, PropertyRNA *prop)
tRnaUpdateCacheElem *uce = NULL;
UpdateFunc fn = NULL;
LinkData *ld;
-
+
/* sanity check */
if (NULL == ptr)
return;
-
+
prop = rna_ensure_property
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list