Commit Graph

10 Commits

Author SHA1 Message Date
Sebastian Parborg 2115232a16 Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fix
No functional changes
2020-09-04 21:04:16 +02:00
Hans Goudey 417695e4a8 Curve Profile: Miscellaneous cleanup
- Declare variables where they are initialized
- Use consistent variable and static function names
- Use helper functions more for common operations
- Remove use of BezTriple struct, use CurveProfilePoint instead
- Apply small simplifications to code in some situations
2020-09-04 10:56:56 -05:00
Jacques Lucke 7283e6fb73 Merge branch 'blender-v2.90-release' into master 2020-08-07 10:04:57 +02:00
Jacques Lucke 91694b9b58 Code Style: use "#pragma once" in source directory
This replaces header include guards with `#pragma once`.
A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`),
because they are used in other places.

This patch has been generated by P1561 followed by `make format`.

Differential Revision: https://developer.blender.org/D8466
2020-08-07 09:50:34 +02:00
Campbell Barton 901ee66ea1 Cleanup: use term init instead of initialize/initialise
The abbreviation 'init' is brief, unambiguous and already used
in thousands of places, also initialize is often accidentally
written with British spelling.
2020-08-01 13:51:05 +10:00
Hans Goudey baff05ad1c UI: Add Free Handle Types to CurveProfile Widget
Under the hood the CurveProfile widget (used for bevel custom profiles)
uses a bezier curve, but right now though it only supports two of the
bezier curve handle types, vector and auto. This patch adds support for
free handles and adds all of the logic for editing them.

This is the first step to the ability to import and export curve objects
in the widget.

There's some code cleanup in curveprofile.c. Movement for handles and
control points is abstracted to functions there rather than happening
in interface_handlers.c.

An "Apply Preset" button is also added, which solves a confusing issue
where you apply a preset, then change the number of samples and the
preset doesn't change. The button makes it clear that the preset needs
to be reapplied.

Reviewed By: Severin

Differential Revision: https://developer.blender.org/D6470
2020-06-24 11:50:01 -04:00
Jacques Lucke 56f9529775 Refactor: move blenloader code of curve profile to blenkernel 2020-06-23 17:08:39 +02:00
Jacques Lucke 5de56f9596 Cleanup: make remaining blenkernel headers work in C++ 2020-03-02 15:07:49 +01:00
Campbell Barton 7c18fcbe03 Cleanup: clang-format
Also remove unused vars.
2019-11-21 23:15:02 +11:00
Hans Goudey ba1e9ae473 Bevel: Custom Profile and CurveProfile Widget
Custom profiles in bevel allows the profile curve to be controlled by
manually placed control points. Orientation is regularized along
groups of edges, and the 'pipe case' is updated. This commit includes
many updates to comments and changed variable names as well.

A 'cutoff' vertex mesh method is added to bevel in addition to the
existing grid fill option for replacing vertices.

The UI of the bevel modifier and tool are updated and unified.

Also, a 'CurveProfile' widget is added to BKE for defining the profile
in the interface, which may be useful in other situations.

Many thanks to Howard, my mentor for this GSoC project.

Reviewers: howardt, campbellbarton

Differential Revision: https://developer.blender.org/D5516
2019-11-20 16:25:28 -05:00