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-08-31Merge branch 'master' into refactor-mesh-material-index-genericrefactor-mesh-material-index-genericHans Goudey
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-30Merge branch 'master' into refactor-mesh-material-index-genericHans 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-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.
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-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: 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-29Merge branch 'master' into refactor-mesh-material-index-genericHans Goudey
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-29I18n: disambiguate and make a few more strings translatableDamien Picard
Those strings were at least partly disambiguated: - Area - Zone - Measurement - Ease - BBone Ease In / Out - Back - Camera BG image depth - GP interpolate sequence - Edge Crease - Theme - Jitter - Brush - GPencil - Lens distorsion compositing node - Cineon color management - Black - Gamma - White Reviewed By: mont29 Differential Revision: https://developer.blender.org/D15791
2022-08-29I18n: translate newly created node group socketsDamien Picard
Translate: - new group socket names - default names Input and Output - on connecting a link from another node - new geometry nodes input and output socket names Reviewed By: mont29 Differential Revision: https://developer.blender.org/D15763
2022-08-29GPencil: New conversion to outline in draw modeAntonio Vazquez
This new option converts the stroke to outline perimeter as soon as is drawn. If no alternative material is set, the actual material is used. The algorithm is similar to the new operator in D15664 Reviewed By: pepeland Differential Revision: https://developer.blender.org/D15738
2022-08-28Merge branch 'master' into refactor-mesh-material-index-genericHans Goudey
2022-08-28Cleanup: replace NULL with nullptr for C++ filesCampbell Barton
2022-08-28Merge branch 'blender-v3.3-release'Campbell Barton
2022-08-28Merge branch 'blender-v3.3-release'Campbell Barton
2022-08-28Merge branch 'blender-v3.3-release'Campbell Barton
2022-08-28Fix crashes running operators in invalid contextsCampbell Barton
Fix for running operators outside of expected contexts. - UI_OT_view_drop (poll) - UI_OT_view_item_rename (poll) - OBJECT_OT_gpencil_modifier_move_to_index - OBJECT_OT_modifier_move_to_index - OBJECT_OT_geometry_nodes_input_attribute_toggle - OBJECT_OT_geometry_node_tree_copy_assign - OBJECT_OT_shaderfx_remove - OBJECT_OT_shaderfx_copy - POSE_OT_relax (& other pose slide operators).
2022-08-28Fix crash in gpencil.brush_reset_all referencing freed memoryCampbell Barton
A reference to the active brush was kept even when it was freed.
2022-08-28Fix running transform without a regionCampbell Barton
Running transform in background mode or without a region would crash.
2022-08-27UV: support constrain-to-bounds for uv rotation operatorChris Blackbourn
Differential Revision: https://developer.blender.org/D15730
2022-08-27Fix last use of deprecated material index struct memberHans Goudey
2022-08-27Merge branch 'master' into refactor-mesh-material-index-genericHans Goudey
2022-08-27Cleanup: pass notifiers as constCampbell Barton
2022-08-26Cleanup: use 'len_v2'Germano Cavalcante
Simplifies readability and avoids repeat casts.
2022-08-26Merge branch 'blender-v3.3-release'Germano Cavalcante
2022-08-26Transform: Use more general approach to node view updateGermano Cavalcante
With rBe6a557952ead, concerns were reported about missing updates when the view is moved other than through the Edge Pan system. Although the transform operator blocks navigation in general, it is good to avoid these cases.
2022-08-26Merge branch 'blender-v3.3-release'Germano Cavalcante
2022-08-26Fix T100632: Regression: Node border snap guide line not drawing properlyGermano Cavalcante
Caused by {rBd2271cf93926}. Color values were being used without being initialized.