Curves: Use deformed points in overlay (crazyspace) #104705

Merged
Falk David merged 4 commits from filedescriptor/blender:curves-edit-overlay-crazyspace into main 2023-02-14 16:33:49 +01:00
Member

Uses the deformed crazyspace to populate the position buffer for edit mode overlay.

image

Uses the deformed crazyspace to populate the position buffer for edit mode overlay. ![image](/attachments/eb49ce8e-20d6-4175-9e75-e6cf27d70cb7)
334 KiB
Falk David added 1 commit 2023-02-13 17:37:10 +01:00
Falk David requested review from Hans Goudey 2023-02-13 17:37:21 +01:00
Falk David added this to the Nodes & Physics project 2023-02-13 17:37:36 +01:00
Hans Goudey approved these changes 2023-02-13 18:51:52 +01:00
Hans Goudey left a comment
Member

Works quite nicely! It's good how simple this part is. There's a bit too much unrelated cleanup going on in this commit IMO, but everything looks reasonable. Just a comment about namespace stuff (some of the unrelated changes). Should also probably get the okay from Jacques about this, since he mainly worked on the curves crazyspace stuff so far.

I'll approve anyway since the changes I mentioned are simple.

BTW, separate topic, but I noticed the transform tools don't work as well as I'd hope with transformed curves. Maybe the transform code needs to know about the original vs. deformed coordinates too.

Works quite nicely! It's good how simple this part is. There's a bit too much unrelated cleanup going on in this commit IMO, but everything looks reasonable. Just a comment about namespace stuff (some of the unrelated changes). Should also probably get the okay from Jacques about this, since he mainly worked on the curves crazyspace stuff so far. I'll approve anyway since the changes I mentioned are simple. BTW, separate topic, but I noticed the transform tools don't work as well as I'd hope with transformed curves. Maybe the transform code needs to know about the original vs. deformed coordinates too.
@ -74,6 +75,8 @@ struct CurvesBatchCache {
std::mutex render_mutex;
};
using namespace blender;
Member

I'd rather not add using namespace blender; at the file level. Until these files are properly namespaced (blender::draw here), we should add it at the function scope or add using for specific types at the file level. That's basically what we've been doing so far.

I'd rather not add `using namespace blender;` at the file level. Until these files are properly namespaced (`blender::draw` here), we should add it at the function scope or add `using` for specific types at the file level. That's basically what we've been doing so far.
filedescriptor marked this conversation as resolved
@ -305,1 +305,3 @@
CurvesBatchCache &cache)
static void curves_batch_cache_ensure_edit_points_pos(
const bke::CurvesGeometry &curves,
const bke::crazyspace::GeometryDeformation &deformation,
Member

Maybe it would make sense to pass around just the positions span instead of the whole deformation, since that's all that's really necessary here? That's not a strong opinion though, just a thought.

Maybe it would make sense to pass around just the positions span instead of the whole deformation, since that's all that's really necessary here? That's not a strong opinion though, just a thought.
filedescriptor marked this conversation as resolved
Falk David requested review from Jacques Lucke 2023-02-13 19:09:09 +01:00
Falk David added 1 commit 2023-02-13 19:23:41 +01:00
Falk David added 1 commit 2023-02-13 19:33:18 +01:00
Jacques Lucke approved these changes 2023-02-14 16:01:47 +01:00
Jacques Lucke left a comment
Member

Got one comment, but other than that looks fine.

Got one comment, but other than that looks fine.
@ -753,0 +747,4 @@
using namespace blender;
Curves *curves_id = static_cast<Curves *>(ob->data);
Object *ob_orig = DEG_get_original_object(ob);
Curves *curves_orig_id = static_cast<Curves *>(ob_orig->data);
Member

I'm not sure we can rely on ob_orig to always be non-null for generated curves. So better add a check for that case.

I'm not sure we can rely on `ob_orig` to always be non-null for generated curves. So better add a check for that case.
Falk David added 1 commit 2023-02-14 16:31:17 +01:00
Falk David merged commit 715acf758c into main 2023-02-14 16:33:49 +01:00
Falk David deleted branch curves-edit-overlay-crazyspace 2023-02-14 16:33:50 +01:00
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
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#104705
No description provided.