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-08-31LibOverride: Replace linked objects by their overrides when created from 3DView.Bastien Montagne
From the 3DView code has basically no knowledge of collection hierarchy, so we can either not remap any local usage of linked objects that are being overridden, or remap them in all their local collections. The second behavior makes most sense in the vast majority of cases. Note that this was only an issue when directly linking and overriding objects, not when doing so through collections.
2022-08-28Fix crashes running operators in invalid contextsCampbell Barton
Fix for running operators outside of expected contexts. - UI_OT_view_drop (poll) - UI_OT_view_item_rename (poll) - OBJECT_OT_gpencil_modifier_move_to_index - OBJECT_OT_modifier_move_to_index - OBJECT_OT_geometry_nodes_input_attribute_toggle - OBJECT_OT_geometry_node_tree_copy_assign - OBJECT_OT_shaderfx_remove - OBJECT_OT_shaderfx_copy - POSE_OT_relax (& other pose slide operators).
2022-08-24Cleanup warning about missing pointer casting.Bastien Montagne
2022-08-24LibOverride: Fix (unreported) crashes in some cases, preserve active object ↵Bastien Montagne
on Clear, general cleanup. Inconsistencies in update/tagging code between different code doing the same 'Clear. liboverride operation lead to crashes in some cases. Unify deg tagging and WM notifiers accross the three editor-level codepaths performing the common Make/Reset/Clear operations. Preserve if possible the active object accross Clear operation. Several cleanup/rename/re-arangement of code to make it more consistent.
2022-08-24Fix T100606: Apply object transform fails with delta quaternion rotationCampbell Barton
Apply transform failed to clear delta quaternion & axis-angle rotation.
2022-08-22I18n: systematically tag all messages in `RNA_ENUM_ITEM_HEADING`.Bastien Montagne
Add missing labels, and also add tooltips. Unfortunately there is no way currently to extract two messages from a single 'function' call, so unless those type of macros become very widely used, would keep it as manual tagging. Also disambiguate `case` in text context, pretty sure English is one of the very rare languages to use this word for character case too.
2022-08-17LibOverride: Remove the 'make all editable' user preferences.Bastien Montagne
This behavior is now implicitely controlled by the 'Make' operations, based either on context or selected items.
2022-08-16Cleanup: Unused parameters.Bastien Montagne
2022-08-16LibOverride: Refactor of menu entries in the View3D.Bastien Montagne
Move override creation into their own menu, add entries for reset and clear operations.
2022-08-15Cleanup: make formatBrecht Van Lommel
2022-08-04Fix T100099: Cycles crash baking vertex colors in edit modeBrecht Van Lommel
This was not supported, added now.
2022-08-04Cleanup: Move RNA path functions into own C++ fileJulian Eisel
NOTE: This is committed to the 3.3 branch as part of D15606, which we decided should go to this release still (by Bastien, Dalai and me). That is because these are important usability fixes/improvements to have for the LTS release. Adds `rna_path.cc` and `RNA_path.h`. `rna_access.c` is a quite big file, which makes it rather hard and inconvenient to navigate. RNA path functions form a nicely coherent unit that can stand well on it's own, so it makes sense to split them off to mitigate the problem. Moreover, I was looking into refactoring the quite convoluted/overloaded `rna_path_parse()`, and found that some C++ features may help greatly with that. So having that code compile in C++ would be helpful to attempt that. Differential Revision: https://developer.blender.org/D15540 Reviewed by: Brecht Van Lommel, Campbell Barton, Bastien Montagne
2022-08-04Sculpt: Fix T99294: Voxel Remesher text is resized based on object scaleJoseph Eagar
2022-08-02Object: move collection resync after empty duplicate early-outAras Pranckevicius
As pointed out in rB02b1a209be88 comment, the BKE_main_collection_sync should be after "nothing to duplicate" early-out.
2022-08-02Fix T100118: Crash after Shift+D with nothing selected and then making new ↵Aras Pranckevicius
object Regression from rB2d041fc46823, the "nothing to do, return" code path was not re-enabling layer collection sync. Fixes T100118.
2022-08-01Fix T100040: Crash when transform applied on multi-user imagePratik Borhade
Affected by rB8621fdb10dc4 Crash if single-user data is created when we apply transform on multi-user image data. Crash occurs because creation of new copy was not handled in `single_obdata_users` for empty objects (image for example) Reviewed By: dfelinto, mont29 Maniphest Tasks: T100040 Differential Revision: https://developer.blender.org/D15587
2022-07-26Fix T99979: GPencil strokes cannot be edited after set originAntonio Vazquez
The stroke points were changed but the bounding box calculation was not done and this produced a problem in any bounding box check done by different tools.
2022-07-25Fix missing disabled hint when dragging from Asset Browser in edit modeJulian Eisel
When dragging assets into the 3D View while in any other mode than object mode, dropping would be disabled and the cursor would indicate that. However there was supposed to be an "Only supported in object mode" message, that similar operators showed, but got forgotten when this one was introduced.
2022-07-21Curves: fix applying materials when applying modifierJacques Lucke
The issue was that geometry nodes was run on the original curves, and set a pointer to an evaluated material id on it. The fix is to not mix up original and evaluated data by making sure that geometry nodes does not modify the original data.
2022-07-21Cleanup: formatCampbell Barton
2022-07-21WM: replace ISMOUSE with ISMOUSE_BUTTONCampbell Barton
The ISMOUSE macro was used in situations only button events needed to be checked. The only functional difference would be MOUSEMOVE events were previously accepted for these checks.
2022-07-21Fix T99678: Crash applying non-existent modifiersCampbell Barton
Regression in [0] accessed the modifier type before NULL check. [0]: 78fc5ea1c398f70d22cda72be33c105146c0d542
2022-07-20Cleanup: unused parameter in own recent commit rB92ca920c52b9.Bastien Montagne
2022-07-20Add a 'Apply and Delete All' operation to shapekeys.Bastien Montagne
Adds a new option to the 'Delete ShpaKeys' operator, which first applies the current mix to the object data, before removing all shapekeys. Request from @JulienKaspar from Blender studio. Reviewed By: JulienKaspar Differential Revision: https://developer.blender.org/D15443
2022-07-19Fix error printed in console when running Shade Flat operatorBrecht Van Lommel
Only the Shade Smooth operator has autosmooth settings.
2022-07-19Cleanup: Remove compile option for curves objectHans Goudey
After becb1530b1c81a408e20 the new curves object type isn't hidden behind an experimental flag anymore, and other areas depend on this, so disabling curves at compile time doesn't make sense anymore.
2022-07-19Curves: align surface and curves object in Empty Hair operatorJacques Lucke
Without this, symmetry does not work by default when the surface object was not at the same location as the 3d cursor.
2022-07-15Cleanup: Use const pointers for ImageSaveOptions and ImageFormatDataJesse Yurkovich
Use const pointers to ImageSaveOptions and ImageFormatData for API parameters where appropriate. Differential Revision: https://developer.blender.org/D15400
2022-07-14I18N: Allow translating newly added GP data names, and a missing Surface one.Damien Picard
2022-07-13Cleanup: Do not use spaces in default data names.Bastien Montagne
Using white spaces in data names should not be encouraged in general, better not give wrong example here. Originally part of D15441.
2022-07-08Geometry Nodes: new geometry attribute APIJacques Lucke
Currently, there are two attribute API. The first, defined in `BKE_attribute.h` is accessible from RNA and C code. The second is implemented with `GeometryComponent` and is only accessible in C++ code. The second is widely used, but only being accessible through the `GeometrySet` API makes it awkward to use, and even impossible for types that don't correspond directly to a geometry component like `CurvesGeometry`. This patch adds a new attribute API, designed to replace the `GeometryComponent` attribute API now, and to eventually replace or be the basis of the other one. The basic idea is that there is an `AttributeAccessor` class that allows code to interact with a set of attributes owned by some geometry. The accessor itself has no ownership. `AttributeAccessor` is a simple type that can be passed around by value. That makes it easy to return it from functions and to store it in containers. For const-correctness, there is also a `MutableAttributeAccessor` that allows changing individual and can add or remove attributes. Currently, `AttributeAccessor` is composed of two pointers. The first is a pointer to the owner of the attribute data. The second is a pointer to a struct with function pointers, that is similar to a virtual function table. The functions know how to access attributes on the owner. The actual attribute access for geometries is still implemented with the `AttributeProvider` pattern, which makes it easy to support different sources of attributes on a geometry and simplifies dealing with built-in attributes. There are different ways to get an attribute accessor for a geometry: * `GeometryComponent.attributes()` * `CurvesGeometry.attributes()` * `bke::mesh_attributes(const Mesh &)` * `bke::pointcloud_attributes(const PointCloud &)` All of these also have a `_for_write` variant that returns a `MutabelAttributeAccessor`. Differential Revision: https://developer.blender.org/D15280
2022-07-08Hair Curves: The new curves object is now availableDalai Felinto
This commit doesn't implement any new feature but makes the new curves object type no longer experimental. Documentation: * https://docs.blender.org/manual/en/3.3/modeling/curves/primitives.html#empty-hair * https://docs.blender.org/manual/en/3.3/sculpt_paint/curves_sculpting/introduction.html Note: This also makes the Selection Paint tool available. This tool should have been moved out of the "New Curves Tool" flag when we got the selection drawing to work. Differential Revision: https://developer.blender.org/D15402
2022-07-08Curves: support deforming curves on surfaceJacques Lucke
Curves that are attached to a surface can now follow the surface when it is modified using shape keys or modifiers (but not when the original surface is deformed in edit or sculpt mode). The surface is allowed to be changed in any way that keeps uv maps intact. So deformation is allowed, but also some topology changes like subdivision. The following features are added: * A new `Deform Curves on Surface` node, which deforms curves with attachment information based on the surface object and uv map set in the properties panel. * A new `Add Rest Position` checkbox in the shape keys panel. When checked, a new `rest_position` vector attribute is added to the mesh before shape keys and modifiers are applied. This is necessary to support proper deformation of the curves, but can also be used for other purposes. * The `Add > Curve > Empty Hair` operator now sets up a simple geometry nodes setup that deforms the hair. It also makes sure that the rest position attribute is added to the surface. * A new `Object (Attach Curves to Surface)` operator in the `Set Parent To` (ctrl+P) menu, which attaches existing curves to the surface and sets the surface object as parent. Limitations: * Sculpting the procedurally deformed curves will be implemented separately. * The `Deform Curves on Surface` node is not generic and can only be used for one specific purpose currently. We plan to generalize this more in the future by adding support by exposing more inputs and/or by turning it into a node group. Differential Revision: https://developer.blender.org/D14864
2022-07-08Draw: Curve outline drawing in object mode.Jeroen Bakker
This patch adds (selected/active) outline around a curve object in object mode. {F13270680} In the past the draw bounds option was enabled for any curve objects. With this patch it isn't needed and will be disabled. In the future the curve outline could also be enabled to improve GPU selection. Reviewed By: dfelinto, HooglyBoogly, fclem Maniphest Tasks: T95933 Differential Revision: https://developer.blender.org/D15308
2022-07-07LibOverride: Make fully editable when creating an experimental user setting.Bastien Montagne
This is temporary to investigate which behavior should be kept when creating an override hierarchy if there are no cherry-picked data defined: make all overrides user-editable, or not. This removes the 'make override - fully editable' menu entries.
2022-07-07Fix T99453: Regression: Crash on calling menu searchPratik Borhade
Fix T99453. Crash due to null pointer access. So wrap the function call in simple `if` check Reviewed By: sybren Maniphest Tasks: T99453 Differential Revision: https://developer.blender.org/D15370
2022-07-06Object: Speed up duplication of large selections by doing fewer collection syncsAras Pranckevicius
Previous code was doing N collection syncs when duplicating N objects. New code avoids all the intermediate syncs by using BKE_layer_collection_resync_forbid and BKE_layer_collection_resync_allow, and then does one BKE_main_collection_sync + BKE_main_collection_sync_remap for the whole operation. There is some complexity involved where the Base things of newly duplicated objects can't be found yet, without the sync, so some work on them (marking them selected, active, ...) has to be deferred until after the sync. Timings: scene with 10k cubes, each with unique mesh (Windows, VS2022 Release build, AMD Ryzen 5950X): - Shift+D duplicate: 13.6s -> 9.2s - Alt+D duplicate: 4.76s -> 1.53s Reviewed By: Bastien Montagne Differential Revision: https://developer.blender.org/D14150
2022-07-05Cleanup: formatCampbell Barton
2022-06-30Cleanup: Remove scene frame macros (`CFRA` et al.)Julian Eisel
Removes the following macros for scene/render frame values: - `CFRA` - `SUBFRA` - `SFRA` - `EFRA` These macros don't add much, other than saving a few characters when typing. It's not immediately clear what they refer to, they just hide what they actually access. Just be explicit and clear about that. Plus these macros gave read and write access to the variables, so eyesores like this would be done (eyesore because it looks like assigning to a constant): ``` CFRA = some_frame_nbr; ``` Reviewed By: sergey Differential Revision: https://developer.blender.org/D15311
2022-06-30Normalize Weights: use valid default Subset for current contextNate Rupsis
For the Normalize Weights operator, dynamically set the default 'Subset' parameter so that it is applicable to the current context. When the user's last use of Normalize Weights was set to "Deform Pose Bones", and then tries to use the operator on a mesh without armature, Blender would try to use the previous opertor properties and show an error message. This is resolved by switching to `WT_VGROUP_ACTIVE` in such cases. Reviewed By: zanqdo, sybren Maniphest Tasks: T95038 Differential Revision: https://developer.blender.org/D14961
2022-06-27Fix T99070: Apply transform fails to clear delta transform valuesPratik Borhade
Clear delta transform value after applying transform. Include delta location while applying transform. Use `copy_v3_fl` for resetting object scale Reviewed By: mano-wii Maniphest Tasks: T99070 Differential Revision: https://developer.blender.org/D15270
2022-06-27Cleanup: spelling in commentsCampbell Barton
2022-06-22D14975: Voxel Remesh Size Edit - Constant Size by defaultRamil Roosileht
This patch makes constant size a default for size edit operator of voxel remesh. In turn, pressing CTRL now enables relative scale, the old default. Patch also changes workspace status text entry with new additions. Note that it is a simple text and not an array of keymaps (for that further changes are needed) {F13082567} Reviewed By: Julien Kaspar & Joseph Eagar Differential Revision: https://developer.blender.org/D14975 Ref D14975
2022-06-21Fix T98960: Baking to active color attribute uses wrong layerHans Goudey
Baking assumed that color attributes could only have two configurations: float color data type on vertices, or byte color type on face corners. In reality the options can be combined to make four total options. This commit handles the four cases explicitly with a somewhat more scaleable approach (though this should really be C++ code). This commit also changes some related error messages, tooltips, and an enum name, in order to make the functionality more obvious. Differential Revision: https://developer.blender.org/D15244
2022-06-16LibOverride: 3DView: simplification and improvements of override creation.Bastien Montagne
This commit: * Removes the popup to choose the root collection when called with a linked object selected (in typical cases there is only one valid option, if more then the operator fails and report to the user). * Ensures that the linked reference of newly overridden collections are also removed from the ViewLayer (i.e. their local parent collections).
2022-06-09Cleanup: spelling in comments & variablesCampbell Barton
2022-06-08D15085: Fix numbers jumping in edit voxel size widgetRamil Roosileht
Introduces an option for BKE_unit_value_as_string to skip stripping of zeroes, thus reducing flickering when using edit voxel size widget. {F13125416} Reviewed By: Julien Kaspar & Joseph Eagar Differential Revision: https://developer.blender.org/D15085 Ref D15085
2022-06-05Curves: use uv coordinates to attach curves to meshJacques Lucke
This implements the new way to attach curves to a mesh surface using a uv map (based on the recent discussion in T95776). The curves data block now not only stores a reference to the surface object but also a name of a uv map on that object. Having a uv map is optional for most operations, but it will be required later for animation (when the curves are supposed to be deformed based on deformation of the surface). The "Empty Hair" operator in the Add menu sets the uv map name automatically if possible. It's possible to start working without a uv map and to attach the curves to a uv map later on. It's also possible to reattach the curves to a new uv map using the "Curves > Snap to Nearest Surface" operator in curves sculpt mode. Note, the implementation to do the reverse lookup from uv to a position on the surface is trivial and inefficient now. A more efficient data structure will be implemented separately soon. Differential Revision: https://developer.blender.org/D15125
2022-06-03Constraints: introduce wrapper functions to access target lists.Alexander Gavrilov
Instead of directly accessing constraint-specific callbacks in code all over blender, introduce two wrappers to retrieve and free the target list. This incidentally revealed a place within the Collada exporter in BCAnimationSampler.cpp that didn't clean up after retrieving the targets, resulting in a small memory leak. Fixing this should be the only functional change in this commit. This was split off from D9732. Differential Revision: https://developer.blender.org/D13844
2022-06-03Fix T98459: vertex weight paste/copy inconsistentPhilipp Oeser
In the editmode sidebar, pasting a particular vertex's weight in a single group was not behaving the same as copying for all groups [in that the former dis not copy to unassigned vertices whereas the later did copy to unassigned vertices]. This behaves like this since the introduction in {rB70fd2320c8d2}, but there does not seem to be a good reason for this? Now make this consistent and use `BKE_defvert_copy_index` in both cases (instead of earlying out if unassigned, this will make sure this will also copy to unassigned). Maniphest Tasks: T98459 Differential Revision: https://developer.blender.org/D15062