This adds a function `GreasePencil::count_frame_users_for_drawings()`
that computes the drawing user counts from the layer frames. This is used
to correctly initialize the runtime drawing user counts when reading the ID.
Note that we don't expose any functionality to instance drawings currently.
This change is also in preparation for when this will be possible.
Also adds a function `GreasePencil::validate_drawing_user_counts()` that
compares the actual user counts with the runtime user counts that are
stored. Only runs these checks in debug builds.
Pull Request: https://projects.blender.org/blender/blender/pulls/141458
Replace a `StringRef` with `std::string`, so that a copy is made of the
grid item identifier.
This identifier is used on redraw, to correlate the newly-drawn items
with items from the previous redraw. Using a `StringRef` here was
problematic when there's local assets, as those can be freed & re-built
(which in the case of the report happens on save/undo). Because of this,
the reference got corrupted, and the map lookup would fail. The "old
items" map now has a copy of the identifier, ensuring it is independent
of the data it represents.
Co-authored by Julian Eisel.
Pull Request: https://projects.blender.org/blender/blender/pulls/141888
Regression caused by 9e4c26574a.
Add strip stack as a key to the final cache.
Use the pointer to the list of sequences, as it is the easiest one to
obtain in all places where it is needed. This is slightly different
from the code prior to the 9e4c26574a where strips.last() was used,
but it allows to use the same logic in the prefetch job.
Pull Request: https://projects.blender.org/blender/blender/pulls/141778
Blender will crash if a file with an Alpha Over node was saved in 4.4,
then in 4.5 alpha, then back to 4.4. This is because the node was
missing forward compatibility code that allocates storage that was
necessary for the file to load correctly on older versions.
This was essentially missed in b62ef2cdd6 and 976efdcac9.
Pull Request: https://projects.blender.org/blender/blender/pulls/141873
The C++ Vector container has the benefits of the older C type,
along with improved performance, better type and memory safety,
and significantly improved ergonomics.
Pull Request: https://projects.blender.org/blender/blender/pulls/141759
When calculating the font size clamp by the requested cursor size
instead of 256.
This will often make the cursor smaller since allowing 256px wide
cursors is quite large.
Also de-duplicate size checks & round the text size to an integer to
avoid fractional scaling from subtle changes to the text.
Instead of relying on the the `U.ui_scale` being set when activating
the window, calculate the cursor size from the windows DPI.
This also de-duplicates cursor scale calculation.
- Use "g_" prefix for cursors to signify that it's global but local to
the file.
- Use `const` cast passing pixel data to GHOST_SetCustomCursorShape.
- Remove redundant cast.
The Windows and Wayland platforms can both create antialiased mouse
cursors from SVG sources. Platforms with WM_CAPABILITY_CURSOR_RGBA
can therefore show a better version of "WM_cursor_time". Instead of
four blocky digits in two rows this displays beautiful digits in a
single row.
Pull Request: https://projects.blender.org/blender/blender/pulls/141367
Assign the incoming operator properties directly to their corresponding
import/export options. This removes over 100 lines of unnecessary
ceremony assigning to local variables first.
Pull Request: https://projects.blender.org/blender/blender/pulls/141803
Use `std::string` rather than raw char arrays for `root_prim_path` and
`prim_path_mask`. This is a more natural fit for these arbitrary length
strings and it simplifies downstream consumers of the values.
Pull Request: https://projects.blender.org/blender/blender/pulls/141801
Meshes could still be present or missing when toggling overlays.
Toggling overlays alone does not trigger object syncing (which is needed
here since the visibility of active object might change).
So to resolve, trigger `rna_SpaceView3D_retopology_update` when toggling
overlays with enabled Retopology
Ref. 6fee44760a
Pull Request: https://projects.blender.org/blender/blender/pulls/141731
Node:
- Rename "Z Combine" node to "Depth Combine"
Sockets:
- First input "Image" -> "A"
- Second input "Image" -> "B"
- First Z -> "Depth A"
- Second Z -> "Depth B"
- Output Image -> "Result"
- Output Z -> "Depth"
This is a breaking change for the Python API
Pull Request: https://projects.blender.org/blender/blender/pulls/141676
This file is rather big. I'm working in it quite a lot, and find it very
hard to navigate in. I constantly get lost or spend time manually
looking for things.
Move the file to a directory, add an internal header, and split out
filtering and sorting code into own files. I'm sticking with these for
now to not cause too many conflicts with blender/blender!130543, which
does a lot of changes/additions to filelist.cc.
Pull Request: https://projects.blender.org/blender/blender/pulls/141744
The clipping flag of curve templates is applied only to point positions,
but allows zooming beyond the clip range due to numerial error.
If clipping is disabled the curve view rect is still restricted to
clip ranges (this could be considered a bug). However, zooming in and
back out leaves a tiny offset to the clip rect that allows one more
zoom-out step.
This patch ensures the curve rect is always within the clip rect.
When the difference is very small the view rect is snapped to the clip
rect.
Pull Request: https://projects.blender.org/blender/blender/pulls/141275
This patch allows allocating results on the host even if the context
uses GPU. It also adds support for uploading the host result into a GPU
allocated result. This is done to allow using results for storing data
that gets computed on the CPU be end up on the GPU, like some of the
cached resources used by the compositor. Those resources are refactored
accordingly in this patch as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/141745
Regression in 3.6 caused the orthographic camera gizmo to enter a
feedback loop where the gizmo range was changed while being interacted
with.
Resolve by preventing the range being updated during modal interaction.
Standardize on using `pxr::UsdTimeCode time` rather than the assortment
of other uses we had including:
- double motionSampleTime
- double motion_sample_time
- float time (!)
- pxr::UsdTimeCode timecode
This matches what the USD API itself uses.
The only exception is for the APIs and types defined in usd.hh that need
to be useable inside Blender itself. Those will remain unchanged and
continue to use "double motion_sample_time".
Pull Request: https://projects.blender.org/blender/blender/pulls/141756