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-14Cleanup: Make formatHans Goudey
2022-09-14Sculpt: Separate hide status from face sets, use generic attributeHans Goudey
Whether faces are hidden and face sets are orthogonal concepts, but currently sculpt mode stores them together in the face set array. This means that if anything is hidden, there must be face sets, and if there are face sets, we have to keep track of what is hidden. In other words, it adds a bunch of redundant work and state tracking. On the user level it's nice that face sets and hiding are consistent, but we don't need to store them together to accomplish that. This commit uses the `".hide_poly"` attribute from rB2480b55f216c to read and change hiding in sculpt mode. Face sets don't need to be negative anymore, and a bunch of "face set <-> hide status" conversion can be removed. Plus some other benefits: - We don't need to allocate either array quite as much. - The hide status can be read from 1/4 the memory as face sets. - Updates when entering or exiting sculpt mode can be removed. - More opportunities for early-outs when nothing is hidden. - Separating concerns makes sculpt code more obvious. - It will be easier to convert face sets into a generic int attribute. Differential Revision: https://developer.blender.org/D15950
2022-09-14ViewLayer: Lazy sync of scene data.Monique Dewanchand
When a change happens which invalidates view layers the syncing will be postponed until the first usage. This will improve importing or adding many objects in a single operation/script. `BKE_view_layer_need_resync_tag` is used to tag the view layer to be out of sync. Before accessing `BKE_view_layer_active_base_get`, `BKE_view_layer_active_object_get`, `BKE_view_layer_active_collection` or `BKE_view_layer_object_bases` the caller should call `BKE_view_layer_synced_ensure`. Having two functions ensures that partial syncing could be added as smaller patches in the future. Tagging a view layer out of sync could be replaced with a partial sync. Eventually the number of full resyncs could be reduced. After all tagging has been replaced with partial syncs the ensure_sync could be phased out. This patch has been added to discuss the details and consequences of the current approach. For clarity the call to BKE_view_layer_ensure_sync is placed close to the getters. In the future this could be placed in more strategical places to reduce the number of calls or improve performance. Finding those strategical places isn't that clear. When multiple operations are grouped in a single script you might want to always check for resync. Some areas found that can be improved. This list isn't complete. These areas aren't addressed by this patch as these changes would be hard to detect to the reviewer. The idea is to add changes to these areas as a separate patch. It might be that the initial commit would reduce performance compared to master, but will be fixed by the additional patches. **Object duplication** During object duplication the syncing is temporarily disabled. With this patch this isn't useful as when disabled the view_layer is accessed to locate bases. This can be improved by first locating the source bases, then duplicate and sync and locate the new bases. Will be solved in a separate patch for clarity reasons ({D15886}). **Object add** `BKE_object_add` not only adds a new object, but also selects and activates the new base. This requires the view_layer to be resynced. Some callers reverse the selection and activation (See `get_new_constraint_target`). We should make the selection and activation optional. This would make it possible to add multiple objects without having to resync per object. **Postpone Activate Base** Setting the basact is done in many locations. They follow a rule as after an action find the base and set the basact. Finding the base could require a resync. The idea is to store in the view_layer the object which base will be set in the basact during the next sync, reducing the times resyncing needs to happen. Reviewed By: mont29 Maniphest Tasks: T73411 Differential Revision: https://developer.blender.org/D15885
2022-09-14Adding `const Scene*` parameter in many areas.Monique Dewanchand
Related to {D15885} that requires scene parameter to be added in many places. To speed up the review process the adding of the scene parameter was added in a separate patch. Reviewed By: mont29 Maniphest Tasks: T73411 Differential Revision: https://developer.blender.org/D15930
2022-09-14BLF: Incorrect Define UsedHarley Acheson
Replace incorrect usage of GLYPH_ASCII_TABLE_SIZE with correct KERNING_CACHE_TABLE_SIZE See D15815 for more details. Differential Revision: https://developer.blender.org/D15815 Own Code.
2022-09-14Fix T100899: Drag and Drop failing depending on window positionGermano Cavalcante
Regression introduced in rBbbf87c4f7509, which now relies on OS coordinates for Drag and Drop. These coordinates did not match on different OSs.
2022-09-14Fix: Mesh SoA format conversion skips versioningHans Goudey
Converting to the SoA format (T95965) immediately when reading meshes means that none of the changes from versioning would be applied first. This means important fixes like f14995aba70a aren't properly applied, so modifications could be done to invalid CustomData. To fix this, move the SoA changes into versioning code, in a new versioning_400.cc file. Differential Revision: https://developer.blender.org/D15919
2022-09-14Curves: Improve sculpting performance by reducing allocationsHans Goudey
The snake hook and grow/shrink brushes need some arrays for input to the length paramterization code. These were allocated and freed for every curve. Instead, use a local buffer for each task execution. Differential Revision: https://developer.blender.org/D15964
2022-09-14Mesh: Fix quadratic cost for accessing normals with RNAHans Goudey
Same as eb3a561a7fe0b22abc1, but for the mesh normal arrays introduced in b7fe27314b25a7220a.
2022-09-14Curves/PointCloud: Avoid quadratic cost for retrieving positionsHans Goudey
A "lookup_int" callback needs to be provided for RNA collections that aren't backed by DNA directly. Otherwise they will iterate from the start of the array for every access.
2022-09-14Fix T101025: Cycles motion blur crash with changing point cloud sizeHans Goudey
Caused by 410a6efb747f188da30c which didn't properly use the smallest size between the Cycles and Blender point clouds.
2022-09-14Cleanup: Add missing licence headersHans Goudey
Missed in eaf416693dcb
2022-09-14Cleanup: use proper `bool` variables in Main, instead of `char`.Bastien Montagne
2022-09-14Fix T49814: Collada Import Ignores Vertex NormalsMyron Carey
We now import and apply custom normals using a similar strategy to the STL importer. We store custom normal data for each loop as we read each MPoly and then apply it to the mesh after `BKE_mesh_calc_edges()` is called. The new behavior is optional and may be disabled in the Collada import UI. When disabled, we use the old behavior of only using normals to determine whether or not to smooth shade an MPoly. ---- Patch as requested in {T49814}. The Collada import UI now has an additional checkbox, similar to the glTF and FBX import UIs: {F13428264} Here is a test Collada file with a simple test cube with flipped custom normals: {F13428260} {F13428282} And a sphere where the two halves are disconnected geometry, but has custom normals that make the halves appear to be connected: {F13436363} {F13436368} I've tested it on a number of my own meshes, and the custom normals appear to be imported correctly. I'm not too sure about how I've plumbed the option down, though, or whether this is the most proper way to apply custom normals. Reviewed By: gaiaclary Differential Revision: https://developer.blender.org/D15804
2022-09-14Fix T100684: Correct descriptions in Python APIJoseph Micheli
The descriptions for view_layer_eval and scene_eval incorrectly duplicate the descriptions for view_layer and scene: - https://docs.blender.org/api/current/bpy.types.Depsgraph.html?highlight=depsgraph#bpy.types.Depsgraph.view_layer_eval - https://docs.blender.org/api/current/bpy.types.Depsgraph.html?highlight=depsgraph#bpy.types.Depsgraph.scene_eval This patch fixes this by changing "Original" to "Evaluated." Reviewed By: jbakker Maniphest Tasks: T100684 Differential Revision: https://developer.blender.org/D15931
2022-09-14Fix T100959: Memory leak when moving node with AltGermano Cavalcante
The memory leak happens because `ED_node_link_insert` (called after the transform operation) overwrites the pre-existing `snode->runtime->iofsd`, losing the reference without freeing the memory. So to "move" the reference from `snode->runtime->iofsd` to `op->customdata`, so that each operator works with its own data. Reviewed By: Severin Differential Revision: https://developer.blender.org/D15948
2022-09-14Cleanup: quiet warningsJacques Lucke
2022-09-14Cleanup: remove unused fields + add overrideJacques Lucke
2022-09-14Added missing license headers.Jeroen Bakker
2022-09-14Fix T100977: Wrong native Ukrainian language name in UI.Bastien Montagne
2022-09-14Optimization: Exit early when resizing material slots.Erik Abrahamsson
When assigning a huge number of materials, like when importing thousands of objects, the function `BKE_objects_materials_test_all` uses quite a lot of resources because of the way it loops through all objects to resize the mat-array. By counting the amount of processed objects and comparing to the number of users of the obdata ID, we can exit early and avoid looping through all objects every time. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D15740
2022-09-14Cleanup: remove redundant braces from assert & raiseCampbell Barton
autopep8 v1.7 added a space after assert & raise, remove the braces as they aren't needed.
2022-09-14PyDoc: add an "Advanced" section to document WITH_PYTHON_MODULECampbell Barton
Document the use cases, usage and limitations of using Blender as a Python module.
2022-09-14Fix reports printing twice when called from Python in background-modeCampbell Barton
Calling operators in background-mode always printed with the assumption that output should never be hidden. However operators called from `bpy.ops` were also printing reports to the `stdout` (needed for the Python console and generally useful). Resolve by adding a flag to signal that the owner of the ReportList is responsible for printing to the `stdout`.
2022-09-14CMake: warn when "bpy" installs into the site-packages from LIBDIRCampbell Barton
Using "../lib" as a target is unlikely to be useful, add a warning & suggest alternatives.
2022-09-14Cleanup: skip argument freeing when built as a Python moduleCampbell Barton
2022-09-14UI: Add Mix Node to color section of add node menuCharlie Jolly
This adds back the new mix node to the Color sections of the add node menu. The add menu now contains two entries for the mix node. One under Utilites/Converter which defaults for float. One under Color which defaults to color with `Mix Color` label. This was moved as part of D13749. The issue was reported on BlenderArtists. Differential Revision: https://developer.blender.org/D15887
2022-09-13Fix T100771: Incorrect strip length when timecodes are usedRichard Antalik
Some files have 2 different framerates stored in metadata. Use function `av_guess_frame_rate` to get media FPS, because it provides more consistent / correct values across multiple files. Reviewed By: sergey Differential Revision: https://developer.blender.org/D15839
2022-09-13Fix T100998: Speed effect not rendering scene strip subframesRichard Antalik
After change in 19bff8eb51f, subframe must be calculated for function `RE_RenderFrame` in order to render subframes.
2022-09-13Fix: Resolve deprecation warning when copying polygon structHans Goudey
`MPoly` is used and copied in many places. To avoid the need to use a special function for copying MPoly, or the need to add a copy constructor, just rename the `mat_nr` field to include "legacy" in the name. This keeps the original purpose of notifying developers that the field shouldn't be used without any further complexity. Apply the same fix to `bweight`. Differential Revision: https://developer.blender.org/D15841
2022-09-13Geometry Nodes: Port the trim curve node to the new data-blockMattias Fredriksson
The trim functionality is implemented in the geometry module, and generalized a bit to be potentially useful for bisecting in the future. The implementation is based on a helper type called `IndexRangeCyclic` which allows iteration over all control points between two points on a curve. Catmull Rom curves are now supported-- trimmed without resampling first. However, maintaining the exact shape is not possible. NURBS splines are still converted to polylines using the evaluated curve concept. Performance is equivalent or faster then a 3.1 build with regards to node timings. Compared to 3.3 and 3.2, it's easy to observe test cases where the node is at least 3 or 4 times faster. Differential Revision: https://developer.blender.org/D14481
2022-09-13Fix T100980: Missing deg update when duplicating a geometry nodetree in node ↵Bastien Montagne
editor. Tagging depsgraph for relation rebuild does not replace tagging IDs for update.
2022-09-13Revert hidden object optimization in depsgraphSergey Sharybin
The internal state tracking is not fully suited for such kind of optimization yet. It is probably not that much work to make them work, but the issue caused by the changes is serious enough for the studio so it feels better to revert changes for now and have a closer look into remaining issues without pressure.
2022-09-13Fix T101027: Sculpt tools don't respect visibility after recent commitHans Goudey
Caused by b5f7af31d6d4, which exposed the fact that the PBVH wasn't retrieving the updated hide status attributes if they were allocated in sculpt mode. Previously the attributes were always allocated when entering sculpt mode.
2022-09-13NLA: Remove Edited Action tab from NLA panelNate Rupsis
Removes the "Edited Action" tab for selected Action strips in the NLA editor. It is still available in the Action editor, where it is actually suitable/usable. Having it in the NLA got in the way of the actual NLA strip properties. Reviewed By: sybren, RiggingDojo Differential Revision: https://developer.blender.org/D14964
2022-09-13EEVEE: Fix volumetric resolve in large scenes.Jeroen Bakker
On NVIDIA volumetric resolve failed for large production scenes. The result would remove most color from the final render. The cause seems to be a faulty driver. This change ported the fragment shader to a compute shader which would select a different compiler branch and didn't show the error.
2022-09-13Fix: set ipo/easing in dope ignores hidden channelsWayde Moss
Animators were not able to set channel interpolation or easing type for channels visible in the dopesheet but hidden in the graph editor. Bug seemed to be due to typo. No official report, but there was a RCS on this https://blender.community/c/rightclickselect/yWgbbc/ Reviewed By: sybren, RiggingDojo Differential Revision: https://developer.blender.org/D10228
2022-09-13Fix T101031: Crash with Initialize Face Sets operatorHans Goudey
2022-09-13obj: implement support for PBR .mtl extensionsAras Pranckevicius
Implement import & export support for "PBR extensions" in .mtl files (T101029, also fixes T86736). Newly supported parameters: - Roughness (Pr, map_Pr) - Metallic (Pm, map_Pm) - Sheen (Ps, map_Ps) - Clearcoat thickness (Pc) and roughness (Pcr) - Anisotropy (aniso) and rotation (anisor) - Transmittance (Tf / Kt) Exporter has an option to enable these additional PBR parameters export; defaults to off since not all software understands that. Exporter UI tweaked and all material-related options were put into their own separate box. Added/extended test files in Subversion repository for test coverage.
2022-09-13Fix broken Cycles Metal build after recent changesBrecht Van Lommel
It was unable to find the Metal framework, thanks to Alaska for tracking this down.
2022-09-13Fix: crash when changing to viewer context in spreadsheetJacques Lucke
2022-09-13Fix compilation error on Windows after recent changeSergey Sharybin
2022-09-13EEVEE-Next: Cryptomatte render passes.Jeroen Bakker
This change adds cryptomatte render passes to EEVEE-Next. Due to the upcoming viewport compositor we also improved cryptomatte so it will be real-time. This also allows viewing the cryptomatte passes in the viewport directly. {F13482749} A surface shader would store any active cryptomatte layer to a texture. Object hash is stored as R, Asset hash as G and Material hash as B. Hashes are only calculated when the cryptomatte layer is active to reduce any unneeded work. During film accumulation the hashes are separated and stored in a texture array that matches the cryptomatte standard. For the real-time use case sorting is skipped. For final rendering the samples are sorted and normalized. NOTE: Eventually we should also do sample normalization in the viewport in order to extract the correct mask when using the viewport compositor. Reviewed By: fclem Maniphest Tasks: T99390 Differential Revision: https://developer.blender.org/D15753
2022-09-13Fix T101004: Crash when invisible object becomes visibleSergey Sharybin
A regression since ac20970bc208 The issue was caused by depsgraph clearing all id->recalc flags wrongly assuming that all IDs are fully evaluated. This change makes it so the depsgraph becomes aware of possibly incompletely evaluated IDs. Differential Revision: https://developer.blender.org/D15946
2022-09-13Cycles: Make OSL implementation independent from SVMPatrick Mours
Cleans up the file structure to be more similar to that of the SVM and also makes it possible to build kernels with OSL support, but without having to include SVM support. This patch was split from D15902. Differential Revision: https://developer.blender.org/D15949
2022-09-13Fix oneAPI compilation on modern Linux and CentOS 7 librariesSergey Sharybin
2022-09-13Cycles: Include reason the oneAPI library could not be loadedSergey Sharybin
Additionally, just stick to a pure error stating. Such messages are aimed for developers and it is rather implied that oneAPI rendering will be disabled.
2022-09-13Fix compilation on Linux, glibc 2.34, and CentOS librariesSergey Sharybin
A continuation of previous fix for malloc hooks which got removed from the new glibc library. The pre-compiled jemalloc has definitions which interpose hooks in glibc leading to linking errors with multiple hook definitions. A simple fix is to skip doing the workaround when using jemalloc from pre-compiled libraries. This will likely be revisited in the future, but for now it is important to fix compilation errors for developers.
2022-09-13CMake: exclude BLI_args when building as a Python moduleCampbell Barton
2022-09-13Cleanup: typo in variable nameCampbell Barton