Age | Commit message (Collapse) | Author |
|
|
|
Avoid "customdata" in the name, since that's an implementation detail
in this context.
|
|
We need to use the custom data copy function that skips mesh-only
attributes like the hide status attributes, the generic material index
attribute, etc. Otherwise the BMesh has those attributes which
conflict with their builtin counterparts.
|
|
Differential Revision: https://developer.blender.org/D15965
|
|
* Fix issue with different build and install paths.
* Fix issue with oneAPI kernel build.
Ref D15957
|
|
rBf4e6616b835e did not work for `some reason`, this one has been
verified with gcc 10!
|
|
Recent compilers (at least gcc 11 and 12) do not report any issue, but
gcc 10 does.
|
|
This adds a utility function to copy the data from a PointCloud
outside of the main database to one that is in the database. This
is similar to `BKE_mesh_nomain_to_mesh`.
Ref D11592
|
|
Disambiguate:
- Lower / Upper (case)
- Spray (ocean modifier)
- Keep Original (clip, grease pencil, object)
- Screen [space] (inside some enum items, mostly)
- Cast Shadow ("shadow that is cast", not "to cast a shadow")
Extract:
- Line Art Light Reference Near and Far
- Mesh vertex attribute domain: Vertex
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D15938
|
|
The default trace can only trace an image or a sequence, but
it was not possible to trace only selected frames in a sequence.
This new parameter allows to define what frame trace.
If the value is 0, the trace is done as before.
The parameter is not exposed in the UI because this is logic
if it is managed by a python API, but it has no sense in the UI.
This feature was included after receiving feedback from Studios
which need to trace videos only for some frames using custom
python scripts.
|
|
In the NLA, draw the track background based on the strip's extrapolation
setting. Previously, this had no visual indicator; "Hold", "Hold
Forward", and "Nothing" were visually indistinguishable. Now "Nothing"
actually shows nothing, "Hold Forward" shows a dimly colored background
from the strip to its right, and "Hold" shows that in both directions.
Reviewed By: RiggingDojo, sybren
Maniphest Tasks: T97572
Differential Revision: https://developer.blender.org/D14836
|
|
BLI_strict_flags.h raised a build error when this macro was used.
|
|
This is the same issue as in rB2e8089b6bf50.
|
|
|
|
Use a byte flag instead of counting polys using edges
(technically a fix for edges with USHRT_MAX+2 users).
|
|
Calculate a tangent per loop, apply the transformation in multiple
spaces and accumulate the result weighting by the loop-angle.
Note that previously only the tangents Z axis (normal)
was properly accumulated, the X and Y axes only contained the values
from a single loop (the last one written to), meaning only two edges
contributed to the result. Now the transformation from all loops are
taken into account.
In practice the difference between both methods is minimal,
only for more extreme bending it can be noticed which is often when the
previous method didn't work as well.
|
|
|
|
|
|
This file is only used for the github mirror
and doesn't need to be installed.
|
|
When moving strip, or it's handle, text with frame number near handle
should be drawn. This feature was broken by 8d53ead69bb5, because
function `UI_view2d_text_cache_add` sets all fields of `v2s->rect` to 0.
This case was checked in function `UI_view2d_text_cache_draw`, but it
was not quite obvious.
This commit reverts 8d53ead69bb5, makes condition for 0 size rectangle
more obvious and adds comment for clarity.
function `UI_view2d_text_cache_add` is only used in NLA and VSE, and
this new condition fits existing use-cases. Status of T97500 is not
affected by this change.
|
|
Maniphest Tasks: T78391
Differential Revision: https://developer.blender.org/D15952
|
|
The prototype didn't match the definition anymore.
|
|
ByteColorAttributeValue
This patch adds color_srgb property to FloatColorAttributeValue and
ByteColorAttributeValue, so Python code can do
`layer.data.foreach_get("color_srgb", ...)` to fetch the data
efficiently, if it needs it in sRGB color space.
Reviewed By: Bastien Montagne
Differential Revision: https://developer.blender.org/D15966
|
|
This isn't likely to be helpful in the future with the move to generic
attributes
|
|
|
|
Whether faces are hidden and face sets are orthogonal concepts, but
currently sculpt mode stores them together in the face set array.
This means that if anything is hidden, there must be face sets,
and if there are face sets, we have to keep track of what is hidden.
In other words, it adds a bunch of redundant work and state tracking.
On the user level it's nice that face sets and hiding are consistent,
but we don't need to store them together to accomplish that.
This commit uses the `".hide_poly"` attribute from rB2480b55f216c to
read and change hiding in sculpt mode. Face sets don't need to be
negative anymore, and a bunch of "face set <-> hide status" conversion
can be removed. Plus some other benefits:
- We don't need to allocate either array quite as much.
- The hide status can be read from 1/4 the memory as face sets.
- Updates when entering or exiting sculpt mode can be removed.
- More opportunities for early-outs when nothing is hidden.
- Separating concerns makes sculpt code more obvious.
- It will be easier to convert face sets into a generic int attribute.
Differential Revision: https://developer.blender.org/D15950
|
|
When a change happens which invalidates view layers the syncing will be postponed until the first usage.
This will improve importing or adding many objects in a single operation/script.
`BKE_view_layer_need_resync_tag` is used to tag the view layer to be out of sync. Before accessing
`BKE_view_layer_active_base_get`, `BKE_view_layer_active_object_get`, `BKE_view_layer_active_collection`
or `BKE_view_layer_object_bases` the caller should call `BKE_view_layer_synced_ensure`.
Having two functions ensures that partial syncing could be added as smaller patches in the future. Tagging a
view layer out of sync could be replaced with a partial sync. Eventually the number of full resyncs could be
reduced. After all tagging has been replaced with partial syncs the ensure_sync could be phased out.
This patch has been added to discuss the details and consequences of the current approach. For clarity
the call to BKE_view_layer_ensure_sync is placed close to the getters.
In the future this could be placed in more strategical places to reduce the number of calls or improve
performance. Finding those strategical places isn't that clear. When multiple operations are grouped
in a single script you might want to always check for resync.
Some areas found that can be improved. This list isn't complete.
These areas aren't addressed by this patch as these changes would be hard to detect to the reviewer.
The idea is to add changes to these areas as a separate patch. It might be that the initial commit would reduce
performance compared to master, but will be fixed by the additional patches.
**Object duplication**
During object duplication the syncing is temporarily disabled. With this patch this isn't useful as when disabled
the view_layer is accessed to locate bases. This can be improved by first locating the source bases, then duplicate
and sync and locate the new bases. Will be solved in a separate patch for clarity reasons ({D15886}).
**Object add**
`BKE_object_add` not only adds a new object, but also selects and activates the new base. This requires the
view_layer to be resynced. Some callers reverse the selection and activation (See `get_new_constraint_target`).
We should make the selection and activation optional. This would make it possible to add multiple objects
without having to resync per object.
**Postpone Activate Base**
Setting the basact is done in many locations. They follow a rule as after an action find the base and set
the basact. Finding the base could require a resync. The idea is to store in the view_layer the object which
base will be set in the basact during the next sync, reducing the times resyncing needs to happen.
Reviewed By: mont29
Maniphest Tasks: T73411
Differential Revision: https://developer.blender.org/D15885
|
|
Related to {D15885} that requires scene parameter
to be added in many places. To speed up the review process
the adding of the scene parameter was added in a separate
patch.
Reviewed By: mont29
Maniphest Tasks: T73411
Differential Revision: https://developer.blender.org/D15930
|
|
Replace incorrect usage of GLYPH_ASCII_TABLE_SIZE with correct
KERNING_CACHE_TABLE_SIZE
See D15815 for more details.
Differential Revision: https://developer.blender.org/D15815
Own Code.
|
|
Converting to the SoA format (T95965) immediately when reading meshes
means that none of the changes from versioning would be applied first.
This means important fixes like f14995aba70a aren't properly applied,
so modifications could be done to invalid CustomData. To fix this, move
the SoA changes into versioning code, in a new versioning_400.cc file.
Differential Revision: https://developer.blender.org/D15919
|
|
The snake hook and grow/shrink brushes need some arrays for input
to the length paramterization code. These were allocated and freed
for every curve. Instead, use a local buffer for each task execution.
Differential Revision: https://developer.blender.org/D15964
|
|
Same as eb3a561a7fe0b22abc1, but for the mesh normal arrays
introduced in b7fe27314b25a7220a.
|
|
A "lookup_int" callback needs to be provided for RNA collections
that aren't backed by DNA directly. Otherwise they will iterate from
the start of the array for every access.
|
|
Missed in eaf416693dcb
|
|
|
|
We now import and apply custom normals using a similar strategy
to the STL importer. We store custom normal data for each loop
as we read each MPoly and then apply it to the mesh after
`BKE_mesh_calc_edges()` is called.
The new behavior is optional and may be disabled in the Collada import
UI. When disabled, we use the old behavior of only using normals
to determine whether or not to smooth shade an MPoly.
----
Patch as requested in {T49814}.
The Collada import UI now has an additional checkbox, similar to the glTF and FBX import UIs:
{F13428264}
Here is a test Collada file with a simple test cube with flipped custom normals:
{F13428260}
{F13428282}
And a sphere where the two halves are disconnected geometry, but has custom normals that make the halves appear to be connected:
{F13436363}
{F13436368}
I've tested it on a number of my own meshes, and the custom normals appear to be imported
correctly. I'm not too sure about how I've plumbed the option down, though, or whether this
is the most proper way to apply custom normals.
Reviewed By: gaiaclary
Differential Revision: https://developer.blender.org/D15804
|
|
The descriptions for view_layer_eval and scene_eval incorrectly duplicate the descriptions for view_layer and scene:
- https://docs.blender.org/api/current/bpy.types.Depsgraph.html?highlight=depsgraph#bpy.types.Depsgraph.view_layer_eval
- https://docs.blender.org/api/current/bpy.types.Depsgraph.html?highlight=depsgraph#bpy.types.Depsgraph.scene_eval
This patch fixes this by changing "Original" to "Evaluated."
Reviewed By: jbakker
Maniphest Tasks: T100684
Differential Revision: https://developer.blender.org/D15931
|
|
The memory leak happens because `ED_node_link_insert` (called after the
transform operation) overwrites the pre-existing `snode->runtime->iofsd`,
losing the reference without freeing the memory.
So to "move" the reference from `snode->runtime->iofsd` to
`op->customdata`, so that each operator works with its own data.
Reviewed By: Severin
Differential Revision: https://developer.blender.org/D15948
|
|
|
|
|
|
|
|
When assigning a huge number of materials, like when importing thousands of
objects, the function `BKE_objects_materials_test_all` uses quite a lot of
resources because of the way it loops through all objects to resize the
mat-array.
By counting the amount of processed objects and comparing to the number
of users of the obdata ID, we can exit early and avoid looping through
all objects every time.
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D15740
|
|
autopep8 v1.7 added a space after assert & raise,
remove the braces as they aren't needed.
|
|
Calling operators in background-mode always printed with the
assumption that output should never be hidden.
However operators called from `bpy.ops` were also printing reports to
the `stdout` (needed for the Python console and generally useful).
Resolve by adding a flag to signal that the owner of the ReportList
is responsible for printing to the `stdout`.
|
|
|
|
Some files have 2 different framerates stored in metadata. Use function
`av_guess_frame_rate` to get media FPS, because it provides more
consistent / correct values across multiple files.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D15839
|
|
After change in 19bff8eb51f, subframe must be calculated for function
`RE_RenderFrame` in order to render subframes.
|
|
`MPoly` is used and copied in many places. To avoid the need to use a
special function for copying MPoly, or the need to add a copy
constructor, just rename the `mat_nr` field to include "legacy" in the
name. This keeps the original purpose of notifying developers that
the field shouldn't be used without any further complexity.
Apply the same fix to `bweight`.
Differential Revision: https://developer.blender.org/D15841
|
|
The trim functionality is implemented in the geometry module, and
generalized a bit to be potentially useful for bisecting in the future.
The implementation is based on a helper type called `IndexRangeCyclic`
which allows iteration over all control points between two points on a
curve.
Catmull Rom curves are now supported-- trimmed without resampling first.
However, maintaining the exact shape is not possible. NURBS splines are
still converted to polylines using the evaluated curve concept.
Performance is equivalent or faster then a 3.1 build with regards to
node timings. Compared to 3.3 and 3.2, it's easy to observe test cases
where the node is at least 3 or 4 times faster.
Differential Revision: https://developer.blender.org/D14481
|
|
editor.
Tagging depsgraph for relation rebuild does not replace tagging IDs for update.
|