Age | Commit message (Collapse) | Author |
|
Using alloca in C++ is not recommended, especially when we have the
blender::Array type that can contain an inline buffer.
|
|
This commit cleans up the RNA names of select mirror operators so that
they are all "Select mirror".
This makes the select menu in edit/pose mode consistent regardless of
object type.
Differential Revision: https://developer.blender.org/D7356
|
|
|
|
|
|
This is especially useful when trying to add a node group instance, e.g. via
drag & drop from the Outliner or Asset Browser.
Previously this would just silently fail, with no information why. This is a
source of confusion, e.g. earlier, it took me a moment to realize I was
dragging a node group into itself, which failed of course.
Blender should always try to help the user with useful error messages.
Adds error messages like: "Nesting a node group inside of itself is not
allowed", "Not a compositor node tree", etc.
Adds a disabled hint return argument to node and node tree polling functions.
On error the hint is reported, or could even be shown in advance (e.g. if
checked via an operator poll option).
Differential Revision: https://developer.blender.org/D10422
Reviewed by: Jacques Lucke
|
|
Allow users to undo the effect of the "Generate Preview" operator in the
asset browser (`ED_OT_lib_id_generate_preview`). Without this, the
button is too dangerous.
|
|
A few strings describing RNA objects were wrong, including copy/paste errors, spelling and case.
Reviewed By: Blendify
Differential Revision: https://developer.blender.org/D10899
|
|
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'
```
|
|
The mixing function was designed to give correct results for Mix values of
-1, 0, and +1, but the behavior between these points was not linear. This is
unavoidable, because the function depends on both Mix and Mix^2 (by
multiplying value and mf) so they could not cancel out completely.
The new formula simply calculates the weighted sum without trying to invent
a smooth function.
Value for MixGlareOperation is now passed directly without scaling because
it is then easier to use.
Note that the previous formula performed max() twice for both input image
and the result, now there is just one max() per channel because the glare
input can't be negative.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D7138
|
|
Related to {T77023}. When using many Denoise nodes the memory in OIDN
are allocated up front. A mutex could stall the process until. This
change will allocate the memory after it received the lock.
|
|
File output node always received the resolution from the first socket.
When that socket didn't had a link it would use a resolution of 0,0.
What lead to not saving the file at all.
This only effected Multi layer OpenEXR files.
This change would go over all the links to find the first valid
resolution.
|
|
In recent refactor the operator sockets were migrated from a std::list to a blender::Vector.
The way how the file output node created the sockets along mapping the sockets could
lead to storing incorrect pointers.
This patch fixes this by defining and mapping the sockets in separate loops.
|
|
Differential Revision: https://developer.blender.org/D10956
|
|
This also fixes the issue that the width of the "Name" column
when viewing instances does not resize correctly.
Differential Revision: https://developer.blender.org/D10926
|
|
|
|
Add argument to BM_vert_collapse_faces to remove any faces that become
duplicate as result of the collapse.
|
|
- Remove `make_quicky` as on modern systems linking is the main
bottleneck, and there isn't such a gain from partial builds.
- Remove enum generator as `PyC_StringEnumItems` & `EnumPropertyItem`
are used in most places to access enums from Python, otherwise macros
are added via macros.
|
|
Previously it was not possible to subdivide the last segment of a cyclic
stroke.
The fix makes sure that the correct number of new points is calculated
correctly and adds the new points to the last segment.
Reviewed By: antoniov
Maniphest Tasks: T87157
Differential Revision: https://developer.blender.org/D10902
|
|
|
|
|
|
|
|
Menu search used an area with a NULL data pointer,
replace this with a dummy pointer.
Caused by 3f3b4745b6ad99a0503fba4793d0f1febedadebc.
|
|
Linked override were not properly ignored in some part of the code,
leading to invalid resync results in some cases with recursive overrides
(i.e. overrides of overrides).
Reported by Andy @eyecandy from the studio.
|
|
overrides.
We do not want to copy exiting overrides data from linked ID when
creating its local override (be it either a template, or because linked
ID is itself an override of another lib data).
Note that this was not a very serious issue, would just cause some memory
leak since override data is re-created on newly copied local data
anyway.
These use cases have been very little tested so far, but both complex
production pipeline and future restrictive workflow will make them fairly
common...
|
|
Relying on only no-main for that was weak, and inn the end it turns out
we sometimes also need to ifnore override data during copy of Main
data-blocks.
NOTE: The new `LIB_ID_COPY_NO_LIB_OVERRIDE` is also added to the
`LIB_ID_COPY_LOCALIZE` set of flags.
NOTE: The fact that we may now copy liboverrides in some non-main cases
may cause issues in some cases, pretty impossible to track all possible
ones from reading the code... Would not expect too many problem though,
usages of `LIB_ID_CREATE_NO_MAIN` by itself are not so common.
|
|
The "orient_matrix" parameter was only used when contraint was defined.
This change will hardly be noticed by the user, but it can be useful for
addon developers.
Possibly resolves T85734.
|
|
Add call to `DEG_relations_tag_update`
Differential Revision: https://developer.blender.org/D10928
|
|
|
|
|
|
|
|
Compostior relies heavilly on overridden methods. The override keyword has been added
in this module and is desired. The benefit of the override keyword is
that it reports an error when not applied to a (base) virtual method and report
what will not match when refactoring the code to be closer to blender style guide.
Reviewed By: sybren
Differential Revision: https://developer.blender.org/D10846
|
|
|
|
Add missing modes as reported in T87117 bug report.
Reviewed By: JacquesLucke
Differential Revision: https://developer.blender.org/D10885
|
|
A `DataSource` provides columns for the spreadsheet to display.
Every column has a SpreadsheetColumnID as identifier. Columns
are not generated eagerly anymore, instead the main spreadsheet
code can request a column from a data source with an column
identifier. The column identifiers can be stored in DNA and allow us
to store persistent data per column.
On the user level the only thing that changes is that columns are
not shown in alphabetical order anymore. Instead, new columns
are always added on the left. The behavior can be changed,
however I'd prefer not to automate this too much currently. I think
we should just add operators to hide/reorder/resize columns soonish.
Differential Revision: https://developer.blender.org/D10901
|
|
Some object types don't have a geometry component in the depsgraph.
Before, there always was a warning printed when such an object was
used in the object info node (e.g. to get its location).
|
|
Points are drawn as half octahedron (aligned to the camera).
Getting the appropriate matrix for facing the camera would fail in in
orthographic view, points were not facing the camera (revealing their
missing other half octahedron)
Maniphest Tasks: T87150
Differential Revision: https://developer.blender.org/D10923
|
|
|
|
Share macro for setting BLI_Iterator defaults to ensure
this doesn't happen again in cases the ITER_* macros aren't used.
Oversight in 14d74fb34174a91190d35d7fe595f8dd64cb79d1.
|
|
This is a minor change to add some plumbing code
to support custom geo nodes. This is working the
same way as the custom cycles and compositor nodes.
An example add-in is attached to D10784
Reviewed By: JacquesLucke
Differential Revision: http://developer.blender.org/D10784
|
|
Where possible, nodes in the "Geometry" category should support all
geometry component types. This adds support for volumes in the
recently added bounding box node, based on functions added in the
previous two commits.
Differential Revision: https://developer.blender.org/D10906
|
|
This commit splits of the function that generates a bounding box for a
volume into a new function, so that the min and max coordinate can
be retrieved from volume data without an object. Also some cleanup:
using the float3 type.
|
|
Often you need to apply a transformation to a grid without changing the
original, and it's necessary to avoid a deep copy of the actual data.
OpenVDB has a function to do this, this commit simply adds a wrapper
to transform and use that function with blender's `float4x4` data type.
Split from D10906
|
|
|
|
Previously only attributes of "real" geometry were displayed in
attribute search. This commit adds code to look through attributes
on instances and add those to the search drop-down too.
This required implementing the same sort of recursive traversal as
the realize instances code. The situation is a bit different though,
this can return early and doesn't need to keep track of transforms.
I added a limit so that it doesn't look through the attributes of
too many instanced geometry sets. I think this is important, since
this isn't a trivial operation and it could potentially happen for
every node in a large node tree. Currently the limit is set at 8
geometry sets, which I expect will be enough, since the set of
attributes is mostly not very unique anyway.
Fixes T86282
Diffrential Revision: https://developer.blender.org/D10919
|
|
The problem was that you could getting write access to a grid from a
`const Volume *` without breaking const correctness. I encountered this
when working on support for volumes in the bounding box node. For
geometry nodes there is an important distinction between getting data
"for read" and "for write", with the former returning a `const` version
of the data.
Also, for volumes it was necessary to cast away const, since all of
the relevant functions in `volume.cc` didn't have const versions. This
patch adds `const` in these places, distinguising between "for read"
and "for write" versions of functions where necessary.
The downside is that loading and unloading in the global volume cache
needs const write-access to some member variables. I see that as an
inherent problem that comes up with caching that never has a beautiful
solution anyway.
Some of the const-ness could probably be propogated futher in EEVEE
code, but I'll leave that out, since there is another level of caching.
Differential Revision: https://developer.blender.org/D10916
|
|
Fix `nullptr` redeference when setting 'orig_data' pointers on CoW copies,
by stopping the loop also when `element_cow == nullptr`. This avoids a
crash of Blender when the original list of pointers is longer than the
CoW list of pointers.
I've also added a `BLI_assert()` that checks for equal lengths of the
two `ListBase`s, so that problems like these aren't hidden away completely.
The root cause of the crash was actually a modifier that was assigned to
an object of the wrong type (an Armature object doesn't support modifiers).
This caused the list of modifiers on the CoW copy to be shorter than the
list of modifiers on the original Object. It's still a mystery how that
object got that modifier in the first place.
|
|
When video file for strip doesn't exist, building crashes on NULL
dereference.
This check was removed by 04e1feb83051.
|
|
Broken by 04e1feb83051
Caused by accidentaly moving `SEQ_proxy_rebuild_finish` outside of
`if (nseq->type == SEQ_TYPE_MOVIE)` condition in function
`SEQ_proxy_rebuild_context()`.
|
|
|
|
|