Naming a material or map

Hi all

Really simple question, and no doubt my first of many for my new script idea!

I've written script to put a VrayHDRI map in to slots 1 & 2 of the material editor but I can't figure out how to name these maps.

How do I script that?

Cheers

Script_Butler.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Script_Butler's picture

Heres my code snippit for

Heres my code snippit for this idea.

on btn_Setup pressed do
(
meditmaterials[1] = VRayHDRI name: "HDRI GI"()
meditmaterials[2] = copy meditMaterials[1]
VRayLight type:1 size0:150 size1:100 pos:[-10,0,0] isSelected:off name: "Dome GI" texmap:meditmaterials[1]
VRayLight type:1 size0:150 size1:100 pos:[10,0,0] isSelected:off name: "Dome Reflection" texmap:meditmaterials[2]

So it creates the first material, copies it, then creates a light with the first material in the texture slot and copies that light and puts the second material in it's texture slot.

All I need is for the second material to have a different name.

It seems so simple to me but i just can;t do it!! It's infuriating!

Cheers.

Script_Butler

Anubis's picture

...

on btn_Setup pressed do
(
meditmaterials[1] = VRayHDRI name: "HDRI GI"
meditmaterials[2] = copy meditMaterials[1]
 
meditmaterials[2].name = "Some Other Name"
 
--...the rest is the same
)

my recent MAXScripts RSS (archive here)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.