Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_operators/object_quick_effects.py
| Show First 20 Lines • Show All 490 Lines • ▼ Show 20 Lines | def execute(self, context): | ||||
| if not self.show_flows: | if not self.show_flows: | ||||
| obj.display_type = 'WIRE' | obj.display_type = 'WIRE' | ||||
| # store bounding box min/max for the domain object | # store bounding box min/max for the domain object | ||||
| obj_bb_minmax(obj, min_co, max_co) | obj_bb_minmax(obj, min_co, max_co) | ||||
| # add the liquid domain object | # add the liquid domain object | ||||
| bpy.ops.mesh.primitive_cube_add() | bpy.ops.mesh.primitive_cube_add(align='WORLD') | ||||
| obj = context.active_object | obj = context.active_object | ||||
| obj.name = "Liquid Domain" | obj.name = "Liquid Domain" | ||||
| # give the liquid some room above the flows | # give the liquid some room above the flows | ||||
| obj.location = 0.5 * (max_co + min_co) + Vector((0.0, 0.0, -1.0)) | 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)) | obj.scale = 0.5 * (max_co - min_co) + Vector((1.0, 1.0, 2.0)) | ||||
| # setup liquid domain | # setup liquid domain | ||||
| ▲ Show 20 Lines • Show All 75 Lines • Show Last 20 Lines | |||||