Chaos Corona Forum
Chaos Corona for 3ds Max => [Max] Feature Requests => [Max] Resolved Feature Requests => Topic started by: rfletchr on 2015-10-20, 15:10:03
-
I need to be able to check the class of the current rendering engine in order to do "Sanity"/Pre render tests before Scenes are submitted to our render farm.
Usually i do something like this
cRenderer = classof Renderers.Current
if(classof cRender == mental_ray_renderer) then
(
--do shit
)
for renderers like mental ray / scanline this returns a consistent result regardless of the version of the renderer
mental_ray_renderer
Default_Scanline_Renderer
When i do this in corona:
Corona_1_1_1
Corona_1_2_1
so in order to check if this is infact corona i need to start doing string comparisons. Not the end of the world but its extra code and more room for errors.
sRenderer = (classof Renderers.Current) as string
if(matchPattern sRenderer pattern:"*Corona*") then
(
--Do shit
)
It would be alot cleaner if the RenderClass's name was simple "Corona_Renderer" and it had public property that exposed the current version.
-
This is so the version is displayed in renderers list/render settings header. It seems these two strings are coupled in 3dsmax and cannot be changed separately.
Can you check category, internal name, or class ID? I am not maxscript user so I am not sure if it can be done. Internal name is always "CoronaRenderer", category is always "Corona", and Class ID is always 0x62a85dcc, 0x523c3604
-
First of all, you can also do this:
classof renderers.current == CoronaRenderer
"classof" prints the long name but is comparing the same classes, so it's working.
plus, you can use
CoronaRenderer.getCoronaVersion()
which returns a string like that:
"1.3 DailyBuild Oct 5 2015, build timestamp: Oct 5 2015 21:22:28"
-
First of all, you can also do this:
classof renderers.current == CoronaRenderer
"classof" prints the long name but is comparing the same classes, so it's working.
plus, you can use
CoronaRenderer.getCoronaVersion()
which returns a string like that:
"1.3 DailyBuild Oct 5 2015, build timestamp: Oct 5 2015 21:22:28"
Thanks DeadClown thats exactly what i needed.