Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/gpencil_utils.c
| Show First 20 Lines • Show All 198 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| bGPdata **gpd_ptr = ED_gpencil_data_get_pointers(C, NULL); | bGPdata **gpd_ptr = ED_gpencil_data_get_pointers(C, NULL); | ||||
| return (gpd_ptr) ? *(gpd_ptr) : NULL; | return (gpd_ptr) ? *(gpd_ptr) : NULL; | ||||
| } | } | ||||
| /* -------------------------------------------------------- */ | /* -------------------------------------------------------- */ | ||||
| // XXX: this should be removed... We really shouldn't duplicate logic like this! | // XXX: this should be removed... We really shouldn't duplicate logic like this! | ||||
| bGPdata *ED_gpencil_data_get_active_v3d(Scene *scene, SceneLayer *scene_layer) | bGPdata *ED_gpencil_data_get_active_v3d(Scene *scene, ViewLayer *view_layer) | ||||
| { | { | ||||
| Base *base = scene_layer->basact; | Base *base = view_layer->basact; | ||||
| bGPdata *gpd = NULL; | bGPdata *gpd = NULL; | ||||
| /* We have to make sure active object is actually visible and selected, else we must use default scene gpd, | /* We have to make sure active object is actually visible and selected, else we must use default scene gpd, | ||||
| * to be consistent with ED_gpencil_data_get_active's behavior. | * to be consistent with ED_gpencil_data_get_active's behavior. | ||||
| */ | */ | ||||
| if (base && TESTBASE(base)) { | if (base && TESTBASE(base)) { | ||||
| gpd = base->object->gpd; | gpd = base->object->gpd; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 960 Lines • Show Last 20 Lines | |||||