Fix #108911: Fcurve Proportional editing circle draws wrong #108979

Merged
Philipp Oeser merged 2 commits from lichtwerk/blender:108911 into blender-v3.6-release 2023-06-15 09:45:28 +02:00
Member

Since we scale the GPU matrix a certain way (in order to draw a round
circle even for different UI x/y scaling), we have to also compensate
with GPU matrix translation (instead of drawing the raw
frame/value as coords untranslated).

There might be ways to solve this differently (e.g. manipulating the passed
coords instead of the GPU matrix or having a version of imm_drawcircball
that can do this in a way that compensates UI view scaling), but this seems
to be the most straightforward.

Thx @mano-wii hinting at the way to do this with GPU matrix alone.

Should probably go into 3.3 LTS as well.

Since we scale the GPU matrix a certain way (in order to draw a round circle even for different UI x/y scaling), we have to also compensate with GPU matrix translation (instead of drawing the raw frame/value as coords untranslated). There might be ways to solve this differently (e.g. manipulating the passed coords instead of the GPU matrix or having a version of imm_drawcircball that can do this in a way that compensates UI view scaling), but this seems to be the most straightforward. Thx @mano-wii hinting at the way to do this with GPU matrix alone. Should probably go into 3.3 LTS as well.
Philipp Oeser added 1 commit 2023-06-14 15:49:40 +02:00
94dacaf441 Fix #108911: Fcurve Proportional editing circle draws wrong
Since we set up the GPU matrix a certain way (in order to draw a round
circle even for different UI x/y scaling), we have to tweak where the
center of that circle draws accordingly (instead of passing the raw
frame/value as coords).

There might be ways to solve this differently (e.g. setting up matrix
manipulation different or having a version of imm_drawcircball that can
do this in a way that compensates UI view scaling), but havent found a
quick way to do this and fixing it like done here seemed straightforward
enough to make a PR from.

Should probably go into 3.3 LTS as well.
Philipp Oeser requested review from Germano Cavalcante 2023-06-14 15:49:48 +02:00
Philipp Oeser requested review from Brad Clark 2023-06-14 15:50:07 +02:00
Philipp Oeser added this to the Modeling project 2023-06-14 15:50:14 +02:00
Philipp Oeser added the
Interest
Animation & Rigging
Interest
User Interface
labels 2023-06-14 15:50:31 +02:00
Germano Cavalcante approved these changes 2023-06-14 16:18:31 +02:00
Germano Cavalcante left a comment
Member

It looks ok.
But I wonder if we can use GPU_matrix_translate_2f instead of copying t->center_global;

I think it would be something like this:
GPU_matrix_translate_2f(0.0f, (t->center_global[1] / fac_scale) - t->center_global[1])

It looks ok. But I wonder if we can use `GPU_matrix_translate_2f` instead of copying `t->center_global`; I think it would be something like this: `GPU_matrix_translate_2f(0.0f, (t->center_global[1] / fac_scale) - t->center_global[1])`
Member

If that fixes the draw so it shows up in the correct place then approved :)

Even better if it could get fixed for 3.6 and back ported because it really makes it almost impossible to use.

If that fixes the draw so it shows up in the correct place then approved :) Even better if it could get fixed for 3.6 and back ported because it really makes it almost impossible to use.
Philipp Oeser added 1 commit 2023-06-15 09:29:10 +02:00
Philipp Oeser merged commit d61d2e5f59 into blender-v3.6-release 2023-06-15 09:45:28 +02:00
Philipp Oeser deleted branch 108911 2023-06-15 09:45:31 +02:00
Member

Should probably go into 3.3 LTS as well.

Can we do this? :)

> Should probably go into 3.3 LTS as well. Can we do this? :)
Author
Member

Should probably go into 3.3 LTS as well.

Can we do this? :)

yep, added again (already did this, but somehow this got edited away again -- by myself probably...)

> > Should probably go into 3.3 LTS as well. > > Can we do this? :) yep, added again (already did this, but somehow this got edited away again -- by myself probably...)
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#108979
No description provided.