Patch [#24808] B-Bone display size

Submitted by Dan Eicher (dna)

Adds the ability to resize b-bones (ctrl+alt+S) using the python api

Bone.bbone_x
Bone.bbone_z
This commit is contained in:
Joshua Leung
2011-01-12 01:36:12 +00:00
parent 610a759ecc
commit bbdf47aa0b
2 changed files with 14 additions and 2 deletions

View File

@@ -1210,13 +1210,13 @@ void BKE_nlastrip_validate_fcurves (NlaStrip *strip)
}
}
/* Sanity Validation ------------------------------------ */
static int nla_editbone_name_check(void *arg, const char *name)
{
return BLI_ghash_haskey((GHash *)arg, (void *)name);
}
/* Sanity Validation ------------------------------------ */
/* Find (and set) a unique name for a strip from the whole AnimData block
* Uses a similar method to the BLI method, but is implemented differently
* as we need to ensure that the name is unique over several lists of tracks,

View File

@@ -517,6 +517,18 @@ static void rna_def_bone_common(StructRNA *srna, int editbone)
RNA_def_property_range(prop, 0.0f, 2.0f);
RNA_def_property_ui_text(prop, "B-Bone Ease Out", "Length of second Bezier Handle (for B-Bones only)");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
prop= RNA_def_property(srna, "bbone_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xwidth");
RNA_def_property_range(prop, 0.0f, 1000.0f);
RNA_def_property_ui_text(prop, "B-Bone Display X Width", "B-Bone X size");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
prop= RNA_def_property(srna, "bbone_z", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "zwidth");
RNA_def_property_range(prop, 0.0f, 1000.0f);
RNA_def_property_ui_text(prop, "B-Bone Display Z Width", "B-Bone Z size");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
}
// err... bones should not be directly edited (only editbones should be...)