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-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-16Edge-scrolling for node editorLukas Tönne
Starts scrolling when dragging a node or node link and going outside the current window. Largely copied from the VIEW2D_OT_edge_pan operator. Edge panning operator customdata and supporting functions now in UI_view2d.h, so they could be used by operators in other editor libraries. The VIEW2D_OT_edge_pan operator also uses this customdata and shared functions now. Operators properties can be used to configure edge panning margins and speed for each use case, rather than using hardcoded values. The speed function for edge panning has been tweaked somewhat: * "Speed per pixel" has been replaced with a "speed ramp" distance. This is more intuitive and also creates an upper bound for the speed, which can otherwise become extreme with large cursor distance. * "Max speed" is reached at the end of the speed ramp. * Padding the region inside and outside is applied as before, but both values are operator properties now. Node transform operator also supports edge panning. This requires an offset for changes in the view2d rect, otherwise nodes are "stuck" to the original view. Transform operator had cursor wrapping categorically enabled, but this gets quite confusing with the edge scrolling mechanism. A new TransInfo option T_NO_CURSOR_WRAP has been introduced to disable this behavior. The double negative is a bit annoying, but want to avoid affecting the existing transform modes, so by default it should still set the OP_IS_MODAL_GRAB_CURSOR flag (which then sets the WM_CURSOR_WRAP_XY flag during modal execution). Reviewed By: HooglyBoogly, JacquesLucke Differential Revision: https://developer.blender.org/D11073
2021-06-09Cleanup: simplify grease pencil type checksCampbell Barton
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-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-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-26Fix T84953: Incorrect tooltip for dragging collectionsHans Goudey
"Shift to parent" does not make any sense for collections since they don't have parenting like objects. This commit just adds a simple check for whether the first drag ID is an object before displaying that part of the message. Differential Revision: https://developer.blender.org/D10203
2021-02-17Cleanup: spellingCampbell Barton
2021-02-16Assets: Remove appended asset when dropping operation failsJulian Eisel
When dropping an asset somewhere, it is appended and then a drop operation is called to actually add it to the scene based on current context. If this drop operation fails, the appended data-block is now still in the .blend. The user may not notice and not expect this. Instead idea is to rollback any changes done by dropping code if the operation fails, namely removing the appended data-block again. Adds a new `cancel()` callback which is called if the drop operator returns `OPERATOR_CANCELLED` to drop-boxes and a generic function to deal with assets on drop failure. Also removes the `free_id_on_error` property of the `NODE_OT_add_group` operator, which was used as ad-hoc solution to get this same behavior.
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
2021-01-25Fix T85027: Crash dragging a collection over empty OutlinerJulian Eisel
Filtering may make the Outliner tree empty. The function to find the drop element should just return null then and let the caller decide how to deal with it.
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-15Asset System: Support dragging assets and appending on dropJulian Eisel
For the Asset Browser, it needs to be possible to drag assets into various editors, which may not come from the current .blend file. In other words, the dragging needs to work with just the asset metadata, without direct access to the data-block itself. Idea is simple: When dragging an asset, store the source file-path and data-block name and when dropping, append the data-block. It uses existing drop operators, but the function to get the dropped data-block is replaced with one that returns the local data-block, or, in case of an external asset, appends the data-block first. The drop operators need to be adjusted to use this new function that respects assets. With this patch it only works for dragging assets into the 3D view. Note that I expect this to be a short-lived change. A refactor like D4071 is needed to make the drag & drop system more future proof for assets and other use cases. Part of the first Asset Browser milestone. Check the #asset_browser_milestone_1 project milestone on developer.blender.org. Differential Revision: https://developer.blender.org/D9721 Reviewed by: Bastien Montagne, Brecht Van Lommel
2020-12-13Cleanup: removing some uses of equal sign in descriptionsYevgeny Makarov
Using 'is/means/equal' words in place of equal sign in descriptions. Differential Revision: https://developer.blender.org/D9799 Reviewed by Hans Goudey
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-06Fix T82251: Outliner Material Drag&Drop missing tree updatePhilipp Oeser
Caused by rBb077de086e14. Not entirely sure why this was rebuilding the tree prior to above commit, but sending an ND_OB_SHADING notifier is appropriate (and also what the Outliners listener listens to). Maniphest Tasks: T82251 Differential Revision: https://developer.blender.org/D9396
2020-10-13Fix T81589: Correct drag type handling in outlinerRobert Guetzkow
Blender crashed when dragging and dropping color into the outliner. This issue was cause by a missing check for the correct drag type in `datastack_drop_poll`. The check is added in this commit. Additionally, a new drag type is introduced for the "data stack" drag option, that was introduced in commit 1572da858df4, to differentiate it from the existing WM_DRAG_ID type. Reviewed By: Severin Differential Revision: https://developer.blender.org/D9169
2020-09-30Cleanup: Use LISTBASE_FOREACH macro in outliner codeHans Goudey
2020-09-20Fix T80945: Build modifier not updating after outliner copyNathan Craddock
Build modifiers linked or copied to objects from the outliner would not animate until the file was saved and reopened due to a missing depsgraph relations tag.
2020-09-16Outliner: Modifier/constraint/shaderfx drag and drop operatorNathan Craddock
This adds an operator to allow drag and drop of modifiers, constraints, and shader effects within the outliner. Referred to as "data stack" in the code for simplicity. The following operations are allowed: * Reordering within an object or bone * Copying a single modifier/constraint/effect to another object or bone * Copying (linking) all modifiers/constraints/effects to another object or bone. This complements the recent work done for panel-based modifier layouts by allowing reordering in the outliner. It also makes it simple to copy a single modifier/constraint/effect to another object. Differential Revision: https://developer.blender.org/D8642
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-07Cleanup: Rename soops to space_outlinerNathan Craddock
No functional changes. Rename soops, soutliner, and so to space_outliner.
2020-07-21UI: Add an outer boundary for edge panning, use in outlinerHans Goudey
Currently if you drag and drop an item from the outliner elsewhere in the Blender window, the outliner will scroll the entire time, even if the mouse is far away. This commit adds optional behavior for the edge pan operator that makes it only act if the mouse is close enough to the region. Differential Revision: https://developer.blender.org/D8193
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-30Outliner: Add auto scrolling during drag and dropNathan Craddock
Pan the view when dragging elements near the borders. This uses the same operator that scrolls the region during modifiers drag and drop.
2020-05-15Fix T76710: objects get lost in linked/overridden collectionsPhilipp Oeser
Right now: - drag-drop in the Outliner prevents dropping inside linked collections - drag-drop in the Outliner allows dropping inside overridden collections (should not be the case) - `Object Properties` > `Collections` panel allows to add to overridden collection (should not be the case) - `Object Properties` > `Collections` panel filters out non-local collections (so adding to linked collections is forbidden) - `bpy collection.objects.link()` allows to add to linked collections (should not be the case) - `bpy collection.objects.link()` allows to add to overridden collections (should not be the case) While this might be supported in the future for overriden collections, these cases should not be allowed atm. since objects get lost on file reload. Note: for the case of the `Object Properties` > `Collections` panel, this could be improved further to filter out overridden collections as well. Reviewers: mont29, brecht Subscribers:
2020-04-25Fix: Selection syncing for outliner operatorsNathan Craddock
A few outliner operators that modify selection were not tagging for a selection sync which led to selection inconsistencies. This adds syncing for the following operators: * Duplicating and deleting collections * Selecting/deselecting collection contents * Drag and drop * Object select, deselect, delete, and delete hierarchy
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-25Cleanup: use 'r_' prefix for output argumentsCampbell Barton
Also pass some args as 'const'.
2020-03-20Fix T74649: Outliner: Cannot set/clear parent with 'Keep Transforms'Philipp Oeser
Parenting in the outliner via drang and drop would always happen without the 'Keep Transforms' option. Since this is often desired, this adds the ability to hold Alt for doing this to the drop action. Adding the hint to hold Alt to the operator name is not nice, but since the operator name is used for the UI, there doesnt seem to be a nicer way of doing this. If modifier keys are needed back for other actions, spawning a menu instead could be an alternative for the future. Maniphest Tasks: T74649 Differential Revision: https://developer.blender.org/D7120
2020-03-07Cleanup: Outliner: Remove unused parameterNathan Craddock
Searching back in the outliner did not require the unused SpaceOutliner parameter.
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-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-02-05T73589: Code Quality: Renaming on BKE_material.hAntonio Vazquez
Old Name New Name ========= ========= init_def_material BKE_materials_init BKE_material_gpencil_default_free BKE_materials_exit test_object_materials BKE_object_materials_test test_all_objects_materials BKE_objects_materials_test_all give_matarar BKE_object_material_array give_totcolp BKE_object_material_num give_current_material_p BKE_object_material_get_p give_current_material BKE_object_material_get assign_material BKE_object_material_assign assign_matarar BKE_object_material_array_assign give_matarar_id BKE_id_material_array give_totcolp_id BKE_id_material_num assign_material_id BKE_id_material_assign clear_matcopybuf BKE_material_copybuf_clear free_matcopybuf BKE_material_copybuf_free copy_matcopybuf BKE_material_copybuf_copy paste_matcopybuf BKE_material_copybuf_paste BKE_material_init_gpencil_settings BKE_gpencil_material_attr_init BKE_material_add_gpencil BKE_gpencil_material_add BKE_material_gpencil_get BKE_gpencil_material BKE_material_gpencil_default_get BKE_gpencil_material_default BKE_material_gpencil_settings_get BKE_gpencil_material_settings
2019-09-13Cleanup: unused headers (GPU)Campbell Barton
2019-09-02Cleanup: get rid of BKE_collection_master() useless accessor.Bastien Montagne
In its current version that was a totally useless extra layer of crap that we can totally avoid. Plus name was bad too.
2019-08-16Outliner: Support box select on click+dragNathan Craddock
2019-08-16Outliner: set parent for entire selectionNathan Craddock
Set and clear parents for all elements in the selection in the outliner. This also removes the popup menu for setting the parent to curves, armatures, and lattices. It makes more sense to keep the outliner simple and only do object parenting.
2019-06-11Fix (unreported) message wrongly using IFACE_ for its translation.Bastien Montagne
`IFACE_` is for short strings always shown in UI (like labels of buttons, menu entries...). Every thing else, especially when more than a couple of words, must use `TIP_`.
2019-04-29Cleanup: comments (long lines) in editorsCampbell Barton
2019-04-21Cleanup: comments (long lines) in editorsCampbell Barton
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-29Fix T63082: Outliner allows assign grease pencil materials to meshAntonioya
The grease pencil materials only can be assigned to objects of grease pencil type.
2019-03-26Cleanup: style, use braces for editor/spacesCampbell Barton
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-16DNA: rename SpaceOops -> SpaceOutlinerCampbell Barton
2019-02-11Cleanup: comment indentation & spellingCampbell Barton
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.