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.).
2022-01-12Outliner: Add way to display warning icon for items.Bastien Montagne
While theorically fairly generic, current code is only enabled for bledfile and liboverride views, and only used to display messages from library IDs. Reviewed By: Severin Differential Revision: https://developer.blender.org/D13766
2021-12-13GPencil: New Shrinkwrap modifierAntonio Vazquez
his new modifier is equals to the existing mesh modifier but adapted to grease pencil. The underlying functions used to calculate the shrink are the same used in meshes. {F11794101} Reviewed By: pepeland, HooglyBoogly Differential Revision: https://developer.blender.org/D13192
2021-12-08Cleanup: move public doc-strings into headers for 'editors'Campbell Barton
Ref T92709
2021-10-19Fix T92265: Outliner crash clicking override warning buttonsPhilipp Oeser
`outliner_draw_overrides_buts` uses `uiDefIconBlockBut` but doing so without defining a function callback to actually build a block. This will make the button go down the route of spawning a popup, but without a menu. Crash then happens later accesing the (missing) menu in `ui_handler_region_menu`. So while we could dive into making this usage failsafe (carefully checking `BUTTON_STATE_MENU_OPEN` in combination with `uiHandleButtonData->menu` being NULL all over), but it seems much more straightforward to just use `uiDefIconBut` (instead of `uiDefIconBlockBut`) since this Override Warning buttons seem not to intend spawning a menu anyways? Maniphest Tasks: T92265 Differential Revision: https://developer.blender.org/D12917
2021-09-22GPencil: Split Weight modifier in two to make more consistentAntonio Vazquez
The old modifier had two modes, but it is better to keep separated as meshes. The UI has changed to be more consistent, including a new column type of modifiers. Note: The logic has not changed with the previous version of the modifier, just is a split on two modifiers.. Reviewed By: mendio, pablovazquez Differential Revision: https://developer.blender.org/D12586
2021-09-15Cleanup: spellingCampbell Barton
2021-09-14Fix T90862: Texts in Outliner can have wrong iconPhilipp Oeser
In contrast to the Filebrowser, the Outliner (Blender File view) did not distinguish icons for text-based formats (if they have a filepath this can be done though). Maniphest Tasks: T90862 Differential Revision: https://developer.blender.org/D12347
2021-07-08Outliner: use 'compacted' row for bones as wellPhilipp Oeser
In a collapsed hierarchy, some type of data are listed as one icon per item (2.79 did this for all data), others are 'compacted' as a single icon with a counter (also indicating if the active item is down that collapsed hierarchy) from 2.80 on. Not quite sure if {rB92dfc8f2673e} was meant to do this (if it was, this was not working though because relevant code would only get executed for object hierarchies it seems), so now this is done for bones as well. Fixes T88413. Maniphest Tasks: T88413 Differential Revision: https://developer.blender.org/D11404
2021-07-05Cleanup: spelling, punctuationCampbell Barton
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-07-02GPencil: New modifier to generate weights dynamicallyAntonio Vazquez
his new modifier allows to generate weights base on: * Angle of the stroke relative to object or world orientation. For example, if the value is 90, the maximum weights will be for vertical lines and minimum for horizontal lines. * Distance to Target object. The distance calculated is normalized to get valid weights between 0 and 1.0. The weights are created in an existing vertex group and the data can be replaced or mixed with the existing value to combine different weight effects. The minimum parameter, allows to define the minimum weight generated. This is useful to avoid very low weights. The generated weights can be used in any modifier. For example, the angle weight value can be used to mimic FreeStyle Caligraphy modifier using the weight with the thickness modifier. Also some modifier has been changed to inlude a new option to use the weights as factor of the effect. As result of this change, the fading option has been removed from Thickness and Opacity modifiers because this can be done using the new modifier, it's not logic to repeat the same. Reviewed By: mendio, filedescriptor Differential Revision: https://developer.blender.org/D11604
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-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-05-21Cleanup: spellingLeon Zandman
Includes fixes to misspelled function names. Ref D11280
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-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-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-12Cleanup: redundant outliner includesCampbell Barton
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-02-20Cleanup: spellingCampbell Barton
2021-02-20Cleanup: Disentangle outliner active status "get" and "set"Hans Goudey
Previously the same functions were used to both set and get the active state for outliner tree elements. This has quite a few problems. - It's hard to tell when data is changed or simply read - It prevents using `const` - The code is full of if statements, making it longer and less readable. This commit replaces the `tree_element_type_active` and `tree_element_active` functions with `_get` and `_set` variants. One has const arguments and returns the active state, the other deals only with setting the state. While this refactor results in slightly more lines of code, the result is much better in my opinion. This commit also removes unused variables from arguments of the affected functions. Differential Revision: https://developer.blender.org/D10232
2021-02-19Cleanup: Comment formatting, spellingHans Goudey
2021-02-19Fix T83027: Incorrect outliner collection state after operatorHans Goudey
The "Hide Collection" operators assigned to the number keys in edit mode trigger a redraw of the outliner, but as an optimization, they do *not* trigger a rebuild of the tree. This optimization is valid because unlike the collection exclude toggle, the heirarchy is not affected by collection visibility. However, it means that currently you must trigger a rebuild to get the correct "grayed out" status after using the operator. Rather than trigger a rebuild in this case to solve the bug, this patch moves the decision for whether to gray out the text of a tree element to the draw step rather than the build step. This means that any change to the corresponding properties doesn't require a full tree rebuild. Note that changing the "hide_viewport" property from the outliner still causes a tree rebuild. I think that's because of the checks in `outliner_collection_set_flag_recursive_fn`. That could be optimized in the future. Differential Revision: https://developer.blender.org/D10240
2021-02-08Cleanup: Remove unused tree element typesJulian Eisel
These weren't used since ages. Comment out the DNA define (value shouldn't be reused to avoid compatibility breakage) and remove icon code for the types.
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
2021-01-25Cleanup: pass 'rctf' rectangle to 2D box drawing functionsCampbell Barton
Passing 4x arguments for the rectangle, mixed in with round-box radius & color wasn't very readable. Instead, pass a `rctf` as the first argument to UI box drawing functions.
2021-01-22Fix editors showing old data-block name after renaming in OutlinerJulian Eisel
E.g. the graph editor channels list would still show the old name of a material that was renamed in the Outliner. Same for the Asset Browser when showing data-blocks in the "Current File" repository. The Outliner didn't send the notifier for some data-block types that editors listen to for data-block name changes.
2021-01-20Cleanup: remove extra in trailing asteriskCampbell Barton
Comment blocks not conforming to convention.
2021-01-07Outliner: use the scene ID for ObjectBase PointerRNACampbell Barton
While this didn't cause any problems, `Base` structs are part of the scene which is being set in other uses of this type.
2021-01-05Cleanup: typos (repeated words)Campbell Barton
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-19Fix T83868: Button animation states no longer visible without embossHans Goudey
This bug was caused by making it so that non-embossed modifier icon buttons could become an operator button and retain their red highlight for disabled modifiers. The icon button needs emboss turned off, but in earlier versions of Blender, `UI_EMBOSS_NONE` would be overridden by animation or red alert states. Instead of abusing "NONE" to mean "none unless there is animation or red alert", this commit adds a new emboss flag for that situation, `UI_EMBOSS_NONE_OR_STATUS`, which uses no emboss unless there is an animation state, or another status. There are only a few situations where this is necessary, so the change isn't too big. Differential Revision: https://developer.blender.org/D9902
2020-12-18Fix T82960: Inaccurate selection on collapsed outliner rowsNathan Craddock
After rB15083d9e1 the outliner tree is not rebuilt after expanding or collapsing rows. Because the tree is no longer rebuilt the positions and flags of the elements are not cleared when collapsing a row. This caused hover highlights and selections on the collapsed child icons to be incorrect in many cases. For example, only the direct children of a collapsed element are drawn inline. If any grandchild elements had been previously icon row flagged they would continue to be evaluated as icon row elements despite being hidden. In this case the x coordinates of the child and grandchild would overlap causing selection to appear erratic. Now the flags for inline row icons are explicitly cleared, which was previously only done because the tree was rebuilt on collapsing rows.
2020-12-18Cleanup: Use LISTBASE_FOREACH macro in outliner codeNathan Craddock
No functional changes.
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-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-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-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-10-30Outliner: use undo-group for outliner mode switchingCampbell Barton
Switching modes no longer adds multiple undo steps from a user perspective.
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-15Fix T81675: Renaming collapsed collection in Outliner renames nested itemsJulian Eisel
* `do_outliner_item_rename()` enables the rename mode for the item under the cursor. Issue is, collapsed children end up having stored the same coordinate as their parent, so they too would get the rename mode enabled (there is no early-exit that would hide this). * The items displayed as inline icons do get the proper coordinates of the icons, so they are not mistaken as being under the cursor. After rBb077de086e14, the Outliner tree is rebuilt less often, so the coordinates are cleared less often too. As far as I can see we can always clear coordinates of invisible items now. No code seems to depend on keeping the old coordinates anymore.
2020-10-05Outliner: Move collection exclude button to restrict columnsNathan Craddock
Move the collection exclude checkbox to be with the other restrict buttons. This makes the button consistent with the other restrict buttons, and it makes the visual hierarchy more clear with the contents of a collection properly indented under the collection name, rather than the collection icon. Differential Revision: https://developer.blender.org/D8928
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-28Outliner: Draw hierarchy lines dashed for object childrenNathan Craddock
Draw dashed lines for object child hierarchies in the outliner. This makes the difference between collection and object hierarchies more clear. Dashes are also consistent with viewport relationship lines. Differential Revision: https://developer.blender.org/D8997
2020-09-25Modifiers: add icon field to ModifierTypeInfoJacques Lucke
With this change `outliner_draw.c` does not have to be edited anymore when a new modifier is added. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D8998
2020-09-23Fix outliner collection icon in light themeNathan Craddock
Ensure the theme colors are used for the collection icon when there are no color tags present, otherwise it draws completely black.