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-23LibOverride: protect better against using on complex inter-dependency cases.Bastien Montagne
Do not allow 3DView operator to run on the liboverride of an instantiating Empty object. And tweak behavior in the Outliner operations too. Related to T94226. Note that this remains fairly exotic, bad idea not recommended cases, such complex inter-dependencies between different libraries inside a same liboverride hierarchy is just not possible to handle properly.
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-08Cleanup: move public doc-strings into headers for 'editors'Campbell Barton
Ref T92709
2021-11-03UI: Display disabled-hint when dragging material outside object modeJulian Eisel
Display a "disabled hint" (text explaining why something isn't possible) when dragging a material over the 3D View, while being in edit mode or so (anything that isn't object mode).
2021-11-01Fix T92629: Crash on mesh separate after rB43bc494892c3.Bastien Montagne
rB43bc494892c3 switched `BKE_libblock_relink_to_newid` to use new ID remapping and libquery code. However, that new code does protect by default against remapping an objects's data pointer when that object is in Edit mode, since this is not a behavior that generic BKE code can handle (due to required editing data for most obdata types when in edit mode). So specific code that does create new IDs and need remapping in Edit mode has to pass specific exception flags to remaping code. This commit adds those remapping flags to `BKE_libblock_relink_to_newid` and add said exception flag to the remapping call from `ED_object_add_duplicate` when the object is in edit mode.
2021-10-29IDManagement: Remove deprecated `BKE_libblock_relink_to_newid` usages.Bastien Montagne
Move all usages to new `BKE_libblock_relink_to_newid_new`, and rename that one to `BKE_libblock_relink_to_newid`. Fix T91413.
2021-10-26Cleanup: spelling in commentsCampbell Barton
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-24Cleanup: spelling in commentsCampbell Barton
2021-10-22Cleanup/Fix (unreported) 'make single user' handling of actions.Bastien Montagne
Actions of duplicated objects would not be properly made single user, unlike obdata and materials. Further more, there is no reason to manually handle such animdata copying here, `BKE_id_copy_ex` can do that for us with the proper flags.
2021-10-22Fix T91410: Make Single User operation ignores linked data-blocks.Bastien Montagne
Now 'Make Single User' will also create local copy of linked data as needed. IMPORTANT: Unlike with local data, this always happen, even if linked data has only one user. This avoids e.g. cases like two local objects sharing a same linked mesh, then when calling 'Make Single User -> Object and ObData' on both objects, yu expect both of your objects to get localized meshes, not one of them keeping its linked, un-editable mesh.
2021-09-24LibOverride: deprecate Proxies: Remove 'Make Proxy' operator.Bastien Montagne
2021-09-08Asset: Dropping Material assets on material slot under mouse cursor.Jeroen Bakker
This patch allows dropping material assets from material slot under the mouse cursor. Before this change the material slot had to be hand-picked from the properties panel. For consistency it is chosen to do this in any shading mode as the tooltip shows what is exactly going to happen during release. The feature also works for other object types than Meshes as it uses the drawn surface on the GPU to detect the material slots. Performance of this patch has been tested with AMD GCN3.0 cards and are very responsive. Reviewed By: fclem, Severin Differential Revision: https://developer.blender.org/D12190
2021-08-12Fix T88498: 'Clear Parent' does not clear parent_bonePhilipp Oeser
Clearing the parent from the UI using the X (or from python) clears the `parsubstr` and set `partype` back to `PAROBJECT`. Using the Clear Parent operator would leave the `parsubstr` (and thus `parent_bone`) untouched even though this operator claims to "clear parenting relationship completely" (it also removes parent deform modifiers for example). So now, also clear `parsubstr` and set back to `PAROBJECT` [which is default]. Maniphest Tasks: T88498 Differential Revision: https://developer.blender.org/D11503
2021-08-10Cleanup: use give_object_under_cursor when dragging materials.Jeroen Bakker
It used to invoke give_base_under_cursor, but only accessed the `object` from the base.
2021-08-09Cleanup/fixes in UI messages.Bastien Montagne
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-03T90372: Assets: When dropping material use active material slot.Jeroen Bakker
Currently when dropping an asset the first material slot is always updated. This patch changes that logic to update the active material slot. In future the behavior will be updated to use the material slot of the face under the cursor. That requires better feedback tot he user. Reviewed By: Severin Maniphest Tasks: T90372 Differential Revision: https://developer.blender.org/D12056
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-09Make Single User: support object data animationPhilipp Oeser
In addition to _object_ animation, now _object data_ (mesh, curve, ...) animation can now be made single user as well. This came up in T89369 and while it is possible to do this via the Outliner [where all actions have to be selected individually], this seems to be more convenient to be done from the 3DView. note: usercount of the action is checked now, if it single-user already, no copy takes place (same thing could/should be done for single_object_action_users as well). note2: obdata is made single user as well (otherwise duplicated actions will be assigned to the same shared obdata - which does not result in unique animadata which is what we are after here) ref. T89369 Maniphest Tasks: T89369 Differential Revision: https://developer.blender.org/D11683
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-28Cleanup: Remove unused "for_orco" argument to curve evaluationHans Goudey
`BKE_displist_make_curveTypes` had a `for_orco` argument that was always false in calls to the function. Removing it allows the curve displist and modifier evaluation code to become simpler. There are some related cleanups in rBdf4299465279 and rB93aecd2b8107.
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-14BMesh: support face-normal calculation in normal & looptri functionsCampbell Barton
Support calculating face normals when tessellating. When this is done before updating vertex normals it gives ~20% performance improvement. Now vertex normal calculation only needs to perform a single pass on the mesh vertices when called after tessellation. Extended versions of normal & looptri update functions have been added: - BM_mesh_calc_tessellation_ex - BM_mesh_normals_update_ex Most callers don't need to be aware of this detail by using: - BKE_editmesh_looptri_and_normals_calc - BKE_editmesh_looptri_and_normals_calc_with_partial - EDBM_update also takes advantage of this, where calling EDBM_update with calc_looptri & calc_normals enabled uses the faster normal updating logic.
2021-06-09Cleanup: remove redundant checks which have already been testedCampbell Barton
Note that these changes are limited simple cases as these kinds of changes could allow for errors when refactoring code when the known state is not so obvious.
2021-06-03LibOverride: Add `override_hierarchy_create`to ID's RNA API.Bastien Montagne
2021-05-27Cleanup: rename BKE_main_id_{clear_newpoins => newptr_and_tag_clear}Campbell Barton
It wasn't obvious this function cleared the tag as well.
2021-05-14Cleanup: spelling, rename metas to meta-strips / meta-ballsCampbell Barton
2021-04-08Fix T81707: Spline IK Joints "Floating" above curveSebastian Parborg
The issue was that where_on_path uses a resampled curve to get the data from the curve. This leads to disconnects between the curve the user sees and the evaluated location data. To fix this we simply use the actual curve data the user can see. The older code needed a cleanup either way as there were hacks in other parts of the code trying to work around some brokenness. This is now fixed and we no longer need to clamp the evaluation range to 0-1 or make helper functions to make it do what we actually want. Reviewed By: Campbell, Sybren Differential Revision: http://developer.blender.org/D10898
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: Use boolean in WM_cursor_waitAntonio Vazquez
2021-02-06UI: Fix Typos in Comments and Docsluzpaz
Approximately 91 spelling corrections, almost all in comments. Differential Revision: https://developer.blender.org/D10288 Reviewed by Harley Acheson
2021-01-20UI: Object "Make Links" sub-menu overhaulWilliam Reynish
- Rename to "Link/Transfer Data". - Move Mesh Data Transfer operators here from the Relations sub-menu. - Clarify which operations links to, copies or transfers/projects data using Link, Copy and Transfer leading text. - Re-order contents to fit each category and add separators. - Add enum tool-tips. Reviewed By: Blendify, campbellbarton pablovazquez, mont29 Ref D10090
2021-01-06Fix T84420: Linking regular materials to gpencilFalk David
When using "Make Links"->"Materials" regular materials could be linked onto grease pencil objects. This caused a number of issues. The fix changes the `allow_make_links_data` function to make sure that if one object is of type `OB_GPENCIL`, the other has to be aswell. Reviewed By: antoniov Maniphest Tasks: T84420 Differential Revision: https://developer.blender.org/D10014
2020-12-18UI: Don't use abbreviations in label textYevgeny Makarov
Expand abbreviations for words like "Bright" (instead of "Brightness"), "Premul", "Lib", "Dir", etc. Differential Revision: https://developer.blender.org/D9862
2020-12-17Fix T83875: Converting Proxy to override crashes blender.Bastien Montagne
Some weird proxies apparently can have a local collection instancing... Not sure this is even really valid for proxies, but in any case we cannot override that, just detect and properly cancel the operation then. Should be backported to 2.91.1 should we do it.
2020-12-14Cleanup: Fix capitalization in various placesYevgeny Makarov
Approximately 33 changes of capitalization to conform to MLA title style. Differential Revision: https://developer.blender.org/D9796 Reviewed by Julian Eisel
2020-12-11GPencil: Add Link support to Effects using Ctrl+LAntonio Vazquez
The effects were not supported in this operator, but it was supported in the Outliner. Differential Revision: https://developer.blender.org/D9824
2020-12-02Geometry Nodes: active modifier + geometry nodes editorHans Goudey
This commit adds functions to set and get the object's active modifier, which is stored as a flag in the ModifierData struct, similar to constraints. This will be used to set the context in the node editor. There are no visible changes in this commit. Similar to how the node editor context works for materials, this commit makes the node group displayed in the node editor depend on the active object and its active modifier. To keep the node group from changing, just pin the node group in the header. * Shortcuts performed while there is an active modifier will affect only that modifier (the exception is the A to expand the modifiers). * Clicking anywhere on the empty space in a modifier's panel will make it active. These changes require some refactoring of object modifier code. First is splitting up the modifier property invoke callback, which now needs to be able to get the active modifier separately from the hovered modifier for the different operators. Second is a change to removing modifiers, where there is now a separate function to remove a modifier from an object's list, in order to handle changing the active. Finally, the panel handler needs a small tweak so that this "click in panel" event can be handled afterwards.
2020-11-06Cleanup: use ELEM macroCampbell Barton
2020-11-02Cleanup: Sanitise return value of `ED_object_parent_set()`Sybren A. Stüvel
Consistently return `false` from `ED_object_parent_set()` when parenting is not possible. Before, when parent and child were the same object, the function would return `true` even though the parent-child relation was not made. Just returning `false` in the `parent == child` case would break the parenting operator, as `false` stops its loop over all selected objects. This tight coupling caused T82312. The loop now has its own check for this, so that it properly continues, and the implementation of `ED_object_parent_set()` is decoupled from its surrounding code. No functional changes.
2020-11-02Revert "Parenting: fix return value when parenting object to itself"Sybren A. Stüvel
This reverts commit ad35fa1993a49f663f782af1c9c41640e94b7eb8, it had unintended side-effects (T82312).
2020-10-30Merge remote-tracking branch 'origin/blender-v2.91-release'Sybren A. Stüvel
2020-10-30Parenting: fix return value when parenting object to itselfSybren A. Stüvel
Ensure parenting an object to itself is seen as error, by returning `false`. This error was introduced as part of a supposed-to-be-non-functional cleanup rBb8d4a2aff8069dd7d6fb91ad0d9427eed489b68f.
2020-10-24UI: Capitalization CorrectionsYevgeny Makarov
Approximately 141 changes of capitalization to conform to MLA title style. Differential Revision: https://developer.blender.org/D8392 Reviewed by Julian Eisel
2020-10-21Fix T81896: Outliner missing redraw after "Set Parent (Without Inverse)"Philipp Oeser
Outliners listener (outliner_main_region_listener) needs ND_PARENT notifier to redraw, the parenting operator only spawned ND_TRANSFORM (which doesnt do a redraw). Maniphest Tasks: T81896 Differential Revision: https://developer.blender.org/D9295
2020-10-13Fix (unreported) broken 'make override' of objects in master collection.Bastien Montagne
Master collections are not in Main list of collections, so we also need to check the scenes.
2020-10-13Cleanup: Fix typo in function name.Bastien Montagne
2020-10-07Refactor: remove `BKE_<id_type>_copy` functions.Bastien Montagne
Those were only shallow wrappers around `BKE_id_copy`, barely used (even fully unused in some cases), and we want to get rid of those ID-specific helpers for the common ID management tasks. Also prevents weird custom behaviors (like `BKE_object_copy`, who was the only basic ID copy function to reset user count of the new copy to zero). Part of 71219.
2020-10-07Refactor `BKE_id_copy` to return the new ID pointer.Bastien Montagne
No reasons to keep the new ID pointer as parameter here. Part of T71219.