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-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-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-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-28Cleanup: use "num" as a suffix in: source/blender/modifiersCampbell Barton
Also rename DNA struct members.
2022-03-23UI: Correct error message wordingAaron Carlisle
Fixes T96724
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-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-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-10Merge branch 'blender-v3.1-release'Hans Goudey
2022-02-10Fix T95613: remove anonymous attributes when converting objectJacques Lucke
This is the same behavior as when applying a geometry nodes modifier that adds anonymous attributes.
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-04Fix: Missing translations from operator descriptionsHans Goudey
The strings in the `get_description` functions for operators need translation, they are not found by the translation system automatically, and there is no translation applied afterwards either (as far as I could tell). Some used `N_` before, but most did nothing. Differential Revision: https://developer.blender.org/D14011
2022-02-03Fix T94435: remove anonymous attributes when applying modifierJacques Lucke
Differential Revision: https://developer.blender.org/D13994
2021-12-14Cleanup: correct unbalanced doxygen groupsCampbell Barton
Also add groups in some files.
2021-12-13Cleanup: Point cloud vs point-cloud in commentsHans Goudey
Point cloud is two separate words, this just changes comments in a few places where we were inconsistent. A small wording change to another comment is also included.
2021-12-08Cleanup: move public doc-strings into headers for 'editors'Campbell Barton
Ref T92709
2021-11-09Fix T91923: Save/Apply as Shape Key ignores shape keysCampbell Barton
Support virtual modifiers when using applying the modifier as a shape.
2021-10-03Cleanup: clang-formatCampbell Barton
2021-09-29Fix T88954: Rearranging of modifiers for linked objects no longer works.Bastien Montagne
There would be no modifier set in context in drag and drop case, in that case try to get active modifier from active object instead.
2021-09-17Geometry Nodes: Add a toggle to use attributes as input valuesHans Goudey
This adds a toggle to node group inputs exposed in the modifier to use an attribute instead of a single value. When the toggle is pressed, the button switches to a text button to choose an attribute name. Attribute search isn't implemented here yet. One confusing thing is that some values can't be driven by attributes at all, like the size of a primitive node. In that case, we should have a node warning, but that will be separate since it's more general. We can also have an option to turn off this toggle in node group input settings. The two new properties for each input are stored with the same name as the value, but with `"_use_attribute"` and `"_attribute_name"`` suffixes. The properties are not added for socket types that don't support attribute input, like object sockets. Differential Revision: https://developer.blender.org/D12504
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