| 371 | |
| 372 | |
| 373 | class ST2BakeAnimationPanel(bpy.types.Panel): |
| 374 | bl_label = "Bake Animation" |
| 375 | bl_idname = "ST2_PT_5_BAKEPANEL" |
| 376 | bl_space_type = "VIEW_3D" |
| 377 | bl_region_type = "UI" |
| 378 | bl_category = "ST2" |
| 379 | |
| 380 | @classmethod |
| 381 | def poll(cls, context): |
| 382 | ko = search.active_key_object(context) |
| 383 | if ko and ko.st2.has_keyframes(ko): |
| 384 | return True |
| 385 | else: |
| 386 | return False |
| 387 | |
| 388 | def draw(self, context): |
| 389 | layout = self.layout |
| 390 | ko = search.active_key_object(context) |
| 391 | data = ko.st2 |
| 392 | |
| 393 | row = layout.row() |
| 394 | |
| 395 | row.label(text="Options") |
| 396 | |
| 397 | row.prop(data, "export_every_x_frame", text="Frame Interval") |
| 398 | row.prop(data, "export_meshes", icon="OUTLINER_OB_MESH", icon_only=True) |
| 399 | |
| 400 | layout.row().operator("st2.bake_frames", text="Bake Timed") |
| 401 | layout.row().operator("st2.bake_frames_no_timing", text="Export Untimed") |
| 402 | |
| 403 | |
| 404 |
nothing calls this directly
no outgoing calls
no test coverage detected