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-09-03Cleanup: use more standard variable name for node socketsHans Goudey
2022-09-02UI: 3D Text CaretHarley Acheson
Changes to the text caret (cursor) when editing Text objects in the 3D Viewport. See D15797 for more details and examples. Differential Revision: https://developer.blender.org/D15797 Reviewed by Brecht Van Lommel
2022-09-02Merge branch 'blender-v3.3-release'Hans Goudey
2022-09-02Fix T100768: Reverse curves skips handles of middle Bezier pointsHans Goudey
Reversing Bezier handle types and positions would skip the middle point of curves with an odd number of segments, which is still necessary to swap in order to avoid changing the curve's shape.
2022-09-02Cleaunp: Reorder GPencil function parametersAntonio Vazquez
It's better to keep stroke as first parameter.
2022-09-02GPencil: Simplify Perimeter functions to not use RegionView3DAntonio Vazquez
This makes the api more portable and not depend on any visual area for background tasks like future modifiers.
2022-09-01Fix: Use of deprecated field in legacy MFace conversionHans Goudey
The material indices have been moved out of MPoly since f1c0249f34c4171. That conversion happens in file reading code currently, so the material indices have to be accessed the new way everywhere.
2022-09-01Fix: Incorrect vertex group layer "construct" callbackHans Goudey
The "set default" callback doesn't need to be defined since it falls back to clearing the memory, but since "construct" is optional, it needs to be defined. Mistake in 25237d2625078c6d1.
2022-09-01Cleanup: Remove/replace View Layer macros.Monique Dewanchand
This patch is a cleanup required before refactoring the view layer syncing process {T73411}. * Remove FIRSTBASE. * Remove LASTBASE. * Remove BASACT. * Remove OBEDIT_FROM_WORKSPACE. * Replace OBACT with BKE_view_layer_active_object. * Replace OBEDIT_FROM_VIEW_LAYER with BKE_view_layer_edit_object. Reviewed By: mont29 Maniphest Tasks: T73411 Differential Revision: https://developer.blender.org/D15799
2022-08-31Mesh: Remove unnecessary copy in modifier stackHans Goudey
These few lines making a copy of the final mesh were confusing. The goal (I'm fairly certain) is to make sure the cage mesh and final mesh aren't shared when applying the vertex coordinates to the final mesh. This can be done more simply though, in a way that avoids duplicating the final mesh if it already isn't shared. This works well in some basic tests with different modifiers. Though I doubt it was really a bottleneck anywhere, simplifying the modifier stack internals is always nice. Differential Revision: https://developer.blender.org/D15814
2022-08-31Merge branch 'blender-v3.3-release'Joseph Eagar
2022-08-31Cleanup: fix warnings from vcol limit commitJoseph Eagar
2022-08-31Fix: crash on undo due to missing node declarationJacques Lucke
This was broken in {rB25e307d725d0b924fb0e87e4ffde84f915b74310}.
2022-08-31Merge branch 'blender-v3.3-release'Joseph Eagar
2022-08-31Core: Remove color attribute limit from CustomData APIJoseph Eagar
Note: does not fix the limit in PBVH draw which is caused by VBO limits not MAX_MCOL.
2022-08-31Mesh: Move material indices to a generic attributeHans Goudey
This patch moves material indices from the mesh `MPoly` struct to a generic integer attribute. The builtin material index was already exposed in geometry nodes, but this makes it a "proper" attribute accessible with Python and visible in the "Attributes" panel. The goals of the refactor are code simplification and memory and performance improvements, mainly because the attribute doesn't have to be stored and processed if there are no materials. However, until 4.0, material indices will still be read and written in the old format, meaning there may be a temporary increase in memory usage. Further notes: * Completely removing the `MPoly.mat_nr` after 4.0 may require changes to DNA or introducing a new `MPoly` type. * Geometry nodes regression tests didn't look at material indices, so the change reveals a bug in the realize instances node that I fixed. * Access to material indices from the RNA `MeshPolygon` type is slower with this patch. The `material_index` attribute can be used instead. * Cycles is changed to read from the attribute instead. * BMesh isn't changed in this patch. Theoretically it could be though, to save 2 bytes per face when less than two materials are used. * Eventually we could use a 16 bit integer attribute type instead. Ref T95967 Differential Revision: https://developer.blender.org/D15675
2022-08-31Release schedule: Blender 3.3 RCThomas Dinges
The branch is now in Bcon4, critical bug fixes only.
2022-08-31Fix: incorrect detection of used socketsJacques Lucke
2022-08-31Fix: missing vector clearJacques Lucke
Otherwise, these vectors are never cleared, leading to crashes down the line.
2022-08-31Cleanup: simplify debuggingJacques Lucke
This makes it easy to set breakpoints where false is returned.
2022-08-31Nodes: move NodeTreeRef functionality into node runtime dataJacques Lucke
The purpose of `NodeTreeRef` was to speed up various queries on a read-only `bNodeTree`. Not that we have runtime data in nodes and sockets, we can also store the result of some queries there. This has some benefits: * No need for a read-only separate node tree data structure which increased complexity. * Makes it easier to reuse cached queries in more parts of Blender that can benefit from it. A downside is that we loose some type safety that we got by having different types for input and output sockets, as well as internal and non-internal links. This patch also refactors `DerivedNodeTree` so that it does not use `NodeTreeRef` anymore, but uses `bNodeTree` directly instead. To provide a convenient API (that is also close to what `NodeTreeRef` has), a new approach is implemented: `bNodeTree`, `bNode`, `bNodeSocket` and `bNodeLink` now have C++ methods declared in `DNA_node_types.h` which are implemented in `BKE_node_runtime.hh`. To make this work, `makesdna` now skips c++ sections when parsing dna header files. No user visible changes are expected. Differential Revision: https://developer.blender.org/D15491
2022-08-31Cleanup: break before the default case in switch statementsCampbell Barton
While missing the break before a default that only breaks isn't an error, it means adding new cases needs to remember to add the break for an existing case, changing the default case will also result in an unintended fall-through. Also avoid `default:;` and add an explicit break.
2022-08-31Node: Mix nodeCharlie Jolly
This patch is a response to T92588 and is implemented as a Function/Shader node. This node has support for Float, Vector and Color data types. For Vector it supports uniform and non-uniform mixing. For Color it now has the option to remove factor clamping. It replaces the Mix RGB for Shader and Geometry node trees. As discussed in T96219, this patch converts existing nodes in .blend files. The old node is still available in the Python API but hidden from the menus. Reviewed By: HooglyBoogly, JacquesLucke, simonthommes, brecht Maniphest Tasks: T92588 Differential Revision: https://developer.blender.org/D13749
2022-08-31Cleanup: Remove redundant addition of attributeHans Goudey
The radius attribute is aleady added in `pointcloud_random`.
2022-08-31Cleanup: Remove unused point cloud functionHans Goudey
This can be done more intuitively with a "copy parameters" function like `curves_copy_parameters` or `BKE_mesh_copy_parameters` anyway.
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-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-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: spelling in commentsCampbell Barton
2022-08-30Cleanup: formatCampbell Barton
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: Broken build with OpenVDB turned offHans Goudey
Problem with e3a6a2f41284f90b010.
2022-08-29Merge branch 'blender-v3.3-release'Jacques Lucke