Changeset View
Changeset View
Standalone View
Standalone View
space_view3d_pie_menus/pie_orientation_menu.py
| Show All 38 Lines | from bpy.props import ( | ||||
| ) | ) | ||||
| class OrientPoll(Operator): | class OrientPoll(Operator): | ||||
| bl_idname = "pie.orientation" | bl_idname = "pie.orientation" | ||||
| bl_label = "Orientation Poll" | bl_label = "Orientation Poll" | ||||
| bl_options = {'INTERNAL'} | bl_options = {'INTERNAL'} | ||||
| space = StringProperty() | space: StringProperty() | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| return context.space_data.type == "VIEW_3D" | return context.space_data.type == "VIEW_3D" | ||||
| def execute(self, context): | def execute(self, context): | ||||
| context.space_data.transform_orientation = self.space | context.space_data.transform_orientation = self.space | ||||
| return {'FINISHED'} | return {'FINISHED'} | ||||
| ▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines | |||||