def create(self, context):
m = bpy.data.meshes.new("Window Panel")
o = bpy.data.objects.new("Window Panel", m)
d = m.archipack_window_panel.add()
d.center = self.center
d.origin = self.origin
d.size = self.size
d.radius = self.radius
d.frame_y = self.frame_y
d.frame_x = self.frame_x
d.curve_steps = self.curve_steps
d.shape = self.shape
d.fixed = self.fixed
d.pivot = self.pivot
d.angle_y = self.angle_y
d.side_material = self.side_material
d.handle = self.handle
d.handle_model = self.handle_model
d.handle_altitude = self.handle_altitude
context.scene.objects.link(o)
o.select = True
context.scene.objects.active = o
o.lock_location[0] = True
o.lock_location[1] = True
o.lock_location[2] = True
o.lock_rotation[1] = True
o.lock_scale[0] = True
o.lock_scale[1] = True
o.lock_scale[2] = True
d.update(context)
MaterialUtils.add_window_materials(o)
return o
评论列表
文章目录