Commit Graph

1124 Commits

Author SHA1 Message Date
7d2590bbfa Fix T42608: Mesh deform modifier for curve fails in render
The issue was caused by render engine duplicating the curve object because
it then converts the object to mesh. The mesh deform duplication code didn't
duplicate binded data, so after duplication modifier is no longer applyable.

So now copyData of mesh deform would copy data needed for binding. This solves
reported render bug and also solves possible frustration when duplicating an
object with mesh deform in the viewport with Shift-D.

Checked other modifiers and laplacian deform already was copying binded data.
Didn't see other modifiers which might also need to copy extra data.
2014-11-18 11:31:58 +01:00
902ba7b25c Cleanup: use SUBD_CORNER_* prefix for Subdiv flags 2014-11-16 15:46:30 +01:00
7d040d2a08 Cleanup: use BLI_listbase_*** prefix for count,sort,sort_r 2014-11-16 13:57:58 +01:00
723f1e950b Fix T42486: Array modifier cap-end crash
Thanks to @PatB for the fix.
2014-11-10 09:55:25 +01:00
e43b74d87a Optimization of parallel range
It now supports different scheduling schemas: dynamic and static.
Static one is the default and it splits work into equal number of
range iterations.

Dynamic one allocates chunks of 32 iterations which then being
dynamically send to a thread which is currently idling.

This gives slightly better performance. Still some tricks are
possible to have. For example we can use some smarter static scheduling
when one thread might steal tasks from another threads when it runs
out of work to be done.

Also removed unneeded spin lock in the mesh deform evaluation,
on the first glance it seemed to be a reduction involved here but
int fact threads are just adding value to the original vertex
coordinates. No write access to the same element of  vertexCos
happens from separate threads.
2014-11-03 22:44:29 +05:00
9b8be0bc0c Cleanup/fix from latest coverity report.
Mostly harmless things, though the 'multires' error was a real bug.
2014-11-01 16:36:11 +01:00
eaaeae4699 Cleanup: spelling 2014-10-23 10:38:38 +02:00
ba7e504448 Meshdeform: Use SSE intrinsics in meshdeform_dynamic_bind()
Quite straightforward change, don't think some extra explanation is needed.

This gives about 15% speedup of the modifier evaluation on my laptop.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D836
2014-10-22 12:21:11 +02:00
dfc4de036e Meshdeform modifier: Use threaded evaluation
This commit switches meshdeform modifier to use threads to evaluate
the vertices positions using the central task scheduler.

SO now we've got an utility function to help splitting the for loop
into tasks using BLI_task module which is pretty straightforward to
use: it gets range (which is an integer lower and higher bounds) and
the function and userdata to be invoked for each of the iterations.

The only weak point for now is the passing the data to the callback,
this isn't so trivial to improve in pure C.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D838
2014-10-22 12:20:41 +02:00
8d1d16bf0d Bevel modifier: Add weight support for vertices bevelling.
Nothing to say here, really, just a couple of lines to add to get it working...
2014-10-15 08:57:11 +02:00
1dd428ff6d Fix T41983: Array Modifier "Merge" bug?
We messed up previous fix, in 'simplified' translated merge case... :(
2014-10-05 23:10:44 +02:00
8ac3c3d3ee Fix T42065: Shading issue using Array modifier
Gah... Dirty normal flag should be set on *real* final dm, after merge is done. :/
2014-10-04 12:54:00 +02:00
4c43fcf791 Fix T41983: Array regression with center-verts
Array with rotation and a central pivot would fail.

Thanks to Bastien Montagne for the initial fix.
2014-10-03 14:36:34 +02:00
9ce645e7d9 Better fix for T42054 - modifiers have a callback to say whether they need normals or no.
Thanks Campbell for the headup!
2014-10-03 12:12:10 +02:00
d4758badf6 Fix T42054: Problem when using Cast modifier with Wireframe modifier.
Wireframe modifier needs valid normals, let's ensure that!
2014-10-03 11:58:29 +02:00
fe42ceb281 Cleanup: unused 2014-09-26 10:34:20 +10:00
a3bb1dca25 Fix the skin modifier crashing when building without Bullet. 2014-09-26 00:04:10 +02:00
398ca952ab Fix T41890: Regression in new array modifier code, vnors were no more offset-corrected.
This is not needed when we tag normals as dirty, but in simple cases, if offset has some
rotation (or non-uniform scaling) component, vertex normals has to be corrected.
2014-09-21 10:12:26 +02:00
cba2e0afa7 Fix T41630: Edge Split Modifier don't work anymore when a Array Modifier is after the Edge Split Modifier added.
Dirty normals flag has to be passed to new dm...
2014-08-29 18:07:54 +02:00
d822624adc Fix T41580: Cast modifier - Edit Cache problems.
Modifiers should never ever modify data from target objects!!! With multithreaded
evaluation, this is a nice bug factory!
2014-08-25 20:58:36 +02:00
3a1a1f83cf Fix for recent solidify rim-only patch 2014-08-20 20:33:25 +10:00
4795b61c1b Cleanup: assert / warn 2014-08-18 16:05:06 +10:00
3296d98ec1 Solidify Modifier "Rim Only" Option
D737 by scorpion81 with own edits
2014-08-15 19:17:05 +10:00
3529913629 Math Lib: name signed versions of dist_to_plane_v3 explicitly
also add unsigned versions
2014-08-13 14:34:58 +10:00
dfd9bfd3a8 Spelling 2014-08-13 08:38:16 +10:00
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
3c9e11df37 Cleanup: Move SpaceTransform helpers from BKE_shrinkwrap to BLI_math_matrix. 2014-08-01 16:31:06 +02:00
08725cce5a Correct includes on different endian systems 2014-07-26 18:39:27 +10:00
8489b94e07 Math Lib: rename mul_serie_m3 to mul_m3_series & reorder args
Importantly, reversed mul_serie_m3 argument order (so it matches the m4 function)
2014-07-21 18:57:35 +10:00
7c7b7302d3 Math Lib: use variable length args for mul_serie_m3,m4 (instead of trailing NULL's) 2014-07-20 14:01:42 +10:00
00b29156e0 Defines: replace ELEM3-16 with ELEM(...), that can take varargs 2014-07-20 01:33:40 +10:00
70453c578d Fix T34664: bevel face material can be set in tool and modifier.
Now the bevel tool, modifier, and internal operator have a material
slot # parameter that the user can set. If left at default of -1,
behavior is as current -- bevel face material is taken from the
closest original face (this may be ambiguous). If material slot
is >= 0, it gives the material slot index number for the material
to use.
2014-07-17 09:20:22 -04:00
683743b360 Correction to last commit 2014-06-29 06:08:41 +10:00
f32079d4b9 BLI_stackdefines
Bounds check the stack while debugging, also add STACK_PEEK
2014-06-29 05:57:48 +10:00
dcc361708c BLI_stack: use strict flags
also use size_t, rename BLI_stack_empty
2014-06-28 23:17:11 +10:00
833c03791f Use fill function for setting origindex 2014-06-25 19:29:06 +10:00
92733179ae Speedup for skin modifier, avoid calculating normals many times 2014-06-25 19:02:49 +10:00
c5ccbacdaa move STACK_* macros into BLI_stackdefines.h 2014-06-25 00:01:33 +10:00
7259ac821e Code cleanup: use bool instead of int 2014-06-18 16:05:42 +06:00
23d7fa11c9 Skin Modifier: use BLI_bitmap to tag edges 2014-06-14 18:24:41 +10:00
bf462149a6 BLI_bitmap: rename macros
- BLI_BITMAP_SET -> BLI_BITMAP_ENABLE
- BLI_BITMAP_CLEAR -> BLI_BITMAP_DISABLE
- BLI_BITMAP_GET -> BLI_BITMAP_TEST
- BLI_BITMAP_MODIFY -> BLI_BITMAP_SET
2014-06-14 00:47:12 +10:00
a85b85101b Code cleanup: replace interp_v2_v2v2 with mid_v2_v2v2 2014-06-14 00:47:11 +10:00
20550d6f7f Fix T40582: issues with apply scale when having multires and scene simplify
Reshape and applying scale matrix on multires needs to create DM with simplify
setting disabled. Added a special flag to modifier apply for this now.
2014-06-12 13:49:46 +06:00
c641baa047 Fix a typo in a comment. 2014-06-01 16:24:17 +09:00
3b4f792ce1 Fix T40315: Boolean modifier with Freestyle edges 2014-05-26 16:45:43 +06:00
d27d982657 Fix T40215: Boolean looses bevel width 2014-05-22 16:43:38 +10:00
3889483b1f Fix T40053: Cloth simulation, rest shape key does not function
It was a regression since 5d49eff. Not really sure about proper solution
here, so used a bit workaround-ish way for now.

Hopefully new cloth will be landed after this GSoC anyway.
2014-05-15 14:20:22 +02:00
5cc1e03540 Code cleanup: indentation 2014-05-14 06:37:56 +10:00
b9967bfb3f Fix T40151: Problem in normal with subdivision surface + Boolean modifier
Own regression since e08db08. CustomData_copy_data() would fail in cases
when mvert/medge/mloop/mpoly arrays were lazy allocated since that change.

Now made it so this layers are copying from own copy of the arrays.

Not sure if this still misses some CD to be copied, from quick glance
seems no, but some further testing wouldn't hurt at all.
2014-05-13 19:45:08 +02:00
e08db08a84 Fix T39997: Multiple boolean modifiers sharing the same right operand crashes
The issue was caused by the temporary CD layers being allocated for subsurf
meshes, same as we've got back in 881fb43.

In the long run this temporary storage is to be re-considered, but it'll also
imply re-considering of the Derivedmesh interaction as well. For now let's
use a simpler solution which is forbidding modifiers to call getArray for other
objects' derivedMeshes but use an API calls which would allocate local copy of
the data preventing race condition of shared data in DM.
2014-05-03 16:13:01 +02:00