Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/screen/screen_ops.c
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| /* Create new window. No need to set space_type since it will be copied over. */ | /* Create new window. No need to set space_type since it will be copied over. */ | ||||
| wmWindow *newwin = WM_window_open(C, | wmWindow *newwin = WM_window_open(C, | ||||
| "Blender", | "Blender", | ||||
| area->totrct.xmin, | area->totrct.xmin, | ||||
| area->totrct.ymin, | area->totrct.ymin, | ||||
| area->winx, | area->winx, | ||||
| area->winy, | area->winy, | ||||
| SPACE_EMPTY, | SPACE_EMPTY, | ||||
| false, | |||||
| true, | true, | ||||
| false, | false, | ||||
| WIN_ALIGN_ABSOLUTE); | WIN_ALIGN_ABSOLUTE); | ||||
| if (newwin) { | if (newwin) { | ||||
| /* copy area to new screen */ | /* copy area to new screen */ | ||||
| bScreen *newsc = WM_window_get_active_screen(newwin); | bScreen *newsc = WM_window_get_active_screen(newwin); | ||||
| ED_area_data_copy((ScrArea *)newsc->areabase.first, area, true); | ED_area_data_copy((ScrArea *)newsc->areabase.first, area, true); | ||||
| ▲ Show 20 Lines • Show All 184 Lines • ▼ Show 20 Lines | |||||
| if (WM_window_open(C, | if (WM_window_open(C, | ||||
| IFACE_("Blender Preferences"), | IFACE_("Blender Preferences"), | ||||
| event->x, | event->x, | ||||
| event->y, | event->y, | ||||
| sizex, | sizex, | ||||
| sizey, | sizey, | ||||
| SPACE_USERPREF, | SPACE_USERPREF, | ||||
| false, | false, | ||||
| false, | |||||
| true, | true, | ||||
| WIN_ALIGN_LOCATION_CENTER) != NULL) { | WIN_ALIGN_LOCATION_CENTER) != NULL) { | ||||
| /* The header only contains the editor switcher and looks empty. | /* The header only contains the editor switcher and looks empty. | ||||
| * So hiding in the temp window makes sense. */ | * So hiding in the temp window makes sense. */ | ||||
| ScrArea *area = CTX_wm_area(C); | ScrArea *area = CTX_wm_area(C); | ||||
| ARegion *region = BKE_area_find_region_type(area, RGN_TYPE_HEADER); | ARegion *region = BKE_area_find_region_type(area, RGN_TYPE_HEADER); | ||||
| region->flag |= RGN_FLAG_HIDDEN; | region->flag |= RGN_FLAG_HIDDEN; | ||||
| ▲ Show 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | |||||
| if (WM_window_open(C, | if (WM_window_open(C, | ||||
| IFACE_("Blender Drivers Editor"), | IFACE_("Blender Drivers Editor"), | ||||
| event->x, | event->x, | ||||
| event->y, | event->y, | ||||
| sizex, | sizex, | ||||
| sizey, | sizey, | ||||
| SPACE_GRAPH, | SPACE_GRAPH, | ||||
| false, | false, | ||||
| false, | |||||
| true, | true, | ||||
| WIN_ALIGN_LOCATION_CENTER) != NULL) { | WIN_ALIGN_LOCATION_CENTER) != NULL) { | ||||
| ED_drivers_editor_init(C, CTX_wm_area(C)); | ED_drivers_editor_init(C, CTX_wm_area(C)); | ||||
| /* activate driver F-Curve for the property under the cursor */ | /* activate driver F-Curve for the property under the cursor */ | ||||
| if (but) { | if (but) { | ||||
| bool driven, special; | bool driven, special; | ||||
| FCurve *fcu = BKE_fcurve_find_by_rna_context_ui( | FCurve *fcu = BKE_fcurve_find_by_rna_context_ui( | ||||
| ▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | |||||
| if (WM_window_open(C, | if (WM_window_open(C, | ||||
| IFACE_("Blender Info Log"), | IFACE_("Blender Info Log"), | ||||
| event->x, | event->x, | ||||
| event->y + shift_y, | event->y + shift_y, | ||||
| sizex, | sizex, | ||||
| sizey, | sizey, | ||||
| SPACE_INFO, | SPACE_INFO, | ||||
| false, | false, | ||||
| false, | |||||
| true, | true, | ||||
| WIN_ALIGN_LOCATION_CENTER) != NULL) { | WIN_ALIGN_LOCATION_CENTER) != NULL) { | ||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| BKE_report(op->reports, RPT_ERROR, "Failed to open window!"); | BKE_report(op->reports, RPT_ERROR, "Failed to open window!"); | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||