[x3d-public] Blender import/export status.
John Carlson
yottzumm at gmail.com
Sat Oct 23 23:44:51 PDT 2021
Here is a program which presents an overview of bpy.data:
####################################################
import bpy
# export data API from bpy
def recurse(obj, prefix):
#print(type(obj))
#print(obj.__class__.__name__)
for d in dir(obj):
if not d.startswith("__"):
print(prefix+"."+d)
if not d.startswith("__") and not d in ["_bpy", "_os",
"depsgraph", "owner", "denominator", "imag", "numerator", "real",
"bl_rna", "rna_type", "original"] and not d.startswith("xx") and not
d.startswith("yy") and not d.startswith("zz") and not d.startswith("xy")
and not d.startswith("xz") and not d.startswith("yx") and not
d.startswith("yz") and not d.startswith("zx") and not d.startswith("zy"):
try:
recurse(eval(prefix+"."+d), prefix+"."+d)
except AttributeError:
pass
recurse(bpy.data, "bpy.data")
#####################################################################
I'm hoping that this, in addition to documentation can lead to a good
path to follow. I already see that there's some cleanup of the program
to do.
Save and run "export.py" as I call it, with the command:
blender --background --python export.py
Please report any problems you see.
John
More information about the x3d-public
mailing list