Age | Commit message (Collapse) | Author |
|
In the graph editor there is a panel that says "Active Keyframe" for
numerically editing a keyframe's values, but in the code there is no
concept of the "active keyframe." Since this is a useful concept to
have for some other features anyway, this commit adds an active
keyframe index value to FCurves. It also displays it with a theme
color for the active vertex (which didn't exist before) if the
FCurve is active.
The active keyframe in the graph editor is treated similarly to the
active vertex in the 3D view. It is the keyframe most recently selected
with a single click, and it is always selected.
For now, the only real functional change is that the active keyframe
appears in white and it should be more predictable which keyframe is
being edited in the sidebar panel.
Differential Revision: https://developer.blender.org/D7737
|
|
Because the active context is stored as a short in DNA it's better
to use short in the code surrounding it. Also adjusted a comment
that reflected an incorrect assumption.
|
|
This commit makes the panel expansion set based on the search results
when the active tab in the properties editor changes. The multi-tab
search patch (D8859) actually doesn't handle this because it uses a
different code path.
This feature uncovered a subtle but fairly significant issue with the
implementation of property search (More details in T81113). Basically,
the search needed multiple redraws to properly display the expansion of
panels based on the search results. Because there is no animation of
panel expansion when switching tabs, the problem was exposed only now.
With this commit, hiding of "search only" buttons and panel size
calculation happens in a single final step of the panel layout pass.
The "search only" layout root flag is removed. Instead every button
inside a panel header is in a single "uiButtonGroup" marked with a
specific "in header" flag, an idea which could be generalized in the
future.
Differential Revision: https://developer.blender.org/D9006
|
|
Specific armature editing undo code would duplicate and store a list of
editbones. However, those are not linked to main data storage and should
therefore never affect ID usercounting.
|
|
Access to this structure will be needed in BKE's armature code.
|
|
Version patching userpref.blend wasn't using the correct version,
causing settings not to be properly updated.
This seems the likely cause of T70196 and similar bugs.
|
|
It looks like this code was left over from tabbed panels in the
properties editor. It wasn't used anywhere except for in one line of
the horizontally-aligned panel code that was recently removed.
Differential Revision: https://developer.blender.org/D8651
|
|
|
|
The "UI_panel_set_expand_from_list_data" doesn't need to be in the
public API since it's just called every time an instanced panel is added.
This commit just sets the expansion automatically and adjusts some
naming to account for the moved function.
|
|
In the 3D view sidebar, the active tool settings panel can be pinned to other
categories, and in those other categories it doesn't redraw when the active
tool changes. This commit checks for pinned panels from the "Tool" category
when checking whether to redraw.
Note that the relatively expensive string comparison is only done for
currently visible pinned panels.
Differential Revision: https://developer.blender.org/D9012
|
|
|
|
Since the search is applied all in one phase, there is no need to store
a reference to the search filter in every uiBlock. Instead just pass it
as an argument to UI_block_apply_search_filter.
|
|
Ensure the theme colors are used for the collection icon when there are
no color tags present, otherwise it draws completely black.
|
|
Those two functions had `BKE_` prefix, were defined in BKE headers, but
implemented in ED code, yuck.
Moved everything to ED area for now, since those do not look fondamental
enough to belong to BKE, and none of their usages requires it currently.
|
|
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.
|
|
- 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
|
|
|
|
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
|
|
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
|
|
This adds color tagging to collections. There are 8 color
options which are themable in the user preferences, with an additional
option for no color tag by default.
This adds a new filled collection icon and 8 colored variants of the
icon that can be themed in the user preferences.
In this commit the only interface to setting the color tags is through
Python, and there is nowhere in the interface where the collections are
shown colored. Setting and viewing the color tags from the outliner will
follow.
Manifest Task: https://developer.blender.org/T77777
Differential Revision: https://developer.blender.org/D8622
|
|
This adds a search bar to the properties editor. The full search for
every tab isn't included in this patch, but the interaction with
panels, searching behavior, UI, region level, and DNA changes are
included here.
The block-level search works by iterating over the block's button
groups and checking whether they match the search. If they do, they
are tagged with a flag, and the block's panel is tagged too. For
every update (text edit), the panel's expansion is set to whether
the panel has a result or not. The search also checks for matching
strings inside enums and in panel labels.
One complication to this that isn't immediately apparent is that
closed panel's subpanels have to be searched too. This adds some
complexity to the area-level panel layout code.
Possible Future Improvements:
- Use the new fuzzy search in BLI
- Reset panels to their expansion before the search started if
the user escape out of the text box.
- Open all child panels of a panel with expansion.
Differential Revision: https://developer.blender.org/D8856
|
|
A parameter was added during development, but it was not needed and was
never removed. No functional changes.
|
|
Add an option to only draw icons for operator_enum menus. This is used
for drawing inline icon buttons in the outliner context menu for
collection color tagging.
Part of T77408
Differential Revision: https://developer.blender.org/D8880
|
|
Remove the condition preventing orientation from being obtained out of
the 3d View context.
Also pass the `ob` and `obedit` arguments obtained from the caller.
|
|
Make it obvious which values are written to.
|
|
Support setting bookmarks even when the file browser
isn't the active space.
|
|
Add a column of icons in the left gutter of the outliner for controlling
the interaction modes of objects. When an object is in a mode other than
object mode, the mode icon will draw to the left of that object. Any
other objects that are valid to be added or swapped into the mode are
drawn with a dot to the left of the object.
Clicking the dot to the left of an object will swap that object with the
current active object in the interaction mode. For edit and pose modes,
ctrl clicking the dot will add that object to the current mode.
Clicking the mode icon next to the active object removes it and all
other objects from the current mode.
The behavior is nearly identical to the previous edit/pose mode toggling
by selecting the mesh and armature datablocks, with additional support
for all interaction modes.
Currently two undo steps are pushed to prevent an assert.
Part of T77408
Manifest Task: https://developer.blender.org/T68498
Differential Revision: https://developer.blender.org/D8641
|
|
There is a list of attributes, along with operators to add and remove
attributes. For adding, there are a few standard attributes that can be
added quickly, as well as a popup to create a custom attribute.
Ref T76659
Differential Revision: https://developer.blender.org/D8636
|
|
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
|
|
|
|
|
|
ED_object_add_type creates empty object data, add
ED_object_add_type_with_obdata which can take existing object data.
|
|
|
|
For the man rationale behind this design, see 49f088e2d093. Further,
this removes users of uiBut.a1/uiBut.a2, which is a very ugly design
choice (hard to reason about).
Note that I had to do rather ugly, specific exceptions for the number
buttons in `ui_def_but_rna()`. But once all users of a1/a2 are removed,
this special handling shouldn't be needed anymore.
I also had to move a sanity check out of the button definition. It's now
moved into a new debug only sanity checking function executed when
finishing the layout definition (block end).
|
|
No functional changes
|
|
|
|
We do this in a couple of places, so it's worth having the logic wrapped
into a function.
Also, the only way to set the disabled hint for a button from outside of
`interface/` was through `UI_block_lock_set()`/`UI_block_lock_clear()`,
for which the usage isn't obvious when you just try to disable a single
button.
|
|
This implements a Face Set Extract operator, which is similar to mask
extract. This operator uses a picker to select and Face Set in the mesh
and extract the geometry directly to a new object.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8599
|
|
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
|
|
For modifier shortcuts we added a "custom_data" field to panels.
This commit uses the same system for accessing the list data that
corresponds to each panel. This way the context is only used once
and the modifier for each panel can be accessed more easily later.
This ends up being mostly a cleanup commit with a few small changes
in interface_panel.c. The large changes in the UI functions are due
to the fact that the panel custom data is now passed around as a
single pointer instead of being created again for every panel.
The list_index variable in Panel.runtime is removed as it's now
unnecessary.
Differential Revision: https://developer.blender.org/D8559
|
|
|
|
Add back this function, removed 2e14b7fb9770b.
Useful for checking operators used in menus.
|
|
- Use WM_operatortype_description to get the operator description.
- Pass properties to WM_operatortype_name,
so the operator name callback is used.
- Add UI_but_operatortype_get_from_enum_menu function
to access the operator from enum menus.
- Change WM_operatortype_description to return NULL when there is no
description, use WM_operatortype_description_or_name
when either can be used.
|
|
|
|
Mirror
The mirror map can reference a hidden vertex that is currently ignored
in the transformation.
Thus the mirror element array is not filled.
|
|
Use this utility function for render-shading & weight paint modes.
This adds support for edit-mode & pose-mode where all objects in the
mode are used in this case instead of the selected objects.
|
|
Support calling this function with an object argument,
useful for implementing filter functions that loop over objects.
|
|
`TH_UV_OTHERS` is a theme option that isn't hooked to anything since
blender 2.80. This patch will remove the option and related code.
Reviewed By: Campbell Barton
Differential Revision: https://developer.blender.org/D8669
|