Last active
January 28, 2016 08:44
-
-
Save zeffii/9864fa22e8148c3b9e2b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
''' more options per character | |
character.use_bold | |
character.material_index | |
character.use_italic | |
character.use_underline | |
''' | |
def set_body(text_object, normal, small_cap, small_caps_scale=0.39): | |
data = text_object.data | |
data.small_caps_scale = small_caps_scale | |
data.body = normal + small_cap | |
for idx, character in enumerate(data.body_format): | |
character.use_small_caps = (idx >= len(normal)) | |
text_object = bpy.data.objects['Text'] | |
normal = 'Maintext ' # add space here, or at the start of the small_cap | |
small_cap = 'smaller' | |
set_body(text_object, normal, small_cap) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment