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
2021-07-15Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text")Campbell Barton
This shows the text as part of the assertion message.
2021-07-13Refactor: Move vertex group names to object dataHans Goudey
This commit moves the storage of `bDeformGroup` and the active index to `Mesh`, `Lattice`, and `bGPdata` instead of `Object`. Utility functions are added to allow easy access to the vertex groups given an object or an ID. As explained in T88951, the list of vertex group names is currently stored separately per object, even though vertex group data is stored on the geometry. This tends to complicate code and cause bugs, especially as geometry is created procedurally and tied less closely to an object. The "Copy Vertex Groups to Linked" operator is removed, since they are stored on the geometry anyway. This patch leaves the object-level python API for vertex groups in place. Creating a geometry-level RNA API can be a separate step; the changes in this commit are invasive enough as it is. Note that opening a file saved in 3.0 in an earlier version means the vertex groups will not be available. Differential Revision: https://developer.blender.org/D11689
2021-07-05Cleanup: spelling in commentsCampbell Barton
2021-06-23Cleanup: reformat trailing comments that caused line wrappingCampbell Barton
2021-05-27Cleanup: rename BKE_main_id_{clear_newpoins => newptr_and_tag_clear}Campbell Barton
It wasn't obvious this function cleared the tag as well.
2021-04-11Cleanup: use ELEM, STREQ macrosCampbell Barton
2021-04-08LibOverride: Add a dedicated view in the Outliner.Bastien Montagne
This is a minimal, information-only view currently, listing by default all the override data-blocks, with their user-edited override properties. System-generated overrides (like the overrides of pointers to other override data-blocks) can be shown through a filter option. Finally, potential info or warning messages from (auto-)resync propcess are also shown, as an icon + tooltip next to the affected items. Part of D10855.
2021-03-12Cleanup: redundant outliner includesCampbell Barton
2021-03-11Outliner: Add assert to make assumption for new code design explicitJulian Eisel
There was an implicit assumption that tree element types using the new code design set their name on creation. Use an assert to make this explicit. See f59ff9e03a633, which was an error because of this broken assumption.
2021-03-08Outliner: Port scene elements and some related types to new tree-element ↵Julian Eisel
code design Continuation of work in 2e221de4ceee, 249e4df110e0 and 3a907e742507. Adds new tree-element classes for the scene-ID, scene collections, scene objects, and the view layers base. There is some more temporary stuff in here, which can be removed once we're further along with the porting. Noted that in comments.
2021-03-05Cleanup: Remove redundant special handling after previous commitJulian Eisel
Not needed anymore since 3a907e742507.
2021-03-05Outliner: Barebones to port IDs to new Outliner tree-element code designJulian Eisel
Continuation of work in 2e221de4ceee and 249e4df110e0 . This prepares things so we can start porting the individual ID types to the new code design. I already added some code for library IDs, because they need some special handling during construction, which I didn't want to break. The `AbstractTreeElement::isExpandValid()` check can be removed once types were ported and can be assumed to have a proper `expand()` implemenation. Also makes `TreeElementGPencilLayer` `final` which I forgot in e0442a955bad.
2021-03-05Cleanup: Add & use enum value for ID Outliner element typeJulian Eisel
Code to check if the Outliner tree-element type was the general ID one would always check against "0" (explicity or even implicitly). For somebody unfamiliar with the code this is very confusing. Instead the value should be given a name, e.g. through an enum. Adds `TSE_SOME_ID` as the "default" ID tree-element type. Other types may still represent IDs, as I explained in a comment at the definition. There may also still be cases where the type is checked against "0". I noted in the comment that such cases should be cleaned up if found.
2021-03-05UI Code Quality: Port Outliner Grease Pencil layers to new designJulian Eisel
Continuation of work in 2e221de4ceee and 249e4df110e0. Now the tree-element types have to be ported one by one. This is probably the most straight forward type to port.
2021-02-08Cleanup: Remove dead code for keymap Outliner display modeJulian Eisel
This wasn't used for a long time and there are no plans to bring this back.
2021-01-28Cleanup: Reduce variable scopeHans Goudey
Also some minimal white space changes
2021-01-04Cleanup: spelling (use 'gimbal' instead of 'gimble')Campbell Barton
2020-12-30Outliner: Fix useless assert in new liboverride showing code.Bastien Montagne
It is perfectly 'valid' to find invalid RNA properties references in override properties list. Data change, RNA changes, IDProperties change, some linked ID may become unavailable, etc. Note that those invaldi override properties are cleaned up when updating the override info (so typically on undo step storage, and .blend file save).
2020-12-28UI: List library overrides in the OutlinerJulian Eisel
Having a centeral place to find a list of all library overrides should be useful for managing production scenes where library overrides are used a lot. This change adds the individually overridden properties of a data-block under the data-block itself. Just how we show modifiers, constraints or pose channels there. This way we can also expose library override operations/options better in future. There's also a filter option for the library overrides now, so they can be hidden. It is only available in the View Layer display mode though, like the other filter options. One internal change this has to do is adding more informative return values to undo pushes and the library override functions called by it. That way we can send a notifier when library overrides change for the Outliner to know when to rebuild the tree. Differential Revision: https://developer.blender.org/D7631 Reviewed by: Andy Goralczyk, Bastien Montagne, William Reynish
2020-12-15Cleanup: doxy comments (use colon after parameter name)Campbell Barton
Also remove colon after `\note`.
2020-12-07UI Code Quality: Start refactoring Outliner tree-element building (using C++)Julian Eisel
Continuation of the work started with 249e4df110e0. After all display modes were ported to this new design, this commit starts the (more complex) work on the individual tree-element types. More concretely it ports animation tree-elements (action data-blocks, drivers and NLA data). The commit above explains motivations. In short, we need a better design that's easier to reason about and better testable. Changes done here are pretty straight forward and introduce similar class hierarchy and building patterns as introduced for the display modes already. I.e. an abstract base class, `AbstractTreeElement` with derived classes for the concrete types, and a C-API with a switch to create the needed objects from a type enum. The latter should be replacable with something nicer later on (RAII based, and type-safer through meta-programming). Each tree-element type has its own class, with an own header and source file (okay some closely related types can share a header and source file, like the NLA ones). I added some further temporary bits for the transition to the new design, such as the `TreeElement.type`. It should entirely replace `TreeElement` eventually, just as `outliner_add_element()` should be quite small by then and easily replacable by a `TreeBuilder` helper.
2020-12-07Cleanup: Avoid setting (unsafe) Outliner tree element data that won't be usedJulian Eisel
I carefully checked and am quite sure for `TSE_ANIMATION_DATA` and `TSE_NLA_ACTION` the direct-data isn't used at all. This data is stored and accessed in unsafe ways based on conventions anyway (`void *`). We should aim for a safer design but it will be difficult to get there. Any removed complexity will help.
2020-12-07Fix access to invalid data in Outliner tree buildingJulian Eisel
Non-ID tree-elements would cast their data pointer to `ID *` and take the name and ID-Code from there. The name would actually be overridden a few lines later, so that didn't cause issues. But the ID-Code stored inside the tree element kept an undefined value. In practice that probably didn't cause many issues either, since it's just an undefined value that was very unlikely to take a valid 16-bit ID-code value, meaning ID-Code checks would simply fail as they should. Further there typically are other checks to see if the element actually represents an ID. However, in theory this may have caused a few random crashes or data-corruptions.
2020-12-05Cleanup: Finish porting outliner tree building to C++Nathan Craddock
No functional changes. This is a few minor cleanups to the remaining C code for building the outliner tree after parts have been moved to C++. Differential Revision: https://developer.blender.org/D9741
2020-12-05Cleanup: Outliner Data API display modeNathan Craddock
No functional changes. Moves the data API display building code to C++. Differential Revision: https://developer.blender.org/D9741
2020-12-05Cleanup: Outliner scenes display modeNathan Craddock
No functional changes. The scene display building code has been moved to C++. Differential Revision: https://developer.blender.org/D9741
2020-12-05Cleanup: Outliner orphan data display modeNathan Craddock
No functional changes. Code is ported to C++ with additional cleanups to the logic and variable names. Differential Revision: https://developer.blender.org/D9741
2020-12-05Cleanup: Outliner video sequencer display modeNathan Craddock
No functional changes. Code is ported to C++. Variable names and logic are also improved. Differential Revision: https://developer.blender.org/D9741
2020-12-04Cleanup: Move Outliner runtime hash into internal runtime struct, out of DNAJulian Eisel
This way Outliner internal data stays internal, non-Outliner code will not be able to access and mess with this. Further it allows us to use the real type (rather than `void *`), change the type to a C++ container if needed and slightly reduces the size for every Outliner stored in files. Slightly changed how we set the `SO_TREESTORE_REBUILD` for this, but it should effectively behave the same way as before.
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-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-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-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-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-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.