Cycles has a sample offset feature allowing users to render X samples
in a single frame on one device, then the remaining Y samples later or
on a different device and combine them back together at the end.
However in most situations the result from using this method was
different, and usually lower quality than rendering all the samples in
one go.
This was because Cycles tunes it's random number sequence for the
number of samples being rendered. And the random number sequence was
being tuned for the wrong number of samples in the case that a user
was using the sample offset.
This commit fixes this issue by adding a "sample subset" feature.
The user specifies the total sample count being rendered across all
devices in the existing `Max Samples` parameter, then specifies per
device which subset of samples will be rendered (E.g. Render samples
0-1024 out of a 0-2048 range).
This commit also contains some additional clean up work
inside Cycles related to the area being changed.
Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/132961
"Expected textual data output" comparison based tests for FBX,
OBJ, PLY, STL import.
- There's a tests/python/modules/io_report.py that can produce
a "fairly short text description of the scene" (meshes, objects,
curves, cameras, lights, materials, armatures, actions, images).
About each object, it lists some basic information (e.g. number
of vertices in the mesh), plus a small slice of "data" (e.g.
first few values of each mesh attribute).
- Custom import parameters, if needed, can be provided by
having a sidecar .json file next to imported file (same
basename, json extension), that would have a single json
object with custom arguments.
- Add FBX test coverage, with 46 fairly small files (total size 3.8MB)
covering various possible cases (meshes, animations, materials,
hierarchies, cameras, etc. etc.).
- Switch OBJ/PLY/STL import tests to the above machinery, remove C++
testing code.
Pull Request: https://projects.blender.org/blender/blender/pulls/132624
Propagating string attributes isn't supported in many places currently,
the split edges node is not an exception, so skip those attributes as
necessary.
This addresses the 'Resize UDIM sequences' feature from issue #109820
If the user needs to resize all UDIMs in an image, they currently need
to go through a tedious process of switching through all the UDIMs and
resizing them individually.
Now, when the user resizes an image, they can choose to apply the
operation to all UDIM tiles in the image.
Co-authored-by: T0MIS0N <50230774+T0MIS0N@users.noreply.github.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/132524
This operator was duplicating feature that already exists in core
Blender (`node.join`), and was not working great as well. So there is
no need to maintain this python operator, but to keep consistency for
users I kept the keymap and UI entry but assigned it to `node.join`
operator instead, so that users don't notice change.
I assigned keymap inside add-on and not in Blender core because people
who didn't use Node Wrangler have that key free, or have something else
assigned (and `node.join` is already mapped to Ctrl+J), so only Node
Wrangler users should have this keymap. We can change it and rename
built-in operator to Parent, instead of Join, and remap it to Shift+P,
but that's separate discussion.
Resolves#129404.
Pull Request: https://projects.blender.org/blender/blender/pulls/132758
To easily force a rebuild of a dependency the nuke script will remove all build
artifacts for a specific dependency from the dependency build folder. This includes
- The Debug and Release build folder of the dependency
- The Debug and Release staging output folder of the dependency
- The harvest output folder of the dependency
For dependencies that have a long dependency chain like embree, shaderc and
python extra convenience scripts are added that nuke the additional deps that
need to be removed to obtain a fully clean build.
Until the refactor of 255f031e3e, Negative Boolean Properties would
restore the opposite value for "Reset to Defaults". Now that this
works, this PR removes the RNA property defaults that are no longer
needed.
Pull Request: https://projects.blender.org/blender/blender/pulls/133076
When transforming Objects, like scaling and rotating we see a custom
drawn cursor at the mouse position. In the default theme this is
entirely black, doesn't change with background color, and can be very
hard to see in some circumstances. This PR uses the same colors as the
text overlays and adds a contrasting shadow to help add some contrast.
Pull Request: https://projects.blender.org/blender/blender/pulls/132671
Followup to 80f5b3ad21 which was just
plain wrong. Somehow I missed the whole point and set auto handle types
instead of aligned. In a more thorough dive into this area, there was
some weird structural decisions making things harder than they should be.
This commit slightly simplifies the way the first and last handle of a
segment are set, moving it all to happen in one place and making the
processing of the last cyclic segment a bit simpler. The resulting
handles are aligned if possible.
Pull Request: https://projects.blender.org/blender/blender/pulls/133070
* BLENDER_SYSTEM_SCRIPTS support for multiple script paths, separated by
; on Windows and : on other platforms.
* New BLENDER_CUSTOM_SPLASH to replace the splash screen image.
* New BLENDER_CUSTOM_SPLASH_BANNER to overlay an image on the splash.
Contributed by Sony Interactive Entertainment: https://github.com/PlayStation-OpenSource
Increase the hard minimum for Resolution Scale from 0.25 to 0.5. 0.5 is
also the current soft limit (the least you can get by just dragging on
the widget). But, as illustrated by the bug report, accidentally typing
in a value below 0.5 is difficult to recover from since the text is too
small to see. It is a useful minimum though in that this value is good
for tests and captures on High DPI system to simulate low dpi.
Pull Request: https://projects.blender.org/blender/blender/pulls/131688
As the complaint shows, using default layout the column for absolute
keys in the Shape Keys list gets cut off. This PR increases this space
by changes to alignment and column split factor.
Pull Request: https://projects.blender.org/blender/blender/pulls/131887
These scripts have not been updated in years, and locally i had better
versions of them. This commit updates them to the latest i had locally
this should hopefully lower the barrier to building the dependencies by
other developers as all that is needed is a fresh VM with a clean
windows install.
Removed:
buildall.cmd - not useful, we no longer build for 2 vs versions
and 2 architectures , removed
nuke.cmd - same, may come back in the future in some form
New:
vmprep.cmd.txt - This preps a clean windows vm with the correct
versions of visual studio/cuda/git/hip/meson to build all dependencies.
this should only and ever be run on a clean install of windows, do not
under any circumstances run this on a developer workstation.
to prevent people from doing this anyhow this script has a .txt
extension so it cannot be accidentally executed, instructions on how to
run this script are this file.
vmbuild.cmd.txt - Helper build script, vmprep will provision the build
machine with this script.
vsconfig_2019 - installer script for visual studio 2019 to select the
workloads we require.
Existing code had several issues:
* The 'DNA bitset as RNA array' behavior was totally undocumented,
virtually impossible to discover, very confusing, and without any
checks that given parameters (like the array length) were valid.
* The DNA defaults handling was fully broken for 'negative' boolean
properties.
This commit:
* Factorizes all rna define code for boolean properties storing a `booleanbit`
value into a new static util (this revealed and fixed the 'negative defaults'
issue).
* Forbids calling `RNA_def_property_array` on a Boolean property with a
non-null `booleanbit` value.
* Introduces a new `RNA_def_property_boolean_bitset_array_sdna`,
strictly to define 'DNA bitsets as RNA array' properties.
* Adds several validation checks, in particular regarding the bitset
case: it takes into account the fact that bitshift operations on
negative numbers are typically
[arithmetic ones](https://en.cppreference.com/w/cpp/language/operator_arithmetic),
which means that they preserve the sign of the value, and that the
left-most bit should never be used with signed integers for bitsets.
-------------------
The fix to DNA defaults handling on 'negative' properties revealed
several RNA errors, listed below. Fixing them is not necessarily trivial
(as some seem to contradict the DNA default values, e.g. the
`View3DShading.use_studiolight_view_rotation` one), so it is kept
outside of this refactor. Conflicting cases should likely be handled by
the relevant modules (to decide whether the DNA, or the RNA default
should be kept).
-------------------
Also realized that many DNA types are ignored when trying to find DNA
default values. This will also be tackled separately, as fixing it is
fairly straightforward.
Pull Request: https://projects.blender.org/blender/blender/pulls/132917
#115187 introduced the eyedropper tool for use outside blender on macOS,
but the following issues remain:
1. Users must grant screen capture permission to blender.
2. No visual cue. (cursor icon cannot display as an eyedropper outside
blender)
3. Users must press `Enter` to activate the picker.
4. `CGWindowListCreateImage` function has been deprecated as of macOS
14.0
The proposed fix is to use `NSColorSampler` class to select colours
directly from onscreen content. It offers:
1. Permission free (no screen capture permission required).
2. A clear visual cue when selecting colours.
Known issue:
1. Still need press `Enter` to activate the picker.
Pull Request: https://projects.blender.org/blender/blender/pulls/131593
The Action Editor was already getting crowded, but has become even
moreso with the addition of the new Slot selector. Part of this clutter
is due to the NLA-related buttons:
- The up/down track switching buttons.
- The Push Down button.
- The Stash button.
The latter two are currently still useful, but don't need to be directly
on the header itself. This PR moves them to the header's Action menu.
The up/down buttons have several issues:
- They are conceptually confusing: you cannot visually see what's
happening or which track you're on without an NLA editor open anyway,
so somewhere in the NLA Editor would be a better place for them.
- Their functionality is broken, and it seems has been for a long time:
you can go down in the track stack, but often can't go back up,
despite the existence of the up button. It doesn't appear that anyone
has reported this cripplingly broken behavior, which strongly suggests
that very few people (if anyone) is using or relying on these buttons.
- They don't make any sense when you have more than one strip on a track
anyway (which strip do you go into tweak mode on?).
For all these reasons, this PR simply removes the up/down buttons.
Replace pointer magic with `std::string` and `blender::StringRef`.
The old code modified the RNA path of F-Curves to extract & flip the
bone name. The new code is not modifying any data, at the expense of a
few more copies. Since these strings are not long, and the call to
`BLI_string_flip_side_name()` also makes quite a few copies, the
performance impact should be negligible.
No functional changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/133005
Simplify `pastebuf_match_path_property()` by reducing cognitive complexity
and using `StringRef::endswith()` instead of pointer arithmetic.
I've also added a few unit test cases that cover some unwanted behavior:
the property name check only checks suffixes, and so copying "….location"
will also paste it to a "….not_actually_location" F-Curve.
No functional changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/133005
Add a unit test for the bone name flipping function of the keyframe
paste functionality.
The function itself has been changed a little bit, so that it returns a
`std::string` instead of using a `char **` return parameter that needs
explicit freeing at the call site. This made the tests considerably
simpler to write. This change does cause an extra copy of the RNA path,
but that should be refactored away soon.
No functional changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/133005
Blender always updates all pixels of the swap chain. As an optimization
we can skip the initial layout transition from present to transfer
destination as all pixels will be rewritten.
Pull Request: https://projects.blender.org/blender/blender/pulls/133061
Grease Pencil tool settings could have different selection modes for
different object modes (like edit mode and sculpt mode). This fix
ensures when switching object modes, the selection domain is updated to
match the selection mode.
Pull Request: https://projects.blender.org/blender/blender/pulls/133030
`BKE_main_ensure_invariants` was added in 1fae5fd8f6. The older
`ED_node_tree_propagate_change` was already implemented as a thin wrapper around
`BKE_main_ensure_invariants`. This patch removes the wrapper and calls the more
general function directly.
A new overload of `BKE_main_ensure_invariants` is added for the common case when
only a single data-block has been modified.
Pull Request: https://projects.blender.org/blender/blender/pulls/133048
This makes specifying a legacy type for new node types optional (e.g.
`GEO_NODE_MESH_TO_CURVE`). Instead, only the `idname` is used as a stable
identifier for node types. So there is less redundancy for now.
This change helps with the decentralized definition of nodes and reduces the
number minimum number of files that need to be changed for a new node from 5 to
4. It especially helps when multiple nodes are worked on at the same time,
because the legacy type definition was very prone to have merge conflicts.
For compatibility reasons and because it's still used by existing code, the
`legacy_type` is not removed. All existing nodes keep their current
`legacy_type`. New nodes will receive an auto-incremented legacy type. It's
still necessary to give nodes unique legacy types, because some code checks if
two nodes have the same type by comparing their `legacy_type`. These types only
have to be unique at run-time though. Some randomness is used to avoid depending
on stable generated legacy types accidentally.
Pull Request: https://projects.blender.org/blender/blender/pulls/133044
Swizzling is supported when sampling. Outside samplers the swizzling
must always be the initial swizzling.
Detected when playing rain_restaurant.blend. EEVEE motion vectors use
swizzling.
Pull Request: https://projects.blender.org/blender/blender/pulls/133043
Initial design had a more complex use case for render graphs.
They are not really used and will not in the near term. This PR
removes some code that doesn't do a thing
Pull Request: https://projects.blender.org/blender/blender/pulls/133047
This patch normalizes the Bloom output to be more energy conserving and
in a reasonable range. This is essentially constructed such that the
impulse response to a constant input maintains the same input.
The reason why Bloom has a very high range is because it accumulates a
downsampling chain without any sort of attenuation, so the final result
can be quite large. EEVEE fixed that by making the Strength range in the
[0, 0.1] range, so users who are used to that range think the default
value of a unit Strength in the glare node is large and hard to work
with. Hence the need for this patch.
The normalization factor is simply the length of the chain, since for a
constant input, all chain images will have the same constant input.
We need to version this change in a similar manner to how the glare node
was versioned in 004e3d39fa, where the scene render size is assumed. We
also assume the inputs are not connected, because they were turned into
inputs just last week, so we needn't worry about that case.
This is a partial implementation of #124176 to address #131325.
Pull Request: https://projects.blender.org/blender/blender/pulls/133037
The passed `StringRef` can be empty, so we shouldn't pass it to
`BLI_strdupn` in this case.
If an empty string is passed to either `set` function
makes sure the previous `char *` is freed and set to `nullptr`.
Pull Request: https://projects.blender.org/blender/blender/pulls/133042
Addresses #78171, #61828, #62473 and many closed reports about this.
Until now, the "Adjust Last Operation" would keep being available after
changing various properties in the UI. Actually using it to adjust the
last operation parameters would undo the other changes done through the
UI, which is unexpected and easy to miss. Users would keep running into
this, thinking it was a bug, as the many reports merged into #78171
indicate.
As agreed on in the report, adjusting the last operation shouldn't be
possible after changing properties in the UI that send an undo push.
That's what this PR implements, together with removing the "Adjust Last
Operation" region at that point.
Pull Request: https://projects.blender.org/blender/blender/pulls/133003
When converting object to grease pencil from mesh, the material counters
need to be set to the the value that matches
`GreasePencil::material_array_num` to avoid index issues in adding
grease pencil materials downstream.
Pull Request: https://projects.blender.org/blender/blender/pulls/133038
Visibility test is not setup correctly and only tests positives. This
test should be adapted with better testing. For now we skip the test.
Resource id test was wrong as it didn't add the null resource for
drawcalls with no handle. Ref `DrawCommandBuf::generate_commands`.
Pull Request: https://projects.blender.org/blender/blender/pulls/133040
This patch reorganizes the Glare node inputs into panels, grouped by the
function they perform. The panels are:
- Highlights: Which are inputs related to highlights extraction.
- Adjust: Which are inputs that adjusts the generated glare.
- Glare: Which are glare type specific inputs.
Additionally, the Threshold parameter was assigned a more unique
identifier to be more future proof and consistent with other inputs, and
the descriptions of some inputs were updated.
Pull Request: https://projects.blender.org/blender/blender/pulls/132993
Compiling of graphics shaders via gpu crashed. The vulkan backend found
a compute source and continued the evaluation as if it was a compute
shader.
The compute source was added by the preprocessor that wraps the shader
source. Even empty sources were wrapped. Detection based on empty shader
sources failed.
This is not a Vulkan only issue as other platforms would have similar issues when
creating a compute shader.
Pull Request: https://projects.blender.org/blender/blender/pulls/133036