Anim: ensure subdivided bones have sequential names #119775
No reviewers
Labels
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#119775
Loading…
Reference in New Issue
No description provided.
Delete Branch "dr.sybren/blender:pr/bone-subdivide-order"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR consists of two commits, and I intend to land it as such. The first is a fix for a bug that doesn't happen yet in Blender (because the relevant parameter is always
nullptr
), the second is the actual change in the bone subdivision code (which passes a non-nullptr
value for that parameter).This commit basically ensures that subdividing "Bone" results in a chain "Bone", "Bone.001", "Bone.002", etc. Before, the order would be "Bone", "Bone.004", "Bone.003", etc.
The code could have been a bit nicer, but that would require refactoring more. More explanations in the in-code comments.
This might break add-ons that assume to know the bone names before the
actual subdivision happens. This would always have been fragile, as
there may, for example, already have been a "Bone.001"; in that case
subdividing "Bone" would result in "Bone", "Bone.002", etc. Instead, the
parent-child chain should be followed.
@blender-bot package
Package build started. Download here when ready.
lgtm. makes much more sense now
There is a crash when using F2 for renaming, but that doesn't come from these changes.
But that does mean the build will crash when testing it.
reported the crash: #119778: Crash when using F2 to rename in the 3D viewport
@ -1772,0 +1779,4 @@
* The code above cuts into fractions (for cuts=3 it cuts into 1/4, then 1/3, then 1/2), which
* means that it MUST be run in that order. It could also just calculate the final bone length
* and create (N-1) bones of that length, which can then be done in any order. If that ever
* happens, the order can be inverted, and then the call to ED_armature_ebone_unique_name() can
the order can be inverted
does that mean it can be inverted from the current
LISTBASE_FOREACH_BACKWARD
meaning just iterating forward?If that is the case, I think it's clearer to say that explicitly
No, it refers back to "it MUST be run in that order", which in turn refers to "The code above". I'll reword to clarify.
47a11db1c2
to649d04d429
649d04d429
tob5e4a4dc2e
ce8a032ac2
was also part of this PR, even though that wasn't marked as such by Gitea.