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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-07-24 20:41:12 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-07-24 20:41:12 +0400
commitf24bcac43eab1238f933a227d8da84ee0d48a0c3 (patch)
treec0402d7284a8491521728c701f2f761cf3a25724 /source/blender/makesrna/intern/rna_armature.c
parentad6aaeb319baac9a134630eba2bf2a71dfdf04fb (diff)
2.5: Various Fixes
* Fix crash loading particle AnimData. This crashed many BBB files. If you have a .blend file that crashes when loading it in 2.5, please mail me, I'd like to know. * Image window zoom ratio did not work correct with py 2.x. * Other minor fixes for image window RNA. * Buttons window now remembers the tab that was last clicked by the user, even if that tab is no longer available due to context, and then enable the tab again if the context for it is back. * Cleaned up buttons space DNA a bit, removing unused vars. * Armature bone rename outside edit mode did not call right function yet. * Armature layers are now editable even if lib linked. This is useful for proxies. For this purpose a PROP_LIB_EXCEPTION flag was added. Need to think over proxy / RNA a bit though, not sure what the requirements are yet. * Parent to Armature Deform now has options to create vertex groups, instead of always creating them.
Diffstat (limited to 'source/blender/makesrna/intern/rna_armature.c')
-rw-r--r--source/blender/makesrna/intern/rna_armature.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index d77517f420d..cf20e92b289 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -157,6 +157,19 @@ static void rna_EditBone_name_set(PointerRNA *ptr, const char *value)
ED_armature_bone_rename(arm, oldname, newname);
}
+static void rna_Bone_name_set(PointerRNA *ptr, const char *value)
+{
+ bArmature *arm= (bArmature*)ptr->id.data;
+ Bone *bone= (Bone*)ptr->data;
+ char oldname[32], newname[32];
+
+ /* need to be on the stack */
+ BLI_strncpy(newname, value, 32);
+ BLI_strncpy(oldname, bone->name, 32);
+
+ ED_armature_bone_rename(arm, oldname, newname);
+}
+
static void rna_EditBone_layer_get(PointerRNA *ptr, int values[16])
{
EditBone *data= (EditBone*)(ptr->data);
@@ -320,6 +333,7 @@ static void rna_def_bone_common(StructRNA *srna, int editbone)
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_struct_name_property(srna, prop);
if(editbone) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_EditBone_name_set");
+ else RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Bone_name_set");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
/* flags */
@@ -573,6 +587,7 @@ void rna_def_armature(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Visible Layers", "Armature layer visibility.");
RNA_def_property_boolean_funcs(prop, NULL, "rna_Armature_layer_set");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, NULL);
+ RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
/* layer protection */
prop= RNA_def_property(srna, "layer_protection", PROP_BOOLEAN, PROP_NONE);