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
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-30Subdivision Surfaces: add option disable using the limit surfacePiotr Ostrowski
This makes subdivision surfaces compatible with the old subdivision surface modifier and other applications that do not use the limit surface. This option is available on the Subdivision Surface modifier. Differential Revision: https://developer.blender.org/D8413
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-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-07-22Modifiers: option to preserve custom normals for subsurf & multiresCody Winchester
2020-07-02UI: Small Tweaks to Modifier Layouts for ConsistencyHans Goudey
These changes are smaller, made based on feedback and a pass on all the layouts for clarity and consistency. The Multires modifier UI will be addressed in a separate patch. Here is an overview of the changes: Renaming Options: - Build: "Start" -> "Start Frame" - Curve: "From Radius" -> "Size from Radius" - Screw: "Calc Order" -> "Calculate Order" - Displace, Warp, Wave: "Texture Coordinates Object" -> "Object" Move Mode Toggle to Top & Expand: - Bevel, Boolean, Normal Edit, Subdivision Use Columns for Tighter Spacing: - Displace, Explode, Ocean, Particle Instance, Remesh, Shrinkwrap, Solidify, Warp, Weighted Normal, Wave Misc: - Bevel: Set inactive properties for vertex bevel - Mesh Sequence Cache: Remove box for cache file - Skin: Don't align "Mark Loose" and "Clear Loose" - Array: Expand relative offset subpanel by default - Array: Move start cap, end cap to a new subpanel - Bevel: Move width type above width Differential Revision: https://developer.blender.org/D8115
2020-06-28UI: Remove duplicate modifier error messageHans Goudey
Thanks to J. Fran Matheu for pointing this out.
2020-06-23Refactor: move more modifier specific code out of readfile.cJacques Lucke
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-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-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-02-26Cleanup: reduce CDDM use, remove unused function callsCampbell Barton
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-04-17ClangFormat: format '#if 0' code in source/Campbell Barton
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-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
2019-02-25Cleanup: order of modifiers' headers includes.Bastien Montagne
BLI should always comes first, before DNA, BKE etc. And `BLI_utildefines.h` should come before any other BLI (since it's some sort of system include really, among other things...). Thisi should help to reduce the noise in patches when adding stuff like uint64_t members to DNA structs... ;)
2019-02-21Subdiv: Enable topology cache for animationSergey Sharybin
This commit makes it so both Subdivision Surface and Multiresolution modifiers are caching OpenSubdiv topology. This cuts down evaluation time quite a bit, especially for meshes which don't have many extra ordinary verticies. Only working for animation. Other modifications like edit mode needs more work to make topology cache preserved by copy-on-write.
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2019-01-28Fix several missing cases of copy func for modifiers.Bastien Montagne
Any time a modifier data has non-ID pointer, it should have own copy function (and also take care of proper init/reset in its init callback).
2019-01-22Fix T59395: Subdivision modifier with quality 1 crashes blenderSergey Sharybin
This is actually a workaround for the crash in OpenSubdiv. Topology refiner will have a crash when special conditions are met: - Refiner is configured to use infinitely sharp patches. - Refinement happens for the level 1 (which we call Quality 1 on Blender side). - Mesh has non-quad faces. The workaround is to force refinement to happen to level 2 (or quality 2 on Blender side) when those conditions are met. Later on with the next OpenSubdiv update we can remove this workaround, since there was work done on OpenSubdiv side to deal better with such configurations. The modifier will now be somewhat slower, but this will be compensated with upcoming topology cache enabled by default. The workaround is done when initializing settings, so the comparison of topology refiner settings is happening without any extra workarounds there.
2019-01-16Subdiv: Initial implementation of topology cacheSergey Sharybin
This commit makes it so OpenSubdiv's topology refiner is kept in memory and reused for until topology changes. There are the following modifications which causes topology refiner to become invalid: - Change in a mesh topology (for example, vertices, edges, and faces connectivity). - Change in UV islands (adding new islands, merging them and so on), - Change in UV smoothing options. - Change in creases. - Change in Catmull-Clark / Simple subdivisions. The following limitations are known: - CPU evaluator is not yet cached. - UV islands topology is not checked. The UV limitation is currently a stopper for making this cache enabled by default.
2018-12-04Fix T58227: Subdivision Surface Type Simple messes up UVsSergey Sharybin
This seems to be a bug in OpenSubdiv. For now simply use Catmark subdivision scheme with infinitely sharp edges. Later on it's either gets fixed in OpenSubdiv or we do bilinear subdivision on our side.
2018-12-03Subdiv: Set edge render flags according to Optimal DisplaySergey Sharybin
This is a part of T58609, but work is still needed to properly support this flag in the draw manager.
2018-11-26Enable OpenSubdiv modifier by defaultSergey Sharybin
This commit makes it so that subsurf/multires modifiers will respect the WITH_OPENSUBDIV option. The WITH_OPENSUBDIV_MODIFIER option is now gone. For artists it mean that subsurf modifier will behave same as it is planned for 2.80. Multires will now support sculpting, but it has some known limitations. Those will be worked on before the final release. If OpenSubdiv is disabled, no subsurf/multires functionality will present. For the details see: https://wiki.blender.org/wiki/Reference/Release_Notes/2.80/Modeling#Subsurf.2FMultires
2018-10-31OpenSubdiv: API, expose vertex boundary interpolation optionSergey Sharybin
Only affects internal API, bout could be exposed as an option for the compatibility reasons with other software. Is a part of some ongoing development of multires, but might or might not be used.
2018-10-24Cleanup: Remove unused modifiers callbackSergey Sharybin
Was only used by subsurf in the past years, it is unlikely other modifiers will every need this any time soon.
2018-10-24Subsurf: Remove edit mesh modifier callbacksSergey Sharybin
Those were used for partial updates during edit mode, which will not be possible anymore with OpenSubdiv. Optimization for OpenSubdiv would be to re-use topology refiner if topology does not change. But this is something to be done for both edit and object modes, no need to have separate code paths for those. This commit makes OpenSubdiv to properly work in edit mode.
2018-09-26Cleanup: Silence strict compiler warningSergey Sharybin
Was happening when using OSD for modifiers.
2018-09-20Cleanup: move DerivedMesh wrappers for modifiers further down the hierarchyJacques Lucke
The main goal of this patch is to cleanup the interface of every modifier. More specifically the interface of modifiers should be DerivedMesh-free. Internally some modifiers still use DerivedMesh. However I think it is better when the wrappers are in the modifiers so that higher level functions can use the simplified interface. This patch removes the applyModifier_DM and applyModifierEM_DM functions. In a previous patch (rB3614d9d) the other functions that used DerivedMesh have been removed. Reviewers: brecht
2018-09-11Subdiv: Initial implementation of CCGSergey Sharybin
Attempts to substitude CCGDM with an OpenSubdiv based structure which has less abstraction levels. The missing part in this substitude is a face pointers which old CCGDM/multires code was using to stitch faces (averaging boundaries). Another curial bit missing: "reshaping" of multires CD_MDISPS to the state of new PBVH grids. The new code is only available when OpenSubdiv modifier is enabled (WITH_OPENSUBDIV_MODIFIER=ON) and with debug value of 128. This is so this WIP code is not interfering with current production machines in the studio. Reviewers: brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D3685
2018-09-06UI: change default modifier name from Subsurf to Subdivision.Brecht Van Lommel
2018-09-04Subdiv: Move mesh creation functionality to own headerSergey Sharybin