[Durian-svn] [2652] addition of baby dragon baking functions
campbell
institute at blender.org
Thu Apr 29 18:48:20 CEST 2010
Revision: 2652
https://blenderinstitute.dyndns.org/durian-svn/?do=log&project=durian&path=/&rev=2652
Author: campbell
Date: 2010-04-29 18:48:19 +0200 (Thu, 29 Apr 2010)
Log Message:
-----------
addition of baby dragon baking functions
Modified Paths:
--------------
pro/scripts/modules/finals_config.py
Modified: pro/scripts/modules/finals_config.py
===================================================================
--- pro/scripts/modules/finals_config.py 2010-04-29 16:29:53 UTC (rev 2651)
+++ pro/scripts/modules/finals_config.py 2010-04-29 16:48:19 UTC (rev 2652)
@@ -41,7 +41,22 @@
point_cache.step = 1
point_cache.disk_cache = True
+ def pointcache_generic_bake(point_cache):
+ if baked:
+ point_cache.external = True
+ point_cache.filepath = os.path.join(base_dir, point_cache.name)
+ print("finals_config.py: configuring '%s'" % point_cache.name)
+ else:
+ if point_cache.external:
+ point_cache.external = False
+
+ cache_path_from, cache_path_to = pointcache_dirs(point_cache)
+ print("finals_config.py: configuring :: Needs Baking'%s'" % point_cache.name)
+ print(" mkdir '%s'" % (os.path.dirname(cache_path_to)))
+ print(" mv %s/%s* %s/" % (cache_path_from, point_cache.name, os.path.dirname(cache_path_to)))
+
+
base_dir, base_name = os.path.split(bpy.data.filename)
base_name = os.path.splitext(base_name)[0]
@@ -65,16 +80,9 @@
psys = obj.particle_systems["sintel_hair"]
# change per scene
pointcache_generic_setup(psys.point_cache, frame_start, frame_end)
-
psys.point_cache.name = "sintel_hair_" + base_name
+ pointcache_generic_bake(psys.point_cache)
- if baked:
- psys.point_cache.external = True
- psys.point_cache.filepath = os.path.join(base_dir, psys.point_cache.name)
- else:
- if psys.point_cache.external:
- psys.point_cache.external = False
-
# static settings
psys.hair_dynamics = sim
@@ -114,20 +122,14 @@
psys.cloth.settings.quality = 30
psys.point_cache.step = 5
- elif base_name.startswith("02_h"):
- psys.cloth.settings.pin_stiffness = 0.5
- psys.cloth.settings.mass = 0.01 # was 0.01
- psys.cloth.settings.bending_stiffness = 6
+ elif base_name.startswith("02.h"):
+ psys.cloth.settings.pin_stiffness = 0.9
+ psys.cloth.settings.quality = 15
+ psys.cloth.settings.bending_stiffness = 150.0
+ psys.cloth.settings.spring_damping = 50.0
+ psys.cloth.settings.air_damping = 3.0
+ psys.cloth.settings.mass = 0.1 # was 0.01
- psys.cloth.settings.internal_friction = 0.985
- psys.cloth.settings.collider_friction = 0.993
-
- psys.cloth.settings.spring_damping = 36.0
- psys.cloth.settings.air_damping = 2
-
- psys.cloth.settings.quality = 30
- psys.point_cache.step = 5
-
elif base_name.startswith("04.1b"):
psys.cloth.settings.pin_stiffness = 0.4
psys.cloth.settings.quality = 15
@@ -169,16 +171,7 @@
psys.cloth.settings.air_damping = 2.0
psys.cloth.settings.mass = 0.01
- if not baked:
- cache_path_from, cache_path_to = pointcache_dirs(psys.point_cache)
- print("finals_config.py: configuring sintel's haicloth=False, r, (NEEDS BACKING)")
- print(" mkdir '%s'" % (os.path.dirname(cache_path_to)))
- print(" mv %s/* %s/" % (cache_path_from, os.path.dirname(cache_path_to)))
-
- else:
- print("finals_config.py: configuring sintel's hair")
-
'''
psys.settings.mass = 0.0
psys.settings.keyframe_insert("mass", -1, 1)
@@ -236,9 +229,12 @@
for obj in [obj for obj_name, obj in object_items if obj_name == "GEO-wing_sim"]:
mod = obj.modifiers["Cloth"]
pointcache_generic_setup(mod.point_cache, frame_start, frame_end)
-
+ mod.point_cache.name = "dragon_baby_" + base_name
+ pointcache_generic_bake(mod.point_cache)
+
# Per-blend dragon baby stuff...
- if base_name.startswith("3.4b"):
+ if base_name.startswith("03.4b"):
mod.point_cache.frame_start = frame_start - 1
+
More information about the Durian-svn
mailing list