Joining armatures - Problems with same name on the bones #53909

Closed
opened 2018-01-26 13:19:13 +01:00 by Timmy Chan · 7 comments

System Information
Windows 10, NVIDIA GeForce GTX 1060 3GB

Blender Version
Broken: 2.79 (sub 0), branch: master, hash: 5bd8ac9

Short description of error
When joining (CTRL+J) two armatures, bones with the same name will get something like ".001" appended to the name. However this does not behave the same as if we have changed the name of the bones manually before joining. The bones with keyframes (or animations) will fail to update accordingly as the name of the bones gets changed. The bone constraints get lost. (This also causes naming problems on weighted meshes)

Exact steps for others to reproduce the error
Based on a (as simple as possible) attached .blend file with minimum amount of steps

  1. Start with empty scene
  2. Shift+A > Armature > Single Bone
  3. Press: Tab E Esc G Z 1 Enter
  4. Goto "Pose Mode" and select all bones
  5. In "TimeLine": Pick "Rotation" keying set, and set key at frame 1
  6. Move to frame 250
  7. Make some changes to the bones
  8. Select all bones and set key
  9. Goto "Object Mode" and duplicate the armature (place the new one beside the old one)
  10. For each armature: Select it and run "Bake Action" (uncheck "Only selected"), Pick Pose and OK
  11. Navigate to "NLA Editor"
  12. Push down the both actions as new NLA strips
    ----- Done preparations, This is exactly what's done in BlenderCommunityBugReport.blend

Bug:
13. Select both armatures, press: Ctrl+J, now one of the animations will fail

Workaround:
13. Change the name of the bones in one of the armatures so that no bones have the same name across the armatures
14. Select both armatures, press: Ctrl+J, now both of the animations will work

One more thing:
If there are some meshes weightpainted for the bones. The "auto name change" will break the constraints, while "manual name change" will retain them.
BlenderCommunityBugReport.blend

**System Information** Windows 10, NVIDIA GeForce GTX 1060 3GB **Blender Version** Broken: 2.79 (sub 0), branch: master, hash: 5bd8ac9 **Short description of error** When joining (CTRL+J) two armatures, bones with the same name will get something like ".001" appended to the name. However this does not behave the same as if we have changed the name of the bones manually before joining. The bones with keyframes (or animations) will fail to update accordingly as the name of the bones gets changed. The bone constraints get lost. (This also causes naming problems on weighted meshes) **Exact steps for others to reproduce the error** Based on a (as simple as possible) attached .blend file with minimum amount of steps 1. Start with empty scene 2. `Shift+A` > Armature > Single Bone 3. Press: `Tab E Esc G Z 1 Enter` 4. Goto "Pose Mode" and select all bones 5. In "TimeLine": Pick "Rotation" keying set, and set key at frame 1 6. Move to frame 250 7. Make some changes to the bones 8. Select all bones and set key 9. Goto "Object Mode" and duplicate the armature (place the new one beside the old one) 10. For each armature: Select it and run "Bake Action" (uncheck "Only selected"), Pick Pose and OK 11. Navigate to "NLA Editor" 12. Push down the both actions as new NLA strips *----- Done preparations, This is exactly what's done in BlenderCommunityBugReport.blend* Bug: 13. Select both armatures, press: `Ctrl+J`, now one of the animations will fail Workaround: 13. Change the name of the bones in one of the armatures so that no bones have the same name across the armatures 14. Select both armatures, press: `Ctrl+J`, now both of the animations will work One more thing: If there are some meshes weightpainted for the bones. The "auto name change" will break the constraints, while "manual name change" will retain them. [BlenderCommunityBugReport.blend](https://archive.blender.org/developer/F1987094/BlenderCommunityBugReport.blend)
Author

Added subscriber: @timmychan301197

Added subscriber: @timmychan301197
Member

Added subscribers: @JoshuaLeung, @lichtwerk

Added subscribers: @JoshuaLeung, @lichtwerk
Joshua Leung was assigned by Philipp Oeser 2018-01-26 21:17:52 +01:00
Member

I can confirm this behaviour (though this is probably a known limitation).

At first glance this even seemed to be implemented in 99a5f376a2 [but not sure, I havent actually verified the commit] but then was limited to drivers only in a730cda72f?

@JoshuaLeung : mind having a look?

I can confirm this behaviour (though this is probably a known limitation). At first glance this even seemed to be implemented in 99a5f376a2 [but not sure, I havent actually verified the commit] but then was limited to drivers only in a730cda72f? @JoshuaLeung : mind having a look?
Author

As written above, a workaround would be manually renaming the bones before joining the armatures. This means that it wouldn't be too difficult to make it automatically rename them for us when joining. Manually renaming all the bones would be a long lasting pain

As written above, a workaround would be manually renaming the bones before joining the armatures. This means that it wouldn't be too difficult to make it automatically rename them for us when joining. Manually renaming all the bones would be a long lasting pain
Member

Ok, so carefully re-reading the bug description, it sounds like there are two parts to this: 1) Animation Data, 2) Constraints

1) Animation Data

Technically, this isn't a bug.

We deliberately don't try to fix animation data when joining armatures, as it is assumed that doing so wouldn't be too useful to do so in most cases. Specifically, we assume that in most production pipelines, you wouldn't really want to be doing any rig merging/splitting once animation has begun. For example:

  1. If you do modify the rigs during animation/production, it's likely that the changes would be minor enough or that they would be known to break animation (and thus, it doesn't make sense to patch the old data over),
  2. If you're modifying the rig during the pre-production stage, any animations that have been made are likely to be just test animations. So, it's not a big deal if we lose those. The animators would likely be making some fresh shots anyway to test out the changes in the rig.

Furthermore, in most pipelines, the armatures/rigs are defined in one file, while all the per-shot animation are defined in many other unrelated files. This operator can only really fix anything that is connected in the here and now. Again, there's not much point doing it.

Granted, in a few simple cases (provided the right conditions are in place), it might be ok support such functionality (and it would also be quite useful to have it). It recently put in place some similar code for Grease Pencil (in the new branch), so it's not a big deal to adapt this for this case.

2) Constraints

I haven't checked yet whether there are problems here. More investigation needed.

Ok, so carefully re-reading the bug description, it sounds like there are two parts to this: 1) Animation Data, 2) Constraints ## 1) Animation Data Technically, this isn't a bug. We deliberately don't try to fix animation data when joining armatures, as it is assumed that doing so wouldn't be too useful to do so in most cases. Specifically, we assume that in most production pipelines, you wouldn't really want to be doing any rig merging/splitting once animation has begun. For example: 1) If you do modify the rigs during animation/production, it's likely that the changes would be minor enough or that they would be known to break animation (and thus, it doesn't make sense to patch the old data over), 2) If you're modifying the rig during the pre-production stage, any animations that have been made are likely to be just test animations. So, it's not a big deal if we lose those. The animators would likely be making some fresh shots anyway to test out the changes in the rig. Furthermore, in most pipelines, the armatures/rigs are defined in one file, while all the per-shot animation are defined in many other unrelated files. This operator can only really fix anything that is connected in the here and now. Again, there's not much point doing it. Granted, in a few simple cases (provided the right conditions are in place), it might be ok support such functionality (and it would also be quite useful to have it). It recently put in place some similar code for Grease Pencil (in the new branch), so it's not a big deal to adapt this for this case. ## 2) Constraints I haven't checked yet whether there are problems here. More investigation needed.

This issue was referenced by d13b943853

This issue was referenced by d13b943853953d4573a1d74bd0048bc236658783
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#53909
No description provided.