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-09-14Cleanup: Remove unused argument from modifier data mask callbackHans Goudey
This isn't likely to be helpful in the future with the move to generic attributes
2022-07-15UI: make many modifier strings translatableDamien Picard
This includes: - new modifier names It mostly uses `N_` because the strings are actually translated elsewhere. The goal is simply to export them to .po files. Most of the new translations were reported in T43295#1105335. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D15418
2022-03-28Cleanup: use "num" as a suffix in: source/blender/modifiersCampbell Barton
Also rename DNA struct members.
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-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-01-30Cleanup: Remove modifier type hair callbackHans Goudey
This is similar to e032ca2e25bf2e305b66 which removed the callback for volumes. Now that we have geometry sets, there is no need to define a callback for every data type, and this wasn't used. Procedural curves/hair editing will use nodes rather than new modifier types anyway.
2021-04-26Cleanup: Replace modifyVolume with modifyGeometrySetHans Goudey
This allows us to remove a callback from the modifier type info struct. In the future the these modifiers might just be replaced by nodes internally anyway, but in the meantime it's nice to unify the handling of evaluated geometry a bit. Differential Revision: https://developer.blender.org/D11080
2020-12-10Geometry Nodes: rename modifyPointCloud to modifyGeometrySetJacques Lucke
Since the initial merge of the geometry nodes project, the modifyPointCloud function already was already modifying a geometry set. The function wasn't renamed back then, because then the merge would have touched many more files. Ref T83357.
2020-10-30Cleanup: Use an enum to set instanced panel expansionHans Goudey
This commit uses an enum to access expansion for specific panels for each modifier, constraint, etc. Even though these values are quite simple, this can help make the code more explicit when the ui_expand_flag is accessed directly. Also update comments about this bitfield to make them consistent.
2020-10-27Multires: Remove simple subdivision typeSergey Sharybin
The simple subdivision as a type only causes issues like no-continuous normals across edges, inability to reliably switch the type and things like this. The new subdivision operators supports wider variety of how to add details to the model, which are more powerful than a single one-time decision on the subdivision type. The versioning code is adjusting topology converter to specify all edges as infinitely sharp. The reason for this (instead of using settings.is_simple) is because in a longer term the simple subdivision will be removed from Subsurf modifier as well, and will be replaced with more efficient bmesh-based modifier. This is finished up version of D8436. Differential Revision: https://developer.blender.org/D9350
2020-10-26Modifiers: include the object & modifier when logging errorsCampbell Barton
Without this, there was no way of finding out which object, modifier combination caused the error, making the logs not very useful for debugging.
2020-10-01remove foreachObjectLink callbackJacques Lucke
This removes `foreachObjectLink` from `ModifierTypeInfo`, `GpencilModifierTypeInfo` and `ShaderFxTypeInfo`. There is no need to have both, `foreachObjectLink` and `foreachIDLink`. There is not code that actually depends on `foreachObjectLink`. Reviewers: brecht Differential Revision: https://developer.blender.org/D9078
2020-10-01Fix subdivision surface wrong for non-limit surface and subdivision level 1Brecht Van Lommel
Remove the workaround for T59395 that increases the minimal refinement to 2 to work around an OpenSubdiv bug. This bug appears to be fixed in the latest OpenSubdiv version we are using. Problem found by Piotr Ostrowski. Ref D9076
2020-10-01Use DNA defaults system for modifiersHans Goudey
As noted in T80164, there are quite a few area of Blender where the "Reset to Default Value" operator in button context menus doesn't work. Modifiers are one of them, because the DNA defaults system was never set up for them. Additionally, this should make modifier versioning easier. Whenever a new field is added it should be automatically initialized to the default value. I had to make some ordering changes in the following modifiers to work around an error with `-Wsign-conversion` in the macros: - Solidify Modifier - Corrective Smooth Modifier - Screw Modifier Some modifiers are special cases and are skipped in this commit: - Data Transfer Modifier - Cloth Modifier - Fluid Modifier - Softbody Modifier Differential Revision: https://developer.blender.org/D8747
2020-10-01Fix some inactive modifier properties not being editableBrecht Van Lommel
The convention is to keep inactive settings editable even if they are grayed out for having no effect due to other settings.
2020-09-30Subdivision Surfaces: add boundary smooth option to modifiersPiotr Ostrowski
This adds the option to either smooth the entire boundary, or to keep corners sharp, for the Subdivision Surface and Multiresolution modifiers. This mainly helps with compatibility with other software. The default behavior remains to smooth the entire boundary. Differential Revision: https://developer.blender.org/D8485
2020-09-25Modifiers: add StructRNA pointer field to ModifierTypeInfoJacques Lucke
This reduces the number of places that have to be modified when a new modifier is added. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D9000
2020-09-25Modifiers: add icon field to ModifierTypeInfoJacques Lucke
With this change `outliner_draw.c` does not have to be edited anymore when a new modifier is added. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D8998
2020-09-07Fix T77763: Wrong highlight of active grab vertexSergey Sharybin
The "Grab Active Vertex" in sculpt mode highlights the vertex and the neighbor vertices. This was working wrong in the case when mesh has multires modifier at sculpt level 0 and has shape keys. The issue was caused by the wrong crazy space calculation, which was ignoring subdivision level. This is an oversight from the initial implementation: the modifier has no effect if the subdivision level is 0.
2020-09-07Multires: Fix memory leak when multires is at level 0Sergey Sharybin
There is no SubdivCCG created in this case, meaning ownership of the Subdiv was not altered.
2020-09-02UI: Use instanced panel custom data instead of list indexHans Goudey
For modifier shortcuts we added a "custom_data" field to panels. This commit uses the same system for accessing the list data that corresponds to each panel. This way the context is only used once and the modifier for each panel can be accessed more easily later. This ends up being mostly a cleanup commit with a few small changes in interface_panel.c. The large changes in the UI functions are due to the fact that the panel custom data is now passed around as a single pointer instead of being created again for every panel. The list_index variable in Panel.runtime is removed as it's now unnecessary. Differential Revision: https://developer.blender.org/D8559
2020-08-18Multires: Base Mesh SculptingPablo Dobarro
This adds an option to the Multires modifier to sculpt directly on the base mesh while previewing the displacement of a higher subdivisions level. What this does it considering Multires as a regular modifier without exposing the grid displacement to sculpt mode. This allows to see the propagation happening in real time, which enables to use complex tools like Cloth or Pose in much higher resolutions and without surface noise and artifacts. Reviewed By: sergey, Severin Differential Revision: https://developer.blender.org/D8555
2020-08-14Merge branch 'blender-v2.90-release'Hans Goudey
2020-08-14UI: Fix type in multires modifier subpanelHans Goudey
Thanks to @zanqdo for reporting "Subdivions" Also remove the empty space I left for the "Delete Lower" operator that never made it into 2.90.
2020-08-12UI: Fix typo "subdivion" -> subdivisionPablo Vazquez
In the Multires panel, use singular Subdivision instead of Subdivisions.
2020-07-22Modifiers: option to preserve custom normals for subsurf & multiresCody Winchester
2020-07-21UI: Adjust Multiresolution Modifier LayoutHans Goudey
Adjusting the layout for this modifier is the final part of the modifier UI project for 2.90. This layout exposes the most important information, the levels and subdivision controls, by default, putting other contols in collapsed subpanels. Note that there is empty space for the "Delete Lower" button that is still planned for 2.90. And there will also eventually be more items added to the "Shape" panel, maybe for 2.90. Differential Revision: https://developer.blender.org/D8187
2020-07-01Cleanup: spellingCampbell Barton
2020-06-15Modifiers: New callbacks for reading and writing .blend filesJacques Lucke
This is part of a greater blenloader decentralization effort (T76372). For modifiers the goal is that fewer files have to be modified when a new modifier is added. This patch just adds the `blendWrite` and `blendRead` callbacks to `ModifierTypeInfo` but does not change any other code yet. In the next steps, modifier specific code will be moved from `writefile.c` and `readfile.c` into their corresponding `MOD_*` files.
2020-06-07Fix T77487: Only disable Multires Buttons in Edit ModeHans Goudey
Previously the operator buttons were disabled in every mode but edit mode and sculpt mode.
2020-06-05UI: Apply Latest Changes to Multires ModifierHans Goudey
These changes didn't make it through the transition to the new UI layout. - Add "has_displacement" check - Add "sculpt_levels" property - Give subdivide operators the operator name so they work
2020-06-05UI: Drag and Drop Modifiers, Layout UpdatesHans Goudey
This patch implements the list panel system D7490 for modifiers. It also moves modifier drawing to a callback in ModifierTypeInfo in line with the extensible architecture refactoring goal T75724. This adds a PanelRegister callback and utilities for registering panels and subpanels. It also adds the callbacks for expansion saving and drag and drop reordering described in D7490. These utilities, callbacks, and other common UI elements shared between modifiers live in MOD_ui_common.c. Because modifier buttons are now in panels, we can make use of subpanels for organization. The UI layouts also use the single column layout style consistently used elsewhere in Blender. Additionally, the mode-setting buttons are aligned and ordered consistently with the outliner. However, the large number of UI changes in this patch may mean that additional polishing is required in master. Thanks to William Reynish (@billreynish) who did a fair amount of the layout work and to Julian Eisel (@Severin) for consistent help. Differential Revision: https://developer.blender.org/D7498
2020-05-09Cleanup: double-spaces in commentsCampbell Barton
2020-05-08Fix T76498: Refactoring - Rename BKE modifiers funtionsAntonio Vazquez
2020-04-22Objects: add infrastructure for hair, pointcloud, volume modifiersBrecht Van Lommel
There is no user visible difference in standard builds, as there are no volume modifiers yet. When using WITH_NEW_OBJECT_TYPES some deform only modifiers are now available for hair and pointcloud objects. Differential Revision: https://developer.blender.org/D7141
2020-04-02Sculpt: Store explicit value for multires sculpt levelSergey Sharybin
Allows to know what level sculpting has been done after the value has been changed in the MultiresModifierData. No functional changes, just preparing code to have everything needed for propagation undo. Differential Revision: https://developer.blender.org/D7307
2020-03-26Fix T67888: Incorrect Wireframe After Applying SubSurf/MultiResJeroen Bakker
Show control edges stores the control edges in the mesh which is picked up by the draw manager. When applyng a subsurf (or multires) we don't want that data present in the base mesh. Any rebuilding of the mesh would overwrite the data anyway. This patch introduces a new flag for applying modifiers that can be checked to ignore storing display specific data in the base mesh. Reviewed By: Brecht van Lommel Differential Revision: https://developer.blender.org/D7163
2020-03-26Subsurf: Enable Optimal Display by defaultSergey Sharybin
Affects both Subdivision Surface and Multires modifiers.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-13Multires: Increase default quality to 4Sergey Sharybin
Makes it work better "out of the box" for irregular topology like Suzanne mesh. There might be some performance impact on non-regular meshes, but those are not very common usecase for multires and for those its always possible to lower the quality if needed.
2019-10-07Fix T70476: Sculpting with Subsurf on top produces artifactsSergey Sharybin
The issue was caused by crazy space distortion orientation happening for subsurf modifier. Solved by making it so subsurf only deforms the surface but keeps matrices as-is. This is not fully mathematically correct, but is better that the fall-back solution which was doing wrong matrices anyway. Also, this is closer to have subsurf was handled prior to the related changes. Reviewed By: brecht, pablodp606 Differential Revision: https://developer.blender.org/D5991
2019-09-19Subdiv: Add vertex deformation callback to multires/subsurfSergey Sharybin
Currently unused but the intention is to use this to hook up these modifiers to a generic deformed PBVH to make it easier to sculpt or paint on a subdivided mesh.
2019-09-03Subsurf: Show error when Blender is built without OpenSubdivSergey Sharybin
2019-06-20Fix T65877: crash when baking in sculpt modeAlexander Gordeev
Also fixes bug where mesh with multires modifier is invisible in render while in sculpt mode. Differential Revision: https://developer.blender.org/D5099
2019-05-08Fix T64274: Crash with more than 1 subdivision with the Multiresolution ModifierSergey Sharybin
Update more relevant fields in the sculpt session. Really becoming annoying, but was also annoying in the old code as well.
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-05Fix T63283: Second subdivision modifier does not ignore creaseSergey Sharybin
This is something where there is no single correct behavior, sometimes it's needed to ignore the crease to make mesh more smooth. But sometimes crease is to be considered after first subdivision surface: for example, when adding extra subdivisions for render-time displacement. Made it an option whether modifier needs to take crease into account or not. Existing files should be openable in the 2.7 compatible way, to re-create an old behavior the options is to be manually disabled in the modifier settings. Reviewers: brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D4652
2019-04-03Multires: Make topology cache to work with copy-on-writeSergey Sharybin
Allows to preserve topology cache even when copy-on-write is fully re-copying the object. For example, toggling edit mode in and out does no longer causes full topology to be re-created.
2019-03-30Cleanup: remove unused modifier methods.Brecht Van Lommel
2019-03-18Subdiv: Enable topology cache in edit modeSergey Sharybin
The general idea of this change is to have a runtime data pointer in the ModifierData, so it can be preserved through copy-on-write updates by the dependency graph. This is where subdivision surface modifier can store its topology cache, so it is not getting trashed on every copy-on-write which is happening when moving a vertex. Similar mechanism should be used by multiresolution, dynamic paint and some other modifiers which cache evaluated data. This fixes T61746. Thing to keep in mind, that there are more reports about slow subdivision surface in the tracker, but that boils down to the fact that those have a lot of extraordinary vertices, and hence a lot slower to evaluated topology. Other thing is, this speeds up oeprations which doesn't change topology (i.e. moving vertices). Reviewers: brecht Reviewed By: brecht Maniphest Tasks: T61746 Differential Revision: https://developer.blender.org/D4541