Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_attribute_mix.cc
| Show First 20 Lines • Show All 142 Lines • ▼ Show 20 Lines | static void attribute_mix_calc(GeometryComponent &component, const GeoNodeExecParams ¶ms) | ||||
| } | } | ||||
| FloatReadAttribute attribute_factor = params.get_input_attribute<float>( | FloatReadAttribute attribute_factor = params.get_input_attribute<float>( | ||||
| "Factor", component, result_domain, 0.5f); | "Factor", component, result_domain, 0.5f); | ||||
| ReadAttributePtr attribute_a = params.get_input_attribute( | ReadAttributePtr attribute_a = params.get_input_attribute( | ||||
| "A", component, result_domain, result_type, nullptr); | "A", component, result_domain, result_type, nullptr); | ||||
| ReadAttributePtr attribute_b = params.get_input_attribute( | ReadAttributePtr attribute_b = params.get_input_attribute( | ||||
| "B", component, result_domain, result_type, nullptr); | "B", component, result_domain, result_type, nullptr); | ||||
| if (!attribute_a || !attribute_b) { | |||||
| return; | |||||
| } | |||||
| do_mix_operation(result_type, | do_mix_operation(result_type, | ||||
| node_storage->blend_type, | node_storage->blend_type, | ||||
| attribute_factor, | attribute_factor, | ||||
| *attribute_a, | *attribute_a, | ||||
| *attribute_b, | *attribute_b, | ||||
| *attribute_result); | *attribute_result); | ||||
| attribute_result.save(); | attribute_result.save(); | ||||
| ▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines | |||||