[Durian-svn] [2111] adjusted to work if sintel isnt in the scene
campbell
institute at blender.org
Fri Apr 16 11:54:32 CEST 2010
Revision: 2111
https://blenderinstitute.dyndns.org/durian-svn/?do=log&project=durian&path=/&rev=2111
Author: campbell
Date: 2010-04-16 11:54:29 +0200 (Fri, 16 Apr 2010)
Log Message:
-----------
adjusted to work if sintel isnt in the scene
Modified Paths:
--------------
pro/scripts/modules/finals_config.py
Modified: pro/scripts/modules/finals_config.py
===================================================================
--- pro/scripts/modules/finals_config.py 2010-04-16 09:27:11 UTC (rev 2110)
+++ pro/scripts/modules/finals_config.py 2010-04-16 09:54:29 UTC (rev 2111)
@@ -2,30 +2,40 @@
import os
def setup():
- base_name = os.path.splitext(os.path.split(bpy.data.filename)[-1])[0]
- if base_name.endswith("_comp"):
- base_name = base_name[:-len("_comp")]
- frame_start = bpy.context.scene.frame_start
- frame_end = bpy.context.scene.frame_start
+ base_name = os.path.splitext(os.path.split(bpy.data.filename)[-1])[0]
+ if base_name.endswith("_comp"):
+ base_name = base_name[:-len("_comp")]
- bpy.data.objects['GEO-hair_emitter'].particle_systems[0].point_cache.frame_start = frame_start
- bpy.data.objects['GEO-hair_emitter'].particle_systems[0].point_cache.frame_end = frame_end
- bpy.data.objects['GEO-hair_emitter'].particle_systems[0].point_cache.step = 1
- bpy.data.objects['GEO-hair_emitter'].particle_systems[0].point_cache.disk_cache = True
- bpy.data.objects['GEO-hair_emitter'].particle_systems[0].point_cache.name = "sintel_hair_" + base_name
- bpy.data.objects['GEO-hair_emitter'].particle_systems[0].hair_dynamics = True
+ frame_start = bpy.context.scene.frame_start
+ frame_end = bpy.context.scene.frame_start
+
+ # Sintel
+ obj = bpy.data.objects.get("GEO-hair_emitter")
- bpy.data.objects['GEO-hair_emitter'].particle_systems[0].cloth.settings.pin_stiffness = 0.4
- bpy.data.objects['GEO-hair_emitter'].particle_systems[0].cloth.settings.quality = 50
+ if obj:
+ print("finals_config.py: configuring sintel's hair")
- bpy.data.objects['GEO-hair_emitter'].particle_systems[0].settings.child_nbr = 40
- bpy.data.objects['GEO-hair_emitter'].particle_systems[0].settings.draw_step = 4
- bpy.data.objects['GEO-hair_emitter'].particle_systems[0].settings.mass = 0.05 # was 0.01
+ # change per scene
+ obj.particle_systems[0].point_cache.frame_start = frame_start
+ obj.particle_systems[0].point_cache.frame_end = frame_end
+ obj.particle_systems[0].point_cache.name = "sintel_hair_" + base_name
- '''
- bpy.data.objects['GEO-hair_emitter'].particle_systems[0].settings.mass = 0.0
- bpy.data.objects['GEO-hair_emitter'].particle_systems[0].settings.keyframe_insert("mass", -1, 1)
- bpy.data.objects['GEO-hair_emitter'].particle_systems[0].settings.mass = 10.0
- bpy.data.objects['GEO-hair_emitter'].particle_systems[0].settings.keyframe_insert("mass", -1, 40)
- '''
+ # static settings
+ obj.particle_systems[0].point_cache.step = 1
+ obj.particle_systems[0].point_cache.disk_cache = True
+ obj.particle_systems[0].hair_dynamics = True
+
+ obj.particle_systems[0].cloth.settings.pin_stiffness = 0.4
+ obj.particle_systems[0].cloth.settings.quality = 50
+
+ obj.particle_systems[0].settings.child_nbr = 40
+ obj.particle_systems[0].settings.draw_step = 4
+ obj.particle_systems[0].settings.mass = 0.05 # was 0.01
+
+ '''
+ obj.particle_systems[0].settings.mass = 0.0
+ obj.particle_systems[0].settings.keyframe_insert("mass", -1, 1)
+ obj.particle_systems[0].settings.mass = 10.0
+ obj.particle_systems[0].settings.keyframe_insert("mass", -1, 40)
+ '''
More information about the Durian-svn
mailing list