Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_operators/object.py
| Show First 20 Lines • Show All 467 Lines • ▼ Show 20 Lines | def poll(cls, context): | ||||
| obj = context.active_object | obj = context.active_object | ||||
| return (obj and obj.mode != 'EDIT') | return (obj and obj.mode != 'EDIT') | ||||
| def execute(self, context): | def execute(self, context): | ||||
| ob_act = context.active_object | ob_act = context.active_object | ||||
| objects = [ob for ob in context.selected_editable_objects | objects = [ob for ob in context.selected_editable_objects | ||||
| if ob != ob_act] | if ob != ob_act] | ||||
| if 1: # swap from/to, means we cant copy to many at once. | if 1: # swap from/to, means we can't copy to many at once. | ||||
| if len(objects) != 1: | if len(objects) != 1: | ||||
| self.report({'ERROR'}, | self.report({'ERROR'}, | ||||
| ("Expected one other selected " | ("Expected one other selected " | ||||
| "mesh object to copy from")) | "mesh object to copy from")) | ||||
| return {'CANCELLED'} | return {'CANCELLED'} | ||||
| ob_act, objects = objects[0], [ob_act] | ob_act, objects = objects[0], [ob_act] | ||||
| ▲ Show 20 Lines • Show All 560 Lines • Show Last 20 Lines | |||||