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-04-16Fix RNA enum item callbacks not checking for NULL contextCampbell Barton
The NULL context is used to extract items for document generation.
2021-04-14Geometry Nodes: Add domain and data type to attribute searchHans Goudey
This patch adds domain and data type information to each row of the attribute search menu. The data type is displayed on the right, just like how the list is exposed for the existing point cloud and hair attribute panels. The domain is exposed on the left like the menu hierarchy from menu search. For the implementation, the attribute hint information is stored as a set instead of a multi-value map so that every item (which we need to point to descretely in the search process) contains the necessary data type and domain information by itself. We also need to allocate a new struct for every button, which requires a change to allow passing a newly allocated argument to search buttons. Note that the search does't yet handle the case where there are two attributes with the same name but different domains or data types in the input geometry set. That will be handled as a separate improvement. Differential Revision: https://developer.blender.org/D10623
2021-04-11Cleanup: use ELEM, STREQ macrosCampbell Barton
2021-04-08Cleanup: spellingCampbell Barton
2021-04-08LibOverride: Fix several issues with resync code.Bastien Montagne
This commit essentially touches to post-processing of collections and objects after resync itself has been done, to ensure their proper instantiation in the scene: - Remove a lot of the process in resync case (resynced data are assumed to be already instantiated in the scene, unlike override creation case). - For auto-resync, only do post-processing once after all overrides have been resynced (doing it after each individual resynced was causing a lot of instantiation glitches, with a lot of unwanted extra objects and collections being added to the master collection). It also deals in a much more reliable way with detection of objects missing from the scene, by using the new `BKE_scene_objects_as_gset` utils. As a bonus this makes auto-resync process slightly faster (only by a few percents, but that's always good to get).
2021-04-08Outliner Override: Tweak to order of error messages.Bastien Montagne
2021-04-08Outliner: regroup more type of entries under a single icon.Bastien Montagne
In folded view, some type of data are listed as one icon per item, others are 'compacted' as a single icon with a counter. This commit adds bones (edit, normal and pose ones), pose groups and vertex groups as 'compacted' ones in folded view. Part of D10855.
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-04-01Cleanup: clang formatCampbell Barton
2021-03-31Fix T86947: Drag & Drop tooltip in Scene modeFalk David
The tooltip while dragging a collection in Scene mode in the Outliner was always "Link inside Collection" even if the action performed was different. This was because the `collection_drop_init` set the `from_collection` always to `NULL` if the Outliner display mode was currently set to Scene. Commit that introduced this issue: rB0f54c3a9b75be8f8db9022fb0aeb0f8d0d4f0299 The fix removes the check of the display mode and only sets the `from_collection` to `NULL` if the ctrl (linking) key is held. Reviewed By: JacquesLucke Maniphest Tasks: T86947 Differential Revision: https://developer.blender.org/D10864
2021-03-28Cleanup: re-order expensive checks for indirect ID useCampbell Barton
Check for indirect ID use after other simple user count checks are made. Also assert ED_object_base_free_and_unlink_no_indirect_check object argument isn't indirectly used.
2021-03-26LibOverride: Fix outliner menu showing 'override editing' entries for linked ↵Bastien Montagne
overrides. One can only resync, reset, delete etc. locl overrides, linked ones are basically regular linked IDs and fully not editable. Reported by Demeter from the Studio, thanks.
2021-03-26UI: Use unified format for "Warning" in descriptionsYevgeny Makarov
Warnings in tooltips were using inconsistent formatting, some in parantheses, some not, some in caps, others not, some on new lines, some not, etc. This patch uses a consistent new line and no capitals for these cases. Differential Revision: https://developer.blender.org/D9904
2021-03-25Fix for T86613: Renaming in outliner doesn't trigger rename eventErik Abrahamsson
When subscribing to name-changes through the API, the event doesn't trigger if the object is renamed in the outliner. Fixed by publishing the RNA changes. Reviewed By: lichtwerk Ref D10732
2021-03-25Revert "Cleanup: Fix unused-private-field warning."Ankit Meel
This reverts commit 43c48965d7cf87dd00ccf8714d2f6d08ffa4c474. It created a new warning on GCC: -Wattribute (ignored attribute) as GCC doesn't warn about unused private fields.
2021-03-24Cleanup: Fix unused-private-field warning.Ankit Meel
2021-03-24Fix (unreported) Outliner: missing override tree items for collections in ↵Bastien Montagne
Viewlayer view. Probably lost at some point in recent refactor moving the whole tree building towards a more modular, C++ code.
2021-03-23Outliner: Do not crash when drawing unknown view type.Bastien Montagne
Instead default to Viewlayer view.
2021-03-19LibOverride: Stash away 'leftover' objects/collections from auto-resync process.Bastien Montagne
Instead of storing those in scne's master collection, which is fairly annoying, we now add them to a (hidden) specific collection. Easy to ignore, or check and cleanup.
2021-03-18LibOverride: Outliner: Rename `Add...` to `Make...`.Bastien Montagne
Also more consistent with the name used for the 3DView operator.
2021-03-18LibOverride: Outliner: Tweak override creation from instancing empty.Bastien Montagne
Now behavior is similar to the one from 3DView: once override of the collection is successfuly created, we remove the instancing empty from the scene.
2021-03-18Cleanup: remove unused common_restrict_check functionCampbell Barton
Since c10ad8e9eabea8a10d35efea3860cc345977e4f9 hiding edit-mode objects is supported. Although this function had already been removed in aeb8e81f2741aabc95d14bce7a83cef45481959c.
2021-03-17Cleanup: Reduce variable scopeJulian Eisel
2021-03-17Fix T86645: Executing "Operator Cheat Sheet" Crashes BlenderJulian Eisel
The "Operator Cheat Sheet" operator collects info about all operators, and as part of that executes the callbacks to create dynamic enums. The callback to enumerate the Outliner ID operations depends on Outliner context. If this isn't available, it can just return a context-less version of the enum, that is, a static enum with all available items. This was already done in case no context is available at all.
2021-03-17Fix outliner multi-object edit-armature operationsCampbell Barton
Recursive restrict selection (hide/selectable flag) & renaming edit-bones both used the active object, even when bones for another non-active object were being operated on. Bone renaming would rename a bone in the active object (if that name exists).
2021-03-16Outliner: Refactor: Move overrides tree items to new CPP code.Bastien Montagne
Fairly straight forwards. Also fixes the bug from recent refactor that would not show overrides as a tree, but as a flat list directly under IDs.
2021-03-16LibOverride: tweak log messages, fix crash in log code.Bastien Montagne
One of the log call could use freed memory.
2021-03-12LibOverride: Add a new operation to Outliner to enforce resync of hierarchies.Bastien Montagne
This is basically done by ignoring override operations from old override affecting ID pointer properties, when the new (destination) one is not NULL. Fix T86501: New object added to overridden collection doesn't show up in linking file on Resync. This is more of a work-around actually, since there is no real way to fix the issue in a fully automated and consistent way, it is caused by older blender files being saved with 'broken' overrides. WARNING: This cannot ensure that some purposedly edited/overridden ID pointer properties won't be lost in the process.
2021-03-12Cleanup: redundant outliner includesCampbell Barton
2021-03-11UI: Avoid unnecessary redraws of unrelated editors on space changesJulian Eisel
When adding a notifier, `reference` data can be passed. The notifier system uses this to filter out listeners, for example if data of a scene changes, windows showing a different scene won't get the notifiers sent to their listeners. For the `NC_SPACE` notifiers, a number of places also passed the space as `reference`, but that wasn't used at all. The notifier would still be sent to all listeners in all windows (and the listeners didn't use it either). Causing some unnecessary updates (e.g. see ed2c4825d3e2344). With this commit, passing a space will make sure the notifier is only sent to that exact space. Some code seems to already have expected that to be the case. However there were some cases that passed the space as `reference` without reason, which would break with this commit (meaning they wouldn't redraw or update correctly). Corrected these so they don't pass the space anymore.
2021-03-11Cleanup: spellingCampbell Barton
2021-03-11Cleanup: Add comment explaining plan for new Outliner tree-element code designJulian Eisel
Explains how we can get rid of implicit assumptions and `void *` arguments/storage in the future.
2021-03-11Cleanup: Pass anim-data directly to Outliner anim-data tree element constructorJulian Eisel
Rather than letting the `TreeElementAnimData` constructor take an ID from which we get the animation-data based on an assumption on how it's stored, let the constructor take the animation-data directly. That way we further centralize the assumptions on the data passed to the element creation to `tree_element_create()`. The following commit will add a comment explaining the plan to entirely get rid of those assumptions in the future.
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-11Fix crash when showing NLA actions in the OutlinerJulian Eisel
Caused by 2e221de4ceee in combination with 4292bb060d59. In the former I forgot to set the name for NLA actions in the new code design, in the latter I made it an assumtion that tree element types using the new design set the name. The following commit will make this assumption explicit with an assert.
2021-03-10Cleanup: spellingCampbell Barton
2021-03-09Cleanup: use nullptr in cpp.Jeroen Bakker
2021-03-08Cleanup: Split up new files for Outliner ID tree-elementsJulian Eisel
Splits up `tree_element_id.cc`/`tree_element_id.hh`. If we move all ID types into this one file, it will become rather big. Smaller files are probably easier to work with. We could still keep small classes like `TreeElementIDLibrary` in the general file, don't mind really, but this creates separate files for that too.
2021-03-08Cleanup: Rename recently added Outliner files to exclude "_base" suffixJulian Eisel
These files can contain more than just the "base" tree element types. E.g. the class for the view-layer base element can also contain the class for the view-layer elements. Otherwise we'd end up with like >50 files for the individual types, most of them very small. So just give the files a general name and put the related classes in there.
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-06Cleanup: commentsCampbell Barton
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-05Fix incorrect assert in Outliner ID deletionJulian Eisel
Mistake in aa3a4973a30f. The expanded `ELEM()` check would include `0 && te->idcode != 0`, which always evaluates to `false`/`0`. That wouldn't cause the asset to fail, but the `te->idcode` part would never be checked. Fixed the error and cleaned up the check against "0" with a check against `TSE_SOME_ID`, see b9e54566e3b1a.
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-03-05Cleanup: rename evt to eventCampbell Barton
Following naming convention of most operators.
2021-03-04Cleanup: Main `foreach ID` code: Remove `MAX_LIBARRAY` and improve comments.Bastien Montagne
The `MAX_LIBARRAY` define was an annoying doublon to the `INDEX_ID_MAX` enum value now defined in `DNA_ID.h`, and it is no more useful. And comments were somewhat outdated. Also added an explanation about chosen order for the `INDEX_ID_<IDTYPE>` order.
2021-03-02UI: Clean up labels and descriptions: "Draw" to "Display"William Reynish
In Blender, we used to use the term 'draw' to refer to information displayed to the user. For version 2.80, it was decided to change these instances to 'display' instead. This was to avoid the ambiguity between end-user drawing tools and display options. From the Oxford English Dictionary: - Draw: produce (a picture or diagram) by making lines and marks on paper with a pencil, pen, etc. - Display: show (data or an image) on a computer, television, or other screen. Therefore, we should use draw when referring to drawing tools for making marks, but use display when referring to information shown/displayed to the user. From a user POV, the computer displays certain information, whereas the user draws a mark. Apparently this change was not implemented consistently, so this patch changes all remaining relevant instances of "draw". Differential Revision: https://developer.blender.org/D10551
2021-03-02UI: Expose an "is first search" boolean to search button callbacksHans Goudey
Currently when you open an RNA collection search button, like a vertex group selector, the search filter isn't applied until you start typing, in order to display every option at the start. Otherwise they wouldn't be visible, since the search filter would run for the current text. Currently this check happens in one place, but it relies on the `changed` value of `uiBut`. This is fine in the interface directory, but anywhere else it would require exposing `uiBut.changed`, which is probably too low-level to expose. The solution is adding an `is_first` argument to the search callbacks, which is nice for a few reasons: - They work at a higher level of abstraction, meaning they don't have to worry about how exactly to tell if this is the first search. - It makes it easier to do special behavior when the search menu is first opened. - Then, obviously, it makes that state accessible without including `interface_intern.h`. Needed for attribute search: T85658 Differential Revision: https://developer.blender.org/D10528