I am just looking for a set-up for development purposes such that being able to avoid Blender’s refreshing deficiences… I need this cause I have a script of 4,500 rows of code, about 1,500 are repeated or info code (different versions of procs, etc.) and about 2,000 rows of the remaining 3,000 are dedicated for interface(s). It is suitable then to move those interfaces code somewhere out --> in a module… So that I deal more easy with my essential code which is now about 1,000 rows, ok? So far the code is working pretty well but it covers only 1/2 or 1/3 of what I have in mind… soooo… I expect some 6,000 rows of code all-together… You can now imagine that it is NOT very good for development to constantly scroll up-down this text to find the right place for a new variable… So I have this divided by moving some code in a module. The problem is that NOW I need to modify 2-3 procedures and apparently, add some more procs to the same module… To do this, I’d need to move back the procs I am interested in BUT this will lead to moving almost 3/4 of the code due to interrelations… Plus this I’d need to re-organise the code moved back in the main script to refer to the module with other interface procs/variables. After developing required procs, I need to move this code to the module and, of course, re-work the references again… This becomes a really great transformation… Sooo… I am looking for alternative…
I though upon another type of organising the things… For example, if you have in the main script and the Module_1 the following procedures:
Main script:
import Module_1
def Test():
Module_1.Proc_A()
Module_1.Proc_B()
Module_1
def Proc_A():
print "A1"
def Proc_B():
print "B2"
the output will be:
A1
B2
Now I want to change my Proc_B from Module_1 to print “B3”… If I do that in the module itself, Blender wont reflect the change until I close it down and re-start it and then run the main script (which resides in the .blend file). Then and only then, I will have output like this:
A1
B3
So I was thinking if I make the Proc_B to refer to a procedure placed in another module (which will be helpful to concentrate only on THIS specific proc) and change ONLY the new module, this may work… Therefore, I modify my Module_1 like this:
import Module_2
def Proc_A():
print "A1"
def Proc_B():
# print "B2"
Module_2.Proc_B()
and I dont need to change anything in the main script but I need a new module Module_2 containing:
def Proc_B():
print "B3"
The idea NOW is to change (and compile) only Module_2 which will be relatively easy for developement purposes and after finishing this to just move the Proc_B from Module_2 to Module_1… But this tactics is also NOT working due to the same refreshing deficiences of Blender!!! :mad: