Use functions to retrieve the next and previous corners
in a face. The complexity of tracking them manually isn't
worth it here. Also standardize naming a bit and use a
C++ BitVector instead of the C equivalent.
Pull Request: https://projects.blender.org/blender/blender/pulls/115146
There was a C++ STL importer since Blender 3.3, but no corresponding C++ STL exporter. This PR is adding said exporter: taking https://projects.blender.org/blender/blender/pulls/105598 and finishing it (agreed with original author).
Exporting Suzanne with 6 level subdivision (4 million triangles), on Apple M1 Max:
- Binary: python exporter 7.8 sec -> C++ exporter 0.9 sec.
- Ascii: python exporter 13.1 sec -> C++ exporter 4.5 sec.
Co-authored-by: Iyad Ahmed <iyadahmed430@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/114862
The current code ran afoul of various arithmetic overflow conditions
when attempting to either Copy out or Paste in large images that would
overflow either the naive `w * h * 4` expression or the size of what the
DibV5 header allowed (DWORD, uint32_t).
Pull Request: https://projects.blender.org/blender/blender/pulls/115018
This struct is currently defined in the `functions` module but not actually used there. It's only used by the geometry nodes module, with an indirect dependency from blenkernel via simulation zone baking. This scope is problematic when adding grids as socket data, which should not be part of the functions module.
The `ValueOrField` struct is now moved to blenkernel, so it can be more easily extended to other kinds of data that might be passed around by geometry nodes sockets in future. No functional changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/115087
This path merges the Musgrave and Noise Texture nodes into a single
combined Noise Texture node. The reasoning is that both nodes
intrinsically do the same thing, which is the layering of Perlin noise
derivatives to produce fractal noise. So the patch de-duplicates code
and unifies the use of fractal noise for the end use.
Since the Noise node had a Distortion input and a Color output, while
the Musgrave node did not, those are now available to the Musgrave types
as new functionalities.
The Dimension input of the Musgrave node is analogous to the Roughness
input of the Noise node, so both inputs were unified to follow the same
behavior of the Roughness input, which is arguable more intuitive to
control. Similarly, the Detail input was slightly different across both
nodes, since the Noise node evaluated one extra layer of noise. This was
also unified to follow the behavior of the Noise node.
The patch, coincidentally fixes an unreported bug causing repeated
output for certain noise types and another floating precision bug
#112180.
The versioning code implemented with this patch ensures backward
compatibility for both the Musgrave and Noise Texture nodes. When
opening older Blender files in Blender 4.1 the output of both nodes are
guaranteed to always be exactly identical to that of Blender files
created before the nodes were merged in all cases.
Forward compatibility with Blender 4.0 is implemented by #114236.
Forward compatibility with Blender 3.6 LTS is implemented by #115015.
Pull Request: #111187
Earlier 3d-view keymap was used by particle edit mode for transform
operation. After d7558a243c, this global transform keymap is removed.
So add `_template_items_transform_actions` in particle-edit mode to
allow transforming from shortcuts.
Pull Request: https://projects.blender.org/blender/blender/pulls/115031
Empty hair geometry in Cycles may still report having one curve, even when
there are no actual segments in that curve. This caused an attempt to build
an acceleration structure with zero primitives, which due to other setup
OptiX rejected with an error. Fix that by checking the number of segments
rather than the number of curves in the hair geometry, since the former will
always be zero for empty geometry.
Pull Request: https://projects.blender.org/blender/blender/pulls/115044
This changes a bunch of nodes that have a data type drop-down to using a dynamic
node declaration that changes based on the selected data type instead of always having
all sockets. This greatly simplifies the code and is less weird than having suffixes on
socket identifiers.
Backward compatibility and forward compatibility remain due to #113497 and #113984.
One user-visible change is that changing the data type in these nodes does not break
the link anymore.
It may be necessary to bring back some functionality from link-drag-search afterwards.
Pull Request: https://projects.blender.org/blender/blender/pulls/113553
No functional changes.
Move the function `autokeyframe_pose` from
`transform_convert_armature.cc` to `keyframing_auto.cc`
The function has a lot of overlap with `autokeyframe_object` so it
can potentially be simplified later on.
Pull Request: https://projects.blender.org/blender/blender/pulls/115051
No functional changes.
The function `insert_vert_fcurve` also initialized a `BezTriple` from the flags it got.
Extract that logic into a separate function so it can be reused elsewhere
Pull Request: https://projects.blender.org/blender/blender/pulls/115039
Slightly non-trivial linked collections hierarchy could cause 'Make
LibOverride' operation from 3DView fail, reporting that more than one
potential root collections were found.
Logic here was way to simple, now this error should only happen when
there are effectively more than one potential 'good' root collection
(i.e. when two unrelated collections both contain (directly or not) the
selected objects(s).
There was two problems because these operators were not supported in GPv3:
* If you remove the slot, the material was not reassigned and the material index attribute could get a wrong index. This also affected the unused slots.
* The Unused Materials operator was executed, but it was doing nothing because there was not support for new GPv3 object.
This PR adds support for new Grease Pencil object.
Pull Request: https://projects.blender.org/blender/blender/pulls/114850
Adds the Show All Materials operator.
Also includes a refresh of despgraph when the hide prop changes.
Note: The actual render engine does not support hiding by materials.
Related to #114997
Pull Request: https://projects.blender.org/blender/blender/pulls/115001
The compositor currently executes when editing node trees that are not
compositor related, like geometry and shader node trees.
That's because the node space listener always tags the compositor to
execute for any node edit notifier. To fix this, we add the ID of the
edited node tree as a reference to the edit notifier and only tag for
an update when the space tree matches the reference one.
Pull Request: https://projects.blender.org/blender/blender/pulls/114978
Currently we keep track of 3 command buffers. Data transfer, compute and
graphics. The reason is that data transfer and compute commands cannot
be recorded in a command buffer that has an active render pass.
This PR simplifies the implementation by combining data transfer and
compute commands as there is no need to separate those in individual
command buffers.
This is in preparation of improving submission performance.
Pull Request: https://projects.blender.org/blender/blender/pulls/115033
Use float3, float3x3, and Array for data used for mesh crazyspace
calculation. Propagate the change wherever necessary to not add
more casting to the old C types.
Because `ObjectRuntime` (and therefore `DEGObjectIterData`) became
non-trivial structs, the code that swaps iterators for RNA depsgraph
object iteration had to be changed a bit to be more friendly to C++
memory semantics.
Pull Request: https://projects.blender.org/blender/blender/pulls/114998