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-08-31Curves: Avoid unnecessarily initializing new positions layerHans Goudey
When creating a curves data-block, one is expected to set the new position values. We can slightly improve performance by avoiding doing that redundantly. Similar to cccc6d6905be7ac32cb.
2022-08-31Attributes: Avoid unnecessarily initializing new attributesHans Goudey
The "write_only" (i.e. no reading) API function expects the caller to set values for all new attribute elements, so using calloc or setting the default value first is redundant. In theory this can improve performance by avoiding an extra pass over the array. I observed a 6% improvement in a basic test with the mesh to points node: from 47.9ms to 45ms on average. See 25237d2625078c6d for more info. Similar to cccc6d6905be7ac.
2022-08-31Mesh: Avoid redundant custom data layer initializationHans Goudey
In all these cases, it was clear that the layer values were set right after the layer was created anyway. So there's no point in using calloc or setting the values to zero first. See 25237d2625078c6d for more info.
2022-08-30Merge branch 'blender-v3.3-release'Hans Goudey
2022-08-30Fix: Potential name clash when adding rest position attributeHans Goudey
If a "rest_position" attribute already existed, potentiall with another type, the next name "rest_position.001" would be used, which might even conflict with a name on another domain. Use the C++ attribute API instead, which has more standard/predictable behavior.
2022-08-30Cleanup: Use C++ attribute APIHans Goudey
2022-08-30Cleanup: Use standard variable name for curve pointsHans Goudey
2022-08-30GPUBatch: Add multi_draw_indirect capability and indirect buffer offsetClément Foucault
This is for completion and to be used by the new draw manager.
2022-08-30GPUTexture: Add type correct GPU_SAMPLER_MAX constant for C++Clément Foucault
This avoid having to cast when using it in `.cc` and `.hh` files.
2022-08-30GPUMaterial: Expose debug name getterClément Foucault
This also makes it mandatory, but reduced length for release.
2022-08-30GPUCodegen: Do not rely on auto resource locationClément Foucault
This allows the render engine to expect non-overlapping resources in the generated create info. Textures are indexed from 0 and up. Nodetree ubo is bound to slot 0. Uniform attributes ubo is bound to slot 1.
2022-08-30GPUBatch: Add draw parameter getterClément Foucault
This is used to populate indirect draw commands in the draw manager.
2022-08-30GPUStorageBuf: Add `read()` function to readback buffer data to hostClément Foucault
This is not expected to be fast. This is only for inspecting the content of the buffer for debugging or validation purpose.
2022-08-30Attributes: Improve custom data initialization optionsHans Goudey
When allocating new `CustomData` layers, often we do redundant initialization of arrays. For example, it's common that values are allocated, set to their default value, and then set to some other value. This is wasteful, and it negates the benefits of optimizations to the allocator like D15082. There are two reasons for this. The first is array-of-structs storage that makes it annoying to initialize values manually, and the second is confusing options in the Custom Data API. This patch addresses the latter. The `CustomData` "alloc type" options are rearranged. Now, besides the options that use existing layers, there are two remaining: * `CD_SET_DEFAULT` sets the default value. * Usually zeroes, but for colors this is white (how it was before). * Should be used when you add the layer but don't set all values. * `CD_CONSTRUCT` refers to the "default construct" C++ term. * Only necessary or defined for non-trivial types like vertex groups. * Doesn't do anything for trivial types like `int` or `float3`. * Should be used every other time, when all values will be set. The attribute API's `AttributeInit` types are updated as well. To update code, replace `CD_CALLOC` with `CD_SET_DEFAULT` and `CD_DEFAULT` with `CD_CONSTRUCT`. This doesn't cause any functional changes yet. Follow-up commits will change to avoid initializing new layers where the correctness is clear. Differential Revision: https://developer.blender.org/D15617
2022-08-30BLF: Fallback Stack Error HandlingHarley Acheson
Properly handle invalid fonts. See D15798 for more details Differential Revision: https://developer.blender.org/D15798 Reviewed by Brecht Van Lommel
2022-08-30Merge branch 'blender-v3.3-release'Philipp Oeser
2022-08-30Fix T93084: Area stretch overlay full red on large scale meshPhilipp Oeser
Issue arises when face areas are really large combined with small UV areas (report has a mesh ~1.5 km), then precission of shorts is insufficient. Now use floats instead. This also removes this negative signed version of the total area ratio (since with floats it is no longer used). Thx @brecht for a lot of hand-holding! NOTE: this is an alternative to D15805 (and quick tests show this does not introduce the tiny performance hit as D15805 did). Maniphest Tasks: T93084 Differential Revision: https://developer.blender.org/D15810
2022-08-30Fix: Build error on windowsHans Goudey
2022-08-30Fix build error from missing includeHans Goudey
2022-08-30Geometry Nodes: Use separate field context for each geometry typeHans Goudey
Using the same `GeometryComponentFieldContext` for all situations, even when only one geometry type is supported is misleading, and mixes too many different abstraction levels into code that could be simpler. With the attribute API moved out of geometry components recently, the "component" system is just getting in the way here. This commit adds specific field contexts for geometry types: meshes, curves, point clouds, and instances. There are also separate field input helper classes, to help reduce boilerplate for fields that only support specific geometry types. Another benefit of this change is that it separates geometry components from fields, which makes it easier to see the purpose of the two concepts, and how they relate. Because we want to be able to evaluate a field on just `CurvesGeometry` rather than the full `Curves` data-block, the generic "geometry context" had to be changed to avoid using `GeometryComponent`, since there is no corresponding geometry component type. The resulting void pointer is ugly, but only turns up in three places in practice. When Apple clang supports `std::variant`, that could be used instead. Differential Revision: https://developer.blender.org/D15519
2022-08-30Merge branch 'blender-v3.3-release'Hans Goudey
2022-08-30Fix T99253: Missing face center dots with deform modifier cage optionHans Goudey
Before 8c25889bb67db4c, subsurf face center tags were stored in each vertex, so they were always copied to duplicate meshes. Now they are stored in runtime data though, so they need to be copied explicitly. The function name "reset_on_copy" is a bit awkward here, so the tags are copied by the caller.
2022-08-30GPencil: Improve Thickness handling for Outline operatorAntonio Vazquez
Actually, when you increase the thickness of the stroke in the outline conversion, the shape of the stroke changes and becomes thicker. This commit includes a new algorithm to correct this problem. A new `Keep Shape` parameter allows you to disable it because, for artist reasons, it may be good to keep the old algorithm and change the shape.
2022-08-30Merge branch 'blender-v3.3-release'Bastien Montagne
2022-08-30LibOverride: Minor resync optimization by removing unuecessary processing.Bastien Montagne
Not much to gain here, but can make resync faster by a few percents when dealing with linked overrides and such.
2022-08-30Cleanup: Remove one level of indentation by early continue in a loop.Bastien Montagne
2022-08-30Fix T100586: libOverride resync could remove too many data-blocks.Bastien Montagne
Do not delete 'orphaned' overrides when their reference is missing because the library file itself is missing.
2022-08-30Cleanup: simplify comparison, clarify commentCampbell Barton
2022-08-30Merge branch 'blender-v3.3-release'Campbell Barton
2022-08-30Fix error in operator poll functionsCampbell Barton
- PALETTE_OT_color_add: crashed without a brush. - SCREEN_OT_actionzone: crashed without a window. - PREFERENCES_OT_studiolight_show: exception when opening prefs failed.
2022-08-30Merge branch 'blender-v3.3-release'Jacques Lucke
2022-08-30Cleanup: Avoid misleading Outliner tree element callback nameJulian Eisel
These functions used the term "find", which makes it sound like a lookup callback, when in fact it would add elements to a set for further processing. So use "collect" instead.
2022-08-30Fix T100673: crash when using slide brush without attachment infoJacques Lucke
The slide brush requires attachment information on the curves. Now a warning is shown instead of crashing Blender. The attachment information can be generated by executing the `Curves > Snap to Nearest Surface` operator.
2022-08-30Merge branch 'blender-v3.3-release'Campbell Barton
2022-08-30Fix T100703: Crash in file reading with ID's referenced from the WMCampbell Barton
Don't decrement ID reference counts as any ID references from the window-managers will have already been freed. Reviewed By: mont29 Ref D15808
2022-08-30EEVEE-Next: Register render passes for compositor.Jeroen Bakker
EEVEE-Next passes were rendered to the render result, but didn't appear in the compositor. Reasoning is that when a render engine has the update render passes callback registered it would not register any default render passes. This callback is used to update the Render Layer node. This patch implements the callback for EEVEE-Next with the render passes that are already available. In the future the callback should be extended. Note that AO/SHADOW render passes have been disabled for now as they need to be converted to color buffers.
2022-08-30GPencil: Rename in Outline operator `mode` with `material_mode`Antonio Vazquez
The old name `mode` was confusing because there was also a `view_mode`.
2022-08-30GPencil: Add `thickness` parameter to Outline operatorAntonio Vazquez
Instead to use always a value of 1, now the thickness of the stroke perimeter can be set. This thickness is added to the original perimeter, so using a big number can increase the global thickness of the stroke.
2022-08-30Cleanup: spelling in commentsCampbell Barton
2022-08-30Cleanup: formatCampbell Barton
2022-08-30Cleanup: Remove misleading std::string reference bindingHans Goudey
These functions that retrieve strings from assets return stringrefs. Storing them as std::strings is unnecessary and relies on binding to the const references.
2022-08-30Cleanup: Use const for custom data layersHans Goudey
2022-08-30Sculpt: Avoid creating mask and face set when remeshingHans Goudey
If these layers didn't exist on the original mesh, they would be created from scratch and transferred anyway. That is inefficient because all the work is pointless, and because creating these layers could slow down subsequent sculpt operations.
2022-08-29Merge branch 'blender-v3.3-release'Hans Goudey
2022-08-29Fix: Broken build with OpenVDB turned offHans Goudey
Problem with e3a6a2f41284f90b010.
2022-08-29Fix T99576: Guard against empty names when removing attributesTom Edwards
It's possible for misbehaving scripts written before 3.3 to reach this state and crash Blender. With this change, the error is reduced to a Python exception. Differential Revision: https://developer.blender.org/D15724
2022-08-29Fix T98968: Node reroute tool doesn't add to framesPratik Borhade
If reroute node lies in side the frame node boundaries then set frame node as the parent of reroute. Differential Revision: https://developer.blender.org/D15739
2022-08-29Fix T98968: Node reroute tool doesn't add to framesPratik Borhade
If reroute node lies in side the frame node boundaries then set frame node as the parent of reroute. Differential Revision: https://developer.blender.org/D15739
2022-08-29Cleanup: move Cycles display driver context handling to render moduleBrecht Van Lommel
This is highly coupled to Blender logic so doesn't belong in Cycles.
2022-08-29Cleanup: move part of render module to C++Brecht Van Lommel