[Bf-blender-cvs] [0ae685b5845] lanpr-under-gp: Removed LANPR engine and made LANPR working under Pure GP.
YimingWu
noreply at git.blender.org
Sun Jun 7 16:29:10 CEST 2020
Commit: 0ae685b58458ab7eb537575ffdb8129ab0d3795a
Author: YimingWu
Date: Thu Jun 4 21:20:35 2020 +0800
Branches: lanpr-under-gp
https://developer.blender.org/rB0ae685b58458ab7eb537575ffdb8129ab0d3795a
Removed LANPR engine and made LANPR working under Pure GP.
===================================================================
M release/scripts/startup/bl_ui/properties_render.py
M source/blender/blenkernel/intern/scene.c
M source/blender/draw/CMakeLists.txt
D source/blender/draw/engines/lanpr/lanpr_all.h
D source/blender/draw/engines/lanpr/lanpr_chain_draw.c
D source/blender/draw/engines/lanpr/lanpr_cpu.c
D source/blender/draw/engines/lanpr/lanpr_dpix.c
D source/blender/draw/engines/lanpr/lanpr_engine.c
D source/blender/draw/engines/lanpr/shaders/lanpr_dpix_preview_frag.glsl
D source/blender/draw/engines/lanpr/shaders/lanpr_dpix_preview_geom.glsl
D source/blender/draw/engines/lanpr/shaders/lanpr_dpix_project_clip_frag.glsl
D source/blender/draw/engines/lanpr/shaders/lanpr_dpix_project_passthrough_vert.glsl
D source/blender/draw/engines/lanpr/shaders/lanpr_software_chain_geom.glsl
D source/blender/draw/engines/lanpr/shaders/lanpr_software_line_chain_geom.glsl
D source/blender/draw/engines/lanpr/shaders/lanpr_software_passthrough_vert.glsl
M source/blender/draw/intern/draw_manager.c
M source/blender/editors/include/ED_lanpr.h
M source/blender/editors/lanpr/lanpr_cpu.c
M source/blender/editors/lanpr/lanpr_ops.c
M source/blender/editors/space_buttons/buttons_context.c
M source/blender/makesdna/DNA_scene_types.h
M source/blender/makesrna/intern/rna_scene.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py
index ad7dc2a586c..02da65bfba3 100644
--- a/release/scripts/startup/bl_ui/properties_render.py
+++ b/release/scripts/startup/bl_ui/properties_render.py
@@ -69,7 +69,7 @@ class RENDER_PT_color_management(RenderButtonsPanel, Panel):
bl_label = "Color Management"
bl_options = {'DEFAULT_CLOSED'}
bl_order = 100
- COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_LANPR'}
+ COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@@ -102,7 +102,7 @@ class RENDER_PT_color_management_curves(RenderButtonsPanel, Panel):
bl_label = "Use Curves"
bl_parent_id = "RENDER_PT_color_management"
bl_options = {'DEFAULT_CLOSED'}
- COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_LANPR'}
+ COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
def draw_header(self, context):
@@ -466,7 +466,7 @@ class RENDER_PT_eevee_indirect_lighting_display(RenderButtonsPanel, Panel):
class RENDER_PT_eevee_film(RenderButtonsPanel, Panel):
bl_label = "Film"
bl_options = {'DEFAULT_CLOSED'}
- COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_LANPR'}
+ COMPAT_ENGINES = {'BLENDER_EEVEE'}
@classmethod
def poll(cls, context):
@@ -694,35 +694,24 @@ class LANPR_UL_linesets(UIList):
layout.prop(item,"name", text="", emboss=False)
class RENDER_PT_lanpr(RenderButtonsPanel, Panel):
- COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_LANPR', 'BLENDER_OPENGL', 'BLENDER_EEVEE'}
+ COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_OPENGL', 'BLENDER_EEVEE'}
bl_label = "LANPR"
bl_options = {'DEFAULT_CLOSED'}
def draw_header(self, context):
- if context.scene.render.engine != 'BLENDER_LANPR':
- self.layout.prop(context.scene.lanpr, "enabled", text="")
+ self.layout.prop(context.scene.lanpr, "enabled", text="")
def draw(self, context):
scene = context.scene
lanpr = scene.lanpr
active_layer = lanpr.layers.active_layer
- mode = lanpr.master_mode
layout = self.layout
- layout.active = scene.render.engine=="BLENDER_LANPR" or lanpr.enabled
+ layout.active = lanpr.enabled
layout.use_property_split = True
layout.use_property_decorate = False # No animation.
col = layout.column()
-
- if scene.render.engine=="BLENDER_LANPR":
- col.prop(lanpr, "master_mode")
- else:
- mode = "SOFTWARE"
-
- if mode == "DPIX" and lanpr.shader_error:
- layout.label(text="DPIX transform shader compile error!")
- return
layout.prop(lanpr, "crease_threshold", slider=True)
@@ -738,30 +727,22 @@ class RENDER_PT_lanpr(RenderButtonsPanel, Panel):
c=col.column()
c.enabled = has_camera
- if scene.render.engine=="BLENDER_LANPR":
- txt = "Update" if mode == "SOFTWARE" else "Intersection Cache"
- if not lanpr.auto_update:
- c.operator("scene.lanpr_calculate", icon='FILE_REFRESH', text=txt)
-
- if mode == "DPIX" and len(lanpr.layers)==0:
- layout.label(text="You don't have a layer to display.")
- layout.operator("scene.lanpr_add_line_layer");
-
- if scene.render.engine=="BLENDER_LANPR" and mode == "SOFTWARE":
- layout.operator("scene.lanpr_auto_create_line_layer", text = "Default", icon = "ADD")
- row=layout.row()
- row.template_list("LANPR_UL_linesets", "", lanpr, "layers", lanpr.layers, "active_layer_index", rows=4)
- col=row.column(align=True)
- if active_layer:
- col.operator("scene.lanpr_add_line_layer", icon="ADD", text='')
- col.operator("scene.lanpr_delete_line_layer", icon="REMOVE", text='')
- col.separator()
- col.operator("scene.lanpr_move_line_layer",icon='TRIA_UP', text='').direction = "UP"
- col.operator("scene.lanpr_move_line_layer",icon='TRIA_DOWN', text='').direction = "DOWN"
- col.separator()
- col.operator("scene.lanpr_rebuild_all_commands",icon="FILE_REFRESH", text='')
- else:
- col.operator("scene.lanpr_add_line_layer", icon="ADD", text='')
+ if not lanpr.auto_update:
+ c.operator("scene.lanpr_calculate", icon='FILE_REFRESH')
+
+ layout.operator("scene.lanpr_auto_create_line_layer", text = "Default", icon = "ADD")
+ row=layout.row()
+ row.template_list("LANPR_UL_linesets", "", lanpr, "layers", lanpr.layers, "active_layer_index", rows=4)
+ col=row.column(align=True)
+ if active_layer:
+ col.operator("scene.lanpr_add_line_layer", icon="ADD", text='')
+ col.operator("scene.lanpr_delete_line_layer", icon="REMOVE", text='')
+ col.separator()
+ col.operator("scene.lanpr_move_line_layer",icon='TRIA_UP', text='').direction = "UP"
+ col.operator("scene.lanpr_move_line_layer",icon='TRIA_DOWN', text='').direction = "DOWN"
+ col.separator()
+ else:
+ col.operator("scene.lanpr_add_line_layer", icon="ADD", text='')
def lanpr_make_line_type(expand,layout,line_type,label):
layout.prop(line_type, "use", text=label)
@@ -774,14 +755,11 @@ class RENDER_PT_lanpr_layer_settings(RenderButtonsPanel, Panel):
bl_label = "Layer Settings"
bl_parent_id = "RENDER_PT_lanpr"
bl_options = {'DEFAULT_CLOSED'}
- COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_LANPR', 'BLENDER_OPENGL', 'BLENDER_EEVEE'}
+ COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_OPENGL', 'BLENDER_EEVEE'}
@classmethod
def poll(cls, context):
- scene = context.scene
- lanpr = scene.lanpr
- active_layer = lanpr.layers.active_layer
- return scene.render.engine=="BLENDER_LANPR" and active_layer
+ return True
def draw(self, context):
scene = context.scene
@@ -792,19 +770,11 @@ class RENDER_PT_lanpr_layer_settings(RenderButtonsPanel, Panel):
layout.use_property_split = True
layout.use_property_decorate = False # No animation.
- mode = lanpr.master_mode
- if scene.render.engine!="BLENDER_LANPR" and mode != "SOFTWARE":
- mode = "SOFTWARE"
-
- if active_layer and mode == "DPIX":
- active_layer = lanpr.layers[0]
-
- if mode == "SOFTWARE":
- layout.prop(active_layer, "use_multiple_levels", text="Multiple Levels")
- col = layout.column(align=True)
- col.prop(active_layer, "level_start", text='Level Start')
- if active_layer.use_multiple_levels:
- col.prop(active_layer, "level_end", text='End')
+ layout.prop(active_layer, "use_multiple_levels", text="Multiple Levels")
+ col = layout.column(align=True)
+ col.prop(active_layer, "level_start", text='Level Start')
+ if active_layer.use_multiple_levels:
+ col.prop(active_layer, "level_end", text='End')
layout.prop(active_layer,"use_same_style")
@@ -829,14 +799,11 @@ class RENDER_PT_lanpr_line_normal_effects(RenderButtonsPanel, Panel):
bl_label = "Normal Based Line Weight"
bl_parent_id = "RENDER_PT_lanpr"
bl_options = {'DEFAULT_CLOSED'}
- COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_LANPR', 'BLENDER_OPENGL', 'BLENDER_EEVEE'}
+ COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_OPENGL', 'BLENDER_EEVEE'}
@classmethod
def poll(cls, context):
- scene = context.scene
- lanpr = scene.lanpr
- active_layer = lanpr.layers.active_layer
- return scene.render.engine=="BLENDER_LANPR" and active_layer
+ return True
def draw_header(self, context):
active_layer = context.scene.lanpr.layers.active_layer
@@ -862,49 +829,11 @@ class RENDER_PT_lanpr_line_normal_effects(RenderButtonsPanel, Panel):
col.prop(active_layer,"normal_thickness_start", slider=True)
col.prop(active_layer,"normal_thickness_end", slider=True, text="End")
-class RENDER_PT_lanpr_line_gpu_effects(RenderButtonsPanel, Panel):
- bl_label = "Effects"
- bl_parent_id = "RENDER_PT_lanpr"
- bl_options = {'DEFAULT_CLOSED'}
- COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_LANPR', 'BLENDER_OPENGL', 'BLENDER_EEVEE'}
-
- @classmethod
- def poll(cls, context):
- scene = context.scene
- lanpr = scene.lanpr
- active_layer = lanpr.layers.active_layer
- return scene.render.engine=="BLENDER_LANPR" and active_layer and lanpr.master_mode == "DPIX"
-
- def draw(self, context):
- scene = context.scene
- lanpr = scene.lanpr
- active_layer = lanpr.layers.active_layer
-
- layout = self.layout
- layout.use_property_split = True
- layout.use_property_decorate = False
-
- col = layout.column(align = True)
- col.prop(lanpr, "crease_threshold")
- col.prop(lanpr, "crease_fade_threshold", text="Fade")
- col = layout.column(align = True)
- col.prop(lanpr, "depth_width_influence")
- col.prop(lanpr, "depth_width_curve", text="Curve")
- col = layout.column(align = True)
- col.prop(lanpr, "depth_alpha_influence")
- col.prop(lanpr, "depth_alpha_curve", text="Curve")
-
class RENDER_PT_lanpr_gpencil(RenderButtonsPanel, Panel):
bl_label = "Grease Pencil"
bl_parent_id = "RENDER_PT_lanpr"
bl_options = {'DEFAULT_CLOSED'}
- COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_LANPR', 'BLENDER_OPENGL', 'BLENDER_EEVEE'}
-
- @classmethod
- def poll(cls, context):
- scene = context.scene
- lanpr = scene.lanpr
- return scene.render.engine!='BLENDER_LANPR'
+ COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_OPENGL', 'BLENDER_EEVEE'}
def draw(self, context):
scene = context.scene
@@ -927,48 +856,11 @@ class RENDER_PT_lanpr_gpencil(RenderButtonsPanel, Panel):
layout.operator
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list