[Bf-blender-cvs] [a61480c2710] blender2.8: Merge branch 'master' into blender2.8

Campbell Barton noreply at git.blender.org
Tue Jun 26 22:57:41 CEST 2018


Commit: a61480c27103fbf449fd14ea8061b65c29f19eae
Author: Campbell Barton
Date:   Tue Jun 26 22:56:39 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBa61480c27103fbf449fd14ea8061b65c29f19eae

Merge branch 'master' into blender2.8

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



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

diff --cc doc/python_api/examples/gpu.offscreen.1.py
index ff1a7ad7cce,b4eb7452ca1..bb34603bd23
--- a/doc/python_api/examples/gpu.offscreen.1.py
+++ b/doc/python_api/examples/gpu.offscreen.1.py
@@@ -58,20 -57,19 +58,20 @@@ class OffScreenDraw(bpy.types.Operator)
  
          modelview_matrix = camera.matrix_world.inverted()
          projection_matrix = camera.calc_matrix_camera(
-                 render.resolution_x,
-                 render.resolution_y,
-                 render.pixel_aspect_x,
-                 render.pixel_aspect_y,
-                 )
+             render.resolution_x,
+             render.resolution_y,
+             render.pixel_aspect_x,
+             render.pixel_aspect_y,
+         )
  
          offscreen.draw_view3d(
-                 scene,
-                 render_layer,
-                 context.space_data,
-                 context.region,
-                 projection_matrix,
-                 modelview_matrix,
-                 )
+             scene,
++            render_layer,
+             context.space_data,
+             context.region,
+             projection_matrix,
+             modelview_matrix,
+         )
  
      @staticmethod
      def _opengl_draw(context, texture, aspect_ratio, scale):
diff --cc release/scripts/startup/bl_operators/file.py
index 8d947d19a82,5bb97ff298a..cf03b4fccdb
--- a/release/scripts/startup/bl_operators/file.py
+++ b/release/scripts/startup/bl_operators/file.py
@@@ -61,36 -61,36 +61,36 @@@ class WM_OT_previews_batch_generate(Ope
      # -----------
      # Own props.
      use_scenes = BoolProperty(
-             default=True,
-             name="Scenes",
-             description="Generate scenes' previews",
-             )
+         default=True,
+         name="Scenes",
+         description="Generate scenes' previews",
+     )
 -    use_groups = BoolProperty(
 +    use_collections = BoolProperty(
-             default=True,
-             name="Collections",
-             description="Generate collections' previews",
-             )
+         default=True,
 -        name="Groups",
 -        description="Generate groups' previews",
++        name="Collections",
++        description="Generate collections' previews",
+     )
      use_objects = BoolProperty(
-             default=True,
-             name="Objects",
-             description="Generate objects' previews",
-             )
+         default=True,
+         name="Objects",
+         description="Generate objects' previews",
+     )
      use_intern_data = BoolProperty(
-             default=True,
-             name="Mat/Tex/...",
-             description="Generate 'internal' previews (materials, textures, images, etc.)",
-             )
+         default=True,
+         name="Mat/Tex/...",
+         description="Generate 'internal' previews (materials, textures, images, etc.)",
+     )
  
      use_trusted = BoolProperty(
-             default=False,
-             name="Trusted Blend Files",
-             description="Enable python evaluation for selected files",
-             )
+         default=False,
+         name="Trusted Blend Files",
+         description="Enable python evaluation for selected files",
+     )
      use_backups = BoolProperty(
-             default=True,
-             name="Save Backups",
-             description="Keep a backup (.blend1) version of the files when saving with generated previews",
-             )
+         default=True,
+         name="Save Backups",
+         description="Keep a backup (.blend1) version of the files when saving with generated previews",
+     )
  
      def invoke(self, context, event):
          context.window_manager.fileselect_add(self)
@@@ -171,35 -171,35 +171,36 @@@ class WM_OT_previews_batch_clear(Operat
      # -----------
      # Own props.
      use_scenes = BoolProperty(
-             default=True,
-             name="Scenes",
-             description="Clear scenes' previews",
-             )
-     use_collections = BoolProperty(default=True,
-             name="Collections",
-             description="Clear collections' previews",
-             )
+         default=True,
+         name="Scenes",
+         description="Clear scenes' previews",
+     )
 -    use_groups = BoolProperty(default=True,
 -                              name="Groups",
 -                              description="Clear groups' previews",
 -                              )
++    use_collections = BoolProperty(
++        default=True,
++        name="Collections",
++        description="Clear collections' previews",
++    )
      use_objects = BoolProperty(
-             default=True,
-             name="Objects",
-             description="Clear objects' previews",
-             )
+         default=True,
+         name="Objects",
+         description="Clear objects' previews",
+     )
      use_intern_data = BoolProperty(
-             default=True,
-             name="Mat/Tex/...",
-             description="Clear 'internal' previews (materials, textures, images, etc.)",
-             )
+         default=True,
+         name="Mat/Tex/...",
+         description="Clear 'internal' previews (materials, textures, images, etc.)",
+     )
  
      use_trusted = BoolProperty(
-             default=False,
-             name="Trusted Blend Files",
-             description="Enable python evaluation for selected files",
-             )
+         default=False,
+         name="Trusted Blend Files",
+         description="Enable python evaluation for selected files",
+     )
      use_backups = BoolProperty(
-             default=True,
-             name="Save Backups",
-             description="Keep a backup (.blend1) version of the files when saving with cleared previews",
-             )
+         default=True,
+         name="Save Backups",
+         description="Keep a backup (.blend1) version of the files when saving with cleared previews",
+     )
  
      def invoke(self, context, event):
          context.window_manager.fileselect_add(self)
diff --cc release/scripts/startup/bl_operators/object_quick_effects.py
index 70334fb0f23,c2592f13d66..f087022b6fd
--- a/release/scripts/startup/bl_operators/object_quick_effects.py
+++ b/release/scripts/startup/bl_operators/object_quick_effects.py
@@@ -364,38 -369,88 +369,38 @@@ class QuickSmoke(Operator)
  
          # Setup material
  
 -        # Cycles
 -        if context.scene.render.use_shading_nodes:
 -            bpy.ops.object.material_slot_add()
 -
 -            mat = bpy.data.materials.new("Smoke Domain Material")
 -            obj.material_slots[0].material = mat
 -
 -            # Make sure we use nodes
 -            mat.use_nodes = True
 -
 -            # Set node variables and clear the default nodes
 -            tree = mat.node_tree
 -            nodes = tree.nodes
 -            links = tree.links
 -
 -            nodes.clear()
 +        # Cycles and Eevee
 +        bpy.ops.object.material_slot_add()
  
 -            # Create shader nodes
 +        mat = bpy.data.materials.new("Smoke Domain Material")
 +        obj.material_slots[0].material = mat
  
 -            # Material output
 -            node_out = nodes.new(type='ShaderNodeOutputMaterial')
 -            node_out.location = grid_location(6, 1)
 +        # Make sure we use nodes
 +        mat.use_nodes = True
  
 -            # Add Principled Volume
 -            node_principled = nodes.new(type='ShaderNodeVolumePrincipled')
 -            node_principled.location = grid_location(4, 1)
 -            links.new(node_principled.outputs["Volume"],
 -                      node_out.inputs["Volume"])
 +        # Set node variables and clear the default nodes
 +        tree = mat.node_tree
 +        nodes = tree.nodes
 +        links = tree.links
  
 -            node_principled.inputs["Density"].default_value = 5.0
 +        nodes.clear()
  
 -            if self.style in {'FIRE', 'BOTH'}:
 -                node_principled.inputs["Blackbody Intensity"].default_value = 1.0
 +        # Create shader nodes
  
 -        # Blender Internal
 -        else:
 -            # create a volume material with a voxel data texture for the domain
 -            bpy.ops.object.material_slot_add()
 -
 -            mat = bpy.data.materials.new("Smoke Domain Material")
 -            obj.material_slots[0].material = mat
 -            mat.type = 'VOLUME'
 -            mat.volume.density = 0
 -            mat.volume.density_scale = 5
 -            mat.volume.step_size = 0.1
 -
 -            tex = bpy.data.textures.new("Smoke Density", 'VOXEL_DATA')
 -            tex.voxel_data.domain_object = obj
 -            tex.voxel_data.interpolation = 'TRICUBIC_BSPLINE'
 -
 -            tex_slot = mat.texture_slots.add()
 -            tex_slot.texture = tex
 -            tex_slot.texture_coords = 'ORCO'
 -            tex_slot.use_map_color_emission = False
 -            tex_slot.use_map_density = True
 -            tex_slot.use_map_color_reflection = True
 -
 -            # for fire add a second texture for flame emission
 -            mat.volume.emission_color = Vector((0.0, 0.0, 0.0))
 -            tex = bpy.data.textures.new("Flame", 'VOXEL_DATA')
 -            tex.voxel_data.domain_object = obj
 -            tex.voxel_data.smoke_data_type = 'SMOKEFLAME'
 -            tex.voxel_data.interpolation = 'TRICUBIC_BSPLINE'
 -            tex.use_color_ramp = True
 +        # Material output
 +        node_out = nodes.new(type='ShaderNodeOutputMaterial')
 +        node_out.location = grid_location(6, 1)
  
 -            tex_slot = mat.texture_slots.add()
 -            tex_slot.texture = tex
 -            tex_slot.texture_coords = 'ORCO'
 +        # Add Principled Volume
 +        node_principled = nodes.new(type='ShaderNodeVolumePrincipled')
 +        node_principled.location = grid_location(4, 1)
 +        links.new(node_principled.outputs["Volume"],
-                 node_out.inputs["Volume"])
++                  node_out.inputs["Volume"])
  
 -            # add color ramp for flame color
 -            ramp = tex.color_ramp
 -            # dark orange
 -            elem = ramp.elements.new(0.333)
 -            elem.color = (0.2, 0.03, 0.0, 1.0)
 +        node_principled.inputs["Density"].default_value = 5.0
  

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list