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:
authorJacques Lucke <jacques@blender.org>2020-09-10 18:41:04 +0300
committerJacques Lucke <jacques@blender.org>2020-09-10 18:41:04 +0300
commit133b7c34dd1c457ee921302e88594654ac64ba9f (patch)
treecbe7cd65cc441ad50d918ad04f2870892818af65 /source/blender/blenloader/intern/writefile.c
parent0c7e77d416cac85d6b50778115d8cae4c3d64a6c (diff)
Refactor: move Armature .blend I/O to IDTypeInfo callbacks
Diffstat (limited to 'source/blender/blenloader/intern/writefile.c')
-rw-r--r--source/blender/blenloader/intern/writefile.c48
1 files changed, 1 insertions, 47 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 9a423ab6906..9fc8fb75ea0 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2143,50 +2143,6 @@ static void write_screen(BlendWriter *writer, bScreen *screen, const void *id_ad
}
}
-static void write_bone(BlendWriter *writer, Bone *bone)
-{
- /* PATCH for upward compatibility after 2.37+ armature recode */
- bone->size[0] = bone->size[1] = bone->size[2] = 1.0f;
-
- /* Write this bone */
- BLO_write_struct(writer, Bone, bone);
-
- /* Write ID Properties -- and copy this comment EXACTLY for easy finding
- * of library blocks that implement this.*/
- if (bone->prop) {
- IDP_BlendWrite(writer, bone->prop);
- }
-
- /* Write Children */
- LISTBASE_FOREACH (Bone *, cbone, &bone->childbase) {
- write_bone(writer, cbone);
- }
-}
-
-static void write_armature(BlendWriter *writer, bArmature *arm, const void *id_address)
-{
- if (arm->id.us > 0 || BLO_write_is_undo(writer)) {
- /* Clean up, important in undo case to reduce false detection of changed datablocks. */
- arm->bonehash = NULL;
- arm->edbo = NULL;
- /* Must always be cleared (armatures don't have their own edit-data). */
- arm->needs_flush_to_id = 0;
- arm->act_edbone = NULL;
-
- BLO_write_id_struct(writer, bArmature, id_address, &arm->id);
- BKE_id_blend_write(writer, &arm->id);
-
- if (arm->adt) {
- BKE_animdata_blend_write(writer, arm->adt);
- }
-
- /* Direct data */
- LISTBASE_FOREACH (Bone *, bone, &arm->bonebase) {
- write_bone(writer, bone);
- }
- }
-}
-
static void write_sound(BlendWriter *writer, bSound *sound, const void *id_address)
{
if (sound->id.us > 0 || BLO_write_is_undo(writer)) {
@@ -2661,9 +2617,6 @@ static bool write_file_handle(Main *mainvar,
case ID_GR:
write_collection(&writer, (Collection *)id_buffer, id);
break;
- case ID_AR:
- write_armature(&writer, (bArmature *)id_buffer, id);
- break;
case ID_OB:
write_object(&writer, (Object *)id_buffer, id);
break;
@@ -2711,6 +2664,7 @@ static bool write_file_handle(Main *mainvar,
case ID_WO:
case ID_MSK:
case ID_SPK:
+ case ID_AR:
/* Do nothing, handled in IDTypeInfo callback. */
break;
case ID_LI: