[Bf-blender-cvs] [bec396f] fracture_modifier: removed unnecessary conversion from radians to degrees (internally) and using degrees just in the UI
Martin Felke
noreply at git.blender.org
Thu Oct 9 16:50:32 CEST 2014
Commit: bec396fc961a40e378c38878c1920970cf587c31
Author: Martin Felke
Date: Thu Oct 9 16:24:55 2014 +0200
Branches: fracture_modifier
https://developer.blender.org/rBbec396fc961a40e378c38878c1920970cf587c31
removed unnecessary conversion from radians to degrees (internally) and using degrees just in the UI
===================================================================
M source/blender/blenkernel/intern/rigidbody.c
M source/blender/makesrna/intern/rna_modifier.c
===================================================================
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index e046a56..3d84036 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -98,8 +98,6 @@ static void calc_dist_angle(RigidBodyShardCon *con, float *dist, float *angle)
invert_qt(q1);
mul_qt_qtqt(qdiff, q1, q2);
quat_to_axis_angle(axis, angle, qdiff);
-
- *angle = RAD2DEGF(*angle);
}
void BKE_rigidbody_start_dist_angle(RigidBodyShardCon *con)
@@ -2097,7 +2095,7 @@ static int rigidbody_group_count_items(const ListBase *group, int *r_num_objects
}
}
if (found_modifiers == false) {
- *r_num_objects++;
+ (*r_num_objects)++;
}
num_gobjects++;
}
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index a8060c8..8fd87d6 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -4073,9 +4073,9 @@ static void rna_def_modifier_fracture(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Breaking Percentage", "Percentage of broken constraints per island which leads to breaking of all others");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
- prop = RNA_def_property(srna, "breaking_angle", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "breaking_angle", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "breaking_angle");
- RNA_def_property_range(prop, 0, 360);
+ RNA_def_property_range(prop, 0, DEG2RADF(360.0));
RNA_def_property_float_funcs(prop, NULL, "rna_RigidBodyModifier_breaking_angle_set", NULL);
RNA_def_property_ui_text(prop, "Breaking Angle", "Angle in degrees above which constraint should break");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
More information about the Bf-blender-cvs
mailing list