Gizmo: press shift key to scale area lights uniformly #104418

Closed
Weizhen Huang wants to merge 13 commits from weizhen:shift_uniform_scale into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Member

Light improvements #104280

Light improvements #104280
Weizhen Huang requested review from Campbell Barton 2023-02-07 18:50:44 +01:00

While the functionality works well, this is handling events from the gizmo-group which may conflict with the gizmos event handling (in the future, even though it works now), as it means changes to event handling in the gizmo could unintentionally conflict with event handling performed in the gizmo groups.

I think it would be better to handle this as part of the gizmos modal callback.

There is a patch attached that implements this, although it applies to all cage2D gizmos, as far as I can see this is OK, it works well with the camera region for example.

While the functionality works well, this is handling events from the gizmo-group which may conflict with the gizmos event handling (in the future, even though it works now), as it means changes to event handling in the gizmo could unintentionally conflict with event handling performed in the gizmo groups. I think it would be better to handle this as part of the gizmos modal callback. There is a patch attached that implements this, although it applies to all cage2D gizmos, as far as I can see this is OK, it works well with the camera region for example.
Campbell Barton requested changes 2023-02-11 07:07:58 +01:00
Campbell Barton left a comment
Owner

Using events from the gizmo group seems like it could back-fire in the future, see longer reply with alternative solution.

Using events from the gizmo group seems like it could back-fire in the future, see longer reply with alternative solution.
Brecht Van Lommel added this to the EEVEE & Viewport project 2023-02-13 09:19:52 +01:00
Weizhen Huang force-pushed shift_uniform_scale from 5b2dc8a9c2 to 46bd037076 2023-02-13 11:21:59 +01:00 Compare
Weizhen Huang added 10 commits 2023-02-13 11:46:30 +01:00
0c87ff3de5 GPU: Move gpu_shader_builtin.c to C++
This also removes all unused part of it now that we have converted all
shaders to use create infos.
4099f24817 GPU: Remove GPU_SHADER_3D_POINT_FIXED_SIZE_VARYING_COLOR
This replaces `GPU_SHADER_3D_POINT_FIXED_SIZE_VARYING_COLOR` by
GPU_SHADER_2D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_OUTLINE_AA`.

None of the usage made sense to not use the AA shader.
Scale the point size to account for the rounded shape.
589160d05c Cleanup: GPUShader: Split Builtins to their own header
Also improve documentation and cleanup.
bfe3239ff7 Cleanup: GPUShader: Reorganize GPU_shader.h to separate depecated API
This avoid confusion to what to use nowadays.
Also improves documentation.
699e9369dc GPU: Removes GPU_shader_get_builtin_ssbo
Simplify the API. Use hardcoded ssbo location instead.
6bf20d4d5e Cleanup: GPUShader: Remove `GPU_shader_uniform_int/float`
Simplify the API, leaving only one function to set uniform without the
uniform name.
d1b830f3eb Cleanup: GPUShader: Rename `GPU_shader_uniform_vector`
Rename to `GPU_shader_uniform_float/int_ex` to make more sense as a
general purpose function.
Weizhen Huang requested review from Campbell Barton 2023-02-13 11:48:14 +01:00
Author
Member

Reverted changes in view3d_gizmo_light.c, changed cage2d_gizmo.c as suggested.

Reverted changes in `view3d_gizmo_light.c`, changed `cage2d_gizmo.c` as suggested.
Weizhen Huang added 1 commit 2023-02-13 17:52:25 +01:00
Campbell Barton approved these changes 2023-02-14 01:40:13 +01:00
Campbell Barton left a comment
Owner

Accepting, but please update patch description before committing as this is no longer limited to area-lights.

Accepting, but please update patch description before committing as this is no longer limited to area-lights.
Weizhen Huang added 1 commit 2023-02-14 11:02:49 +01:00
Author
Member

The pull request has been merged as a3e6cb5dab

The pull request has been merged as a3e6cb5dab
Weizhen Huang closed this pull request 2023-02-14 11:21:32 +01:00
Weizhen Huang deleted branch shift_uniform_scale 2023-02-14 11:21:43 +01:00

Pull request closed

Sign in to join this conversation.
No reviewers
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 Assignees
2 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#104418
No description provided.