Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_node/drawnode.c
| Show First 20 Lines • Show All 1,264 Lines • ▼ Show 20 Lines | static void node_composit_buts_image_ex(uiLayout *layout, bContext *C, PointerRNA *ptr) | ||||
| bNode *node = ptr->data; | bNode *node = ptr->data; | ||||
| PointerRNA iuserptr; | PointerRNA iuserptr; | ||||
| RNA_pointer_create((ID *)ptr->id.data, &RNA_ImageUser, node->storage, &iuserptr); | RNA_pointer_create((ID *)ptr->id.data, &RNA_ImageUser, node->storage, &iuserptr); | ||||
| uiLayoutSetContextPointer(layout, "image_user", &iuserptr); | uiLayoutSetContextPointer(layout, "image_user", &iuserptr); | ||||
| uiTemplateImage(layout, C, ptr, "image", &iuserptr, 0, 1); | uiTemplateImage(layout, C, ptr, "image", &iuserptr, 0, 1); | ||||
| } | } | ||||
| static void node_composit_buts_renderlayers(uiLayout *layout, bContext *C, PointerRNA *ptr) | static void node_composit_buts_viewlayers(uiLayout *layout, bContext *C, PointerRNA *ptr) | ||||
| { | { | ||||
| bNode *node = ptr->data; | bNode *node = ptr->data; | ||||
| uiLayout *col, *row; | uiLayout *col, *row; | ||||
| PointerRNA op_ptr; | PointerRNA op_ptr; | ||||
| PointerRNA scn_ptr; | PointerRNA scn_ptr; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| const char *layer_name; | const char *layer_name; | ||||
| char scene_name[MAX_ID_NAME - 2]; | char scene_name[MAX_ID_NAME - 2]; | ||||
| ▲ Show 20 Lines • Show All 1,184 Lines • ▼ Show 20 Lines | |||||
| static void node_composit_set_butfunc(bNodeType *ntype) | static void node_composit_set_butfunc(bNodeType *ntype) | ||||
| { | { | ||||
| switch (ntype->type) { | switch (ntype->type) { | ||||
| case CMP_NODE_IMAGE: | case CMP_NODE_IMAGE: | ||||
| ntype->draw_buttons = node_composit_buts_image; | ntype->draw_buttons = node_composit_buts_image; | ||||
| ntype->draw_buttons_ex = node_composit_buts_image_ex; | ntype->draw_buttons_ex = node_composit_buts_image_ex; | ||||
| break; | break; | ||||
| case CMP_NODE_R_LAYERS: | case CMP_NODE_R_LAYERS: | ||||
| ntype->draw_buttons = node_composit_buts_renderlayers; | ntype->draw_buttons = node_composit_buts_viewlayers; | ||||
| break; | break; | ||||
| case CMP_NODE_NORMAL: | case CMP_NODE_NORMAL: | ||||
| ntype->draw_buttons = node_buts_normal; | ntype->draw_buttons = node_buts_normal; | ||||
| break; | break; | ||||
| case CMP_NODE_CURVE_VEC: | case CMP_NODE_CURVE_VEC: | ||||
| ntype->draw_buttons = node_buts_curvevec; | ntype->draw_buttons = node_buts_curvevec; | ||||
| break; | break; | ||||
| case CMP_NODE_CURVE_RGB: | case CMP_NODE_CURVE_RGB: | ||||
| ▲ Show 20 Lines • Show All 1,090 Lines • Show Last 20 Lines | |||||