将流体模拟数据导入粗略模型,并将模拟结果用于动态指导粗略的流体模型。
import bpy
# Get the current scene
scene = bpy.context.scene
# Set the liquid type to Water
liquid_type = 'WATER'
# Set the guide type to Smoke
guide_type = 'SMOKE'
# Set the other parameters
use_adaptive_subdiv = True
quality = 0.5
cool_down_seconds = 0
surface_distance = 0.025
# Bake the guides
bpy.ops.fluid.bake_guides(
scene=scene,
liquid_type=liquid_type,
guide_type=guide_type,
use_adaptive_subdiv=use_adaptive_subdiv,
quality=quality,
cool_down_seconds=cool_down_seconds,
surface_distance=surface_distance
)
import bpy
# Get the current scene
scene = bpy.context.scene
# Set the liquid type to Paint
liquid_type = 'PAINT'
# Set the guide type to Particles
guide_type = 'PARTICLES'
# Set the other parameters
use_adaptive_subdiv = False
quality = 1.0
cool_down_seconds = 5
surface_distance = 0.01
# Bake the guides
bpy.ops.fluid.bake_guides(
scene=scene,
liquid_type=liquid_type,
guide_type=guide_type,
use_adaptive_subdiv=use_adaptive_subdiv,
quality=quality,
cool_down_seconds=cool_down_seconds,
surface_distance=surface_distance
)