[Durian-svn] [4223] script to fix animatic paths and report references to shared.

campbell institute at blender.org
Tue Jun 1 14:11:32 CEST 2010


Revision: 4223
          https://blenderinstitute.dyndns.org/durian-svn/?do=log&project=durian&path=/&rev=4223
Author:   campbell
Date:     2010-06-01 14:11:32 +0200 (Tue, 01 Jun 2010)
Log Message:
-----------
script to fix animatic paths and report references to shared.

Added Paths:
-----------
    pro/scripts/utilities/sequencer_path_fix.py

Added: pro/scripts/utilities/sequencer_path_fix.py
===================================================================
--- pro/scripts/utilities/sequencer_path_fix.py	                        (rev 0)
+++ pro/scripts/utilities/sequencer_path_fix.py	2010-06-01 12:11:32 UTC (rev 4223)
@@ -0,0 +1,31 @@
+import bpy
+print("\n\n")
+
+for s in bpy.context.scene.sequence_editor.sequences_all:
+    if s.type == 'SOUND':
+        attr = "filepath"
+    elif s.type == 'IMAGE':
+        attr = "directory"
+    elif s.type == 'MOVIE':
+        attr = "filepath"
+    else:
+        continue
+
+    path = getattr(s, attr)
+    
+    path_new = path
+
+    path_new = path_new.replace("//../../media/data/durian/ani/", "//")
+    path_new = path_new.replace("//../../media/data/durian-audio/", "//../../da/")
+
+
+    if path_new.startswith("//..") and not path_new.startswith("//../../da/"):
+        print("Path Error Relative:", path)
+    if not path_new.startswith("//"):
+        print("Path Error Absolute:", path)
+    if "/shared/" in path_new:
+        print("Path Shared:", path)
+
+    if path != path_new:
+        print("Replacing:", path, path_new)
+        setattr(s, attr, path_new)



More information about the Durian-svn mailing list