Age | Commit message (Collapse) | Author |
|
|
|
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 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
|
|
Currently, when a taper object is specified, the radius of the spline is
ignored. This patch adds a new option to control how the taper object
affect the effective radius of the spline. The option allow three modes
of operation:
- Override: The old method. The radius of the spline is ignored and
overridden.
- Multiply: The radius of the spline is multiplied by the taper radius.
- Add: The radius of the spline is added to the taper radius.
Ref D10779
|
|
Used for local structs/variables,
since `ofs` is by far the most widely used abbreviation.
|
|
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
|
|
|
|
Caused by cleanup in rBcdb3cbd64401, where an index
was used to index `float *` instead of `float[3]`.
|
|
A few related improvements to the three functions:
- Reduce variable scope
- Use for loops instead of while loops
- Use const, bool instead of int
- Generally make logic easier to read
|
|
Comment blocks not conforming to convention.
|
|
Copy the smooth setting when filling in curve caps.
For drawing this doesn't change behavior as a single normal is used
for all faces.
The difference may be noticed when converting to a mesh or with
modifiers applied.
|
|
Bevel caps always had incorrect normals, causing display glitches
in some cases.
It seems this never worked properly (at least 2.79 also had this bug).
Use the projection vector as the normal.
|
|
This makes it clear that only the final "r_data" is being changed.
Also rename a variable to be less vague.
|
|
Just a few minor improvements: declare variables where they are
initialized, decrease scope, expand some variable names, and use
LISTBASE_FOREACH.
|
|
Having up to nine levels of indentation make this function hard to
follow. Instead of indenting the rest of the loop for a simple special
case, just continue.
|
|
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.
|
|
Caused by rBa308607a5334, which mistakenly removed these lines.
|
|
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 34 miscellaneous misspelled words.
Differential Revision: https://developer.blender.org/D9248
Reviewed by Campbell Barton
|
|
Note that possibility to pass the new ID pointer as parameter was kept,
as this is needed for some rather specific cases (like in depsgraph/COW,
when copying into already allocated memory).
Part of T71219.
|
|
I think this wasn't allowed before because the section of a curve was
built in multiple parts. But since rBe34d3e32dda7, the whole slice
of a curve is built in one piece, so we can easily support curve
caps for all geometry types, including the new custom profile option.
Note that this also allows "caps" when the fill type is not full.
They could easily be disabled by checking for "Full" fill type
if that was preferred in the future.
See the patch for images.
Differential Revision: https://developer.blender.org/D8911
|
|
Also order sizeof(..) first to promote other values to size_t.
|
|
|
|
|
|
|
|
This is to improve the case of T71055 where curves share the same batch
cache when they shouldn't.
This however, does not help to fix edit mode display.
The real fix would be to have a similar handling to what the mesh modifiers
do and duplicate the whole Curve data. But this is too much work/change for
the 2.83 release.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7569
|
|
This is to improve the case of T71055 where curves share the same batch
cache when they shouldn't.
This however, does not help to fix edit mode display.
The real fix would be to have a similar handling to what the mesh modifiers
do and duplicate the whole Curve data. But this is too much work/change for
the 2.83 release.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7569
|
|
There is no user visible difference in standard builds, as there are no
volume modifiers yet. When using WITH_NEW_OBJECT_TYPES some deform only
modifiers are now available for hair and pointcloud objects.
Differential Revision: https://developer.blender.org/D7141
|
|
The files are now split up into the following sections:
- `BKE_anim_path.h` and `anim_path.c` for path/curve functions.
- `BKE_anim_visualization.h` and `anim_visualizationanim_path.c` for
animation visualization (mostly motion paths).
- `BKE_duplilist.h` for DupliList function declarations. These were
already implemented in `object_dupli.c`, so they were rather out of
place being declared in `BKE_anim.h` in the first place.
No functional changes.
|
|
|
|
This is in preparation of new object types. This only changes mesh_eval, we
may do the same for mesh_deform_eval and other areas in the future if there is
a need for it.
This previously caused a bug in T74283, that should be fixed now.
Differential Revision: https://developer.blender.org/D6695
|
|
than mesh"
This reverts commit f2b95b9eae2ee913c99cff7595527b18d8b49d0a.
Fix T74283: modifier display lost when moving object in edit mode.
The cause is not immediately obvious so better to revert and look at this
carefully.
|
|
This is in preparation of new object types. This only changes mesh_eval, we
may do the same for mesh_deform_eval and other areas in the future if there is
a need for it.
Differential Revision: https://developer.blender.org/D6695
|
|
|
|
Note that `BKE_library.h`/`library.c` were renamed to
`BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here.
Part of T72604.
|
|
Missed from fix for T70594 which reversed the normals,
Resolves T70809
|
|
- All parts of the code that need tessface should calculate it on demand.
- The check for tessloopnormal mask isn't correct
(since this is loop data, not tessface data).
|
|
Currently supports mesh, armature, lattice, curve & metaballs.
Access from pivot popover.
|
|
|
|
This also splits vertex access and allocation so it's possible
to copy coordinates into an existing array without allocating it.
|
|
T68035 by @luzpaz
|
|
We need to tag the `mesh_eval` of curve as owned, when we generate one,
otherwise freeing code would not free it.
|
|
|
|
This is old logic that no longer makes sense in the new depsgraph, and causes
issues when multiple threads try to modify the same bevel object.
Differential Revision: https://developer.blender.org/D4913
|
|
Curve function had two arguments:
- for_render, which was originally supposed to be used to control
whether viewport or render visibility for modifiers is to be
used.
- use_render_resolution, which sounds like it is supposed to control
whether viewport or render resolution for curves is to be used.
What is totally confusing is that those arguments were used
interchangeably: sometimes use_render_resolution would control
modifiers visibility.
This commit makes it so there is one single argument for this.
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D4850
|
|
|
|
Were ifdef-ed for a long time.
|
|
Force Displist to Mesh conversion if there is any modifier.
This is until we find a better way to store the batches per objects.
Also fix draw cache functions that were not returning final mesh edges.
|