mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
Fix Python gotcha with module globals, and missing 'cond' in lslextrafuncs.
The previous commit didn't work as expected. "from module import var" freezes the value at load time; changing it later has no effect. A reference to the module needs to be used. Fix that and the similar problem with LSO. Also revert some "from lslcommon import *" introduced earlier. That also revealed another bug about missing 'cond' in the import list of lslextrafuncs. This should fix all functions that return values on null key input.
This commit is contained in:
parent
7c2c09188d
commit
991e811f2d
4 changed files with 12 additions and 10 deletions
|
@ -17,9 +17,10 @@
|
|||
|
||||
# Extra functions that have predictable return values for certain arguments.
|
||||
|
||||
from lslcommon import *
|
||||
import lslcommon
|
||||
from lslcommon import Key #, Vector, Quaternion
|
||||
from lslbasefuncs import ELSLCantCompute, isinteger, iskey, islist, \
|
||||
isvector, isstring, NULL_KEY, ZERO_VECTOR, ZERO_ROTATION
|
||||
isvector, isstring, NULL_KEY, ZERO_VECTOR, ZERO_ROTATION, cond
|
||||
#isfloat, isrotation
|
||||
|
||||
TouchEvents = ('touch', 'touch_start', 'touch_end')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue