diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2018-02-26 17:39:37 +0300 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2018-02-27 02:53:31 +0300 |
commit | 8a7c0abc2d548d88b755a1c712aa06f0ee631076 (patch) | |
tree | d69850032bc8a91959916a81696c0ab007502381 /source/blender/freestyle/intern | |
parent | e24906759f7b181efc568c3ddb9afffa8dfe965c (diff) |
F12 offline Freestyle rendering support in Eevee
This patch adds F12 offline Freestyle rendering support to Eevee.
Most functionalities are identical with those found in Cycles.
The only major difference is that the per-view layer "use Freestyle" toggle
option is currently placed in the "Passes" panel of the "View Layers"
properties window instead of a "Layer" panel as in Cycles. Since Freestyle
is a post-processed overlay and not a pass, the present option location is
a compromise. To describe this fact, the per-layer "use Freestyle" option
is in a subsection labeled as "Layer".
Reviewers: fclem, brecht, campbellbarton
Reviewed By: fclem, brecht
Subscribers: dfelinto
Differential Revision: https://developer.blender.org/D3084
Diffstat (limited to 'source/blender/freestyle/intern')
-rw-r--r-- | source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp index 977bca66731..12cb3e3f3f8 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp +++ b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp @@ -53,6 +53,7 @@ extern "C" { #include "BKE_node.h" #include "BKE_object.h" #include "BKE_scene.h" +#include "BKE_world.h" #include "BLI_ghash.h" #include "BLI_listbase.h" @@ -91,6 +92,7 @@ BlenderStrokeRenderer::BlenderStrokeRenderer(Render *re, int render_count) : Str freestyle_scene->r.cfra = old_scene->r.cfra; freestyle_scene->r.mode = old_scene->r.mode & ~(R_EDGE_FRS | R_SHADOW | R_SSS | R_PANORAMA | R_ENVMAP | R_MBLUR | R_BORDER); + freestyle_scene->r.alphamode = R_ALPHAPREMUL; freestyle_scene->r.xsch = re->rectx; // old_scene->r.xsch freestyle_scene->r.ysch = re->recty; // old_scene->r.ysch freestyle_scene->r.xasp = 1.0f; // old_scene->r.xasp; @@ -167,6 +169,13 @@ BlenderStrokeRenderer::BlenderStrokeRenderer(Render *re, int render_count) : Str freestyle_scene->camera = object_camera; + // World + World *world = BKE_world_add(freestyle_bmain, "FRSWorld"); + DEG_graph_id_tag_update(freestyle_bmain, freestyle_depsgraph, &world->id, 0); + world->horr = world->horg = world->horb = 0.0f; + world->zenr = world->zeng = world->zenb = 0.0f; + freestyle_scene->world = world; + // Reset serial mesh ID (used for BlenderStrokeRenderer::NewMesh()) _mesh_id = 0xffffffff; |