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-25Animation: Equalize Handle OperatorKevin C. Burke
The Equalize Handles operator allows users to make selected handle lengths uniform: either respecting their original angle from the key control point or by flattening their angle (removing the overshoot sometimes produced by certain handle types). Design: T94172 Reviewed by: sybren Differential Revision: https://developer.blender.org/D13702
2022-01-25CMake/Linux: find Brotli library the proper waySybren A. Stüvel
Use a `FindBrotli.cmake` module instead of manually appending library paths. This is just for Linux; Windows and macOS will be reviewed separately.
2022-01-25Cleanup: Replace reinterp cast with static cast.Jeroen Bakker
Conversion of void* should not use the unsafe reinterp cast.
2022-01-25Fix (unreported) RNA setter for TextEditor's text ID pointer not ensuring ↵Bastien Montagne
real user.
2022-01-25Fix T95037: Allow making local IDs that are not used by anything.Bastien Montagne
Some IDs (like text ones) can be linked and only kept around thanks to editors, allow making such IDs local in `BKE_lib_id_make_local_generic`. Also refactor logic checking whether ID should be made directly local or copied into its own util function, so that we can remain sure all special-cases 'make local' code still uses the same logic here.
2022-01-25Geometry Nodes: Add description to curve handle input nodeHans Goudey
The "Relative" input isn't immediately obvious unless one is familar with that naming pattern, so an explicit description may be helpful.
2022-01-25Cleanup: Remove unused pixel buffer in read_render_tileJesse Yurkovich
A left over remnant from rB1a134c4c30a643ada1b9a7a037040b5f5c173a28 Differential Revision: https://developer.blender.org/D13901
2022-01-25Cleanup: Correct location of node function declarationsHans Goudey
Currently there are many function declarations in `BKE_node.h` that don't actually have implementations in blenkernel. This commit moves the declarations to `NOD_composite.h`, `NOD_texture.h`, and `NOD_shader.h` instead. This helps to clarify the purpose of the different modules. Differential Revision: https://developer.blender.org/D13869
2022-01-24LShaderInterface: Fix interface binding with UBO containing arraysClément Foucault
To avoid the issue we search using the name in the `name_buffer_` which already have the array suffix stripped out.
2022-01-24Tests: Enable new tests for geometry nodes extrude nodeHans Goudey
rB95981c9876483256b28
2022-01-24GLShaderInterface: Fix interface from createInfo not setting bindingsClément Foucault
This is because the `glUniform1i` calls were not preceeded by `glUseProgram` which made parameters not stick.
2022-01-24Fix T94355: Cycles wrong GPU bake with adaptive samplingBrecht Van Lommel
2022-01-24Add workaround for broken interface query functions on Intel HD Graphics ↵Clment Foucault
4400 and 4600 Fixes T93680 For current drivers of Intel HD Graphics 4400 and 4600, various Program Introspection functions appear broken and return incorrect values, causing crashes in the current handling of SSBOs. Disable use of this feature on those devices. Add checks to features that use SSBOs (Hair and Subdivision Modifier). Reviewed By: fclem, jbakker Maniphest Tasks: T93680 Differential Revision: https://developer.blender.org/D13806
2022-01-24GPU subdiv: reduce memory usage for point IBOKévin Dietrich
The point IBO should only have data for coarse vertices (or in general, the vertices in the original mesh). As it used for displaying the vertices for selection in edit mode, and as it indexes into the VBOs for the positions and edit data, it is itself only indexed by coarse/ original vertex index. For the subdivision case, this would allocate space for the final subdivision vertex and reallocate to make room for loose geometry, although only the first coarse vertex count amount of data would be. Now just allocate for the required memory. Also reuse index buffer APIs instead of doing manual work.
2022-01-24GPU subdiv: fix unitialized dataKévin Dietrich
2022-01-24Fix T95099: Have launcher wait for Blender exitJens Ehrhardt
unity launches blender in background mode to do some file conversions, ever since the launcher got introduced this process broke. The root cause here is: Unity looks up the default program to launch .blend files with, which is now the launcher, then launches it in background mode with a script to export the data. The launcher however was designed to exit as quickly as possible so there would not be an extra background process lingering. It does not wait for blender to exit and does not pass back any error codes. This broke unity's workflow since it assumed if the process exits and succeeds the data *must* be ready for reading which no longer holds true. This change keeps the launcher design as was previously, *except* when launching in background mode, then it waits and passes back any error codes, thus restoring unity's workflow. Differential Revision: https://developer.blender.org/D13894 Reviewed by: LazyDodo, Brecht
2022-01-24Cleanup: Move the "toggle smooth brush" functionality to functionsSebastian Parborg
This is so it will be easier to keep the logic to toggle on/off in sync because they are declared close to eachother.
2022-01-24Hook up invert and smooth mode to weight and vertex paintSebastian Parborg
Previously weight paint wasn't hooked up to the "Smooth" and "Invert" modes. With this patch it is not possible to use the "Smooth" and "Invert" modifiers for the draw keybindings. Reviewed By: Campbell Barton Differential Revision: http://developer.blender.org/D13857
2022-01-24Fix T94651: Cycles error with pointcloud vector attributeBrecht Van Lommel
2022-01-24Linux/CMake: link `libbbrotli*.a` along with new FreeTypeSybren A. Stüvel
Add `libbrotlidec-static.a` and `libbrotlicommon-static.a` to the CMake `$FREETYPE_LIBRARIES` variable; they'll be required when the Linux libs for the FreeType upgrade lands (D13448). The order of libraries is different compared to the similar lines in the Windows and Apple CMake files, to prevent linker errors on Linux.
2022-01-24Fix `Image.gl_touch` not loading image.Jeroen Bakker
Same fix as for {rBc09f61a9157ddee0e186db52fb7ac0f4cdae09da}
2022-01-24Cleanup: Remove unused enumGermano Cavalcante
The `SCULPT_TRANSFORM_DISPLACEMENT_INCREMENTAL` value is not actually being used. Keeping it in the code only complicates its readability.
2022-01-24GPUShaderCreateInfo: Add manual validation of bindpointsClément Foucault
Some drivers/glsl compilers will not warn about multiple resources using the same binding, creating silent errors. This patch checks for this case and outputs a descriptive error message if a particular createInfo merge error is founds. Other validation can be added later.
2022-01-24Cleanup: sort cmake file listsCampbell Barton
2022-01-24Cleanup: sort struct forward declarationsCampbell Barton
2022-01-24Cleanup: clang-formatCampbell Barton
2022-01-24Geometry Nodes: Extrude Mesh NodeHans Goudey
This patch introduces an extrude node with three modes. The vertex mode is quite simple, and just attaches new edges to the selected vertices. The edge mode attaches new faces to the selected edges. The faces mode extrudes patches of selected faces, or each selected face individually, depending on the "Individual" boolean input. The default value of the "Offset" input is the mesh's normals, which can be scaled with the "Offset Scale" input. **Attribute Propagation** Attributes are transferred to the new elements with specific rules. Attributes will never change domains for interpolations. Generally boolean attributes are propagated with "or", meaning any connected "true" value that is mixed in for other types will cause the new value to be "true" as well. The `"id"` attribute does not have any special handling currently. Vertex Mode - Vertex: Copied values of selected vertices. - Edge: Averaged values of selected edges. For booleans, edges are selected if any connected edges are selected. Edge Mode - Vertex: Copied values of extruded vertices. - Connecting edges (vertical): Average values of connected extruded edges. For booleans, the edges are selected if any connected extruded edges are selected. - Duplicate edges: Copied values of selected edges. - Face: Averaged values of all faces connected to the selected edge. For booleans, faces are selected if any connected original faces are selected. - Corner: Averaged values of corresponding corners in all faces connected to selected edges. For booleans, corners are selected if one of those corners are selected. Face Mode - Vertex: Copied values of extruded vertices. - Connecting edges (vertical): Average values of connected selected edges, not including the edges "on top" of extruded regions. For booleans, edges are selected when any connected extruded edges were selected. - Duplicate edges: Copied values of extruded edges. - Face: Copied values of the corresponding selected faces. - Corner: Copied values of corresponding corners in selected faces. Individual Face Mode - Vertex: Copied values of extruded vertices. - Connecting edges (vertical): Average values of the two neighboring edges on each extruded face. For booleans, edges are selected when at least one neighbor on the extruded face was selected. - Duplicate edges: Copied values of extruded edges. - Face: Copied values of the corresponding selected faces. - Corner: Copied values of corresponding corners in selected faces. **Differences from edit mode** In face mode (non-individual), the behavior can be different than the extrude tools in edit mode-- this node doesn't handle keeping the back- faces around in the cases that the edit mode tools do. The planned "Solidify" node will handle that use case instead. Keeping this node simpler and faster is preferable at this point, especially because that sort of "smart" behavior is not that predictable and makes less sense in a procedural context. In the future, an "Even Offset" option could be added to this node hopefully fairly simply. For now it is left out in order to keep the patch simpler. **Implementation** For the implementation, the `Mesh` data structure is used directly rather than converting to `BMesh` and back like D12224. This optimizes for large extrusion operations rather than many sequential extrusions. While this is potentially more verbose, it has some important benefits: First, there is no conversion to and from `BMesh`. The code only has to fill arrays and it can do that all at once, making each component of the algorithm much easier to optimize. It also makes the attribute interpolation more explicit, and likely faster. Only limited topology maps must be created in most cases. While there are some necessary loops and allocations with the size of the entire mesh, I tried to keep everything I could on the order of the size of the selection rather than the size of the mesh. In that respect, the individual faces mode is the best, since there is no topology information necessary, and the amount of work just depends on the size of the selection. Modifying an existing mesh instead of generating a new one was a bit of a toss-up, but has a few potential benefits: - Avoids manually copying over attribute data for original elements. - Avoids some overhead of creating a new mesh. - Can potentially take advantage of future ammortized mesh growth. This could be changed easily if it turns out to be the wrong choice. Differential Revision: https://developer.blender.org/D13709
2022-01-24Cleanup: Grammar: its self vs. itselfHans Goudey
2022-01-24Cleanup: spelling in commentsCampbell Barton
2022-01-24Cleanup: avoid positional struct initializationCampbell Barton
When moving to C++ field for initialization was removed. Favor assignments to field names as it reads better and avoids bugs if files are ever re-arranged as well as mistakes (see T94784). Note that the generated optimized output is identical with GCC11.
2022-01-23Geometry Nodes: Triangulate Node - Add Selection InputJohnny Matthews
This adds a selection field input to the node, faces that are selected and meet the minimum vertex count threshold will be triangulated. Differential Revision: https://developer.blender.org/D13804
2022-01-23Geometry Nodes: Relative Handle Position ModeJohnny Matthews
Add a boolean option to have the Curve Handle Position input node return the position of the handle relative to each point position. Differential Revision: https://developer.blender.org/D12947
2022-01-23Cleanup: separate function for Alembic edge crease readingKévin Dietrich
2022-01-23Fix Cycles crash collecting render statsKévin Dietrich
2022-01-23Cleanup: Improvements to mesh to bmesh conversionHans Goudey
- Use `Array` and `Span` instead of raw pointers. - Declare variables in smaller scope. - Use references instead of pointers.
2022-01-22Fix T94760: Crash building BMesh when opening fileHans Goudey
A large polygon in the file from the report caused `alloca` to exceed the maximum stack size, causing a crash. Instead of using `alloca`, use `blender::Array` with an inline buffer. Based on a patch by Germano Cavalcante (@mano-wii). Differential Revision: https://developer.blender.org/D13898
2022-01-22LineArt: Option to keep contour when using face mark filtering.YimingWu
When enabled, it will keep contour around the object instead of hide them by rule of face mark, so the object can always have full contour while filtering out some of the feature lines inside certain regions. Reviewed By: Antonio Vazquez (antoniov), Aleš Jelovčan (frogstomp) Differential Revision: https://developer.blender.org/D13847
2022-01-22LineArt: Back face cullingYimingWu
Option to discard back faced triangles, this speeds up calculation especially for when you only want to show visible feature lines. Reviewed By: Antonio Vazquez (antoniov), Aleš Jelovčan (frogstomp) Differential Revision: https://developer.blender.org/D13848
2022-01-22LineArt: Noise tolerant chaining.YimingWu
Instead of splitting it at each occlusion change, it tolerates short segments of "zig-zag" occlusion incoherence and doesn't split the chain at these points, thus creating a much smoother result. Reviewed By: Antonio Vazquez (antoniov), Aleš Jelovčan (frogstomp) Differential Revision: https://developer.blender.org/D13851
2022-01-22BMesh: merge normal and tessellation calculation on undoCampbell Barton
This gives a modest speedup as calculating tessellation and face normals at the same time can be more efficiently multi-threaded. Also avoids calculating face normals twice, oversight in d590e223daf6e20d462f2b197d32606d69873051.
2022-01-22Fix linking in debug modeCampbell Barton
b7878a4d457a59d4a42f8ac0f428ea336562d75a seems to have caused linking issues building debug mode on Linux. Using extern "C" resolves.
2022-01-22Cleanup: Move bmesh_mesh_convert.c to C++Hans Goudey
Useful for a simpler bug fix, code clarity, and easier possible optimizations in the future.
2022-01-22Fix T13879 new OBJ exporter not saving files with Unicode characters.Aras Pranckevicius
Need to use BLI_fopen instead of fopen.
2022-01-22Cleanup: Use references, const variablesHans Goudey
2022-01-22Curves: Improve accuracy and clarity of NURBS knots calculationLaurynas Duburas
This commit improves NURBS knot generation by adding proper support for the combination of the Bezier and cyclic options. In other cases the resulting knot doesn't change. This cyclic Bezier knot is used to create accurate accurate "Nurbs Circle", "Nurbs Cylinder" primitives. "Nurbs Sphere" and "Nurbs Torus" primitives are also improved by tweaking the spin operator. The knot vector in 3rd order NURBS curve with Bezier option turned on (without cyclic) is changed in comparison to previous calculations, although it doesn't change the curve shape itself. The accuracy of the of NURBS circle is fixed, which can be checked by comparing with mesh circle. Tessellation spacing differences in circular NURBS is also fixed, which is observable with the NURBS cylinder and sphere primitives. These were causing seam-like effects. This commit contains comments from Piotr Makal (@pmakal). Differential Revision: https://developer.blender.org/D11664
2022-01-22Fix T94974: Invalid normals in edit modeHans Goudey
Normal layers currently aren't stored in the undo step mesh storage, since they are not stored in files at all. However, the edit mesh expects normals to be fully calculated, and does not keep track of a dirty state. This patch updates the normals in the BMesh created by loading an undo step. Another option would be calculating the normals on the undo mesh first, which might be better if Mesh normal calculation is faster than BMesh calculation, but the preferred method to access vertex normals fails in this case, because the mesh runtime mutexes are not initialized for undo-state meshes. Differential Revision: https://developer.blender.org/D13859
2022-01-22Fix T94967: Sculpt mode crashes with missing normalsHans Goudey
From an error in rBcfa53e0fbeed, the vertex normals in `SculptSession` seem to be used, but in the case when no "pbvh" is used, the value of the pointer is never assigned. Normals were not generally dirty before this "ensure" function with regular sculpting operations, so this addition shouldn't have any cost. Differential Revision: https://developer.blender.org/D13854
2022-01-22Fix T95097: Attribute Capture node UI inconsistencyHans Goudey
All other nodes with data type and domain choices have the domain below the data type. Generally that order makes sense, because it's consistent with nodes that have no domain drop-down.
2022-01-22Fix: Applying object transform can create normal layersHans Goudey
Because this operator is used on original objects, it's best to tag the normals dirty instead of explicitly calculating them, to avoid unnecessarily storing normal layers on an original object (since they might have to be recalculated during evaluation anyway). There may be other places this change is helpful, but being conservative is likely better for now. Related to T95125
2022-01-21Build: update macOS for FreeType library with woff2 supportBrecht Van Lommel
Ref D13448, T93161