Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import bpy
- def cacheThisSmokeSim(smokeCacheName):
- for scene in bpy.data.scenes:
- for object in scene.objects:
- for modifier in object.modifiers:
- if modifier.type =='SMOKE':
- if object.name == smokeCacheName:
- override = {'blend_data': bpy.data,'scene': scene, 'active_object': object.name,'point_cache': modifier.domain_settings.point_cache}
- #bpy.ops.ptcache.bake_all(override)
- print ("CACHE THIS*:",smokeCacheName,"n")
- result = bpy.ops.ptcache.bake(override,True)
- print ("END OF CACHE")
- else:
- print ("BUT NOT THIS:",object.name)
- return result
- cacheResult = cacheThisSmokeSim('SMOKEDOMAIN')
- bpy.ops.ptcache.bake_all(override)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement