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-12-21Cleanup: clang formatPhilipp Oeser
Missed in rB7c9e4099854a, sorry.
2021-12-21Fix T92930: Outliner "Show Active" bone fails in certain situationsPhilipp Oeser
Outliner would frame the armature object instead of the bone if the bone was on a hidden armature layer. Similar to issues reported in e.g. T58068 and T80464, this is due to the fact that `BKE_pose_channel_active` always checks for the armature layer (and returns NULL if a bone is not on a visible armature layer). Now propose to make this layer check **optional** (and e.g. from the Outliner be more permissive). This also introduces `BKE_pose_channel_active_if_layer_visible` which just wraps `BKE_pose_channel_active` with the check being ON. Maniphest Tasks: T92930 Differential Revision: https://developer.blender.org/D13154
2021-12-18Fix T94184: Outliner: Collection dragging tooltip is not updatingGermano Cavalcante
In the context of the dragdrop tooltip, the event referenced to the window is out of date and contains invalid `mval` values. Avoid using `win->eventstate` as much as possible.
2021-12-17UI: make Remap User dialog in outliner widerPhil Stopford
The previous size was too small for common object names. Differential Revision: https://developer.blender.org/D13604
2021-12-17Outliner ID Remap Users: hide ID type from the UIPhilipp Oeser
The correct type should be set by invoke already, changing it to a non- matching type (e.g. trying to remap Mesh users with a Camera block) does not really make sense afaict, reason being that we would be presented with the "Invalid old/new ID pair" message in such case anyways (code checks GS(old_id->name) == GS(new_id->name)). This alone wouldnt be a pressing issue, but since doing this with an object ID type crashes atm., it seems to make sense to clean this up now (of course the crash should be looked into, but this is for a separate patch -- if that is solved, we could also think about adding the "Remap Users" entry back in the context menu for objects as well [which was removed in rB17bd5c9d4b1e for some reason]). Part of T93799. Differential Revision: https://developer.blender.org/D13512
2021-12-14Cleanup: correct unbalanced doxygen groupsCampbell Barton
Also add groups in some files.
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-09Cleanup: spelling in commentsCampbell Barton
2021-12-08Cleanup: move public doc-strings into headers for 'editors'Campbell Barton
Ref T92709
2021-11-12Cleanup/document BKE_blender_copybuffer.Bastien Montagne
* Rename the 'copy' functions to make it clear they belong to the same 'group' and are to be used together. * Fix `flag` parameter of `BKE_copybuffer_paste` being a short instead of an int. * Improve documentation.
2021-11-02Fix T91094: missing update after collection changedJacques Lucke
Since rBb67fe05d4bea2d3c9efbd127e9d9dc3a897e89e6 collections have a geometry component that depends on all the geometries inside the collection. Contrary to what I originally thought `ID_RECALC_COPY_ON_WRITE` does not trigger a collection geometry update. This makes sense because a collection may change in ways that do not require a geometry update. Instead, we have to trigger the geometry update manually now by passing `ID_RECALC_GEOMETRY` when appropriate.
2021-10-25UI Drag Drop: allow customizable drawingGermano Cavalcante
No functional changes. This commit adds 3 callbacks for `wmDropBox` which allow custom drawing without affecting the internal dropbox API. Differential Revision: https://developer.blender.org/D12948
2021-10-25Cleanup: rename Outliner functionPhilipp Oeser
Seems like typos in rB32dc085289ac outline_batch_delete_hierarchy --> outliner_batch_delete_hierarchy Differential Revision: https://developer.blender.org/D12989
2021-10-25Fix T91411: Outliner crash using contextmenu operators from a shortcutPhilipp Oeser
Oversight in {rBb0741e1dcbc5}. This was guarded by an assert in `get_target_element`, but it can be valid to have these assigned to a shortcut (and then perform the action without an active outliner element). Now remove the assert and let the operator polls check if we really have a target element. note: this basically makes `get_target_element` obsolete, could call `outliner_find_element_with_flag` instead in all cases. Maniphest Tasks: T91411 Differential Revision: https://developer.blender.org/D12495
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-10-05Fix missing proper 'make local' call for liboverrides from outliner.Bastien Montagne
Also includes minor improvements to `BKE_lib_override_library_make_local` itself. This is a complement to rB37458798fa02c.
2021-10-04Cleanup: remove unused assignmentsCampbell Barton
2021-10-04Cleanup: pass arguments as constCampbell Barton
2021-09-29Texts in Outliner dont activatePhilipp Oeser
Texts in Outliner dont activate on selecting (Text Editor did not change to selected text) which is a bit inconsistent to other ID types. ref T90862 Maniphest Tasks: T90862 Differential Revision: https://developer.blender.org/D12412
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-22Fix (unreported) crash in outliner after recent changes to ID management ↵Bastien Montagne
core code. Outliner tree building code abuse the `ID.newid` pointer to store non-ID data. While this is bad and should be fixed at some point, for the time being at the very least do not use ID BKE API to deal with this pointer in that specific case, this needs its own proper code.
2021-09-16Cleanup/Fix outliner 'make local' code.Bastien Montagne
While likely harmless, this code was doing extremely bad thing, by-passing the whole lower-level `BKE_lib_id_make_local` call in case it would fail and deciding by itself to forcefully make the given ID local. Bad. Very, very, very bad.
2021-09-16IDManagement: refactor: Remove 'test' part from `BKE_lib_id_make_local`.Bastien Montagne
Mixing testing and actual action in a single function is just not a good way to do things, and the 'testing' feature is not used anywhere anymore, time to get rid of it.
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-09-02Cleanup: remove redundant alloc argument to SEQ_editing_getCampbell Barton
Callers that require lazy initialization can use SEQ_editing_ensure.
2021-08-26Fix T90915: outliner select behaves as if Ctrl is heldCampbell Barton
Error in 452cc0193255c9e80ca4f163a2d524ed6bb17ef1
2021-08-24Fix T90840: Can't duplicate or copy (Ctrl-C) object from linked file.Bastien Montagne
We need to separate the flag telling duplicate code to not handle remapping to new IDs etc., from the one telling the code that we are currently duplicating a 'root' ID (i.e. not a dependency of another duplicated ID). This whole duplicate code/logic is still fairly unsatisfying, think it will need further refactor, or maybe even re-design, at some point...
2021-08-13Cleanup: rearrange includesGermano Cavalcante
Bring the includes from the same project together.
2021-08-13Fix T90637: Outliner: VSE context menu options are not workingGermano Cavalcante
Some of the enum options in the context menu operations are not supported for all element types. `TSE_SEQUENCE`, for example, only supports the `Select` option. So, populate the enum list dynamically depending on the type. Also add some calls that were missing for the `TSE_SEQUENCE` type. (`WM_event_add_notifier` and `ED_undo_push`).
2021-08-12Cleanup: use C++ style comments for disabled codeCampbell Barton
2021-08-09Cleanup: spelling in commentsCampbell Barton
2021-08-05LibOverride: Make it reasonably impossible for users to create overrides of ↵Bastien Montagne
scenes. This is not supported currently,doing so through RNA API remains possible, but from regular UI operations it should not be doable anymore. Ref. T90459.
2021-08-04Cleanup: rename restrict to hide/visibility in Object, Collection, MaskLayerBrecht Van Lommel
This makes the internal naming consistent with the public API. And also gives us a visibility_flag rather than restrictflag that can be extended with more flags.
2021-08-04Outliner/LibOverrides: Fix logic of checks for drag'n'drop of Collections.Bastien Montagne
Previous check was too blunt, preventing e.g. re-organization of collection overrides inside a local parent collection, which is perfectly valid operation. Reported by @hjalti from the studio, thanks!
2021-08-04T90371: Asset: Drop Material Tooltip.Jeroen Bakker
This patch changes the drop named material tooltip to give feedback to the user what is going to happen when they invoke the change. There are 3 states: * "": Operator will be canceled as not all data is present (dropping on background.) * "Drop <named material> on <object name> (slot <slot number>, replacing <current material in slot>). * "Drop <named material> on <object name> (slot <slot number). Reviewed By: Severin Maniphest Tasks: T90371 Differential Revision: https://developer.blender.org/D12106
2021-08-03WM: don't store selection properties typically set in the key-mapCampbell Barton
While this was already the case for the most part some selection operators stored common settings for reuse such as "toggle", "extend" & "deselect". Disabling storing these settings for later execution as it means failure to set these options in the key-map re-uses the value of the shortcut that was last called. Skip saving these settings since this is a case where reusing them isn't helpful. Resolves T90275.
2021-08-02WindowManager: Support Dynamic tooltips when dragging.Jeroen Bakker
Originally the operator name was drawn next to the dragging content. After that there was an option to add custom, static text with the dragging content. This patch allows dynamic text to be drawn. The custom text was implemented as out parameter of the poll function what made the code unclear. This patch introduces a tooltip function that separates tooltip generation from the poll function. NOTE: the text should always be returned in its own memory block. This block will be freed after it is copied in the drag struct. Reviewed By: Severin Differential Revision: https://developer.blender.org/D12104
2021-07-30UI: Move Mark/Clear asset out of ID Data in Outliner context menuJulian Eisel
They are now always shown in the top-level of the Outliner context menu. Having them in the ID Data submenu was just a hassle to work with, and often confusing to users - even if technically correct (the asset status is part of the ID data). Part of T82680.
2021-07-30Cleanup: clang-format (re-run after v12 version bump)Campbell Barton
2021-07-23Cleanup: code comments punctuation / spacingCampbell Barton
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-13Cleanup: duplicate checks, unused initializationCampbell Barton
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-07Fix T89559: Outliner shows extra view layer column when it shouldn'tDalai Felinto
This issue happened because of some miscommunication during the original patch review. Since we have the parent element in other outliner modes (Blender File, Data API) I was on the fence here. Rolling this back now so that when Show All View Layers is off we don't see the current View Layer top element. The fix is simple, but it was better to format the code around to follow the style in this file. Differential Revision: https://developer.blender.org/D11830
2021-07-05Cleanup: spelling, punctuationCampbell Barton
2021-07-05Cleanup: spelling in commentsCampbell 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