diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2014-07-07 12:50:43 +0400 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2014-07-07 12:54:14 +0400 |
commit | 2fe0cf54a5827cac5a8d67dc6786bf7a7dc45950 (patch) | |
tree | 7380b3047efd49edf932bbcfc575cc3e996f2a0b /intern | |
parent | 7481d2aad1fb1355b91f2759d59546872fb1b9ad (diff) |
Fix T40712: Duplicators don't generate orco and UV coordinates in Cycles viewport preview.
Fix T39286: Display percentage ignored in Cycles viewport.
The threaded depsgraph update changes included a cleanup of the global
is_rendering flag, which was replaced by a general EvalContext being
passed to dupli functions.
Problem is that the global flag was true for viewport duplis before
(ugly hack), which was used as a check for generating dupli orco/UV from
mesh data layers. The new flag is stricter and only true for actual
renders, which disables these attributes and breaks the Cycles
Texture Coordinates and UVMap nodes.
The solution is to extend the simple for_render boolean to an enum:
* VIEWPORT: OpenGL viewport drawing (dupli tex coords omitted)
* PREVIEW: Viewport preview render (simplified modifiers)
* RENDER: Full render with all details and attributes
There are still some areas that need to be examined, in particular
modifiers seem to totally ignore the EvaluationContext!
Instead they generally execute without render params from the depsgraph
(BKE_object_handle_update_ex) and are built with render settings
explicitly.
Differential Revision: https://developer.blender.org/D613
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/blender/blender_object.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp index d6a33892e75..2897ef1a0b6 100644 --- a/intern/cycles/blender/blender_object.cpp +++ b/intern/cycles/blender/blender_object.cpp @@ -457,10 +457,10 @@ void BlenderSync::sync_objects(BL::SpaceView3D b_v3d, float motion_time) BL::Scene::object_bases_iterator b_base; BL::Scene b_sce = b_scene; /* modifier result type (not exposed as enum in C++ API) - * 1 : eModifierMode_Realtime - * 2 : eModifierMode_Render - */ - int dupli_settings = preview ? 1 : 2; + * 1 : DAG_EVAL_PREVIEW + * 2 : DAG_EVAL_RENDER + */ + int dupli_settings = preview ? 1 : 2; bool cancel = false; |