Age | Commit message (Collapse) | Author |
|
Those were only shallow wrappers around `BKE_id_copy`, barely used (even
fully unused in some cases), and we want to get rid of those ID-specific
helpers for the common ID management tasks. Also prevents weird custom
behaviors (like `BKE_object_copy`, who was the only basic ID copy
function to reset user count of the new copy to zero).
Part of 71219.
|
|
No reasons to keep the new ID pointer as parameter here.
Part of T71219.
|
|
Move the information about the type of the source objects to the item
descriptions instead of the names. The extra information in the names
made the labels cluttered, and it's less important information.
Differential Revision: https://developer.blender.org/D8352
|
|
Follow the MLA style, agreed upon in T79589. This means "from" within UI
labels should be lowercase.
Differential Revision: https://developer.blender.org/D8345
|
|
The edit_constraint_property_get function was using bone constraints
in pose mode even for object constraints. This change mirrors the code
in `uiTemplateConstraints` as well.
Differential Revision: https://developer.blender.org/D9128
|
|
We have our own assert implementation, `BLI_assert()` that is prefered over the
C standard library one. Its output is more consistent across compilers and
makes termination on assert failure optional (through `WITH_ASSERT_ABORT`).
In many places we'd include the C library header without ever accessing it.
|
|
Access to this structure will be needed in BKE's armature code.
|
|
Cleanup old tracker task format to the new. e.g: [#34039] to T34039
Ref D8718
|
|
The operator has some problems with Undo, so better put it in
experimental for now.
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D9007
|
|
In the end the process is surpringly simple, we only need to manually
convert the proxy itself into an override (which is trivial), and then
run common code with the default 'make override' operation.
Fix T81059: Add operator to convert proxies to library overrides.
|
|
This is for return arguments, also remove redundant NULL check.
|
|
Build modifiers linked or copied to objects from the outliner would not
animate until the file was saved and reopened due to a missing depsgraph
relations tag.
|
|
Unused variables, missing include for declaration, missing 'static'
specifier. Also rename function to match naming convention.
|
|
This adds XYZ symmetry as a property of meshes and updates all modes to
use the mesh symmetry by default to have a consistent tool behavior
between all modes and when switching objects.
Reviewed By: brecht, mano-wii, campbellbarton
Maniphest Tasks: T79785
Differential Revision: https://developer.blender.org/D8587
|
|
This object operator exits and frees the edit data of the
current object and enters the same mode in another one in a single step,
without going through object mode or keeping multiple edit object data
active. It is assigned to the D key.
This solves all conflicts that the right/click select keymap and the
emulate 3 button mouse produces for this operation and it is independent
of the state of Lock object modes.
Also, as the SculptSession is freed, when using Multires objects go
back to their preview resolution level, so it is possible to work on
high vertex count scenes without slowing down the viewport and other
performance problems.
Reviewed By: #user_interface, pablovazquez
Differential Revision: https://developer.blender.org/D7510
|
|
- UI_collection_color_icon_get -> UI_icon_color_from_collection
- UI_idcode_icon_get -> UI_icon_from_idcode
- UI_library_icon_get -> UI_icon_from_library
- UI_mode_icon_get -> UI_icon_from_object_mode
- UI_rnaptr_icon_get -> UI_icon_from_rnaptr
- UI_alert_image -> UI_icon_alert_imbuf_get
- UI_preview_render_size -> UI_icon_preview_to_render_size
- UI_id_icon_render -> UI_icon_render_id
|
|
Just converts verts to points and vice versa.
Materials and Attribute layers are preserved (so for example if you set
custom radii on the pointcloud, convert to mesh, then convert back to
pointcloud, this will be preserved).
Also not add a Radius layer by default (it is still added and
filled when adding a pointcloud object from the menu), a global Radius
property that will be used if there is no radius attribute can be added
later. A Radius attribute can also be added in the pointcloud data
properties (and filled via python).
This will also add a new utility function that copies materials between
datablocks: BKE_id_materials_copy
ref T75717
Differential Revision: https://developer.blender.org/D7391
|
|
Adds an optional slider to the action constraint so that it can be
driven without a constraint target.
This is very helpful for more complex rigging and mechanical rigs, as it
means the action constraint can be controlled with a driver/custom
property directly, currently if we want to use a driver to control it we
must add a "dummy" bone/object inbetween to act as a control.
Reviewed By: Sebastian Parborg, Sybren A. Stüvel, Demeter Dzadik, Julian Eisel
Differential Revision: http://developer.blender.org/D8022
|
|
Adds functions to copy a modifier between objects, and an ED_ level
function for linking modifiers between objects. This will be used in
outliner modifier drag and drop.
These functions support both regular and grease pencil modifiers.
Differential Revision: https://developer.blender.org/D8642
|
|
Add functions to copy a single constraint between objects or between
bones, and another function to link constraints. This is in preparation
for constraint drag and drop in the outliner.
Differential Revision: https://developer.blender.org/D8642
|
|
Move the notifiers and DEG tagging to the ED_* level functions for
modifiers and gpencil shaderfx in preparation for outliner modifier and
shaderfx drag and drop. No functional changes.
Differential Revision: https://developer.blender.org/D8642
|
|
No functional changes. Move the constraint reordering logic into an ED_
level function to be used by outliner constraint drag and drop.
Differential Revision: https://developer.blender.org/D8642
|
|
Adds two functions: one to copy a shaderfx between two gpencil objects,
and another to link all shaderfx between two gpencil objects. Added in
preparation for outliner shaderfx drag and drop.
Differential Revision: https://developer.blender.org/D8642
|
|
Draw color tagged collection icons in the link to collection, add
collection instance, collection instance search, and remove collection
menus.
Manifest Task: https://developer.blender.org/T77777
Differential Revision: https://developer.blender.org/D8622
|
|
|
|
Regression in 12bc34b0b81b1, add assert so this doesn't happen again.
|
|
|
|
Running add-objects operator without an active screen would crash
as CTX_data_edit_object would return NULL in this case.
This could happen when adding objects from frame-change handlers for e.g.
In the case of adding new objects there is no need for a context lookup,
pass this directly to ED_object_editmode_exit_ex.
|
|
|
|
There were some problems when converted several objects at the same time, especially with the material conversion. The problems were more visible when bake an animation with several objects at the same time.
* Now the layer name include the object name.
* Reorganize how the materials are generated including object name.
* Fix color not converted to sRGB.
* Avoid triangles when generate the stroke. This fix a draw manager issue and also add more geometry to use later.
* Code cleanup.
|
|
Caused by own rB6dc7266cf1f4.
When overriding context for constraint operators (such as in constraint
tests), it could happen that context "active_pose_bone" is set, but
"pose_bone" isnt. Now check for both in ED_object_pose_constraint_list.
|
|
|
|
not active
Caused by {rB608d9b5aa1f1}
Prior to rB608d9b5aa1f1, the constraint was gotten using **context**
[CTX_data_pointer_get_type(C, "constraint", &RNA_Constraint) -- which is
valid for bones on hidden layers].
After rB608d9b5aa1f1, the constraint is found (or isnt) using
`edit_constraint_property_get` [this is **not** valid for bones on
hidden layers because internally `BKE_pose_channel_active` checks if the
bone is on an active layer].
Some observations:
- Every operator using `edit_constraint_property_get` doesnt work for
bones on inactive layers [delete, moveup, movedown, move to index (drag
n drop nowadays)]
-- moveup, movedown, move to index check if they could find a constraint
beforehand though (dont crash)
-- delete crashes (doesnt check if a constraint could actually be found)
- Every operator using `edit_constraint_property_get` for constraint
data doesnt work for bones on inactive layers [stretchto_reset,
limitdistance_reset, childof_set_inverse, ...]
-- these all check if they could find a constraint beforehand though
(dont crash)
This is because the poll function is using **context** to get the
constraint, the operators themselves use
**edit_constraint_property_get** which leads to inconsistent/unexpected
results.
Possible solutions were:
- [1] let the delete operator just work with the context constraint
again (like prior to rB608d9b5aa1f1) -- allows for deleting constraints
on bones in inactive layers
- [2] check if we could get a constraint -- prevents the crash, but does
**not** allow for deleting constraints on bones in inactive layers
- [3] make the poll `edit_constraint_poll_generic` be as strict as the
operators -- dont use **context** to get the constraint, but something
like **edit_constraint_property_get**
- [4] make the operators be more graceful and let them act on bones on
hidden layers -- let **edit_constraint_property_get** actually use the
same **context**
This patch implements [4], so poll an doperators are now in sync.
- prevents reported crash
- also enables operators for bone constraints on hidden layers
- also enables drag and drop reordering of constraints on hidden layers
This might be a candidate for 2.90.1? (if it is, take care to include
prior "Refactor getting constraints" refactoring commit)
Note: Adding constraints also doesnt work for bones on inactive layers
[that was the case in 2.79 as well -- it is also using
`BKE_pose_channel_active`]
Maniphest Tasks: T80464
Differential Revision: https://developer.blender.org/D8805
|
|
This is the refactoring part of D8805 (should be no functional changes).
- exposes pose-related part of former 'get_constraints()' from
interface_templates.c to new ED_object_pose_constraint_list
- rename ED_object_constraint_list_from_context -->
ED_object_constraint_active_list
Also clarify comments on both of these.
ref T80464
ref https://developer.blender.org/D8805
|
|
The point cache code needs a non NULL rbw pointer.
This could have been avoided if there was a sanity check in the convert
function, so added a check there as well.
|
|
|
|
* Match menu items with Add Menu (order and naming e.g. Font -> Text)
* Use Icons
* Remove ellipsis from the name (policy is to use `...` only when triggering a window/popup)
No functional changes.
Thanks @HooglyBoogly for the help!
|
|
Refactor `ED_object_parent_set`:
- Mark parameters `ob` and `par` as `const` so that it's clear the
function doesn't assign any other value to them.
- Rename `pararm` to `is_armature_parent`; I mis-read it as `param` all
the time, and it was very confusing.
- Replace repeated `if-else` statements with `switch` statements.
- Reorder preconditions to have some simple checks first.
- Flip condition on a huge `if`-statement to return early and unindent
the remainder of the function.
This function still requires splitting up into smaller functions, but at
least this is a step forward.
No functional changes.
|
|
Refactor the operator exec function into a few smaller functions. The exec
function was mixing up vertex-parent and non-vertex-parent code, including
incorrect comments.
No functional changes.
|
|
Minor changes to match OBJECT_OT_data_instance_add.
- Access properties once & reuse them.
- Early exit when the data to instance can't be found.
|
|
|
|
ED_object_add_type creates empty object data, add
ED_object_add_type_with_obdata which can take existing object data.
|
|
This allows orphan object data for example (meshes, curves, etc)
to be dropped into the 3D View from the outliner,
creating a new object instance.
Previously the only way to do this was to add the same type of object
then swap it's data through the ID selector drop-down.
|
|
|
|
No functional changes
|
|
Some underlying functionality was not ready for greasepencil:
- BKE_modifiers_get_virtual_modifierlist (now introduce dedicated BKE_gpencil_modifiers_get_virtual_modifierlist)
- BKE_modifiers_is_deformed_by_armature
- checks in drawing code
- checks in (pose) selection code
A couple of changes to make this work:
- `eGpencilModifierType_Armature` has to be respected (not only `eModifierType_Armature`)
- `OB_MODE_WEIGHT_GPENCIL` has to be respected (not only `OB_MODE_WEIGHT_PAINT`) -- (now use new `OB_MODE_ALL_WEIGHT_PAINT`)
- `gpencil_weightmode_toggle_exec` now shares functionality from `wpaint_mode_toggle_exec` -- moved to new `ED_object_posemode_set_for_weight_paint`
This patch will also set the context member "weight_paint_object" for greasepencil (otherwise some appropriate pose operators wont work when in weightpaint mode)
Reviewed By: campbellbarton
Maniphest Tasks: T63125
Differential Revision: https://developer.blender.org/D8483
|
|
Condition was flipped, would allow actions on constraints coming from
library, but prevented actions on local constraints.
Mistake in rBS0b49fdd0ee0.
Maniphest Tasks: T80391
Differential Revision: https://developer.blender.org/D8793
|
|
|
|
Mirror
The mirror map can reference a hidden vertex that is currently ignored
in the transformation.
Thus the mirror element array is not filled.
|
|
|