Bone relation lines: draw between axis points #105427

Manually merged
Sybren A. Stüvel merged 14 commits from dr.sybren/blender:anim/bone-relation-lines into main 2023-03-21 15:19:48 +01:00

Design discussions in #105489

Add control overhow bone relation lines are drawn. Instead of always drawing from the head
of the child to the tail of the parent, give users a choice for the parent side of the line. This can now be toggled between the head and the tail of the bone, where the tail is Blender's original behaviour and is retained as default value.

image

image


This PR is related to #105466.

https://wiki.blender.org/wiki/Reference/Release_Notes/3.6/Animation_Rigging#Bone_Relation_Lines

**Design discussions in #105489** Add control overhow bone relation lines are drawn. Instead of always drawing from the head of the child to the tail of the parent, give users a choice for the parent side of the line. This can now be toggled between the head and the tail of the bone, where the tail is Blender's original behaviour and is retained as default value. ![image](/attachments/51137f6b-5dd4-48f6-ab06-705e42dfe4f1) ![image](/attachments/be51cc31-9b2c-4af8-aad7-60a43823e47a) ---- This PR is related to #105466. https://wiki.blender.org/wiki/Reference/Release_Notes/3.6/Animation_Rigging#Bone_Relation_Lines
Sybren A. Stüvel added 1 commit 2023-03-04 01:21:07 +01:00
buildbot/vexp-code-patch-coordinator Build done. Details
bda5c38e6f
Bone relation lines: draw between axis points
Change how bone relation lines are drawn. Instead of drawing from the head
of the child to the tail of the parent, use the "axis points" as start/end
point of the lines. This is the point used to draw the bone axes, and
thus can be modified via the "Axes Position" setting.
Sybren A. Stüvel added the
Module
Animation & Rigging
Interest
User Interface
labels 2023-03-04 01:21:29 +01:00
Author
Member

@blender-bot package

@blender-bot package
Member

Package build started. Download here when ready.

Package build started. [Download here](https://builder.blender.org/download/patch/PR105427) when ready.
Sybren A. Stüvel requested review from Jer Bot 2023-03-04 01:30:36 +01:00
Sybren A. Stüvel added 1 commit 2023-03-06 15:10:33 +01:00
Author
Member

@blender-bot package

@blender-bot package
Member

Package build started. Download here when ready.

Package build started. [Download here](https://builder.blender.org/download/patch/PR105427) when ready.
Sybren A. Stüvel added 1 commit 2023-03-06 18:03:32 +01:00
buildbot/vexp-code-patch-coordinator Build done. Details
8387558f23
Always draw the child-side of the relation at the bone head
Feedback from @JasonSchleifer
Author
Member

@blender-bot package

Re-building after feedback on the design task #105489

@blender-bot package Re-building after feedback on the design task #105489
Member

Package build started. Download here when ready.

Package build started. [Download here](https://builder.blender.org/download/patch/PR105427) when ready.
Sybren A. Stüvel added 3 commits 2023-03-07 12:08:23 +01:00
Author
Member

@blender-bot package

@blender-bot package
Member

Package build started. Download here when ready.

Package build started. [Download here](https://builder.blender.org/download/patch/PR105427) when ready.
Sybren A. Stüvel added 1 commit 2023-03-10 13:12:16 +01:00
de0a68f272 Replace the 0-1 slider with an armature flag
The choice between drawing relation lines from the parent head or tail is
now a bitflag on the armature. There were plenty of unused flags left, so
it now doesn't take up any space any more.

The flag is wrapped in an RNA enum, so that there are distinct choices
'Head' and 'Tail'. This is preferred over a single checkbox.
Sybren A. Stüvel added 1 commit 2023-03-10 13:12:43 +01:00
Author
Member

@blender-bot package

@blender-bot package
Member

Package build started. Download here when ready.

Package build started. [Download here](https://builder.blender.org/download/patch/PR105427) when ready.
Sybren A. Stüvel added 2 commits 2023-03-13 11:51:45 +01:00
Author
Member

@blender-bot package

@blender-bot package
Member

Package build started. Download here when ready.

Package build started. [Download here](https://builder.blender.org/download/patch/PR105427) when ready.
Sybren A. Stüvel requested review from Christoph Lendenfeld 2023-03-13 11:56:56 +01:00
Sybren A. Stüvel removed review request for Jer Bot 2023-03-13 12:07:30 +01:00
Author
Member

I removed @jerbot as reviewer, as in his comment on the design task is enough for me ;-)

Love the latest demo video. That checks all my boxes.

I removed @jerbot as reviewer, as [in his comment on the design task](https://projects.blender.org/blender/blender/issues/105489#issuecomment-896975) is enough for me ;-) > Love the latest demo video. That checks all my boxes.
First-time contributor

Looks right to me. Next step is to look at the ball display type and see if relationship lines can be drawn between bone heads that are already flagged as "connected". Feels related to this, but mostly useful when using non standard bone types.

Guessing this goes under that task?

Looks right to me. Next step is to look at the ball display type and see if relationship lines can be drawn between bone heads that are already flagged as "connected". Feels related to this, but mostly useful when using non standard bone types. Guessing this goes under that task?
Sybren A. Stüvel requested review from Jeroen Bakker 2023-03-13 16:16:33 +01:00
Author
Member

Looks right to me. Next step is to look at the ball display type and see if relationship lines can be drawn between bone heads that are already flagged as "connected". Feels related to this, but mostly useful when using non standard bone types.

Guessing this goes under that task?

Yup, that's for #105466

> Looks right to me. Next step is to look at the ball display type and see if relationship lines can be drawn between bone heads that are already flagged as "connected". Feels related to this, but mostly useful when using non standard bone types. > > Guessing this goes under that task? Yup, that's for #105466
Jeroen Bakker reviewed 2023-03-14 08:42:57 +01:00
Jeroen Bakker left a comment
Member

I only checked the drawing part. Seems fine. The branch inside draw_bone_bone_line could be removed but don't think it will harm in this case.

I only checked the drawing part. Seems fine. The branch inside `draw_bone_bone_line` could be removed but don't think it will harm in this case.
@ -2026,0 +2028,4 @@
const float /*bone_tail*/[3],
const float parent_head[3],
const float parent_tail[3],
const short armature_flags)
Member

Can we use eArmature_Flag as a type?

Can we use `eArmature_Flag` as a type?
dr.sybren marked this conversation as resolved
Sybren A. Stüvel added 2 commits 2023-03-14 18:26:35 +01:00
Jeroen Bakker reviewed 2023-03-15 09:09:52 +01:00
@ -2025,1 +2025,4 @@
static void draw_bone_bone_line(ArmatureDrawContext *ctx,
const float bone_head[3],
const float /*bone_tail*/[3],
Member

We should remove unused parameters in static methods. Compilers are smart, but we should not rely on that.

We should remove unused parameters in static methods. Compilers are smart, but we should not rely on that.
dr.sybren marked this conversation as resolved
Christoph Lendenfeld reviewed 2023-03-17 12:34:06 +01:00
@ -2023,6 +2023,21 @@ static void pchan_draw_ik_lines(ArmatureDrawContext *ctx,
}
}
static void draw_bone_bone_line(ArmatureDrawContext *ctx,

I feel like this could get a better name. Unless you think this will draw other lines in the near future I'd call it draw_bone_relationship_lines
Tbh I am not sure if it is lines or line, the functions it calls use plural but it seems like they only draw a single line.

I feel like this could get a better name. Unless you think this will draw other lines in the near future I'd call it `draw_bone_relationship_lines` Tbh I am not sure if it is `lines` or `line`, the functions it calls use plural but it seems like they only draw a single line.
dr.sybren marked this conversation as resolved
Christoph Lendenfeld approved these changes 2023-03-17 12:47:58 +01:00
Christoph Lendenfeld left a comment
Member

apart from my small nitpick about the naming this lgtm

apart from my small nitpick about the naming this lgtm
Sybren A. Stüvel added 2 commits 2023-03-21 15:11:41 +01:00
Sybren A. Stüvel manually merged commit 45c1deac4f into main 2023-03-21 15:19:48 +01:00
Sybren A. Stüvel added this to the 3.6 LTS milestone 2023-03-21 15:25:20 +01:00
Sybren A. Stüvel deleted branch anim/bone-relation-lines 2023-03-21 15:25:30 +01:00
Sybren A. Stüvel added this to the Animation & Rigging project 2023-03-30 17:00:51 +02:00
Member

Trying to add documentation here.

Trying to add documentation [here](https://projects.blender.org/blender/blender-manual/pulls/104536).
Sybren A. Stüvel removed this from the Animation & Rigging project 2023-10-16 12:38:42 +02:00
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
6 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#105427
No description provided.