Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/object/object_add.c
| Context not available. | |||||
| wmWindowManager *wm = CTX_wm_manager(C); | wmWindowManager *wm = CTX_wm_manager(C); | ||||
| wmWindow *win; | wmWindow *win; | ||||
| const short use_global = RNA_boolean_get(op->ptr, "use_global"); | const short use_global = RNA_boolean_get(op->ptr, "use_global"); | ||||
| int deleted_num = 0; | |||||
| if (CTX_data_edit_object(C)) | if (CTX_data_edit_object(C)) | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| Context not available. | |||||
| /* remove from current scene only */ | /* remove from current scene only */ | ||||
| ED_base_object_free_and_unlink(bmain, scene, base); | ED_base_object_free_and_unlink(bmain, scene, base); | ||||
| deleted_num++; | |||||
| if (use_global) { | if (use_global) { | ||||
| Scene *scene_iter; | Scene *scene_iter; | ||||
| Context not available. | |||||
| } | } | ||||
| } | } | ||||
| BKE_reportf(op->reports, RPT_INFO, "Deleted %d objects", deleted_num); | |||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| Context not available. | |||||
| ot->idname = "OBJECT_OT_delete"; | ot->idname = "OBJECT_OT_delete"; | ||||
| /* api callbacks */ | /* api callbacks */ | ||||
| ot->invoke = WM_operator_confirm; | |||||
| ot->exec = object_delete_exec; | ot->exec = object_delete_exec; | ||||
| ot->poll = ED_operator_objectmode; | ot->poll = ED_operator_objectmode; | ||||
| Context not available. | |||||