Commit Graph

130 Commits

Author SHA1 Message Date
4a4f091155 Fix #35174: dynamic paint displacement missing in render.
A previous bugfix disabled the dynamic paint modifier for orco texture
coordinate evaluation of the modifier stack. However the MOD_APPLY_USECACHE
flag is not a good way to check if the modifier is evaluated for orcos.

Instead I've added a MOD_APPLY_ORCO flag. Also removed a bunch of
applyModifierEM callbacks, none of them served a purpose except for the
subsurf modifier.
2013-05-02 14:42:05 +00:00
3dababa7ec code cleanup: name mesh functions more consistently, also use bools for mesh args. 2013-03-17 19:55:10 +00:00
1d5b7bc1f7 fix for typo in skin modifier that resulted in incorrect vertex weights. 2013-03-08 04:31:21 +00:00
5ddc7d64a8 optimize bmesh operations that use triangle BMFace's (dyn-topo and mesh conversion). 2013-01-16 21:09:54 +00:00
07ccd3ee3f fix [#33029] Applying modifier leaks memory
Thanks for Sergey for finding the bug & patching, This fix works a bit differently.
Theres no need to allocate the customdata in the first place - since its written into. So add a flag for vert/edge/face/loop creation functions so they can skip customdata creation.
2012-11-29 16:26:39 +00:00
3d64381e4d use more rigid type checking for bmesh slot subtypes. 2012-11-26 03:16:29 +00:00
ebaf1306b8 bmesh operator api:
avoid per vert/edge/face string lookups in BMO_slot_map_* functions --- used in array modifier, subdivide, remove doubles and other tools.
2012-11-20 13:29:27 +00:00
dbdc76c9d0 code cleanup: make bmesh operator names more consistant since python has access to these as input arguments and return values.
all output values currently have ".out" suffix, this may go in the future, but for now it makes it clear in C code what are inputs and outputs.
2012-11-20 05:50:19 +00:00
48639af5f8 use input and output slots for bmesh operators, needed for the python api to get return values. 2012-11-19 14:58:31 +00:00
317dff520c fix for skin modifier calling rotate_normalized_v3_v3v3fl with a non unit length axis. 2012-11-18 11:48:21 +00:00
6cdb555e6e bmesh refactor - rename some of the BM_****_share_****_count() functions to BM_***_share_check()
some of these were only returning a boolean, others returned a count even though only a boolean was needed.

split some of the functions in two as well where check/count are both needed.
2012-11-09 14:52:05 +00:00
2bb174cfa4 style cleanup: indentation 2012-11-09 09:33:28 +00:00
5549904171 style cleanup 2012-10-29 02:11:40 +00:00
e5a31eff37 code cleanup: use squared length for comparisons and is_zero_v# rather then checking length == 0. 2012-10-25 23:04:33 +00:00
2de2acc681 add CDDM_from_bmesh(), avoids using BMEditMesh in modifiers. 2012-10-24 07:24:11 +00:00
f70d2c65d8 rename api functions...
- minf, maxf, mini, maxi --> min_ff, max_ff, min_ii, max_ii
2012-10-23 13:28:22 +00:00
248b2fc6d6 bmesh-decimator update
- update face normals when triangulating.
- avoid divide by zero when interpolating customdata on a zero length edge.
- replace zero float comparisons with fabsf() < FLT_EPSILON to avoid numeric error.

also renamed BLI_heap_empty() --> BLI_heap_is_empty() so its obviously readonly function.
2012-10-21 15:20:53 +00:00
a423f55ca9 Avoid recursion in skin modifier's edge matrix calculations
This is a potential fix for bug [#32263] Instant Crash with Skin
modifier.
2012-08-05 23:29:50 +00:00
c41e1e434a code cleanup: replace MIN2/MAX2 with minf/maxf 2012-07-29 16:59:51 +00:00
90d215535e add option so operators can be called with a flag, currently the only flag is to respect hidden geometry.
this is useful for bmesh tools that operate in object mode or for modifiers which would previously use hidden faces in some cases.
2012-07-21 00:58:02 +00:00
677876e429 Fix normals around root nodes of skin modifier output.
The direction for these are flipped from other end caps, so add a root
flag to indicate whether the cap polygon's vertex output order should be
reversed.

Fixes bug [#32079] Skin-modifier calculates root's normals wrong
projects.blender.org/tracker/index.php?func=detail&aid=32079&group_id=9&atid=498
2012-07-12 05:55:07 +00:00
69a7e0af02 rename bmesh ops since they are exposed in an api now. 2012-06-30 15:27:13 +00:00
405f6a7c77 code cleanup:
style and remove BM_face_find_longest/shortest_edge functions,
... instead use BM_face_find_longest/shortest_loop()->e
2012-05-27 11:10:27 +00:00
75a8de49fc Fix bug #31582, Crash with Skin modifier
Buffer overflow error in collecting split_face vertices.
2012-05-24 19:41:09 +00:00
da710b3e14 style cleanup: brace placement/newlines 2012-05-24 16:35:45 +00:00
f16f545c6e style cleanup
also fix example for mesh uv's
2012-05-22 16:24:09 +00:00
e1eeb81792 style cleanu: skin modifier 2012-05-22 15:57:42 +00:00
8801330c18 Add skin modifier: DNA, RNA, UI, and MOD_skin.c implementation.
Skin modifier documentation:
http://wiki.blender.org/index.php/User:Nicholasbishop/SkinModifier

Implementation based in part off the paper "B-Mesh: A Fast Modeling
System for Base Meshes of 3D Articulated Shapes" (Zhongping Ji,
Ligang Liu, Yigang Wang)

Note that to avoid confusion with Blender's BMesh data structure,
this tool is renamed as the Skin modifier.

The B-Mesh paper is current available here:
http://www.math.zju.edu.cn/ligangliu/CAGD/Projects/BMesh/

The main missing features in this code compared to the paper are:

* No mesh evolution. The paper suggests iteratively subsurfing the
  skin output and adapting the output to better conform with the
  spheres of influence surrounding each vertex.

* No mesh fairing. The paper suggests re-aligning output edges to
  follow principal mesh curvatures.

* No auxiliary balls. These would serve to influence mesh
  evolution, which as noted above is not implemented.

The code also adds some features not present in the paper:

* Loops in the input edge graph.

* Concave surfaces around branch nodes. The paper does not discuss
  how to handle non-convex regions; this code adds a number of
  cleanup operations to handle many (though not all) of these
  cases.
2012-05-22 15:29:01 +00:00
6c3bb8b903 EditMesh-based skin node drawing 2011-07-31 02:03:48 +00:00
cae05598b1 Added DNA and RNA for skin modifier, stubbed in skin modifier functions 2011-07-31 02:03:28 +00:00