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-05-27GPU: Remove cached full/scaled image texture.Jeroen Bakker
full scaled image isn't used anymore. It was added to use a different scale when displaying an image in the image editor. This was replaced by the image engine redesign. This change will reduce complexity of {T98375}.
2022-05-27Fix fuzzy ID deletion user count check.Bastien Montagne
`BKE_id_delete` should only check for consistency of user count with regards to the tags and flags of the ID, not 'protect' nor even warn in case a 'fake user' ID is deleted (such higher-level checks are to be handled by higher-level code). Also replace the assert + debug print by a CLOG error, this avoids 'assert crash' while still failing tests, and always producing a useful message. Fixes T98374 and T98260.
2022-05-27Fix error checking the search callbackCampbell Barton
Error in [0] caused the `set` callback be checked as the search callback. [0]: 3f3d82cfe9cefe4bfd9da3d283dec4a1923ec22d
2022-05-26Fix "day" unit lengthErik
The day is currently specified as 90000 seconds which is 25 hours. Obviously this is wrong, and this commit changes it to 86400s/24 hours. Differential Revision: https://developer.blender.org/D15034
2022-05-26Fix T98385: Color attributes not working with GPU subdivisionKévin Dietrich
Contrary to coarse extraction, GPU extraction uses the same buffer for the coarse data, only the final GPU buffer needs to be offset.
2022-05-26Fix T98392: GPU subdivision crash with knife toolsKévin Dietrich
The face dots normals may not be always requested, thus leading to a crash by null pointer dereference.
2022-05-26Merge branch 'blender-v3.2-release'Campbell Barton
2022-05-26Fix display error after sorting mesh elementsCampbell Barton
Sorting faces caused the tessellation data to be outdated, making faces show the wrong materials. Re-calculate tessellation when re-ordering faces.
2022-05-26Cleanup: `struct PHandle` merged with alias `typedef void ParamHandle`Chris Blackbourn
Reviewed By: brecht Ref D15021
2022-05-26UI support for showing candidates for string propertiesCampbell Barton
Currently strings are used for cases where a list of identifiers would be useful to show. Add support for string properties to reference a callback to populate candidates to show when editing a string. The user isn't prevented from typing in text not found in this list, it's just useful as a reference. Support for expanding the following strings has been added: - Operator, menu & panel identifiers in the keymap editor. - WM operators that reference data-paths expand using the Python-consoles auto-complete functionality. - Names of keying sets for insert/delete keyframe operators. Details: - `bpy.props.StringProperty` takes an option `search` callback. - A new string callback has been added, set via `RNA_def_property_string_search_func` or `RNA_def_property_string_search_func_runtime`. - Addresses usability issue highlighted by T89560, where setting keying set identifiers as strings isn't practical. - Showing additional right-aligned text in the search results is supported but disabled by default as the text is too cramped in most string search popups where the feature would make sense. It could be enabled as part of other layout tweaks. Reviewed By: brecht Ref D14986
2022-05-26Cleanup: formatCampbell Barton
2022-05-26Outliner: Make use of new C++ based functional iteratorsJulian Eisel
(Not meant to cause user visible changes.) Makes use of the new iterators introduced in the previous commit. Some benefits: - Shorter, simpler, easier to read & understand - Deduplicates logic - Centralizes iteration logic, making it easier to replace tree storage (as planned), see previous commit. - Avoids having to pass (sub-)tree to iterate around (often redundant since it's just `SpaceOutliner.tree`, even though `SpaceOutliner` is already passed). - Function arguments that are only passed to the recursive call are recognized as unused (found and removed a few). Also does some general cleanups while refactoring the code for the iterators. Use `const`, use references (signals null is not expected), early-exit (see 16fd5fa656af), remove redundant arguments, etc.
2022-05-26Outliner: New C++ based functional tree iteratorsJulian Eisel
(Not meant to cause user visible changes.) Adds some first new iterators to traverse over tree elements with a functional syntax. Functional because it meant to be used with C++ lambdas. For example, this common pattern: ```lang=cpp void some_recursive_function(SpaceOutliner *space_outliner, ListBase *tree, ...) { LISTBASE_FOREACH (TreeElement *, te, tree) { /* ... do something with the element ... */ /* Recurse into open children. */ if (TSELEM_OPEN(TREESTORE(te), space_outliner) { some_recursive_function(&te->subtree, ...); } } } ``` Gets simplified to this: ```lang=cpp void some_function(SpaceOutliner &space_outliner, ...) { tree_iterator::all_open(space_outliner, [&](TreeElement *te) { /* ... do something with the element ... */ }); } ``` We can add more iterators, e.g. some that support early exiting or skipping children, returning a custom type, only act on selected elements, etc. The following commit will convert a bunch of code to use these. Some further benefits will become visible there. Not all cases are straight forward to convert, but hopefully more and more code can be refactored to work with this. This deduplicates and centralizes the iteration logic, which will later make it much easier to refactor how the tree storage is done (e.g. move it to `SpaceOutliner_Runtime` and use a better container than `ListBase`).
2022-05-25Outliner: Fix warning icon not bubbling up correctly to collapsed parentJulian Eisel
Design is to have warnings in the sub-tree of a collapsed element show up next to the collapsed element. But if inside the collapsed element, there was a uncollapsed one containing yet another element with a warning, that warning wouldn't "bubble up" to the collapsed parent. Issue was that the warning lookup would only recurse into collapsed elements, rather than all elements inside of a collapsed element. While the actual fix for this could've been simpler, I decided to rework this code entirely. Recursively querying the warning message is now done separately from drawing the message once found, which makes the code easier to follow and implements the single responsibility principle better.
2022-05-25Outliner: Use general warning mechanics for library overridesJulian Eisel
Library overrides were basically using their own system to display warnings for tree elements, even though for other display elements we have a more general solution. With the previous commit this has been generalized further and made trivial to extend.
2022-05-25Outliner: Refactor element warning and mode column queryingJulian Eisel
Uses a inheritance based approach for querying warning of tree elements and the mode column support of display modes. For the warnings, tree elements can override the `AbstractTreeElement::getWarning()` method and return a warning string. The UI will draw the warning column with warning icons. This makes the warning column more generalized and easier to extend to more use-cases. E.g. library override elements will use this after a followup commit. To support mode toggles a display mode can now just return true in the `AbstractTreeDisplay::supportsModeColumn()` method. This makes it trivial to add mode columns to other display modes, and less error prone because there's no need to hunt down a bunch of display mode checks in different places.
2022-05-25Fix T83519: Line Gesture flip state not updating without a mouse move eventPablo Dobarro
The wm_gesture_tag_redraw function was only called on mouse move, so the flip state preview was not updating just by pressing the F key. Reviewed By: Severin Maniphest Tasks: T83519 Differential Revision: https://developer.blender.org/D9779
2022-05-25UI: Curves Sculpt pinch iconDalai Felinto
2022-05-25BLI: use no_unique_address attributeJacques Lucke
Even though the `no_unique_address` attribute has only been standardized in C++20, compilers seem to support it with C++17 already. This attribute allows reducing the memory footprint of structs which have empty types as data members (usually that is an allocator or inline buffer in Blender). Previously, one had to use the empty base optimization to achieve the same effect, which requires a lot of boilerplate code. The types that benefit from this the most are `Vector` and `Array`, which usually become 8 bytes smaller. All types which use these core data structures get smaller as well of course. Differential Revision: https://developer.blender.org/D14993
2022-05-25Merge branch 'blender-v3.2-release'Bastien Montagne
2022-05-25Cleanup: Link/append: Remove useless proxy handling code.Bastien Montagne
This was not effectively doing anything anymore, time to remove it.
2022-05-25Cleanup: Further tweaks to RNA path API const'ness of PointerRNA parameter.Bastien Montagne
`RNA_path_struct_property_py` cannot get const `ptr` parameter for now (usage of `RNA_struct_find_property`). Also make `RNA_path_resolve_` functions take a const PointerRNA parameter.
2022-05-25Fix vertex format for mesh attributes with GPU subdivisionKévin Dietrich
A global variable was mistakenly used here which would accumulate the vertex attributes (leading to an assertion failure after a while), use the wrong number of components depending on the attribute data type, among other issues.
2022-05-25Fix T98355: Line art crash when switch to mesh edit mode.YimingWu
This fix will ensure not to load any meshes that's being edited, thus avoiding crashes. Ref D15022
2022-05-25Fix T98365: Overlay: Blender 3.2.0 Beta crashes on startupClément Foucault
This was caused by a wrong mass rename on a piece of code used only on older hardware.
2022-05-25Fix T96080: hiding elements does not work with GPU subdivKévin Dietrich
Faces, edges, and vertices are still shown when GPU subdivision is actived. This is because the related edit mode flags were ignored by the subdivision code. The flags are now passed to the various compute shaders mostly as part of the extra coarse data, also used for e.g. selection. For loose edges, a temporary buffer is created when extracting them. Loose vertices are already taken into account as it reuses the routines for coarse mesh extraction, although `MeshRenderData.use_hide` was not initialized, which is fixed now.
2022-05-25Geometry Nodes: skip Capture Attribute node if output is not neededMOD
This results in a speedup if the capture attribute is only needed under specific circumstances (e.g. when a switch further down the line is true). Previously, the input field was always evaluated. Differential Revision: https://developer.blender.org/D15018
2022-05-25Fix T98359: Handle object that has no feature lines.YimingWu
In case of line art "occlusion only" or contour not enabled, it's possible for an object to not produce any feature lines. This patch checks that to prevent freeing a NULL pointer.
2022-05-25Cleanup: Add more const'ness to RNA API.Bastien Montagne
This commit makes PointerRNA passed to RNA path API const. Main change was in the `path` callback for RNA structs, and indirectly the `getlength` callback of properties.
2022-05-25Merge branch 'blender-v3.2-release'Bastien Montagne
2022-05-25Fix T98344: Crash opening file with proxy.Bastien Montagne
Weird file where the proxy object has a `proxy_group` pointer, which does not instantiate any collection...
2022-05-25Merge branch 'blender-v3.2-release'Bastien Montagne
2022-05-25Fix link/append code not properly setting correct ID in context items.Bastien Montagne
When appending an already linked data, `BKE_blendfile_append` would not properly substitute the `item->new_id` pointer of link/append context items with the local duplicate of the linked ID. This would cause drag'n'drop of assets to work incorrectly in some cases. Fixes part of T95706 and T97320.
2022-05-25Cleanup: knife toolCampbell Barton
- Use early return and continue to reduce right-shift. - Rename `lv` to `tri_cos` for storing triangle coordinates. - Reduce variable scope.
2022-05-25Merge branch 'blender-v3.2-release'Campbell Barton
2022-05-25Merge branch 'blender-v3.2-release'Campbell Barton
2022-05-25Fix T98349: Knife project resulting selection is wrongCampbell Barton
Regression in [0] which removed the call to BVH-tree recalculation before calculating the selection. Instead of recalculating the BVH-tree, postpone recalculating mesh data until after the selection has been calculated. [0]: 6e77afe6ec7b6a73f218f1fef264758abcbc778a
2022-05-25Cleanup: remove context argument from EDBM_mesh_knifeCampbell Barton
Added in [0] but isn't needed as all needed variables are in the ViewContext. Avoid passing in the context is it makes debugging issues with MESH_OT_knife_project more difficult to investigate since it's possible values written to the ViewContext are ignored. [0]: 6e77afe6ec7b6a73f218f1fef264758abcbc778a
2022-05-25Merge branch 'blender-v3.2-release'Jeroen Bakker
2022-05-25Fix T98350: Crash when using clone tool + sequence.Jeroen Bakker
When no image user is known the last used frame of the image is used to read a frame. When partial updating an image there is always an image user that would use a zerod out image user, meaning the frame number is set to 0 when using the clone tool. This fix syncs the frame with the last used frame of the image to ensure that the buffer exists. There is a bailout in the overlay_edit_uv.c.
2022-05-25GPU: Updated comment about HQ normals workaround.Jeroen Bakker
2022-05-25Merge branch 'blender-v3.2-release'Jeroen Bakker
2022-05-25GPU: Fix issue that negated HQ normals workaround.Jeroen Bakker
Thanks Germano for pointing it out.
2022-05-25PyDoc: fix generated output for gpu.shaderCampbell Barton
Inclining built-in shader descriptions used the wrong indentation level. Link to the built-in shaders instead which avoids the indentation error and de-duplicates the list which is already shown on the page.
2022-05-25Cleanup: spelling, unbalanced doxy sectionsCampbell Barton
2022-05-25Cleanup: use doxy sections for mathutils typesCampbell Barton
Also minor improvements & corrections to comments.
2022-05-24Drag & drop: Use session UUID of IDs instead of name for droppingJulian Eisel
Dropping would pass the name of the ID to drop to the properties of the drop operator. This would then lookup the ID by name. With linking and/or library overrides, multiple IDs of the same name and type may exist, which is why the session UUID should be used instead. All operators used for dropping support this now and the drop code passes the session UUID instead of the name. Also see 917c096be6b9 and 8f79fa9c6780. Some drop operators were already using the session UUIDs. This converts the remaining ones. The "name" property is kept working as before, since some scripts use this. Side-effect: The "Name" property won't show up in the Adjust Last Operation anymore, which was the case for some of these operators, and its value won't be remembered over multiple executions of the operator. Both were not at all useful from what I can tell, and I doubt this was done intentionally.
2022-05-24Cleanup: Use new helpers for passing IDs from drag & drop to operatorsJulian Eisel
There are now some generalized helpers for passing IDs from drag & drop to operators via operator properties, mostly introduced in 917c096be6b9 and 8f79fa9c6780. These can be used in a bunch of places to reduce duplicated code and explicitly share a common solution. Side-effect: The "Name" property won't show up in the Adjust Last Operation anymore, and its value won't be remembered over multiple executions of the operator. Both were not at all useful from what I can tell, and I doubt this was done intentionally.
2022-05-24Cleanup: make formatJacques Lucke
2022-05-24Drag & drop: Invert priority of name and session UUID in ID lookupsJulian Eisel
Continuation of 8f79fa9c6780 and 917c096be6b9. The ID's session UUID is now always priotitized over its name to lookup the ID from drop-box or operator properties. bc3dbf109c67 shows what happens if the name happens to be set for whatever reason and the session UUID isn't prioritized.