ParseLXS using Python[solved]

Discussion related to the LuxCore functionality, implementations and API.
Post Reply
User avatar
nigec
Posts: 141
Joined: Mon Mar 11, 2019 8:50 am

ParseLXS using Python[solved]

Post by nigec »

I've been having problems getting ParseLXS to work in python, rather than ask for helped I kept trying without success, so I looked at the console in pyluxcoretool.zip which appears to support lxs files but this doesn't appear to work either and this is the error I get.

Code: Select all

[C:\Users\nige\Desktop\New folder\luxcorerender-latest-win64-opencl\luxcorerender-latest-win64-opencl>pyluxcoretool.exe console -d "preview/" "preview.blend.lxs"
[MainThread][2019-04-08 09:49:52,797] LuxCore 2.2alpha1
[MainThread][2019-04-08 09:49:52,797] Parsing LuxRender SDL file...
Traceback (most recent call last):
  File "pyluxcoretool.py", line 60, in <module>
  File "C:\Users\nige\AppData\Local\Temp\_MEI108762\pyluxcoretools.zip\pyluxcoretools\pyluxcoreconsole\cmd.py", line 170, in main
  File "C:\Users\nige\AppData\Local\Temp\_MEI108762\pyluxcoretools.zip\pyluxcoretools\pyluxcoreconsole\cmd.py", line 117, in LuxCoreConsole
NameError: name 'ParseLXS' is not defined
[12504] Failed to execute script pyluxcoretool/code]
Last edited by nigec on Thu Apr 11, 2019 3:41 pm, edited 1 time in total.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: ParseLXS using Python

Post by Dade »

The pyluxcoretools code was wrong (i.e. never tested), I should have fixed the problem: https://github.com/LuxCoreRender/LuxCor ... 152aaa0611
Support LuxCoreRender project with salts and bounties
User avatar
nigec
Posts: 141
Joined: Mon Mar 11, 2019 8:50 am

Re: ParseLXS using Python

Post by nigec »

I fixed the py file but there is still strange things happening, once the configuration loads for some reason it then looks for the luxball scene:

Code: Select all

C:\Users\nige\Desktop\New folder\luxcorerender-latest-win64-opencl\luxcorerender-latest-win64-opencl>python pyluxcoretools.zip console -d "C:\Users\nige\Desktop\andrew" "preview.lxs"
[MainThread][2019-04-09 19:51:14,508] LuxCore 2.2alpha1
[MainThread][2019-04-09 19:51:14,508] Parsing LuxRender SDL file...
[MainThread][2019-04-09 19:51:14,508] [LuxCore][0.125] Configuration:
[MainThread][2019-04-09 19:51:14,508] [LuxCore][0.125]   opencl.platform.index = -1
[MainThread][2019-04-09 19:51:14,508] [LuxCore][0.125]   opencl.cpu.use = 0
[MainThread][2019-04-09 19:51:14,508] [LuxCore][0.125]   opencl.gpu.use = 1
[MainThread][2019-04-09 19:51:14,508] [LuxCore][0.125]   renderengine.type = "BIDIRCPU"
[MainThread][2019-04-09 19:51:14,508] [LuxCore][0.125]   sampler.type = "METROPOLIS"
[MainThread][2019-04-09 19:51:14,508] [LuxCore][0.125]   film.filter.type = "MITCHELL_SS"
[MainThread][2019-04-09 19:51:14,508] [LuxCore][0.125]   accelerator.instances.enable = 0
[MainThread][2019-04-09 19:51:14,508] [LuxCore][0.125]   sampler.metropolis.maxconsecutivereject = 512
[MainThread][2019-04-09 19:51:14,508] [LuxCore][0.125]   sampler.metropolis.largesteprate = 0.400000006
[MainThread][2019-04-09 19:51:14,508] [LuxCore][0.125]   sampler.metropolis.imagemutationrate = 0.100000001
[MainThread][2019-04-09 19:51:14,508] [LuxCore][0.125]   path.maxdepth = 16
[MainThread][2019-04-09 19:51:14,508] [LuxCore][0.125]   light.maxdepth = 16
[MainThread][2019-04-09 19:51:14,508] [LuxCore][0.125]   film.filter.xwidth = 1
[MainThread][2019-04-09 19:51:14,508] [LuxCore][0.125]   film.filter.ywidth = 1
[MainThread][2019-04-09 19:51:14,508] [LuxCore][0.125]   film.filter.mitchell.B = 0.333333343
[MainThread][2019-04-09 19:51:14,508] [LuxCore][0.125]   film.filter.mitchell.C = 0.333333343
[MainThread][2019-04-09 19:51:14,508] [LuxCore][0.125]   film.width = 140
[MainThread][2019-04-09 19:51:14,508] [LuxCore][0.125]   film.height = 140
[MainThread][2019-04-09 19:51:14,508] [LuxCore][0.125]   film.imagepipeline.0.type = "TONEMAP_AUTOLINEAR"
[MainThread][2019-04-09 19:51:14,508] [LuxCore][0.125]   film.imagepipeline.1.type = "GAMMA_CORRECTION"
[MainThread][2019-04-09 19:51:14,508] [LuxCore][0.125]   film.imagepipeline.1.value = 2.20000005
[MainThread][2019-04-09 19:51:14,508] [LuxCore][0.125] File Name Resolver Configuration:
[MainThread][2019-04-09 19:51:14,508] [LuxCore][0.125]   .
[MainThread][2019-04-09 19:51:14,524] [SDL][0.140] Reading scene: scenes/luxball/luxball.scn
Traceback (most recent call last):
  File "C:\Users\nige\AppData\Local\Programs\Python\Python35\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\nige\AppData\Local\Programs\Python\Python35\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "pyluxcoretools.zip\__main__.py", line 60, in <module>
  File "pyluxcoretools.zip\pyluxcoretools\pyluxcoreconsole\cmd.py", line 173, in main
    """Parse the line into a command name and a string containing
  File "pyluxcoretools.zip\pyluxcoretools\pyluxcoreconsole\cmd.py", line 122, in LuxCoreConsole
    line = self.cmdqueue.pop(0)
RuntimeError: Unable to open properties file: scenes/luxball/luxball.scn

C:\Users\nige\Desktop\New folder\luxcorerender-latest-win64-opencl\luxcorerender-latest-win64-opencl>pause
Press any key to continue . . .
I know you've got problems with the build, I hope you can get it sorted soon..
Its not something nutty that SU2LX is doing, the preview I used the old Blender plugin, both types of lxs fail
Attachments
preview.zip
(23.96 KiB) Downloaded 190 times
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: ParseLXS using Python

Post by Dade »

Support LuxCoreRender project with salts and bounties
User avatar
nigec
Posts: 141
Joined: Mon Mar 11, 2019 8:50 am

Re: ParseLXS using Python

Post by nigec »

great stuff thank you
Post Reply