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/editors/armature
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/editors/armature')
-rw-r--r--source/blender/editors/armature/editarmature.c30
1 files changed, 7 insertions, 23 deletions
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 2da49731a95..cfae8ebb3a9 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -4614,44 +4614,28 @@ void add_verts_to_dgroups(Scene *scene, Object *ob, Object *par, int heat, int m
MEM_freeN(verts);
}
-void create_vgroups_from_armature(Scene *scene, Object *ob, Object *par)
+void create_vgroups_from_armature(Scene *scene, Object *ob, Object *par, int mode)
{
/* Lets try to create some vertex groups
* based on the bones of the parent armature.
*/
bArmature *arm= par->data;
- short mode;
- /* Prompt the user on whether/how they want the vertex groups
- * added to the child mesh */
- mode= pupmenu("Create Vertex Groups? %t|"
- "Don't Create Groups %x1|"
- "Name Groups %x2|"
- "Create From Envelopes %x3|"
- "Create From Bone Heat %x4|");
-
- mode= 3; // XXX
-
- switch (mode) {
- case 2:
+ if(mode == ARM_GROUPS_NAME) {
/* Traverse the bone list, trying to create empty vertex
* groups cooresponding to the bone.
*/
- bone_looper(ob, arm->bonebase.first, NULL,
- add_defgroup_unique_bone);
+ bone_looper(ob, arm->bonebase.first, NULL, add_defgroup_unique_bone);
+
if (ob->type == OB_MESH)
create_dverts(ob->data);
-
- break;
-
- case 3:
- case 4:
+ }
+ else if(mode == ARM_GROUPS_ENVELOPE || mode == ARM_GROUPS_AUTO) {
/* Traverse the bone list, trying to create vertex groups
* that are populated with the vertices for which the
* bone is closest.
*/
- add_verts_to_dgroups(scene, ob, par, (mode == 4), 0);
- break;
+ add_verts_to_dgroups(scene, ob, par, (mode == ARM_GROUPS_AUTO), 0);
}
}
/* ************* Clear Pose *****************************/