Age | Commit message (Collapse) | Author |
|
Split retrieval of translated text for the "invalid" messages for NURBS
curves from the actual calculation, which is a lower-level function.
Also fixes an issue where "At least two points required" would always
display in the "Active Spline" panel.
Differential Revision: https://developer.blender.org/D14315
|
|
This patch enables all 8 combinations of Nurbs modes: Cyclic,
Bezier and Endpoint. Also removes restriction on Bezier Nurbs order.
The most significant changes are mode combinations bringing new
meaning. In D13891 is a scheme showing NURBS with same control
points in a modes, and also further description of each possible case.
Differential Revision: https://developer.blender.org/D13891
|
|
Use a shorter/simpler license convention, stops the header taking so
much space.
Follow the SPDX license specification: https://spdx.org/licenses
- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile
While most of the source tree has been included
- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
use different header conventions.
doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.
See P2788 for the script that automated these edits.
Reviewed By: brecht, mont29, sergey
Ref D14069
|
|
MSVC used to warn about const mismatch for arguments passed by value.
Remove these as newer versions of MSVC no longer show this warning.
|
|
- Added space below non doc-string comments to make it clear
these aren't comments for the symbols directly below them.
- Use doxy sections for some headers.
- Minor improvements to doc-strings.
Ref T92709
|
|
These existing names were unhelpful at best, actively confusing at
worst. This patch renames them to be consistent with the terms
used to refer to the values in the UI.
- `width` -> `offset`
- `ext1` -> `extrude`
- `ext2` -> `bevel_radius`
Differential Revision: https://developer.blender.org/D9627
|
|
|
|
While the const correctness of `ListBase` is quite limited, it's helpful
to have a way to retrieve the `Nurb` list from curve object data without
casting away const from the curve.
|
|
|
|
|
|
Also use Curve as an argument instead of Object, since the object was
only used to retrieve the curve, and the calling code is already working
with curve data.
|
|
|
|
|
|
|
|
The issue was that where_on_path uses a resampled curve to get the data
from the curve. This leads to disconnects between the curve the user
sees and the evaluated location data.
To fix this we simply use the actual curve data the user can see.
The older code needed a cleanup either way as there were hacks in other
parts of the code trying to work around some brokenness. This is now
fixed and we no longer need to clamp the evaluation range to 0-1 or make
helper functions to make it do what we actually want.
Reviewed By: Campbell, Sybren
Differential Revision: http://developer.blender.org/D10898
|
|
This fixes T86440
As the CU_2D flag is set for nurbs, a Curve can have 2D nurbs mixed with 3D.
But the UI does not allow this mixing. It updates all nurbs to 2D or 3D when set.
So remove this specific flag for nurbs.
This may break old files, since 2D curves with mixed 3D are now set as 3D.
Differential Revision: https://developer.blender.org/D10738
|
|
|
|
This patch adds a to_curve method to the Object ID. This method is
analogous to the to_mesh method. The method can operate on curve and
text objects. For text objects, the text is converted into a 3D Curve ID
and that curve is returned. For curve objects, if apply_modifiers is
true, the spline deform modifiers will be applied and a Curve ID with
the result will be returned, otherwise a copy of the curve will be
returned.
The goal of this addition is to allow the developer to access the splines
of text objects and to get the result of modifier applications which was
otherwise not possible.
Reviewed By: Brecht
Differential Revision: https://developer.blender.org/D10354
|
|
Remove DNA headers, using forward declarations where possible.
Also removed duplicate header, header including it's self
and unnecessary inclusion of libc system headers from BKE header.
|
|
Restore the old `correct_bezpart()` (pre-rBda95d1d851b4) function as
`BKE_curve_correct_bezpart()`, and use that where the old behaviour was
desired (that is, curve maps like used by the RGB Curves shader node).
The new (post-rBda95d1d851b4) function is also renamed to
`BKE_fcurve_correct_bezpart()` to avoid confusion.
|
|
This reverts commit 0796807720882731cdb70be144aa182e9b0b9ee5.
|
|
Those were only shallow wrappers around `BKE_id_copy`, barely used (even
fully unused in some cases), and we want to get rid of those ID-specific
helpers for the common ID management tasks. Also prevents weird custom
behaviors (like `BKE_object_copy`, who was the only basic ID copy
function to reset user count of the new copy to zero).
Part of 71219.
|
|
It used to be an `int mode`.
|
|
Previously, it was kind of a mess. In different places it was using `char`, `short` and `int`.
The changed properties are flags that are operated upon using bit operations. Therefore, the integer type should be unsigned. Since we only use 2 bits of these flags, `uint8_t` is large enough.
Especially note the change I had to make in `RNA_define.h` to make this work.
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D8844
|
|
Move functionality to get the object type from an ID
into it's own function.
|
|
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
|
|
Also order return matrices last.
|
|
Clang Tidy reported a couple of false positives. I disabled
those `NOLINTNEXTLINE`.
Differential Revision: https://developer.blender.org/D8199
|
|
This changes curve deform code not to set the objects inverse matrix,
this shouldn't cause problems as it's not used elsewhere afterwards.
|
|
|
|
This is an improvement over 2.7x which converted edit-mesh to mesh
(CDDM) for all 3 modifiers.
Overall this increases performance in edit-mode by around 15-20%.
|
|
Move armature/curve functions into their headers,
they were previously in BKE_lattice.h
|
|
When editing a complex curve is very annoying to have all handles at a time. Also, this is a requirement for the current GSoC Edit Grease Pencil using curves.
I have seen that this improvement can be used in any other area of blender, so I have decided to publish the option in the overlay panel..
Reviewed By: fclem, #user_interface, billreynish, Severin
Differential Revision: https://developer.blender.org/D7754
|
|
|
|
When local origins are used or a single control point is selected,
change the handle types from auto to aligned.
|
|
Surrounding includes with an 'extern "C"' block is not necessary anymore.
Also that made it harder to add any C++ code to some headers, or include headers
that have "optional" C++ code like `MEM_guardedalloc.h`.
I tested compilation on linux and windows (and got help from @LazyDodo).
If this still breaks compilation due to some linker error, the header containing
the symbol in question is probably missing an 'extern "C"' block.
Differential Revision: https://developer.blender.org/D7653
|
|
|
|
Also some minor improvements:
- Only run once per object data instance.
- Correction for mesh smooth flag being used on curves.
- Move curve operation into utility function.
|
|
|
|
|
|
Instead of using anonymous booleans flags, also allows to keep the same
behavior in all cases, without needing special handling from calling
code for our beloved oddballs object proxies...
|
|
|
|
|
|
BKE_nurb_type_convert now takes r_err_msg and is more specific in the
error message...
ref T71672.
Maniphest Tasks: T71672
Differential Revision: https://developer.blender.org/D6275
|
|
When introducing "drag-all-selected" support all over Blender, we
figured this wouldn't work well with the Graph Editor
selection/transform behavior.
Hence, William and I worked on the following changes, although we used
this chance to improve the behavior in general too.
For more info see T70634.
* Handles now always move with the key, regardless if they are selected
or not.
* Selecting the key doesn't select the handles anymore, their selection
is separate.
* Multiple keys and handles can now be dragged.
* Dragging a handle moves all selected handles **on the same side**.
* Tweak-dragging any handle can never affect any keyframe location,
only handles.
* G/R/S should behave as before.
* Changing the handle type with a key selected always applies the change
to both handles.
* Box selection with Ctrl+Drag now allows deselecting handles (used to
act on entire triple only).
* Box selection //Include Handles// option now only acts on visible
handles, wasn't the case with Only Selected Keyframes Handles enabled.
* Box selection //Include Handles// is now enabled by default in all
bundled keymaps.
The changes have been tested for some days by the animators here in the
Blender Animation Studio. Some changes are based on their feedback.
Also, this improves/adds comments for related code.
Differential Revision: https://developer.blender.org/D6235
Reviewed by: Sybren Stüvel, William Reynish
|
|
|
|
These were only strictly valid for texture space calculation, don't store them
since they should not be used after that. Only store a flag to indicate if the
auto texture space has been evaluated.
In the future it might make sense to store bounding boxes at the mesh level to
speed up bounding box computation for multiple objects using the same mesh, but
then it will need to be implemented differently.
|
|
|
|
|
|
Currently supports mesh, armature, lattice, curve & metaballs.
Access from pivot popover.
|