LF GUI Script Problems on New Comp


(BgDM) #1

OK, eeshlo, I need your help here.

I have set up my new comp to run the GUI on the export script for LF. I can run all the python files that come with Lightflow. However, when I try to run a file that I have exported from Blender, it does nothing. LF strats up and the console window disappears before I can see what the error was.

How do I get the display to stay up so I can post the error for you to see? What might be causing this problem. I do not understand why the LF example files render fine, but no the exported files.

BgDM


(eeshlo) #2

It sounds like Lightflow still uses python, you didn’t install python1.5 by any chance? You should know you don’t need that anymore.
Anyway, to see the error messages try this, in the start menu there should be something like a python->‘Python (Command line)’ option or you could also use IDLE, then just type:


execfile(filename)

‘filename’ should be the full path to one of the exported files, also remember to either use double backslashes or single forward slashes, so something like:


execfile('c:/LFexport/test/test_0001.py')

or:


execfile('c:\\LFexport\	est\	est_0001.py')


(BgDM) #3

OK, I have fixed my first problem, (stupid me forgot to edit my old python files for the new directories).

Now I have a new problem. I can not get the export to work now. I get the following error in the console:

Traceback (most recent call last):
File “LFRENDER_GUI.py”, Line 5351, in main_bevent
def main_bevent(evt):
AttributeError: Const

Any help on this eeshlo? I also just reinstalled the export script, version W that you posted on Nov. 10/02. All LF files render perfectly fine, so I know that LF is running OK. Also MATSpider renders perfectly fine. I just can not export right now.

BgDM


(eeshlo) #4

Another of one of those seemingly inexplicable problems… :-?
You are not using some ‘custom’ blender version or something?
For some reason the Const dictionary of the Blender module is not recognized it seems, very strange.

Cut&paste this, and load and run in Blender:


import Blender

md = Blender.Window
atr = dir(md)
print atr
if 'Const' in atr:
	print dir(md.Const)
else:
	print "^%@^$# No Const dictionary???"

Of course, that last bit is not essential to the code… but anyway, tell me what you get (all output) in the console after running this.


(BgDM) #5

Nope, no custom version of Blender. Publisher from Blender.org.

Here is the results of that little python run:

[‘QRedrawAll’, ‘Redraw’, ‘RedrawAll’, ‘Types’, ‘doc’, ‘name’, ‘draw_progressbar’]

If by some wierd chance this will not run on my new comp, don’t worry about it. You did mention that it may not work for everyone. I’ll just wait for you to get YAFRay done and working for Blender! :wink:

BgDM


(eeshlo) #6

Well, although the script basically works in Publisher, Publisher has a lot of problems, that makes the script very hard to use, the main being that it doesn’t refresh the screen when asked to. So 2.23 is still the best choice.
In any case, this particular problem is quite strange, I don’t get any such errors in Publisher, my output looks like this:

[‘Const’, ‘QRedrawAll’, ‘Redraw’, ‘RedrawAll’, ‘Types’, ‘_Window’, ‘builtins’, ‘doc’, ‘file’, ‘name’, ‘drawProgressBar’, ‘draw_progressbar’]

so the Const dictionary as well as some other functions seem to be missing in your publisher version, weird…


(theeth) #7

it seems to be a problem with the Blender.org version and subsequent compilations, since all of those don’t seem to have the Const dictionnary in the Window module. But since they are contants, a fix would be to code it directly in the script, adding something like:


Const = {'BUTS': 4, 'NLA': 13, 'ACTION': 12, 'FILE': 5, 'OOPS': 3, 'SOUND': 11, 'IPO': 2
, 'IMASEL': 10, 'IMAGE': 6, 'TEXT': 9, 'SEQ': 8, 'VIEW3D': 1, 'INFO': 7}

Martin


(eeshlo) #8

Of course I have thought of that, but like I said, the other problems are still there (probably), like the screen refresh problem.
Besides that, I wasn’t aware that newly compiled versions were being put up on blender.org, I thought it was the same PB as the one that was made available to foundation members, which is the one I have…

edit: but not important really, I just noticed that Blender.Window.Types can be used as well, which has the same constants, but defined slightly differently.


(BgDM) #9

Well, I just installed it into 2.23 and all is fine. This is indeed very wierd.

Thanks for the help eeshlo.

BgDM


(theeth) #10

I was talking about the custom builts, NikolaTesla’s first compilation and another one which I don’t know where it came from. Both of these don’t have the Const variable while the one I use regularly (not the Blender.org version, but an NAN release nonetheless) has it.

Martin


(BgDM) #11

My Publisher version is the NAN release that was posted on Blender.org. It is not a compiled version, (i.e. nicolatesla’s, or other). LF did work on my last computer, but not on this one with the same version of Publisher.

It is working beautifully in 2.23 now.

BgDM