This PR Updates the default colors of the Curve Handle types,
to increase readability and contrast.
Each color more different from each other to not be confusing.
Logic for the new colors:
* Purple/Dark blue is used for the `Vector` type to match the header
and sockets of Vector nodes.
* Red is used for `Auto` to show that they're locked and can't be
changed without converting the type.
* Pink/Salmon color is used for `Auto-Clamped` to be similar to `Auto`
while still being distinct.
* The remaining colors are chosen to be visually distinct from the
other colors.
This also fixes a problem caused by 1067112c11 (#145360) where
Free handle were left fully black. These black handles are extremely
hard to use with Grease Pencil objects, because Grease Pencil strokes
often are black. Because the `Free` handle selected color is also black,
handles do not show if they are selected.
Co-authored-by: Nika Kutsniashvili <nickberckley@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/147335
Qualcomm driver team found an issue how Blender uses dynamic rendering.
The issue is that between suspend/resume of rendering only a limited
commands are possible. However we add commands that shouldn't be added
there. It is a violation of the Vulkan spec
VUID-VkSubmitInfo-pCommandBuffers-06015
It went unnoticed as it is mere a single line in the 5000+pages spec
and wasn't covered by the validation layers. This has been reported
upstream.
To fix this issue we remove the usage of suspending/resuming render
passes and fix any issue that used this together with clearops. Most
likely the fix will require a second dynamic rendering pass when
clearops are used.
Pull Request: https://projects.blender.org/blender/blender/pulls/147425
This happened if proportional editing was enabled in editmode, not
having an active object plus being in object mode.
The transform system `convert_type_get` assumes
`TransConvertType_Object` if we dont have an active view layer object.
Corresponding code for proportional editing detection [in
`initTransInfo` & `saveTransform`] wasnt though (it used `toolsettings`
`proportional_edit` -- not `proportional_objects` -- in that case).
This is now corrected.
Probably caused by e91d581167
Pull Request: https://projects.blender.org/blender/blender/pulls/147193
This adds a new `PropertyRNA::name_func` property which is similar to the many
existing functions like `editable`, `get_default`, etc. It allows dynamically
getting a UI name for the property.
This is especially useful for node sockets, because those all have the same
hardcoded name "Default Value" which is not helpful. Since we already have
custom tooltips for sockets, this is mostly not visible to the user anymore. The
exception being menu sockets which draw the property name as title. Instead of
"Default Value", this patch makes it show the correct title.
Pull Request: https://projects.blender.org/blender/blender/pulls/147137
Spawning the tooltip or changing values would cause this.
Error in 28827b62f7
Above commit only considered PointCaches associated with **objects**,
not taking into account scene rigid body cache.
This is now added with this PR.
Previously it would cast into modifiers when we actually had a scene as
owner... resulting in a crash.
This was only exposed by 6bf8685628 (it crashes since, was just not
working properly before...). 6bf8685628 changed the data layout of
`struct Object` and only by pure luck the modifiers loop was skipped, now
with the new layout it is entered (but with garbage data resulting in the crash.
Pull Request: https://projects.blender.org/blender/blender/pulls/146577
If we detect an unsupported point instancing setup, do not attempt to
still export it out. Depending on the number of instances this can spew
10's of thousands of USD warning traces to the console.
Pull Request: https://projects.blender.org/blender/blender/pulls/147253
When all vertex groups are *unlocked* and the Normalize All operator is
run with "Lock Active" disabled, the operator would fail with the
patently false error message "All groups are locked".
The cause was that:
1. When all vertex groups are unlocked, the lock flags array used
internally would be left empty, with the idea that a non-existent
flag indicates "unlocked".
2. The code that determined if all groups were locked was checking
if any of those flags were "unlocked".
3. In an empty array, of course no items are "unlocked", and thus
it would think all items are locked.
The fix in this PR is to also check if the flag array is empty when
determining if all groups are locked.
Pull Request: https://projects.blender.org/blender/blender/pulls/147272
The `INSERTKEY_XYZ_TO_RGB` flag on `datablock.keyframe_insert()` in
Blender's Python API was changed to do nothing in #115297 and #119625,
in favor of determining fcurve coloring exclusively from user preferences.
This PR removes that now-useless `INSERTKEY_XYZ_TO_RGB` flag entirely.
Pull Request: https://projects.blender.org/blender/blender/pulls/147262
When there was no other data written in the CustomData for edges
or faces, the layers pointer would be null, and even though the layer
array we write isn't empty, the writing would be skipped. The fix
is just to make sure the layer pointer isn't null.
Pull Request: https://projects.blender.org/blender/blender/pulls/147411
Increase width in some popovers where labels would get trimmed.
This was even worst for other languages, but at least now labels don't
get ellipsis by default (English at 1.0 UI scale).
Based on the Python API for UV selection (!138197),
some methods that set the selection need a flush down argument too,
name the argument more clearly so the same name can be used by
all selection functions.
Enabling the normal parameter in the randomize operator triggered a
debug assert, since BKE_object_get_editmesh_eval_cage() was called on
the original object.
Resolved by retrieving the evaluated object from the depsgraph.
Ref !146608
This was caused by a stack-use-after-free due to passing a lambda directly
into a `FunctionRef` that keeps a reference to it. This only happened for
me in an asan build, but not in a release/debug build.
This extracts the construction of the `SocketValueInferencer` out of
`SocketUsageInferencer`. This leads to better separation of concerns and gives
the caller more flexibility. In the future, I especially want to get information
about which group input values were required to determine the usage of other
group inputs. This might help with caching the inferenced values.
Pull Request: https://projects.blender.org/blender/blender/pulls/147352
Support optionally flushing down:
- faces -> edges & verts.
- edges -> verts.
For C++ selection logic flushing down is avoided as it's an extra step
and instead, selection logic must take care to de-select edges/faces
before selection, so any shared vertices or edges are selected.
Flushing down means scripts can set the selection on faces or edges,
then flush this to all other elements without being concerned with
the order they have been set.
Ref !147351
This item is usually more annoying than useful. If one doesn't need it, one has
to go to the side bar to remove it or change its type. Creating the input is as
easy as just connecting a link or using link-drag-search.
Color grids are not supported yet, but vector grids are. Previously, trying to
link a color socket to the Grid to Field node just didn't work because it
doesn't support color sockets. Now, it will create a vector socket instead.
Pull Request: https://projects.blender.org/blender/blender/pulls/147343
The placeholder text of this property already says "Object", so the label saying
the same thing is quite redundant. It usually takes up extra space and cuts off
the names of selected objects, so having the label is arguably more inconvenient
than helpful.
This patch removes said label, giving more room for the object selector.
Pull Request: https://projects.blender.org/blender/blender/pulls/147338
The current placement of the operators make it easy for them to blend in with
other group nodes in that menu.
This patch adds an icon to better indicate the nature of these operators, and
have separators between it and other entries of the menu.
Pull Request: https://projects.blender.org/blender/blender/pulls/147330
Without this check, the dropdowns in Glass BSDF and Metallic BSDF show up twice
because layouts added with `add_default_layout` are drawn once at the start of
`ui_node_draw_node` and a second time in the loop.
Pull Request: https://projects.blender.org/blender/blender/pulls/147329
This reduces the constant overhead for the evaluation of the Geometry Nodes
modifier. Currently, it has to detect which gizmos are currently used, because
it has to potentially trigger additional evaluation to make the gizmos work.
Part of that is detecting which inputs are used, because gizmos for inputs that
are not used are hidden. Previously, it would compute whether each input is
used. This patch changes it so that only the inputs that have gizmos are
checked.
This reduces the evaluation time in my test from 2.2ms to 1.5ms.
Pull Request: https://projects.blender.org/blender/blender/pulls/147286
Seems to have been introduced by 1104c69a0e.
In `BKE_paint_copy` the `src->runtime` can be `nullptr` in some cases.
This adds a check to make sure to only copy the settings
when `src->runtime` exists.
Pull Request: https://projects.blender.org/blender/blender/pulls/147304
The "Add Reroutes" operator does not ignore virtual sockets when creating reroutes.
This has the unintended side effect of creating new sockets when attempting to link with said sockets.
This patch adds a check that explicitly skips over them.
Pull Request: https://projects.blender.org/blender/blender/pulls/147306
This PR renames "Fac" sockets to "Factor" in the user interface across
shading and compositing nodes, while keeping the identifier unchanged
for scripting compatibility.
The only texture node affected by this renaming (Color Ramp) was not
updated, as it still uses the old style node declaration and this is
legacy anyway.
This also changes "Bright" to "Brightness" in both shading and
compositing.
Ref #96219
Pull Request: https://projects.blender.org/blender/blender/pulls/140498
Since 2.80, the 3D Cursor is actually 3D, but it is still not clear
which way it points.
To improve this, the following style tweaks were done:
- Use theme axes colors for the 3D Cursor lines, a bit desaturated.
- Draw the negative axes a little darker, to tell at a glance its
direction.
- Replace the red/white lines with black/white for improved contrast
and to not conflict with X axis colors.
- Make it over all smaller in size, since it's already prominent by its
colors.
See PR for details and screenshots.
Pull Request: https://projects.blender.org/blender/blender/pulls/146927
This was copying the toolsettings from `scene_dst` which, confusingly,
will work because the ID got shallow copied before running
`scene_copy_data` so the pointer to `scene_dst->toolsettings` is the
same as `scene_src->toolsettings`.
This changes that line to copy from `scene_src->toolsettings` to
`scene_dst->toolsettings` to avoid any future confusion.
Move the Copy Global Transform core add-on into Blender's code.
- The entire extension was one Python file. This PR basically splits
it into two, one for operators (in `bl_operators`) and the other for
UI panels. Those panels are registered in the 3D viewport's sidebar,
which were registered in `space_view3d`, but I made the decision
here to create a new file `space_view3d_sidebar`, because the main
file is getting too large and difficult to navigate. This PR puts
the global transform panel in this file. After this is merged, I
will do refactors to move the rest of the sidebar panels here as
well.
- `AutoKeying` class was moved into `bpy_extras/anim_utils.py` so that
it's reusable and also accessible from API, since it's generally
very useful. There were discussions about putting this somewhere,
but for now, I chose against it because creating a new file would
also mean PR would have to affect documentation generation, and
would complicate things. If we want to, we can probably create a new
module in the future.
- Little tweaks to labels and descriptions. Now that they exist
outside of the add-on context, and exist without the user explicitly
enabling them, they need to be more descriptive and tell users what
they actually do. They also need to conform to Blender's GUI
guidelines. Also tried organizing files a little by grouping
objects.
- Add-on properties (which included word `addon` in the name) have
been registered in C++, on `scene.tool_settings` with `anim_`
prefix.
Pull Request: https://projects.blender.org/blender/blender/pulls/145414
Goal of this PR is mainly to improve flexibility and of VSE layout and
screen space efficiency.
Previously, strip properties were displayed in timeline sidebar. This
was limiting, because if you want to display as much properties as
possible, the timeline area had to be taller, but this was at the
expense of space available for preview. However there is plenty of
space in properties editor, which is mostly unused in VSE. Therefore
strip properties were moved to the properties editor.
ID pinning and path displayed in top section aren't drawn, since strip
is not an ID and can not be pinned. Since there is more space for
properties, various panels are changed to be open by default.
Mainly transform and time panels, since they are used often.
There is one minor change: The waveform display property
of sound strip was previously hidden, if timeline area had per strip
waveform display overlay set. This is no longer possible to do and the
property is always visible.
Pull Request: https://projects.blender.org/blender/blender/pulls/140395
Note that this commit keeps the same behavior as before this commit,
except for the newly introduced vector of archived libraries, which is
reset to empty. This behavior may have to be further tweaked still.
Root of the issue was from original commit enabling Library ID copying
(87a4c0d3a8), but the later move to an allocated runtime pointer
using a copy constructor in 87a4c0d3a8 made this behavior even
more confusing/hidden.
In general, what is re-used/copied in runtime data should be explicit,
such that by default new data can be assumed reset to their default
value there in the copy ID.
The loading step of the irradiance validity was
left unfinished for some reason. It was loading
the same validity for all 8 corners and copying
the same value for all 4 Z slices.
There is another bug, which is that the default
backface validity of surfels is wrong. This means
that the tests are passing because of this bug
as the validity is always 1 everywhere.
Pull Request: https://projects.blender.org/blender/blender/pulls/147200
Remove the legacy (aka backward-compatible) API from `bpy.types.Action`:
- `action.fcurves`
- `action.groups`
- `action.id_root`
These have been deprecated since the introduction of Slotted Actions in
Blender 4.4. They operated on a subset of the Action's data, which was
not guaranteed to be the correct subset, given the Action's new
possibilities. This was to give add-on developers time to migrate to the
new API, and has always been intended to be removed in Blender 5.0.
See #146586 for more info.
Pull Request: https://projects.blender.org/blender/blender/pulls/146626