Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Tönne <lukas.toenne@gmail.com>2014-07-07 12:50:43 +0400
committerLukas Tönne <lukas.toenne@gmail.com>2014-07-07 12:54:14 +0400
commit2fe0cf54a5827cac5a8d67dc6786bf7a7dc45950 (patch)
tree7380b3047efd49edf932bbcfc575cc3e996f2a0b /source/blender/blenkernel/intern/mball.c
parent7481d2aad1fb1355b91f2759d59546872fb1b9ad (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 'source/blender/blenkernel/intern/mball.c')
-rw-r--r--source/blender/blenkernel/intern/mball.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c
index 47aeb18ff36..43b19f0c869 100644
--- a/source/blender/blenkernel/intern/mball.c
+++ b/source/blender/blenkernel/intern/mball.c
@@ -2280,7 +2280,7 @@ void BKE_mball_polygonize(EvaluationContext *eval_ctx, Scene *scene, Object *ob,
mball_count(eval_ctx, &process, scene, ob);
if (process.totelem == 0) return;
- if ((eval_ctx->for_render == false) && (mb->flag == MB_UPDATE_NEVER)) return;
+ if ((eval_ctx->mode != DAG_EVAL_RENDER) && (mb->flag == MB_UPDATE_NEVER)) return;
if ((G.moving & (G_TRANSFORM_OBJ | G_TRANSFORM_EDIT)) && mb->flag == MB_UPDATE_FAST) return;
process.thresh = mb->thresh;
@@ -2318,7 +2318,7 @@ void BKE_mball_polygonize(EvaluationContext *eval_ctx, Scene *scene, Object *ob,
}
/* width is size per polygonize cube */
- if (eval_ctx->for_render) {
+ if (eval_ctx->mode == DAG_EVAL_RENDER) {
width = mb->rendersize;
}
else {