Commit Graph

132 Commits

Author SHA1 Message Date
8a40444d6b fix bad uses of sizeof() with memory allocation. 2013-07-13 05:43:35 +00:00
d4cbd78a79 fix for recent changes in solidify, normals were OK but customdata for loops wasnt. 2013-06-15 08:59:54 +00:00
9161a4daa5 fix for own error in recent solitify refactor (r57402), face flip check was incorrect. 2013-06-14 16:10:32 +00:00
69153c7089 ifdef bugfix since its a little strange. 2013-06-12 10:03:13 +00:00
31e667c10e solidify: dont add poly-normal layer to the derived mesh, since this is no longer a convention. 2013-06-12 09:35:02 +00:00
8e2e590484 fix [#35710] Mesh explodes while using solidify modifier with tubular non-manifold base mesh. 2013-06-12 08:24:31 +00:00
0b316d72ca change to solidify modifiers own normal calculation function, dont attempt to calculate normals for edges with 3+ face users. 2013-06-12 07:53:54 +00:00
293b3f0bdf optimize solidify, no need to do edgehash lookups, the edges are known. 2013-06-12 07:16:13 +00:00
d00ca6eb2c solidify: reduce sign conversions. 2013-06-12 06:51:02 +00:00
3994ad8ced solidify: remove BLI_array realloc's. 2013-06-12 06:20:24 +00:00
da733a25a5 correct solidify normal calculation logic
- always calculate vertex normals since they are used as fallbacks.
- only calculate rim normals if the normals are not already flagged as dirty.
2013-06-12 06:06:19 +00:00
ec30e3f00e corrections to modifiers from recent normal handling changes
- solidify didn't define a dependsOnNormals callback (which it should have)
- build wasn't passing on dirty normals.
- decimate wasnt setting dirty normals.
2013-06-02 04:09:29 +00:00
09e11ad6ef modifier stack: lazy initialize normals
many modifiers were calculating normals, when those normals were ignored by the next modifier.
now flag normals as dirty and recalculate for modifiers that set use `dependsOnNormals()` callback.

Quick test on mesh with 12 modifiers (mostly build type), calculated normals 6 times, now it only runs once - so this will give some speedup too.
2013-05-30 17:36:43 +00:00
28937676f3 fix for out of bounds memory access in solidify (harmless with guardedalloc padding but bad practice) 2013-05-25 00:22:04 +00:00
0ee45c9301 more optimal method of calculating the normal for the solidify modifier.
When adding 2 unit length vectors, the length can be used to calculate the angle.
2013-05-08 14:33:02 +00:00
76b1e8bc09 code clenup: rename BKE_mesh_poly_calc_angles -> BKE_mesh_calc_poly_angles 2013-05-08 12:56:51 +00:00
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
4c2c24aac3 Fix #35113: solidify modifier not preserving clamp option on duplicating the
object or modifier.
2013-04-27 12:54:31 +00:00
1a3c59baac fix for out of bounds memory access in solidify modifier (hidden by guardedalloc). 2013-04-26 11:31:54 +00:00
1d73ee50a4 solidify modifier: thickness clamping helps prevent self intersections when there are small details on a larger model. 2013-03-13 17:31:26 +00:00
8033834573 fix own regression since 2.65 [#34438] Solidify crease bug 2013-02-26 14:32:53 +00:00
b94a5d59bf fix [#33742] Solidify - Material index problem
missed copying material offset values.
2013-01-04 08:17:09 +00:00
af51827dda add a message when solidify is used with only-edges, this isn't properly supported.
also minor edits to py-api-ref
-- This line, and those below, will be ignored--

M    doc/python_api/sphinx_doc_gen.py
M    doc/python_api/rst/include__bmesh.rst
M    source/blender/modifiers/intern/MOD_solidify.c
2012-12-05 01:02:41 +00:00
2bb174cfa4 style cleanup: indentation 2012-11-09 09:33:28 +00:00
23d43396ff code cleanup: quiet -Wshadow warning, var name changes for splice functions and add assert for BM_edge_splice() when edges don't use the same vertices. 2012-10-20 09:56:40 +00:00
f67de7d805 fix for regression in solidify modifier copying loop customdata to rim faces (UV's and vertex colors).
Own fault when fixing rim face flipping r46924
2012-09-25 01:21:21 +00:00
b0bf816ece fix [#32646] Duplifaces can have wrong orientation with ngons
concave ngons could flip the dupliface, now use the faces normal when calculating the dupli-face.
2012-09-25 00:20:42 +00:00
32cf7fcdb1 code cleanup: spelling 2012-07-16 23:23:33 +00:00
5189356d58 style cleanup 2012-06-04 20:11:09 +00:00
c895c0ee23 patch [#31579] Solidify modifier: Add new option "Flip Normals"
- previous commit was so similar to the patch Shinsuke wrote, better to add him as contributor, this commit will add to generated credits.
- this commit has no functional changes.
2012-05-26 09:39:04 +00:00
e343a69e76 solidify option to flip normals 2012-05-26 09:18:47 +00:00
29e89dc996 code cleanup: solidify modifier - remove dead assignment and unneeded NULL check. 2012-05-25 06:54:01 +00:00
27220c3340 solidify modifier - replace define, no longer needed since switching to bmesh. 2012-05-23 06:39:29 +00:00
8f886b3958 solidify modifier - replace VECADDFAC with inline function. 2012-05-23 06:32:02 +00:00
f537691c6b fix solidify modifier flipping of rim polygons. 2012-05-23 06:25:31 +00:00
eb023322ef style cleanup: mmap_win32 2012-05-22 13:20:01 +00:00
8b2ffc1428 fix for error in last commit and minor speedup to looping over edges. 2012-05-22 10:10:14 +00:00
e7647e1585 solidify modifier - remove a loop on all edges. 2012-05-22 09:53:33 +00:00
305d341ec2 code cleanup: use vector math function minmax_v3v3_v3() and other minor vector function edits. 2012-05-13 11:05:52 +00:00
318b44fe5d Refactor of modifiers' apply function: now use a single bit-flag parameter to pass options, instead of having one parameter per boolean flag (i.e. replaces current useRenderParams and isFinalCalc by a single ModifierApplyFlag flag. ModifierApplyFlag is an enum defined in BKE_modifier.h). This way we won't anymore have to edit all modifier files when e.g. adding a new control flag!
Should have no effect over modifier behavior.
2012-05-09 15:00:26 +00:00
6f20ef6d87 optimize ngon angle calculation in solidify modifier (was doing prev/next vector subtract and normalize for every vertex). now store the previous normalized vector for re-use.
also add BKE_mesh_poly_calc_angles() which is mostly a reference for now.
2012-05-08 14:58:38 +00:00
353ef9541a fix [#31347] solidify modifier > even thickness parameter weired 2012-05-07 18:07:34 +00:00
6291b36d4c fix for solidify modifier angle calculation (was incorrectly using normalized angle function) 2012-05-07 15:45:41 +00:00
3d8e58751c style cleanup: modifiers 2012-05-06 13:38:33 +00:00
5da2135eef code cleanup: double promotion & some style cleanup 2012-05-03 21:35:04 +00:00
8fa17c5362 code cleanup: no functional changes
- memset(..., -1) is used incorrectly even though it worked: MOD_solidify.c - thanks Halley from IRC for noticing this. use fill_vn_i() instead.
- quiet warnings in editmesh_slide.c
- cleanup comments in bmesh and some other minor comment additions.
2012-04-07 12:37:15 +00:00
5a90ea77bc style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:24:53 +00:00
4f19c1a995 spelling cleanup 2012-03-18 07:38:51 +00:00
89a963fb7f style cleanup: comment blocks 2012-03-09 18:28:30 +00:00
c956e5d2d9 modified fix for "Fix [#30351] Solidify Modifier High Quality Normals fails." from r44464.
rather then recalc polygon normals - solidify is simple enough to just flip the normals of the copied faces, the rim faces normals are already re-calculated so copy them.
2012-02-26 18:12:01 +00:00