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
path: root/source
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-03Cleanup: deduplicate type conversion logicJacques Lucke
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-03Fix T89691: Solidify modifier simple/complex inconsistencyMiguel G
Maintain the sign when clamping non zero offset. Reviewed By: campbellbarton, weasel Ref D11832
2021-08-03Cleanup: use C++ comments or 'if 0' for commented codeCampbell Barton
2021-08-03Fix crash adding custom normalsCampbell Barton
Caused by error converting this file to C++ eccdced972f42a451d0c73dfb7ce19a43c120d7f.
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-02Cleanup: Remove duplicate special case checkHans Goudey
2021-08-02Fix T90042: Spline tangent calculation assert with coincident pointsHans Goudey
2021-08-02Cleanup: Make spline settings copy function publicHans Goudey
It will be useful in the spline type conversion node. Theoretically it could become protected again if that conversion moves out of a node, which might be a nice improvement after an initial version.
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-02Cleanup: Remove unused/unecessary OpenVDB C APIHans Goudey
This commit uses OpenVDB more directly for the voxel remesher, without the extra indirection of copying to a Blender API. This makes the code simpler, shorter, and easier to understand (though I didn't observe any performance improvement). This also removes the rest of the unused and undocumented OpenVDB C API, which was written when Blender's code didn't really use C++, and doesn't serve a purpose anymore. Those features will be implemented as nodes in the future anyway (see D12100). Differential Revision: https://developer.blender.org/D12097
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-02Asset Browser: Adjust header pulldowns to be Asset Browser specificJulian Eisel
So far the Asset Browser just showed the same menus as the File Browser. Not all of their entries made sense for the Asset Browser though. I decided to just give them entirely different classes to avoid confusing if-else checks everywhere. I think the code duplication this adds is a minor issue, it's better to keep things seperated clearly IMO. * View menu: Add "Asset Details" toggle for the sidebar region. * View menu: Remove recursion sub-menu * View menu: Remove "File Path" region toggle, which doesn't apply for the Asset Browser. Differential Revision: https://developer.blender.org/D12057
2021-08-02Fix T90332: Auto-smooth crashes in edit-modeCampbell Barton
Regression in 39b2a7bb7e815e051348bf5c5ec777d091324164 that meant non-manifold edges were not being tagged when they should have been.
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-08-02Cleanup: simplify subclassing CPPTypeJacques Lucke
`CPPType` can wrap any C++ type so that code can work with the wrapped type in a generic way. The goal of subclassing `CPPType` is to provide additional methods for some types. For example, the `CPPType` for `Array<int>` could have a `.element_type()` method that returns the `CPPType` for `int`.
2021-08-02Revert "Asset Catalogs: loading a catalog definition file"Sybren A. Stüvel
This reverts commit 1f0d6f763573b22772dcdb61320a12e1c11949e0 and the cleanup 06cb48e1b284e6438ce14f1ea543143fcc74ca59. Committed too early on Monday morning, still has issues that should be resolved first.
2021-08-02Cleanup: Asset catalogs, C++ to C-style commentsSybren A. Stüvel
No functional changes.
2021-08-02Asset Catalogs: loading a catalog definition fileSybren A. Stüvel
Initial, limited implementation of loading a single asset catalog definition file. These files are structured as follows: CATALOG_ID virtual/path/of/catalog SUBCATALOG_ID virtual/path/of/catalog/child SOMETHING_ELSE some/unrelated/hierarchy These virtual paths will be used to show the catalog in a tree structure; the tree structure itself is not part of this commit. Each asset will have one catalog ID that determines where in that tree the asset shows up. Currently only a single catalog definition file can be read; merging data from multiple such files, and writing them out again after changes are made, is for future commits. This commit only contains the code to load a single file, and unittests to check that this actually works. No UI, no user-facing functionality yet.
2021-08-02Cleanup: separate base and geometry nodes specific socket cpp typeJacques Lucke
This simplifies changing how geometry nodes handles different socket types without affecting other systems.
2021-08-02LineArt: Prevent depsgraph warning when camera is NULL.YimingWu
2021-08-02Cleanup: spellingCampbell Barton
2021-08-01Cleanup: Sort node types alphabeticallyHans Goudey
2021-07-31Cleanup: Remove unecessary helper functionHans Goudey
Retrieving a mesh's looptris now take's a const mesh after rB5f8969bb4b4, which removes the need for this function. Since it's only two lines, avoiding the use of a separate function in this case is simpler.
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-31LineArt: Fix(unreported): Child object respect collection visibility.YimingWu
2021-07-31Cleanup: Reorder functionsHans Goudey
The Quadriflow remeshing was in the middle of the voxel remesh code.
2021-07-31LineArt: Material flag versioning correction.YimingWu
By the patch made it in master the version value already advanced (see https://developer.blender.org/D11839), so this versioning code needs to be moved down to that point.
2021-07-31UI: Show a notification when saving preferencesPablo Vazquez
So far the only way to know if they were saved properly was to check the terminal. Also notify when preferences fail to save.
2021-07-30Cleanup: Simplify logic, follow style guide for integer typesHans Goudey
- Use `int` instead of `unsigned int` for mesh indices - Use C++ types (Array, float3, IndexRange) - Use range based for loops
2021-07-30Fix build error in debug builds and uninitialized structsHans Goudey
This BMesh iterator hadn't been used in C++ code yet, and needed a macro for a proper cast. The parameter structs need to be initialized when declared without designated initializers.
2021-07-30Compositor: Buffer iterators testsManuel Castilla
See D11882 for a description of the iterators. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D12001
2021-07-30Cleanup: unneeded default constructor definitionsManuel Castilla
2021-07-30Compositor: Fix wrong number of threads during constant foldingManuel Castilla
The variable was uninitialized at that point of execution.
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: compiler warningsBrecht Van Lommel