[Bf-blender-cvs] [a1e758801fe] soc-2019-npr: LANPR: Object usage flag now in LANPR tab.

YimingWu noreply at git.blender.org
Fri Jul 26 09:54:31 CEST 2019


Commit: a1e758801fea6486129459194cef5ea6b0cb7b2f
Author: YimingWu
Date:   Fri Jul 26 15:54:12 2019 +0800
Branches: soc-2019-npr
https://developer.blender.org/rBa1e758801fea6486129459194cef5ea6b0cb7b2f

LANPR: Object usage flag now in LANPR tab.

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

M	release/scripts/startup/bl_ui/properties_lanpr.py
M	release/scripts/startup/bl_ui/properties_object.py

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

diff --git a/release/scripts/startup/bl_ui/properties_lanpr.py b/release/scripts/startup/bl_ui/properties_lanpr.py
index efc6454c41c..e20228c09d8 100644
--- a/release/scripts/startup/bl_ui/properties_lanpr.py
+++ b/release/scripts/startup/bl_ui/properties_lanpr.py
@@ -45,7 +45,7 @@ def is_unit_transformation(ob):
     return False
 
 class OBJECT_PT_lanpr_settings(LanprButtonsPanel, Panel):
-    bl_label = "Object LANPR Settings"
+    bl_label = "Feature Line Modifier"
 
     @classmethod
     def poll(cls, context):
@@ -116,7 +116,26 @@ class OBJECT_PT_lanpr_modifier_target(LanprButtonsPanel, Panel):
             layout.prop(md,'layer')
             layout.prop(md,'material')
 
+class OBJECT_PT_lanpr(LanprButtonsPanel, Panel):
+    bl_label = "Usage"
+
+    @classmethod
+    def poll(cls, context):
+        return context.scene.render.engine == 'BLENDER_LANPR' or context.scene.lanpr.enabled
+
+    def draw(self, context):
+        layout=self.layout
+        lanpr = context.object.lanpr
+        if context.object.type == 'MESH':
+            layout.prop(lanpr,'usage')
+
+        if context.object.type == 'GPENCIL':
+            layout.prop(context.scene.lanpr,"gpencil_overwrite", text="Overwrite Frame")
+            layout.operator("object.lanpr_update_gp_target")
+
+
 classes = (
+    OBJECT_PT_lanpr,
     OBJECT_PT_lanpr_settings,
     OBJECT_PT_lanpr_modifier_target,
 )
diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py
index 01240d361da..bcd10bec766 100644
--- a/release/scripts/startup/bl_ui/properties_object.py
+++ b/release/scripts/startup/bl_ui/properties_object.py
@@ -402,28 +402,6 @@ class OBJECT_PT_visibility(ObjectButtonsPanel, Panel):
         col = flow.column()
         col.prop(ob, "hide_select", text="Selectable", toggle=False, invert_checkbox=True)
 
-class OBJECT_PT_lanpr(ObjectButtonsPanel, Panel):
-    bl_label = "LANPR"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    @classmethod
-    def poll(cls, context):
-        return context.scene.render.engine == 'BLENDER_LANPR' or context.scene.lanpr.enabled
-
-    def draw(self, context):
-        layout=self.layout
-        lanpr = context.object.lanpr
-        if context.object.type == 'MESH':
-            layout.label(text='Usage:')
-            row = layout.row()
-            row.prop(lanpr,'usage',expand=True)
-        #if context.object.type == 'MESH':
-        #    layout.operator("object.lanpr_update_gp_source")
-        if context.object.type == 'GPENCIL':
-            layout.prop(context.scene.lanpr,"gpencil_overwrite", text="Overwrite Frame", toggle=True)
-            layout.operator("object.lanpr_update_gp_target")
-        
-
 class OBJECT_PT_custom_props(ObjectButtonsPanel, PropertyPanel, Panel):
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_LANPR'}
     _context_path = "object"
@@ -444,7 +422,6 @@ classes = (
     OBJECT_PT_display,
     OBJECT_PT_display_bounds,
     OBJECT_PT_visibility,
-    OBJECT_PT_lanpr,
     OBJECT_PT_custom_props,
 )



More information about the Bf-blender-cvs mailing list