Author Topic: [RESOLVED] Who can embedd a lux.openfile() function in my script?  (Read 3079 times)

0 Members and 1 Guest are viewing this topic.

Offline Marc


Unfortunetly I don't have more time left to try it on my own to get it to work, so maybe someone has the time to bring this back to work.

The script is based on the "batch rendering script" from DriesV. Instead of step files it's working with bio files and it should open multiple BIP scenes from a folder and unfortunately this isn't working right now.
I explained everything in my post here:

The script is working on an already open scene (assigning material presets and rendering multiple cameras out) but it's not working on multiple scenes in a folder because of the missing lux.openfile definition().
I guess to define the lux.openfile() function is not much, but I'm not able to see WHAT I'm doing wrong. Maye someone is out there who can fix this.
If someone is interested please tell me a price and we can set something up (Paypal....).

The script is attached!

« Last Edit: July 31, 2019, 03:50:59 am by Marc »

Offline jbeau

I have it working with your material templates if "Currently used" is not selected as an option. Is that what you want? Do you also want All Render layers or renderpasses? I can get all passes working or specific ones.
« Last Edit: July 30, 2019, 01:01:21 am by jbeau »

Offline Marc

Hi jbeau,

I've had a long (amateur) scripting night and have made also progress. I've combined the "render images" script with my script but now I'm struggling to get the Material presets working.

That you have a working script now sounds great. "currently used" lighting presets did produce problems when I tried to start the script with an empty scene and is not important. This can be changed to "As saved in scene" or another template (product or jewelry). render layers or passes is of no use in the moment for me, so this part could be deleted. But render layers was working anyway. Also the material templates have been working before but just with the already opened file.
The only one thing was the undefined "lux.openfile() function which is bugging me.

If it's now possible to start the script in an empty scene and let it rip through multiple bip files in a folder you solved the puzzle.
How much would you like to get paid for the corrected script?

« Last Edit: July 30, 2019, 01:15:55 am by Marc »

Offline jbeau

Hi Marc,

The script is building some sceneInfo data and is expecting a bip file to be open from the folder you are processing. When you have a fresh scene(untitled file), its tosses an error because it doesn't know where to pull the sceneInfo data since the file hasn't been saved yet. Long story short, I could probably correct this but I'm not exactly sure how long that will take. Shouldn't be a show stopper, and I recommend just opening a bip from the folder that is being process and you'll be good to go. No biggy.
Does that work for you?

On a side note, I got custom renderpasses working. Works great if you need mattes, AO, etc. Not sure if you are interested in those...
Check your inbox. I'll be bouncing around all day tomorrow at work, so I won't be able to jump on this until the evening. I'm in California so PST applies:)

Offline Marc

Hi J,

Thank you for the explanation. That makes sense. I'm learning alot here.

Yes, Bip files are the way to go. No strange 3d formats or CAD files have to be imported or opened just BIPs.

If I've understand you correctly the script is working now, when a file is already open and it's batch processing the assigned BIP folder. It's just the sceneinfo which makes problems when we try to start on an empty scene. I could live with that.

The renderpasses feature sounds awesome. No use right now for it but  when you've got it already running...hey...:)....why not! Great work, man!

But you have to decide if you want to embedd it. The most important feature is the lux.openfile() function because of which I've already had bad dreams. This is the time where I really think hard about taking up a coding class.
Could you tell me if it's possible for you to keep the time required to do the scripting between 1-1.5 hrs.


ps: Greetings to California! How's the weather? ;) We have summer and it's just 75°F outside.
« Last Edit: July 30, 2019, 08:24:35 am by Marc »