Age | Commit message (Collapse) | Author |
|
Light groups are a type of pass that only contains lighting from a subset of light sources.
They are created in the View layer, and light sources (lamps, objects with emissive materials
and/or the environment) can be assigned to a group.
Currently, each light group ends up generating its own version of the Combined pass.
In the future, additional types of passes (e.g. shadowcatcher) might be getting their own
per-lightgroup versions.
The lightgroup creation and assignment is not Cycles-specific, so Eevee or external render
engines could make use of it in the future.
Note that Lightgroups are identified by their name - therefore, the name of the Lightgroup
in the View Layer and the name that's set in an object's settings must match for it to be
included.
Currently, changing a Lightgroup's name does not update objects - this is planned for the
future, along with other features such as denoising for light groups and viewing them in
preview renders.
Original patch by Alex Fuller (@mistaed), with some polishing by Lukas Stockner (@lukasstockner97).
Differential Revision: https://developer.blender.org/D12871
|
|
Also solves two warnings from the previous similar commit,
f688e3cc3130e70e77f0bb0. The change to the grease pencil
modifier is quite suspicious, but doesn't change the behavior,
which was already broken.
|
|
This abstraction doesn't serve any purpose after 11c6d4e88eb919.
The flag on bounding boxes isn't used, except for the dirty tag.
|
|
This can help make some refactoring to bounding boxes slightly easier.
|
|
|
|
The Alembic procedural was only enabled during viewport renders
originally because it did not have any caching strategy. Now that
is does, we can allow its usage in final renders.
This also removes the `dag_eval_mode` argument passing to
`ModifierTypeInfo.dependsOnTime` which was originally added to detect if
we are doing a viewport render for enabling the procedural.
Differential Revision: https://developer.blender.org/D14520
|
|
This commit moves declarations that depend on `FN_field.hh` out of
`BKE_geometry_set.hh` into `BKE_geometry_fields.hh`. This helps to
reduce the number of areas that need to depend on the functions module,
which recently came in in review of D11591.
In the future we may have a library of standard field inputs in order to
make composing algorithms easier, so it makes sense to have a header
that could contain them and some basic related utilities relating the
concepts of geometry and fields.
Reducing use of unnecessary headers may also reduce compilation time.
Differential Revision: https://developer.blender.org/D14517
|
|
This commit ports the "Set Handle Positions" and "Set Hanle Type"
nodes to use the new curves data-block. The nodes become simpler
and likely much faster too, though they're usually not the bottleneck
anyway.
Most of the code is ported from `BezierSpline` directly. The majority
of the complexity comes from the interaction between different
automatically calculated handle types. In comparison `BezierSpline`,
the calculation of auto handles is done eagerly-- mostly because it's
simpler. Eventually lazy calculation might be good to add.
Differential Revision: https://developer.blender.org/D14464
|
|
Direct replacement of code:
- memcpy of a single point is done as a shallow_copy() assignment.
- memcpy of a range of points is done with an explicit cast to void*
to tell compiler that we really want to memcpy even a non-trivial
type.
In some cases it seems that memcpy can be used more (points are copied
in a loop). Those left as-is since this is supposed to be a simple
cleanup.
Differential Revision: https://developer.blender.org/D14505
|
|
|
|
Also change some remaining cases of "hair object" to "curves object".
|
|
This commit makes the dot grid used as background in the node editor
more visually stable when zooming in and out.
The dot grid now uses a continuously subdividing pattern, where
each level of subdivision divides the previous five times, similar to
the line grid in the 3D viewport.
The maximum for the "Grid Levels" theme setting is changed to 3, since
any further subdivisions are too small to be visible.
The "Grid Levels" value for the default themes "Blender Dark" and
"Blender Light" is therefore changed to 3, as well.
Reviewed By: Hans Goudey, Pablo Vazquez
Differential Revision: http://developer.blender.org/D13302
|
|
When a `GPencilUpdateCacheNode` is created, it always allocates the
`children` pointer. This should not be freed until the whole cache is
deleted.
The `cache_node_update` would free the `children` pointer in a specific
case, causing a double-free later when the cache was removed.
|
|
|
|
87e9451d660e8288d missed updating the behavior for Catmull Rom curves.
|
|
Using the evaluated lengths cache from 72d25fa41d8c575, re-implement
the curve parameter node with the new data structure. Conceptually
it works the same way, but the code is restructured and cleaned up
a bit as well. This also adds support for Catmull Rom curves.
Differential Revision: https://developer.blender.org/D14461
|
|
The idea that curves with two points cannot be cyclic came from some
existing code, but there's not fundamental reason for it, so remove the
check in this function. The case can be handled elsewhere if necessary.
|
|
This commit adds calculation of lengths along the curve for each
evaluated point. This is used for sampling, resampling, the "curve
parameter" node, and potentially more places in the future.
This commit also includes a utility for calculation of uniform samples
in blenlib. It can find evenlyspaced samples along a sequence of points
and use linear interpolation to move data from those points to the
samples. Making the utility more general aligns better with the more
functional approach of the new curves code and makes the behavior
available elsewhere.
A "color math" header is added to allow very basic interpolation
between two colors in the `blender::math` namespace.
Differential Revision: https://developer.blender.org/D14382
|
|
|
|
|
|
|
|
Add new `BKE_id_is_editable` helper in `BKE_lib_id.h`, that supercedes
previous check (simple `ID_IS_LINKED()` macro) for many editing cases.
This allows to also take into account 'system override' (aka
non-editable override) case.
Ref: {T95707}.
|
|
single' operations.
'Delete' was a confusing name, even though it would delete the overrides
it would replace them by linked data.
Adding the 'single' version of that operation made it even more
confusing, since often it has to keep the override ID for sakes of
hierarchy, and just reset it and turn it back into a non-editable system
override.
Ref: {T95707}.
|
|
creation/duplication/resync code, and some basic do_version.
When creating with hierarchies, core code only generates system
overrides, responsibility to define 'user overrides' is then for the
higher-level calling code (Editor/Operator-level).
do_version code uses fairly basic euristics, should be good enough here
though in most cases. and can always be refined later if needed.
Ref: {T95707}.
|
|
This merely adds the flag, exposes it in RMA, and uses it in some of the
most common 'is editable' checks (RNA, `BASE_EDITABLE` macro...).
Next step: do_version and defining systemoverrides at creation.
Ref: {T95707}.
|
|
Ref T96847
Maniphest Tasks: T96847
Differential Revision: https://developer.blender.org/D14487
|
|
The "dupli" system now has a faster, more powerful, and more flexible
alternative with geometry nodes. Since the point cloud objects haven't
been exposed in the non-experimental UI yet, we can remove the dupli
implementation and the panel for the object type.
Differential Revision: https://developer.blender.org/D14482
|
|
Adds supports for collection previews that are rendered automatically when
collections are marked as assets. (Or when preview rendering is triggered
differently, e.g. through the //Refresh Data-Block Previews// operator).
Idea in this patch is to create a collection instance empty outside of main for
the collection, and then reuse the object rendering code to render the preview.
This keeps things very simple and works just fine.
Differential Revision: https://developer.blender.org/D14460
Reviewed by: Bastien Montagne
|
|
partial overrides of a same hierarchy.
If creating partial hierarchy overrides (from the outliner e.g.), that
need to create extra overrides, those could be re-created everytime,
leading to very bad situation where there would be several overrides of
the same reference ID in the same override hierarchy.
This fix makes it so that existing overrides in a given hierarchy will
always be re-used in case other overrides are added to the hierarchy.
|
|
Replaces old-style memzero-style of call with zero-initializer.
Allows to shorten typical initialization code to a single line:
Object foo = blender::dna::shallow_zero_initialize<Object>()
This will allow to more easily convert designated initializer
which is often used to fill object with zeroes to the explicit
function calls:
MyDNAStruct foo = {};
will be translated to
MyDNAStruct foo = blender::dna::shallow_zero_initialize<MyDNAStruct>();
Differential Revision: https://developer.blender.org/D14486
|
|
Use shallow_copy, no need in copy_memory.
The latter appeared as some last minute solution for a compilation
warning on Friday.
|
|
This is meant to allow using C++ data structures in this file
as a performance improvement. Particularly `Vector` instead
of `ListBase` for `duplilist`. This change builds and passes
tests on all platforms on the buildbot.
|
|
|
|
Crashed e.g. FBX exporter.
Mistake in rB0c33e84020deca.
|
|
Also rename DNA struct members.
|
|
In preparation for supporting packing of UDIM tiled textures, this patch
refactors a small portion of image.cc. The refactor should lead to less
duplicate code now and when Tiled images are added in the near future.
This patch is based on the prior work done for D6492 where it was
requested this part be split and can be summarized as follows:
- `load_sequence_single` is removed and merged with `load_image_single`
- `image_load_sequence_file` is removed and merged with `image_load_image_file`
Reviewed By: lukasstockner97
Differential Revision: https://developer.blender.org/D14327
|
|
Left over from rBaab5ac25f2c2e6fbc50f9fb352e71ef0ae0ba2f1
|
|
|
|
This commit implements generic evaluation for Bezier curves (which is
really just linear interpolation, since attributes are not stored on
Bezier handles). For complete parity with the old curve type, we would
have to add options for this (RNA: `Spline.radius_interpolation`),
but it's not clear that we want to do that.
This also adds a generic `interpolate_to_evaluate` utility on curves
that hides the implementation details. Though there is theoretically
a performance cost to that, without some abstraction calling code
would usually be too complex.
Differential Revision: https://developer.blender.org/D14447
|
|
This commit adds a utility that returns an array with the number
of curves of every type. One use case for this is detecting whether
to remove handle or NURBS attributes when changing curve types.
It's best to avoid using this when it's not necessary, but sometimes
it can't really be avoided, and having a utility at least makes using
an optimized version simple.
In the future, this information can be cached in the curves runtime.
Differential Revision: https://developer.blender.org/D14448
|
|
This patch makes the grease pencil smooth operation symmetric.
It also increases the performance a lot if strong smoothing is
required. Additionally there is an option for the position smooth
operation to keep the shape closer to the original for more iterations.
Since the result differs from the previous algorithm, versioning is used
to change the iterations and factor to match the old result.
Differential Revision: http://developer.blender.org/D14325
|
|
Thanks Jacques for finding solution for deprecation warning
which was generated by GCC for constructor.
The rest of the change is related on fixing memaccess warning
which was happening when memset/memcpy was used directly on
the DNA object pointer. Now there are two utility functions
for this:
- blender::dna::zero_memory
- blender::dna::copy_memory
|
|
This change makes it possible to add implementation of common
C++ methods for DNA structures which helps ensuring unsafe
operations like shallow copy are done explicitly.
For example, creating a shallow copy used to be:
Object temp_object = *input_object;
In the C++ context it was seen like the temp_object is
properly decoupled from the input object, while in the
reality is it not. Now this code becomes:
Object temp_object = blender::dna::shallow_copy(*input_object);
The copy and move constructor and assignment operators are
now explicitly disabled.
Other than a more explicit resource management this change
also solves a lot of warnings generated by the implicitly
defined copy constructors w.r.t dealing with deprecated fields.
These warnings were generated by Apple Clang when a shallow
object copy was created via implicitly defined copy constructor.
In order to enable C++ methods for DNA structures a newly added
macro `DNA_DEFINE_CXX_METHODS()` is to be used:
tpyedef struct Object {
DNA_DEFINE_CXX_METHODS(Object)
...
} Object;
For the shallow copy use `blender::dna::shallow_copy()`.
The implementation of the memcpy is hidden via an internal DNA
function to avoid pulling `string.h` into every DNA header.
This means that the solution does not affect on the headers
dependencies.
---
Ideally `DNA_shallow_copy` would be defined in a more explicit
header, but don;t think we have a suitable one already. Maybe
we can introduce `DNA_access.h` ?
Differential Revision: https://developer.blender.org/D14427
|
|
|
|
This reverts commit 8c44793228750537c08ea7b19fc18df0138f9501.
Apparently, this generated a lot of warnings in GCC.
Didn't find a quick solution and is it not something I want to be
trading between (more quiet Clang in an expense of less quiet GCC).
Will re-iterate on the patch are re-commit it.
|
|
This change makes it possible to add implementation of common
C++ methods for DNA structures which helps ensuring unsafe
operations like shallow copy are done explicitly.
For example, creating a shallow copy used to be:
Object temp_object = *input_object;
In the C++ context it was seen like the temp_object is
properly decoupled from the input object, while in the
reality is it not. Now this code becomes:
Object temp_object = blender::dna::shallow_copy(*input_object);
The copy and move constructor and assignment operators are
now explicitly disabled.
Other than a more explicit resource management this change
also solves a lot of warnings generated by the implicitly
defined copy constructors w.r.t dealing with deprecated fields.
These warnings were generated by Apple Clang when a shallow
object copy was created via implicitly defined copy constructor.
In order to enable C++ methods for DNA structures a newly added
macro `DNA_DEFINE_CXX_METHODS()` is to be used:
tpyedef struct Object {
DNA_DEFINE_CXX_METHODS(Object)
...
} Object;
For the shallow copy use `blender::dna::shallow_copy()`.
The implementation of the memcpy is hidden via an internal DNA
function to avoid pulling `string.h` into every DNA header.
This means that the solution does not affect on the headers
dependencies.
---
Ideally `DNA_shallow_copy` would be defined in a more explicit
header, but don;t think we have a suitable one already. Maybe
we can introduce `DNA_access.h` ?
Differential Revision: https://developer.blender.org/D14427
|
|
|
|
Clear the nurbs basis cache dirty flag when its evaluation finishes.
Remove an incorrect assert that the evaluated size couldn't be zero.
It can, when `check_valid_size_and_order` returns false.
|
|
|
|
Add a function to retrieve the points for an index range of curves,
and move "ensuring" the offsets to a separate function, since it's
often nicer to call that if you don't need the result span immediately.
|