Commit Graph

90 Commits

Author SHA1 Message Date
Sergey Sharybin
aa4cb95a5c Pass proper bmain to the updateDepgraph() of modifiers
This is mainly to make physics modifiers being able to work
with it. For other cases this main is not needed.
2015-03-13 12:03:23 +05:00
Campbell Barton
915235c87a Cleanup: unused headers 2014-11-28 22:16:14 +01:00
Campbell Barton
ab06ec7a24 Rewritten Array Modifier D443
Patch by PatB with own edits

- replace BMesh with CDDM functions.
- faster remove-vertex merging.
- extend CDDM_merge_verts to be more flexible.
2014-08-12 13:52:17 +10:00
Campbell Barton
4ca67869cc Code cleanup: remove unused includes
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-05-01 04:47:51 +10:00
Campbell Barton
617557b08e Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define 2014-04-01 15:22:28 +11:00
Campbell Barton
158b4e61a0 Mesh Modifiers: refactor copying using a generic function 2013-12-22 04:37:26 +11:00
Brecht Van Lommel
7214001cdb Fix T37837: mirror modifier merge does not place vertices at the center.
This was broken since BMesh.
2013-12-18 11:15:11 +01:00
Campbell Barton
4982f200fa move alloca define into its own header since its not related to BLI_array 2013-07-28 10:38:25 +00:00
Campbell Barton
ad0305281b fix [#35545] Weight paint with mirror modifier does not accurate represent bone influence 2013-06-02 22:40:45 +00:00
Campbell Barton
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
Campbell Barton
a70fa65592 optimize mirror merging, remove array reallocation, replace with fixed size arrays. 2013-05-27 20:11:12 +00:00
Campbell Barton
ec8d277c64 BLI_math rename functions:
- mult_m4_m4m4 -> mul_m4_m4m4
- mult_m3_m3m4 -> mul_m3_m3m4

these temporary names were used to avoid problems when argument order was switched.
2013-05-26 18:36:25 +00:00
Brecht Van Lommel
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
Campbell Barton
224c7a273a code cleanup: quiet shadow warning. 2013-03-23 17:11:03 +00:00
Campbell Barton
fd77408e09 revert r52399, fix for [#33217], will look into a different fix 2012-11-21 10:53:15 +00:00
Antony Riakiotakis
1d7b366050 Fix #33217, mirror modifier edges missing in wireframe mode.
I see we explicitly set the edge visibility in the code for a few
modifiers because of this flag missing. The only place that this flag is
not set is during subsurf so maybe it would make a lot more sense to set
it by default on newly created edges (currently off by default) through
bmesh and turn it off for any modifiers that may need it to be off.
2012-11-20 09:59:57 +00:00
Campbell Barton
2de2acc681 add CDDM_from_bmesh(), avoids using BMEditMesh in modifiers. 2012-10-24 07:24:11 +00:00
Campbell Barton
aaafa0c2fe code cleanup: move file string defines into BLI_path_utils.h, BKE_utildefines is now unused but keep incase we want to add defines there later. 2012-09-03 22:04:14 +00:00
Brecht Van Lommel
5478b21b28 Fix: mirror modifier only mirrors first UV map (IRC report). 2012-05-15 15:02:02 +00:00
Bastien Montagne
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
Campbell Barton
3d8e58751c style cleanup: modifiers 2012-05-06 13:38:33 +00:00
Campbell Barton
5da2135eef code cleanup: double promotion & some style cleanup 2012-05-03 21:35:04 +00:00
Brecht Van Lommel
ade7f59d0a Fix #31190: mirror modifier caused non-planar quads to be split differently on
the other side, now keep the first vertex of the polygon the same to avoid this.
2012-05-02 16:17:04 +00:00
Campbell Barton
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
Brecht Van Lommel
f18dab65ad Fix #30531: mirror modifier with vertex groups did not add both the left and
right groups to merged vertices, only one. This made the result asymmetric,
now merged vertices will be part of both groups with half weight.
2012-03-19 21:09:16 +00:00
Campbell Barton
4f19c1a995 spelling cleanup 2012-03-18 07:38:51 +00:00
Campbell Barton
79d97ca509 style cleanup - spelling. 2012-03-08 04:12:11 +00:00
Sergey Sharybin
f5f529e740 Fix freeing of NULL pointer in array modifier. 2012-02-22 13:15:29 +00:00
Bastien Montagne
1b0802265c Fix [#30281] Left/Right vertex weights flipped.
Mirror modifier was flipping vgroups on org vertices, not mirrored ones!
2012-02-21 14:45:18 +00:00
Campbell Barton
e236fb157a fix leak in mirror modifier. 2012-01-24 00:26:12 +00:00
Campbell Barton
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
Campbell Barton
ded0af482b rename CDDM_calc_normals() --> CDDM_calc_normals_mapping 2012-01-06 00:12:24 +00:00
Campbell Barton
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
Campbell Barton
0a1e48fa78 only run remove doubles if a double is found. 2012-01-03 14:02:51 +00:00
Campbell Barton
cadb813102 change to bmesh mirror modifier.
Rather then making a copy of the input when its not a CDDM type, use functions which read from any derived mesh type.
2012-01-03 13:57:31 +00:00
Campbell Barton
20b425e5d1 minor changes for mirror modifier, bigger changes coming. 2012-01-03 09:37:57 +00:00
Campbell Barton
ab5bef6fbb bmesh mirror modifier cleanup
* vertex map was a dynamicly realloc'd array when the final size was known, use a fixed array instead.
* vertex map was being calculated even when not used.
* face tesselation was being called twice.
* an unused deform group array was being created.
2011-12-29 09:15:06 +00:00
Campbell Barton
eee1ad6e56 bmesh mirror modifier wasn't doing UV mirror at all. 2011-12-29 07:29:44 +00:00
Campbell Barton
6b587bc5a1 svn merge ^/trunk/blender -r42957:42967 2011-12-29 06:44:51 +00:00
Campbell Barton
f951cbb90c remove unused initFlags option in mirror modifier 2011-12-29 06:32:50 +00:00
Campbell Barton
c058d252d1 minor edits to trunk mirror modifier, use unsigned ints since the vertex values are unsigned + minor formatting edits 2011-12-29 06:07:34 +00:00
Campbell Barton
b527e9f0ac array had its own unused vertgroup_flip_name function. removed. 2011-12-29 04:07:57 +00:00
Campbell Barton
c174f5682c syncing modifiers with trunk - only small changes 2011-12-29 04:04:27 +00:00
Campbell Barton
397d7d949f remove unneeded casts from 'unsigned int' to 'int' 2011-12-27 03:54:23 +00:00
Campbell Barton
db6cb30941 svn merge ^/trunk/blender -r42669:42670 2011-12-16 23:50:55 +00:00
Brecht Van Lommel
3311164b24 Math lib: matrix multiplication order fix for two functions that were
inconsistent with similar functions & math notation:

mul_m4_m4m4(R, B, A) => mult_m4_m4m4(R, A, B)
mul_m3_m3m4(R, B, A) => mult_m3_m3m4(R, A, B)

For branch maintainers, it should be relatively simple to fix things manually,
it's also possible run this script after merging to do automatic replacement:
http://www.pasteall.org/27459/python
2011-12-16 19:53:12 +00:00
Campbell Barton
22a1ad61f9 svn merge ^/trunk/blender -r42372:42416 2011-12-04 18:39:19 +00:00
Campbell Barton
cbd5b492b1 remove use of deprecated struct members
- editmesh smooth & subdivide were using old mirror axis flag still.
- removed colbits from outliner and object code.
- commented some other parts of the code which access deprecated members and aren't called anywhere.
2011-12-04 06:39:35 +00:00
Campbell Barton
e59ab6486f svn merge -r41751:41779 ^/trunk/blender 2011-11-15 02:05:32 +00:00
Andrew Wiggin
2266c7fc1c Add CD_POLYINDEX layer to reduce need for retesselations 2011-11-13 15:13:59 +00:00