Material name

Hi, I wanted to have the selected object name of the material ( multisubobject material ) with :
selection[1].material.materiallist[12] for eg.
but I get WOOD:Standart material for eg.

I just want "WOOD". Any help ? Thanks.

Comments

Comment viewing options

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

...

-- this
selection[1].material.materiallist[12].name
 
-- or this:
 
str = "WOOD:Standart material"
(filterString str ":")[1]
titane357's picture

Hi, thank you very much ! the

Hi, thank you very much !
the first one will be my choice.
the second one is so cool !
:-)

miauu's picture

.

The second one should be:

str = selection[1].material.materiallist[12]
(filterString str ":")[1]
titane357's picture

Thanks. It was comprehensible

Thanks. It was comprehensible :-)

miauu's picture

...

Yeah. :) It was not for you. I had to type it properly in my first comment.

titane357's picture

:-)

:-)

Comment viewing options

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