Build pixels when using sculpt paint brush.
Paint brush on images.
Remove unused flag.
Remove print statement.
Fix memory leak
Cleanup unused parameters.
Code style. Extracted into multiple functions to improve readability.
Add tagging flag for pixel update.
Merge remote-tracking branch 'origin/master' into temp-T96710-pbvh-pixels
Rebuild pixels when active material or image changes.
Wrapped VisitedPolygons in a class.
Barycentric weights refactoring.
Rename to EncodedBarycentricWeights.
Some documentation.
Merge branch 'master' into temp-T96710-pbvh-pixels
Hook experimental flag to paint brush.
Merge branch 'master' into temp-T96710-pbvh-pixels
Wrapped vector in its own class.
Improve performance by sorting pixel packages.
extend seams.
Fix T96595: Animation not duplicated for meta children
Iterate over meta strip content and duplicate animation for all strips.
recursively.
Fix F-Curve visibility toggle disabled for library overridden rig
When showing an action data-block added to a library overridden object
in the Graph Editor, the visibility toggles would be disabled.
Toggling the visibility should be possible still and works with the
shortcuts, just the button was incorrectly disabled.
Also added the usual disabled hint for the tooltip.
Fix: Missing virtual destructor on virtual class
This caused an ASAN report for new/delete type mismatch
when using the snake hook brush in curves sculpt mode.
Add CMake option to control CUDA host compiler
This revision allows to specify CUDA host compiler (nvcc's -ccbin command
line option) when configuring the build. It addresses the case where the
C/C++ compiler to be used in CUDA toolchain should be different from the
default C/C++ compiler, for instance in case of compilers versions conflicts
or multiple installed compilers.
The new CMake option is named `CUDA_HOST_COMPILER` and can be used as follows:
`cmake -DCUDA_HOST_COMPILER=<path-to-host-compiler>`
If the option is not specified, the build configuration behaves as previously.
Fix standalone image output not working when not running in background mode
Cleanup: remove workaround to set treedata members
This workaround is not needed since
228f7f1c850897cac85b2c4b42cf9052976b7be1
BVH Utils: use fall-through in 'BKE_bvhtree_from_mesh_get'
This deduplicates the code a bit.
Fix: Curve parameter node broken for Bezier curves after refactor
The last length value was not initialized, and all length values were
moved one position towards the front of each curve incorrectly.
Also fix an assert when a curve only had a single point.
Curves: Hair to Curves rename in Cycles/EEVEE UI
Change uses of "Hair" in Render Settings UI in the property editor
and the "Hair Info" node to use the "Curves" name to reflect the
design described in T95355, where hair is just a use case of a more
general curves data type.
While these settings still affect the particle hair system,
the idea is that if we have to choose one naming scheme to align
with, we should choose the option that aligns with future plans
and current development efforts, especially since the particle
system is considered a legacy feature.
A few notes:
- "Principled Hair BSDF" is not affected since it's meant for hair.
- Python API property identifiers are not affected.
Curves: Name mutable data retrieval functions explicitly
Add "for_write" on function names that retrieve mutable data arrays.
Though this makes function names longer, it's likely worth it because
it allows more easily using the const functions in a non-const context,
and reduces cases of mistakenly retrieving with edit access.
In the long term, this situation might change more if we implement
attributes storage that is accessible directly on `CurvesGeometry`
without duplicating the attribute API on geometry components,
which is currently the rough plan.
Cleanup: Incorrect comment in IndexRange header
Fix: Copy resolution when creating CurveEval from Curves
Set the curve resolution to Bezier and Nurbs curves when converting
data using `curves_to_curve_eval`. This was missed in 9ec12c26f16ea3d.
Fix: Division by zero in UV packing function
If all islands had a size of zero, a division by zero would occur in
`GEO_uv_parametrizer_pack`, causing the UV coordinates to be set to
NaN. An alternative approach would be to skip packing islands with a
zero size, but If UV coordinates are for example outside the 0-1 range,
it's better if they get moved into that range.
Fix: UI alignment in knife tool settings popover
Remove the extra space given for decorators on right of the popover.
Fix T91541: Naming of Freestyle Curvature 3D modifier
Change the modifier name in the modifier stack to "Curvature 3D"
to be consistent with the modifier name in the drop-down.
Fix T86200: Properties editor rearranges columns poorly when very wide
Use a regular property split layout instead of a grid flow.
Also fix part of T65393.
Geometry Nodes: Add "Connected" mode to Merge by Distance node
Expose the "Connected" mode from the weld modifier in the
"Merge by Distance" geometry node. This method only merges
vertices along existing edges, but it can be much faster
because it doesn't have to build a KD Tree of all selected
points.
Cleanup: clang-format
Cleanup: spelling in comments, minor reformatting changes
Text Editor: Get/Set region text API
Add the ability to get/set the selected text.
**Calling the new methods:**
- `bpy.data.texts["Text"].region_as_string()`
- `bpy.data.texts["Text"].region_from_string("Replacement")`
Cleanup: pass the buffer length into `txt_insert_buf`
Also remove redundant NULL check.
BLI: add CPPType utility to copy elements to a shorter array
Geometry Nodes: avoid data copy in store named attribute node
Functions: parallelize materializing arrays after field evaluation
This improves performance e.g. when creating an integer attribute
based on an index field. For 4 million vertices, I measured a speedup
from 3.5 ms to 1.2 ms.
BLI: add missing materialize methods for virtual arrays
This does two things:
* Introduce new `materialize_compressed` methods. Those are used
when the dst array should not have any gaps.
* Add materialize methods in various classes where they were missing
(and therefore caused overhead, because slower fallbacks had to be used).
Fix T96888: data transfer operator crash in certain situation
The operator could crash in case the context "object" was overridden
from python, but the "active_object" wasnt (and the active object was
not a mesh).
Reason for the crash is a mismatch in the operators poll function
`data_transfer_poll` vs. `dt_layers_select_src_itemf` -- in the former,
the overriden "object" was respected (and if this was a mesh, the poll
was permissive), in the later it wasnt and only the "active_object" was
used (if this was not a mesh, a crash would happen trying to get an
evaluated mesh).
Now rectify how the object which is used is being fetched -> use
`ED_object_active_context` everywhere (see also rBe560bbe1d584).
Cleanup: remove incorrect comment
No functional changes.
Pose Library: use the right icon for the "More Info" button
Pose Library: avoid errors in the legacy panel when the add-on is disabled
Avoid errors in the legacy Pose Library panel (in Armature properties)
when the Pose Library add-on is disabled.
It's unfortunate that a built-in panel now has knowledge of an add-on.
Then again, it's temporary (one or two Blender releases), and it now uses
feature detection instead of just assuming the add-on is enabled.
Cleanup: make CustomMF_* implementations more similar
Curves: operator to snap curves to surface
This operator snaps the first point of every curve to the corresponding
surface object. The shape of individual curves or their orientation is
not changed.
There are two different attachment modes:
* `Nearest`: Move each curve so that the first point is on the closest
point on the surface. This should be used when the topology of the
surface mesh changed, but the shape generally stayed the same.
* `Deform`: Use the existing attachment information that is stored
for curves to move curves to their new location when the surface
mesh was deformed. This generally does not work when the
topology changed.
The purpose of the operator is to help setup the "ground truth"
for how curves are attached to the surface. When the ground
truth surface changed, the original curves have to be updated
as well. Deforming curves based on an animated surface will be
done with geometry nodes independent of the operator.
In the UI, the operator is currently exposed in curves sculpt mode
in the `Curves > Snap Curves to Surface` menu.
Curves: improve Add menu for new curves object
The goal is to make the Add menu more convenient for the new curves object.
The following changes are done:
* Add `curves` submenu.
* Add an `Empty Hair` operator that also sets the surface object.
* Rename the old operator to `Random`. It's mostly for testing at this point.
Cleanup: add clarifying comment to `bpy_app_getsets`
No functional changes.
Fix T97123: Applying modifier to multi-user: other objects were also converted
The first element of the iterator was not being tested against the flag.
So in some cases it would lead to more objects been made into
single-user than the active (or selected) ones.
Cleanup: Compilation warning about virtual functions
Method which overrides a base class's virtual methods are expetced to
be marked with `override`. This also gives better idea to the developers
about what is going on.
GPencil: Add skip option to envelope modifier
This patch adds an option to only use every n-th segment of the
envelope result. This can be used to reduce the complexity of the
result.
Geometry Nodes: Parallelize mesh line node
I observed a 4-5x performance improvement (from 50ms to 12ms)
with five million points, though obviously the change depends on
the hardware.
In the future we may want to disable the parallelization in
`parallel_invoke` when there is a small amount of points.
Functions: optimize simple generated multi-functions
This implements two optimizations:
* Reduce virtual function call overhead when a non-standard virtual
array is used as input.
* Use a lambda in `type_conversion.cc`.
In my test setup, which creates a float attribute filled with the index,
the running time drops from `4.0 ms` to `2.0 ms`.
BLI: inline fast path of IndexRange::as_span
This frequently showed up in profiling but shouldn't.
This also updates the code to use atomics for more correctness and
adds multi-threading for better performance.
Cleanup: Return early in metaball tessellation code
Also declare variables where initialized and use const.
Fix T97035: crash transferring face corner data
The mechanism to instance meshes when there are no modifiers did not take
into account that modifiers might get re-evaluated from an operator that
requests loop normals. Now check for that case and no longer use the
instance then.
In the future, a better solution may be to compute loop normals on demand
as is already done for poly and vertex normals, but that would be a big
change.
Cleanup: remove unused mface tesselation code from modifier stack
This seems to serve no purpose anymore, I don't see anywhere that
CD_MFACE is requested for modifier evaluation, and it's confusing
to have this in this final normals computation function.
Found while looking into D14579.
Cycles: various Linux build fixes related to Hydra render delegate
* Add missing GLEW and hgiGL libraries for Hydra
* Fix wrong case sensitive include
* Fix link errors by adding external libs to static Hydra lib
* Work around weird Hydra link error with MAX_SAMPLES
* Use Embree by default for Hydra
* Sync external libs code with standalone
* Update version number to match Blender
* Remove unneeded CLEW/GLEW from test executable
None of this should affect Cycles in Blender.
Ref T96731
Fix Cycles build error after recent changes
Fix Clang/Linux build error after line primitive parallelization
Fix T97144 Overlay: Illegal recursive expansion of macros
Was caused by the shaderCreateInfo port.
Cycles: Support adding Lightgroups from the object/world properties
Currently, only Lightgroups that exist in the current view layer can be
selected from object or world properties.
The internal UI code already has support for search fields that accept
unknown input, so I just added that to the API and use it for lightgroups.
When a lightgroup is entered that does not exist in the current view layer
(e.g. because it's completely new, because the view layer was switched or
because it was deleted earlier), a new button next to it becomes active and
adds it to the view layer when pressed.
Cleanup: Define new curves normal mode in DNA
Don't include the tangent mode for now, since that
was never implemented for geometry nodes curves.
Cleanup: separate format-units for Python argument parsing
With the increased use of multi-character format units and keyword-only
arguments these are increasingly difficult to make sense of.
Split the string onto multiple lines, one per argument.
While verbose it's easier to understand and add new arguments.
PyAPI: use keyword only arguments for Text.region_{from/to} string
This is the convention for most parts of Blender Python API.
Extend seams in x direction.
Seams extension in x.
Extending using line segment intersection.
Use context to pass common parameters.
UV Seam extraction.
Merge branch 'master' into temp-T96710-pbvh-pixels
Merge branch 'temp-T96710-pbvh-pixels' of git.blender.org:blender into temp-T96710-pbvh-pixels
Disable pixel package sorting.
Silence compilation warning.
Remove sorting and barycentric encoding.
Added timings around update.
Correct region tagging.
Silenced compilation warning CLANG.
Merge remote-tracking branch 'origin/master' into temp-T96710-pbvh-pixels
Attached canvas selection to texture painting.
Small cleanup in code and comments.
Add image user for painting on single image.
Fix Windows build error.
Renamed PBVH_UpdatePixels to PBVH_RebuildPixels.
Renamed BKE_pbvh.hh BKE_pbvh_pixels.hh.
Remove BarycentricWeights.
Spelling in comments.
Remove Triangle struct.
Rename PixelsPackage to PackedPixelRow.
Rename TIleData to UDIMTilePixels
Encapsulate clear_dirty/mark_dirty.
Remove unused code.
Remve extractor namespace.
Removed VisitedPolygons.
Removed doxygen comments.
Use primitives stored in PBVH.
Remove Pixel class.
Renamed inner type to ImageBuffer.
Remove image locking.
Change the tile painting loop to use node data first.
Don't call a function to update the node state.
Fix quad data stored multiple times.
Remove indices from Triangles. Index of the triangle is in sync with prim list.
Remove using namespace.
Added support for secondary brush color.
Remove vertex based brush testing.
PBVH: triangle brush test.
Remove msg bus subscribe.
Rebuild pixels when image resolution/uvmap changes.
Reverted file spece_view3d.c
Remove unused include statement.
Merge branch 'master' into temp-T96710-pbvh-pixels
Fix painting on UDIM tiles.
Removed bad import.
Move brush_test from triangles to do_paint_pixels.
Removed lock attribute from ImageData struct.
Color management of brush colors
Remove experimental uv seam bleeding
Only store 2 components of barycentric coordinates.
Seam bleeding.
Fix: Uninitialized paint brush when using byte textures.
This is a fix for the 3d texturing brush.
Merge branch 'master' into temp-T97352-3d-texturing-seam-bleeding
Seam building.
Seam extraction.
Merge branch 'master' into temp-T97352-3d-texturing-seam-bleeding
Fix unconnected seams.
Make connected fixes with more priority.
Fix crash painting on byte textures.
connected edges.