def __init__(self, parent): super(W3DWriter, self).__init__(parent, background="white") self.parent = parent self.font = font.Font(family="Helvetica", size=12) self.project = project.W3DProject() self.project_path = pyw3d.path.ProjectPath(self.project) self.global_entries = [] self.initUI()
To run this script, use the following command: blender --background --python link_sample.py where blender is your blender executable. """ import os from math import pi, sin, cos, degrees from pyw3d import project, objects, placement, export_to_blender, timeline, \ actions # First, create a W3DProject to hold everything else you'll create my_project = project.W3DProject( call_directory=os.path.dirname(__file__), allow_movement=True) theta_div = 8 radius = 10 relative_actions = [] absolute_actions = [] all_angles = [2 * pi / theta_div * i for i in range(theta_div)] for i in range(0, theta_div): theta = all_angles[i] object_name = "elem_x_{}".format(i) my_object = objects.W3DObject( name=object_name,