[Durian-svn] [2946] report driver errors
campbell
institute at blender.org
Thu May 6 09:57:59 CEST 2010
Revision: 2946
https://blenderinstitute.dyndns.org/durian-svn/?do=log&project=durian&path=/&rev=2946
Author: campbell
Date: 2010-05-06 09:57:59 +0200 (Thu, 06 May 2010)
Log Message:
-----------
report driver errors
Modified Paths:
--------------
pro/scripts/utilities/findPathError.py
Modified: pro/scripts/utilities/findPathError.py
===================================================================
--- pro/scripts/utilities/findPathError.py 2010-05-05 19:54:38 UTC (rev 2945)
+++ pro/scripts/utilities/findPathError.py 2010-05-06 07:57:59 UTC (rev 2946)
@@ -153,6 +153,41 @@
if not exists(filename_abs):
print("ERROR PATH:", obj.name, filename, 'ABS:', filename_abs, "(OBJECT MODIFIER)")
+def report_drivers():
+ for attr in dir(bpy.data):
+ db = getattr(bpy.data, attr, None)
+ try:
+ db_ls = db.values()
+ except:
+ continue
+
+ for id_data in db_ls:
+ if id_data.library:
+ continue
+
+ anim = getattr(id_data, "animation_data", None)
+
+ if anim:
+ for fcu in anim.drivers:
+ for var in fcu.driver.variables:
+ for tar in var.targets:
+ id_tar = tar.id
+ data_path = tar.data_path
+ # print(id_tar, data_path)
+ if id_tar:
+ #test = id_tar.path_resolve(data_path)
+ #print(test)
+ if not data_path.startswith("["):
+ data_path = "." + data_path
+
+ try:
+ myvar = eval("id_tar" + data_path)
+ except:
+ print("ERROR PATH:", 'ID:', id_data, "ID_TARGET:", id_tar, "DATA:", data_path, "(OBJECT DRIVER)")
+
+
+
+
def relpath(path, start=None):
"""
Returns the path relative to the current blend file using the "//" prefix.
@@ -217,6 +252,7 @@
change = 0
report_images()
report_modifiers()
+ report_drivers()
# optional, take care!
change |= make_relative()
More information about the Durian-svn
mailing list