Page 1 of 1

maxscript and octane

Posted: Thu Apr 04, 2013 5:04 pm
by HHbomb
Hello,
is there a way to have some info to access octane via maxscript ?

I would like to know the corresponding "getclassinstances Bitmaptexture" for octane to have the diffuse map.

Thanks.

Re: maxscript and octane

Posted: Thu Apr 04, 2013 9:19 pm
by suvakas
Hi,

What are you trying to do exactly?
The class of BitmapTexture in Octane is Image_Texture. So the corresponding maxscript for Octane would be "getclassinstances Image_Texture".
But this will give you not only diffuse map, but every Octane bitmap used in the scene.

Suv

Re: maxscript and octane

Posted: Fri Apr 05, 2013 12:33 pm
by HHbomb
hello suv, thanks for reply
in fact it was the first question....
I would like to list all maps used in the scene and print name/size.
My last render said "RENDER FAILED !" 'cause of a large map (I forgot to resize it)...
It would be great to know all map sizes without making an archive to see all maps...
I'm a very bad maxscripter but I would like to make something like that. I think that could help many people (me too)
When I write :
getclassinstances Image_Texture
I get
#(Map #16:Image Texture, Map #16:Image Texture)
but not the map name...
I'd be great to have maxscript language for octane
Cheers

Re: maxscript and octane

Posted: Fri Apr 05, 2013 1:43 pm
by suvakas
getclassinstances Image_Texture gives you an array of Octane bitmaps in the scene.
You now have to loop through that array and get the info you want for each element.

Here's the script that prints out image name and dimensions.

Code: Select all

for i in (getclassinstances Image_Texture) do
(
	format "% - % x %\n"  (filenameFromPath  i.filename.fileName) i.filename.height i.filename.width
)
Suv

Re: maxscript and octane

Posted: Fri Apr 05, 2013 2:58 pm
by HHbomb
thanks a lot suv ! :-)