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-02-18Cleanup: Rename original curve object type enumHans Goudey
This commit renames enums related the "Curve" object type and ID type to add `_LEGACY` to the end. The idea is to make our aspirations clearer in the code and to avoid ambiguities between `CURVE` and `CURVES`. Ref T95355 To summarize for the record, the plans are: - In the short/medium term, replace the `Curve` object data type with `Curves` - In the longer term (no immediate plans), use a proper data block for 3D text and surfaces. Differential Revision: https://developer.blender.org/D14114
2022-02-18Curves: add initial edit mode supportKévin Dietrich
This adds initial support for edit mode for the experimental new curves object. For now we can only toggle in and out of the mode, no real interraction is possible. This patch also adds empty menus in edit mode. Those were added mainly to quiet warnings as the menus are programmatically added to the edit mode based on the object type and context. Ref T95769 Reviewed By: JacquesLucke, HooglyBoogly Maniphest Tasks: T95769 Differential Revision: https://developer.blender.org/D14136
2022-02-18Curves: initial brush system integration for curves sculpt modeJacques Lucke
This adds the boilerplate code that is necessary to use the tool/brush/paint systems in the new sculpt curves mode. Two temporary dummy tools are part of this patch. They do nothing and only serve to test the boilerplate. When the first actual tool is added, those dummy tools will be removed. Differential Revision: https://developer.blender.org/D14117
2022-02-17Cleanup: Replace direct `id.lib` pointer checks with `ID_IS_LINKED` macro ↵Bastien Montagne
usages.
2022-02-17Cleanup/fix comment.Bastien Montagne
2022-02-17XR: Allow variable count of action map subactionsPeter Kim
Previously, the number of action map subactions was limited to two per action (identified by user_path0, user_path1), however for devices with more than two user paths (e.g. Vive Tracker) it will be useful to support a variable amount instead. For example, a single pose action could then be used to query the positions of all connected trackers, with each tracker having its own subaction tracking space. NOTE: This introduces breaking changes for the XR Python API as follows: - XrActionMapItem: The new `user_paths` collection property replaces the `user_path0`/`user_path1` properties. - XrActionMapBinding: The new `component_paths` collection property replaces the `component_path0`/`component_path1` properties. Reviewed By: Severin Differential Revision: https://developer.blender.org/D13949
2022-02-16Curves: Further implementation of new curves data structureHans Goudey
The general idea here is to wrap the `CurvesGeometry` DNA struct with a C++ class that can do most of the heavy lifting for the curve geometry. Using a C++ class allows easier ways to group methods, easier const correctness, and code that's more readable and faster to write. This way, it works much more like a version of `CurveEval` that uses more efficient attribute storage. This commit adds the structure of some yet-to-be-implemented code, the largest thing being mutexes and vectors meant to hold lazily calculated evaluated positions, tangents, and normals. That part might change slightly, but it's helpful to be able to see the direction this commit is aiming in. In particular, the inherently single-threaded accumulated lengths and Bezier evaluated point offsets might be cached. Ref T95355 Differential Revision: https://developer.blender.org/D14054
2022-02-16UV: move sticky selection from image space into tool settingsCampbell Barton
Having this setting stored in the image space caused low level selection logic to have to pass around the image space (which could be NULL in some cases). Use the tool-settings instead since there doesn't seem to be much/any advantage in having this setting per-space.
2022-02-16Cleanup: clang-format, use static sets, sort struct declarationsCampbell Barton
2022-02-15Curves: add initial sculpt modeJacques Lucke
This adds a new sculpt mode to the experimental new curves object. Currently, this mode can only be entered and exited, nothing else. The main initial purpose of this node will be to use it for hair grooming. The patch also adds the `editors/curves/` directory for the new curves object, which will be necessary for many other things as well. I added a completely new mode (`OB_MODE_SCULPT_CURVES`), because `OB_MODE_SCULPT` seems to be rather specific to meshes, and reusing it doesn't seem worth the trouble. The tools/brushes used in mesh vs. curves sculpt mode are quite distinct as well. I had to add DNA_userdef_enums.h to make the patch compile with C++ (forward declaration of enums isn't allowed). This follows the same pattern that we use for other enums in dna. Differential Revision: https://developer.blender.org/D14107
2022-02-14Merge branch 'blender-v3.1-release'Jeroen Bakker
2022-02-14Phase out IMA_GPU_REFRESH.Jeroen Bakker
IMA_GPU_REFRESH is replaced by BKE_image_partial_update_mark_full_update and should not be used anymore.
2022-02-11Remap multiple items in referenced data.Jeroen Bakker
This patch increases the performance when remapping data. {D13615} introduced a mechanism to remap multiple items in a single go. This patch uses the same mechanism when remapping data inside ID datablocks. Benchmark results when loading the village scene of sprite fright on AMD Ryzen 7 3800X 8-Core Processor Before this patch 115 seconds When patch applied less than 43 seconds There is still some room for improvement by porting relink code. Reviewed By: mont29 Maniphest Tasks: T95279 Differential Revision: https://developer.blender.org/D14043
2022-02-11Cleanup: remove white-space before headersCampbell Barton
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2022-02-11Cleanup: clang-formatCampbell Barton
2022-02-10Cleanup: Remove defenition for unused flagHans Goudey
2022-02-10Refactor: Move PBVH update tag out of MVertHans Goudey
This is part of the project of converting `MVert` into `float3`. (more details in T93602), The pbvh update flag is removed and replaced with a bitmap stored in the PBVH structure. This patch is similar to D13878. This is mainly setup for an eventual performance improvement by removing the extra data from mesh vertices, but if it's consistent with testing in the other patch doing the same thing for another "temp tag", then it may actually increase the speed of sculpt code slightly, since less memory needs to be loaded when checking/changing the flags. Differential Revision: https://developer.blender.org/D14000
2022-02-10GPencil: Update-on-write using update cacheFalk David
This implements the update cache described in T95401. The cache is currently only used for drawing strokes and sculpting (using the push brush). **Note: Making use of the cache throughout grease pencil will have to be done incrementally in other patches. ** The update cache stores what elements have changed in the original data-block since the last time the eval object was updated. Additionally, the update cache can store multiple updates to the data and minimizes the number of elements that need to be copied. Elements can be tagged using `BKE_gpencil_tag_full_update` and `BKE_gpencil_tag_light_update`. A full update means that the element itself will be copied but also all of the content inside. E.g. when a layer is tagged for a full update, the layer, all the frames inside the layer and all the strokes inside the frames will be copied. A light update means that only the properties of the element are copied without any of the content. E.g. if a layer is tagged with a light update, it will copy the layer name, opacity, transform, etc. When the update cache is in use (e.g. elements have been tagged) then the depsgraph will not trigger a copy-on-write, but an update-on-write. This means that the update cache will be used to determine what elements have changed and then only those elements will be copied over to the eval object. If the update cache is empty or the data block was tagged with a full update, we always fall back to a copy-on-write. Currently, the update cache is only used by the active depsgraph. This is because we need to free the update cache after an update-on-write so it's reset and we need to make sure it is not freed or read by other depsgraphs. Co-authored-by: @yann-lty This patch was contributed by The SPA Studios. Reviewed By: sergey, antoniov, #dependency_graph, pepeland, mendio Maniphest Tasks: T95401 Differential Revision: https://developer.blender.org/D13984
2022-02-09Cleanup: make file headers more consistentCampbell Barton
Also some descriptive text into doc-strings.
2022-02-09VSE: Use float for transformation offsetRichard Antalik
When image position is animated, float makes movement look smoother.
2022-02-09Cleanup: move file descriptions into doxygen file sectionCampbell Barton
Continuation of 19100aa57d847699d17527b76c2fab1f4ab88885.
2022-02-08Cleanup: simplify DNA genfile castingCampbell Barton
Avoid using the uint64_t as an intermediate cast since it complicates behavior for signed types (which first need to be cast to an int64_t). Assign both old_value_i & old_value_f from the original value to avoid the need for different handling of signed/unsigned types. Reviewed By: JacquesLucke Ref D14039
2022-02-08LibOverride: Add 'hierarchy root ID' info.Bastien Montagne
This change will make handling of liboverrides hierarchies (especially resyncing) much easier and efficient. It should also make it more resilient to 'degenerate' cases, and allow proper support of things like parenting an override to another override of the same linked data (e.g. a override character parented to another override of the same character). NOTE: this commit only implements minimal changes to add that data and generate it for existing files on load. Actual refactor of resync code to take advantage of this new info will happen separately.
2022-02-08Cleanup: clang-formatCampbell Barton
2022-02-08Fix dna_genfile error converting signed int types to floating pointCampbell Barton
Regression in 51befa4108128a7bacf7a201046cf7ede999833a caused negative values to overflow into a uint64_t. Resolve by casting to a signed int from originally signed types. This caused D14033 not to work properly.
2022-02-08Cleanup: use an intermediate value for cast_primitive_typeCampbell Barton
Assign the actual value before casting to large uint64_t/double types. This improves readability, especially in cases where both pointer and integer casts were used in one expression, to make matters worse clang-format treated these casts as a multiplication. This also made debugging/printing the values more of a hassle. No functional changes (GCC produced identical output).
2022-02-07Curves: Rename "Hair" types, variables, and functions to "Curves"Hans Goudey
Based on discussions from T95355 and T94193, the plan is to use the name "Curves" to describe the data-block container for multiple curves. Eventually this will replace the existing "Curve" data-block. However, it will be a while before the curve data-block can be replaced so in order to distinguish the two curve types in the UI, "Hair Curves" will be used, but eventually changed back to "Curves". This patch renames "hair-related" files, functions, types, and variable names to this convention. A deep rename is preferred to keep code consistent and to avoid any "hair" terminology from leaking, since the new data-block is meant for all curve types, not just hair use cases. The downside of this naming is that the difference between "Curve" and "Curves" has become important. That was considered during design discussons and deemed acceptable, especially given the non-permanent nature of the somewhat common conflict. Some points of interest: - All DNA compatibility is lost, just like rBf59767ff9729. - I renamed `ID_HA` to `ID_CV` so there is no complete mismatch. - `hair_curves` is used where necessary to distinguish from the existing "curves" plural. - I didn't rename any of the cycles/rendering code function names, since that is also used by the old hair particle system. Differential Revision: https://developer.blender.org/D14007
2022-02-07VSE: Add filter method to strip transformDimitry Kaplin
Previously, nearest interpolation filter was used for preview, because it offered good performance and bilinear was used for rendering. This is not always desirable behavior, so filter method can now be chosen by user. Chosen method will be used for preview and for rendering. Reviewed By: ISS Differential Revision: https://developer.blender.org/D12807
2022-02-04Cleanup: Remove unused "init" node tree flagHans Goudey
The value of this flag was set, but not used anywhere. Differential Revision: https://developer.blender.org/D13519
2022-02-04Attributes: Infrastructure for generic 8-bit integer data typeHans Goudey
This commit adds infrastructure for 8 bit signed integer attributes. This can be useful given the discussion in T94193, where we want to store spline type, Bezier handle type, and other small enums as attributes. This is only exposed in the interface in the attribute lists, so it shouldn't be an option in geometry nodes, at least for now. I expect that this type won't be used directly very often, it should mostly be cast to an enum type. However, with support for 8 bit integers, it also makes sense to add things like mixing implementations for consistency. Differential Revision: https://developer.blender.org/D13721
2022-02-04Fix T93425: makesdna crashes during build with LTO on s390x LinuxCampbell Barton
DNAstr was assumed to be 4-byte aligned which is not necessarily the case for byte-arrays. Use a compiler attribute to ensure this is the case. Thanks to @mtasaka for investigating and providing a patch.
2022-02-04Remove internal proxy code, and deprecate related DNA data.Bastien Montagne
Part of T91671. Not much else to say, this is mainly a massive deletion of code. Note that a few cleanups possible after this proxy removal were kept out of this commit to try to reduce a bit its size. Reviewed By: sergey, brecht Maniphest Tasks: T91671 Differential Revision: https://developer.blender.org/D13995
2022-02-03Cleanup: Add comment about unsed custom data typeHans Goudey
Since f59767ff97295404d, these hair layer types are unused. Since DNA compatibility was broken with any files that would contain them, the indices can be reused to avoid growing custom data's typemap.
2022-02-03Curves: Changes to the new curves data-blockHans Goudey
This patch refactors the "Hair" data-block, which will soon be renamed to "Curves". The larger change is switching from an array of `HairCurve` to find indices in the points array to simply storing an array of offsets. Using a single integer instead of two halves the amount of memory for that particular array. Besides that, there are some other changes in this patch: - Split the data-structure to a separate `CurveGeometry` DNA struct so it is usable for grease pencil too. - Update naming to be more aligned with newer code and the style guide. - Add direct access to some arrays in RNA -- Radius is now retrieved as a regular attribute in Cycles. -- `HairPoint` has been renamed to `CurvePoint` -- `HairCurve` has been renamed to `CurveSlice` - Add comments to the struct in DNA. The next steps are renaming `Hair` -> `Curves`, and adding support for other curve types: Bezier, Poly, and NURBS. Ref T95355 Differential Revision: https://developer.blender.org/D13987
2022-02-03Merge branch 'blender-v3.1-release'Campbell Barton
2022-02-03Fix T66913: undo after frame-change doesn't refresh properlyCampbell Barton
Use the ID.recalc flag to detect when updates after frame-change is needed. Since comparing the last calculated frame doesn't take undo into account (see code-comment for details). `ID_RECALC_AUDIO_SEEK` has been renamed to `ID_RECALC_FRAME_CHANGE` since this is not only related to audio however internally this flag is still categorized in `NodeType::AUDIO`. Reviewed By: sergey Ref D13942
2022-02-03Merge branch 'blender-v3.1-release'Sergey Sharybin
2022-02-03Fix assert in original modifiers pointer update functionSergey Sharybin
The issue was happening with a specific file where the ID management code was not fully copying all modifiers because of the extra check in the `BKE_object_support_modifier_type_check()`. While it is arguable that copy-on-write should be a 1:1 copy there is no real need to maintain the per-modifier pointer to its original. Use its SessionUUID to perform lookup in the original datablock. Downside of this approach is that it is a linear lookup instead of direct pointer access, but the upside is that there is less pointers to manage and that the file with unsupported modifiers does behave correct without any asserts. Differential Revision: https://developer.blender.org/D13993
2022-02-02Remove option to not auto-convert proxies on file load.Bastien Montagne
Now all proxies will always be converted to library overrides. If conversion fails, they are simply 'disabled'. This should be the last 'user-visible' step of proxies removal. Remaining upcoming commits will remove internal ID management, depsgraph and evaluation code related to proxies. Also bump the blendfile subversion. Part of T91671.
2022-02-02Docs: note that Bone.xwidth & zwidth are doubledCampbell Barton
2022-01-29Cleanup: Remove mesh vertex "temp tag" flagHans Goudey
As part of the project of converting `MVert` into `float3` (more details in T93602), this is an easy step, since it is only locally used runtime data. In the six places it was used, the flag was replaced by a local bitmap. By itself this change has no benefits other than making some code slightly simpler. It only really matters when the other flags are removed and it can be removed from `MVert` along with the bevel weight. Differential Revision: https://developer.blender.org/D13878
2022-01-28Fix T95060: Outliner: Broken 'make override hierarchy' in indirect linked casae.Bastien Montagne
In Outliner, 'Make Override Hierarchy' on an indirectly linked data would fail in case some items higher up in the hierarchy also needed to be overridden was also indirectly linked.
2022-01-28Fix T95060: Outliner: Broken 'make override hierarchy' in indirect linked casae.Bastien Montagne
In Outliner, 'Make Override Hierarchy' on an indirectly linked data would fail in case some items higher up in the hierarchy also needed to be overridden was also indirectly linked.
2022-01-28Image: Partial Update Redesign.Jeroen Bakker
This patch reimplements the image partial updates. Biggest design motivation for the redesign is that currently GPUTextures must be owned by the image. This reduces flexibility and adds complexity to a single component especially when we want to have different structures. The new design is not limited to GPUTextures and can also be used by reducing overhead in image operations like scaling. Or partial image updating in Cycles. The usecase in hand is that we want to support virtual images in the image editor so we can work with images that don't fit in a single GPUTexture. Using `BKE_image_partial_update_mark_region` or `BKE_image_partial_update_mark_full_update` a part of an image can be marked as dirty. These regions are stored per ImageTile (UDIM). When a part of the code wants to receive partial changes it needs to construct a `PartialUpdateUser` by calling `BKE_image_partial_update_create`. As long as this instance is kept alive the changes can be received. When a user wants to update its own data it will call `BKE_image_partial_update_collect_changes` This will collect the changes since the last time the user called this function. When the partial changes are available the partial change can be read by calling `BKE_image_partial_update_get_next_change` It can happen that the introduced mechanism doesn't have the data anymore to construct the changes since the last time a PartialUpdateUser requested it. In this case it will get a request to perform a full update. Maniphest Tasks: T92613 Differential Revision: https://developer.blender.org/D13238
2022-01-27Geometry Nodes: String to Curves Line/Pivot PointErik
Adds two new attribute outputs: "Line" outputs the line number of the character. "Pivot Point" outputs the selected pivot point position per char. Some refactoring of the text layout code. Differential Revision: https://developer.blender.org/D13694
2022-01-26Cleanup: spelling in commentsCampbell Barton
2022-01-26Cleanup: Remove useless commentsHans Goudey
2022-01-25Nodes: Improve link-drag search support for boolean math nodeHans Goudey
List the operations in the search instead of the "Boolean" socket names.
2022-01-25Geometry Nodes: Expand the Boolean Math nodeHallam Roberts
Currently the Boolean Math node only has 3 basic logic gates: AND, OR, and NOT. This commit adds 6 additional logic gates for convenience and ease of use. - **Not And (NAND)** returns true when at least one input is false. - **Nor (NOR)** returns true when both inputs are false. - **Equal (XNOR)** returns true when both inputs are equal. - **Not Equal (XOR)** returns true when both inputs are different. - **Imply (IMPLY)** returns true unless the first input is true and the second is false. - **Subtract (NIMPLY)** returns true when the first input is true and the second is false. Differential Revision: https://developer.blender.org/D13774