mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-12-24 08:38:40 -07:00
Ignore the index when accessing a scalar variable
This commit is contained in:
parent
d4273b4f70
commit
ef0748e96b
1 changed files with 2 additions and 2 deletions
|
|
@ -1011,10 +1011,10 @@ namespace client
|
|||
OptWithPos &output)
|
||||
{
|
||||
if (! ctx->skipping()) {
|
||||
if (! opt.opt->is_vector())
|
||||
ctx->throw_exception("Cannot index a scalar variable", opt.it_range);
|
||||
if (index < 0)
|
||||
index = 0; // Orca: fallback to first element if index < 0, this matches the behavior of BambuStudio
|
||||
if (!opt.opt->is_vector())
|
||||
index = -1; // Orca: ignore the index if variable is scalar, this matches the behavior of BambuStudio
|
||||
output = opt;
|
||||
output.index = index;
|
||||
} else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue