Texture Nodes:
* Use node size presets as well, some nodes were too small and also too limited in max size.
This commit is contained in:
@@ -127,7 +127,7 @@ void register_node_type_tex_bricks(void)
|
||||
|
||||
tex_node_type_base(&ntype, TEX_NODE_BRICKS, "Bricks", NODE_CLASS_PATTERN, NODE_PREVIEW|NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, inputs, outputs);
|
||||
node_type_size(&ntype, 150, 60, 150);
|
||||
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
|
||||
node_type_init(&ntype, init);
|
||||
node_type_exec(&ntype, NULL, NULL, exec);
|
||||
|
||||
|
||||
@@ -76,7 +76,6 @@ void register_node_type_tex_checker(void)
|
||||
|
||||
tex_node_type_base(&ntype, TEX_NODE_CHECKER, "Checker", NODE_CLASS_PATTERN, NODE_PREVIEW|NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, inputs, outputs);
|
||||
node_type_size(&ntype, 100, 60, 150);
|
||||
node_type_exec(&ntype, NULL, NULL, exec);
|
||||
|
||||
nodeRegisterType(&ntype);
|
||||
|
||||
@@ -166,7 +166,6 @@ void register_node_type_tex_group(void)
|
||||
RNA_struct_blender_type_set(ntype.ext.srna, &ntype);
|
||||
|
||||
node_type_socket_templates(&ntype, NULL, NULL);
|
||||
node_type_size(&ntype, 120, 60, 200);
|
||||
node_type_label(&ntype, node_group_label);
|
||||
node_type_update(&ntype, NULL, node_group_verify);
|
||||
node_type_exec(&ntype, group_initexec, group_freeexec, group_execute);
|
||||
|
||||
@@ -63,7 +63,6 @@ void register_node_type_tex_compose(void)
|
||||
|
||||
tex_node_type_base(&ntype, TEX_NODE_COMPOSE, "Combine RGBA", NODE_CLASS_OP_COLOR, 0);
|
||||
node_type_socket_templates(&ntype, inputs, outputs);
|
||||
node_type_size(&ntype, 100, 60, 150);
|
||||
node_type_exec(&ntype, NULL, NULL, exec);
|
||||
|
||||
nodeRegisterType(&ntype);
|
||||
|
||||
@@ -54,7 +54,6 @@ void register_node_type_tex_coord(void)
|
||||
|
||||
tex_node_type_base(&ntype, TEX_NODE_COORD, "Coordinates", NODE_CLASS_INPUT, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, NULL, outputs);
|
||||
node_type_size(&ntype, 120, 110, 160);
|
||||
node_type_storage(&ntype, "node_coord", NULL, NULL);
|
||||
node_type_exec(&ntype, NULL, NULL, exec);
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ void register_node_type_tex_curve_time(void)
|
||||
|
||||
tex_node_type_base(&ntype, TEX_NODE_CURVE_TIME, "Time", NODE_CLASS_INPUT, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, NULL, time_outputs);
|
||||
node_type_size(&ntype, 140, 100, 320);
|
||||
node_type_size_preset(&ntype, NODE_SIZE_LARGE);
|
||||
node_type_init(&ntype, time_init);
|
||||
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
|
||||
node_type_exec(&ntype, node_initexec_curves, NULL, time_exec);
|
||||
@@ -117,7 +117,7 @@ void register_node_type_tex_curve_rgb(void)
|
||||
|
||||
tex_node_type_base(&ntype, TEX_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, rgb_inputs, rgb_outputs);
|
||||
node_type_size(&ntype, 200, 140, 320);
|
||||
node_type_size_preset(&ntype, NODE_SIZE_LARGE);
|
||||
node_type_init(&ntype, rgb_init);
|
||||
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
|
||||
node_type_exec(&ntype, node_initexec_curves, NULL, rgb_exec);
|
||||
|
||||
@@ -84,7 +84,6 @@ void register_node_type_tex_decompose(void)
|
||||
|
||||
tex_node_type_base(&ntype, TEX_NODE_DECOMPOSE, "Separate RGBA", NODE_CLASS_OP_COLOR, 0);
|
||||
node_type_socket_templates(&ntype, inputs, outputs);
|
||||
node_type_size(&ntype, 100, 60, 150);
|
||||
node_type_exec(&ntype, NULL, NULL, exec);
|
||||
|
||||
nodeRegisterType(&ntype);
|
||||
|
||||
@@ -67,7 +67,6 @@ void register_node_type_tex_distance(void)
|
||||
|
||||
tex_node_type_base(&ntype, TEX_NODE_DISTANCE, "Distance", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, inputs, outputs);
|
||||
node_type_size(&ntype, 120, 110, 160);
|
||||
node_type_storage(&ntype, "node_distance", NULL, NULL);
|
||||
node_type_exec(&ntype, NULL, NULL, exec);
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ void register_node_type_tex_hue_sat(void)
|
||||
|
||||
tex_node_type_base(&ntype, TEX_NODE_HUE_SAT, "Hue Saturation Value", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, inputs, outputs);
|
||||
node_type_size(&ntype, 150, 80, 250);
|
||||
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
|
||||
node_type_exec(&ntype, NULL, NULL, exec);
|
||||
|
||||
nodeRegisterType(&ntype);
|
||||
|
||||
@@ -103,7 +103,6 @@ void register_node_type_tex_image(void)
|
||||
|
||||
tex_node_type_base(&ntype, TEX_NODE_IMAGE, "Image", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, NULL, outputs);
|
||||
node_type_size(&ntype, 120, 80, 300);
|
||||
node_type_init(&ntype, init);
|
||||
node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage);
|
||||
node_type_exec(&ntype, NULL, NULL, exec);
|
||||
|
||||
@@ -69,7 +69,6 @@ void register_node_type_tex_invert(void)
|
||||
|
||||
tex_node_type_base(&ntype, TEX_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, inputs, outputs);
|
||||
node_type_size(&ntype, 90, 80, 100);
|
||||
node_type_exec(&ntype, NULL, NULL, exec);
|
||||
|
||||
nodeRegisterType(&ntype);
|
||||
|
||||
@@ -201,7 +201,6 @@ void register_node_type_tex_math(void)
|
||||
|
||||
tex_node_type_base(&ntype, TEX_NODE_MATH, "Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, inputs, outputs);
|
||||
node_type_size(&ntype, 120, 110, 160);
|
||||
node_type_label(&ntype, node_math_label);
|
||||
node_type_storage(&ntype, "node_math", NULL, NULL);
|
||||
node_type_exec(&ntype, NULL, NULL, exec);
|
||||
|
||||
@@ -74,7 +74,6 @@ void register_node_type_tex_mix_rgb(void)
|
||||
|
||||
tex_node_type_base(&ntype, TEX_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, inputs, outputs);
|
||||
node_type_size(&ntype, 100, 60, 150);
|
||||
node_type_label(&ntype, node_blend_label);
|
||||
node_type_exec(&ntype, NULL, NULL, exec);
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ void register_node_type_tex_output(void)
|
||||
|
||||
tex_node_type_base(&ntype, TEX_NODE_OUTPUT, "Output", NODE_CLASS_OUTPUT, NODE_PREVIEW|NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, inputs, NULL);
|
||||
node_type_size(&ntype, 150, 60, 200);
|
||||
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
|
||||
node_type_init(&ntype, init);
|
||||
node_type_storage(&ntype, "TexNodeOutput", node_free_standard_storage, copy);
|
||||
node_type_exec(&ntype, NULL, NULL, exec);
|
||||
|
||||
@@ -302,7 +302,7 @@ void register_node_type_tex_proc_##name(void) \
|
||||
\
|
||||
tex_node_type_base(&ntype, TEX_NODE_PROC+TEXTYPE, Name, NODE_CLASS_TEXTURE, NODE_PREVIEW | NODE_OPTIONS); \
|
||||
node_type_socket_templates(&ntype, name##_inputs, outputs); \
|
||||
node_type_size(&ntype, 140, 80, 140); \
|
||||
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE); \
|
||||
node_type_init(&ntype, init); \
|
||||
node_type_storage(&ntype, "Tex", node_free_standard_storage, node_copy_standard_storage); \
|
||||
node_type_exec(&ntype, NULL, NULL, name##_exec); \
|
||||
|
||||
@@ -101,7 +101,6 @@ void register_node_type_tex_rotate(void)
|
||||
|
||||
tex_node_type_base(&ntype, TEX_NODE_ROTATE, "Rotate", NODE_CLASS_DISTORT, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, inputs, outputs);
|
||||
node_type_size(&ntype, 140, 100, 320);
|
||||
node_type_exec(&ntype, NULL, NULL, exec);
|
||||
|
||||
nodeRegisterType(&ntype);
|
||||
|
||||
@@ -74,7 +74,6 @@ void register_node_type_tex_scale(void)
|
||||
|
||||
tex_node_type_base(&ntype, TEX_NODE_SCALE, "Scale", NODE_CLASS_DISTORT, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, inputs, outputs);
|
||||
node_type_size(&ntype, 90, 80, 100);
|
||||
node_type_exec(&ntype, NULL, NULL, exec);
|
||||
|
||||
nodeRegisterType(&ntype);
|
||||
|
||||
@@ -101,7 +101,6 @@ void register_node_type_tex_texture(void)
|
||||
|
||||
tex_node_type_base(&ntype, TEX_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, inputs, outputs);
|
||||
node_type_size(&ntype, 120, 80, 240);
|
||||
node_type_exec(&ntype, NULL, NULL, exec);
|
||||
|
||||
nodeRegisterType(&ntype);
|
||||
|
||||
@@ -70,7 +70,6 @@ void register_node_type_tex_translate(void)
|
||||
|
||||
tex_node_type_base(&ntype, TEX_NODE_TRANSLATE, "Translate", NODE_CLASS_DISTORT, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, inputs, outputs);
|
||||
node_type_size(&ntype, 90, 80, 100);
|
||||
node_type_exec(&ntype, NULL, NULL, exec);
|
||||
|
||||
nodeRegisterType(&ntype);
|
||||
|
||||
@@ -86,7 +86,6 @@ void register_node_type_tex_valtonor(void)
|
||||
|
||||
tex_node_type_base(&ntype, TEX_NODE_VALTONOR, "Value to Normal", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, inputs, outputs);
|
||||
node_type_size(&ntype, 90, 80, 100);
|
||||
node_type_exec(&ntype, NULL, NULL, exec);
|
||||
|
||||
nodeRegisterType(&ntype);
|
||||
|
||||
@@ -68,7 +68,7 @@ void register_node_type_tex_valtorgb(void)
|
||||
|
||||
tex_node_type_base(&ntype, TEX_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
|
||||
node_type_socket_templates(&ntype, valtorgb_in, valtorgb_out);
|
||||
node_type_size(&ntype, 240, 200, 300);
|
||||
node_type_size_preset(&ntype, NODE_SIZE_LARGE);
|
||||
node_type_init(&ntype, valtorgb_init);
|
||||
node_type_storage(&ntype, "ColorBand", node_free_standard_storage, node_copy_standard_storage);
|
||||
node_type_exec(&ntype, NULL, NULL, valtorgb_exec);
|
||||
@@ -105,7 +105,6 @@ void register_node_type_tex_rgbtobw(void)
|
||||
|
||||
tex_node_type_base(&ntype, TEX_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTOR, 0);
|
||||
node_type_socket_templates(&ntype, rgbtobw_in, rgbtobw_out);
|
||||
node_type_size(&ntype, 80, 40, 120);
|
||||
node_type_exec(&ntype, NULL, NULL, rgbtobw_exec);
|
||||
|
||||
nodeRegisterType(&ntype);
|
||||
|
||||
@@ -62,7 +62,6 @@ void register_node_type_tex_viewer(void)
|
||||
|
||||
tex_node_type_base(&ntype, TEX_NODE_VIEWER, "Viewer", NODE_CLASS_OUTPUT, NODE_PREVIEW);
|
||||
node_type_socket_templates(&ntype, inputs, outputs);
|
||||
node_type_size(&ntype, 100, 60, 150);
|
||||
node_type_exec(&ntype, NULL, NULL, exec);
|
||||
|
||||
/* Do not allow muting viewer node. */
|
||||
|
||||
Reference in New Issue
Block a user