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-11-09Cleanup: Split header for Outliner tree building into C and C++ headersJulian Eisel
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-09Cleanup: Rename Outliner "tree-view" types to "tree-display" & update commentsJulian Eisel
"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-08UI 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. * 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-07Fix possible null-pointer dereference in new Outliner tree building codeJulian Eisel
2020-11-07Cleanup: Remove redundant parameter from new Outliner tree building codeJulian Eisel
2020-11-07UI Code Quality: General refactor of Outliner View Layer display mode creationJulian Eisel
* 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-06UI Code Quality: Start refactoring Outliner tree creation (using C++)Julian Eisel
The Outliner tree creation was very messy and hard to follow. Hardcoded display type checks are scattered over many places. This introduces a new abstraction "tree-view" to help constructing and managing the tree for the different display types (View Layer, Scene, Blender file, etc.). Idea is to have an abstract base class to define an interface (`AbstractTreeView`), and then subclasses with the implementation of each display type (e.g. `TreeViewViewLayer`, `TreeViewBlenderFile`, etc). The tree-viewer 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 view support selection syncing?", "does it support restriction toggle columns?", etc.). I may still change the names a bit, not sure yet if "tree-view" is the right term for this helper.
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-12Cleanup: Rename outliner helper functionJulian Eisel
This name makes more sense and is consistent with related functions (e.g. `outliner_requires_rebuild_on_select_or_active_change()`).
2020-10-12Fix T81555: Outliner object state filter not updating correctlyJulian Eisel
When changing the selected, active or visible object(s), the Outliner has to be rebuilt while using the corresponding object state filters. The object hiding operators also have to send the proper notifiers (they changed visibility without notifying about that).
2020-10-02Cleanup: Move `EditBone` structure definition from `ED` to `BKE` area.Bastien Montagne
Access to this structure will be needed in BKE's armature code.
2020-09-30Cleanup: Use LISTBASE_FOREACH macro in outliner codeHans Goudey
2020-08-25Outliner: Include gpencil modifiers and effects in the treeNathan Craddock
Grease pencil modifiers already had defined outliner icons, but had never been included in the tree. This adds the modifiers and the shader effects to the tree. Part of T68498
2020-08-20Outliner: Avoid rebuilding tree on selection/active changesJulian Eisel
We can avoid the rather expensive outliner tree rebuilds and only redraw if nothing but the selection or active item changes. This should give a bit of speedup for heavy scenes. For this to work I had to correct a few notifiers, some were only sending selection/active change notifiers that actually did things like adding objects. I also added a more precise notifier type for when the active collection changes. At the notifier subtype/action level we're not even close to running out of bits, so this should be fine. Also had to correct a wrong notifier check (was using `&` rather than `==`).
2020-08-08Cleanup: use array syntax for sizeof with fixed valuesCampbell Barton
Also order sizeof(..) first to promote other values to size_t.
2020-08-08Cleanup: remove redundant return parenthesisCampbell Barton
2020-08-07Cleanup: Rename soops to space_outlinerNathan Craddock
No functional changes. Rename soops, soutliner, and so to space_outliner.
2020-08-04Fix T74796: Outliner child objects hidden when collections are filteredNathan Craddock
Filtering Collections when also filtering object children would only display the parent object. Add a check for the NO_CHILDREN filter before creating the object-parent hierarchy.
2020-07-30Fix T79278: Selected object filter skipping collection instancesNathan Craddock
Collection instance datablocks were not filtered out when only showing the selected object. They were treated as a collection (which should show when filtering objects). Adds a case to check if the parent is an object.
2020-07-03Cleanup: Use C-style comments in outliner filesNathan Craddock
No functional changes. Convert all C++ style comments to C comments. Also capitalize and add full stops. The comments themselves were not cleaned up. Some could be removed or reworded.
2020-07-03Clang-tidy: Enable braces-around-statements warningSebastian Parborg
2020-07-03Cleanup: Editors/Space/Outliner, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/editors/space_outliner` module. No functional changes.
2020-06-26Fix error when filtering in Outliner "Blender File" mode with librariesJulian Eisel
Steps to reproduce were: * Load factory settings * Link any library * Change to "Blender File" display mode in Outliner * Enable filtering * -> Assert fails This may have had further side-effects for linked IDs. Checked with Bastien, the NULL-check seems reasonable. It was initially there but removed in d74f9c4b7b4f. Fine to backport.
2020-06-23Cleanup: rename 'name' to 'filepath' for DNA typesCampbell Barton
Using 'name' for the full path of a file reads badly, especially when id.name is used in related code.
2020-06-19UI: Avoid rebuilding Outliner tree when opening/collapsing itemsJulian Eisel
In big files, the Outliner would have a noticeable lag when opening or collapsing items. That was because the entire tree was rebuilt, which isn't actually needed in most cases. So we avoid it where possible now.
2020-06-02UI: Expand linked/overriden collections by default in the OutlinerJulian Eisel
When linking or overriding an instanced collection, the new collection item in the Outliner is now un-collapsed by default. Linking and overriding is typically used in production scenes, where collections tend to contain many items (children, grand-children, etc.). If all collections in that hierarchy are expanded by default, the Outliner gets flooded with items. So users ended up manually collapsing the collections. Part of T76555. Reviewed by: Andy Goralczyk, Bastien Montange. Differential Revision: https://developer.blender.org/D7626
2020-05-01Cleanup: moved drivers to BKE_fcurve_driver.h / fcurve_driver.cSybren A. Stüvel
All the driver-specific code in `fcurve.c` has been moved into a new file `fcurve_driver.c`. The corresponding declarations have been moved from `BKE_fcurve.h` to `BKE_fcurve_driver.h`. All the `#include "BKE_fcurve.h"` statements have been investigated and replaced with `BKE_fcurve_driver.h` where necessary. No functional changes.
2020-04-20Simulations: Add new simulation data blockJacques Lucke
This data block will be the container for simulation node trees. It will be used for the new particle node system (T73324). The new data block has the type `ID_SIM`. It is not visible to users and other developers by default yet. To enable it, activate the cmake option `WITH_NEW_SIMULATION_TYPE`. New simulation data blocks can be created by running `bpy.data.simulations.new("name")`. Reviewers: brecht Differential Revision: https://developer.blender.org/D7225
2020-04-03Code Quality: Replace for loops with LISTBASE_FOREACHDalai Felinto
Note this only changes cases where the variable was declared inside the for loop. To handle it outside as well is a different challenge. Differential Revision: https://developer.blender.org/D7320
2020-03-19Cleanup/refactor: remove BKE_idcode, in favour of BKE_idtype.Bastien Montagne
Mpving utils from idcode to idtype proved to be somewhat painful for some reasons, but now all looks good. Had to add a fake/empty shell for the special snowflake too, `ID_LINK_PLACEHOLDER/INDEX_ID_NULL`...
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-18Objects: add Volume object type, and prototypes for Hair and PointCloudBrecht Van Lommel
Only the volume object is exposed in the user interface. It is based on OpenVDB internally. Drawing and rendering code will follow in another commit. https://wiki.blender.org/wiki/Source/Objects/Volume https://wiki.blender.org/wiki/Reference/Release_Notes/2.83/Volumes Hair and PointCloud object types are hidden behind a WITH_NEW_OBJECT_TYPES build option. These are unfinished, and included only to make it easier to cooperate on development in the future and avoid tricky merges. https://wiki.blender.org/wiki/Source/Objects/New_Object_Types Ref T73201, T68981 Differential Revision: https://developer.blender.org/D6945
2020-03-06Cleanup: Rename ARegion variables from ar to regionJulian Eisel
The old convention was easy to confuse with ScrArea. Part of https://developer.blender.org/T74432. This is mostly a batch rename with some manual fixing. Only single word variable names are changed, no prefixed/suffixed names. Brecht van Lommel and Campbell Barton both gave me a green light for this convention change. Also ran clan clang format on affected files.
2020-02-28Fix T71611: Outliner - Show only Visible/Hidden Objects not working when ↵Philipp Oeser
hiding Collections Use BASE_VISIBLE_VIEWLAYER (rather than BASE_VISIBLE_DEPSGRAPH -- which is not including the 'Hide in Viewport') Note: the is one case where this still 'fails': - 'Show only Hidden' plus excluding the parent collection (would be nice to show those -- but contents of excluded excluded collections dont get show in any case... this would be more work and for another report...) Maniphest Tasks: T71611 Differential Revision: https://developer.blender.org/D6953
2020-02-10Cleanup/refactor: Rename `BKE_library` files to `BKE_lib`.Bastien Montagne
Note that `BKE_library.h`/`library.c` were renamed to `BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here. Part of T72604.
2020-01-16Fix T72887: Outliner crashes when after undo of some linking operation.Bastien Montagne
Outliner tree building code was not handling properly empty libraries (i.e. Lib datablocks in our bmain which have no used actual data anymore). Main issue here is unclean states of indirect hierarchies of linking involving several libraries after undo operation. This is not a critical issue though, just annoying and untidy.
2020-01-07Fix T69246: Outliner - Objects Filter Selected, Hidden and Active notPhilipp Oeser
working properly 'outliner_extract_children_from_subtree()' (introduced in rB40a1c671655c) was extracting the children of non-matching parents regardless of their own matching state. Now properly filter the subtree prior to extracting. Maniphest Tasks: T69246 Differential Revision: https://developer.blender.org/D6517
2019-10-09Local Collections: Allow users to show hidden collectionsDalai Felinto
Users now can turn on in a viewport collections that are temporarily hidden (eye) in the view layer. Design task: T61327 As for the implementation, I had to decouple the visibility in the depsgraph from the visibility in the view layer. Also there is a "bug" that in a way was there before which is some operators (e.g., writing a text inside of a text object, tab into edit mode) run regardless of the visibility of the active object. The bug was present already (with object type visibility restriction) in 2.80 so if we decide to tackle it, can be done separately (I have a patch for it though P1132). Reviewed by: brecht (thank you) Differential Revision: D5992
2019-08-31Cleanup: rename natural string comparisonCampbell Barton
2019-08-30UI: Outliner Natural SortHarley Acheson
Collection contents alphabetical sort now uses a Natural Sort that takes number magnitude into account. Differential Revision: https://developer.blender.org/D5636 Reviewed by Brecht Van Lommel
2019-08-23RNA: Cleanup PointerRNA structJacques Lucke
The old layout of `PointerRNA` was confusing for historic reasons: ``` typedef struct PointerRNA { struct { void *data; } id; struct StructRNA *type; void *data; } PointerRNA; ``` This patch updates it to: ``` typedef struct PointerRNA { struct ID *owner_id; struct StructRNA *type; void *data; } PointerRNA; ``` Throughout the code base `id.data` was replaced with `owner_id`. Furthermore, many explicit pointer type casts were added which were implicit before. Some type casts to `ID *` were removed. Reviewers: brecht, campbellbarton Differential Revision: https://developer.blender.org/D5558
2019-08-19Outliner: rename filter "invisible" to "hidden"Nathan Craddock
No functional changes. Renames the "invisible" object filter to "Hidden" to be more consistent.
2019-08-16Outliner: Fix scenes in scene display not starting openNathan Craddock
2019-08-16Outliner: walk navigation operator and openclose fixesNathan Craddock
Adds a keyboard walk navigation and selection operator to the outliner. Up and down arrow keys walk up and down the list of elements, and left and right will open and close elements if the elements are closed or opened respectively. Holding shift while walking up and down the tree expands the selection. Holding shift while clicking or pressing left and right arrows will expand or collapse all children elements recursively. Pressing enter to openclose the hovered element is removed. Also allows click+drag for openclose of element subtrees. This moves openclose toggling to the openclose operator to remove duplicate code. The outliner tree building is tweaked slightly to set the proper parents in scene display mode for walk select to walk to parents without errors.
2019-08-16Outliner: invisible object filterNathan Craddock
Adds an invisible object filter in the outliner to show hidden objects. This is useful to quickly locate hidden items in a large outliner tree and easily toggle visibilty back on. Invisible refers to an object being hidden, or viewport visibility restricted.
2019-07-07Cleanup: spellingCampbell Barton
2019-07-05Fix T66327 1/2: Outliner dupli empty is shown as collection when a different ↵Dalai Felinto
duplitype