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
2022-01-13Outliner: Compile all Outliner files in C++Julian Eisel
We want to refactor quite some of the Outliner code using C++, this is a logical step to help the transition to a new architecture. Includes plenty of fixes to make this compile without warnings, trying not to change logic. The usual stuff (casts from `void *`, designated initializers, compound literals, etc.).
2021-12-08Cleanup: move public doc-strings into headers for 'editors'Campbell Barton
Ref T92709
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-28Outliner: View Layers filter for View Layer ModeDalai Felinto
This option allow users to see the view layer in context to the others. It is particularly useful to see which view layers have which collections enabled, and their render settings (holdout, ...). This option is off by default. Differential Revision: https://developer.blender.org/D11708
2021-04-26Fix T87842: Outliner in `Blender File` mode has large performance impactJulian Eisel
The Outliner was doing a full rebuild of its tree in response to transform notifiers. I don't see any reason for this, a simple redraw without rebuilding should be just fine. The same optimization could be done for other object notifiers, but I'll check on them separately.
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-02-25Fix T85976: Outliner crash deleting collection with multiple windowsCampbell Barton
2021-02-13Cleanup: spellingCampbell Barton
2021-02-10Cleanup: remove redundant headers in source/blender/editors/Campbell Barton
Remove redundant headers using `./source/tools/utils_maintenance/code_clean.py` Reviewed By: jmonteath Ref D10364
2021-02-09Outliner: Enable render visibility column by defaultNathan Craddock
The render visibility column in the outliner should be enabled by default. This change makes it more obvious which objects will be rendered which can be misleading when only viewport visibility toggles are shown by default. This commit enables the render visibility column in all existing and new Outliner editors. Differential Revision: https://developer.blender.org/D10365
2021-01-19Cleanup: use 'const' argument for parameter argumentCampbell Barton
2021-01-19UI Code Quality: Use "params" struct for area and region callbacksHans Goudey
These functions with many arguments can be unwieldy. Aside from the obvious issues with rewriting the list of arguments and the opportunities for error and frustration that presents, the long list of arguments make these systems hard to change. So when an argument should be added, someone might skip that and add some hack instead. So, as proposed in T73586#1037210, this patch instead uses a "params" struct for each of these callbacks. - Use param argument for `ARegionType.listener` - Remove unused window field in region listener - Use param argument for `SpaceType.listener` - Use params struct for `ARegionType.message_subscribe` Differential Revision: https://developer.blender.org/D9750
2021-01-18Fix T84586: missing Outliner redraws for certain NLA operatorsPhilipp Oeser
Outliner display under 'Animation' > 'NLA Tracks' was not updating in the following cases: - adding strips - removing strips - duplicating strips (possibly to different track) - swapping strips - reordering tracks - changing strip order by translating - translating strips between tracks - renaming tracks In the case of deleting strips/tracks, this was also resulting in a use- after-free error in Outliner drawing code (this was reported specifically in T84586). Most of these operators already sent a ND_NLA|NA_EDITED notifier, but the Outliner is not listening to these. Listening to NA_EDITED is also not what we want since this also happens a lot in cases irrelevant to the Outliner. Now be a bit more specific and send ND_NLA|NA_ADDED / ND_NLA| NA_REMOVED or a new ND_NLA_ORDER (to distinguish from NA_EDITED 'only' - where a redraw is not neccessary) and listen to these from the Outliner. (note: places that were listening to ND_NLA|NA_EDITED before are also listening to NA_ADDED or NA_REMOVED, so changing NA_EDITED should not be a problem here) (note 2: for cases like swapping tracks/strips order, NA_ADDED or NA_REMOVED does not make sense, neither can we use NA_EDITED [since we dont want to listen to this], so in this case an additional ND_NLA_ORDER is now sent) (note 3: in nla transform code, this is now always sent on confirm. There are cases were the notifier would not be needed, but checking exactly all cases were it actually would be needed seems overkill [history of D10073 has example code to check if strips moved between tracks]) Maniphest Tasks: T84586 Differential Revision: https://developer.blender.org/D10073
2021-01-08Fix T84475: Outliner missing update when adding IDs to main via RNAPhilipp Oeser
Was reported for meshes, but was true for any type. Now add appropriate notifier to refresh the Outliner. Maniphest Tasks: T84475 Differential Revision: https://developer.blender.org/D10030
2020-12-28Fix possible fall-through in outliner region listenerSergey Sharybin
Reported as a strict compiler warning, and the need of fall-through is not needed from just reading the code. If it is something what must happen, the reasoning is to be explained in the comment, and ATTR_FALLTHROUGH is to be used.
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-12UI: Allow Outliners to pass selected data-blocks to operators via contextJulian Eisel
The way the Outliner integrates operations on selected tree elements is known to be quite problematic amongst developers. The context menu is generated in an unusual way and doesn't use the normal operator system. Instead, changes are applied via a recursive callback system. Things are quite ad-hoc, and the callbacks often implement logic that should not be in the Outliner, but in entirely different modules. Often these modules already contain the logic, but as proper operators. This commit is a step into a hopefully better direction that should allow us to put actual operators into Outliner context menus. It starts solving the problem of: How can the Outliner pass selected data to operators. It implements it for data-blocks only, but other data could do it in the same way. Idea is to keep doing what operators were initially designed to do: Operate on context. Operators can now query a "selected_ids" context member (`CTX_data_selected_ids()` in C, `bpy.context.selected_ids` in .py). If an Outliner is active, it will generate a list of selected data-blocks as a response, via its `SpaceType.context` callback. Any other editor could do the same. No user visible changes. This new design isn't actually used yet. It will be soon for asset operators. Reviewed as part of https://developer.blender.org/D9717. Reviewed by: Brecht Van Lommel
2020-12-05Fix crashes with invisible Outliners on fullscreen or window closingJulian Eisel
I didn't actually confirm this is caused by invisible Outliners. But I'm pretty sure the error happens with Outliners that aren't initialized (so were open in an area before, but another editor is active there currently). In that case, the runtime data may not be set yet and that is fine. Fixes T83420.
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-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-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-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-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-09-10Outliner: Move mode toggling to left columnNathan Craddock
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
2020-08-23Cleanup: GPU: Use explicit clear value in GPU_clear* commandsClément Foucault
This replace `GPU_clear()` by `GPU_clear_color()` and `GPU_clear_depth()`. Since we always set the clear value before clearing, it is unecessary to track the clear color state. Moreover, it makes it clearer what we clear the framebuffer to.
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-07Cleanup: Rename soops to space_outlinerNathan Craddock
No functional changes. Rename soops, soutliner, and so to space_outliner.
2020-08-07Cleanup: Remove outliner statement with no effectNathan Craddock
No functional changes. The memory dupalloc will already carry over the flags.
2020-08-04Refactor: rename SpaceType->new to SpaceType->createJacques Lucke
The data member `new` was conflicting with the `new` keyword when `BKE_screen.h` was included in C++ files. Reviewers: sergey Differential Revision: https://developer.blender.org/D8459
2020-06-22Refactoring: View2DScrollers memory allocationJeroen Bakker
View2DScrollers used the memory manager to allocate memory. This isn't a problem but in a upcoming change the scrollers will be drawn more often than it used to (See {D8066}). To limit the number of allocations and frees this patch will use the stack for allocation. Reviewed By: Campbell Barton Differential Revision: https://developer.blender.org/D8076
2020-06-19Fix: Crash when closing window while Outliner shows screensJulian Eisel
Steps to reproduce were: * From factory settings, change Outliner Display Mode to "Blender File" * Open "Screens" item, make sure all listed screens are visible * Open Preference window, close it * Mouse hover the outliner -> crash Fix is to force an Outliner tree rebuild when closing screens.
2020-06-19UI: Don't rebuild Outliner tree to remove highlight when leaving areaJulian Eisel
When leaving the Outliner's area, the highlight would be removed and cause a full rebuild of the tree. This caused a noticable lag in bigger files.
2020-04-03Cleanup: Rename ScrArea variables from sa to areaJulian Eisel
Follow up of b2ee1770d4c3 and 10c2254d412d, part of T74432. Now the area and region naming conventions should be less confusing. Mostly a careful batch rename but had to do few smaller fixes. Also ran clang-format on affected files.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
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.
2019-09-19Fix T69610: Outliner doesn't update for text new and unlinkNathan Craddock
Redraw the outliner when text data-blocks are created and unlinked. This also fixes a crash when unlinking.
2019-08-16Outliner: set scene camera on camera data activateNathan 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: Draw constraint icons and enable buttonNathan Craddock
Draw all constraint icons and enable/disable restrict buttons. The action constraint needs its own icon. It currently draws white instead of the blue modifier color.
2019-08-16Outliner: Synced selection and active element highlightingNathan Craddock
Adds a toggle to the filter menu for outliner synced selection. Enabled by default, this ensures selection is synced between objects, bones, and sequences. An active outliner element theme color is added to indicate which element is active. Synced selection is controlled on the operator level. Each operator that modifies selection for objects, bones, sequences, or outliner elements needs to call the respective ED_outliner_select_sync_from.. function to tag outliners to be synced. Syncing is done lazily on outliner draw.
2019-05-24Outliner: Set View Layer as the default mode for new outlinersDalai Felinto
This mode was supposed to be the new default since 2 years already. But apparently, it was tackled only for doversion, but not for new outliners (see 7f596d39dff11).
2019-05-19UI: Remove Hover Highlight When Outliner Loses FocusHarley Acheson
This patch removes the hover highlight that can sometimes remain after moving out of the Outliner space Differential Revision: https://developer.blender.org/D4822 Reviewed by Brecht Van Lommel
2019-05-17Set selection column restrict hidden by defaultDalai Felinto
This was discussed in the past, the idea is to get the outliner even more compact. Also to let users to use the viewport selection restriction further. It would be nice to haven indication that an invisible column is set, but this is no particular to the selection column.
2019-05-15Fix default open outliner restrict columnsDalai Felinto
Regression introduced on 777a546c0c7.
2019-05-15Outliner Restriction: Naming sanitization and iconDalai Felinto
No major API change here, only in the outliner restriction column variables (e.g., show_restrict_column_selectable > show_restrict_column_select). * Get rid of _INSTANCE (introduced on b1af68200159). * Differentiate (everywhere but the API) between HIDE (temporary) and VIEWPORT (global). * Use the expected icon for restrict viewport (same as objects and modifiers). * selectable > select
2019-05-11Outliner Visibility UpdateDalai Felinto
See T61578 for discussions and mockups. Visibility Options ================== We are adding more granular control over restriction columns in the outliner, exposing "indirect only" and "holdout" as options, and change the way users enable/disable collections in a viewlayer. We also rename the object viewport restriction to hide instance. So the options we have are: Collection ---------- * Render Visibility * Instance Visibility * Selectable (View) Layer Collection ----------------------- * Enable * Holdout * Indirect Only * Viewport Shortcuts ========= Isolate Collection ------------------ * Ctr + click isolates the collection. It turns all its parents and children "visible", and all the other collections "invisible". If ALL the collections were already properly set, we re-set the collections to their default value. Set Collection Inside Collections and Objects --------------------------------------------- * Shift + click: Set/unset inside collections and objects. We only set objects values as well when we are in View Layer mode and (obviously) when the objects have a matching property. Icons ===== Little reminder that we will need better icons for holdout, indirect only, and probably instanced (nothing wrong with the current, but it differs from the proposal when it is turned off). Also, we need to decide where do we want the modifier/bones/... icons to be (in which column) and ideally make sure their icons match the ones we use for collections/objects. At the moment those are using the screen icon, which is not being used by collections. Reviewers: brecht, billrey Subscribers: pablovazquez Differential Revision: https://developer.blender.org/D4823
2019-04-30Refactor: Separate scrollers from text drawing in APIJacques Lucke
This is a continuation of rB7fdffd735ff24, where I separated the e.g. frame number drawing from scrollers internally. This patch changes the API, so that space draw handlers have to draw these numbers explicitely. This greatly simplifies the scrollers API for all spaces that just need scrollers without any frame numbers. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D4747
2019-04-24Refactor: allow event handlers to have a poll functionJacques Lucke
Previously only a fixed bounding box could be used. This was not flexible enough. T63193 will benefit from this refactor. Reviewers: brecht, campbellbarton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-03-26Cleanup: style, use braces for editor/spacesCampbell Barton