Commit Graph

606 Commits

Author SHA1 Message Date
7d18115e14 own error - mixup with BMO_slot_mat_get/set 2012-02-13 05:59:14 +00:00
2d1a05874b svn merge ^/trunk/blender -r44024:44076 2012-02-13 04:14:35 +00:00
37ff2a291f BMesh api function naming.
`_set` suffix was used in two ways (confusing)
* to set a flag to be enabled.
* to set a value passed as an argument.

now use enable/disable rather then set/clear for functions which change flags.

also remove BME_weld.c, the file didnt contain much code and the current extrude works well
2012-02-12 18:43:59 +00:00
9a92cd8008 bmesh minor refactor
* add DM_to_bmesh_ex, DM_to_bmesh for converting a derived mesh to a BMesh (rather than a BMEditMesh)
* have a generic variable for allocsize: bm_mesh_allocsize_default, rather than copying the values about.
2012-02-12 17:44:10 +00:00
39daef28a1 Bug fix: Explode modifier created invalid faces if "unborn", "alive" or "dead" setting was unchecked
* Exploded faces that were meant to be hidden were still created with invalid vertices (0,0,0,0).
* In normal cases this went unnoticed, but for example edge split modifier crashed when it encountered these faces.
2012-02-12 16:47:03 +00:00
7c2715a7ad rename CDDM_To_BMesh to DM_to_editbmesh, since theres no requirement for
the input to be a CDDM.

remove conversions to CDDM for edge split and bevel (will give some
speedup).
2012-02-12 15:02:33 +00:00
b6dcdb065d code refactor, function renaming for bmesh.
These changes are to make the bmesh api more consistent and easier to learn, grouping similar functions which is convenient for autocomplete.
This uses similar convention to RNA. 

* use face/loop/edge/vert as a prefix for functions.
* use 'elem' as a prefix too for functions that can take any type with a BMHeader.
* changed from camel case to underscore separated (like RNA).
2012-02-12 10:51:45 +00:00
8b43813b69 rename BM_ flags for BMHeader->hflag to BM_ELEM_ to be more clear that these flags apply to bmesh elements. 2012-02-12 06:24:12 +00:00
566464366f solidify modifier fix for material offset. 2012-02-11 21:39:09 +00:00
1dc3536268 mode bmesh include cleanup, remove unused file too. 2012-02-11 10:15:11 +00:00
5ea86e1e2b svn merge ^/trunk/blender -r43995:44024 2012-02-11 04:10:50 +00:00
758c228263 update gpl header in cmake files 2012-02-11 04:05:00 +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
543fb27fd0 support for 'origspace' data layer - used for hair on subsurf mesh.
currently only works for 3/4 sided faces.
2012-02-05 11:30:26 +00:00
d0412a1981 svn merge ^/trunk/blender -r43864:43887 2012-02-05 02:30:30 +00:00
deec4ce0bc Code Cleanup: avoid double promotion. 2012-02-04 06:55:29 +00:00
075fee4d58 svn merge ^/trunk/blender -r43830:43864 2012-02-03 01:30:21 +00:00
0791993030 Minor Speedup: avoid for() loop over all faces in fluidsim by passing an example face to the mesh read function (also avoid a lot of int -> short/char conversions). 2012-02-02 23:58:46 +00:00
68cc7e1682 fix [#29980] Fluid only displays wireframe
fluid sim was creating tessfaces only - when the modifier stack expects MPoly's
2012-02-02 20:58:56 +00:00
8926cbd0a7 svn merge ^/trunk/blender -r43819:43830 2012-02-02 00:04:47 +00:00
Lukas Toenne
e6efe93c09 Optional offset for fluid cache frame reading.
This was a request by Daniel Salazar. It adds a new frame offset variable to fluid sim settings, which can be used to display baked fluid sims at different times. Eventually this could be replaced by real NLA strips for cached data, but until then this is a simple way to have more flexible cache result usage.

Not strictly a BCon3 patch, but after IRC discussion with Genscher, ZanQdo and kaito decided to commit it anyway, since it's a small feature and makes fluid sim a bit more usable. Similar patch for point cache (particles, smoke, cloth) is being worked on as well.
2012-02-01 15:58:26 +00:00
4aa82806ef svn merge ^/trunk/blender -r43751:43819, need to look into changes made to editmesh_loop.c from this range still 2012-02-01 09:31:13 +00:00
2050ab09a5 calc_curve_deform was using axis range of 1-6, but other parts of the code use 0-5. (confusion here casued an error in the code).
make calc_curve_deform use 0-5 too, only minor changes needed.
2012-01-31 21:32:06 +00:00
b410d06dde Fix #29976: Carve Boolenas crasher with Solidify
Issue was caused by union policy needed to deal with cases when operand intersects
two or more intersecting meshes of another operand.

Changed this policy to run union operation only if there's actual intersection
between two meshes of the same object. Should work in general but it's still
possible to make it behave incorrect -- for example object consist of two groups
if concentric cubes which intersects each other.
2012-01-30 09:19:38 +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
870aa90112 svn merge ^/trunk/blender -r43733:43751 2012-01-29 21:49:49 +00:00
b820ec4ae4 Fixed for cloth modifier when it's applied after deformation modifier. 2012-01-29 16:55:57 +00:00
b35446c3fa Fix #30000: Boolean modifier messing up multi material
Issue was caused by resetting face's mat_nr to zero if there's no material
map sent to ConvertCSGDescriptorsToDerivedMesh. In case of boolean modifier
we can't use such map because we can't affect on materials present in object.

So the only way which can give reasonable result is:
- Dot change mat_nr for faces from left operand (they should be fine, because
  materials aren't deleting by modifier)
- For faces from right operand check if needed material exists in left operand
  and if so, use it's index as new mat_nr.
- If there are materials in right operand which doesn't exist in left operand,
  they'll be changed to first material from left operand.
2012-01-27 08:04:03 +00:00
de4eeb9694 svn merge ^/trunk/blender -r43693:43733 2012-01-26 19:20:33 +00:00
5d49eff25a Fix #29957: Texture "Generate" mapping work as global with cloth modifier
Make Cloth modifier deformation only so now it applies on orco dm properly.
2012-01-26 17:03:30 +00:00
d5c4f030df correct error in recent merge. 2012-01-24 16:54:21 +00:00
4af4863baf svn merge ^/trunk/blender -r43639:43664 2012-01-24 16:18:20 +00:00
9998d1235b Fix #29965: Crash: Memory psys node array: end corrupt
Original indices from right operand were used in boolean result derived mesh
which lead to crash if right operand has got more entities (faces/edges/vertices)
than left operand.
2012-01-24 08:43:17 +00:00
e236fb157a fix leak in mirror modifier. 2012-01-24 00:26:12 +00:00
12531c5c76 fix for crash applying solidift after subsurf 2012-01-23 21:04:56 +00:00
690c77dd7d Fix #29934: New Carve library can't execute boolean operations in some cases
Issue was caused by left boolean operand consist of several intersecting manifolds
which make Carve triangulator confused and which can't be resolved in general case.
Added mesh pre-processing before actual applying boolean operator on it. This
preprocessing applies union operation on intersecting manifolds of the same object
so intersection edge loop with second object wouldn't confuse tesselator and correct
result would be returned.
Detecting of intersecting manifolds is based on AABB intersection check which leads
to some extra union operation called, but it's possible to speed things up from
Carve side so union operation of two not intersecting meshes would work faster.
Additional condition for running union for manifold is this manifolds intersects
AABB of second operand, so mesh topology wouldn't be changed at all in areas
where there's definitely no intersection between operands. It might be improved
so only manifolds which actually intersects second operand would be joined
together, but it'll slow things down a bit and prefer to do it only if it'll
be really a problem.

Additional change is fixed memory leak when boolean operation fails to run -
it was missed "delete" call if exception happens in Carve library.

From side effects of this change might be named boolean operation between
suzanne and another object: suzanne is consist of three intersecting open
manifolds, so this new meshes preprocessing leads to missed eyes in result
because of failure of merging two open manifolds. Don't think making suzanne
work for all setups should really be a goal, it's a bit crappy mesh for CSG
algorithms.
2012-01-23 17:43:41 +00:00
61a5cc28be disable re-tesselation for modifiers that use bmesh, array/bevel/edge split - were tesselating 2 times and didnt need to.
also comment array modifier from flushing selection flags.
2012-01-22 21:12:18 +00:00
6eb0ca9385 Merged with trunk (-r43609:43611): updated modifier preview.
Noted preview code for DynamicPaint is currently disabled, will see if I can re-enable it…
2012-01-22 20:05:26 +00:00
4966982a5a svn merge ^/trunk/blender -r43564:43609 2012-01-22 18:04:35 +00:00
1a93d88343 Add weight preview to WeightVG modifiers, and first, simple/basic refactor of how modifiers can generate preview.
User side:
* Preview for DynamicPaint should keep the same behavior (for now). Weight preview should be somawhat quicker, though.
* Preview for WeightVG modifiers is only active in WeightPaint mode, and if the affected vgroup is the active one.
* Last active preview modifier in stack wins!

Note: that modifier preview topic is yet to be further refined, quite raw/incomplete for now.

Dev side:
* In draw code, renamed DRAW_DYNAMIC_PAINT_PREVIEW flag to DRAW_MODIFIERS_PREVIEW
* Removed use of MOD_DPAINT_PREVIEW_READY in DynamicPaint code (seems unecessary, and if it was, should be of more general scope).
* Added eModifierTypeFlag_UsesPreview to ModifierTypeFlag, for modifiers that can generate some preview data.
* Added three new modifier funcs, to handle preview modifiers in draw code / mod stack.
* For weights preview: added the generic DM_update_weight_mcol func, which can update WEIGHT_MCOL layer with either a given array of weights (currently used by DynamicPaint only), or from current active vgroup(s).

So now, draw code is fully generic (i.e. no more modifier-type checking in it). Mod stack code is generic to some extent, but will need more work.
2012-01-22 17:54:23 +00:00
c8cff5e1c4 Fix a crasher in WeightVG modifiers.
Problem was, if no vertices were ever added to one of the obect's vgroups, there is no CD_DEFORMVERT layer, even though there might be several valid vgroup indices... Odd no one noticed that earlier.

Many thanks to miikah for finding that bug!
2012-01-22 10:14:01 +00:00
cfab40b652 Fluidsim - Restoring simulation speed control (ZanQdo request)
This commit restores support for freezing or speeding up physics sims. Animate
the "Speed" parameter under Domain->Time, which controls a multiplier factor for
the rate at which the sim proceeds (i.e. the old "Fac-Tim" setting).

Notes:
* Subversion bumped to 4 to patch up defaults for new value so that old sim
files will still run correctly
* Names/descriptions could do with some tweaking
* Porting this across was not that obvious since quite a bit of stuff had
changed (as in, been cleaned up). However, from tests so far, it seems to work
well.
2012-01-22 03:42:49 +00:00
1726853226 comment some dead assibnment and set dummy values for image profile conversion in case of invalid input. 2012-01-20 15:18:57 +00:00
9c03a8ca77 quiet some warnings 2012-01-20 14:44:38 +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
fe71f40f88 misc changes from bmesh, syncing across to trunk, no functional changes 2012-01-20 02:24:01 +00:00
c5adacff83 style edits to build modifier apply function 2012-01-20 02:03:37 +00:00
c71da4537a improvements to build modifier
- dont make a copy of the source mesh before using it
- dont recalculate tessface's and normals
2012-01-20 00:26:25 +00:00
afda428b7e skip converting non CDDM type derived meshes for solidify modifier. 2012-01-19 23:51:40 +00:00