Age | Commit message (Collapse) | Author |
|
Curve Points of handle of type `Auto` on curves not uniformly scaled
cause the shape of the curve to be modified after applying the scale.
So change these handles to `Aligned` in these cases.
Reviewed By: campbellbarton
Maniphest Tasks: T90736
Differential Revision: https://developer.blender.org/D12281
|
|
callbacks.
This was not really useful, and added estra useless steps in case and ID
should not actually be written.
Further more, it prevented clearing the usercount on write, which can be
cause a false positive 'chanhged' detection in undo/redo case.
|
|
Originally D11886 by @ghaspias with minor edits applied.
|
|
|
|
|
|
|
|
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
Before rBf674976edd88, the flag indicating whether a curve was 2D or 3D was
ignored by Surfaces objects.
So it can be said that Surfaces objects were always 3D.
We could remove updates to 2D on Surface objects, so the behavior is
identical to what it was before.
But this would also cause the return of `data.dimensions` to be misleading,
complicate the code a bit and add a micro overhead.
So the solution here is just to init all Surface objects as 3D.
Surface objects can now be constrained to 2D with the command:
```
data.dimensions = '2D'
```
|
|
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 was added in rB93aeb6b318a7, last changed in rB8f0a44a5d55d,
and removed in rB51b796ff1528. I assume it was a way for curves to
have split edges at corners. As far as I can tell it only ever worked
in Blender Internal, and that has been gone for years.
Another possible route here would be restoring this functionality,
but it's generally preferrable to reduce complexity in this
area of curve code than adding it back, especially in the context
of other improvements planned related to curves in geometry nodes.
Differential Revision: https://developer.blender.org/D9966
|
|
This concerns currently only collections (`master_collection` of scenes)
and root node trees. It removes the matching type-specific helpers
(`BKE_collection_master_scene_search` and `BKE_node_tree_find_owner_ID`).
No functional change expected here.
NOTE: Current implementation of `owner_get` is far from optimal, we
could probably do it better, see {T69169}.
NOTE: While it could also have it, shapekeys IDTypeInfo was left out of
this change for now. Mainly because it sould not be used currently, and
we ultimately want to demote shape keys from ID status anyway.
|
|
|
|
Currently this is needed to properly tag PointCache's for info update
(fixes an issue reported in T82503).
Suspect we may need this in more cases in the future though, RNA
assign/update processes are not always 100% enough to deal with
complicated corner cases.
|
|
Comment blocks not conforming to convention.
|
|
Caused by fix for T80742, 4987b7d347a885916916a888c18401ea2fe552f4.
Keep the fix that calculates the start/end direction
from adjacent points but only use it as a fallback.
|
|
The value of l[count-1] should be ready by the time hmin/hmax is computed.
Otherwise the left limit for the transition key would be scaled wrong.
|
|
|
|
|
|
|
|
Initialize the direction on the first/last points of the curve.
The fix from 23a4149778c87 exposed this error.
|
|
|
|
|
|
Divide the threshold by the resolution to prevent duplicates
being detected in high resolution curves.
|
|
memfile undos
This is essentially adding that new callback, and using it only for already
existing Scene's 3DCursor.
Note that the place where this is called has been moved again, after all
have been lib-linked, such that those callbacks may also work on ID pointers.
Maniphest Tasks: T71759
Differential Revision: https://developer.blender.org/D9237
|
|
This is a followup to rBa308607a533, using the macro in a few places
that were missed.
|
|
This commit uses continue in loops and returning early to reduce
indentation in long functions, only where this results in a significant
improvement. Also includes a few LISTBASE_FOREACH macros.
|
|
These changes should result in more readable and undestandable code,
especially where while loops were use instead of for loops. They are
not comprehensive, and I skipped wherever the change was not obvious.
|
|
Corrects incorrect usage of contraction for 'it is', when possessive 'its' was required.
Differential Revision: https://developer.blender.org/D9250
Reviewed by Campbell Barton
|
|
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.
|
|
Follow our code style guide by using C-comments for text descriptions.
|
|
This reverts commit 0796807720882731cdb70be144aa182e9b0b9ee5.
|
|
Better use higher-level code from common ID management when possible.
Helps to de-duplicate logic, and reduces outside usages of more
'dangerous' functions.
Note that we could get rid of many of those `BKE_<id_type>_add`
functions now, but on the other hand several of those take extra
parameters and perform additional actions, so think we can keep them all
for now as 'non-standard ID specific creation functions'.
|
|
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.
|
|
No reasons to keep the new ID pointer as parameter here.
Part of T71219.
|
|
It used to be an `int mode`.
|
|
The CurveProfile struct was only being written to the file for regular
curve objects. Caused by an incorrect merge of master before committing.
|
|
This adds support for the same custom bevel profile widget used in
the bevel tool and modifier to the geometry generation for curves.
This is expecially useful for text and 2D curves with extrusion, as
it works much better than a weld & bevel modifier combination.
It can also be useful for adding quick detail to pipe-like objects.
The curve holds the CurveProfile struct and a new "Bevel Mode"
property decides which type of bevel to build, round, object, or
custom profile.
Although curves can already use another curve to make the bevel
geometry, this is a quicker way, and it also defines the profile of
just one corner of the bevel, so it isn't redundant. It's also nice
to have the same custom profile functionality wherever there is bevel.
Differential Revision: https://developer.blender.org/D8402
|
|
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
|
|
|
|
|
|
|
|
No functional changes
|
|
Move functionality to get the object type from an ID
into it's own function.
|