Object wirecolor from name


#1

Hi guyz !

I’m trying to do a little script which give a wirecolor to an object based on his name.

i want

$Object01.wirecolor = color 5 0 0,
$Object02.wirecolor = color 10 0 0

$ObjectXX.wirecolor = color XX*1 0 0

I’m sure it is quite easy, but not for me :slight_smile:

thank you for your answers,

Best regards


#2

if the name is what you post here , quick mxs below

for o in $object?? do o.wirecolor = color ((substring o.name 7 2 as integer )*5) 0 0

if no clear rules , hard to create a generalized function


#3

Thank you AEI ! It is exactly what i needed !

Have a nice day