Fix for Freestyle built-in style module sketchy_multiple_parameterization.py not working correctly.
Suitable for inclusion in 2.67a.

Logical AND, OR and XOR operations on freestyle.Nature instances gave an error in some cases.
The updated C implementation of these bitwise operations is intended to reproduce the following Python implementation:

class Nature(int):
    def __and__(self, other):
        return Nature(int(self) & int(other))
    def __or__(self, other):
        return Nature(int(self) | int(other))
    def __xor__(self, other):
        return Nature(int(self) ^ int(other))

The problem report was by plasmasolutions on IRC, thanks a lot!

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56867 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #35398: changing render layer name causes animation to be lost.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56868 954f8c5b-7b00-dc11-b283-0030488c597c
This commit addresses the somewhat weak handling of stackless textures in Blender with default (BI) renderer. To do so, it's defining an "other" texture context, and when in this one, it switches to using the "new shading" texture handling already known with Cycles engine.

So now, in the new "other" tex context, you can (depending on active data) have direct access to modifiers', force's or brushes' textures...

I also refactored a bit how texture contexts are handled (once again, we had some quite similar code in both space_buttons and RNA sources). This should also solve some harmless glitches like "no texture context selected in UI" sometimes when you remove data related to current texture (see e.g. after removing the material from default cube, in startup scene).

This usage of two different systems for textures, and the handling of switches between them, has been a bit tricky to get working right, but it is OK now I think. I also had to add a bool flag to buttons space, SB_TEX_USER_LIMITED (use_limited_texture_context in RNA), which indicates "new shading" texture code whether it has to ignore materials, lamps etc. (BI) or not (Cycles).

Btw, pinned textures from modifiers/force/etc. were also broken (showing nothing), now it should work too.

Thanks to Brecht for reviewing.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56870 954f8c5b-7b00-dc11-b283-0030488c597c
bump mathutils callback slot size.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56871 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #35390: the verticel lines indicating scene start and end frame in the
sequencer now draw such that a strip that spans this time is contained just
between these lines.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56872 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #35393: Sculpt Shortcuts are bananas.

Issue was introduced by self in svn rev56815.
Brushes list was simply not fully traversing
due to mistake in termination condition.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56873 954f8c5b-7b00-dc11-b283-0030488c597c
3D Viewport rendering (Blender Internal)

Added incremental re-render on view changes. That means all data preprocessing
only needs to be done once on view changes, quite faster that way.

Also fixed a bug in raytracing strands with soft shadows, was wrongly changing
coordinates in a static array.

Note: proper signals for re-renders is still on the todo. Many button options
don't signal a re-render yet. Work around: press G+ESC for quick full renders.



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56874 954f8c5b-7b00-dc11-b283-0030488c597c
fix for error in bridge tool, using freed faces from bmo input.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56875 954f8c5b-7b00-dc11-b283-0030488c597c
fix for BM_mesh_edgeloops_find(), could give edge loops with one vert. (caused bridge to crash sometimes)


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56876 954f8c5b-7b00-dc11-b283-0030488c597c
ignore hidden edges for bmesh grid-fill.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56877 954f8c5b-7b00-dc11-b283-0030488c597c
code cleanup: use BM_elem_flag_test rather then accessing 'ele->head.hflag'


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56878 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #35369: Crop node or FileOutput node bug.

Issue was caused by file output node actually,

The thing here is, compositor output does have fixed
resolution and we could predict how to map coordinates
for border and cropping in that case.

But viewers and file output nodes are currently totally
depending on an input resolution. Could not see how
border could be applied reliably in this cases.

Disabling border option for file output node, so
now it shall behave the same way as it was before.

Discovered issues when using cropping to render border,
namely there's an offset in viewer nodes and previews,
but this is separate issue i guess (file output seems
to work fine). Will revisit this issue in next days.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56879 954f8c5b-7b00-dc11-b283-0030488c597c
Bug fix, own collection.

Shapekey drivers were executed for every call to derivedmesh, which shouldn't happen.
It now only runs on the object_update() function, once for every depsgraph change.

Error was found while testing preview render in viewport. On each render, the
animsys sent a 'changed data' because of the shapekey drivers being called,
causing eternal re-render loops (without showing anything).




git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56880 954f8c5b-7b00-dc11-b283-0030488c597c
fix for crash with toggle-drag on a popup (when the popup is closed while dragging).


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56881 954f8c5b-7b00-dc11-b283-0030488c597c
Fix for #35390 fix: sequencer scene start/end still did not display when they are equal.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56882 954f8c5b-7b00-dc11-b283-0030488c597c
More work on 3d view render:

- reverted fix for bug 32537 (error report drawing after thread job didn't show)

  This solves very bad 3d view render updates while using transform, it was
  getting into an eternal feedback loop for dependencies. (jobs sending mousemoves
  causing jobs to end, causing mousemoves, causing etc).
  
- The render-update code was not going over all windows, but over every screen to
  send signals (also the invisble ones)





git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56883 954f8c5b-7b00-dc11-b283-0030488c597c
Smoke simulator: Add flow subframes and ability to set custom particle size.

Previously it was nearly impossible to have fast moving objects emitting smoke or they would just leave behind a row of smoke poofs instead of continious stream of smoke. Now it's possible to set number of subframes for each smoke flow.

Another new thing is ability to set size of smoke flow particles instead of using closest smoke cell. This also works with my earlier "full sample" commit, so no more blocky particles either. :)

For more info check my blog post: http://www.miikahweb.com/en/blog/2013/05/17/blender-smoke-subframes

This commit also includes couple of fixes I spotted while testing:
* Fix: dissolve was applied at different time for low res and high res simulations.
* Fix: full sample setting didn't get copied with domain.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56884 954f8c5b-7b00-dc11-b283-0030488c597c
rigidbody: Add missig notifiers for add/remove operators

Fixes [#35403] Highlight not updating instantly when removing from Rigid body

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56885 954f8c5b-7b00-dc11-b283-0030488c597c
Update OpenEXR to 2.0, dependent libs will get updated next

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56886 954f8c5b-7b00-dc11-b283-0030488c597c
OSX mandtory updates after EXR version bump: OIIO

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