Fix for a copy-and-paste bug in a Freestyle Python API helper function.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56806 954f8c5b-7b00-dc11-b283-0030488c597c
Further fix for memory leaks in Freestyle Python API components:
- StrokeAttribute thickness setter
- BezierCurve (used from within BezierCurveShader)
- Smoother (used from within SmoothingShader)

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56807 954f8c5b-7b00-dc11-b283-0030488c597c
BGE: A little bit of cleanup:
  * Removing KX_Scene::RemoveAnimatedObject() since KX_Scene::NewRemoveObject() is already handling this.
  * Don't create a new BL_ActionManager when replicating an object. Just set m_actionManager to NULL and let KX_GameObject::GetActionManager() allocate a new BL_ActionManager when one is needed.
  * Use KX_GameObject::GetScene() instead of KX_GetActiveScene() in KX_GameObject::GetActionManager() to make sure we're using the object's scene instead of one where Python might currently be running from. This could avoid potential issues with playing actions for objects in other scenes.



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56808 954f8c5b-7b00-dc11-b283-0030488c597c
More fix for memory leaks in the Freestyle module.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56809 954f8c5b-7b00-dc11-b283-0030488c597c
fix for own recent change with normal calculation (with no faces it wasn't freeing 0 byte allocation).


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56810 954f8c5b-7b00-dc11-b283-0030488c597c
bmesh edgeloop utility function, calculates an edge loop from 2 verts (start and endpoint).


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56811 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #35362: using dyntopo gives wrong render results

Made it so dynamic topology will flush changes from
SculptSession->bm to Object->me.

Used the same approach as sculptsession_bm_to_me does,
but instead of using DAG_id_tag_update used in-place
DerivedMesh release. Otherwise this lead to some
update issues resulting in missed object after render.

Also fixed multires modifier not being applied for
render when rendering from dyntopo sculpt mode.

P.S. Apparently sculpsession_bm_to_me was declared
     in BKE_paint.h but implemented in object.c.
     Rather confusing and better make it so this
     functions are declared and implemented in
     consistent files. But will solve this in a
     separate commit.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56812 954f8c5b-7b00-dc11-b283-0030488c597c
Move sculptsession functions implementation from object.c to paint.c

This functios are declared in BKE_paint.h header and using
SculptSession structure which is also declared there.

Anyway, does not make sense such a splitting of header and
implementation files, better be consistent here.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56813 954f8c5b-7b00-dc11-b283-0030488c597c
fix for finding openjpeg on some systems. 


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56814 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #35364: sculpting - D shortcut inconsistency

Switching to tool will cycle via all brushes with given type
only in case current brush tool matches requested one.

This means, when user requests brush with different type,
first brush of that tool will be activated. But further
toggling to the same tool will cycle via all acceptable
brushes.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56815 954f8c5b-7b00-dc11-b283-0030488c597c
Fix part of #35372: distorted strokes when painting zoomed out with a small brush
size. Interpolated mouse coordinates should not get rounded to integers.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56816 954f8c5b-7b00-dc11-b283-0030488c597c
Patch for CMakeLists.txt to build with new OpenAL libs on VS2012.
Because of crashing issue with old Creative Labs OpenAL on Windows 8 x64.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56818 954f8c5b-7b00-dc11-b283-0030488c597c
The Area Split/Merge corner widget was drawing 1 pixel too big, the lines overlapped
the area divider line.



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56819 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #35354: dyntopo - materials and UI display issues

Textured dyntopo draw was leaving 2d textures enabled when it shouldn't.

Root of the issue was figured out by Campbell, actual place where
2D textures left enabled found by self.

Also, simplified fix is suggested by Campbell (mine was 2 lines longer! :)

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56820 954f8c5b-7b00-dc11-b283-0030488c597c
Fix slow resizing of ID property arrays with more than 1619 items, it incorrectly
reverted to sizing with by 1 each time. This was slowing down painting long strokes
with small brush radius.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56821 954f8c5b-7b00-dc11-b283-0030488c597c
Fix another cases where painting long brush strokes with small radius was slowed
down, this time by the operator properties getting converted to a string for
display in the info window.

With 1000+ stroke points this can get slow, and takes up too much space anyway,
so now it's (somewhat arbitrarily) limited to printing only 10 points.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56822 954f8c5b-7b00-dc11-b283-0030488c597c
Attempt to fix #35057 and #35372: slow texture painting performance.

After the paint refactoring for 2.67, the OpenGL texture was getting updated for
every stroke point, rather than once for every redraw. With a small brush radius
and low spacing the number of stroke points can be quite large, which might have
a big performance impact depending on the graphics card / drivers.

Also for 2D image paint, avoid redrawing the button panels and properties editor
during painting.

There is another possible cause for slowdowns with 3D texture painting which was
not fixed. Projection painting is creating and destroying threads for every stroke
point. Depending on the CPU/OS there might be a lot of overhead in doing that if
the brush size is small.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56823 954f8c5b-7b00-dc11-b283-0030488c597c
use bool arrays rather then char for weight paint lock/select arrays


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56824 954f8c5b-7b00-dc11-b283-0030488c597c
Libmv internal compiler error workaround for VC2012.
Will be reverted as soon as the x64 compiler is fixed.
For now it shouldn't have an impact on tracking performance. My test have shown no significant speed difference to official VC2008 build of 2.67.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56825 954f8c5b-7b00-dc11-b283-0030488c597c
Fix for missing finalization of memory blocks allocated in the Freestyle module.
Suitable for inclusion in 2.67a.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56826 954f8c5b-7b00-dc11-b283-0030488c597c