Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/function/nodes/legacy/node_fn_random_float.cc
| Show All 17 Lines | |||||
| #include "BLI_hash.h" | #include "BLI_hash.h" | ||||
| namespace blender::nodes { | namespace blender::nodes { | ||||
| static void fn_node_legacy_random_float_declare(NodeDeclarationBuilder &b) | static void fn_node_legacy_random_float_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.is_function_node(); | b.is_function_node(); | ||||
| b.add_input<decl::Float>("Min").min(-10000.0f).max(10000.0f); | b.add_input<decl::Float>(N_("Min")).min(-10000.0f).max(10000.0f); | ||||
| b.add_input<decl::Float>("Max").default_value(1.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_input<decl::Int>("Seed").min(-10000).max(10000); | b.add_input<decl::Int>(N_("Seed")).min(-10000).max(10000); | ||||
| b.add_output<decl::Float>("Value"); | b.add_output<decl::Float>(N_("Value")); | ||||
| }; | }; | ||||
| } // namespace blender::nodes | } // namespace blender::nodes | ||||
| class RandomFloatFunction : public blender::fn::MultiFunction { | class RandomFloatFunction : public blender::fn::MultiFunction { | ||||
| public: | public: | ||||
| RandomFloatFunction() | RandomFloatFunction() | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines | |||||