Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_dopesheet.py
| Show First 20 Lines • Show All 542 Lines • ▼ Show 20 Lines | def draw_generic_panel(cls, _context, layout, action): | ||||
| row.prop(action, "frame_start", text="Start") | row.prop(action, "frame_start", text="Start") | ||||
| row.prop(action, "frame_end", text="End") | row.prop(action, "frame_end", text="End") | ||||
| col.prop(action, "use_cyclic") | col.prop(action, "use_cyclic") | ||||
| class DOPESHEET_PT_custom_props_action(PropertyPanel, Panel): | class DOPESHEET_PT_custom_props_action(PropertyPanel, Panel): | ||||
| bl_space_type = 'DOPESHEET_EDITOR' | bl_space_type = 'DOPESHEET_EDITOR' | ||||
| bl_category = "Item" | bl_category = "Action" | ||||
| bl_region_type = 'UI' | bl_region_type = 'UI' | ||||
| bl_context = 'data' | bl_context = 'data' | ||||
| _context_path = "active_object.animation_data.action" | _context_path = "active_action" | ||||
| _property_type = bpy.types.Action | _property_type = bpy.types.Action | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| return context.active_object \ | return bool(context.active_action) | ||||
| and context.active_object.animation_data \ | |||||
| and context.active_object.animation_data.action | |||||
| class DOPESHEET_PT_action(DopesheetActionPanelBase, Panel): | class DOPESHEET_PT_action(DopesheetActionPanelBase, Panel): | ||||
| bl_space_type = 'DOPESHEET_EDITOR' | bl_space_type = 'DOPESHEET_EDITOR' | ||||
| bl_category = "Item" | bl_category = "Action" | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| return bool(context.active_action) | return bool(context.active_action) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| action = context.active_action | action = context.active_action | ||||
| self.draw_generic_panel(context, self.layout, action) | self.draw_generic_panel(context, self.layout, action) | ||||
| ▲ Show 20 Lines • Show All 269 Lines • Show Last 20 Lines | |||||