Curve Editing - Recalculate handles #37799
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#37799
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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?
First off: I just started looking into Blender development, did my first build yesterday, wrote my first lines of blender code today, and this is my first post here - hi everyone! :)
For my first challenge I picked one of the beginner dev tasks from the [[ http://wiki.blender.org/index.php/Dev:Doc/Quick_Hacks
I already have an implementation ready, but before going into code review I would like to open a quick round for discussing my approach as to how it works and where it is appears in the UI. (And to be totally frank, I still need to figure out a bug that occurs only on the second consecutive run :D ...)
Here's where I placed the button (3D View Toolshelf in Editmode below the handle type settting buttons):
My implementation is:
Thus the use-case for this functionality would be to reset the curvature on a curve that contains sharp (Vector) and soft (Free/Aligned/Auto) turns, but retaining the sharp turns.
Ok so that's it from my side, I'm looking forward to your comments! Feel free to also abandon the idea altogether, it really is a bit exotic, and i won't be disappointed if it turns out this idea was "approved" (see wiki) too long ago, and the needs have changed now.
P.s.: I'll see if i can get the code changes uploaded here tomorrow, it's all a bit much at the moment in terms of learning all the procedures and I'm too tired now anyway to tackle this as well. ;)
Changed status to: 'Open'
Added subscriber: @simonrepp
Added subscribers: @Sergey, @KevinMackay, @ideasman42
Hi Simon,
I think this can be done with one less step, check on uses of
BKE_nurb_handle_calc
/BKE_nurb_handle_calc_simple
You could loop over every bezier point, store its
h1
,h2
values, runBKE_nurb_handle_calc_simple
(), and restoreh1
,h2
immediately after.After that loop - run
BKE_nurb_handles_calc
on the entire spline.This can work because BKE_nurb_handle_calc only uses the locations of the next/prev points, not their handle types.
Added subscriber: @brecht
Hey!
Campbell's solution is simple and might work, yeah. Just somehow thinking of adding
BKE_nurb_handle_calc_ex
with additional argument force_handle_type, so no temporary modifications to DNA is needed.@ideasman42, @brecht: do you have strong opinion on this?
hey,
thanks for the feedback, i just tried implementing the simplified approach @ideasman42 suggested, and it works perfectly! (also got rid of the breakage on consecutive runs this way)
While playing around with this I actually discovered that the functionality isn't that exotic at all, it's really quite cool for moving around a single or a few points in the curve and then recalculating the handles just for that selection to get it back to a sane curvature. (Comparable to using 'Smooth vertex' when working with a mesh), so I'm actually in favor for integrating it now, and of course I'm looking forward to your opinion on this!
I'll try to get the code up now, so you can look at the nitty gritty details and try the functionality out for yourself. :)
I just uploaded the diff and attached it to this task, hope I did this the correct way too.
Changed status from 'Open' to: 'Resolved'
Committed
c456cd94b2
Ended up making some changes.
Cool thanks, learned a lot here. On to new tasks ... :)