Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_space.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 982 Lines • ▼ Show 20 Lines | for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| static Scene *rna_3DViewShading_scene(PointerRNA *ptr) | static Scene *rna_3DViewShading_scene(PointerRNA *ptr) | ||||
| { | { | ||||
| /* Get scene, depends if using 3D view or OpenGL render settings. */ | /* Get scene, depends if using 3D view or OpenGL render settings. */ | ||||
| ID *id = ptr->owner_id; | ID *id = ptr->owner_id; | ||||
| if (!id) { | |||||
| /* When accessed from an external render engine the id.data is NULL | |||||
| * This might be missing from the RNA CPP Api */ | |||||
| return NULL; | |||||
| } | |||||
| if (GS(id->name) == ID_SCE) { | if (GS(id->name) == ID_SCE) { | ||||
| return (Scene *)id; | return (Scene *)id; | ||||
| } | } | ||||
| else { | else { | ||||
| bScreen *screen = (bScreen *)ptr->owner_id; | bScreen *screen = (bScreen *)ptr->owner_id; | ||||
| return WM_windows_scene_get_from_screen(G_MAIN->wm.first, screen); | return WM_windows_scene_get_from_screen(G_MAIN->wm.first, screen); | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 5,327 Lines • Show Last 20 Lines | |||||