diff options
Diffstat (limited to 'source/blender/nodes')
22 files changed, 54 insertions, 49 deletions
diff --git a/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_reverse.cc b/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_reverse.cc index 2fe06a17adf..2c801642bd7 100644 --- a/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_reverse.cc +++ b/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_reverse.cc @@ -41,7 +41,7 @@ static void node_geo_exec(GeoNodeExecParams params) } }); - geometry_set.replace_curve(curve_eval_to_curves(*curve)); + geometry_set.replace_curves(curve_eval_to_curves(*curve)); params.set_output("Curve", geometry_set); } diff --git a/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_set_handles.cc b/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_set_handles.cc index 537c7c42610..56e9068882b 100644 --- a/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_set_handles.cc +++ b/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_set_handles.cc @@ -101,7 +101,7 @@ static void node_geo_exec(GeoNodeExecParams params) bezier_spline.mark_cache_invalid(); } - geometry_set.replace_curve(curve_eval_to_curves(*curve)); + geometry_set.replace_curves(curve_eval_to_curves(*curve)); if (!has_bezier_spline) { params.error_message_add(NodeWarningType::Info, TIP_("No Bezier splines in input curve")); diff --git a/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_spline_type.cc b/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_spline_type.cc index 4e3b0839da7..002c42c4c82 100644 --- a/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_spline_type.cc +++ b/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_spline_type.cc @@ -100,7 +100,7 @@ static SplinePtr poly_to_nurbs(const Spline &input) output->set_resolution(12); output->set_order(4); Spline::copy_base_settings(input, *output); - output->knots_mode = NURBSpline::KnotsMode::Bezier; + output->knots_mode = NURBS_KNOT_MODE_BEZIER; output->attributes = input.attributes; return output; } @@ -128,7 +128,7 @@ static SplinePtr bezier_to_nurbs(const Spline &input) output->set_resolution(12); output->set_order(4); output->set_cyclic(input.is_cyclic()); - output->knots_mode = NURBSpline::KnotsMode::Bezier; + output->knots_mode = NURBS_KNOT_MODE_BEZIER; output->attributes.reallocate(output->size()); copy_attributes(input, *output, [](GSpan src, GMutableSpan dst) { attribute_math::convert_to_static_type(src.type(), [&](auto dummy) { diff --git a/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_mesh_to_curve.cc b/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_mesh_to_curve.cc index 8991261a21a..72cb540df4a 100644 --- a/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_mesh_to_curve.cc +++ b/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_mesh_to_curve.cc @@ -45,10 +45,8 @@ static void node_geo_exec(GeoNodeExecParams params) return; } - std::unique_ptr<CurveEval> curve = geometry::mesh_to_curve_convert( - component, IndexMask(selected_edge_indices)); - - params.set_output("Curve", GeometrySet::create_with_curves(curve_eval_to_curves(*curve))); + Curves *curves = geometry::mesh_to_curve_convert(component, IndexMask(selected_edge_indices)); + params.set_output("Curve", GeometrySet::create_with_curves(curves)); } } // namespace blender::nodes::node_geo_legacy_mesh_to_curve_cc diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_fill.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_fill.cc index 6702ee6c0aa..08aa7415073 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_fill.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_fill.cc @@ -120,7 +120,7 @@ static void curve_fill_calculate(GeometrySet &geometry_set, const GeometryNodeCu const std::unique_ptr<CurveEval> curve = curves_to_curve_eval( *geometry_set.get_curves_for_read()); if (curve->splines().is_empty()) { - geometry_set.replace_curve(nullptr); + geometry_set.replace_curves(nullptr); return; } @@ -132,7 +132,7 @@ static void curve_fill_calculate(GeometrySet &geometry_set, const GeometryNodeCu Mesh *mesh = cdt_to_mesh(results); geometry_set.replace_mesh(mesh); - geometry_set.replace_curve(nullptr); + geometry_set.replace_curves(nullptr); } static void node_geo_exec(GeoNodeExecParams params) diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc index 24d72ad553b..81ca87eec25 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc @@ -283,7 +283,7 @@ static void limit_radii(FilletData &fd, const bool cyclic) /* Assign the max_radii to the fillet data's radii. */ for (const int i : IndexRange(size)) { - radii[i] = max_radii[i]; + radii[i] = std::min(radii[i], max_radii[i]); } } @@ -606,7 +606,7 @@ static void calculate_curve_fillet(GeometrySet &geometry_set, const std::unique_ptr<CurveEval> input_curve = curves_to_curve_eval(*component.get_for_read()); std::unique_ptr<CurveEval> output_curve = fillet_curve(*input_curve, fillet_param); - geometry_set.replace_curve(curve_eval_to_curves(*output_curve)); + geometry_set.replace_curves(curve_eval_to_curves(*output_curve)); } static void node_geo_exec(GeoNodeExecParams params) diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_handle_type_selection.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_handle_type_selection.cc index ccd3a587e63..0aa603a7736 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_handle_type_selection.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_handle_type_selection.cc @@ -112,7 +112,6 @@ class HandleTypeFieldInput final : public GeometryFieldInput { bool is_equal_to(const fn::FieldNode &other) const override { - return dynamic_cast<const HandleTypeFieldInput *>(&other) != nullptr; if (const HandleTypeFieldInput *other_handle_selection = dynamic_cast<const HandleTypeFieldInput *>(&other)) { return mode_ == other_handle_selection->mode_ && type_ == other_handle_selection->type_; diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_circle.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_circle.cc index 874e29dda86..2fb9f724130 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_circle.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_circle.cc @@ -176,7 +176,7 @@ static void node_geo_exec(GeoNodeExecParams params) const GeometryNodeCurvePrimitiveCircleMode mode = (GeometryNodeCurvePrimitiveCircleMode) storage.mode; - Curves *curves; + Curves *curves = nullptr; if (mode == GEO_NODE_CURVE_PRIMITIVE_CIRCLE_TYPE_POINTS) { float3 center_point; curves = create_point_circle_curve(params.extract_input<float3>("Point 1"), diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_resample.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_resample.cc index c5814a9a1dd..5a4c2ad1660 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_resample.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_resample.cc @@ -242,7 +242,7 @@ static void geometry_set_curve_resample(GeometrySet &geometry_set, std::unique_ptr<CurveEval> output_curve = resample_curve( geometry_set.get_component_for_read<CurveComponent>(), mode_param); - geometry_set.replace_curve(curve_eval_to_curves(*output_curve)); + geometry_set.replace_curves(curve_eval_to_curves(*output_curve)); } static void node_geo_exec(GeoNodeExecParams params) diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_spline_type.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_spline_type.cc index 55610ec86ab..4118448b237 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_spline_type.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_spline_type.cc @@ -58,21 +58,22 @@ static void scale_output_assign(const Span<T> input, template<class T> static void nurbs_to_bezier_assign(const Span<T> input, const MutableSpan<T> r_output, - const NURBSpline::KnotsMode knotsMode) + const KnotsMode knotsMode) { const int input_size = input.size(); const int output_size = r_output.size(); switch (knotsMode) { - case NURBSpline::KnotsMode::Bezier: + case NURBS_KNOT_MODE_BEZIER: scale_input_assign<T>(input, 3, 1, r_output); break; - case NURBSpline::KnotsMode::Normal: + case NURBS_KNOT_MODE_NORMAL: for (const int i : IndexRange(output_size)) { r_output[i] = input[(i + 1) % input_size]; } break; - case NURBSpline::KnotsMode::EndPoint: + case NURBS_KNOT_MODE_ENDPOINT_BEZIER: + case NURBS_KNOT_MODE_ENDPOINT: for (const int i : IndexRange(1, output_size - 2)) { r_output[i] = input[i + 1]; } @@ -107,11 +108,11 @@ static void copy_attributes(const Spline &input_spline, Spline &output_spline, C } static Vector<float3> create_nurbs_to_bezier_handles(const Span<float3> nurbs_positions, - const NURBSpline::KnotsMode knots_mode) + const KnotsMode knots_mode) { const int nurbs_positions_size = nurbs_positions.size(); Vector<float3> handle_positions; - if (knots_mode == NURBSpline::KnotsMode::Bezier) { + if (knots_mode == NURBS_KNOT_MODE_BEZIER) { for (const int i : IndexRange(nurbs_positions_size)) { if (i % 3 == 1) { continue; @@ -127,7 +128,7 @@ static Vector<float3> create_nurbs_to_bezier_handles(const Span<float3> nurbs_po } } else { - const bool is_periodic = knots_mode == NURBSpline::KnotsMode::Normal; + const bool is_periodic = knots_mode == NURBS_KNOT_MODE_NORMAL; if (is_periodic) { handle_positions.append(nurbs_positions[1] + ((nurbs_positions[0] - nurbs_positions[1]) / 3)); @@ -169,9 +170,9 @@ static Vector<float3> create_nurbs_to_bezier_handles(const Span<float3> nurbs_po static Array<float3> create_nurbs_to_bezier_positions(const Span<float3> nurbs_positions, const Span<float3> handle_positions, - const NURBSpline::KnotsMode knots_mode) + const KnotsMode knots_mode) { - if (knots_mode == NURBSpline::KnotsMode::Bezier) { + if (knots_mode == NURBS_KNOT_MODE_BEZIER) { /* Every third NURBS position (starting from index 1) should be converted to Bezier position */ const int scale = 3; const int offset = 1; @@ -211,7 +212,7 @@ static SplinePtr poly_to_nurbs(const Spline &input) output->set_resolution(12); output->set_order(4); Spline::copy_base_settings(input, *output); - output->knots_mode = NURBSpline::KnotsMode::Bezier; + output->knots_mode = NURBS_KNOT_MODE_BEZIER; output->attributes = input.attributes; return output; } @@ -239,7 +240,7 @@ static SplinePtr bezier_to_nurbs(const Spline &input) output->set_resolution(12); output->set_order(4); output->set_cyclic(input.is_cyclic()); - output->knots_mode = NURBSpline::KnotsMode::Bezier; + output->knots_mode = NURBS_KNOT_MODE_BEZIER; output->attributes.reallocate(output->size()); copy_attributes(input, *output, [](GSpan src, GMutableSpan dst) { attribute_math::convert_to_static_type(src.type(), [&](auto dummy) { @@ -272,13 +273,13 @@ static SplinePtr nurbs_to_bezier(const Spline &input) const NURBSpline &nurbs_spline = static_cast<const NURBSpline &>(input); Span<float3> nurbs_positions; Vector<float3> nurbs_positions_vector; - NURBSpline::KnotsMode knots_mode; + KnotsMode knots_mode; if (nurbs_spline.is_cyclic()) { nurbs_positions_vector = nurbs_spline.positions(); nurbs_positions_vector.append(nurbs_spline.positions()[0]); nurbs_positions_vector.append(nurbs_spline.positions()[1]); nurbs_positions = nurbs_positions_vector; - knots_mode = NURBSpline::KnotsMode::Normal; + knots_mode = NURBS_KNOT_MODE_NORMAL; } else { nurbs_positions = nurbs_spline.positions(); @@ -403,7 +404,7 @@ static void node_geo_exec(GeoNodeExecParams params) } }); new_curve->attributes = curve->attributes; - geometry_set.replace_curve(curve_eval_to_curves(*new_curve)); + geometry_set.replace_curves(curve_eval_to_curves(*new_curve)); }); params.set_output("Curve", std::move(geometry_set)); diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_subdivide.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_subdivide.cc index bbe57b2b3fa..371556c04f1 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_subdivide.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_subdivide.cc @@ -206,6 +206,10 @@ static void subdivide_bezier_spline(const BezierSpline &src, } else { dst_positions.last() = src_positions.last(); + dst_type_left.first() = src.handle_types_left().first(); + dst_type_right.last() = src.handle_types_right().last(); + dst_handles_left.first() = src_handles_left.first(); + dst_handles_right.last() = src_handles_right.last(); } } @@ -342,7 +346,7 @@ static void node_geo_exec(GeoNodeExecParams params) } std::unique_ptr<CurveEval> output_curve = subdivide_curve( *curves_to_curve_eval(*component.get_for_read()), cuts); - geometry_set.replace_curve(curve_eval_to_curves(*output_curve)); + geometry_set.replace_curves(curve_eval_to_curves(*output_curve)); }); params.set_output("Curve", geometry_set); } diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_trim.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_trim.cc index a3dab1b50fe..df360818313 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_trim.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_trim.cc @@ -566,7 +566,7 @@ static void geometry_set_curve_trim(GeometrySet &geometry_set, } }); - geometry_set.replace_curve(curve_eval_to_curves(*curve)); + geometry_set.replace_curves(curve_eval_to_curves(*curve)); } static void node_geo_exec(GeoNodeExecParams params) diff --git a/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc b/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc index 3baee8a25bb..cf6837817c2 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc @@ -477,10 +477,10 @@ static void separate_curve_selection(GeometrySet &geometry_set, std::unique_ptr<CurveEval> r_curve = curve_separate( *curves_to_curve_eval(*src_component.get_for_read()), selection, selection_domain, invert); if (r_curve) { - geometry_set.replace_curve(curve_eval_to_curves(*r_curve)); + geometry_set.replace_curves(curve_eval_to_curves(*r_curve)); } else { - geometry_set.replace_curve(nullptr); + geometry_set.replace_curves(nullptr); } } diff --git a/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc b/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc index 1ceab18c01b..eb216c08289 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc @@ -599,7 +599,7 @@ static void duplicate_splines(GeometrySet &geometry_set, dst_component, ATTR_DOMAIN_CURVE, selection, attributes, curve_offsets); } - geometry_set.replace_curve(dst_component.get_for_write()); + geometry_set.replace_curves(dst_component.get_for_write()); } static void duplicate_faces(GeometrySet &geometry_set, diff --git a/source/blender/nodes/geometry/nodes/node_geo_image_texture.cc b/source/blender/nodes/geometry/nodes/node_geo_image_texture.cc index a87aef358e1..33802d00d2b 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_image_texture.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_image_texture.cc @@ -257,8 +257,8 @@ class ImageFieldsFunction : public fn::MultiFunction { const int width = ibuf->x; const int height = ibuf->y; int ix, iy; - const float tx = frac(px * (float)width - 0.5f, &ix); - const float ty = frac(py * (float)height - 0.5f, &iy); + const float tx = frac(px * (float)width, &ix); + const float ty = frac(py * (float)height, &iy); switch (extension) { case SHD_IMAGE_EXTENSION_REPEAT: { diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_spline_length.cc b/source/blender/nodes/geometry/nodes/node_geo_input_spline_length.cc index f952e15fbbe..c3d87055745 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_input_spline_length.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_input_spline_length.cc @@ -25,13 +25,16 @@ static VArray<float> construct_spline_length_gvarray(const CurveComponent &compo const std::unique_ptr<CurveEval> curve = curves_to_curve_eval(*component.get_for_read()); Span<SplinePtr> splines = curve->splines(); - auto length_fn = [splines](int i) { return splines[i]->length(); }; + Array<float> spline_lenghts(splines.size()); + for (const int i : splines.index_range()) { + spline_lenghts[i] = splines[i]->length(); + } if (domain == ATTR_DOMAIN_CURVE) { - return VArray<float>::ForFunc(splines.size(), length_fn); + return VArray<float>::ForContainer(std::move(spline_lenghts)); } if (domain == ATTR_DOMAIN_POINT) { - VArray<float> length = VArray<float>::ForFunc(splines.size(), length_fn); + VArray<float> length = VArray<float>::ForContainer(std::move(spline_lenghts)); return component.attribute_try_adapt_domain<float>( std::move(length), ATTR_DOMAIN_CURVE, ATTR_DOMAIN_POINT); } diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc index d84a2e73172..b882d4bdf09 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc @@ -510,11 +510,11 @@ static void calculate_selection_outputs(Mesh *mesh, if (config.bottom_is_point) { selection[config.last_vert] = true; } + else if (face) { + selection.slice(config.bottom_faces_start, config.bottom_faces_len).fill(true); + } else { - selection - .slice(config.bottom_faces_start, - face ? config.bottom_faces_len : config.circle_segments) - .fill(true); + selection.slice(config.last_ring_verts_start + 1, config.circle_segments).fill(true); } attribute.save(); } diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc index 4a09fd8d1d2..4e0e5c7c912 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc @@ -76,10 +76,10 @@ static void calculate_sphere_vertex_data(MutableSpan<MVert> verts, int vert_index = 1; for (const int ring : IndexRange(1, rings - 1)) { const float theta = ring * delta_theta; + const float sin_theta = std::sin(theta); const float z = std::cos(theta); for (const int segment : IndexRange(1, segments)) { const float phi = segment * delta_phi; - const float sin_theta = std::sin(theta); const float x = sin_theta * std::cos(phi); const float y = sin_theta * std::sin(phi); copy_v3_v3(verts[vert_index].co, float3(x, y, z) * radius); diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_to_curve.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_to_curve.cc index 91cde52f9eb..f6ee3d00dee 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_mesh_to_curve.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_to_curve.cc @@ -34,8 +34,7 @@ static void node_geo_exec(GeoNodeExecParams params) return; } - std::unique_ptr<CurveEval> curve = geometry::mesh_to_curve_convert(component, selection); - geometry_set.replace_curve(curve_eval_to_curves(*curve)); + geometry_set.replace_curves(geometry::mesh_to_curve_convert(component, selection)); geometry_set.keep_only({GEO_COMPONENT_TYPE_CURVE, GEO_COMPONENT_TYPE_INSTANCES}); }); diff --git a/source/blender/nodes/geometry/nodes/node_geo_transform.cc b/source/blender/nodes/geometry/nodes/node_geo_transform.cc index 95cec8eab11..9159ac081e0 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_transform.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_transform.cc @@ -129,7 +129,7 @@ static void translate_geometry_set(GeometrySet &geometry, if (Curves *curves = geometry.get_curves_for_write()) { std::unique_ptr<CurveEval> curve = curves_to_curve_eval(*curves); curve->translate(translation); - geometry.replace_curve(curve_eval_to_curves(*curve)); + geometry.replace_curves(curve_eval_to_curves(*curve)); } if (Mesh *mesh = geometry.get_mesh_for_write()) { translate_mesh(*mesh, translation); @@ -152,7 +152,7 @@ void transform_geometry_set(GeometrySet &geometry, if (Curves *curves = geometry.get_curves_for_write()) { std::unique_ptr<CurveEval> curve = curves_to_curve_eval(*curves); curve->transform(transform); - geometry.replace_curve(curve_eval_to_curves(*curve)); + geometry.replace_curves(curve_eval_to_curves(*curve)); } if (Mesh *mesh = geometry.get_mesh_for_write()) { transform_mesh(*mesh, transform); diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_principled.cc b/source/blender/nodes/shader/nodes/node_shader_bsdf_principled.cc index 6c2f38fc723..ba98a797f2a 100644 --- a/source/blender/nodes/shader/nodes/node_shader_bsdf_principled.cc +++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_principled.cc @@ -43,7 +43,7 @@ static void node_declare(NodeDeclarationBuilder &b) .max(1.0f) .subtype(PROP_FACTOR); b.add_input<decl::Float>(N_("Specular Tint")) - .default_value(0.5f) + .default_value(0.0f) .min(0.0f) .max(1.0f) .subtype(PROP_FACTOR); diff --git a/source/blender/nodes/shader/nodes/node_shader_object_info.cc b/source/blender/nodes/shader/nodes/node_shader_object_info.cc index 6ed5a7b715d..03c1a018d37 100644 --- a/source/blender/nodes/shader/nodes/node_shader_object_info.cc +++ b/source/blender/nodes/shader/nodes/node_shader_object_info.cc @@ -9,6 +9,7 @@ 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")); |