[Bf-blender-cvs] [8621c634a92] soc-2019-npr: LANPR: Default values for normal style.

YimingWu noreply at git.blender.org
Mon Aug 5 04:17:27 CEST 2019


Commit: 8621c634a92714e4449d13eeebdbdcd1813a4d91
Author: YimingWu
Date:   Mon Aug 5 10:17:08 2019 +0800
Branches: soc-2019-npr
https://developer.blender.org/rB8621c634a92714e4449d13eeebdbdcd1813a4d91

LANPR: Default values for normal style.

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

M	source/blender/draw/engines/lanpr/lanpr_engine.c
M	source/blender/editors/lanpr/lanpr_cpu.c
M	source/blender/makesdna/DNA_lanpr_types.h

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

diff --git a/source/blender/draw/engines/lanpr/lanpr_engine.c b/source/blender/draw/engines/lanpr/lanpr_engine.c
index 75136e929f4..95df026f91a 100644
--- a/source/blender/draw/engines/lanpr/lanpr_engine.c
+++ b/source/blender/draw/engines/lanpr/lanpr_engine.c
@@ -725,18 +725,16 @@ DrawEngineType draw_engine_lanpr_type = {
     NULL,
     NULL,
     N_("LANPR"),
-    &lanpr_data_size, /*  why should we have the "&" ? */
+    &lanpr_data_size,
     &lanpr_engine_init,
     &lanpr_engine_free,
     &lanpr_cache_init,
     &lanpr_cache_populate,
     &lanpr_cache_finish,
     NULL,              /*  draw background */
-    &lanpr_draw_scene, /*  draw scene, looks like that not much difference except a camera overlay
-                        */
-                       /*  image. */
+    &lanpr_draw_scene, /*  draw scene */
     &lanpr_view_update,
-    &lanpr_id_update, /* &lanpr_id_update, wait till I figure out how to do this. */
+    &lanpr_id_update,
     &lanpr_render_to_image,
 };
 
@@ -749,7 +747,7 @@ RenderEngineType DRW_engine_viewport_lanpr_type = {
     NULL,                 /*  update */
     &DRW_render_to_image, /*  render to img */
     NULL,                 /*  bake */
-    NULL, /*  doesn't seem to be what I thought it was... &lanpr_view_update,// view update */
+    NULL, /*  view update */
     NULL, /*  render to view */
     NULL, /*  update in script */
     NULL, /*  update in render pass */
diff --git a/source/blender/editors/lanpr/lanpr_cpu.c b/source/blender/editors/lanpr/lanpr_cpu.c
index ae5d6a7ff3e..1085dac6685 100644
--- a/source/blender/editors/lanpr/lanpr_cpu.c
+++ b/source/blender/editors/lanpr/lanpr_cpu.c
@@ -145,6 +145,11 @@ LANPR_LineLayer *ED_lanpr_new_line_layer(SceneLANPR *lanpr)
   ll->edge_mark.enabled = 1;
   ll->intersection.enabled = 1;
 
+  ll->normal_thickness_begin = 0.2f;
+  ll->normal_thickness_end = 1.5f;
+  ll->normal_ramp_begin = 0.0f;
+  ll->normal_ramp_end = 1.0f;
+
   lanpr->active_layer = ll;
   BLI_addtail(&lanpr->line_layers, ll);
 
diff --git a/source/blender/makesdna/DNA_lanpr_types.h b/source/blender/makesdna/DNA_lanpr_types.h
index d0140fbddb0..317af82d911 100644
--- a/source/blender/makesdna/DNA_lanpr_types.h
+++ b/source/blender/makesdna/DNA_lanpr_types.h
@@ -95,9 +95,10 @@ typedef struct LANPR_LineLayer {
 
   int use_multiple_levels;
   int qi_begin;
-  int qi_end; /* these are for QI Range thing... just occlusion levels */
+  int qi_end;
 
-  char name[64]; /* to be displayed on the list */
+  /** To be displayed on the list */
+  char name[64]; 
 
   LANPR_LineType contour;
   LANPR_LineType crease;
@@ -119,13 +120,12 @@ typedef struct LANPR_LineLayer {
   float normal_thickness_end;
   struct Object *normal_control_object;
 
-  int logic_mode; /* for component evaluation */
+  /** For component evaluation */
+  int logic_mode; 
   int _pad2;
 
   ListBase components;
 
-  // still need legacy mode
-  // should use runtime pointer
   struct DRWShadingGroup *shgrp;
   struct GPUBatch *batch;



More information about the Bf-blender-cvs mailing list