0
$\begingroup$

I've made around 30 python scripts using the built in blender python editor.

I need to compare changes to the scripts with a different version of the scripts.

Is there anyway I can find the individual python files in windows file explorer?

The only other alternative I see is copy and pasting all the python scripts out of blender into their own files.

Thanks :D

$\endgroup$
2
$\begingroup$

Here is my temporary solution, I export all of the python files by running this script...I have a bad feeling this could be done much easier

import bpy
import os

numtexts = len(bpy.data.texts)
texts = bpy.data.texts

for i in range(0,numtexts):
    f = open(os.path.normpath("scripts/"+texts[i].name),'w')
    numLines = len(texts[i].lines)
    for j in range(0,numLines):
        f.write(texts[i].lines[j].body)
        f.write("\n")
    f.close()   
|improve this answer|||||
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.