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-08-03Fix T90341: Crash opening 2.4 file with File Browser editor openJulian Eisel
The file selection parameters (e.g. `context.space_data.params`) are expected to be unset in certain cases. Reading 2.4 files seems to be one of them. Hence, code using it should check it's set first. Also added an assert to a File Browser UI template printing a message when the parameters are unset, to help debugging the issue.
2021-08-03Fix T85436: Separate by loose parts doesn't show new objectsCampbell Barton
Only the "changed" state from the last edit-object was used, this meant the operator would not perform the necessary update with multi-object edit-mode. Use "changed" & "changed_multi" naming convention.
2021-08-03Correct task ID in 00b57136e4167ef5a303b1215574bb52a22e9194Campbell Barton
2021-08-03UI: Add light count to viewport statisticsFalk David
Even though lights were part of `SceneStats`, they were not used when rBfd10ac9acaa0 was committed. This patch adds the light count back into the statistics. When a light is the active object, it will display the total number of lights in the scene, as well as how many lights are currently selected. {F10141354} Reviewed By: #user_interface, Severin, Blendify, harley Maniphest Tasks: T88512 Differential Revision: https://developer.blender.org/D11387
2021-08-03Revert "Fix spin-gizmo not allowing click events to select vertices"Campbell Barton
This reverts commit 0b903755a9908344e9fcb4a33b4f0340abeb9386. This caused T86030, left-mouse selection override clicking, which is used for creating a full revolution.
2021-08-03Cleanup: Hide implementation details for ED_keyframe_keylist.Jeroen Bakker
For T78995 we want to change the data structure of keylists to improve performance. (Probably a Vector with bin-search capabilities). This patch hides the internal structure of the keylists behind `AnimKeylist` structure. This allows us to change the internals without 'breaking' where it is being used. The change adds functions to create, free, find and walk over the keylist. Reviewed By: sybren Maniphest Tasks: T78995 Differential Revision: https://developer.blender.org/D11974
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-08-03Cleanup: use C++ comments or 'if 0' for commented codeCampbell Barton
2021-08-03Edit Mesh: Correct normal calculation for "Set From Faces"Campbell Barton
Setting normals from faces wasn't weighting the faces contribution by the corner angle, giving lop-sided results in some cases. This removes the epsilon check for CLNORS_VALID_VEC_LEN, in favor of matching the behavior of vertex normals exactly.
2021-08-02Mesh: Tag normals dirty instead of calculatingHans Goudey
Because mesh vertex and face normals are just derived data, they can be calculated lazily instead of eagerly. Often normal calculation is a relatively expensive task, and the calculation is often redundant if the mesh is deformed afterwards anyway. Instead, normals should be calculated only when they are needed. This commit moves in that direction by adding a new function to tag a mesh's normals dirty and replacing normal calculation with it in some places. Differential Revision: https://developer.blender.org/D12107
2021-08-02Fix T90356: Frame selected includes active stripRichard Antalik
Don't include active strip in this operator. This was confusing due to name of operator and inconsistent with other editors.
2021-08-02Fix T87041: Driver Editor not updated in realtimePhilipp Oeser
Caused by {rBbbb2e0614fc3} Since above commit only the playhead is updated as an overlay in animation playback (was moved out of drawing of the main region for perfomance reasons). The driver value "debug" visualization is very useful to have during playback though but was left in main region drawing as part of `draw_fcurve` (thus does not update in realtime anymore). Moving `graph_draw_driver_debug` into the overlay is not feasible because it requires animation filtering which has significant overhead which needs to be avoided in the overlay which is redrawn on every UI interaction. Now tag the whole main region for updates in the Driver Editor during playback instead (which will make the Drivers Editor as slow during playback as before rBbbb2e0614fc3 -- but with realtime updates of the debug visualization). Maniphest Tasks: T87041 Differential Revision: https://developer.blender.org/D12003
2021-08-02Asset Browser: Proper context menu for assetsJulian Eisel
Add a context menu dedicated to asset operations to the Asset Browser. There are two separate context menus to keep things separated well and avoid confusing if-else logic (similar to D12057 & D12059). Their polls make sure they are displayed for the right contexts only. Also (to be committed as followup cleanup): Remove now unused special handling for assets in file delete operator. Differential Revision: https://developer.blender.org/D12062
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-31Cleanup: Use const mesh argumentsHans Goudey
These functions do not change their source or input mesh, so it can be passed with const, which means in one case that a function doesn't have to be responsible for freeing its argument mesh, which is a clearly better separation of concerns.
2021-07-31Cleanup: Remove unused includesHans Goudey
2021-07-31Cleanup: Voxel remesh function namingHans Goudey
- Remove BKE prefix for static functions - Make specific intermediate functions static - Avoid unecessary "_to_mesh_nomain" suffix
2021-07-30Assets: Rename "Mark Asset" operator to "Mark as Asset"Julian Eisel
This naming change was agreed on during the asset workshop. See https://code.blender.org/2021/06/asset-browser-workshop-outcomes/#terms-definitions.
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: Move remesh files to C++Hans Goudey
This will be helpful for some cleanups I'd like to do, including removing the unecessary C API for OpenVDB and unifying some attribute transfer code.
2021-07-30Assets: Disable File Browser only operators for asset browsingJulian Eisel
These operators shouldn't be available in the Asset Browser. https://developer.blender.org/T83556 Added a comment to each operator poll assignment to explicitly mention the intention. That should also remind devs to decide if the operator should apply for both file & asset browsing when copy & pasting operator definition code.
2021-07-30Fix incorrect poll function used for file path droppingJulian Eisel
The operator to drop file paths into the File Browser was just checking if there's an active window. This wasn't really an issue since the operator was only used as drop-operator for the File Browser. But the operator would show up in the operator search. Plus, for asset browsing, we'll also have to check the file browsing mode, so the more specific poll function will be needed.
2021-07-30Cleanup: Refactor logic of file deletion poll callbackJulian Eisel
* Early exit instead of complex if-else blocks. * Avoid iterating over entire file list. * Use `true`/`false` for boolean values. * Declare variables in smaller scopes.
2021-07-30UI: Don't show Windows file association operator in search on other OSesJulian Eisel
The Windows-specific "Register File Association" operator would show in the search menu of other platforms. Decided to not disable it at compile-time, like we do it with "Toggle System Console" (another Windows-only operator), because that would require workarounds for the translation tools. Instead the operator poll function always returns false on unsupported platforms now.
2021-07-30Preferences: Move "Register File Association" to preferences levelJulian Eisel
The operator was register as a "file" operator, which are by convention used for File Browser operators only. Move it to the "preferences" operators, where it's displayed in the UI too.
2021-07-30Fix T90318: Dragging asset while Asset Browser is still loading crashesJulian Eisel
This partially reverts cb0b017d8f51: We can't store the asset handle in the drag data, because the file pointer it wraps may be freed as the Asset Browser generates its file list.
2021-07-30Cleanup: Remove unused file description storageJulian Eisel
This isn't used at all in the current File and Asset Browser design.
2021-07-30Cleanup: headers, use 'pragma once', remove argument to '\file'Campbell Barton
2021-07-30Cleanup: missing leading '*' from comment blocksCampbell Barton
2021-07-30Cleanup: limit scope of temporary variablesCampbell Barton
Also remove early return as it duplicates cleanup calls.
2021-07-30Cleanup: clang-format (re-run after v12 version bump)Campbell Barton
2021-07-30Cleanup: spelling in commentsCampbell Barton
2021-07-29Fix T89976: Mirror Keys By Value performs wrong scale conversionSybren A. Stüvel
In the graph editor, Mirror Keys by Value would convert the value to mirror over, to account for different units for linear & rotational properties. The conversion was done in the different direction, though, resulting in values that were too large by a factor of (180/pi)^2.
2021-07-29Render: remove unused Blender Internal view layer settingsBrecht Van Lommel
These should have been removed earlier but were forgotten.
2021-07-29Assets/UI: Resolve major asset view UI template limitationJulian Eisel
Before this, all asset view templates showing the same asset library would show the same assets, even if they should show different ID types. That was a major limitation since the design did forsee that this template can be put anywhere in the UI to display various sub-sets of assets. Initially I did the ID type filtering close to the asset-list reading, because I wanted to optimize reading so that we would only actually read asset information from disk of the ID type to be shown. But this will be quite complex and I'm not sure if I'll get to work on this anytime soon. So this commit moves the filtering to the template display level solving this limitation. Note: This also adds the code to filter by tags, together with the ID type. But it's not actually used anywhere yet.
2021-07-29Cleanup: Remove unnecessary code for asset view UI templateJulian Eisel
From what I can tell there is no reason anymore to do this. The design has changed since this was added.
2021-07-29Assets/UI: Sanity check argument for UILayout.template_asset_view()Julian Eisel
Was already doing some sanity checks, but wasn't checking if the passed property actually is a collection property, which is important.
2021-07-29Cleanup: Pass asset handle to asset iterator, rather than wrapped fileJulian Eisel
This iterator was introduced before `AssetHandle` existed, so it was dealing with the file data directly. Now we want as little code as possible to deal with the file data, all access should happen via the `AssetHandle`.
2021-07-29Cleanup: Consistent indent style for asset CMakeLists fileJulian Eisel
Was mixing 4 and 2 space indent in a single file.
2021-07-29Data-block Preview: Create preview using current frameAntonio Vazquez
The preview was always using frame 1, but maybe the object has changed and it's better create preview using the current frame. Reviewed By: Severin Differential Revision: https://developer.blender.org/D12018
2021-07-29Cleanup: Fix build warningRichard Antalik
Introduced in 3964785a1458
2021-07-29cleanup: editor_image : Remove unused draw functionsjim man
These functions are unused currently.. Reviewed By: deadpin, jbakker Differential Revision: https://developer.blender.org/D11968
2021-07-29VSE: Change grid line drawingRichard Antalik
Add overlay option to disable grid drawing. Reuse drawing code from other editors (timeline editor) Add argument `display_minor_lines` to function `UI_view2d_draw_lines_x__discrete_frames_or_seconds` This way minor line drawing can be disabled and so it doesn't cause too much visual noise. Also spacing seems to be too fine, so VSE uses 3x what is defined in preferences. Reviewed By: fsiddi, Severin Differential Revision: https://developer.blender.org/D11790
2021-07-29UI: Fix time labels drawingRichard Antalik
Calculate frequency of time/frame label drawing, such that labels have at least 10px margin and don't overlap. Change timecode format: - Use at least `mm:ss` format - Don't display frames if all labels would end with +00 Reviewed By: Severin Differential Revision: https://developer.blender.org/D11792
2021-07-29Fix T89952: GPencil channel box selection offsetFalk David
The channel box selection was offset for grease pencil layers. This is a proposed fix by @yann-lty Before: {F10227973} After: {F10227974} Reviewed By: #grease_pencil, antoniov Maniphest Tasks: T89952 Differential Revision: https://developer.blender.org/D11962
2021-07-28Fix T75028: Improved Font Names in File ManagerHarley Acheson
When viewing font files in the File Manager, this patch uses the font's family and style names to show the same type of string shown to users in operating system lists. For example "Book Antiqua Regular" instead of "BKANT.ttf" see D12020 for details and examples. Differential Revision: https://developer.blender.org/D12020 Reviewed by Campbell Barton and Julian Eisel
2021-07-28Cleanup: Remove unnecesary undefsRichard Antalik
Macros `SEQ_ALL_END` and `SEQ_ALL_BEGIN` no longer use `seq->tmp`. Therefore they are safe to use regardless from where they are called.
2021-07-28Assets: Improve error message when "Clear Asset" failsJulian Eisel
When using "Clear Asset" from the Asset Browser but with an asset selected that is not stored in the current file, we can show a more informative error message.
2021-07-28Fix T90221: geometry viewer node links to other socket typesWannes Malfait
The viewer node in geometry node trees only supports geometry nodes. This patch ensures that when ctrl shift clicking on a node, it will only link to geometry sockets. Differential Revision: https://developer.blender.org/D12055
2021-07-28Fix particle system duplication duplicates all systemsPhilipp Oeser
Followup to rB3834dc2f7b38 (where getting the proper particle system was fixed for the Adjust Last Operation panel in the Properties Editor). But since this operator can also be called from the 3DView, get a current particle system there as well. Without this, _all_ particle systems would be copied when executing from the 3DView (which was never really intended [operator description uses singular] -- it just happens to use `copy_particle_systems_to_object` internally as well -- same as the `Copy Active/All to Selected Objects` operators)). ref. T83317 Maniphest Tasks: T83317 Differential Revision: https://developer.blender.org/D12033