Age | Commit message (Collapse) | Author |
|
This patch partitions the active indices into chunks prior to sorting by material in order to tradeoff some material coherence for better locality. On Apple Silicon GPUs (particularly higher end M1-family GPUs), we observe overall render time speedups of up to 15%. The partitioning is implemented by repeating the range of `shader_sort_key` for each partition, and encoding a "locator" key which distributes the indices into sorted chunks.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D15331
|
|
Use const vars & make order of min/max checks consistent.
|
|
Also remove duplicate comments in bmesh_log.h, caused by automated
comment relocation in [0].
[0]: c4e041da23b9c45273fcd4874308c536b6a315d1
|
|
|
|
Also remove redundant check.
|
|
Now only the utf8 buffer is used there is no reason to pass both.
|
|
The Difference Matte and RGB To BW nodes have a wrong output type. They
should be floats but are of type color.
This is a regression that was introduced during the migration to the
socket builder API in D13266.
Reviewed By: Blendify, fclem
Differential Revision: https://developer.blender.org/D15232
|
|
The text representation of release events is never used,
so only calculate this for press events.
|
|
Quiet warning from [0], no functional change as the this information
was always ignored.
Key release events shouldn't have associated text, this was cleared
for wmEvent's, so there is no reason to pass it from GHOST.
[0]: d6fef73ef110eb43756b7b87c2cba80abae3b39f
|
|
|
|
As part of a larger change (https://developer.blender.org/D14162),
adding more test coverage for existing functionality separately.
New tests:
- ids_sorted_by_default
- ids_sorted_by_default_with_libraries
- name_too_long_handling
- create_equivalent_numeric_suffixes
- zero_suffix_is_never_assigned
- remove_after_dup_get_original_name
- name_number_suffix_assignment
- renames_with_duplicates
- names_are_unique_per_id_type
|
|
Using geometry nodes with attributes on a curve object and changing the
output is crashing. This is because the `render_mutex` in the curve
drawing cache is cleared after changes in `curves_batch_cache_init` and
set to null. The cache isn't actually needed currently because all draw
updates are single-threaded, but the new `drw_attributes_merge` function
still tries to access it (this seems to be tolerated on Linux platforms
but crashes on Windows).
Make sure the render_mutex is always initialized after (re-)initializing
the cache.
|
|
|
|
The type counts have to be updated eagerly. This was missing from
the realize-instances code before, leading to bugs further down
the line.
|
|
The sorting of index vectors assumed that all vectors have
at least one element. Now this is checked for more explicitely.
|
|
This is a follow up for rB44e530e1b107fd0d91f472f9a58642ab59fd5422
which did not fix the function that interpolates boolean attributes.
|
|
Looks like this was wrong all the time.. Luckily, this conversion
is not very common.
Found when testing D15274.
|
|
Many menus get their labels exported to the .po file, but then are not actually translated in the UI.
Before:
{F13283752}
After:
{F13283750}
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D15417
|
|
Rename and refactor several F-curve key manipulation functions, and move
them from `editors` to `blenkernel`.
The functions formerly known as `delete_fcurve_key`,
`delete_fcurve_keys`, and `clear_fcurve_keys` have been moved from
`ED_keyframes_edit.h` to `BKE_fcurve.h` and have been renamed according
to hierarchical naming rules.
Below is a table of the naming changes.
| From | To |
| -- | -- |
| `delete_fcurve_key(fcu, index, do_recalc)` | `BKE_fcurve_delete_key(fcu, index)` |
| `delete_fcurve_keys(fcu)` | `BKE_fcurve_delete_keys_selected(fcu)` |
| `clear_fcurve_keys(fcu)` | `BKE_fcurve_delete_keys_all(fcu)` |
| `calchandles_fcurve()` | `BKE_fcurve_handles_recalc()` |
| `calchandles_fcurve_ex()`| `BKE_fcurve_handles_recalc_ex()` |
The function formerly known as `delete_fcurve_key` no longer takes a
`do_fast` parameter, which determined whether or not to call
`calchandles_fcurve`. Now, the responsibility is on the caller to run
the new `BKE_fcurve_handles_recalc` function if they have want to
recalculate the handles.
In addition, there is now a new static private function called
`fcurve_bezt_free` which sets the key count to zero and frees the key
array. This function is now used in couple of instances of functionally
equivalent code. Note that `BKE_fcurve_delete_keys_all` is just a
wrapper around `fcurve_bezt_free`.
This change was initially spurred by the fact that `delete_fcurve_keys`
was improperly named; this was a good opportunity to fix the location
and naming of a few of these functions.
Reviewed By: sybren
Differential Revision: https://developer.blender.org/D15282
|
|
|
|
Some operator titles were not translated in the quick favorites menu.
Before:
{F13283724}
After:
{F13283725}
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D15416
|
|
|
|
Fundamental issue is that the attribute api returns none, because
the custom data api returns null for a layer when the size of 0.
This should be improved separately.
|
|
3D text included checks for escape codes such as \n\r\b which have not
been included in wmEvent.ascii since [0] (2009).
Remove these and use more straightforward logic for overriding the
events text input.
[0] 66437a62a73966de8ccb673473ba69d6c1ed66a3
|
|
- Remove references to `ISTEXTINPUT` as any keyboard event with it's
utf8_buf set can be handled as text input.
- Update references to the key repeat flag.
|
|
The `ascii` member was only kept for historic reason as some platforms
didn't support utf8 when it was first introduced.
Remove the `ascii` struct members since many checks used this as a
fall-back for utf8_buf not being set which isn't needed.
There are a few cases where it's convenient to access the ASCII value
of an event (or nil) so a function has been added to do that.
*Details*
- WM_event_utf8_to_ascii() has been added for the few cases an events
ASCII value needs to be accessed, this just avoids having to do
multi-byte character checks in-line.
- RNA Event.ascii remains, using utf8_buf[0] for single byte characters.
- GHOST_TEventKeyData.ascii has been removed.
- To avoid regressions non-ASCII Latin1 characters from GHOST are
converted into multi-byte UTF8, when building X11 without
XInput & X_HAVE_UTF8_STRING it seems like could still occur.
|
|
While GHOST/SDL doesn't support non-ASCII text input,
use the UTF8 buffer to be consistent with all other back-ends.
Move the conversion from SDL_KeyboardEvent to ASCII into a function.
Also only lookup this value on key press (not release).
|
|
|
|
Differential Revision: https://developer.blender.org/D15421
|
|
Now all ghost back-ends support the key repeat flag
(accessed as WM_EVENT_IS_REPEAT from wmEvent.flag).
|
|
Fixes T99672
|
|
Using white spaces in data names should not be encouraged in general,
better not give wrong example here.
Originally part of D15441.
|
|
New remapper code would also fail in some cases when remapping
libraries, similar to the issue yesterday, because ID_LI type had no
mask value.
That would fail to remap `parent` member of a library to NULL when
deleting that parent, leading to a crash e.g. in Outliner tree building
code.
Reported by @JulienKaspar from Blender studio.
|
|
This patch updates the documentation for arguments regarding the `Gizmo`
type.
- Corrected `select_id` doc for draw_preset_ functions. `-1` indicates
that no selection ID is to be written, but previous docs incorrectly
specified `0` instead.
- Added missing doc for `target` argument for `target_set_handler`
function.
Reviewed by: Aaron Carlisle (Blendify)
Differential Revision: https://developer.blender.org/D14834
|
|
This patch allows new GizmoGroup classes to support tool fallback keymap.
With this patch, when new gizmo groups add `'TOOL_FALLBACK_KEYMAP'` to
its `bl_options`, the fallback tools are added to the group. This
allows a `WorkSpaceTool` (for example) to have selection be a fallback
tool if the user LeftMouse drags away from other gizmos in the group.
Reviewed by: Campbell Barton (campbellbarton)
Differential Revision: https://developer.blender.org/D15154
|
|
This commit exposes snap options in transform operators. These options
are needed for Python tools to control snapping without requiring the
tool settings to be adjusted.
The newly exposed options are:
- `snap_elements` for choosing which element(s) of target the source
geometry should snap to (ex: Face Raycast).
- `use_snap_self`, `use_snap_edit`, `use_snap_nonedit`,
`use_snap_selectable_only` for controlling target selection.
- `use_snap_project` for controlling Face Raycast snapping.
- `use_snap_to_same_target` and `snap_face_nearest_steps` for
controlling Face Nearest snapping.
Reviewed by: Campbell Barton (campbellbarton)
Differential Revision: https://developer.blender.org/D15398
|
|
The problem was the new generated strokes were copied from original and the location was offset to mirror, but the internal geometry data was not updated and the collision check done by brushes was not working.
Now, the internal geometry data is recalculated when the modifier is applied.
|
|
Not clearing runtime remapping data for the new ID as well as the old
one can lead to false stale data there, wichi could e.g. make indirectly
linked data be tagged as directly linked.
This would generate an error report on file write when hapening on
ShapeKey ID, since that type is not allowed to be directly linked.
|
|
|
|
The values used for axes weren't in any meaningful order, use defines
to improve readability.
|
|
There were two bugs, a regression in [0] and the object-data wasn't
tagged for depsgraph updating.
[0]: 19df0e3cfd5b9fed891ed81dd1123b2351605a7d
|
|
Simplify interface, regularize implementation and some light cleanup.
See also: T79304 and D15419.
|
|
The data has been moved somewhere else, the span should not
keep a pointer to it.
|
|
Measurements shown on average a 1.08x speedup for a 1.04x increase in
memory usage which is an acceptable trade off for a default setting,
although discoverability of such settings influencing memory usage could
be improved.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D15429
|
|
The operator bpy.ops.object.modifier_copy_to_selected()
does not work for the new Curves objects.
This is because it isn't added to BKE_object_supports_modifiers.
Differential Revision: https://developer.blender.org/D15439
|
|
|
|
|
|
Reviewed By: Richard Antalik
Differential Revision: http://developer.blender.org/D15376
|
|
On some hardware/systems, blender may crash when adding, rendering or displaying Grease Pencil objects.
In `/source/blender/draw/engines/gpencil/shaders/gpencil_vert.glsl`, line 35:
```
gpMaterialFlag gp_flag = floatBitsToInt(gp_mat._flag);
```
`gpMaterialFlag` is of type `uint`. This is a mismatched-type assignment that can cause crashes on some hardware/systems with GLSL that do not support implicit type casting.
So use `floatBitsToUint` for type conversion.
Differential Revision: https://developer.blender.org/D15433
|
|
A geometry component may reference read-only geometry.
In this case it has to be copied before making changes to it.
This was caused by rBb876ce2a4a4638142.
|