diff --git a/source/blender/makesrna/intern/rna_nodetree.cc b/source/blender/makesrna/intern/rna_nodetree.cc index a3bd1d2ae56..663ec245973 100644 --- a/source/blender/makesrna/intern/rna_nodetree.cc +++ b/source/blender/makesrna/intern/rna_nodetree.cc @@ -9717,22 +9717,11 @@ static void def_cmp_bokehblur(BlenderRNA * /*brna*/, StructRNA *srna) prop, "Extend Bounds", "Extend bounds of the input image to fully fit blurred image"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); -# if 0 - prop = RNA_def_property(srna, "f_stop", PROP_FLOAT, PROP_NONE); - RNA_def_property_float_sdna(prop, nullptr, "custom3"); - RNA_def_property_range(prop, 0.0f, 128.0f); - RNA_def_property_ui_text( - prop, - "F-Stop", - "Amount of focal blur, 128 (infinity) is perfect focus, half the value doubles " - "the blur radius"); - RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); -# endif - prop = RNA_def_property(srna, "blur_max", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, nullptr, "custom4"); RNA_def_property_range(prop, 0.0f, 10000.0f); - RNA_def_property_ui_text(prop, "Max Blur", "Blur limit, maximum CoC radius"); + RNA_def_property_ui_text( + prop, "Max Blur", "Blur limit, maximum CoC radius. (Deprecated: Unused.)"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } diff --git a/source/blender/nodes/composite/nodes/node_composite_bokehblur.cc b/source/blender/nodes/composite/nodes/node_composite_bokehblur.cc index 03300df0c44..28fcd606881 100644 --- a/source/blender/nodes/composite/nodes/node_composite_bokehblur.cc +++ b/source/blender/nodes/composite/nodes/node_composite_bokehblur.cc @@ -43,15 +43,8 @@ static void cmp_node_bokehblur_declare(NodeDeclarationBuilder &b) b.add_output("Image"); } -static void node_composit_init_bokehblur(bNodeTree * /*ntree*/, bNode *node) -{ - node->custom3 = 4.0f; - node->custom4 = 16.0f; -} - static void node_composit_buts_bokehblur(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr) { - layout->prop(ptr, "blur_max", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); layout->prop(ptr, "use_extended_bounds", UI_ITEM_R_SPLIT_EMPTY_NAME, std::nullopt, ICON_NONE); } @@ -346,7 +339,7 @@ class BokehBlurOperation : public NodeOperation { const float maximum_size = maximum_float(context(), input_size); const float base_size = compute_blur_radius(); - return math::clamp(int(maximum_size * base_size), 0, get_max_size()); + return math::max(0, int(maximum_size * base_size)); } float compute_blur_radius() @@ -387,11 +380,6 @@ class BokehBlurOperation : public NodeOperation { { return bnode().custom1 & CMP_NODEFLAG_BLUR_EXTEND_BOUNDS; } - - int get_max_size() - { - return int(bnode().custom4); - } }; static NodeOperation *get_compositor_operation(Context &context, DNode node) @@ -416,7 +404,6 @@ void register_node_type_cmp_bokehblur() ntype.nclass = NODE_CLASS_OP_FILTER; ntype.declare = file_ns::cmp_node_bokehblur_declare; ntype.draw_buttons = file_ns::node_composit_buts_bokehblur; - ntype.initfunc = file_ns::node_composit_init_bokehblur; ntype.get_compositor_operation = file_ns::get_compositor_operation; blender::bke::node_register_type(ntype);