From 82079ea16cdd6721ad6da3fa60ea0162bc7413bd Mon Sep 17 00:00:00 2001 From: Noisyfox Date: Sun, 28 Sep 2025 11:07:28 +0800 Subject: [PATCH] Allow negative vector index --- src/libslic3r/PlaceholderParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libslic3r/PlaceholderParser.cpp b/src/libslic3r/PlaceholderParser.cpp index 12816a0eae..b83ecbac0e 100644 --- a/src/libslic3r/PlaceholderParser.cpp +++ b/src/libslic3r/PlaceholderParser.cpp @@ -1014,7 +1014,7 @@ namespace client if (! opt.opt->is_vector()) ctx->throw_exception("Cannot index a scalar variable", opt.it_range); if (index < 0) - ctx->throw_exception("Referencing a vector variable with a negative index", opt.it_range); + index = 0; // Orca: fallback to first element if index < 0, this matches the behavior of BambuStudio output = opt; output.index = index; } else