[Bf-blender-cvs] [f475abdad22] lanpr-under-gp: LineArt: Main panel UI logic for no active camera scenario.
YimingWu
noreply at git.blender.org
Wed Nov 4 02:38:51 CET 2020
Commit: f475abdad2218a0890fae104c1fa28bacd6313fd
Author: YimingWu
Date: Wed Nov 4 09:26:23 2020 +0800
Branches: lanpr-under-gp
https://developer.blender.org/rBf475abdad2218a0890fae104c1fa28bacd6313fd
LineArt: Main panel UI logic for no active camera scenario.
===================================================================
M release/scripts/startup/bl_ui/properties_render.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py
index 8bbbd96cbce..8a80a7883d3 100644
--- a/release/scripts/startup/bl_ui/properties_render.py
+++ b/release/scripts/startup/bl_ui/properties_render.py
@@ -708,7 +708,7 @@ class RENDER_PT_lineart(RenderButtonsPanel, Panel):
layout.use_property_split = True
if not scene.camera:
- col.label(text="No active camera.")
+ layout.label(text="No active camera.")
else:
layout.prop(lineart, "use_contour", text='Contour')
@@ -722,6 +722,10 @@ class RENDER_PT_lineart_crease(RenderButtonsPanel, Panel):
bl_parent_id = "RENDER_PT_lineart"
bl_options = {'DEFAULT_CLOSED'}
+ @classmethod
+ def poll(cls, context):
+ scene = context.scene
+ return (scene.camera is not None)
def draw_header(self, context):
scene = context.scene
@@ -729,7 +733,6 @@ class RENDER_PT_lineart_crease(RenderButtonsPanel, Panel):
self.layout.prop(lineart, "use_crease", text='')
-
def draw(self, context):
scene = context.scene
lineart = scene.lineart
@@ -747,14 +750,17 @@ class RENDER_PT_lineart_intersection(RenderButtonsPanel, Panel):
bl_parent_id = "RENDER_PT_lineart"
bl_options = {'DEFAULT_CLOSED'}
+ @classmethod
+ def poll(cls, context):
+ scene = context.scene
+ return (scene.camera is not None)
+
def draw_header(self, context):
scene = context.scene
lineart = scene.lineart
-
self.layout.prop(lineart, "use_intersections", text='')
-
def draw(self, context):
scene = context.scene
lineart = scene.lineart
@@ -774,6 +780,11 @@ class RENDER_PT_lineart_extras(RenderButtonsPanel, Panel):
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
+ @classmethod
+ def poll(cls, context):
+ scene = context.scene
+ return (scene.camera is not None)
+
def draw(self, context):
scene = context.scene
lineart = scene.lineart
@@ -802,6 +813,11 @@ class RENDER_PT_lineart_baking(RenderButtonsPanel, Panel):
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
+ @classmethod
+ def poll(cls, context):
+ scene = context.scene
+ return (scene.camera is not None)
+
def draw(self, context):
scene = context.scene
lineart = scene.lineart
More information about the Bf-blender-cvs
mailing list