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-04-26Animation: Sensible frame range for motion pathsColin Marmond
Motion paths can now be initialised to more sensible frame ranges, rather than simply 1-250: - Scene Frame Range - Selected Keyframes - All Keyframes Reviewed By: sybren, looch, dfelinto, pablico Maniphest Tasks: T93047 Differential Revision: https://developer.blender.org/D13687
2022-04-26Correct over allocation in "Fix Vertex Group Deform" operatorCampbell Barton
The pointer size was incorrectly being used instead of the float size.
2022-04-26Cleanup: replace in-line swapping with SWAP macroCampbell Barton
Also use bool array for true/false values.
2022-04-24Cleanup: various minor changesCampbell Barton
- Add missing doxy-section for Apply Parent Inverse Operator - Use identity for None comparison in Python. - Remove newline from operator doc-strings. - Use '*' prefix multi-line C comment blocks. - Separate filenames from doc-strings. - Remove break after return.
2022-04-24Cleanup: clang-formatCampbell Barton
2022-04-23Bake: add UDIM tile baking supportBrecht Van Lommel
Works for both Cycles and multires bake. Triangles are baked to multiple UDIM images if they span across them, though such UV layouts are generally discouraged as there is no filtering across UDIM tiles. The bake margin currently only works within UDIM tiles. For the extend method this is logical, for the adjacent faces method it may be useful to support copying pixels from other UDIM tiles, though this seems somewhat complicated. Fixes T95190 Ref T72390
2022-04-22Fix - Display correct units in "Edit voxel size" widgetRamil Roosileht
Fix for T84962 Before the patch, edit voxel size always displayed voxel size without units, just as a number in meters. Now it changes like in the voxel remesh panel and shows correct units Video: {F13009428} In adaptive mode: {F13009435} Reviewed By: JulienKaspar Maniphest Tasks: T84962 Differential Revision: https://developer.blender.org/D14682
2022-04-20Cleanup: Rename CD_MLOOPCOL to CD_PROP_BYTE_COLORHans Goudey
The "PROP" in the name reflects its generic status, and removing "LOOP" makes sense because it is no longer associated with just mesh face corners. In general the goal is to remove extra semantic meaning from the custom data types.
2022-04-20Cleanup: spelling in commentsCampbell Barton
2022-04-20UI: Fix typo in Apply Parent Inverse tooltipNate Rupsis
There's a small typo in the tool tip for applying the Parent Inverse. This patch fixes that typo old: {F13010751} new: {F13010749} Reviewed By: Blendify Maniphest Tasks: T97437 Differential Revision: https://developer.blender.org/D14693
2022-04-20Mesh: Avoid unnecessary normal calculation and dirty tagsHans Goudey
This is mostly a cleanup to avoid hardcoding the eager calculation of normals it isn't necessary, by reducing calls to `BKE_mesh_calc_normals` and by removing calls to `BKE_mesh_normals_tag_dirty` when the mesh is newly created and already has dirty normals anyway. This reduces boilerplate code and makes the "dirty by default" state more clear. Any regressions from this commit should be easy to fix, though the lazy calculation is solid enough that none are expected.
2022-04-18Cleanup: Move object_modifier.c to C++Hans Goudey
This allows using C++ only APIs/data structures, and potentially simplifies adding support to apply modifiers for the Curves object.
2022-04-18Cleanup: Clang tidyHans Goudey
- Inconsistent parameter names - Else after return - Braces around statements - Qualified auto - Also (not clang tidy): Pass StringRef by value, unused parameter
2022-04-18Fix T94559: Copying geometry node group does not copy animation dataAngus Stanton
Reimplement copy geometry node groups in C. The version implemented in Python could also manually copy the animation data, but it's more standard to do this with `BKE_id_copy_ex` and `LIB_ID_COPY_ACTIONS`. Differential Revision: https://developer.blender.org/D14615
2022-04-15Cleanup: Clang tidyHans Goudey
2022-04-15Object: Set Parent (Keep Transform Without Inverse)Wayde Moss
**Relevant to Artists:** This patch adds an option to the Parenting menu, `Object (Keep Transform Without Inverse)`, and Apply menu, `Parent Inverse`. The operators preserve the child's world transform without using the parent inverse matrix. Effectively, we set the child's origin to the parent. When the child has an identity local transform, then the child is world-space aligned with its parent (scale excluded). **Technical:** In both cases, the hidden parent inverse matrix is generally set to identity (cleared or "not used") as long as the parent has no shear. If the parent has shear, then this matrix will not be entirely cleared. It will contain shear to counter the parent's shear. This is required, otherwise the object's local matrix cannot be properly decomposed into location, rotation and scale, and thus cannot preserve the world transform. If the child's world transform has shear, then its world transform is not preserved. This is currently not supported for consistency in the handling of shear during the other parenting ops: Parent (Keep Transform), Clear [Parent] and Keep Transform. If it should work, then another patch should add the support for all of them. Reviewed By: sybren, RiggingDojo Differential Revision: https://developer.blender.org/D14581
2022-04-14Cleanup: Further hair to curves renamingHans Goudey
These were missed in previous passes. Also remove some logic in `draw_hair.c` that was redundant after f31c3f8114616bb8964c8e7.
2022-04-13Fix T97207: Move to Collections Menu Grayed out when in Local ViewDalai Felinto
This behaviour was introduced in a687d98e6782 to bring the old obscure "M" operator to remove objects from the local view. In order to avoid the keymap clash with the Move to Collection operator, the Move to Collection was artificially restricted to work in local view. In retrospect, the "Remove from Local View" operator is in the menu anyways, so it didn't even need to have a shortcut (back in 2.79 the operator was not in a menu). The changes introduced here are: * No shortcut for "Remove from Local View" * No more restrictions to "Move/Link to Collection" from local view. Thanks for Philipp Oeser for digging the old commit that introduced this and for the rationale on the changes.
2022-04-13Cleanup: use C++ comments for disabled codeCampbell Barton
Also ensure space around text in C-comment blocks.
2022-04-10Fix T96942: disable Adjacent Faces margin for UVs and tangent space bakeMartijn Versteegh
Use the Extend method for these, as these do not work correctly. For UVs it's better to extend the UVs from the same face, and for tangent space the normals should be encoded in a matching tangent space. Later the Adjacent Faces method might be improved to support these cases. Ref T96977 Differential Revision: https://developer.blender.org/D14572
2022-04-07Curves: improve Add menu for new curves objectJacques Lucke
The goal is to make the Add menu more convenient for the new curves object. The following changes are done: * Add `curves` submenu. * Add an `Empty Hair` operator that also sets the surface object. * Rename the old operator to `Random`. It's mostly for testing at this point. Differential Revision: https://developer.blender.org/D14556
2022-04-07Fix T96888: data transfer operator crash in certain situationPhilipp Oeser
The operator could crash in case the context "object" was overridden from python, but the "active_object" wasnt (and the active object was not a mesh). Reason for the crash is a mismatch in the operators poll function `data_transfer_poll` vs. `dt_layers_select_src_itemf` -- in the former, the overriden "object" was respected (and if this was a mesh, the poll was permissive), in the later it wasnt and only the "active_object" was used (if this was not a mesh, a crash would happen trying to get an evaluated mesh). Now rectify how the object which is used is being fetched -> use `ED_object_active_context` everywhere (see also rBe560bbe1d584). Maniphest Tasks: T96888 Differential Revision: https://developer.blender.org/D14552
2022-04-05Refactor: Unify vertex and sculpt colors into newJoseph Eagar
color attribute system. This commit removes sculpt colors from experimental status and unifies it with vertex colors. It introduces the concept of "color attributes", which are any attributes that represents colors. Color attributes can be represented with byte or floating-point numbers and can be stored in either vertices or face corners. Color attributes share a common namespace (so you can no longer have a floating-point sculpt color attribute and a byte vertex color attribute with the same name). Note: this commit does not include vertex paint mode, which is a separate patch, see: https://developer.blender.org/D14179 Differential Revision: https://developer.blender.org/D12587 Ref D12587
2022-04-05WM: avoid unnecessary undo step creation when duplicatingPratik Borhade
Calling duplicate operation without selecting anything registers an undo step. If nothing is selected (keyframe, curve, object, etc.), cancel the operator execution to prevent undo push. Patch improves following operators: - ACTION_OT_duplicate - GPENCIL_OT_duplicate - GRAPH_OT_duplicate - MESH_OT_duplicate - NODE_OT_duplicate - OBJECT_OT_duplicate Reviewed By: campbellbarton Ref D14511
2022-04-04Cleanup: clang-tidyCampbell Barton
2022-04-04Cleanup: ensure space after file named in headersCampbell Barton
Add blank lines after file references to avoid them being interpreted as doc-strings the following declarations.
2022-04-03Curves: Support set origin and apply transform operatorsHans Goudey
Add support for the Curves object to the "Set Origin" and "Apply Object Tansform" operators. Also change the automatic handle calculation to avoid adding Bezier attributes if they don't need to be added. Differential Revision: https://developer.blender.org/D14526
2022-04-02Fix: Assert with set origin operation and single active objectHans Goudey
Array has bounds checking that a raw pointer didn't have before.
2022-04-02Cleanup: Further use of const for object bounding boxesHans Goudey
Also solves two warnings from the previous similar commit, f688e3cc3130e70e77f0bb0. The change to the grease pencil modifier is quite suspicious, but doesn't change the behavior, which was already broken.
2022-04-01Assets: Instancing operator option for collection asset droppingJulian Eisel
Makes it possible to toggle instancing via the "Adjust Last Operation" panel after dropping a collection asset into the viewport. A design task that puts this into more context is pending still, but this is a useful option to have either way. Differential Revision: https://developer.blender.org/D14507 Reviewed by: Bastien Montagne
2022-03-30Cleanup: Left over from review of apply transformDalai Felinto
I miss the review notes about this for the 8621fdb10dc402eeff5aa996eeb992a513afd4c0 commit.
2022-03-30Apply Object Transform: Multi-user data supportDalai Felinto
The current behaviour is to prevent multi-user data from having its transformation applied. However in some particular cases it is possible to apply them: * If all the users of the multi-user data are part of the selection. * If not all the users are in the selection but the selection is made single-user. The active object is used as reference to set the transformation of the other selected objects. Note: For simplicity sake, this new behaviour is only available if all the selection is using the same data. Differential Revision: https://developer.blender.org/D14377
2022-03-30Modifiers: Support applying modifiers for multi-user dataDalai Felinto
The current behaviour is to prevent multi-user data from having its modifier applied. Instead, with this patch, we now warn the user that if they want to proceed the object will be made single-user. Note that this only makes the object data single-user. Not the material or actions. As a future step we can apply the same behaviour for the Grease Pencil modifiers Differential Revision: https://developer.blender.org/D14381
2022-03-29Geometry Nodes: Don't create node tree when adding nodes modifierLeon Schittek
Don't always create a new geometry nodes node tree when adding a geometry nodes modifier. This avoids files getting cluttered with empty and unused geometry node trees that are created every time a nodes modifier is added to an object - even if only to apply an already existing. This is also more consistent with other modifiers that also don't automatically create new data blocks. The new modifier still automatically gets populated with a new node tree when adding it via the "New" button in the header of the geometry nodes editor. Reviewed By: Hans Goudey, Dalai Felinto, Pablo Vazquez Differential Revision: D14458
2022-03-29LibOverride: Massive edits to 'editable' IDs checks in editors code.Bastien Montagne
Add new `BKE_id_is_editable` helper in `BKE_lib_id.h`, that supercedes previous check (simple `ID_IS_LINKED()` macro) for many editing cases. This allows to also take into account 'system override' (aka non-editable override) case. Ref: {T95707}.
2022-03-29LibOverride: Implement default 'user override' behavior.Bastien Montagne
Implement default behavior to decide which overrides remain 'system' ones, and which become 'user editable' ones, when creating hierarchy override from 3DView or the Outliner. 3DView: If from an Empty-instanced collection, only Armature objects in that collection are user overrides. If from a set of selected objects, all overrides created from selected objects are user overrides. Outliner: All override IDs created from selected elements in the Outliner are user overrides. There is one special case: When a collection is selected, and is 'closed' in the outliner, all its inner armature objects are also user overrides. Ref: {T95707}.
2022-03-28Fix T96670: bake from multires not reflected in the Image Editor.Jeroen Bakker
2022-03-28Cleanup: use "num" as a suffix in: source/blender/modifiersCampbell Barton
Also rename DNA struct members.
2022-03-28Cleanup: use "num" as a suffix in: source/blender/renderCampbell Barton
See T85728
2022-03-25Implement C++ methods for DNA structuresSergey Sharybin
This change makes it possible to add implementation of common C++ methods for DNA structures which helps ensuring unsafe operations like shallow copy are done explicitly. For example, creating a shallow copy used to be: Object temp_object = *input_object; In the C++ context it was seen like the temp_object is properly decoupled from the input object, while in the reality is it not. Now this code becomes: Object temp_object = blender::dna::shallow_copy(*input_object); The copy and move constructor and assignment operators are now explicitly disabled. Other than a more explicit resource management this change also solves a lot of warnings generated by the implicitly defined copy constructors w.r.t dealing with deprecated fields. These warnings were generated by Apple Clang when a shallow object copy was created via implicitly defined copy constructor. In order to enable C++ methods for DNA structures a newly added macro `DNA_DEFINE_CXX_METHODS()` is to be used: tpyedef struct Object { DNA_DEFINE_CXX_METHODS(Object) ... } Object; For the shallow copy use `blender::dna::shallow_copy()`. The implementation of the memcpy is hidden via an internal DNA function to avoid pulling `string.h` into every DNA header. This means that the solution does not affect on the headers dependencies. --- Ideally `DNA_shallow_copy` would be defined in a more explicit header, but don;t think we have a suitable one already. Maybe we can introduce `DNA_access.h` ? Differential Revision: https://developer.blender.org/D14427
2022-03-25Revert "Implement C++ methods for DNA structures"Sergey Sharybin
This reverts commit 8c44793228750537c08ea7b19fc18df0138f9501. Apparently, this generated a lot of warnings in GCC. Didn't find a quick solution and is it not something I want to be trading between (more quiet Clang in an expense of less quiet GCC). Will re-iterate on the patch are re-commit it.
2022-03-25Implement C++ methods for DNA structuresSergey Sharybin
This change makes it possible to add implementation of common C++ methods for DNA structures which helps ensuring unsafe operations like shallow copy are done explicitly. For example, creating a shallow copy used to be: Object temp_object = *input_object; In the C++ context it was seen like the temp_object is properly decoupled from the input object, while in the reality is it not. Now this code becomes: Object temp_object = blender::dna::shallow_copy(*input_object); The copy and move constructor and assignment operators are now explicitly disabled. Other than a more explicit resource management this change also solves a lot of warnings generated by the implicitly defined copy constructors w.r.t dealing with deprecated fields. These warnings were generated by Apple Clang when a shallow object copy was created via implicitly defined copy constructor. In order to enable C++ methods for DNA structures a newly added macro `DNA_DEFINE_CXX_METHODS()` is to be used: tpyedef struct Object { DNA_DEFINE_CXX_METHODS(Object) ... } Object; For the shallow copy use `blender::dna::shallow_copy()`. The implementation of the memcpy is hidden via an internal DNA function to avoid pulling `string.h` into every DNA header. This means that the solution does not affect on the headers dependencies. --- Ideally `DNA_shallow_copy` would be defined in a more explicit header, but don;t think we have a suitable one already. Maybe we can introduce `DNA_access.h` ? Differential Revision: https://developer.blender.org/D14427
2022-03-24Cleanup/fix wrong enum items for object.gpencil_modifier_addKévin Dietrich
No functional changes as the actual list used for display is generated at runtime via a callback.
2022-03-23UI: Correct error message wordingAaron Carlisle
Fixes T96724
2022-03-23Cleanup: spelling in commentsCampbell Barton
2022-03-21Cleanup: add image_format.cc for functions related to ImageFormatDataBrecht Van Lommel
Also fixes missing code to read/write/free/copy color management settings in various places. This can't be set through the UI currently, but still should be handled consistently.
2022-03-18Cleanup: Move object_transform.c to C++Hans Goudey
Compilation and clang tidy fixes, use Vector instead of the macro-based C array system. Builds on all platforms on the buildbot.
2022-03-15Cleanup: correct unbalanced doxy sectionsCampbell Barton
2022-03-14Auto-generate RNA-structs declarations in `RNA_prototypes.h`Julian Eisel
So far it was needed to declare a new RNA struct to `RNA_access.h` manually. Since 9b298cf3dbec we generate a `RNA_prototypes.h` for RNA property declarations. Now this also includes the RNA struct declarations, so they don't have to be added manually anymore. Differential Revision: https://developer.blender.org/D13862 Reviewed by: brecht, campbellbarton
2022-03-14RNA: Generate property declerations header, solving msg-bus C++ incompatibilityJulian Eisel
Lets `makesrna` generate a `RNA_prototypes.h` header with declarations for all RNA properties. This can be included in regular source files when needing to reference RNA properties statically. This solves an issue on MSVC with adding such declarations in functions, like we used to do. See 800fc1736748. Removes any such declarations and the related FIXME comments. Reviewed By: campbellbarton, LazyDodo, brecht Differential Revision: https://developer.blender.org/D13837