Fix #110253: Regression: Extruding bone from root fails #110256

Merged
Pratik Borhade merged 2 commits from PratikPB2123/blender:110253-armature-extrude into main 2023-07-24 13:45:47 +02:00
Member

Caused by 0b7d8a20bf
Above commit broke the operation because of this change: if (do_extrude != 0)
Earlier True/False/2 were used to determine the point of extrude.
Use enum to fix this and to improve the code readability.

Caused by 0b7d8a20bfdf6e510c2fe77382a0d32a75bb5fc3 Above commit broke the operation because of this change: `if (do_extrude != 0)` Earlier True/False/2 were used to determine the point of extrude. Use enum to fix this and to improve the code readability.
Pratik Borhade added 1 commit 2023-07-19 08:19:02 +02:00
11f0d58329 Fix #110253: Regression: Impossible to extrude a main bone in rigging mode
Caused by 0b7d8a20bf
Above commit broke the operation because of this change: `if (do_extrude != 0)`
Earlier True/False/2 were used to determine the point of extrude.
Use enum to fix this and to improve the code readability.
Pratik Borhade requested review from Sybren A. Stüvel 2023-07-19 08:19:19 +02:00
Pratik Borhade requested review from Jacques Lucke 2023-07-19 08:19:19 +02:00
Pratik Borhade added the
Module
Animation & Rigging
label 2023-07-19 08:19:30 +02:00
Pratik Borhade changed title from Fix #110253: Regression: Impossible to extrude a main bone in rigging mode to Fix #110253: Regression: Extruding bone from root fails 2023-07-19 08:26:03 +02:00
Jacques Lucke approved these changes 2023-07-19 14:17:02 +02:00
@ -1413,2 +1412,4 @@
Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data(
scene, view_layer, CTX_wm_view3d(C), &objects_len);
enum ExtrudePoint {
Member

the formatting looks off

the formatting looks off
PratikPB2123 marked this conversation as resolved
@ -1420,2 +1426,3 @@
EditBone *newbone = nullptr, *ebone, *flipbone, *first = nullptr;
int a, totbone = 0, do_extrude;
int a, totbone = 0;
ExtrudePoint do_extrude;
Member

It feels like it would be good to initialize this, but probably fine since it wasn't initialized before.

It feels like it would be good to initialize this, but probably fine since it wasn't initialized before.

I'm always second-guessing myself in situations like this. The "safety me" wants to initialise. The "let the compiler help" me wants not to, and get a compiler warning if there is a code path that leads to this variable being uninitialised.

I'm always second-guessing myself in situations like this. The "safety me" wants to initialise. The "let the compiler help" me wants not to, and get a compiler warning if there is a code path that leads to this variable being uninitialised.
Pratik Borhade added 1 commit 2023-07-20 09:05:50 +02:00
Sybren A. Stüvel approved these changes 2023-07-24 10:44:12 +02:00
Sybren A. Stüvel left a comment
Member

OMG yes, let's assign an int to true, false, or 2.

Thanks Pratik, for bringing sanity to this code.

OMG yes, let's assign an `int` to `true`, `false`, or `2`. Thanks Pratik, for bringing sanity to this code.
Pratik Borhade merged commit 7cdb9814c5 into main 2023-07-24 13:45:47 +02:00
Pratik Borhade deleted branch 110253-armature-extrude 2023-07-24 13:45:49 +02:00
Author
Member

Merged, thanks for reviewing :)

Merged, thanks for reviewing :)
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
3 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#110256
No description provided.