Commit Graph

1117 Commits

Author SHA1 Message Date
a51a0ca772 Math Lib: add shell_v3v3_normalized_to_dist and v2 version
bypass angle calculation to avoids (asin, sqrt, cos).
2014-04-19 22:17:10 +10:00
97881d06b2 Fix T39610: Shared mesh used for Mesh Deform causes crash
For now disable using linked edit mesh in the meshdeform modifier.

This is because editbmesh_get_derived_cage_and_final() might easily
conflict with the thread which evaluates object which is in the edit
mode for this mesh.

We'll support this case once granular dependency graph is landed.
2014-04-15 18:37:41 +06:00
0b7f581397 Split Normals I (2/5): Add basic BMesh support of split normals.
* Merely a re-implementation of core split algorithm for BMesh, taking advantage of topological data available.
* This code needs valid loop indices, so added BM_LOOP support to BM_mesh_elem_index_ensure() & co.

Reviewers: campbellbarton

Reviewed By: campbellbarton

CC: brecht

Differential Revision: https://developer.blender.org/D366
2014-04-13 12:25:54 +02:00
45b02cee47 Code cleanup: no need to use calloc when memory is initialized after
also replace AT with __func__ since AT expands the full pathname
2014-04-04 14:26:01 +11:00
d5ce2b5466 Fix T39567: simple deform modifier error 2014-04-03 18:57:37 +11:00
617557b08e Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define 2014-04-01 15:22:28 +11:00
bbfeb120fc Code cleanup: use strict flags for BLI_rand 2014-03-30 15:04:20 +11:00
1f58bfb8be Code cleanup: de-duplicate cotangent weight function & add arg sizes 2014-03-30 11:08:33 +11:00
7199e2288f Code cleanup: use sqrtf when input and output are float 2014-03-28 14:53:37 +11:00
27e86ed832 Code cleanup: use bools 2014-03-20 22:56:28 +11:00
7da2175271 KDTree: deprecate 'normal' argument
Normals for each kdtree node were allocated but never used,
and search args only use in particles/boids code.
2014-03-18 09:14:47 +11:00
ec4e12d9a2 Code cleanup: comments and typos 2014-03-18 05:40:18 +11:00
2097e621ed Code cleanup: use r_ prefix for return args 2014-03-16 03:26:23 +11:00
19ae921495 CMake: fix for standalone player and remove recast modifier reference 2014-03-14 17:05:58 +11:00
0141265073 Fix T39152: Blender crash when duplicate mesh with hooks and laplacian deform.
We can't simply dupalloc cache_system (LaplacianSystem), it has quite a few allocated data we'd need to dupalloc as well,
not to mention (nl) context... Much safer to just set it to NULL in new copy imho!

This commit is to be backported to 2.70 release!
2014-03-13 12:54:07 +01:00
6ddb1faca9 Fix T38962: Boolean modifier crashes when only right operand has UV layer 2014-03-05 14:29:02 +06:00
dad9600004 Fix T38941: Laplacian Deform crashes on OSX
When vgroup was invalid somehow (e.g. empty, as in this case) and bind could not happen, code was dereferencing a NULL pointer...
2014-03-04 09:09:38 +01:00
6f6be7c936 Fix T38859: Laplacian Deform Crash 2014-02-27 15:03:03 +11:00
ca2b4323a8 Fix T38003: Skin modifier crash with long edges 2014-02-25 23:03:26 +11:00
1130c53cdb Fix T38755: Crash when having cyclic dependency and curve deform
Issue was caused by undefined object update order and in some
cases NULL pointer will be de-referenced.

Added on-demand curve path calculation, just the same creepy call
of BKE_displist_make_curveTypes(). This violates DAG and might
end up in a difficult to troubleshoot race condition if there'll
be some issues with how dependencies are calculated in DAG, but
this is the easiest and safest way to solve the bug at this stage,
2014-02-24 19:15:52 +06:00
b7fa08f88a Code cleanup: style 2014-02-22 11:14:15 +11:00
c625658a92 Fix T38567: Branch smoothing on skin modifier broken
own regression when changing delete commands
2014-02-19 16:43:13 +11:00
8a32f2c6d6 Remove left-over form debug time 2014-02-17 23:38:12 +06:00
5621e63d36 Code cleanup: duplicate headers 2014-02-14 10:55:38 +11:00
9185ab5d9c Fix scons compiling after carve changes 2014-02-13 23:21:13 +01:00
3f1a5902b9 fix scons / cmake desynchronization issue with including carve headers 2014-02-13 20:40:38 +01:00
83617d24d5 Rework carve integration into boolean modifier
Goal of this commit is to support NGons for boolean modifier
(currently mesh is being tessellated before performing boolean
operation) and also solve the limitation of loosing edge custom
data layers after boolean operation is performed.

Main idea is to make it so boolean modifier uses Carve library
directly via it's C-API, avoiding BSP intermediate level which
was doubling amount of memory needed for the operation and which
also used quite reasonable amount of overhead time.

Perhaps memory usage and CPU usage are the same after all the
features are implemented but we've got support now:

- ORIGINDEX for all the geometry
- Interpolation of edge custom data (seams, crease)
- NGons support

Triangulation rule is changed now as well, so now non-flat
polygons are not being merged back after Carve work. This is
so because it's not so trivial to support for NGons and
having different behavior for quads and NGons is even more
creepy.

Reviewers: lukastoenne, campbellbarton

Differential Revision: https://developer.blender.org/D274
2014-02-13 17:16:53 +06:00
b3afbcab8f ListBase API: add utility api funcs for clearing and checking empty 2014-02-08 06:24:05 +11:00
b4fb1e6d9f Bevel Modifier: fix bug T37916, bad result after mirror modifier.
Bevel needs the vertex normals to be correct and they are not
normally recalculated after a previous modifier, like mirror.
Adding 'dependsOnNormals' -> returns true to modifier info
for Bevel fixes the problem.
2014-02-07 10:46:22 -05:00
52bae9691b Fix T38521: skin modifier crash with zero radius vertices. 2014-02-07 13:41:42 +01:00
d900f5be55 Code cleanup: use bools where possible 2014-02-03 19:35:44 +11:00
fed1b8b16d Code cleanup: suffix vars to make obvious they are squared 2014-02-03 02:46:45 +11:00
2b55d7895c Fix T38403: Laplacian smooth on instanced objects leads to crash.
The laplacian modifiers (smooth and deform) use the OpenNL library,
which is not threadsafe due to the use of a global context variable.
Ideally this would be changed so that an explicit context can be
created for every caller of the OpenNL functions, but since OpenNL's
most recent version is from 2010 this is unlikely to happen.

As a workaround for now just use a mutex to prevent conflicting OpenNL
calls. Eventually OpenNL can be replaced by eigen or ceres.
2014-01-30 13:09:32 +01:00
a5c35fb27f Code cleanup: use booleans where appropriate 2014-01-28 04:00:04 +11:00
1c29fd77d3 Code Cleanup: style and correct API class ref 2014-01-26 22:17:01 +11:00
2a8f6e2fd9 Bevel modifier can use vertex groups for edge bevel now.
Until now, the "vertex group" limit method in the modifier
only worked for "vertex only" bevels. With this change,
edges with both ends in a vertex group will be beveled
in the non-"vertex only" case.
Also changed the test for being in a vertex group from
"any nonzero weight" to "weight >= 0.5". This is because
cascaded bevels on disjoint vertex groups did not give
disjoint bevels, because weight interpolation would give
non-zero weights to newly created vertices in earlier bevels.
Chose 0.5 because that won't result from interpolation, but
still allows some dilution (e.g., cascaded bevels on the
same vertex group).
2014-01-24 12:42:20 -05:00
c37e8ecc50 Cleanup: int/short to bool in BKE_cdderivedmesh.h functions (and TRUE/FALSE to true/false in code using them). 2014-01-23 14:52:46 +01:00
63ccb26303 Code Cleanup: spelling 2014-01-17 17:35:03 +11:00
7df8452d1a BMesh: add bmesh delete functions that dont depend on operator flags 2014-01-17 14:55:06 +11:00
5c74ac2c2a Build Modifier - Add "Reversed" Option
This commit introduces the ability to make the Build Modifier operate in reverse,
essentially allowing it to be used as a "deconstruction" effect.

(See D219 for more details about use cases for this)
2014-01-17 14:53:04 +13:00
9cc5c157e8 Minor change to last commit to solidify, only allocate bitmap as needed 2014-01-17 06:59:14 +11:00
e9fb4299eb Fix T38116: Crash when using solidify modifier on multi-user mesh
Issue was caused by solidify modifier using original vertices bitfield
to store tags. This isn't thread-safe obviously. Now use bitmap to store
needed tags.

Reviewed by Campbell, thanks!
2014-01-16 17:49:33 +06:00
af93ebcb50 Code Cleanup: style and redundant casts 2014-01-16 19:15:53 +11:00
a86f43df9f Fix T38227: Cloth cache storing only every 10 frames.
Make sure pointcache step is set to 1 for cloth when copying objects.
2014-01-15 06:47:03 +01:00
b8b412230b Code Cleanup: use iroundf
also increase precision of rctf print functions
2014-01-15 13:40:40 +11:00
86616c675a Bevel Modifier: add width type and profile control.
This adds to the modifier the new controls that have been
added to the bevel tool.
2014-01-14 11:07:45 -05:00
c48c62a831 Code Cleanup: replace checks for ima->source with BKE_image_is_animated 2014-01-14 04:59:58 +11:00
ac077f016d Remove direct displist creation from array modifier
First of all, it was needed to have that set scenes fix which
was done recently so curve is being evaluated properly on file
load.

And last but not least, also needed to tag DAG node to evaluate
path regardless to curve datablock settings so curve length is
always known.
2014-01-13 15:57:51 +06:00
f00f959d52 Remove direct displist creation from curve deform
This solves threading conflict which happens when having
multiple objects using Curve Deform modifier with the same
curve datablock. This conflict was caused by the fact that
curve_deform_verts() used to temporary override curve's
flags to make it path is there.

Actually, it was setting CU_FOLLOW flag temporary which
was only used where_on_path() (only in terms that this
temporary assignment only affected this function) but it
is now commented out for a while, so no reason to set
this flag temporary, If it's ever to be done, we'll need
to pass flags as an additional function argument.

For the path creation i've extended DegNode structure
which now holds extra bits which indicates what additional
data depending on the graph topology is to be evaluated.

Currently this is only used to indicate that curve needs
path to be evaluated regardless to cu->flag state. This
is so Curve Deform modifier is always happy.

In the future this flag might also be used to indicate
whether bmesh verts are to update (see recent commit to
3-vertex parent crash fix) or to indicate that the object
is the motherball etc.
2014-01-13 15:57:51 +06:00
62aa004c25 Style Cleanup: whitespace 2014-01-12 22:05:24 +11:00