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-10-24Merge branch 'master' into universal-scene-descriptionMichael Kowalski
2022-10-24Fix T100571: Subdivision disabled with Orbit Around SelectionGermano Cavalcante
The bug has existed since crasy space was implemented. rBbf8a26b7453d made the error even worse as the `modifiers_disable_subsurf_temporary` function, which works like a toggle, did not temporarily re-enable subsurf. The main problem is that the derived mesh is modified but not marked as dirty at the end.
2022-10-24Fix T101210: invalid internal node links lead to crashJacques Lucke
Internal links are run-time/derived data. Therefore it is not necessary to load them from .blend files where invalid internal links may be stored. They will be regenerated after a node tree is loaded anyway.
2022-10-23Fix T101607: Changing Image source inadvertently clears file pathJesse Yurkovich
This could result in wrong behavior depending on the order in which the Image.filepath and Image.source fields are set from within Python for example. Caused by rB72ab6faf5d80
2022-10-22Fix T101329: EXR 'JPG Preview' doesn't use color space anymoreLukas Stockner
For the JPG preview, the only thing that was changed in the image format was the format itself. However, the colorspace code now also checks the bitdepth through BKE_image_format_is_byte, so the depth needs to be explicitly set to 8-bit for the JPG preview output.
2022-10-22Fix T101930: NLA Actions Stash remove doesn't work on overriden linked data.Bastien Montagne
Code adding stash track was clearing out track flags, instead of editing them as it should have... Note that there are a lot of other weaknesses in action stash code (like relying on the (translated!!!!!!) name of the track to know whether it's a stah or not).
2022-10-22Video rendering: FFMpeg AV1 codec encoding supportStephen Seo
Previously, the Blender video renderer did not have support for encoding video to AV1 (not to be confused with the container AVI). The proposed solution is to leverage the existing FFMpeg renderer to encode to AV1. Note that avcodec_find_encoder(AV_CODEC_ID_AV1) usually returns "libaom-av1" which is the "reference implementation" for AV1 encoding (the default for FFMpeg, and is slow). "libsvtav1" is faster and preferred so there is extra handling when fetching the AV1 codec for encoding such that "libsvtav1" is used when possible. This commit should only affect the options available for video rendering, which includes the additional AV1 codec to choose from, and setting "-crf". Also note that the current release of FFMpeg for ArchLinux does not support "-crf" for "libsvtav1", but the equivalent option "-qp" is supported and used as a fallback when "libsvtav1" is used (as mentioned here: https://trac.ffmpeg.org/wiki/Encode/AV1#SVT-AV1 ). (Actually, both "-crf" and "-qp" is specified with the same value in the code. When a release of FFMpeg obtains support for "-crf" for "libsvtav1" is released, the code shouldn't be needed to change.) The usage of the AV1 codec should be very similar to the usage of the H264 codec, but is limited to the "mp4" and "mkv" containers. This patch pertains to the "VFX & Video" module, as its main purpose is to supplement the Video Sequencer tool with the additional AV1 codec for encoded video output. Differential Revision: https://developer.blender.org/D14920 Reviewed By: sergey , ISS, zeddb
2022-10-20Lib reload/relocate: Improve performances.Bastien Montagne
Reduce amounts of viewlayer updates during remapping while relocating libraries. Gives some improvements on relocating process, depending on complexity of existing scene and reloaded libraries, whether there is liboverrides to resync, etc., can give up to 10% speedup.
2022-10-20Fix (studio-reported) issue with overrides on library relocating.Bastien Montagne
Liboverrides that were using a missing linked reference ID would not get their 'MISSING' tag properly cleared afer relocating, in case their linked reference is no more missing. Reported by Andy (@eyecandy) from Blender studio.
2022-10-19Fix T101926: Curves: Remove type-specific attributes when deletingHans Goudey
Remove NURBS or Bezier specific attributes after removing points or curves. In theory we could avoid copying those attributes in the first place, but that doesn't seem worth the extra complexity here, since we don't necessarily know the result curve type counts before copying attributes.
2022-10-19Fix T101622: Sequencer channels not updating while panning viewYann Lanthony
`V2D_VIEWSYNC_AREA_VERTICAL` flag was mistakenly set to the sequencer toolbar region instead of the channels region. Reviewed By: ISS Differential Revision: https://developer.blender.org/D16155
2022-10-19Fix: Geometry Nodes: Memory leak when deleting instancesHans Goudey
The instance attributes assignment operators were broken in multiple ways: there wasn't a move constructor (probably causing performance issues), and the destination attributes weren't freed before they were replaced.
2022-10-19Geometry Nodes: Use common utility for copying attribute dataHans Goudey
Attribute copying often uses identical logic for copying selected elements or copying with an index map. Instead of reimplementing this in each file, use the common implementation in the array_utils namespace. This makes the commonality more obvious, gives improved performance (this implementation is multithreaded), reduces binary size (I observed a 173KB reduction), and probably reduces compile time.
2022-10-19Fix (devs-reported) mistake in batch delete code in recent change.Bastien Montagne
Mistake in own rB358155a8da60, change ended up discarding the case where we need to also delete IDs using a tagged-to-be-deleted ID in a 'never NULL' way. Typical example: Whene deleting a Mesh ID, one also needs to delete all the Objects using that mesh, since obdata pointer is of type 'never NULL'. Note that luckily, this fix does not affect the performance improvements from rB358155a8da60. Noted by Brecht and Clement because of failing unittests, shame on me.
2022-10-19Fix T101922: transforming surface points misses redrawPhilipp Oeser
Oversight in rBf8b1483566cc which resulted in fonts/surfaces not having their draw caches being tagged dirty. Not only OB_CURVES_LEGACY have their object data of type ID_CU_LEGACY, but also OB_SURF/OB_FONT objects. Maniphest Tasks: T101922 Differential Revision: https://developer.blender.org/D16298
2022-10-19Fix T101888: Curves editmode: modifiers "Display in Edit mode" no effectPhilipp Oeser
Add the eModifierMode_Editmode to the required modes for curves modifier evaluation. Only this way the modifier can be skipped in evaluation. Maniphest Tasks: T101888 Differential Revision: https://developer.blender.org/D16280
2022-10-19Fix (unreported) error messages about invalid ID usercount when ↵Bastien Montagne
batch-deleting IDs. Batch-delete by-passes a lot of ID usages handling in to-be-deleted IDs, so usercount of deleted IDs needs to be manually reset to avoid the annoying error messages in the console.
2022-10-19Make batch ID deletion 100 times faster.Bastien Montagne
Simplify and optimize remapping handling in bacth ID deletion, by moving it outside of the initial loop gathering all IDs to be deleted, and and by using batch remapping code. Speedup can be over 100 times faster in complex production scenes using thousands of IDs, when e.g. deleting a whole library. Examples before/after times on my machine (deleting two different libraries): lib1: 5.55 sec/0.03 sec lib2: 13.60 sec/0.13 sec Found while investigating T101903.
2022-10-19Fix T101903: Crash when deleting library in some cases.Bastien Montagne
Remapping in batch deletion could end up calling viewlayer resync code on partially invalid BMain (some IDs still in Main using IDs removed from Main). Think this code can actually be further optimized, but this fix should be safe enough for 3.3 (and potentially 2.93). Thanks to Jeroen (@jbakker) for the initial investigation.
2022-10-19Sculpt curves: Fix BKE_paint_object_mode_from_paintmodePhilipp Oeser
Currently harmless (since atm. it is not possible to trigger this part of the code from curves sculpting), but in a future fix (for T101518), it would be good to use `BKE_paint_init` (and having the correct ob_mode for the brush would be nice). Differential Revision: https://developer.blender.org/D16286
2022-10-19Cleanup: remove NDOF_BUTTON_NONE from the range of usable buttonsCampbell Barton
This is used to represent unknown state, so there is no need to be able to store it's pressed state.
2022-10-19Cleanup: spelling in commentsCampbell Barton
2022-10-18Fix T101883: Issue applying modifier to mesh with shape keysHans Goudey
Caused by 21f2bacad977d3fd83d which misunderstood the logic handling shape keys in this function. The shape key on the original mesh in the main data-base should be cleared if the "no-main" mesh doesn't have any shape key layers and the vertex count has changed. The complexity is necessary because shape keys are stored differently on original and evaluated meshes. Also change to "Warn" because this is expected behavior in some cases, like when applying a geometry nodes modifier that creates a new mesh from scratch.
2022-10-18Merge branch 'master' into universal-scene-descriptionMichael Kowalski
2022-10-18Fix T101660: crash when trying to propagate string attributes in some nodesJacques Lucke
String attributes are intentionally not fully supported in geometry nodes yet because more design work is necessary to decide how they should behave. For now just disable handling string attributes to avoid crashes.
2022-10-18Cleanup: add missing CPPType for MStringPropertyJacques Lucke
2022-10-18Brush: Wrap mtex/mask_tex around functions.Jeroen Bakker
`Brush` has two attributes for holding texture information (`MTex`). One for color textures (`mtex`) and one for mask textures (`mask_mtex`). Unfortunately sculpt mode due to reasons used `mtex` to store mask textures. Changes like brush asset/paint mode require modes/tools to read the mask/color texture from one place. To start sanatizing this we isolate the attributes in functions. `BKE_brush_color_texture_get` and `BKE_brush_mask_texture_get`. All object paint modes should use these functions.
2022-10-17Weight Paint: relax heuristic to determine when final mesh can be used.Alexander Gavrilov
Checking for polygon and loop data to be referenced is too fragile re changes in geometry node implementations. Instead, compare counts of polygons, face corners and vertices: topology changes are unlikely to keep all three unchanged. Ref D15501
2022-10-17Sculpt: add versioning for Auto-masking cavity factor defaultPablo Vazquez
Also remove automasking_cavity_factor default from RNA for brushes. Data-blocks set their defaults via `DNA_brush_defaults.h` Continuation from previous commit and rBdb40b6 Thanks to Dalai for the help!
2022-10-17Cleanup: compiler warningsBrecht Van Lommel
2022-10-17Fix AssetCatalogTest failure on WIN32Campbell Barton
Recent changes to path handling (most likely [0]) caused AssetCatalogTest.create_catalog_after_loading_file to fail on WIN32. The test relied on the resulting path to be joined with "/" as a path separator. The resulting path used both forward and back-slashes. While these do work for some API's on WIN32, mixing both in a file path isn't expected behavior in most cases, so update the tests to use native slash direction for file-paths. [0]: 9f6a045e23cf4ab132ef78eeaf070bd53d0c509f
2022-10-17Fix T101705: crash when connecting reroute to multi-input socketIliya Katueshenock
Differential Revision: https://developer.blender.org/D16203
2022-10-17Geometry Nodes: separate Instances from InstancesComponentJacques Lucke
This makes instance handling more consistent with all the other geometry component types. For example, `MeshComponent` contains a `Mesh *` and now `InstancesComponent` has a `Instances *`. Differential Revision: https://developer.blender.org/D16137
2022-10-17Cleanup: replace BLI_join_dirfile with BLI_path_joinCampbell Barton
These functions are almost identical, the main difference being BLI_join_dirfile didn't trim existing slashes when joining paths however this isn't an important difference that warrants a separate function.
2022-10-17BLI_path: remove trailing NULL argument to BLI_path_joinCampbell Barton
Using varargs had the disadvantages, replace with a macro which has some advantages. - Arguments are type checked. - Less verbose. - Unintended NULL arguments would silently terminate joining paths. - Passing in a NULL argument warns with GCC.
2022-10-17Cleanup: spelling in comments, unused arg warningCampbell Barton
2022-10-16Sculpt: Fix T101864: Mask initialization not updating multires dataJoseph Eagar
BKE_sculpt_mask_layers_ensure now takes a depsgraph argument and will evaluate the depsgraph if a multires mask layer is added. This is necassary to update the multires runtime data so that pbvh knows it has a grids mask layer. Also added code to update pbvh->gridkey.
2022-10-16Fix T101394: Ensure all viewlayers on scene copy.Monique Dewanchand
When a scene copy is called, all viewlayers are ensured before they are copied. In case of multiple viewlayers, a viewlayer can be out of sync. This triggers an assert in the BKE_view_layer_copy_data. Reviewed By: mont29 Maniphest Tasks: T101394 Differential Revision: https://developer.blender.org/D16214
2022-10-16Fix T99450: Animated Holdout not updating on frame changeLukas Stockner
Problem here was that layer_collection_objects_sync wasn't called when the holdout property is updated due to frame change, so the changed visibility flag was never applied to ob->base_flag. Turns out there's no real reason to handle the per-object holdout property through the layer system. So, instead of merging both the layer holdout and object holdout into base_flag and checking that from the render engines, only handle the layer holdout (which can't be animated, so no issue here) through base_flag and explicitly also check the object holdout in the render engines.
2022-10-15Sculpt: Ensure faces are uniquely assigned to PBVHNodesJoseph Eagar
PBVH_FACES and PBVH_GRIDS do not store faces directly in nodes; instead they store 'primitives', which are tesselation triangles for PBVH_FACES and grids (which are per-loop) for PBVH_GRIDS. Primitives from the same face could sometimes end up in different PBVH nodes. This is now prevented in two ways: * All primitives of the same face are given the same boundary during PBVH build. This prevents them from being swapped away from each other during partitioning. * build_sub adjusts the final partition midpoint to fall between primitives of different faces.
2022-10-15Sculpt: fix crash when instancing sculpt objectsJoseph Eagar
2022-10-13Fix: Attribute layers can be skipped in Mesh to BMesh conversionHans Goudey
In some situations, layers were filled with their default value when converting from Mesh to BMesh (entering edit mode, for example). This was caused by the recently added "copy mesh to bmesh" or "merge mesh to bmesh" custom data functions creating a difference custom data format than was used for the copying functions used later. `CustomData_to_bmesh_block` is not robust enough to handle simple differences in layout between the layout of the source and result CustomData layers, because it relies on the order of the types and the number of layers within each type. As a fix, make the "mesh to bmesh" special case more explicit in the conversion functions. This makes the difference in the API smaller, which is a nice improvement anwyay. Fixes T101796
2022-10-13Cleanup: Use std::mutex for mesh runtime mutexesHans Goudey
Instead of allocating three separate ThreadMutex pointers, just embed std::mutex into the struct directly.
2022-10-13Mesh: Move runtime data out of DNAHans Goudey
This commit replaces the `Mesh_Runtime` struct embedded in `Mesh` with `blender::bke::MeshRuntime`. This has quite a few benefits: - It's possible to use C++ types like `std::mutex`, `Array`, `BitVector`, etc. more easily - Meshes saved in files are slightly smaller - Copying and writing meshes is a bit more obvious without clearing of runtime data, etc. The first is by far the most important. It will allows us to avoid a bunch of manual memory management boilerplate that is error-prone and annoying. It should also simplify future CoW improvements for runtime data. This patch doesn't change anything besides changing `mesh.runtime.data` to `mesh.runtime->data`. The cleanups above will happen separately. Differential Revision: https://developer.blender.org/D16180
2022-10-13Cleanup: Use correct blenkernel namespace for mesh functionsHans Goudey
2022-10-12Fix T101711: Curve to points node sometimes skips initializing radiusHans Goudey
Don't add the radius attribute to point clouds by default, since not having a radius attribute should be a valid state. The radius is only set when a radius attribute also exists on curves.
2022-10-12Cleanup: Use const vertex pointer argumentHans Goudey
2022-10-12Cleanup: use 'u' prefixed unsigned typesCampbell Barton
2022-10-12Cleanup: use commented arguments for unused args in C++Campbell Barton
2022-10-11Sculpt: Fix T101595: sculpt_attribute_update_refs called in wrong placeJoseph Eagar
Needs to go after the assignment to ob->sculpt->pbvh, not before.