Cleanup: I18n: Remove extraction macros from node socket declarations
The previous two commits introduced new regexes to extract node socket names and descriptions automatically from the i18n Python module, including socket labels. This commit removes the extraction macros from all node files since they are now redundant. Pull Request: https://projects.blender.org/blender/blender/pulls/107258
This commit is contained in:
@@ -22,19 +22,19 @@ NODE_STORAGE_FUNCS(NodeTwoFloats)
|
||||
|
||||
static void cmp_node_alphaover_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Fac"))
|
||||
b.add_input<decl::Float>("Fac")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR)
|
||||
.compositor_domain_priority(2);
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Color>(N_("Image"), "Image_001")
|
||||
b.add_input<decl::Color>("Image", "Image_001")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(1);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_alphaover_init(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -23,10 +23,10 @@ NODE_STORAGE_FUNCS(NodeAntiAliasingData)
|
||||
|
||||
static void cmp_node_antialiasing_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_init_antialiasing(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -25,13 +25,13 @@ NODE_STORAGE_FUNCS(NodeBilateralBlurData)
|
||||
|
||||
static void cmp_node_bilateralblur_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Color>(N_("Determinator"))
|
||||
b.add_input<decl::Color>("Determinator")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(1);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_init_bilateralblur(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -34,15 +34,15 @@ NODE_STORAGE_FUNCS(NodeBlurData)
|
||||
|
||||
static void cmp_node_blur_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>(N_("Size"))
|
||||
b.add_input<decl::Float>("Size")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(1);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_init_blur(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -24,23 +24,23 @@ namespace blender::nodes::node_composite_bokehblur_cc {
|
||||
|
||||
static void cmp_node_bokehblur_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({0.8f, 0.8f, 0.8f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Color>(N_("Bokeh"))
|
||||
b.add_input<decl::Color>("Bokeh")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_skip_realization();
|
||||
b.add_input<decl::Float>(N_("Size"))
|
||||
b.add_input<decl::Float>("Size")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(10.0f)
|
||||
.compositor_domain_priority(1);
|
||||
b.add_input<decl::Float>(N_("Bounding box"))
|
||||
b.add_input<decl::Float>("Bounding box")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(2);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_init_bokehblur(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -26,7 +26,7 @@ NODE_STORAGE_FUNCS(NodeBokehImage)
|
||||
|
||||
static void cmp_node_bokehimage_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_init_bokehimage(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -27,17 +27,17 @@ NODE_STORAGE_FUNCS(NodeBoxMask)
|
||||
|
||||
static void cmp_node_boxmask_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Mask"))
|
||||
b.add_input<decl::Float>("Mask")
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>(N_("Value"))
|
||||
b.add_input<decl::Float>("Value")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(1);
|
||||
b.add_output<decl::Float>(N_("Mask"));
|
||||
b.add_output<decl::Float>("Mask");
|
||||
}
|
||||
|
||||
static void node_composit_init_boxmask(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -20,12 +20,12 @@ namespace blender::nodes::node_composite_brightness_cc {
|
||||
|
||||
static void cmp_node_brightcontrast_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>(N_("Bright")).min(-100.0f).max(100.0f).compositor_domain_priority(1);
|
||||
b.add_input<decl::Float>(N_("Contrast")).min(-100.0f).max(100.0f).compositor_domain_priority(2);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_input<decl::Float>("Bright").min(-100.0f).max(100.0f).compositor_domain_priority(1);
|
||||
b.add_input<decl::Float>("Contrast").min(-100.0f).max(100.0f).compositor_domain_priority(2);
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_init_brightcontrast(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -24,11 +24,11 @@ NODE_STORAGE_FUNCS(NodeChroma)
|
||||
|
||||
static void cmp_node_channel_matte_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Float>(N_("Matte"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
b.add_output<decl::Float>("Matte");
|
||||
}
|
||||
|
||||
static void node_composit_init_channel_matte(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -26,14 +26,14 @@ NODE_STORAGE_FUNCS(NodeChroma)
|
||||
|
||||
static void cmp_node_chroma_matte_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Color>(N_("Key Color"))
|
||||
b.add_input<decl::Color>("Key Color")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(1);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Float>(N_("Matte"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
b.add_output<decl::Float>("Matte");
|
||||
}
|
||||
|
||||
static void node_composit_init_chroma_matte(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -22,14 +22,14 @@ NODE_STORAGE_FUNCS(NodeChroma)
|
||||
|
||||
static void cmp_node_color_matte_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Color>(N_("Key Color"))
|
||||
b.add_input<decl::Color>("Key Color")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(1);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Float>(N_("Matte"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
b.add_output<decl::Float>("Matte");
|
||||
}
|
||||
|
||||
static void node_composit_init_color_matte(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -24,16 +24,16 @@ NODE_STORAGE_FUNCS(NodeColorspill)
|
||||
|
||||
static void cmp_node_color_spill_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>(N_("Fac"))
|
||||
b.add_input<decl::Float>("Fac")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR)
|
||||
.compositor_domain_priority(1);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_init_color_spill(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -52,16 +52,16 @@ NODE_STORAGE_FUNCS(NodeColorBalance)
|
||||
|
||||
static void cmp_node_colorbalance_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Fac"))
|
||||
b.add_input<decl::Float>("Fac")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR)
|
||||
.compositor_domain_priority(1);
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_init_colorbalance(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -24,15 +24,15 @@ NODE_STORAGE_FUNCS(NodeColorCorrection)
|
||||
|
||||
static void cmp_node_colorcorrection_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>(N_("Mask"))
|
||||
b.add_input<decl::Float>("Mask")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(1);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_init_colorcorrection(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -25,9 +25,9 @@ namespace blender::nodes::node_composite_composite_cc {
|
||||
|
||||
static void cmp_node_composite_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image")).default_value({0.0f, 0.0f, 0.0f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Alpha")).default_value(1.0f).min(0.0f).max(1.0f);
|
||||
b.add_input<decl::Float>(N_("Z")).default_value(1.0f).min(0.0f).max(1.0f);
|
||||
b.add_input<decl::Color>("Image").default_value({0.0f, 0.0f, 0.0f, 1.0f});
|
||||
b.add_input<decl::Float>("Alpha").default_value(1.0f).min(0.0f).max(1.0f);
|
||||
b.add_input<decl::Float>("Z").default_value(1.0f).min(0.0f).max(1.0f);
|
||||
}
|
||||
|
||||
static void node_composit_buts_composite(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -28,10 +28,10 @@ NODE_STORAGE_FUNCS(NodeConvertColorSpace)
|
||||
|
||||
static void CMP_NODE_CONVERT_COLOR_SPACE_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_init_convert_colorspace(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -25,31 +25,31 @@ namespace blender::nodes::node_composite_cornerpin_cc {
|
||||
|
||||
static void cmp_node_cornerpin_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Vector>(N_("Upper Left"))
|
||||
b.add_input<decl::Vector>("Upper Left")
|
||||
.default_value({0.0f, 1.0f, 0.0f})
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_expects_single_value();
|
||||
b.add_input<decl::Vector>(N_("Upper Right"))
|
||||
b.add_input<decl::Vector>("Upper Right")
|
||||
.default_value({1.0f, 1.0f, 0.0f})
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_expects_single_value();
|
||||
b.add_input<decl::Vector>(N_("Lower Left"))
|
||||
b.add_input<decl::Vector>("Lower Left")
|
||||
.default_value({0.0f, 0.0f, 0.0f})
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_expects_single_value();
|
||||
b.add_input<decl::Vector>(N_("Lower Right"))
|
||||
b.add_input<decl::Vector>("Lower Right")
|
||||
.default_value({1.0f, 0.0f, 0.0f})
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_expects_single_value();
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Float>(N_("Plane"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
b.add_output<decl::Float>("Plane");
|
||||
}
|
||||
|
||||
using namespace blender::realtime_compositor;
|
||||
|
||||
@@ -31,10 +31,10 @@ NODE_STORAGE_FUNCS(NodeTwoXYs)
|
||||
|
||||
static void cmp_node_crop_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_init_crop(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace blender::nodes::node_composite_time_curves_cc {
|
||||
|
||||
static void cmp_node_time_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Float>(N_("Fac"));
|
||||
b.add_output<decl::Float>("Fac");
|
||||
}
|
||||
|
||||
/* custom1 = start_frame, custom2 = end_frame */
|
||||
@@ -113,12 +113,12 @@ namespace blender::nodes::node_composite_vector_curves_cc {
|
||||
|
||||
static void cmp_node_curve_vec_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Vector>(N_("Vector"))
|
||||
b.add_input<decl::Vector>("Vector")
|
||||
.default_value({0.0f, 0.0f, 0.0f})
|
||||
.min(-1.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Vector>(N_("Vector"));
|
||||
b.add_output<decl::Vector>("Vector");
|
||||
}
|
||||
|
||||
static void node_composit_init_curve_vec(bNodeTree * /*ntree*/, bNode *node)
|
||||
@@ -208,18 +208,18 @@ namespace blender::nodes::node_composite_rgb_curves_cc {
|
||||
|
||||
static void cmp_node_rgbcurves_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Fac"))
|
||||
b.add_input<decl::Float>("Fac")
|
||||
.default_value(1.0f)
|
||||
.min(-1.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR)
|
||||
.compositor_domain_priority(1);
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Color>(N_("Black Level")).default_value({0.0f, 0.0f, 0.0f, 1.0f});
|
||||
b.add_input<decl::Color>(N_("White Level")).default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_input<decl::Color>("Black Level").default_value({0.0f, 0.0f, 0.0f, 1.0f});
|
||||
b.add_input<decl::Color>("White Level").default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_init_curve_rgb(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -24,9 +24,9 @@ namespace blender::nodes::node_composite_defocus_cc {
|
||||
|
||||
static void cmp_node_defocus_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image")).default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Z")).default_value(1.0f).min(0.0f).max(1.0f);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_input<decl::Color>("Image").default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_input<decl::Float>("Z").default_value(1.0f).min(0.0f).max(1.0f);
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_init_defocus(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -33,20 +33,20 @@ NODE_STORAGE_FUNCS(NodeDenoise)
|
||||
|
||||
static void cmp_node_denoise_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Vector>(N_("Normal"))
|
||||
b.add_input<decl::Vector>("Normal")
|
||||
.default_value({0.0f, 0.0f, 0.0f})
|
||||
.min(-1.0f)
|
||||
.max(1.0f)
|
||||
.hide_value()
|
||||
.compositor_domain_priority(2);
|
||||
b.add_input<decl::Color>(N_("Albedo"))
|
||||
b.add_input<decl::Color>("Albedo")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.hide_value()
|
||||
.compositor_domain_priority(1);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_init_denonise(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -21,16 +21,16 @@ namespace blender::nodes::node_composite_despeckle_cc {
|
||||
|
||||
static void cmp_node_despeckle_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Fac"))
|
||||
b.add_input<decl::Float>("Fac")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR)
|
||||
.compositor_domain_priority(1);
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_init_despeckle(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -22,14 +22,14 @@ NODE_STORAGE_FUNCS(NodeChroma)
|
||||
|
||||
static void cmp_node_diff_matte_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image 1"))
|
||||
b.add_input<decl::Color>("Image 1")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Color>(N_("Image 2"))
|
||||
b.add_input<decl::Color>("Image 2")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(1);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Float>(N_("Matte"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
b.add_output<decl::Float>("Matte");
|
||||
}
|
||||
|
||||
static void node_composit_init_diff_matte(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -32,8 +32,8 @@ NODE_STORAGE_FUNCS(NodeDilateErode)
|
||||
|
||||
static void cmp_node_dilate_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Mask")).default_value(0.0f).min(0.0f).max(1.0f);
|
||||
b.add_output<decl::Float>(N_("Mask"));
|
||||
b.add_input<decl::Float>("Mask").default_value(0.0f).min(0.0f).max(1.0f);
|
||||
b.add_output<decl::Float>("Mask");
|
||||
}
|
||||
|
||||
static void node_composit_init_dilateerode(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -24,10 +24,10 @@ NODE_STORAGE_FUNCS(NodeDBlurData)
|
||||
|
||||
static void cmp_node_directional_blur_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_init_dblur(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -23,26 +23,26 @@ namespace blender::nodes::node_composite_displace_cc {
|
||||
|
||||
static void cmp_node_displace_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Vector>(N_("Vector"))
|
||||
b.add_input<decl::Vector>("Vector")
|
||||
.default_value({1.0f, 1.0f, 1.0f})
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_TRANSLATION)
|
||||
.compositor_domain_priority(1);
|
||||
b.add_input<decl::Float>(N_("X Scale"))
|
||||
b.add_input<decl::Float>("X Scale")
|
||||
.default_value(0.0f)
|
||||
.min(-1000.0f)
|
||||
.max(1000.0f)
|
||||
.compositor_domain_priority(2);
|
||||
b.add_input<decl::Float>(N_("Y Scale"))
|
||||
b.add_input<decl::Float>("Y Scale")
|
||||
.default_value(0.0f)
|
||||
.min(-1000.0f)
|
||||
.max(1000.0f)
|
||||
.compositor_domain_priority(3);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
using namespace blender::realtime_compositor;
|
||||
|
||||
@@ -22,14 +22,14 @@ NODE_STORAGE_FUNCS(NodeChroma)
|
||||
|
||||
static void cmp_node_distance_matte_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Color>(N_("Key Color"))
|
||||
b.add_input<decl::Color>("Key Color")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(1);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Float>(N_("Matte"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
b.add_output<decl::Float>("Matte");
|
||||
}
|
||||
|
||||
static void node_composit_init_distance_matte(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -20,9 +20,9 @@ namespace blender::nodes::node_composite_double_edge_mask_cc {
|
||||
|
||||
static void cmp_node_double_edge_mask_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Inner Mask")).default_value(0.8f).min(0.0f).max(1.0f);
|
||||
b.add_input<decl::Float>(N_("Outer Mask")).default_value(0.8f).min(0.0f).max(1.0f);
|
||||
b.add_output<decl::Float>(N_("Mask"));
|
||||
b.add_input<decl::Float>("Inner Mask").default_value(0.8f).min(0.0f).max(1.0f);
|
||||
b.add_input<decl::Float>("Outer Mask").default_value(0.8f).min(0.0f).max(1.0f);
|
||||
b.add_output<decl::Float>("Mask");
|
||||
}
|
||||
|
||||
static void node_composit_buts_double_edge_mask(uiLayout *layout,
|
||||
|
||||
@@ -27,17 +27,17 @@ NODE_STORAGE_FUNCS(NodeEllipseMask)
|
||||
|
||||
static void cmp_node_ellipsemask_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Mask"))
|
||||
b.add_input<decl::Float>("Mask")
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>(N_("Value"))
|
||||
b.add_input<decl::Float>("Value")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(1);
|
||||
b.add_output<decl::Float>(N_("Mask"));
|
||||
b.add_output<decl::Float>("Mask");
|
||||
}
|
||||
|
||||
static void node_composit_init_ellipsemask(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -17,11 +17,11 @@ namespace blender::nodes::node_composite_exposure_cc {
|
||||
|
||||
static void cmp_node_exposure_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>(N_("Exposure")).min(-10.0f).max(10.0f).compositor_domain_priority(1);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_input<decl::Float>("Exposure").min(-10.0f).max(10.0f).compositor_domain_priority(1);
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
using namespace blender::realtime_compositor;
|
||||
|
||||
@@ -21,16 +21,16 @@ namespace blender::nodes::node_composite_filter_cc {
|
||||
|
||||
static void cmp_node_filter_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Fac"))
|
||||
b.add_input<decl::Float>("Fac")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR)
|
||||
.compositor_domain_priority(1);
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_buts_filter(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -25,10 +25,10 @@ namespace blender::nodes::node_composite_flip_cc {
|
||||
|
||||
static void cmp_node_flip_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_buts_flip(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -17,16 +17,16 @@ namespace blender::nodes::node_composite_gamma_cc {
|
||||
|
||||
static void cmp_node_gamma_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>(N_("Gamma"))
|
||||
b.add_input<decl::Float>("Gamma")
|
||||
.default_value(1.0f)
|
||||
.min(0.001f)
|
||||
.max(10.0f)
|
||||
.subtype(PROP_UNSIGNED)
|
||||
.compositor_domain_priority(1);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
using namespace blender::realtime_compositor;
|
||||
|
||||
@@ -42,10 +42,10 @@ NODE_STORAGE_FUNCS(NodeGlare)
|
||||
|
||||
static void cmp_node_glare_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_init_glare(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -17,35 +17,35 @@ namespace blender::nodes::node_composite_hue_sat_val_cc {
|
||||
|
||||
static void cmp_node_huesatval_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>(N_("Hue"))
|
||||
b.add_input<decl::Float>("Hue")
|
||||
.default_value(0.5f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR)
|
||||
.compositor_domain_priority(1);
|
||||
b.add_input<decl::Float>(N_("Saturation"))
|
||||
b.add_input<decl::Float>("Saturation")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(2.0f)
|
||||
.subtype(PROP_FACTOR)
|
||||
.compositor_domain_priority(2);
|
||||
b.add_input<decl::Float>(CTX_N_(BLT_I18NCONTEXT_COLOR, "Value"))
|
||||
b.add_input<decl::Float>("Value")
|
||||
.translation_context(BLT_I18NCONTEXT_COLOR)
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(2.0f)
|
||||
.subtype(PROP_FACTOR)
|
||||
.compositor_domain_priority(3);
|
||||
b.add_input<decl::Float>(N_("Fac"))
|
||||
b.add_input<decl::Float>("Fac")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR)
|
||||
.compositor_domain_priority(4);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
using namespace blender::realtime_compositor;
|
||||
|
||||
@@ -19,16 +19,16 @@ namespace blender::nodes::node_composite_huecorrect_cc {
|
||||
|
||||
static void cmp_node_huecorrect_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Fac"))
|
||||
b.add_input<decl::Float>("Fac")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR)
|
||||
.compositor_domain_priority(1);
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_init_huecorrect(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -26,12 +26,12 @@ namespace blender::nodes::node_composite_id_mask_cc {
|
||||
|
||||
static void cmp_node_idmask_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("ID value"))
|
||||
b.add_input<decl::Float>("ID value")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Float>(N_("Alpha"));
|
||||
b.add_output<decl::Float>("Alpha");
|
||||
}
|
||||
|
||||
static void node_composit_buts_id_mask(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -20,8 +20,8 @@ namespace blender::nodes::node_composite_inpaint_cc {
|
||||
|
||||
static void cmp_node_inpaint_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image")).default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_input<decl::Color>("Image").default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_buts_inpaint(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -20,16 +20,16 @@ namespace blender::nodes::node_composite_invert_cc {
|
||||
|
||||
static void cmp_node_invert_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Fac"))
|
||||
b.add_input<decl::Float>("Fac")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR)
|
||||
.compositor_domain_priority(1);
|
||||
b.add_input<decl::Color>(N_("Color"))
|
||||
b.add_input<decl::Color>("Color")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Color>(N_("Color"));
|
||||
b.add_output<decl::Color>("Color");
|
||||
}
|
||||
|
||||
static void node_composit_init_invert(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -24,13 +24,13 @@ namespace blender::nodes::node_composite_keying_cc {
|
||||
|
||||
static void cmp_node_keying_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image")).default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Color>(N_("Key Color")).default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Garbage Matte")).hide_value();
|
||||
b.add_input<decl::Float>(N_("Core Matte")).hide_value();
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Float>(N_("Matte"));
|
||||
b.add_output<decl::Float>(N_("Edges"));
|
||||
b.add_input<decl::Color>("Image").default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Color>("Key Color").default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_input<decl::Float>("Garbage Matte").hide_value();
|
||||
b.add_input<decl::Float>("Core Matte").hide_value();
|
||||
b.add_output<decl::Color>("Image");
|
||||
b.add_output<decl::Float>("Matte");
|
||||
b.add_output<decl::Float>("Edges");
|
||||
}
|
||||
|
||||
static void node_composit_init_keying(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -33,8 +33,7 @@ namespace blender::nodes::node_composite_keyingscreen_cc {
|
||||
|
||||
static void cmp_node_keyingscreen_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Color>(CTX_N_(BLT_I18NCONTEXT_ID_SCREEN, "Screen"))
|
||||
.translation_context(BLT_I18NCONTEXT_ID_SCREEN);
|
||||
b.add_output<decl::Color>("Screen").translation_context(BLT_I18NCONTEXT_ID_SCREEN);
|
||||
}
|
||||
|
||||
static void node_composit_init_keyingscreen(const bContext *C, PointerRNA *ptr)
|
||||
|
||||
@@ -36,20 +36,20 @@ NODE_STORAGE_FUNCS(NodeLensDist)
|
||||
|
||||
static void cmp_node_lensdist_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>(N_("Distort"))
|
||||
b.add_input<decl::Float>("Distort")
|
||||
.default_value(0.0f)
|
||||
.min(MINIMUM_DISTORTION)
|
||||
.max(1.0f)
|
||||
.compositor_expects_single_value();
|
||||
b.add_input<decl::Float>(N_("Dispersion"))
|
||||
b.add_input<decl::Float>("Dispersion")
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_expects_single_value();
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_init_lensdist(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -27,11 +27,11 @@ namespace blender::nodes::node_composite_levels_cc {
|
||||
|
||||
static void cmp_node_levels_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({0.0f, 0.0f, 0.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Float>(N_("Mean"));
|
||||
b.add_output<decl::Float>(N_("Std Dev"));
|
||||
b.add_output<decl::Float>("Mean");
|
||||
b.add_output<decl::Float>("Std Dev");
|
||||
}
|
||||
|
||||
static void node_composit_init_view_levels(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -24,11 +24,11 @@ NODE_STORAGE_FUNCS(NodeChroma)
|
||||
|
||||
static void cmp_node_luma_matte_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Float>(N_("Matte"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
b.add_output<decl::Float>("Matte");
|
||||
}
|
||||
|
||||
static void node_composit_init_luma_matte(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -20,32 +20,32 @@ namespace blender::nodes::node_composite_map_range_cc {
|
||||
|
||||
static void cmp_node_map_range_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Value"))
|
||||
b.add_input<decl::Float>("Value")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>(N_("From Min"))
|
||||
b.add_input<decl::Float>("From Min")
|
||||
.default_value(0.0f)
|
||||
.min(-10000.0f)
|
||||
.max(10000.0f)
|
||||
.compositor_domain_priority(1);
|
||||
b.add_input<decl::Float>(N_("From Max"))
|
||||
b.add_input<decl::Float>("From Max")
|
||||
.default_value(1.0f)
|
||||
.min(-10000.0f)
|
||||
.max(10000.0f)
|
||||
.compositor_domain_priority(2);
|
||||
b.add_input<decl::Float>(N_("To Min"))
|
||||
b.add_input<decl::Float>("To Min")
|
||||
.default_value(0.0f)
|
||||
.min(-10000.0f)
|
||||
.max(10000.0f)
|
||||
.compositor_domain_priority(3);
|
||||
b.add_input<decl::Float>(N_("To Max"))
|
||||
b.add_input<decl::Float>("To Max")
|
||||
.default_value(1.0f)
|
||||
.min(-10000.0f)
|
||||
.max(10000.0f)
|
||||
.compositor_domain_priority(4);
|
||||
b.add_output<decl::Float>(N_("Value"));
|
||||
b.add_output<decl::Float>("Value");
|
||||
}
|
||||
|
||||
static void node_composit_buts_map_range(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -24,15 +24,15 @@ namespace blender::nodes::node_composite_map_uv_cc {
|
||||
|
||||
static void cmp_node_map_uv_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_skip_realization();
|
||||
b.add_input<decl::Vector>(N_("UV"))
|
||||
b.add_input<decl::Vector>("UV")
|
||||
.default_value({1.0f, 0.0f, 0.0f})
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_buts_map_uv(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -26,12 +26,12 @@ NODE_STORAGE_FUNCS(TexMapping)
|
||||
|
||||
static void cmp_node_map_value_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Value"))
|
||||
b.add_input<decl::Float>("Value")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Float>(N_("Value"));
|
||||
b.add_output<decl::Float>("Value");
|
||||
}
|
||||
|
||||
static void node_composit_init_map_value(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -28,7 +28,7 @@ NODE_STORAGE_FUNCS(NodeMask)
|
||||
|
||||
static void cmp_node_mask_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Float>(N_("Mask"));
|
||||
b.add_output<decl::Float>("Mask");
|
||||
}
|
||||
|
||||
static void node_composit_init_mask(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -19,22 +19,22 @@ namespace blender::nodes::node_composite_math_cc {
|
||||
|
||||
static void cmp_node_math_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Value"))
|
||||
b.add_input<decl::Float>("Value")
|
||||
.default_value(0.5f)
|
||||
.min(-10000.0f)
|
||||
.max(10000.0f)
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>(N_("Value"), "Value_001")
|
||||
b.add_input<decl::Float>("Value", "Value_001")
|
||||
.default_value(0.5f)
|
||||
.min(-10000.0f)
|
||||
.max(10000.0f)
|
||||
.compositor_domain_priority(1);
|
||||
b.add_input<decl::Float>(N_("Value"), "Value_002")
|
||||
b.add_input<decl::Float>("Value", "Value_002")
|
||||
.default_value(0.5f)
|
||||
.min(-10000.0f)
|
||||
.max(10000.0f)
|
||||
.compositor_domain_priority(2);
|
||||
b.add_output<decl::Float>(N_("Value"));
|
||||
b.add_output<decl::Float>("Value");
|
||||
}
|
||||
|
||||
using namespace blender::realtime_compositor;
|
||||
|
||||
@@ -21,19 +21,19 @@ namespace blender::nodes::node_composite_mixrgb_cc {
|
||||
|
||||
static void cmp_node_mixrgb_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Fac"))
|
||||
b.add_input<decl::Float>("Fac")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR)
|
||||
.compositor_domain_priority(2);
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Color>(N_("Image"), "Image_001")
|
||||
b.add_input<decl::Color>("Image", "Image_001")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(1);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
using namespace blender::realtime_compositor;
|
||||
|
||||
@@ -31,12 +31,12 @@ namespace blender::nodes::node_composite_movieclip_cc {
|
||||
|
||||
static void cmp_node_movieclip_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Float>(N_("Alpha"));
|
||||
b.add_output<decl::Float>(N_("Offset X"));
|
||||
b.add_output<decl::Float>(N_("Offset Y"));
|
||||
b.add_output<decl::Float>(N_("Scale"));
|
||||
b.add_output<decl::Float>(N_("Angle"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
b.add_output<decl::Float>("Alpha");
|
||||
b.add_output<decl::Float>("Offset X");
|
||||
b.add_output<decl::Float>("Offset Y");
|
||||
b.add_output<decl::Float>("Scale");
|
||||
b.add_output<decl::Float>("Angle");
|
||||
}
|
||||
|
||||
static void init(const bContext *C, PointerRNA *ptr)
|
||||
|
||||
@@ -26,8 +26,8 @@ namespace blender::nodes::node_composite_moviedistortion_cc {
|
||||
|
||||
static void cmp_node_moviedistortion_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image")).default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_input<decl::Color>("Image").default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void label(const bNodeTree * /*ntree*/, const bNode *node, char *label, int label_maxncpy)
|
||||
|
||||
@@ -17,18 +17,18 @@ namespace blender::nodes::node_composite_normal_cc {
|
||||
|
||||
static void cmp_node_normal_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Vector>(N_("Normal"))
|
||||
b.add_input<decl::Vector>("Normal")
|
||||
.default_value({0.0f, 0.0f, 1.0f})
|
||||
.min(-1.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_DIRECTION)
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Vector>(N_("Normal"))
|
||||
b.add_output<decl::Vector>("Normal")
|
||||
.default_value({0.0f, 0.0f, 1.0f})
|
||||
.min(-1.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_DIRECTION);
|
||||
b.add_output<decl::Float>(N_("Dot"));
|
||||
b.add_output<decl::Float>("Dot");
|
||||
}
|
||||
|
||||
using namespace blender::realtime_compositor;
|
||||
|
||||
@@ -17,12 +17,12 @@ namespace blender::nodes::node_composite_normalize_cc {
|
||||
|
||||
static void cmp_node_normalize_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Value"))
|
||||
b.add_input<decl::Float>("Value")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Float>(N_("Value"));
|
||||
b.add_output<decl::Float>("Value");
|
||||
}
|
||||
|
||||
using namespace blender::realtime_compositor;
|
||||
|
||||
@@ -17,8 +17,8 @@ namespace blender::nodes::node_composite_pixelate_cc {
|
||||
|
||||
static void cmp_node_pixelate_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Color"));
|
||||
b.add_output<decl::Color>(N_("Color"));
|
||||
b.add_input<decl::Color>("Color");
|
||||
b.add_output<decl::Color>("Color");
|
||||
}
|
||||
|
||||
using namespace blender::realtime_compositor;
|
||||
|
||||
@@ -41,9 +41,9 @@ NODE_STORAGE_FUNCS(NodePlaneTrackDeformData)
|
||||
|
||||
static void cmp_node_planetrackdeform_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image")).compositor_skip_realization();
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Float>(N_("Plane"));
|
||||
b.add_input<decl::Color>("Image").compositor_skip_realization();
|
||||
b.add_output<decl::Color>("Image");
|
||||
b.add_output<decl::Float>("Plane");
|
||||
}
|
||||
|
||||
static void init(const bContext *C, PointerRNA *ptr)
|
||||
|
||||
@@ -17,15 +17,15 @@ namespace blender::nodes::node_composite_posterize_cc {
|
||||
|
||||
static void cmp_node_posterize_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>(N_("Steps"))
|
||||
b.add_input<decl::Float>("Steps")
|
||||
.default_value(8.0f)
|
||||
.min(2.0f)
|
||||
.max(1024.0f)
|
||||
.compositor_domain_priority(1);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
using namespace blender::realtime_compositor;
|
||||
|
||||
@@ -20,10 +20,10 @@ namespace blender::nodes::node_composite_premulkey_cc {
|
||||
|
||||
static void cmp_node_premulkey_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_buts_premulkey(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace blender::nodes::node_composite_rgb_cc {
|
||||
|
||||
static void cmp_node_rgb_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Color>(N_("RGBA")).default_value({0.5f, 0.5f, 0.5f, 1.0f});
|
||||
b.add_output<decl::Color>("RGBA").default_value({0.5f, 0.5f, 0.5f, 1.0f});
|
||||
}
|
||||
|
||||
using namespace blender::realtime_compositor;
|
||||
|
||||
@@ -21,16 +21,16 @@ namespace blender::nodes::node_composite_rotate_cc {
|
||||
|
||||
static void cmp_node_rotate_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>(N_("Degr"))
|
||||
b.add_input<decl::Float>("Degr")
|
||||
.default_value(0.0f)
|
||||
.min(-10000.0f)
|
||||
.max(10000.0f)
|
||||
.subtype(PROP_ANGLE)
|
||||
.compositor_expects_single_value();
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_init_rotate(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -25,20 +25,20 @@ namespace blender::nodes::node_composite_scale_cc {
|
||||
|
||||
static void cmp_node_scale_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>(N_("X"))
|
||||
b.add_input<decl::Float>("X")
|
||||
.default_value(1.0f)
|
||||
.min(0.0001f)
|
||||
.max(CMP_SCALE_MAX)
|
||||
.compositor_expects_single_value();
|
||||
b.add_input<decl::Float>(N_("Y"))
|
||||
b.add_input<decl::Float>("Y")
|
||||
.default_value(1.0f)
|
||||
.min(0.0001f)
|
||||
.max(CMP_SCALE_MAX)
|
||||
.compositor_expects_single_value();
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composite_update_scale(bNodeTree *ntree, bNode *node)
|
||||
|
||||
@@ -11,8 +11,8 @@ namespace blender::nodes {
|
||||
|
||||
static void cmp_node_scene_time_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Float>(N_("Seconds"));
|
||||
b.add_output<decl::Float>(N_("Frame"));
|
||||
b.add_output<decl::Float>("Seconds");
|
||||
b.add_output<decl::Float>("Frame");
|
||||
}
|
||||
|
||||
using namespace blender::realtime_compositor;
|
||||
|
||||
@@ -66,13 +66,13 @@ NODE_STORAGE_FUNCS(NodeCMPCombSepColor)
|
||||
|
||||
static void cmp_node_separate_color_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Float>(N_("Red"));
|
||||
b.add_output<decl::Float>(N_("Green"));
|
||||
b.add_output<decl::Float>(N_("Blue"));
|
||||
b.add_output<decl::Float>(N_("Alpha"));
|
||||
b.add_output<decl::Float>("Red");
|
||||
b.add_output<decl::Float>("Green");
|
||||
b.add_output<decl::Float>("Blue");
|
||||
b.add_output<decl::Float>("Alpha");
|
||||
}
|
||||
|
||||
static void cmp_node_separate_color_update(bNodeTree * /*ntree*/, bNode *node)
|
||||
@@ -154,31 +154,31 @@ NODE_STORAGE_FUNCS(NodeCMPCombSepColor)
|
||||
|
||||
static void cmp_node_combine_color_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Red"))
|
||||
b.add_input<decl::Float>("Red")
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR)
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>(N_("Green"))
|
||||
b.add_input<decl::Float>("Green")
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR)
|
||||
.compositor_domain_priority(1);
|
||||
b.add_input<decl::Float>(N_("Blue"))
|
||||
b.add_input<decl::Float>("Blue")
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR)
|
||||
.compositor_domain_priority(2);
|
||||
b.add_input<decl::Float>(N_("Alpha"))
|
||||
b.add_input<decl::Float>("Alpha")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR)
|
||||
.compositor_domain_priority(3);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void cmp_node_combine_color_update(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -17,13 +17,13 @@ namespace blender::nodes::node_composite_separate_hsva_cc {
|
||||
|
||||
static void cmp_node_sephsva_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Float>(N_("H"));
|
||||
b.add_output<decl::Float>(N_("S"));
|
||||
b.add_output<decl::Float>(N_("V"));
|
||||
b.add_output<decl::Float>(N_("A"));
|
||||
b.add_output<decl::Float>("H");
|
||||
b.add_output<decl::Float>("S");
|
||||
b.add_output<decl::Float>("V");
|
||||
b.add_output<decl::Float>("A");
|
||||
}
|
||||
|
||||
using namespace blender::realtime_compositor;
|
||||
@@ -70,15 +70,12 @@ namespace blender::nodes::node_composite_combine_hsva_cc {
|
||||
|
||||
static void cmp_node_combhsva_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("H")).min(0.0f).max(1.0f).compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>(N_("S")).min(0.0f).max(1.0f).compositor_domain_priority(1);
|
||||
b.add_input<decl::Float>(N_("V")).min(0.0f).max(1.0f).compositor_domain_priority(2);
|
||||
b.add_input<decl::Float>(N_("A"))
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(3);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_input<decl::Float>("H").min(0.0f).max(1.0f).compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>("S").min(0.0f).max(1.0f).compositor_domain_priority(1);
|
||||
b.add_input<decl::Float>("V").min(0.0f).max(1.0f).compositor_domain_priority(2);
|
||||
b.add_input<decl::Float>("A").default_value(1.0f).min(0.0f).max(1.0f).compositor_domain_priority(
|
||||
3);
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
using namespace blender::realtime_compositor;
|
||||
|
||||
@@ -17,13 +17,13 @@ namespace blender::nodes::node_composite_separate_rgba_cc {
|
||||
|
||||
static void cmp_node_seprgba_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Float>(N_("R"));
|
||||
b.add_output<decl::Float>(N_("G"));
|
||||
b.add_output<decl::Float>(N_("B"));
|
||||
b.add_output<decl::Float>(N_("A"));
|
||||
b.add_output<decl::Float>("R");
|
||||
b.add_output<decl::Float>("G");
|
||||
b.add_output<decl::Float>("B");
|
||||
b.add_output<decl::Float>("A");
|
||||
}
|
||||
|
||||
using namespace blender::realtime_compositor;
|
||||
@@ -70,15 +70,12 @@ namespace blender::nodes::node_composite_combine_rgba_cc {
|
||||
|
||||
static void cmp_node_combrgba_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("R")).min(0.0f).max(1.0f).compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>(N_("G")).min(0.0f).max(1.0f).compositor_domain_priority(1);
|
||||
b.add_input<decl::Float>(N_("B")).min(0.0f).max(1.0f).compositor_domain_priority(2);
|
||||
b.add_input<decl::Float>(N_("A"))
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(3);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_input<decl::Float>("R").min(0.0f).max(1.0f).compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>("G").min(0.0f).max(1.0f).compositor_domain_priority(1);
|
||||
b.add_input<decl::Float>("B").min(0.0f).max(1.0f).compositor_domain_priority(2);
|
||||
b.add_input<decl::Float>("A").default_value(1.0f).min(0.0f).max(1.0f).compositor_domain_priority(
|
||||
3);
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
using namespace blender::realtime_compositor;
|
||||
|
||||
@@ -19,13 +19,13 @@ namespace blender::nodes::node_composite_separate_ycca_cc {
|
||||
|
||||
static void cmp_node_sepycca_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Float>(N_("Y"));
|
||||
b.add_output<decl::Float>(N_("Cb"));
|
||||
b.add_output<decl::Float>(N_("Cr"));
|
||||
b.add_output<decl::Float>(N_("A"));
|
||||
b.add_output<decl::Float>("Y");
|
||||
b.add_output<decl::Float>("Cb");
|
||||
b.add_output<decl::Float>("Cr");
|
||||
b.add_output<decl::Float>("A");
|
||||
}
|
||||
|
||||
static void node_composit_init_mode_sepycca(bNodeTree * /*ntree*/, bNode *node)
|
||||
@@ -98,23 +98,20 @@ namespace blender::nodes::node_composite_combine_ycca_cc {
|
||||
|
||||
static void cmp_node_combycca_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Y")).min(0.0f).max(1.0f).compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>(N_("Cb"))
|
||||
b.add_input<decl::Float>("Y").min(0.0f).max(1.0f).compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>("Cb")
|
||||
.default_value(0.5f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(1);
|
||||
b.add_input<decl::Float>(N_("Cr"))
|
||||
b.add_input<decl::Float>("Cr")
|
||||
.default_value(0.5f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(2);
|
||||
b.add_input<decl::Float>(N_("A"))
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(3);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_input<decl::Float>("A").default_value(1.0f).min(0.0f).max(1.0f).compositor_domain_priority(
|
||||
3);
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_init_mode_combycca(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -17,13 +17,13 @@ namespace blender::nodes::node_composite_separate_yuva_cc {
|
||||
|
||||
static void cmp_node_sepyuva_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Float>(N_("Y"));
|
||||
b.add_output<decl::Float>(N_("U"));
|
||||
b.add_output<decl::Float>(N_("V"));
|
||||
b.add_output<decl::Float>(N_("A"));
|
||||
b.add_output<decl::Float>("Y");
|
||||
b.add_output<decl::Float>("U");
|
||||
b.add_output<decl::Float>("V");
|
||||
b.add_output<decl::Float>("A");
|
||||
}
|
||||
|
||||
using namespace blender::realtime_compositor;
|
||||
@@ -70,15 +70,12 @@ namespace blender::nodes::node_composite_combine_yuva_cc {
|
||||
|
||||
static void cmp_node_combyuva_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Y")).min(0.0f).max(1.0f).compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>(N_("U")).min(0.0f).max(1.0f).compositor_domain_priority(1);
|
||||
b.add_input<decl::Float>(N_("V")).min(0.0f).max(1.0f).compositor_domain_priority(2);
|
||||
b.add_input<decl::Float>(N_("A"))
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(3);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_input<decl::Float>("Y").min(0.0f).max(1.0f).compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>("U").min(0.0f).max(1.0f).compositor_domain_priority(1);
|
||||
b.add_input<decl::Float>("V").min(0.0f).max(1.0f).compositor_domain_priority(2);
|
||||
b.add_input<decl::Float>("A").default_value(1.0f).min(0.0f).max(1.0f).compositor_domain_priority(
|
||||
3);
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
using namespace blender::realtime_compositor;
|
||||
|
||||
@@ -22,15 +22,15 @@ NODE_STORAGE_FUNCS(NodeSetAlpha)
|
||||
|
||||
static void cmp_node_setalpha_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>(N_("Alpha"))
|
||||
b.add_input<decl::Float>("Alpha")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.compositor_domain_priority(1);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_init_setalpha(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -25,8 +25,8 @@ namespace blender::nodes::node_composite_split_viewer_cc {
|
||||
|
||||
static void cmp_node_split_viewer_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"));
|
||||
b.add_input<decl::Color>(N_("Image"), "Image_001");
|
||||
b.add_input<decl::Color>("Image");
|
||||
b.add_input<decl::Color>("Image", "Image_001");
|
||||
}
|
||||
|
||||
static void node_composit_init_splitviewer(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -34,10 +34,10 @@ namespace blender::nodes::node_composite_stabilize2d_cc {
|
||||
|
||||
static void cmp_node_stabilize2d_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({0.8f, 0.8f, 0.8f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void init(const bContext *C, PointerRNA *ptr)
|
||||
|
||||
@@ -18,8 +18,8 @@ namespace blender::nodes::node_composite_sunbeams_cc {
|
||||
|
||||
static void cmp_node_sunbeams_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image")).default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_input<decl::Color>("Image").default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void init(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -18,9 +18,9 @@ namespace blender::nodes::node_composite_switch_cc {
|
||||
|
||||
static void cmp_node_switch_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Off")).default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Color>(N_("On")).default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_input<decl::Color>("Off").default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Color>("On").default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_buts_switch(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -19,19 +19,19 @@ namespace blender::nodes::node_composite_texture_cc {
|
||||
|
||||
static void cmp_node_texture_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Vector>(N_("Offset"))
|
||||
b.add_input<decl::Vector>("Offset")
|
||||
.min(-2.0f)
|
||||
.max(2.0f)
|
||||
.subtype(PROP_TRANSLATION)
|
||||
.compositor_expects_single_value();
|
||||
b.add_input<decl::Vector>(N_("Scale"))
|
||||
b.add_input<decl::Vector>("Scale")
|
||||
.default_value({1.0f, 1.0f, 1.0f})
|
||||
.min(-10.0f)
|
||||
.max(10.0f)
|
||||
.subtype(PROP_XYZ)
|
||||
.compositor_expects_single_value();
|
||||
b.add_output<decl::Float>(N_("Value"));
|
||||
b.add_output<decl::Color>(N_("Color"));
|
||||
b.add_output<decl::Float>("Value");
|
||||
b.add_output<decl::Color>("Color");
|
||||
}
|
||||
|
||||
using namespace blender::realtime_compositor;
|
||||
|
||||
@@ -31,10 +31,10 @@ NODE_STORAGE_FUNCS(NodeTonemap)
|
||||
|
||||
static void cmp_node_tonemap_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_init_tonemap(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -33,9 +33,9 @@ NODE_STORAGE_FUNCS(NodeTrackPosData)
|
||||
|
||||
static void cmp_node_trackpos_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Float>(N_("X"));
|
||||
b.add_output<decl::Float>(N_("Y"));
|
||||
b.add_output<decl::Vector>(N_("Speed")).subtype(PROP_VELOCITY);
|
||||
b.add_output<decl::Float>("X");
|
||||
b.add_output<decl::Float>("Y");
|
||||
b.add_output<decl::Vector>("Speed").subtype(PROP_VELOCITY);
|
||||
}
|
||||
|
||||
static void init(const bContext *C, PointerRNA *ptr)
|
||||
|
||||
@@ -22,31 +22,31 @@ namespace blender::nodes::node_composite_transform_cc {
|
||||
|
||||
static void cmp_node_transform_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({0.8f, 0.8f, 0.8f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>(N_("X"))
|
||||
b.add_input<decl::Float>("X")
|
||||
.default_value(0.0f)
|
||||
.min(-10000.0f)
|
||||
.max(10000.0f)
|
||||
.compositor_expects_single_value();
|
||||
b.add_input<decl::Float>(N_("Y"))
|
||||
b.add_input<decl::Float>("Y")
|
||||
.default_value(0.0f)
|
||||
.min(-10000.0f)
|
||||
.max(10000.0f)
|
||||
.compositor_expects_single_value();
|
||||
b.add_input<decl::Float>(N_("Angle"))
|
||||
b.add_input<decl::Float>("Angle")
|
||||
.default_value(0.0f)
|
||||
.min(-10000.0f)
|
||||
.max(10000.0f)
|
||||
.subtype(PROP_ANGLE)
|
||||
.compositor_expects_single_value();
|
||||
b.add_input<decl::Float>(N_("Scale"))
|
||||
b.add_input<decl::Float>("Scale")
|
||||
.default_value(1.0f)
|
||||
.min(0.0001f)
|
||||
.max(CMP_SCALE_MAX)
|
||||
.compositor_expects_single_value();
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_buts_transform(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -22,20 +22,20 @@ NODE_STORAGE_FUNCS(NodeTranslateData)
|
||||
|
||||
static void cmp_node_translate_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>(N_("X"))
|
||||
b.add_input<decl::Float>("X")
|
||||
.default_value(0.0f)
|
||||
.min(-10000.0f)
|
||||
.max(10000.0f)
|
||||
.compositor_expects_single_value();
|
||||
b.add_input<decl::Float>(N_("Y"))
|
||||
b.add_input<decl::Float>("Y")
|
||||
.default_value(0.0f)
|
||||
.min(-10000.0f)
|
||||
.max(10000.0f)
|
||||
.compositor_expects_single_value();
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static void node_composit_init_translate(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -25,14 +25,14 @@ namespace blender::nodes::node_composite_color_ramp_cc {
|
||||
|
||||
static void cmp_node_valtorgb_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Fac"))
|
||||
b.add_input<decl::Float>("Fac")
|
||||
.default_value(0.5f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR)
|
||||
.compositor_domain_priority(1);
|
||||
b.add_output<decl::Color>(N_("Image")).compositor_domain_priority(0);
|
||||
b.add_output<decl::Float>(N_("Alpha"));
|
||||
b.add_output<decl::Color>("Image").compositor_domain_priority(0);
|
||||
b.add_output<decl::Float>("Alpha");
|
||||
}
|
||||
|
||||
static void node_composit_init_valtorgb(bNodeTree * /*ntree*/, bNode *node)
|
||||
@@ -151,10 +151,10 @@ namespace blender::nodes::node_composite_rgb_to_bw_cc {
|
||||
|
||||
static void cmp_node_rgbtobw_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({0.8f, 0.8f, 0.8f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_output<decl::Float>(N_("Val"));
|
||||
b.add_output<decl::Float>("Val");
|
||||
}
|
||||
|
||||
using namespace blender::realtime_compositor;
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace blender::nodes::node_composite_value_cc {
|
||||
|
||||
static void cmp_node_value_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Float>(N_("Value")).default_value(0.5f);
|
||||
b.add_output<decl::Float>("Value").default_value(0.5f);
|
||||
}
|
||||
|
||||
using namespace blender::realtime_compositor;
|
||||
|
||||
@@ -20,14 +20,14 @@ namespace blender::nodes::node_composite_vec_blur_cc {
|
||||
|
||||
static void cmp_node_vec_blur_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image")).default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Z")).default_value(0.0f).min(0.0f).max(1.0f);
|
||||
b.add_input<decl::Vector>(N_("Speed"))
|
||||
b.add_input<decl::Color>("Image").default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_input<decl::Float>("Z").default_value(0.0f).min(0.0f).max(1.0f);
|
||||
b.add_input<decl::Vector>("Speed")
|
||||
.default_value({0.0f, 0.0f, 0.0f})
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_VELOCITY);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
/* custom1: iterations, custom2: max_speed (0 = no_limit). */
|
||||
|
||||
@@ -30,9 +30,9 @@ namespace blender::nodes::node_composite_viewer_cc {
|
||||
|
||||
static void cmp_node_viewer_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image")).default_value({0.0f, 0.0f, 0.0f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Alpha")).default_value(1.0f).min(0.0f).max(1.0f);
|
||||
b.add_input<decl::Float>(N_("Z")).default_value(1.0f).min(0.0f).max(1.0f);
|
||||
b.add_input<decl::Color>("Image").default_value({0.0f, 0.0f, 0.0f, 1.0f});
|
||||
b.add_input<decl::Float>("Alpha").default_value(1.0f).min(0.0f).max(1.0f);
|
||||
b.add_input<decl::Float>("Z").default_value(1.0f).min(0.0f).max(1.0f);
|
||||
}
|
||||
|
||||
static void node_composit_init_viewer(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -28,24 +28,24 @@ namespace blender::nodes::node_composite_zcombine_cc {
|
||||
|
||||
static void cmp_node_zcombine_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Image"))
|
||||
b.add_input<decl::Color>("Image")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(0);
|
||||
b.add_input<decl::Float>(N_("Z"))
|
||||
b.add_input<decl::Float>("Z")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(10000.0f)
|
||||
.compositor_domain_priority(2);
|
||||
b.add_input<decl::Color>(N_("Image"), "Image_001")
|
||||
b.add_input<decl::Color>("Image", "Image_001")
|
||||
.default_value({1.0f, 1.0f, 1.0f, 1.0f})
|
||||
.compositor_domain_priority(1);
|
||||
b.add_input<decl::Float>(N_("Z"), "Z_001")
|
||||
b.add_input<decl::Float>("Z", "Z_001")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(10000.0f)
|
||||
.compositor_domain_priority(3);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_output<decl::Float>(N_("Z"));
|
||||
b.add_output<decl::Color>("Image");
|
||||
b.add_output<decl::Float>("Z");
|
||||
}
|
||||
|
||||
static void node_composit_buts_zcombine(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -15,14 +15,10 @@ namespace blender::nodes::node_fn_align_euler_to_vector_cc {
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Vector>(N_("Rotation")).subtype(PROP_EULER).hide_value();
|
||||
b.add_input<decl::Float>(N_("Factor"))
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Vector>(N_("Vector")).default_value({0.0, 0.0, 1.0});
|
||||
b.add_output<decl::Vector>(N_("Rotation")).subtype(PROP_EULER);
|
||||
b.add_input<decl::Vector>("Rotation").subtype(PROP_EULER).hide_value();
|
||||
b.add_input<decl::Float>("Factor").default_value(1.0f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Vector>("Vector").default_value({0.0, 0.0, 1.0});
|
||||
b.add_output<decl::Vector>("Rotation").subtype(PROP_EULER);
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -18,9 +18,9 @@ namespace blender::nodes::node_fn_boolean_math_cc {
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Bool>(N_("Boolean"), "Boolean");
|
||||
b.add_input<decl::Bool>(N_("Boolean"), "Boolean_001");
|
||||
b.add_output<decl::Bool>(N_("Boolean"));
|
||||
b.add_input<decl::Bool>("Boolean", "Boolean");
|
||||
b.add_input<decl::Bool>("Boolean", "Boolean_001");
|
||||
b.add_output<decl::Bool>("Boolean");
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -12,23 +12,11 @@ NODE_STORAGE_FUNCS(NodeCombSepColor)
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Float>(N_("Red")).default_value(0.0f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Green"))
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Blue"))
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Alpha"))
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_output<decl::Color>(N_("Color"));
|
||||
b.add_input<decl::Float>("Red").default_value(0.0f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>("Green").default_value(0.0f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>("Blue").default_value(0.0f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>("Alpha").default_value(1.0f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_output<decl::Color>("Color");
|
||||
};
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -23,26 +23,26 @@ NODE_STORAGE_FUNCS(NodeFunctionCompare)
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Float>(N_("A")).min(-10000.0f).max(10000.0f);
|
||||
b.add_input<decl::Float>(N_("B")).min(-10000.0f).max(10000.0f);
|
||||
b.add_input<decl::Float>("A").min(-10000.0f).max(10000.0f);
|
||||
b.add_input<decl::Float>("B").min(-10000.0f).max(10000.0f);
|
||||
|
||||
b.add_input<decl::Int>(N_("A"), "A_INT");
|
||||
b.add_input<decl::Int>(N_("B"), "B_INT");
|
||||
b.add_input<decl::Int>("A", "A_INT");
|
||||
b.add_input<decl::Int>("B", "B_INT");
|
||||
|
||||
b.add_input<decl::Vector>(N_("A"), "A_VEC3");
|
||||
b.add_input<decl::Vector>(N_("B"), "B_VEC3");
|
||||
b.add_input<decl::Vector>("A", "A_VEC3");
|
||||
b.add_input<decl::Vector>("B", "B_VEC3");
|
||||
|
||||
b.add_input<decl::Color>(N_("A"), "A_COL");
|
||||
b.add_input<decl::Color>(N_("B"), "B_COL");
|
||||
b.add_input<decl::Color>("A", "A_COL");
|
||||
b.add_input<decl::Color>("B", "B_COL");
|
||||
|
||||
b.add_input<decl::String>(N_("A"), "A_STR");
|
||||
b.add_input<decl::String>(N_("B"), "B_STR");
|
||||
b.add_input<decl::String>("A", "A_STR");
|
||||
b.add_input<decl::String>("B", "B_STR");
|
||||
|
||||
b.add_input<decl::Float>(N_("C")).default_value(0.9f);
|
||||
b.add_input<decl::Float>(N_("Angle")).default_value(0.0872665f).subtype(PROP_ANGLE);
|
||||
b.add_input<decl::Float>(N_("Epsilon")).default_value(0.001).min(-10000.0f).max(10000.0f);
|
||||
b.add_input<decl::Float>("C").default_value(0.9f);
|
||||
b.add_input<decl::Float>("Angle").default_value(0.0872665f).subtype(PROP_ANGLE);
|
||||
b.add_input<decl::Float>("Epsilon").default_value(0.001).min(-10000.0f).max(10000.0f);
|
||||
|
||||
b.add_output<decl::Bool>(N_("Result"));
|
||||
b.add_output<decl::Bool>("Result");
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -18,8 +18,8 @@ namespace blender::nodes::node_fn_float_to_int_cc {
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Float>(N_("Float"));
|
||||
b.add_output<decl::Int>(N_("Integer"));
|
||||
b.add_input<decl::Float>("Float");
|
||||
b.add_output<decl::Int>("Integer");
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace blender::nodes::node_fn_input_bool_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Bool>(N_("Boolean"));
|
||||
b.add_output<decl::Bool>("Boolean");
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace blender::nodes::node_fn_input_color_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Color>(N_("Color"));
|
||||
b.add_output<decl::Color>("Color");
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace blender::nodes::node_fn_input_int_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Int>(N_("Integer"));
|
||||
b.add_output<decl::Int>("Integer");
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -6,9 +6,8 @@ namespace blender::nodes::node_fn_input_special_characters_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::String>(N_("Line Break"));
|
||||
b.add_output<decl::String>(CTX_N_(BLT_I18NCONTEXT_ID_TEXT, "Tab"))
|
||||
.translation_context(BLT_I18NCONTEXT_ID_TEXT);
|
||||
b.add_output<decl::String>("Line Break");
|
||||
b.add_output<decl::String>("Tab").translation_context(BLT_I18NCONTEXT_ID_TEXT);
|
||||
}
|
||||
|
||||
class MF_SpecialCharacters : public mf::MultiFunction {
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace blender::nodes::node_fn_input_string_cc {
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_output<decl::String>(N_("String"));
|
||||
b.add_output<decl::String>("String");
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace blender::nodes::node_fn_input_vector_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Vector>(N_("Vector"));
|
||||
b.add_output<decl::Vector>("Vector");
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -16,30 +16,30 @@ NODE_STORAGE_FUNCS(NodeRandomValue)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Vector>(N_("Min")).supports_field();
|
||||
b.add_input<decl::Vector>(N_("Max")).default_value({1.0f, 1.0f, 1.0f}).supports_field();
|
||||
b.add_input<decl::Float>(N_("Min"), "Min_001").supports_field();
|
||||
b.add_input<decl::Float>(N_("Max"), "Max_001").default_value(1.0f).supports_field();
|
||||
b.add_input<decl::Int>(N_("Min"), "Min_002").min(-100000).max(100000).supports_field();
|
||||
b.add_input<decl::Int>(N_("Max"), "Max_002")
|
||||
b.add_input<decl::Vector>("Min").supports_field();
|
||||
b.add_input<decl::Vector>("Max").default_value({1.0f, 1.0f, 1.0f}).supports_field();
|
||||
b.add_input<decl::Float>("Min", "Min_001").supports_field();
|
||||
b.add_input<decl::Float>("Max", "Max_001").default_value(1.0f).supports_field();
|
||||
b.add_input<decl::Int>("Min", "Min_002").min(-100000).max(100000).supports_field();
|
||||
b.add_input<decl::Int>("Max", "Max_002")
|
||||
.default_value(100)
|
||||
.min(-100000)
|
||||
.max(100000)
|
||||
.supports_field();
|
||||
b.add_input<decl::Float>(N_("Probability"))
|
||||
b.add_input<decl::Float>("Probability")
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.default_value(0.5f)
|
||||
.subtype(PROP_FACTOR)
|
||||
.supports_field()
|
||||
.make_available([](bNode &node) { node_storage(node).data_type = CD_PROP_BOOL; });
|
||||
b.add_input<decl::Int>(N_("ID")).implicit_field(implicit_field_inputs::id_or_index);
|
||||
b.add_input<decl::Int>(N_("Seed")).default_value(0).min(-10000).max(10000).supports_field();
|
||||
b.add_input<decl::Int>("ID").implicit_field(implicit_field_inputs::id_or_index);
|
||||
b.add_input<decl::Int>("Seed").default_value(0).min(-10000).max(10000).supports_field();
|
||||
|
||||
b.add_output<decl::Vector>(N_("Value")).dependent_field();
|
||||
b.add_output<decl::Float>(N_("Value"), "Value_001").dependent_field();
|
||||
b.add_output<decl::Int>(N_("Value"), "Value_002").dependent_field();
|
||||
b.add_output<decl::Bool>(N_("Value"), "Value_003").dependent_field();
|
||||
b.add_output<decl::Vector>("Value").dependent_field();
|
||||
b.add_output<decl::Float>("Value", "Value_001").dependent_field();
|
||||
b.add_output<decl::Int>("Value", "Value_002").dependent_field();
|
||||
b.add_output<decl::Bool>("Value", "Value_003").dependent_field();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -8,11 +8,10 @@ namespace blender::nodes::node_fn_replace_string_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::String>(N_("String"));
|
||||
b.add_input<decl::String>(N_("Find")).description(N_("The string to find in the input string"));
|
||||
b.add_input<decl::String>(N_("Replace"))
|
||||
.description(N_("The string to replace each match with"));
|
||||
b.add_output<decl::String>(N_("String"));
|
||||
b.add_input<decl::String>("String");
|
||||
b.add_input<decl::String>("Find").description("The string to find in the input string");
|
||||
b.add_input<decl::String>("Replace").description("The string to replace each match with");
|
||||
b.add_output<decl::String>("String");
|
||||
}
|
||||
|
||||
static std::string replace_all(const StringRefNull str,
|
||||
|
||||
@@ -20,16 +20,16 @@ static void node_declare(NodeDeclarationBuilder &b)
|
||||
};
|
||||
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Vector>(N_("Rotation")).subtype(PROP_EULER).hide_value();
|
||||
b.add_input<decl::Vector>(N_("Rotate By")).subtype(PROP_EULER).make_available([](bNode &node) {
|
||||
b.add_input<decl::Vector>("Rotation").subtype(PROP_EULER).hide_value();
|
||||
b.add_input<decl::Vector>("Rotate By").subtype(PROP_EULER).make_available([](bNode &node) {
|
||||
node.custom1 = FN_NODE_ROTATE_EULER_TYPE_EULER;
|
||||
});
|
||||
b.add_input<decl::Vector>(N_("Axis"))
|
||||
b.add_input<decl::Vector>("Axis")
|
||||
.default_value({0.0, 0.0, 1.0})
|
||||
.subtype(PROP_XYZ)
|
||||
.make_available(enable_axis_angle);
|
||||
b.add_input<decl::Float>(N_("Angle")).subtype(PROP_ANGLE).make_available(enable_axis_angle);
|
||||
b.add_output<decl::Vector>(N_("Rotation"));
|
||||
b.add_input<decl::Float>("Angle").subtype(PROP_ANGLE).make_available(enable_axis_angle);
|
||||
b.add_output<decl::Vector>("Rotation");
|
||||
}
|
||||
|
||||
static void node_update(bNodeTree *ntree, bNode *node)
|
||||
|
||||
@@ -12,11 +12,11 @@ NODE_STORAGE_FUNCS(NodeCombSepColor)
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_output<decl::Float>(N_("Red"));
|
||||
b.add_output<decl::Float>(N_("Green"));
|
||||
b.add_output<decl::Float>(N_("Blue"));
|
||||
b.add_output<decl::Float>(N_("Alpha"));
|
||||
b.add_input<decl::Color>("Color").default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_output<decl::Float>("Red");
|
||||
b.add_output<decl::Float>("Green");
|
||||
b.add_output<decl::Float>("Blue");
|
||||
b.add_output<decl::Float>("Alpha");
|
||||
};
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -8,10 +8,10 @@ namespace blender::nodes::node_fn_slice_string_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::String>(N_("String"));
|
||||
b.add_input<decl::Int>(N_("Position"));
|
||||
b.add_input<decl::Int>(N_("Length")).min(0).default_value(10);
|
||||
b.add_output<decl::String>(N_("String"));
|
||||
b.add_input<decl::String>("String");
|
||||
b.add_input<decl::Int>("Position");
|
||||
b.add_input<decl::Int>("Length").min(0).default_value(10);
|
||||
b.add_output<decl::String>("String");
|
||||
}
|
||||
|
||||
static void node_build_multi_function(NodeMultiFunctionBuilder &builder)
|
||||
|
||||
@@ -10,8 +10,8 @@ namespace blender::nodes::node_fn_string_length_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::String>(N_("String"));
|
||||
b.add_output<decl::Int>(N_("Length"));
|
||||
b.add_input<decl::String>("String");
|
||||
b.add_output<decl::Int>("Length");
|
||||
}
|
||||
|
||||
static void node_build_multi_function(NodeMultiFunctionBuilder &builder)
|
||||
|
||||
@@ -7,9 +7,9 @@ namespace blender::nodes::node_fn_value_to_string_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Value"));
|
||||
b.add_input<decl::Int>(N_("Decimals")).min(0);
|
||||
b.add_output<decl::String>(N_("String"));
|
||||
b.add_input<decl::Float>("Value");
|
||||
b.add_input<decl::Int>("Decimals").min(0);
|
||||
b.add_output<decl::String>("String");
|
||||
}
|
||||
|
||||
static void node_build_multi_function(NodeMultiFunctionBuilder &builder)
|
||||
|
||||
@@ -27,50 +27,49 @@ static void node_declare(NodeDeclarationBuilder &b)
|
||||
std::string total_out_description = N_(
|
||||
"The total of all of the values in the corresponding group");
|
||||
|
||||
b.add_input<decl::Vector>(N_("Value"), "Value Vector")
|
||||
b.add_input<decl::Vector>("Value", "Value Vector")
|
||||
.default_value({1.0f, 1.0f, 1.0f})
|
||||
.supports_field()
|
||||
.description(value_in_description);
|
||||
b.add_input<decl::Float>(N_("Value"), "Value Float")
|
||||
b.add_input<decl::Float>("Value", "Value Float")
|
||||
.default_value(1.0f)
|
||||
.supports_field()
|
||||
.description(value_in_description);
|
||||
b.add_input<decl::Int>(N_("Value"), "Value Int")
|
||||
b.add_input<decl::Int>("Value", "Value Int")
|
||||
.default_value(1)
|
||||
.supports_field()
|
||||
.description(value_in_description);
|
||||
b.add_input<decl::Int>(N_("Group ID"), "Group Index")
|
||||
b.add_input<decl::Int>("Group ID", "Group Index")
|
||||
.supports_field()
|
||||
.description(
|
||||
N_("An index used to group values together for multiple separate accumulations"));
|
||||
.description("An index used to group values together for multiple separate accumulations");
|
||||
|
||||
b.add_output<decl::Vector>(N_("Leading"), "Leading Vector")
|
||||
b.add_output<decl::Vector>("Leading", "Leading Vector")
|
||||
.field_source_reference_all()
|
||||
.description(leading_out_description);
|
||||
b.add_output<decl::Float>(N_("Leading"), "Leading Float")
|
||||
b.add_output<decl::Float>("Leading", "Leading Float")
|
||||
.field_source_reference_all()
|
||||
.description(leading_out_description);
|
||||
b.add_output<decl::Int>(N_("Leading"), "Leading Int")
|
||||
b.add_output<decl::Int>("Leading", "Leading Int")
|
||||
.field_source_reference_all()
|
||||
.description(leading_out_description);
|
||||
|
||||
b.add_output<decl::Vector>(N_("Trailing"), "Trailing Vector")
|
||||
b.add_output<decl::Vector>("Trailing", "Trailing Vector")
|
||||
.field_source_reference_all()
|
||||
.description(trailing_out_description);
|
||||
b.add_output<decl::Float>(N_("Trailing"), "Trailing Float")
|
||||
b.add_output<decl::Float>("Trailing", "Trailing Float")
|
||||
.field_source_reference_all()
|
||||
.description(trailing_out_description);
|
||||
b.add_output<decl::Int>(N_("Trailing"), "Trailing Int")
|
||||
b.add_output<decl::Int>("Trailing", "Trailing Int")
|
||||
.field_source_reference_all()
|
||||
.description(trailing_out_description);
|
||||
|
||||
b.add_output<decl::Vector>(N_("Total"), "Total Vector")
|
||||
b.add_output<decl::Vector>("Total", "Total Vector")
|
||||
.field_source_reference_all()
|
||||
.description(total_out_description);
|
||||
b.add_output<decl::Float>(N_("Total"), "Total Float")
|
||||
b.add_output<decl::Float>("Total", "Total Float")
|
||||
.field_source_reference_all()
|
||||
.description(total_out_description);
|
||||
b.add_output<decl::Int>(N_("Total"), "Total Int")
|
||||
b.add_output<decl::Int>("Total", "Total Int")
|
||||
.field_source_reference_all()
|
||||
.description(total_out_description);
|
||||
}
|
||||
|
||||
@@ -15,19 +15,19 @@ NODE_STORAGE_FUNCS(NodeGeometryAttributeCapture)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Geometry"));
|
||||
b.add_input<decl::Vector>(N_("Value")).field_on_all();
|
||||
b.add_input<decl::Float>(N_("Value"), "Value_001").field_on_all();
|
||||
b.add_input<decl::Color>(N_("Value"), "Value_002").field_on_all();
|
||||
b.add_input<decl::Bool>(N_("Value"), "Value_003").field_on_all();
|
||||
b.add_input<decl::Int>(N_("Value"), "Value_004").field_on_all();
|
||||
b.add_input<decl::Geometry>("Geometry");
|
||||
b.add_input<decl::Vector>("Value").field_on_all();
|
||||
b.add_input<decl::Float>("Value", "Value_001").field_on_all();
|
||||
b.add_input<decl::Color>("Value", "Value_002").field_on_all();
|
||||
b.add_input<decl::Bool>("Value", "Value_003").field_on_all();
|
||||
b.add_input<decl::Int>("Value", "Value_004").field_on_all();
|
||||
|
||||
b.add_output<decl::Geometry>(N_("Geometry")).propagate_all();
|
||||
b.add_output<decl::Vector>(N_("Attribute")).field_on_all();
|
||||
b.add_output<decl::Float>(N_("Attribute"), "Attribute_001").field_on_all();
|
||||
b.add_output<decl::Color>(N_("Attribute"), "Attribute_002").field_on_all();
|
||||
b.add_output<decl::Bool>(N_("Attribute"), "Attribute_003").field_on_all();
|
||||
b.add_output<decl::Int>(N_("Attribute"), "Attribute_004").field_on_all();
|
||||
b.add_output<decl::Geometry>("Geometry").propagate_all();
|
||||
b.add_output<decl::Vector>("Attribute").field_on_all();
|
||||
b.add_output<decl::Float>("Attribute", "Attribute_001").field_on_all();
|
||||
b.add_output<decl::Color>("Attribute", "Attribute_002").field_on_all();
|
||||
b.add_output<decl::Bool>("Attribute", "Attribute_003").field_on_all();
|
||||
b.add_output<decl::Int>("Attribute", "Attribute_004").field_on_all();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -12,22 +12,22 @@ namespace blender::nodes::node_geo_attribute_domain_size_cc {
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>("Geometry");
|
||||
b.add_output<decl::Int>(N_("Point Count")).make_available([](bNode &node) {
|
||||
b.add_output<decl::Int>("Point Count").make_available([](bNode &node) {
|
||||
node.custom1 = GEO_COMPONENT_TYPE_MESH;
|
||||
});
|
||||
b.add_output<decl::Int>(N_("Edge Count")).make_available([](bNode &node) {
|
||||
b.add_output<decl::Int>("Edge Count").make_available([](bNode &node) {
|
||||
node.custom1 = GEO_COMPONENT_TYPE_MESH;
|
||||
});
|
||||
b.add_output<decl::Int>(N_("Face Count")).make_available([](bNode &node) {
|
||||
b.add_output<decl::Int>("Face Count").make_available([](bNode &node) {
|
||||
node.custom1 = GEO_COMPONENT_TYPE_MESH;
|
||||
});
|
||||
b.add_output<decl::Int>(N_("Face Corner Count")).make_available([](bNode &node) {
|
||||
b.add_output<decl::Int>("Face Corner Count").make_available([](bNode &node) {
|
||||
node.custom1 = GEO_COMPONENT_TYPE_MESH;
|
||||
});
|
||||
b.add_output<decl::Int>(N_("Spline Count")).make_available([](bNode &node) {
|
||||
b.add_output<decl::Int>("Spline Count").make_available([](bNode &node) {
|
||||
node.custom1 = GEO_COMPONENT_TYPE_CURVE;
|
||||
});
|
||||
b.add_output<decl::Int>(N_("Instance Count")).make_available([](bNode &node) {
|
||||
b.add_output<decl::Int>("Instance Count").make_available([](bNode &node) {
|
||||
node.custom1 = GEO_COMPONENT_TYPE_INSTANCES;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -16,28 +16,28 @@ namespace blender::nodes::node_geo_attribute_statistic_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Geometry"));
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).field_on_all().hide_value();
|
||||
b.add_input<decl::Float>(N_("Attribute")).hide_value().field_on_all();
|
||||
b.add_input<decl::Vector>(N_("Attribute"), "Attribute_001").hide_value().field_on_all();
|
||||
b.add_input<decl::Geometry>("Geometry");
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).field_on_all().hide_value();
|
||||
b.add_input<decl::Float>("Attribute").hide_value().field_on_all();
|
||||
b.add_input<decl::Vector>("Attribute", "Attribute_001").hide_value().field_on_all();
|
||||
|
||||
b.add_output<decl::Float>(N_("Mean"));
|
||||
b.add_output<decl::Float>(N_("Median"));
|
||||
b.add_output<decl::Float>(N_("Sum"));
|
||||
b.add_output<decl::Float>(N_("Min"));
|
||||
b.add_output<decl::Float>(N_("Max"));
|
||||
b.add_output<decl::Float>(N_("Range"));
|
||||
b.add_output<decl::Float>(N_("Standard Deviation"));
|
||||
b.add_output<decl::Float>(N_("Variance"));
|
||||
b.add_output<decl::Float>("Mean");
|
||||
b.add_output<decl::Float>("Median");
|
||||
b.add_output<decl::Float>("Sum");
|
||||
b.add_output<decl::Float>("Min");
|
||||
b.add_output<decl::Float>("Max");
|
||||
b.add_output<decl::Float>("Range");
|
||||
b.add_output<decl::Float>("Standard Deviation");
|
||||
b.add_output<decl::Float>("Variance");
|
||||
|
||||
b.add_output<decl::Vector>(N_("Mean"), "Mean_001");
|
||||
b.add_output<decl::Vector>(N_("Median"), "Median_001");
|
||||
b.add_output<decl::Vector>(N_("Sum"), "Sum_001");
|
||||
b.add_output<decl::Vector>(N_("Min"), "Min_001");
|
||||
b.add_output<decl::Vector>(N_("Max"), "Max_001");
|
||||
b.add_output<decl::Vector>(N_("Range"), "Range_001");
|
||||
b.add_output<decl::Vector>(N_("Standard Deviation"), "Standard Deviation_001");
|
||||
b.add_output<decl::Vector>(N_("Variance"), "Variance_001");
|
||||
b.add_output<decl::Vector>("Mean", "Mean_001");
|
||||
b.add_output<decl::Vector>("Median", "Median_001");
|
||||
b.add_output<decl::Vector>("Sum", "Sum_001");
|
||||
b.add_output<decl::Vector>("Min", "Min_001");
|
||||
b.add_output<decl::Vector>("Max", "Max_001");
|
||||
b.add_output<decl::Vector>("Range", "Range_001");
|
||||
b.add_output<decl::Vector>("Standard Deviation", "Standard Deviation_001");
|
||||
b.add_output<decl::Vector>("Variance", "Variance_001");
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -29,19 +29,19 @@ namespace blender::nodes::node_geo_blur_attribute_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Value"), "Value_Float")
|
||||
b.add_input<decl::Float>("Value", "Value_Float")
|
||||
.supports_field()
|
||||
.hide_value()
|
||||
.is_default_link_socket();
|
||||
b.add_input<decl::Int>(N_("Value"), "Value_Int")
|
||||
b.add_input<decl::Int>("Value", "Value_Int")
|
||||
.supports_field()
|
||||
.hide_value()
|
||||
.is_default_link_socket();
|
||||
b.add_input<decl::Vector>(N_("Value"), "Value_Vector")
|
||||
b.add_input<decl::Vector>("Value", "Value_Vector")
|
||||
.supports_field()
|
||||
.hide_value()
|
||||
.is_default_link_socket();
|
||||
b.add_input<decl::Color>(N_("Value"), "Value_Color")
|
||||
b.add_input<decl::Color>("Value", "Value_Color")
|
||||
.supports_field()
|
||||
.hide_value()
|
||||
.is_default_link_socket();
|
||||
@@ -49,25 +49,21 @@ static void node_declare(NodeDeclarationBuilder &b)
|
||||
b.add_input<decl::Int>("Iterations")
|
||||
.default_value(1)
|
||||
.min(0)
|
||||
.description(N_("How many times to blur the values for all elements"));
|
||||
.description("How many times to blur the values for all elements");
|
||||
b.add_input<decl::Float>("Weight")
|
||||
.default_value(1.0f)
|
||||
.subtype(PROP_FACTOR)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.supports_field()
|
||||
.description(N_("Relative mix weight of neighboring elements"));
|
||||
.description("Relative mix weight of neighboring elements");
|
||||
|
||||
b.add_output<decl::Float>(N_("Value"), "Value_Float")
|
||||
.field_source_reference_all()
|
||||
.dependent_field();
|
||||
b.add_output<decl::Int>(N_("Value"), "Value_Int").field_source_reference_all().dependent_field();
|
||||
b.add_output<decl::Vector>(N_("Value"), "Value_Vector")
|
||||
.field_source_reference_all()
|
||||
.dependent_field();
|
||||
b.add_output<decl::Color>(N_("Value"), "Value_Color")
|
||||
b.add_output<decl::Float>("Value", "Value_Float").field_source_reference_all().dependent_field();
|
||||
b.add_output<decl::Int>("Value", "Value_Int").field_source_reference_all().dependent_field();
|
||||
b.add_output<decl::Vector>("Value", "Value_Vector")
|
||||
.field_source_reference_all()
|
||||
.dependent_field();
|
||||
b.add_output<decl::Color>("Value", "Value_Color").field_source_reference_all().dependent_field();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -14,14 +14,13 @@ namespace blender::nodes::node_geo_boolean_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Mesh 1"))
|
||||
.only_realized_data()
|
||||
.supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Geometry>(N_("Mesh 2")).multi_input().supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Bool>(N_("Self Intersection"));
|
||||
b.add_input<decl::Bool>(N_("Hole Tolerant"));
|
||||
b.add_output<decl::Geometry>(N_("Mesh")).propagate_all();
|
||||
b.add_output<decl::Bool>(N_("Intersecting Edges")).field_on_all();
|
||||
b.add_input<decl::Geometry>("Mesh 1").only_realized_data().supported_type(
|
||||
GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Geometry>("Mesh 2").multi_input().supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Bool>("Self Intersection");
|
||||
b.add_input<decl::Bool>("Hole Tolerant");
|
||||
b.add_output<decl::Geometry>("Mesh").propagate_all();
|
||||
b.add_output<decl::Bool>("Intersecting Edges").field_on_all();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
@@ -45,12 +44,12 @@ static void node_update(bNodeTree *ntree, bNode *node)
|
||||
case GEO_NODE_BOOLEAN_UNION:
|
||||
bke::nodeSetSocketAvailability(ntree, geometry_1_socket, false);
|
||||
bke::nodeSetSocketAvailability(ntree, geometry_2_socket, true);
|
||||
node_sock_label(geometry_2_socket, N_("Mesh"));
|
||||
node_sock_label(geometry_2_socket, "Mesh");
|
||||
break;
|
||||
case GEO_NODE_BOOLEAN_DIFFERENCE:
|
||||
bke::nodeSetSocketAvailability(ntree, geometry_1_socket, true);
|
||||
bke::nodeSetSocketAvailability(ntree, geometry_2_socket, true);
|
||||
node_sock_label(geometry_2_socket, N_("Mesh 2"));
|
||||
node_sock_label(geometry_2_socket, "Mesh 2");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,10 +8,10 @@ namespace blender::nodes::node_geo_bounding_box_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Geometry"));
|
||||
b.add_output<decl::Geometry>(N_("Bounding Box"));
|
||||
b.add_output<decl::Vector>(N_("Min"));
|
||||
b.add_output<decl::Vector>(N_("Max"));
|
||||
b.add_input<decl::Geometry>("Geometry");
|
||||
b.add_output<decl::Geometry>("Bounding Box");
|
||||
b.add_output<decl::Vector>("Min");
|
||||
b.add_output<decl::Vector>("Max");
|
||||
}
|
||||
|
||||
static void node_geo_exec(GeoNodeExecParams params)
|
||||
|
||||
@@ -20,15 +20,15 @@ NODE_STORAGE_FUNCS(NodeGeometryCollectionInfo)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Collection>(N_("Collection")).hide_label();
|
||||
b.add_input<decl::Bool>(N_("Separate Children"))
|
||||
b.add_input<decl::Collection>("Collection").hide_label();
|
||||
b.add_input<decl::Bool>("Separate Children")
|
||||
.description(
|
||||
N_("Output each child of the collection as a separate instance, sorted alphabetically"));
|
||||
b.add_input<decl::Bool>(N_("Reset Children"))
|
||||
"Output each child of the collection as a separate instance, sorted alphabetically");
|
||||
b.add_input<decl::Bool>("Reset Children")
|
||||
.description(
|
||||
N_("Reset the transforms of every child instance in the output. Only used when Separate "
|
||||
"Children is enabled"));
|
||||
b.add_output<decl::Geometry>(N_("Instances"));
|
||||
"Reset the transforms of every child instance in the output. Only used when Separate "
|
||||
"Children is enabled");
|
||||
b.add_output<decl::Geometry>("Instances");
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -18,8 +18,8 @@ namespace blender::nodes::node_geo_convex_hull_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Geometry"));
|
||||
b.add_output<decl::Geometry>(N_("Convex Hull"));
|
||||
b.add_input<decl::Geometry>("Geometry");
|
||||
b.add_output<decl::Geometry>("Convex Hull");
|
||||
}
|
||||
|
||||
#ifdef WITH_BULLET
|
||||
|
||||
@@ -13,20 +13,19 @@ namespace blender::nodes::node_geo_curve_endpoint_selection_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Int>(N_("Start Size"))
|
||||
b.add_input<decl::Int>("Start Size")
|
||||
.min(0)
|
||||
.default_value(1)
|
||||
.supports_field()
|
||||
.description(N_("The amount of points to select from the start of each spline"));
|
||||
b.add_input<decl::Int>(N_("End Size"))
|
||||
.description("The amount of points to select from the start of each spline");
|
||||
b.add_input<decl::Int>("End Size")
|
||||
.min(0)
|
||||
.default_value(1)
|
||||
.supports_field()
|
||||
.description(N_("The amount of points to select from the end of each spline"));
|
||||
b.add_output<decl::Bool>(N_("Selection"))
|
||||
.description("The amount of points to select from the end of each spline");
|
||||
b.add_output<decl::Bool>("Selection")
|
||||
.field_source_reference_all()
|
||||
.description(
|
||||
N_("The selection from the start and end of the splines based on the input sizes"));
|
||||
.description("The selection from the start and end of the splines based on the input sizes");
|
||||
}
|
||||
|
||||
class EndpointFieldInput final : public bke::CurvesFieldInput {
|
||||
|
||||
@@ -23,8 +23,8 @@ NODE_STORAGE_FUNCS(NodeGeometryCurveFill)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Curve")).supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_output<decl::Geometry>(N_("Mesh"));
|
||||
b.add_input<decl::Geometry>("Curve").supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_output<decl::Geometry>("Mesh");
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -13,23 +13,18 @@ NODE_STORAGE_FUNCS(NodeGeometryCurveFillet)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Curve")).supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Int>(N_("Count"))
|
||||
.default_value(1)
|
||||
.min(1)
|
||||
.max(1000)
|
||||
.field_on_all()
|
||||
.make_available([](bNode &node) { node_storage(node).mode = GEO_NODE_CURVE_FILLET_POLY; });
|
||||
b.add_input<decl::Float>(N_("Radius"))
|
||||
b.add_input<decl::Geometry>("Curve").supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Int>("Count").default_value(1).min(1).max(1000).field_on_all().make_available(
|
||||
[](bNode &node) { node_storage(node).mode = GEO_NODE_CURVE_FILLET_POLY; });
|
||||
b.add_input<decl::Float>("Radius")
|
||||
.min(0.0f)
|
||||
.max(FLT_MAX)
|
||||
.subtype(PropertySubType::PROP_DISTANCE)
|
||||
.default_value(0.25f)
|
||||
.field_on_all();
|
||||
b.add_input<decl::Bool>(N_("Limit Radius"))
|
||||
.description(
|
||||
N_("Limit the maximum value of the radius in order to avoid overlapping fillets"));
|
||||
b.add_output<decl::Geometry>(N_("Curve")).propagate_all();
|
||||
b.add_input<decl::Bool>("Limit Radius")
|
||||
.description("Limit the maximum value of the radius in order to avoid overlapping fillets");
|
||||
b.add_output<decl::Geometry>("Curve").propagate_all();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -13,7 +13,7 @@ NODE_STORAGE_FUNCS(NodeGeometryCurveSelectHandles)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Bool>(N_("Selection")).field_source();
|
||||
b.add_output<decl::Bool>("Selection").field_source();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -8,8 +8,8 @@ namespace blender::nodes::node_geo_curve_length_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Curve")).supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_output<decl::Float>(N_("Length"));
|
||||
b.add_input<decl::Geometry>("Curve").supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_output<decl::Float>("Length");
|
||||
}
|
||||
|
||||
static void node_geo_exec(GeoNodeExecParams params)
|
||||
|
||||
@@ -24,67 +24,68 @@ static void node_declare(NodeDeclarationBuilder &b)
|
||||
node_storage(node).mode = GEO_NODE_CURVE_PRIMITIVE_ARC_TYPE_RADIUS;
|
||||
};
|
||||
|
||||
b.add_input<decl::Int>(N_("Resolution"))
|
||||
b.add_input<decl::Int>("Resolution")
|
||||
.default_value(16)
|
||||
.min(2)
|
||||
.max(256)
|
||||
.subtype(PROP_UNSIGNED)
|
||||
.description(N_("The number of points on the arc"));
|
||||
b.add_input<decl::Vector>(N_("Start"))
|
||||
.description("The number of points on the arc");
|
||||
b.add_input<decl::Vector>("Start")
|
||||
.default_value({-1.0f, 0.0f, 0.0f})
|
||||
.subtype(PROP_TRANSLATION)
|
||||
.description(N_("Position of the first control point"))
|
||||
.description("Position of the first control point")
|
||||
.make_available(enable_points);
|
||||
b.add_input<decl::Vector>(N_("Middle"))
|
||||
b.add_input<decl::Vector>("Middle")
|
||||
.default_value({0.0f, 2.0f, 0.0f})
|
||||
.subtype(PROP_TRANSLATION)
|
||||
.description(N_("Position of the middle control point"))
|
||||
.description("Position of the middle control point")
|
||||
.make_available(enable_points);
|
||||
b.add_input<decl::Vector>(N_("End"))
|
||||
b.add_input<decl::Vector>("End")
|
||||
.default_value({1.0f, 0.0f, 0.0f})
|
||||
.subtype(PROP_TRANSLATION)
|
||||
.description(N_("Position of the last control point"))
|
||||
.description("Position of the last control point")
|
||||
.make_available(enable_points);
|
||||
b.add_input<decl::Float>(N_("Radius"))
|
||||
b.add_input<decl::Float>("Radius")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("Distance of the points from the origin"))
|
||||
.description("Distance of the points from the origin")
|
||||
.make_available(enable_radius);
|
||||
b.add_input<decl::Float>(N_("Start Angle"))
|
||||
b.add_input<decl::Float>("Start Angle")
|
||||
.default_value(0.0f)
|
||||
.subtype(PROP_ANGLE)
|
||||
.description(N_("Starting angle of the arc"))
|
||||
.description("Starting angle of the arc")
|
||||
.make_available(enable_radius);
|
||||
b.add_input<decl::Float>(N_("Sweep Angle"))
|
||||
b.add_input<decl::Float>("Sweep Angle")
|
||||
.default_value(1.75f * M_PI)
|
||||
.min(-2 * M_PI)
|
||||
.max(2 * M_PI)
|
||||
.subtype(PROP_ANGLE)
|
||||
.description(N_("Length of the arc"))
|
||||
.description("Length of the arc")
|
||||
.make_available(enable_radius);
|
||||
b.add_input<decl::Float>(N_("Offset Angle"))
|
||||
b.add_input<decl::Float>("Offset Angle")
|
||||
.default_value(0.0f)
|
||||
.subtype(PROP_ANGLE)
|
||||
.description(N_("Offset angle of the arc"))
|
||||
.description("Offset angle of the arc")
|
||||
.make_available(enable_points);
|
||||
b.add_input<decl::Bool>(N_("Connect Center"))
|
||||
b.add_input<decl::Bool>("Connect Center")
|
||||
.default_value(false)
|
||||
.description(N_("Connect the arc at the center"));
|
||||
b.add_input<decl::Bool>(N_("Invert Arc"))
|
||||
.description("Connect the arc at the center");
|
||||
b.add_input<decl::Bool>("Invert Arc")
|
||||
.default_value(false)
|
||||
.description(N_("Invert and draw opposite arc"));
|
||||
.description("Invert and draw opposite arc");
|
||||
|
||||
b.add_output<decl::Geometry>(N_("Curve"));
|
||||
b.add_output<decl::Vector>(N_("Center"))
|
||||
.description(N_("The center of the circle described by the three points"))
|
||||
b.add_output<decl::Geometry>("Curve");
|
||||
b.add_output<decl::Vector>("Center")
|
||||
.description("The center of the circle described by the three points")
|
||||
.make_available(enable_points);
|
||||
b.add_output<decl::Vector>(N_("Normal"))
|
||||
.description(N_("The normal direction of the plane described by the three points, pointing "
|
||||
"towards the positive Z axis"))
|
||||
b.add_output<decl::Vector>("Normal")
|
||||
.description(
|
||||
"The normal direction of the plane described by the three points, pointing "
|
||||
"towards the positive Z axis")
|
||||
.make_available(enable_points);
|
||||
b.add_output<decl::Float>(N_("Radius"))
|
||||
.description(N_("The radius of the circle described by the three points"))
|
||||
b.add_output<decl::Float>("Radius")
|
||||
.description("The radius of the circle described by the three points")
|
||||
.make_available(enable_points);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,32 +13,32 @@ NODE_STORAGE_FUNCS(NodeGeometryCurvePrimitiveBezierSegment)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Int>(N_("Resolution"))
|
||||
b.add_input<decl::Int>("Resolution")
|
||||
.default_value(16)
|
||||
.min(1)
|
||||
.max(256)
|
||||
.subtype(PROP_UNSIGNED)
|
||||
.description(N_("The number of evaluated points on the curve"));
|
||||
b.add_input<decl::Vector>(N_("Start"))
|
||||
.description("The number of evaluated points on the curve");
|
||||
b.add_input<decl::Vector>("Start")
|
||||
.default_value({-1.0f, 0.0f, 0.0f})
|
||||
.subtype(PROP_TRANSLATION)
|
||||
.description(N_("Position of the start control point of the curve"));
|
||||
b.add_input<decl::Vector>(N_("Start Handle"))
|
||||
.description("Position of the start control point of the curve");
|
||||
b.add_input<decl::Vector>("Start Handle")
|
||||
.default_value({-0.5f, 0.5f, 0.0f})
|
||||
.subtype(PROP_TRANSLATION)
|
||||
.description(
|
||||
N_("Position of the start handle used to define the shape of the curve. In Offset mode, "
|
||||
"relative to Start point"));
|
||||
b.add_input<decl::Vector>(N_("End Handle"))
|
||||
"Position of the start handle used to define the shape of the curve. In Offset mode, "
|
||||
"relative to Start point");
|
||||
b.add_input<decl::Vector>("End Handle")
|
||||
.subtype(PROP_TRANSLATION)
|
||||
.description(
|
||||
N_("Position of the end handle used to define the shape of the curve. In Offset mode, "
|
||||
"relative to End point"));
|
||||
b.add_input<decl::Vector>(N_("End"))
|
||||
"Position of the end handle used to define the shape of the curve. In Offset mode, "
|
||||
"relative to End point");
|
||||
b.add_input<decl::Vector>("End")
|
||||
.default_value({1.0f, 0.0f, 0.0f})
|
||||
.subtype(PROP_TRANSLATION)
|
||||
.description(N_("Position of the end control point of the curve"));
|
||||
b.add_output<decl::Geometry>(N_("Curve"));
|
||||
.description("Position of the end control point of the curve");
|
||||
b.add_output<decl::Geometry>("Curve");
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -20,40 +20,40 @@ static void node_declare(NodeDeclarationBuilder &b)
|
||||
node_storage(node).mode = GEO_NODE_CURVE_PRIMITIVE_CIRCLE_TYPE_RADIUS;
|
||||
};
|
||||
|
||||
b.add_input<decl::Int>(N_("Resolution"))
|
||||
b.add_input<decl::Int>("Resolution")
|
||||
.default_value(32)
|
||||
.min(3)
|
||||
.max(512)
|
||||
.description(N_("Number of points on the circle"));
|
||||
b.add_input<decl::Vector>(N_("Point 1"))
|
||||
.description("Number of points on the circle");
|
||||
b.add_input<decl::Vector>("Point 1")
|
||||
.default_value({-1.0f, 0.0f, 0.0f})
|
||||
.subtype(PROP_TRANSLATION)
|
||||
.description(
|
||||
N_("One of the three points on the circle. The point order determines the circle's "
|
||||
"direction"))
|
||||
"One of the three points on the circle. The point order determines the circle's "
|
||||
"direction")
|
||||
.make_available(endable_points);
|
||||
b.add_input<decl::Vector>(N_("Point 2"))
|
||||
b.add_input<decl::Vector>("Point 2")
|
||||
.default_value({0.0f, 1.0f, 0.0f})
|
||||
.subtype(PROP_TRANSLATION)
|
||||
.description(
|
||||
N_("One of the three points on the circle. The point order determines the circle's "
|
||||
"direction"))
|
||||
"One of the three points on the circle. The point order determines the circle's "
|
||||
"direction")
|
||||
.make_available(endable_points);
|
||||
b.add_input<decl::Vector>(N_("Point 3"))
|
||||
b.add_input<decl::Vector>("Point 3")
|
||||
.default_value({1.0f, 0.0f, 0.0f})
|
||||
.subtype(PROP_TRANSLATION)
|
||||
.description(
|
||||
N_("One of the three points on the circle. The point order determines the circle's "
|
||||
"direction"))
|
||||
"One of the three points on the circle. The point order determines the circle's "
|
||||
"direction")
|
||||
.make_available(endable_points);
|
||||
b.add_input<decl::Float>(N_("Radius"))
|
||||
b.add_input<decl::Float>("Radius")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("Distance of the points from the origin"))
|
||||
.description("Distance of the points from the origin")
|
||||
.make_available(enable_radius);
|
||||
b.add_output<decl::Geometry>(N_("Curve"));
|
||||
b.add_output<decl::Vector>(N_("Center")).make_available(endable_points);
|
||||
b.add_output<decl::Geometry>("Curve");
|
||||
b.add_output<decl::Vector>("Center").make_available(endable_points);
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -17,26 +17,26 @@ static void node_declare(NodeDeclarationBuilder &b)
|
||||
node_storage(node).mode = GEO_NODE_CURVE_PRIMITIVE_LINE_MODE_DIRECTION;
|
||||
};
|
||||
|
||||
b.add_input<decl::Vector>(N_("Start"))
|
||||
b.add_input<decl::Vector>("Start")
|
||||
.subtype(PROP_TRANSLATION)
|
||||
.description(N_("Position of the first control point"));
|
||||
b.add_input<decl::Vector>(N_("End"))
|
||||
.description("Position of the first control point");
|
||||
b.add_input<decl::Vector>("End")
|
||||
.default_value({0.0f, 0.0f, 1.0f})
|
||||
.subtype(PROP_TRANSLATION)
|
||||
.description(N_("Position of the second control point"))
|
||||
.description("Position of the second control point")
|
||||
.make_available([](bNode &node) {
|
||||
node_storage(node).mode = GEO_NODE_CURVE_PRIMITIVE_LINE_MODE_POINTS;
|
||||
});
|
||||
b.add_input<decl::Vector>(N_("Direction"))
|
||||
b.add_input<decl::Vector>("Direction")
|
||||
.default_value({0.0f, 0.0f, 1.0f})
|
||||
.description(N_("Direction the line is going in. The length of this vector does not matter"))
|
||||
.description("Direction the line is going in. The length of this vector does not matter")
|
||||
.make_available(enable_direction);
|
||||
b.add_input<decl::Float>(N_("Length"))
|
||||
b.add_input<decl::Float>("Length")
|
||||
.default_value(1.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("Distance between the two points"))
|
||||
.description("Distance between the two points")
|
||||
.make_available(enable_direction);
|
||||
b.add_output<decl::Geometry>(N_("Curve"));
|
||||
b.add_output<decl::Geometry>("Curve");
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -7,25 +7,25 @@ namespace blender::nodes::node_geo_curve_primitive_quadratic_bezier_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Int>(N_("Resolution"))
|
||||
b.add_input<decl::Int>("Resolution")
|
||||
.default_value(16)
|
||||
.min(3)
|
||||
.max(256)
|
||||
.subtype(PROP_UNSIGNED)
|
||||
.description(N_("The number of edges on the curve"));
|
||||
b.add_input<decl::Vector>(N_("Start"))
|
||||
.description("The number of edges on the curve");
|
||||
b.add_input<decl::Vector>("Start")
|
||||
.default_value({-1.0f, 0.0f, 0.0f})
|
||||
.subtype(PROP_TRANSLATION)
|
||||
.description(N_("Position of the first control point"));
|
||||
b.add_input<decl::Vector>(N_("Middle"))
|
||||
.description("Position of the first control point");
|
||||
b.add_input<decl::Vector>("Middle")
|
||||
.default_value({0.0f, 2.0f, 0.0f})
|
||||
.subtype(PROP_TRANSLATION)
|
||||
.description(N_("Position of the middle control point"));
|
||||
b.add_input<decl::Vector>(N_("End"))
|
||||
.description("Position of the middle control point");
|
||||
b.add_input<decl::Vector>("End")
|
||||
.default_value({1.0f, 0.0f, 0.0f})
|
||||
.subtype(PROP_TRANSLATION)
|
||||
.description(N_("Position of the last control point"));
|
||||
b.add_output<decl::Geometry>(N_("Curve"));
|
||||
.description("Position of the last control point");
|
||||
b.add_output<decl::Geometry>("Curve");
|
||||
}
|
||||
|
||||
static Curves *create_quadratic_bezier_curve(const float3 p1,
|
||||
|
||||
@@ -14,58 +14,58 @@ NODE_STORAGE_FUNCS(NodeGeometryCurvePrimitiveQuad)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Width"))
|
||||
b.add_input<decl::Float>("Width")
|
||||
.default_value(2.0f)
|
||||
.min(0.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("The X axis size of the shape"));
|
||||
b.add_input<decl::Float>(N_("Height"))
|
||||
.description("The X axis size of the shape");
|
||||
b.add_input<decl::Float>("Height")
|
||||
.default_value(2.0f)
|
||||
.min(0.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("The Y axis size of the shape"));
|
||||
b.add_input<decl::Float>(N_("Bottom Width"))
|
||||
.description("The Y axis size of the shape");
|
||||
b.add_input<decl::Float>("Bottom Width")
|
||||
.default_value(4.0f)
|
||||
.min(0.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("The X axis size of the shape"));
|
||||
b.add_input<decl::Float>(N_("Top Width"))
|
||||
.description("The X axis size of the shape");
|
||||
b.add_input<decl::Float>("Top Width")
|
||||
.default_value(2.0f)
|
||||
.min(0.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("The X axis size of the shape"));
|
||||
b.add_input<decl::Float>(N_("Offset"))
|
||||
.description("The X axis size of the shape");
|
||||
b.add_input<decl::Float>("Offset")
|
||||
.default_value(1.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(
|
||||
N_("For Parallelogram, the relative X difference between the top and bottom edges. For "
|
||||
"Trapezoid, the amount to move the top edge in the positive X axis"));
|
||||
b.add_input<decl::Float>(N_("Bottom Height"))
|
||||
"For Parallelogram, the relative X difference between the top and bottom edges. For "
|
||||
"Trapezoid, the amount to move the top edge in the positive X axis");
|
||||
b.add_input<decl::Float>("Bottom Height")
|
||||
.default_value(3.0f)
|
||||
.min(0.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("The distance between the bottom point and the X axis"));
|
||||
b.add_input<decl::Float>(N_("Top Height"))
|
||||
.description("The distance between the bottom point and the X axis");
|
||||
b.add_input<decl::Float>("Top Height")
|
||||
.default_value(1.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("The distance between the top point and the X axis"));
|
||||
b.add_input<decl::Vector>(N_("Point 1"))
|
||||
.description("The distance between the top point and the X axis");
|
||||
b.add_input<decl::Vector>("Point 1")
|
||||
.default_value({-1.0f, -1.0f, 0.0f})
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("The exact location of the point to use"));
|
||||
b.add_input<decl::Vector>(N_("Point 2"))
|
||||
.description("The exact location of the point to use");
|
||||
b.add_input<decl::Vector>("Point 2")
|
||||
.default_value({1.0f, -1.0f, 0.0f})
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("The exact location of the point to use"));
|
||||
b.add_input<decl::Vector>(N_("Point 3"))
|
||||
.description("The exact location of the point to use");
|
||||
b.add_input<decl::Vector>("Point 3")
|
||||
.default_value({1.0f, 1.0f, 0.0f})
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("The exact location of the point to use"));
|
||||
b.add_input<decl::Vector>(N_("Point 4"))
|
||||
.description("The exact location of the point to use");
|
||||
b.add_input<decl::Vector>("Point 4")
|
||||
.default_value({-1.0f, 1.0f, 0.0f})
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("The exact location of the point to use"));
|
||||
b.add_output<decl::Geometry>(N_("Curve"));
|
||||
.description("The exact location of the point to use");
|
||||
b.add_output<decl::Geometry>("Curve");
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -8,31 +8,31 @@ namespace blender::nodes::node_geo_curve_primitive_spiral_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Int>(N_("Resolution"))
|
||||
b.add_input<decl::Int>("Resolution")
|
||||
.default_value(32)
|
||||
.min(1)
|
||||
.max(1024)
|
||||
.subtype(PROP_UNSIGNED)
|
||||
.description(N_("Number of points in one rotation of the spiral"));
|
||||
b.add_input<decl::Float>(N_("Rotations"))
|
||||
.description("Number of points in one rotation of the spiral");
|
||||
b.add_input<decl::Float>("Rotations")
|
||||
.default_value(2.0f)
|
||||
.min(0.0f)
|
||||
.description(N_("Number of times the spiral makes a full rotation"));
|
||||
b.add_input<decl::Float>(N_("Start Radius"))
|
||||
.description("Number of times the spiral makes a full rotation");
|
||||
b.add_input<decl::Float>("Start Radius")
|
||||
.default_value(1.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("Horizontal Distance from the Z axis at the start of the spiral"));
|
||||
b.add_input<decl::Float>(N_("End Radius"))
|
||||
.description("Horizontal Distance from the Z axis at the start of the spiral");
|
||||
b.add_input<decl::Float>("End Radius")
|
||||
.default_value(2.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("Horizontal Distance from the Z axis at the end of the spiral"));
|
||||
b.add_input<decl::Float>(N_("Height"))
|
||||
.description("Horizontal Distance from the Z axis at the end of the spiral");
|
||||
b.add_input<decl::Float>("Height")
|
||||
.default_value(2.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("The height perpendicular to the base of the spiral"));
|
||||
b.add_input<decl::Bool>(N_("Reverse"))
|
||||
.description(N_("Switch the direction from clockwise to counterclockwise"));
|
||||
b.add_output<decl::Geometry>(N_("Curve"));
|
||||
.description("The height perpendicular to the base of the spiral");
|
||||
b.add_input<decl::Bool>("Reverse").description(
|
||||
"Switch the direction from clockwise to counterclockwise");
|
||||
b.add_output<decl::Geometry>("Curve");
|
||||
}
|
||||
|
||||
static Curves *create_spiral_curve(const float rotations,
|
||||
|
||||
@@ -8,29 +8,29 @@ namespace blender::nodes::node_geo_curve_primitive_star_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Int>(N_("Points"))
|
||||
b.add_input<decl::Int>("Points")
|
||||
.default_value(8)
|
||||
.min(3)
|
||||
.max(256)
|
||||
.subtype(PROP_UNSIGNED)
|
||||
.description(N_("Number of points on each of the circles"));
|
||||
b.add_input<decl::Float>(N_("Inner Radius"))
|
||||
.description("Number of points on each of the circles");
|
||||
b.add_input<decl::Float>("Inner Radius")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("Radius of the inner circle; can be larger than outer radius"));
|
||||
b.add_input<decl::Float>(N_("Outer Radius"))
|
||||
.description("Radius of the inner circle; can be larger than outer radius");
|
||||
b.add_input<decl::Float>("Outer Radius")
|
||||
.default_value(2.0f)
|
||||
.min(0.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("Radius of the outer circle; can be smaller than inner radius"));
|
||||
b.add_input<decl::Float>(N_("Twist"))
|
||||
.description("Radius of the outer circle; can be smaller than inner radius");
|
||||
b.add_input<decl::Float>("Twist")
|
||||
.subtype(PROP_ANGLE)
|
||||
.description(N_("The counterclockwise rotation of the inner set of points"));
|
||||
b.add_output<decl::Geometry>(N_("Curve"));
|
||||
b.add_output<decl::Bool>(N_("Outer Points"))
|
||||
.description("The counterclockwise rotation of the inner set of points");
|
||||
b.add_output<decl::Geometry>("Curve");
|
||||
b.add_output<decl::Bool>("Outer Points")
|
||||
.field_on_all()
|
||||
.description(N_("An attribute field with a selection of the outer points"));
|
||||
.description("An attribute field with a selection of the outer points");
|
||||
}
|
||||
|
||||
static Curves *create_star_curve(const float inner_radius,
|
||||
|
||||
@@ -15,15 +15,12 @@ NODE_STORAGE_FUNCS(NodeGeometryCurveResample)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Curve")).supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).field_on_all().hide_value();
|
||||
b.add_input<decl::Int>(N_("Count")).default_value(10).min(1).max(100000).field_on_all();
|
||||
b.add_input<decl::Float>(N_("Length"))
|
||||
.default_value(0.1f)
|
||||
.min(0.01f)
|
||||
.field_on_all()
|
||||
.subtype(PROP_DISTANCE);
|
||||
b.add_output<decl::Geometry>(N_("Curve")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Curve").supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).field_on_all().hide_value();
|
||||
b.add_input<decl::Int>("Count").default_value(10).min(1).max(100000).field_on_all();
|
||||
b.add_input<decl::Float>("Length").default_value(0.1f).min(0.01f).field_on_all().subtype(
|
||||
PROP_DISTANCE);
|
||||
b.add_output<decl::Geometry>("Curve").propagate_all();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -10,9 +10,9 @@ namespace blender::nodes::node_geo_curve_reverse_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Curve")).supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().field_on_all();
|
||||
b.add_output<decl::Geometry>(N_("Curve")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Curve").supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).hide_value().field_on_all();
|
||||
b.add_output<decl::Geometry>("Curve").propagate_all();
|
||||
}
|
||||
|
||||
static void node_geo_exec(GeoNodeExecParams params)
|
||||
|
||||
@@ -18,40 +18,39 @@ NODE_STORAGE_FUNCS(NodeGeometryCurveSample)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Curves"))
|
||||
.only_realized_data()
|
||||
.supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Geometry>("Curves").only_realized_data().supported_type(
|
||||
GEO_COMPONENT_TYPE_CURVE);
|
||||
|
||||
b.add_input<decl::Float>(N_("Value"), "Value_Float").hide_value().field_on_all();
|
||||
b.add_input<decl::Int>(N_("Value"), "Value_Int").hide_value().field_on_all();
|
||||
b.add_input<decl::Vector>(N_("Value"), "Value_Vector").hide_value().field_on_all();
|
||||
b.add_input<decl::Color>(N_("Value"), "Value_Color").hide_value().field_on_all();
|
||||
b.add_input<decl::Bool>(N_("Value"), "Value_Bool").hide_value().field_on_all();
|
||||
b.add_input<decl::Float>("Value", "Value_Float").hide_value().field_on_all();
|
||||
b.add_input<decl::Int>("Value", "Value_Int").hide_value().field_on_all();
|
||||
b.add_input<decl::Vector>("Value", "Value_Vector").hide_value().field_on_all();
|
||||
b.add_input<decl::Color>("Value", "Value_Color").hide_value().field_on_all();
|
||||
b.add_input<decl::Bool>("Value", "Value_Bool").hide_value().field_on_all();
|
||||
|
||||
b.add_input<decl::Float>(N_("Factor"))
|
||||
b.add_input<decl::Float>("Factor")
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR)
|
||||
.field_on_all()
|
||||
.make_available([](bNode &node) { node_storage(node).mode = GEO_NODE_CURVE_SAMPLE_FACTOR; });
|
||||
b.add_input<decl::Float>(N_("Length"))
|
||||
b.add_input<decl::Float>("Length")
|
||||
.min(0.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.field_on_all()
|
||||
.make_available([](bNode &node) { node_storage(node).mode = GEO_NODE_CURVE_SAMPLE_LENGTH; });
|
||||
b.add_input<decl::Int>(N_("Curve Index")).field_on_all().make_available([](bNode &node) {
|
||||
b.add_input<decl::Int>("Curve Index").field_on_all().make_available([](bNode &node) {
|
||||
node_storage(node).use_all_curves = false;
|
||||
});
|
||||
|
||||
b.add_output<decl::Float>(N_("Value"), "Value_Float").dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Int>(N_("Value"), "Value_Int").dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Vector>(N_("Value"), "Value_Vector").dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Color>(N_("Value"), "Value_Color").dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Bool>(N_("Value"), "Value_Bool").dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Float>("Value", "Value_Float").dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Int>("Value", "Value_Int").dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Vector>("Value", "Value_Vector").dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Color>("Value", "Value_Color").dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Bool>("Value", "Value_Bool").dependent_field({6, 7, 8});
|
||||
|
||||
b.add_output<decl::Vector>(N_("Position")).dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Vector>(N_("Tangent")).dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Vector>(N_("Normal")).dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Vector>("Position").dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Vector>("Tangent").dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Vector>("Normal").dependent_field({6, 7, 8});
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -15,9 +15,9 @@ NODE_STORAGE_FUNCS(NodeGeometryCurveSetHandles)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Curve")).supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().field_on_all();
|
||||
b.add_output<decl::Geometry>(N_("Curve")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Curve").supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).hide_value().field_on_all();
|
||||
b.add_output<decl::Geometry>("Curve").propagate_all();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -10,19 +10,14 @@ namespace blender::nodes::node_geo_curve_spline_parameter_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Float>(N_("Factor"))
|
||||
.field_source()
|
||||
.description(
|
||||
N_("For points, the portion of the spline's total length at the control point. For "
|
||||
"Splines, the factor of that spline within the entire curve"));
|
||||
b.add_output<decl::Float>(N_("Length"))
|
||||
.field_source()
|
||||
.description(
|
||||
N_("For points, the distance along the control point's spline, For splines, the "
|
||||
"distance along the entire curve"));
|
||||
b.add_output<decl::Int>(N_("Index"))
|
||||
.field_source()
|
||||
.description(N_("Each control point's index on its spline"));
|
||||
b.add_output<decl::Float>("Factor").field_source().description(
|
||||
"For points, the portion of the spline's total length at the control point. For "
|
||||
"Splines, the factor of that spline within the entire curve");
|
||||
b.add_output<decl::Float>("Length").field_source().description(
|
||||
"For points, the distance along the control point's spline, For splines, the "
|
||||
"distance along the entire curve");
|
||||
b.add_output<decl::Int>("Index").field_source().description(
|
||||
"Each control point's index on its spline");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,9 +15,9 @@ NODE_STORAGE_FUNCS(NodeGeometryCurveSplineType)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Curve")).supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().field_on_all();
|
||||
b.add_output<decl::Geometry>(N_("Curve")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Curve").supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).hide_value().field_on_all();
|
||||
b.add_output<decl::Geometry>("Curve").propagate_all();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -13,15 +13,10 @@ namespace blender::nodes::node_geo_curve_subdivide_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Curve")).supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Int>(N_("Cuts"))
|
||||
.default_value(1)
|
||||
.min(0)
|
||||
.max(1000)
|
||||
.field_on_all()
|
||||
.description(
|
||||
N_("The number of control points to create on the segment following each point"));
|
||||
b.add_output<decl::Geometry>(N_("Curve")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Curve").supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Int>("Cuts").default_value(1).min(0).max(1000).field_on_all().description(
|
||||
"The number of control points to create on the segment following each point");
|
||||
b.add_output<decl::Geometry>("Curve").propagate_all();
|
||||
}
|
||||
|
||||
static void node_geo_exec(GeoNodeExecParams params)
|
||||
|
||||
@@ -13,14 +13,14 @@ namespace blender::nodes::node_geo_curve_to_mesh_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Curve")).supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Geometry>(N_("Profile Curve"))
|
||||
b.add_input<decl::Geometry>("Curve").supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Geometry>("Profile Curve")
|
||||
.only_realized_data()
|
||||
.supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Bool>(N_("Fill Caps"))
|
||||
b.add_input<decl::Bool>("Fill Caps")
|
||||
.description(
|
||||
N_("If the profile spline is cyclic, fill the ends of the generated mesh with N-gons"));
|
||||
b.add_output<decl::Geometry>(N_("Mesh")).propagate_all();
|
||||
"If the profile spline is cyclic, fill the ends of the generated mesh with N-gons");
|
||||
b.add_output<decl::Geometry>("Mesh").propagate_all();
|
||||
}
|
||||
|
||||
static void geometry_set_curve_to_mesh(GeometrySet &geometry_set,
|
||||
|
||||
@@ -22,24 +22,24 @@ NODE_STORAGE_FUNCS(NodeGeometryCurveToPoints)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Curve")).supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Int>(N_("Count"))
|
||||
b.add_input<decl::Geometry>("Curve").supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Int>("Count")
|
||||
.default_value(10)
|
||||
.min(2)
|
||||
.field_on_all()
|
||||
.max(100000)
|
||||
.make_available(
|
||||
[](bNode &node) { node_storage(node).mode = GEO_NODE_CURVE_RESAMPLE_COUNT; });
|
||||
b.add_input<decl::Float>(N_("Length"))
|
||||
b.add_input<decl::Float>("Length")
|
||||
.default_value(0.1f)
|
||||
.min(0.001f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.make_available(
|
||||
[](bNode &node) { node_storage(node).mode = GEO_NODE_CURVE_RESAMPLE_LENGTH; });
|
||||
b.add_output<decl::Geometry>(N_("Points")).propagate_all();
|
||||
b.add_output<decl::Vector>(N_("Tangent")).field_on_all();
|
||||
b.add_output<decl::Vector>(N_("Normal")).field_on_all();
|
||||
b.add_output<decl::Vector>(N_("Rotation")).field_on_all();
|
||||
b.add_output<decl::Geometry>("Points").propagate_all();
|
||||
b.add_output<decl::Vector>("Tangent").field_on_all();
|
||||
b.add_output<decl::Vector>("Normal").field_on_all();
|
||||
b.add_output<decl::Vector>("Rotation").field_on_all();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -8,15 +8,15 @@ namespace blender::nodes::node_geo_curve_topology_curve_of_point_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Int>(N_("Point Index"))
|
||||
b.add_input<decl::Int>("Point Index")
|
||||
.implicit_field(implicit_field_inputs::index)
|
||||
.description(N_("The control point to retrieve data from"));
|
||||
b.add_output<decl::Int>(N_("Curve Index"))
|
||||
.description("The control point to retrieve data from");
|
||||
b.add_output<decl::Int>("Curve Index")
|
||||
.field_source_reference_all()
|
||||
.description(N_("The curve the control point is part of"));
|
||||
b.add_output<decl::Int>(N_("Index in Curve"))
|
||||
.description("The curve the control point is part of");
|
||||
b.add_output<decl::Int>("Index in Curve")
|
||||
.field_source_reference_all()
|
||||
.description(N_("How far along the control point is along its curve"));
|
||||
.description("How far along the control point is along its curve");
|
||||
}
|
||||
|
||||
class CurveOfPointInput final : public bke::CurvesFieldInput {
|
||||
|
||||
@@ -10,24 +10,20 @@ namespace blender::nodes::node_geo_curve_topology_points_of_curve_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Int>(N_("Curve Index"))
|
||||
b.add_input<decl::Int>("Curve Index")
|
||||
.implicit_field(implicit_field_inputs::index)
|
||||
.description(N_("The curve to retrieve data from. Defaults to the curve from the context"));
|
||||
b.add_input<decl::Float>(N_("Weights"))
|
||||
.supports_field()
|
||||
.hide_value()
|
||||
.description(N_("Values used to sort the curve's points. Uses indices by default"));
|
||||
b.add_input<decl::Int>(N_("Sort Index"))
|
||||
.description("The curve to retrieve data from. Defaults to the curve from the context");
|
||||
b.add_input<decl::Float>("Weights").supports_field().hide_value().description(
|
||||
"Values used to sort the curve's points. Uses indices by default");
|
||||
b.add_input<decl::Int>("Sort Index")
|
||||
.min(0)
|
||||
.supports_field()
|
||||
.description(N_("Which of the sorted points to output"));
|
||||
b.add_output<decl::Int>(N_("Point Index"))
|
||||
.description("Which of the sorted points to output");
|
||||
b.add_output<decl::Int>("Point Index")
|
||||
.field_source_reference_all()
|
||||
.description(N_("A point of the curve, chosen by the sort index"));
|
||||
b.add_output<decl::Int>(N_("Total"))
|
||||
.field_source()
|
||||
.reference_pass({0})
|
||||
.description(N_("The number of points in the curve"));
|
||||
.description("A point of the curve, chosen by the sort index");
|
||||
b.add_output<decl::Int>("Total").field_source().reference_pass({0}).description(
|
||||
"The number of points in the curve");
|
||||
}
|
||||
|
||||
class PointsOfCurveInput final : public bke::CurvesFieldInput {
|
||||
|
||||
@@ -18,33 +18,33 @@ NODE_STORAGE_FUNCS(NodeGeometryCurveTrim)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Curve")).supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().supports_field();
|
||||
b.add_input<decl::Float>(N_("Start"))
|
||||
b.add_input<decl::Geometry>("Curve").supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).hide_value().supports_field();
|
||||
b.add_input<decl::Float>("Start")
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR)
|
||||
.make_available([](bNode &node) { node_storage(node).mode = GEO_NODE_CURVE_SAMPLE_FACTOR; })
|
||||
.field_on_all();
|
||||
b.add_input<decl::Float>(N_("End"))
|
||||
b.add_input<decl::Float>("End")
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.default_value(1.0f)
|
||||
.subtype(PROP_FACTOR)
|
||||
.make_available([](bNode &node) { node_storage(node).mode = GEO_NODE_CURVE_SAMPLE_FACTOR; })
|
||||
.field_on_all();
|
||||
b.add_input<decl::Float>(N_("Start"), "Start_001")
|
||||
b.add_input<decl::Float>("Start", "Start_001")
|
||||
.min(0.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.make_available([](bNode &node) { node_storage(node).mode = GEO_NODE_CURVE_SAMPLE_LENGTH; })
|
||||
.field_on_all();
|
||||
b.add_input<decl::Float>(N_("End"), "End_001")
|
||||
b.add_input<decl::Float>("End", "End_001")
|
||||
.min(0.0f)
|
||||
.default_value(1.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.make_available([](bNode &node) { node_storage(node).mode = GEO_NODE_CURVE_SAMPLE_LENGTH; })
|
||||
.field_on_all();
|
||||
b.add_output<decl::Geometry>(N_("Curve")).propagate_all();
|
||||
b.add_output<decl::Geometry>("Curve").propagate_all();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -37,8 +37,8 @@ NODE_STORAGE_FUNCS(NodeGeometryCurveTrim)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Curves")).supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_output<decl::Geometry>(N_("Curves")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Curves").supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_output<decl::Geometry>("Curves").propagate_all();
|
||||
}
|
||||
|
||||
static void deform_curves(const CurvesGeometry &curves,
|
||||
|
||||
@@ -1155,13 +1155,13 @@ NODE_STORAGE_FUNCS(NodeGeometryDeleteGeometry)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Geometry"));
|
||||
b.add_input<decl::Bool>(N_("Selection"))
|
||||
b.add_input<decl::Geometry>("Geometry");
|
||||
b.add_input<decl::Bool>("Selection")
|
||||
.default_value(true)
|
||||
.hide_value()
|
||||
.field_on_all()
|
||||
.description(N_("The parts of the geometry to be deleted"));
|
||||
b.add_output<decl::Geometry>(N_("Geometry")).propagate_all();
|
||||
.description("The parts of the geometry to be deleted");
|
||||
b.add_output<decl::Geometry>("Geometry").propagate_all();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -25,30 +25,28 @@ NODE_STORAGE_FUNCS(NodeGeometryDistributePointsInVolume)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(CTX_N_(BLT_I18NCONTEXT_ID_ID, "Volume"))
|
||||
b.add_input<decl::Geometry>("Volume")
|
||||
.supported_type(GEO_COMPONENT_TYPE_VOLUME)
|
||||
.translation_context(BLT_I18NCONTEXT_ID_ID);
|
||||
b.add_input<decl::Float>(N_("Density"))
|
||||
b.add_input<decl::Float>("Density")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(100000.0f)
|
||||
.subtype(PROP_NONE)
|
||||
.description(N_("Number of points to sample per unit volume"));
|
||||
b.add_input<decl::Int>(N_("Seed"))
|
||||
.min(-10000)
|
||||
.max(10000)
|
||||
.description(N_("Seed used by the random number generator to generate random points"));
|
||||
b.add_input<decl::Vector>(N_("Spacing"))
|
||||
.description("Number of points to sample per unit volume");
|
||||
b.add_input<decl::Int>("Seed").min(-10000).max(10000).description(
|
||||
"Seed used by the random number generator to generate random points");
|
||||
b.add_input<decl::Vector>("Spacing")
|
||||
.default_value({0.3, 0.3, 0.3})
|
||||
.min(0.0001f)
|
||||
.subtype(PROP_XYZ)
|
||||
.description(N_("Spacing between grid points"));
|
||||
b.add_input<decl::Float>(N_("Threshold"))
|
||||
.description("Spacing between grid points");
|
||||
b.add_input<decl::Float>("Threshold")
|
||||
.default_value(0.1f)
|
||||
.min(0.0f)
|
||||
.max(FLT_MAX)
|
||||
.description(N_("Minimum density of a volume cell to contain a grid point"));
|
||||
b.add_output<decl::Geometry>(N_("Points")).propagate_all();
|
||||
.description("Minimum density of a volume cell to contain a grid point");
|
||||
b.add_output<decl::Geometry>("Points").propagate_all();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -33,33 +33,30 @@ static void node_declare(NodeDeclarationBuilder &b)
|
||||
node.custom1 = GEO_NODE_POINT_DISTRIBUTE_POINTS_ON_FACES_POISSON;
|
||||
};
|
||||
|
||||
b.add_input<decl::Geometry>(N_("Mesh")).supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Float>(N_("Distance Min"))
|
||||
b.add_input<decl::Geometry>("Mesh").supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Float>("Distance Min")
|
||||
.min(0.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.make_available(enable_poisson);
|
||||
b.add_input<decl::Float>(N_("Density Max"))
|
||||
b.add_input<decl::Float>("Density Max")
|
||||
.default_value(10.0f)
|
||||
.min(0.0f)
|
||||
.make_available(enable_poisson);
|
||||
b.add_input<decl::Float>(N_("Density"))
|
||||
.default_value(10.0f)
|
||||
.min(0.0f)
|
||||
.field_on_all()
|
||||
.make_available(enable_random);
|
||||
b.add_input<decl::Float>(N_("Density Factor"))
|
||||
b.add_input<decl::Float>("Density").default_value(10.0f).min(0.0f).field_on_all().make_available(
|
||||
enable_random);
|
||||
b.add_input<decl::Float>("Density Factor")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR)
|
||||
.field_on_all()
|
||||
.make_available(enable_poisson);
|
||||
b.add_input<decl::Int>(N_("Seed"));
|
||||
b.add_input<decl::Int>("Seed");
|
||||
|
||||
b.add_output<decl::Geometry>(N_("Points")).propagate_all();
|
||||
b.add_output<decl::Vector>(N_("Normal")).field_on_all();
|
||||
b.add_output<decl::Vector>(N_("Rotation")).subtype(PROP_EULER).field_on_all();
|
||||
b.add_output<decl::Geometry>("Points").propagate_all();
|
||||
b.add_output<decl::Vector>("Normal").field_on_all();
|
||||
b.add_output<decl::Vector>("Rotation").subtype(PROP_EULER).field_on_all();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -28,20 +28,17 @@ NODE_STORAGE_FUNCS(NodeGeometryDuplicateElements);
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Geometry"));
|
||||
b.add_input<decl::Bool>(N_("Selection")).hide_value().default_value(true).field_on_all();
|
||||
b.add_input<decl::Int>(N_("Amount"))
|
||||
.min(0)
|
||||
.default_value(1)
|
||||
.field_on_all()
|
||||
.description(N_("The number of duplicates to create for each element"));
|
||||
b.add_input<decl::Geometry>("Geometry");
|
||||
b.add_input<decl::Bool>("Selection").hide_value().default_value(true).field_on_all();
|
||||
b.add_input<decl::Int>("Amount").min(0).default_value(1).field_on_all().description(
|
||||
"The number of duplicates to create for each element");
|
||||
|
||||
b.add_output<decl::Geometry>(N_("Geometry"))
|
||||
b.add_output<decl::Geometry>("Geometry")
|
||||
.propagate_all()
|
||||
.description(N_("The duplicated geometry, not including the original geometry"));
|
||||
b.add_output<decl::Int>(N_("Duplicate Index"))
|
||||
.description("The duplicated geometry, not including the original geometry");
|
||||
b.add_output<decl::Int>("Duplicate Index")
|
||||
.field_on_all()
|
||||
.description(N_("The indices of the duplicates for each element"));
|
||||
.description("The indices of the duplicates for each element");
|
||||
}
|
||||
|
||||
static void node_init(bNodeTree * /*tree*/, bNode *node)
|
||||
|
||||
@@ -12,10 +12,10 @@ namespace blender::nodes::node_geo_edge_paths_to_curves_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Mesh")).supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Bool>(N_("Start Vertices")).default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Int>(N_("Next Vertex Index")).default_value(-1).hide_value().field_on_all();
|
||||
b.add_output<decl::Geometry>(N_("Curves")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Mesh").supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Bool>("Start Vertices").default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Int>("Next Vertex Index").default_value(-1).hide_value().field_on_all();
|
||||
b.add_output<decl::Geometry>("Curves").propagate_all();
|
||||
}
|
||||
|
||||
static Curves *edge_paths_to_curves_convert(
|
||||
|
||||
@@ -15,9 +15,9 @@ namespace blender::nodes::node_geo_edge_paths_to_selection_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Bool>(N_("Start Vertices")).default_value(true).hide_value().supports_field();
|
||||
b.add_input<decl::Int>(N_("Next Vertex Index")).default_value(-1).hide_value().supports_field();
|
||||
b.add_output<decl::Bool>(N_("Selection")).field_source_reference_all();
|
||||
b.add_input<decl::Bool>("Start Vertices").default_value(true).hide_value().supports_field();
|
||||
b.add_input<decl::Int>("Next Vertex Index").default_value(-1).hide_value().supports_field();
|
||||
b.add_output<decl::Bool>("Selection").field_source_reference_all();
|
||||
}
|
||||
|
||||
static void edge_paths_to_selection(const Mesh &src_mesh,
|
||||
|
||||
@@ -10,9 +10,9 @@ namespace blender::nodes::node_geo_edge_split_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Mesh")).supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().field_on_all();
|
||||
b.add_output<decl::Geometry>(N_("Mesh")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Mesh").supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).hide_value().field_on_all();
|
||||
b.add_output<decl::Geometry>("Mesh").propagate_all();
|
||||
}
|
||||
|
||||
static void node_geo_exec(GeoNodeExecParams params)
|
||||
|
||||
@@ -15,10 +15,10 @@ static void node_declare(NodeDeclarationBuilder &b)
|
||||
.default_value(true)
|
||||
.hide_value()
|
||||
.supports_field()
|
||||
.description(N_("Edges used to split faces into separate groups"));
|
||||
.description("Edges used to split faces into separate groups");
|
||||
b.add_output<decl::Int>("Face Group ID")
|
||||
.dependent_field()
|
||||
.description(N_("Index of the face group inside each boundary edge region"));
|
||||
.description("Index of the face group inside each boundary edge region");
|
||||
}
|
||||
|
||||
/** Join all unique unordered combinations of indices. */
|
||||
|
||||
@@ -54,19 +54,19 @@ namespace blender::nodes::node_geo_evaluate_at_index_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Int>(N_("Index")).min(0).supports_field();
|
||||
b.add_input<decl::Int>("Index").min(0).supports_field();
|
||||
|
||||
b.add_input<decl::Float>(N_("Value"), "Value_Float").hide_value().supports_field();
|
||||
b.add_input<decl::Int>(N_("Value"), "Value_Int").hide_value().supports_field();
|
||||
b.add_input<decl::Vector>(N_("Value"), "Value_Vector").hide_value().supports_field();
|
||||
b.add_input<decl::Color>(N_("Value"), "Value_Color").hide_value().supports_field();
|
||||
b.add_input<decl::Bool>(N_("Value"), "Value_Bool").hide_value().supports_field();
|
||||
b.add_input<decl::Float>("Value", "Value_Float").hide_value().supports_field();
|
||||
b.add_input<decl::Int>("Value", "Value_Int").hide_value().supports_field();
|
||||
b.add_input<decl::Vector>("Value", "Value_Vector").hide_value().supports_field();
|
||||
b.add_input<decl::Color>("Value", "Value_Color").hide_value().supports_field();
|
||||
b.add_input<decl::Bool>("Value", "Value_Bool").hide_value().supports_field();
|
||||
|
||||
b.add_output<decl::Float>(N_("Value"), "Value_Float").field_source_reference_all();
|
||||
b.add_output<decl::Int>(N_("Value"), "Value_Int").field_source_reference_all();
|
||||
b.add_output<decl::Vector>(N_("Value"), "Value_Vector").field_source_reference_all();
|
||||
b.add_output<decl::Color>(N_("Value"), "Value_Color").field_source_reference_all();
|
||||
b.add_output<decl::Bool>(N_("Value"), "Value_Bool").field_source_reference_all();
|
||||
b.add_output<decl::Float>("Value", "Value_Float").field_source_reference_all();
|
||||
b.add_output<decl::Int>("Value", "Value_Int").field_source_reference_all();
|
||||
b.add_output<decl::Vector>("Value", "Value_Vector").field_source_reference_all();
|
||||
b.add_output<decl::Color>("Value", "Value_Color").field_source_reference_all();
|
||||
b.add_output<decl::Bool>("Value", "Value_Bool").field_source_reference_all();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -15,17 +15,17 @@ namespace blender::nodes::node_geo_evaluate_on_domain_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Value"), "Value_Float").supports_field();
|
||||
b.add_input<decl::Int>(N_("Value"), "Value_Int").supports_field();
|
||||
b.add_input<decl::Vector>(N_("Value"), "Value_Vector").supports_field();
|
||||
b.add_input<decl::Color>(N_("Value"), "Value_Color").supports_field();
|
||||
b.add_input<decl::Bool>(N_("Value"), "Value_Bool").supports_field();
|
||||
b.add_input<decl::Float>("Value", "Value_Float").supports_field();
|
||||
b.add_input<decl::Int>("Value", "Value_Int").supports_field();
|
||||
b.add_input<decl::Vector>("Value", "Value_Vector").supports_field();
|
||||
b.add_input<decl::Color>("Value", "Value_Color").supports_field();
|
||||
b.add_input<decl::Bool>("Value", "Value_Bool").supports_field();
|
||||
|
||||
b.add_output<decl::Float>(N_("Value"), "Value_Float").field_source_reference_all();
|
||||
b.add_output<decl::Int>(N_("Value"), "Value_Int").field_source_reference_all();
|
||||
b.add_output<decl::Vector>(N_("Value"), "Value_Vector").field_source_reference_all();
|
||||
b.add_output<decl::Color>(N_("Value"), "Value_Color").field_source_reference_all();
|
||||
b.add_output<decl::Bool>(N_("Value"), "Value_Bool").field_source_reference_all();
|
||||
b.add_output<decl::Float>("Value", "Value_Float").field_source_reference_all();
|
||||
b.add_output<decl::Int>("Value", "Value_Int").field_source_reference_all();
|
||||
b.add_output<decl::Vector>("Value", "Value_Vector").field_source_reference_all();
|
||||
b.add_output<decl::Color>("Value", "Value_Color").field_source_reference_all();
|
||||
b.add_output<decl::Bool>("Value", "Value_Bool").field_source_reference_all();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -25,18 +25,18 @@ NODE_STORAGE_FUNCS(NodeGeometryExtrudeMesh)
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>("Mesh").supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).field_on_all().hide_value();
|
||||
b.add_input<decl::Vector>(N_("Offset"))
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).field_on_all().hide_value();
|
||||
b.add_input<decl::Vector>("Offset")
|
||||
.subtype(PROP_TRANSLATION)
|
||||
.implicit_field_on_all(implicit_field_inputs::normal)
|
||||
.hide_value();
|
||||
b.add_input<decl::Float>(N_("Offset Scale")).default_value(1.0f).field_on_all();
|
||||
b.add_input<decl::Bool>(N_("Individual")).default_value(true).make_available([](bNode &node) {
|
||||
b.add_input<decl::Float>("Offset Scale").default_value(1.0f).field_on_all();
|
||||
b.add_input<decl::Bool>("Individual").default_value(true).make_available([](bNode &node) {
|
||||
node_storage(node).mode = GEO_NODE_EXTRUDE_MESH_FACES;
|
||||
});
|
||||
b.add_output<decl::Geometry>("Mesh").propagate_all();
|
||||
b.add_output<decl::Bool>(N_("Top")).field_on_all();
|
||||
b.add_output<decl::Bool>(N_("Side")).field_on_all();
|
||||
b.add_output<decl::Bool>("Top").field_on_all();
|
||||
b.add_output<decl::Bool>("Side").field_on_all();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -15,9 +15,9 @@ namespace blender::nodes::node_geo_flip_faces_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Mesh")).supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().field_on_all();
|
||||
b.add_output<decl::Geometry>(N_("Mesh")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Mesh").supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).hide_value().field_on_all();
|
||||
b.add_output<decl::Geometry>("Mesh").propagate_all();
|
||||
}
|
||||
|
||||
static void mesh_flip_faces(Mesh &mesh, const Field<bool> &selection_field)
|
||||
|
||||
@@ -8,8 +8,8 @@ namespace blender::nodes::node_geo_geometry_to_instance_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Geometry")).multi_input();
|
||||
b.add_output<decl::Geometry>(N_("Instances")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Geometry").multi_input();
|
||||
b.add_output<decl::Geometry>("Instances").propagate_all();
|
||||
}
|
||||
|
||||
static void node_geo_exec(GeoNodeExecParams params)
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace blender::nodes::node_geo_image_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Image>(N_("Image"));
|
||||
b.add_output<decl::Image>("Image");
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext *C, PointerRNA *ptr)
|
||||
|
||||
@@ -17,21 +17,19 @@ namespace blender::nodes::node_geo_image_info_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Image>(N_("Image")).hide_label();
|
||||
b.add_input<decl::Int>(N_("Frame"))
|
||||
.min(0)
|
||||
.description(N_("Which frame to use for videos. Note that different frames in videos can "
|
||||
"have different resolutions"));
|
||||
b.add_input<decl::Image>("Image").hide_label();
|
||||
b.add_input<decl::Int>("Frame").min(0).description(
|
||||
"Which frame to use for videos. Note that different frames in videos can "
|
||||
"have different resolutions");
|
||||
|
||||
b.add_output<decl::Int>(N_("Width"));
|
||||
b.add_output<decl::Int>(N_("Height"));
|
||||
b.add_output<decl::Bool>(N_("Has Alpha"))
|
||||
.description(N_("Whether the image has an alpha channel"));
|
||||
b.add_output<decl::Int>("Width");
|
||||
b.add_output<decl::Int>("Height");
|
||||
b.add_output<decl::Bool>("Has Alpha").description("Whether the image has an alpha channel");
|
||||
|
||||
b.add_output<decl::Int>(N_("Frame Count"))
|
||||
.description(N_("The number of animation frames. If a single image, then 1"));
|
||||
b.add_output<decl::Float>(N_("FPS")).description(
|
||||
N_("Animation playback speed in frames per second. If a single image, then 0"));
|
||||
b.add_output<decl::Int>("Frame Count")
|
||||
.description("The number of animation frames. If a single image, then 1");
|
||||
b.add_output<decl::Float>("FPS").description(
|
||||
"Animation playback speed in frames per second. If a single image, then 0");
|
||||
}
|
||||
|
||||
static void node_geo_exec(GeoNodeExecParams params)
|
||||
|
||||
@@ -22,13 +22,13 @@ NODE_STORAGE_FUNCS(NodeGeometryImageTexture)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Image>(N_("Image")).hide_label();
|
||||
b.add_input<decl::Vector>(N_("Vector"))
|
||||
b.add_input<decl::Image>("Image").hide_label();
|
||||
b.add_input<decl::Vector>("Vector")
|
||||
.implicit_field(implicit_field_inputs::position)
|
||||
.description("Texture coordinates from 0 to 1");
|
||||
b.add_input<decl::Int>(N_("Frame")).min(0).max(MAXFRAMEF);
|
||||
b.add_output<decl::Color>(N_("Color")).no_muted_links().dependent_field().reference_pass_all();
|
||||
b.add_output<decl::Float>(N_("Alpha")).no_muted_links().dependent_field().reference_pass_all();
|
||||
b.add_input<decl::Int>("Frame").min(0).max(MAXFRAMEF);
|
||||
b.add_output<decl::Color>("Color").no_muted_links().dependent_field().reference_pass_all();
|
||||
b.add_output<decl::Float>("Alpha").no_muted_links().dependent_field().reference_pass_all();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -11,11 +11,11 @@ namespace blender::nodes::node_geo_index_of_nearest_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Vector>(N_("Position")).implicit_field(implicit_field_inputs::position);
|
||||
b.add_input<decl::Int>(N_("Group ID")).supports_field().hide_value();
|
||||
b.add_input<decl::Vector>("Position").implicit_field(implicit_field_inputs::position);
|
||||
b.add_input<decl::Int>("Group ID").supports_field().hide_value();
|
||||
|
||||
b.add_output<decl::Int>(N_("Index")).field_source().description(N_("Index of nearest element"));
|
||||
b.add_output<decl::Bool>(N_("Has Neighbor")).field_source();
|
||||
b.add_output<decl::Int>("Index").field_source().description("Index of nearest element");
|
||||
b.add_output<decl::Bool>("Has Neighbor").field_source();
|
||||
}
|
||||
|
||||
static KDTree_3d *build_kdtree(const Span<float3> positions, const IndexMask mask)
|
||||
|
||||
@@ -8,13 +8,14 @@ namespace blender::nodes::node_geo_input_curve_handles_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Bool>(N_("Relative"))
|
||||
b.add_input<decl::Bool>("Relative")
|
||||
.default_value(false)
|
||||
.supports_field()
|
||||
.description(N_("Output the handle positions relative to the corresponding control point "
|
||||
"instead of in the local space of the geometry"));
|
||||
b.add_output<decl::Vector>(N_("Left")).field_source_reference_all();
|
||||
b.add_output<decl::Vector>(N_("Right")).field_source_reference_all();
|
||||
.description(
|
||||
"Output the handle positions relative to the corresponding control point "
|
||||
"instead of in the local space of the geometry");
|
||||
b.add_output<decl::Vector>("Left").field_source_reference_all();
|
||||
b.add_output<decl::Vector>("Right").field_source_reference_all();
|
||||
}
|
||||
|
||||
class HandlePositionFieldInput final : public bke::CurvesFieldInput {
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace blender::nodes::node_geo_input_curve_tilt_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Float>(N_("Tilt")).field_source();
|
||||
b.add_output<decl::Float>("Tilt").field_source();
|
||||
}
|
||||
|
||||
static void node_geo_exec(GeoNodeExecParams params)
|
||||
|
||||
@@ -6,9 +6,9 @@ namespace blender::nodes::node_geo_input_id_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Int>(N_("ID")).field_source().description(
|
||||
N_("The values from the \"id\" attribute on points, or the index if that attribute does not "
|
||||
"exist"));
|
||||
b.add_output<decl::Int>("ID").field_source().description(
|
||||
"The values from the \"id\" attribute on points, or the index if that attribute does not "
|
||||
"exist");
|
||||
}
|
||||
|
||||
static void node_geo_exec(GeoNodeExecParams params)
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace blender::nodes::node_geo_input_index_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Int>(N_("Index")).field_source();
|
||||
b.add_output<decl::Int>("Index").field_source();
|
||||
}
|
||||
|
||||
static void node_geo_exec(GeoNodeExecParams params)
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace blender::nodes::node_geo_input_instance_rotation_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Vector>(N_("Rotation")).field_source();
|
||||
b.add_output<decl::Vector>("Rotation").field_source();
|
||||
}
|
||||
|
||||
class InstanceRotationFieldInput final : public bke::InstancesFieldInput {
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace blender::nodes::node_geo_input_instance_scale_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Vector>(N_("Scale")).field_source();
|
||||
b.add_output<decl::Vector>("Scale").field_source();
|
||||
}
|
||||
|
||||
class InstanceScaleFieldInput final : public bke::InstancesFieldInput {
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace blender::nodes::node_geo_input_material_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Material>(N_("Material"));
|
||||
b.add_output<decl::Material>("Material");
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace blender::nodes::node_geo_input_material_index_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Int>(N_("Material Index")).field_source();
|
||||
b.add_output<decl::Int>("Material Index").field_source();
|
||||
}
|
||||
|
||||
static void node_geo_exec(GeoNodeExecParams params)
|
||||
|
||||
@@ -14,13 +14,13 @@ namespace blender::nodes::node_geo_input_mesh_edge_angle_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Float>(N_("Unsigned Angle"))
|
||||
b.add_output<decl::Float>("Unsigned Angle")
|
||||
.field_source()
|
||||
.description(
|
||||
"The shortest angle in radians between two faces where they meet at an edge. Flat edges "
|
||||
"and Non-manifold edges have an angle of zero. Computing this value is faster than the "
|
||||
"signed angle");
|
||||
b.add_output<decl::Float>(N_("Signed Angle"))
|
||||
b.add_output<decl::Float>("Signed Angle")
|
||||
.field_source()
|
||||
.description(
|
||||
"The signed angle in radians between two faces where they meet at an edge. Flat edges "
|
||||
|
||||
@@ -11,9 +11,9 @@ namespace blender::nodes::node_geo_input_mesh_edge_neighbors_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Int>(N_("Face Count"))
|
||||
b.add_output<decl::Int>("Face Count")
|
||||
.field_source()
|
||||
.description(N_("The number of faces that use each edge as one of their sides"));
|
||||
.description("The number of faces that use each edge as one of their sides");
|
||||
}
|
||||
|
||||
class EdgeNeighborCountFieldInput final : public bke::MeshFieldInput {
|
||||
|
||||
@@ -11,18 +11,18 @@ namespace blender::nodes::node_geo_input_mesh_edge_vertices_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Int>(N_("Vertex Index 1"))
|
||||
b.add_output<decl::Int>("Vertex Index 1")
|
||||
.field_source()
|
||||
.description(N_("The index of the first vertex in the edge"));
|
||||
b.add_output<decl::Int>(N_("Vertex Index 2"))
|
||||
.description("The index of the first vertex in the edge");
|
||||
b.add_output<decl::Int>("Vertex Index 2")
|
||||
.field_source()
|
||||
.description(N_("The index of the second vertex in the edge"));
|
||||
b.add_output<decl::Vector>(N_("Position 1"))
|
||||
.description("The index of the second vertex in the edge");
|
||||
b.add_output<decl::Vector>("Position 1")
|
||||
.field_source()
|
||||
.description(N_("The position of the first vertex in the edge"));
|
||||
b.add_output<decl::Vector>(N_("Position 2"))
|
||||
.description("The position of the first vertex in the edge");
|
||||
b.add_output<decl::Vector>("Position 2")
|
||||
.field_source()
|
||||
.description(N_("The position of the second vertex in the edge"));
|
||||
.description("The position of the second vertex in the edge");
|
||||
}
|
||||
|
||||
enum class VertNumber { V1, V2 };
|
||||
|
||||
@@ -13,10 +13,10 @@ namespace blender::nodes::node_geo_input_mesh_face_area_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Float>(CTX_N_(BLT_I18NCONTEXT_AMOUNT, "Area"))
|
||||
b.add_output<decl::Float>("Area")
|
||||
.translation_context(BLT_I18NCONTEXT_AMOUNT)
|
||||
.field_source()
|
||||
.description(N_("The surface area of each of the mesh's faces"));
|
||||
.description("The surface area of each of the mesh's faces");
|
||||
}
|
||||
|
||||
static VArray<float> construct_face_area_varray(const Mesh &mesh, const eAttrDomain domain)
|
||||
|
||||
@@ -18,8 +18,9 @@ static void node_declare(NodeDeclarationBuilder &b)
|
||||
.default_value(0.01f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.supports_field()
|
||||
.description(N_("The distance a point can be from the surface before the face is no longer "
|
||||
"considered planar"))
|
||||
.description(
|
||||
"The distance a point can be from the surface before the face is no longer "
|
||||
"considered planar")
|
||||
.min(0.0f);
|
||||
b.add_output<decl::Bool>("Planar").field_source();
|
||||
}
|
||||
|
||||
@@ -11,12 +11,12 @@ namespace blender::nodes::node_geo_input_mesh_face_neighbors_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Int>(N_("Vertex Count"))
|
||||
b.add_output<decl::Int>("Vertex Count")
|
||||
.field_source()
|
||||
.description(N_("Number of edges or points in the face"));
|
||||
b.add_output<decl::Int>(N_("Face Count"))
|
||||
.description("Number of edges or points in the face");
|
||||
b.add_output<decl::Int>("Face Count")
|
||||
.field_source()
|
||||
.description(N_("Number of faces which share an edge with the face"));
|
||||
.description("Number of faces which share an edge with the face");
|
||||
}
|
||||
|
||||
static VArray<int> construct_neighbor_count_varray(const Mesh &mesh, const eAttrDomain domain)
|
||||
|
||||
@@ -14,13 +14,14 @@ namespace blender::nodes::node_geo_input_mesh_island_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Int>(N_("Island Index"))
|
||||
b.add_output<decl::Int>("Island Index")
|
||||
.field_source()
|
||||
.description(N_("The index of the each vertex's island. Indices are based on the "
|
||||
"lowest vertex index contained in each island"));
|
||||
b.add_output<decl::Int>(N_("Island Count"))
|
||||
.description(
|
||||
"The index of the each vertex's island. Indices are based on the "
|
||||
"lowest vertex index contained in each island");
|
||||
b.add_output<decl::Int>("Island Count")
|
||||
.field_source()
|
||||
.description(N_("The total number of mesh islands"));
|
||||
.description("The total number of mesh islands");
|
||||
}
|
||||
|
||||
class IslandFieldInput final : public bke::MeshFieldInput {
|
||||
|
||||
@@ -11,13 +11,14 @@ namespace blender::nodes::node_geo_input_mesh_vertex_neighbors_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Int>(N_("Vertex Count"))
|
||||
b.add_output<decl::Int>("Vertex Count")
|
||||
.field_source()
|
||||
.description(N_("The number of vertices connected to this vertex with an edge, "
|
||||
"equal to the number of connected edges"));
|
||||
b.add_output<decl::Int>(N_("Face Count"))
|
||||
.description(
|
||||
"The number of vertices connected to this vertex with an edge, "
|
||||
"equal to the number of connected edges");
|
||||
b.add_output<decl::Int>("Face Count")
|
||||
.field_source()
|
||||
.description(N_("Number of faces that contain the vertex"));
|
||||
.description("Number of faces that contain the vertex");
|
||||
}
|
||||
|
||||
static VArray<int> construct_vertex_count_gvarray(const Mesh &mesh, const eAttrDomain domain)
|
||||
|
||||
@@ -13,15 +13,15 @@ NODE_STORAGE_FUNCS(NodeGeometryInputNamedAttribute)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::String>(N_("Name")).is_attribute_name();
|
||||
b.add_input<decl::String>("Name").is_attribute_name();
|
||||
|
||||
b.add_output<decl::Vector>(N_("Attribute"), "Attribute_Vector").field_source();
|
||||
b.add_output<decl::Float>(N_("Attribute"), "Attribute_Float").field_source();
|
||||
b.add_output<decl::Color>(N_("Attribute"), "Attribute_Color").field_source();
|
||||
b.add_output<decl::Bool>(N_("Attribute"), "Attribute_Bool").field_source();
|
||||
b.add_output<decl::Int>(N_("Attribute"), "Attribute_Int").field_source();
|
||||
b.add_output<decl::Vector>("Attribute", "Attribute_Vector").field_source();
|
||||
b.add_output<decl::Float>("Attribute", "Attribute_Float").field_source();
|
||||
b.add_output<decl::Color>("Attribute", "Attribute_Color").field_source();
|
||||
b.add_output<decl::Bool>("Attribute", "Attribute_Bool").field_source();
|
||||
b.add_output<decl::Int>("Attribute", "Attribute_Int").field_source();
|
||||
|
||||
b.add_output<decl::Bool>(N_("Exists")).field_source();
|
||||
b.add_output<decl::Bool>("Exists").field_source();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace blender::nodes::node_geo_input_normal_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Vector>(N_("Normal")).field_source();
|
||||
b.add_output<decl::Vector>("Normal").field_source();
|
||||
}
|
||||
|
||||
static void node_geo_exec(GeoNodeExecParams params)
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace blender::nodes::node_geo_input_position_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Vector>(N_("Position")).field_source();
|
||||
b.add_output<decl::Vector>("Position").field_source();
|
||||
}
|
||||
|
||||
static void node_geo_exec(GeoNodeExecParams params)
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace blender::nodes::node_geo_input_radius_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Float>(N_("Radius")).default_value(1.0f).min(0.0f).field_source();
|
||||
b.add_output<decl::Float>("Radius").default_value(1.0f).min(0.0f).field_source();
|
||||
}
|
||||
|
||||
static void node_geo_exec(GeoNodeExecParams params)
|
||||
|
||||
@@ -10,8 +10,8 @@ namespace blender::nodes::node_geo_input_scene_time_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Float>(N_("Seconds"));
|
||||
b.add_output<decl::Float>(N_("Frame"));
|
||||
b.add_output<decl::Float>("Seconds");
|
||||
b.add_output<decl::Float>("Frame");
|
||||
}
|
||||
|
||||
static void node_exec(GeoNodeExecParams params)
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace blender::nodes::node_geo_input_shade_smooth_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Bool>(N_("Smooth")).field_source();
|
||||
b.add_output<decl::Bool>("Smooth").field_source();
|
||||
}
|
||||
|
||||
static void node_geo_exec(GeoNodeExecParams params)
|
||||
|
||||
@@ -15,10 +15,10 @@ namespace blender::nodes::node_geo_input_shortest_edge_paths_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Bool>(N_("End Vertex")).default_value(false).hide_value().supports_field();
|
||||
b.add_input<decl::Float>(N_("Edge Cost")).default_value(1.0f).hide_value().supports_field();
|
||||
b.add_output<decl::Int>(N_("Next Vertex Index")).field_source();
|
||||
b.add_output<decl::Float>(N_("Total Cost")).field_source();
|
||||
b.add_input<decl::Bool>("End Vertex").default_value(false).hide_value().supports_field();
|
||||
b.add_input<decl::Float>("Edge Cost").default_value(1.0f).hide_value().supports_field();
|
||||
b.add_output<decl::Int>("Next Vertex Index").field_source();
|
||||
b.add_output<decl::Float>("Total Cost").field_source();
|
||||
}
|
||||
|
||||
typedef std::pair<float, int> VertPriority;
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace blender::nodes::node_geo_input_signed_distance_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Float>(N_("Signed Distance")).field_source();
|
||||
b.add_output<decl::Float>("Signed Distance").field_source();
|
||||
}
|
||||
|
||||
static void search_node_add_ops(GatherAddNodeSearchParams ¶ms)
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace blender::nodes::node_geo_input_spline_cyclic_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Bool>(N_("Cyclic")).field_source();
|
||||
b.add_output<decl::Bool>("Cyclic").field_source();
|
||||
}
|
||||
|
||||
static void node_geo_exec(GeoNodeExecParams params)
|
||||
|
||||
@@ -8,8 +8,8 @@ namespace blender::nodes::node_geo_input_spline_length_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Float>(N_("Length")).field_source();
|
||||
b.add_output<decl::Int>(N_("Point Count")).field_source();
|
||||
b.add_output<decl::Float>("Length").field_source();
|
||||
b.add_output<decl::Int>("Point Count").field_source();
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace blender::nodes::node_geo_input_spline_resolution_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Int>(N_("Resolution")).field_source();
|
||||
b.add_output<decl::Int>("Resolution").field_source();
|
||||
}
|
||||
|
||||
class ResolutionFieldInput final : public bke::CurvesFieldInput {
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace blender::nodes::node_geo_input_tangent_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Vector>(N_("Tangent")).field_source();
|
||||
b.add_output<decl::Vector>("Tangent").field_source();
|
||||
}
|
||||
|
||||
static Array<float3> curve_tangent_point_domain(const bke::CurvesGeometry &curves)
|
||||
|
||||
@@ -19,30 +19,30 @@ namespace blender::nodes::node_geo_instance_on_points_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Points")).description(N_("Points to instance on"));
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).field_on({0}).hide_value();
|
||||
b.add_input<decl::Geometry>(N_("Instance"))
|
||||
.description(N_("Geometry that is instanced on the points"));
|
||||
b.add_input<decl::Bool>(N_("Pick Instance"))
|
||||
b.add_input<decl::Geometry>("Points").description("Points to instance on");
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).field_on({0}).hide_value();
|
||||
b.add_input<decl::Geometry>("Instance").description("Geometry that is instanced on the points");
|
||||
b.add_input<decl::Bool>("Pick Instance")
|
||||
.field_on({0})
|
||||
.description(N_("Choose instances from the \"Instance\" input at each point instead of "
|
||||
"instancing the entire geometry"));
|
||||
b.add_input<decl::Int>(N_("Instance Index"))
|
||||
.description(
|
||||
"Choose instances from the \"Instance\" input at each point instead of instancing the "
|
||||
"entire geometry");
|
||||
b.add_input<decl::Int>("Instance Index")
|
||||
.implicit_field_on(implicit_field_inputs::id_or_index, {0})
|
||||
.description(
|
||||
N_("Index of the instance used for each point. This is only used when Pick Instances "
|
||||
"is on. By default the point index is used"));
|
||||
b.add_input<decl::Vector>(N_("Rotation"))
|
||||
"Index of the instance used for each point. This is only used when Pick Instances "
|
||||
"is on. By default the point index is used");
|
||||
b.add_input<decl::Vector>("Rotation")
|
||||
.subtype(PROP_EULER)
|
||||
.field_on({0})
|
||||
.description(N_("Rotation of the instances"));
|
||||
b.add_input<decl::Vector>(N_("Scale"))
|
||||
.description("Rotation of the instances");
|
||||
b.add_input<decl::Vector>("Scale")
|
||||
.default_value({1.0f, 1.0f, 1.0f})
|
||||
.subtype(PROP_XYZ)
|
||||
.field_on({0})
|
||||
.description(N_("Scale of the instances"));
|
||||
.description("Scale of the instances");
|
||||
|
||||
b.add_output<decl::Geometry>(N_("Instances")).propagate_all();
|
||||
b.add_output<decl::Geometry>("Instances").propagate_all();
|
||||
}
|
||||
|
||||
static void add_instances_from_component(
|
||||
@@ -170,7 +170,8 @@ static void add_instances_from_component(
|
||||
|
||||
const eCustomDataType type = bke::cpp_type_to_custom_data_type(src.varray.type());
|
||||
if (src.varray.size() == dst_component.instances_num() && src.sharing_info &&
|
||||
src.varray.is_span()) {
|
||||
src.varray.is_span())
|
||||
{
|
||||
const bke::AttributeInitShared init(src.varray.get_internal_span().data(),
|
||||
*src.sharing_info);
|
||||
dst_attributes.add(id, ATTR_DOMAIN_INSTANCE, type, init);
|
||||
|
||||
@@ -14,15 +14,15 @@ namespace blender::nodes::node_geo_instances_to_points_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Instances")).only_instances();
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Vector>(N_("Position")).implicit_field_on_all(implicit_field_inputs::position);
|
||||
b.add_input<decl::Float>(N_("Radius"))
|
||||
b.add_input<decl::Geometry>("Instances").only_instances();
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Vector>("Position").implicit_field_on_all(implicit_field_inputs::position);
|
||||
b.add_input<decl::Float>("Radius")
|
||||
.default_value(0.05f)
|
||||
.min(0.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.field_on_all();
|
||||
b.add_output<decl::Geometry>(N_("Points")).propagate_all();
|
||||
b.add_output<decl::Geometry>("Points").propagate_all();
|
||||
}
|
||||
|
||||
static void convert_instances_to_points(GeometrySet &geometry_set,
|
||||
|
||||
@@ -15,39 +15,40 @@ namespace blender::nodes::node_geo_interpolate_curves_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Guide Curves"))
|
||||
.description(N_("Base curves that new curves are interpolated between"));
|
||||
b.add_input<decl::Vector>(N_("Guide Up"))
|
||||
b.add_input<decl::Geometry>("Guide Curves")
|
||||
.description("Base curves that new curves are interpolated between");
|
||||
b.add_input<decl::Vector>("Guide Up")
|
||||
.field_on({0})
|
||||
.hide_value()
|
||||
.description(N_("Optional up vector that is typically a surface normal"));
|
||||
b.add_input<decl::Int>(N_("Guide Group ID"))
|
||||
.description("Optional up vector that is typically a surface normal");
|
||||
b.add_input<decl::Int>("Guide Group ID")
|
||||
.field_on({0})
|
||||
.hide_value()
|
||||
.description(N_("Splits guides into separate groups. New curves interpolate existing curves "
|
||||
"from a single group"));
|
||||
b.add_input<decl::Geometry>(N_("Points"))
|
||||
.description(N_("First control point positions for new interpolated curves"));
|
||||
b.add_input<decl::Vector>(N_("Point Up"))
|
||||
.description(
|
||||
"Splits guides into separate groups. New curves interpolate existing curves "
|
||||
"from a single group");
|
||||
b.add_input<decl::Geometry>("Points").description(
|
||||
"First control point positions for new interpolated curves");
|
||||
b.add_input<decl::Vector>("Point Up")
|
||||
.field_on({3})
|
||||
.hide_value()
|
||||
.description(N_("Optional up vector that is typically a surface normal"));
|
||||
b.add_input<decl::Int>(N_("Point Group ID"))
|
||||
.description("Optional up vector that is typically a surface normal");
|
||||
b.add_input<decl::Int>("Point Group ID")
|
||||
.field_on({3})
|
||||
.hide_value()
|
||||
.description(N_("The curve group to interpolate in"));
|
||||
b.add_input<decl::Int>(N_("Max Neighbors"))
|
||||
.description("The curve group to interpolate in");
|
||||
b.add_input<decl::Int>("Max Neighbors")
|
||||
.default_value(4)
|
||||
.min(1)
|
||||
.description(N_(
|
||||
"Maximum amount of close guide curves that are taken into account for interpolation"));
|
||||
b.add_output<decl::Geometry>(N_("Curves")).propagate_all();
|
||||
b.add_output<decl::Int>(N_("Closest Index"))
|
||||
.description(
|
||||
"Maximum amount of close guide curves that are taken into account for interpolation");
|
||||
b.add_output<decl::Geometry>("Curves").propagate_all();
|
||||
b.add_output<decl::Int>("Closest Index")
|
||||
.field_on_all()
|
||||
.description(N_("Index of the closest guide curve for each generated curve"));
|
||||
b.add_output<decl::Float>(N_("Closest Weight"))
|
||||
.description("Index of the closest guide curve for each generated curve");
|
||||
b.add_output<decl::Float>("Closest Weight")
|
||||
.field_on_all()
|
||||
.description(N_("Weight of the closest guide curve for each generated curve"));
|
||||
.description("Weight of the closest guide curve for each generated curve");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace blender::nodes::node_geo_is_viewport_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Bool>(N_("Is Viewport"));
|
||||
b.add_output<decl::Bool>("Is Viewport");
|
||||
}
|
||||
|
||||
static void node_geo_exec(GeoNodeExecParams params)
|
||||
|
||||
@@ -10,8 +10,8 @@ namespace blender::nodes::node_geo_join_geometry_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Geometry")).multi_input();
|
||||
b.add_output<decl::Geometry>(N_("Geometry")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Geometry").multi_input();
|
||||
b.add_output<decl::Geometry>("Geometry").propagate_all();
|
||||
}
|
||||
|
||||
template<typename Component>
|
||||
|
||||
@@ -14,10 +14,10 @@ namespace blender::nodes::node_geo_material_replace_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Geometry")).supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Material>(N_("Old"));
|
||||
b.add_input<decl::Material>(N_("New")).translation_context(BLT_I18NCONTEXT_ID_MATERIAL);
|
||||
b.add_output<decl::Geometry>(N_("Geometry")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Geometry").supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Material>("Old");
|
||||
b.add_input<decl::Material>("New").translation_context(BLT_I18NCONTEXT_ID_MATERIAL);
|
||||
b.add_output<decl::Geometry>("Geometry").propagate_all();
|
||||
}
|
||||
|
||||
static void node_geo_exec(GeoNodeExecParams params)
|
||||
|
||||
@@ -16,8 +16,8 @@ namespace blender::nodes::node_geo_material_selection_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Material>(N_("Material")).hide_label(true);
|
||||
b.add_output<decl::Bool>(N_("Selection")).field_source();
|
||||
b.add_input<decl::Material>("Material").hide_label(true);
|
||||
b.add_output<decl::Bool>("Selection").field_source();
|
||||
}
|
||||
|
||||
static VArray<bool> select_mesh_faces_by_material(const Mesh &mesh,
|
||||
|
||||
@@ -22,13 +22,12 @@ namespace blender::nodes::node_geo_mean_filter_sdf_volume_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(CTX_N_(BLT_I18NCONTEXT_ID_ID, "Volume"))
|
||||
b.add_input<decl::Geometry>("Volume")
|
||||
.supported_type(GEO_COMPONENT_TYPE_VOLUME)
|
||||
.translation_context(BLT_I18NCONTEXT_ID_ID);
|
||||
b.add_input<decl::Int>(N_("Iterations")).min(1).max(256).default_value(1);
|
||||
b.add_input<decl::Int>(N_("Width")).min(0).default_value(1);
|
||||
b.add_output<decl::Geometry>(CTX_N_(BLT_I18NCONTEXT_ID_ID, "Volume"))
|
||||
.translation_context(BLT_I18NCONTEXT_ID_ID);
|
||||
b.add_input<decl::Int>("Iterations").min(1).max(256).default_value(1);
|
||||
b.add_input<decl::Int>("Width").min(0).default_value(1);
|
||||
b.add_output<decl::Geometry>("Volume").translation_context(BLT_I18NCONTEXT_ID_ID);
|
||||
}
|
||||
|
||||
static void search_node_add_ops(GatherAddNodeSearchParams ¶ms)
|
||||
|
||||
@@ -17,11 +17,11 @@ NODE_STORAGE_FUNCS(NodeGeometryMergeByDistance)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Geometry"))
|
||||
b.add_input<decl::Geometry>("Geometry")
|
||||
.supported_type({GEO_COMPONENT_TYPE_POINT_CLOUD, GEO_COMPONENT_TYPE_MESH});
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Float>(N_("Distance")).default_value(0.001f).min(0.0f).subtype(PROP_DISTANCE);
|
||||
b.add_output<decl::Geometry>(N_("Geometry")).propagate_all();
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Float>("Distance").default_value(0.001f).min(0.0f).subtype(PROP_DISTANCE);
|
||||
b.add_output<decl::Geometry>("Geometry").propagate_all();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -11,15 +11,16 @@ namespace blender::nodes::node_geo_mesh_face_group_boundaries_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Int>(N_("Face Group ID"), "Face Set")
|
||||
b.add_input<decl::Int>("Face Group ID", "Face Set")
|
||||
.default_value(0)
|
||||
.hide_value()
|
||||
.supports_field()
|
||||
.description(N_("An identifier for the group of each face. All contiguous faces with the "
|
||||
"same value are in the same region"));
|
||||
b.add_output<decl::Bool>(N_("Boundary Edges"))
|
||||
.description(
|
||||
"An identifier for the group of each face. All contiguous faces with the "
|
||||
"same value are in the same region");
|
||||
b.add_output<decl::Bool>("Boundary Edges")
|
||||
.field_source_reference_all()
|
||||
.description(N_("The edges that lie on the boundaries between the different face groups"));
|
||||
.description("The edges that lie on the boundaries between the different face groups");
|
||||
}
|
||||
|
||||
class BoundaryFieldInput final : public bke::MeshFieldInput {
|
||||
|
||||
@@ -17,16 +17,16 @@ NODE_STORAGE_FUNCS(NodeGeometryMeshCircle)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Int>(N_("Vertices"))
|
||||
b.add_input<decl::Int>("Vertices")
|
||||
.default_value(32)
|
||||
.min(3)
|
||||
.description(N_("Number of vertices on the circle"));
|
||||
b.add_input<decl::Float>(N_("Radius"))
|
||||
.description("Number of vertices on the circle");
|
||||
b.add_input<decl::Float>("Radius")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("Distance of the vertices from the origin"));
|
||||
b.add_output<decl::Geometry>(N_("Mesh"));
|
||||
.description("Distance of the vertices from the origin");
|
||||
b.add_output<decl::Geometry>("Mesh");
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -738,40 +738,40 @@ NODE_STORAGE_FUNCS(NodeGeometryMeshCone)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Int>(N_("Vertices"))
|
||||
b.add_input<decl::Int>("Vertices")
|
||||
.default_value(32)
|
||||
.min(3)
|
||||
.max(512)
|
||||
.description(N_("Number of points on the circle at the top and bottom"));
|
||||
b.add_input<decl::Int>(N_("Side Segments"))
|
||||
.description("Number of points on the circle at the top and bottom");
|
||||
b.add_input<decl::Int>("Side Segments")
|
||||
.default_value(1)
|
||||
.min(1)
|
||||
.max(512)
|
||||
.description(N_("The number of edges running vertically along the side of the cone"));
|
||||
b.add_input<decl::Int>(N_("Fill Segments"))
|
||||
.description("The number of edges running vertically along the side of the cone");
|
||||
b.add_input<decl::Int>("Fill Segments")
|
||||
.default_value(1)
|
||||
.min(1)
|
||||
.max(512)
|
||||
.description(N_("Number of concentric rings used to fill the round face"));
|
||||
b.add_input<decl::Float>(N_("Radius Top"))
|
||||
.description("Number of concentric rings used to fill the round face");
|
||||
b.add_input<decl::Float>("Radius Top")
|
||||
.min(0.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("Radius of the top circle of the cone"));
|
||||
b.add_input<decl::Float>(N_("Radius Bottom"))
|
||||
.description("Radius of the top circle of the cone");
|
||||
b.add_input<decl::Float>("Radius Bottom")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("Radius of the bottom circle of the cone"));
|
||||
b.add_input<decl::Float>(N_("Depth"))
|
||||
.description("Radius of the bottom circle of the cone");
|
||||
b.add_input<decl::Float>("Depth")
|
||||
.default_value(2.0f)
|
||||
.min(0.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("Height of the generated cone"));
|
||||
b.add_output<decl::Geometry>(N_("Mesh"));
|
||||
b.add_output<decl::Bool>(N_("Top")).field_on_all();
|
||||
b.add_output<decl::Bool>(N_("Bottom")).field_on_all();
|
||||
b.add_output<decl::Bool>(N_("Side")).field_on_all();
|
||||
b.add_output<decl::Vector>(N_("UV Map")).field_on_all();
|
||||
.description("Height of the generated cone");
|
||||
b.add_output<decl::Geometry>("Mesh");
|
||||
b.add_output<decl::Bool>("Top").field_on_all();
|
||||
b.add_output<decl::Bool>("Bottom").field_on_all();
|
||||
b.add_output<decl::Bool>("Side").field_on_all();
|
||||
b.add_output<decl::Vector>("UV Map").field_on_all();
|
||||
}
|
||||
|
||||
static void node_init(bNodeTree * /*tree*/, bNode *node)
|
||||
|
||||
@@ -14,28 +14,28 @@ namespace blender::nodes::node_geo_mesh_primitive_cube_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Vector>(N_("Size"))
|
||||
b.add_input<decl::Vector>("Size")
|
||||
.default_value(float3(1))
|
||||
.min(0.0f)
|
||||
.subtype(PROP_TRANSLATION)
|
||||
.description(N_("Side length along each axis"));
|
||||
b.add_input<decl::Int>(N_("Vertices X"))
|
||||
.description("Side length along each axis");
|
||||
b.add_input<decl::Int>("Vertices X")
|
||||
.default_value(2)
|
||||
.min(2)
|
||||
.max(1000)
|
||||
.description(N_("Number of vertices for the X side of the shape"));
|
||||
b.add_input<decl::Int>(N_("Vertices Y"))
|
||||
.description("Number of vertices for the X side of the shape");
|
||||
b.add_input<decl::Int>("Vertices Y")
|
||||
.default_value(2)
|
||||
.min(2)
|
||||
.max(1000)
|
||||
.description(N_("Number of vertices for the Y side of the shape"));
|
||||
b.add_input<decl::Int>(N_("Vertices Z"))
|
||||
.description("Number of vertices for the Y side of the shape");
|
||||
b.add_input<decl::Int>("Vertices Z")
|
||||
.default_value(2)
|
||||
.min(2)
|
||||
.max(1000)
|
||||
.description(N_("Number of vertices for the Z side of the shape"));
|
||||
b.add_output<decl::Geometry>(N_("Mesh"));
|
||||
b.add_output<decl::Vector>(N_("UV Map")).field_on_all();
|
||||
.description("Number of vertices for the Z side of the shape");
|
||||
b.add_output<decl::Geometry>("Mesh");
|
||||
b.add_output<decl::Vector>("UV Map").field_on_all();
|
||||
}
|
||||
|
||||
static Mesh *create_cuboid_mesh(const float3 &size,
|
||||
|
||||
@@ -17,36 +17,36 @@ NODE_STORAGE_FUNCS(NodeGeometryMeshCylinder)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Int>(N_("Vertices"))
|
||||
b.add_input<decl::Int>("Vertices")
|
||||
.default_value(32)
|
||||
.min(3)
|
||||
.max(512)
|
||||
.description(N_("The number of vertices on the top and bottom circles"));
|
||||
b.add_input<decl::Int>(N_("Side Segments"))
|
||||
.description("The number of vertices on the top and bottom circles");
|
||||
b.add_input<decl::Int>("Side Segments")
|
||||
.default_value(1)
|
||||
.min(1)
|
||||
.max(512)
|
||||
.description(N_("The number of rectangular segments along each side"));
|
||||
b.add_input<decl::Int>(N_("Fill Segments"))
|
||||
.description("The number of rectangular segments along each side");
|
||||
b.add_input<decl::Int>("Fill Segments")
|
||||
.default_value(1)
|
||||
.min(1)
|
||||
.max(512)
|
||||
.description(N_("The number of concentric rings used to fill the round faces"));
|
||||
b.add_input<decl::Float>(N_("Radius"))
|
||||
.description("The number of concentric rings used to fill the round faces");
|
||||
b.add_input<decl::Float>("Radius")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("The radius of the cylinder"));
|
||||
b.add_input<decl::Float>(N_("Depth"))
|
||||
.description("The radius of the cylinder");
|
||||
b.add_input<decl::Float>("Depth")
|
||||
.default_value(2.0f)
|
||||
.min(0.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("The height of the cylinder"));
|
||||
b.add_output<decl::Geometry>(N_("Mesh"));
|
||||
b.add_output<decl::Bool>(N_("Top")).field_on_all();
|
||||
b.add_output<decl::Bool>(N_("Side")).field_on_all();
|
||||
b.add_output<decl::Bool>(N_("Bottom")).field_on_all();
|
||||
b.add_output<decl::Vector>(N_("UV Map")).field_on_all();
|
||||
.description("The height of the cylinder");
|
||||
b.add_output<decl::Geometry>("Mesh");
|
||||
b.add_output<decl::Bool>("Top").field_on_all();
|
||||
b.add_output<decl::Bool>("Side").field_on_all();
|
||||
b.add_output<decl::Bool>("Bottom").field_on_all();
|
||||
b.add_output<decl::Vector>("UV Map").field_on_all();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -164,28 +164,28 @@ namespace blender::nodes::node_geo_mesh_primitive_grid_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Size X"))
|
||||
b.add_input<decl::Float>("Size X")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("Side length of the plane in the X direction"));
|
||||
b.add_input<decl::Float>(N_("Size Y"))
|
||||
.description("Side length of the plane in the X direction");
|
||||
b.add_input<decl::Float>("Size Y")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("Side length of the plane in the Y direction"));
|
||||
b.add_input<decl::Int>(N_("Vertices X"))
|
||||
.description("Side length of the plane in the Y direction");
|
||||
b.add_input<decl::Int>("Vertices X")
|
||||
.default_value(3)
|
||||
.min(2)
|
||||
.max(1000)
|
||||
.description(N_("Number of vertices in the X direction"));
|
||||
b.add_input<decl::Int>(N_("Vertices Y"))
|
||||
.description("Number of vertices in the X direction");
|
||||
b.add_input<decl::Int>("Vertices Y")
|
||||
.default_value(3)
|
||||
.min(2)
|
||||
.max(1000)
|
||||
.description(N_("Number of vertices in the Y direction"));
|
||||
b.add_output<decl::Geometry>(N_("Mesh"));
|
||||
b.add_output<decl::Vector>(N_("UV Map")).field_on_all();
|
||||
.description("Number of vertices in the Y direction");
|
||||
b.add_output<decl::Geometry>("Mesh");
|
||||
b.add_output<decl::Vector>("UV Map").field_on_all();
|
||||
}
|
||||
|
||||
static void node_geo_exec(GeoNodeExecParams params)
|
||||
|
||||
@@ -14,18 +14,18 @@ namespace blender::nodes::node_geo_mesh_primitive_ico_sphere_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Radius"))
|
||||
b.add_input<decl::Float>("Radius")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("Distance from the generated points to the origin"));
|
||||
b.add_input<decl::Int>(N_("Subdivisions"))
|
||||
.description("Distance from the generated points to the origin");
|
||||
b.add_input<decl::Int>("Subdivisions")
|
||||
.default_value(1)
|
||||
.min(1)
|
||||
.max(7)
|
||||
.description(N_("Number of subdivisions on top of the basic icosahedron"));
|
||||
b.add_output<decl::Geometry>(N_("Mesh"));
|
||||
b.add_output<decl::Vector>(N_("UV Map")).field_on_all();
|
||||
.description("Number of subdivisions on top of the basic icosahedron");
|
||||
b.add_output<decl::Geometry>("Mesh");
|
||||
b.add_output<decl::Vector>("UV Map").field_on_all();
|
||||
}
|
||||
|
||||
static Bounds<float3> calculate_bounds_ico_sphere(const float radius, const int subdivisions)
|
||||
|
||||
@@ -22,26 +22,23 @@ NODE_STORAGE_FUNCS(NodeGeometryMeshLine)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Int>(N_("Count"))
|
||||
.default_value(10)
|
||||
.min(1)
|
||||
.max(10000)
|
||||
.description(N_("Number of vertices on the line"));
|
||||
b.add_input<decl::Float>(N_("Resolution"))
|
||||
b.add_input<decl::Int>("Count").default_value(10).min(1).max(10000).description(
|
||||
"Number of vertices on the line");
|
||||
b.add_input<decl::Float>("Resolution")
|
||||
.default_value(1.0f)
|
||||
.min(0.1f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("Length of each individual edge"));
|
||||
b.add_input<decl::Vector>(N_("Start Location"))
|
||||
.description("Length of each individual edge");
|
||||
b.add_input<decl::Vector>("Start Location")
|
||||
.subtype(PROP_TRANSLATION)
|
||||
.description(N_("Position of the first vertex"));
|
||||
b.add_input<decl::Vector>(N_("Offset"))
|
||||
.description("Position of the first vertex");
|
||||
b.add_input<decl::Vector>("Offset")
|
||||
.default_value({0.0f, 0.0f, 1.0f})
|
||||
.subtype(PROP_TRANSLATION)
|
||||
.description(N_(
|
||||
.description(
|
||||
"In offset mode, the distance between each socket on each axis. In end points mode, the "
|
||||
"position of the final vertex"));
|
||||
b.add_output<decl::Geometry>(N_("Mesh"));
|
||||
"position of the final vertex");
|
||||
b.add_output<decl::Geometry>("Mesh");
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -17,23 +17,20 @@ namespace blender::nodes::node_geo_mesh_primitive_uv_sphere_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Int>(N_("Segments"))
|
||||
b.add_input<decl::Int>("Segments")
|
||||
.default_value(32)
|
||||
.min(3)
|
||||
.max(1024)
|
||||
.description(N_("Horizontal resolution of the sphere"));
|
||||
b.add_input<decl::Int>(N_("Rings"))
|
||||
.default_value(16)
|
||||
.min(2)
|
||||
.max(1024)
|
||||
.description(N_("The number of horizontal rings"));
|
||||
b.add_input<decl::Float>(N_("Radius"))
|
||||
.description("Horizontal resolution of the sphere");
|
||||
b.add_input<decl::Int>("Rings").default_value(16).min(2).max(1024).description(
|
||||
"The number of horizontal rings");
|
||||
b.add_input<decl::Float>("Radius")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("Distance from the generated points to the origin"));
|
||||
b.add_output<decl::Geometry>(N_("Mesh"));
|
||||
b.add_output<decl::Vector>(N_("UV Map")).field_on_all();
|
||||
.description("Distance from the generated points to the origin");
|
||||
b.add_output<decl::Geometry>("Mesh");
|
||||
b.add_output<decl::Vector>("UV Map").field_on_all();
|
||||
}
|
||||
|
||||
static int sphere_vert_total(const int segments, const int rings)
|
||||
|
||||
@@ -13,9 +13,9 @@ namespace blender::nodes::node_geo_mesh_subdivide_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Mesh")).supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Int>(N_("Level")).default_value(1).min(0).max(6);
|
||||
b.add_output<decl::Geometry>(N_("Mesh")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Mesh").supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Int>("Level").default_value(1).min(0).max(6);
|
||||
b.add_output<decl::Geometry>("Mesh").propagate_all();
|
||||
}
|
||||
|
||||
#ifdef WITH_OPENSUBDIV
|
||||
|
||||
@@ -10,9 +10,9 @@ namespace blender::nodes::node_geo_mesh_to_curve_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Mesh")).supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().field_on_all();
|
||||
b.add_output<decl::Geometry>(N_("Curve")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Mesh").supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).hide_value().field_on_all();
|
||||
b.add_output<decl::Geometry>("Curve").propagate_all();
|
||||
}
|
||||
|
||||
static void node_geo_exec(GeoNodeExecParams params)
|
||||
|
||||
@@ -23,15 +23,15 @@ NODE_STORAGE_FUNCS(NodeGeometryMeshToPoints)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Mesh")).supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).field_on_all().hide_value();
|
||||
b.add_input<decl::Vector>(N_("Position")).implicit_field_on_all(implicit_field_inputs::position);
|
||||
b.add_input<decl::Float>(N_("Radius"))
|
||||
b.add_input<decl::Geometry>("Mesh").supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).field_on_all().hide_value();
|
||||
b.add_input<decl::Vector>("Position").implicit_field_on_all(implicit_field_inputs::position);
|
||||
b.add_input<decl::Float>("Radius")
|
||||
.default_value(0.05f)
|
||||
.min(0.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.field_on_all();
|
||||
b.add_output<decl::Geometry>(N_("Points")).propagate_all();
|
||||
b.add_output<decl::Geometry>("Points").propagate_all();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -27,20 +27,19 @@ NODE_STORAGE_FUNCS(NodeGeometryMeshToVolume)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Mesh")).supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Float>(N_("Voxel Size"))
|
||||
b.add_input<decl::Geometry>("Mesh").supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Float>("Voxel Size")
|
||||
.default_value(0.3f)
|
||||
.min(0.01f)
|
||||
.max(FLT_MAX)
|
||||
.subtype(PROP_DISTANCE);
|
||||
b.add_input<decl::Float>(N_("Voxel Amount")).default_value(64.0f).min(0.0f).max(FLT_MAX);
|
||||
b.add_input<decl::Float>(N_("Half-Band Width"))
|
||||
.description(N_("Half the width of the narrow band in voxel units"))
|
||||
b.add_input<decl::Float>("Voxel Amount").default_value(64.0f).min(0.0f).max(FLT_MAX);
|
||||
b.add_input<decl::Float>("Half-Band Width")
|
||||
.description("Half the width of the narrow band in voxel units")
|
||||
.default_value(3.0f)
|
||||
.min(1.01f)
|
||||
.max(10.0f);
|
||||
b.add_output<decl::Geometry>(CTX_N_(BLT_I18NCONTEXT_ID_ID, "Volume"))
|
||||
.translation_context(BLT_I18NCONTEXT_ID_ID);
|
||||
b.add_output<decl::Geometry>("Volume").translation_context(BLT_I18NCONTEXT_ID_ID);
|
||||
}
|
||||
|
||||
static void search_node_add_ops(GatherAddNodeSearchParams ¶ms)
|
||||
|
||||
@@ -24,22 +24,21 @@ NODE_STORAGE_FUNCS(NodeGeometryMeshToVolume)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Mesh")).supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Float>(N_("Density")).default_value(1.0f).min(0.01f).max(FLT_MAX);
|
||||
b.add_input<decl::Float>(N_("Voxel Size"))
|
||||
b.add_input<decl::Geometry>("Mesh").supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Float>("Density").default_value(1.0f).min(0.01f).max(FLT_MAX);
|
||||
b.add_input<decl::Float>("Voxel Size")
|
||||
.default_value(0.3f)
|
||||
.min(0.01f)
|
||||
.max(FLT_MAX)
|
||||
.subtype(PROP_DISTANCE);
|
||||
b.add_input<decl::Float>(N_("Voxel Amount")).default_value(64.0f).min(0.0f).max(FLT_MAX);
|
||||
b.add_input<decl::Float>(N_("Interior Band Width"))
|
||||
b.add_input<decl::Float>("Voxel Amount").default_value(64.0f).min(0.0f).max(FLT_MAX);
|
||||
b.add_input<decl::Float>("Interior Band Width")
|
||||
.default_value(0.2f)
|
||||
.min(0.0001f)
|
||||
.max(FLT_MAX)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("Width of the gradient inside of the mesh"));
|
||||
b.add_output<decl::Geometry>(CTX_N_(BLT_I18NCONTEXT_ID_ID, "Volume"))
|
||||
.translation_context(BLT_I18NCONTEXT_ID_ID);
|
||||
.description("Width of the gradient inside of the mesh");
|
||||
b.add_output<decl::Geometry>("Volume").translation_context(BLT_I18NCONTEXT_ID_ID);
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -10,24 +10,20 @@ namespace blender::nodes::node_geo_mesh_topology_corners_of_face_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Int>(N_("Face Index"))
|
||||
b.add_input<decl::Int>("Face Index")
|
||||
.implicit_field(implicit_field_inputs::index)
|
||||
.description(N_("The face to retrieve data from. Defaults to the face from the context"));
|
||||
b.add_input<decl::Float>(N_("Weights"))
|
||||
.supports_field()
|
||||
.hide_value()
|
||||
.description(N_("Values used to sort the face's corners. Uses indices by default"));
|
||||
b.add_input<decl::Int>(N_("Sort Index"))
|
||||
.description("The face to retrieve data from. Defaults to the face from the context");
|
||||
b.add_input<decl::Float>("Weights").supports_field().hide_value().description(
|
||||
"Values used to sort the face's corners. Uses indices by default");
|
||||
b.add_input<decl::Int>("Sort Index")
|
||||
.min(0)
|
||||
.supports_field()
|
||||
.description(N_("Which of the sorted corners to output"));
|
||||
b.add_output<decl::Int>(N_("Corner Index"))
|
||||
.description("Which of the sorted corners to output");
|
||||
b.add_output<decl::Int>("Corner Index")
|
||||
.field_source_reference_all()
|
||||
.description(N_("A corner of the face, chosen by the sort index"));
|
||||
b.add_output<decl::Int>(N_("Total"))
|
||||
.field_source()
|
||||
.reference_pass({0})
|
||||
.description(N_("The number of corners in the face"));
|
||||
.description("A corner of the face, chosen by the sort index");
|
||||
b.add_output<decl::Int>("Total").field_source().reference_pass({0}).description(
|
||||
"The number of corners in the face");
|
||||
}
|
||||
|
||||
class CornersOfFaceInput final : public bke::MeshFieldInput {
|
||||
|
||||
@@ -11,26 +11,20 @@ namespace blender::nodes::node_geo_mesh_topology_corners_of_vertex_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Int>(N_("Vertex Index"))
|
||||
b.add_input<decl::Int>("Vertex Index")
|
||||
.implicit_field(implicit_field_inputs::index)
|
||||
.description(
|
||||
N_("The vertex to retrieve data from. Defaults to the vertex from the context"));
|
||||
b.add_input<decl::Float>(N_("Weights"))
|
||||
.supports_field()
|
||||
.hide_value()
|
||||
.description(
|
||||
N_("Values used to sort corners attached to the vertex. Uses indices by default"));
|
||||
b.add_input<decl::Int>(N_("Sort Index"))
|
||||
.description("The vertex to retrieve data from. Defaults to the vertex from the context");
|
||||
b.add_input<decl::Float>("Weights").supports_field().hide_value().description(
|
||||
"Values used to sort corners attached to the vertex. Uses indices by default");
|
||||
b.add_input<decl::Int>("Sort Index")
|
||||
.min(0)
|
||||
.supports_field()
|
||||
.description(N_("Which of the sorted corners to output"));
|
||||
b.add_output<decl::Int>(N_("Corner Index"))
|
||||
.description("Which of the sorted corners to output");
|
||||
b.add_output<decl::Int>("Corner Index")
|
||||
.field_source_reference_all()
|
||||
.description(N_("A corner connected to the face, chosen by the sort index"));
|
||||
b.add_output<decl::Int>(N_("Total"))
|
||||
.field_source()
|
||||
.reference_pass({0})
|
||||
.description(N_("The number of faces or corners connected to each vertex"));
|
||||
.description("A corner connected to the face, chosen by the sort index");
|
||||
b.add_output<decl::Int>("Total").field_source().reference_pass({0}).description(
|
||||
"The number of faces or corners connected to each vertex");
|
||||
}
|
||||
|
||||
static void convert_span(const Span<int> src, MutableSpan<int64_t> dst)
|
||||
|
||||
@@ -11,18 +11,17 @@ namespace blender::nodes::node_geo_mesh_topology_edges_of_corner_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Int>(N_("Corner Index"))
|
||||
b.add_input<decl::Int>("Corner Index")
|
||||
.implicit_field(implicit_field_inputs::index)
|
||||
.description(
|
||||
N_("The corner to retrieve data from. Defaults to the corner from the context"));
|
||||
b.add_output<decl::Int>(N_("Next Edge Index"))
|
||||
.description("The corner to retrieve data from. Defaults to the corner from the context");
|
||||
b.add_output<decl::Int>("Next Edge Index")
|
||||
.field_source_reference_all()
|
||||
.description(
|
||||
N_("The edge after the corner in the face, in the direction of increasing indices"));
|
||||
b.add_output<decl::Int>(N_("Previous Edge Index"))
|
||||
"The edge after the corner in the face, in the direction of increasing indices");
|
||||
b.add_output<decl::Int>("Previous Edge Index")
|
||||
.field_source_reference_all()
|
||||
.description(
|
||||
N_("The edge before the corner in the face, in the direction of decreasing indices"));
|
||||
"The edge before the corner in the face, in the direction of decreasing indices");
|
||||
}
|
||||
|
||||
class CornerNextEdgeFieldInput final : public bke::MeshFieldInput {
|
||||
|
||||
@@ -11,26 +11,20 @@ namespace blender::nodes::node_geo_mesh_topology_edges_of_vertex_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Int>(N_("Vertex Index"))
|
||||
b.add_input<decl::Int>("Vertex Index")
|
||||
.implicit_field(implicit_field_inputs::index)
|
||||
.description(
|
||||
N_("The vertex to retrieve data from. Defaults to the vertex from the context"));
|
||||
b.add_input<decl::Float>(N_("Weights"))
|
||||
.supports_field()
|
||||
.hide_value()
|
||||
.description(
|
||||
N_("Values used to sort the edges connected to the vertex. Uses indices by default"));
|
||||
b.add_input<decl::Int>(N_("Sort Index"))
|
||||
.description("The vertex to retrieve data from. Defaults to the vertex from the context");
|
||||
b.add_input<decl::Float>("Weights").supports_field().hide_value().description(
|
||||
"Values used to sort the edges connected to the vertex. Uses indices by default");
|
||||
b.add_input<decl::Int>("Sort Index")
|
||||
.min(0)
|
||||
.supports_field()
|
||||
.description(N_("Which of the sorted edges to output"));
|
||||
b.add_output<decl::Int>(N_("Edge Index"))
|
||||
.description("Which of the sorted edges to output");
|
||||
b.add_output<decl::Int>("Edge Index")
|
||||
.field_source_reference_all()
|
||||
.description(N_("An edge connected to the face, chosen by the sort index"));
|
||||
b.add_output<decl::Int>(N_("Total"))
|
||||
.field_source()
|
||||
.reference_pass({0})
|
||||
.description(N_("The number of edges connected to each vertex"));
|
||||
.description("An edge connected to the face, chosen by the sort index");
|
||||
b.add_output<decl::Int>("Total").field_source().reference_pass({0}).description(
|
||||
"The number of edges connected to each vertex");
|
||||
}
|
||||
|
||||
static void convert_span(const Span<int> src, MutableSpan<int64_t> dst)
|
||||
|
||||
@@ -9,16 +9,15 @@ namespace blender::nodes::node_geo_mesh_topology_face_of_corner_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Int>(N_("Corner Index"))
|
||||
b.add_input<decl::Int>("Corner Index")
|
||||
.implicit_field(implicit_field_inputs::index)
|
||||
.description(
|
||||
N_("The corner to retrieve data from. Defaults to the corner from the context"));
|
||||
b.add_output<decl::Int>(N_("Face Index"))
|
||||
.description("The corner to retrieve data from. Defaults to the corner from the context");
|
||||
b.add_output<decl::Int>("Face Index")
|
||||
.field_source_reference_all()
|
||||
.description(N_("The index of the face the corner is a part of"));
|
||||
b.add_output<decl::Int>(N_("Index in Face"))
|
||||
.description("The index of the face the corner is a part of");
|
||||
b.add_output<decl::Int>("Index in Face")
|
||||
.field_source_reference_all()
|
||||
.description(N_("The index of the corner starting from the first corner in the face"));
|
||||
.description("The index of the corner starting from the first corner in the face");
|
||||
}
|
||||
|
||||
class CornerFaceIndexInput final : public bke::MeshFieldInput {
|
||||
|
||||
@@ -11,17 +11,15 @@ namespace blender::nodes::node_geo_mesh_topology_offset_corner_in_face_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Int>(N_("Corner Index"))
|
||||
b.add_input<decl::Int>("Corner Index")
|
||||
.implicit_field(implicit_field_inputs::index)
|
||||
.description(
|
||||
N_("The corner to retrieve data from. Defaults to the corner from the context"));
|
||||
b.add_input<decl::Int>(N_("Offset"))
|
||||
.supports_field()
|
||||
.description(N_("The number of corners to move around the face before finding the result, "
|
||||
"circling around the start of the face if necessary"));
|
||||
b.add_output<decl::Int>(N_("Corner Index"))
|
||||
.description("The corner to retrieve data from. Defaults to the corner from the context");
|
||||
b.add_input<decl::Int>("Offset").supports_field().description(
|
||||
"The number of corners to move around the face before finding the result, "
|
||||
"circling around the start of the face if necessary");
|
||||
b.add_output<decl::Int>("Corner Index")
|
||||
.field_source_reference_all()
|
||||
.description(N_("The index of the offset corner"));
|
||||
.description("The index of the offset corner");
|
||||
}
|
||||
|
||||
class OffsetCornerInFaceFieldInput final : public bke::MeshFieldInput {
|
||||
|
||||
@@ -10,13 +10,12 @@ namespace blender::nodes::node_geo_mesh_topology_vertex_of_corner_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Int>(N_("Corner Index"))
|
||||
b.add_input<decl::Int>("Corner Index")
|
||||
.implicit_field(implicit_field_inputs::index)
|
||||
.description(
|
||||
N_("The corner to retrieve data from. Defaults to the corner from the context"));
|
||||
b.add_output<decl::Int>(N_("Vertex Index"))
|
||||
.description("The corner to retrieve data from. Defaults to the corner from the context");
|
||||
b.add_output<decl::Int>("Vertex Index")
|
||||
.field_source_reference_all()
|
||||
.description(N_("The vertex the corner is attached to"));
|
||||
.description("The vertex the corner is attached to");
|
||||
}
|
||||
|
||||
class CornerVertFieldInput final : public bke::MeshFieldInput {
|
||||
|
||||
@@ -16,14 +16,15 @@ NODE_STORAGE_FUNCS(NodeGeometryObjectInfo)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Object>(N_("Object")).hide_label();
|
||||
b.add_input<decl::Bool>(N_("As Instance"))
|
||||
.description(N_("Output the entire object as single instance. "
|
||||
"This allows instancing non-geometry object types"));
|
||||
b.add_output<decl::Vector>(N_("Location"));
|
||||
b.add_output<decl::Vector>(N_("Rotation"));
|
||||
b.add_output<decl::Vector>(N_("Scale"));
|
||||
b.add_output<decl::Geometry>(N_("Geometry"));
|
||||
b.add_input<decl::Object>("Object").hide_label();
|
||||
b.add_input<decl::Bool>("As Instance")
|
||||
.description(
|
||||
"Output the entire object as single instance. "
|
||||
"This allows instancing non-geometry object types");
|
||||
b.add_output<decl::Vector>("Location");
|
||||
b.add_output<decl::Vector>("Rotation");
|
||||
b.add_output<decl::Vector>("Scale");
|
||||
b.add_output<decl::Geometry>("Geometry");
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -26,21 +26,21 @@ namespace blender::nodes::node_geo_offset_point_in_curve_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Int>(N_("Point Index"))
|
||||
b.add_input<decl::Int>("Point Index")
|
||||
.implicit_field(implicit_field_inputs::index)
|
||||
.description("The index of the control point to evaluate. Defaults to the current index");
|
||||
b.add_input<decl::Int>("Offset").supports_field().description(
|
||||
"The number of control points along the curve to traverse");
|
||||
b.add_output<decl::Bool>("Is Valid Offset")
|
||||
.field_source_reference_all()
|
||||
.description(
|
||||
N_("The index of the control point to evaluate. Defaults to the current index"));
|
||||
b.add_input<decl::Int>(N_("Offset"))
|
||||
.supports_field()
|
||||
.description(N_("The number of control points along the curve to traverse"));
|
||||
b.add_output<decl::Bool>(N_("Is Valid Offset"))
|
||||
"Whether the input control point plus the offset is a valid index of the "
|
||||
"original curve");
|
||||
b.add_output<decl::Int>("Point Index")
|
||||
.field_source_reference_all()
|
||||
.description(N_("Whether the input control point plus the offset is a valid index of the "
|
||||
"original curve"));
|
||||
b.add_output<decl::Int>(N_("Point Index"))
|
||||
.field_source_reference_all()
|
||||
.description(N_("The index of the control point plus the offset within the entire "
|
||||
"curves data-block"));
|
||||
.description(
|
||||
"The index of the control point plus the offset within the entire "
|
||||
"curves data-block");
|
||||
}
|
||||
|
||||
class ControlPointNeighborFieldInput final : public bke::CurvesFieldInput {
|
||||
|
||||
@@ -22,12 +22,11 @@ namespace blender::nodes::node_geo_offset_sdf_volume_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(CTX_N_(BLT_I18NCONTEXT_ID_ID, "Volume"))
|
||||
b.add_input<decl::Geometry>("Volume")
|
||||
.supported_type(GEO_COMPONENT_TYPE_VOLUME)
|
||||
.translation_context(BLT_I18NCONTEXT_ID_ID);
|
||||
b.add_input<decl::Float>(N_("Distance")).default_value(0.1f).subtype(PROP_DISTANCE);
|
||||
b.add_output<decl::Geometry>(CTX_N_(BLT_I18NCONTEXT_ID_ID, "Volume"))
|
||||
.translation_context(BLT_I18NCONTEXT_ID_ID);
|
||||
b.add_input<decl::Float>("Distance").default_value(0.1f).subtype(PROP_DISTANCE);
|
||||
b.add_output<decl::Geometry>("Volume").translation_context(BLT_I18NCONTEXT_ID_ID);
|
||||
}
|
||||
|
||||
static void search_node_add_ops(GatherAddNodeSearchParams ¶ms)
|
||||
|
||||
@@ -11,21 +11,21 @@ namespace blender::nodes::node_geo_points_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Int>(N_("Count"))
|
||||
b.add_input<decl::Int>("Count")
|
||||
.default_value(1)
|
||||
.description(N_("The number of points to create"))
|
||||
.description("The number of points to create")
|
||||
.min(0);
|
||||
b.add_input<decl::Vector>(N_("Position"))
|
||||
b.add_input<decl::Vector>("Position")
|
||||
.supports_field()
|
||||
.default_value(float3(0.0f))
|
||||
.description(N_("The positions of the new points"));
|
||||
b.add_input<decl::Float>(N_("Radius"))
|
||||
.description("The positions of the new points");
|
||||
b.add_input<decl::Float>("Radius")
|
||||
.min(0.0f)
|
||||
.default_value(0.1f)
|
||||
.supports_field()
|
||||
.subtype(PROP_DISTANCE)
|
||||
.description(N_("The radii of the new points"));
|
||||
b.add_output<decl::Geometry>(N_("Geometry"));
|
||||
.description("The radii of the new points");
|
||||
b.add_output<decl::Geometry>("Geometry");
|
||||
}
|
||||
|
||||
class PointsFieldContext : public FieldContext {
|
||||
|
||||
@@ -20,27 +20,26 @@ NODE_STORAGE_FUNCS(NodeGeometryPointsToVolume)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Points"));
|
||||
b.add_input<decl::Float>(N_("Voxel Size"))
|
||||
b.add_input<decl::Geometry>("Points");
|
||||
b.add_input<decl::Float>("Voxel Size")
|
||||
.default_value(0.3f)
|
||||
.min(0.01f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.make_available([](bNode &node) {
|
||||
node_storage(node).resolution_mode = GEO_NODE_POINTS_TO_VOLUME_RESOLUTION_MODE_SIZE;
|
||||
});
|
||||
b.add_input<decl::Float>(N_("Voxel Amount"))
|
||||
b.add_input<decl::Float>("Voxel Amount")
|
||||
.default_value(64.0f)
|
||||
.min(0.0f)
|
||||
.make_available([](bNode &node) {
|
||||
node_storage(node).resolution_mode = GEO_NODE_POINTS_TO_VOLUME_RESOLUTION_MODE_AMOUNT;
|
||||
});
|
||||
b.add_input<decl::Float>(N_("Radius"))
|
||||
b.add_input<decl::Float>("Radius")
|
||||
.default_value(0.5f)
|
||||
.min(0.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.field_on_all();
|
||||
b.add_output<decl::Geometry>(CTX_N_(BLT_I18NCONTEXT_ID_ID, "Volume"))
|
||||
.translation_context(BLT_I18NCONTEXT_ID_ID);
|
||||
b.add_output<decl::Geometry>("Volume").translation_context(BLT_I18NCONTEXT_ID_ID);
|
||||
}
|
||||
|
||||
static void search_node_add_ops(GatherAddNodeSearchParams ¶ms)
|
||||
|
||||
@@ -15,9 +15,9 @@ using blender::Array;
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Points")).supported_type(GEO_COMPONENT_TYPE_POINT_CLOUD);
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).field_on_all().hide_value();
|
||||
b.add_output<decl::Geometry>(N_("Mesh")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Points").supported_type(GEO_COMPONENT_TYPE_POINT_CLOUD);
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).field_on_all().hide_value();
|
||||
b.add_output<decl::Geometry>("Mesh").propagate_all();
|
||||
}
|
||||
|
||||
/* One improvement would be to move the attribute arrays directly to the mesh when possible. */
|
||||
|
||||
@@ -141,28 +141,27 @@ NODE_STORAGE_FUNCS(NodeGeometryPointsToVolume)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Points"));
|
||||
b.add_input<decl::Float>(N_("Density")).default_value(1.0f).min(0.0f);
|
||||
b.add_input<decl::Float>(N_("Voxel Size"))
|
||||
b.add_input<decl::Geometry>("Points");
|
||||
b.add_input<decl::Float>("Density").default_value(1.0f).min(0.0f);
|
||||
b.add_input<decl::Float>("Voxel Size")
|
||||
.default_value(0.3f)
|
||||
.min(0.01f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.make_available([](bNode &node) {
|
||||
node_storage(node).resolution_mode = GEO_NODE_POINTS_TO_VOLUME_RESOLUTION_MODE_SIZE;
|
||||
});
|
||||
b.add_input<decl::Float>(N_("Voxel Amount"))
|
||||
b.add_input<decl::Float>("Voxel Amount")
|
||||
.default_value(64.0f)
|
||||
.min(0.0f)
|
||||
.make_available([](bNode &node) {
|
||||
node_storage(node).resolution_mode = GEO_NODE_POINTS_TO_VOLUME_RESOLUTION_MODE_AMOUNT;
|
||||
});
|
||||
b.add_input<decl::Float>(N_("Radius"))
|
||||
b.add_input<decl::Float>("Radius")
|
||||
.default_value(0.5f)
|
||||
.min(0.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.field_on_all();
|
||||
b.add_output<decl::Geometry>(CTX_N_(BLT_I18NCONTEXT_ID_ID, "Volume"))
|
||||
.translation_context(BLT_I18NCONTEXT_ID_ID);
|
||||
b.add_output<decl::Geometry>("Volume").translation_context(BLT_I18NCONTEXT_ID_ID);
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -20,12 +20,11 @@ NODE_STORAGE_FUNCS(NodeGeometryProximity)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Target"))
|
||||
.only_realized_data()
|
||||
.supported_type({GEO_COMPONENT_TYPE_MESH, GEO_COMPONENT_TYPE_POINT_CLOUD});
|
||||
b.add_input<decl::Vector>(N_("Source Position")).implicit_field(implicit_field_inputs::position);
|
||||
b.add_output<decl::Vector>(N_("Position")).dependent_field().reference_pass_all();
|
||||
b.add_output<decl::Float>(N_("Distance")).dependent_field().reference_pass_all();
|
||||
b.add_input<decl::Geometry>("Target").only_realized_data().supported_type(
|
||||
{GEO_COMPONENT_TYPE_MESH, GEO_COMPONENT_TYPE_POINT_CLOUD});
|
||||
b.add_input<decl::Vector>("Source Position").implicit_field(implicit_field_inputs::position);
|
||||
b.add_output<decl::Vector>("Position").dependent_field().reference_pass_all();
|
||||
b.add_output<decl::Float>("Distance").dependent_field().reference_pass_all();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -23,36 +23,34 @@ NODE_STORAGE_FUNCS(NodeGeometryRaycast)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Target Geometry"))
|
||||
b.add_input<decl::Geometry>("Target Geometry")
|
||||
.only_realized_data()
|
||||
.supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
|
||||
b.add_input<decl::Vector>(N_("Attribute")).hide_value().field_on_all();
|
||||
b.add_input<decl::Float>(N_("Attribute"), "Attribute_001").hide_value().field_on_all();
|
||||
b.add_input<decl::Color>(N_("Attribute"), "Attribute_002").hide_value().field_on_all();
|
||||
b.add_input<decl::Bool>(N_("Attribute"), "Attribute_003").hide_value().field_on_all();
|
||||
b.add_input<decl::Int>(N_("Attribute"), "Attribute_004").hide_value().field_on_all();
|
||||
b.add_input<decl::Vector>("Attribute").hide_value().field_on_all();
|
||||
b.add_input<decl::Float>("Attribute", "Attribute_001").hide_value().field_on_all();
|
||||
b.add_input<decl::Color>("Attribute", "Attribute_002").hide_value().field_on_all();
|
||||
b.add_input<decl::Bool>("Attribute", "Attribute_003").hide_value().field_on_all();
|
||||
b.add_input<decl::Int>("Attribute", "Attribute_004").hide_value().field_on_all();
|
||||
|
||||
b.add_input<decl::Vector>(N_("Source Position")).implicit_field(implicit_field_inputs::position);
|
||||
b.add_input<decl::Vector>(N_("Ray Direction"))
|
||||
.default_value({0.0f, 0.0f, -1.0f})
|
||||
.supports_field();
|
||||
b.add_input<decl::Float>(N_("Ray Length"))
|
||||
b.add_input<decl::Vector>("Source Position").implicit_field(implicit_field_inputs::position);
|
||||
b.add_input<decl::Vector>("Ray Direction").default_value({0.0f, 0.0f, -1.0f}).supports_field();
|
||||
b.add_input<decl::Float>("Ray Length")
|
||||
.default_value(100.0f)
|
||||
.min(0.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.supports_field();
|
||||
|
||||
b.add_output<decl::Bool>(N_("Is Hit")).dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Vector>(N_("Hit Position")).dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Vector>(N_("Hit Normal")).dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Float>(N_("Hit Distance")).dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Bool>("Is Hit").dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Vector>("Hit Position").dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Vector>("Hit Normal").dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Float>("Hit Distance").dependent_field({6, 7, 8});
|
||||
|
||||
b.add_output<decl::Vector>(N_("Attribute")).dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Float>(N_("Attribute"), "Attribute_001").dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Color>(N_("Attribute"), "Attribute_002").dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Bool>(N_("Attribute"), "Attribute_003").dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Int>(N_("Attribute"), "Attribute_004").dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Vector>("Attribute").dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Float>("Attribute", "Attribute_001").dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Color>("Attribute", "Attribute_002").dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Bool>("Attribute", "Attribute_003").dependent_field({6, 7, 8});
|
||||
b.add_output<decl::Int>("Attribute", "Attribute_004").dependent_field({6, 7, 8});
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -11,8 +11,8 @@ namespace blender::nodes::node_geo_realize_instances_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Geometry"));
|
||||
b.add_output<decl::Geometry>(N_("Geometry")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Geometry");
|
||||
b.add_output<decl::Geometry>("Geometry").propagate_all();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -8,9 +8,9 @@ namespace blender::nodes::node_geo_remove_attribute_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Geometry"));
|
||||
b.add_input<decl::String>(N_("Name")).is_attribute_name();
|
||||
b.add_output<decl::Geometry>(N_("Geometry")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Geometry");
|
||||
b.add_input<decl::String>("Name").is_attribute_name();
|
||||
b.add_output<decl::Geometry>("Geometry").propagate_all();
|
||||
}
|
||||
|
||||
static void node_geo_exec(GeoNodeExecParams params)
|
||||
|
||||
@@ -12,12 +12,12 @@ namespace blender::nodes::node_geo_rotate_instances_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Instances")).only_instances();
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Vector>(N_("Rotation")).subtype(PROP_EULER).field_on_all();
|
||||
b.add_input<decl::Vector>(N_("Pivot Point")).subtype(PROP_TRANSLATION).field_on_all();
|
||||
b.add_input<decl::Bool>(N_("Local Space")).default_value(true).field_on_all();
|
||||
b.add_output<decl::Geometry>(N_("Instances")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Instances").only_instances();
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Vector>("Rotation").subtype(PROP_EULER).field_on_all();
|
||||
b.add_input<decl::Vector>("Pivot Point").subtype(PROP_TRANSLATION).field_on_all();
|
||||
b.add_input<decl::Bool>("Local Space").default_value(true).field_on_all();
|
||||
b.add_output<decl::Geometry>("Instances").propagate_all();
|
||||
}
|
||||
|
||||
static void rotate_instances(GeoNodeExecParams ¶ms, bke::Instances &instances)
|
||||
|
||||
@@ -54,26 +54,25 @@ NODE_STORAGE_FUNCS(NodeGeometrySampleIndex);
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Geometry"))
|
||||
b.add_input<decl::Geometry>("Geometry")
|
||||
.supported_type({GEO_COMPONENT_TYPE_MESH,
|
||||
GEO_COMPONENT_TYPE_POINT_CLOUD,
|
||||
GEO_COMPONENT_TYPE_CURVE,
|
||||
GEO_COMPONENT_TYPE_INSTANCES});
|
||||
|
||||
b.add_input<decl::Float>(N_("Value"), "Value_Float").hide_value().field_on_all();
|
||||
b.add_input<decl::Int>(N_("Value"), "Value_Int").hide_value().field_on_all();
|
||||
b.add_input<decl::Vector>(N_("Value"), "Value_Vector").hide_value().field_on_all();
|
||||
b.add_input<decl::Color>(N_("Value"), "Value_Color").hide_value().field_on_all();
|
||||
b.add_input<decl::Bool>(N_("Value"), "Value_Bool").hide_value().field_on_all();
|
||||
b.add_input<decl::Int>(N_("Index"))
|
||||
.supports_field()
|
||||
.description(N_("Which element to retrieve a value from on the geometry"));
|
||||
b.add_input<decl::Float>("Value", "Value_Float").hide_value().field_on_all();
|
||||
b.add_input<decl::Int>("Value", "Value_Int").hide_value().field_on_all();
|
||||
b.add_input<decl::Vector>("Value", "Value_Vector").hide_value().field_on_all();
|
||||
b.add_input<decl::Color>("Value", "Value_Color").hide_value().field_on_all();
|
||||
b.add_input<decl::Bool>("Value", "Value_Bool").hide_value().field_on_all();
|
||||
b.add_input<decl::Int>("Index").supports_field().description(
|
||||
"Which element to retrieve a value from on the geometry");
|
||||
|
||||
b.add_output<decl::Float>(N_("Value"), "Value_Float").dependent_field({6});
|
||||
b.add_output<decl::Int>(N_("Value"), "Value_Int").dependent_field({6});
|
||||
b.add_output<decl::Vector>(N_("Value"), "Value_Vector").dependent_field({6});
|
||||
b.add_output<decl::Color>(N_("Value"), "Value_Color").dependent_field({6});
|
||||
b.add_output<decl::Bool>(N_("Value"), "Value_Bool").dependent_field({6});
|
||||
b.add_output<decl::Float>("Value", "Value_Float").dependent_field({6});
|
||||
b.add_output<decl::Int>("Value", "Value_Int").dependent_field({6});
|
||||
b.add_output<decl::Vector>("Value", "Value_Vector").dependent_field({6});
|
||||
b.add_output<decl::Color>("Value", "Value_Color").dependent_field({6});
|
||||
b.add_output<decl::Bool>("Value", "Value_Bool").dependent_field({6});
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -50,10 +50,10 @@ namespace blender::nodes::node_geo_sample_nearest_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Geometry"))
|
||||
b.add_input<decl::Geometry>("Geometry")
|
||||
.supported_type({GEO_COMPONENT_TYPE_MESH, GEO_COMPONENT_TYPE_POINT_CLOUD});
|
||||
b.add_input<decl::Vector>(N_("Sample Position")).implicit_field(implicit_field_inputs::position);
|
||||
b.add_output<decl::Int>(N_("Index")).dependent_field({1});
|
||||
b.add_input<decl::Vector>("Sample Position").implicit_field(implicit_field_inputs::position);
|
||||
b.add_output<decl::Int>("Index").dependent_field({1});
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -21,21 +21,21 @@ using namespace blender::bke::mesh_surface_sample;
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Mesh")).supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Geometry>("Mesh").supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
|
||||
b.add_input<decl::Float>(N_("Value"), "Value_Float").hide_value().field_on_all();
|
||||
b.add_input<decl::Int>(N_("Value"), "Value_Int").hide_value().field_on_all();
|
||||
b.add_input<decl::Vector>(N_("Value"), "Value_Vector").hide_value().field_on_all();
|
||||
b.add_input<decl::Color>(N_("Value"), "Value_Color").hide_value().field_on_all();
|
||||
b.add_input<decl::Bool>(N_("Value"), "Value_Bool").hide_value().field_on_all();
|
||||
b.add_input<decl::Float>("Value", "Value_Float").hide_value().field_on_all();
|
||||
b.add_input<decl::Int>("Value", "Value_Int").hide_value().field_on_all();
|
||||
b.add_input<decl::Vector>("Value", "Value_Vector").hide_value().field_on_all();
|
||||
b.add_input<decl::Color>("Value", "Value_Color").hide_value().field_on_all();
|
||||
b.add_input<decl::Bool>("Value", "Value_Bool").hide_value().field_on_all();
|
||||
|
||||
b.add_input<decl::Vector>(N_("Sample Position")).implicit_field(implicit_field_inputs::position);
|
||||
b.add_input<decl::Vector>("Sample Position").implicit_field(implicit_field_inputs::position);
|
||||
|
||||
b.add_output<decl::Float>(N_("Value"), "Value_Float").dependent_field({6});
|
||||
b.add_output<decl::Int>(N_("Value"), "Value_Int").dependent_field({6});
|
||||
b.add_output<decl::Vector>(N_("Value"), "Value_Vector").dependent_field({6});
|
||||
b.add_output<decl::Color>(N_("Value"), "Value_Color").dependent_field({6});
|
||||
b.add_output<decl::Bool>(N_("Value"), "Value_Bool").dependent_field({6});
|
||||
b.add_output<decl::Float>("Value", "Value_Float").dependent_field({6});
|
||||
b.add_output<decl::Int>("Value", "Value_Int").dependent_field({6});
|
||||
b.add_output<decl::Vector>("Value", "Value_Vector").dependent_field({6});
|
||||
b.add_output<decl::Color>("Value", "Value_Color").dependent_field({6});
|
||||
b.add_output<decl::Bool>("Value", "Value_Bool").dependent_field({6});
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -20,31 +20,31 @@ using geometry::ReverseUVSampler;
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Mesh")).supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Geometry>("Mesh").supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
|
||||
b.add_input<decl::Float>(N_("Value"), "Value_Float").hide_value().field_on_all();
|
||||
b.add_input<decl::Int>(N_("Value"), "Value_Int").hide_value().field_on_all();
|
||||
b.add_input<decl::Vector>(N_("Value"), "Value_Vector").hide_value().field_on_all();
|
||||
b.add_input<decl::Color>(N_("Value"), "Value_Color").hide_value().field_on_all();
|
||||
b.add_input<decl::Bool>(N_("Value"), "Value_Bool").hide_value().field_on_all();
|
||||
b.add_input<decl::Float>("Value", "Value_Float").hide_value().field_on_all();
|
||||
b.add_input<decl::Int>("Value", "Value_Int").hide_value().field_on_all();
|
||||
b.add_input<decl::Vector>("Value", "Value_Vector").hide_value().field_on_all();
|
||||
b.add_input<decl::Color>("Value", "Value_Color").hide_value().field_on_all();
|
||||
b.add_input<decl::Bool>("Value", "Value_Bool").hide_value().field_on_all();
|
||||
|
||||
b.add_input<decl::Vector>(N_("Source UV Map"))
|
||||
b.add_input<decl::Vector>("Source UV Map")
|
||||
.hide_value()
|
||||
.field_on_all()
|
||||
.description(N_("The mesh UV map to sample. Should not have overlapping faces"));
|
||||
b.add_input<decl::Vector>(N_("Sample UV"))
|
||||
.description("The mesh UV map to sample. Should not have overlapping faces");
|
||||
b.add_input<decl::Vector>("Sample UV")
|
||||
.supports_field()
|
||||
.description(N_("The coordinates to sample within the UV map"));
|
||||
.description("The coordinates to sample within the UV map");
|
||||
|
||||
b.add_output<decl::Float>(N_("Value"), "Value_Float").dependent_field({7});
|
||||
b.add_output<decl::Int>(N_("Value"), "Value_Int").dependent_field({7});
|
||||
b.add_output<decl::Vector>(N_("Value"), "Value_Vector").dependent_field({7});
|
||||
b.add_output<decl::Color>(N_("Value"), "Value_Color").dependent_field({7});
|
||||
b.add_output<decl::Bool>(N_("Value"), "Value_Bool").dependent_field({7});
|
||||
b.add_output<decl::Float>("Value", "Value_Float").dependent_field({7});
|
||||
b.add_output<decl::Int>("Value", "Value_Int").dependent_field({7});
|
||||
b.add_output<decl::Vector>("Value", "Value_Vector").dependent_field({7});
|
||||
b.add_output<decl::Color>("Value", "Value_Color").dependent_field({7});
|
||||
b.add_output<decl::Bool>("Value", "Value_Bool").dependent_field({7});
|
||||
|
||||
b.add_output<decl::Bool>(N_("Is Valid"))
|
||||
b.add_output<decl::Bool>("Is Valid")
|
||||
.dependent_field({7})
|
||||
.description(N_("Whether the node could find a single face to sample at the UV coordinate"));
|
||||
.description("Whether the node could find a single face to sample at the UV coordinate");
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -21,20 +21,21 @@ namespace blender::nodes::node_geo_scale_elements_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Geometry")).supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Float>(N_("Scale"), "Scale").default_value(1.0f).min(0.0f).field_on_all();
|
||||
b.add_input<decl::Vector>(N_("Center"))
|
||||
b.add_input<decl::Geometry>("Geometry").supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Float>("Scale", "Scale").default_value(1.0f).min(0.0f).field_on_all();
|
||||
b.add_input<decl::Vector>("Center")
|
||||
.subtype(PROP_TRANSLATION)
|
||||
.implicit_field_on_all(implicit_field_inputs::position)
|
||||
.description(N_("Origin of the scaling for each element. If multiple elements are "
|
||||
"connected, their center is averaged"));
|
||||
b.add_input<decl::Vector>(N_("Axis"))
|
||||
.description(
|
||||
"Origin of the scaling for each element. If multiple elements are connected, their "
|
||||
"center is averaged");
|
||||
b.add_input<decl::Vector>("Axis")
|
||||
.default_value({1.0f, 0.0f, 0.0f})
|
||||
.field_on_all()
|
||||
.description(N_("Direction in which to scale the element"))
|
||||
.description("Direction in which to scale the element")
|
||||
.make_available([](bNode &node) { node.custom2 = GEO_NODE_SCALE_ELEMENTS_SINGLE_AXIS; });
|
||||
b.add_output<decl::Geometry>(N_("Geometry")).propagate_all();
|
||||
b.add_output<decl::Geometry>("Geometry").propagate_all();
|
||||
};
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -13,12 +13,12 @@ namespace blender::nodes::node_geo_scale_instances_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Instances")).only_instances();
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Vector>(N_("Scale")).subtype(PROP_XYZ).default_value({1, 1, 1}).field_on_all();
|
||||
b.add_input<decl::Vector>(N_("Center")).subtype(PROP_TRANSLATION).field_on_all();
|
||||
b.add_input<decl::Bool>(N_("Local Space")).default_value(true).field_on_all();
|
||||
b.add_output<decl::Geometry>(N_("Instances")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Instances").only_instances();
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Vector>("Scale").subtype(PROP_XYZ).default_value({1, 1, 1}).field_on_all();
|
||||
b.add_input<decl::Vector>("Center").subtype(PROP_TRANSLATION).field_on_all();
|
||||
b.add_input<decl::Bool>("Local Space").default_value(true).field_on_all();
|
||||
b.add_output<decl::Geometry>("Instances").propagate_all();
|
||||
}
|
||||
|
||||
static void scale_instances(GeoNodeExecParams ¶ms, bke::Instances &instances)
|
||||
|
||||
@@ -18,15 +18,14 @@ namespace blender::nodes::node_geo_sdf_volume_sphere_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Radius")).default_value(1.0f).min(0.0f).subtype(PROP_DISTANCE);
|
||||
b.add_input<decl::Float>(N_("Voxel Size")).default_value(0.2f).min(0.01f).subtype(PROP_DISTANCE);
|
||||
b.add_input<decl::Float>(N_("Half-Band Width"))
|
||||
.description(N_("Half the width of the narrow band in voxel units"))
|
||||
b.add_input<decl::Float>("Radius").default_value(1.0f).min(0.0f).subtype(PROP_DISTANCE);
|
||||
b.add_input<decl::Float>("Voxel Size").default_value(0.2f).min(0.01f).subtype(PROP_DISTANCE);
|
||||
b.add_input<decl::Float>("Half-Band Width")
|
||||
.description("Half the width of the narrow band in voxel units")
|
||||
.default_value(3.0f)
|
||||
.min(1.01f)
|
||||
.max(10.0f);
|
||||
b.add_output<decl::Geometry>(CTX_N_(BLT_I18NCONTEXT_ID_ID, "Volume"))
|
||||
.translation_context(BLT_I18NCONTEXT_ID_ID);
|
||||
b.add_output<decl::Geometry>("Volume").translation_context(BLT_I18NCONTEXT_ID_ID);
|
||||
}
|
||||
|
||||
static void search_node_add_ops(GatherAddNodeSearchParams ¶ms)
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace blender::nodes::node_geo_self_object_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Object>(N_("Self Object"));
|
||||
b.add_output<decl::Object>("Self Object");
|
||||
}
|
||||
|
||||
static void node_geo_exec(GeoNodeExecParams params)
|
||||
|
||||
@@ -6,14 +6,14 @@ namespace blender::nodes::node_geo_separate_components_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Geometry"));
|
||||
b.add_output<decl::Geometry>(N_("Mesh")).propagate_all();
|
||||
b.add_output<decl::Geometry>(N_("Curve")).propagate_all();
|
||||
b.add_output<decl::Geometry>(N_("Point Cloud")).propagate_all();
|
||||
b.add_output<decl::Geometry>(CTX_N_(BLT_I18NCONTEXT_ID_ID, "Volume"))
|
||||
b.add_input<decl::Geometry>("Geometry");
|
||||
b.add_output<decl::Geometry>("Mesh").propagate_all();
|
||||
b.add_output<decl::Geometry>("Curve").propagate_all();
|
||||
b.add_output<decl::Geometry>("Point Cloud").propagate_all();
|
||||
b.add_output<decl::Geometry>("Volume")
|
||||
.translation_context(BLT_I18NCONTEXT_ID_ID)
|
||||
.propagate_all();
|
||||
b.add_output<decl::Geometry>(N_("Instances")).propagate_all();
|
||||
b.add_output<decl::Geometry>("Instances").propagate_all();
|
||||
}
|
||||
|
||||
static void node_geo_exec(GeoNodeExecParams params)
|
||||
|
||||
@@ -11,18 +11,18 @@ NODE_STORAGE_FUNCS(NodeGeometrySeparateGeometry)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Geometry"));
|
||||
b.add_input<decl::Bool>(N_("Selection"))
|
||||
b.add_input<decl::Geometry>("Geometry");
|
||||
b.add_input<decl::Bool>("Selection")
|
||||
.default_value(true)
|
||||
.hide_value()
|
||||
.field_on_all()
|
||||
.description(N_("The parts of the geometry that go into the first output"));
|
||||
b.add_output<decl::Geometry>(N_("Selection"))
|
||||
.description("The parts of the geometry that go into the first output");
|
||||
b.add_output<decl::Geometry>("Selection")
|
||||
.propagate_all()
|
||||
.description(N_("The parts of the geometry in the selection"));
|
||||
b.add_output<decl::Geometry>(N_("Inverted"))
|
||||
.description("The parts of the geometry in the selection");
|
||||
b.add_output<decl::Geometry>("Inverted")
|
||||
.propagate_all()
|
||||
.description(N_("The parts of the geometry not in the selection"));
|
||||
.description("The parts of the geometry not in the selection");
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -17,17 +17,17 @@ NODE_STORAGE_FUNCS(NodeGeometrySetCurveHandlePositions)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Curve")).supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Vector>(N_("Position"))
|
||||
b.add_input<decl::Geometry>("Curve").supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Vector>("Position")
|
||||
.implicit_field_on_all([](const bNode &node, void *r_value) {
|
||||
const StringRef side = node_storage(node).mode == GEO_NODE_CURVE_HANDLE_LEFT ?
|
||||
"handle_left" :
|
||||
"handle_right";
|
||||
new (r_value) ValueOrField<float3>(bke::AttributeFieldInput::Create<float3>(side));
|
||||
});
|
||||
b.add_input<decl::Vector>(N_("Offset")).default_value(float3(0.0f, 0.0f, 0.0f)).field_on_all();
|
||||
b.add_output<decl::Geometry>(N_("Curve")).propagate_all();
|
||||
b.add_input<decl::Vector>("Offset").default_value(float3(0.0f, 0.0f, 0.0f)).field_on_all();
|
||||
b.add_output<decl::Geometry>("Curve").propagate_all();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -11,9 +11,9 @@ namespace blender::nodes::node_geo_set_curve_normal_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Curve")).supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().field_on_all();
|
||||
b.add_output<decl::Geometry>(N_("Curve")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Curve").supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).hide_value().field_on_all();
|
||||
b.add_output<decl::Geometry>("Curve").propagate_all();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -8,14 +8,11 @@ namespace blender::nodes::node_geo_set_curve_radius_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Curve")).supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Float>(N_("Radius"))
|
||||
.min(0.0f)
|
||||
.default_value(0.005f)
|
||||
.field_on_all()
|
||||
.subtype(PROP_DISTANCE);
|
||||
b.add_output<decl::Geometry>(N_("Curve")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Curve").supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Float>("Radius").min(0.0f).default_value(0.005f).field_on_all().subtype(
|
||||
PROP_DISTANCE);
|
||||
b.add_output<decl::Geometry>("Curve").propagate_all();
|
||||
}
|
||||
|
||||
static void set_radius(bke::CurvesGeometry &curves,
|
||||
|
||||
@@ -8,10 +8,10 @@ namespace blender::nodes::node_geo_set_curve_tilt_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Curve")).supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Float>(N_("Tilt")).subtype(PROP_ANGLE).field_on_all();
|
||||
b.add_output<decl::Geometry>(N_("Curve")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Curve").supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Float>("Tilt").subtype(PROP_ANGLE).field_on_all();
|
||||
b.add_output<decl::Geometry>("Curve").propagate_all();
|
||||
}
|
||||
|
||||
static void set_tilt(bke::CurvesGeometry &curves,
|
||||
|
||||
@@ -6,10 +6,10 @@ namespace blender::nodes::node_geo_set_id_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Geometry"));
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Int>(N_("ID")).implicit_field_on_all(implicit_field_inputs::index);
|
||||
b.add_output<decl::Geometry>(N_("Geometry")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Geometry");
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Int>("ID").implicit_field_on_all(implicit_field_inputs::index);
|
||||
b.add_output<decl::Geometry>("Geometry").propagate_all();
|
||||
}
|
||||
|
||||
static void set_id_in_component(GeometryComponent &component,
|
||||
|
||||
@@ -18,14 +18,14 @@ namespace blender::nodes::node_geo_set_material_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Geometry"))
|
||||
b.add_input<decl::Geometry>("Geometry")
|
||||
.supported_type({GEO_COMPONENT_TYPE_MESH,
|
||||
GEO_COMPONENT_TYPE_VOLUME,
|
||||
GEO_COMPONENT_TYPE_POINT_CLOUD,
|
||||
GEO_COMPONENT_TYPE_CURVE});
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Material>(N_("Material")).hide_label();
|
||||
b.add_output<decl::Geometry>(N_("Geometry")).propagate_all();
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Material>("Material").hide_label();
|
||||
b.add_output<decl::Geometry>("Geometry").propagate_all();
|
||||
}
|
||||
|
||||
static void assign_material_to_faces(Mesh &mesh, const IndexMask selection, Material *material)
|
||||
|
||||
@@ -6,10 +6,10 @@ namespace blender::nodes::node_geo_set_material_index_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Geometry")).supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Int>(N_("Material Index")).field_on_all().min(0);
|
||||
b.add_output<decl::Geometry>(N_("Geometry")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Geometry").supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Int>("Material Index").field_on_all().min(0);
|
||||
b.add_output<decl::Geometry>("Geometry").propagate_all();
|
||||
}
|
||||
|
||||
static void set_material_index_in_component(GeometryComponent &component,
|
||||
|
||||
@@ -8,14 +8,11 @@ namespace blender::nodes::node_geo_set_point_radius_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Points")).supported_type(GEO_COMPONENT_TYPE_POINT_CLOUD);
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Float>(N_("Radius"))
|
||||
.default_value(0.05f)
|
||||
.min(0.0f)
|
||||
.field_on_all()
|
||||
.subtype(PROP_DISTANCE);
|
||||
b.add_output<decl::Geometry>(N_("Points")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Points").supported_type(GEO_COMPONENT_TYPE_POINT_CLOUD);
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Float>("Radius").default_value(0.05f).min(0.0f).field_on_all().subtype(
|
||||
PROP_DISTANCE);
|
||||
b.add_output<decl::Geometry>("Points").propagate_all();
|
||||
}
|
||||
|
||||
static void set_radius_in_component(PointCloud &pointcloud,
|
||||
|
||||
@@ -16,11 +16,11 @@ namespace blender::nodes::node_geo_set_position_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Geometry"));
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Vector>(N_("Position")).implicit_field_on_all(implicit_field_inputs::position);
|
||||
b.add_input<decl::Vector>(N_("Offset")).field_on_all().subtype(PROP_TRANSLATION);
|
||||
b.add_output<decl::Geometry>(N_("Geometry")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Geometry");
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Vector>("Position").implicit_field_on_all(implicit_field_inputs::position);
|
||||
b.add_input<decl::Vector>("Offset").field_on_all().subtype(PROP_TRANSLATION);
|
||||
b.add_output<decl::Geometry>("Geometry").propagate_all();
|
||||
}
|
||||
|
||||
static void set_computed_position_and_offset(GeometryComponent &component,
|
||||
|
||||
@@ -8,10 +8,10 @@ namespace blender::nodes::node_geo_set_shade_smooth_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Geometry")).supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Bool>(N_("Shade Smooth")).field_on_all().default_value(true);
|
||||
b.add_output<decl::Geometry>(N_("Geometry")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Geometry").supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Bool>("Shade Smooth").field_on_all().default_value(true);
|
||||
b.add_output<decl::Geometry>("Geometry").propagate_all();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,10 +8,10 @@ namespace blender::nodes::node_geo_set_spline_cyclic_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Geometry")).supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Bool>(N_("Cyclic")).field_on_all();
|
||||
b.add_output<decl::Geometry>(N_("Geometry")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Geometry").supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Bool>("Cyclic").field_on_all();
|
||||
b.add_output<decl::Geometry>("Geometry").propagate_all();
|
||||
}
|
||||
|
||||
static void set_cyclic(bke::CurvesGeometry &curves,
|
||||
|
||||
@@ -8,10 +8,10 @@ namespace blender::nodes::node_geo_set_spline_resolution_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Geometry")).supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Int>(N_("Resolution")).min(1).default_value(12).field_on_all();
|
||||
b.add_output<decl::Geometry>(N_("Geometry")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Geometry").supported_type(GEO_COMPONENT_TYPE_CURVE);
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Int>("Resolution").min(1).default_value(12).field_on_all();
|
||||
b.add_output<decl::Geometry>("Geometry").propagate_all();
|
||||
}
|
||||
|
||||
static void set_resolution(bke::CurvesGeometry &curves,
|
||||
|
||||
@@ -19,16 +19,16 @@ NODE_STORAGE_FUNCS(NodeGeometryStoreNamedAttribute)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Geometry"));
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::String>(N_("Name")).is_attribute_name();
|
||||
b.add_input<decl::Vector>(N_("Value"), "Value_Vector").field_on_all();
|
||||
b.add_input<decl::Float>(N_("Value"), "Value_Float").field_on_all();
|
||||
b.add_input<decl::Color>(N_("Value"), "Value_Color").field_on_all();
|
||||
b.add_input<decl::Bool>(N_("Value"), "Value_Bool").field_on_all();
|
||||
b.add_input<decl::Int>(N_("Value"), "Value_Int").field_on_all();
|
||||
b.add_input<decl::Geometry>("Geometry");
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::String>("Name").is_attribute_name();
|
||||
b.add_input<decl::Vector>("Value", "Value_Vector").field_on_all();
|
||||
b.add_input<decl::Float>("Value", "Value_Float").field_on_all();
|
||||
b.add_input<decl::Color>("Value", "Value_Color").field_on_all();
|
||||
b.add_input<decl::Bool>("Value", "Value_Bool").field_on_all();
|
||||
b.add_input<decl::Int>("Value", "Value_Int").field_on_all();
|
||||
|
||||
b.add_output<decl::Geometry>(N_("Geometry")).propagate_all();
|
||||
b.add_output<decl::Geometry>("Geometry").propagate_all();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -6,9 +6,9 @@ namespace blender::nodes::node_geo_string_join_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::String>(N_("Delimiter"));
|
||||
b.add_input<decl::String>(N_("Strings")).multi_input().hide_value();
|
||||
b.add_output<decl::String>(N_("String"));
|
||||
b.add_input<decl::String>("Delimiter");
|
||||
b.add_input<decl::String>("Strings").multi_input().hide_value();
|
||||
b.add_output<decl::String>("String");
|
||||
}
|
||||
|
||||
static void node_geo_exec(GeoNodeExecParams params)
|
||||
|
||||
@@ -26,28 +26,25 @@ NODE_STORAGE_FUNCS(NodeGeometryStringToCurves)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::String>(N_("String"));
|
||||
b.add_input<decl::Float>(N_("Size")).default_value(1.0f).min(0.0f).subtype(PROP_DISTANCE);
|
||||
b.add_input<decl::Float>(N_("Character Spacing")).default_value(1.0f).min(0.0f);
|
||||
b.add_input<decl::Float>(N_("Word Spacing")).default_value(1.0f).min(0.0f);
|
||||
b.add_input<decl::Float>(N_("Line Spacing")).default_value(1.0f).min(0.0f);
|
||||
b.add_input<decl::Float>(N_("Text Box Width"))
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.subtype(PROP_DISTANCE);
|
||||
b.add_input<decl::Float>(N_("Text Box Height"))
|
||||
b.add_input<decl::String>("String");
|
||||
b.add_input<decl::Float>("Size").default_value(1.0f).min(0.0f).subtype(PROP_DISTANCE);
|
||||
b.add_input<decl::Float>("Character Spacing").default_value(1.0f).min(0.0f);
|
||||
b.add_input<decl::Float>("Word Spacing").default_value(1.0f).min(0.0f);
|
||||
b.add_input<decl::Float>("Line Spacing").default_value(1.0f).min(0.0f);
|
||||
b.add_input<decl::Float>("Text Box Width").default_value(0.0f).min(0.0f).subtype(PROP_DISTANCE);
|
||||
b.add_input<decl::Float>("Text Box Height")
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.make_available([](bNode &node) {
|
||||
node_storage(node).overflow = GEO_NODE_STRING_TO_CURVES_MODE_SCALE_TO_FIT;
|
||||
});
|
||||
b.add_output<decl::Geometry>(N_("Curve Instances"));
|
||||
b.add_output<decl::String>(N_("Remainder")).make_available([](bNode &node) {
|
||||
b.add_output<decl::Geometry>("Curve Instances");
|
||||
b.add_output<decl::String>("Remainder").make_available([](bNode &node) {
|
||||
node_storage(node).overflow = GEO_NODE_STRING_TO_CURVES_MODE_TRUNCATE;
|
||||
});
|
||||
b.add_output<decl::Int>(N_("Line")).field_on_all();
|
||||
b.add_output<decl::Vector>(N_("Pivot Point")).field_on_all();
|
||||
b.add_output<decl::Int>("Line").field_on_all();
|
||||
b.add_output<decl::Vector>("Pivot Point").field_on_all();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, struct bContext *C, PointerRNA *ptr)
|
||||
|
||||
@@ -22,21 +22,21 @@ NODE_STORAGE_FUNCS(NodeGeometrySubdivisionSurface)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Mesh")).supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Int>(N_("Level")).default_value(1).min(0).max(6);
|
||||
b.add_input<decl::Float>(N_("Edge Crease"))
|
||||
b.add_input<decl::Geometry>("Mesh").supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Int>("Level").default_value(1).min(0).max(6);
|
||||
b.add_input<decl::Float>("Edge Crease")
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.field_on_all()
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Vertex Crease"))
|
||||
b.add_input<decl::Float>("Vertex Crease")
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.field_on_all()
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_output<decl::Geometry>(N_("Mesh")).propagate_all();
|
||||
b.add_output<decl::Geometry>("Mesh").propagate_all();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -15,57 +15,52 @@ NODE_STORAGE_FUNCS(NodeSwitch)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Bool>(N_("Switch")).default_value(false).supports_field();
|
||||
b.add_input<decl::Bool>(N_("Switch"), "Switch_001").default_value(false);
|
||||
b.add_input<decl::Bool>("Switch").default_value(false).supports_field();
|
||||
b.add_input<decl::Bool>("Switch", "Switch_001").default_value(false);
|
||||
|
||||
b.add_input<decl::Float>(N_("False")).supports_field();
|
||||
b.add_input<decl::Float>(N_("True")).supports_field();
|
||||
b.add_input<decl::Int>(N_("False"), "False_001").min(-100000).max(100000).supports_field();
|
||||
b.add_input<decl::Int>(N_("True"), "True_001").min(-100000).max(100000).supports_field();
|
||||
b.add_input<decl::Bool>(N_("False"), "False_002")
|
||||
.default_value(false)
|
||||
.hide_value()
|
||||
.supports_field();
|
||||
b.add_input<decl::Bool>(N_("True"), "True_002")
|
||||
.default_value(true)
|
||||
.hide_value()
|
||||
.supports_field();
|
||||
b.add_input<decl::Vector>(N_("False"), "False_003").supports_field();
|
||||
b.add_input<decl::Vector>(N_("True"), "True_003").supports_field();
|
||||
b.add_input<decl::Color>(N_("False"), "False_004")
|
||||
b.add_input<decl::Float>("False").supports_field();
|
||||
b.add_input<decl::Float>("True").supports_field();
|
||||
b.add_input<decl::Int>("False", "False_001").min(-100000).max(100000).supports_field();
|
||||
b.add_input<decl::Int>("True", "True_001").min(-100000).max(100000).supports_field();
|
||||
b.add_input<decl::Bool>("False", "False_002").default_value(false).hide_value().supports_field();
|
||||
b.add_input<decl::Bool>("True", "True_002").default_value(true).hide_value().supports_field();
|
||||
b.add_input<decl::Vector>("False", "False_003").supports_field();
|
||||
b.add_input<decl::Vector>("True", "True_003").supports_field();
|
||||
|
||||
b.add_input<decl::Color>("False", "False_004")
|
||||
.default_value({0.8f, 0.8f, 0.8f, 1.0f})
|
||||
.supports_field();
|
||||
b.add_input<decl::Color>(N_("True"), "True_004")
|
||||
b.add_input<decl::Color>("True", "True_004")
|
||||
.default_value({0.8f, 0.8f, 0.8f, 1.0f})
|
||||
.supports_field();
|
||||
b.add_input<decl::String>(N_("False"), "False_005").supports_field();
|
||||
b.add_input<decl::String>(N_("True"), "True_005").supports_field();
|
||||
b.add_input<decl::String>("False", "False_005").supports_field();
|
||||
b.add_input<decl::String>("True", "True_005").supports_field();
|
||||
|
||||
b.add_input<decl::Geometry>(N_("False"), "False_006");
|
||||
b.add_input<decl::Geometry>(N_("True"), "True_006");
|
||||
b.add_input<decl::Object>(N_("False"), "False_007");
|
||||
b.add_input<decl::Object>(N_("True"), "True_007");
|
||||
b.add_input<decl::Collection>(N_("False"), "False_008");
|
||||
b.add_input<decl::Collection>(N_("True"), "True_008");
|
||||
b.add_input<decl::Texture>(N_("False"), "False_009");
|
||||
b.add_input<decl::Texture>(N_("True"), "True_009");
|
||||
b.add_input<decl::Material>(N_("False"), "False_010");
|
||||
b.add_input<decl::Material>(N_("True"), "True_010");
|
||||
b.add_input<decl::Image>(N_("False"), "False_011");
|
||||
b.add_input<decl::Image>(N_("True"), "True_011");
|
||||
b.add_input<decl::Geometry>("False", "False_006");
|
||||
b.add_input<decl::Geometry>("True", "True_006");
|
||||
b.add_input<decl::Object>("False", "False_007");
|
||||
b.add_input<decl::Object>("True", "True_007");
|
||||
b.add_input<decl::Collection>("False", "False_008");
|
||||
b.add_input<decl::Collection>("True", "True_008");
|
||||
b.add_input<decl::Texture>("False", "False_009");
|
||||
b.add_input<decl::Texture>("True", "True_009");
|
||||
b.add_input<decl::Material>("False", "False_010");
|
||||
b.add_input<decl::Material>("True", "True_010");
|
||||
b.add_input<decl::Image>("False", "False_011");
|
||||
b.add_input<decl::Image>("True", "True_011");
|
||||
|
||||
b.add_output<decl::Float>(N_("Output")).dependent_field().reference_pass_all();
|
||||
b.add_output<decl::Int>(N_("Output"), "Output_001").dependent_field().reference_pass_all();
|
||||
b.add_output<decl::Bool>(N_("Output"), "Output_002").dependent_field().reference_pass_all();
|
||||
b.add_output<decl::Vector>(N_("Output"), "Output_003").dependent_field().reference_pass_all();
|
||||
b.add_output<decl::Color>(N_("Output"), "Output_004").dependent_field().reference_pass_all();
|
||||
b.add_output<decl::String>(N_("Output"), "Output_005").dependent_field().reference_pass_all();
|
||||
b.add_output<decl::Geometry>(N_("Output"), "Output_006").propagate_all();
|
||||
b.add_output<decl::Object>(N_("Output"), "Output_007");
|
||||
b.add_output<decl::Collection>(N_("Output"), "Output_008");
|
||||
b.add_output<decl::Texture>(N_("Output"), "Output_009");
|
||||
b.add_output<decl::Material>(N_("Output"), "Output_010");
|
||||
b.add_output<decl::Image>(N_("Output"), "Output_011");
|
||||
b.add_output<decl::Float>("Output").dependent_field().reference_pass_all();
|
||||
b.add_output<decl::Int>("Output", "Output_001").dependent_field().reference_pass_all();
|
||||
b.add_output<decl::Bool>("Output", "Output_002").dependent_field().reference_pass_all();
|
||||
b.add_output<decl::Vector>("Output", "Output_003").dependent_field().reference_pass_all();
|
||||
b.add_output<decl::Color>("Output", "Output_004").dependent_field().reference_pass_all();
|
||||
b.add_output<decl::String>("Output", "Output_005").dependent_field().reference_pass_all();
|
||||
b.add_output<decl::Geometry>("Output", "Output_006").propagate_all();
|
||||
b.add_output<decl::Object>("Output", "Output_007");
|
||||
b.add_output<decl::Collection>("Output", "Output_008");
|
||||
b.add_output<decl::Texture>("Output", "Output_009");
|
||||
b.add_output<decl::Material>("Output", "Output_010");
|
||||
b.add_output<decl::Image>("Output", "Output_011");
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -263,11 +263,11 @@ namespace blender::nodes::node_geo_transform_geometry_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Geometry"));
|
||||
b.add_input<decl::Vector>(N_("Translation")).subtype(PROP_TRANSLATION);
|
||||
b.add_input<decl::Vector>(N_("Rotation")).subtype(PROP_EULER);
|
||||
b.add_input<decl::Vector>(N_("Scale")).default_value({1, 1, 1}).subtype(PROP_XYZ);
|
||||
b.add_output<decl::Geometry>(N_("Geometry")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Geometry");
|
||||
b.add_input<decl::Vector>("Translation").subtype(PROP_TRANSLATION);
|
||||
b.add_input<decl::Vector>("Rotation").subtype(PROP_EULER);
|
||||
b.add_input<decl::Vector>("Scale").default_value({1, 1, 1}).subtype(PROP_XYZ);
|
||||
b.add_output<decl::Geometry>("Geometry").propagate_all();
|
||||
}
|
||||
|
||||
static void node_geo_exec(GeoNodeExecParams params)
|
||||
|
||||
@@ -12,11 +12,11 @@ namespace blender::nodes::node_geo_translate_instances_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Instances")).only_instances();
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Vector>(N_("Translation")).subtype(PROP_TRANSLATION).field_on_all();
|
||||
b.add_input<decl::Bool>(N_("Local Space")).default_value(true).field_on_all();
|
||||
b.add_output<decl::Geometry>(N_("Instances")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Instances").only_instances();
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).hide_value().field_on_all();
|
||||
b.add_input<decl::Vector>("Translation").subtype(PROP_TRANSLATION).field_on_all();
|
||||
b.add_input<decl::Bool>("Local Space").default_value(true).field_on_all();
|
||||
b.add_output<decl::Geometry>("Instances").propagate_all();
|
||||
}
|
||||
|
||||
static void translate_instances(GeoNodeExecParams ¶ms, bke::Instances &instances)
|
||||
|
||||
@@ -17,10 +17,10 @@ namespace blender::nodes::node_geo_triangulate_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Mesh")).supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Bool>(N_("Selection")).default_value(true).field_on_all().hide_value();
|
||||
b.add_input<decl::Int>(N_("Minimum Vertices")).default_value(4).min(4).max(10000);
|
||||
b.add_output<decl::Geometry>(N_("Mesh")).propagate_all();
|
||||
b.add_input<decl::Geometry>("Mesh").supported_type(GEO_COMPONENT_TYPE_MESH);
|
||||
b.add_input<decl::Bool>("Selection").default_value(true).field_on_all().hide_value();
|
||||
b.add_input<decl::Int>("Minimum Vertices").default_value(4).min(4).max(10000);
|
||||
b.add_output<decl::Geometry>("Mesh").propagate_all();
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -13,21 +13,16 @@ namespace blender::nodes::node_geo_uv_pack_islands_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Vector>(N_("UV")).hide_value().supports_field();
|
||||
b.add_input<decl::Bool>(N_("Selection"))
|
||||
b.add_input<decl::Vector>("UV").hide_value().supports_field();
|
||||
b.add_input<decl::Bool>("Selection")
|
||||
.default_value(true)
|
||||
.hide_value()
|
||||
.supports_field()
|
||||
.description(N_("Faces to consider when packing islands"));
|
||||
b.add_input<decl::Float>(N_("Margin"))
|
||||
.default_value(0.001f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.description(N_("Space between islands"));
|
||||
b.add_input<decl::Bool>(N_("Rotate"))
|
||||
.default_value(true)
|
||||
.description(N_("Rotate islands for best fit"));
|
||||
b.add_output<decl::Vector>(N_("UV")).field_source_reference_all();
|
||||
.description("Faces to consider when packing islands");
|
||||
b.add_input<decl::Float>("Margin").default_value(0.001f).min(0.0f).max(1.0f).description(
|
||||
"Space between islands");
|
||||
b.add_input<decl::Bool>("Rotate").default_value(true).description("Rotate islands for best fit");
|
||||
b.add_output<decl::Vector>("UV").field_source_reference_all();
|
||||
}
|
||||
|
||||
static VArray<float3> construct_uv_gvarray(const Mesh &mesh,
|
||||
|
||||
@@ -18,26 +18,22 @@ NODE_STORAGE_FUNCS(NodeGeometryUVUnwrap)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Bool>(N_("Selection"))
|
||||
b.add_input<decl::Bool>("Selection")
|
||||
.default_value(true)
|
||||
.hide_value()
|
||||
.supports_field()
|
||||
.description(N_("Faces to participate in the unwrap operation"));
|
||||
b.add_input<decl::Bool>(N_("Seam"))
|
||||
.hide_value()
|
||||
.supports_field()
|
||||
.description(N_("Edges to mark where the mesh is \"cut\" for the purposes of unwrapping"));
|
||||
b.add_input<decl::Float>(N_("Margin"))
|
||||
.default_value(0.001f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.description(N_("Space between islands"));
|
||||
b.add_input<decl::Bool>(N_("Fill Holes"))
|
||||
.description("Faces to participate in the unwrap operation");
|
||||
b.add_input<decl::Bool>("Seam").hide_value().supports_field().description(
|
||||
"Edges to mark where the mesh is \"cut\" for the purposes of unwrapping");
|
||||
b.add_input<decl::Float>("Margin").default_value(0.001f).min(0.0f).max(1.0f).description(
|
||||
"Space between islands");
|
||||
b.add_input<decl::Bool>("Fill Holes")
|
||||
.default_value(true)
|
||||
.description(N_("Virtually fill holes in mesh before unwrapping, to better avoid overlaps "
|
||||
"and preserve symmetry"));
|
||||
b.add_output<decl::Vector>(N_("UV")).field_source_reference_all().description(
|
||||
N_("UV coordinates between 0 and 1 for each face corner in the selected faces"));
|
||||
.description(
|
||||
"Virtually fill holes in mesh before unwrapping, to better avoid overlaps "
|
||||
"and preserve symmetry");
|
||||
b.add_output<decl::Vector>("UV").field_source_reference_all().description(
|
||||
"UV coordinates between 0 and 1 for each face corner in the selected faces");
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -18,12 +18,12 @@ NODE_STORAGE_FUNCS(NodeGeometryViewer)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(N_("Geometry"));
|
||||
b.add_input<decl::Float>(N_("Value")).field_on_all().hide_value();
|
||||
b.add_input<decl::Vector>(N_("Value"), "Value_001").field_on_all().hide_value();
|
||||
b.add_input<decl::Color>(N_("Value"), "Value_002").field_on_all().hide_value();
|
||||
b.add_input<decl::Int>(N_("Value"), "Value_003").field_on_all().hide_value();
|
||||
b.add_input<decl::Bool>(N_("Value"), "Value_004").field_on_all().hide_value();
|
||||
b.add_input<decl::Geometry>("Geometry");
|
||||
b.add_input<decl::Float>("Value").field_on_all().hide_value();
|
||||
b.add_input<decl::Vector>("Value", "Value_001").field_on_all().hide_value();
|
||||
b.add_input<decl::Color>("Value", "Value_002").field_on_all().hide_value();
|
||||
b.add_input<decl::Int>("Value", "Value_003").field_on_all().hide_value();
|
||||
b.add_input<decl::Bool>("Value", "Value_004").field_on_all().hide_value();
|
||||
}
|
||||
|
||||
static void node_init(bNodeTree * /*tree*/, bNode *node)
|
||||
|
||||
@@ -22,35 +22,33 @@ namespace blender::nodes::node_geo_volume_cube_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Density"))
|
||||
.description(N_("Volume density per voxel"))
|
||||
b.add_input<decl::Float>("Density")
|
||||
.description("Volume density per voxel")
|
||||
.supports_field()
|
||||
.default_value(1.0f);
|
||||
b.add_input<decl::Float>(N_("Background"))
|
||||
.description(N_("Value for voxels outside of the cube"));
|
||||
b.add_input<decl::Float>("Background").description("Value for voxels outside of the cube");
|
||||
|
||||
b.add_input<decl::Vector>(N_("Min"))
|
||||
.description(N_("Minimum boundary of volume"))
|
||||
b.add_input<decl::Vector>("Min")
|
||||
.description("Minimum boundary of volume")
|
||||
.default_value(float3(-1.0f));
|
||||
b.add_input<decl::Vector>(N_("Max"))
|
||||
.description(N_("Maximum boundary of volume"))
|
||||
b.add_input<decl::Vector>("Max")
|
||||
.description("Maximum boundary of volume")
|
||||
.default_value(float3(1.0f));
|
||||
|
||||
b.add_input<decl::Int>(N_("Resolution X"))
|
||||
.description(N_("Number of voxels in the X axis"))
|
||||
b.add_input<decl::Int>("Resolution X")
|
||||
.description("Number of voxels in the X axis")
|
||||
.default_value(32)
|
||||
.min(2);
|
||||
b.add_input<decl::Int>(N_("Resolution Y"))
|
||||
.description(N_("Number of voxels in the Y axis"))
|
||||
b.add_input<decl::Int>("Resolution Y")
|
||||
.description("Number of voxels in the Y axis")
|
||||
.default_value(32)
|
||||
.min(2);
|
||||
b.add_input<decl::Int>(N_("Resolution Z"))
|
||||
.description(N_("Number of voxels in the Z axis"))
|
||||
b.add_input<decl::Int>("Resolution Z")
|
||||
.description("Number of voxels in the Z axis")
|
||||
.default_value(32)
|
||||
.min(2);
|
||||
|
||||
b.add_output<decl::Geometry>(CTX_N_(BLT_I18NCONTEXT_ID_ID, "Volume"))
|
||||
.translation_context(BLT_I18NCONTEXT_ID_ID);
|
||||
b.add_output<decl::Geometry>("Volume").translation_context(BLT_I18NCONTEXT_ID_ID);
|
||||
}
|
||||
|
||||
static float map(const float x,
|
||||
|
||||
@@ -27,27 +27,27 @@ NODE_STORAGE_FUNCS(NodeGeometryVolumeToMesh)
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Geometry>(CTX_N_(BLT_I18NCONTEXT_ID_ID, "Volume"))
|
||||
b.add_input<decl::Geometry>("Volume")
|
||||
.translation_context(BLT_I18NCONTEXT_ID_ID)
|
||||
.supported_type(GEO_COMPONENT_TYPE_VOLUME);
|
||||
b.add_input<decl::Float>(N_("Voxel Size"))
|
||||
b.add_input<decl::Float>("Voxel Size")
|
||||
.default_value(0.3f)
|
||||
.min(0.01f)
|
||||
.subtype(PROP_DISTANCE)
|
||||
.make_available([](bNode &node) {
|
||||
node_storage(node).resolution_mode = VOLUME_TO_MESH_RESOLUTION_MODE_VOXEL_SIZE;
|
||||
});
|
||||
b.add_input<decl::Float>(N_("Voxel Amount"))
|
||||
b.add_input<decl::Float>("Voxel Amount")
|
||||
.default_value(64.0f)
|
||||
.min(0.0f)
|
||||
.make_available([](bNode &node) {
|
||||
node_storage(node).resolution_mode = VOLUME_TO_MESH_RESOLUTION_MODE_VOXEL_AMOUNT;
|
||||
});
|
||||
b.add_input<decl::Float>(N_("Threshold"))
|
||||
b.add_input<decl::Float>("Threshold")
|
||||
.default_value(0.1f)
|
||||
.description(N_("Values larger than the threshold are inside the generated mesh"));
|
||||
b.add_input<decl::Float>(N_("Adaptivity")).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_output<decl::Geometry>(N_("Mesh"));
|
||||
.description("Values larger than the threshold are inside the generated mesh");
|
||||
b.add_input<decl::Float>("Adaptivity").min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_output<decl::Geometry>("Mesh");
|
||||
}
|
||||
|
||||
static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -7,9 +7,9 @@ namespace blender::nodes::node_shader_add_shader_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Shader>(N_("Shader"));
|
||||
b.add_input<decl::Shader>(N_("Shader"), "Shader_001");
|
||||
b.add_output<decl::Shader>(N_("Shader"));
|
||||
b.add_input<decl::Shader>("Shader");
|
||||
b.add_input<decl::Shader>("Shader", "Shader_001");
|
||||
b.add_output<decl::Shader>("Shader");
|
||||
}
|
||||
|
||||
static int node_shader_gpu_add_shader(GPUMaterial *mat,
|
||||
|
||||
@@ -10,11 +10,11 @@ namespace blender::nodes::node_shader_ambient_occlusion_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Distance")).default_value(1.0f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Vector>(N_("Normal")).min(-1.0f).max(1.0f).hide_value();
|
||||
b.add_output<decl::Color>(N_("Color"));
|
||||
b.add_output<decl::Float>(N_("AO"));
|
||||
b.add_input<decl::Color>("Color").default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_input<decl::Float>("Distance").default_value(1.0f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Vector>("Normal").min(-1.0f).max(1.0f).hide_value();
|
||||
b.add_output<decl::Color>("Color");
|
||||
b.add_output<decl::Float>("AO");
|
||||
}
|
||||
|
||||
static void node_shader_buts_ambient_occlusion(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -10,10 +10,10 @@ namespace blender::nodes::node_shader_attribute_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Color>(N_("Color"));
|
||||
b.add_output<decl::Vector>(N_("Vector"));
|
||||
b.add_output<decl::Float>(N_("Fac"));
|
||||
b.add_output<decl::Float>(N_("Alpha"));
|
||||
b.add_output<decl::Color>("Color");
|
||||
b.add_output<decl::Vector>("Vector");
|
||||
b.add_output<decl::Float>("Fac");
|
||||
b.add_output<decl::Float>("Alpha");
|
||||
}
|
||||
|
||||
static void node_shader_buts_attribute(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -7,10 +7,10 @@ namespace blender::nodes::node_shader_background_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Strength")).default_value(1.0f).min(0.0f).max(1000000.0f);
|
||||
b.add_input<decl::Float>(N_("Weight")).unavailable();
|
||||
b.add_output<decl::Shader>(N_("Background"));
|
||||
b.add_input<decl::Color>("Color").default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Float>("Strength").default_value(1.0f).min(0.0f).max(1000000.0f);
|
||||
b.add_input<decl::Float>("Weight").unavailable();
|
||||
b.add_output<decl::Shader>("Background");
|
||||
}
|
||||
|
||||
static int node_shader_gpu_background(GPUMaterial *mat,
|
||||
|
||||
@@ -10,9 +10,9 @@ namespace blender::nodes::node_shader_bevel_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Radius")).default_value(0.05f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Vector>(N_("Normal")).hide_value();
|
||||
b.add_output<decl::Vector>(N_("Normal"));
|
||||
b.add_input<decl::Float>("Radius").default_value(0.05f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Vector>("Normal").hide_value();
|
||||
b.add_output<decl::Vector>("Normal");
|
||||
}
|
||||
|
||||
static void node_shader_buts_bevel(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -9,8 +9,8 @@ namespace blender::nodes::node_shader_blackbody_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Temperature")).default_value(1500.0f).min(800.0f).max(12000.0f);
|
||||
b.add_output<decl::Color>(N_("Color"));
|
||||
b.add_input<decl::Float>("Temperature").default_value(1500.0f).min(800.0f).max(12000.0f);
|
||||
b.add_output<decl::Color>("Color");
|
||||
}
|
||||
|
||||
static int node_shader_gpu_blackbody(GPUMaterial *mat,
|
||||
|
||||
@@ -7,10 +7,10 @@ namespace blender::nodes::node_shader_brightness_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Bright")).default_value(0.0f).min(-100.0f).max(100.0f);
|
||||
b.add_input<decl::Float>(N_("Contrast")).default_value(0.0f).min(-100.0f).max(100.0f);
|
||||
b.add_output<decl::Color>(N_("Color"));
|
||||
b.add_input<decl::Color>("Color").default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_input<decl::Float>("Bright").default_value(0.0f).min(-100.0f).max(100.0f);
|
||||
b.add_input<decl::Float>("Contrast").default_value(0.0f).min(-100.0f).max(100.0f);
|
||||
b.add_output<decl::Color>("Color");
|
||||
}
|
||||
|
||||
static int gpu_shader_brightcontrast(GPUMaterial *mat,
|
||||
|
||||
@@ -10,22 +10,22 @@ namespace blender::nodes::node_shader_bsdf_anisotropic_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Roughness"))
|
||||
b.add_input<decl::Color>("Color").default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Float>("Roughness")
|
||||
.default_value(0.5f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Anisotropy")).default_value(0.5f).min(-1.0f).max(1.0f);
|
||||
b.add_input<decl::Float>(N_("Rotation"))
|
||||
b.add_input<decl::Float>("Anisotropy").default_value(0.5f).min(-1.0f).max(1.0f);
|
||||
b.add_input<decl::Float>("Rotation")
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Vector>(N_("Normal")).hide_value();
|
||||
b.add_input<decl::Vector>(N_("Tangent")).hide_value();
|
||||
b.add_input<decl::Float>(N_("Weight")).unavailable();
|
||||
b.add_output<decl::Shader>(N_("BSDF"));
|
||||
b.add_input<decl::Vector>("Normal").hide_value();
|
||||
b.add_input<decl::Vector>("Tangent").hide_value();
|
||||
b.add_input<decl::Float>("Weight").unavailable();
|
||||
b.add_output<decl::Shader>("BSDF");
|
||||
}
|
||||
|
||||
static void node_shader_buts_anisotropic(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -7,15 +7,15 @@ namespace blender::nodes::node_shader_bsdf_diffuse_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Roughness"))
|
||||
b.add_input<decl::Color>("Color").default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Float>("Roughness")
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Vector>(N_("Normal")).hide_value();
|
||||
b.add_input<decl::Float>(N_("Weight")).unavailable();
|
||||
b.add_output<decl::Shader>(N_("BSDF"));
|
||||
b.add_input<decl::Vector>("Normal").hide_value();
|
||||
b.add_input<decl::Float>("Weight").unavailable();
|
||||
b.add_output<decl::Shader>("BSDF");
|
||||
}
|
||||
|
||||
static int node_shader_gpu_bsdf_diffuse(GPUMaterial *mat,
|
||||
|
||||
@@ -7,16 +7,16 @@ namespace blender::nodes::node_shader_bsdf_glass_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Roughness"))
|
||||
b.add_input<decl::Color>("Color").default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_input<decl::Float>("Roughness")
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("IOR")).default_value(1.45f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Vector>(N_("Normal")).hide_value();
|
||||
b.add_input<decl::Float>(N_("Weight")).unavailable();
|
||||
b.add_output<decl::Shader>(N_("BSDF"));
|
||||
b.add_input<decl::Float>("IOR").default_value(1.45f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Vector>("Normal").hide_value();
|
||||
b.add_input<decl::Float>("Weight").unavailable();
|
||||
b.add_output<decl::Shader>("BSDF");
|
||||
}
|
||||
|
||||
static void node_shader_init_glass(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -7,15 +7,15 @@ namespace blender::nodes::node_shader_bsdf_glossy_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Roughness"))
|
||||
b.add_input<decl::Color>("Color").default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Float>("Roughness")
|
||||
.default_value(0.5f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Vector>(N_("Normal")).hide_value();
|
||||
b.add_input<decl::Float>(N_("Weight")).unavailable();
|
||||
b.add_output<decl::Shader>(N_("BSDF"));
|
||||
b.add_input<decl::Vector>("Normal").hide_value();
|
||||
b.add_input<decl::Float>("Weight").unavailable();
|
||||
b.add_output<decl::Shader>("BSDF");
|
||||
}
|
||||
|
||||
static void node_shader_init_glossy(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -10,25 +10,22 @@ namespace blender::nodes::node_shader_bsdf_hair_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Offset"))
|
||||
.default_value(0.0f)
|
||||
.min(-M_PI_2)
|
||||
.max(M_PI_2)
|
||||
.subtype(PROP_ANGLE);
|
||||
b.add_input<decl::Float>(N_("RoughnessU"))
|
||||
b.add_input<decl::Color>("Color").default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Float>("Offset").default_value(0.0f).min(-M_PI_2).max(M_PI_2).subtype(
|
||||
PROP_ANGLE);
|
||||
b.add_input<decl::Float>("RoughnessU")
|
||||
.default_value(0.1f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("RoughnessV"))
|
||||
b.add_input<decl::Float>("RoughnessV")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Vector>(N_("Tangent")).hide_value();
|
||||
b.add_input<decl::Float>(N_("Weight")).unavailable();
|
||||
b.add_output<decl::Shader>(N_("BSDF"));
|
||||
b.add_input<decl::Vector>("Tangent").hide_value();
|
||||
b.add_input<decl::Float>("Weight").unavailable();
|
||||
b.add_output<decl::Shader>("BSDF");
|
||||
}
|
||||
|
||||
static void node_shader_buts_hair(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -11,56 +11,48 @@ namespace blender::nodes::node_shader_bsdf_hair_principled_cc {
|
||||
/* Color, melanin and absorption coefficient default to approximately same brownish hair. */
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({0.017513f, 0.005763f, 0.002059f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Melanin"))
|
||||
.default_value(0.8f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Melanin Redness"))
|
||||
b.add_input<decl::Color>("Color").default_value({0.017513f, 0.005763f, 0.002059f, 1.0f});
|
||||
b.add_input<decl::Float>("Melanin").default_value(0.8f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>("Melanin Redness")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Color>(N_("Tint")).default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_input<decl::Vector>(N_("Absorption Coefficient"))
|
||||
b.add_input<decl::Color>("Tint").default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_input<decl::Vector>("Absorption Coefficient")
|
||||
.default_value({0.245531f, 0.52f, 1.365f})
|
||||
.min(0.0f)
|
||||
.max(1000.0f);
|
||||
b.add_input<decl::Float>(N_("Roughness"))
|
||||
b.add_input<decl::Float>("Roughness")
|
||||
.default_value(0.3f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Radial Roughness"))
|
||||
b.add_input<decl::Float>("Radial Roughness")
|
||||
.default_value(0.3f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Coat"))
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("IOR")).default_value(1.55f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Float>(N_("Offset"))
|
||||
b.add_input<decl::Float>("Coat").default_value(0.0f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>("IOR").default_value(1.55f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Float>("Offset")
|
||||
.default_value(2.0f * float(M_PI) / 180.0f)
|
||||
.min(-M_PI_2)
|
||||
.max(M_PI_2)
|
||||
.subtype(PROP_ANGLE);
|
||||
b.add_input<decl::Float>(N_("Random Color"))
|
||||
b.add_input<decl::Float>("Random Color")
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Random Roughness"))
|
||||
b.add_input<decl::Float>("Random Roughness")
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Random")).hide_value();
|
||||
b.add_input<decl::Float>(N_("Weight")).unavailable();
|
||||
b.add_output<decl::Shader>(N_("BSDF"));
|
||||
b.add_input<decl::Float>("Random").hide_value();
|
||||
b.add_input<decl::Float>("Weight").unavailable();
|
||||
b.add_output<decl::Shader>("BSDF");
|
||||
}
|
||||
|
||||
static void node_shader_buts_principled_hair(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -12,101 +12,93 @@ namespace blender::nodes::node_shader_bsdf_principled_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Base Color")).default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Subsurface"))
|
||||
b.add_input<decl::Color>("Base Color").default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Float>("Subsurface")
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Vector>(N_("Subsurface Radius"))
|
||||
b.add_input<decl::Vector>("Subsurface Radius")
|
||||
.default_value({1.0f, 0.2f, 0.1f})
|
||||
.min(0.0f)
|
||||
.max(100.0f)
|
||||
.compact();
|
||||
b.add_input<decl::Color>(N_("Subsurface Color")).default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Subsurface IOR"))
|
||||
b.add_input<decl::Color>("Subsurface Color").default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Float>("Subsurface IOR")
|
||||
.default_value(1.4f)
|
||||
.min(1.01f)
|
||||
.max(3.8f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Subsurface Anisotropy"))
|
||||
b.add_input<decl::Float>("Subsurface Anisotropy")
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Metallic"))
|
||||
b.add_input<decl::Float>("Metallic")
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Specular"))
|
||||
b.add_input<decl::Float>("Specular")
|
||||
.default_value(0.5f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Specular Tint"))
|
||||
b.add_input<decl::Float>("Specular Tint")
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Roughness"))
|
||||
b.add_input<decl::Float>("Roughness")
|
||||
.default_value(0.5f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Anisotropic"))
|
||||
b.add_input<decl::Float>("Anisotropic")
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Anisotropic Rotation"))
|
||||
b.add_input<decl::Float>("Anisotropic Rotation")
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Sheen"))
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Sheen Tint"))
|
||||
b.add_input<decl::Float>("Sheen").default_value(0.0f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>("Sheen Tint")
|
||||
.default_value(0.5f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Clearcoat"))
|
||||
b.add_input<decl::Float>("Clearcoat")
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Clearcoat Roughness"))
|
||||
b.add_input<decl::Float>("Clearcoat Roughness")
|
||||
.default_value(0.03f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("IOR")).default_value(1.45f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Float>(N_("Transmission"))
|
||||
b.add_input<decl::Float>("IOR").default_value(1.45f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Float>("Transmission")
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Transmission Roughness"))
|
||||
b.add_input<decl::Float>("Transmission Roughness")
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Color>(N_("Emission")).default_value({0.0f, 0.0f, 0.0f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Emission Strength")).default_value(1.0).min(0.0f).max(1000000.0f);
|
||||
b.add_input<decl::Float>(N_("Alpha"))
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Vector>(N_("Normal")).hide_value();
|
||||
b.add_input<decl::Vector>(N_("Clearcoat Normal")).hide_value();
|
||||
b.add_input<decl::Vector>(N_("Tangent")).hide_value();
|
||||
b.add_input<decl::Float>(N_("Weight")).unavailable();
|
||||
b.add_output<decl::Shader>(N_("BSDF"));
|
||||
b.add_input<decl::Color>("Emission").default_value({0.0f, 0.0f, 0.0f, 1.0f});
|
||||
b.add_input<decl::Float>("Emission Strength").default_value(1.0).min(0.0f).max(1000000.0f);
|
||||
b.add_input<decl::Float>("Alpha").default_value(1.0f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Vector>("Normal").hide_value();
|
||||
b.add_input<decl::Vector>("Clearcoat Normal").hide_value();
|
||||
b.add_input<decl::Vector>("Tangent").hide_value();
|
||||
b.add_input<decl::Float>("Weight").unavailable();
|
||||
b.add_output<decl::Shader>("BSDF");
|
||||
}
|
||||
|
||||
static void node_shader_buts_principled(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -7,16 +7,16 @@ namespace blender::nodes::node_shader_bsdf_refraction_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Roughness"))
|
||||
b.add_input<decl::Color>("Color").default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_input<decl::Float>("Roughness")
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("IOR")).default_value(1.45f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Vector>(N_("Normal")).hide_value();
|
||||
b.add_input<decl::Float>(N_("Weight")).unavailable();
|
||||
b.add_output<decl::Shader>(N_("BSDF"));
|
||||
b.add_input<decl::Float>("IOR").default_value(1.45f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Vector>("Normal").hide_value();
|
||||
b.add_input<decl::Float>("Weight").unavailable();
|
||||
b.add_output<decl::Shader>("BSDF");
|
||||
}
|
||||
|
||||
static void node_shader_init_refraction(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -10,20 +10,12 @@ namespace blender::nodes::node_shader_bsdf_toon_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Size"))
|
||||
.default_value(0.5f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Smooth"))
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Vector>(N_("Normal")).hide_value();
|
||||
b.add_input<decl::Float>(N_("Weight")).unavailable();
|
||||
b.add_output<decl::Shader>(N_("BSDF"));
|
||||
b.add_input<decl::Color>("Color").default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Float>("Size").default_value(0.5f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>("Smooth").default_value(0.0f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Vector>("Normal").hide_value();
|
||||
b.add_input<decl::Float>("Weight").unavailable();
|
||||
b.add_output<decl::Shader>("BSDF");
|
||||
}
|
||||
|
||||
static void node_shader_buts_toon(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -7,10 +7,10 @@ namespace blender::nodes::node_shader_bsdf_translucent_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Vector>(N_("Normal")).hide_value();
|
||||
b.add_input<decl::Float>(N_("Weight")).unavailable();
|
||||
b.add_output<decl::Shader>(N_("BSDF"));
|
||||
b.add_input<decl::Color>("Color").default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Vector>("Normal").hide_value();
|
||||
b.add_input<decl::Float>("Weight").unavailable();
|
||||
b.add_output<decl::Shader>("BSDF");
|
||||
}
|
||||
|
||||
static int node_shader_gpu_bsdf_translucent(GPUMaterial *mat,
|
||||
|
||||
@@ -7,9 +7,9 @@ namespace blender::nodes::node_shader_bsdf_transparent_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Weight")).unavailable();
|
||||
b.add_output<decl::Shader>(N_("BSDF"));
|
||||
b.add_input<decl::Color>("Color").default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_input<decl::Float>("Weight").unavailable();
|
||||
b.add_output<decl::Shader>("BSDF");
|
||||
}
|
||||
|
||||
static int node_shader_gpu_bsdf_transparent(GPUMaterial *mat,
|
||||
|
||||
@@ -7,15 +7,11 @@ namespace blender::nodes::node_shader_bsdf_velvet_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Sigma"))
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Vector>(N_("Normal")).hide_value();
|
||||
b.add_input<decl::Float>(N_("Weight")).unavailable();
|
||||
b.add_output<decl::Shader>(N_("BSDF"));
|
||||
b.add_input<decl::Color>("Color").default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Float>("Sigma").default_value(1.0f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Vector>("Normal").hide_value();
|
||||
b.add_input<decl::Float>("Weight").unavailable();
|
||||
b.add_output<decl::Shader>("BSDF");
|
||||
}
|
||||
|
||||
static int node_shader_gpu_bsdf_velvet(GPUMaterial *mat,
|
||||
|
||||
@@ -16,19 +16,15 @@ namespace blender::nodes::node_shader_bump_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Strength"))
|
||||
b.add_input<decl::Float>("Strength")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Distance")).default_value(1.0f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Float>(N_("Height"))
|
||||
.default_value(1.0f)
|
||||
.min(-1000.0f)
|
||||
.max(1000.0f)
|
||||
.hide_value();
|
||||
b.add_input<decl::Vector>(N_("Normal")).min(-1.0f).max(1.0f).hide_value();
|
||||
b.add_output<decl::Vector>(N_("Normal"));
|
||||
b.add_input<decl::Float>("Distance").default_value(1.0f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Float>("Height").default_value(1.0f).min(-1000.0f).max(1000.0f).hide_value();
|
||||
b.add_input<decl::Vector>("Normal").min(-1.0f).max(1.0f).hide_value();
|
||||
b.add_output<decl::Vector>("Normal");
|
||||
}
|
||||
|
||||
static void node_shader_buts_bump(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -11,9 +11,9 @@ namespace blender::nodes::node_shader_camera_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Vector>(N_("View Vector"));
|
||||
b.add_output<decl::Float>(N_("View Z Depth"));
|
||||
b.add_output<decl::Float>(N_("View Distance"));
|
||||
b.add_output<decl::Vector>("View Vector");
|
||||
b.add_output<decl::Float>("View Z Depth");
|
||||
b.add_output<decl::Float>("View Distance");
|
||||
}
|
||||
|
||||
static int gpu_shader_camera(GPUMaterial *mat,
|
||||
|
||||
@@ -15,10 +15,10 @@ namespace blender::nodes::node_shader_clamp_cc {
|
||||
static void sh_node_clamp_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Float>(N_("Value")).default_value(1.0f);
|
||||
b.add_input<decl::Float>(N_("Min")).default_value(0.0f).min(-10000.0f).max(10000.0f);
|
||||
b.add_input<decl::Float>(N_("Max")).default_value(1.0f).min(-10000.0f).max(10000.0f);
|
||||
b.add_output<decl::Float>(N_("Result"));
|
||||
b.add_input<decl::Float>("Value").default_value(1.0f);
|
||||
b.add_input<decl::Float>("Min").default_value(0.0f).min(-10000.0f).max(10000.0f);
|
||||
b.add_input<decl::Float>("Max").default_value(1.0f).min(-10000.0f).max(10000.0f);
|
||||
b.add_output<decl::Float>("Result");
|
||||
}
|
||||
|
||||
static void node_shader_buts_clamp(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -16,9 +16,9 @@ namespace blender::nodes::node_shader_color_ramp_cc {
|
||||
static void sh_node_valtorgb_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Float>(N_("Fac")).default_value(0.5f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_output<decl::Color>(N_("Color"));
|
||||
b.add_output<decl::Float>(N_("Alpha"));
|
||||
b.add_input<decl::Float>("Fac").default_value(0.5f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_output<decl::Color>("Color");
|
||||
b.add_output<decl::Float>("Alpha");
|
||||
}
|
||||
|
||||
static void node_shader_init_valtorgb(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -12,14 +12,10 @@ namespace blender::nodes::node_shader_curves_cc {
|
||||
static void sh_node_curve_vec_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Float>(N_("Fac"))
|
||||
.no_muted_links()
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.default_value(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Vector>(N_("Vector")).min(-1.0f).max(1.0f);
|
||||
b.add_output<decl::Vector>(N_("Vector"));
|
||||
b.add_input<decl::Float>("Fac").no_muted_links().min(0.0f).max(1.0f).default_value(1.0f).subtype(
|
||||
PROP_FACTOR);
|
||||
b.add_input<decl::Vector>("Vector").min(-1.0f).max(1.0f);
|
||||
b.add_output<decl::Vector>("Vector");
|
||||
}
|
||||
|
||||
static void node_shader_init_curve_vec(bNodeTree * /*ntree*/, bNode *node)
|
||||
@@ -130,14 +126,10 @@ namespace blender::nodes::node_shader_curves_cc {
|
||||
static void sh_node_curve_rgb_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Float>(N_("Fac"))
|
||||
.no_muted_links()
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.default_value(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_output<decl::Color>(N_("Color"));
|
||||
b.add_input<decl::Float>("Fac").no_muted_links().min(0.0f).max(1.0f).default_value(1.0f).subtype(
|
||||
PROP_FACTOR);
|
||||
b.add_input<decl::Color>("Color").default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_output<decl::Color>("Color");
|
||||
}
|
||||
|
||||
static void node_shader_init_curve_rgb(bNodeTree * /*ntree*/, bNode *node)
|
||||
@@ -276,14 +268,14 @@ namespace blender::nodes::node_shader_curves_cc {
|
||||
static void sh_node_curve_float_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Float>(N_("Factor"))
|
||||
b.add_input<decl::Float>("Factor")
|
||||
.no_muted_links()
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.default_value(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Value")).default_value(1.0f).is_default_link_socket();
|
||||
b.add_output<decl::Float>(N_("Value"));
|
||||
b.add_input<decl::Float>("Value").default_value(1.0f).is_default_link_socket();
|
||||
b.add_output<decl::Float>("Value");
|
||||
}
|
||||
|
||||
static void node_shader_init_curve_float(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -7,11 +7,11 @@ namespace blender::nodes::node_shader_displacement_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Height")).default_value(0.0f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Float>(N_("Midlevel")).default_value(0.5f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Float>(N_("Scale")).default_value(1.0f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Vector>(N_("Normal")).hide_value();
|
||||
b.add_output<decl::Vector>(N_("Displacement"));
|
||||
b.add_input<decl::Float>("Height").default_value(0.0f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Float>("Midlevel").default_value(0.5f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Float>("Scale").default_value(1.0f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Vector>("Normal").hide_value();
|
||||
b.add_output<decl::Vector>("Displacement");
|
||||
}
|
||||
|
||||
static void node_shader_init_displacement(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -7,34 +7,34 @@ namespace blender::nodes::node_shader_eevee_specular_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Base Color")).default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Color>(N_("Specular")).default_value({0.03f, 0.03f, 0.03f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Roughness"))
|
||||
b.add_input<decl::Color>("Base Color").default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Color>("Specular").default_value({0.03f, 0.03f, 0.03f, 1.0f});
|
||||
b.add_input<decl::Float>("Roughness")
|
||||
.default_value(0.2f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Color>(N_("Emissive Color")).default_value({0.0f, 0.0f, 0.0f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Transparency"))
|
||||
b.add_input<decl::Color>("Emissive Color").default_value({0.0f, 0.0f, 0.0f, 1.0f});
|
||||
b.add_input<decl::Float>("Transparency")
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Vector>(N_("Normal")).hide_value();
|
||||
b.add_input<decl::Float>(N_("Clear Coat"))
|
||||
b.add_input<decl::Vector>("Normal").hide_value();
|
||||
b.add_input<decl::Float>("Clear Coat")
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Clear Coat Roughness"))
|
||||
b.add_input<decl::Float>("Clear Coat Roughness")
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Vector>(N_("Clear Coat Normal")).hide_value();
|
||||
b.add_input<decl::Float>(N_("Ambient Occlusion")).hide_value();
|
||||
b.add_input<decl::Float>(N_("Weight")).unavailable();
|
||||
b.add_output<decl::Shader>(N_("BSDF"));
|
||||
b.add_input<decl::Vector>("Clear Coat Normal").hide_value();
|
||||
b.add_input<decl::Float>("Ambient Occlusion").hide_value();
|
||||
b.add_input<decl::Float>("Weight").unavailable();
|
||||
b.add_output<decl::Shader>("BSDF");
|
||||
}
|
||||
|
||||
#define socket_not_zero(sock) (in[sock].link || (clamp_f(in[sock].vec[0], 0.0f, 1.0f) > 1e-5f))
|
||||
|
||||
@@ -7,10 +7,10 @@ namespace blender::nodes::node_shader_emission_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Strength")).default_value(1.0f).min(0.0f).max(1000000.0f);
|
||||
b.add_input<decl::Float>(N_("Weight")).unavailable();
|
||||
b.add_output<decl::Shader>(N_("Emission"));
|
||||
b.add_input<decl::Color>("Color").default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_input<decl::Float>("Strength").default_value(1.0f).min(0.0f).max(1000000.0f);
|
||||
b.add_input<decl::Float>("Weight").unavailable();
|
||||
b.add_output<decl::Shader>("Emission");
|
||||
}
|
||||
|
||||
static int node_shader_gpu_emission(GPUMaterial *mat,
|
||||
|
||||
@@ -7,9 +7,9 @@ namespace blender::nodes::node_shader_fresnel_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("IOR")).default_value(1.45f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Vector>(N_("Normal")).hide_value();
|
||||
b.add_output<decl::Float>(N_("Fac"));
|
||||
b.add_input<decl::Float>("IOR").default_value(1.45f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Vector>("Normal").hide_value();
|
||||
b.add_output<decl::Float>("Fac");
|
||||
}
|
||||
|
||||
static int node_shader_gpu_fresnel(GPUMaterial *mat,
|
||||
|
||||
@@ -7,13 +7,10 @@ namespace blender::nodes::node_shader_gamma_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Gamma"))
|
||||
.default_value(1.0f)
|
||||
.min(0.001f)
|
||||
.max(10.0f)
|
||||
.subtype(PROP_UNSIGNED);
|
||||
b.add_output<decl::Color>(N_("Color"));
|
||||
b.add_input<decl::Color>("Color").default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_input<decl::Float>("Gamma").default_value(1.0f).min(0.001f).max(10.0f).subtype(
|
||||
PROP_UNSIGNED);
|
||||
b.add_output<decl::Color>("Color");
|
||||
}
|
||||
|
||||
static int node_shader_gpu_gamma(GPUMaterial *mat,
|
||||
|
||||
@@ -7,15 +7,15 @@ namespace blender::nodes::node_shader_geometry_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Vector>(N_("Position"));
|
||||
b.add_output<decl::Vector>(N_("Normal"));
|
||||
b.add_output<decl::Vector>(N_("Tangent"));
|
||||
b.add_output<decl::Vector>(N_("True Normal"));
|
||||
b.add_output<decl::Vector>(N_("Incoming"));
|
||||
b.add_output<decl::Vector>(N_("Parametric"));
|
||||
b.add_output<decl::Float>(N_("Backfacing"));
|
||||
b.add_output<decl::Float>(N_("Pointiness"));
|
||||
b.add_output<decl::Float>(N_("Random Per Island"));
|
||||
b.add_output<decl::Vector>("Position");
|
||||
b.add_output<decl::Vector>("Normal");
|
||||
b.add_output<decl::Vector>("Tangent");
|
||||
b.add_output<decl::Vector>("True Normal");
|
||||
b.add_output<decl::Vector>("Incoming");
|
||||
b.add_output<decl::Vector>("Parametric");
|
||||
b.add_output<decl::Float>("Backfacing");
|
||||
b.add_output<decl::Float>("Pointiness");
|
||||
b.add_output<decl::Float>("Random Per Island");
|
||||
}
|
||||
|
||||
static int node_shader_gpu_geometry(GPUMaterial *mat,
|
||||
|
||||
@@ -7,12 +7,12 @@ namespace blender::nodes::node_shader_hair_info_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Float>(N_("Is Strand"));
|
||||
b.add_output<decl::Float>(N_("Intercept"));
|
||||
b.add_output<decl::Float>(N_("Length"));
|
||||
b.add_output<decl::Float>(N_("Thickness"));
|
||||
b.add_output<decl::Vector>(N_("Tangent Normal"));
|
||||
b.add_output<decl::Float>(N_("Random"));
|
||||
b.add_output<decl::Float>("Is Strand");
|
||||
b.add_output<decl::Float>("Intercept");
|
||||
b.add_output<decl::Float>("Length");
|
||||
b.add_output<decl::Float>("Thickness");
|
||||
b.add_output<decl::Vector>("Tangent Normal");
|
||||
b.add_output<decl::Float>("Random");
|
||||
}
|
||||
|
||||
static int node_shader_gpu_hair_info(GPUMaterial *mat,
|
||||
|
||||
@@ -7,8 +7,8 @@ namespace blender::nodes::node_shader_holdout_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Weight")).unavailable();
|
||||
b.add_output<decl::Shader>(N_("Holdout"));
|
||||
b.add_input<decl::Float>("Weight").unavailable();
|
||||
b.add_output<decl::Shader>("Holdout");
|
||||
}
|
||||
|
||||
static int gpu_shader_rgb(GPUMaterial *mat,
|
||||
|
||||
@@ -11,16 +11,13 @@ namespace blender::nodes::node_shader_hueSatVal_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Hue")).default_value(0.5f).min(0.0f).max(1.0f);
|
||||
b.add_input<decl::Float>(N_("Saturation")).default_value(1.0f).min(0.0f).max(2.0f);
|
||||
b.add_input<decl::Float>(CTX_N_(BLT_I18NCONTEXT_COLOR, "Value"))
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(2.0f)
|
||||
.translation_context(BLT_I18NCONTEXT_COLOR);
|
||||
b.add_input<decl::Float>(N_("Fac")).default_value(1.0f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_output<decl::Color>(N_("Color"));
|
||||
b.add_input<decl::Float>("Hue").default_value(0.5f).min(0.0f).max(1.0f);
|
||||
b.add_input<decl::Float>("Saturation").default_value(1.0f).min(0.0f).max(2.0f);
|
||||
b.add_input<decl::Float>("Value").default_value(1.0f).min(0.0f).max(2.0f).translation_context(
|
||||
BLT_I18NCONTEXT_COLOR);
|
||||
b.add_input<decl::Float>("Fac").default_value(1.0f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Color>("Color").default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_output<decl::Color>("Color");
|
||||
}
|
||||
|
||||
static int gpu_shader_hue_sat(GPUMaterial *mat,
|
||||
|
||||
@@ -10,9 +10,9 @@ namespace blender::nodes::node_shader_ies_light_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Vector>(N_("Vector")).hide_value();
|
||||
b.add_input<decl::Float>(N_("Strength")).default_value(1.0f).min(0.0f).max(1000000.0f);
|
||||
b.add_output<decl::Float>(N_("Fac"));
|
||||
b.add_input<decl::Vector>("Vector").hide_value();
|
||||
b.add_input<decl::Float>("Strength").default_value(1.0f).min(0.0f).max(1000000.0f);
|
||||
b.add_output<decl::Float>("Fac");
|
||||
}
|
||||
|
||||
static void node_shader_buts_ies(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -11,9 +11,9 @@ namespace blender::nodes::node_shader_invert_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Fac")).default_value(1.0f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({0.0f, 0.0f, 0.0f, 1.0f});
|
||||
b.add_output<decl::Color>(N_("Color"));
|
||||
b.add_input<decl::Float>("Fac").default_value(1.0f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Color>("Color").default_value({0.0f, 0.0f, 0.0f, 1.0f});
|
||||
b.add_output<decl::Color>("Color");
|
||||
}
|
||||
|
||||
static int gpu_shader_invert(GPUMaterial *mat,
|
||||
|
||||
@@ -7,10 +7,10 @@ namespace blender::nodes::node_shader_layer_weight_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Blend")).default_value(0.5f).min(0.0f).max(1.0f);
|
||||
b.add_input<decl::Vector>(N_("Normal")).hide_value();
|
||||
b.add_output<decl::Float>(N_("Fresnel"));
|
||||
b.add_output<decl::Float>(N_("Facing"));
|
||||
b.add_input<decl::Float>("Blend").default_value(0.5f).min(0.0f).max(1.0f);
|
||||
b.add_input<decl::Vector>("Normal").hide_value();
|
||||
b.add_output<decl::Float>("Fresnel");
|
||||
b.add_output<decl::Float>("Facing");
|
||||
}
|
||||
|
||||
static int node_shader_gpu_layer_weight(GPUMaterial *mat,
|
||||
|
||||
@@ -7,11 +7,11 @@ namespace blender::nodes::node_shader_light_falloff_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Strength")).default_value(100.0f).min(0.0f).max(1000000.0f);
|
||||
b.add_input<decl::Float>(N_("Smooth")).default_value(0.0f).min(0.0f).max(1000.0f);
|
||||
b.add_output<decl::Float>(N_("Quadratic"));
|
||||
b.add_output<decl::Float>(N_("Linear"));
|
||||
b.add_output<decl::Float>(N_("Constant"));
|
||||
b.add_input<decl::Float>("Strength").default_value(100.0f).min(0.0f).max(1000000.0f);
|
||||
b.add_input<decl::Float>("Smooth").default_value(0.0f).min(0.0f).max(1000.0f);
|
||||
b.add_output<decl::Float>("Quadratic");
|
||||
b.add_output<decl::Float>("Linear");
|
||||
b.add_output<decl::Float>("Constant");
|
||||
}
|
||||
|
||||
static int node_shader_gpu_light_falloff(GPUMaterial *mat,
|
||||
|
||||
@@ -7,19 +7,19 @@ namespace blender::nodes::node_shader_light_path_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Float>(N_("Is Camera Ray"));
|
||||
b.add_output<decl::Float>(N_("Is Shadow Ray"));
|
||||
b.add_output<decl::Float>(N_("Is Diffuse Ray"));
|
||||
b.add_output<decl::Float>(N_("Is Glossy Ray"));
|
||||
b.add_output<decl::Float>(N_("Is Singular Ray"));
|
||||
b.add_output<decl::Float>(N_("Is Reflection Ray"));
|
||||
b.add_output<decl::Float>(N_("Is Transmission Ray"));
|
||||
b.add_output<decl::Float>(N_("Ray Length"));
|
||||
b.add_output<decl::Float>(N_("Ray Depth"));
|
||||
b.add_output<decl::Float>(N_("Diffuse Depth"));
|
||||
b.add_output<decl::Float>(N_("Glossy Depth"));
|
||||
b.add_output<decl::Float>(N_("Transparent Depth"));
|
||||
b.add_output<decl::Float>(N_("Transmission Depth"));
|
||||
b.add_output<decl::Float>("Is Camera Ray");
|
||||
b.add_output<decl::Float>("Is Shadow Ray");
|
||||
b.add_output<decl::Float>("Is Diffuse Ray");
|
||||
b.add_output<decl::Float>("Is Glossy Ray");
|
||||
b.add_output<decl::Float>("Is Singular Ray");
|
||||
b.add_output<decl::Float>("Is Reflection Ray");
|
||||
b.add_output<decl::Float>("Is Transmission Ray");
|
||||
b.add_output<decl::Float>("Ray Length");
|
||||
b.add_output<decl::Float>("Ray Depth");
|
||||
b.add_output<decl::Float>("Diffuse Depth");
|
||||
b.add_output<decl::Float>("Glossy Depth");
|
||||
b.add_output<decl::Float>("Transparent Depth");
|
||||
b.add_output<decl::Float>("Transmission Depth");
|
||||
}
|
||||
|
||||
static int node_shader_gpu_light_path(GPUMaterial *mat,
|
||||
|
||||
@@ -23,20 +23,20 @@ NODE_STORAGE_FUNCS(NodeMapRange)
|
||||
static void sh_node_map_range_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Float>(N_("Value")).min(-10000.0f).max(10000.0f).default_value(1.0f);
|
||||
b.add_input<decl::Float>(N_("From Min")).min(-10000.0f).max(10000.0f);
|
||||
b.add_input<decl::Float>(N_("From Max")).min(-10000.0f).max(10000.0f).default_value(1.0f);
|
||||
b.add_input<decl::Float>(N_("To Min")).min(-10000.0f).max(10000.0f);
|
||||
b.add_input<decl::Float>(N_("To Max")).min(-10000.0f).max(10000.0f).default_value(1.0f);
|
||||
b.add_input<decl::Float>(N_("Steps")).min(-10000.0f).max(10000.0f).default_value(4.0f);
|
||||
b.add_input<decl::Vector>(N_("Vector")).min(0.0f).max(1.0f).hide_value();
|
||||
b.add_input<decl::Vector>(N_("From Min"), "From_Min_FLOAT3");
|
||||
b.add_input<decl::Vector>(N_("From Max"), "From_Max_FLOAT3").default_value(float3(1.0f));
|
||||
b.add_input<decl::Vector>(N_("To Min"), "To_Min_FLOAT3");
|
||||
b.add_input<decl::Vector>(N_("To Max"), "To_Max_FLOAT3").default_value(float3(1.0f));
|
||||
b.add_input<decl::Vector>(N_("Steps"), "Steps_FLOAT3").default_value(float3(4.0f));
|
||||
b.add_output<decl::Float>(N_("Result"));
|
||||
b.add_output<decl::Vector>(N_("Vector"));
|
||||
b.add_input<decl::Float>("Value").min(-10000.0f).max(10000.0f).default_value(1.0f);
|
||||
b.add_input<decl::Float>("From Min").min(-10000.0f).max(10000.0f);
|
||||
b.add_input<decl::Float>("From Max").min(-10000.0f).max(10000.0f).default_value(1.0f);
|
||||
b.add_input<decl::Float>("To Min").min(-10000.0f).max(10000.0f);
|
||||
b.add_input<decl::Float>("To Max").min(-10000.0f).max(10000.0f).default_value(1.0f);
|
||||
b.add_input<decl::Float>("Steps").min(-10000.0f).max(10000.0f).default_value(4.0f);
|
||||
b.add_input<decl::Vector>("Vector").min(0.0f).max(1.0f).hide_value();
|
||||
b.add_input<decl::Vector>("From Min", "From_Min_FLOAT3");
|
||||
b.add_input<decl::Vector>("From Max", "From_Max_FLOAT3").default_value(float3(1.0f));
|
||||
b.add_input<decl::Vector>("To Min", "To_Min_FLOAT3");
|
||||
b.add_input<decl::Vector>("To Max", "To_Max_FLOAT3").default_value(float3(1.0f));
|
||||
b.add_input<decl::Vector>("Steps", "Steps_FLOAT3").default_value(float3(4.0f));
|
||||
b.add_output<decl::Float>("Result");
|
||||
b.add_output<decl::Vector>("Vector");
|
||||
}
|
||||
|
||||
static void node_shader_buts_map_range(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -14,26 +14,23 @@ namespace blender::nodes::node_shader_mapping_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Vector>(N_("Vector"))
|
||||
.default_value({0.0f, 0.0f, 0.0f})
|
||||
.min(-FLT_MAX)
|
||||
.max(FLT_MAX);
|
||||
b.add_input<decl::Vector>(N_("Location"))
|
||||
b.add_input<decl::Vector>("Vector").default_value({0.0f, 0.0f, 0.0f}).min(-FLT_MAX).max(FLT_MAX);
|
||||
b.add_input<decl::Vector>("Location")
|
||||
.default_value({0.0f, 0.0f, 0.0f})
|
||||
.min(-FLT_MAX)
|
||||
.max(FLT_MAX)
|
||||
.subtype(PROP_TRANSLATION);
|
||||
b.add_input<decl::Vector>(N_("Rotation"))
|
||||
b.add_input<decl::Vector>("Rotation")
|
||||
.default_value({0.0f, 0.0f, 0.0f})
|
||||
.min(-FLT_MAX)
|
||||
.max(FLT_MAX)
|
||||
.subtype(PROP_EULER);
|
||||
b.add_input<decl::Vector>(N_("Scale"))
|
||||
b.add_input<decl::Vector>("Scale")
|
||||
.default_value({1.0f, 1.0f, 1.0f})
|
||||
.min(-FLT_MAX)
|
||||
.max(FLT_MAX)
|
||||
.subtype(PROP_XYZ);
|
||||
b.add_output<decl::Vector>(N_("Vector"));
|
||||
b.add_output<decl::Vector>("Vector");
|
||||
}
|
||||
|
||||
static void node_shader_buts_mapping(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -19,16 +19,10 @@ namespace blender::nodes::node_shader_math_cc {
|
||||
static void sh_node_math_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Float>(N_("Value")).default_value(0.5f).min(-10000.0f).max(10000.0f);
|
||||
b.add_input<decl::Float>(N_("Value"), "Value_001")
|
||||
.default_value(0.5f)
|
||||
.min(-10000.0f)
|
||||
.max(10000.0f);
|
||||
b.add_input<decl::Float>(N_("Value"), "Value_002")
|
||||
.default_value(0.5f)
|
||||
.min(-10000.0f)
|
||||
.max(10000.0f);
|
||||
b.add_output<decl::Float>(N_("Value"));
|
||||
b.add_input<decl::Float>("Value").default_value(0.5f).min(-10000.0f).max(10000.0f);
|
||||
b.add_input<decl::Float>("Value", "Value_001").default_value(0.5f).min(-10000.0f).max(10000.0f);
|
||||
b.add_input<decl::Float>("Value", "Value_002").default_value(0.5f).min(-10000.0f).max(10000.0f);
|
||||
b.add_output<decl::Float>("Value");
|
||||
}
|
||||
|
||||
class SocketSearchOp {
|
||||
|
||||
@@ -27,44 +27,43 @@ static void sh_node_mix_declare(NodeDeclarationBuilder &b)
|
||||
/** WARNING:
|
||||
* Input socket indices must be kept in sync with ntree_shader_disconnect_inactive_mix_branches
|
||||
*/
|
||||
b.add_input<decl::Float>(N_("Factor"), "Factor_Float")
|
||||
b.add_input<decl::Float>("Factor", "Factor_Float")
|
||||
.no_muted_links()
|
||||
.default_value(0.5f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Vector>(N_("Factor"), "Factor_Vector")
|
||||
b.add_input<decl::Vector>("Factor", "Factor_Vector")
|
||||
.no_muted_links()
|
||||
.default_value(float3(0.5f))
|
||||
.subtype(PROP_FACTOR);
|
||||
|
||||
b.add_input<decl::Float>(CTX_N_(BLT_I18NCONTEXT_ID_NODETREE, "A"), "A_Float")
|
||||
b.add_input<decl::Float>("A", "A_Float")
|
||||
.min(-10000.0f)
|
||||
.max(10000.0f)
|
||||
.is_default_link_socket()
|
||||
.translation_context(BLT_I18NCONTEXT_ID_NODETREE);
|
||||
b.add_input<decl::Float>(CTX_N_(BLT_I18NCONTEXT_ID_NODETREE, "B"), "B_Float")
|
||||
b.add_input<decl::Float>("B", "B_Float")
|
||||
.min(-10000.0f)
|
||||
.max(10000.0f)
|
||||
.translation_context(BLT_I18NCONTEXT_ID_NODETREE);
|
||||
|
||||
b.add_input<decl::Vector>(CTX_N_(BLT_I18NCONTEXT_ID_NODETREE, "A"), "A_Vector")
|
||||
b.add_input<decl::Vector>("A", "A_Vector")
|
||||
.is_default_link_socket()
|
||||
.translation_context(BLT_I18NCONTEXT_ID_NODETREE);
|
||||
b.add_input<decl::Vector>(CTX_N_(BLT_I18NCONTEXT_ID_NODETREE, "B"), "B_Vector")
|
||||
.translation_context(BLT_I18NCONTEXT_ID_NODETREE);
|
||||
b.add_input<decl::Vector>("B", "B_Vector").translation_context(BLT_I18NCONTEXT_ID_NODETREE);
|
||||
|
||||
b.add_input<decl::Color>(CTX_N_(BLT_I18NCONTEXT_ID_NODETREE, "A"), "A_Color")
|
||||
b.add_input<decl::Color>("A", "A_Color")
|
||||
.default_value({0.5f, 0.5f, 0.5f, 1.0f})
|
||||
.is_default_link_socket()
|
||||
.translation_context(BLT_I18NCONTEXT_ID_NODETREE);
|
||||
b.add_input<decl::Color>(CTX_N_(BLT_I18NCONTEXT_ID_NODETREE, "B"), "B_Color")
|
||||
b.add_input<decl::Color>("B", "B_Color")
|
||||
.default_value({0.5f, 0.5f, 0.5f, 1.0f})
|
||||
.translation_context(BLT_I18NCONTEXT_ID_NODETREE);
|
||||
|
||||
b.add_output<decl::Float>(N_("Result"), "Result_Float");
|
||||
b.add_output<decl::Vector>(N_("Result"), "Result_Vector");
|
||||
b.add_output<decl::Color>(N_("Result"), "Result_Color");
|
||||
b.add_output<decl::Float>("Result", "Result_Float");
|
||||
b.add_output<decl::Vector>("Result", "Result_Vector");
|
||||
b.add_output<decl::Color>("Result", "Result_Color");
|
||||
};
|
||||
|
||||
static void sh_node_mix_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
@@ -226,7 +225,8 @@ static void node_mix_gather_link_searches(GatherLinkSearchOpParams ¶ms)
|
||||
}
|
||||
const std::string socket_name = params.in_out() == SOCK_IN ? "A" : "Result";
|
||||
for (const EnumPropertyItem *item = rna_enum_ramp_blend_items; item->identifier != nullptr;
|
||||
item++) {
|
||||
item++)
|
||||
{
|
||||
if (item->name != nullptr && item->identifier[0] != '\0') {
|
||||
params.add_item(CTX_IFACE_(BLT_I18NCONTEXT_ID_NODETREE, item->name),
|
||||
SocketSearchOp{socket_name, item->value},
|
||||
|
||||
@@ -12,10 +12,10 @@ namespace blender::nodes::node_shader_mix_rgb_cc {
|
||||
static void sh_node_mix_rgb_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Float>(N_("Fac")).default_value(0.5f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Color>(N_("Color1")).default_value({0.5f, 0.5f, 0.5f, 1.0f});
|
||||
b.add_input<decl::Color>(N_("Color2")).default_value({0.5f, 0.5f, 0.5f, 1.0f});
|
||||
b.add_output<decl::Color>(N_("Color"));
|
||||
b.add_input<decl::Float>("Fac").default_value(0.5f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Color>("Color1").default_value({0.5f, 0.5f, 0.5f, 1.0f});
|
||||
b.add_input<decl::Color>("Color2").default_value({0.5f, 0.5f, 0.5f, 1.0f});
|
||||
b.add_output<decl::Color>("Color");
|
||||
}
|
||||
|
||||
static const char *gpu_shader_get_name(int mode)
|
||||
|
||||
@@ -7,10 +7,10 @@ namespace blender::nodes::node_shader_mix_shader_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Fac")).default_value(0.5f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Shader>(N_("Shader"));
|
||||
b.add_input<decl::Shader>(N_("Shader"), "Shader_001");
|
||||
b.add_output<decl::Shader>(N_("Shader"));
|
||||
b.add_input<decl::Float>("Fac").default_value(0.5f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Shader>("Shader");
|
||||
b.add_input<decl::Shader>("Shader", "Shader_001");
|
||||
b.add_output<decl::Shader>("Shader");
|
||||
}
|
||||
|
||||
static int node_shader_gpu_mix_shader(GPUMaterial *mat,
|
||||
|
||||
@@ -11,17 +11,17 @@ namespace blender::nodes::node_shader_normal_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Vector>(N_("Normal"))
|
||||
b.add_input<decl::Vector>("Normal")
|
||||
.default_value({0.0f, 0.0f, 1.0f})
|
||||
.min(-1.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_DIRECTION);
|
||||
b.add_output<decl::Vector>(N_("Normal"))
|
||||
b.add_output<decl::Vector>("Normal")
|
||||
.default_value({0.0f, 0.0f, 1.0f})
|
||||
.min(-1.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_DIRECTION);
|
||||
b.add_output<decl::Float>(N_("Dot"));
|
||||
b.add_output<decl::Float>("Dot");
|
||||
}
|
||||
|
||||
static int gpu_shader_normal(GPUMaterial *mat,
|
||||
|
||||
@@ -15,9 +15,9 @@ namespace blender::nodes::node_shader_normal_map_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Strength")).default_value(1.0f).min(0.0f).max(10.0f);
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({0.5f, 0.5f, 1.0f, 1.0f});
|
||||
b.add_output<decl::Vector>(N_("Normal"));
|
||||
b.add_input<decl::Float>("Strength").default_value(1.0f).min(0.0f).max(10.0f);
|
||||
b.add_input<decl::Color>("Color").default_value({0.5f, 0.5f, 1.0f, 1.0f});
|
||||
b.add_output<decl::Vector>("Normal");
|
||||
}
|
||||
|
||||
static void node_shader_buts_normal_map(uiLayout *layout, bContext *C, PointerRNA *ptr)
|
||||
|
||||
@@ -7,12 +7,12 @@ namespace blender::nodes::node_shader_object_info_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Vector>(N_("Location"));
|
||||
b.add_output<decl::Color>(N_("Color"));
|
||||
b.add_output<decl::Float>(N_("Alpha"));
|
||||
b.add_output<decl::Float>(N_("Object Index"));
|
||||
b.add_output<decl::Float>(N_("Material Index"));
|
||||
b.add_output<decl::Float>(N_("Random"));
|
||||
b.add_output<decl::Vector>("Location");
|
||||
b.add_output<decl::Color>("Color");
|
||||
b.add_output<decl::Float>("Alpha");
|
||||
b.add_output<decl::Float>("Object Index");
|
||||
b.add_output<decl::Float>("Material Index");
|
||||
b.add_output<decl::Float>("Random");
|
||||
}
|
||||
|
||||
static int node_shader_gpu_object_info(GPUMaterial *mat,
|
||||
|
||||
@@ -12,8 +12,8 @@ namespace blender::nodes::node_shader_output_aov_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({0.0f, 0.0f, 0.0f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Value")).default_value(0.0f).min(0.0f).max(1.0f);
|
||||
b.add_input<decl::Color>("Color").default_value({0.0f, 0.0f, 0.0f, 1.0f});
|
||||
b.add_input<decl::Float>("Value").default_value(0.0f).min(0.0f).max(1.0f);
|
||||
}
|
||||
|
||||
static void node_shader_buts_output_aov(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace blender::nodes::node_shader_output_light_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Shader>(N_("Surface"));
|
||||
b.add_input<decl::Shader>("Surface");
|
||||
}
|
||||
|
||||
static int node_shader_gpu_output_light(GPUMaterial *mat,
|
||||
|
||||
@@ -10,18 +10,14 @@ namespace blender::nodes::node_shader_output_linestyle_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({1.0f, 0.0f, 1.0f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Color Fac"))
|
||||
b.add_input<decl::Color>("Color").default_value({1.0f, 0.0f, 1.0f, 1.0f});
|
||||
b.add_input<decl::Float>("Color Fac")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Alpha"))
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Alpha Fac"))
|
||||
b.add_input<decl::Float>("Alpha").default_value(1.0f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>("Alpha Fac")
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
|
||||
@@ -9,11 +9,10 @@ namespace blender::nodes::node_shader_output_material_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Shader>(N_("Surface"));
|
||||
b.add_input<decl::Shader>(CTX_N_(BLT_I18NCONTEXT_ID_ID, "Volume"))
|
||||
.translation_context(BLT_I18NCONTEXT_ID_ID);
|
||||
b.add_input<decl::Vector>(N_("Displacement")).hide_value();
|
||||
b.add_input<decl::Float>(N_("Thickness")).hide_value().unavailable(); /* Not used for now. */
|
||||
b.add_input<decl::Shader>("Surface");
|
||||
b.add_input<decl::Shader>("Volume").translation_context(BLT_I18NCONTEXT_ID_ID);
|
||||
b.add_input<decl::Vector>("Displacement").hide_value();
|
||||
b.add_input<decl::Float>("Thickness").hide_value().unavailable(); /* Not used for now. */
|
||||
}
|
||||
|
||||
static int node_shader_gpu_output_material(GPUMaterial *mat,
|
||||
|
||||
@@ -7,9 +7,8 @@ namespace blender::nodes::node_shader_output_world_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Shader>(N_("Surface"));
|
||||
b.add_input<decl::Shader>(CTX_N_(BLT_I18NCONTEXT_ID_ID, "Volume"))
|
||||
.translation_context(BLT_I18NCONTEXT_ID_ID);
|
||||
b.add_input<decl::Shader>("Surface");
|
||||
b.add_input<decl::Shader>("Volume").translation_context(BLT_I18NCONTEXT_ID_ID);
|
||||
}
|
||||
|
||||
static int node_shader_gpu_output_world(GPUMaterial *mat,
|
||||
|
||||
@@ -9,17 +9,17 @@ namespace blender::nodes::node_shader_particle_info_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Float>(N_("Index"));
|
||||
b.add_output<decl::Float>(N_("Random"));
|
||||
b.add_output<decl::Float>(N_("Age"));
|
||||
b.add_output<decl::Float>(N_("Lifetime"));
|
||||
b.add_output<decl::Vector>(N_("Location"));
|
||||
b.add_output<decl::Float>("Index");
|
||||
b.add_output<decl::Float>("Random");
|
||||
b.add_output<decl::Float>("Age");
|
||||
b.add_output<decl::Float>("Lifetime");
|
||||
b.add_output<decl::Vector>("Location");
|
||||
#if 0 /* quaternion sockets not yet supported */
|
||||
b.add_output<decl::Quaternion>(N_("Rotation"));
|
||||
b.add_output<decl::Quaternion>("Rotation");
|
||||
#endif
|
||||
b.add_output<decl::Float>(N_("Size"));
|
||||
b.add_output<decl::Vector>(N_("Velocity"));
|
||||
b.add_output<decl::Vector>(N_("Angular Velocity"));
|
||||
b.add_output<decl::Float>("Size");
|
||||
b.add_output<decl::Vector>("Velocity");
|
||||
b.add_output<decl::Vector>("Angular Velocity");
|
||||
}
|
||||
|
||||
static int gpu_shader_particle_info(GPUMaterial *mat,
|
||||
|
||||
@@ -7,9 +7,9 @@ namespace blender::nodes::node_shader_point_info_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Vector>(N_("Position"));
|
||||
b.add_output<decl::Float>(N_("Radius"));
|
||||
b.add_output<decl::Float>(N_("Random"));
|
||||
b.add_output<decl::Vector>("Position");
|
||||
b.add_output<decl::Float>("Radius");
|
||||
b.add_output<decl::Float>("Random");
|
||||
}
|
||||
|
||||
static int node_shader_gpu_point_info(GPUMaterial *mat,
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace blender::nodes::node_shader_rgb_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Color>(N_("Color")).default_value({0.5f, 0.5f, 0.5f, 1.0f});
|
||||
b.add_output<decl::Color>("Color").default_value({0.5f, 0.5f, 0.5f, 1.0f});
|
||||
}
|
||||
|
||||
static int gpu_shader_rgb(GPUMaterial *mat,
|
||||
|
||||
@@ -13,8 +13,8 @@ namespace blender::nodes::node_shader_rgb_to_bw_cc {
|
||||
|
||||
static void sh_node_rgbtobw_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({0.5f, 0.5f, 0.5f, 1.0f});
|
||||
b.add_output<decl::Float>(N_("Val"));
|
||||
b.add_input<decl::Color>("Color").default_value({0.5f, 0.5f, 0.5f, 1.0f});
|
||||
b.add_output<decl::Float>("Val");
|
||||
}
|
||||
|
||||
static int gpu_shader_rgbtobw(GPUMaterial *mat,
|
||||
|
||||
@@ -25,10 +25,10 @@ NODE_STORAGE_FUNCS(NodeCombSepColor)
|
||||
|
||||
static void sh_node_sepcolor_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_output<decl::Float>(N_("Red"));
|
||||
b.add_output<decl::Float>(N_("Green"));
|
||||
b.add_output<decl::Float>(N_("Blue"));
|
||||
b.add_input<decl::Color>("Color").default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_output<decl::Float>("Red");
|
||||
b.add_output<decl::Float>("Green");
|
||||
b.add_output<decl::Float>("Blue");
|
||||
}
|
||||
|
||||
static void node_sepcolor_update(bNodeTree * /*ntree*/, bNode *node)
|
||||
@@ -93,18 +93,10 @@ NODE_STORAGE_FUNCS(NodeCombSepColor)
|
||||
|
||||
static void sh_node_combcolor_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Red")).default_value(0.0f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Green"))
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Blue"))
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_output<decl::Color>(N_("Color"));
|
||||
b.add_input<decl::Float>("Red").default_value(0.0f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>("Green").default_value(0.0f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>("Blue").default_value(0.0f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_output<decl::Color>("Color");
|
||||
}
|
||||
|
||||
static void node_combcolor_update(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -13,10 +13,10 @@ namespace blender::nodes::node_shader_sepcomb_hsv_cc {
|
||||
|
||||
static void node_declare_sephsv(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({0.8f, 0.8f, 0.8f, 1.0});
|
||||
b.add_output<decl::Float>(N_("H"));
|
||||
b.add_output<decl::Float>(N_("S"));
|
||||
b.add_output<decl::Float>(N_("V"));
|
||||
b.add_input<decl::Color>("Color").default_value({0.8f, 0.8f, 0.8f, 1.0});
|
||||
b.add_output<decl::Float>("H");
|
||||
b.add_output<decl::Float>("S");
|
||||
b.add_output<decl::Float>("V");
|
||||
}
|
||||
|
||||
static int gpu_shader_sephsv(GPUMaterial *mat,
|
||||
@@ -51,10 +51,10 @@ namespace blender::nodes::node_shader_sepcomb_hsv_cc {
|
||||
|
||||
static void node_declare_combhsv(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("H")).default_value(0.0f).min(0.0f).max(1.0f).subtype(PROP_UNSIGNED);
|
||||
b.add_input<decl::Float>(N_("S")).default_value(0.0f).min(0.0f).max(1.0f).subtype(PROP_UNSIGNED);
|
||||
b.add_input<decl::Float>(N_("V")).default_value(0.0f).min(0.0f).max(1.0f).subtype(PROP_UNSIGNED);
|
||||
b.add_output<decl::Color>(N_("Color"));
|
||||
b.add_input<decl::Float>("H").default_value(0.0f).min(0.0f).max(1.0f).subtype(PROP_UNSIGNED);
|
||||
b.add_input<decl::Float>("S").default_value(0.0f).min(0.0f).max(1.0f).subtype(PROP_UNSIGNED);
|
||||
b.add_input<decl::Float>("V").default_value(0.0f).min(0.0f).max(1.0f).subtype(PROP_UNSIGNED);
|
||||
b.add_output<decl::Color>("Color");
|
||||
}
|
||||
|
||||
static int gpu_shader_combhsv(GPUMaterial *mat,
|
||||
|
||||
@@ -12,10 +12,10 @@ namespace blender::nodes::node_shader_sepcomb_rgb_cc {
|
||||
static void sh_node_seprgb_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Color>(N_("Image")).default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_output<decl::Float>(N_("R"));
|
||||
b.add_output<decl::Float>(N_("G"));
|
||||
b.add_output<decl::Float>(N_("B"));
|
||||
b.add_input<decl::Color>("Image").default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_output<decl::Float>("R");
|
||||
b.add_output<decl::Float>("G");
|
||||
b.add_output<decl::Float>("B");
|
||||
}
|
||||
|
||||
static int gpu_shader_seprgb(GPUMaterial *mat,
|
||||
@@ -90,10 +90,10 @@ namespace blender::nodes::node_shader_sepcomb_rgb_cc {
|
||||
static void sh_node_combrgb_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Float>(N_("R")).min(0.0f).max(1.0f);
|
||||
b.add_input<decl::Float>(N_("G")).min(0.0f).max(1.0f);
|
||||
b.add_input<decl::Float>(N_("B")).min(0.0f).max(1.0f);
|
||||
b.add_output<decl::Color>(N_("Image"));
|
||||
b.add_input<decl::Float>("R").min(0.0f).max(1.0f);
|
||||
b.add_input<decl::Float>("G").min(0.0f).max(1.0f);
|
||||
b.add_input<decl::Float>("B").min(0.0f).max(1.0f);
|
||||
b.add_output<decl::Color>("Image");
|
||||
}
|
||||
|
||||
static int gpu_shader_combrgb(GPUMaterial *mat,
|
||||
|
||||
@@ -12,10 +12,10 @@ namespace blender::nodes::node_shader_sepcomb_xyz_cc {
|
||||
static void sh_node_sepxyz_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Vector>(N_("Vector")).min(-10000.0f).max(10000.0f);
|
||||
b.add_output<decl::Float>(N_("X"));
|
||||
b.add_output<decl::Float>(N_("Y"));
|
||||
b.add_output<decl::Float>(N_("Z"));
|
||||
b.add_input<decl::Vector>("Vector").min(-10000.0f).max(10000.0f);
|
||||
b.add_output<decl::Float>("X");
|
||||
b.add_output<decl::Float>("Y");
|
||||
b.add_output<decl::Float>("Z");
|
||||
}
|
||||
|
||||
static int gpu_shader_sepxyz(GPUMaterial *mat,
|
||||
@@ -106,10 +106,10 @@ namespace blender::nodes::node_shader_sepcomb_xyz_cc {
|
||||
static void sh_node_combxyz_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Float>(N_("X")).min(-10000.0f).max(10000.0f);
|
||||
b.add_input<decl::Float>(N_("Y")).min(-10000.0f).max(10000.0f);
|
||||
b.add_input<decl::Float>(N_("Z")).min(-10000.0f).max(10000.0f);
|
||||
b.add_output<decl::Vector>(N_("Vector"));
|
||||
b.add_input<decl::Float>("X").min(-10000.0f).max(10000.0f);
|
||||
b.add_input<decl::Float>("Y").min(-10000.0f).max(10000.0f);
|
||||
b.add_input<decl::Float>("Z").min(-10000.0f).max(10000.0f);
|
||||
b.add_output<decl::Vector>("Vector");
|
||||
}
|
||||
|
||||
static int gpu_shader_combxyz(GPUMaterial *mat,
|
||||
|
||||
@@ -7,9 +7,9 @@ namespace blender::nodes::node_shader_shader_to_rgb_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Shader>(N_("Shader"));
|
||||
b.add_output<decl::Color>(N_("Color"));
|
||||
b.add_output<decl::Float>(N_("Alpha"));
|
||||
b.add_input<decl::Shader>("Shader");
|
||||
b.add_output<decl::Color>("Color");
|
||||
b.add_output<decl::Float>("Alpha");
|
||||
}
|
||||
|
||||
static int node_shader_gpu_shadertorgb(GPUMaterial *mat,
|
||||
|
||||
@@ -11,10 +11,10 @@ namespace blender::nodes::node_shader_squeeze_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Value")).default_value(0.0f).min(-100.0f).max(100.0f);
|
||||
b.add_input<decl::Float>(N_("Width")).default_value(1.0f).min(-100.0f).max(100.0f);
|
||||
b.add_input<decl::Float>(N_("Center")).default_value(0.0f).min(-100.0f).max(100.0f);
|
||||
b.add_output<decl::Float>(N_("Value"));
|
||||
b.add_input<decl::Float>("Value").default_value(0.0f).min(-100.0f).max(100.0f);
|
||||
b.add_input<decl::Float>("Width").default_value(1.0f).min(-100.0f).max(100.0f);
|
||||
b.add_input<decl::Float>("Center").default_value(0.0f).min(-100.0f).max(100.0f);
|
||||
b.add_output<decl::Float>("Value");
|
||||
}
|
||||
|
||||
static int gpu_shader_squeeze(GPUMaterial *mat,
|
||||
|
||||
@@ -12,23 +12,22 @@ namespace blender::nodes::node_shader_subsurface_scattering_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Scale")).default_value(1.0f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Vector>(N_("Radius"))
|
||||
b.add_input<decl::Color>("Color").default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Float>("Scale").default_value(1.0f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Vector>("Radius")
|
||||
.default_value({1.0f, 0.2f, 0.1f})
|
||||
.min(0.0f)
|
||||
.max(100.0f)
|
||||
.compact();
|
||||
b.add_input<decl::Float>(N_("IOR")).default_value(1.4f).min(1.01f).max(3.8f).subtype(
|
||||
PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Anisotropy"))
|
||||
b.add_input<decl::Float>("IOR").default_value(1.4f).min(1.01f).max(3.8f).subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>("Anisotropy")
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Vector>(N_("Normal")).hide_value();
|
||||
b.add_input<decl::Float>(N_("Weight")).unavailable();
|
||||
b.add_output<decl::Shader>(N_("BSSRDF"));
|
||||
b.add_input<decl::Vector>("Normal").hide_value();
|
||||
b.add_input<decl::Float>("Weight").unavailable();
|
||||
b.add_output<decl::Shader>("BSSRDF");
|
||||
}
|
||||
|
||||
static void node_shader_buts_subsurface(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace blender::nodes::node_shader_tangent_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Vector>(N_("Tangent"));
|
||||
b.add_output<decl::Vector>("Tangent");
|
||||
}
|
||||
|
||||
static void node_shader_buts_tangent(uiLayout *layout, bContext *C, PointerRNA *ptr)
|
||||
|
||||
@@ -13,41 +13,39 @@ namespace blender::nodes::node_shader_tex_brick_cc {
|
||||
static void sh_node_tex_brick_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Vector>(N_("Vector"))
|
||||
.min(-10000.0f)
|
||||
.max(10000.0f)
|
||||
.implicit_field(implicit_field_inputs::position);
|
||||
b.add_input<decl::Color>(N_("Color1")).default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Color>(N_("Color2")).default_value({0.2f, 0.2f, 0.2f, 1.0f});
|
||||
b.add_input<decl::Color>(N_("Mortar")).default_value({0.0f, 0.0f, 0.0f, 1.0f}).no_muted_links();
|
||||
b.add_input<decl::Float>(N_("Scale"))
|
||||
b.add_input<decl::Vector>("Vector").min(-10000.0f).max(10000.0f).implicit_field(
|
||||
implicit_field_inputs::position);
|
||||
b.add_input<decl::Color>("Color1").default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Color>("Color2").default_value({0.2f, 0.2f, 0.2f, 1.0f});
|
||||
b.add_input<decl::Color>("Mortar").default_value({0.0f, 0.0f, 0.0f, 1.0f}).no_muted_links();
|
||||
b.add_input<decl::Float>("Scale")
|
||||
.min(-1000.0f)
|
||||
.max(1000.0f)
|
||||
.default_value(5.0f)
|
||||
.no_muted_links();
|
||||
b.add_input<decl::Float>(N_("Mortar Size"))
|
||||
b.add_input<decl::Float>("Mortar Size")
|
||||
.min(0.0f)
|
||||
.max(0.125f)
|
||||
.default_value(0.02f)
|
||||
.no_muted_links();
|
||||
b.add_input<decl::Float>(N_("Mortar Smooth"))
|
||||
b.add_input<decl::Float>("Mortar Smooth")
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.default_value(0.1f)
|
||||
.no_muted_links();
|
||||
b.add_input<decl::Float>(N_("Bias")).min(-1.0f).max(1.0f).no_muted_links();
|
||||
b.add_input<decl::Float>(N_("Brick Width"))
|
||||
b.add_input<decl::Float>("Bias").min(-1.0f).max(1.0f).no_muted_links();
|
||||
b.add_input<decl::Float>("Brick Width")
|
||||
.min(0.01f)
|
||||
.max(100.0f)
|
||||
.default_value(0.5f)
|
||||
.no_muted_links();
|
||||
b.add_input<decl::Float>(N_("Row Height"))
|
||||
b.add_input<decl::Float>("Row Height")
|
||||
.min(0.01f)
|
||||
.max(100.0f)
|
||||
.default_value(0.25f)
|
||||
.no_muted_links();
|
||||
b.add_output<decl::Color>(N_("Color"));
|
||||
b.add_output<decl::Float>(N_("Fac"));
|
||||
b.add_output<decl::Color>("Color");
|
||||
b.add_output<decl::Float>("Fac");
|
||||
}
|
||||
|
||||
static void node_shader_buts_tex_brick(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -8,19 +8,17 @@ namespace blender::nodes::node_shader_tex_checker_cc {
|
||||
static void sh_node_tex_checker_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Vector>(N_("Vector"))
|
||||
.min(-10000.0f)
|
||||
.max(10000.0f)
|
||||
.implicit_field(implicit_field_inputs::position);
|
||||
b.add_input<decl::Color>(N_("Color1")).default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Color>(N_("Color2")).default_value({0.2f, 0.2f, 0.2f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Scale"))
|
||||
b.add_input<decl::Vector>("Vector").min(-10000.0f).max(10000.0f).implicit_field(
|
||||
implicit_field_inputs::position);
|
||||
b.add_input<decl::Color>("Color1").default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Color>("Color2").default_value({0.2f, 0.2f, 0.2f, 1.0f});
|
||||
b.add_input<decl::Float>("Scale")
|
||||
.min(-10000.0f)
|
||||
.max(10000.0f)
|
||||
.default_value(5.0f)
|
||||
.no_muted_links();
|
||||
b.add_output<decl::Color>(N_("Color"));
|
||||
b.add_output<decl::Float>(N_("Fac"));
|
||||
b.add_output<decl::Color>("Color");
|
||||
b.add_output<decl::Float>("Fac");
|
||||
}
|
||||
|
||||
static void node_shader_init_tex_checker(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -12,13 +12,13 @@ namespace blender::nodes::node_shader_tex_coord_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Vector>(N_("Generated"));
|
||||
b.add_output<decl::Vector>(N_("Normal"));
|
||||
b.add_output<decl::Vector>(N_("UV"));
|
||||
b.add_output<decl::Vector>(N_("Object"));
|
||||
b.add_output<decl::Vector>(N_("Camera"));
|
||||
b.add_output<decl::Vector>(N_("Window"));
|
||||
b.add_output<decl::Vector>(N_("Reflection"));
|
||||
b.add_output<decl::Vector>("Generated");
|
||||
b.add_output<decl::Vector>("Normal");
|
||||
b.add_output<decl::Vector>("UV");
|
||||
b.add_output<decl::Vector>("Object");
|
||||
b.add_output<decl::Vector>("Camera");
|
||||
b.add_output<decl::Vector>("Window");
|
||||
b.add_output<decl::Vector>("Reflection");
|
||||
}
|
||||
|
||||
static void node_shader_buts_tex_coord(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -9,8 +9,8 @@ namespace blender::nodes::node_shader_tex_environment_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Vector>(N_("Vector")).hide_value();
|
||||
b.add_output<decl::Color>(N_("Color")).no_muted_links();
|
||||
b.add_input<decl::Vector>("Vector").hide_value();
|
||||
b.add_output<decl::Color>("Color").no_muted_links();
|
||||
}
|
||||
|
||||
static void node_shader_init_tex_environment(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -11,11 +11,9 @@ namespace blender::nodes::node_shader_tex_gradient_cc {
|
||||
static void sh_node_tex_gradient_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Vector>(N_("Vector"))
|
||||
.hide_value()
|
||||
.implicit_field(implicit_field_inputs::position);
|
||||
b.add_output<decl::Color>(N_("Color")).no_muted_links();
|
||||
b.add_output<decl::Float>(N_("Fac")).no_muted_links();
|
||||
b.add_input<decl::Vector>("Vector").hide_value().implicit_field(implicit_field_inputs::position);
|
||||
b.add_output<decl::Color>("Color").no_muted_links();
|
||||
b.add_output<decl::Float>("Fac").no_muted_links();
|
||||
}
|
||||
|
||||
static void node_shader_buts_tex_gradient(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -10,9 +10,9 @@ namespace blender::nodes::node_shader_tex_image_cc {
|
||||
static void sh_node_tex_image_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Vector>(N_("Vector")).implicit_field(implicit_field_inputs::position);
|
||||
b.add_output<decl::Color>(N_("Color")).no_muted_links();
|
||||
b.add_output<decl::Float>(N_("Alpha")).no_muted_links();
|
||||
b.add_input<decl::Vector>("Vector").implicit_field(implicit_field_inputs::position);
|
||||
b.add_output<decl::Color>("Color").no_muted_links();
|
||||
b.add_output<decl::Float>("Alpha").no_muted_links();
|
||||
}
|
||||
|
||||
static void node_shader_init_tex_image(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -11,11 +11,11 @@ namespace blender::nodes::node_shader_tex_magic_cc {
|
||||
static void sh_node_tex_magic_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Vector>(N_("Vector")).implicit_field(implicit_field_inputs::position);
|
||||
b.add_input<decl::Float>(N_("Scale")).min(-1000.0f).max(1000.0f).default_value(5.0f);
|
||||
b.add_input<decl::Float>(N_("Distortion")).min(-1000.0f).max(1000.0f).default_value(1.0f);
|
||||
b.add_output<decl::Color>(N_("Color")).no_muted_links();
|
||||
b.add_output<decl::Float>(N_("Fac")).no_muted_links();
|
||||
b.add_input<decl::Vector>("Vector").implicit_field(implicit_field_inputs::position);
|
||||
b.add_input<decl::Float>("Scale").min(-1000.0f).max(1000.0f).default_value(5.0f);
|
||||
b.add_input<decl::Float>("Distortion").min(-1000.0f).max(1000.0f).default_value(1.0f);
|
||||
b.add_output<decl::Color>("Color").no_muted_links();
|
||||
b.add_output<decl::Float>("Fac").no_muted_links();
|
||||
}
|
||||
|
||||
static void node_shader_buts_tex_magic(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -15,20 +15,18 @@ NODE_STORAGE_FUNCS(NodeTexMusgrave)
|
||||
static void sh_node_tex_musgrave_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Vector>(N_("Vector"))
|
||||
.hide_value()
|
||||
.implicit_field(implicit_field_inputs::position);
|
||||
b.add_input<decl::Float>(N_("W")).min(-1000.0f).max(1000.0f).make_available([](bNode &node) {
|
||||
b.add_input<decl::Vector>("Vector").hide_value().implicit_field(implicit_field_inputs::position);
|
||||
b.add_input<decl::Float>("W").min(-1000.0f).max(1000.0f).make_available([](bNode &node) {
|
||||
/* Default to 1 instead of 4, because it is much faster. */
|
||||
node_storage(node).dimensions = 1;
|
||||
});
|
||||
b.add_input<decl::Float>(N_("Scale")).min(-1000.0f).max(1000.0f).default_value(5.0f);
|
||||
b.add_input<decl::Float>(N_("Detail")).min(0.0f).max(15.0f).default_value(2.0f);
|
||||
b.add_input<decl::Float>(N_("Dimension")).min(0.0f).max(1000.0f).default_value(2.0f);
|
||||
b.add_input<decl::Float>(N_("Lacunarity")).min(0.0f).max(1000.0f).default_value(2.0f);
|
||||
b.add_input<decl::Float>(N_("Offset")).min(-1000.0f).max(1000.0f);
|
||||
b.add_input<decl::Float>(N_("Gain")).min(0.0f).max(1000.0f).default_value(1.0f);
|
||||
b.add_output<decl::Float>(N_("Fac")).no_muted_links();
|
||||
b.add_input<decl::Float>("Scale").min(-1000.0f).max(1000.0f).default_value(5.0f);
|
||||
b.add_input<decl::Float>("Detail").min(0.0f).max(15.0f).default_value(2.0f);
|
||||
b.add_input<decl::Float>("Dimension").min(0.0f).max(1000.0f).default_value(2.0f);
|
||||
b.add_input<decl::Float>("Lacunarity").min(0.0f).max(1000.0f).default_value(2.0f);
|
||||
b.add_input<decl::Float>("Offset").min(-1000.0f).max(1000.0f);
|
||||
b.add_input<decl::Float>("Gain").min(0.0f).max(1000.0f).default_value(1.0f);
|
||||
b.add_output<decl::Float>("Fac").no_muted_links();
|
||||
}
|
||||
|
||||
static void node_shader_buts_tex_musgrave(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -15,21 +15,21 @@ NODE_STORAGE_FUNCS(NodeTexNoise)
|
||||
static void sh_node_tex_noise_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Vector>(N_("Vector")).implicit_field(implicit_field_inputs::position);
|
||||
b.add_input<decl::Float>(N_("W")).min(-1000.0f).max(1000.0f).make_available([](bNode &node) {
|
||||
b.add_input<decl::Vector>("Vector").implicit_field(implicit_field_inputs::position);
|
||||
b.add_input<decl::Float>("W").min(-1000.0f).max(1000.0f).make_available([](bNode &node) {
|
||||
/* Default to 1 instead of 4, because it is much faster. */
|
||||
node_storage(node).dimensions = 1;
|
||||
});
|
||||
b.add_input<decl::Float>(N_("Scale")).min(-1000.0f).max(1000.0f).default_value(5.0f);
|
||||
b.add_input<decl::Float>(N_("Detail")).min(0.0f).max(15.0f).default_value(2.0f);
|
||||
b.add_input<decl::Float>(N_("Roughness"))
|
||||
b.add_input<decl::Float>("Scale").min(-1000.0f).max(1000.0f).default_value(5.0f);
|
||||
b.add_input<decl::Float>("Detail").min(0.0f).max(15.0f).default_value(2.0f);
|
||||
b.add_input<decl::Float>("Roughness")
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.default_value(0.5f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Distortion")).min(-1000.0f).max(1000.0f).default_value(0.0f);
|
||||
b.add_output<decl::Float>(N_("Fac")).no_muted_links();
|
||||
b.add_output<decl::Color>(N_("Color")).no_muted_links();
|
||||
b.add_input<decl::Float>("Distortion").min(-1000.0f).max(1000.0f).default_value(0.0f);
|
||||
b.add_output<decl::Float>("Fac").no_muted_links();
|
||||
b.add_output<decl::Color>("Color").no_muted_links();
|
||||
}
|
||||
|
||||
static void node_shader_buts_tex_noise(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -12,9 +12,9 @@ namespace blender::nodes::node_shader_tex_pointdensity_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Vector>(N_("Vector")).hide_value();
|
||||
b.add_output<decl::Color>(N_("Color"));
|
||||
b.add_output<decl::Float>(N_("Density"));
|
||||
b.add_input<decl::Vector>("Vector").hide_value();
|
||||
b.add_output<decl::Color>("Color");
|
||||
b.add_output<decl::Float>("Density");
|
||||
}
|
||||
|
||||
static void node_shader_buts_tex_pointdensity(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -18,8 +18,8 @@ namespace blender::nodes::node_shader_tex_sky_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Vector>(N_("Vector")).hide_value();
|
||||
b.add_output<decl::Color>(N_("Color")).no_muted_links();
|
||||
b.add_input<decl::Vector>("Vector").hide_value();
|
||||
b.add_output<decl::Color>("Color").no_muted_links();
|
||||
}
|
||||
|
||||
static void node_shader_buts_tex_sky(uiLayout *layout, bContext *C, PointerRNA *ptr)
|
||||
|
||||
@@ -15,40 +15,37 @@ NODE_STORAGE_FUNCS(NodeTexVoronoi)
|
||||
static void sh_node_tex_voronoi_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Vector>(N_("Vector"))
|
||||
.hide_value()
|
||||
.implicit_field(implicit_field_inputs::position);
|
||||
b.add_input<decl::Float>(N_("W")).min(-1000.0f).max(1000.0f).make_available([](bNode &node) {
|
||||
b.add_input<decl::Vector>("Vector").hide_value().implicit_field(implicit_field_inputs::position);
|
||||
b.add_input<decl::Float>("W").min(-1000.0f).max(1000.0f).make_available([](bNode &node) {
|
||||
/* Default to 1 instead of 4, because it is much faster. */
|
||||
node_storage(node).dimensions = 1;
|
||||
});
|
||||
b.add_input<decl::Float>(N_("Scale")).min(-1000.0f).max(1000.0f).default_value(5.0f);
|
||||
b.add_input<decl::Float>(N_("Smoothness"))
|
||||
b.add_input<decl::Float>("Scale").min(-1000.0f).max(1000.0f).default_value(5.0f);
|
||||
b.add_input<decl::Float>("Smoothness")
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.default_value(1.0f)
|
||||
.subtype(PROP_FACTOR)
|
||||
.make_available([](bNode &node) { node_storage(node).feature = SHD_VORONOI_SMOOTH_F1; });
|
||||
b.add_input<decl::Float>(N_("Exponent"))
|
||||
b.add_input<decl::Float>("Exponent")
|
||||
.min(0.0f)
|
||||
.max(32.0f)
|
||||
.default_value(0.5f)
|
||||
.make_available([](bNode &node) { node_storage(node).distance = SHD_VORONOI_MINKOWSKI; });
|
||||
b.add_input<decl::Float>(N_("Randomness"))
|
||||
b.add_input<decl::Float>("Randomness")
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.default_value(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_output<decl::Float>(N_("Distance")).no_muted_links();
|
||||
b.add_output<decl::Color>(N_("Color")).no_muted_links();
|
||||
b.add_output<decl::Vector>(N_("Position")).no_muted_links();
|
||||
b.add_output<decl::Float>(N_("W")).no_muted_links().make_available([](bNode &node) {
|
||||
b.add_output<decl::Float>("Distance").no_muted_links();
|
||||
b.add_output<decl::Color>("Color").no_muted_links();
|
||||
b.add_output<decl::Vector>("Position").no_muted_links();
|
||||
b.add_output<decl::Float>("W").no_muted_links().make_available([](bNode &node) {
|
||||
/* Default to 1 instead of 4, because it is much faster. */
|
||||
node_storage(node).dimensions = 1;
|
||||
});
|
||||
b.add_output<decl::Float>(N_("Radius")).no_muted_links().make_available([](bNode &node) {
|
||||
node_storage(node).feature = SHD_VORONOI_N_SPHERE_RADIUS;
|
||||
});
|
||||
b.add_output<decl::Float>("Radius").no_muted_links().make_available(
|
||||
[](bNode &node) { node_storage(node).feature = SHD_VORONOI_N_SPHERE_RADIUS; });
|
||||
}
|
||||
|
||||
static void node_shader_buts_tex_voronoi(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -13,19 +13,19 @@ namespace blender::nodes::node_shader_tex_wave_cc {
|
||||
static void sh_node_tex_wave_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Vector>(N_("Vector")).implicit_field(implicit_field_inputs::position);
|
||||
b.add_input<decl::Float>(N_("Scale")).min(-1000.0f).max(1000.0f).default_value(5.0f);
|
||||
b.add_input<decl::Float>(N_("Distortion")).min(-1000.0f).max(1000.0f).default_value(0.0f);
|
||||
b.add_input<decl::Float>(N_("Detail")).min(0.0f).max(15.0f).default_value(2.0f);
|
||||
b.add_input<decl::Float>(N_("Detail Scale")).min(-1000.0f).max(1000.0f).default_value(1.0f);
|
||||
b.add_input<decl::Float>(N_("Detail Roughness"))
|
||||
b.add_input<decl::Vector>("Vector").implicit_field(implicit_field_inputs::position);
|
||||
b.add_input<decl::Float>("Scale").min(-1000.0f).max(1000.0f).default_value(5.0f);
|
||||
b.add_input<decl::Float>("Distortion").min(-1000.0f).max(1000.0f).default_value(0.0f);
|
||||
b.add_input<decl::Float>("Detail").min(0.0f).max(15.0f).default_value(2.0f);
|
||||
b.add_input<decl::Float>("Detail Scale").min(-1000.0f).max(1000.0f).default_value(1.0f);
|
||||
b.add_input<decl::Float>("Detail Roughness")
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.default_value(0.5f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Phase Offset")).min(-1000.0f).max(1000.0f).default_value(0.0f);
|
||||
b.add_output<decl::Color>(N_("Color")).no_muted_links();
|
||||
b.add_output<decl::Float>(N_("Fac")).no_muted_links();
|
||||
b.add_input<decl::Float>("Phase Offset").min(-1000.0f).max(1000.0f).default_value(0.0f);
|
||||
b.add_output<decl::Color>("Color").no_muted_links();
|
||||
b.add_output<decl::Float>("Fac").no_muted_links();
|
||||
}
|
||||
|
||||
static void node_shader_buts_tex_wave(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -13,16 +13,14 @@ namespace blender::nodes::node_shader_tex_white_noise_cc {
|
||||
static void sh_node_tex_white_noise_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Vector>(N_("Vector"))
|
||||
.min(-10000.0f)
|
||||
.max(10000.0f)
|
||||
.implicit_field(implicit_field_inputs::position);
|
||||
b.add_input<decl::Float>(N_("W")).min(-10000.0f).max(10000.0f).make_available([](bNode &node) {
|
||||
b.add_input<decl::Vector>("Vector").min(-10000.0f).max(10000.0f).implicit_field(
|
||||
implicit_field_inputs::position);
|
||||
b.add_input<decl::Float>("W").min(-10000.0f).max(10000.0f).make_available([](bNode &node) {
|
||||
/* Default to 1 instead of 4, because it is faster. */
|
||||
node.custom1 = 1;
|
||||
});
|
||||
b.add_output<decl::Float>(N_("Value"));
|
||||
b.add_output<decl::Color>(N_("Color"));
|
||||
b.add_output<decl::Float>("Value");
|
||||
b.add_output<decl::Color>("Color");
|
||||
}
|
||||
|
||||
static void node_shader_buts_white_noise(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace blender::nodes::node_shader_uv_along_stroke_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Vector>(N_("UV"));
|
||||
b.add_output<decl::Vector>("UV");
|
||||
}
|
||||
|
||||
static void node_shader_buts_uvalongstroke(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace blender::nodes::node_shader_uvmap_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Vector>(N_("UV"));
|
||||
b.add_output<decl::Vector>("UV");
|
||||
}
|
||||
|
||||
static void node_shader_buts_uvmap(uiLayout *layout, bContext *C, PointerRNA *ptr)
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace blender::nodes::node_shader_value_cc {
|
||||
|
||||
static void sh_node_value_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Float>(N_("Value"));
|
||||
b.add_output<decl::Float>("Value");
|
||||
}
|
||||
|
||||
static int gpu_shader_value(GPUMaterial *mat,
|
||||
|
||||
@@ -7,10 +7,10 @@ namespace blender::nodes::node_shader_vector_displacement_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Vector")).hide_value();
|
||||
b.add_input<decl::Float>(N_("Midlevel")).default_value(0.0f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Float>(N_("Scale")).default_value(1.0f).min(0.0f).max(1000.0f);
|
||||
b.add_output<decl::Vector>(N_("Displacement"));
|
||||
b.add_input<decl::Color>("Vector").hide_value();
|
||||
b.add_input<decl::Float>("Midlevel").default_value(0.0f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Float>("Scale").default_value(1.0f).min(0.0f).max(1000.0f);
|
||||
b.add_output<decl::Vector>("Displacement");
|
||||
}
|
||||
|
||||
static void node_shader_init_vector_displacement(bNodeTree * /*ntree*/, bNode *node)
|
||||
|
||||
@@ -20,12 +20,12 @@ namespace blender::nodes::node_shader_vector_math_cc {
|
||||
static void sh_node_vector_math_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Vector>(N_("Vector")).min(-10000.0f).max(10000.0f);
|
||||
b.add_input<decl::Vector>(N_("Vector"), "Vector_001").min(-10000.0f).max(10000.0f);
|
||||
b.add_input<decl::Vector>(N_("Vector"), "Vector_002").min(-10000.0f).max(10000.0f);
|
||||
b.add_input<decl::Float>(N_("Scale")).default_value(1.0f).min(-10000.0f).max(10000.0f);
|
||||
b.add_output<decl::Vector>(N_("Vector"));
|
||||
b.add_output<decl::Float>(N_("Value"));
|
||||
b.add_input<decl::Vector>("Vector").min(-10000.0f).max(10000.0f);
|
||||
b.add_input<decl::Vector>("Vector", "Vector_001").min(-10000.0f).max(10000.0f);
|
||||
b.add_input<decl::Vector>("Vector", "Vector_002").min(-10000.0f).max(10000.0f);
|
||||
b.add_input<decl::Float>("Scale").default_value(1.0f).min(-10000.0f).max(10000.0f);
|
||||
b.add_output<decl::Vector>("Vector");
|
||||
b.add_output<decl::Float>("Value");
|
||||
}
|
||||
|
||||
static void node_shader_buts_vect_math(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -15,18 +15,18 @@ namespace blender::nodes::node_shader_vector_rotate_cc {
|
||||
static void sh_node_vector_rotate_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.is_function_node();
|
||||
b.add_input<decl::Vector>(N_("Vector")).min(0.0f).max(1.0f).hide_value();
|
||||
b.add_input<decl::Vector>(N_("Center"));
|
||||
b.add_input<decl::Vector>(N_("Axis"))
|
||||
b.add_input<decl::Vector>("Vector").min(0.0f).max(1.0f).hide_value();
|
||||
b.add_input<decl::Vector>("Center");
|
||||
b.add_input<decl::Vector>("Axis")
|
||||
.min(-1.0f)
|
||||
.max(1.0f)
|
||||
.default_value({0.0f, 0.0f, 1.0f})
|
||||
.make_available([](bNode &node) { node.custom1 = NODE_VECTOR_ROTATE_TYPE_AXIS; });
|
||||
b.add_input<decl::Float>(N_("Angle")).subtype(PROP_ANGLE);
|
||||
b.add_input<decl::Vector>(N_("Rotation")).subtype(PROP_EULER).make_available([](bNode &node) {
|
||||
b.add_input<decl::Float>("Angle").subtype(PROP_ANGLE);
|
||||
b.add_input<decl::Vector>("Rotation").subtype(PROP_EULER).make_available([](bNode &node) {
|
||||
node.custom1 = NODE_VECTOR_ROTATE_TYPE_EULER_XYZ;
|
||||
});
|
||||
b.add_output<decl::Vector>(N_("Vector"));
|
||||
b.add_output<decl::Vector>("Vector");
|
||||
}
|
||||
|
||||
static void node_shader_buts_vector_rotate(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -14,11 +14,11 @@ namespace blender::nodes::node_shader_vector_transform_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Vector>(N_("Vector"))
|
||||
b.add_input<decl::Vector>("Vector")
|
||||
.default_value({0.5f, 0.5f, 0.5f})
|
||||
.min(-10000.0f)
|
||||
.max(10000.0f);
|
||||
b.add_output<decl::Vector>(N_("Vector"));
|
||||
b.add_output<decl::Vector>("Vector");
|
||||
}
|
||||
|
||||
static void node_shader_buts_vect_transform(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
@@ -14,8 +14,8 @@ namespace blender::nodes::node_shader_vertex_color_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Color>(N_("Color"));
|
||||
b.add_output<decl::Float>(N_("Alpha"));
|
||||
b.add_output<decl::Color>("Color");
|
||||
b.add_output<decl::Float>("Alpha");
|
||||
}
|
||||
|
||||
static void node_shader_buts_vertex_color(uiLayout *layout, bContext *C, PointerRNA *ptr)
|
||||
|
||||
@@ -7,11 +7,10 @@ namespace blender::nodes::node_shader_volume_absorption_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Density")).default_value(1.0f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Float>(N_("Weight")).unavailable();
|
||||
b.add_output<decl::Shader>(CTX_N_(BLT_I18NCONTEXT_ID_ID, "Volume"))
|
||||
.translation_context(BLT_I18NCONTEXT_ID_ID);
|
||||
b.add_input<decl::Color>("Color").default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Float>("Density").default_value(1.0f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Float>("Weight").unavailable();
|
||||
b.add_output<decl::Shader>("Volume").translation_context(BLT_I18NCONTEXT_ID_ID);
|
||||
}
|
||||
|
||||
static int node_shader_gpu_volume_absorption(GPUMaterial *mat,
|
||||
|
||||
@@ -7,10 +7,10 @@ namespace blender::nodes::node_shader_volume_info_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Color>(N_("Color"));
|
||||
b.add_output<decl::Float>(N_("Density"));
|
||||
b.add_output<decl::Float>(N_("Flame"));
|
||||
b.add_output<decl::Float>(N_("Temperature"));
|
||||
b.add_output<decl::Color>("Color");
|
||||
b.add_output<decl::Float>("Density");
|
||||
b.add_output<decl::Float>("Flame");
|
||||
b.add_output<decl::Float>("Temperature");
|
||||
}
|
||||
|
||||
static int node_shader_gpu_volume_info(GPUMaterial *mat,
|
||||
|
||||
@@ -9,29 +9,28 @@ namespace blender::nodes::node_shader_volume_principled_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({0.5f, 0.5f, 0.5f, 1.0f});
|
||||
b.add_input<decl::String>(N_("Color Attribute"));
|
||||
b.add_input<decl::Float>(N_("Density")).default_value(1.0f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::String>(N_("Density Attribute")).default_value("density");
|
||||
b.add_input<decl::Float>(N_("Anisotropy"))
|
||||
b.add_input<decl::Color>("Color").default_value({0.5f, 0.5f, 0.5f, 1.0f});
|
||||
b.add_input<decl::String>("Color Attribute");
|
||||
b.add_input<decl::Float>("Density").default_value(1.0f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::String>("Density Attribute").default_value("density");
|
||||
b.add_input<decl::Float>("Anisotropy")
|
||||
.default_value(0.0f)
|
||||
.min(-1.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Color>(N_("Absorption Color")).default_value({0.0f, 0.0f, 0.0f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Emission Strength")).default_value(0.0f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Color>(N_("Emission Color")).default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Blackbody Intensity"))
|
||||
b.add_input<decl::Color>("Absorption Color").default_value({0.0f, 0.0f, 0.0f, 1.0f});
|
||||
b.add_input<decl::Float>("Emission Strength").default_value(0.0f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Color>("Emission Color").default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_input<decl::Float>("Blackbody Intensity")
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Color>(N_("Blackbody Tint")).default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Temperature")).default_value(1000.0f).min(0.0f).max(6500.0f);
|
||||
b.add_input<decl::String>(N_("Temperature Attribute")).default_value("temperature");
|
||||
b.add_input<decl::Float>(N_("Weight")).unavailable();
|
||||
b.add_output<decl::Shader>(CTX_N_(BLT_I18NCONTEXT_ID_ID, "Volume"))
|
||||
.translation_context(BLT_I18NCONTEXT_ID_ID);
|
||||
b.add_input<decl::Color>("Blackbody Tint").default_value({1.0f, 1.0f, 1.0f, 1.0f});
|
||||
b.add_input<decl::Float>("Temperature").default_value(1000.0f).min(0.0f).max(6500.0f);
|
||||
b.add_input<decl::String>("Temperature Attribute").default_value("temperature");
|
||||
b.add_input<decl::Float>("Weight").unavailable();
|
||||
b.add_output<decl::Shader>("Volume").translation_context(BLT_I18NCONTEXT_ID_ID);
|
||||
}
|
||||
|
||||
static void attribute_post_process(GPUMaterial *mat,
|
||||
|
||||
@@ -7,16 +7,15 @@ namespace blender::nodes::node_shader_volume_scatter_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Float>(N_("Density")).default_value(1.0f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Float>(N_("Anisotropy"))
|
||||
b.add_input<decl::Color>("Color").default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_input<decl::Float>("Density").default_value(1.0f).min(0.0f).max(1000.0f);
|
||||
b.add_input<decl::Float>("Anisotropy")
|
||||
.default_value(0.0f)
|
||||
.min(-1.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Weight")).unavailable();
|
||||
b.add_output<decl::Shader>(CTX_N_(BLT_I18NCONTEXT_ID_ID, "Volume"))
|
||||
.translation_context(BLT_I18NCONTEXT_ID_ID);
|
||||
b.add_input<decl::Float>("Weight").unavailable();
|
||||
b.add_output<decl::Shader>("Volume").translation_context(BLT_I18NCONTEXT_ID_ID);
|
||||
}
|
||||
|
||||
static int node_shader_gpu_volume_scatter(GPUMaterial *mat,
|
||||
|
||||
@@ -9,8 +9,8 @@ namespace blender::nodes::node_shader_wavelength_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Wavelength")).default_value(500.0f).min(380.0f).max(780.0f);
|
||||
b.add_output<decl::Color>(N_("Color"));
|
||||
b.add_input<decl::Float>("Wavelength").default_value(500.0f).min(380.0f).max(780.0f);
|
||||
b.add_output<decl::Color>("Color");
|
||||
}
|
||||
|
||||
static int node_shader_gpu_wavelength(GPUMaterial *mat,
|
||||
|
||||
@@ -10,8 +10,8 @@ namespace blender::nodes::node_shader_wireframe_cc {
|
||||
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Size")).default_value(0.01f).min(0.0f).max(100.0f);
|
||||
b.add_output<decl::Float>(N_("Fac"));
|
||||
b.add_input<decl::Float>("Size").default_value(0.01f).min(0.0f).max(100.0f);
|
||||
b.add_output<decl::Float>("Fac");
|
||||
}
|
||||
|
||||
static void node_shader_buts_wireframe(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
|
||||
Reference in New Issue
Block a user