[Bf-blender-cvs] [f60406ff257] soc-2019-npr: Merge remote-tracking branch 'origin/master' into soc-2019-npr

YimingWu noreply at git.blender.org
Thu Oct 24 14:38:00 CEST 2019


Commit: f60406ff257c3309418413b5af76373010fb2a6f
Author: YimingWu
Date:   Sat Sep 14 15:29:28 2019 +0800
Branches: soc-2019-npr
https://developer.blender.org/rBf60406ff257c3309418413b5af76373010fb2a6f

Merge remote-tracking branch 'origin/master' into soc-2019-npr

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



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

diff --cc release/scripts/startup/bl_ui/properties_material.py
index 011e8fffd57,0849437b680..c17e4427f24
--- a/release/scripts/startup/bl_ui/properties_material.py
+++ b/release/scripts/startup/bl_ui/properties_material.py
@@@ -201,28 -201,31 +201,52 @@@ class EEVEE_MATERIAL_PT_volume(Material
  
          panel_node_draw(layout, mat.node_tree, 'OUTPUT_MATERIAL', "Volume")
  
 +class EEVEE_MATERIAL_PT_lines(MaterialButtonsPanel, Panel):
 +    bl_label = "Lines"
 +    bl_context = "material"
 +    COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_LANPR'}
 +
 +    def draw_header(self, context):
 +        layout = self.layout
 +        mat = context.material
 +        layout.prop(mat, "enable_lines", text="")
 +    
 +    def draw(self, context):
 +        layout = self.layout
 +        mat = context.material
 +
 +        if mat.enable_lines: 
 +            layout.label(text="Transparency")
 +            layout.prop(mat,"mask_layers_count", expand=True)
 +            layout.label(text="Customization")
 +            layout.template_list("LANPR_linesets", "", mat, "line_layers", mat.line_layers, "active_layer_index", rows=1)
 +        else:
 +            layout.prop(mat, "exclude_line_geometry", toggle=True)
  
+ def draw_material_settings(self, context):
+     layout = self.layout
+     layout.use_property_split = True
+     layout.use_property_decorate = False
+ 
+     mat = context.material
+ 
+     layout.prop(mat, "use_backface_culling")
+     layout.prop(mat, "blend_method")
+     layout.prop(mat, "shadow_method")
+ 
+     row = layout.row()
+     row.active = ((mat.blend_method == 'CLIP') or (mat.shadow_method == 'CLIP'))
+     row.prop(mat, "alpha_threshold")
+ 
+     if mat.blend_method not in {'OPAQUE', 'CLIP', 'HASHED'}:
+         layout.prop(mat, "show_transparent_back")
+ 
+     layout.prop(mat, "use_screen_refraction")
+     layout.prop(mat, "refraction_depth")
+     layout.prop(mat, "use_sss_translucency")
+     layout.prop(mat, "pass_index")
+ 
+ 
  class EEVEE_MATERIAL_PT_settings(MaterialButtonsPanel, Panel):
      bl_label = "Settings"
      bl_context = "material"
@@@ -282,9 -275,9 +296,10 @@@ classes = 
      EEVEE_MATERIAL_PT_context_material,
      EEVEE_MATERIAL_PT_surface,
      EEVEE_MATERIAL_PT_volume,
 +    EEVEE_MATERIAL_PT_lines,
      EEVEE_MATERIAL_PT_settings,
      MATERIAL_PT_viewport,
+     EEVEE_MATERIAL_PT_viewport_settings,
      MATERIAL_PT_custom_props,
  )
  
diff --cc release/scripts/startup/bl_ui/properties_render.py
index afe181764fb,b4c864c16cd..cbac8202715
--- a/release/scripts/startup/bl_ui/properties_render.py
+++ b/release/scripts/startup/bl_ui/properties_render.py
@@@ -23,11 -24,9 +23,13 @@@ from bl_ui.space_view3d import 
      VIEW3D_PT_shading_color,
      VIEW3D_PT_shading_options,
  )
 +from bpy.types import (
 +    Panel,
 +    UIList,
 +)
  
+ from bl_ui.properties_grease_pencil_common import GreasePencilSimplifyPanel
+ 
  
  class RenderButtonsPanel:
      bl_space_type = 'PROPERTIES'
@@@ -658,474 -655,13 +658,450 @@@ class RENDER_PT_simplify_render(RenderB
          col.prop(rd, "simplify_child_particles_render", text="Max Child Particles")
  
  
- class RENDER_PT_simplify_greasepencil(RenderButtonsPanel, Panel):
+ class RENDER_PT_simplify_greasepencil(RenderButtonsPanel, Panel, GreasePencilSimplifyPanel):
      bl_label = "Grease Pencil"
      bl_parent_id = "RENDER_PT_simplify"
-     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'}
+     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
      bl_options = {'DEFAULT_CLOSED'}
  
-     def draw_header(self, context):
-         rd = context.scene.render
-         self.layout.prop(rd, "simplify_gpencil", text="")
- 
-     def draw(self, context):
-         layout = self.layout
-         layout.use_property_split = True
-         layout.use_property_decorate = False
- 
-         rd = context.scene.render
- 
-         layout.active = rd.simplify_gpencil
- 
-         col = layout.column()
-         col.prop(rd, "simplify_gpencil_onplay", text="Playback Only")
-         col.prop(rd, "simplify_gpencil_view_modifier", text="Modifiers")
-         col.prop(rd, "simplify_gpencil_shader_fx", text="ShaderFX")
-         col.prop(rd, "simplify_gpencil_blend", text="Layers Blending")
- 
-         col.prop(rd, "simplify_gpencil_view_fill")
-         sub = col.column()
-         sub.active = rd.simplify_gpencil_view_fill
-         sub.prop(rd, "simplify_gpencil_remove_lines", text="Lines")
- 
  
 +class LANPR_UL_linesets(UIList):
 +    def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
 +        layout.prop(item,"name", text="", emboss=False)
 +
 +class RENDER_PT_lanpr(RenderButtonsPanel, Panel):
 +    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_LANPR', 'BLENDER_OPENGL', 'BLENDER_EEVEE'}
 +    bl_label = "LANPR"
 +    bl_options = {'DEFAULT_CLOSED'}
 +    
 +    @classmethod
 +    def poll(cls, context):
 +        return True
 +
 +    def draw_header(self, context):
 +        if context.scene.render.engine != 'BLENDER_LANPR':
 +            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.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)
 +
 +        #if mode == "SOFTWARE" or mode == "DPIX":
 +        if not scene.camera:
 +            has_camera=False
 +            col.label(text="No active camera.")
 +        else:
 +            has_camera=True
 +        
 +        c=col.column()
 +        c.enabled = has_camera
 +
 +        if scene.render.engine=="BLENDER_LANPR":
 +            c.prop(lanpr,'auto_update', text='Auto Update')
 +            txt = "Update" if mode == "SOFTWARE" else "Intersection Cache"
 +            if not lanpr.auto_update:
 +                c.operator("scene.lanpr_calculate", icon='FILE_REFRESH', text=txt)
 +
 +            c.operator("scene.lanpr_export_svg", icon='OUTLINER_OB_CURVE', text="Generate SVG to a text block")        
 +
 +        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='')
 +
 +        #else:
 +        #    layout.label(text="Vectorization:")
 +        #    layout.prop(lanpr, "enable_vector_trace", expand = True)
 +
 +def lanpr_make_line_type(expand,layout,line_type,label):
 +    layout.prop(line_type, "enabled", text=label)
 +    if expand and line_type.enabled:
 +        c = layout.column(align=True)
 +        c.prop(line_type, "color", text="Color")
 +        c.prop(line_type, "thickness", slider=True)
 +
 +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'}
 +
 +    @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
 +
 +    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  # 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, "qi_begin", text='Level Start')
 +            if active_layer.use_multiple_levels:
 +                col.prop(active_layer, "qi_end", text='End')
 +        
 +        layout.prop(active_layer,"use_same_style")
 +
 +        expand = not active_layer.use_same_style
 +
 +        col = layout.column(align=True)
 +        if not expand:
 +            col.prop(active_layer, "color")
 +        col.prop(active_layer, "thickness", text="Main Thickness")
 +
 +        lanpr_make_line_type(expand,layout,active_layer.contour,"Contour")
 +        lanpr_make_line_type(expand,layout,active_la

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list