[Bf-blender-cvs] [00202210caa] soc-2019-npr: Make LANPR main panel show in all engines. Fixed "up" button bug. Crease value now in software mode as well.

YimingWu noreply at git.blender.org
Tue Jun 4 07:53:33 CEST 2019


Commit: 00202210caac41352707ec21a6bd6b40b752830e
Author: YimingWu
Date:   Tue Jun 4 12:47:54 2019 +0800
Branches: soc-2019-npr
https://developer.blender.org/rB00202210caac41352707ec21a6bd6b40b752830e

Make LANPR main panel show in all engines. Fixed "up" button bug. Crease value now in software mode as well.

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

M	release/scripts/startup/bl_ui/properties_scene.py
M	source/blender/draw/engines/lanpr/lanpr_ops.c

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

diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py
index 3a12b89916b..8f68a447876 100644
--- a/release/scripts/startup/bl_ui/properties_scene.py
+++ b/release/scripts/startup/bl_ui/properties_scene.py
@@ -617,44 +617,50 @@ class SCENE_PT_lanpr(SceneButtonsPanel, Panel):
         scene = context.scene
         lanpr = scene.lanpr
         active_layer = lanpr.layers.active_layer 
+
+        # make LANPR main panel now visible under all engines.
+        # composition method yet to be deteremined.
         
-        sc = lanpr_get_composition_scene(scene)
-        
-        if sc is not None:
-            layout.label(text = 'You are adjusting values for LANPR compostion scene.')
-            row = layout.row()
-            row.scale_y=1.5
-            row.operator("lanpr.goto_composition_scene")
-            layout.operator("lanpr.remove_composition_scene")
-            scene = sc
-            lanpr = scene.lanpr
-            active_layer = lanpr.layers.active_layer
-            return
-        elif scene.render.engine!='BLENDER_LANPR':
-            layout.label(text = 'Select LANPR engine or use composition scene.')
-            layout.operator("lanpr.make_composition_scene")
-            return
-
-        if lanpr_is_composition_scene(scene):
-            row = layout.row()
-            row.scale_y=1.5
-            row.operator("lanpr.goto_original_scene") 
-            
-            layout.label(text='LANPR Composition')
-            row = layout.row()
-            row.scale_y=1.5
-            row.scale_x=4
-            row.operator("lanpr.render_composited", icon = 'RENDER_STILL')
-            row.scale_x=1
-            row.prop(lanpr,"composite_render_animation", toggle=True, icon = 'RENDER_ANIMATION')
+        #sc = lanpr_get_composition_scene(scene)
         
-        layout.label(text='Mode:')
+        #if sc is not None:
+        #    layout.label(text = 'You are adjusting values for LANPR compostion scene.')
+        #    row = layout.row()
+        #    row.scale_y=1.5
+        #    row.operator("lanpr.goto_composition_scene")
+        #    layout.operator("lanpr.remove_composition_scene")
+        #    scene = sc
+        #    lanpr = scene.lanpr
+        #    active_layer = lanpr.layers.active_layer
+        #    return
+        #elif scene.render.engine!='BLENDER_LANPR':
+        #    layout.label(text = 'Select LANPR engine or use composition scene.')
+        #    layout.operator("lanpr.make_composition_scene")
+        #    return
+
+        #if lanpr_is_composition_scene(scene):
+        #   row = layout.row()
+        #    row.scale_y=1.5
+        #    row.operator("lanpr.goto_original_scene") 
+        #    
+        #    layout.label(text='LANPR Composition')
+        #    row = layout.row()
+        #    row.scale_y=1.5
+        #    row.scale_x=4
+        #    row.operator("lanpr.render_composited", icon = 'RENDER_STILL')
+        #    row.scale_x=1
+        #    row.prop(lanpr,"composite_render_animation", toggle=True, icon = 'RENDER_ANIMATION')
         
-        layout.prop(lanpr, "master_mode", expand=True) 
+        if scene.render.engine!='BLENDER_LANPR':
+            layout.label(text='Mode:')
+            layout.prop(lanpr, "master_mode", expand=True) 
+        else:
+            layout.label(text='Only Software mode result is used to generate GP stroke.')
 
         if lanpr.master_mode == "DPIX" or lanpr.master_mode == "SOFTWARE":
             
             layout.prop(lanpr, "background_color")
+            layout.prop(lanpr, "crease_threshold")
 
             if lanpr.master_mode == "SOFTWARE":
                 layout.label(text="Enable On Demand:")
diff --git a/source/blender/draw/engines/lanpr/lanpr_ops.c b/source/blender/draw/engines/lanpr/lanpr_ops.c
index da96096d54a..a89aff7438e 100644
--- a/source/blender/draw/engines/lanpr/lanpr_ops.c
+++ b/source/blender/draw/engines/lanpr/lanpr_ops.c
@@ -4237,7 +4237,7 @@ void SCENE_OT_lanpr_auto_create_line_layer(struct wmOperatorType *ot)
 void SCENE_OT_lanpr_move_line_layer(struct wmOperatorType *ot)
 {
   static const EnumPropertyItem line_layer_move[] = {
-      {1, "up", 0, "Up", ""}, {-1, "DOWN", 0, "Down", ""}, {0, NULL, 0, NULL, NULL}};
+      {1, "UP", 0, "Up", ""}, {-1, "DOWN", 0, "Down", ""}, {0, NULL, 0, NULL, NULL}};
 
   ot->name = "Move Line Layer";
   ot->description = "Move LANPR line layer up and down";



More information about the Bf-blender-cvs mailing list