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
2022-01-17GPUShaderCreateInfo for interface abstractionJeroen Bakker
This is a first part of the Shader Create Info system could be. A shader create info provides a way to define shader structure, resources and interfaces. This makes for a quick way to provide backend agnostic binding informations while also making shader variations easy to declare. - Clear source input (only one file). Cleans up the GPU api since we can create a shader from one descriptor - Resources and interfaces are generated by the backend (much simpler than parsing). - Bindings are explicit from position in the array. - GPUShaderInterface becomes a trivial translation of enums and string copy. - No external dependency to third party lib. - Cleaner code, less fragmentation of resources in several libs. - Easy to modify / extend at runtime. - no parser involve, very easy to code. - Does not hold any data, can be static and kept on disc. - Could hold precompiled bytecode for static shaders. This also includes a new global dependency system. GLSL shaders can include other sources by using #pragma BLENDER_REQUIRE(...). This patch already migrated several builtin shaders. Other shaders should be migrated one at a time, and could be done inside master. There is a new compile directive `WITH_GPU_SHADER_BUILDER` this is an optional directive for linting shaders to increase turn around time. What is remaining: - pyGPU API {T94975} - Migration of other shaders. This could be a community effort. Reviewed By: jbakker Maniphest Tasks: T94975 Differential Revision: https://developer.blender.org/D13360
2022-01-17Fix T94805: Library weak reference generates "path not found" reports.Bastien Montagne
No reason to handle those paths here, those are fully internal temp data, user should not be exposed to it currently.
2022-01-17Core: Library Remap test cases.Jeroen Bakker
For an upcoming refactoring of library remapping we want to be able to test if the logic won't change. It also increased my experience inside the remapping codebase and find out what exactly needed to be refactored. This patch adds test cases for the core functionality of `foreach_libblock_remap_callback`. The test cases don't cover of all the branches. Also pre-, post-processing, referencing and proxies are not tested. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D13815
2022-01-17LineArt: Invert collection option.YimingWu
Allows conveniently selecting an inverse of a collection. Reviewed By: Antonio Vazquez (antoniov) Differential Revision: https://developer.blender.org/D13846
2022-01-17Geometry Nodes: Improve conversion from NURBS to BezierPiotr Makal
This patch improves conversion method from NURBS to Bezier curves, resulting in exact shape between those two types when provided with a 3rd degree NURBS curve. Part of T86086. See the differential revision for more comparisons. The node still cannot account properly for a NURBS "order" other than 4 and it does not take into account control point weights. Differential Revision: https://developer.blender.org/D13546
2022-01-17Fix T94526: Incorrect workspace ordering tooltipAlaska
Fix the description for WORKSPACE_OT_reorder_to_back to say "last" in list rather than "first" See D13696 for more details. Differential Revision: https://developer.blender.org/D13696 Reviewed by Aaron Carlisle
2022-01-16Cleanup: simplify parametersGermano Cavalcante
Use a common `userdata` for the different snap callbacks.
2022-01-16Fix T94951: Crash when snappingGermano Cavalcante
Missed in {rBd9c6ceb3b88b6db87490b08e0089f9a18e6c52d6}
2022-01-16Fix T94865: GPU subdiv crash switching to texpaint areaKévin Dietrich
The crash is due to the fact that GPU subdivision extraction routines for edit data (including UVs) only worked for BMesh. However, a Mesh based version is still needed for texture painting. This adds the missing components. This also ensures all data are properly initialized (at least the ones revealed by the bug).
2022-01-16Cleanup: deduplicate GPU subdiv data extraction loopsKévin Dietrich
This puts the loop over the final subdivision quads outside of the mesh iteration callback. This can also allow for easier parallel execution in the future if need be.
2022-01-15Fix T94918: GPU subdivision uses viewport levels for final renderKévin Dietrich
The resolution for the subdivision grid traversal was always based on the viewport setting.
2022-01-15Geometry Nodes: Rename transfer attribute geometry inputHans Goudey
Conceptually, this is the geometry that data is taken from, not the target of an operation, so rename it from "Target" to "Source". This was common user feedback and agreed on in a recent sub-module meeting.
2022-01-15Fix T94852: Geometry Proximity crash when unsuccessfulHans Goudey
Before rB644e6c7a3e99ae1d43ed, `fill` was used in the error cases, but now `fill_indices` is used, which doesn't work when the span is empty (when only one output is used). The fix is just to check for that case.
2022-01-14Nodes: Support link-drag search with compare node outputsHans Goudey
The search list only displayed the "Result" output socket in this case, which is unexpected since dragging from an input gives the operations in the list as well. Also use integer mode when connecting to boolean sockets.
2022-01-14Cleanup: Remove unused subdiv functionsHans Goudey
I noticed these when doing final cleanup on rBcfa53e0fbeed. One use was removed in that commit, the others were unused going further back a few years. Differential Revision: https://developer.blender.org/D13834
2022-01-14Fix possible build error with unity buildAaron Carlisle
`NodeOperationBuilder::Link` could conflict with the list base macros. To resolve this dont use `using Link`.
2022-01-14Cleanup: Outliner function names, simplify struct initializationJulian Eisel
2022-01-14Fix incorrect destruction of Outliner tree-elementsJulian Eisel
`TreeElement` isn't a trivial type anymore, so `MEM_delete()` should be called, which calls the destructor. AFAICS this would cause a memory leak, since the contained `unique_ptr` is allocated but not destructed correctly - but it's not using the guarded allocator so woudn't be reported.
2022-01-14Cleanup: Use destructor to delete Outliner runtime dataJulian Eisel
Simplifies and makes things safer due to proper RAII usage.
2022-01-14Cleanup: Use smart pointers for Outliner tree display and element typesJulian Eisel
Smart pointers should be the default choice for C++ owning pointers, since they let you manage memory using RAII. Also moved type factory methods into static class functions.
2022-01-14Cleanup: Remove Outliner C-API headers/wrappersJulian Eisel
Basically this removes any C <-> C++ glue code. C++ types are accessed directly via the public C++ APIs. Contains some related changes like, moving functions that were previously declared in a now removed header to a different file, whose header is the more appropriate place (and the source file as well). But generally I tried to avoid other changes.
2022-01-14Disable some failing new obj exporter tests.Howard Trickey
The switch to how normals are kept has led to tiny differences in the normal output values on different platforms. Disabling the failing tests while working on a solution to this problem.
2022-01-14Fix T94784: Crop node gizmo doesn't workSebastian Parborg
Fix refactoring mistake in rBcbca71a7cff3 Not the min and max values are initialized properly.
2022-01-14blenlib Any tests: Fix unknown pragma warning on Windows.Ankit Meel
Part of a5cb7c1e62a07c17e346278b1c4e9ea58c9f54e0 is reverted since it created unknown pragma warning on windows. Use a trick to do self-assigning. Reviewed by Jacques Lucke in chat.
2022-01-14Cleanup: Unused functionSergey Sharybin
2022-01-14Cleanup: Remove unused functionsSergey Sharybin
2022-01-14Fix T: Crash in do-version of older pre-2.80 blender files.Bastien Montagne
`BKE_layer_collection_sync` was missing a specific handling for one of those pre-master collection cases, NOTE: It is a bit unfortunate to have to do 'do-version' code in BKE... At some point might look into moving this into actual `do_version` file, but this is not fully trivial not critical improvement for now.
2022-01-14Fix T94827: Group Input/Output cannot connect to custom socketsPhilipp Oeser
Caused by rBa5c59fb90ef9. Since Group Input and Output sockets happen to be of type `SOCK_CUSTOM` [and since rBa5c59fb90ef9 custom py defined sockets are too :)] a check introduced in rB513066e8ad6f that prevents connections for `SOCK_CUSTOM` triggered. Now refine the check, so it specifically looks for NODE_GROUP_INPUT / NODE_GROUP_OUTPUT, too (this keeps the intention intact to not connect group inputs to group outputs and vice versa, but allows custom py defined sockets to connect again) and put it in new utility function. Maniphest Tasks: T94827 Differential Revision: https://developer.blender.org/D13817
2022-01-14Cleanup split foreach_libblock_remap_callback into smaller functions.Jeroen Bakker
2022-01-14Fix: Compilation error caused by missing target relationRay Molenkamp
bf_nodes/bf_nodes_composite depend on DNA headers
2022-01-14Cleanup: compiler warnings with clangBrecht Van Lommel
2022-01-14blenlib/ Any tests: fix self-assignment warning and typoAnkit Meel
Fix assignment warning source/blender/blenlib/tests/BLI_any_test.cc:56:5: warning: explicitly assigning value of variable of type 'blender::Any<void, 8, 8>' to itself [-Wself-assign-overloaded] c = c; Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D13835
2022-01-14Fix T94878: LineArt crease threshold logic error.YimingWu
A coding mistake allows default crease to override object crease, now fixed.
2022-01-14Fix T94089: GPencil Drawing don't Update after paste in DopesheetAntonio Vazquez
When paste new frames, the datablock need to be tagged to update the drawings.
2022-01-14Fix T94903: GPencil: Copying keys doesn't preserve Keyframe TypeAntonio Vazquez
When a new frame is created, ensure the keytype of source key is used.
2022-01-14Cleanup: move attribute operators to c++Jacques Lucke
2022-01-14Fix T94867: viewport render not updating when editing color rampJacques Lucke
The changed node wasn't tagged correctly.
2022-01-14Cleanup: Fix warning when compiling without AudaspaceJulian Eisel
2022-01-14Fix T94837: curve tilt on a 2-point-curve is wrongPhilipp Oeser
2-point-curves are treated separately from 3plus-point-curves (assume a lot of the twisting reduction can be skipped, so there is a dedicated function for single segment curves). And while using the 3plus-point-curves function [`make_bevel_list_3D`] would actually work in this case, the dedicated function `make_bevel_list_segment_3D` would only consider the tilt of the second point and would just copy over the quat to the first point as well. Dont see a reason for this, now consider the first point's tilt as well. Maniphest Tasks: T94837 Differential Revision: https://developer.blender.org/D13813
2022-01-14Cleanup: Reduce indentation in foreach_libblock_remap_callback.Jeroen Bakker
2022-01-14Cleanup: spelling in comments, C++ style comments for disabled codeCampbell Barton
Also ensure space at end of comment.
2022-01-14Fix crash caused by exception in Python gizmo target get handlerCampbell Barton
2022-01-14Cleanup: Clang tidyHans Goudey
- modernize-deprecated-headers - modernize-use-using - modernize-use-nullptr - modernize-use-bool-literals
2022-01-14Fix: Incorrect logic in mesh validation for removing layersHans Goudey
The mask is only used if it's not zero. Adding the normal mask made it not zero, but it didn't include anything else, so all custom data layers except normals were removed. The fix is to only add normals to the mask when it should be used.
2022-01-13Refactor: Move normals out of MVert, lazy calculationHans Goudey
As described in T91186, this commit moves mesh vertex normals into a contiguous array of float vectors in a custom data layer, how face normals are currently stored. The main interface is documented in `BKE_mesh.h`. Vertex and face normals are now calculated on-demand and cached, retrieved with an "ensure" function. Since the logical state of a mesh is now "has normals when necessary", they can be retrieved from a `const` mesh. The goal is to use on-demand calculation for all derived data, but leave room for eager calculation for performance purposes (modifier evaluation is threaded, but viewport data generation is not). **Benefits** This moves us closer to a SoA approach rather than the current AoS paradigm. Accessing a contiguous `float3` is much more efficient than retrieving data from a larger struct. The memory requirements for accessing only normals or vertex locations are smaller, and at the cost of more memory usage for just normals, they now don't have to be converted between float and short, which also simplifies code In the future, the remaining items can be removed from `MVert`, leaving only `float3`, which has similar benefits (see T93602). Removing the combination of derived and original data makes it conceptually simpler to only calculate normals when necessary. This is especially important now that we have more opportunities for temporary meshes in geometry nodes. **Performance** In addition to the theoretical future performance improvements by making `MVert == float3`, I've done some basic performance testing on this patch directly. The data is fairly rough, but it gives an idea about where things stand generally. - Mesh line primitive 4m Verts: 1.16x faster (36 -> 31 ms), showing that accessing just `MVert` is now more efficient. - Spring Splash Screen: 1.03-1.06 -> 1.06-1.11 FPS, a very slight change that at least shows there is no regression. - Sprite Fright Snail Smoosh: 3.30-3.40 -> 3.42-3.50 FPS, a small but observable speedup. - Set Position Node with Scaled Normal: 1.36x faster (53 -> 39 ms), shows that using normals in geometry nodes is faster. - Normal Calculation 1.6m Vert Cube: 1.19x faster (25 -> 21 ms), shows that calculating normals is slightly faster now. - File Size of 1.6m Vert Cube: 1.03x smaller (214.7 -> 208.4 MB), Normals are not saved in files, which can help with large meshes. As for memory usage, it may be slightly more in some cases, but I didn't observe any difference in the production files I tested. **Tests** Some modifiers and cycles test results need to be updated with this commit, for two reasons: - The subdivision surface modifier is not responsible for calculating normals anymore. In master, the modifier creates different normals than the result of the `Mesh` normal calculation, so this is a bug fix. - There are small differences in the results of some modifiers that use normals because they are not converted to and from `short` anymore. **Future improvements** - Remove `ModifierTypeInfo::dependsOnNormals`. Code in each modifier already retrieves normals if they are needed anyway. - Copy normals as part of a better CoW system for attributes. - Make more areas use lazy instead of eager normal calculation. - Remove `BKE_mesh_normals_tag_dirty` in more places since that is now the default state of a new mesh. - Possibly apply a similar change to derived face corner normals. Differential Revision: https://developer.blender.org/D12770
2022-01-13Fix/workaround MSVC compile error with messag-busJulian Eisel
Some of the message-bus macros are not safe to use in C++. This has come up before, but no good solution was found. Now @LazyDodo, @HooglyBoogly and I concluded this is the best duct tape "solution" for the moment. The message-bus API should address this.
2022-01-13Cleanup: Run `make format`Julian Eisel
2022-01-13Fix compilation error caused by missing target relationRay Molenkamp
compositor depends on DNA now so that it can access offsets.
2022-01-13Geometry Nodes: Rename String to Curves socketErik
Today many users seem to think the output from this node is a single curve with multiple splines. This patch renames the geometry output socket from "Curves" to "Curve Instances" to avoid confusion. Differential Revision: https://developer.blender.org/D13693
2022-01-13Fix compilation error caused by missing target relationSergey Sharybin
Space clip depends on DNA now so that it can access offsets.