[Bf-blender-cvs] [dd3f69a783f] soc-2019-npr: LANPR: Fixed "point" mode in normal control.

YimingWu noreply at git.blender.org
Fri Jul 26 05:34:02 CEST 2019


Commit: dd3f69a783fe70f0010cf3f038cee62d41793ae9
Author: YimingWu
Date:   Fri Jul 26 11:33:36 2019 +0800
Branches: soc-2019-npr
https://developer.blender.org/rBdd3f69a783fe70f0010cf3f038cee62d41793ae9

LANPR: Fixed "point" mode in normal control.

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

M	release/scripts/startup/bl_ui/properties_render.py
M	source/blender/draw/engines/lanpr/lanpr_cpu.c
M	source/blender/makesdna/DNA_lanpr_types.h
M	source/blender/makesrna/intern/rna_lanpr.c

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

diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py
index 15033d8691f..f5a3c204d79 100644
--- a/release/scripts/startup/bl_ui/properties_render.py
+++ b/release/scripts/startup/bl_ui/properties_render.py
@@ -937,8 +937,8 @@ class RENDER_PT_lanpr_line_normal_effects(RenderButtonsPanel, Panel):
         layout.use_property_split = True
         layout.use_property_decorate = False
         
-        if active_layer:
-            layout.prop(active_layer,"normal_mode", text="Mode")
+        layout.prop(active_layer,"normal_mode", text="Mode")
+        if active_layer.normal_mode != "DISABLED":
             layout.prop(active_layer,"normal_control_object")
             layout.prop(active_layer,"normal_effect_inverse")
             col = layout.column(align=True)
diff --git a/source/blender/draw/engines/lanpr/lanpr_cpu.c b/source/blender/draw/engines/lanpr/lanpr_cpu.c
index 569082855af..63661491cb0 100644
--- a/source/blender/draw/engines/lanpr/lanpr_cpu.c
+++ b/source/blender/draw/engines/lanpr/lanpr_cpu.c
@@ -245,8 +245,6 @@ void lanpr_calculate_normal_object_vector(LANPR_LineLayer *ll, float *normal_obj
         normal_object_direction[2] = ob->obmat[3][2];
       }
       return;
-    case LANPR_NORMAL_2D:
-      return;
   }
 }
 
diff --git a/source/blender/makesdna/DNA_lanpr_types.h b/source/blender/makesdna/DNA_lanpr_types.h
index 59f4d796cae..1282a63de3f 100644
--- a/source/blender/makesdna/DNA_lanpr_types.h
+++ b/source/blender/makesdna/DNA_lanpr_types.h
@@ -50,10 +50,10 @@ struct Collection;
 #define LANPR_USE_DIFFERENT_TAPER 0
 #define LANPR_USE_SAME_TAPER 1
 
+/* Only on/off switch for now, below not used */
 #define LANPR_NORMAL_DONT_CARE 0
 #define LANPR_NORMAL_DIRECTIONAL 1
 #define LANPR_NORMAL_POINT 2
-#define LANPR_NORMAL_2D 3
 
 #define LANPR_COMPONENT_MODE_ALL 0
 #define LANPR_COMPONENT_MODE_OBJECT 1
diff --git a/source/blender/makesrna/intern/rna_lanpr.c b/source/blender/makesrna/intern/rna_lanpr.c
index 3ba5e8cd5af..f77e4516a4c 100644
--- a/source/blender/makesrna/intern/rna_lanpr.c
+++ b/source/blender/makesrna/intern/rna_lanpr.c
@@ -72,8 +72,8 @@ void RNA_def_lanpr(BlenderRNA *brna)
        0,
        "Directional",
        "Use directional vector to control line width"},
-      /* Currently inoperative */
-      /* {LANPR_NORMAL_POINT, "POINT", 0, "Point", "Use Point Light Style"}, */
+      /* Seems working... */
+      {LANPR_NORMAL_POINT, "POINT", 0, "Point", "Use Point Light Style"},
       {0, NULL, 0, NULL, NULL}};
 
   srna = RNA_def_struct(brna, "LANPR_LineLayerComponent", NULL);



More information about the Bf-blender-cvs mailing list