Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-12-02Fix crash in outliner on cursor hoverNathan Craddock
The previous commit surfaced a bug introduced in rBab4654cdfe8f in which a boolean wasn't initialized to false.
2020-12-02Outliner: Highlight icons on cursor hoverNathan Craddock
The icons for collapsed children already draw highlighted when hovered. Because the item icons are now select targets (for outliner to properties editor tab switching) this adds highlights on hover for all outliner element icons.
2020-11-27Cleanup: Add `r_` to return parameterNathan Craddock
Prefix a return parameter with `r_` to follow the style guide. No functional changes.
2020-11-27Cleanup: Move logic to `outliner_find_item_at_x_in_row`Nathan Craddock
Move the logic for determining if the item at a given x position is an icon into the function. This is used for determining selection over an icon, and will be used in a later commit for checking for hover over an icon. No functional changes.
2020-11-24Outliner: Switch properties tabs only on icon clickNathan Craddock
According to feedback the outliner to properties editor tab switching was annoying when it always changed tabs on selection, especially for selecting individual objects. This limits the tab switching behavior to only when the icons in the outliner are selected.
2020-11-20Outliner: Object state filter invert toggleNathan Craddock
This adds an invert toggle for the outliner object state filters. There are some cases where we want a filter for invertable states (Selected, Unselected) and having a single toggle to invert the filter reduces the number of separate filter types needed. This removes the "Hidden" filter which can now be replicated with an inverted "Visible" filter. Differential Revision: https://developer.blender.org/D9598
2020-11-19Cleanup: Grammar: "Allow to" vs gerund missed in last commitHans Goudey
2020-11-18Merge branch 'blender-v2.91-release'Nathan Craddock
2020-11-18Fix: Outliner hierarchy line width variationsNathan Craddock
During some operators like rotate in grease pencil edit mode the hierarchy lines in the outliner would draw twice as thick. Set the width before drawing the lines in the outliner. Differential Revision: https://developer.blender.org/D9589
2020-11-15Outliner: Fix memory errors in runtime dataNathan Craddock
Fix a heap-use-after-free when duplicating outliner editors, and fully free runtime data when freeing outliner editors.
2020-11-14Merge branch 'blender-v2.91-release'Nathan Craddock
2020-11-14UI: Remove remaining uses of old collection iconNathan Craddock
After rB452a1c7b3838 there were still a few cases where the old collection icon was used in the interface. Replace these with the new filled collection icon.
2020-11-13Outliner: Sync with property editor physics tabHans Goudey
This commit makes the property editor switch to the physics tab instead of the modifier tab when selecting physics modifiers. Since the modifier isn't visible then, it's confusing to change the expansion, so this commit also disables the modifier expansion for these modifiers. Differential Revision: https://developer.blender.org/D9544
2020-11-12Cleanup: clang-tidy, remove invalid commentsCampbell Barton
2020-11-12Cleanup: spellingCampbell Barton
2020-11-12Cleanup: warningsCampbell Barton
2020-11-11Cleanup: Split header for Outliner tree building into C and C++ headersJulian Eisel
See https://developer.blender.org/D9499. It's odd to include a C++ header (".hh") in C code, we should avoid that. All of the Outliner code should be moved to C++, I don't expect this C header to stay for long.
2020-11-11Cleanup: Rename Outliner "tree-view" types to "tree-display" & update commentsJulian Eisel
See https://developer.blender.org/D9499. "View" leads to weird names like `TreeViewViewLayer` and after all they are specific to what we call a "display mode", so "display" is more appropriate. Also add, update and correct comments.
2020-11-11Cleanup: Follow C++ code style for new Outliner building codeJulian Eisel
See https://developer.blender.org/D9499. * Use C++17 nested namespaces. * Use `_` suffix rather than prefix for private member variables. Also: Simplify code visually in `tree_view.cc` with `using namespace`.
2020-11-11Cleanup: General cleanup of Outliner Blender File display mode buildingJulian Eisel
See https://developer.blender.org/D9499. * Turn functions into member functions (makes API for a type more obvious & local, allows implicitly sharing data through member variables, enables order independend definition of functions, allows more natural language for function names because of the obvious context). * Prefer references over pointers for passing by reference (makes clear that NULL is not a valid value and that the current scope is not the owner). * Reduce indentation levels, use `continue` in loops to ensure preconditions are met. * Add asserts for sanity checks.
2020-11-11UI Code Quality: Convert Outliner Blender File mode to new tree buiding designJulian Eisel
See https://developer.blender.org/D9499. Also: * Add `space_outliner/tree/common.cc` for functions shared between display modes. * I had to add a cast to `ListBaseWrapper` to make it work with ID lists. * Cleanup: Remove internal `Tree` alias for `ListBase`. That was more confusing than helpful.
2020-11-11Cleanup: Put Outliner C++ namespace into `blender::ed` namespace, add commentsJulian Eisel
See https://developer.blender.org/D9499. Also remove unnecessary forward declaration.
2020-11-11Fix possible null-pointer dereference in new Outliner tree building codeJulian Eisel
2020-11-11Cleanup: Remove redundant parameter from new Outliner tree building codeJulian Eisel
See https://developer.blender.org/D9499.
2020-11-11Cleanup: Comments and style improvements for new Outliner C++ codeJulian Eisel
See https://developer.blender.org/D9499. * Add comments to explain the design ideas better. * Follow code style guide for class layout. * Avoid uninitialized value after construction (general good practice).
2020-11-11UI Code Quality: Use C++ data-structures for Outliner object hierarchy buildingJulian Eisel
See https://developer.blender.org/D9499. * Use `blender::Map` over `GHash` * Use `blender::Vector` over allocated `ListBase *` Benefits: * Significantly reduces the amount of heap allocations in large trees (e.g. from O(n) to O(log(n)), where n is number of objects). * Higher type safety (no `void *`, virtually no casts). * More optimized (e.g. small buffer optimization). * More practicable, const-correct APIs with well-defined exception behavior. Code generally becomes more readable (less lines of code, less boilerplate, more logic-focused APIs because of greater language flexibility).
2020-11-11UI Code Quality: General refactor of Outliner View Layer display mode creationJulian Eisel
See https://developer.blender.org/D9499. * Turn functions into member functions (makes API for a type more obvious & local, allows implicitly sharing data through member variables, enables order independend definition of functions, allows more natural language for function names because of the obvious context). * Move important variables to classes rather than passing around all the time (shorter, more task-focused code, localizes important data names). * Add helper class for adding object children sub-trees (smaller, more focused units are easier to reason about, have higher coherence, better testability, can manage own resources easily with RAII). * Use C++ iterators over C-macros (arguably more readable, less macros is generally preferred) * Add doxygen groups (visually emphasizes the coherence of code sections, provide place for higher level comments on sections). * Prefer references over pointers for passing by reference (makes clear that NULL is not a valid value and that the current scope is not the owner).
2020-11-11UI Code Quality: Start refactoring Outliner tree building (using C++)Julian Eisel
This introduces a new C++ abstraction "tree-display" (in this commit named tree-view, renamed in a followup) to help constructing and managing the tree for the different display types (View Layer, Scene, Blender file, etc.). See https://developer.blender.org/D9499 for more context. Other developers approved this rather significantly different design approach there. ---- Motivation General problems with current design: * The Outliner tree building code is messy and hard to follow. * Hard-coded display mode checks are scattered over many places. * Data is passed around in rather unsafe ways (e.g. lots of `void *`). * There are no individually testable units. * Data-structure use is inefficient. The current Outliner code needs quite some untangling, the tree building seems like a good place to start. This and the followup commits tackle that. ---- Design Idea Idea is to have an abstract base class (`AbstractTreeDisplay`), and then sub-classes with the implementation for each display type (e.g. `TreeDisplayViewLayer`, `TreeDisplayDataAPI`, etc). The tree-display is kept alive until tree-rebuild as runtime data of the space, so that further queries based on the display type can be executed (e.g. "does the display support selection syncing?", "does it support restriction toggle columns?", etc.). New files are in a new `space_outliner/tree` sub-directory. With the new design, display modes become proper units, making them more maintainable, safer and testable. It should also be easier now to add new display modes.
2020-11-11Merge branch 'blender-v2.91-release' into masterPhilipp Oeser
2020-11-11Fix T82553: Outliner F2 renaming issue when item is out of viewPhilipp Oeser
- scrolling would be restricted (usually, if the object to be renamed is in view, this prevents scrolling away without finishing the rename operation) - renaming by typing and confirming with Enter was not possible (you would have to escape, scroll to the object and use F2 again) - other shortcuts like A and H are still active instead of being handled as text input Avoid all these issue by forcing the item into view using outliner_show_active / outliner_scroll_view. Maniphest Tasks: T82553 Differential Revision: https://developer.blender.org/D9521
2020-11-11Fix 'outliner_scroll_view()' not reaching wanted elementPhilipp Oeser
Scrolling to an item after opening relevant parents can go wrong if said parent e.g. the last in the list [as in: then the Outliner does not scroll down all the way] It stems from the fact that 'region->v2d.tot.ymin' is not up-to-date in outliner_scroll_view after outliner_show_active opens up parents, 'tot' will only update on a redraw. Now calculate the trees height on the fly using 'outliner_tree_dimensions()'. ref D9521 ref T82553 Maniphest Tasks: T82553 Differential Revision: https://developer.blender.org/D9523
2020-11-11Merge branch 'blender-v2.91-release'Nathan Craddock
2020-11-11Fix: Selection not possible from outliner gutterNathan Craddock
Selection should be possible from the left gutter in object mode. When in other modes the mode column displays icon buttons which should be prioritized for selection only in those modes. Introduced in rB2110af20f5e6.
2020-11-06Merge branch 'blender-v2.91-release' into masterPhilipp Oeser
2020-11-06Fix T82251: Outliner Material Drag&Drop missing tree updatePhilipp Oeser
Caused by rBb077de086e14. Not entirely sure why this was rebuilding the tree prior to above commit, but sending an ND_OB_SHADING notifier is appropriate (and also what the Outliners listener listens to). Maniphest Tasks: T82251 Differential Revision: https://developer.blender.org/D9396
2020-11-06Merge branch 'blender-v2.91-release' into masterPhilipp Oeser
2020-11-06Fix Outliner editbone selection with 'Sync Selection'Philipp Oeser
When editbones were selected from the Outliner (and they were connected to a parent) with the 'Sync Selection' option turned ON, they could not get duplicated. For duplication to work, the (connected) parent bone's tip also has to be selected [which was not the case when selection is done from the Outliner under above circumstances]. The reason being that armature_duplicate_selected_exec -> ED_armature_edit_sync_selection clears the BONE_ROOTSEL flag if the parent bone's BONE_TIPSEL is not set. Caused by rB71eb65328078 btw. The correct "parent-tip-selection" would actually happen in activation - `tree_element_active_ebone` -- `tree_element_active_ebone__sel` but for 'Sync Selection' this happens [also] in - `outliner_sync_selection_from_outliner` -- `outliner_select_sync_to_edit_bone` which did not do the "flushing" to the parent bone's tip Now use existing dedicated function for this. ref. T82347 Reviewers: Zachman Differential Revision: https://developer.blender.org/D9470
2020-11-06Cleanup: use ELEM macroCampbell Barton
2020-11-03Merge branch 'blender-v2.91-release'Nathan Craddock
2020-11-03Fix T77161: Outliner - Hiding a Collection does not gray out children objectsManuel Castilla
Ensure that When checking "Hide in Viewport" option for a collection that child objects are drawn grayed out for consistency with the "Disable in Viewports" toggle. For checking an object visibility in the viewport the flag BASE_VISIBLE_VIEWLAYER should be used instead of BASE_VISIBLE_DEPSGRAPH because the latter ignores viewport visibility. Manifest Task: T77161 Differential Revision: https://developer.blender.org/D7904
2020-11-03Outliner: Add "Selectable" object filterJaggz H
This addition to the filters allows the user to enable the outliner tree to restrict the listing to only Selectable objects. Differential Revision: https://developer.blender.org/D7310
2020-11-01Rename BKE_sequencer.hRichard Antalik
Reviewed By: sergey Differential Revision: https://developer.blender.org/D9349
2020-10-30Merge branch 'blender-v2.91-release'Campbell Barton
2020-10-30Merge branch 'blender-v2.91-release'Campbell Barton
2020-10-30Outliner: use undo-group for outliner mode switchingCampbell Barton
Switching modes no longer adds multiple undo steps from a user perspective.
2020-10-30Fix outliner mode toggling with multi-object pose/edit modeCampbell Barton
For edit/pose modes clicking in the mode-column would include other selected objects (besides the active object), causing other objects to remain in the mode even though Control wasn't held. Also replace `ED_object_mode_generic_exit(...)` on all objects with a single call to `ED_object_mode_set(...)` so switching modes will only exit the current mode, leaving objects in other modes unchanged.
2020-10-28Outliner: Properties editor sync on selectionNathan Craddock
When outliner datablocks are selected, switch to the corresponding tab for that datablock in properties editors. Only properties editors that share an edge with the outliner will change tabs. Additionally, when modifiers, constraints, and shader effects are selected from the outliner, the panel will be expanded in all properties editors. Part of T77408 Manifest Task: https://developer.blender.org/T63991 Differential Revision: https://developer.blender.org/D8638
2020-10-23Fix T81818: Outliner mode column crashes with shared object dataHans Goudey
For objects with shared data, it makes sense to show the mode icon for every object sharing the same data if one of them is in edit mode. This also disables the "extend" functionality in this case, because being in edit mode for multiple objects with the same data isn't supported. Differential Revision: https://developer.blender.org/D9273
2020-10-22Cleanup: Simplify outliner mode column drawing functionHans Goudey
Move the checks for whether to draw the button to the beginning of the function and return early. Also use a shorthand variable for ob_active. Committing to 2.91 as a patch for an upcoming bug fix depends on these changes. Differential Revision: https://developer.blender.org/D9272
2020-10-21Fix 'Make Local' operation to support liboverrides.Bastien Montagne
One can now use 'make local' from the Outliner or the 3DView to also fully localize overrides of linked data.