`bpy.utils.unregister_class(bpy.types.Menu)` would remove `bl_rna`
type information from the menu (also Panels & other built-int types).
Prevent unregistering built-in types since this will only cause problems.
For many selection variations we alter the operator's displayed name to
reflect this. For example "Select (Extend)", "Select (Deselect)", and
"Select (Toggle)". This PR does similar for VSE select modes, returning
"Select (Unconnected)", "Select (Linked Time)",
"Select (Linked Handle)", and "Select (Side of Frame)". These are shown
if you press Alt or Ctrl while hovering in the VSE Editor.
Pull Request: https://projects.blender.org/blender/blender/pulls/134195
While entering text into input buttons, show on Status Bar "Cancel",
"Confirm", "Select All", "Copy", "Paste". While dragging your mouse on
an a numeric input or slider show "Cancel", "Snap", "Precision".
Pull Request: https://projects.blender.org/blender/blender/pulls/133790
The "Red Alert" color is currently hard-coded, which causes problems in
themes. It also has an Enum value of 0, which precludes using this
value as "unset". We also use Error, Warning, and Info colors that are
part of the Info Editor. This PR moves these out of the Info Editor
and into the "State" part of the theme. And then makes TH_REDALERT use
the TH_ERROR color.
Pull Request: https://projects.blender.org/blender/blender/pulls/131127
This is due to hardcoded color and subdivision value. Also scale and
offset properties stored in overlay stuct was not considered. Now
multiply the transform matrix with `grid_mat` to make use of these
properties.
Pull Request: https://projects.blender.org/blender/blender/pulls/134382
Instead of using `DefaultMixer`, use the simpler `mix2` function.
This just decreases the overhead of computing each value.
In a simple test storing an attribute with the position of each
edge, I observed a 1.7x performance improvement: a change from
16 ms to ~9ms for an 8 million edge mesh.
Resolves#133196.
Even though from an internal standpoint one could also just use INT
layers (if I understand correctly they are both handled as long?), we
can just support getting/setting bool layers in
the bmesh layer API as well (otherwise, it looks impossible to access
boolean attributes in bmesh).
Pull Request: https://projects.blender.org/blender/blender/pulls/134344
When the object materials array is already the correct size these
functions don't do anything. Avoiding the depsgraph tags can avoid
unnecessary re-evaluations in cases like sculpt mode where we
purposefully avoid adding tags elsewhere. Split from !133842.
This patch removes the compositor texture pool implementation which
relies on the DRW texture pool, and replaces it with the new texture
pool implementation from the GPU module.
Since the GPU module texture pool does not rely on the global DST, we
can use it for both the viewport compositor engine and the GPU
compositor, so the virtual texture pool implementation is removed and
the GPU texture pool is used directly.
The viewport compositor engine does not need to reset the pool because
that is done by the draw manager. But the GPU compositor needs to reset
the pool every evaluation. The pool is deleted directly after rendering
using the render pipeline or through RE_FreeUnusedGPUResources for the
interactive compositor.
Pull Request: https://projects.blender.org/blender/blender/pulls/134437
This commit adds the "is volume scatter" output to the light path node
in the shader editor.
All the funcitonal code for this feature already exists in Cycles SVM
and OSL, but the output wasn't exposed on the node.
EEVEE does not support the feature, so it's output will
always be zero.
Pull Request: https://projects.blender.org/blender/blender/pulls/134343
This `panel->runtime->custom_data_ptr` is `MEM_delete`'d even, so that
was plainfully wrong allocation code.
Will crash in main/4.5 due to PointerRNA now requiring proper C++
construction/destruction.
Use `self` parameter to retrieve the actual 'owner' Main.
Previous code was using G_MAIN, which _should_ be fine in current usage
context, but would for sure break if these functions were to be used
from e.g. a temp Main.
Pull Request: https://projects.blender.org/blender/blender/pulls/134440
Cleaner and more future-proof. Also refactored slightly the code to make
it more readable.
And removed the 'experimental' warning in docs, this should have been
removed a long time ago.
The Keying Screen and the Anti-Aliasing nodes produce bad results in the
viewport compositor. This is because their cached resources are
allocated from the GPU texture pool, so they might get overwritten.
To fix this, we make sure those are not allocated from the texture pool.
Refactor how tooltips are sized, items placed, margins calculated, etc.
Current code has some mistakes that we use kludges to compensate for,
and it doesn't properly consider the font size in calculating margins.
The result shown to users in normal circumstances (changing resolution
scale only) with this PR applied should look identical to current.
Small changes when the text style size is changed. However, this is
mostly to allow later adjustments to padding, which currently _breaks_
when changed.
Pull Request: https://projects.blender.org/blender/blender/pulls/134205