[Bf-blender-cvs] [0af490ede48] soc-2019-npr: LANPR: enable switch now operative in software mode

YimingWu noreply at git.blender.org
Thu Jun 27 08:28:56 CEST 2019


Commit: 0af490ede48ff324cb918a4c10cb0d370f397d1b
Author: YimingWu
Date:   Thu Jun 27 13:55:48 2019 +0800
Branches: soc-2019-npr
https://developer.blender.org/rB0af490ede48ff324cb918a4c10cb0d370f397d1b

LANPR: enable switch now operative in software mode

===================================================================

M	source/blender/draw/engines/lanpr/lanpr_ops.c

===================================================================

diff --git a/source/blender/draw/engines/lanpr/lanpr_ops.c b/source/blender/draw/engines/lanpr/lanpr_ops.c
index 3903c07a49e..f07488f05e7 100644
--- a/source/blender/draw/engines/lanpr/lanpr_ops.c
+++ b/source/blender/draw/engines/lanpr/lanpr_ops.c
@@ -4152,6 +4152,10 @@ int lanpr_compute_feature_lines_internal(Depsgraph *depsgraph)
   LANPR_RenderBuffer *rb;
   SceneLANPR *lanpr;
 
+  if (!lanpr->enabled) {
+    return OPERATOR_CANCELLED;
+  }
+
   rb = lanpr_create_render_buffer();
 
   lanpr_share.render_buffer_shared = rb;
@@ -4208,6 +4212,10 @@ static int lanpr_compute_feature_lines_exec(struct bContext *C, struct wmOperato
   Scene *scene = CTX_data_scene(C);
   SceneLANPR *lanpr = &scene->lanpr;
 
+  if (!lanpr->enabled) {
+    return OPERATOR_CANCELLED;
+  }
+
   if (!scene->camera) {
     BKE_report(op->reports, RPT_ERROR, "There is no active camera in this scene!");
     printf("LANPR Warning: There is no active camera in this scene!\n");



More information about the Bf-blender-cvs mailing list