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.
|
|
|
|
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.
|
|
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.
|
|
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
|
|
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 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.
|
|
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).
|
|
Add the following macros for enums as support for these features wasn't
all that obvious and there were some inconsistencies in their use.
- RNA_ENUM_ITEM_HEADING(name, description)
- RNA_ENUM_ITEM_SEPR
- RNA_ENUM_ITEM_SEPR_COLUMN
|
|
|
|
8f79fa9c6780 was an attempt to fix this already, but it didn't quite
work. Problem was that the tooltip was messing with the drop-box and
operator properties, setting the name property for its own internal
logic. This name property would then be used rather than the session
UUID to query the material, which gave the wrong material (linking can
result in multiple IDs of the same type with the same name). A followup
commit will further sanitize this.
|
|
More and more of the drop operations are being switched to use the ID's
session UUID rather than the name, but the cleanup after a drop operator
was cancelled assumed they would set the name. They will now first
attempt to use the session UUID and fallback to the name if needed.
|
|
|
|
917c096be6b9 applied to objects only, this also applies the same fix for
the general 3D View drop operations, e.g. used for dragging materials,
images, worlds, etc.
This is needed to fix T95706, but apparently something else is still
going on. Needs further investigation.
|
|
by default.
Avoids having to manually enable data-blocks for user-edition when you
do not care about what should be edited by whom. Similar to default
behavior before introduction of system overrides (aka non-user-editable
overrides).
|
|
Inherited from older versions of the code, not needed anymore in most
common cases (like making override from a local empty instantiating a
collection, or if the active object is directly overridable).
|
|
The operator now not only checks `ob->data` for Actions to duplicate,
but also passes `ob->data` to the duplication function (instead of `ob`).
|
|
**Relevant to Artists:** This patch adds an option to the Parenting
menu, `Object (Keep Transform Without Inverse)`, and Apply menu, `Parent
Inverse`. The operators preserve the child's world transform without
using the parent inverse matrix. Effectively, we set the child's origin
to the parent. When the child has an identity local transform, then the
child is world-space aligned with its parent (scale excluded).
**Technical:** In both cases, the hidden parent inverse matrix is
generally set to identity (cleared or "not used") as long as the parent
has no shear. If the parent has shear, then this matrix will not be
entirely cleared. It will contain shear to counter the parent's shear.
This is required, otherwise the object's local matrix cannot be properly
decomposed into location, rotation and scale, and thus cannot preserve
the world transform.
If the child's world transform has shear, then its world transform is
not preserved. This is currently not supported for consistency in the
handling of shear during the other parenting ops: Parent (Keep
Transform), Clear [Parent] and Keep Transform. If it should work, then
another patch should add the support for all of them.
Reviewed By: sybren, RiggingDojo
Differential Revision: https://developer.blender.org/D14581
|
|
The current behaviour is to prevent multi-user data from having its
modifier applied.
Instead, with this patch, we now warn the user that if they want to
proceed the object will be made single-user.
Note that this only makes the object data single-user. Not the material
or actions.
As a future step we can apply the same behaviour for the Grease Pencil modifiers
Differential Revision: https://developer.blender.org/D14381
|
|
Add new `BKE_id_is_editable` helper in `BKE_lib_id.h`, that supercedes
previous check (simple `ID_IS_LINKED()` macro) for many editing cases.
This allows to also take into account 'system override' (aka
non-editable override) case.
Ref: {T95707}.
|
|
Implement default behavior to decide which overrides remain 'system'
ones, and which become 'user editable' ones, when creating hierarchy
override from 3DView or the Outliner.
3DView:
If from an Empty-instanced collection, only Armature objects in
that collection are user overrides.
If from a set of selected objects, all overrides created from selected
objects are user overrides.
Outliner:
All override IDs created from selected elements in the Outliner are user
overrides.
There is one special case: When a collection is selected, and is
'closed' in the outliner, all its inner armature objects are also user
overrides.
Ref: {T95707}.
|
|
This affects essentially the Outliner 'create hierarchy' tool currenlty.
Previously code did not handle properly hierarchy root in case overrides
where created from a non-root ID (e.g. an object inside of a linked
collection), and in case additional partial overrides were added to an
existing partially overrided hierarchy.
Also did some renaming on the go to avoid using 'reference' in override
context for anything else but the reference linked IDs.
|
|
This commit renames enums related the "Curve" object type and ID type
to add `_LEGACY` to the end. The idea is to make our aspirations clearer
in the code and to avoid ambiguities between `CURVE` and `CURVES`.
Ref T95355
To summarize for the record, the plans are:
- In the short/medium term, replace the `Curve` object data type with
`Curves`
- In the longer term (no immediate plans), use a proper data block for
3D text and surfaces.
Differential Revision: https://developer.blender.org/D14114
|
|
Use a shorter/simpler license convention, stops the header taking so
much space.
Follow the SPDX license specification: https://spdx.org/licenses
- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile
While most of the source tree has been included
- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
use different header conventions.
doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.
See P2788 for the script that automated these edits.
Reviewed By: brecht, mont29, sergey
Ref D14069
|
|
Based on discussions from T95355 and T94193, the plan is to use
the name "Curves" to describe the data-block container for multiple
curves. Eventually this will replace the existing "Curve" data-block.
However, it will be a while before the curve data-block can be replaced
so in order to distinguish the two curve types in the UI, "Hair Curves"
will be used, but eventually changed back to "Curves".
This patch renames "hair-related" files, functions, types, and variable
names to this convention. A deep rename is preferred to keep code
consistent and to avoid any "hair" terminology from leaking, since the
new data-block is meant for all curve types, not just hair use cases.
The downside of this naming is that the difference between "Curve"
and "Curves" has become important. That was considered during
design discussons and deemed acceptable, especially given the
non-permanent nature of the somewhat common conflict.
Some points of interest:
- All DNA compatibility is lost, just like rBf59767ff9729.
- I renamed `ID_HA` to `ID_CV` so there is no complete mismatch.
- `hair_curves` is used where necessary to distinguish from the
existing "curves" plural.
- I didn't rename any of the cycles/rendering code function names,
since that is also used by the old hair particle system.
Differential Revision: https://developer.blender.org/D14007
|
|
Now that proxy conversions if enforced, those operations are not useful
anymore.
Part of T91671.
|
|
This will help when dealing with liboverrides from other library files,
e.g for resync or proxies conversion.
This commit only affects proxy conversion.
Part of T91671.
|
|
Do not allow 3DView operator to run on the liboverride of an
instantiating Empty object. And tweak behavior in the Outliner
operations too.
Related to T94226.
Note that this remains fairly exotic, bad idea not recommended cases,
such complex inter-dependencies between different libraries inside a
same liboverride hierarchy is just not possible to handle properly.
|
|
Outliner would frame the armature object instead of the bone if the bone
was on a hidden armature layer.
Similar to issues reported in e.g. T58068 and T80464, this is due to the
fact that `BKE_pose_channel_active` always checks for the armature layer
(and returns NULL if a bone is not on a visible armature layer).
Now propose to make this layer check **optional** (and e.g. from the
Outliner be more permissive). This also introduces
`BKE_pose_channel_active_if_layer_visible` which just wraps
`BKE_pose_channel_active` with the check being ON.
Maniphest Tasks: T92930
Differential Revision: https://developer.blender.org/D13154
|
|
Ref T92709
|
|
Display a "disabled hint" (text explaining why something isn't possible)
when dragging a material over the 3D View, while being in edit mode or
so (anything that isn't object mode).
|
|
rB43bc494892c3 switched `BKE_libblock_relink_to_newid` to use new ID
remapping and libquery code.
However, that new code does protect by default against remapping an
objects's data pointer when that object is in Edit mode, since this is
not a behavior that generic BKE code can handle (due to required editing
data for most obdata types when in edit mode).
So specific code that does create new IDs and need remapping in Edit
mode has to pass specific exception flags to remaping code.
This commit adds those remapping flags to `BKE_libblock_relink_to_newid`
and add said exception flag to the remapping call from
`ED_object_add_duplicate` when the object is in edit mode.
|
|
Move all usages to new `BKE_libblock_relink_to_newid_new`, and rename
that one to `BKE_libblock_relink_to_newid`.
Fix T91413.
|
|
|
|
No functional changes.
This commit adds 3 callbacks for `wmDropBox` which allow custom drawing
without affecting the internal dropbox API.
Differential Revision: https://developer.blender.org/D12948
|
|
|
|
Actions of duplicated objects would not be properly made single user,
unlike obdata and materials.
Further more, there is no reason to manually handle such animdata
copying here, `BKE_id_copy_ex` can do that for us with the proper flags.
|
|
Now 'Make Single User' will also create local copy of linked data as
needed.
IMPORTANT: Unlike with local data, this always happen, even if linked
data has only one user. This avoids e.g. cases like two local objects
sharing a same linked mesh, then when calling 'Make Single User ->
Object and ObData' on both objects, yu expect both of your objects to
get localized meshes, not one of them keeping its linked, un-editable
mesh.
|
|
|
|
This patch allows dropping material assets from material slot under the mouse
cursor. Before this change the material slot had to be hand-picked from the
properties panel.
For consistency it is chosen to do this in any shading mode as the tooltip shows
what is exactly going to happen during release.
The feature also works for other object types than Meshes as it uses the drawn surface on the
GPU to detect the material slots. Performance of this patch has been tested with AMD GCN3.0
cards and are very responsive.
Reviewed By: fclem, Severin
Differential Revision: https://developer.blender.org/D12190
|
|
Clearing the parent from the UI using the X (or from python) clears the
`parsubstr` and set `partype` back to `PAROBJECT`.
Using the Clear Parent operator would leave the `parsubstr` (and thus
`parent_bone`) untouched even though this operator claims to "clear
parenting relationship completely" (it also removes parent deform
modifiers for example).
So now, also clear `parsubstr` and set back to `PAROBJECT` [which is
default].
Maniphest Tasks: T88498
Differential Revision: https://developer.blender.org/D11503
|
|
It used to invoke give_base_under_cursor, but only accessed the `object` from the base.
|
|
|
|
This patch changes the drop named material tooltip to give feedback to
the user what is going to happen when they invoke the change.
There are 3 states:
* "": Operator will be canceled as not all data is present (dropping on
background.)
* "Drop <named material> on <object name> (slot <slot number>, replacing
<current material in slot>).
* "Drop <named material> on <object name> (slot <slot number).
Reviewed By: Severin
Maniphest Tasks: T90371
Differential Revision: https://developer.blender.org/D12106
|
|
Currently when dropping an asset the first material slot is always updated.
This patch changes that logic to update the active material slot.
In future the behavior will be updated to use the material slot of the face under the cursor.
That requires better feedback tot he user.
Reviewed By: Severin
Maniphest Tasks: T90372
Differential Revision: https://developer.blender.org/D12056
|
|
This shows the text as part of the assertion message.
|
|
In addition to _object_ animation, now _object data_ (mesh, curve, ...)
animation can now be made single user as well.
This came up in T89369 and while it is possible to do this via the
Outliner [where all actions have to be selected individually], this
seems to be more convenient to be done from the 3DView.
note: usercount of the action is checked now, if it single-user already,
no copy takes place (same thing could/should be done for
single_object_action_users as well).
note2: obdata is made single user as well (otherwise duplicated actions
will be assigned to the same shared obdata - which does not result in
unique animadata which is what we are after here)
ref. T89369
Maniphest Tasks: T89369
Differential Revision: https://developer.blender.org/D11683
|
|
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
|