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
|
@ -18,7 +18,8 @@
|
|||
# Convert an abstract syntax tree + symbol table back to a script as text.
|
||||
|
||||
import lslfuncs
|
||||
from lslcommon import *
|
||||
import lslcommon
|
||||
from lslcommon import Key, Vector, Quaternion
|
||||
from lslparse import warning
|
||||
import math
|
||||
|
||||
|
@ -426,7 +427,7 @@ class outscript(object):
|
|||
|
||||
if nt == 'EXPR':
|
||||
return self.dent() + self.OutExpr(child[0]) + (
|
||||
';\n' if not IsCalc else '')
|
||||
';\n' if not lslcommon.IsCalc else '')
|
||||
|
||||
if nt == 'LAMBDA':
|
||||
return ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue