mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
In LSO, lists of 1 element also evaluate to false (SVC-689).
This commit is contained in:
parent
b04df456cb
commit
8609c38451
1 changed files with 3 additions and 0 deletions
|
@ -776,6 +776,9 @@ def cond(x):
|
|||
return bool(compare(x, ZERO_VECTOR, Eq=False))
|
||||
if tx == Quaternion:
|
||||
return bool(compare(x, ZERO_ROTATION, Eq=False))
|
||||
if lslcommon.LSO and tx == list:
|
||||
# SVC-689: lists of 1 element count as false
|
||||
return len(x) > 1
|
||||
return bool(x) # works fine for int, float, string, list
|
||||
|
||||
def isinteger(x):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue