Commit Graph

38269 Commits

Author SHA1 Message Date
a8353530be Make byte-float conversion threaded in compositor
In fact, there's no need to get float buffer at all,
conversion could be done in pixel processor level
after interpolation.

It might give slightly worse interpolation results
(which i'm not sure would be visible by eye) but
it gives more than 2x speedup on my laptop on node
setups used for warping image.

--
svn merge -r58988:58989 ^/branches/soc-2011-tomato
2013-08-16 10:01:09 +00:00
970c80e473 Remove unused and unfinished py bindings 2013-08-16 09:46:34 +00:00
24ce60cfe4 Merge plane track feature from tomato branch
This commit includes all the changes made for plane tracker
in tomato branch.

Movie clip editor changes:

- Artist might create a plane track out of multiple point
  tracks which belongs to the same track (minimum amount of
  point tracks is 4, maximum is not actually limited).

  When new plane track is added, it's getting "tracked"
  across all point tracks, which makes it stick to the same
  plane point tracks belong to.

- After plane track was added, it need to be manually adjusted
  in a way it covers feature one might to mask/replace.

  General transform tools (G, R, S) or sliding corners with
  a mouse could be sued for this. Plane corner which
  corresponds to left bottom image corner has got X/Y axis
  on it (red is for X axis, green for Y).

- Re-adjusting plane corners makes plane to be "re-tracked"
  for the frames sequence between current frame and next
  and previous keyframes.

- Kayframes might be removed from the plane, using Shit-X
  (Marker Delete) operator. However, currently manual
  re-adjustment or "re-track" trigger is needed.

Compositor changes:

- Added new node called Plane Track Deform.

- User selects which plane track to use (for this he need
  to select movie clip datablock, object and track names).

- Node gets an image input, which need to be warped into
  the plane.

- Node outputs:
  * Input image warped into the plane.
  * Plane, rasterized to a mask.

Masking changes:

- Mask points might be parented to a plane track, which
  makes this point deforming in a way as if it belongs
  to the tracked plane.

Some video tutorials are available:
- Coder video: http://www.youtube.com/watch?v=vISEwqNHqe4
- Artist video: https://vimeo.com/71727578

This is mine and Keir's holiday code project :)
2013-08-16 09:46:30 +00:00
5b384365ca Code cleanup: this was unintended change from quite a while ago.. 2013-08-16 08:03:35 +00:00
763c205e72 add support for mempool/linklist functions. 2013-08-16 05:50:00 +00:00
1a81197819 Speedup for guarded allocator
- Re-arrange locks, so no actual memory allocation
  (which is relatively slow) happens from inside
  the lock. operation system will take care of locks
  which might be needed there on it's own.

- Use spin lock instead of mutex, since it's just
  list operations happens from inside lock, no need
  in mutex here.

- Use atomic operations for memory in use and total
  used blocks counters.

This makes guarded allocator almost the same speed
as non-guarded one in files from Tube project.

There're still MemHead/MemTail overhead which might
be bad for CPU cache utilization.

TODO: We need smarter 32/64bit compile-time check,
      currently i'm afraid only x86 CPU family is
      detecting reliably.
2013-08-15 12:13:01 +00:00
c4f6340f7d Merging r59153 through r59161 from trunk into soc-2013-depsgraph_mt 2013-08-15 12:08:18 +00:00
20b5e1f7b8 == filebrowser ==
* FIX: selecting bookmark or recent file caused UNDO push, also caused issue with the 'Open' and 'Cancel' buttons being grayed out.

Reported by Sergey Sharybin in IRC, many thanks.
2013-08-15 10:14:41 +00:00
eb76c5bb1a Added detailed timing information output
Used to visualize CPU threads activity during threaded
object update.

It prints whole bunch of timing information to STDERR
which then could be parsed and nicely visualized.

Detailed statistics is disabled by default.

File to parse and visualize statistics:
  http://blender.nazg-gul.dyndns.org/depsgraph/threaded_update_stats.blend

And screenshot for fun:
  http://blender.nazg-gul.dyndns.org/depsgraph/threaded_update_stats.blend.png
2013-08-15 10:11:08 +00:00
1aa4e3aadd Skip objects which doesn't need update from update statistics 2013-08-15 10:11:05 +00:00
5eac3db278 Merging r59136 through r59152 from trunk into soc-2013-depsgraph_mt 2013-08-15 08:23:16 +00:00
d34f9c7a74 Fix #36384: Inconsistent curve fill behaviour
Creating new splines via Python API didn't take
curve dimension into account.

Now adding new splines will set 2D/3D flag for
spline according to curve's dimension.
2013-08-15 07:59:32 +00:00
196d30e004 BGE: The Action Actuator can now make use of additive blending. 2013-08-14 23:32:00 +00:00
9e42f76bab Fix #36467: ends of curves - 2D differs to 3D
This is getting confused, why bevel is handled different
for 2D and 3D curves?

Anyway, made bevel work for 2D case nice again, but it's
probably nice to unify 2D and 3D cases.
2013-08-14 19:45:35 +00:00
7a6f3d9e43 fix [#36349] Separate mesh by material creates meshes with all the materials from the original 2013-08-14 14:36:43 +00:00
503b7d5b9a add materials.clear() method, matching other python list method. 2013-08-14 11:29:58 +00:00
1979720d03 quiet compiler warnings. 2013-08-14 11:29:22 +00:00
5ef266f932 Merging r59130 through r59135 from trunk into soc-2013-depsgraph_mt 2013-08-14 10:42:18 +00:00
c09034608c Fix double-free happening when having proxy with motion paths
Make it so mpath is not shared between several bones now.

Fix suggested by Joshua Leung, thanks!
2013-08-14 10:39:16 +00:00
5be97aba95 Recent spinlock commit made scheduling unsafe for threading
Namely, it caused nodes be adding to the pool multiple times.

Returned spin back, but use it only in cases node valency is
zero. So now valency is decreasing without any locks, then
if it's zero spin lock happens, node color (which indicates
whether node is scheduled or not) happens. Actual new task
creation happens outside of locks.

This might sound a bit complicated, but it's straightforward
code which is free from any thread synchronization latency.
2013-08-14 09:24:15 +00:00
7d67261a7b fix bug with editmesh rip, active edge could be left on the unselected side of the edge loops. 2013-08-14 09:14:33 +00:00
731672fc9b bmesh utility functions for storing an editselection after another in the list. 2013-08-14 09:13:11 +00:00
723eaa36ce fix own error in BM_mesh_calc_edge_groups() was clearning wrong dirty-index flag.
also remove unused transform defines.
2013-08-14 08:14:50 +00:00
932df91cbd Merging r59113 through r59129 from trunk into soc-2013-depsgraph_mt 2013-08-14 07:08:59 +00:00
5157eea977 bmesh edge-net: refactor out face creation into its own function, replace array reallocation with alloca.
fix for error increasing the face tag count when the face might not be created.
2013-08-13 23:48:48 +00:00
5ba898d868 utility functions to reverse and wrap arrays. 2013-08-13 23:43:44 +00:00
91f04bebf0 bmo_edgenet_fill_exec was building a vertex array when it didnt need to. also simplify for loops. 2013-08-13 22:28:16 +00:00
463ff86592 Fix #36461: ends of curves - twist still not good
Needed correct quat for first point as well.

Maybe it's time to refactor make_minimum_twist function a bit..
2013-08-13 15:27:49 +00:00
b521d2ada7 Merging r59104 through r59112 from trunk into soc-2013-depsgraph_mt 2013-08-13 15:09:19 +00:00
135ee563e9 Fix crash happening when clearing parent in outliner modes which doesn't support this. 2013-08-13 14:46:39 +00:00
5096beb4a5 use __builtin_nanf with gcc and clang. 2013-08-13 10:40:23 +00:00
a8d1c893e8 make materials.pop() and more like pythons list.pop
- allow negative index values.
- error when invalid index value are passed in.
- remove last item if no index argument is given.

also change behavior to remove the material slot, it was only clearning by default but the list length remained the same.
2013-08-13 10:21:11 +00:00
Lukas Toenne
4d5c64372a Moved NAN_FLT define to BLI_math, this may come in useful. 2013-08-13 10:09:27 +00:00
4dee746acb Fix compilation error, missing size_t declaration 2013-08-13 07:54:55 +00:00
64bc5da4ba Merging r59083 through r59103 from trunk into soc-2013-depsgraph_mt 2013-08-13 07:37:13 +00:00
5b64b66127 add support for loading 8bit BMP images 2013-08-13 07:18:07 +00:00
Lukas Toenne
3e954e95a6 Fix #36451, Particle system crashes blender. The psys_render_restore function was accessing the psys->frand random number array, but since the particle modifier is disabled this array does not get
initialized. Added a sanity check to skip disabled particle systems in BI render. (why wasn't this done before?)
2013-08-13 06:21:39 +00:00
730b9c283e change VIEW3D_OT_camera_to_view_selected poll function so it can be called from a script (without a view3d). 2013-08-13 04:35:14 +00:00
5a9c012d86 fix for bug in rip tool, isolated verts would remain selected after ripping. 2013-08-13 01:52:36 +00:00
49411a6e37 fix own regression, rip tool wasn't handling selection. 2013-08-13 01:00:07 +00:00
fd14c344e0 switch arg order for BM_elem_select_copy(), would like to make this constant for all bmesh functions eventually. 2013-08-13 00:35:23 +00:00
726a7d6cd4 bmesh: simplify mode check for setting the edge selection 2013-08-13 00:17:39 +00:00
880a86230f bmesh_vert_separate: remove unused return value 2013-08-12 23:49:56 +00:00
4a8d4f319f bmesh_edge_separate: avoid counting radial loops when splitting edges, we only need to check if the edge is boundary or not. will speedup edgesplit modifier a little. 2013-08-12 22:36:46 +00:00
c2a8f43e35 Fix [#36439] Switching windows on Win7 x64 under certain outliner conditions will cause crash 2013-08-12 17:05:02 +00:00
6366a8c611 Fix crash happening in particle code caused by non-reentrant qsort()
Particle system code used global variable to sort hair by orig index,
which is not safe for threading at all.

Replaced this with usage of reentrant version of qsort, which is
now implemented in BLI. It was moved from recast navigation code
to BLI, so more areas could use it (if needed).
2013-08-12 14:37:23 +00:00
033d395bed Use atomic operations instead of spin lock for threaded update
This replaces code (pseudo-code):

  spin_lock();
  update_child_dag_nodes();
  schedule_new_nodes();
  spin_unlock();

with:

  update_child_dag_nodes_with_atomic_ops();
  schedule_new_nodes();

The reason for this is that scheduling new nodes implies
mutex lock, and having spin around it is a bad idea.

Alternatives could have been to use spinlock around
child nodes update only, but that would either imply having
either per-node spin-lock or using array to put nodes
ready for update to an array.

Didn't like an alternatives, using atomic operations makes
code much easier to follow, keeps data-flow on cpu nice.

Same atomic ops might be used in other performance-critical
areas later.

Using atomic ops implementation from jemalloc project.
2013-08-12 14:37:15 +00:00
3497b2241e Followup for r58992, fixing user decrement error
Some places like proxy rebuild didn't increent
custom shape user counter which lead to user
decrement errors later when freeing pose channels.

Try to keep custom object counter relevent, but
some corner cases might still be missing.
2013-08-12 13:52:13 +00:00
3c9c5b42cb Merging r58778 through r59080 from trunk into soc-2013-depsgraph_mt 2013-08-12 09:35:16 +00:00
bc5dc88bda Fix #36420: ends of curves - caps & twist not good
Forgot to calculate directions of first/last points
for NURBS and POLY splines.
2013-08-12 09:00:48 +00:00