Curves: Add cursor snapping support #104967
No reviewers
Labels
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#104967
Loading…
Reference in New Issue
No description provided.
Delete Branch "filedescriptor/blender:curves-cursor-snapping"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This adds support for cursor snapping for the new curves object.
It implements a function
transverts_from_curves_positions_create
(to separate the logic from theCurves
object type). That function is then C wrapped byED_curves_transverts_create
and finally used inED_transverts_create_from_obedit
.Works well for me-- only thing that doesn't is that there's no active concept yet, but that still shows in the pie menu. Not sure about the best way to handle that yet.
@ -7,0 +23,4 @@
threading::parallel_for(selection.index_range(), 1024, [&](const IndexRange selection_range) {
for (const int point_i : selection_range) {
TransVert &tv = tvs->transverts[point_i];
tv.loc = reinterpret_cast<float *>(&positions[selection[point_i]]);
Just
tv.loc = positions[selection[point_i]];
worked okay for me.@ -7,0 +24,4 @@
for (const int point_i : selection_range) {
TransVert &tv = tvs->transverts[point_i];
tv.loc = reinterpret_cast<float *>(&positions[selection[point_i]]);
tv.flag = true;
Might be better to use
SELECT
for now, since that's how the other object types do it@ -59,0 +65,4 @@
/**
* Allocate an array of `TransVert` for cursor/selection snapping (See
* `ED_transverts_create_from_obedit` in `view3d_snap.c`).
* Note: the `TransVert` elements in \a tvs are expected to write to the positions of \a curves.
* Note:
->* \note:
243cc28e89
tobd91650e21