Multi input socket has no connections.
But the internal link must still exist and be considered as first one.
Main
PR
Multi input socket has no connections.
But the internal link must still exist and be considered as first one.
| Main | PR |
| -- | -- |
| ![image](/attachments/8b627eb2-ee3a-47a8-aec8-7c7bc4b5c45e) | ![image](/attachments/9629813b-8c67-4ed2-b5ef-90f889d1f06c) |
Iliya Katushenock
changed title from Fix: Correct offset for internal multi-input link to Fix: Correct offset for internal multi-input link2023-10-14 11:20:43 +02:00
Iliya Katushenock
changed title from Fix: Correct offset for internal multi-input link to Fix: Correct offset for internal multi-input link2023-10-14 11:22:08 +02:00
Iliya Katushenock
changed title from Fix: Correct offset for internal multi-input link to Fix: Correct offset for internal multi-input link2023-10-14 11:22:30 +02:00
Iliya Katushenock
changed title from Fix: Correct offset for internal multi-input link to Fix: Correct offset for internal multi-input link2023-10-14 11:24:52 +02:00
Iliya Katushenock
changed target branch from main to blender-v3.6-release2023-10-14 11:24:54 +02:00
Iliya Katushenock
changed title from Fix: Correct offset for internal multi-input link to Fix: Correct offset for internal multi-input link2023-10-14 12:55:04 +02:00
Iliya Katushenock
changed title from Fix: Correct offset for internal multi-input link to Fix: Correct offset for internal multi-input link2023-10-14 12:57:05 +02:00
Iliya Katushenock
changed title from Fix: Correct offset for internal multi-input link to Fix: Correct offset for internal multi-input link2023-10-14 12:58:47 +02:00
Iliya Katushenock
changed target branch from blender-v3.6-release to blender-v4.0-release2023-10-14 12:59:32 +02:00
Iliya Katushenock
changed target branch from blender-v4.0-release to blender-v4.1-release2024-03-10 12:21:33 +01:00
The GPU buffer type was replaced with `float` in 4151691552,
but the "no mask" case wasn't changed. We still assigned a `uchar` value
to a `float` pointer, which made the drawing look random. Instead do the
same fill we use for other PBVH types.
Pull Request: #114846
Replace use of macro FAILED with explicit checks for S_OK returns. Some
of these functions can return S_FALSE, which indicates a negative
condition that is not failure. It is not caught by the FAILED macro.
Therefore this function will fail in circumstances where the quick
access folder is not found or perhaps empty.
Pull Request: #114866
This PR fixes the issue of Cycles renders ending in compilation failure on base M3 machines which are still on their factory installed OS, older than14.0.
Pull Request: #114920
Caused by 0e01667e25 .
Above commit changed it so that operator properties (set from python)
were ignored for `split_frame` & `split_channel` in case
`use_cursor_position` is False.
Should be the other way around.
Pull Request: #114905
Caused by bfe6128748.
The split frame logic actually became inverted in the update:
when the cursor position is true, then the frame is supposed
to be initialized in the invoke().
The menu does not use cursor position, so the code path where
the frame is retrieved from the RNA properties was used, and
the frame was never initialized in that case.
Pull Request: #114973
Revert cea02c15f8. This will fix the issue
mentioned in #114758 and it will also allow user to see recent
searches in the list below the search box (F3).
Pull Request: #114774
shell_link was being reused, sometimes returning the previous
data causing links that were not ours to be updated.
Co-authored-by: Harley Acheson <harley.acheson@gmail.com>
Pull Request: #114924
Exposed by 16e4eeb9c0.
In (rare) occasions, a Curve's `CharInfo` can be NULL.
This also crashed going into editmode on affected text objects in
previous versions, however opening and rendering these files was still
fine.
In 4.0, opening those kind of files crashed.
It is not entirely clear how this can happen (there are comments in code
dating back to 97df61a7e5 mentioning "old file", there might be other
reasons, too), still, avoiding the crash on file open seems like good
practice.
Pull Request: #114916
Seems that the ExponentWithLinearTransform with offset=0 does not render
properly on GPU on Apply Silicon GPUs. Likely, it is possible to use plain
ExponentTransform in this case, which should also be faster.
Candidate for 4.0.1 corrective release.
Pull Request: #114853
The side effect which wasn't that obvious from the documentation
is that tasks in the console pool are executed sequentially. This
made the compile-gpu step to take a long time, because the parallel
compilation got disabled.
That was unintended change, so reverting the change.
Instead, for the buildbot, increase the time limit for the step.
This reverts commit 4b891b4afe.
Some left-over code from old refactoring/improvements of old addresses
remapping in library reading code was causing some wrong remapping
between different IDs.
The code was actually not doing what its comment was describing, since
it would cause a random remapping to a different new address than the
expected one:
Initial state, before removed buggy line:
`old_addr_1 -> new_addr_1`
`old_addr_2 -> new_addr_2`
End state, if `old_addr_2` == `new_addr_1`:
`old_addr_1 -> new_addr_2`
`old_addr_2 -> new_addr_2`
From the description of the removed line, that behavior was actually
already covered by adding the remapping rule in the line above, since
adding a remapping overwrite an existing one if needed, so the line
above would do (in case a placeholder ID existed before the actual ID
got read):
Initial state, before adding new remapping rule:
`old_addr_1 -> new_addr_placeholder_1`
End state, after adding remapping to newly read ID:
`old_addr_1 -> new_addr_1`
NOTE: Noticed thanks to rare failures of the liboverride tests on
buildbots. The issue was less than 1%-reproducible with a debug build
and ASAN, but had about 2-4% repducibility with release builds.
Pull Request: #114784
Caused by 406cfd214a.
Was only filling a single pixel.
Some pointer magic wasnt working after culprit commit.
Now changed to a more common way of accessing.
Pull Request: #114989
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: #115044
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: #115031
The buffers from the new Draw Manager increase their size as needed,
but they never shrink.
Add `StorageArrayBuffer::trim_to_next_power_of_2` function that can
downsize the buffer following the same heuristic as `get_or_resize`.
Add `StorageVectorBuffer::trim_and_clear`, which calls
`trim_to_next_power_of_2` automatically.
Pull Request: #114857
Caused by e5ec04d73c
Since above commit, the edge crease is a named attribute and considered
a "fake" customdata layer (similar to bevel weights or UV seams --
`CD_FAKE`). Thus, a special case in
`data_transfer_layersmapping_generate` has to be added for
`CD_FAKE_CREASE`.
Pull Request: #115180
Snap to geometry is not supported when moving camera in camera view.
This is because the camera would make jumps that would be difficult to
predict and control.
The same happens if Snap Base were supported.
Therefore, disable Edit Snap Base when transforming camera into camera
view.
These drivers crash on startup caused by a driver bug. This include the
latest drivers for legacy Intel CPUs with a HD 4000/HD 5000 series GPU.
To be on the safe side all drivers with version 20.19.15.51* will be marked
unsupported as we don't have the platforms to identify the precise driver
versions that fail.
See #113124 for more information.
Pull Request: #115228
Caused by error in refactor commit 4d668e6825. Offsets are drawn
outside of strip boundary, but strip content range in drawing context
is clamped by handles, so nothing was drawn.
Also this feature was not working, when using solo feature. This was
caused by another refactor e39cc78313. `special_seq_update` global
variable was declared in both files after splitting them, but set only
in one of them. Use `ED_sequencer_special_preview_get()` instead of
accessing variable directly.
Conflicts:
source/blender/editors/space_sequencer/sequencer_timeline_draw.cc
Fixes an issue where the sheen would render incorrectly when
the normal of the surface is parallel to the incoming direction.
Co-authored-by: Lukas Stockner <lukas.stockner@freenet.de>
Pull Request: #115286
Exposed/caused by b53c7a804a
`particle_settings_foreach_id` only processed object IDs for `avoid`
(but not `goal`) -- `BoidRuleGoalAvoid` is used for both though.
Pull Request: #115482
Related commit: 82aa300e1c / 5596f7982182aa300e1c made it so that if only linked images are used, painting
would be prohibited. But since painting in Material mode actualy paints
across all materials it could happen that one particular image is linked
whereas another image isnt. In this case, painting on the linked image
would not be prohibited.
Two issues:
- [1] logic in above commit(s) seems slightly wrong, we could still pass
the check for linked images (also no image here should also not result
in a positive check I think).
- [2] code in `project_paint_prepare_all_faces` would still work with
linked images in slots, so
-- `ProjPaintState` -> `image_tot` was incremented
-- `ProjPaintImage` was created
-- this then ends up in the undo push - and crashes on undo
So now [1] is rectified and for [2] we skip faces with associated linked
images.
In addition, slots with linked images are now also greyed out in the UI
(`VIEW3D_PT_slots_projectpaint`) to give some sort of hint. For the
future it would probably also be good to dissallow selection of such
paint slots, but that is for another commit.
Pull Request: #115263
When using multiple keyboard layouts, the first layout would always
be used for internal keyboard layout queries.
This meant for e.g. with English layouts QWERTY & DVORAK both active
Control-C always used the QWERTY location for C even when DVORAK was
active.
Resolve by detecting layout changes & run xkb_state_update_mask
on all xkb_state's so internal queries always use the active layout.
Based on !115161, extended to detect layout changes & account for all
internal states.
Co-authored-by: Eugene Kuznetsov <eugene.kuznetsov@amd.com>
`ED_view3d_win_to_ray_clipped_ex` requires `ray_end` when
`do_clip_planes` is true.
Since the snap code uses `ray_depth` instead of `ray_end`, the solution
is to always calculate the `ray_end` and convert to `ray_depth` when
necessary.
Caused by 383a145a19
Since above commit, normals were in a SharedCache, they need to be tagged dirty
for recalculation.
Instead of tagging the normals caches dirty explicitly, simply use
`BKE_mesh_tag_positions_changed` [which includes all this and also tags
positions dirty - which sounds also needed for updating other things]
Pull Request: #115580
This effectively reverts [0] which required the installed Blender
along with the `bpy` module to load for the install target to generate
the man-page. It turns out running a full Blender at install time can be
quite involved.
Now the man-page generator runs `blender --help` & `blender --version`,
converting the output into a man-page from a Python script.
Some minor changes have also been made:
- Use PYTHON_EXECUTABLE so the systems Python
(which may not be compatible) isn't used.
- Remove leading blender version from the description
which was unintentionally being included.
[0]: 61d99d450e
Pass-through selection allows select-drag not to activate an already
selected object - so an existing selection can be dragged without
changing the active/selection (see #96544) & [0],
This caused entering pose-mode to fail when selecting an armature
with "Lock Object Modes" disabled.
There is a logical conflict where pass-through is intended to keep the
current selection & active, which doesn't make sense when selecting the
armature should enter pose-mode (details in code-comments).
Resolve by disabling pass-through when the select action changes
the objects mode.
[0]: 618f39fca2
Prevent heap-use-after-free of SpaceNode `geometry_nodes_tool_tree`,
remapping it in `node_id_remap_cb` (so it get null when deleted).
Pull Request: #115047
Exposed by 383a145a19.
Think the issue actually started in cfa53e0fbe, since then the new
destination normals were only filled from the first array copy onwards
(probably hidden by some recalculation of normals somewhere?).
In any case, starting the destination normals array with what we have
from the input mesh normals and then resizing the array (instead of
reinitializing it from scratch) fixes this.
Pull Request: #115612
Postpone binding the buffer to the surface ensures the XDG window
is created at the correct size.
---
PR for 4.0 that resolves conflicts, includes commits:
- e6c200e94c.
- 36351f3796 (simple null check fix).
Resolves#115090, where exceptions from the text editor called
`sys.excepthook` in v3.6 but not in v4.0.
The error was caused by PyC_ExceptionBuffer calling PyErr_Display
instead of PyErr_Print.
While technically a regression in [0], the behavior in 3.6x wasn't
working properly either since a user-defined `sys.excepthook` could
prevent PyC_ExceptionBuffer from accessing the exception text.
Resolve with the following changes:
- BPy_errors_to_report has been updated not to print errors.
Previously BPy_errors_to_report would *sometimes* print the error,
which complicated situations where the caller wanted predictable
behavior (always printing or never printing).
- `PyErr_Print()` must be used to display errors to the output,
this will call `sys.excepthook` as it used to.
It's better not to rely on side effects of BPy_errors_to_report()
for error handling.
[0]: 6a0f98aeef
---
Conflicts manually resolved, original fix from:
- 2e1486da60
Resolve regression in [0] which replaced a null check with an
identity comparison. This wasn't correct as the null check indicated
that transform was applied or not, where situations that require a
transform could have an identity matrix.
Resolve by checking if the matrix that would transform vertices is an
identity which is a reliable way to know if any transformation is needed.
Ref: !115736
[0]: e24c7f1954
---
Back ported from main, c9dd5ce4cc
Recent refactor to viewport navigation caused a regression where
"Orbit Around Selected" logic to impacted "Free" NDOF navigation logic.
Resolve by disabling orbit around selection with "Free" navigation.
ROCm 6 brings some changes to the HIP API. This pull request is meant to be
backward and forward compatible.
That is Blender could be compiled with either ROCM 6 or 5 and run on either.
The main change is the hipMemoryType enum, which we check based on the
runtime version to use the correct enum values.
Without this, HIP will not work on Windows with upcoming 23.40 driver.
Pull Request: #116713
When loading an unknown node type from a newer Blender version, the node
storage data cannot be properly loaded. Re-saving the file will then
crash if saving with the same node type idname, since new Blender
versions cannot find the expected storage data.
Loading in older versions should replace unknown node types with a dummy
"Undefined" node that will get loaded as NodeTypeUndefined in newer
versions as well. Custom node types are exempted from this since they
store all data as generic ID properties and can always be fully
serialized.
This is a revised version of the initial attempt in #114803.
Doing the node type fix in the after-linking stage ensures that
versioning code can change outdated node types which might otherwise get
removed by this type check.
Pull Request: #116906
Support for having an input and output socket in the same socket declaration
builder was added for the original node panels to be able to support inline
sockets. However, those were generally disabled for now. As can be seen in the
simulation and repeat zone, inline sockets can work differently too. Having an
input and output in the same socket declaration builder builder makes some
things simpler but makes other things much harder. For example, the current
design wouldn't work all that well if the input and output socket has different
types. This is easier to do with the `align_with_previous_socket` approach.
I'm not yet entirely sure whether we want to use the same approach for
corresponding sockets in the node tree interface, but that can be tried and
decided separately.
Pull Request: #119599
Mixed resolution rendering had some issues with overscan and border
rendering.
- `render_offset` was in display space and not in render space. Is
now replaced by the `overscan_extent`.
- `overscan_extent` introduced that stored the overscan of the render
extent.
- Fixed issues to determine the film sample weight when `scaling_factor`
was used. It didn't match decompose the actual offset making the
length of the same to large, what blurred the final samples.
NOTE: there are some other issues related to border rendering which was
already in main before mixed resolution rendering was added. I assume
that viewport render image in camera view still adds an additional
offset, which should be ignored.
Fixes#119510Fixes#119511
Pull Request: #119524
Add more flexibility to tooltip images by adding the ability to specify
if (one of two) checkerboards are added, border, premultiplied
blending, or recoloring.
Pull Request: #119437
This became a bottleneck in one of the test files during playback.
A grease pencil object was using an array modifier which tags the triangle
caches to be invalidated. Then it re computed the fills on every frame, which
was slow (when single threaded).
With this patch, the playback went from ~43fps to 60+fps.
Pull Request: #119531
This makes the edit mode drawing for the new curves data more similar
to the old edit mode. Specifically, it draws the evaluated curves now instead
of just a poly curve. Furthermore, it now draws bezier handles as well as
a separate control curve for nurbs curves.
Pull Request: #119053
It seems that the compiler on windows struggled to
correctly assign the namespace of the `LocalMemArena`
destructor because the struct was defined locally
in a lambda.
This moves the struct definition out of the lambda.
This was caused by 745fd2a2cb.
The issue was that there was an attempt at calling
`uncollapse_by_default` on a `LayerViewItem`
which can't be collapsed (because it can't have any children).
This then triggered the assert.
The fix removes the call to `uncollapse_by_default` for
`LayerViewItem`.
For historical reasons, the `multi_input_socket_index` was actually reversed
(large index comes first). This patch renames it to `multi_input_sort_id` and
adds a comment. This new name makes it less confusing that the id is reversed.
Pull Request: #119652
For example, copying and moving a trivial type ends is the same.
However, currently we generate the code for both cases independently
instead of reusing the same underlying function.
This reduces the size of the Blender binary from `218.548.896` to
`218.355.552` bytes for me. So it's a reduction of about 200kb.
It's probably possible to reduce this even more, but that's for another day.
The main tricky thing here is telling the compiler that a `const` from a
function parameter can be cast away for trivial types (see code comment).
Maybe there is a better way to do this while making sure the compiler
doesn't generate unnecessary code.
Pull Request: #119601
This change reverts 14500953ed. This commit improved the performance
but introduced the regression. The wireframe shader checks the normal
buffer to detect if attributes are being rendered. The VBO contains both
positions and normals.
In Blender 4.2 this VBO was separated (#116902)and this solved the rendering. It is
to late and risky to add this separation to 4.1 in the last minute so we
decided to revert the performance improvement as it was already an issue
for several years.
The performance improvement will still be in Blender 4.2 where it doesn't
have these artifacts.
Pull Request: #119656
This fix should only be committed to blender-v4.1-release branch
Blender 4.2 the pos/nor buffers are separated and doesn't lead
to drawing artifacts.
This reverts commit 02379f3200
This fix should only be committed to blender-v4.1-release branch
Blender 4.2 the pos/nor buffers are separated and doesn't lead
to drawing artifacts.
This reverts commit 02379f3200
Simplifies/optimizes the "font" shader. It runs faster now too, but primarily
this is so that it loads/initializes faster.
* Instead of doing blur via individual bilinear samples (where each sample is 4
texel fetches), do raw texel fetches of the kernel footprint and compute final
result by shifting the kernel weights according to bilinear fraction weight.
For 5x5 blur, this reduces number of texel fetches from 64 down to 36.
* Instead of checking "is the texel inside the glyph box? if so, then fetch it",
first fetch it, and then set result to zero if it was outside. Simplifies the
branching code flow in the compiled GPU shader.
* Avoid costly integer modulo/division for "unwrapping" the font texture. The
texture width is always power of two size, so division/modulo can be replaced
by masking and a shift. Setup uniforms to contain the needed data.
### Fixes
* The 3x3 blur was not doing a 3x3 blur, due to a copy-pasta typo (one of the
sample offsets was repeated twice, and thus another sample offset was
missing).
* Blur towards left/top edges of the glyphs had artifacts, because float->int
casting in GLSL rounds towards zero, but the code actually wanted to round
towards floor.
Image of how the blur has changed in the PR.
### First time initialization
* Windows 10, NVIDIA RTX 3080Ti, OpenGL: 274.4ms -> 51.3ms
* macOS, Apple M1 Max, Metal: 456ms -> 289ms (this is including PSO creation
time).
### Shader performance/complexity
Performance I only measured on macOS (M1 Max), by making a BLF text that is
scaled up to cover most of screen via Python. Using Xcode Metal profiler,
drawing that text with 5x5 shadow blur: 1.5ms -> 0.3ms.
More performance analysis details in PR.
Pull Request: #119653
This file is generated by the attribution builder for every release
and it's up to the release team to check the log for extern and others to make sure this is up to date.
This PR limits adding the RNA property `use_limit_to_segment`
to `ShapeType::Line` based sculpt gesture operators, as the
property is inapplicable for the other two types.
Pull Request: #119670
This uses parallel reduction when doing the octahedral map re-mapping.
The goal is not the speedup but the accuracy of the computation (temporal
stability) and to pave the way for sunlight extraction.
This weight each individual samples using texel solid angle for correct
energy.
After optimization, the cost is not so expensive (1024px² octahedral map):
- new: 263µs remap + 12µs sum
- old: 75µs remap + 180µs irradiance update
We could optimize it more, but that feels unecessary given that the first
two filter pass are 7ms and a more pressing optimization.
The old irradiance update was fast because it was using the mip2 which
was already pre-filtered and using way less pixels (which already yield a
temporally stable output).
This new implementation does consider all pixel in the LOD0 which will
allow for more precise sunlight extraction.
This also comes with a cleanup of the update tagging.
Pull Request: #119537
This improves performance by **reducing** the amounts of threads used for tasks
which require a high memory bandwidth.
This works because the underlying hardware has a certain maximum memory
bandwidth. If that is used up by a few threads already, any additional threads
wanting to use a lot of memory will just cause more contention which actually
slows things down. By reducing the number of threads that can perform certain
tasks, the remaining threads are also not locked up doing work that they can't
do efficiently. It's best if there is enough scheduled work so that these tasks
can do more compute intensive tasks instead.
To use this new functionality, one has to put the parallel code in question into
a `threading::memory_bandwidth_bound_task(...)` block. Additionally, one also
has to provide a (very) rough approximation for how many bytes are accessed. If
the number is low, the number of threads shouldn't be reduced because it's
likely that all touched memory can be in L3 cache which generally has a much
higher bandwidth than main memory.
The exact number of threads that are allowed to do bandwidth bound tasks at the
same time is generally highly context and hardware dependent. It's also not
really possible to measure reliably because it depends on so many static and
dynamic factors. The thread count is now hardcoded to 8. It seems that this many
threads are easily capable of maxing out the bandwidth capacity.
With this technique I can measure surprisingly good performance improvements:
* Generating a 3000x3000 grid: 133ms -> 103ms.
* Generating a mesh line with 100'000'000 vertices: 212ms -> 189ms.
* Realize mesh instances resulting in ~27'000'000 vertices: 460ms -> 305ms.
In all of these cases, only 8 instead of 24 threads are used. The remaining
threads are idle in these cases, but they could do other work if available.
Pull Request: #118939
Buttons for mesh symmetry on the toolbar, and other buttons of the same
functionality located in other areas of the window, weren't updated when
clicking on them.
Pull Request: #118508
For spherical spot light, when the shading point is close to the light
source, we switch to sampling the light spread instead of the visible
cone from the shading point. This has the benefit of less noise when the
spread is small.
However, the light spread sampling was not considering non-uniform
object scaling, where the actual spread might be different.
This patch switches sampling method only when the smallest enclosing
spread cone is smaller than the visible cone from the shading point.
An alternative method would be to compute the actual solid angle of the
scaled cone, and sample from the scaled cone. However, that involves
ray transformation and modifying the sampling pdf and angle. Since
non-uniform scaling is rather a niche case, it's probably not worth the
computation effort.
Pull Request: #119661
This adds the approximation of phase function convolution
of the distant lighting captured inside probe volumes.
This is based on a publication at siggraph from Bartlomiej Wronsky
"Volumetric Fog: Unified compute shader based solution to
atmospheric scattering"
Implementation is quite straightforward. However this isn't as
good as one can expect as there isn't self shadowing from the
volume themself, so the lighting is still quite flat.
To fix this, we have to add support for volumetrics inside
probe volumes baking. But this approach would still be static
so a more general solution is still to be found for dynamic
volumes like smoke simulations.
Pull Request: #119479
This uses Spherical Harmonics to store the indirect lighting and
distant lighting visibility.
We can then reuse this information for each closure which divide
the cost of it by 2 or 3 in many cases, doing the scanning once.
The storage cost is higher than previous method, so we split the
resolution scaling to be independant of raytracing.
The spatial filtering has been split to its own pass for performance
reason. Upsampling now only uses 4 bilinearly interpolated samples
(instead of 9) using bilateral weights to avoid bleeding.
This also add a missing dot product (which soften the lighting
around corners) and fixes the blocky artifacts seen at lower
resolution.
Pull Request: #118924
* Extract function for building anonymous attribute references.
* Use is-function-node state directly during building instead of during finalization.
Pull Request: #119677
Not quite a 1:1 match, some customizations have to be made for the API URL differences and the face that there are no translations.
This also enables the version switch publicly now that this change fixes a few bugs.
This PR strips the `sculpt_gesture_trim` prefix and other similar
prefixes from the `sculpt_trim.cc` code, as it is already contained
within the `blender::ed::sculpt_paint::trim` namespace.
Pull Request: #119680
The list identifier includes the class name and an list_id,
see: WM_uilisttype_to_full_list_id
This requires using UI_MAX_NAME_STR (as noted in doc-string).
- Prefix comments before members is used practically everywhere,
remove C99 syntax from inside comments.
- Replace double quotes with backticks for code styling.
Since [0] some comments referencing UI_MAX_NAME_STR were incorrect.
Also correct buffer size for preview_id in uiTemplatePreview so newly
created names are guarantee to be the correct size.
[0]: a180314ac5
Previously, we haven't added this because there were plans to use these
declarations at a higher abstraction level where one declaration potentially
contains more than one socket. This hasn't happened yet, and we are also using
other ways to achieve dynamic socket amounts (using dynamic declarations).
Therefore, it is reasonable to simplify the code by storing the integer socket
type in the declaration directly.
Pull Request: #119691
Allow the user to scale shadow-map resolution per-light.
Adapt the PCF scale based on shadow-map to pixel footprint ratio,
since we can no longer assume that higher LODs don't need filtering.
This allows using much lower shadow resolutions, which can yield
quite significant performance improvements, with relatively little
perceptual quality loss (at the cost of softening shadow edges).
The per-light resolution scale is a literal scale, so for example 0.5
means half the resolution. The Scene Simplify Shadows setting has
been updated to match this behavior.
Pull Request: #119436
Smooth transparent shadows by jittering their opacity threshold every
sample.
Always enabled on final renders, optionally enabled in the viewport with
`scene.eevee.shadow_jittered_transparency`.
Pull Request: #119480
Replace the hashed alpha function in shadows for a fully random one.
Add pcg functions to `gpu_shader_common_hash.glsl`
(Split from #119480)
Pull Request: #119526
GPv3 uses `OB_MODE_EDIT` so it falsely shows empty mesh data in stats.
This worked in legacy gp because it had special edit_mode type.
To show correct grease pencil data in edit mode, rearrange if conditions and
add special check for `OB_GREASE_PENCIL`
Pull Request: #119689
Even though there is a dialog users must accept when removing a
repository & directory being removed is shown, it's possible users
assume this only removes files which are part of the repository after
pointing the custom-directory to their home directory or similar.
Removing repositories which point to a custom-directory now only
remove packages and server meta-data to prevent accidents.
Resolves#119481.
Although this error isn't specific to extensions, extensions containing
a blender_manifest.toml but no __init__.py would import a module
with the __file__ set to None.
While there is logic to handle this case, it didn't account for modules
already in sys.modules with __file__ set to None.
From a user perspective enabling the extension silently failed raising
an error on the second attempt to enable.
When loading an add-on without a __file__ set the "cause" was empty.
Now the modules __path__ is included (when available) which points
to the path that failed to load to help with troubleshooting.
It's not necessary to check for `points.size() >= 3` since the extra
point space is always added thus the point should always be filled with
valid attribute to avoid erroneous "closing stroke".
Pull Request: #119727
Enables operators that uses `WM_operator_props_dialog_popup`
or `redo` popup to use layout panels.
Other popups would likely also support layout panels, only
they need to set its dummy panel with `UI_popup_dummy_panel_set`.
Popups don't normally use `Panel`, but that's the type that stores the
layout panel states. Therefore, to use layout panels in a popup, one
currently needs to create a dummy panel whose purpose is to store the
layout panel states for as long as the popup is open.
Alternatively, we could potentially also store the layout panel states
somewhere else in the future for popups, but that might be a more involved
change for now.
See #119519 for an example script that uses layout panels in a popup.
Pull Request: #119519
The `bounds` is `nullopt` when the number of points is 0 at current frame.
The fix uses `value_or()` to make sure we get some bounds.
Also uses `Bounds<float3>` instead of `std::optional<Bounds<float3>>`
in `gpencil_object_cache_add`.
Pull Request: #119690
The Volume input of the world didn't show up inside the property panel.
Reason was that the panel didn't have EEVEE-Next inside its list of compatible
engines.
Pull Request: #119729
No functional changes.
The `BeztMap` struct is used when sorting Keyframes during transformations
in the Graph Editor.
Things that were changed:
* Removed unneeded `newIndex`. This was just the index of the
`BeztMap` in the array, which we already have since we iterate with a for loop.
* Access the `BezTriple` array by index instead of pointer offsets.
This makes it a bit easier to see what's happening.
* Renamed struct members to clarify their use.
* Remove forward declaration of certain variables (e.g. loop counter vars)
Pull Request: #119733
This patch adds clamped boundaries variants of the nearest interpolation
functions in the BLI module. The naming convention used by the bilinear
functions were followed.
Needed by #119414.
Pull Request: #119732
Before this PR the sorting function would receive all FCurves from
the `anim_data` ListBase and sort them + recalculate the handles.
Considering we are already checking
IF an `FCurve` needs sorting we might as well use
that and limit the sorting to FCurves that actually need it.
Doing that gives the following performance uplift.
| - | Before | After |
| - | - | - |
| Moving 1 key only | 109ms | 0.72ms |
| Moving 1 key of each FCurve | ~2000ms | ~2000ms |
Pull Request: #119735
Compositor: Make Hue Correct node wrap
This patch makes the Hue Correct node as well as the Hue Correct VSE
modifiers to wrap, such that no discontinuities occur for the red hue.
Since it now wraps, the default curve preset now exempts the last point
of the curve.
A new CUMA_USE_WRAPPING flag was added to specify wrapping for curve
maps. The implementation works by adding two virtual points before and
after the terminal points in the curve map, such that their handles
match, and would then produce a continues curve.
This is a breaking change, since existing curves were also adjusted
using versioning. However, the change will not be significant, since in
most realistic cases, the terminal points will be close to each other,
and even with wrapping, the connection will be very sharp, almost
matching the old behavior.
Pull Request: #117114
This is implements the system texture coordinates for GPv3.
This pull request adds:
- System for storing and viewing texture coordinates.
- Texture coordinates are convert when covering from legacy to GPv3,
(Tested with object and layer transformation)
- Textures are set to the drawing plane.
Pull Request: #119303
This patch adds a utility function for nearest interpolation with
clamped boundaries and normalized coordinates to the MemoryBuffer class.
Similar to the GLSL texture() function.
Caused by 25a10c211f.
The socket_type field for socket declarations wasn't set for declarations
created from the node group interface DNA tree structure. Arguably the
socket types should be set by the constructors, but setting it in one more
place isn't bad either, and is a simple fix for now.
This was only used on WIN32 when the temporary directory didn't exist.
When the check was added [0] this made some sense because it relied on
`U.tempdir` existing, since then additional checks have been added to
ensure a temporary directory can be used. Further, this fall-back
location isn't documented in the user manual.
[0]: 615db01b01
Replace: `{BLENDER_RESOURCE_PATH_USER}/extensions`
With: `{BLENDER_USER_EXTENSIONS}`
This follows BLENDER_USER_CONFIG & BLENDER_USER_SCRIPTS conventions.
Reading the environment variable and accessible via
`bpy.utils.user_resource('SCRIPTS')`
Add some padding to the different shapes used to draw nodes to
prevent transparent gaps between them.
Also improve positoning of the node's outline.
Pull Request: #119001
By default a URL would be used for the module name of new remote repos,
the '.' characters were removed, joining words together.
Even though this often isn't user visible, it is used for extension
directory names, command-line access & may show up in error messages.
Use the Graph Editor icon for the "View in Graph Editor" operators,
to make a connection with the entry in the list of editors and the
View menu in the Dope Sheet.
Only use icon on the first item of the section, according to the HIG.
When previewing an action in the NLA, the drawing code would
calculate the Keylist for the whole action regardless of what is shown.
This patch limits the keylist creation to only do it for the viewport range
increasing performance in the case when less than the whole action is visible.
whole F-Curve visible
* Before 60ms
* After 60ms
zoomed in
* Before 60ms
* After 1.6ms
Pull Request: #119470
No functional changes intended.
The `insert_keyframe` function had a `bAction` argument that could be
a `nullptr`. If it was a `nullptr` it would be queried from the `ID`.
However in all cases where it is passed it is also gotten from the `ID`, making
the argument redundant.
This PR removes the argument to simplify the function.
Pull Request: #119742
This PR extends the existing `Ease` operator with a sharpness property.
This means it has two parameters:
* Curve Bend: Define which key to favor. At 0 it's exactly between the two keys.
* Sharpness: Higher values make the change more abrupt.
During modal operation it is possible to switch the slider between those two by pressing `TAB`.
Pull Request: #117287
Fix the name uniqueness check for editbones. The function can receive a
"bone to ignore", which would not be properly ignored. If it was found
earlier in `armature->edbo` than another bone with the same name, the
name would incorrectly be marked as unique.
This issue only occurred when a "bone to ignore" was passed to the
uniqueness check. This never actually happens in the current code, but
that's going to change soon.
Ensure that subdividing "Bone" results in a chain "Bone", "Bone.001",
"Bone.002", etc.
Before this commit the order would be "Bone", "Bone.004", "Bone.003",
etc.
This might break add-ons that assume to know the bone names before the
actual subdivision happens. This would always have been fragile, as
there may, for example, already have been a "Bone.001"; in that case
subdividing "Bone" would result in "Bone", "Bone.002", etc. Instead, the
parent-child chain should be followed.
Pull Request: #119775
Replace the use of the `LIB_TAG_DOIT` flag which cwas used to
only process each object data ID once with a Set. Return the objects
or bases in a Vector. Now we only iterate over the view layers bases
once instead of three times.
Pull Request: #119788
When frame capturing cannot be start an error is printed to the console.
Most of the time the issue is that you're not running from within a frame
capturing environment. For example not from your IDE/GPU debugger.
The print statement is often just not that useful. Especially when
running the `WITH_GPU_DRAW_TESTS` where it floods the console.
Pull Request: #119783
When creating popover with `UI_popover_begin` the popover block
is created just once without a region and since `UI_popover_begin` blocks
are not support refreshing, layout panels may not be compatible
in this kind of popover since open/close state cannot be refreshed either.
Only `UILayout.popover(...)` popovers are supported to have layout panels.
Pull Request: #119796
- Avoid unnecessary redundancy in function and variable names
- Use more consistent variable names in some places
- Avoid duplicate null checks and incorrect "ensure" naming
- Use const in a few places
- Pass more specific arguments besides just the curves
- Remove unnecessary namespace specification
This happened, because function returned early if `Editing` was nullptr.
However it is needed only for timeline boundbox, which is already initialized
for case where there are no strips.
Pull Request: #118864
Cached strip images were not invalidated, which caused, that these
images were kept in memory in incorrect colorspace.
Code readability was improved a bit and clarifying comments were added
to avoid confusion about what is the code supposed to do.
Pull Request: #119475
Currently the overlay text, like stats for example, are drawing with
the widget_label font style size but using widget's weight. This is
just because UI_fontstyle_set is not called. Without this call we can
get a jiggling of the overlay text if these two styles differ in
weight. This PR also makes an (unnoticeable) correction to the font id
used in fontstyle_set_ex. uiFontStyle's uifont_id is not always the
same id as regular font ids, but here they are confused.
Pull Request: #119808
This adds a new exprimental option to automatically convert GP legacy
data to GPv3 one.
It supports also linking and appending cases. Conversion also happens
when opening a file linking GP legacy data saved by an older .blendfile.
Pull Request: #118705
It is unknown why/how this can happen, but there are some files out there
that have e.g. Objects flagged as embedded data... See e.g. the
`(Anim) Hero p23 for 2.blend` file from our cloud gallery
(https://cloud.blender.org/p/gallery/5b642e25bf419c1042056fc6).
Not much to be done, but add another checking pass at the end of
readfile process to fix these.
This allows to use unions on the C++ side and safe type
casting on the GPU side.
The type casting functions are statically verified at
compile time in C++.
This PR doesn't change the size of the light struct
but removes the need of packing floats in the `object_mat`.
The matrix will be changed to a `float4x3` in another PR
and will reduce the struct by 16 bytes.
This remove the need for the light parameters macros and
reveals the padding members that could be used for future
features for each type.
After this, all accesses to light type dependent data in
the shaders should be done using:
- `LightLocalData light_local_data_get(LightData light)`
- `LightSpotData light_spot_data_get(LightData light)`
- `LightAreaData light_area_data_get(LightData light)`
- `LightSunData light_sun_data_get(LightData light)`
Note that these functions are simple passthrough for Metal
since it supports `union` (but enforce for error checking
if option is enabled).
The error check on GPU is a bit costly so it is disabled
by default.
Pull Request: #119713
The issue is that a draw call in the sequencer does not have any
knowledge of the viewport's wireframe opacity and threshold settings,
defaulting both to 0.
A similar issue #86956 implemented a quick hack to fix grease pencil
shading in VSE, so I opted to do the same here. In the future, a better
solution could be implemented to preserve the entire v3d.overlay.
I should note that I made `wireframe_threshold = 0.5f` to match the
default value given in `versioning_280.cc` but if this works better
as `1.0f` instead let me know.
Pull Request: #119811
Currently we have a cache for all combinations of "strand/strip" and
the four subdivision levels. Recomputing this data should be very fast
and doesn't require re-uploading data from the CPU. Because they are
scene settings, they will be the same for all render engines too, so we
won't have a case where we're constantly requesting different values.
The extra caches just complicate code, so better to remove them. Now
the final evaluated cache remembers the settings it was created with,
and it's cleared if they are changed.
Pull Request: #119804
Now that all relevant code is C++, the indirection from the C struct
`GPUVertBuf` to the C++ `blender::gpu::VertBuf` class just adds
complexity and necessitates a wrapper API, making more cleanups like
use of RAII or other C++ types more difficult.
This commit replaces the C wrapper structs with direct use of the
vertex and index buffer base classes. In C++ we can choose which parts
of a class are private, so we don't risk exposing too many
implementation details here.
Pull Request: #119825
Multi input socket has no connections.
But the internal link must still exist and be considered as first one.
3dcdfa42da
to888528fefb
Fix: Correct offset for internal multi-input linkto Fix: Correct offset for internal multi-input linkFix: Correct offset for internal multi-input linkto Fix: Correct offset for internal multi-input linkFix: Correct offset for internal multi-input linkto Fix: Correct offset for internal multi-input linkFix: Correct offset for internal multi-input linkto Fix: Correct offset for internal multi-input linkFix: Correct offset for internal multi-input linkto Fix: Correct offset for internal multi-input link888528fefb
to6ce312fb5d
Fix: Correct offset for internal multi-input linkto Fix: Correct offset for internal multi-input linkFix: Correct offset for internal multi-input linkto Fix: Correct offset for internal multi-input link61d99d45
ID_OB
in case of defined unknown ID type. a689d8416a7fd08063c1
toa6f334455b
a6f334455b
todd064b3afa
Generally makes sense, but the comment is a bit confusing right now.
@ -1718,8 +1718,10 @@ static float2 socket_link_connection_location(const bNode &node,
{
const float2 socket_location = socket.runtime->location;
if (socket.is_multi_input() && socket.is_input() && !(node.flag & NODE_HIDDEN)) {
/* Since \link is exist, at least one link always connected to socket. */
Why the
\
in front oflink
? Better add some context with internal links in the comment.--command
LayerTreeView::build_tree()
get_mutable_attribute
WITH_CYCLES_DEBUG
flag not enabled on Metal