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
2021-12-05Cleanup: Migrate all shader nodes to c++Aaron Carlisle
This will be useful in the future to use the new socket builder API Aditional changes: - Declare variables where initialized - Do not use relative includes Differential Revision: https://developer.blender.org/D13465
2021-12-05Geometry Nodes: use array instead of map in GeometrySetJacques Lucke
`GeometrySet` contains at most one component of each type. Previously, a map was used to make sure that each component type only exists once. The overhead of a map (especially with inline storage) is rather large though. Since all component types are known at compile time and the number of types is low, a simple `std::array` works as well. Some benefits of using `std::array` here: * Looking up the component of a specific type is a bit faster. * The size of `GeometrySet` becomes much smaller from 192 to 40 bytes. * Debugging a `GeometrySet` in many tools becomes simpler because one can easily see which components exists and which don't
2021-12-05Fix (unreported): off-by-one error when setting curve handlesJacques Lucke
The problem is that `current_mask` can become `selection.size()`. The loop could also be refactored to break out of it when the end of the selection is reached. This can be done separately.
2021-12-04Compositor: Migrate most nodes to new socket builder APIAaron Carlisle
This patch leaves a out a few nodes: - Group Nodes - Image input node - File output node - Switch View - Cryptomatte These nodes above are a bit more complicated and should be worked on individually. Differential Revision: https://developer.blender.org/D13266
2021-12-04Create generic modal functions from GRAPH_OT_decimateChristoph Lendenfeld
This patch extracts the modal functions from GRAPH_OT_decimate and makes them generic so they can be reused by future operators Reviewed by: Sybren A. Stüvel Differential Revision: https://developer.blender.org/D9326 Ref: D9326
2021-12-04Cleanup: Use LISTBASE_FOREACH macroHans Goudey
2021-12-04Cleanup: Use references in node editor, other improvementsHans Goudey
This helps to tell when a pointer is expected to be null, and avoid overly verbose code when dereferencing. This commit also includes a few other cleanups in this area: - Use const in a few places - Use `float2` instead of `float[2]` - Remove some unnecessary includes and old code The change can be continued further in the future.
2021-12-03Cleanup: Remove unused codeHans Goudey
This is very old and is unlikely to be useful in the near future.
2021-12-03Cleanup: Const, use references, C++ typesHans Goudey
Also remove some unnecessary includes
2021-12-03Cleanup: Comments and ordering in node editor headerHans Goudey
2021-12-03Cleanup: Use typed enum for node resize directionHans Goudey
2021-12-03ImBuf: Made Wrapping and Cropping optional in IMB_transform.Jeroen Bakker
`IMB_transform` is used in VSE. It had a required crop parameter for cropping the source buffer. This is not always needed. In the image engine we want to use the use the `IMB_transform` with wrap repeat. Both options are mutual exclusive and due to performance reasons the wrap repeat is only available when performing a nearest interpolation.
2021-12-03Cleanup: move public doc-strings into headers for 'bmesh'Campbell Barton
Some minor improvements to doc-strings too. Ref T92709
2021-12-03Fix T93541: Use warning instead of error for exceeding layer limitsJesse Yurkovich
Instead of using RPT_ERROR, use RPT_WARNING which will not raise an exception to Python. This broke some scripts (including FBX import) which already check for a None return value. Ref D13458 Reviewed By: campbellbarton
2021-12-03Fix T93574: Asset triangulating a meshCampbell Barton
Correct assert for edit-mesh normal calculation.
2021-12-02UI: Expand tree-view items (e.g. asset catalogs) on click to activateJulian Eisel
This actually gives a quite nice behavior in my opinion, especially for asset catalogs, where activating a catalog makes all assets inside it or its (grand-)child catalogs visible, so showing the child catalogs then adds useful information. Maybe this should become a feature for asset catalogs only, to be evaluated once the tree-view API is used in more cases. Only asset catalogs are affected by this change right now. Part of T93582.
2021-12-02Asset Browser: Don't expand top-level catalogs by defaultJulian Eisel
The "All" item will be expanded of course, and the tree will also be expanded so that the active item is visible. But feedback was that in some setups, opening all the top-level catalogs is a bit too much. So collapse them for a more compact default layout. Part of T93582.
2021-12-02Asset Browser: Remove home icon for "All" itemJulian Eisel
Originally this wasn't really meant to stay there permanently, but helped giving things a nicer alignment. Others seemed to like it at first so it stayed, but after more feedback we decided to remove it again. The alingment is better now with the previous commit. Part of T93582.
2021-12-02Asset Browser: Nest all catalogs under the "All" itemJulian Eisel
This makes the relation to the catalogs and the behavior more clear. Part of T93582.
2021-12-02Cleanup: Avoid using C++ keyword as variable nameHans Goudey
2021-12-02Fix (unreported): incorrect custom data layer createdJacques Lucke
Without this fix `CustomDataAttributes::create_by_move` did not work on named attributes.
2021-12-02Cleanup: Move public docs to BKE_spline.hh headerHans Goudey
2021-12-02Merge remote-tracking branch 'origin/blender-v3.0-release'Sybren A. Stüvel
2021-12-02Fix `Action.asset_data["is_single_frame"]` set incorrectlySybren A. Stüvel
The asset metadata custom property `["is_single_frame"]` was set incorrectly. Since this is intended for forward compatibility, including being covered by the asset metadata indexing, it's important to have it set correctly from the first release of Blender that includes the asset browser. Differential Revision: https://developer.blender.org/D13452
2021-12-02Fix: don't use `BLI_strncpy_utf8` for copying file pathsSybren A. Stüvel
File paths can be any encoding, so using some UTF-8-specific function is not the right way to go.
2021-12-02Blenloader: move ghost include path from INC to TEST_INCSybren A. Stüvel
The Ghost dependency was added to avoid a memory leak (rBc7a1e115b507), but since that's only for the unit tests, it's better to add the path to `TEST_INC`.
2021-12-02BLI: avoid invoking tbb for small workloadsJacques Lucke
We often call `parallel_for` in places with very variable sized workloads. When many elements are processed, using multi-threading is great, but when processing few elements (possibly many times) using `parallel_for` can result in significant overhead. I measured that this improves performance by >20% in the refactored realize instances code I'm working on separately. The change might also help with debugging sometimes, because the stack trace is smaller and contains fewer irrevelant symbols.
2021-12-02Fix T93563: Crash subdividing with overlapping tri and quadCampbell Barton
The first loop was left out when finding the split edge boundary. Error from f2138686d9d8c105ebf8884774fd7e4d8ff239a1.
2021-12-02Cleanup: move public doc-strings into headers for 'python'Campbell Barton
2021-12-02Merge branch 'blender-v3.0-release'Julian Eisel
2021-12-02Fix T93548: Appended (material) assets don't have a fake userJulian Eisel
Since our design is to always keep data-blocks marked as assets on exit, and our technical design for this is to do this via fake users, ensure the fake user is set for an appended asset. Reviewed by: Bastien Montagne Differential Revision: https://developer.blender.org/D13443
2021-12-02Fix T93555: crash when muting nodes with multiple internal linksJacques Lucke
The crash happened because I was incorrectly and inconsistently assuming that a socket is part of at most one internal link. However, this is not the case. In geometry nodes, an input socket can be internally linked to multiple output sockets. In the general case, an output could also be linked to multiple input sockets, even though we don't have that in Blender yet. Dalai gave green light to cherry pick this fix for 3.0.
2021-12-02Blendread: Remove all instantiation logic from `BLO_library_link_` code.Bastien Montagne
Instantiation is now fully handled by BKE_blendfile_link_append module. Note that this also allows removal of the `BLO_LIBLINK_NEEDS_ID_TAG_DOIT` flag. Part of T91414: Unify link/append between WM operators and BPY context manager API, and cleanup usages of `BKE_library_make_local`.
2021-12-02Cleanup: Readfile: Remove deprecated `BLO_library_link_copypaste`.Bastien Montagne
Rewrite of ID paste code in rB3f08488244c0 made this function useless, ID pasting is now handled by the BKE_blendfile_link_append module too.
2021-12-02Fix T93555: crash when muting nodes with multiple internal linksJacques Lucke
The crash happened because I was incorrectly and inconsistently assuming that a socket is part of at most one internal link. However, this is not the case. In geometry nodes, an input socket can be internally linked to multiple output sockets. In the general case, an output could also be linked to multiple input sockets, even though we don't have that in Blender yet.
2021-12-02Cleanup: spelling in commentsCampbell Barton
2021-12-02Fix T93410: Crash hiding a region from Python used by a popoverCampbell Barton
Close all active buttons when hiding a region as this can be called from Python a popover is open from that region. Failure to do this causes the popover to read from the freed button. Also rename UI_screen_free_active_but to UI_screen_free_active_but_highlight since it only frees highlighted buttons.
2021-12-02Cleanup: FIx build with USD after recent refactorAaron Carlisle
rB218360a89217f4e8321319035bf4d9ff97fb2658 missed a couple renames in USD code paths.
2021-12-02UI: Fix scaling of HSV cursor when zoomingLeon Leno
The small circle used to choose the hue/saturation and value in the color widget was drawn with a fixed screen space size. Now scale the circle used as cursor in the color widget based on the zoom. This could have been part of a9642f8d6130 but the implementation is different. Based on a fix provided by Erik Abrahamsson Differential Revision: https://developer.blender.org/D13444
2021-12-02Fix T92268: Group input and output nodes have inconsistent paddingNikhil Shringarpurey
The group output node did not have the same size padding as the group input, leading to the node looking different and actually being smaller. Differential Revision: https://developer.blender.org/D13092
2021-12-02Cleanup: Rename curve struct fieldsHans Goudey
These existing names were unhelpful at best, actively confusing at worst. This patch renames them to be consistent with the terms used to refer to the values in the UI. - `width` -> `offset` - `ext1` -> `extrude` - `ext2` -> `bevel_radius` Differential Revision: https://developer.blender.org/D9627
2021-12-02Fix: Add tooltip translation marker to disabled hintsHans Goudey
This was overlooked, as it seems there's no way for these strings to be translated currently. Generally it's not that clear whether `N_` or `TIP_` should be used in this case, but `TIP_` seems more consistent. To avoid the cost of the translation lookup when the UI text isn't necessary, we could allow the disabled hint argument to be optional. Differential Revision: https://developer.blender.org/D13141
2021-12-02Fix T84710: Instances with only mesh edges or vertices are invisibleHans Goudey
Wire-only meshes have a special case in the overlay drawing to give the wire shader a special color (which avoids the lines being dashed, somehow). The fast path for duplis didn't have that special case. Differential Revision: https://developer.blender.org/D13196
2021-12-02UI: Add an option to display the node editor context pathHans Goudey
Since we have the overlays popover, it makes sense to allow toggling the context path like in the 3D viewport. This commit adds a property, and turns it on by default in existing files. Differential Revision: https://developer.blender.org/D13248
2021-12-02Merge branch 'blender-v3.0-release'Hans Goudey
2021-12-02Fix T93525: Crash with curve/text armature bone gizmoHans Goudey
The problem is that drw_batch_cache_generate_requested_delayed is called on the object, which uses the original object data type to choose which data type to get info for. So for curves and text it uses the incorrect type (not the evaluated mesh like we hardcoded in the armature overlay code). To fix this I hardcoded the "delayed" generation to only use the evaluated mesh. Luckily it wasn't use elsewhere besides this armature overlay system. That seems like the simplest fix for 3.0. A proper solution should rewrite this whole area anyway. Differential Revision: https://developer.blender.org/D13439
2021-12-01Cleanup: Move node_shader_util.c to C++Hans Goudey
This will allow using a function I've declared in a C++ header.
2021-12-01Cleanup: clarify material copying for hair and pointcloudsBrecht Van Lommel
No functional change, just more clear this way it comes from src.
2021-12-01Fix: Remove incorrect asserts for empty attributesHans Goudey
While it is an edge case, it isn't incorrect for the attribute storage to have a zero size, it will just return an empty span or nothing.
2021-12-01Fix: Instances component does not copy attributesHans Goudey