Merge branch 'master' into blender2.8
authorCampbell Barton <ideasman42@gmail.com>
Tue, 3 Jul 2018 04:58:34 +0000 (06:58 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 3 Jul 2018 04:58:34 +0000 (06:58 +0200)
13 files changed:
1  2 
doc/python_api/sphinx_doc_gen.py
release/scripts/modules/addon_utils.py
release/scripts/modules/bl_previews_utils/bl_previews_render.py
release/scripts/modules/bpy/ops.py
release/scripts/modules/bpy_extras/__init__.py
release/scripts/modules/bpy_extras/keyconfig_utils.py
release/scripts/modules/bpy_extras/object_utils.py
release/scripts/modules/keyingsets_utils.py
release/scripts/startup/nodeitems_builtins.py
source/blender/python/simple_enum_gen.py
tests/python/bl_alembic_import_test.py
tests/python/bl_mesh_modifiers.py
tests/python/modules/render_report.py

Simple merge
Simple merge
index cd176e77aedfc5d415b30d6349c07c07f1c14f0e,d2578e1812a64c4e61a77741f65a1cc2ef95c647..1caef074d434d61e568046902ddbe3c9d7475b4a
@@@ -29,6 -29,5 +29,6 @@@ __all__ = 
      "image_utils",
      "keyconfig_utils",
      "mesh_utils",
 +    "node_utils",
      "view3d_utils",
    )
+ )
index 713dbdafcc57f596324cd241b3747d83abb4f2fc,92411aeb0ef280e21a385cf5785fd47a29baec84..888045487f01618ab560cb12ae0655b578295425
@@@ -185,38 -217,37 +186,38 @@@ shader_node_categories = 
          NodeItem("ShaderNodeUVMap"),
          NodeItem("ShaderNodeUVAlongStroke", poll=line_style_shader_nodes_poll),
          NodeItem("NodeGroupInput", poll=group_input_output_item_poll),
-         ]),
+     ]),
 -    ShaderNewNodeCategory("SH_NEW_OUTPUT", "Output", items=[
 -        NodeItem("ShaderNodeOutputMaterial", poll=object_shader_nodes_poll),
 -        NodeItem("ShaderNodeOutputLamp", poll=object_shader_nodes_poll),
 +    ShaderNodeCategory("SH_NEW_OUTPUT", "Output", items=[
 +        NodeItem("ShaderNodeOutputMaterial", poll=object_eevee_cycles_shader_nodes_poll),
 +        NodeItem("ShaderNodeOutputLamp", poll=object_cycles_shader_nodes_poll),
          NodeItem("ShaderNodeOutputWorld", poll=world_shader_nodes_poll),
          NodeItem("ShaderNodeOutputLineStyle", poll=line_style_shader_nodes_poll),
          NodeItem("NodeGroupOutput", poll=group_input_output_item_poll),
-         ]),
+     ]),
 -    ShaderNewNodeCategory("SH_NEW_SHADER", "Shader", items=[
 -        NodeItem("ShaderNodeMixShader"),
 -        NodeItem("ShaderNodeAddShader"),
 -        NodeItem("ShaderNodeBsdfDiffuse", poll=object_shader_nodes_poll),
 -        NodeItem("ShaderNodeBsdfPrincipled", poll=object_shader_nodes_poll),
 -        NodeItem("ShaderNodeBsdfGlossy", poll=object_shader_nodes_poll),
 -        NodeItem("ShaderNodeBsdfTransparent", poll=object_shader_nodes_poll),
 -        NodeItem("ShaderNodeBsdfRefraction", poll=object_shader_nodes_poll),
 -        NodeItem("ShaderNodeBsdfGlass", poll=object_shader_nodes_poll),
 -        NodeItem("ShaderNodeBsdfTranslucent", poll=object_shader_nodes_poll),
 -        NodeItem("ShaderNodeBsdfAnisotropic", poll=object_shader_nodes_poll),
 -        NodeItem("ShaderNodeBsdfVelvet", poll=object_shader_nodes_poll),
 -        NodeItem("ShaderNodeBsdfToon", poll=object_shader_nodes_poll),
 -        NodeItem("ShaderNodeSubsurfaceScattering", poll=object_shader_nodes_poll),
 -        NodeItem("ShaderNodeEmission", poll=object_shader_nodes_poll),
 -        NodeItem("ShaderNodeBsdfHair", poll=object_shader_nodes_poll),
 +    ShaderNodeCategory("SH_NEW_SHADER", "Shader", items=[
 +        NodeItem("ShaderNodeMixShader", poll=eevee_cycles_shader_nodes_poll),
 +        NodeItem("ShaderNodeAddShader", poll=eevee_cycles_shader_nodes_poll),
 +        NodeItem("ShaderNodeBsdfDiffuse", poll=object_eevee_cycles_shader_nodes_poll),
 +        NodeItem("ShaderNodeBsdfPrincipled", poll=object_eevee_cycles_shader_nodes_poll),
 +        NodeItem("ShaderNodeBsdfGlossy", poll=object_eevee_cycles_shader_nodes_poll),
 +        NodeItem("ShaderNodeBsdfTransparent", poll=object_eevee_cycles_shader_nodes_poll),
 +        NodeItem("ShaderNodeBsdfRefraction", poll=object_eevee_cycles_shader_nodes_poll),
 +        NodeItem("ShaderNodeBsdfGlass", poll=object_eevee_cycles_shader_nodes_poll),
 +        NodeItem("ShaderNodeBsdfTranslucent", poll=object_cycles_shader_nodes_poll),
 +        NodeItem("ShaderNodeBsdfAnisotropic", poll=object_cycles_shader_nodes_poll),
 +        NodeItem("ShaderNodeBsdfVelvet", poll=object_cycles_shader_nodes_poll),
 +        NodeItem("ShaderNodeBsdfToon", poll=object_cycles_shader_nodes_poll),
 +        NodeItem("ShaderNodeSubsurfaceScattering", poll=object_eevee_cycles_shader_nodes_poll),
 +        NodeItem("ShaderNodeEmission", poll=object_eevee_cycles_shader_nodes_poll),
 +        NodeItem("ShaderNodeBsdfHair", poll=object_cycles_shader_nodes_poll),
          NodeItem("ShaderNodeBackground", poll=world_shader_nodes_poll),
 -        NodeItem("ShaderNodeHoldout", poll=object_shader_nodes_poll),
 -        NodeItem("ShaderNodeVolumeAbsorption"),
 -        NodeItem("ShaderNodeVolumeScatter"),
 +        NodeItem("ShaderNodeHoldout", poll=object_cycles_shader_nodes_poll),
 +        NodeItem("ShaderNodeVolumeAbsorption", poll=eevee_cycles_shader_nodes_poll),
 +        NodeItem("ShaderNodeVolumeScatter", poll=eevee_cycles_shader_nodes_poll),
          NodeItem("ShaderNodeVolumePrincipled"),
-         ]),
 +        NodeItem("ShaderNodeEeveeSpecular", poll=object_eevee_shader_nodes_poll),
 -    ShaderNewNodeCategory("SH_NEW_TEXTURE", "Texture", items=[
+     ]),
 +    ShaderNodeCategory("SH_NEW_TEXTURE", "Texture", items=[
          NodeItem("ShaderNodeTexImage"),
          NodeItem("ShaderNodeTexEnvironment"),
          NodeItem("ShaderNodeTexSky"),
          NodeItem("ShaderNodeTexBrick"),
          NodeItem("ShaderNodeTexPointDensity"),
          NodeItem("ShaderNodeTexIES"),
-         ]),
+     ]),
 -    ShaderNewNodeCategory("SH_NEW_OP_COLOR", "Color", items=[
 +    ShaderNodeCategory("SH_NEW_OP_COLOR", "Color", items=[
          NodeItem("ShaderNodeMixRGB"),
          NodeItem("ShaderNodeRGBCurve"),
          NodeItem("ShaderNodeInvert"),
          NodeItem("ShaderNodeHueSaturation"),
          NodeItem("ShaderNodeGamma"),
          NodeItem("ShaderNodeBrightContrast"),
-         ]),
+     ]),
 -    ShaderNewNodeCategory("SH_NEW_OP_VECTOR", "Vector", items=[
 +    ShaderNodeCategory("SH_NEW_OP_VECTOR", "Vector", items=[
          NodeItem("ShaderNodeMapping"),
          NodeItem("ShaderNodeBump"),
          NodeItem("ShaderNodeDisplacement"),
          NodeItem("ShaderNodeNormal"),
          NodeItem("ShaderNodeVectorCurve"),
          NodeItem("ShaderNodeVectorTransform"),
-         ]),
+     ]),
 -    ShaderNewNodeCategory("SH_NEW_CONVERTOR", "Converter", items=[
 +    ShaderNodeCategory("SH_NEW_CONVERTOR", "Converter", items=[
          NodeItem("ShaderNodeMath"),
          NodeItem("ShaderNodeValToRGB"),
          NodeItem("ShaderNodeRGBToBW"),
          NodeItem("ShaderNodeCombineHSV"),
          NodeItem("ShaderNodeWavelength"),
          NodeItem("ShaderNodeBlackbody"),
-         ]),
+     ]),
 -    ShaderNewNodeCategory("SH_NEW_SCRIPT", "Script", items=[
 +    ShaderNodeCategory("SH_NEW_SCRIPT", "Script", items=[
          NodeItem("ShaderNodeScript"),
-         ]),
+     ]),
 -    ShaderNewNodeCategory("SH_NEW_GROUP", "Group", items=node_group_items),
 -    ShaderNewNodeCategory("SH_NEW_LAYOUT", "Layout", items=[
 +    ShaderNodeCategory("SH_NEW_GROUP", "Group", items=node_group_items),
 +    ShaderNodeCategory("SH_NEW_LAYOUT", "Layout", items=[
          NodeItem("NodeFrame"),
          NodeItem("NodeReroute"),
-         ]),
    ]
+     ]),
+ ]
  
  compositor_node_categories = [
      # Compositor Nodes
index 60e6d35def9c2e39d27f0b0c80b7e74c260aed88,619fdc77801a4da80bb559f2cd75624e5c03973f..d553a2e2c27303a794e3fb2129826eb24b97d1cd
@@@ -59,13 -59,13 +59,13 @@@ def render_gl(context, filepath, shade)
      render.resolution_x = 512
      render.resolution_y = 512
  
 -    ctx_viewport_shade(context, shade)
 +    ctx_shading_type(context, shade)
  
-     #~ # stop to inspect!
-     #~ if filepath == "test_cube_shell_solidify_subsurf_wp_wire":
-         #~ assert(0)
-     #~ else:
-         #~ return
+     # stop to inspect!
+     # if filepath == "test_cube_shell_solidify_subsurf_wp_wire":
+     #     assert(0)
+     # else:
+     #     return
  
      bpy.ops.render.opengl(write_still=True,
                            view_context=True)
index 425e6d59fa0e83e7328b3eda54f164f13c725bc5,6c71e8dcb7412e83dac17126da59ce53d2434d05..1f0022f13b6a074c135bfab6218ef6fc086d064f
@@@ -59,7 -61,8 +61,8 @@@ def test_get_name(filepath)
      filename = os.path.basename(filepath)
      return os.path.splitext(filename)[0]
  
 -def test_get_images(output_dir, filepath):
 +def test_get_images(output_dir, filepath, reference_dir):
      testname = test_get_name(filepath)
      dirpath = os.path.dirname(filepath)
  
@@@ -96,10 -98,8 +99,10 @@@ class Report
          'verbose',
          'update',
          'failed_tests',
 -        'passed_tests'
 +        'passed_tests',
 +        'compare_tests',
 +        'compare_engines'
-         )
+     )
  
      def __init__(self, title, output_dir, idiff):
          self.title = title
          filepath = os.path.join(outdir, "passed.data")
          pathlib.Path(filepath).write_text(self.passed_tests)
  
-     def _write_html(self, comparison = False):
 +        if self.compare_engines:
 +            filepath = os.path.join(outdir, "compare.data")
 +            pathlib.Path(filepath).write_text(self.compare_tests)
 +
++    def _write_html(self, comparison=False):
          # Gather intermediate data for all tests.
 -        failed_data = sorted(glob.glob(os.path.join(self.output_dir, "*/failed.data")))
 -        passed_data = sorted(glob.glob(os.path.join(self.output_dir, "*/passed.data")))
 +        if comparison:
 +            failed_data = []
 +            passed_data = sorted(glob.glob(os.path.join(self.output_dir, "*/compare.data")))
 +        else:
 +            failed_data = sorted(glob.glob(os.path.join(self.output_dir, "*/failed.data")))
 +            passed_data = sorted(glob.glob(os.path.join(self.output_dir, "*/passed.data")))
  
          failed_tests = ""
          passed_tests = ""
          else:
              self.passed_tests += test_html
  
 +        if self.compare_engines:
 +            ref_url = os.path.join("..", self.compare_engines[1], new_url)
 +
 +            test_html = """
 +                <tr{tr_style}>
 +                    <td><b>{name}</b><br/>{testname}<br/>{status}</td>
 +                    <td><img src="{new_url}" onmouseover="this.src='{ref_url}';" onmouseout="this.src='{new_url}';" class="render"></td>
 +                    <td><img src="{ref_url}" onmouseover="this.src='{new_url}';" onmouseout="this.src='{ref_url}';" class="render"></td>
 +                </tr>""" . format(tr_style=tr_style,
 +                                  name=name,
 +                                  testname=testname,
 +                                  status=status,
 +                                  new_url=new_url,
 +                                  ref_url=ref_url)
 +
 +            self.compare_tests += test_html
 +
      def _diff_output(self, filepath, tmp_filepath):
 -        old_img, ref_img, new_img, diff_img = test_get_images(self.output_dir, filepath)
 +        old_img, ref_img, new_img, diff_img = test_get_images(self.output_dir, filepath, self.reference_dir)
  
          # Create reference render directory.
          old_dirpath = os.path.dirname(old_img)