[Bf-blender-cvs] [96cf0cc946c] fluid-mantaflow: Merge branch 'master' into fluid-mantaflow

Sebastián Barschkis noreply at git.blender.org
Tue May 30 00:36:42 CEST 2017


Commit: 96cf0cc946cc671b88fe5a86ce5f925ea37c0423
Author: Sebastián Barschkis
Date:   Mon May 29 23:02:34 2017 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rB96cf0cc946cc671b88fe5a86ce5f925ea37c0423

Merge branch 'master' into fluid-mantaflow

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



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

diff --cc release/datafiles/locale
index 507eacde960,c93ed11a47b..19a637ce9f3
--- a/release/datafiles/locale
+++ b/release/datafiles/locale
@@@ -1,1 -1,1 +1,1 @@@
- Subproject commit 507eacde9608ce0190c6087fb338dd63f7a1649b
 -Subproject commit c93ed11a47b3016cf59711ec16de2e2e94c30e99
++Subproject commit 19a637ce9f38112146daca394af4a7db1bae6687
diff --cc release/scripts/addons
index b04ab01f947,371960484a3..0926c1e7dcb
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@@ -1,1 -1,1 +1,1 @@@
- Subproject commit b04ab01f947384013c459869f6026c75230e49f7
 -Subproject commit 371960484a38fc64e0a2635170a41a0d8ab2f6bd
++Subproject commit 0926c1e7dcbe566d3a92116c6e8f91ba440f3789
diff --cc release/scripts/addons_contrib
index 1846e4a9d97,a8515cfdfe9..7b69758c537
--- a/release/scripts/addons_contrib
+++ b/release/scripts/addons_contrib
@@@ -1,1 -1,1 +1,1 @@@
- Subproject commit 1846e4a9d97a9aef1563198b2d7544cb90ae4156
 -Subproject commit a8515cfdfe9a98127b592f36fcbe51b7e23b969a
++Subproject commit 7b69758c5374284653358eb8ce8754f08fab8fe3
diff --cc release/scripts/startup/bl_operators/object_quick_effects.py
index dce47c5b7f2,16f29c77bb9..21a232900b6
--- a/release/scripts/startup/bl_operators/object_quick_effects.py
+++ b/release/scripts/startup/bl_operators/object_quick_effects.py
@@@ -647,83 -646,10 +647,89 @@@ class QuickFluid(Operator)
  
          return {'FINISHED'}
  
- 
 +class QuickLiquid(Operator):
 +    bl_idname = "object.quick_liquid"
 +    bl_label = "Quick Liquid"
 +    bl_options = {'REGISTER', 'UNDO'}
 +
 +    show_flows = BoolProperty(
 +            name="Render Liquid Objects",
 +            description="Keep the liquid objects visible during rendering",
 +            default=False,
 +            )
 +
 +    def execute(self, context):
 +        fake_context = context.copy()
 +        mesh_objects = [obj for obj in context.selected_objects
 +                        if obj.type == 'MESH']
 +        min_co = Vector((100000.0, 100000.0, 100000.0))
 +        max_co = -min_co
 +
 +        if not mesh_objects:
 +            self.report({'ERROR'}, "Select at least one mesh object")
 +            return {'CANCELLED'}
 +
 +        for obj in mesh_objects:
 +            fake_context["object"] = obj
 +            # make each selected object a liquid flow
 +            bpy.ops.object.modifier_add(fake_context, type='SMOKE')
 +            obj.modifiers[-1].smoke_type = 'FLOW'
 +
 +            # set type
 +            obj.modifiers[-1].flow_settings.smoke_flow_type = 'LIQUID'
 +
 +            # set flow behavior
 +            obj.modifiers[-1].flow_settings.smoke_flow_behavior = 'GEOMETRY'
 +
 +            if not self.show_flows:
 +                obj.draw_type = 'WIRE'
 +
 +            # store bounding box min/max for the domain object
 +            obj_bb_minmax(obj, min_co, max_co)
 +
 +        # add the liquid domain object
 +        bpy.ops.mesh.primitive_cube_add()
 +        obj = context.active_object
 +        obj.name = "Liquid Domain"
 +
 +        # give the liquid some room above the flows
 +        obj.location = 0.5 * (max_co + min_co) + Vector((0.0, 0.0, -1.0))
 +        obj.scale = 0.5 * (max_co - min_co) + Vector((1.0, 1.0, 2.0))
 +
 +        # setup liquid domain
 +        bpy.ops.object.modifier_add(type='SMOKE')
 +        obj.modifiers[-1].smoke_type = 'DOMAIN'
 +        obj.modifiers[-1].domain_settings.smoke_domain_type = 'LIQUID'
 +        obj.modifiers[-1].domain_settings.collision_extents = 'BORDERCLOSED'
 +
 +        # set correct cache file format for liquid
 +        obj.modifiers[-1].domain_settings.cache_file_format = 'OBJECT'
 +		
 +        # make domain solid so that liquid becomes better visible
 +        obj.draw_type = 'SOLID'
 +
 +        # make the domain smooth so it renders nicely
 +        bpy.ops.object.shade_smooth()
 +
 +        # create a ray-transparent material for the domain
 +        bpy.ops.object.material_slot_add()
 +
 +        mat = bpy.data.materials.new("Liquid Domain Material")
 +        obj.material_slots[0].material = mat
 +
 +        mat.specular_intensity = 1
 +        mat.specular_hardness = 100
 +        mat.use_transparency = True
 +        mat.alpha = 0.0
 +        mat.transparency_method = 'RAYTRACE'
 +        mat.raytrace_transparency.ior = 1.33
 +        mat.raytrace_transparency.depth = 4
 +
 +        return {'FINISHED'}
+ 
+ classes = (
+     QuickExplode,
+     QuickFluid,
+     QuickFur,
+     QuickSmoke,
+ )
diff --cc release/scripts/startup/bl_ui/properties_physics_smoke.py
index ab56a85b4ef,f2e6c1e22e3..22f616bb38a
--- a/release/scripts/startup/bl_ui/properties_physics_smoke.py
+++ b/release/scripts/startup/bl_ui/properties_physics_smoke.py
@@@ -491,5 -409,20 +491,19 @@@ class PHYSICS_PT_smoke_display_settings
          col.prop(domain, "coba_field")
          col.template_color_ramp(domain, "color_ramp", expand=True)
  
 -
+ classes = (
+     PHYSICS_PT_smoke,
+     PHYSICS_PT_smoke_flow_advanced,
+     PHYSICS_PT_smoke_fire,
+     PHYSICS_PT_smoke_adaptive_domain,
+     PHYSICS_PT_smoke_highres,
+     PHYSICS_PT_smoke_groups,
+     PHYSICS_PT_smoke_cache,
+     PHYSICS_PT_smoke_field_weights,
+     PHYSICS_PT_smoke_display_settings,
+ )
+ 
  if __name__ == "__main__":  # only for live edit.
-     bpy.utils.register_module(__name__)
+     from bpy.utils import register_class
+     for cls in classes:
+         register_class(cls)




More information about the Bf-blender-cvs mailing list