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-15Cleanup: Use function to mark mesh normals dirtyHans Goudey
2021-08-19Cycles: experimental integration of Alembic procedural in viewport renderingKévin Dietrich
This patch exposes the Cycles Alembic Procedural through the MeshSequenceCache modifier in order to use and test it from Blender. To enable it, one has to switch the render feature set to experimental and activate the Procedural in the modifier. An Alembic Procedural is then created for each CacheFile from Blender set to use the Procedural, and each Blender object having a MeshSequenceCache modifier is added to list of objects of the right procedural. The procedural's parameters derive from the CacheFile's properties which are already exposed in the UI through the modifier, although more Cycles specific options might be added in the future. As there is currently no cache controls and since we load all the data at the beginning of the render session, the procedural is only available during viewport renders at the moment. When an Alembic procedural is rendered, data from the archive are not read on the Blender side. If a Cycles render is not active and the CacheFile is set to use the Cycles Procedural, bounding boxes are used to display the objects in the scene as a signal that the objects are not processed by Blender anymore. This is standard in other DCCs. However this does not reduce the memory usage from Blender as the Alembic data was already loaded either during an import or during a .blend file read. This is mostly a hack to test the Cycles Alembic procedural until we have a better Blender side mechanism for letting renderers load their own geometry, which will be based on import and export settings on Collections (T68933). Ref T79174, D3089 Reviewed By: brecht, sybren Maniphest Tasks: T79174 Differential Revision: https://developer.blender.org/D10197
2021-07-12Cleanup: improve naming and comments of scene frame/ctime functionsBrecht Van Lommel
Confusingly, BKE_scene_frame_get did not match the frame number as expected by BKE_scene_frame_set. Instead it return the value after time remapping, which is commonly named "ctime". * Rename BKE_scene_frame_get to BKE_scene_ctime_get * Add a new BKE_scene_frame_get that matches BKE_scene_frame_set * Use int/float depending if fractional frame is expected
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-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-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-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2019-04-22Cleanup: style, use braces for modifiersCampbell 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-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: finish modifiers' hearder re-order from rBe31f0fad9744c813.Bastien Montagne
For some reason forgot to handle half of modifier files...
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.
2018-12-30Cleanup: warnings (clang)Campbell Barton
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-19Merge branch 'master' into blender2.8Campbell Barton
2018-09-19BLI_utildefines: rename pointer conversion macrosCampbell Barton
Terms get/set don't make much sense when casting values. Name macros so the conversion is obvious, use common prefix for easier completion. - GET_INT_FROM_POINTER -> POINTER_AS_INT - SET_INT_IN_POINTER -> POINTER_FROM_INT - GET_UINT_FROM_POINTER -> POINTER_AS_UINT - SET_UINT_IN_POINTER -> POINTER_FROM_UINT
2018-06-22Cleanup: useless BKE_cdderivedmesh includes...Bastien Montagne
2018-06-17Merge branch 'master' into blender2.8Campbell Barton
2018-06-17Cleanup: trailing space for modifiersCampbell Barton
2018-05-12Merge branch 'master' into blender2.8Campbell Barton
2018-05-12Cleanup: modifier arg wrappingCampbell Barton
2018-05-08Cleanup: use 'nomain' when not in library dataCampbell Barton
Rename only.
2018-05-08Cleanup: whitespace, duplicate includesCampbell Barton
2018-05-08Merge branch 'master' into blender2.8Bastien Montagne
2018-05-08Cleanup: Nuke empty dummy wrappers around modifier_copyData_generic().Bastien Montagne
This also changes signature of modifier copy callback, first (source) parameter is now a const, which is saner anyway!
2018-05-04Modifiers: add back dirty normal flagCampbell Barton
2018-05-01Extract common modifier parameters into ModifierEvalContext structSybren A. Stüvel
The contents of the ModifierEvalContext struct are constant while iterating over the modifier stack. The struct thus should be only created once, outside any loop over the modifiers.
2018-05-01Modifiers: Simple Deform & Build, DerivedMesh → MeshSybren A. Stüvel
This commit introduces `EditMeshData`. The fields in this struct are extracted from `EditDerivedBMesh` into their own struct `EditMeshData`, which can then also be used by the `Mesh` struct. This allows passing deformed vertices efficiently to the draw routines. The modifier code constructs a new Mesh instead of writing to ob->data; even when ob->data is a CoW copy, it can still be used by different objects and thus shouldn't be modified by a modifier.
2018-05-01Modifiers: Add wrapper functions with Mesh / DerivedMesh conversionMai Lavelle
Makes the follow changes: - Add new `deform*` and `apply*` function pointers to `ModifierTypeInfo` that take `Mesh`, and rename the old functions to indicate that they take `DerivedMesh`. These new functions are currently set to `NULL` for all modifiers. - Add wrapper `modifier_deform*` and `modifier_apply*` functions in two variants: one that works with `Mesh` and the other which works with `DerivedMesh` that is named with `*_DM_depercated`. These functions check which type of data the modifier supports and converts if necessary - Update the rest of Blender to be aware and make use of these new functions The goal of these changes is to make it possible to port to using `Mesh` incrementally without ever needing to enter into a state where modifiers don't work. After everything has been ported over the old functions and wrappers could be removed. Reviewers: campbellbarton, sergey, mont29 Subscribers: sybren Tags: #bf_blender_2.8 Differential Revision: https://developer.blender.org/D3155
2018-04-16Depsgraph: remove EvaluationContext, pass Depsgraph instead.Brecht Van Lommel
The depsgraph was always created within a fixed evaluation context. Passing both risks the depsgraph and evaluation context not matching, and it complicates the Python API where we'd have to expose both which is not so easy to understand. This also removes the global evaluation context in main, which assumed there to be a single active scene and view layer. Differential Revision: https://developer.blender.org/D3152
2018-02-15Merge branch 'master' into blender2.8Sergey Sharybin
2018-02-15Cleanup: use '_len' instead of '_size' w/ BLI APICampbell Barton
- When returning the number of items in a collection use BLI_*_len() - Keep _size() for size in bytes. - Keep _count() for data structures that don't store length (hint this isn't a simple getter). See P611 to apply instead of manually resolving conflicts.
2018-01-18Merge branch 'master' into blender2.8Brecht Van Lommel
2018-01-18Fix buffer overflow vulnerabilities in mesh code.Brecht Van Lommel
Solves these security issues from T52924: CVE-2017-12081 CVE-2017-12082 CVE-2017-12086 CVE-2017-12099 CVE-2017-12100 CVE-2017-12101 CVE-2017-12105 While the specific overflow issue may be fixed, loading the repro .blend files may still crash because they are incomplete and corrupt. The way they crash may be impossible to exploit, but this is difficult to prove. Differential Revision: https://developer.blender.org/D3002
2017-08-16Pass EvaluationContext instead of bContextCampbell Barton
2.8x branch added bContext arg in many places, pass eval-context instead since its not simple to reason about what what nested functions do when they can access and change almost anything. Also use const to prevent unexpected modifications. This fixes crash loading files with shadows, since off-screen buffers use a NULL context for rendering.
2017-08-01Merge branch 'master' into blender2.8Campbell Barton
2017-08-01Cleanup: use static vars where appropriateCampbell Barton
2017-07-21Pass EvaluationContext argument everywhereLuca Rood
Note that some little parts of code have been dissabled because eval_ctx was not available there. This should be resolved once DerivedMesh is replaced.