diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-09-23 22:50:56 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-09-23 22:50:56 +0400 |
commit | a42ba82f638e481d7fd3c3ed2ba05c331ef6717e (patch) | |
tree | 81a2b9221799707b49b74a5df8bb3ff964ba78bd /source/blender/editors/object/object_modifier.c | |
parent | 7afbdff1b6c348227e652e1c3071ab7ba7c91c44 (diff) | |
parent | a73dd3476e7d180d3320afc04d218ce22f2f3bfc (diff) |
Merged changes in the trunk up to revision 50829.
Conflicts resolved:
source/blender/blenloader/intern/readfile.c
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/pipeline.c
Also addressed code inconsistency due to changes in the trunk revision 50628 (color
management with OCIO) and 50806 (UV project material). OCIO-related changes are marked
OCIO_TODO as in some other files modified in revision 50628.
Diffstat (limited to 'source/blender/editors/object/object_modifier.c')
-rw-r--r-- | source/blender/editors/object/object_modifier.c | 19 |
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) { |