Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_image/image_ops.c
| Show First 20 Lines • Show All 1,183 Lines • ▼ Show 20 Lines | if (iod->iuser) { | ||||
| iuser = iod->iuser; | iuser = iod->iuser; | ||||
| } | } | ||||
| else if (sima) { | else if (sima) { | ||||
| ED_space_image_set(sima, scene, obedit, ima); | ED_space_image_set(sima, scene, obedit, ima); | ||||
| iuser = &sima->iuser; | iuser = &sima->iuser; | ||||
| } | } | ||||
| else { | else { | ||||
| Tex *tex = CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data; | Tex *tex = CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data; | ||||
| BGpic *bgpic = CTX_data_pointer_get_type(C, "background_image", &RNA_BackgroundImage).data; | |||||
| if (tex && tex->type == TEX_IMAGE) { | if (tex && tex->type == TEX_IMAGE) { | ||||
| iuser = &tex->iuser; | iuser = &tex->iuser; | ||||
| } | } | ||||
| else if (bgpic && bgpic->source == V3D_BGPIC_IMAGE) { | |||||
| iuser = &bgpic->iuser; | |||||
| } | |||||
| } | } | ||||
| /* initialize because of new image */ | /* initialize because of new image */ | ||||
| if (iuser) { | if (iuser) { | ||||
| iuser->frames = frame_seq_len; | iuser->frames = frame_seq_len; | ||||
| iuser->sfra = 1; | iuser->sfra = 1; | ||||
| iuser->framenr = 1; | iuser->framenr = 1; | ||||
| iuser->offset = frame_ofs - 1; | iuser->offset = frame_ofs - 1; | ||||
| ▲ Show 20 Lines • Show All 2,369 Lines • Show Last 20 Lines | |||||