158b4e61a0
Mesh Modifiers: refactor copying using a generic function
2013-12-22 04:37:26 +11: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
3fab39f76f
style cleanup: modifier structs
2012-10-24 05:45:54 +00:00
d24a27ca36
Fix remesh output changing when input is moved relative to origin.
...
Fixes bug [#31626 ] Remesh modifier generates different results
depending on object origin position
Was incorrectly initializing bounding box min/max to zero, now uses
INIT_MINMAX.
2012-06-04 23:53:59 +00:00
b5a6be37f1
Add smooth-shading option for remesh modifier.
...
The remesh modifier doesn't currently get any data from original
faces, so even if the input mesh was entirely smooth none of the
output faces would be. Solved by adding a new
dna-flag/rna-bool/UI-checkbox to smooth shade the output.
Requested by Daniel Salazar.
2012-05-18 06:10:47 +00:00
b5a6afd767
Enable remesh modifier for curves.
2012-05-17 17:16:51 +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
3d8e58751c
style cleanup: modifiers
2012-05-06 13:38:33 +00:00
b340f930ec
style cleanup: changes to brace placement / newlines - for/while/if/switch
2012-04-28 06:31:57 +00:00
9cf2e5baf6
Fix windows compile issue with missing isnan.
2012-04-16 08:11:07 +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
89a963fb7f
style cleanup: comment blocks
2012-03-09 18:28:30 +00:00
6ee4451a9e
BMesh remesh modifier: create MPolys/MLoops directly rather than MFaces.
...
This is also a bugfix, face normals were not showing correctly for the
remesh output.
2012-02-07 01:20:49 +00:00
096a16eaf6
avoid an extra mesh copy in remesh modifier
2012-01-29 22:13:08 +00:00
2ea8a3b8ca
remove CDDM_copy second argument, added CDDM_copy_from_tessface instead.
...
this function caused too many conflicts and in most cases was zero anyway.
2012-01-29 21:59:47 +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
be1bc0eb98
rename
...
* CDDM_calc_edges --> CDDM_calc_edges_tessface
* CDDM_calc_edges_poly --> CDDM_calc_edges
2012-01-06 02:59:28 +00:00
ded0af482b
rename CDDM_calc_normals() --> CDDM_calc_normals_mapping
2012-01-06 00:12:24 +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
b64f352270
svn merge ^/trunk/blender -r43033:43062
2012-01-02 02:57:36 +00:00
defa99b65c
Fixed names of VertexWeight modifiers RNA structs, in RNA_access.h (probably forgotten when they were renamed, before the merge in trunk, and was never noticed as they are not used...).
...
Also removed the $ID$ from remesh modifier header, and quited a gcc warning.
2012-01-01 16:09:32 +00:00
71bc053bb2
remesh now working for bmesh
2011-12-31 12:58:03 +00:00
ba8d1b940f
option to build without remesh modifier for cmake and scons
2011-12-31 03:34:44 +00:00
289c8b5758
Add remesh modifier (dual contouring).
...
This patch adds a new remeshing modifier. The algorithm is based on
the paper "Dual Contouring of Hermite Data", and the implementation
was contributed to Blender by Dr. Tao Ju.
The contributed code is in intern/dualcon, and was modified to compile
under gcc and work on 64-bit systems. Files not needed for Blender
were removed and a small C wrapper was added in order to interface it
with Blender. The rest of the patch is just standard modifier stuff.
Reviewed by Sergey, code review link:
http://codereview.appspot.com/5491053/
The remesh icon was contributed by Zafio:
http://blenderartists.org/forum/showthread.php?240751-Request-for-modifier-icon/page2 .
Thanks to everyone in that thread for the icon proposals and
discussion.
Documentation and examples on the Blender wiki:
http://wiki.blender.org/index.php/User:Nicholasbishop/RemeshModifier
In case the history is needed for anything, check the remesh-modifier
branch of this git repository:
https://gitorious.org/~nicholasbishop/blenderprojects/nicholasbishop-blender
2011-12-30 21:11:40 +00:00