Blender  V2.93
Namespaces | Functions | Variables
node_geo_attribute_randomize.cc File Reference
#include "BLI_hash.h"
#include "BLI_rand.hh"
#include "UI_interface.h"
#include "UI_resources.h"
#include "node_geometry_util.hh"

Go to the source code of this file.

Namespaces

 blender
 
 blender::nodes
 

Functions

static void geo_node_attribute_random_layout (uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
 
static void geo_node_attribute_randomize_init (bNodeTree *UNUSED(tree), bNode *node)
 
static void geo_node_attribute_randomize_update (bNodeTree *UNUSED(ntree), bNode *node)
 
template<typename T >
T blender::nodes::random_value_in_range (const uint32_t id, const uint32_t seed, const T min, const T max)
 
template<>
float blender::nodes::random_value_in_range (const uint32_t id, const uint32_t seed, const float min, const float max)
 
template<>
int blender::nodes::random_value_in_range (const uint32_t id, const uint32_t seed, const int min, const int max)
 
template<>
float3 blender::nodes::random_value_in_range (const uint32_t id, const uint32_t seed, const float3 min, const float3 max)
 
template<typename T >
static void blender::nodes::randomize_attribute (MutableSpan< T > span, const T min, const T max, Span< uint32_t > ids, const uint32_t seed, const GeometryNodeAttributeRandomizeMode operation)
 
static void blender::nodes::randomize_attribute_bool (MutableSpan< bool > span, Span< uint32_t > ids, const uint32_t seed, const GeometryNodeAttributeRandomizeMode operation)
 
Array< uint32_tblender::nodes::get_geometry_element_ids_as_uints (const GeometryComponent &component, const AttributeDomain domain)
 
static AttributeDomain blender::nodes::get_result_domain (const GeometryComponent &component, const GeoNodeExecParams &params, StringRef attribute_name)
 
static void blender::nodes::randomize_attribute_on_component (GeometryComponent &component, const GeoNodeExecParams &params, StringRef attribute_name, const CustomDataType data_type, const GeometryNodeAttributeRandomizeMode operation, const int seed)
 
static void blender::nodes::geo_node_random_attribute_exec (GeoNodeExecParams params)
 
void register_node_type_geo_attribute_randomize ()
 

Variables

static bNodeSocketTemplate geo_node_attribute_randomize_in []
 
static bNodeSocketTemplate geo_node_attribute_randomize_out []
 

Function Documentation

◆ geo_node_attribute_random_layout()

static void geo_node_attribute_random_layout ( uiLayout layout,
bContext UNUSEDC,
PointerRNA ptr 
)
static

Definition at line 43 of file node_geo_attribute_randomize.cc.

References ptr, and uiItemR().

Referenced by register_node_type_geo_attribute_randomize().

◆ geo_node_attribute_randomize_init()

static void geo_node_attribute_randomize_init ( bNodeTree UNUSEDtree,
bNode node 
)
static

◆ geo_node_attribute_randomize_update()

static void geo_node_attribute_randomize_update ( bNodeTree UNUSEDntree,
bNode node 
)
static

◆ register_node_type_geo_attribute_randomize()

void register_node_type_geo_attribute_randomize ( void  )

Variable Documentation

◆ geo_node_attribute_randomize_in

bNodeSocketTemplate geo_node_attribute_randomize_in[]
static
Initial value:
= {
{SOCK_GEOMETRY, N_("Geometry")},
{SOCK_STRING, N_("Attribute")},
{SOCK_VECTOR, N_("Min"), 0.0f, 0.0f, 0.0f, 0.0f, -FLT_MAX, FLT_MAX},
{SOCK_VECTOR, N_("Max"), 1.0f, 1.0f, 1.0f, 0.0f, -FLT_MAX, FLT_MAX},
{SOCK_FLOAT, N_("Min"), 0.0f, 0.0f, 0.0f, 0.0f, -FLT_MAX, FLT_MAX},
{SOCK_FLOAT, N_("Max"), 1.0f, 0.0f, 0.0f, 0.0f, -FLT_MAX, FLT_MAX},
{SOCK_INT, N_("Min"), 0.0f, 0.0f, 0.0f, 0.0f, -100000, 100000},
{SOCK_INT, N_("Max"), 100.0f, 0.0f, 0.0f, 0.0f, -100000, 100000},
{SOCK_INT, N_("Seed"), 0, 0, 0, 0, -10000, 10000},
{-1, ""},
}
#define N_(msgid)
@ SOCK_INT
@ SOCK_VECTOR
@ SOCK_FLOAT
@ SOCK_GEOMETRY
@ SOCK_STRING

Definition at line 25 of file node_geo_attribute_randomize.cc.

Referenced by register_node_type_geo_attribute_randomize().

◆ geo_node_attribute_randomize_out

bNodeSocketTemplate geo_node_attribute_randomize_out[]
static
Initial value:
= {
{SOCK_GEOMETRY, N_("Geometry")},
{-1, ""},
}

Definition at line 38 of file node_geo_attribute_randomize.cc.

Referenced by register_node_type_geo_attribute_randomize().