Cleanup: Remove bNodeType flag from base registration functions

This flag is only used a few small cases, so instead
of setting the flag for every node only set the
required flag for the nodes that require it.

Mostly the flag is used to set `ntype.flag = NODE_PREVIEW`
For nodes that should have previews by default which
is only some compositor nodes and some texture nodes.

The frame node also sets the `NODE_BACKGROUND` flag.

All other nodes were setting a flag of 0 which has no purpose.

Reviewed By: JacquesLucke

Differential Revision: https://developer.blender.org/D13699
This commit is contained in:
Aaron Carlisle 2022-01-03 19:32:33 -05:00 committed by Aaron Carlisle
parent 9793bc30ce
commit d3ad04172d
377 changed files with 442 additions and 468 deletions

View File

@ -969,9 +969,11 @@ bool nodeGroupPoll(struct bNodeTree *nodetree,
/**
* Initialize a new node type struct with default values and callbacks.
*/
void node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass, short flag);
void node_type_base_custom(
struct bNodeType *ntype, const char *idname, const char *name, short nclass, short flag);
void node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass);
void node_type_base_custom(struct bNodeType *ntype,
const char *idname,
const char *name,
short nclass);
void node_type_socket_templates(struct bNodeType *ntype,
struct bNodeSocketTemplate *inputs,
struct bNodeSocketTemplate *outputs);

View File

@ -4357,8 +4357,7 @@ static bool node_poll_instance_default(bNode *node, bNodeTree *ntree, const char
return node->typeinfo->poll(node->typeinfo, ntree, disabled_hint);
}
/* NOLINTNEXTLINE: readability-function-size */
void node_type_base(bNodeType *ntype, int type, const char *name, short nclass, short flag)
void node_type_base(bNodeType *ntype, int type, const char *name, short nclass)
{
/* Use static type info header to map static int type to identifier string and RNA struct type.
* Associate the RNA struct type with the bNodeType.
@ -4385,7 +4384,6 @@ void node_type_base(bNodeType *ntype, int type, const char *name, short nclass,
ntype->type = type;
BLI_strncpy(ntype->ui_name, name, sizeof(ntype->ui_name));
ntype->nclass = nclass;
ntype->flag = flag;
node_type_base_defaults(ntype);
@ -4393,14 +4391,12 @@ void node_type_base(bNodeType *ntype, int type, const char *name, short nclass,
ntype->poll_instance = node_poll_instance_default;
}
void node_type_base_custom(
bNodeType *ntype, const char *idname, const char *name, short nclass, short flag)
void node_type_base_custom(bNodeType *ntype, const char *idname, const char *name, short nclass)
{
BLI_strncpy(ntype->idname, idname, sizeof(ntype->idname));
ntype->type = NODE_CUSTOM;
BLI_strncpy(ntype->ui_name, name, sizeof(ntype->ui_name));
ntype->nclass = nclass;
ntype->flag = flag;
node_type_base_defaults(ntype);
}
@ -4576,7 +4572,7 @@ static void register_undefined_types()
strcpy(NodeTreeTypeUndefined.ui_name, N_("Undefined"));
strcpy(NodeTreeTypeUndefined.ui_description, N_("Undefined Node Tree Type"));
node_type_base_custom(&NodeTypeUndefined, "NodeUndefined", "Undefined", 0, 0);
node_type_base_custom(&NodeTypeUndefined, "NodeUndefined", "Undefined", 0);
NodeTypeUndefined.poll = node_undefined_poll;
BLI_strncpy(NodeSocketTypeUndefined.idname,

View File

@ -1953,7 +1953,7 @@ static bNodeType *rna_Node_register_base(Main *bmain,
/* setup dummy node & node type to store static properties in */
memset(&dummynt, 0, sizeof(bNodeType));
/* this does some additional initialization of default values */
node_type_base_custom(&dummynt, identifier, "", 0, 0);
node_type_base_custom(&dummynt, identifier, "", 0);
memset(&dummynode, 0, sizeof(bNode));
dummynode.typeinfo = &dummynt;

View File

@ -47,9 +47,9 @@ void cmp_node_update_default(bNodeTree *UNUSED(ntree), bNode *node)
node->need_exec = 1;
}
void cmp_node_type_base(bNodeType *ntype, int type, const char *name, short nclass, short flag)
void cmp_node_type_base(bNodeType *ntype, int type, const char *name, short nclass)
{
node_type_base(ntype, type, name, nclass, flag);
node_type_base(ntype, type, name, nclass);
ntype->poll = cmp_node_poll_default;
ntype->updatefunc = cmp_node_update_default;

View File

@ -52,5 +52,4 @@ bool cmp_node_poll_default(struct bNodeType *ntype,
struct bNodeTree *ntree,
const char **r_disabled_hint);
void cmp_node_update_default(struct bNodeTree *ntree, struct bNode *node);
void cmp_node_type_base(
struct bNodeType *ntype, int type, const char *name, short nclass, short flag);
void cmp_node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass);

View File

@ -58,7 +58,7 @@ void register_node_type_cmp_alphaover()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_ALPHAOVER, "Alpha Over", NODE_CLASS_OP_COLOR, 0);
cmp_node_type_base(&ntype, CMP_NODE_ALPHAOVER, "Alpha Over", NODE_CLASS_OP_COLOR);
ntype.declare = blender::nodes::cmp_node_alphaover_declare;
ntype.draw_buttons = node_composit_buts_alphaover;
node_type_init(&ntype, node_alphaover_init);

View File

@ -66,10 +66,10 @@ void register_node_type_cmp_antialiasing()
{
static bNodeType ntype;
cmp_node_type_base(
&ntype, CMP_NODE_ANTIALIASING, "Anti-Aliasing", NODE_CLASS_OP_FILTER, NODE_PREVIEW);
cmp_node_type_base(&ntype, CMP_NODE_ANTIALIASING, "Anti-Aliasing", NODE_CLASS_OP_FILTER);
ntype.declare = blender::nodes::cmp_node_antialiasing_declare;
ntype.draw_buttons = node_composit_buts_antialiasing;
ntype.flag |= NODE_PREVIEW;
node_type_size(&ntype, 170, 140, 200);
node_type_init(&ntype, node_composit_init_antialiasing);
node_type_storage(

View File

@ -64,7 +64,7 @@ void register_node_type_cmp_bilateralblur()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_BILATERALBLUR, "Bilateral Blur", NODE_CLASS_OP_FILTER, 0);
cmp_node_type_base(&ntype, CMP_NODE_BILATERALBLUR, "Bilateral Blur", NODE_CLASS_OP_FILTER);
ntype.declare = blender::nodes::cmp_node_bilateralblur_declare;
ntype.draw_buttons = node_composit_buts_bilateralblur;
node_type_init(&ntype, node_composit_init_bilateralblur);

View File

@ -94,9 +94,10 @@ void register_node_type_cmp_blur()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_BLUR, "Blur", NODE_CLASS_OP_FILTER, NODE_PREVIEW);
cmp_node_type_base(&ntype, CMP_NODE_BLUR, "Blur", NODE_CLASS_OP_FILTER);
ntype.declare = blender::nodes::cmp_node_blur_declare;
ntype.draw_buttons = node_composit_buts_blur;
ntype.flag |= NODE_PREVIEW;
node_type_init(&ntype, node_composit_init_blur);
node_type_storage(
&ntype, "NodeBlurData", node_free_standard_storage, node_copy_standard_storage);

View File

@ -60,7 +60,7 @@ void register_node_type_cmp_bokehblur()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_BOKEHBLUR, "Bokeh Blur", NODE_CLASS_OP_FILTER, 0);
cmp_node_type_base(&ntype, CMP_NODE_BOKEHBLUR, "Bokeh Blur", NODE_CLASS_OP_FILTER);
ntype.declare = blender::nodes::cmp_node_bokehblur_declare;
ntype.draw_buttons = node_composit_buts_bokehblur;
node_type_init(&ntype, node_composit_init_bokehblur);

View File

@ -67,9 +67,10 @@ void register_node_type_cmp_bokehimage()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_BOKEHIMAGE, "Bokeh Image", NODE_CLASS_INPUT, NODE_PREVIEW);
cmp_node_type_base(&ntype, CMP_NODE_BOKEHIMAGE, "Bokeh Image", NODE_CLASS_INPUT);
ntype.declare = blender::nodes::cmp_node_bokehimage_declare;
ntype.draw_buttons = node_composit_buts_bokehimage;
ntype.flag |= NODE_PREVIEW;
node_type_init(&ntype, node_composit_init_bokehimage);
node_type_storage(
&ntype, "NodeBokehImage", node_free_standard_storage, node_copy_standard_storage);

View File

@ -70,7 +70,7 @@ void register_node_type_cmp_boxmask()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_MASK_BOX, "Box Mask", NODE_CLASS_MATTE, 0);
cmp_node_type_base(&ntype, CMP_NODE_MASK_BOX, "Box Mask", NODE_CLASS_MATTE);
ntype.declare = blender::nodes::cmp_node_boxmask_declare;
ntype.draw_buttons = node_composit_buts_boxmask;
node_type_init(&ntype, node_composit_init_boxmask);

View File

@ -56,7 +56,7 @@ void register_node_type_cmp_brightcontrast()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_BRIGHTCONTRAST, "Bright/Contrast", NODE_CLASS_OP_COLOR, 0);
cmp_node_type_base(&ntype, CMP_NODE_BRIGHTCONTRAST, "Bright/Contrast", NODE_CLASS_OP_COLOR);
ntype.declare = blender::nodes::cmp_node_brightcontrast_declare;
ntype.draw_buttons = node_composit_buts_brightcontrast;
node_type_init(&ntype, node_composit_init_brightcontrast);

View File

@ -101,10 +101,10 @@ void register_node_type_cmp_channel_matte()
{
static bNodeType ntype;
cmp_node_type_base(
&ntype, CMP_NODE_CHANNEL_MATTE, "Channel Key", NODE_CLASS_MATTE, NODE_PREVIEW);
cmp_node_type_base(&ntype, CMP_NODE_CHANNEL_MATTE, "Channel Key", NODE_CLASS_MATTE);
ntype.declare = blender::nodes::cmp_node_channel_matte_declare;
ntype.draw_buttons = node_composit_buts_channel_matte;
ntype.flag |= NODE_PREVIEW;
node_type_init(&ntype, node_composit_init_channel_matte);
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);

View File

@ -71,9 +71,10 @@ void register_node_type_cmp_chroma_matte()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_CHROMA_MATTE, "Chroma Key", NODE_CLASS_MATTE, NODE_PREVIEW);
cmp_node_type_base(&ntype, CMP_NODE_CHROMA_MATTE, "Chroma Key", NODE_CLASS_MATTE);
ntype.declare = blender::nodes::cmp_node_chroma_matte_declare;
ntype.draw_buttons = node_composit_buts_chroma_matte;
ntype.flag |= NODE_PREVIEW;
node_type_init(&ntype, node_composit_init_chroma_matte);
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);

View File

@ -72,9 +72,10 @@ void register_node_type_cmp_color_matte()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_COLOR_MATTE, "Color Key", NODE_CLASS_MATTE, NODE_PREVIEW);
cmp_node_type_base(&ntype, CMP_NODE_COLOR_MATTE, "Color Key", NODE_CLASS_MATTE);
ntype.declare = blender::nodes::cmp_node_color_matte_declare;
ntype.draw_buttons = node_composit_buts_color_matte;
ntype.flag |= NODE_PREVIEW;
node_type_init(&ntype, node_composit_init_color_matte);
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);

View File

@ -102,7 +102,7 @@ void register_node_type_cmp_color_spill()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_COLOR_SPILL, "Color Spill", NODE_CLASS_MATTE, 0);
cmp_node_type_base(&ntype, CMP_NODE_COLOR_SPILL, "Color Spill", NODE_CLASS_MATTE);
ntype.declare = blender::nodes::cmp_node_color_spill_declare;
ntype.draw_buttons = node_composit_buts_color_spill;
node_type_init(&ntype, node_composit_init_color_spill);

View File

@ -161,7 +161,7 @@ void register_node_type_cmp_colorbalance()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_COLORBALANCE, "Color Balance", NODE_CLASS_OP_COLOR, 0);
cmp_node_type_base(&ntype, CMP_NODE_COLORBALANCE, "Color Balance", NODE_CLASS_OP_COLOR);
ntype.declare = blender::nodes::cmp_node_colorbalance_declare;
ntype.draw_buttons = node_composit_buts_colorbalance;
ntype.draw_buttons_ex = node_composit_buts_colorbalance_ex;

View File

@ -288,7 +288,7 @@ void register_node_type_cmp_colorcorrection()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_COLORCORRECTION, "Color Correction", NODE_CLASS_OP_COLOR, 0);
cmp_node_type_base(&ntype, CMP_NODE_COLORCORRECTION, "Color Correction", NODE_CLASS_OP_COLOR);
ntype.declare = blender::nodes::cmp_node_colorcorrection_declare;
ntype.draw_buttons = node_composit_buts_colorcorrection;
ntype.draw_buttons_ex = node_composit_buts_colorcorrection_ex;

View File

@ -38,7 +38,7 @@ void register_node_type_cmp_group()
/* NOTE: Cannot use sh_node_type_base for node group, because it would map the node type
* to the shared NODE_GROUP integer type id. */
node_type_base_custom(&ntype, "CompositorNodeGroup", "Group", NODE_CLASS_GROUP, 0);
node_type_base_custom(&ntype, "CompositorNodeGroup", "Group", NODE_CLASS_GROUP);
ntype.type = NODE_GROUP;
ntype.poll = cmp_node_poll_default;
ntype.poll_instance = node_group_poll_instance;

View File

@ -48,9 +48,10 @@ void register_node_type_cmp_composite()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_COMPOSITE, "Composite", NODE_CLASS_OUTPUT, NODE_PREVIEW);
cmp_node_type_base(&ntype, CMP_NODE_COMPOSITE, "Composite", NODE_CLASS_OUTPUT);
ntype.declare = blender::nodes::cmp_node_composite_declare;
ntype.draw_buttons = node_composit_buts_composite;
ntype.flag |= NODE_PREVIEW;
ntype.no_muting = true;
nodeRegisterType(&ntype);

View File

@ -54,7 +54,7 @@ void register_node_type_cmp_cornerpin()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_CORNERPIN, "Corner Pin", NODE_CLASS_DISTORT, 0);
cmp_node_type_base(&ntype, CMP_NODE_CORNERPIN, "Corner Pin", NODE_CLASS_DISTORT);
ntype.declare = blender::nodes::cmp_node_cornerpin_declare;
nodeRegisterType(&ntype);

View File

@ -76,7 +76,7 @@ void register_node_type_cmp_crop()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_CROP, "Crop", NODE_CLASS_DISTORT, 0);
cmp_node_type_base(&ntype, CMP_NODE_CROP, "Crop", NODE_CLASS_DISTORT);
ntype.declare = blender::nodes::cmp_node_crop_declare;
ntype.draw_buttons = node_composit_buts_crop;
node_type_init(&ntype, node_composit_init_crop);

View File

@ -309,7 +309,7 @@ void register_node_type_cmp_cryptomatte()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_CRYPTOMATTE, "Cryptomatte", NODE_CLASS_MATTE, 0);
cmp_node_type_base(&ntype, CMP_NODE_CRYPTOMATTE, "Cryptomatte", NODE_CLASS_MATTE);
node_type_socket_templates(&ntype, cmp_node_cryptomatte_in, cmp_node_cryptomatte_out);
node_type_size(&ntype, 240, 100, 700);
node_type_init(&ntype, node_init_cryptomatte);
@ -366,7 +366,7 @@ void register_node_type_cmp_cryptomatte_legacy()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_CRYPTOMATTE_LEGACY, "Cryptomatte", NODE_CLASS_MATTE, 0);
cmp_node_type_base(&ntype, CMP_NODE_CRYPTOMATTE_LEGACY, "Cryptomatte", NODE_CLASS_MATTE);
node_type_socket_templates(&ntype, nullptr, cmp_node_cryptomatte_out);
node_type_init(&ntype, node_init_cryptomatte_legacy);
node_type_storage(&ntype, "NodeCryptomatte", node_free_cryptomatte, node_copy_cryptomatte);

View File

@ -49,7 +49,7 @@ void register_node_type_cmp_curve_time()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_TIME, "Time", NODE_CLASS_INPUT, 0);
cmp_node_type_base(&ntype, CMP_NODE_TIME, "Time", NODE_CLASS_INPUT);
ntype.declare = blender::nodes::cmp_node_time_declare;
node_type_size(&ntype, 200, 140, 320);
node_type_init(&ntype, node_composit_init_curves_time);
@ -84,7 +84,7 @@ void register_node_type_cmp_curve_vec()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_CURVE_VEC, "Vector Curves", NODE_CLASS_OP_VECTOR, 0);
cmp_node_type_base(&ntype, CMP_NODE_CURVE_VEC, "Vector Curves", NODE_CLASS_OP_VECTOR);
ntype.declare = blender::nodes::cmp_node_curve_vec_declare;
ntype.draw_buttons = node_buts_curvevec;
node_type_size(&ntype, 200, 140, 320);
@ -119,7 +119,7 @@ void register_node_type_cmp_curve_rgb()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR, 0);
cmp_node_type_base(&ntype, CMP_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR);
ntype.declare = blender::nodes::cmp_node_rgbcurves_declare;
node_type_size(&ntype, 200, 140, 320);
node_type_init(&ntype, node_composit_init_curve_rgb);

View File

@ -103,7 +103,7 @@ void register_node_type_cmp_defocus()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_DEFOCUS, "Defocus", NODE_CLASS_OP_FILTER, 0);
cmp_node_type_base(&ntype, CMP_NODE_DEFOCUS, "Defocus", NODE_CLASS_OP_FILTER);
ntype.declare = blender::nodes::cmp_node_defocus_declare;
ntype.draw_buttons = node_composit_buts_defocus;
node_type_init(&ntype, node_composit_init_defocus);

View File

@ -76,7 +76,7 @@ void register_node_type_cmp_denoise()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_DENOISE, "Denoise", NODE_CLASS_OP_FILTER, 0);
cmp_node_type_base(&ntype, CMP_NODE_DENOISE, "Denoise", NODE_CLASS_OP_FILTER);
ntype.declare = blender::nodes::cmp_node_denoise_declare;
ntype.draw_buttons = node_composit_buts_denoise;
node_type_init(&ntype, node_composit_init_denonise);

View File

@ -58,9 +58,10 @@ void register_node_type_cmp_despeckle()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_DESPECKLE, "Despeckle", NODE_CLASS_OP_FILTER, NODE_PREVIEW);
cmp_node_type_base(&ntype, CMP_NODE_DESPECKLE, "Despeckle", NODE_CLASS_OP_FILTER);
ntype.declare = blender::nodes::cmp_node_despeckle_declare;
ntype.draw_buttons = node_composit_buts_despeckle;
ntype.flag |= NODE_PREVIEW;
node_type_init(&ntype, node_composit_init_despeckle);
nodeRegisterType(&ntype);

View File

@ -62,10 +62,10 @@ void register_node_type_cmp_diff_matte()
{
static bNodeType ntype;
cmp_node_type_base(
&ntype, CMP_NODE_DIFF_MATTE, "Difference Key", NODE_CLASS_MATTE, NODE_PREVIEW);
cmp_node_type_base(&ntype, CMP_NODE_DIFF_MATTE, "Difference Key", NODE_CLASS_MATTE);
ntype.declare = blender::nodes::cmp_node_diff_matte_declare;
ntype.draw_buttons = node_composit_buts_diff_matte;
ntype.flag |= NODE_PREVIEW;
node_type_init(&ntype, node_composit_init_diff_matte);
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);

View File

@ -65,7 +65,7 @@ void register_node_type_cmp_dilateerode()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_DILATEERODE, "Dilate/Erode", NODE_CLASS_OP_FILTER, 0);
cmp_node_type_base(&ntype, CMP_NODE_DILATEERODE, "Dilate/Erode", NODE_CLASS_OP_FILTER);
ntype.draw_buttons = node_composit_buts_dilateerode;
ntype.declare = blender::nodes::cmp_node_dilate_declare;
node_type_init(&ntype, node_composit_init_dilateerode);

View File

@ -73,7 +73,7 @@ void register_node_type_cmp_dblur()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_DBLUR, "Directional Blur", NODE_CLASS_OP_FILTER, 0);
cmp_node_type_base(&ntype, CMP_NODE_DBLUR, "Directional Blur", NODE_CLASS_OP_FILTER);
ntype.declare = blender::nodes::cmp_node_directional_blur_declare;
ntype.draw_buttons = node_composit_buts_dblur;
node_type_init(&ntype, node_composit_init_dblur);

View File

@ -46,7 +46,7 @@ void register_node_type_cmp_displace()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_DISPLACE, "Displace", NODE_CLASS_DISTORT, 0);
cmp_node_type_base(&ntype, CMP_NODE_DISPLACE, "Displace", NODE_CLASS_DISTORT);
ntype.declare = blender::nodes::cmp_node_displace_declare;
nodeRegisterType(&ntype);

View File

@ -70,9 +70,10 @@ void register_node_type_cmp_distance_matte()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_DIST_MATTE, "Distance Key", NODE_CLASS_MATTE, NODE_PREVIEW);
cmp_node_type_base(&ntype, CMP_NODE_DIST_MATTE, "Distance Key", NODE_CLASS_MATTE);
ntype.declare = blender::nodes::cmp_node_distance_matte_declare;
ntype.draw_buttons = node_composit_buts_distance_matte;
ntype.flag |= NODE_PREVIEW;
node_type_init(&ntype, node_composit_init_distance_matte);
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);

View File

@ -57,7 +57,7 @@ void register_node_type_cmp_doubleedgemask()
{
static bNodeType ntype; /* Allocate a node type data structure. */
cmp_node_type_base(&ntype, CMP_NODE_DOUBLEEDGEMASK, "Double Edge Mask", NODE_CLASS_MATTE, 0);
cmp_node_type_base(&ntype, CMP_NODE_DOUBLEEDGEMASK, "Double Edge Mask", NODE_CLASS_MATTE);
ntype.declare = blender::nodes::cmp_node_double_edge_mask_declare;
ntype.draw_buttons = node_composit_buts_double_edge_mask;

View File

@ -68,7 +68,7 @@ void register_node_type_cmp_ellipsemask()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_MASK_ELLIPSE, "Ellipse Mask", NODE_CLASS_MATTE, 0);
cmp_node_type_base(&ntype, CMP_NODE_MASK_ELLIPSE, "Ellipse Mask", NODE_CLASS_MATTE);
ntype.declare = blender::nodes::cmp_node_ellipsemask_declare;
ntype.draw_buttons = node_composit_buts_ellipsemask;
node_type_size(&ntype, 260, 110, 320);

View File

@ -40,7 +40,7 @@ void register_node_type_cmp_exposure()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_EXPOSURE, "Exposure", NODE_CLASS_OP_COLOR, 0);
cmp_node_type_base(&ntype, CMP_NODE_EXPOSURE, "Exposure", NODE_CLASS_OP_COLOR);
ntype.declare = blender::nodes::cmp_node_exposure_declare;
nodeRegisterType(&ntype);

View File

@ -48,10 +48,11 @@ void register_node_type_cmp_filter()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_FILTER, "Filter", NODE_CLASS_OP_FILTER, NODE_PREVIEW);
cmp_node_type_base(&ntype, CMP_NODE_FILTER, "Filter", NODE_CLASS_OP_FILTER);
ntype.declare = blender::nodes::cmp_node_filter_declare;
ntype.draw_buttons = node_composit_buts_filter;
ntype.labelfunc = node_filter_label;
ntype.flag |= NODE_PREVIEW;
nodeRegisterType(&ntype);
}

View File

@ -47,7 +47,7 @@ void register_node_type_cmp_flip()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_FLIP, "Flip", NODE_CLASS_DISTORT, 0);
cmp_node_type_base(&ntype, CMP_NODE_FLIP, "Flip", NODE_CLASS_DISTORT);
ntype.declare = blender::nodes::cmp_node_flip_declare;
ntype.draw_buttons = node_composit_buts_flip;

View File

@ -44,7 +44,7 @@ void register_node_type_cmp_gamma()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_GAMMA, "Gamma", NODE_CLASS_OP_COLOR, 0);
cmp_node_type_base(&ntype, CMP_NODE_GAMMA, "Gamma", NODE_CLASS_OP_COLOR);
ntype.declare = blender::nodes::cmp_node_gamma_declare;
nodeRegisterType(&ntype);

View File

@ -97,7 +97,7 @@ void register_node_type_cmp_glare()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_GLARE, "Glare", NODE_CLASS_OP_FILTER, 0);
cmp_node_type_base(&ntype, CMP_NODE_GLARE, "Glare", NODE_CLASS_OP_FILTER);
ntype.declare = blender::nodes::cmp_node_glare_declare;
ntype.draw_buttons = node_composit_buts_glare;
node_type_init(&ntype, node_composit_init_glare);

View File

@ -51,7 +51,7 @@ void register_node_type_cmp_hue_sat()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_HUE_SAT, "Hue Saturation Value", NODE_CLASS_OP_COLOR, 0);
cmp_node_type_base(&ntype, CMP_NODE_HUE_SAT, "Hue Saturation Value", NODE_CLASS_OP_COLOR);
ntype.declare = blender::nodes::cmp_node_huesatval_declare;
nodeRegisterType(&ntype);

View File

@ -55,7 +55,7 @@ void register_node_type_cmp_huecorrect()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_HUECORRECT, "Hue Correct", NODE_CLASS_OP_COLOR, 0);
cmp_node_type_base(&ntype, CMP_NODE_HUECORRECT, "Hue Correct", NODE_CLASS_OP_COLOR);
ntype.declare = blender::nodes::cmp_node_huecorrect_declare;
node_type_size(&ntype, 320, 140, 500);
node_type_init(&ntype, node_composit_init_huecorrect);

View File

@ -48,7 +48,7 @@ void register_node_type_cmp_idmask()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_ID_MASK, "ID Mask", NODE_CLASS_CONVERTER, 0);
cmp_node_type_base(&ntype, CMP_NODE_ID_MASK, "ID Mask", NODE_CLASS_CONVERTER);
ntype.declare = blender::nodes::cmp_node_idmask_declare;
ntype.draw_buttons = node_composit_buts_id_mask;

View File

@ -451,11 +451,12 @@ void register_node_type_cmp_image()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_IMAGE, "Image", NODE_CLASS_INPUT, NODE_PREVIEW);
cmp_node_type_base(&ntype, CMP_NODE_IMAGE, "Image", NODE_CLASS_INPUT);
node_type_init(&ntype, node_composit_init_image);
node_type_storage(&ntype, "ImageUser", node_composit_free_image, node_composit_copy_image);
node_type_update(&ntype, cmp_node_image_update);
ntype.labelfunc = node_image_label;
ntype.flag |= NODE_PREVIEW;
nodeRegisterType(&ntype);
}
@ -605,11 +606,12 @@ void register_node_type_cmp_rlayers()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_R_LAYERS, "Render Layers", NODE_CLASS_INPUT, NODE_PREVIEW);
cmp_node_type_base(&ntype, CMP_NODE_R_LAYERS, "Render Layers", NODE_CLASS_INPUT);
node_type_socket_templates(&ntype, nullptr, cmp_node_rlayers_out);
ntype.draw_buttons = node_composit_buts_viewlayers;
ntype.initfunc_api = node_composit_init_rlayers;
ntype.poll = node_composit_poll_rlayers;
ntype.flag |= NODE_PREVIEW;
node_type_storage(&ntype, nullptr, node_composit_free_rlayers, node_composit_copy_rlayers);
node_type_update(&ntype, cmp_node_rlayers_update);
node_type_init(&ntype, node_cmp_rlayers_outputs);

View File

@ -47,7 +47,7 @@ void register_node_type_cmp_inpaint()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_INPAINT, "Inpaint", NODE_CLASS_OP_FILTER, 0);
cmp_node_type_base(&ntype, CMP_NODE_INPAINT, "Inpaint", NODE_CLASS_OP_FILTER);
ntype.declare = blender::nodes::cmp_node_inpaint_declare;
ntype.draw_buttons = node_composit_buts_inpaint;

View File

@ -58,7 +58,7 @@ void register_node_type_cmp_invert()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR, 0);
cmp_node_type_base(&ntype, CMP_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR);
ntype.declare = blender::nodes::cmp_node_invert_declare;
ntype.draw_buttons = node_composit_buts_invert;
node_type_init(&ntype, node_composit_init_invert);

View File

@ -85,7 +85,7 @@ void register_node_type_cmp_keying()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_KEYING, "Keying", NODE_CLASS_MATTE, 0);
cmp_node_type_base(&ntype, CMP_NODE_KEYING, "Keying", NODE_CLASS_MATTE);
ntype.declare = blender::nodes::cmp_node_keying_declare;
ntype.draw_buttons = node_composit_buts_keying;
node_type_init(&ntype, node_composit_init_keying);

View File

@ -81,7 +81,7 @@ void register_node_type_cmp_keyingscreen()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_KEYINGSCREEN, "Keying Screen", NODE_CLASS_MATTE, 0);
cmp_node_type_base(&ntype, CMP_NODE_KEYINGSCREEN, "Keying Screen", NODE_CLASS_MATTE);
ntype.declare = blender::nodes::cmp_node_keyingscreen_declare;
ntype.draw_buttons = node_composit_buts_keyingscreen;
node_type_init(&ntype, node_composit_init_keyingscreen);

View File

@ -64,7 +64,7 @@ void register_node_type_cmp_lensdist()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_LENSDIST, "Lens Distortion", NODE_CLASS_DISTORT, 0);
cmp_node_type_base(&ntype, CMP_NODE_LENSDIST, "Lens Distortion", NODE_CLASS_DISTORT);
ntype.declare = blender::nodes::cmp_node_lensdist_declare;
ntype.draw_buttons = node_composit_buts_lensdist;
node_type_init(&ntype, node_composit_init_lensdist);

View File

@ -53,9 +53,10 @@ void register_node_type_cmp_view_levels()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_VIEW_LEVELS, "Levels", NODE_CLASS_OUTPUT, NODE_PREVIEW);
cmp_node_type_base(&ntype, CMP_NODE_VIEW_LEVELS, "Levels", NODE_CLASS_OUTPUT);
ntype.declare = blender::nodes::cmp_node_levels_declare;
ntype.draw_buttons = node_composit_buts_view_levels;
ntype.flag |= NODE_PREVIEW;
node_type_init(&ntype, node_composit_init_view_levels);
nodeRegisterType(&ntype);

View File

@ -62,9 +62,10 @@ void register_node_type_cmp_luma_matte()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_LUMA_MATTE, "Luminance Key", NODE_CLASS_MATTE, NODE_PREVIEW);
cmp_node_type_base(&ntype, CMP_NODE_LUMA_MATTE, "Luminance Key", NODE_CLASS_MATTE);
ntype.declare = blender::nodes::cmp_node_luma_matte_declare;
ntype.draw_buttons = node_composit_buts_luma_matte;
ntype.flag |= NODE_PREVIEW;
node_type_init(&ntype, node_composit_init_luma_matte);
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);

View File

@ -54,7 +54,7 @@ void register_node_type_cmp_map_range()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_MAP_RANGE, "Map Range", NODE_CLASS_OP_VECTOR, 0);
cmp_node_type_base(&ntype, CMP_NODE_MAP_RANGE, "Map Range", NODE_CLASS_OP_VECTOR);
ntype.declare = blender::nodes::cmp_node_map_range_declare;
ntype.draw_buttons = node_composit_buts_map_range;

View File

@ -48,7 +48,7 @@ void register_node_type_cmp_mapuv()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_MAP_UV, "Map UV", NODE_CLASS_DISTORT, 0);
cmp_node_type_base(&ntype, CMP_NODE_MAP_UV, "Map UV", NODE_CLASS_DISTORT);
ntype.declare = blender::nodes::cmp_node_map_uv_declare;
ntype.draw_buttons = node_composit_buts_map_uv;

View File

@ -70,7 +70,7 @@ void register_node_type_cmp_map_value()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_MAP_VALUE, "Map Value", NODE_CLASS_OP_VECTOR, 0);
cmp_node_type_base(&ntype, CMP_NODE_MAP_VALUE, "Map Value", NODE_CLASS_OP_VECTOR);
ntype.declare = blender::nodes::cmp_node_map_value_declare;
ntype.draw_buttons = node_composit_buts_map_value;
node_type_init(&ntype, node_composit_init_map_value);

View File

@ -96,7 +96,7 @@ void register_node_type_cmp_mask()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_MASK, "Mask", NODE_CLASS_INPUT, 0);
cmp_node_type_base(&ntype, CMP_NODE_MASK, "Mask", NODE_CLASS_INPUT);
ntype.declare = blender::nodes::cmp_node_mask_declare;
ntype.draw_buttons = node_composit_buts_mask;
node_type_init(&ntype, node_composit_init_mask);

View File

@ -47,7 +47,7 @@ void register_node_type_cmp_math()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_MATH, "Math", NODE_CLASS_CONVERTER, 0);
cmp_node_type_base(&ntype, CMP_NODE_MATH, "Math", NODE_CLASS_CONVERTER);
ntype.declare = blender::nodes::cmp_node_math_declare;
ntype.labelfunc = node_math_label;
node_type_update(&ntype, node_math_update);

View File

@ -42,7 +42,8 @@ void register_node_type_cmp_mix_rgb()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR, NODE_PREVIEW);
cmp_node_type_base(&ntype, CMP_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR);
ntype.flag |= NODE_PREVIEW;
ntype.declare = blender::nodes::cmp_node_mixrgb_declare;
ntype.labelfunc = node_blend_label;

View File

@ -100,11 +100,12 @@ void register_node_type_cmp_movieclip()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_MOVIECLIP, "Movie Clip", NODE_CLASS_INPUT, NODE_PREVIEW);
cmp_node_type_base(&ntype, CMP_NODE_MOVIECLIP, "Movie Clip", NODE_CLASS_INPUT);
ntype.declare = blender::nodes::cmp_node_movieclip_declare;
ntype.draw_buttons = node_composit_buts_movieclip;
ntype.draw_buttons_ex = node_composit_buts_movieclip_ex;
ntype.initfunc_api = init;
ntype.flag |= NODE_PREVIEW;
node_type_storage(
&ntype, "MovieClipUser", node_free_standard_storage, node_copy_standard_storage);

View File

@ -102,7 +102,7 @@ void register_node_type_cmp_moviedistortion()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_MOVIEDISTORTION, "Movie Distortion", NODE_CLASS_DISTORT, 0);
cmp_node_type_base(&ntype, CMP_NODE_MOVIEDISTORTION, "Movie Distortion", NODE_CLASS_DISTORT);
ntype.declare = blender::nodes::cmp_node_moviedistortion_declare;
ntype.draw_buttons = node_composit_buts_moviedistortion;
ntype.labelfunc = label;

View File

@ -44,7 +44,7 @@ void register_node_type_cmp_normal()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_NORMAL, "Normal", NODE_CLASS_OP_VECTOR, 0);
cmp_node_type_base(&ntype, CMP_NODE_NORMAL, "Normal", NODE_CLASS_OP_VECTOR);
ntype.declare = blender::nodes::cmp_node_normal_declare;
nodeRegisterType(&ntype);

View File

@ -39,7 +39,7 @@ void register_node_type_cmp_normalize()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_NORMALIZE, "Normalize", NODE_CLASS_OP_VECTOR, 0);
cmp_node_type_base(&ntype, CMP_NODE_NORMALIZE, "Normalize", NODE_CLASS_OP_VECTOR);
ntype.declare = blender::nodes::cmp_node_normalize_declare;
nodeRegisterType(&ntype);

View File

@ -439,11 +439,12 @@ void register_node_type_cmp_output_file()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_OUTPUT_FILE, "File Output", NODE_CLASS_OUTPUT, NODE_PREVIEW);
cmp_node_type_base(&ntype, CMP_NODE_OUTPUT_FILE, "File Output", NODE_CLASS_OUTPUT);
node_type_socket_templates(&ntype, nullptr, nullptr);
ntype.draw_buttons = node_composit_buts_file_output;
ntype.draw_buttons_ex = node_composit_buts_file_output_ex;
ntype.initfunc_api = init_output_file;
ntype.flag |= NODE_PREVIEW;
node_type_storage(&ntype, "NodeImageMultiFile", free_output_file, copy_output_file);
node_type_update(&ntype, update_output_file);

View File

@ -39,7 +39,7 @@ void register_node_type_cmp_pixelate()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_PIXELATE, "Pixelate", NODE_CLASS_OP_FILTER, 0);
cmp_node_type_base(&ntype, CMP_NODE_PIXELATE, "Pixelate", NODE_CLASS_OP_FILTER);
ntype.declare = blender::nodes::cmp_node_pixelate_declare;
nodeRegisterType(&ntype);

View File

@ -100,8 +100,7 @@ void register_node_type_cmp_planetrackdeform()
{
static bNodeType ntype;
cmp_node_type_base(
&ntype, CMP_NODE_PLANETRACKDEFORM, "Plane Track Deform", NODE_CLASS_DISTORT, 0);
cmp_node_type_base(&ntype, CMP_NODE_PLANETRACKDEFORM, "Plane Track Deform", NODE_CLASS_DISTORT);
ntype.declare = blender::nodes::cmp_node_planetrackdeform_declare;
ntype.draw_buttons = node_composit_buts_planetrackdeform;
node_type_init(&ntype, init);

View File

@ -40,7 +40,7 @@ void register_node_type_cmp_posterize()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_POSTERIZE, "Posterize", NODE_CLASS_OP_COLOR, 0);
cmp_node_type_base(&ntype, CMP_NODE_POSTERIZE, "Posterize", NODE_CLASS_OP_COLOR);
ntype.declare = blender::nodes::cmp_node_posterize_declare;
nodeRegisterType(&ntype);

View File

@ -47,7 +47,7 @@ void register_node_type_cmp_premulkey()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_PREMULKEY, "Alpha Convert", NODE_CLASS_CONVERTER, 0);
cmp_node_type_base(&ntype, CMP_NODE_PREMULKEY, "Alpha Convert", NODE_CLASS_CONVERTER);
ntype.declare = blender::nodes::cmp_node_premulkey_declare;
ntype.draw_buttons = node_composit_buts_premulkey;

View File

@ -38,7 +38,7 @@ void register_node_type_cmp_rgb()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_RGB, "RGB", NODE_CLASS_INPUT, 0);
cmp_node_type_base(&ntype, CMP_NODE_RGB, "RGB", NODE_CLASS_INPUT);
ntype.declare = blender::nodes::cmp_node_rgb_declare;
node_type_size_preset(&ntype, NODE_SIZE_SMALL);

View File

@ -57,7 +57,7 @@ void register_node_type_cmp_rotate()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_ROTATE, "Rotate", NODE_CLASS_DISTORT, 0);
cmp_node_type_base(&ntype, CMP_NODE_ROTATE, "Rotate", NODE_CLASS_DISTORT);
ntype.declare = blender::nodes::cmp_node_rotate_declare;
ntype.draw_buttons = node_composit_buts_rotate;
node_type_init(&ntype, node_composit_init_rotate);

View File

@ -77,7 +77,7 @@ void register_node_type_cmp_scale()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_SCALE, "Scale", NODE_CLASS_DISTORT, 0);
cmp_node_type_base(&ntype, CMP_NODE_SCALE, "Scale", NODE_CLASS_DISTORT);
ntype.declare = blender::nodes::cmp_node_scale_declare;
ntype.draw_buttons = node_composit_buts_scale;
node_type_update(&ntype, node_composite_update_scale);

View File

@ -42,7 +42,7 @@ void register_node_type_cmp_sephsva()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_SEPHSVA, "Separate HSVA", NODE_CLASS_CONVERTER, 0);
cmp_node_type_base(&ntype, CMP_NODE_SEPHSVA, "Separate HSVA", NODE_CLASS_CONVERTER);
ntype.declare = blender::nodes::cmp_node_sephsva_declare;
nodeRegisterType(&ntype);
}
@ -66,7 +66,7 @@ void register_node_type_cmp_combhsva()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_COMBHSVA, "Combine HSVA", NODE_CLASS_CONVERTER, 0);
cmp_node_type_base(&ntype, CMP_NODE_COMBHSVA, "Combine HSVA", NODE_CLASS_CONVERTER);
ntype.declare = blender::nodes::cmp_node_combhsva_declare;
nodeRegisterType(&ntype);

View File

@ -41,7 +41,7 @@ void register_node_type_cmp_seprgba()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_SEPRGBA, "Separate RGBA", NODE_CLASS_CONVERTER, 0);
cmp_node_type_base(&ntype, CMP_NODE_SEPRGBA, "Separate RGBA", NODE_CLASS_CONVERTER);
ntype.declare = blender::nodes::cmp_node_seprgba_declare;
nodeRegisterType(&ntype);
@ -66,7 +66,7 @@ void register_node_type_cmp_combrgba()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_COMBRGBA, "Combine RGBA", NODE_CLASS_CONVERTER, 0);
cmp_node_type_base(&ntype, CMP_NODE_COMBRGBA, "Combine RGBA", NODE_CLASS_CONVERTER);
ntype.declare = blender::nodes::cmp_node_combrgba_declare;
nodeRegisterType(&ntype);

View File

@ -47,7 +47,7 @@ void register_node_type_cmp_sepycca()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_SEPYCCA, "Separate YCbCrA", NODE_CLASS_CONVERTER, 0);
cmp_node_type_base(&ntype, CMP_NODE_SEPYCCA, "Separate YCbCrA", NODE_CLASS_CONVERTER);
ntype.declare = blender::nodes::cmp_node_sepycca_declare;
node_type_init(&ntype, node_composit_init_mode_sepycca);
@ -78,7 +78,7 @@ void register_node_type_cmp_combycca()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_COMBYCCA, "Combine YCbCrA", NODE_CLASS_CONVERTER, 0);
cmp_node_type_base(&ntype, CMP_NODE_COMBYCCA, "Combine YCbCrA", NODE_CLASS_CONVERTER);
ntype.declare = blender::nodes::cmp_node_combycca_declare;
node_type_init(&ntype, node_composit_init_mode_combycca);

View File

@ -42,7 +42,7 @@ void register_node_type_cmp_sepyuva()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_SEPYUVA, "Separate YUVA", NODE_CLASS_CONVERTER, 0);
cmp_node_type_base(&ntype, CMP_NODE_SEPYUVA, "Separate YUVA", NODE_CLASS_CONVERTER);
ntype.declare = blender::nodes::cmp_node_sepyuva_declare;
nodeRegisterType(&ntype);
@ -67,7 +67,7 @@ void register_node_type_cmp_combyuva()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_COMBYUVA, "Combine YUVA", NODE_CLASS_CONVERTER, 0);
cmp_node_type_base(&ntype, CMP_NODE_COMBYUVA, "Combine YUVA", NODE_CLASS_CONVERTER);
ntype.declare = blender::nodes::cmp_node_combyuva_declare;
nodeRegisterType(&ntype);

View File

@ -55,7 +55,7 @@ void register_node_type_cmp_setalpha()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_SETALPHA, "Set Alpha", NODE_CLASS_CONVERTER, 0);
cmp_node_type_base(&ntype, CMP_NODE_SETALPHA, "Set Alpha", NODE_CLASS_CONVERTER);
ntype.declare = blender::nodes::cmp_node_setalpha_declare;
ntype.draw_buttons = node_composit_buts_set_alpha;
node_type_init(&ntype, node_composit_init_setalpha);

View File

@ -65,10 +65,10 @@ void register_node_type_cmp_splitviewer()
{
static bNodeType ntype;
cmp_node_type_base(
&ntype, CMP_NODE_SPLITVIEWER, "Split Viewer", NODE_CLASS_OUTPUT, NODE_PREVIEW);
cmp_node_type_base(&ntype, CMP_NODE_SPLITVIEWER, "Split Viewer", NODE_CLASS_OUTPUT);
ntype.declare = blender::nodes::cmp_node_split_viewer_declare;
ntype.draw_buttons = node_composit_buts_splitviewer;
ntype.flag |= NODE_PREVIEW;
node_type_init(&ntype, node_composit_init_splitviewer);
node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage);

View File

@ -80,7 +80,7 @@ void register_node_type_cmp_stabilize2d()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_STABILIZE2D, "Stabilize 2D", NODE_CLASS_DISTORT, 0);
cmp_node_type_base(&ntype, CMP_NODE_STABILIZE2D, "Stabilize 2D", NODE_CLASS_DISTORT);
ntype.declare = blender::nodes::cmp_node_stabilize2d_declare;
ntype.draw_buttons = node_composit_buts_stabilize2d;
ntype.initfunc_api = init;

View File

@ -60,7 +60,7 @@ void register_node_type_cmp_sunbeams()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_SUNBEAMS, "Sun Beams", NODE_CLASS_OP_FILTER, 0);
cmp_node_type_base(&ntype, CMP_NODE_SUNBEAMS, "Sun Beams", NODE_CLASS_OP_FILTER);
ntype.declare = blender::nodes::cmp_node_sunbeams_declare;
ntype.draw_buttons = node_composit_buts_sunbeams;
node_type_init(&ntype, init);

View File

@ -49,7 +49,7 @@ void register_node_type_cmp_switch()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_SWITCH, "Switch", NODE_CLASS_LAYOUT, 0);
cmp_node_type_base(&ntype, CMP_NODE_SWITCH, "Switch", NODE_CLASS_LAYOUT);
ntype.declare = blender::nodes::cmp_node_switch_declare;
ntype.draw_buttons = node_composit_buts_switch;
node_type_size_preset(&ntype, NODE_SIZE_SMALL);

View File

@ -159,7 +159,7 @@ void register_node_type_cmp_switch_view()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_SWITCH_VIEW, "Switch View", NODE_CLASS_CONVERTER, 0);
cmp_node_type_base(&ntype, CMP_NODE_SWITCH_VIEW, "Switch View", NODE_CLASS_CONVERTER);
node_type_socket_templates(&ntype, nullptr, cmp_node_switch_view_out);
ntype.draw_buttons_ex = node_composit_buts_switch_view_ex;
ntype.initfunc_api = init_switch_view;

View File

@ -45,8 +45,9 @@ void register_node_type_cmp_texture()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT, NODE_PREVIEW);
cmp_node_type_base(&ntype, CMP_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT);
ntype.declare = blender::nodes::cmp_node_texture_declare;
ntype.flag |= NODE_PREVIEW;
nodeRegisterType(&ntype);
}

View File

@ -80,7 +80,7 @@ void register_node_type_cmp_tonemap()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_TONEMAP, "Tonemap", NODE_CLASS_OP_COLOR, 0);
cmp_node_type_base(&ntype, CMP_NODE_TONEMAP, "Tonemap", NODE_CLASS_OP_COLOR);
ntype.declare = blender::nodes::cmp_node_tonemap_declare;
ntype.draw_buttons = node_composit_buts_tonemap;
node_type_init(&ntype, node_composit_init_tonemap);

View File

@ -98,7 +98,7 @@ void register_node_type_cmp_trackpos()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_TRACKPOS, "Track Position", NODE_CLASS_INPUT, 0);
cmp_node_type_base(&ntype, CMP_NODE_TRACKPOS, "Track Position", NODE_CLASS_INPUT);
ntype.declare = blender::nodes::cmp_node_trackpos_declare;
ntype.draw_buttons = node_composit_buts_trackpos;
node_type_init(&ntype, init);

View File

@ -55,7 +55,7 @@ void register_node_type_cmp_transform()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_TRANSFORM, "Transform", NODE_CLASS_DISTORT, 0);
cmp_node_type_base(&ntype, CMP_NODE_TRANSFORM, "Transform", NODE_CLASS_DISTORT);
ntype.declare = blender::nodes::cmp_node_transform_declare;
ntype.draw_buttons = node_composit_buts_transform;

View File

@ -56,7 +56,7 @@ void register_node_type_cmp_translate()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_TRANSLATE, "Translate", NODE_CLASS_DISTORT, 0);
cmp_node_type_base(&ntype, CMP_NODE_TRANSLATE, "Translate", NODE_CLASS_DISTORT);
ntype.declare = blender::nodes::cmp_node_translate_declare;
ntype.draw_buttons = node_composit_buts_translate;
node_type_init(&ntype, node_composit_init_translate);

View File

@ -45,7 +45,7 @@ void register_node_type_cmp_valtorgb()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTER, 0);
cmp_node_type_base(&ntype, CMP_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTER);
ntype.declare = blender::nodes::cmp_node_valtorgb_declare;
node_type_size(&ntype, 240, 200, 320);
node_type_init(&ntype, node_composit_init_valtorgb);
@ -70,7 +70,7 @@ void register_node_type_cmp_rgbtobw()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTER, 0);
cmp_node_type_base(&ntype, CMP_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTER);
ntype.declare = blender::nodes::cmp_node_rgbtobw_declare;
node_type_size_preset(&ntype, NODE_SIZE_SMALL);

View File

@ -38,7 +38,7 @@ void register_node_type_cmp_value()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_VALUE, "Value", NODE_CLASS_INPUT, 0);
cmp_node_type_base(&ntype, CMP_NODE_VALUE, "Value", NODE_CLASS_INPUT);
ntype.declare = blender::nodes::cmp_node_value_declare;
node_type_size_preset(&ntype, NODE_SIZE_SMALL);

View File

@ -73,7 +73,7 @@ void register_node_type_cmp_vecblur()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_VECBLUR, "Vector Blur", NODE_CLASS_OP_FILTER, 0);
cmp_node_type_base(&ntype, CMP_NODE_VECBLUR, "Vector Blur", NODE_CLASS_OP_FILTER);
ntype.declare = blender::nodes::cmp_node_vec_blur_declare;
ntype.draw_buttons = node_composit_buts_vecblur;
node_type_init(&ntype, node_composit_init_vecblur);

View File

@ -77,10 +77,11 @@ void register_node_type_cmp_viewer()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_VIEWER, "Viewer", NODE_CLASS_OUTPUT, NODE_PREVIEW);
cmp_node_type_base(&ntype, CMP_NODE_VIEWER, "Viewer", NODE_CLASS_OUTPUT);
ntype.declare = blender::nodes::cmp_node_viewer_declare;
ntype.draw_buttons = node_composit_buts_viewer;
ntype.draw_buttons_ex = node_composit_buts_viewer_ex;
ntype.flag |= NODE_PREVIEW;
node_type_init(&ntype, node_composit_init_viewer);
node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage);

View File

@ -55,7 +55,7 @@ void register_node_type_cmp_zcombine()
{
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_ZCOMBINE, "Z Combine", NODE_CLASS_OP_COLOR, 0);
cmp_node_type_base(&ntype, CMP_NODE_ZCOMBINE, "Z Combine", NODE_CLASS_OP_COLOR);
ntype.declare = blender::nodes::cmp_node_zcombine_declare;
ntype.draw_buttons = node_composit_buts_zcombine;

View File

@ -31,9 +31,9 @@ static bool fn_node_poll_default(bNodeType *UNUSED(ntype),
return true;
}
void fn_node_type_base(bNodeType *ntype, int type, const char *name, short nclass, short flag)
void fn_node_type_base(bNodeType *ntype, int type, const char *name, short nclass)
{
node_type_base(ntype, type, name, nclass, flag);
node_type_base(ntype, type, name, nclass);
ntype->poll = fn_node_poll_default;
ntype->insert_link = node_insert_link_default;
ntype->gather_link_search_ops = blender::nodes::search_link_ops_for_basic_node;

View File

@ -37,5 +37,4 @@
#include "FN_multi_function_builder.hh"
void fn_node_type_base(
struct bNodeType *ntype, int type, const char *name, short nclass, short flag);
void fn_node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass);

View File

@ -81,7 +81,7 @@ void register_node_type_fn_legacy_random_float()
static bNodeType ntype;
fn_node_type_base(&ntype, FN_NODE_LEGACY_RANDOM_FLOAT, "Random Float", 0, 0);
fn_node_type_base(&ntype, FN_NODE_LEGACY_RANDOM_FLOAT, "Random Float", 0);
ntype.declare = file_ns::fn_node_legacy_random_float_declare;
ntype.build_multi_function = file_ns::fn_node_legacy_random_float_build_multi_function;
nodeRegisterType(&ntype);

View File

@ -216,7 +216,7 @@ void register_node_type_fn_align_euler_to_vector()
static bNodeType ntype;
fn_node_type_base(
&ntype, FN_NODE_ALIGN_EULER_TO_VECTOR, "Align Euler to Vector", NODE_CLASS_CONVERTER, 0);
&ntype, FN_NODE_ALIGN_EULER_TO_VECTOR, "Align Euler to Vector", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::fn_node_align_euler_to_vector_declare;
ntype.draw_buttons = file_ns::fn_node_align_euler_to_vector_layout;
ntype.build_multi_function = file_ns::fn_node_align_euler_to_vector_build_multi_function;

View File

@ -95,7 +95,7 @@ void register_node_type_fn_boolean_math()
static bNodeType ntype;
fn_node_type_base(&ntype, FN_NODE_BOOLEAN_MATH, "Boolean Math", NODE_CLASS_CONVERTER, 0);
fn_node_type_base(&ntype, FN_NODE_BOOLEAN_MATH, "Boolean Math", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::fn_node_boolean_math_declare;
ntype.labelfunc = file_ns::node_boolean_math_label;
node_type_update(&ntype, file_ns::node_boolean_math_update);

View File

@ -537,7 +537,7 @@ void register_node_type_fn_compare()
namespace file_ns = blender::nodes::node_fn_compare_cc;
static bNodeType ntype;
fn_node_type_base(&ntype, FN_NODE_COMPARE, "Compare", NODE_CLASS_CONVERTER, 0);
fn_node_type_base(&ntype, FN_NODE_COMPARE, "Compare", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::fn_node_compare_declare;
ntype.labelfunc = file_ns::node_compare_label;
node_type_update(&ntype, file_ns::node_compare_update);

View File

@ -89,7 +89,7 @@ void register_node_type_fn_float_to_int()
static bNodeType ntype;
fn_node_type_base(&ntype, FN_NODE_FLOAT_TO_INT, "Float to Integer", NODE_CLASS_CONVERTER, 0);
fn_node_type_base(&ntype, FN_NODE_FLOAT_TO_INT, "Float to Integer", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::fn_node_float_to_int_declare;
ntype.labelfunc = file_ns::node_float_to_int_label;
ntype.build_multi_function = file_ns::fn_node_float_to_int_build_multi_function;

View File

@ -55,7 +55,7 @@ void register_node_type_fn_input_bool()
static bNodeType ntype;
fn_node_type_base(&ntype, FN_NODE_INPUT_BOOL, "Boolean", 0, 0);
fn_node_type_base(&ntype, FN_NODE_INPUT_BOOL, "Boolean", 0);
ntype.declare = file_ns::fn_node_input_bool_declare;
node_type_init(&ntype, file_ns::fn_node_input_bool_init);
node_type_storage(

View File

@ -56,7 +56,7 @@ void register_node_type_fn_input_color()
static bNodeType ntype;
fn_node_type_base(&ntype, FN_NODE_INPUT_COLOR, "Color", NODE_CLASS_INPUT, 0);
fn_node_type_base(&ntype, FN_NODE_INPUT_COLOR, "Color", NODE_CLASS_INPUT);
ntype.declare = file_ns::fn_node_input_color_declare;
node_type_init(&ntype, file_ns::fn_node_input_color_init);
node_type_storage(

View File

@ -55,7 +55,7 @@ void register_node_type_fn_input_int()
static bNodeType ntype;
fn_node_type_base(&ntype, FN_NODE_INPUT_INT, "Integer", 0, 0);
fn_node_type_base(&ntype, FN_NODE_INPUT_INT, "Integer", 0);
ntype.declare = file_ns::fn_node_input_int_declare;
node_type_init(&ntype, file_ns::fn_node_input_int_init);
node_type_storage(

View File

@ -68,7 +68,7 @@ void register_node_type_fn_input_special_characters()
static bNodeType ntype;
fn_node_type_base(
&ntype, FN_NODE_INPUT_SPECIAL_CHARACTERS, "Special Characters", NODE_CLASS_INPUT, 0);
&ntype, FN_NODE_INPUT_SPECIAL_CHARACTERS, "Special Characters", NODE_CLASS_INPUT);
ntype.declare = file_ns::fn_node_input_special_characters_declare;
ntype.build_multi_function = file_ns::fn_node_input_special_characters_build_multi_function;
nodeRegisterType(&ntype);

Some files were not shown because too many files have changed in this diff Show More