0
$\begingroup$

I find this custom driver on templates / python / driver_functions and I did it run.

But I realize that always I close and reopen the file, it need to be compiled and updated in the driver.

I try this but it doesn't compile in the open file and also I don't know how to update all dependencies after

import bpy
import os
import sys
   
if __name__ == "__main__":
    path = "F:/fILES/proyectos/bpy_study/Scripts" 
    fname01 = "driver_functions.py"
       
    if path not in sys.path:
        sys.path.append(path)

    file01 = os.path.join(path, fname01)

    exec(compile(open(file01).read(), fname01, 'exec'))

enter image description here

$\endgroup$

2 Answers 2

2
$\begingroup$

It was easy to do, just turn on the checkbox register in Menu/ Text/ Register and the next time to open blender it is run automatically enter image description here

$\endgroup$
-1
$\begingroup$

here's how I update dependencies.

obj.hide_render = obj.hide_render
$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .