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-08-04Modifier: warn if the ocean simulation fails to allocate memoryJeroen Bakker
While most modifies don't handle out of memory cases, ocean simulation could attempt huge allocations: 2048 gb at the maximum resolution. Resolves T83952.
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-17Cleanup: split BKE_mesh_copy_settings into two functionsCampbell Barton
- BKE_mesh_copy_parameters_for_eval to be used for evaluated meshes only as it doesn't handle ID user-counts. - BKE_mesh_copy_parameters is a general function for copying parameters between meshes.
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-07Refactor `BKE_id_copy_ex` to return the new ID pointer.Bastien Montagne
Note that possibility to pass the new ID pointer as parameter was kept, as this is needed for some rather specific cases (like in depsgraph/COW, when copying into already allocated memory). Part of T71219.
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-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-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-08-03Ocean Modifier: Add viewport resolutionPhil Stopford
Following work done in 2.83, the resolution control is now a real level-of-detail parameter. It is now useful to be able to set the resolution for display independently from render. This is true for both mesh generation and mesh deformation modes. For compatibility with old scenes, resolution is retained and is the render resolution. Old modifiers loaded have the value of resolution also applied to viewport resolution. This allows newer modifiers to be used in older versions without trouble Differential Revision: https://developer.blender.org/D8336
2020-07-03Cleanup: Remove redundant logicHans Goudey
2020-07-03UI: Use sliders and [0, 1] ranges in ocean modifierHans Goudey
The ocean modifier has two properties that use a [0, 10] hard min and hard max. The values act as factors though, so it makes more sense to use sliders and a 0 to 1 range. This commit also bumps the file subversion to avoid repeatedly applying the change to the properties' range. Differential Revision: https://developer.blender.org/D8186
2020-07-02UI: Use consistent order in ocean modifierHans Goudey
2020-07-02Ocean modifier: Expose eigenvectors for use as mapPhil Stopford
The eigenvectors in the ocean modifier (plus and minus) can be useful, but are not exposed. Assuming the particle system was capable, the eigenvectors could be used to drive spray emission velocities. This exposes the controls to allow a map to be generated from these eigenvectors. Currently, the values are mapped into a 0-255 range similar to foam. Differential Revision: https://developer.blender.org/D7182
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-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-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-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-12Ocean: add new spectra modes to the ocean modifierPhil Stopford
This extends the ocean modifier to add new spectra (Pierson-Moskowitz, Jonswap, TMA). These models are very different to the Phillips spectrum. They are intended for more established, large area, oceans and/or shallow water situations.
2020-02-10Cleanup/refactor: Rename `BKE_library` files to `BKE_lib`.Bastien Montagne
Note that `BKE_library.h`/`library.c` were renamed to `BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here. Part of T72604.
2019-09-23Modifiers: every modifier now copies mesh settings, fixing texture space issuesBrecht Van Lommel
Modifier stack evaluation would copy mesh settings other than mesh topology automatically, outside of the individual modifier evaluation. This leads to hard to understand code, and makes it unclear which settings are available in following modifiers, and which only after the entire stack is evaluated. Now every modifier is responsible to ensure the mesh it outputs preserves materials, texture space and other settings, or alters them as needed. Fixes T64739: incorrect texture space for various modifiers Differential Revision: https://developer.blender.org/D5808
2019-09-21Revert "Modifiers: every modifier now copies mesh settings, fixing texture ↵Brecht Van Lommel
space issues" This reverts commit e7a514369fe700dcc5a1fe433c8f709ed9595ded, it introduces a bug in selection in edit mode. Fixes T70103: can't select extruded Vertex Ref T64739
2019-09-19Modifiers: every modifier now copies mesh settings, fixing texture space issuesBrecht Van Lommel
Modifier stack evaluation would copy mesh settings other than mesh topology automatically, outside of the individual modifier evaluation. This leads to hard to understand code, and makes it unclear which settings are available in following modifiers, and which only after the entire stack is evaluated. Now every modifier is responsible to ensure the mesh it outputs preserves materials, texture space and other settings, or alters them as needed. Fixes T64739: incorrect texture space for various modifiers Differential Revision: https://developer.blender.org/D5808
2019-07-30BLI_task: Cleanup: rename some structs to make them more generic.Bastien Montagne
TLS and Settings can be used by other types of parallel 'for loops', so removing 'Range' from their names. No functional changes expected here.
2019-05-31Cleanup: style, use braces in source/Campbell Barton
Automated using clang-tidy.
2019-05-01Cleanup: comments (long lines) in modifiersCampbell Barton
Also remove duplicate comments in headers.
2019-04-22Cleanup: style, use braces for modifiersCampbell Barton
2019-04-17ClangFormat: format '#if 0' codeCampbell Barton
Previous cleanups didn't account for space after '#'.
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-03-30Cleanup: remove unused modifier methods.Brecht Van Lommel
2019-03-28Fix part of T60735: invalid CD_ORIGINDEX data in some modifier stack ↵Brecht Van Lommel
evaluations. BKE_mesh_new_nomain automatically added a CD_ORIGINDEX layer initialized to 0, which was never filled in correctly. In 2.7 the equivalent function used to modify the source derivedmesh and add valid original indices to it, but this is no longer possible in the new design and was quite unpredictable anyway. Now instead rely on mesh_calc_modifiers and the depsgraph to determine when CD_ORIGINDEX should be added.
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-03-07Refactor CDData masks, to have one mask per mesh elem type.Bastien Montagne
We already have different storages for cddata of verts, edges etc., 'simply' do the same for the mask flags we use all around Blender code to request some data, or limit some operation to some layers, etc. Reason we need this is that some cddata types (like Normals) are actually shared between verts/polys/loops, and we don’t want to generate clnors everytime we request vnors! As a side note, this also does final fix to T59338, which was the trigger for this patch (need to request computed loop normals for another mesh than evaluated one). Reviewers: brecht, campbellbarton, sergey Differential Revision: https://developer.blender.org/D4407
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-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-05BKE_library: id_copy: More general usage of LIB_ID_COPY_LOCALIZE.Bastien Montagne
Turns out most of our 'local working copy' cases can use same set of flags. Note that this commit adds LIB_ID_COPY_CACHES to all our local meshes copying, however this is no-op since that flag is unused during mesh copying... We may want to add another set of flags without that one at some point, but for now it would not be useful imho.
2019-02-05Cleanup: BKE_library: remove 'test' param of id_copy.Bastien Montagne
This was used in *one* place only... much better to have a dedicated helper for that kind of things. ;)
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-26Fix build error after recent cleanup.Brecht Van Lommel
2019-01-26Cleanup: remove redundant BKE/BLI/BIF headersCampbell Barton
2018-11-07Cleanup: Remove 'BKE_library.h' include from 'BKE_main.h'Bastien Montagne
That kind of implicit includes should really only be done when totally, absolutely necessary, and ideally only with rather simple 'second-level' headers. Otherwise not being explicit with includes always end up biting in unexpected ways...
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-09-27Cleanup: remove unused DerivedMesh code.Sebastian Parborg
Differential Revision: https://developer.blender.org/D3736
2018-07-10Ocean Modifier: prevent crashing on 'Apply Modifier' buttonSybren A. Stüvel
The 'Apply Modifier' button calls the modifier code on the original object instead of an evaluated copy, which doesn't have an initialised Ocean *.