| Jamesk wrote: |
| Just recently we've been told that the fileformat is essentially a form of memorydump, and there is currently no way to turn it into a more understandable format. Your best bet is to use a python script to dump the internals to a fairly readable ASCII-file using eeshlo's BF2PY script, which you can get here: http://mysite.iptic.com/eeshlo/BF2PY.zip
Since it depends on the Python API of Blender, you cannot expect to get all the info - only classes supported by the API. I'm pretty sure that it will not work on Blender 2.25, but it will most certainly do with 2.23. [please someone correct me if I'm wrong here] |
| Code: |
|
# BFReader simple example script to print information about a material import Blender from BFREAD import * # Analyse the last loaded or saved blendfile filename = Blender.Get('filename') # read it in bf = BFReader(filename) # get the data, we are not interested in the raw output here bf.getData(['Material', 'MTex', 'Tex', 'Image']) # and convert to python... FBlenderM = bf.convert2Python() print "Raw Data was converted to %d class instances" % len(FBlenderM.Clist) # Print out some info about all materials found in the file, like Material texture & image names for mt in FBlenderM.getMaterial(): print "\n",mt print "Material %s uses %d textures\n" % (mt.id.name, len(mt.mtex)) for mtex in mt.mtex: if mtex: texture = mtex.tex print "Texture name: ", texture.id.name image = texture.ima if image: print "Texture uses image:" print "Image name: ", image.id.name print "Image path: ", image.name else: print "No image" print "That's it..." |
| Code: |
|
['B', 'G', 'R', '_object', 'alpha', 'amb', 'assignIpo', 'clrIpo', 'emit', 'haloS ize', 'hard', 'ipo', 'mirB', 'mirG', 'mirR', 'mode', 'ref', 'spec', 'specB', 'sp ecG', 'specR', 'specTransp'] |
| Code: |
|
[Material MAMaterial.001] ['add', 'address', 'alpha', 'amb', 'ambb', 'ambg', 'ambr', 'ang', 'b', 'colormod el', 'dynamode', 'emit', 'fh', 'fhdist', 'flareboost', 'flarec', 'flaresize', 'f riction', 'g', 'har', 'hasize', 'id', 'ipo', 'kfac', 'lay', 'linec', 'mapto', 'm irb', 'mirg', 'mirr', 'mode', 'mode2', 'mtex', 'name', 'pad', 'pad1', 'pr_back', 'pr_lamp', 'pr_type', 'r', 'ref', 'reflect', 'ren', 'rgbsel', 'ringc', 'scriptl ink', 'seed1', 'seed2', 'septex', 'spec', 'specb', 'specg', 'specr', 'spectra', 'starc', 'subsize', 'texact', 'texco', 'xyfrict', 'zoffs'] |
| Code: |
|
[Bone IK_foot.L] address = 0x00e1c13c childbase = [ListBase 0s000578c4] defmat = [[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0 .0, 0.0, 0.0, 1.0]] dist = 1.0 dloc = [0.0, 0.0, 0.0] dquat = [0.0, 0.0, 0.0, 0.0] dsize = [0.0, 0.0, 0.0] flag = 32 head = [2.1754440000000002, -4.9990230000000002, -1.405597] id = None irestmat = [[0.25883499999999998, 0.86133599999999999, -0.43715399999999999, 0 .0], [-0.86133599999999999, 0.00099299999999999996, -0.50803399999999999, 0.0], [-0.43715399999999999, 0.50803399999999999, 0.74215699999999996, 0.0], [-5.48338 50000000002, -1.1547369999999999, -0.54549499999999995, 1.0]] loc = [0.0, 0.0, 0.0] name = IK_foot.L next = None obmat = [[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0. 0, 0.0, 0.0, 1.0]] parent = None parmat = [[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0 .0, 0.0, 0.0, 1.0]] posemat = [[0.25883499999999998, -0.86133599999999999, -0.43715399999999999, 0 .0], [0.86133599999999999, 0.00099299999999999996, 0.50803399999999999, 0.0], [- 0.43715399999999999, -0.50803399999999999, 0.74215699999999996, 0.0], [2.1754440 000000002, -4.9990230000000002, -1.405597, 1.0]] prev = [Bone Toes.L] quat = [1.0, 0.0, 0.0, 0.0] roll = 0.0 size = [1.0, 1.0, 1.0] tail = [3.5645259999999999, -4.9974220000000003, -0.586287] weight = 1.0 |