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
2022-01-20Revert "Sculpt: Multires Heal Brush"Joseph Eagar
This reverts commit ae349eb2d50524b030f702b8ed3fd75531d4db7e.
2022-01-20Subdivision: add support for vertex creasingKévin Dietrich
This adds vertex creasing support for OpenSubDiv for modeling, rendering, Alembic and USD I/O. For modeling, vertex creasing follows the edge creasing implementation with an operator accessible through the Vertex menu in Edit Mode, and some parameter in the properties panel. The option in the Subsurf and Multires to use edge creasing also affects vertex creasing. The vertex crease data is stored as a CustomData layer, unlike edge creases which for now are stored in `MEdge`, but will in the future also be moved to a `CustomData` layer. See comments for details on the difference in behavior for the `CD_CREASE` layer between egdes and vertices. For Cycles this adds sockets on the Mesh node to hold data about which vertices are creased (one socket for the indices, one for the weigths). Viewport rendering of vertex creasing reuses the same color scheme as for edges and creased vertices are drawn bigger than uncreased vertices. For Alembic and USD, vertex crease support follows the edge crease implementation, they are always read, but only exported if a `Subsurf` modifier is present on the Mesh. Reviewed By: brecht, fclem, sergey, sybren, campbellbarton Differential Revision: https://developer.blender.org/D10145
2022-01-20Cleanup: Remove incorrect commentHans Goudey
2022-01-20Sculpt: Multires Heal BrushJoseph Eagar
This brush fixes the random spikes that occasionally happen in multires models. These spikes can be nearly impossible to fix manually and can make working with multires a nightmare.
2022-01-20Cleanup: spelling in commentsCampbell Barton
2022-01-20Cleanup: clang-formatCampbell Barton
2022-01-20Cleanup: quiet ASAN warnings for divide by zero & NULL memcpy argsCampbell Barton
No functional changes as the inf value was never used & memcpy args were only NULL when the size to copy was zero.
2022-01-20Mesh RNA API: Expose contiguous normal arraysHans Goudey
Since vertex and face normals are now stored on the mesh when necessary, we can expose them as contiguous arrays of vectors in the Python API. This can give render engines and other addons easy access to they data for fast access through a regular collection property. While "Mesh Vertex" still has a "normal" property in RNA, that is only maintained in order to avoid breaking the existing API, and accessing it is less efficient than accessing the normals directly. I made the normal arrays read-only, because modifying them could put them in an invalid state. This is inline with how we treat the data internally, and helps keep relationships between data clear. Differential Revision: https://developer.blender.org/D13839
2022-01-20Cleanup doc comments for sculpt_intern.hJoseph Eagar
2022-01-19Fix: File Browser using asset indexer after Asset Browser was visibleJulian Eisel
When toggling to a File Browser from an Asset Browesr, the asset indexer would be used to load files. I couldn't spot issues with that on a quick look, but this should still be corrected.
2022-01-19Asset Browser: Add debug option to disable asset indexingJulian Eisel
Adds an "Asset Indexing" option (enabled by default) to Preferences > Experimental > Debugging. This is useful when working on the asset library loading.
2022-01-19Fix error in previous commitRichard Antalik
While doing last minute cleanup in e49bf4019b498be42b9a39657604ad750a99bbea, missed to rename function in one place.
2022-01-19VSE: Support copy-pasting strips with animationRichard Antalik
When copying strips between 2 scenes, it wasn't possible to copy animation curves along with strips. In this patch curves are copied into clipboard `ListBase`. When pasted, original curves are moved into temporary `ListBase` and curves in clipboard are moved into scene action. This is because when strips from clipboard have to be renamed, function `SEQ_ensure_unique_name()` does fix RNA paths of curves, but this is done globally for all curves within action. After strips are renamed, restore original curves from backup. Note: This patch handles only fcurves. Drivers and actions are currently not handled anywhere in VSE. Fixes T77530 Reviewed By: sergey Differential Revision: https://developer.blender.org/D13845
2022-01-19Cleanup: VSE animation handlingRichard Antalik
- Move functions that handle animation to own file - `animation.c` - Refactor `SEQ_offset_animdata` and `SEQ_free_animdata` functions - Add function `SEQ_fcurves_by_strip_get` to provide more granular and explicit way for operators to handle animation - Remove function `SEQ_dupe_animdata`, do curve duplication explicitly in operator code, which makes more sense to do. Further this function was also used for renaming strips which makes no sense. - Refactor usage of function `SEQ_free_animdata` and remove XXX comment. Now this functiuon is no longer called when `Sequence` data is freed implicitly, it is done explicitly in high level function `SEQ_edit_remove_flagged_sequences` Reviewed By: sergey Differential Revision: https://developer.blender.org/D13852
2022-01-19GPUShaderCreateInfo: Rework geometry shader layout supportClément Foucault
This merge the description into one struct only that can be more easily copied during `finalize()`. The in and out layout parameters are better named and extended with the invocation count (with fallback support)
2022-01-19Fix T94987: Dragged node links are invisible.Jeroen Bakker
Route cause was data alignment mismatch between GPU and CPU. This mismatch would not allow us to bind the UBO where data wasn't available on the GPU. Fixed by using float4 in stead of float2. This could eventually be packed, but that would lead to less readable code.
2022-01-19Fix T95039,T94998: Shaders compilation errors on Mac.Jeroen Bakker
Cause was incorrect logic when generating the resource layout. It the explicit_location_support setting was ignored and the binding were generated for image, uniform buffers and storage buffers.
2022-01-19BMesh: add mesh debug information printingCampbell Barton
- Add BM_mesh_debug_print & BM_mesh_debug_info. - Report flags in Mesh.cd_flag in BKE_mesh_debug_print - Move custom data printing into customdata.cc (noted as a TODO). Note that the term "runtime" has been removed from `BKE_mesh_runtime_debug_print` since these are useful for debugging any kind of mesh data.
2022-01-19BMesh: improve handling of custom-data flag (Mesh.cd_flag)Campbell Barton
Code that handled merging & initializing custom-data from other meshes sometimes missed checks for this flag, causing bevel weights to lost when the mesh was converted to a BMesh. The following changes are a more general fix for T94197. - Add BM_mesh_copy_init_customdata_from_mesh_array which initializes custom-data from multiple meshes at once. As well as initializing custom-data layers from Mesh.cd_flag. This isn't essential for boolean, however it avoids the overhead of resizing custom-data layers. - Loading mesh data into a BMesh now respects Mesh.cd_flag instead of only checking if the BMesh custom-data-layer exists. Without this, the order of meshes passed to BM_mesh_bm_from_me could give different (incorrect) results. - Copying mesh data now copies `cd_flag` too. This is a precaution as in my tests evaluating modifiers these values always matched. Nevertheless it's correct to copy this value as custom-data it's self is being copied.
2022-01-19Docs: notes on thumbnail sizesCampbell Barton
The rationale for storing thumbnails at different sizes wasn't obvious.
2022-01-19Fix flipped order of items in the "Undo History" menuCampbell Barton
Error in 0e1bb232e68ce71f4c3dd331ed6331665238a065.
2022-01-19Fix T94202: GPUFrameBuffer: wrong refcount in the buffer passed for ↵Germano Cavalcante
read_color and read_depth The buffer passed as an argument to `GPUFrameBuffer.read_color` is used in the return of the function and therefore, if not used, its refcount is decremented. So be sure to increment the refcount of the already existing objects that will be used in the return of a function.
2022-01-18Cleanup: Use references, LISTBASE_FOREACH macroHans Goudey
2022-01-18Fix T93413: Nodes 'Make Links' fails for multi input socketPhilipp Oeser
This was the case for multi input sockets that have a link already. Since we have multi input sockets, the way we use `socket_is_available` is not really giving the expected result on these. When used for input sockets the intention is to find a free socket (either for noodle **replacement**, then it is always available, or just the next free available socket). Now I would think without the intention to replace an existing link, a multi input socket should still be available. From the inside of the function, the `replace` argument turns [namewise] to `allow_used`, which sounds a little different (so one might argue that if `allow_used` is `False` this should also trigger for already connected multi input sockets). In the end, this is an issue with the variable naming though, cant think of a usecase where the patch change would really go against intentions. Maniphest Tasks: T93413 Differential Revision: https://developer.blender.org/D13866
2022-01-18Fix T95029: Arrow gizmo always uses normal directionGermano Cavalcante
Bug possibly introduced in {rBc57e4418bb85aec8bd3615fd775b990badb43d30}. Interestingly, the orientation set before (NORMAL), even different from the orientation that was actually used, was allowing the use of "orient_matrix" ("orient_matrix_type" should have been NORMAL in that case too). In any case, make sure the "orient_matrix_type" and "orient_type" are the same so that the "orient_matrix" is used.
2022-01-18Cleanup: Make node editor functions privateHans Goudey
These operations (sorting and selecting all nodes) should generally be handled by the node editor and not outside code. They were not called outside of the node editor, so they can be moved to the editor's `intern` header.
2022-01-18Cleanup: Remove unused node editor toolbar fileHans Goudey
This file was added nine years ago, and was unused then. Now with active tools we use a different approach to create toolbars, so the file is not relevant.
2022-01-18Fix warning from rB9925606539.Alexander Gavrilov
2022-01-18Geometry Nodes: new Field at Index nodeJacques Lucke
This node allows accessing data of other elements in the context geometry. It is similar to the Transfer Attribute node in Index mode. The main difference is that this node does not require a geometry input, because the context is used. The node can e.g. be used to generalize what the Edge Vertices node is doing. Instead of only being able to get the position of the vertices of an edge, any field/attribute can be accessed on the vertices. Differential Revision: https://developer.blender.org/D13825
2022-01-18Geometry Nodes: Add Signed Output to Edge Angle NodeJohnny Matthews
Adds a second output to the edge angle node that shows the signed angle between the two faces, where Convex angles are positive and Concave angles are negative. This calculation is slower than the unsigned angle, so it was best to leave both for times where the unsigned angle will suffice. Differential Revision: https://developer.blender.org/D13796
2022-01-18Geometry Nodes: improve domain interpolation codeJacques Lucke
It's now easier than before to do the interpolation of attributes only for the elements that are actually used in some cases. This can result in a speedup because unnecessary computations can be avoided. See the patch for a simple performance test. Differential Revision: https://developer.blender.org/D13828
2022-01-18Fix T95003: Shader issue using voronoi noise.Jeroen Bakker
Cause of the issue isn't that clear, but the NVIDIA GLSL compiler complained that it couldn't find an overloaded function when the second parameter is an interger. This change fixes it by using a float.
2022-01-18RNA: display exact integer values without fraction if step is integer.Alexander Gavrilov
Display exact integer values of a floating point fields without a fraction if the step is also an exact integer. This is intended for cases when the value can technically be fractional, but most commonly is supposed to be integer. This handling is not applied if the field has any unit except frames, because integer values aren't special for quantities like length. The fraction is discarded in the normal display mode and when copying the value to clipboard, but not when editing to remind the user that the field allows fractions. Differential Revision: https://developer.blender.org/D13753
2022-01-18UI: fix a precision issue with float field step size.Alexander Gavrilov
Fix a precision issue when stepping down from 1 to 0 via the left decrement button and step 100 results in a small nonzero value. The reason is that 0.01 can't be precisely represented in binary and converting to double before multiplication reveals this. Ref D13753
2022-01-18Cleanup: Avoid possible NULL pointer errorAntonio Vazquez
In normal conditions, `gpf` always has a value, but better move inside the NULL checking.
2022-01-18GPU: Create Info for GPU_SHADER_2D_IMAGE_MULTI_RECT_COLOR.Jeroen Bakker
This patch converts GPU_SHADER_2D_IMAGE_MULTI_RECT_COLOR shader to use the GPUShaderCreateInfo pattern. It can be used as a reference when converting other shaders. In this special case the flat uniform vector cannot be used anymore as it doesn't fit as push constants. To solve this a uniform buffer is used.
2022-01-18Fix T94977: muted link is not ignored in eeveeJacques Lucke
Add a preprocessing step that removes all muted links from the localized node tree. Differential Revision: https://developer.blender.org/D13864
2022-01-18Fix T95006: missing modifier update after frame changeJacques Lucke
The previous optimization did not work in general yet, unfortunately. This change makes the code more correct, but also brings back some unnecessary updates (e.g. when creating a node group).
2022-01-18Fix T94197: Applying boolean with fast solver clears bevel weightsCampbell Barton
For boolean operations only one of the meshes was checked to determine if bevel weights should be created. Now initialize custom data from both meshes flag. Note that this is a localized fix to be back-ported, further changes will be made so edit-mode conversion accounts for this without the caller needing explicit checks for custom-data flags.
2022-01-18Assets: Enabling Asset Indexing.Jeroen Bakker
Asset indexing was disabled as ID property indexing wasn't supported. Now that ID property support is added we can enable asset indexing. Check {T91406} for more information about asset indexing.
2022-01-18AssetsBrowser: Add ID Properties to Asset IndexerJeroen Bakker
Object/collection asset workflow would need the bounding box for snapping. The bounding box is stored using ID properties in the scene. Currently ID properties aren't stored in the asset index, what would break object snapping. For this reason Asset Indexing is turned off in mater. This patch will introduce the indexing of ID properties what will allow the indexing to be turned on again. ## Data Mapping ## For data mapping we store the internal structure of IDProperty to the indexer (including meta-data) to be able to deserialize it back. ``` [ { "name": .., "value": .., "type": .., /* `subtype` and `length` are only available for IDP_ARRAYs. */ "subtype": .., }, ] ``` | **DNA** | **Serialize type** | **Note** | | IDProperty.name | StringValue| | | IDProperty.type | StringValue| "IDP_STRING", "IDP_INT", "IDP_FLOAT", "IDP_ARRAY", "IDP_GROUP", "IDP_DOUBLE"| | IDProperty.subtype | StringValue| "IDP_INT", "IDP_FLOAT", "IDP_GROUP", "IDP_DOUBLE" | | IDProperty.value | StringValue | When type is IDP_STRING | | IDProperty.value | IntValue | When type is IDP_INT | | IDProperty.value | DoubleValue | When type is IDP_FLOAT/IDP_DOUBLE | | IDProperty.value | ArrayValue | When type is IDP_GROUP. Recursively uses the same structure as described in this section. | | IDProperty.value | ArrayValue | When type is IDP_ARRAY. Each element holds a single element as described in this section. | NOTE: IDP_ID and IDP_IDARRAY aren't supported. The entry will not be added. Example ``` [ { "name": "MyIntValue, "type": "IDP_INT", "value": 6, }, { "name": "myComplexArray", "type": "IDP_ARRAY", "subtype": "IDP_GROUP", "value": [ [ { "name": .. .... } ] ] } ] ``` ## Considered alternatives ## - Add conversion functions inside `asset_indexer`; makes generic code part of a specific solution. - Add conversion functions inside `BLI_serialize`; would add data transformation responsibilities inside a unit that is currently only responsible for formatting. - Use direct mapping between IDP properties and Values; leads to missing information and edge cases (empty primitive arrays) that could not be de-serialized. Reviewed By: Severin, mont29, HooglyBoogly Maniphest Tasks: T92306 Differential Revision: https://developer.blender.org/D12990
2022-01-18Allow overriding motion path settings.Alexander Gavrilov
Motion paths themselves aren't getting saved (not sure if they are without overrides), but being able to override options makes them usable even if it's necessary to regenerate every edit session. Differential Revision: https://developer.blender.org/D13842
2022-01-18CMake: Fix using numpy variable for the zstandard pathCampbell Barton
Copy paste error in a5917175d8c1a7cab83b401ae2f4affcd4ab8df4.
2022-01-18Fix obj exporter tests by deduping normals and printing with less precision.Howard Trickey
Some new obj exporter tests were disabled because the normals were different in the last decimal place on different platforms. The old python exporter deduped normals with their coordinates rounded to four decimal places. This change does the same in the new exporter. On one test, this produced a file 25% smaller and even ran 10% faster.
2022-01-18Cleanup: spelling in commentsCampbell Barton
2022-01-18Cleanup: move docs to definitionCampbell Barton
2022-01-18Cleanup: quite old-style-declaration warning, strip trailing spaceCampbell Barton
2022-01-18BLI: Add index_range method to VectorSetHans Goudey
This can simplify iterating through all of the indices in the vector, which is fairly common, since one of the benefits of the data structure is that all values are contiguous.
2022-01-18Geometry Nodes: Set Handle Type Node: Left and right by defaultHans Goudey
This node's UI uses a multi-select enum to allow adjusting the type of both handle sides with the same node. Since usually the user wants to affect both handles, and it's the multi-select behavior isn't obvious, selecting both by default is an improvement.
2022-01-17Fix T94715: multiple volumes using the same .vdb causes freezeBrecht Van Lommel
Needs more TBB task isolation, as even freeing an OpenVDB grid uses multithreading.