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: Return earlyHans Goudey
2022-09-02Merge branch 'blender-v3.3-release'Hans Goudey
2022-09-02Fix T100767: Geometry nodes viewer node placed incorrectlyHans Goudey
See explanation in comment. Differential Revision: https://developer.blender.org/D15864
2022-09-02Cleanup: Deduplicate node link points evaluation functionsHans Goudey
2022-09-02Cleanup: Further split of node link Bezier calculation functionHans Goudey
Now dragged handles are handled separately, and the function returns a statically sized array by value. The functions are also renamed to be more consistent with curve naming elsewhere in Blender.
2022-09-02Fix: Ensure topology cache exists when drawing nodesHans Goudey
This was missed in 58c650a44c251a41c89375d697efdf07153016e0.
2022-09-02Cleanup: Split node link draw culling to separate functionHans Goudey
This was only really used in one place, so better to just do it there rather than requiring another argument for the handle calculation.
2022-09-02Cleanup: Return earlyHans Goudey
2022-09-02Cleanup: Remove unnecessary struct keyword usage in node editorHans Goudey
2022-09-02Cleanup: Remove unused structHans Goudey
Unused after 217d0a15243d12da070e8a68c2603bab73be2164
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-02Cleanup: Use C++ vector types in node editorHans Goudey
2022-09-02Nodes: Use existing nodes span cacheHans Goudey
Use cache from 25e307d725d0b924f rather than creating a new vector on every redraw.
2022-09-02Cleanup: Fix clang-tidy warnings: [modernize-redundant-void-arg]Clément Foucault
2022-09-02Cleanup: Fix clang-tidy warnings: [modernize-use-nullptr]Clément Foucault
2022-09-02Cleanup: Fix clang-tidy warnings: [modernize-use-using]Clément Foucault
2022-09-02Cleanup: Fix clang-tidy warnings: [bugprone-incorrect-roundings]Clément Foucault
2022-09-02Cleanup: Fix clang-tidy warnings: [modernize-use-bool-literals]Clément Foucault
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-01Node Editor: Visual tweaks to node linksLeon Schittek
Several visual tweaks to node links to make them overall fit in better with the look of the node editor: - Change the link thickness with the zoom level to a certain degree. - Remove the fuzziness of the node link and its shadow/outline. - The link outline color can now be made transparent. - Add circles at the end of dragged links when connecting to sockets. - Improve the banding of the color interpolation along the link. - Adjust the spacing of dashes along straight node links. Reviewed By: Pablo Vazquez, Hans Goudey Differential Revision: http://developer.blender.org/D15036
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-09-01Cleanup: use reference instead of copyJacques Lucke
2022-08-31Sculpt: Fix T100479: Memory corruption in sculpt_boundary_edit_data_initJoseph Eagar
2022-08-31Fix merge error.Joseph Eagar
2022-08-31Merge branch 'blender-v3.3-release'Joseph Eagar
2022-08-31Cleanup: fix warnings from vcol limit commitJoseph Eagar
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-31GPencil: Apply Brush Size to Outline thickness while drawingAntonio Vazquez
The new factor allows to apply the current brush size to the external stroke perimeter conversion done in draw mode.
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-31UI: Add shift-click hint to library overrides button tooltipJulian Eisel
This information was missing and made the feature hard to discover.
2022-08-31Merge branch 'blender-v3.3-release'Bastien Montagne
2022-08-31LibOverride: Replace linked objects by their overrides when created from 3DView.Bastien Montagne
From the 3DView code has basically no knowledge of collection hierarchy, so we can either not remap any local usage of linked objects that are being overridden, or remap them in all their local collections. The second behavior makes most sense in the vast majority of cases. Note that this was only an issue when directly linking and overriding objects, not when doing so through collections.
2022-08-31Merge branch 'blender-v3.3-release'Bastien Montagne
2022-08-31Fix crash in liboverride operations from the Outliner.Bastien Montagne
Checks for 'invalid' selected IDs that need to be skipped were incomplete, and one was missing the actual return statement.
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-31Cleanup: formatCampbell Barton
2022-08-31Merge branch 'blender-v3.3-release'YimingWu
2022-08-31GPencil: Fix sharp_threshold property in sample stroke operatorYimingWu
The property registration was missing in the operator, now fixed.
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-30Cleanup: Use C++ attribute APIHans Goudey
2022-08-30Cleanup: Use standard variable name for curve pointsHans Goudey
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-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-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'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.