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:
authorCampbell Barton <ideasman42@gmail.com>2012-05-12 15:01:29 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-12 15:01:29 +0400
commita9f6e5438443e6b35db1e22f6c595d31804af9b6 (patch)
treec196cb64ba0c687bf1ed9f568a710b7ee865b230 /source/blender/makesrna/intern/rna_meta.c
parent68e27b749ec0ebcde549cf2bc442a17f829c87ee (diff)
style cleanup: mostly whitespace in rna
Diffstat (limited to 'source/blender/makesrna/intern/rna_meta.c')
-rw-r--r--source/blender/makesrna/intern/rna_meta.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c
index eda38a43d54..c8b52b45604 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;
- return (mb->texflag & MB_AUTOSPACE)? 0: PROP_EDITABLE;
+ 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);
}
@@ -102,7 +102,7 @@ static void rna_MetaBall_update_data(Main *bmain, Scene *scene, PointerRNA *ptr)
BKE_mball_properties_copy(scene, ob);
DAG_id_tag_update(&mb->id, 0);
- WM_main_add_notifier(NC_GEOM|ND_DATA, mb);
+ WM_main_add_notifier(NC_GEOM | ND_DATA, mb);
}
}
@@ -120,7 +120,7 @@ static MetaElem *rna_MetaBall_elements_new(MetaBall *mb, int type)
/* cheating way for importers to avoid slow updates */
if (mb->id.us > 0) {
DAG_id_tag_update(&mb->id, 0);
- WM_main_add_notifier(NC_GEOM|ND_DATA, &mb->id);
+ WM_main_add_notifier(NC_GEOM | ND_DATA, &mb->id);
}
return ml;
@@ -133,7 +133,7 @@ static void rna_MetaBall_elements_remove(MetaBall *mb, ReportList *reports, Meta
found = BLI_remlink_safe(&mb->elems, ml);
if (!found) {
- BKE_reportf(reports, RPT_ERROR, "Metaball \"%s\" does not contain spline given", mb->id.name+2);
+ BKE_reportf(reports, RPT_ERROR, "Metaball \"%s\" does not contain spline given", mb->id.name + 2);
return;
}
@@ -143,7 +143,7 @@ static void rna_MetaBall_elements_remove(MetaBall *mb, ReportList *reports, Meta
/* cheating way for importers to avoid slow updates */
if (mb->id.us > 0) {
DAG_id_tag_update(&mb->id, 0);
- WM_main_add_notifier(NC_GEOM|ND_DATA, &mb->id);
+ WM_main_add_notifier(NC_GEOM | ND_DATA, &mb->id);
}
}
@@ -154,7 +154,7 @@ static void rna_MetaBall_elements_clear(MetaBall *mb)
/* cheating way for importers to avoid slow updates */
if (mb->id.us > 0) {
DAG_id_tag_update(&mb->id, 0);
- WM_main_add_notifier(NC_GEOM|ND_DATA, &mb->id);
+ WM_main_add_notifier(NC_GEOM | ND_DATA, &mb->id);
}
}
@@ -188,7 +188,7 @@ static void rna_def_metaelement(BlenderRNA *brna)
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);
@@ -254,7 +254,7 @@ static void rna_def_metaball_elements(BlenderRNA *brna, PropertyRNA *cprop)
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");
- RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
+ RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
func = RNA_def_function(srna, "clear", "rna_MetaBall_elements_clear");
RNA_def_function_ui_description(func, "Remove all elements from the metaball");
@@ -273,7 +273,8 @@ static void rna_def_metaball(BlenderRNA *brna)
{MB_UPDATE_HALFRES, "HALFRES", 0, "Half", "While editing, update metaball in half resolution"},
{MB_UPDATE_FAST, "FAST", 0, "Fast", "While editing, update metaball without polygonization"},
{MB_UPDATE_NEVER, "NEVER", 0, "Never", "While editing, don't update metaball at all"},
- {0, NULL, 0, NULL, NULL}};
+ {0, NULL, 0, NULL, NULL}
+ };
srna = RNA_def_struct(brna, "MetaBall", "ID");
RNA_def_struct_ui_text(srna, "MetaBall", "Metaball datablock to defined blobby surfaces");
@@ -333,7 +334,7 @@ static void rna_def_metaball(BlenderRNA *brna)
/* not supported yet */
#if 0
- prop= RNA_def_property(srna, "texspace_rot", PROP_FLOAT, PROP_EULER);
+ prop = RNA_def_property(srna, "texspace_rot", PROP_FLOAT, PROP_EULER);
RNA_def_property_float(prop, NULL, "rot");
RNA_def_property_ui_text(prop, "Texture Space Rotation", "Texture space rotation");
RNA_def_property_editable_func(prop, "rna_Meta_texspace_editable");