svn merge ^/trunk/blender -r46037:46827
Merge with trunk r47087
* Added basic implementation of fire simulation:
* Flow settings now have a "Flow Type" menu where you can change if flow emits smoke or fire.
* Domain has a new "Flames" panel where you can adjust fire behavior.
* Added 3D-view rendering of fire together with smoke.
* Added new "Flames" voxel data type to render fire in Blender Internal render engine.

Current fire quality is very similar to the old way of using dissolving smoke to simulate fire. I'm going to work later this summer on allowing more realistic fire behavior by implementing a way to simulate the reaction "blue core".

Flow settings and initial velocity also play an important role in modeling gaseous expansion typical for burning fuel. That's what I'm going to work on next. :)
Merge with trunk r47460
* Added ability to emit smoke directly from mesh surface and volume without particles. (Now default flow type)
* Surface emission strength can be controlled using vertex groups.
* Surface emission can have normal or mesh movement directional initial velocity.
* Refactor and cleanup of smoke emission code.
* Fixed "quick smoke" to work with branch changes.
* Added debug code for visualization of velocity and heat.
Fixed smoke compile on non-Windows platforms: I had added the "ADD_IF_LOWER" macro inside a "#ifdef _WIN32" block...
Added copy of Diffuse BSDF node for testing

-Changed blender nodes source for UI changes,
-Added new cycles node type MY_BSDF_NODE
-Did not copy shader closure

Conflicts:

	source/blender/blenkernel/BKE_node.h
Fix: Smoke flow vertex group didn't work with subdivision modifier.
Added node_shader_mybsdf_diffuse.c to CMakeLists.txt

-this fixes the compilation error from revision r47479
This commit includes my smoke work from previous weeks.

There are lots of changes in the code but here is a list of new things visible to users:
* A new "Adaptive Domain" setting. It makes smoke domain dynamically adapt to domain and fluid changes:
1) Domain resolution and size adapts to only cover areas where smoke is, so that as small domain as possible has to be calculated at a time. You can also add additional simulation cells around the original domain area if needed.
2) When you move the domain object during simulation you only move the smoke "boundaries". Smoke itself remains still. This way you can limit simulated area to stay around moving emitters etc.
* Domain is now rotatable. This means you are no longer need to align your simulation on x, y or z axis but you can freely rotate the domain to match the target area.
* Rotation and scaling also work during simulation with one limitation: Domain contents (smoke,fire) move with the domain.
* Smoke now uses the scene gravity setting, so you can change gravity direction if required.
* Added a new option for volume textures when "Generated" coordinates are used: "Map to Bounds". This maps texture coordinates to mesh bounding box allowing you to render adaptive domain content. It also solves issues with domains scaled in edit mode, so I'm considering to make this enabled by default.

Please note that this feature is not yet finished. I still have quite a few todos left and I'm sure there are still several bugs there.
Fix compile on non-Windows platforms.
* Added "map to bounds" option also for "Object" coordinates.
* Fix: smoke viewport shading and force fields now work properly for rotated/moved domains again.
* Fix: first frame was initialized with maximum resolution even when using adaptive domain.
* Some code cleanup.
Merge with trunk r48317
* Changing (most) smoke domain settings no longer clears whole domain but just the cache. This way it's easier to try out different settings while playback.
* Copying domain object now also preserves adaptive settings. :p
* Heat/velocity debug visualization (dev only) works again.
* Some code cleanup.
Committed out conflicting part from previous merge. It was no longer possible to compile with Cycles.
Philipp Volguine can you check that out?
Fix: Smoke obstacles were sometimes processed in wrong location when adaptive domain was enabled.
Merge with trunk r48602
Added a new force field type: "Smoke Flow".

It applies smoke simulation air flow velocity as a force to other Blender simulations that use force fields. To use it you need to add a "Smoke Flow" force field and select domain object for it.

To get an idea of what this is about, here is a video of it being used on particles: http://www.youtube.com/watch?v=lqRIxVQuVno
* Fix: Emitting smoke from particles didn't work after last commit.
* "Map to Bounds" is now enabled by default for new textures. One less thing to worry about when rendering adaptive domain. :p
Merge with trunk r49076