# Writetyping script by Monaime import bpy class TypingUI(bpy.types.Panel): bl_label = "Add an animated text" bl_idname = "Typing_UI" bl_space_type = 'VIEW_3D' bl_region_type = 'UI' def draw(self, context): obj = context.object layout = self.layout row = layout.row() row.operator("curves.generate",text="Generate", icon= "PLAY") row = layout.row() row.prop(context.scene, "typing_text", text="") row = layout.row() row.prop(context.scene, "typing_line_index", text="Line index") row = layout.row() row.prop(context.scene, "typing_start", text="Start frame") row = layout.row() row.enabled = False row.prop(context.scene, "typing_end", text="End frame") row = layout.row() row.prop(context.scene, "typing_speed", text="Speed") row = layout.row() row.operator("object.clear",text="Clear the scene",icon="CANCEL") row = layout.row() row.operator("object.aplly_font",text="Apply font" ,icon='FILE_FONT') row = layout.row() row.prop(context.scene, "typing_RTL", text="Right to left") row = layout.row() row.prop(context.scene, "typing_add_material", text="Add a marerial") row = layout.row() row.prop(context.scene, "typing_convert", text="Convert to mesh") def register(): bpy.utils.register_class(TypingUI) def unregister(): bpy.utils.unregister_class(TypingUI) if __name__ == "__main__": register() import bpy from bpy.props import * def main(self,context): text=bpy.context.scene.typing_text if text == '': self.report({'WARNING'}, "No text to generate") else: E_name = 'LineS' Text= list(text) x=len(Text) y=0 speed = bpy.context.scene.typing_speed start=bpy.context.scene.typing_start line = bpy.context.scene.typing_line_index bpy.context.scene.typing_end = (len(bpy.context.scene.typing_text)*bpy.context.scene.typing_speed)+bpy.context.scene.typing_start bpy.context.scene.typing_start = bpy.context.scene.typing_end+bpy.context.scene.typing_speed if bpy.context.scene.typing_add_material == True: if 'TextMate' not in bpy.data.materials: bpy.data.materials.new('TextMate') while E_name in bpy.data.objects.keys(): E_name = E_name + '1' if line ==1: bpy.ops.object.empty_add(type='PLAIN_AXES', location=(0, -0.3, 0)) else: bpy.ops.object.empty_add(type='PLAIN_AXES', location=(0,-(line-1+0.3), 0)) bpy.context.scene.objects.active.name = E_name while y