Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 4159

Capitalize first letter + Leave rest alone?

$
0
0

I have this script, and I’m trying to output the sublayers as camel-case, where the parent layer is named by the user input, and the sublayers use that string as a suffix, but capitalizes the first letter, like this (Note: the indents arent coming through, so I’m using “……”)

newElement
……crvNewElement
……lightNewElement

Seems using capitalize() and title() both return

newElement
……crvNewelement
……lightNewelement

Also, I’ll have to re-create it, but I seem to remember that before I used the color settings, it worked fine. Hm…
Thoughts?

addLayerAsTree_v01.py (899 Bytes)

8 posts - 4 participants

Read full topic


Viewing all articles
Browse latest Browse all 4159

Latest Images

Trending Articles



Latest Images