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-04-09Fix T87117: Geometry Nodes: Add missing Map Range modes to shader nodeCharlie Jolly
Add missing modes as reported in T87117 bug report. Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D10885
2021-04-09Spreadsheet: persistent column storage and data sourceJacques Lucke
A `DataSource` provides columns for the spreadsheet to display. Every column has a SpreadsheetColumnID as identifier. Columns are not generated eagerly anymore, instead the main spreadsheet code can request a column from a data source with an column identifier. The column identifiers can be stored in DNA and allow us to store persistent data per column. On the user level the only thing that changes is that columns are not shown in alphabetical order anymore. Instead, new columns are always added on the left. The behavior can be changed, however I'd prefer not to automate this too much currently. I think we should just add operators to hide/reorder/resize columns soonish. Differential Revision: https://developer.blender.org/D10901
2021-04-09Geometry Nodes: quiet warning when using object info nodeJacques Lucke
Some object types don't have a geometry component in the depsgraph. Before, there always was a warning printed when such an object was used in the object info node (e.g. to get its location).
2021-04-09Fix T87150: bad points appearance in orthographic viewPhilipp Oeser
Points are drawn as half octahedron (aligned to the camera). Getting the appropriate matrix for facing the camera would fail in in orthographic view, points were not facing the camera (revealing their missing other half octahedron) Maniphest Tasks: T87150 Differential Revision: https://developer.blender.org/D10923
2021-04-09Cleanup: use const for BKE_where_on_path and related structsCampbell Barton
2021-04-09Fix use of uninitialized memory in BKE_scene_objects_as_gsetCampbell Barton
Share macro for setting BLI_Iterator defaults to ensure this doesn't happen again in cases the ITER_* macros aren't used. Oversight in 14d74fb34174a91190d35d7fe595f8dd64cb79d1.
2021-04-09Fix: Missing GeometryNodeCustomGroupRay Molenkamp
This is a minor change to add some plumbing code to support custom geo nodes. This is working the same way as the custom cycles and compositor nodes. An example add-in is attached to D10784 Reviewed By: JacquesLucke Differential Revision: http://developer.blender.org/D10784
2021-04-08Geometry Nodes: Support volumes in the bounding box nodeHans Goudey
Where possible, nodes in the "Geometry" category should support all geometry component types. This adds support for volumes in the recently added bounding box node, based on functions added in the previous two commits. Differential Revision: https://developer.blender.org/D10906
2021-04-08BKE: Refactor volume bounding box codeHans Goudey
This commit splits of the function that generates a bounding box for a volume into a new function, so that the min and max coordinate can be retrieved from volume data without an object. Also some cleanup: using the float3 type.
2021-04-08BKE: Add a utility to transform a shallow copy of a volume gridHans Goudey
Often you need to apply a transformation to a grid without changing the original, and it's necessary to avoid a deep copy of the actual data. OpenVDB has a function to do this, this commit simply adds a wrapper to transform and use that function with blender's `float4x4` data type. Split from D10906
2021-04-08Cleanup: Remove unused includes, use consistent orderHans Goudey
2021-04-08Geometry Nodes: Support instances in attribute searchHans Goudey
Previously only attributes of "real" geometry were displayed in attribute search. This commit adds code to look through attributes on instances and add those to the search drop-down too. This required implementing the same sort of recursive traversal as the realize instances code. The situation is a bit different though, this can return early and doesn't need to keep track of transforms. I added a limit so that it doesn't look through the attributes of too many instanced geometry sets. I think this is important, since this isn't a trivial operation and it could potentially happen for every node in a large node tree. Currently the limit is set at 8 geometry sets, which I expect will be enough, since the set of attributes is mostly not very unique anyway. Fixes T86282 Diffrential Revision: https://developer.blender.org/D10919
2021-04-08Cleanup: Use const arguments for volume codeHans Goudey
The problem was that you could getting write access to a grid from a `const Volume *` without breaking const correctness. I encountered this when working on support for volumes in the bounding box node. For geometry nodes there is an important distinction between getting data "for read" and "for write", with the former returning a `const` version of the data. Also, for volumes it was necessary to cast away const, since all of the relevant functions in `volume.cc` didn't have const versions. This patch adds `const` in these places, distinguising between "for read" and "for write" versions of functions where necessary. The downside is that loading and unloading in the global volume cache needs const write-access to some member variables. I see that as an inherent problem that comes up with caching that never has a beautiful solution anyway. Some of the const-ness could probably be propogated futher in EEVEE code, but I'll leave that out, since there is another level of caching. Differential Revision: https://developer.blender.org/D10916
2021-04-08Fix T87232: Crash when evaluating object with unsupported modifierSybren A. Stüvel
Fix `nullptr` redeference when setting 'orig_data' pointers on CoW copies, by stopping the loop also when `element_cow == nullptr`. This avoids a crash of Blender when the original list of pointers is longer than the CoW list of pointers. I've also added a `BLI_assert()` that checks for equal lengths of the two `ListBase`s, so that problems like these aren't hidden away completely. The root cause of the crash was actually a modifier that was assigned to an object of the wrong type (an Armature object doesn't support modifiers). This caused the list of modifiers on the CoW copy to be shorter than the list of modifiers on the original Object. It's still a mystery how that object got that modifier in the first place.
2021-04-08VSE: Fix crash when building proxyRichard Antalik
When video file for strip doesn't exist, building crashes on NULL dereference. This check was removed by 04e1feb83051.
2021-04-08VSE: Fix building image proxiesRichard Antalik
Broken by 04e1feb83051 Caused by accidentaly moving `SEQ_proxy_rebuild_finish` outside of `if (nseq->type == SEQ_TYPE_MOVIE)` condition in function `SEQ_proxy_rebuild_context()`.
2021-04-08Cleanup:Germano Cavalcante
2021-04-08Fix previous commit: wrong `is_mesh_verts_only` checkGermano Cavalcante
2021-04-08Fix T86762: Inconsistent show of result of modifier Screw in edit modeGermano Cavalcante
To check if an "is_mesh_verts_only" mesh, the overlay engine checks if the mesh has no "totedge" and has "totvert". However, sometimes this engine can check the wrong mesh since editmesh works on `embm->mesh_eval_final`. Reviewed By: fclem Differential Revision: https://developer.blender.org/D10917
2021-04-08Fix T87107 EEVEE: Principled BSDF doesn't handle negative specularClément Foucault
Negative speculars are evil.
2021-04-08Fix: Dragging a modifier to the same index recalculates modifier stackHans Goudey
The fix is to simply check if the final index is the same as the start index and not call the "reorder" callback in that case.
2021-04-08Spreadsheet: support showing data of specific nodeJacques Lucke
Previously, the spreadsheet editor could only show data of the original and of the final evaluated object. Now it is possible to show the data at some intermediate stages too. For that the mode has to be set to "Node" in the spreadsheet editor. Furthermore, the preview of a specific node has to be activated by clicking the new icon in the header of geometry nodes. The exact ui of this feature might be refined in upcoming commits. It is already very useful for debugging node groups in it's current state though. Differential Revision: https://developer.blender.org/D10875
2021-04-08Add ability to get a selection list of bonesSebastian Parborg
This adds the ability to get a selection list for both edit mode bones and pose mode bones. To do this the selection menu list logic had to be reworked a bit. Before it only stored the names of objects. This might work will of objects, however as stated in the code, it might fail for linked objects (so multiple object can have the same name in some corner cases). For bones it is a very common occurance where you can have multiple armature that has the same bone names. So now it also stores the object and bone pointers for this case. Reviewed By: Sybren Differential Revision: http://developer.blender.org/D10570 Fix T85796
2021-04-08EEVEE: Ensure Reflection: Use new implementationClément Foucault
Use same implementation as Cycles. Is also a bit faster. Should also fix T86578 at the same time.
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-04-08Cleanup: modernize-use-equals-defaultJacques Lucke
This was missing from rB19dfb6ea1f6745c0dbc2ce21839c30184b553878.
2021-04-08Text Editor: don't force other views to follow the cursorCampbell Barton
While the existing behavior worked as intended, it wasn't possible to have two views on the same file at different locations. Since there isn't much use in having two views open at the same location allow one view to be at a different scroll location. UI edit-source and selecting a text data block now need explicit calls to scroll to the cursor location. Resolves T87284
2021-04-08Cleanup: renaming, comments and removing unused code in render pipelineBrecht Van Lommel
2021-04-08Fix T87291: assert on exit with preview renderBrecht Van Lommel
Don't keep around persistent data in this case.
2021-04-08Fix T85974: Edit-mode undo/redo causes assertionCampbell Barton
Without legacy-undo, loading memfile undo only cleared edit-mode data for mesh and armature object types. This causes an assertion when loading edit-mode undo steps afterwards for other object types as the existence of this data made entering object mode fail. Resolve this by freeing all objects types undo data from ED_editors_exit
2021-04-08Object: add ED_object_editmode_free_ex utility functionCampbell Barton
2021-04-08Cleanup: rename variable (using underscore separator)Campbell Barton
Prepare for adding another variable that reads poorly without a separator.
2021-04-08Revert "Fix entering edit-mode when object mode and edit-data don't match"Campbell Barton
Before this change, object-data could only have one of the objects referencing it in edit-mode. Reverting since multiple meshes in edit-mode (for the same object data) isn't thread-safe as the evaluated edit-meshes are created in the original edit-mesh, causing a crash updating the depsgraph for linked duplicates, see: T86767. While we could support this case, it's a bigger project without significant benefits, so reinstate the limitation of only allowing a single object to be in edit-mode for each object data. This adds back the error from T85974 which caused an assertion but didn't crash in release builds. This reverts commit 2b60d7d09c51716e8d98834061c1a61ed6b96cf5.
2021-04-08Cleanup: spellingCampbell Barton
2021-04-08PyAPI: ImBuf.copy now copies the underlying imbufCampbell Barton
Without this, copy wasn't useful.
2021-04-08LibOverride: Fix several issues with resync code.Bastien Montagne
This commit essentially touches to post-processing of collections and objects after resync itself has been done, to ensure their proper instantiation in the scene: - Remove a lot of the process in resync case (resynced data are assumed to be already instantiated in the scene, unlike override creation case). - For auto-resync, only do post-processing once after all overrides have been resynced (doing it after each individual resynced was causing a lot of instantiation glitches, with a lot of unwanted extra objects and collections being added to the master collection). It also deals in a much more reliable way with detection of objects missing from the scene, by using the new `BKE_scene_objects_as_gset` utils. As a bonus this makes auto-resync process slightly faster (only by a few percents, but that's always good to get).
2021-04-08Minor cleanup to `scene_collection_array`.Bastien Montagne
Use array allocation, and remove useless check.
2021-04-08BKE_collection: Add a util returning a gset with all objects in given ↵Bastien Montagne
scene's collections. This is internaly using the code of `BKE_scene_objects_iterator` and steals its gset. More efficient than using that iterator directly to rebuild another GSet...
2021-04-08Cleanup: Typos in comments.Bastien Montagne
2021-04-08Outliner Override: Tweak to order of error messages.Bastien Montagne
2021-04-08Outliner: regroup more type of entries under a single icon.Bastien Montagne
In folded view, some type of data are listed as one icon per item, others are 'compacted' as a single icon with a counter. This commit adds bones (edit, normal and pose ones), pose groups and vertex groups as 'compacted' ones in folded view. Part of D10855.
2021-04-08LibOverride: Add a dedicated view in the Outliner.Bastien Montagne
This is a minimal, information-only view currently, listing by default all the override data-blocks, with their user-edited override properties. System-generated overrides (like the overrides of pointers to other override data-blocks) can be shown through a filter option. Finally, potential info or warning messages from (auto-)resync propcess are also shown, as an icon + tooltip next to the affected items. Part of D10855.
2021-04-08LibOverride: Add a new 'leftover' flag to ID.Bastien Montagne
This flag is set for liboverride IDs that are detected as no longer needed by resync process, while having been user-edited, so auto-handling code cannot silently delete them. Exposing those to users will be part of the new incoming Override Outliner view. Part of D10855.
2021-04-08Cleanup: modernize-use-equals-defaultJacques Lucke
This was missing from rB19dfb6ea1f6745c0dbc2ce21839c30184b553878.
2021-04-08Cleanup: enable modernize-use-equals-default checkJacques Lucke
This removes a lot of unnecessary code that is generated by the compiler automatically. In very few cases, a defaulted destructor in a .cc file is still necessary, because of forward declarations in the header. I removed some defaulted virtual destructors, because they are not necessary, when the parent class has a virtual destructor already. Defaulted constructors are only necessary when there is another constructor, but the class should still be default constructible. Differential Revision: https://developer.blender.org/D10911
2021-04-08Fix T87267: Texture Paint stencil texture not drawingPhilipp Oeser
Typo in {rBafcfc6eb0842}. Maniphest Tasks: T87267 Differential Revision: https://developer.blender.org/D10915
2021-04-08Fix T87274: Curve 2D resets to 3D on reloadGermano Cavalcante
This code is incompatible with .blend files from subversion 16 and 17. The ideal would be to create a new subversion when landed rBf674976edd88. But for now, due to the delay, moving the code to the previous subversion can solve it.
2021-04-07Cleanup: Rename function, switch order of argumentsHans Goudey
The function name was not very specific, this makes it clearer that it works on instances rather than only real geometry. Also use `r_` prefix for the return argument.
2021-04-07Geometry Nodes: Rename grid output UV attributeHans Goudey
During review of D10730 it was discovered that the "uv" name causes issues for cycles, which uses it as a default internal data name. While that could be fixed in the future, there was no particular reason to use "uv" instead of "uv_map", so we use the latter instead here, which is consistent with the lowercase naming scheme chosen for attributes.
2021-04-07Geometry Nodes: Greatly improve speed of some mesh primitivesHans Goudey
Some of the BMesh primitive operators have a lot of overhead due to the fact that they use other operators like extrusion, removing doubles, and rotation, to build each shape rather than filling arrays directly. Implementing the primitives directly with the Mesh data structure is much more efficient, since it's simple to fill the result data based on the known inputs. It also allows also skip the conversion from BMesh to Mesh after the calculations. Speed matters more for procedural operations than for the existing operators accessible from the add menu, since they will be executed every evaluation rather than once before a destructive workflow. | Shape | Before (ms) | After (ms) | Speedup (x times faster) | | -------- | -------------| ------------| -------------------------| | Cylinder | 1.1676 | 0.31327 | 3.72 | | Cone | 4.5890 | 0.17762 | 25.8 | | Sphere | 64213.3 | 13.595 | 4720 | The downside of this change is that there will be two implementations for these three primitives, in these nodes and in `bmo_primitive.c`. One option would be re-implementing the BMesh primitives in terms of this code, but that would require `BMesh` to depend on `Mesh`, which is currently avoided. On the other hand, it will be easier to add new features to these nodes like different fill types for the top and the bottom of a cylinder, rings for a cylinder, and tagging the output with boolean attributes. Another factor to consider is that the add mesh object operator could be implemented with these nodes, just providing more benefit for a faster implementation. As a future cleanup, there is room to share code that generates the "rings" topology between different nodes that generate meshes. Differential Revision: https://developer.blender.org/D10730