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:
authorAlexander Gavrilov <angavrilov@gmail.com>2019-04-20 18:06:31 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2019-04-23 13:45:03 +0300
commit624e93bbef8a8a34be822c1a98df131439c32788 (patch)
tree592fce70ac6a810c6ee4ab9c0c3ce87ebedc14cf /source/blender/makesrna/intern/rna_armature.c
parentc043ab1cf3bce77248a8d7dfa42b2e9f8f9611aa (diff)
B-Bones: split the Scale In/Out properties into X and Y values.
As far as I can tell, there is no technical reason why the B-Bone segment thickness scaling can't be separated into two axes. The only downside is the increase in complexity of the B-Bone settings, but this is inevitable due to the increase in flexibility. Updating the file is somewhat complicated though, because F-Curves and drivers have to be duplicated and updated to the new names. Reviewers: campbellbarton Subscribers: icappiello, jpbouza Differential Revision: https://developer.blender.org/D4716
Diffstat (limited to 'source/blender/makesrna/intern/rna_armature.c')
-rw-r--r--source/blender/makesrna/intern/rna_armature.c48
1 files changed, 36 insertions, 12 deletions
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index d32e814f7f8..c397bb51713 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -671,24 +671,48 @@ void rna_def_bone_curved_common(StructRNA *srna, bool is_posebone)
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");
+ 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_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_property_ui_text(prop,
+ "Scale In X",
+ "X-axis 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");
+ 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_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_property_ui_text(prop,
+ "Scale In Y",
+ "Y-axis 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_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_float_default(prop, 1.0f);
+ RNA_def_property_ui_text(prop,
+ "Scale Out X",
+ "X-axis scale factor for end of the B-Bone, "
+ "adjusts thickness (for tapering effects)");
+ RNA_DEF_CURVEBONE_UPDATE(prop, 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_float_default(prop, 1.0f);
+ RNA_def_property_ui_text(prop,
+ "Scale Out Y",
+ "Y-axis 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