Notifications
Clear all

[Closed] Help modifying the script "Batch Preview Renderer" – adding vrProxy support

I am modifying the script “Batch Preview Renderer” by talented Gusztus Zsombor ( https://g2zs.cgsociety.org/ ).

Please see the attached file.batch_preview_renderer0_56.mcr (8.6 KB) – please see the ELSE IF statement on row 141.

UI-wise, everything seems fine. It even succeed to import with this: VRayProxy filename:
But the following render process never starts. What am I missing?

4 Replies

Some update and clarification to this.

the problem appears only to affect solely this part

VRayProxy filename: f

It is like it is expecting something else from me.
it does import the proxy mesh, but nothing else happens. If I comment out that line, the script doesnt halt.

Now I know the reason of the problem, but not the solution

If I run this

f = "file.obj"
try
( 
importFile f #noPrompt
)
catch()

I get true

If I run this

f = "file.vrmesh"
try
( 
VRayProxy filename: f
)
catch()

I get nothing, or at least not the “true” I need.

How can this be solved?
If you dont know the “proper” way to have VrayProxy filename result in a true then could you please just give me the tiniest dummy-code that could result in a true?

1 Reply
(@serejah)
Joined: 11 months ago

Posts: 0

importFile is a mxs function and VRayProxy is a third-party geometry class. You can’t expect true as a result of scene node creation. (That’s exactly what happens when you call VrayProxy() )
It is up to you to decide what’s the criteria for VrayProxy to return true

(
	isValidNode (VRayProxy isSelected:true)
)

thank you for your feedback. Pointing out mxs function vs third-party geometry class got me focus on their different behaviours.
All I had to do was to select the imported proxy: selectmore (VRayProxy filename: f)

Apparently, when importing with the mxs functions, the objects got selected automatically, but not when importing a VRayProxy. The script halted because of a tiny delete $ that expected a selected object.