8 years agoAnd for sure forgot to commit another cleaup patch
Sergey Sharybin [Mon, 19 Aug 2013 10:54:15 +0000 (10:54 +0000)]
And for sure forgot to commit another cleaup patch

svn merge -r59259:59260  ^/branches/soc-2013-depsgraph_mt

8 years agoForgot this in previous commit
Sergey Sharybin [Mon, 19 Aug 2013 10:53:10 +0000 (10:53 +0000)]
Forgot this in previous commit

Solves compilation issues on Win and OSX

svn merge -r59180:59181 ^/branches/soc-2013-depsgraph_mt

8 years agoSpeedup for guarded allocator
Sergey Sharybin [Mon, 19 Aug 2013 10:51:40 +0000 (10:51 +0000)]
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

8 years agoCommit atomic operations file
Sergey Sharybin [Mon, 19 Aug 2013 10:44:18 +0000 (10:44 +0000)]
Commit atomic operations file

Not currently used, but needed for some further changes

8 years agoUse reentrant qsort() in particle codes
Sergey Sharybin [Mon, 19 Aug 2013 10:40:47 +0000 (10:40 +0000)]
Use reentrant qsort() in particle codes

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).

svn merge -r59086:59087 ^/branches/soc-2013-depsgraph_mt

8 years agoAdded check for whether thread lock is being removed while thread is using guarded...
Sergey Sharybin [Mon, 19 Aug 2013 10:38:27 +0000 (10:38 +0000)]
Added check for whether thread lock is being removed while thread is using guarded alloc.

svn merge -r58788:58789 ^/branches/soc-2013-depsgraph_mt

8 years agoOptimization and threading fix for shapekeys weights calculation
Sergey Sharybin [Mon, 19 Aug 2013 10:36:39 +0000 (10:36 +0000)]
Optimization and threading fix for shapekeys weights calculation

This commit fixes two different issues, which were caused by
how weights are being calculated for relative shapekeys.

Weights for key block used to saved in KeyBlock DNA structure,
which lead to situations when different objects could start
writing to the same weights array if they're sharing the same
key datablock.

Solved this in a way so weights are never stored in KeyBlock
and being passed to shapekeys routines as an array of pointers.
This way weights are still computed run-time (meaning they're
calculated before shapekey evaluation and freed afterwards).

This required some changes to GameEngine as well, to make it
never cache weights in the key blocks.

Another aspect of this commit makes it so weight for a given
vertex group is only computed once. So if multiple key blocks
are using the same influence vertex group, they'll share the
same exact weights array. This gave around 1.7x speedup in
test chinchilla file which is close enough to if we've been
caching weights permanently in DNA (test machine is dual-code
4 threads laptop, speedup measured in depsgraph_mt branch,
trunk might be not so much high speedup).

Some further speed is optimization possible, but it could be
done later as well.

Thanks Brecht for idea of how the things might be solved in
really clear way.

svn merge -r58786:58787  ^/branches/soc-2013-depsgraph_mt

8 years agoAdded check for address being freed by mempool free
Sergey Sharybin [Mon, 19 Aug 2013 10:18:25 +0000 (10:18 +0000)]
Added check for address being freed by mempool free

When blender is built in debug mode, BLI_mempool_free will
ensure address passed to the function actually belongs to
this pool.

svn merge -r58710:58711 ^/branches/soc-2013-depsgraph_mt

8 years agoUtility benchmarking macros
Sergey Sharybin [Mon, 19 Aug 2013 10:16:23 +0000 (10:16 +0000)]
Utility benchmarking macros

This new macros could be used to benchmark overall
execution time of some chunk of code, running in cycle.

The usage is:

  void foo(void) {

    for (...) {




  This would print total time which was spent on
  running function bar().

svn merge -r58281:58283 ^/branches/soc-2013-depsgraph_mt

8 years agoMade armatures evaluation safe for threading
Sergey Sharybin [Mon, 19 Aug 2013 10:14:22 +0000 (10:14 +0000)]
Made armatures evaluation safe for threading

Apparently, some routines in armature deformation code
were using static arrays. This is probably just an
optimization thing, but it's very bad for threading.

Now made it so bbone matrices array is allocating in
callee function stack. This required exposing
MAX_BBONE_SUBDIV to an external API, This is not so
much crappy from code side, and it shall be the same
fast as before.

svn merge -r58278:58279 ^/branches/soc-2013-depsgraph_mt

8 years agoMake lattice deform safe for threading
Sergey Sharybin [Mon, 19 Aug 2013 10:11:48 +0000 (10:11 +0000)]
Make lattice deform safe for threading

Lattice deformation used to store some runtime data
inside of lattice datablock itself. It's something
which is REALLY bad. Ideally DNA shouldn't contain
and runtime data.

For now solved it in a way that initialization of
lattice deform will create a structure which contains
lattice object for which deformation is calculating
and that runtime data which used to be stored in
lattice datablock itself.

It works really fine for mesh deform modifier, but
there's still runtime data stored in particle system
DNA, It didn't look something easy to be solved, so
leaving this as-is for now.

svn merge -r58277:58278 -r58795:58796 ^/branches/soc-2013-depsgraph_mt

8 years agoMake GPU buffers allocation/freeing safe for threading
Sergey Sharybin [Mon, 19 Aug 2013 10:06:05 +0000 (10:06 +0000)]
Make GPU buffers allocation/freeing safe for threading

Code in GPU_buffers_free was already trying to be safe
for threading, by skipping OGL calls there, but in fact
it was still buggy.

Namely, freeing was doing buffers shift in a cycle, and
if two threads will call this function shifting will go

Now made it so GPU_buffers_alloc and GPU_buffers_free
are using mutex lock, so they're completely safe for
threading. Same goes to gpu_buffer_setup function.

It required minor functions reshuffle, so there're no
locks happening from locked thread, but it's all very
straightforward change

svn merge -r58276:58277 ^/branches/soc-2013-depsgraph_mt

8 years agoMake fonts safe(r) for threading
Sergey Sharybin [Mon, 19 Aug 2013 10:02:18 +0000 (10:02 +0000)]
Make fonts safe(r) for threading

Getting vfont data wasn't safe for threading, because it
was modifying font data which is in bmain and could be
shared by multiple objects.

For now made it so getting vfont uses critical section,
meaning vfont->data is initializing from inside a locked

svn merge -r58168:58169 ^/branches/soc-2013-depsgraph_mt

8 years agofix [#36481] When "Rip Edge" cannot be completed, Blender crashes weirdly
Campbell Barton [Mon, 19 Aug 2013 10:00:17 +0000 (10:00 +0000)]
fix [#36481] When "Rip Edge" cannot be completed, Blender crashes weirdly

8 years agoTag object-data level boundbox as invalid rather than freeing it
Sergey Sharybin [Mon, 19 Aug 2013 09:58:28 +0000 (09:58 +0000)]
Tag object-data level boundbox as invalid rather than freeing it

Object update used to free object-data level bounding box to trigger
it's re-calculation in the future. Such a freeing performed from
object update isn't thread-safe because mesh could be shared between
multiple objects.

Rather than freeing bounding box, tag it's as invalid, this is safe
from threading point of view and also prevents unnecessary memory

Object-level bounding box is still reallocating, but think we could
change this easily in the future as well.

svn merge -r58154:58156 -r59258:59259 ^/branches/soc-2013-depsgraph_mt

8 years agoRemove unused bounding box from MetaBall
Sergey Sharybin [Mon, 19 Aug 2013 09:41:13 +0000 (09:41 +0000)]
Remove unused bounding box from MetaBall

svn merge -r58150:58151 ^/branches/soc-2013-depsgraph_mt

8 years agoMade curves almost thread-safe
Sergey Sharybin [Mon, 19 Aug 2013 09:36:40 +0000 (09:36 +0000)]
Made curves almost thread-safe

Now modifier stack wouldn't modify original curve's nurbs
and will operate on a copy of nurbs.

This makes it possible to process curve object update with
shared curve datablocks from multiple threads. There's no
big overhead for creating a copy of nurbs comparing to old
behavior which was allocating original vertex array and
apply coordinates on curve after all modifier are applied.

The only remained issue with curves is curve's bounding box
and texture space. It's not thread-safe, but it wouldn't
lead to crashes -- it just could lead to either memory
leak or wrong texture coordinates due to difference in
modifiers stacks of objects which shares the same curve.

svn merge -r57959:57961 ^/branches/soc-2013-depsgraph_mt

8 years agoRemove unused argument from utility curve functions
Sergey Sharybin [Mon, 19 Aug 2013 09:29:51 +0000 (09:29 +0000)]
Remove unused argument from utility curve functions

So far it was harmless, but with upcoming changes having this
argument could be confusing from logic point of view

svn merge -r57958:57959 ^/branches/soc-2013-depsgraph_mt

8 years agoMove bevel list and path from Curve to Object datablock
Sergey Sharybin [Mon, 19 Aug 2013 09:25:24 +0000 (09:25 +0000)]
Move bevel list and path from Curve to Object datablock

I know this is not so much nice to have this guys hanging
around in a general Object datablock and ideally they better
be wrapped around into a structure like DerivedMesh or
something like this. But this is pure runtime only stuff and
we could re-wrap them around later.

Main purpose of this is making curves more thread safe,
so no separate threads will ever start freeing the same path
or the same bevel list.

It also makes sense because path and bevel shall include
deformation coming from modifiers which are applying on
pre-tesselation point and different objects could have
different set of modifiers. This used to be really confusing
in the past and now data which depends on object is stored
in an object, making things clear for understanding even.

This doesn't make curve code fully thread-safe due to
pre-tesselation modifiers still modifies actual nurbs and
lock is still needed in makeDispListsCurveTypes, but this
change makes usage of paths safe for threading.

Once modifiers will stop modifying actual nurbs, curves
will be fully safe for threading.

Actually, this commit also contains wrapping runtime curve
members into own structure

This allows easier assignment on file loading, keeps curve-
specific runtime data grouped and saves couple of bytes in
Object for non-curve types.

svn merge -r57938:57939 ^/branches/soc-2013-depsgraph_mt
svn merge -r57957:57958^/branches/soc-2013-depsgraph_mt

8 years agoGet rid of a display list stored in Curve datablock
Sergey Sharybin [Mon, 19 Aug 2013 09:13:15 +0000 (09:13 +0000)]
Get rid of a display list stored in Curve datablock

This display list was only used for texture space calculation,
and even there this display list was only used for bounding
box calculation.

Since we already do have bounding box in a curve datablock
there's no reason to duplicate non-modified display list
just to calculate bounding box later, let's just calculate
bounding box at the first point.

This makes code a little be more thread-safe but curves are
still not safe for threads at all because of bevel list and
path. That would be solved later.

svn merge -r57939:57940 ^/branches/soc-2013-depsgraph_mt

8 years agoAlways use ob->bb when drawing the curve types
Sergey Sharybin [Mon, 19 Aug 2013 09:07:09 +0000 (09:07 +0000)]
Always use ob->bb when drawing the curve types

It used to be a check for ob->bb ? ob->bb : cu->bb but
in fact it doesn't make sense and only makes code more

Making displist for mballs and curves/surfaces/fonts
already ensures object has walid bounding box.

svn merge -r57938:57939 ^/branches/soc-2013-depsgraph_mt

8 years agoMade modifiers_getVirtualModifierList safe for threading
Sergey Sharybin [Mon, 19 Aug 2013 09:05:34 +0000 (09:05 +0000)]
Made modifiers_getVirtualModifierList safe for threading

Move static variables to context filling in by this fcuntion
and owned by a callee function. This ensures no conflicts
between threads happens because of static variables used in
this function.

Also moved modifier types and virtual modifiers data to a
function called from creator. This is needed to be sure all
the information is properly initialied to the time when
threads starts to use this data.

svn merge -r57899:57900 ^/branches/soc-2013-depsgraph_mt

8 years agoFix issue with EWA filtering in compositor which disabled alpha
Sergey Sharybin [Mon, 19 Aug 2013 08:30:03 +0000 (08:30 +0000)]
Fix issue with EWA filtering in compositor which disabled alpha

It was caused by wrong copy-paste thing, which replaced check
"whether alpha channel is enabled" with "whether alpha channel
is not zero" (which is always zero in accumulator).

Compositor always works with RGBA, so no need to do any special
checks here.

TODO: Maybe MapUV ode shall ignore alpha channel?

8 years agoRemove unneeded include, was a residual from some WIP patch in the past
Sergey Sharybin [Mon, 19 Aug 2013 08:03:44 +0000 (08:03 +0000)]
Remove unneeded include, was a residual from some WIP patch in the past

8 years agoUse BOUNDBOX_DIRTY to mark BB as need to be updated
Sergey Sharybin [Mon, 19 Aug 2013 08:03:40 +0000 (08:03 +0000)]
Use BOUNDBOX_DIRTY to mark BB as need to be updated

8 years agoMerging r59182 through r59257 from trunk into soc-2013-depsgraph_mt
Sergey Sharybin [Mon, 19 Aug 2013 07:43:26 +0000 (07:43 +0000)]
Merging r59182 through r59257 from trunk into soc-2013-depsgraph_mt

8 years agoFix warnings reported by cavity checker
Sergey Sharybin [Mon, 19 Aug 2013 07:32:47 +0000 (07:32 +0000)]
Fix warnings reported by cavity checker

8 years agoedit to object center snapping, exit early if unsupported.
Campbell Barton [Mon, 19 Aug 2013 04:23:54 +0000 (04:23 +0000)]
edit to object center snapping, exit early if unsupported.

8 years agoadd support for snapping to empty centers during transform.
Campbell Barton [Mon, 19 Aug 2013 04:22:05 +0000 (04:22 +0000)]
add support for snapping to empty centers during transform.

8 years agostyle cleanup: indent/whitespace
Campbell Barton [Mon, 19 Aug 2013 01:48:44 +0000 (01:48 +0000)]
style cleanup: indent/whitespace

8 years agocorrect uninitialized var, worked by accident.
Campbell Barton [Mon, 19 Aug 2013 00:39:28 +0000 (00:39 +0000)]
correct uninitialized var, worked by accident.

8 years agoFix #34485 sculpt strength weirdly inverted with some mesh part.
Antony Riakiotakis [Sun, 18 Aug 2013 22:44:43 +0000 (22:44 +0000)]
Fix #34485 sculpt strength weirdly inverted with some mesh part.

The view vector was not being calculated correctly. Shamelessly rip off
correct transform to object space from projective texture painting code.

8 years agoCycles:
Thomas Dinges [Sun, 18 Aug 2013 22:25:37 +0000 (22:25 +0000)]
* Fix 16 byte alignment for constant hair kernel data.

8 years agoCycles / SSS:
Thomas Dinges [Sun, 18 Aug 2013 20:49:58 +0000 (20:49 +0000)]
Cycles / SSS:
* OSL rendered Black with Compatible Fallof option, fixed.

Note: OSL uses compatible scattering when "Compatible" or "Bicubic" is selected. I guess compatible will be removed later? If not we need to fix this properly.

8 years agoAdd comments for outliner's treestore and treehash (no functional changes)
Sv. Lockal [Sun, 18 Aug 2013 20:07:49 +0000 (20:07 +0000)]
Add comments for outliner's treestore and treehash (no functional changes)

8 years agoFix #34413 Dyntopo, smooth shading normals not getting uploaded to GPU
Antony Riakiotakis [Sun, 18 Aug 2013 19:47:33 +0000 (19:47 +0000)]
Fix #34413 Dyntopo, smooth shading normals not getting uploaded to GPU
and undo buffers.

When we have smooth shading we must not only update the unique vertex

8 years agoFix [#36423] Audio strips contain selectable (visual) blend modes and opacity value
Bastien Montagne [Sun, 18 Aug 2013 15:48:51 +0000 (15:48 +0000)]
Fix [#36423] Audio strips contain selectable (visual) blend modes and opacity value

Simply hide blend type and opacity for SOUND strips!

8 years agoMore "relpath" try/except protection...
Bastien Montagne [Sun, 18 Aug 2013 15:17:33 +0000 (15:17 +0000)]
More "relpath" try/except protection...

8 years agobmesh improvements to face creation.
Campbell Barton [Sun, 18 Aug 2013 15:14:55 +0000 (15:14 +0000)]
bmesh improvements to face creation.

* fill-holes operator now takes advantage of new edge-net fill, works in many more cases then it did before.

* face-create that uses edge-net now initializes the normals based on surrounding geometry, only running normal calculation if there are no connected faces for a reference.

8 years agoFix compile of last commit
Stuart Broadfoot [Sun, 18 Aug 2013 15:09:51 +0000 (15:09 +0000)]
Fix compile of last commit

8 years agocorrect recent commit
Campbell Barton [Sun, 18 Aug 2013 14:35:53 +0000 (14:35 +0000)]
correct recent commit

8 years agoCycles: relicense GNU GPL source code to Apache version 2.0.
Brecht Van Lommel [Sun, 18 Aug 2013 14:16:15 +0000 (14:16 +0000)]
Cycles: relicense GNU GPL source code to Apache version 2.0.

More information in this post:

Thanks to all contributes for giving their permission!

8 years agoCycles: Subsurface Scattering
Brecht Van Lommel [Sun, 18 Aug 2013 14:15:57 +0000 (14:15 +0000)]
Cycles: Subsurface Scattering

New features:

* Bump mapping now works with SSS
* Texture Blur factor for SSS, see the documentation for details:

Work in progress for feedback:

Initial implementation of the "BSSRDF Importance Sampling" paper, which uses
a different importance sampling method. It gives better quality results in
many ways, with the availability of both Cubic and Gaussian falloff functions,
but also tends to be more noisy when using the progressive integrator and does
not give great results with some geometry. It works quite well for the
non-progressive integrator and is often less noisy there.

This code may still change a lot, so unless you're testing it may be best to
stick to the Compatible falloff function.

Skin test render and file that takes advantage of the gaussian falloff:

8 years agoFix a few compiler warnings reported by clang.
Brecht Van Lommel [Sun, 18 Aug 2013 14:15:51 +0000 (14:15 +0000)]
Fix a few compiler warnings reported by clang.

8 years agoUpdates for the Cycle Hair UI. With the following changes
Stuart Broadfoot [Sun, 18 Aug 2013 13:41:53 +0000 (13:41 +0000)]
Updates for the Cycle Hair UI. With the following changes
- Removed the cycles subdivision and interpolation of hairkeys.
- Removed the parent settings.
- Removed all of the advanced settings and presets.
- This simplifies the UI to a few settings for the primitive type and a shape mode.

8 years agoimproved BM_face_copy_shared to copy from more possible connected loops and add filte...
Campbell Barton [Sun, 18 Aug 2013 11:44:51 +0000 (11:44 +0000)]
improved BM_face_copy_shared to copy from more possible connected loops and add filter function (not used yet).

8 years agocorrect own error in recent linked stack edits.
Campbell Barton [Sun, 18 Aug 2013 04:06:49 +0000 (04:06 +0000)]
correct own error in recent linked stack edits.

8 years agoadd hash function BLI_ghash_assign, BLI_edgehash_assign
Campbell Barton [Sun, 18 Aug 2013 03:41:39 +0000 (03:41 +0000)]
add hash function BLI_ghash_assign, BLI_edgehash_assign
avoids remove,insert and only hashes the key once.

8 years agoCode cleanup:
Thomas Dinges [Sun, 18 Aug 2013 02:35:39 +0000 (02:35 +0000)]
Code cleanup:
* Forgot to remove RNA/DNA in r59043. No need to keep this here, we never used it in Trunk.

8 years agominor api cleanup for ghash/edgehash
Campbell Barton [Sun, 18 Aug 2013 01:00:52 +0000 (01:00 +0000)]
minor api cleanup for ghash/edgehash
- use single inlined lookup function.
- move comments into source.
- pack iterator vars more efficiently.

8 years agoadd assert for hashes if an existing element is ever inserted into a ghash/edgehash.
Campbell Barton [Sun, 18 Aug 2013 00:36:04 +0000 (00:36 +0000)]
add assert for hashes if an existing element is ever inserted into a ghash/edgehash.

the outliner does this intentionally, so add a flag to allow this situation optionally.

8 years agobmesh api internal changes
Campbell Barton [Sat, 17 Aug 2013 13:32:56 +0000 (13:32 +0000)]
bmesh api internal changes
- optimize BM_face_exists_overlap_subset(), dont check faces smaller then the vert array, don't initialize overlap flag unless its needed.
- BM_face_exists_overlap had incorrect check (currently function is unused so no harm done)

8 years agoremove unused function
Campbell Barton [Sat, 17 Aug 2013 13:08:09 +0000 (13:08 +0000)]
remove unused function

8 years agoFix [36486] Outliner doesn't allow to expand Hierarchies of armature if it's present...
Sv. Lockal [Sat, 17 Aug 2013 11:49:18 +0000 (11:49 +0000)]
Fix [36486] Outliner doesn't allow to expand Hierarchies of armature if it's present on 2 Scenes

This is done by fixing logic for finding the first unused element in treehash.
The blend file from [36486] also exposes a memleak, but it should be addressed separately.

8 years agoremove unused args from edgenet fill (since rewrite, but they weren't used before...
Campbell Barton [Sat, 17 Aug 2013 09:25:12 +0000 (09:25 +0000)]
remove unused args from edgenet fill (since rewrite, but they weren't used before either)

8 years agostyle cleanup
Campbell Barton [Sat, 17 Aug 2013 08:21:40 +0000 (08:21 +0000)]
style cleanup

8 years agoavoid double ghash lookups
Campbell Barton [Sat, 17 Aug 2013 08:00:22 +0000 (08:00 +0000)]
avoid double ghash lookups

8 years agofix for crash in compositor/opencl, the error value of -1001 would read past the...
Campbell Barton [Sat, 17 Aug 2013 07:09:07 +0000 (07:09 +0000)]
fix for crash in compositor/opencl, the error value of -1001 would read past the error-string array.

8 years agoadd linklist stack macros, use where over allocating an array was previously done.
Campbell Barton [Sat, 17 Aug 2013 05:33:55 +0000 (05:33 +0000)]
add linklist stack macros, use where over allocating an array was previously done.

8 years agouse 'with' keyword for script stub (recommended with py3).
Campbell Barton [Sat, 17 Aug 2013 05:27:58 +0000 (05:27 +0000)]
use 'with' keyword for script stub (recommended with py3).

8 years agochange CHECK_TYPE_INLINE macro not to add the pointer in the macro.
Campbell Barton [Sat, 17 Aug 2013 04:48:34 +0000 (04:48 +0000)]
change CHECK_TYPE_INLINE macro not to add the pointer in the macro.

8 years agoBGE: Adding partial support for LibLoaded lights with GLSL materials.
Mitchell Stokes [Sat, 17 Aug 2013 04:37:25 +0000 (04:37 +0000)]
BGE: Adding partial support for LibLoaded lights with GLSL materials.

Any GLSL materials loaded after lights are LibLoaded will now use the lights in
heir shaders. This includes materials loaded from the same scene as the LibLoaded
lights. We could later add a new flag to LibLoad to recompile all existing shaders,
but this commit should offer a lot more flexibility as is.

8 years agoBGE: Flipping vsync constants so VSYNC_ON is 0.
Mitchell Stokes [Sat, 17 Aug 2013 02:06:45 +0000 (02:06 +0000)]
BGE: Flipping vsync constants so VSYNC_ON is 0.

This will make transitions from older versions of Blender easier since VSYNC_ON
will be the default. This could have been changed in a do_version, but the vsync
code has yet to see an official release, so I figured this would be a bit nicer.
Also, this makes VSYNC_ON the default for new scenes as well.

8 years agorewrite edgenet fill bmesh operator.
Campbell Barton [Fri, 16 Aug 2013 14:18:54 +0000 (14:18 +0000)]
rewrite edgenet fill bmesh operator.

previous code created faces with mixed face-flipping and could get very slow,
test with ~60,000 edges here hung my system for over 2min (didnt wait for it to finish), new code executes in about 1 second.

new code doesn't attempt to flip faces correctly, its quite involved to do so, especially when the new faces are not created adjacent to eachother.
so simpler to calculate normals afterwards.

8 years agoRemove ifdef-ed code, it's still in SVn anyway.
Sergey Sharybin [Fri, 16 Aug 2013 13:58:39 +0000 (13:58 +0000)]
Remove ifdef-ed code, it's still in SVn anyway.

8 years agoTweaks to MapUV and PlaneTrack nodes to make results less doggy
Sergey Sharybin [Fri, 16 Aug 2013 13:58:34 +0000 (13:58 +0000)]
Tweaks to MapUV and PlaneTrack nodes to make results less doggy

This disables crazy adaptive sampling happening in diagonal direction.

This still gives some doggyness, but it's much less dramatic now,
and behavior is pretty damn the same as EWA filtering when rendering
textures with Blender Internal.

8 years agoFix for #36468, "Buffer Groups" option changes compositing output.
Lukas Toenne [Fri, 16 Aug 2013 13:11:15 +0000 (13:11 +0000)]
Fix for #36468, "Buffer Groups" option changes compositing output.

Problem is that the read/write buffer operations only work with actual
image inputs. If a singular value is used as group input no actual
buffer will be created, the write operation does not schedule any chunks
and the ReadBufferOperation subsequently returns zero

The fix uses the (0,0) resolution to detect single value input of the
WriteBufferOperation. The actual resolution is then clamped to (1,1) to
ensure we have a single pixel to store the value in. A m_single_value
flag is also set, so we can reliably distinguish this from genuine image
resolutions without having to check m_width/m_height later on.

The ReadBufferOperation copies this flag from the associated
WriteBufferOperation and if set will always return the single value from
pixel (0,0).

8 years agoreplace calls to BLI_linklist_append with BLI_linklist_prepend where order us unimpor...
Campbell Barton [Fri, 16 Aug 2013 13:06:40 +0000 (13:06 +0000)]
replace calls to BLI_linklist_append with BLI_linklist_prepend where order us unimportant, since append steps over the whole list each time.

8 years agonew bmesh queries BM_face_exists_overlap, BM_face_exists_overlap_subset
Campbell Barton [Fri, 16 Aug 2013 13:02:34 +0000 (13:02 +0000)]
new bmesh queries BM_face_exists_overlap, BM_face_exists_overlap_subset
the subset version of the function checks if any faces has all its verts in the given array.

also made some additions to linklist functions (arena and pool versions of append).

8 years ago* Compile fix, so disabling libmw works again.
Thomas Dinges [Fri, 16 Aug 2013 12:43:37 +0000 (12:43 +0000)]
* Compile fix, so disabling libmw works again.

8 years agoMerging r59170 through r59181 from trunk into soc-2013-depsgraph_mt
Sergey Sharybin [Fri, 16 Aug 2013 10:33:14 +0000 (10:33 +0000)]
Merging r59170 through r59181 from trunk into soc-2013-depsgraph_mt

8 years agoAttempt to fix compilation error on OSX and Windows
Sergey Sharybin [Fri, 16 Aug 2013 10:29:56 +0000 (10:29 +0000)]
Attempt to fix compilation error on OSX and Windows

8 years agoMake byte-float conversion threaded in compositor
Sergey Sharybin [Fri, 16 Aug 2013 10:01:09 +0000 (10:01 +0000)]
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

8 years agoRemove unused and unfinished py bindings
Sergey Sharybin [Fri, 16 Aug 2013 09:46:34 +0000 (09:46 +0000)]
Remove unused and unfinished py bindings

8 years agoMerge plane track feature from tomato branch
Sergey Sharybin [Fri, 16 Aug 2013 09:46:30 +0000 (09:46 +0000)]
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:
- Artist video:

This is mine and Keir's holiday code project :)

8 years agoAdd Procrustes PNP ("PPnP") resection algorithm to libmv
Sergey Sharybin [Fri, 16 Aug 2013 08:26:34 +0000 (08:26 +0000)]
Add Procrustes PNP ("PPnP") resection algorithm to libmv

This adds a new Euclidean resection method, used to create the
initial reconstruction in the motion tracker, to libmv. The method
is based on the Procrustes PNP algorithm (aka "PPnP"). Currently
the algorithm is not connected with the motion tracker, but it
will be eventually since it supports initialization.

Having an initial guess when doing resection is important for
ambiguous cases where potentially the user could offer extra
guidance to the solver, in the form of "this point is in front of
that point".

svn merge -r58821:58822 ^/branches/soc-2011-tomato

8 years agoCode cleanup: this was unintended change from quite a while ago..
Sergey Sharybin [Fri, 16 Aug 2013 08:03:35 +0000 (08:03 +0000)]
Code cleanup: this was unintended change from quite a while ago..

8 years agoadd support for mempool/linklist functions.
Campbell Barton [Fri, 16 Aug 2013 05:50:00 +0000 (05:50 +0000)]
add support for mempool/linklist functions.

8 years agoCode cleanup: remove some ifdef code from guardedalloc
Sergey Sharybin [Fri, 16 Aug 2013 05:21:40 +0000 (05:21 +0000)]
Code cleanup: remove some ifdef code from guardedalloc

Didn't notice all needed functions are in atomic already.

8 years agoAtomic ops are only used in guarded allocator, so move include into ifdef
Sergey Sharybin [Thu, 15 Aug 2013 12:28:30 +0000 (12:28 +0000)]
Atomic ops are only used in guarded allocator, so move include into ifdef

8 years agoCode cleanup
Sergey Sharybin [Thu, 15 Aug 2013 12:15:42 +0000 (12:15 +0000)]
Code cleanup

And checking whether mail indeed works now.

8 years agoSpeedup for guarded allocator
Sergey Sharybin [Thu, 15 Aug 2013 12:13:01 +0000 (12:13 +0000)]
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.

8 years agoMerging r59153 through r59161 from trunk into soc-2013-depsgraph_mt
Sergey Sharybin [Thu, 15 Aug 2013 12:08:18 +0000 (12:08 +0000)]
Merging r59153 through r59161 from trunk into soc-2013-depsgraph_mt

8 years agoCompilation error fix when using scons
Sergey Sharybin [Thu, 15 Aug 2013 12:05:42 +0000 (12:05 +0000)]
Compilation error fix when using scons

OpenEXR libraries shall go after OpenImageIO,
otherwise it'll fail to find symbols needed
for OIIO.

8 years ago== filebrowser ==
Andrea Weikert [Thu, 15 Aug 2013 10:14:41 +0000 (10:14 +0000)]
== 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.

8 years agoAdded detailed timing information output
Sergey Sharybin [Thu, 15 Aug 2013 10:11:08 +0000 (10:11 +0000)]
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:

And screenshot for fun:

8 years agoSkip objects which doesn't need update from update statistics
Sergey Sharybin [Thu, 15 Aug 2013 10:11:05 +0000 (10:11 +0000)]
Skip objects which doesn't need update from update statistics

8 years agoMerging r59136 through r59152 from trunk into soc-2013-depsgraph_mt
Sergey Sharybin [Thu, 15 Aug 2013 08:23:16 +0000 (08:23 +0000)]
Merging r59136 through r59152 from trunk into soc-2013-depsgraph_mt

8 years agoFix #36384: Inconsistent curve fill behaviour
Sergey Sharybin [Thu, 15 Aug 2013 07:59:32 +0000 (07:59 +0000)]
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.

8 years agoBlender might be compiled without guardedalloc again
Sergey Sharybin [Thu, 15 Aug 2013 07:36:56 +0000 (07:36 +0000)]
Blender might be compiled without guardedalloc again

This is useful for benchmark tests, to make CPU cache
utilization as good as we could with current design.

8 years agofix [#36455] importing obj data after saving doesn't work
Campbell Barton [Thu, 15 Aug 2013 00:32:12 +0000 (00:32 +0000)]
fix [#36455] importing obj data after saving doesn't work

8 years agoBGE: The Action Actuator can now make use of additive blending.
Mitchell Stokes [Wed, 14 Aug 2013 23:32:00 +0000 (23:32 +0000)]
BGE: The Action Actuator can now make use of additive blending.

8 years agoBGE: Finally adding support for additive layer blending.
Mitchell Stokes [Wed, 14 Aug 2013 23:31:49 +0000 (23:31 +0000)]
BGE: Finally adding support for additive layer blending.

Currently this is only for the Python API. The logic brick will be updated in a future commit.

8 years agoAdding a new state for sound handles in audaspace: stopped.
Joerg Mueller [Wed, 14 Aug 2013 21:21:00 +0000 (21:21 +0000)]
Adding a new state for sound handles in audaspace: stopped.

Now sounds that stopped playing but are still kept in the device can be differentiated from paused sounds with this state.
This should also fix the performance issues mentioned in [#36466] End of SequencerEntrys not set correctly.
Please test if sound pausing, resuming and stopping works fine in the BGE and sequencer, my tests all worked fine, but there might be a use case that needs some fixing.

8 years agoFix #36467: ends of curves - 2D differs to 3D
Sergey Sharybin [Wed, 14 Aug 2013 19:45:35 +0000 (19:45 +0000)]
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.

8 years agoCycles:
Thomas Dinges [Wed, 14 Aug 2013 19:38:14 +0000 (19:38 +0000)]
* Remove an unneeded return in shader_bsdf_eval(), function is void.
* if / else if tweak in shader_bsdf_ao().

8 years agofix [#36349] Separate mesh by material creates meshes with all the materials from...
Campbell Barton [Wed, 14 Aug 2013 14:36:43 +0000 (14:36 +0000)]
fix [#36349] Separate mesh by material creates meshes with all the materials from the original

8 years agoadd materials.clear() method, matching other python list method.
Campbell Barton [Wed, 14 Aug 2013 11:29:58 +0000 (11:29 +0000)]
add materials.clear() method, matching other python list method.

8 years agoquiet compiler warnings.
Campbell Barton [Wed, 14 Aug 2013 11:29:22 +0000 (11:29 +0000)]
quiet compiler warnings.

8 years agoMerging r59130 through r59135 from trunk into soc-2013-depsgraph_mt
Sergey Sharybin [Wed, 14 Aug 2013 10:42:18 +0000 (10:42 +0000)]
Merging r59130 through r59135 from trunk into soc-2013-depsgraph_mt