Age | Commit message (Collapse) | Author |
|
From the 3DView code has basically no knowledge of collection hierarchy,
so we can either not remap any local usage of linked objects that are
being overridden, or remap them in all their local collections.
The second behavior makes most sense in the vast majority of cases.
Note that this was only an issue when directly linking and overriding
objects, not when doing so through collections.
|
|
Fix for running operators outside of expected contexts.
- UI_OT_view_drop (poll)
- UI_OT_view_item_rename (poll)
- OBJECT_OT_gpencil_modifier_move_to_index
- OBJECT_OT_modifier_move_to_index
- OBJECT_OT_geometry_nodes_input_attribute_toggle
- OBJECT_OT_geometry_node_tree_copy_assign
- OBJECT_OT_shaderfx_remove
- OBJECT_OT_shaderfx_copy
- POSE_OT_relax (& other pose slide operators).
|
|
|
|
on Clear, general cleanup.
Inconsistencies in update/tagging code between different code doing the
same 'Clear. liboverride operation lead to crashes in some cases.
Unify deg tagging and WM notifiers accross the three editor-level
codepaths performing the common Make/Reset/Clear operations.
Preserve if possible the active object accross Clear operation.
Several cleanup/rename/re-arangement of code to make it more consistent.
|
|
Apply transform failed to clear delta quaternion & axis-angle rotation.
|
|
Add missing labels, and also add tooltips.
Unfortunately there is no way currently to extract two messages from a
single 'function' call, so unless those type of macros become very
widely used, would keep it as manual tagging.
Also disambiguate `case` in text context, pretty sure English is one of
the very rare languages to use this word for character case too.
|
|
This behavior is now implicitely controlled by the 'Make' operations,
based either on context or selected items.
|
|
|
|
Move override creation into their own menu, add entries for reset and
clear operations.
|
|
|
|
This was not supported, added now.
|
|
NOTE: This is committed to the 3.3 branch as part of D15606, which we
decided should go to this release still (by Bastien, Dalai and me). That
is because these are important usability fixes/improvements to have for
the LTS release.
Adds `rna_path.cc` and `RNA_path.h`.
`rna_access.c` is a quite big file, which makes it rather hard and
inconvenient to navigate. RNA path functions form a nicely coherent unit
that can stand well on it's own, so it makes sense to split them off to
mitigate the problem. Moreover, I was looking into refactoring the quite
convoluted/overloaded `rna_path_parse()`, and found that some C++
features may help greatly with that. So having that code compile in C++
would be helpful to attempt that.
Differential Revision: https://developer.blender.org/D15540
Reviewed by: Brecht Van Lommel, Campbell Barton, Bastien Montagne
|
|
|
|
As pointed out in rB02b1a209be88 comment, the BKE_main_collection_sync
should be after "nothing to duplicate" early-out.
|
|
object
Regression from rB2d041fc46823, the "nothing to do, return" code path
was not re-enabling layer collection sync. Fixes T100118.
|
|
Affected by rB8621fdb10dc4
Crash if single-user data is created when we apply transform
on multi-user image data. Crash occurs because creation of new copy
was not handled in `single_obdata_users` for empty objects (image for example)
Reviewed By: dfelinto, mont29
Maniphest Tasks: T100040
Differential Revision: https://developer.blender.org/D15587
|
|
The stroke points were changed but the bounding box calculation was not done and this produced a problem in any bounding box check done by different tools.
|
|
When dragging assets into the 3D View while in any other mode than
object mode, dropping would be disabled and the cursor would indicate
that. However there was supposed to be an "Only supported in object
mode" message, that similar operators showed, but got forgotten when
this one was introduced.
|
|
The issue was that geometry nodes was run on the original curves,
and set a pointer to an evaluated material id on it. The fix is to not
mix up original and evaluated data by making sure that geometry nodes
does not modify the original data.
|
|
|
|
The ISMOUSE macro was used in situations only button events
needed to be checked.
The only functional difference would be MOUSEMOVE events were
previously accepted for these checks.
|
|
Regression in [0] accessed the modifier type before NULL check.
[0]: 78fc5ea1c398f70d22cda72be33c105146c0d542
|
|
|
|
Adds a new option to the 'Delete ShpaKeys' operator, which first applies
the current mix to the object data, before removing all shapekeys.
Request from @JulienKaspar from Blender studio.
Reviewed By: JulienKaspar
Differential Revision: https://developer.blender.org/D15443
|
|
Only the Shade Smooth operator has autosmooth settings.
|
|
After becb1530b1c81a408e20 the new curves object type isn't hidden
behind an experimental flag anymore, and other areas depend on this,
so disabling curves at compile time doesn't make sense anymore.
|
|
Without this, symmetry does not work by default when the surface
object was not at the same location as the 3d cursor.
|
|
Use const pointers to ImageSaveOptions and ImageFormatData for API
parameters where appropriate.
Differential Revision: https://developer.blender.org/D15400
|
|
|
|
Using white spaces in data names should not be encouraged in general,
better not give wrong example here.
Originally part of D15441.
|
|
Currently, there are two attribute API. The first, defined in `BKE_attribute.h` is
accessible from RNA and C code. The second is implemented with `GeometryComponent`
and is only accessible in C++ code. The second is widely used, but only being
accessible through the `GeometrySet` API makes it awkward to use, and even impossible
for types that don't correspond directly to a geometry component like `CurvesGeometry`.
This patch adds a new attribute API, designed to replace the `GeometryComponent`
attribute API now, and to eventually replace or be the basis of the other one.
The basic idea is that there is an `AttributeAccessor` class that allows code to
interact with a set of attributes owned by some geometry. The accessor itself has
no ownership. `AttributeAccessor` is a simple type that can be passed around by
value. That makes it easy to return it from functions and to store it in containers.
For const-correctness, there is also a `MutableAttributeAccessor` that allows
changing individual and can add or remove attributes.
Currently, `AttributeAccessor` is composed of two pointers. The first is a pointer
to the owner of the attribute data. The second is a pointer to a struct with
function pointers, that is similar to a virtual function table. The functions
know how to access attributes on the owner.
The actual attribute access for geometries is still implemented with the `AttributeProvider`
pattern, which makes it easy to support different sources of attributes on a
geometry and simplifies dealing with built-in attributes.
There are different ways to get an attribute accessor for a geometry:
* `GeometryComponent.attributes()`
* `CurvesGeometry.attributes()`
* `bke::mesh_attributes(const Mesh &)`
* `bke::pointcloud_attributes(const PointCloud &)`
All of these also have a `_for_write` variant that returns a `MutabelAttributeAccessor`.
Differential Revision: https://developer.blender.org/D15280
|
|
This commit doesn't implement any new feature but makes the new curves
object type no longer experimental.
Documentation:
* https://docs.blender.org/manual/en/3.3/modeling/curves/primitives.html#empty-hair
* https://docs.blender.org/manual/en/3.3/sculpt_paint/curves_sculpting/introduction.html
Note: This also makes the Selection Paint tool available. This tool
should have been moved out of the "New Curves Tool" flag when we got the
selection drawing to work.
Differential Revision: https://developer.blender.org/D15402
|
|
Curves that are attached to a surface can now follow the surface when
it is modified using shape keys or modifiers (but not when the original
surface is deformed in edit or sculpt mode).
The surface is allowed to be changed in any way that keeps uv maps
intact. So deformation is allowed, but also some topology changes like
subdivision.
The following features are added:
* A new `Deform Curves on Surface` node, which deforms curves with
attachment information based on the surface object and uv map set
in the properties panel.
* A new `Add Rest Position` checkbox in the shape keys panel. When checked,
a new `rest_position` vector attribute is added to the mesh before shape
keys and modifiers are applied. This is necessary to support proper
deformation of the curves, but can also be used for other purposes.
* The `Add > Curve > Empty Hair` operator now sets up a simple geometry
nodes setup that deforms the hair. It also makes sure that the rest
position attribute is added to the surface.
* A new `Object (Attach Curves to Surface)` operator in the `Set Parent To`
(ctrl+P) menu, which attaches existing curves to the surface and sets the
surface object as parent.
Limitations:
* Sculpting the procedurally deformed curves will be implemented separately.
* The `Deform Curves on Surface` node is not generic and can only be used
for one specific purpose currently. We plan to generalize this more in the
future by adding support by exposing more inputs and/or by turning it into
a node group.
Differential Revision: https://developer.blender.org/D14864
|
|
This patch adds (selected/active) outline around a curve object in object mode.
{F13270680}
In the past the draw bounds option was enabled for any curve objects. With this
patch it isn't needed and will be disabled.
In the future the curve outline could also be enabled to improve GPU selection.
Reviewed By: dfelinto, HooglyBoogly, fclem
Maniphest Tasks: T95933
Differential Revision: https://developer.blender.org/D15308
|
|
This is temporary to investigate which behavior should be kept when
creating an override hierarchy if there are no cherry-picked data
defined: make all overrides user-editable, or not.
This removes the 'make override - fully editable' menu entries.
|
|
Fix T99453.
Crash due to null pointer access.
So wrap the function call in simple `if` check
Reviewed By: sybren
Maniphest Tasks: T99453
Differential Revision: https://developer.blender.org/D15370
|
|
Previous code was doing N collection syncs when duplicating N objects.
New code avoids all the intermediate syncs by using
BKE_layer_collection_resync_forbid and
BKE_layer_collection_resync_allow, and then does one
BKE_main_collection_sync + BKE_main_collection_sync_remap for the
whole operation. There is some complexity involved where the Base
things of newly duplicated objects can't be found yet, without the
sync, so some work on them (marking them selected, active, ...) has
to be deferred until after the sync.
Timings: scene with 10k cubes, each with unique mesh (Windows, VS2022
Release build, AMD Ryzen 5950X):
- Shift+D duplicate: 13.6s -> 9.2s
- Alt+D duplicate: 4.76s -> 1.53s
Reviewed By: Bastien Montagne
Differential Revision: https://developer.blender.org/D14150
|
|
|
|
Removes the following macros for scene/render frame values:
- `CFRA`
- `SUBFRA`
- `SFRA`
- `EFRA`
These macros don't add much, other than saving a few characters when typing.
It's not immediately clear what they refer to, they just hide what they
actually access. Just be explicit and clear about that.
Plus these macros gave read and write access to the variables, so eyesores like
this would be done (eyesore because it looks like assigning to a constant):
```
CFRA = some_frame_nbr;
```
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D15311
|
|
For the Normalize Weights operator, dynamically set the default 'Subset'
parameter so that it is applicable to the current context.
When the user's last use of Normalize Weights was set to "Deform Pose
Bones", and then tries to use the operator on a mesh without armature,
Blender would try to use the previous opertor properties and show an
error message. This is resolved by switching to `WT_VGROUP_ACTIVE` in
such cases.
Reviewed By: zanqdo, sybren
Maniphest Tasks: T95038
Differential Revision: https://developer.blender.org/D14961
|
|
Clear delta transform value after applying transform.
Include delta location while applying transform.
Use `copy_v3_fl` for resetting object scale
Reviewed By: mano-wii
Maniphest Tasks: T99070
Differential Revision: https://developer.blender.org/D15270
|
|
|
|
This patch makes constant size a default for size edit operator of voxel remesh.
In turn, pressing CTRL now enables relative scale, the old default.
Patch also changes workspace status text entry with new additions. Note that it is a simple text and not an array of keymaps (for that further changes are needed)
{F13082567}
Reviewed By: Julien Kaspar & Joseph Eagar
Differential Revision: https://developer.blender.org/D14975
Ref D14975
|
|
Baking assumed that color attributes could only have two configurations:
float color data type on vertices, or byte color type on face corners.
In reality the options can be combined to make four total options.
This commit handles the four cases explicitly with a somewhat
more scaleable approach (though this should really be C++ code).
This commit also changes some related error messages, tooltips,
and an enum name, in order to make the functionality more obvious.
Differential Revision: https://developer.blender.org/D15244
|
|
This commit:
* Removes the popup to choose the root collection when called with a
linked object selected (in typical cases there is only one valid
option, if more then the operator fails and report to the user).
* Ensures that the linked reference of newly overridden collections are
also removed from the ViewLayer (i.e. their local parent collections).
|
|
|
|
Introduces an option for BKE_unit_value_as_string to skip stripping of zeroes, thus reducing flickering when using edit voxel size widget.
{F13125416}
Reviewed By: Julien Kaspar & Joseph Eagar
Differential Revision: https://developer.blender.org/D15085
Ref D15085
|
|
This implements the new way to attach curves to a mesh surface using
a uv map (based on the recent discussion in T95776).
The curves data block now not only stores a reference to the surface object
but also a name of a uv map on that object. Having a uv map is optional
for most operations, but it will be required later for animation (when the
curves are supposed to be deformed based on deformation of the surface).
The "Empty Hair" operator in the Add menu sets the uv map name automatically
if possible. It's possible to start working without a uv map and to attach the
curves to a uv map later on. It's also possible to reattach the curves to a new
uv map using the "Curves > Snap to Nearest Surface" operator in curves sculpt
mode.
Note, the implementation to do the reverse lookup from uv to a position on the
surface is trivial and inefficient now. A more efficient data structure will be
implemented separately soon.
Differential Revision: https://developer.blender.org/D15125
|
|
Instead of directly accessing constraint-specific callbacks
in code all over blender, introduce two wrappers to retrieve
and free the target list.
This incidentally revealed a place within the Collada exporter
in BCAnimationSampler.cpp that didn't clean up after retrieving
the targets, resulting in a small memory leak. Fixing this should
be the only functional change in this commit.
This was split off from D9732.
Differential Revision: https://developer.blender.org/D13844
|
|
In the editmode sidebar, pasting a particular vertex's weight in a
single group was not behaving the same as copying for all groups [in
that the former dis not copy to unassigned vertices whereas the later
did copy to unassigned vertices].
This behaves like this since the introduction in {rB70fd2320c8d2}, but
there does not seem to be a good reason for this?
Now make this consistent and use `BKE_defvert_copy_index` in both cases
(instead of earlying out if unassigned, this will make sure this will
also copy to unassigned).
Maniphest Tasks: T98459
Differential Revision: https://developer.blender.org/D15062
|