This allows using strokes with a "Dot" material as boundaries for the
fill tool.
Note: "Square" materials are not currently supported, they get rendered
as dots too. This is the same in GPv2, there just isn't a simple shader
for rotated squares.
Pull Request: https://projects.blender.org/blender/blender/pulls/122324
The "Maximum Gap" setting for the "Natural Drawing Speed"
mode was not working.
This was because the code used `math::max` to try and clamp the value
to a maximum when it should have used `math::min`.
This fixes this issue.
Volumes and grids were not yet handled by the Geometry Nodes value
logging system. This patch adds basic information (number of grids)
to the value logger and node tooltips.
Pull Request: https://projects.blender.org/blender/blender/pulls/121622
This is slight optimization. Number of nodes with additional outputs like `Valid`
flag of other math-related things will be more in future, its better to strict api
and do not evaluate even singles. This also can reduce number of logged values.
Pull Request: https://projects.blender.org/blender/blender/pulls/121799
The issue was that the code called a function that doesn't
check for the active keyingset in combination with autokeying.
The fix is to just call `autokeyframe_pose_channel` which does that check.
I snuck in a minor change to the operator label.
It spells out "Quaternions" now instead of shortening to "Quats".
I haven't seen that way to shorten it in Blender before.
Pull Request: https://projects.blender.org/blender/blender/pulls/122170
The issue was that when adding a constraint through
python to an object that is already animated,
the constraint did not evaluate properly at first.
The fix is to update the depsgraph when creating a
constraint through the API.
Such an update already happened when running the
operator to create a constraint.
Pull Request: https://projects.blender.org/blender/blender/pulls/122198
Previously they were split between two places, and were not fully
consistent with each other. The inconsistency didn't result in
user-facing inconsistency due to what was called when at a higher
level, but this will ensure continued user-facing consistency as we make
more changes to the keyframing code.
Pull Request: https://projects.blender.org/blender/blender/pulls/122317
This patch adds support for timing GPU compositor executions. This was
previously not possible since there was no mechanism to measure GPU
calls, which is still the case. However, since 2cf8b5c4e1, we now flush
GPU calls immediately for interactive editing, so we can now measure the
GPU evaluation on the host, which is not a very accurate method, but it
is better than having no timing information. Therefore, timing is only
implemented for interactive editing.
This is different from the CPU implementation in that it measures the
total evaluation time, including any preprocessing of the inputs like
implicit type conversion as well as things like previews.
The profiling implementation was moved to the realtime compositor since
the compositor module is optional.
Pull Request: https://projects.blender.org/blender/blender/pulls/122230
The loose edge section of the index buffer was built incorrectly,
essentially assuming that all the hidden edges came at the end of the
loose edge indices. To correct this, we need to track the visibility of
each loose edge index rather than the visibility of each edge itself.
This is driven by the need to combine the loose and non-loose indices
into one IBO with the loose edges in a contiguous section, and the
desire to avoid restart "invisible" indices in the buffer to upload
less data to the GPU.
Refreshing refers to the recreation of the block and it's buttons in
this case.
Refreshing popup regions on text input was added in 7d80fde033. It can
be useful to update the popup contents on text input, searchboxes have
their completely own update handling however.
These popups had refreshing enabled, but the callback used for
refreshing would access a likely dangling operator pointer. One case can
use the operator-type pointer instead, in the other case disable
refreshing altogether. Also see 8ea79dc3a7.
This search menu creation/refreshing function relies on the operator
pointer which might be dangling. There are more such cases, will fix in
followup commits.
Since 2fbf206491 it's possible to store named strings in context, rather
than having to wrap them in RNA pointers. Here this can avoid some
boilerplate code.
After this the `AssetCatalogPath` RNA struct should be unused. Might
be better to remove it in 5.0 only though, since it's part of the API.
Added to #110461.
Pull Request: https://projects.blender.org/blender/blender/pulls/122331
Extract
- Add to Quick Favorites tooltip.
- "Mask", the name of a newly created mask (DATA_).
- "New" in the context of the new mask ID button.
- A few strings using BLI_STR_UTF8_ defines were not extracted.
Take the special characters out of the translation macros.
- "External" menu items from the filebrowser's Files context
menu (right-click on a file). These items were already extracted,
but not translated.
Improve
- Separate formatted error message "%s is not compatible with
["the specified", "any"] 'refresh' options" into two messages.
Disambiguate
- Use Action context for new F-modifiers' names. This is already used
for the "type" operator prop.
- Translate ImportHelper's default confirmation text using the
Operator context, as it uses the operator name which is extracted
with this context.
- "Scale" can be a noun, the scale of something, or a verb, to scale
something. The latter mostly uses the Operator context, so apply
this context to verbs, and the default contexts to nouns.
- "Scale Influence" can mean "Influence on Scale" (tracking
stabilization) and "to Scale the Influence" (dynamic paint canvas).
- "Object Line Art" as type of Line Art to add, as opposed to the
active object's Line Art settings.
- Float to Integer node: use NodeTree context for the node label, as
this is already extracted and used for the enum.
Do not translate
- Sequencer labels containing only a string formatting field.
Some issues reported by Gabriel Gazzán and Ye Gui.
Pull Request: https://projects.blender.org/blender/blender/pulls/122283
Sometimes it is necessary to pass additional data through generic UI entities,
to specific implementations. For example to pass additional options to panel
polling & drawing when instantiating a panel through its panel type. Or storing
additional data in a button, without hardcoding it in the button struct/class.
Passing data via context is a simple solution to this, however so far this only
works using hardcoded context queries or RNA pointers. For passing arbitrary
strings we've used workarounds like creating an RNA type to wrap it already.
For example `RNA_AssetCatalogPath`, which is used to dynamically populate menu
items based on an asset catalog path, via a generic menu type.
type instantiation. This makes it possible to invoke specific asset shelves as
popover panels.
Idea is simply to let `bContextStore` entries hold copies of the string (as
`std::string`), avoiding lifetime issues. Context APIs are extended to support
setting/querying strings via a context member name.
Pull Request: https://projects.blender.org/blender/blender/pulls/122113
The Precision setting (aka "fill_factor" in DNA) is used increase or
decrease the size of the image buffer for flood fill and thereby
balance accuracy vs. performance. This was not yet implemented in GPv3.
Pull Request: https://projects.blender.org/blender/blender/pulls/122318
This new `Method` property allows to replace Diffuse GI
by simple ambient occlusion. This can be desirable for
performance or look.
This doesn't add the memory savings but there are already
some performance gain by using this option.
Previously the `simplify_stroke` stroke step used the screen
space coordinates to do the simplification.
Instead, this is now refactored to use the more general
`geometry::simplify_curve_attribute`. This means we can
simplify the stroke based on the positions and radii.
The simplify step is also now hooked up to the simplify option
in the tool settings (under the `Stroke` panel).
This uses the `input_samples` tool setting as a minimum distance
in pixels (screen space) for newly created points.
By default this is 10, which means that the points in a drawn stroke
will all be at a distance of 10px or less (in screen space when
the stroke is drawn).
There were two issues:
* The const and non-const version behaved differently
* The frames map was not used to query the `frame_number`
Now both the const and non-const implementations behave
the same way. Additionally, the frames map is used to do a
lookup first and, on sucess , return the frame immediatly.
Otherwise we do a binary search for a keyframe that starts
before the frame number (and ends after).
Adds object conversion between Grease Pencil and Curves types.
GPv3 object is converted to Curves by combining all visible layers at
the current frame.
Curves object is converted to Grease Pencil by constructing a new layer
and keyframe with the curves geometry.
The type enum for the conversion operator gets a dynamic function to
check for the experimental flags and only show the enabled Grease Pencil
object types. It does not currently exclude unsupported type
combinations.
Pull Request: https://projects.blender.org/blender/blender/pulls/122304
Intel drivers do not follow the OpenGL standards for barriers. Although
the barriers are in balance for any thread, they need to be in a simple
for-loop in order to not crash on intel.
Recently the sun light extraction added new barriers that needed to be
adapted. We also reviewed all barriers to find faulty code-paths.
Previously we were able to change the for-loop with an index based loop.
But for more complex shaders this trick didn't work anymore and the loop
didn't seem to be unrolled anymore. `eevee_reflection_probe_remap_comp.glsl`
has more complexity due to the recent sun light extraction. For this shader
we manually did the unrolling.
**Compatibility**
- This PR was tested with success on Windows/OpenGL and Apple/Metal.
Pull Request: https://projects.blender.org/blender/blender/pulls/122308
The leak detection filter in the fill tool flood-fill method can cause
gaps between filled areas and boundary strokes. This is undesirable, so
the boundary stroke radius is scaled by half for drawing, typically
creating enough overlap between boundaries and the generated fill
strokes to hide artifacts. This behavior is copied from GPv2.
Pull Request: https://projects.blender.org/blender/blender/pulls/122307
The materials array was being allocated even when `eval_totcol` is zero.
The material code assumes that the array is nullptr when totcol is zero
and would leak that memory. Only allocate the array when the material
count is greater than zero.
When an error occurs in the text editor the cursor moves to the
location of the error and selects the word there. However the text
space is only updated if the current cursor position moved, not if the
selection end did. So if the cursor is already at the end of the word,
it looks like nothing has changed while under the hood the word has
been selected.
This commit simply checks whether the selection has moved and updates
the space if so.
Pull Request: https://projects.blender.org/blender/blender/pulls/121658
`template_search` was introduced in c20c203b82
Seems it assumed an active item is always there.
Without an active item, we are running into a crash trying to get the
textbut width.
So solution is to not draw that text button at all until an active item
is chosen.
This also goes in line with what `template_ID` is doing (it also skips
the text button without an active item).
Pull Request: https://projects.blender.org/blender/blender/pulls/122165