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
2021-09-02Cleanup: spelling in commentsCampbell Barton
2021-08-24Fix T90715: Remove correct particle modifier through Python APIRobert Guetzkow
Before this patch attempting to remove a particle modifier programmatically through Python would fail, because it deleted the modifier associated with the currently active particle system instead of the one passed as an argument to `bpy.types.ObjectModifiers.remove()`. This fix adds an additional argument for the particle system to `object_remove_particle_system`. This allows to specify which particle system and its associated modifier shall be removed. In case of `particle_system_remove_exec` it will remain the currently active particle system, whereas `object_remove_particle_system` passes the particle system of the modifier. Hence, the correct modifier will be removed. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D12234
2021-07-30Cleanup: clang-format (re-run after v12 version bump)Campbell Barton
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-29Cleanup: clang-formatCampbell Barton
2021-06-28Cleanup: Remove unused "for_orco" argument to curve evaluationHans Goudey
`BKE_displist_make_curveTypes` had a `for_orco` argument that was always false in calls to the function. Removing it allows the curve displist and modifier evaluation code to become simpler. There are some related cleanups in rBdf4299465279 and rB93aecd2b8107.
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-05-20Materials: support materials when applying modifierJacques Lucke
This fixes the `Apply Modifier` and `Visual Geometry to Mesh` operator when a modifier changed materials on the evaluated geometry. This is necessary since rB1a81d268a19f2f1402f408ad1dadf92c7a399607. Differential Revision: https://developer.blender.org/D11303
2021-05-11Cleanup: remove unused baking struct members from soft-bodyCampbell Barton
2021-04-30Merge branch 'blender-v2.93-release'Campbell Barton
2021-04-30Revert "Fix crash running constraint, modifier, fx from missing NULL check"Campbell Barton
This reverts commit f4d5a69cf8512aafcc697d1b09f65489015b6af4. This causes bpy.ops.object.modifier_apply.poll() to fail as well as modifier binding operators (breaking tests).
2021-04-30Merge branch 'blender-v2.93-release'Campbell Barton
2021-04-30Fix crash running constraint, modifier, fx from missing NULL checkCampbell Barton
None of these generic poll functions had NULL pointer checks, since all operators that use these functions expect a valid constraint, modifier .. etc. Add the NULL check to the poll function. Ref D11126 Reviewed By: mont29, Severin
2021-04-27Cleanup: Make function staticHans Goudey
2021-04-27Fix T87401: Drop-down can apply the wrong modifierHans Goudey
The trouble was that there was a context pointer "modifier" in the property editor context that returned the active modifier. But the "modifier" variable was already used in many places, for pointers that are *not* equivalent to the active modifier. The context pointer for the active modifier was unecessary anyway. If we need to access a context pointer for the active modifier in the property editor then we can add it. Until then it only adds confusion.
2021-04-19Fix T87392: Copy modifier to selected does not do anythingHans Goudey
This was caused by a stupid copy & paste error in rB9f323e9bf79fbf4157a.
2021-03-30Cleanup: Improve commentHans Goudey
2021-03-30UI: Bring back hover shortcuts for mesh modifiersHans Goudey
Earlier last year, the shortcuts on hover were built as a way to regain speed lost by removing the "Apply" and "Copy" buttons from the panel. For the active modifier concept introduced for geometry nodes, the shortcuts were changed to only affect the active modifier. Based on feedback, this change slowed down many people's interaction with the modifier stack so the UI team decided to return hover shortcuts for modifier panels. The downside of this change is that it looks like the active modifier is "selected" and it could be confusing that the modifier shortcuts don't apply to it. We can explore different ways to display the active status to address this. Ref T87012
2021-02-17Fix T85716: "Applied Modifier:" report hides more important messageHans Goudey
Since "Applied Modifier" was always added last, it obscured more important messages when using the shortcut to delete modifiers. The purpose of the report when using the shortcut was to make it clear that something happened. Since another report does that anyway, only display the "Applied Modifier" report if the report list length hasn't changed.
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
2021-01-19Refactor modifier copying code.Bastien Montagne
Things like pointers to particle systems, or softbody data being stored outside of its modifier, make it impossible for internal modifier copy data code to be self-contained currently. It requires extra processing. In existing code this was handled in several different places, in several ways, and alltogether fairly inconsistently. Some cases were even not properly handled, causing e.g. crashes as in T82945. This commit addresses those issues by: * Adding comments about the hackish/unsafe parts `psys` implies when copying some modifier data (since we need to ensure particle system copying and remapping of those pointers separately). * Adding as-best-as-possible handling of those cases to `BKE_object_copy_modifier` (note that it remains fragile, but is expected to behave 'good enough' in any practical usecase). * Remove special handling for specific editor code (`copy_or_reuse_particle_system`). This should never have been accepted in ED code area, and is now handled by `BKE_object_copy_modifier`. * Factorize copying of the whole modifier stack into new `BKE_object_modifier_stack_copy`, now used by both `object_copy_data` and `BKE_object_link_modifiers`. Note that this implies that `BKE_object_copy_modifier` and `BKE_object_copy_gpencil_modifier` are now to be used exclusively to copy single modifiers. Full modifier stack copy should always use `BKE_object_modifier_stack_copy` instead. Fix T82945: Crash when dragging modifiers in Outliner. Maniphest Tasks: T82945 Differential Revision: https://developer.blender.org/D10148
2021-01-09Fix build error after last commitHans Goudey
2021-01-09Cleanup: Use bool instead of intHans Goudey
2021-01-05Cleanup: clang tidyJacques Lucke
2021-01-05Cleanup: typos (repeated words)Campbell Barton
2020-12-28Add operator to copy a modifier to all selected objectsErik Abrahamsson
These two operators (one for grease pencil, one for other objects) copy a single modifier from the active object to all selected objects. The operators are exposed in the dropdown menus in modifier headers. Note that It's currently possible to drag and drop modifiers between objects in the outliner, but that only works for dragging to one object at a time. Modifiers can also be copied with the "Make Links" operator, but that copies *all* modifiers rather than just one. The placement and scope of these new operators allow for more useful poll messages and error messages as well. Every object type that supports modifiers is supported. Although hook and collision modifiers aren't supported because of an unexplained comment in `BKE_object_copy_modifier`, other than that, every modifier type is supported, including particle systems, nodes modifiers, etc. The new modifiers are set active, which required two small tweaks to `object.c` and `particle.c`. Reviewed By: Hans Goudey (with additional edits) Differential Revision: https://developer.blender.org/D9537
2020-12-08LibOverride: Refactor collection items 'local' helper functions.Bastien Montagne
It's easier to read and less 'weird' to check that an item is non-local in a liboverride data-block, than the other way around. Thanks to @sybren for noticing it.
2020-12-07LibOverride: Abstract a bit handling of local items of RNA collections.Bastien Montagne
RNA collections that support insertion of new items in liboverride data-block need a special way to distiguish between locale and orig-from-linked items (since some operations are allowed on the forer, but no the latter). In future we want a proper solution to abstract that at the `BKE_lib_override` level, but for now we need to add some code for each case. Note that this commit also fixes a few potential issues with GPencil modifiers, and constraints, regarding their handling of local overrides.
2020-12-02Geometry Nodes: active modifier + geometry nodes editorHans Goudey
This commit adds functions to set and get the object's active modifier, which is stored as a flag in the ModifierData struct, similar to constraints. This will be used to set the context in the node editor. There are no visible changes in this commit. Similar to how the node editor context works for materials, this commit makes the node group displayed in the node editor depend on the active object and its active modifier. To keep the node group from changing, just pin the node group in the header. * Shortcuts performed while there is an active modifier will affect only that modifier (the exception is the A to expand the modifiers). * Clicking anywhere on the empty space in a modifier's panel will make it active. These changes require some refactoring of object modifier code. First is splitting up the modifier property invoke callback, which now needs to be able to get the active modifier separately from the hovered modifier for the different operators. Second is a change to removing modifiers, where there is now a separate function to remove a modifier from an object's list, in order to handle changing the active. Finally, the panel handler needs a small tweak so that this "click in panel" event can be handled afterwards.
2020-12-02Geometry Nodes: initial scattering and geometry nodesJacques Lucke
This is the initial merge from the geometry-nodes branch. Nodes: * Attribute Math * Boolean * Edge Split * Float Compare * Object Info * Point Distribute * Point Instance * Random Attribute * Random Float * Subdivision Surface * Transform * Triangulate It includes the initial evaluation of geometry node groups in the Geometry Nodes modifier. Notes on the Generic attribute access API The API adds an indirection for attribute access. That has the following benefits: * Most code does not have to care about how an attribute is stored internally. This is mainly necessary, because we have to deal with "legacy" attributes such as vertex weights and attributes that are embedded into other structs such as vertex positions. * When reading from an attribute, we generally don't care what domain the attribute is stored on. So we want to abstract away the interpolation that that adapts attributes from one domain to another domain (this is not actually implemented yet). Other possible improvements for later iterations include: * Actually implement interpolation between domains. * Don't use inheritance for the different attribute types. A single class for read access and one for write access might be enough, because we know all the ways in which attributes are stored internally. We don't want more different internal structures in the future. On the contrary, ideally we can consolidate the different storage formats in the future to reduce the need for this indirection. * Remove the need for heap allocations when creating attribute accessors. It includes commits from: * Dalai Felinto * Hans Goudey * Jacques Lucke * Léo Depoix
2020-11-12Merge branch 'blender-v2.91-release' into masterPhilipp Oeser
2020-11-12Fix T82624: Skin modifiers root bone cannot be movedPhilipp Oeser
When creating an armature from the skin modifier, resulting bones would always be flagged BONE_CONNECTED. Those bones cannot be transformed (just rotated). Now only flag bones that really have a parent BONE_CONNECTED. Maniphest Tasks: T82624 Differential Revision: https://developer.blender.org/D9534
2020-11-03Fix C operators can't set default display or sort type for File BrowserJulian Eisel
`WM_operator_properties_filesel()` allows C operators to set a display or sort type for the File Browser to use. But the File Browser would always override that because of an invalid `_is_set()` check. (The operators don't actually set the value, they only set the property's default value.) The only operator affected by this is "Recover Auto Save". It is supposed to show a vertical list ordered chronologically. It used settings from the previous File Browser usage before this patch. Operators using the File Browser should generally use `FILE_DEFAULTDISPLAY`/`FILE_SORT_DEFAULT` now, except if they have a reason not to. See comments at their definition. ---- This makes it so operators that set a different display or sort type don't change the sort or display type for the next File Browser operation. So using "Recover Auto Save" entirely isolates display and sort type from other operations. Differential Revision: https://developer.blender.org/D8598 Reviewed by: Bastien Montagne
2020-10-27Cleanup: improve comment about shape keys, correct spellingCampbell Barton
2020-10-27Modifier: apply modifier now works for latticeErik Abrahamsson
Ref D9337
2020-10-24UI: Capitalization CorrectionsYevgeny Makarov
Approximately 141 changes of capitalization to conform to MLA title style. Differential Revision: https://developer.blender.org/D8392 Reviewed by Julian Eisel
2020-10-09Cleanup: Declare variables where initializedHans Goudey
Also use LISTBASE_FOREACH macro in a few places.
2020-10-02Cleanup: Move `EditBone` structure definition from `ED` to `BKE` area.Bastien Montagne
Access to this structure will be needed in BKE's armature code.
2020-09-20Fix T80945: Build modifier not updating after outliner copyNathan Craddock
Build modifiers linked or copied to objects from the outliner would not animate until the file was saved and reopened due to a missing depsgraph relations tag.
2020-09-16Modifiers: Add link and copy functionsNathan Craddock
Adds functions to copy a modifier between objects, and an ED_ level function for linking modifiers between objects. This will be used in outliner modifier drag and drop. These functions support both regular and grease pencil modifiers. Differential Revision: https://developer.blender.org/D8642
2020-09-16Cleanup: Move notifiers to `move_to_index` functionsNathan Craddock
Move the notifiers and DEG tagging to the ED_* level functions for modifiers and gpencil shaderfx in preparation for outliner modifier and shaderfx drag and drop. No functional changes. Differential Revision: https://developer.blender.org/D8642
2020-09-07Cleanup: remove redundant scene argument in BKE_object_addCampbell Barton
2020-09-02Cleanup: use bool instead of int in various placesJacques Lucke
2020-08-18Mesh: merge `mesh_create_eval_final_{view,render}` functionsSybren A. Stüvel
Functions `mesh_create_eval_final_view()` and `mesh_create_eval_final_render()` were doing the exact same thing, except for a hack introduced in d3eb9dddd6b4 (2012-10-08, Better fix for T32846: dupligroup messes up particle instancing on rendering) that appears to be no longer necessary. Besides that, these functions had confusing names. Their functionality changed over time, and whether to do for-render or for-viewport evaluation is now actually determined by the depsgraph evaluation mode. This means that the `..._render` function could evaluate a mesh with viewport settings, and vice versa. The functions are now merged into `mesh_create_eval_final()`, and the hack has been removed. The `OB_NO_PSYS_UPDATE` flag has been removed entirely (instead of keeping it around as deprecated flag), because it was always only temporarily set on objects during mesh evaluation and thus not saved to the blend file. No expected functional changes as far as users are concerned.
2020-08-12Merge branch 'blender-v2.90-release' into masterBastien Montagne
2020-08-12LibOverride and modifiers: Add copying of linked modifiers.Bastien Montagne
It also enables copying of linked modifiers (generating new local ones).
2020-08-12Merge branch 'blender-v2.90-release' into masterBastien Montagne
2020-08-12Fix part of T79635: Disable by default operation on unknown mod from ↵Bastien Montagne
liboverride object. It is unfortunate that we cannot get active modifier from context when operator is called from a shortcut, but we'd need an event for this to work... So for now forbid any modifier operation of liboverride objects in that case.
2020-08-07Cleanup: Blenlib, Clang-Tidy else-after-return fixes (incomplete)Sybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/blenlib` module. Not all warnings are addressed in this commit. No functional changes.
2020-08-03Merge branch 'blender-v2.90-release'Philipp Oeser