Commit Graph

194 Commits

Author SHA1 Message Date
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
5970adaccf Fix [#30351] Solidify Modifier High Quality Normals fails.
Don't really know why, but appears we need to recalc normals when this option is ON.

Also small perf improvement (avoid to compute twice each face normals).
2012-02-26 15:38:28 +00:00
566464366f solidify modifier fix for material offset. 2012-02-11 21:39:09 +00:00
12531c5c76 fix for crash applying solidift after subsurf 2012-01-23 21:04:56 +00:00
1b505e6d1b replace CDDM_calc_normals_mapping with CDDM_calc_normals when used within modifiers.
this way modifiers wont be calculating tessface's which CDDM_calc_normals_mapping will do if not already calculated.
2012-01-20 13:25:54 +00:00
afda428b7e skip converting non CDDM type derived meshes for solidify modifier. 2012-01-19 23:51:40 +00:00
ddefb8a7d7 another fix for bmesh/solidify - was using incorrect poly length when finding the customdata to copy. 2012-01-17 13:26:59 +00:00
7e15c6ef97 remove some complexity in solidify code rim face creation.
was doing a loop lookup when the index was already available.
2012-01-17 13:18:23 +00:00
ded0af482b rename CDDM_calc_normals() --> CDDM_calc_normals_mapping 2012-01-06 00:12:24 +00:00
7d02f986b6 remove re-tesselation after constrictive modifiers, this way we can avoid calculating tessfaces between multiple constructive modifiers to speedup the modifier stack. 2012-01-05 12:50:23 +00:00
7fd67392eb added a function to ensure derived mesh has tessface's, in preparation for removal of tessface recalculation after each modifier runs. 2012-01-05 12:40:09 +00:00
c174f5682c syncing modifiers with trunk - only small changes 2011-12-29 04:04:27 +00:00
2da527b017 un-inline edgehash functions, BLI_edgehash_insert was far too big to inline.
and have edge hash use unsigned ints since edge verts are unsigned ints for MEdge's
2011-12-28 10:06:10 +00:00
86b184dc9b un-inline edgehash functions, BLI_edgehash_insert especially was too large to inline 2011-12-28 09:47:24 +00:00
dab41e0499 macro for getting next/previous MPoly loops 2011-12-28 07:10:27 +00:00
4bc4c018d1 set mloop edge and vertex as unsigned ints since face/edge reference verts as unsigned ints too 2011-12-28 04:43:29 +00:00
2cd5436a81 svn merge ^/trunk/blender -r42839:42871 2011-12-25 21:31:19 +00:00
eb3beca8d4 replace u_int64_t with cc99's uint64_t as suggested by Nicholas Bishop. 2011-12-24 03:03:42 +00:00
2457d4f5ab svn merge ^/trunk/blender -r42680:42722 2011-12-19 10:40:48 +00:00
90ef435145 Fix a bug in CustomData_duplicate_referenced_layer(_named) functions: MEM_dupallocN does not work with complex layers like CD_MDEFORMVERT ones, so rather use copy func when available. 2011-12-19 08:26:53 +00:00
824bfa98c3 fix [#29378] some textures getting stretched when the mesh has solidify and subsurf 2011-12-05 07:48:49 +00:00
274080025d remove wrong solidify & draw changes i had checked in here and had also proposed for trunk, because the problem was fixed differently in trunk.
#-This line, and those below, will be ignored--

M    source/blender/modifiers/intern/MOD_solidify.c
M    source/blender/blenkernel/intern/cdderivedmesh.c
2011-11-30 06:27:38 +00:00
eb46f6bf0d More DM func renames, this one includes renames of the function pointer members of the DerivedMesh struct 2011-11-29 13:01:51 +00:00
4e86b48cbd Rename DM *_face_* funcs to be either *_tessface_* or *_poly_* to avoid confusion
This is the first step in a few changes to cleanup confusing/missing DM funcs
2011-11-29 05:09:54 +00:00
f2551ff799 - add BM_NGON_STACK_SIZE define to use wherever ngon stack arrays are used.
- renamed BM_Compute_Face_Center() to BM_Compute_Face_CenterBounds() and added BM_Compute_Face_CenterMean() since there was code inline to find the mean center in transform.
2011-11-29 04:11:17 +00:00
2266c7fc1c Add CD_POLYINDEX layer to reduce need for retesselations 2011-11-13 15:13:59 +00:00
9be43762bc svn merge -r41431:41453 ^/trunk/blender 2011-11-01 23:24:51 +00:00
c70cde6f94 Fix #29124: Modifying mesh with mirror and solidify modifiers crashes blender
It is corrected fix for #29089 (svn rev 41409). That fix wasn't correct because
it used to set face number from derived mesh on which solidify is applying which
isn't correct for case of constructive modifiers applied on base mesh before
solidify modifier.

Actually nothing special should be performed here to set needed original index
because of ORIGINDEX layer is getting copyed automatically when when copying faces.
2011-11-01 17:43:30 +00:00
2241eaddf5 Reverting r41409 (broken fix for #29089)
r41409 can cause a crash if you delete a face of a mesh that has subsurf & solidify modifiers active
2011-11-01 17:06:10 +00:00
e08c4a00d2 svn merge -r41371:41420 ^/trunk/blender 2011-11-01 02:01:09 +00:00
2ceeaf9721 fix [#29089] Faces created for "rims" by solidify modifier have incorrect visibility 2011-10-31 07:17:35 +00:00
9c5a620e4d Fix problems with setting (and respecting) correct visibility of rim faces created by solidify modifier 2011-10-31 00:34:19 +00:00
dbe1c4277a Fix "[#29036] Crash on solidify" and a few misc subsurf and derived mesh bugs that were blocking correct functionality of "apply modifier to editcage" when you have a subsurf + solidify modifier on the stack 2011-10-27 12:17:02 +00:00
15e6d6cd75 svn merge ^/trunk/blender -r41226:41227 . 2011-10-24 12:43:08 +00:00
0503a4f7a6 svn merge ^/trunk/blender -r41100:41150 2011-10-24 04:18:28 +00:00
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
5cf593a778 strcpy() --> BLI_strncpy(), where source strings are not fixed and target size is known. 2011-10-19 23:10:54 +00:00
1f12740a82 make error prints more helpful & correct some comments for rip code. 2011-09-24 12:13:13 +00:00
9494340dae svn merge ^/trunk/blender -r40432:40491 2011-09-23 13:04:01 +00:00