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
path: root/source
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2019-04-23 13:27:27 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2019-04-23 13:45:04 +0300
commit7625fad9e915195885a015fbcc43b252de8a67eb (patch)
tree648cb8cde050a3169aecf040e351de6befe7416b /source
parentae054af14f995ef84e6368c25b49a306993b701b (diff)
B-Bones: remove hard limits on curve/roll/scale/ease properties.
I don't see any reasons why soft limits wouldn't be enough here.
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesrna/intern/rna_armature.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index 06e99efbb6a..6c31d256cb7 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -606,14 +606,14 @@ void rna_def_bone_curved_common(StructRNA *srna, bool is_posebone)
/* Roll In/Out */
prop = RNA_def_property(srna, "bbone_rollin", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "roll1");
- RNA_def_property_range(prop, -M_PI * 2.0, M_PI * 2.0);
+ RNA_def_property_ui_range(prop, -M_PI * 2, M_PI * 2, 10, 2);
RNA_def_property_ui_text(
prop, "Roll In", "Roll offset for the start of the B-Bone, adjusts twist");
RNA_DEF_CURVEBONE_UPDATE(prop, is_posebone);
prop = RNA_def_property(srna, "bbone_rollout", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "roll2");
- RNA_def_property_range(prop, -M_PI * 2.0, M_PI * 2.0);
+ RNA_def_property_ui_range(prop, -M_PI * 2, M_PI * 2, 10, 2);
RNA_def_property_ui_text(
prop, "Roll Out", "Roll offset for the end of the B-Bone, adjusts twist");
RNA_DEF_CURVEBONE_UPDATE(prop, is_posebone);
@@ -629,28 +629,28 @@ void rna_def_bone_curved_common(StructRNA *srna, bool is_posebone)
/* Curve X/Y Offsets */
prop = RNA_def_property(srna, "bbone_curveinx", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "curve_in_x");
- RNA_def_property_range(prop, -5.0f, 5.0f);
+ RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, RNA_TRANSLATION_PREC_DEFAULT);
RNA_def_property_ui_text(
prop, "In X", "X-axis handle offset for start of the B-Bone's curve, adjusts curvature");
RNA_DEF_CURVEBONE_UPDATE(prop, is_posebone);
prop = RNA_def_property(srna, "bbone_curveiny", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "curve_in_y");
- RNA_def_property_range(prop, -5.0f, 5.0f);
+ RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, RNA_TRANSLATION_PREC_DEFAULT);
RNA_def_property_ui_text(
prop, "In Y", "Y-axis handle offset for start of the B-Bone's curve, adjusts curvature");
RNA_DEF_CURVEBONE_UPDATE(prop, is_posebone);
prop = RNA_def_property(srna, "bbone_curveoutx", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "curve_out_x");
- RNA_def_property_range(prop, -5.0f, 5.0f);
+ RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, RNA_TRANSLATION_PREC_DEFAULT);
RNA_def_property_ui_text(
prop, "Out X", "X-axis handle offset for end of the B-Bone's curve, adjusts curvature");
RNA_DEF_CURVEBONE_UPDATE(prop, is_posebone);
prop = RNA_def_property(srna, "bbone_curveouty", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "curve_out_y");
- RNA_def_property_range(prop, -5.0f, 5.0f);
+ RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, RNA_TRANSLATION_PREC_DEFAULT);
RNA_def_property_ui_text(
prop, "Out Y", "Y-axis handle offset for end of the B-Bone's curve, adjusts curvature");
RNA_DEF_CURVEBONE_UPDATE(prop, is_posebone);
@@ -658,14 +658,14 @@ void rna_def_bone_curved_common(StructRNA *srna, bool is_posebone)
/* Ease In/Out */
prop = RNA_def_property(srna, "bbone_easein", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ease1");
- RNA_def_property_range(prop, -5.0f, 5.0f);
+ RNA_def_property_ui_range(prop, -5.0f, 5.0f, 1, 3);
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_ui_text(prop, "Ease In", "Length of first Bezier Handle (for B-Bones only)");
RNA_DEF_CURVEBONE_UPDATE(prop, is_posebone);
prop = RNA_def_property(srna, "bbone_easeout", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ease2");
- RNA_def_property_range(prop, -5.0f, 5.0f);
+ RNA_def_property_ui_range(prop, -5.0f, 5.0f, 1, 3);
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_ui_text(prop, "Ease Out", "Length of second Bezier Handle (for B-Bones only)");
RNA_DEF_CURVEBONE_UPDATE(prop, is_posebone);
@@ -674,7 +674,7 @@ void rna_def_bone_curved_common(StructRNA *srna, bool is_posebone)
prop = RNA_def_property(srna, "bbone_scaleinx", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "scale_in_x");
RNA_def_property_flag(prop, PROP_PROPORTIONAL);
- RNA_def_property_range(prop, 0.0f, 5.0f);
+ RNA_def_property_ui_range(prop, 0.0f, FLT_MAX, 1, 3);
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_ui_text(prop,
"Scale In X",
@@ -685,7 +685,7 @@ void rna_def_bone_curved_common(StructRNA *srna, bool is_posebone)
prop = RNA_def_property(srna, "bbone_scaleiny", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "scale_in_y");
RNA_def_property_flag(prop, PROP_PROPORTIONAL);
- RNA_def_property_range(prop, 0.0f, 5.0f);
+ RNA_def_property_ui_range(prop, 0.0f, FLT_MAX, 1, 3);
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_ui_text(prop,
"Scale In Y",
@@ -696,7 +696,7 @@ void rna_def_bone_curved_common(StructRNA *srna, bool is_posebone)
prop = RNA_def_property(srna, "bbone_scaleoutx", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "scale_out_x");
RNA_def_property_flag(prop, PROP_PROPORTIONAL);
- RNA_def_property_range(prop, 0.0f, 5.0f);
+ RNA_def_property_ui_range(prop, 0.0f, FLT_MAX, 1, 3);
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_ui_text(prop,
"Scale Out X",
@@ -707,7 +707,7 @@ void rna_def_bone_curved_common(StructRNA *srna, bool is_posebone)
prop = RNA_def_property(srna, "bbone_scaleouty", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "scale_out_y");
RNA_def_property_flag(prop, PROP_PROPORTIONAL);
- RNA_def_property_range(prop, 0.0f, 5.0f);
+ RNA_def_property_ui_range(prop, 0.0f, FLT_MAX, 1, 3);
RNA_def_property_float_default(prop, 1.0f);
RNA_def_property_ui_text(prop,
"Scale Out Y",