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-06-02VSE: Make time operations self-containedRichard Antalik
This patch makes it possible to manipulate strips without need to use update functions to recalculate effect and meta strips. Prior to this change function `SEQ_time_update_sequence` had to be used to update mainly effects and meta strips. This was implemented in a way that relied on sorted list of strips, which can't always be done and in rare cases this approach failed. In case of meta strips, `seqbase` had to be passed and compared with "active" one to determine whether meta strip should be updated or not. This is especially weak system that is prone to bugs when functions are used by python API functions. Finally, other strip types had startdisp` and `enddisp` fields updated by this function and a lot of code relied on these fields even if strip start, length and offsets are available. This is completely unnecessary. Implemented changes: All effects and meta strips are updated when strip handles are moved or strip is translated, without need to call any update function. Function `SEQ_time_update_sequence` has been split to `SEQ_time_update_meta_strip_range` and `seq_time_update_effects_strip_range`. These functions should be only used within sequencer module code. Meta update is used for versioning, which is only reason for it not being declared internally. Sequence fields `startdisp` and `enddisp` are now only used for effects to store strip start and end points. These fields should be used only internally within sequencer module code. Use function `SEQ_time_*_handle_frame_get` to get strip start and end points. To update effects and meta strips with reasonable performance, cache for "parent" meta strip and attached effects is added to `SequenceLookup` cache, so it shares invalidation mechanisms. All caches are populated during single iteration. There should be no functional changes. Differential Revision: https://developer.blender.org/D14990
2022-06-01Merge branch 'blender-v3.2-release'Bastien Montagne
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 T98520: Sculpt operators can unintentionally clear multires maskPhilipp Oeser
Typo in {rBcf69652618fe}. Maniphest Tasks: T98520 Differential Revision: https://developer.blender.org/D15087
2022-06-01Cleanup: spelling in comments, use doxy sectionsCampbell Barton
2022-06-01Cleanup: remove redundant const qualifiers for scalar & enum typesCampbell Barton
2022-06-01Cleanup: use 'e' prefix for enum typesCampbell Barton
- CustomDataType -> eCustomDataType - CustomDataMask -> eCustomDataMask - AttributeDomain -> eAttrDomain - NamedAttributeUsage -> eNamedAttrUsage
2022-06-01Cleanup: conversion from enum/int warningCampbell Barton
2022-06-01Merge branch 'blender-v3.2-release'Joseph Eagar
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-31Merge branch 'blender-v3.2-release'Jacques Lucke
2022-05-31Fix T98454: subdivision doesn't propagate int attributesJacques Lucke
Differential Revision: https://developer.blender.org/D15083
2022-05-31Curves: Add soft selection in sculpt modeHans Goudey
This commit adds a float selection to curve control points or curves, a sculpt tool to paint the selection, and uses the selection influence in the existing sculpt brushes. The selection is the inverse of the "mask" from mesh sculpt mode currently. That change is described in more detail here: T97903 Since some sculpt tools are really "per curve" tools, they use the average point selection of all of their points. The delete brush considers a curve selected if any of its points have a non-zero selection. There is a new option to choose the selection domain, which affects how painting the selection works. You can also turn the selection off by clicking on the active domain. Sculpt brushes can be faster when the selection is small, because finding selected curves or points is generally faster than the existing brush intersection and distance checks. The main limitation currently is that we can't see the selection in the viewport by default. For now, to see the selection one has to add a simple material to the curves object as shown in the differential revision. And one has to switch to Material Preview in the 3d view. Differential Revision: https://developer.blender.org/D14934
2022-05-31Cleanup: Improve const correctness of ID functionsHans Goudey
These functions don't change their inputs, so they can be const, which is a bit more intuitive and clean to use for callers. Differential Revision: https://developer.blender.org/D14943
2022-05-31Cleanup: Move lib_override.c to C++Hans Goudey
This will allow easier const correctness and use of nicer data structures like `Vector` and `Map`.
2022-05-31Attributes: Hide internal UI attributes and disallow procedural accessHans Goudey
This commit hides "UI attributes" described in T97452 from the UI lists in mesh, curve, and point cloud properties, and disallow accessing them in geometry nodes. Internal UI attributes like selection and hiding values should use the attribute system for simplicity and performance, but we don't want to expose those attributes in the attribute panel, which is meant for regular user interaction. Procedural access may be misleading or cause problems, as described in the design task above. These attributes are added by two upcoming patches: D14934, D14685 Differential Revision: https://developer.blender.org/D15069
2022-05-31Cleanup: tabs to spaces for CMake files & sort file-listsCampbell Barton
2022-05-30Cleanup: Move attribute.c to C++Hans Goudey
2022-05-30Cleanup: Clang tidyHans Goudey
Mostly duplicate includes, also use nullptr, and using default member initializers.
2022-05-30LibOverride: Add full support for camera's background images.Bastien Montagne
Add support for adding (inserting) new background images into an override of a linked Camera ID. Request from the Blender studio. This ended up being more involved than expected as it uncovered some latent issues with existing background images code. Noticiably, a new `BKE_camera_background_image_copy` had to be added to handle copying of background images in a proper, generic ID-management way.
2022-05-30Cleanup: Move attribute domain count out of enumHans Goudey
The number of attribute domains is not an attribute domain. This way it doesn't have to be handled in switch statements. Differential Revision: https://developer.blender.org/D15065
2022-05-30Merge remote-tracking branch 'origin/blender-v3.2-release'Dalai Felinto
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-30Cleanup: use class instead of structJacques Lucke
2022-05-30Fix T98444: Image.save_render not using scene output file typeBrecht Van Lommel
Also simplify logic because (source == IMA_SRC_VIEWER) and ELEM(type, IMA_TYPE_R_RESULT, IMA_TYPE_COMPOSITE) are the same thing.
2022-05-30Cleanup: make formatDalai Felinto
2022-05-30Merge branch 'blender-v3.2-release'Antonio Vazquez
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-30Nodes: add separately allocated runtime data for nodes and socketsJacques Lucke
This is a follow up to rBbb0fc675822f313c5546a2498a162472c2571ecb. Now the same kind of run-time data is added to nodes and sockets. Differential Revision: https://developer.blender.org/D15060
2022-05-30Merge branch 'blender-v3.2-release'Brecht Van Lommel
2022-05-30Cleanup: fix various typosBrecht Van Lommel
Contributed by luzpaz Differential Revision: https://developer.blender.org/D15057
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-30Cleanup: Fix typoHans Goudey
Contributed by @luzpaz Differential Revision: https://developer.blender.org/D15058
2022-05-30Nodes: add separately allocated run-time data for bNodeTreeJacques Lucke
`bNodeTree` has a lot of run-time embedded in it currently. Having a separately allocated run-time struct has some benefits: * Run-time data is not stored in files. * Makes it easy to use c++ types as run-time data. * More clear distinction between what data only exists at run-time and which doesn't. This commit doesn't move all run-time data to the new struct yet, only the data where I know for sure how it is used. The remaining data can be moved separately. Differential Revision: https://developer.blender.org/D15033
2022-05-30Nodes: call init function for new node trees in ntreeAddTreeJacques Lucke
Issue found in D15033, for some more info see comments there.
2022-05-30Cleanup/simplify BKE_fcurve_find_by_rna_context_ui code.Bastien Montagne
From reading the code it looks like at some point the code was expecting the `tptr` PointerRNA to change during the loop? But currently it did not make any sense to have this complex looping and multi-checking of RNA path and animdata, since the RNA pointer (and therefore its `owner_id`) is never modified... NOTE: there could be much more cleanup done in that area, goal of this commit is mainly to simplify the logic by removing all the (seamingly) dead code. Differential Revision: https://developer.blender.org/D15026
2022-05-30Merge branch 'blender-v3.2-release'Jacques Lucke
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-30Cleanup: Tweak geometry component commentsHans Goudey
2022-05-29Fix: Failed assert for evaluated lengths of single point curvesHans Goudey
Since 2d80f814cc249d26b01f, curves always have evaluated points, but single point curves do no have any evaluated segments, and the leading zero length isn't stored in the curves length cache.
2022-05-29Cleanup: Simplify custom data file writing processHans Goudey
Previously the function had a fair amount of ugly boilerplate to avoid allocating the temporary layers array, and then free it if necessary. `blender::Vector` solves that problem more elegantly. Passing a span, using references in a few cases, and using a switch statement also make the functions simpler. This refactoring is in preparation for D14583 and D14685. Differential Revision: https://developer.blender.org/D15011
2022-05-28Merge remote-tracking branch 'origin/blender-v3.2-release'Jesse Yurkovich
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-27Cleanup: Use new macro for deprecated ID typesJulian Eisel
Uses the macro introduced in b45f410b315 where it makes sense.
2022-05-27Merge remote-tracking branch 'origin/blender-v3.2-release'Kévin Dietrich
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-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-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-25Merge branch 'blender-v3.2-release'Bastien Montagne