Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/composite/nodes/node_composite_image.cc
| Show First 20 Lines • Show All 135 Lines • ▼ Show 20 Lines | if (ima) { | ||||
| /* It is possible that image user in this node is not | /* It is possible that image user in this node is not | ||||
| * properly updated yet. In this case loading image will | * properly updated yet. In this case loading image will | ||||
| * fail and sockets detection will go wrong. | * fail and sockets detection will go wrong. | ||||
| * | * | ||||
| * So we manually construct image user to be sure first | * So we manually construct image user to be sure first | ||||
| * image from sequence (that one which is set as filename | * image from sequence (that one which is set as filename | ||||
| * for image data-block) is used for sockets detection. */ | * for image data-block) is used for sockets detection. */ | ||||
| load_iuser.ok = 1; | |||||
| load_iuser.framenr = offset; | load_iuser.framenr = offset; | ||||
| /* make sure ima->type is correct */ | /* make sure ima->type is correct */ | ||||
| ibuf = BKE_image_acquire_ibuf(ima, &load_iuser, nullptr); | ibuf = BKE_image_acquire_ibuf(ima, &load_iuser, nullptr); | ||||
| if (ima->rr) { | if (ima->rr) { | ||||
| RenderLayer *rl = (RenderLayer *)BLI_findlink(&ima->rr->layers, iuser->layer); | RenderLayer *rl = (RenderLayer *)BLI_findlink(&ima->rr->layers, iuser->layer); | ||||
| ▲ Show 20 Lines • Show All 253 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static void node_composit_init_image(bNodeTree *ntree, bNode *node) | static void node_composit_init_image(bNodeTree *ntree, bNode *node) | ||||
| { | { | ||||
| ImageUser *iuser = (ImageUser *)MEM_callocN(sizeof(ImageUser), "node image user"); | ImageUser *iuser = (ImageUser *)MEM_callocN(sizeof(ImageUser), "node image user"); | ||||
| node->storage = iuser; | node->storage = iuser; | ||||
| iuser->frames = 1; | iuser->frames = 1; | ||||
| iuser->sfra = 1; | iuser->sfra = 1; | ||||
| iuser->ok = 1; | |||||
| iuser->flag |= IMA_ANIM_ALWAYS; | iuser->flag |= IMA_ANIM_ALWAYS; | ||||
| /* setup initial outputs */ | /* setup initial outputs */ | ||||
| cmp_node_image_verify_outputs(ntree, node, false); | cmp_node_image_verify_outputs(ntree, node, false); | ||||
| } | } | ||||
| static void node_composit_free_image(bNode *node) | static void node_composit_free_image(bNode *node) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 150 Lines • Show Last 20 Lines | |||||