[Durian-svn] [4528] minor update to baking and path error scripts.
campbell
institute at blender.org
Fri Jun 4 14:54:24 CEST 2010
Revision: 4528
https://blenderinstitute.dyndns.org/durian-svn/?do=log&project=durian&path=/&rev=4528
Author: campbell
Date: 2010-06-04 14:54:23 +0200 (Fri, 04 Jun 2010)
Log Message:
-----------
minor update to baking and path error scripts.
Modified Paths:
--------------
pro/scripts/utilities/batch_bake.py
pro/scripts/utilities/findPathError.py
Modified: pro/scripts/utilities/batch_bake.py
===================================================================
--- pro/scripts/utilities/batch_bake.py 2010-06-04 12:42:34 UTC (rev 4527)
+++ pro/scripts/utilities/batch_bake.py 2010-06-04 12:54:23 UTC (rev 4528)
@@ -24,16 +24,16 @@
BIN = "/shared/bin/blender_farm.sh"
RENDER_DIR = "/shared/sim/%s/" % str(preset)
-GLOBAL_PRE_ROLL = 10 # keep at 40
+GLOBAL_PRE_ROLL = 40 # keep at 40
MULTIPROCESS = False
# what to bake!!
-DO_SINTEL = False
+DO_SINTEL = True
DO_SHAMAN = False
-DO_DRAGON_BABY = True
-DO_DRAGON_ADULT = True
+DO_DRAGON_BABY = False
+DO_DRAGON_ADULT = False
# print("running", __file__)
Modified: pro/scripts/utilities/findPathError.py
===================================================================
--- pro/scripts/utilities/findPathError.py 2010-06-04 12:42:34 UTC (rev 4527)
+++ pro/scripts/utilities/findPathError.py 2010-06-04 12:54:23 UTC (rev 4528)
@@ -67,6 +67,7 @@
return image_dupes
def replace_image(i, base_image):
+ change = 0
for tex in bpy.data.textures:
if tex.library:
continue
@@ -201,18 +202,32 @@
def report_character_locations():
+ from mathutils import Vector
for obj in bpy.data.objects:
if obj.library is None:
if obj.type == 'EMPTY':
+
+ if "knife" in obj.name:
+ continue
+
dupli_group = obj.dupli_group
if dupli_group:
lib = dupli_group.library
- if lib and os.path.basename(lib.filepath).startswith("sintel"):
- if obj.location.length > 0.0001:
- print("ERROR PATH:", 'SINTEL LOCTION:', obj.name, obj.location)
-
+ if lib:
+ basename = os.path.basename(lib.filepath)
+ if basename == "shaman.blend":
+ if obj.location.length > 0.0001 or Vector(obj.rotation_euler).length > 0.0001:
+ print("ERROR PATH:", 'CHARACTER LOCTION:', obj.name, obj.location, obj.rotation_euler)
+ elif basename.startswith("sintel"):
+ if obj.location.length > 0.0001 or Vector(obj.rotation_euler).length > 0.0001:
+ print("ERROR PATH:", 'CHARACTER LOCTION:', obj.name, obj.location, obj.rotation_euler)
+ elif basename == "dragon_baby.blend":
+ if obj.location.length > 0.0001 or Vector(obj.rotation_euler).length > 0.0001:
+ print("ERROR PATH:", 'CHARACTER LOCTION:', obj.name, obj.location, obj.rotation_euler)
+ elif basename == "dragon_adult.blend":
+ if obj.location.length > 0.0001 or Vector(obj.rotation_euler).length > 0.0001:
+ print("ERROR PATH:", 'CHARACTER LOCTION:', obj.name, obj.location, obj.rotation_euler)
-
def relpath(path, start=None):
"""
Returns the path relative to the current blend file using the "//" prefix.
@@ -294,7 +309,7 @@
users -= 1
if users == 0:
- if act.name.startswith("Action"): # <--- durian exception, assume named actions should be kept.
+ if act.name.startswith("Action") or "_cam" in act.name: # <--- durian exception, assume named actions should be kept.
act.user_clear()
clear += 1
@@ -303,12 +318,27 @@
print("Cleared %d of %d actions! (save and reload)" % (clear, tot))
return bool(clear)
+def clear_durian_links():
+ clear = 0
+ tot = 0
+ for obj in bpy.data.objects:
+ lib = obj.library
+ if lib and os.path.dirname(lib.filepath).endswith("chars") and obj.users_scene:
+ print(" removing: %s" % obj.name)
+ obj.user_clear()
+ clear += 1
+ tot += 1
+ print("Cleared %d of %d objects! (save and reload)" % (clear, tot))
+ return bool(clear)
+
+
+
if __name__ == "__main__":
change = 0
report_images()
report_modifiers()
- report_drivers()
+ # report_drivers() # very verbose!
report_zombie_objects()
report_character_locations()
@@ -317,6 +347,7 @@
#change |= clear_images(rem_missing = True)
#change |= merge_duplicates()
#change |= clear_actions()
+ #change |= clear_durian_links()
print("Changing??? ", change)
if change:
More information about the Durian-svn
mailing list