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-07-15Cleanup: Renamed SCULPT_TOOL_NEEDS_COLOR to SCULPT_tool_is_paintJoseph Eagar
Old name is confusing since SCULPT_TOOL_PAINT can paint on images too, and it's planned for smear to as well.
2022-07-15Fix T99653: "Align Active Camera to Selected" fails with ortho cameraCampbell Barton
There were two bugs, a regression in [0] and the object-data wasn't tagged for depsgraph updating. [0]: 19df0e3cfd5b9fed891ed81dd1123b2351605a7d
2022-07-15Fix T99196: sculpt_update_object calls paint updates for nonpaint toolsJoseph Eagar
Specifically BKE_texpaint_slots_refresh_object was being called, which causes cycles to reset at strange times (like moving the mouse cursor in pose, boundary and various other tools). This (along with some code that checks if the pbvh pixels need to be rebuilt) is only run if is_paint_mode (which used to be needs_colors) is true.
2022-07-15Fix T99364: Unable to select bones when custom shape display is disabledCampbell Barton
Regression in [0] which revealed an error in [1]. Logic for pose channel custom transform ignored ARM_NO_CUSTOM. [0]: 3267c91b4d5caab7da8aef071a446dd2e86f86a9 [1]: c3fef001ee926fc183255b623f56da9fc5fcbb73
2022-07-15Fix T99270: bones using empties as custom shapes can't be selectedCampbell Barton
Regression in [0] which didn't account for the bounds of empty objects. Add support support calculating bounds from empty draw-type to use in pose-bone culling. [0]: 3267c91b4d5caab7da8aef071a446dd2e86f86a9
2022-06-30Fix T98886: PBVH_GRIDS ignores face smooth flag on first gpu buildJoseph Eagar
2022-06-29Fix T99209: Remesh modifier frees sculpt masking attributes.Joseph Eagar
2022-06-28Sculpt: Fix backwards normals in PBVH_GRIDS raycastingJoseph Eagar
Winding order of grid quads was backwards.
2022-06-24Fix T98956: Crash removing some builtin attributesHans Goudey
An alternative to the solution in cebc5531e944 that avoids using the CustomData_free_layer_named function that wasn't added to 3.2 yet.
2022-06-24Fix T99058: geometry nodes ignore if subdivision surface modifier is disabledBrecht Van Lommel
It was looking up the last modifier in the stack, ignoring visibility, instead of mesh->runtime.subsurf_runtime_data set by the modifier evaluation and used by the drawing code.
2022-06-24Fix T98925: Editor panels are brokenRichard Antalik
Commit 277fa2f441f4 added channels region to unintended editors if sequencer was used in area. This caused issues with some editors having 2 tool regions and non functioning side panel. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D15253
2022-06-22Fix T98796: avoid unnecessary mesh copyJacques Lucke
The call to `get_component_for_write` would sometimes copy the mesh even when the mesh is replaced with itself. The `replace_mesh` method handles that case already, so just use that instead.
2022-06-22Curves: Use copied original data for invalid NURBS curvesHans Goudey
NURBS curves can be invalid when the order is less than the number of points, or in a few other situations. Currently the evaluated data of an invalid NURBS curve is empty. This is inconvenient because it requires checking for empty curves when it otherwise wouldn't be necessary. This patch replaces that fallback with copying the original data to the evaluated points. This makes conceptual sense too, as if the curve couldn't be evaluated-- which wouldn't necessarily delete it. Usually the UI protects against this happening, but it's currently possible to create an invalid curve with some operations like the delete geometry node. Differential Revision: https://developer.blender.org/D14837
2022-06-22GPencil: Fix crash when using time offset modifierFalk David
This fixes a mistake in 60bf561d379a, which did not account for offset frames by the time offset modifier.
2022-06-22Fix T98853: Blender crashes when moving grease pencil object has any ↵filedescriptor
invisible layers Whats happening is that the modifier keeps adding new frames to the evaluated object resulting in an exponential increase. This is because when preparing the data for the modifiers we only copy visible strokes to the eval object. But the modifiers do not consider visibility and will generate the mirrored strokes even for layers that are hidden. Because those layers have not been copied (only their structure) we run into this issue. The solution is always copy the active frame of all layers (even if the layer is hidden).
2022-06-22Fix 2 for T98700: Crash when recursively nesting NLA meta stripsSybren A. Stüvel
When searching for the active NLA strip, avoid overwriting the found strip pointer with NULL if it was already found in a previous iteration. The active strip is searched for while looping over the NLA tracks. If the active strip was found on a previous track, and not on the current track, this would effectively set `actstrip = NULL`. This is now avoided. Another benefit is that the search for the active strip is stopped as soon as it's found, which should increase performance a tiny bit.
2022-06-22Fix T98700: Regression: Crash when recursively nesting NLA meta stripsSybren A. Stüvel
The `update_active_strip_from_listbase()` function took meta-strips in the "source" list into account, but didn't recurse into the corresponding meta-strip of the "destination" list. This is now fixed. `update_active_strip_from_listbase()` needed a few changes to resolve the issue: - It was renamed to `find_active_strip_from_listbase()` to limit its reponsibility to just finding the active strip. It now leaves the assignment to the caller. This reduces the number of parameters by 1 and makes recursion simpler. - The destination strips are now, like the source strips, passed as `ListBase`, so that both source & dest can be recursed simultaneously.
2022-06-22Fix T98813: crash with GPU subdiv in edit mode and instanced geometryBrecht Van Lommel
Instancing with geometry nodes uses just the evaluated Mesh, and ignores the Object that it came from. That meant that it would try to look up the subsurf modifier on the instancer object which does not have the subsurf modifier. Instead of storing a session UUID and looking up the modifier data, store a point to the subsurf modifier runtime data. Unlike the modifier data, this runtime data is preserved across depsgraph CoW. It must be for the subdiv descriptor contained in it to stay valid along with the draw cache. As a bonus, this moves various Mesh_Runtime variables into the subsurf runtime data, reducing memory usage for meshes not using subdivision surfaces. Also fixes T98693, issues with subdivision level >= 8 due to integer overflow. Differential Revision: https://developer.blender.org/D15184
2022-06-22Fix T98727: Dynamic Paint does not update normalsPhilipp Oeser
Caused by {rB6a3c3c77b3eb}. Displacement and wave were tagging the original mesh normals dirty, instead the result's normals need tagging. Seems like a typo in above commit (similar to rBfe43c170831f). Maniphest Tasks: T98727 Differential Revision: https://developer.blender.org/D15165
2022-06-01Fix T98469: Crash trying to add an object to a linked collection that is ↵Bastien Montagne
linked to multiple scenes. Crash happened because code could not find a valid base in current scene after adding the object, added some checks for that. Root of the issue was wrong assumptions in `BKE_object_add` logic, which would pick the first valid ancestor collection in case initially selected collection was not editable. In some case, this could pick a collection not instanced in the current scene's view layer, leading to not getting a valid base for the newly added object. Addressed this by adding a new variant of `BKE_collection_object_add`, `BKE_collection_viewlayer_object_add`, which ensures final collection is in given viewlayer.
2022-06-01Fix T97408: Temporary fix for attribute convert undoJoseph Eagar
Sculpt undo now detects if an attribute layer has changed type/domain and unconverts it back. This is a temporary workaround to a more fundamental bug in the undo system. Memfile undo assumes it can always rebuild the application state from the prior undo step, which isn't true with incremental undo systems. The correct fix is to push an extra undo step prior to running an operator if an incremental undo system is active and the operator is using memfile undo.
2022-05-31Fix T98454: subdivision doesn't propagate int attributesJacques Lucke
Differential Revision: https://developer.blender.org/D15083
2022-05-30Fix T98253: Gpencil Lineart crashes when undoing creation of linked copyAntonio Vazquez
These lines were not used now because the handling of copy data has changed. Assigning the `eval` data can produce unexpected result, especially since everywhere ID_RECALC_TRANSFORM is used, we also do a copy on write. That should take care of `ob->data` for the eval object.
2022-05-30Fix T98488: GPencil weightpaint not visible if first point is no weightAntonio Vazquez
The problem was because the check was done with the total weights of the first element of the array and if this was null or 0, the weights were not duplicated. As this bug was introduced fixing T97150 due a problem in the weight data, now instead to duplicate all stroke data to create the perimeter for the PDF/SVG, only the points are duplicated because the weights are not needed. This fix the original bug and also reduce the memory used by the export process.
2022-05-30Fix T98449: Cycles crash changing frame after recent changesBrecht Van Lommel
Subdivision did not properly update when evaluating first without and then with orco coordinates. Now update the subdivision evaluator settings every time, and reallocate the vertex data buffer when needed. there is an additional issue in this file where orco coordinates are not available immediately on the first frame when they should be, and only appear on the second frame. However that is an old limitation related to the depsgraph not getting re-evaluated on viewport display mode changes, here we just fix the crash.
2022-05-30Curves: make tangent computation more robustJacques Lucke
Previously, when there were multiple curve points at the same or almost the same position, the computed tangent was unpredictable. Now, the handling of this case is more explicit, making it more predictable. In general, when there are duplicate points, it will just use tangents from neighboring points now. Also fixes T98209. Differential Revision: https://developer.blender.org/D15016
2022-05-28Re-fix T97366: Support single-file UDIMsJesse Yurkovich
The original fix for T97366 was too restrictive and breaks real-world cases of single-file UDIM textures. See D13297 for an example. This patch effectively reverts the original fix and instead fixes the downstream code to accept single-file ranges as necessary. Note: This means it is very important for users to make use of the "UDIM detection" option during `image.open` or drag n' drop scenarios in order to declare their intent when loading their files. Differential Revision: https://developer.blender.org/D14853
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-25Cleanup: Link/append: Remove useless proxy handling code.Bastien Montagne
This was not effectively doing anything anymore, time to remove it.
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-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-23Fix T98196: Crash when moving tweaked NLA strip with empty track belowSybren A. Stüvel
`BKE_nlastrip_find_active()` and `update_active_strip()` now do a more thorough search for the active strip, by also recursing into meta-strips. There were some assumptions in the NLA code that the active strips is contained in the active track. This assumption turned out to be false: when there is a meta-strip, the active strip could be inside that, and then it's not contained in `active_track.strips` directly. Apart from the above, there are other situations in which the track pointed to by `AnimData::act_track` does *not* contain the active strip (even indirectly). Both these cases can happen when the transform system is moving a strip that's in tweak mode. Entering tweak mode doesn't just search for the active track/strip, but also falls back to the last-selected ones. This means that the track/strip pointers & flags can be out of sync with what's being tweaked/transformed. Because of this, the assumption that there is any relation between "active strip" and "active track" has been removed from the `update_active_strip()` function. All this searching could be prevented by passing the `AnimData` to the code that duplicates tracks & strips. That way, when the active track/strip is dup'ed, the `AnimData` pointers can be updated as well. That would require more refactoring and thus could introduce other bugs, so that's left for later.
2022-05-23Fix T98258: Duplicated last vertex after GPencil sample.YimingWu
Also fixed an unreported issue of incorrect interpolation of thickness. Reviewed By: Aleš Jelovčan (frogstomp), Antonio Vazquez (antoniov) Differential Revision: https://developer.blender.org/D15005
2022-05-23Fix T98231: missing update when material output is in groupJacques Lucke
Differential Revision: https://developer.blender.org/D14998
2022-05-20Fix T96810: Bitmap race condition in PBVH normal calculationHans Goudey
The final normalization step of sculpt normal calculation iterates over all unique vertices in each node and marks them as done. However, storing the done mask in a bitmap meant that multiple threads could write to a single byte at the same time, because the bits for separate threads could be stored in the same byte. This is not threadsafe Fixing this issue seems to improve performance as well. First I tested just clearing the entire bitmap after the normal calculation. Then I tested using an array of booleans instead, which turned out to be slightly better, and simplifies code a bit. I tested on a Ryzen 3800x, on an 8 million polygon subdivided Suzanne by using the grab brush with a radius large enough to affect most of the mesh. | Original | Clear Entire Bitmap | Boolean Array | | --------- | ------------------- | ------------- | | 67.9 ms | 59.1 ms | 57.9 ms | | 1.0x | 1.15x | 1.17x | Differential Revision: https://developer.blender.org/D14985
2022-05-19Fix (studio-reported) more possibilities to edit content of linked/override ↵Bastien Montagne
collections. Existing code for the `Move` operator, and some `Collections` panel operations (Object properties) was absolutely not override-safe, and sometimes not even linked-data safe.
2022-05-19Fix liboverride extreme resync times in case of libraries dependency loops.Bastien Montagne
That max number of `10000` level of recursivity was a typo (should have been `1000`), but even that is way too high, typical sane situation should not lead to more than a few tens of levels, so reducing the max level to 200. Also improve error message with more context info about the issue. Found while investigating issues for the Blender Studio's Heist production.
2022-05-19Revert "Fix liboverride extreme resync times in case of libraries dependency ↵Bastien Montagne
loops." This reverts commit e42e4e8568edeb4e0b962e2059586c2a3d3b457d. Wrong commit, sorry for the noise.
2022-05-19Fix liboverride extreme resync times in case of libraries dependency loops.Bastien Montagne
That max number of `10000` level of recursivity was a typo (should have been `1000`), but even that is way too high, typical sane situation should not lead to more than a few tens of levels, so reducing the max level to 200. Also improve error message with more context info about the issue. Found while investigating issues for the Blender Studio's Heist production.
2022-05-19Fix T98237: Double free with curve object conversion to meshHans Goudey
In some cases (when there is an evaluated curve), the conversion code would try to free the evaluated data-block twice, because freeing the object would free it from `data_eval` and then the data-block was freed again explicitly. Now check if the data-block is stored in `data_eval` before freeing `object.data` manually. This is another area that's made more complex by the fact that we change the meaning of `object.data` for evaluated objects. The solution is more complicated than it should be, but it works whether or not an evaluated mesh or curve exists.
2022-05-18Subdiv: support interpolating orco coordinates in subdivision surfacesBrecht Van Lommel
This makes changes to the opensubdiv module to support additional vertex data besides the vertex position, that is smootly interpolated the same way. This is different than varying data which is interpolated linearly. Fixes T96596: wrong generated texture coordinates with GPU subdivision. In that bug lazy subdivision would not interpolate orcos. Later on, this implementation can also be used to remove the modifier stack mechanism where modifiers are evaluated a second time for orcos, which is messy and inefficient. But that's a more risky change, this is just the part to fix the bug in 3.2. Differential Revision: https://developer.blender.org/D14973
2022-05-18Fix T98157: improve animation fps with better check in depsgraphJacques Lucke
Previously, the depsgraph assumed that every node tree might contain a reference to a video. This resulted noticeable overhead when there was no video. Checking whether a node tree contained a video was relatively expensive to do in the depsgraph. It is cheaper now due to the structure of the new node tree updater. This also adds an additional run-time field to `bNodeTree` (there are quite a few already). We should move those to a separate run-time struct, but not as part of a bug fix. Differential Revision: https://developer.blender.org/D14957
2022-05-18Fix (unreported) crash in some rare case when making liboverride.Bastien Montagne
If making liboverride of an empty collection, this (root of override hierarchy) collection would get untagged in code when checking for collections that do not need to be overridden, leading to not overriding this root collection, and later in code to using NULL pointer.
2022-05-17Fix T98052: Eevee / Workbench background render crash with GPU subdivisionBrecht Van Lommel
The problem is that depsgraph evaluation happens before the OpenGL context is initialized, and so modifier evaluation happens without GPU subdivision. Later the BKE_subsurf_modifier_can_do_gpu_subdiv test in the draw code gives a different result. This just checks if the mesh has information for GPU subdivision in the draw code, and if so uses it. This is only set if the test for supported GPU subdivision passes in the modifier evaluation. Additionally it may be good to perform OpenGL context initialization earlier so background render can take advantage of GPU subdivision, but this is more complicated. Differential Revision: https://developer.blender.org/D14969
2022-05-17Fix text.as_string() adding a trailing new-lineCampbell Barton
Moving Text.as_string() from Python to C [0] added an extra new-line causing a round-trip from_string/to_string to add a new-line, this also broke the undo test `test_undo.text_editor_simple` in `../lib/tests/ui_simulate/run.py`. [0]: 231eac160ee394d41c84e0cc36845facb7594ba5
2022-05-16Fix T98136: Crash undoing "Make Library Override" in some cases.Bastien Montagne
The 'OVERRIDE_HIDDEN' extra collection would often be mistakenly added to a linked collection, which is totally forbidden and guaranteed to crash on undo/redo. Reworked the code instantiating that extra collection in a more generic and hopefully robust way now.
2022-05-15Fix T98049: crash rendering multilayer EXR with some color spacesBrecht Van Lommel
2022-05-15Fix T81715: Unprojected radius mode messes up sculpt texture radiusJoseph Eagar
We really need to fix how unprojected radius (scene unit) works. What happened is the paint code updates the brush's normal radius with the current unprojected pixel radius, which was then used by texture brush tiled mode. To fix this I just cached the pixel radius at stroke start in UnifiedPaintSettings->start_pixel_radius.
2022-05-13Fix T98072: Regression: When appending a Scene, the Collections that are ↵Bastien Montagne
excluded get instanced into Current Scene. This was due to using `BKE_scene_has_object` function, which uses the cache of bases of the viewlayers, which do not have entries for the content of excluded collections... Now use `BKE_collection_has_object_recursive` instead.
2022-05-11Cleanup: fix compiler warnings on macOSLoren Osborn
Differential Revision: https://developer.blender.org/D14917