Style cleanup (mostly line length, also no final point in tips...).

This commit is contained in:
Bastien Montagne
2012-04-15 13:41:07 +00:00
parent 6627fe3f75
commit 6fed4fdd5e
10 changed files with 28 additions and 16 deletions

View File

@@ -695,15 +695,18 @@ static void rna_clamp_value_range(FILE *f, PropertyRNA *prop)
if (prop->type == PROP_FLOAT) {
FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
if (fprop->range) {
fprintf(f, " float prop_clamp_min = -FLT_MAX, prop_clamp_max = FLT_MAX, prop_soft_min, prop_soft_max;\n");
fprintf(f, " %s(ptr, &prop_clamp_min, &prop_clamp_max, &prop_soft_min, &prop_soft_max);\n", rna_function_string(fprop->range));
fprintf(f,
" float prop_clamp_min = -FLT_MAX, prop_clamp_max = FLT_MAX, prop_soft_min, prop_soft_max;\n");
fprintf(f, " %s(ptr, &prop_clamp_min, &prop_clamp_max, &prop_soft_min, &prop_soft_max);\n",
rna_function_string(fprop->range));
}
}
else if (prop->type == PROP_INT) {
IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
if (iprop->range) {
fprintf(f, " int prop_clamp_min = INT_MIN, prop_clamp_max = INT_MAX, prop_soft_min, prop_soft_max;\n");
fprintf(f, " %s(ptr, &prop_clamp_min, &prop_clamp_max, &prop_soft_min, &prop_soft_max);\n", rna_function_string(iprop->range));
fprintf(f, " %s(ptr, &prop_clamp_min, &prop_clamp_max, &prop_soft_min, &prop_soft_max);\n",
rna_function_string(iprop->range));
}
}
}

View File

@@ -4532,7 +4532,7 @@ char *RNA_pointer_as_string_keywords_ex(bContext *C, PointerRNA *ptr, PointerRNA
PropertyRNA *prop;
DynStr *dynstr= BLI_dynstr_new();
DynStr *dynstr = BLI_dynstr_new();
char *cstring, *buf;
int first_iter = TRUE, ok = TRUE;
int flag;
@@ -4581,10 +4581,10 @@ char *RNA_pointer_as_string_keywords_ex(bContext *C, PointerRNA *ptr, PointerRNA
if (all_args == FALSE && ptr_default) {
/* not verbose, so only add in attributes that use non-default values
* slow but good for tooltips */
prop_default= RNA_struct_find_property(ptr_default, arg_name);
prop_default = RNA_struct_find_property(ptr_default, arg_name);
if (prop_default) {
buf_default= RNA_property_as_string(C, ptr_default, prop_default);
buf_default = RNA_property_as_string(C, ptr_default, prop_default);
if (strcmp(buf, buf_default) == 0)
ok = FALSE; /* values match, don't bother printing */

View File

@@ -217,7 +217,8 @@ static PointerRNA rna_BoidSettings_active_boid_state_get(PointerRNA *ptr)
}
return rna_pointer_inherit_refine(ptr, &RNA_BoidState, NULL);
}
static void rna_BoidSettings_active_boid_state_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
static void rna_BoidSettings_active_boid_state_index_range(PointerRNA *ptr, int *min, int *max,
int *softmin, int *softmax)
{
BoidSettings *boids = (BoidSettings*)ptr->data;
*min = 0;

View File

@@ -557,7 +557,8 @@ static void rna_FModifierLimits_maxy_range(PointerRNA *ptr, float *min, float *m
}
static void rna_FModifierStepped_start_frame_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
static void rna_FModifierStepped_start_frame_range(PointerRNA *ptr, float *min, float *max,
float *softmin, float *softmax)
{
FModifier *fcm = (FModifier*)ptr->data;
FMod_Stepped *data = fcm->data;
@@ -566,7 +567,8 @@ static void rna_FModifierStepped_start_frame_range(PointerRNA *ptr, float *min,
*max = (data->flag & FCM_STEPPED_NO_AFTER)? data->end_frame : MAXFRAMEF;
}
static void rna_FModifierStepped_end_frame_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
static void rna_FModifierStepped_end_frame_range(PointerRNA *ptr, float *min, float *max,
float *softmin, float *softmax)
{
FModifier *fcm = (FModifier*)ptr->data;
FMod_Stepped *data = fcm->data;

View File

@@ -423,7 +423,9 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
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, "Remove air bubbles", "Removes the air gap between fluid surface and obstacles. WARNING: Can result in a dissolving surface in other areas.");
RNA_def_property_ui_text(prop, "Remove air bubbles",
"Removes the air gap between fluid surface and obstacles - WARNING: Can result "
"in a dissolving surface in other areas");
/* particles */

View File

@@ -685,7 +685,8 @@ static void rna_NodeTree_node_clear(bNodeTree *ntree)
WM_main_add_notifier(NC_NODE|NA_EDITED, ntree);
}
static bNodeLink *rna_NodeTree_link_new(bNodeTree *ntree, ReportList *reports, bNodeSocket *fromsock, bNodeSocket *tosock)
static bNodeLink *rna_NodeTree_link_new(bNodeTree *ntree, ReportList *reports,
bNodeSocket *fromsock, bNodeSocket *tosock)
{
bNodeLink *ret;
bNode *fromnode = NULL, *tonode = NULL;

View File

@@ -644,7 +644,8 @@ static void rna_Object_active_material_set(PointerRNA *ptr, PointerRNA value)
assign_material(ob, value.data, ob->actcol);
}
static void rna_Object_active_particle_system_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
static void rna_Object_active_particle_system_index_range(PointerRNA *ptr, int *min, int *max,
int *softmin, int *softmax)
{
Object *ob = (Object*)ptr->id.data;
*min = 0;

View File

@@ -525,7 +525,8 @@ static PointerRNA rna_ParticleSystem_active_particle_target_get(PointerRNA *ptr)
}
return rna_pointer_inherit_refine(ptr, &RNA_ParticleTarget, NULL);
}
static void rna_ParticleSystem_active_particle_target_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
static void rna_ParticleSystem_active_particle_target_index_range(PointerRNA *ptr, int *min, int *max,
int *softmin, int *softmax)
{
ParticleSystem *psys = (ParticleSystem*)ptr->data;
*min = 0;
@@ -1765,7 +1766,8 @@ static void rna_def_particle_settings(BlenderRNA *brna)
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, "Orientation axis", "Particle orientation axis (does not affect Explode modifier's results)");
RNA_def_property_ui_text(prop, "Orientation axis",
"Particle orientation axis (does not affect Explode modifier's results)");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop = RNA_def_property(srna, "angular_velocity_mode", PROP_ENUM, PROP_NONE);

View File

@@ -356,7 +356,7 @@ static void rna_def_render_engine(BlenderRNA *brna)
prop = RNA_def_property(srna, "is_preview", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", RE_ENGINE_PREVIEW);
prop= RNA_def_property(srna, "camera_override", PROP_POINTER, PROP_NONE);
prop = RNA_def_property(srna, "camera_override", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "camera_override");
RNA_def_property_struct_type(prop, "Object");

View File

@@ -2669,7 +2669,7 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
prop = RNA_def_property(srna, "fcurve_unselected_alpha", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "fcu_inactive_alpha");
RNA_def_property_range(prop, 0.001f, 1.0f);
RNA_def_property_ui_text(prop, "Unselected F-Curve Visibility",
RNA_def_property_ui_text(prop, "Unselected F-Curve Visibility",
"Amount that unselected F-Curves stand out from the background (Graph Editor)");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);