[Bf-blender-cvs] [f480973] BendyBones: Bendy Bones: RNA Cleanup - Naming, tooltips, ranges
Joshua Leung
noreply at git.blender.org
Tue May 17 16:40:52 CEST 2016
Commit: f480973654e9198088831a536be1b89ba376720d
Author: Joshua Leung
Date: Mon May 16 17:16:50 2016 +1200
Branches: BendyBones
https://developer.blender.org/rBf480973654e9198088831a536be1b89ba376720d
Bendy Bones: RNA Cleanup - Naming, tooltips, ranges
* Improved naming of BBone properties to be less clunky
* Rewrote all the tooltips to be more descriptive about what they do
(and hopefully, to give an idea of how they can be used)
* Improved the ranges on all the properties
- Curve X/Y now has a range of +/- 5 (vs +/- 2 before)
- Scale In/Out now has a range of 0-5 (vs 0-2 before)
The extra flexibility doesn't seem to lead to any ill effects; instead,
at least in my tests so far, they instead give more leeway for creative
posing.
* Set defaults for the scale properties (1.0)
===================================================================
M source/blender/makesrna/intern/rna_armature.c
===================================================================
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index ae16851..842e220 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -494,53 +494,65 @@ void rna_def_bone_curved_common(StructRNA *srna, bool is_posebone)
} (void)0;
PropertyRNA *prop;
-
+
+ /* 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, M_PI * 2);
- RNA_def_property_ui_text(prop, "B-Bone Roll In", "Extra roll in (for B-Bones only)");
+ RNA_def_property_range(prop, -M_PI * 2.0f, M_PI * 2.0f);
+ 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, M_PI * 2);
- RNA_def_property_ui_text(prop, "B-Bone Roll Out", "Extra roll out (for B-Bones only)");
+ RNA_def_property_range(prop, -M_PI * 2.0f, M_PI * 2.0f);
+ 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);
-
+
+ if (is_posebone == false) {
+ prop = RNA_def_property(srna, "use_endroll_as_inroll", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Inherit End Roll", "Use Roll Out of parent bone as Roll In of its children");
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_ADD_PARENT_END_ROLL);
+ RNA_def_property_update(prop, 0, "rna_Armature_update_data");
+ }
+
+ /* Curve X/Y Offsets */
prop = RNA_def_property(srna, "bbone_curveinx", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "curveInX");
- RNA_def_property_range(prop, -2.0, 2.0);
- RNA_def_property_ui_text(prop, "B-Bone curve In X pos", "Position curve In X");
+ RNA_def_property_range(prop, -5.0f, 5.0f);
+ 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, "curveInY");
- RNA_def_property_range(prop, -2.0, 2.0);
- RNA_def_property_ui_text(prop, "B-Bone curve In Y pos", "Position curve In Y");
+ RNA_def_property_range(prop, -5.0f, 5.0f);
+ 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, "curveOutX");
- RNA_def_property_range(prop, -2.0, 2.0);
- RNA_def_property_ui_text(prop, "B-Bone curve Out X pos", "Position curve Out X");
+ RNA_def_property_range(prop, -5.0f, 5.0f);
+ 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, "curveOutY");
- RNA_def_property_range(prop, -2.0, 2.0);
- RNA_def_property_ui_text(prop, "B-Bone curve Out Y pos", "Position curve Out Y");
+ RNA_def_property_range(prop, -5.0f, 5.0f);
+ 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);
-
+
+ /* Scale In/Out */
prop = RNA_def_property(srna, "bbone_scalein", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "scaleIn");
- RNA_def_property_range(prop, 0.0, 3.0);
- RNA_def_property_ui_text(prop, "B-Bone scale In", "B-Bone scale In");
+ RNA_def_property_range(prop, 0.0f, 5.0f);
+ RNA_def_property_float_default(prop, 1.0f);
+ RNA_def_property_ui_text(prop, "Scale In", "Scale factor for start of the B-Bone, adjusts thickness (for tapering effects)");
RNA_DEF_CURVEBONE_UPDATE(prop, is_posebone);
-
+
prop = RNA_def_property(srna, "bbone_scaleout", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "scaleOut");
- RNA_def_property_range(prop, 0.0, 3.0);
- RNA_def_property_ui_text(prop, "B-Bone scale Out", "B-Bone scale Out");
+ RNA_def_property_range(prop, 0.0f, 5.0f);
+ RNA_def_property_float_default(prop, 1.0f);
+ RNA_def_property_ui_text(prop, "Scale Out", "Scale factor for end of the B-Bone, adjusts thickness (for tapering effects)");
RNA_DEF_CURVEBONE_UPDATE(prop, is_posebone);
#undef RNA_DEF_CURVEBONE_UPDATE
@@ -605,11 +617,6 @@ static void rna_def_bone_common(StructRNA *srna, int editbone)
RNA_def_property_ui_text(prop, "Relative Parenting", "Object children will use relative transform, like deform");
RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_RELATIVE_PARENTING);
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
-
- prop = RNA_def_property(srna, "use_endroll_as_inroll", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_ui_text(prop, "Inherit End Roll", "Use endroll of parent as inroll of its children");
- RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_ADD_PARENT_END_ROLL);
- RNA_def_property_update(prop, 0, "rna_Armature_update_data");
prop = RNA_def_property(srna, "show_wire", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_DRAWWIRE);
More information about the Bf-blender-cvs
mailing list