diff options
author | Martin Poirier <theeth@yahoo.com> | 2009-12-04 22:13:22 +0300 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2009-12-04 22:13:22 +0300 |
commit | c7c1fda642b3cea1ec022123921e1ee06c9b2acb (patch) | |
tree | d8479e194f91d8b0a5c717406ea0697821fcdb79 /release | |
parent | 56b0880d2f66ae77e34c7ac518758ea13792056f (diff) |
Changes to netrender baking operator.
Force step of 1 for full baking.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/io/netrender/operators.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/release/scripts/io/netrender/operators.py b/release/scripts/io/netrender/operators.py index 84a00970018..4d5b752e42a 100644 --- a/release/scripts/io/netrender/operators.py +++ b/release/scripts/io/netrender/operators.py @@ -43,33 +43,42 @@ class RENDER_OT_netslave_bake(bpy.types.Operator): path, name = os.path.split(filename) root, ext = os.path.splitext(name) default_path = path + os.sep + "blendcache_" + root + os.sep # need an API call for that + relative_path = os.sep + os.sep + "blendcache_" + root + os.sep # Force all point cache next to the blend file for object in bpy.data.objects: for modifier in object.modifiers: if modifier.type == 'FLUID_SIMULATION' and modifier.settings.type == "DOMAIN": - modifier.settings.path = default_path + modifier.settings.path = relative_path bpy.ops.fluid.bake({"active_object": object, "scene": scene}) elif modifier.type == "CLOTH": + modifier.point_cache.step = 1 modifier.point_cache.disk_cache = True modifier.point_cache.external = False elif modifier.type == "SOFT_BODY": + modifier.point_cache.step = 1 modifier.point_cache.disk_cache = True modifier.point_cache.external = False elif modifier.type == "SMOKE" and modifier.smoke_type == "TYPE_DOMAIN": + modifier.domain_settings.point_cache_low.step = 1 modifier.domain_settings.point_cache_low.disk_cache = True modifier.domain_settings.point_cache_low.external = False + modifier.domain_settings.point_cache_high.step = 1 modifier.domain_settings.point_cache_high.disk_cache = True modifier.domain_settings.point_cache_high.external = False # particles modifier are stupid and don't contain data # we have to go through the object property for psys in object.particle_systems: + psys.point_cache.step = 1 psys.point_cache.disk_cache = True psys.point_cache.external = False + psys.point_cache.filepath = relative_path bpy.ops.ptcache.bake_all() + #bpy.ops.wm.save_mainfile(path = path + os.sep + root + "_baked.blend") + return ('FINISHED',) def invoke(self, context, event): |