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-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
2022-06-03Cleanup: spelling in commentsCampbell Barton
2022-06-02Merge branch 'blender-v3.2-release'Hans Goudey
2022-06-02Fix T98546: Crash with multires bake and zero levelsHans Goudey
The problem was that copying a `CDDerivedMesh` (`CDDM_copy`) doesn't copy the `vert_normals` reference that it takes from a mesh. Since this entire area is almost completely broken anyway (mainly in terms of ownership handling), for now we can just avoid copying the `DerivedMesh` in the zero levels case. Longer term, this area should be refactored to remove `DerivedMesh` and use the newer subdivision evaluation system. Differential Revision: https://developer.blender.org/D15099
2022-06-02Expose background job info to PythonSybren A. Stüvel
Add `bpy.app.is_job_running(job_type)` as high-level indicator. Job types currently exposed are `WM_JOB_TYPE_RENDER`, `WM_JOB_TYPE_RENDER_PREVIEW`, and `WM_JOB_TYPE_OBJECT_BAKE`, as strings with the `WM_JOB_TYPE_` prefix removed. The functions can be polled by Python code to determine whether such background work is still ongoing or not. Furthermore, new app handles are added for `object_bake_{pre,complete,canceled}`, which are called respectively before an object baking job starts, completes sucessfully, and stops due to a cancellation. Motivation: There are various cases where Python can trigger the execution of a background job, without getting notification that that background job is done. As a result, it's hard to do things like cleanups, or auto-quitting Blender after the work is done. The approach in this commit can easily be extended with other job types, when the need arises. The rendering of asset previews is one that's likely to be added sooner than later, as there have already been requests about this. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D14587
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-01Tweak Object duplicate_move macro tooltips.Bastien Montagne
Since we have two macros, we can at least have proper different tooltips for each.
2022-06-01Cleanup: use 'e' prefix for enum typesCampbell Barton
- CustomDataType -> eCustomDataType - CustomDataMask -> eCustomDataMask - AttributeDomain -> eAttrDomain - NamedAttributeUsage -> eNamedAttrUsage
2022-05-31Merge branch 'blender-v3.2-release'Hans Goudey
2022-05-31Fix T98403: Crash applying modifiers on non-mesh objectsHans Goudey
The operator assumed it was called on a mesh object, which has mostly been the case because of lack of support for other object types, but the new curves object is supported, which is the situation in the report. Differential Revision: https://developer.blender.org/D15063
2022-05-31Cleanup: remove UV handling from OBJECT_OT_modifier_convertCampbell Barton
It doesn't make sense to merge UV's when applying a particle-system.
2022-05-31Cleanup: rename ED_object_modifier_convert to make it's use clearerCampbell Barton
This function is specific to particle-systems which wasn't obvious, leading to an error in [0] which added UV handling which doesn't make sense.
2022-05-31RNA: add macros for EnumPropertyItem layout elementsCampbell Barton
Add the following macros for enums as support for these features wasn't all that obvious and there were some inconsistencies in their use. - RNA_ENUM_ITEM_HEADING(name, description) - RNA_ENUM_ITEM_SEPR - RNA_ENUM_ITEM_SEPR_COLUMN
2022-05-24Drag & drop: Use session UUID of IDs instead of name for droppingJulian Eisel
Dropping would pass the name of the ID to drop to the properties of the drop operator. This would then lookup the ID by name. With linking and/or library overrides, multiple IDs of the same name and type may exist, which is why the session UUID should be used instead. All operators used for dropping support this now and the drop code passes the session UUID instead of the name. Also see 917c096be6b9 and 8f79fa9c6780. Some drop operators were already using the session UUIDs. This converts the remaining ones. The "name" property is kept working as before, since some scripts use this. Side-effect: The "Name" property won't show up in the Adjust Last Operation anymore, which was the case for some of these operators, and its value won't be remembered over multiple executions of the operator. Both were not at all useful from what I can tell, and I doubt this was done intentionally.
2022-05-24Cleanup: Use new helpers for passing IDs from drag & drop to operatorsJulian Eisel
There are now some generalized helpers for passing IDs from drag & drop to operators via operator properties, mostly introduced in 917c096be6b9 and 8f79fa9c6780. These can be used in a bunch of places to reduce duplicated code and explicitly share a common solution. Side-effect: The "Name" property won't show up in the Adjust Last Operation anymore, and its value won't be remembered over multiple executions of the operator. Both were not at all useful from what I can tell, and I doubt this was done intentionally.
2022-05-24Merge branch 'blender-v3.2-release'Julian Eisel
2022-05-24Fix T95706: Material asset not applied if appended and then linkedJulian Eisel
8f79fa9c6780 was an attempt to fix this already, but it didn't quite work. Problem was that the tooltip was messing with the drop-box and operator properties, setting the name property for its own internal logic. This name property would then be used rather than the session UUID to query the material, which gave the wrong material (linking can result in multiple IDs of the same type with the same name). A followup commit will further sanitize this.
2022-05-24Fix possible lingering around of ID after asset dropping failedJulian Eisel
More and more of the drop operations are being switched to use the ID's session UUID rather than the name, but the cleanup after a drop operator was cancelled assumed they would set the name. They will now first attempt to use the session UUID and fallback to the name if needed.
2022-05-24Merge remote-tracking branch 'origin/blender-v3.2-release'Sybren A. Stüvel
2022-05-24Redraw Motion Paths panel after creating motion pathSybren A. Stüvel
Add notifier such that the Motion Paths panel in the Object Properties tab gets redrawn, after using the Create Motion Path button. The reason it didn't update was that the button actually triggers a popup, and then executes in the context of that popup. It now actually emits a `ND_DRAW_ANIMVIZ` notifier, and ensures that the panel redraws on that.
2022-05-23Merge branch 'blender-v3.2-release'Julian Eisel
2022-05-23Fix further issues when mixing link & append for asset drag & dropJulian Eisel
917c096be6b9 applied to objects only, this also applies the same fix for the general 3D View drop operations, e.g. used for dragging materials, images, worlds, etc. This is needed to fix T95706, but apparently something else is still going on. Needs further investigation.