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
2018-12-07Cleanup/refactor binding code for MeshDeform modifier.Bastien Montagne
We had two different ways of doing it, SurfaceDeform and LaplacianDeform would do it through a special modifier stack evaluation triggered from binding operator, while MeshDeform would do it through a regular depsgraph update/eval (also triggered from its binding op). This enforces the later to search back for orig modifier data inside modifier code (to apply binding on that one, and not on useless CoW one). Besides the question of safety about modifying orig data from threaded despgraph (that was *probably* OK, but think it's bad idea in general), it's much better to have a common way of doing that kind of things. For now it remains rather dodgy, but at least it's reasonably consistent and safe now. This commit also fixes a potential memleak from binding process of MeshDeform, and does some general cleanup a bit.
2018-12-05Fix T58210, Part II: Surface Deform modifier (un)binding is broken.Bastien Montagne
This fixes/clarifies Surface Deform evaluation code that does the binding, since that part should only be called outside of depsgraph evaluation, with orig data-blocks and not CoW ones. Now we have a decent amount of asserts and checks to ensure eveything works as expected. Also had to add a special case to get target's mesh in binding case, since often target's evaluated mesh is not available, in that case (and in that case only), we can actually compute that mesh (because we are out of depsgraph evaluation).
2018-12-05Fix T58679: Missing modifiers update on changes to textureSergey Sharybin
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-04Fix T58220: EdgeSplit at Split Angle: 0 doesn't split flat faces.Bastien Montagne
Add special handling for both edge cases (:p): * 180° is same as no splitting by angle; * 0° is same as split on all edges unconditionnaly. In both cases we can also avoid computing poly normals.
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-12-03Depsgraph: completely move customdata_mask to the ID node.Alexander Gavrilov
Move all mask-related fields from Object and OperationDepsNode to Object_Runtime and IDDepsNode. Auto-apply DEG_TAG_GEOMETRY if the mask changes after DEG rebuild. Update DEG API and all code that uses it. This fixes "source mesh data is not ready" errors from Data Transfer modifier when parameters are changed in the UI after the recent mesh_get_eval_final fix. Reviewers: sergey Differential Revision: https://developer.blender.org/D4025
2018-12-03Data Transfer Modifier: fix mesh_get_eval_final usage.Alexander Gavrilov
It can't be used during modifier evaluation, and rna enum code should access the evaluated objects.
2018-12-02Partial fix for T58113 bevel harden normals bug.Howard Trickey
This fixes the problem where not all faces got hardened properly when using a hardening mode in the bevel modifier.
2018-11-28Cleanup: correct function signaturesCampbell Barton
2018-11-27Modifiers: fix bunch of missing 'self transform' deg relations.Bastien Montagne
When a modifier depends on some other object's position, then it also depends in its own position, this has to be also told to depsgraph. Fixes several modifiers where moving target would update the modifier, while moving modified object itself would not.
2018-11-27Fix missing reset-to-NULL in own recent changes in modifiers utils.Bastien Montagne
2018-11-27MOD_wave: fix various issues.Bastien Montagne
Missing dependsOnNormal callback, potential usage of NULL mesh pointer, style...
2018-11-27Modifiers: cleanup/harmonize deform modifiers code re. mesh source.Bastien Montagne
Also fixes a few issues (like meshdeform's EM variant not using editmesh data), and adds a few optimizations (like only generating that source mesh when we do have a vgroup defined in parameters, for modifiers only using it to access vgroup)...
2018-11-27Modifiers: Refactor `MOD_deform_mesh_eval_get()` helper a bit.Bastien Montagne
Now that function also takes expected number of vertices, and do the checks against generated mesh internally.
2018-11-27MOD_simpledeform: do not compute mesh when not needed.Bastien Montagne
Related to T57972.
2018-11-27MOD_smooth: do not compute mesh when not needed.Bastien Montagne
Related to T57972.
2018-11-27MOD_smooth: do not compute mesh when not needed.Bastien Montagne
Also fixes potential memory leak. Related to T57972.
2018-11-26MOD_shrinkwrap: do not compute mesh when not needed.Bastien Montagne
This modifier only uses mesh to get vgroup, which is only needed in case modified object is indeed a mesh! Building a mesh from curve here is not only useless and time-consuming, it will also easily fail the assert about same number of vertices! Note that surface_project and subsurf option also need more work at some point, but this is probably not that urgent for now. Also, use MOD_get_vgroup() helper in modifier code itself and pass resulting MDeformVert & index to BKE_shrinkwrap's `shrinkwrapModifier_deform()`, this is simpler and avoids duplicating vgroup handling code. Related to T57972.
2018-11-26MOD_curve: do not compute mesh when not needed.Bastien Montagne
This modifier only uses mesh to get vgroup, which is only needed in case modified object is indeed a mesh! Building a mesh from curve here is not only useless and time-consuming, it will also easily fail the assert about same number of vertices! Also, use MOD_get_vgroup() helper in modifier code itself and pass reluting MDeformVert & index to BKE_curve's curve_deform_verts(), this is simpler and avoids duplicating vgroup handling code. Also fixes crash when used on lattice. Related to T57972.
2018-11-26MOD_cast: do not compute mesh when not needed.Bastien Montagne
This modifier only uses mesh to get vgroup, which is only needed in case modified object is indeed a mesh! Building a mesh from curve here is not only useless and time-consuming, it will also easily fail the assert about same number of vertices! Also fixes crash when used on lattice. Related to T57972.
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-11-21Cleanup: use boolean array for mirror modifierCampbell Barton
2018-11-21Modifier: Mirror learns to bisect on planeCampbell Barton
D3966 by @kioku w/ edits. This adds bisect and flip options to mirror modifier.
2018-11-20Fix T57938: Dynamic paint baking issuesSergey Sharybin
Quite usual fix for the caching systems.
2018-11-16Fix T57850, bevel modifier crash with vertex groups and face area mode.Howard Trickey
Used wrong Loop variable in this case.
2018-11-14Merge branch 'master' into blender2.8Campbell Barton
2018-11-14Cleanup: comment block tabsCampbell Barton
2018-11-07Cleanup: remove some useless BKE_library and BKE_main includes.Bastien Montagne
Makes it simpler to make some changes... Also fix order of some includes (use alphabetical please).
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-11-06Shrinkwrap: new mode that projects along the target normal.Alexander Gavrilov
The Nearest Surface Point shrink method, while fast, is neither smooth nor continuous: as the source point moves, the projected point can both stop and jump. This causes distortions in the deformation of the shrinkwrap modifier, and the motion of an animated object with a shrinkwrap constraint. This patch implements a new mode, which, instead of using the simple nearest point search, iteratively solves an equation for each triangle to find a point which has its interpolated normal point to or from the original vertex. Non-manifold boundary edges are treated as infinitely thin cylinders that cast normals in all perpendicular directions. Since this is useful for the constraint, and having multiple objects with constraints targeting the same guide mesh is a quite reasonable use case, rather than calculating the mesh boundary edge data over and over again, it is precomputed and cached in the mesh. Reviewers: mont29 Differential Revision: https://developer.blender.org/D3836
2018-11-06Cleanup: rename fast-heap -> heap-simpleCampbell Barton
In general prefer API names don't start with adjectives since it causes grouping of unrelated API's for completion.
2018-11-06Cleanup: move fast heap into own source & headerCampbell Barton
2018-11-05BLI_heap: implement a limited but faster version of heap.Alexander Gavrilov
If the user only needs insertion and removal from top, there is no need to allocate and manage separate HeapNode objects: the data can be stored directly in the main tree array. This measured a 24% FPS increase on a ~50% heap-heavy workload. Reviewers: brecht Differential Revision: https://developer.blender.org/D3898
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-29Merge branch 'master' into blender2.8Campbell Barton
2018-10-29Modifier: mask threshold optionCampbell Barton
D3834 by @Allosteric
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-24Depsgraph: minor renaming and refactor of API for adding evaluation flags.Alexander Gavrilov
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-10-23Cleanup: rename 'dm' -> 'me' for 'Mesh' typesCampbell Barton
2018-10-23Fix bad origindex layers for editmode modifiersCampbell Barton
Reverts workaround from last commit.
2018-10-17Shrinkwrap: implement the use of smooth normals in constraint & modifier.Alexander Gavrilov
- Use smooth normals to displace in Above Surface mode. - Add an option to align an axis to the normal in the constraint. I've seen people request the alignment feature, and it seems useful. For the actual aligning I use the damped track logic. In order to conveniently keep mesh data needed for normal computation together, a new data structure is introduced. Reviewers: mont29 Differential Revision: https://developer.blender.org/D3762
2018-10-15Fix an obvious typo: use CD_MASK_CUSTOMLOOPNORMAL for CustomDataMask.Alexander Gavrilov
2018-10-15Cleanup: unused codeCampbell Barton
2018-10-14Depsgraph: Add proper API functions for CustomDataMask dependencies.Alexander Gavrilov
There were a few copies of the same few lines in depsgraph build code, so it seems to be logical to introduce a function for it, and make it accessible from C code for completeness. As an example, register the mask needs of the Data Transfer modifier.
2018-10-10Modifier: use simplified bmesh -> mesh conversionCampbell Barton
2018-10-09Edit Mesh: replace DerivedMesh w/ MeshCampbell Barton
DerivedMesh is now removed from edit-mesh modifier evaluation.
2018-10-09Cleanup: namingCampbell Barton
Use BKE_mesh_* prefix for mesh module.
2018-10-01Cleanup: styleCampbell Barton