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:
Diffstat (limited to 'source/blender/editors/object/object_modifier.c')
-rw-r--r--source/blender/editors/object/object_modifier.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index 4858fdf1c35..6fe7ad05a70 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -565,15 +565,15 @@ static int modifier_apply_shape(ReportList *reports, Scene *scene, Object *ob, M
}
if (key == NULL) {
- key = me->key = add_key((ID *)me);
+ key = me->key = BKE_key_add((ID *)me);
key->type = KEY_RELATIVE;
/* if that was the first key block added, then it was the basis.
* Initialize it with the mesh, and add another for the modifier */
- kb = add_keyblock(key, NULL);
- mesh_to_key(me, kb);
+ kb = BKE_keyblock_add(key, NULL);
+ BKE_key_convert_from_mesh(me, kb);
}
- kb = add_keyblock(key, md->name);
+ kb = BKE_keyblock_add(key, md->name);
DM_to_meshkey(dm, me, kb);
dm->release(dm);
@@ -1692,11 +1692,9 @@ static void skin_armature_bone_create(Object *skin_ob,
v = (e->v1 == parent_v ? e->v2 : e->v1);
- bone = MEM_callocN(sizeof(EditBone),
- "skin_armature_bone_create EditBone");
+ bone = ED_armature_edit_bone_add(arm, "Bone");
bone->parent = parent_bone;
- bone->layer = 1;
bone->flag |= BONE_CONNECTED;
copy_v3_v3(bone->head, mvert[parent_v].co);
@@ -1704,8 +1702,6 @@ static void skin_armature_bone_create(Object *skin_ob,
bone->rad_head = bone->rad_tail = 0.25;
BLI_snprintf(bone->name, sizeof(bone->name), "Bone.%.2d", endx);
- BLI_addtail(arm->edbo, bone);
-
/* add bDeformGroup */
if ((dg = ED_vgroup_add_name(skin_ob, bone->name))) {
ED_vgroup_vert_add(skin_ob, dg, parent_v, 1, WEIGHT_REPLACE);
@@ -1770,16 +1766,13 @@ static Object *modifier_skin_armature_create(struct Scene *scene,
* a fake root bone (have it going off in the Y direction
* (arbitrary) */
if (emap[v].count > 1) {
- bone = MEM_callocN(sizeof(EditBone), "EditBone");
+ bone = ED_armature_edit_bone_add(arm, "Bone");
copy_v3_v3(bone->head, me->mvert[v].co);
copy_v3_v3(bone->tail, me->mvert[v].co);
- bone->layer = 1;
bone->head[1] = 1.0f;
bone->rad_head = bone->rad_tail = 0.25;
-
- BLI_addtail(arm->edbo, bone);
}
if (emap[v].count >= 1) {