I use a driver expression for animation: frame/4
>>download the scene
graphitz.com // 3D - VFX - Motion Design
1 2 3 4 5 6 7 8 9 10 11 | import bpy list = [] sel = bpy.context.selected_objects for ob in sel: list.append(ob) #or list+=[ob] print(list) for i in list: print(i) #action: #bpy.context.object.data.auto_smooth_angle = 0.436332 i.data.auto_smooth_angle = 0.43633212 |
1 2 3 4 5 6 7 8 9 10 | import bpy newfont = bpy.data.fonts.load("//FONTS/ariblk.ttf") Sel = bpy.context.selected_objects for obj in Sel: if obj.type == 'FONT': print(obj) obj.data.font = newfont obj.data.size = 0.5 obj.data.space_character = 1.4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | import bpy Sel = bpy.context.selected_objects for obj in Sel: if obj.type == 'FONT': #remove first 7 characters obj.data.body = obj.data.body[7:] #remove all but 7 first characters obj.data.body = obj.data.body[:7] #remove from 3rd character to 7 from start obj.data.body = obj.data.body[:3] + obj.data.body[7:] #remove first 3 and copy first 7 to the end obj.data.body = obj.data.body[3:] + obj.data.body[:7] #remove first 3 and copy from after first 7 to the end obj.data.body = obj.data.body[3:] + obj.data.body[7:] |
1 2 3 4 5 6 | import bpy print("*****************") print("rename text objects by content") for ob in bpy.data.objects: if ob.type == 'FONT': ob.name = ob.data.body[:10] |
1 2 3 4 5 6 7 8 9 10 11 12 13 | import bpy print("*****************") print("This Loop Trough Multi Materials") selection = bpy.context.object print("SELECTED OBJECT: "+selection.name) index = -1 for num, m in enumerate(bpy.context.object.material_slots): num+=1 bpy.context.object.active_material_index = num print(num) mat = bpy.context.object.active_material print(mat) |
1 2 3 4 5 6 7 8 9 10 11 12 | import bpy print("*****************") print("This Loop Trough Multi Materials") selection = bpy.context.object print("SELECTED OBJECT: "+selection.name) index = -1 for m in selection.material_slots: index += 1 bpy.context.object.active_material_index=index mat = bpy.context.object.active_material print(mat) |
X dimensions can be found in the right panel (N) |
Cumulate previous parts dimensions in Texture Space Location |