fix: make extract node use `LazyValueFunc`

main
Sofus Albert Høgsbro Rose 2024-05-18 09:56:34 +02:00
parent 785c6f764c
commit e889d20284
Signed by: so-rose
GPG Key ID: AD901CB0F3701434
3 changed files with 3 additions and 10 deletions

View File

@ -62,7 +62,7 @@ class ExtractDataNode(base.MaxwellSimNode):
output_socket_sets: typ.ClassVar = { output_socket_sets: typ.ClassVar = {
'Sim Data': {'Monitor Data': sockets.MaxwellMonitorDataSocketDef()}, 'Sim Data': {'Monitor Data': sockets.MaxwellMonitorDataSocketDef()},
'Monitor Data': { 'Monitor Data': {
'Expr': sockets.ExprSocketDef(active_kind=ct.FlowKind.LazyArrayRange) 'Expr': sockets.ExprSocketDef(active_kind=ct.FlowKind.LazyValueFunc)
}, },
} }

View File

@ -301,8 +301,6 @@ class VizNode(base.MaxwellSimNode):
input_sockets_optional={'Expr': True}, input_sockets_optional={'Expr': True},
) )
def on_any_changed(self, input_sockets: dict): def on_any_changed(self, input_sockets: dict):
self.input_info = bl_cache.Signal.InvalidateCache
info = input_sockets['Expr'][ct.FlowKind.Info] info = input_sockets['Expr'][ct.FlowKind.Info]
params = input_sockets['Expr'][ct.FlowKind.Params] params = input_sockets['Expr'][ct.FlowKind.Params]
@ -340,6 +338,8 @@ class VizNode(base.MaxwellSimNode):
elif self.loose_input_sockets: elif self.loose_input_sockets:
self.loose_input_sockets = {} self.loose_input_sockets = {}
self.input_info = bl_cache.Signal.InvalidateCache
##################### #####################
## - Plotting ## - Plotting
##################### #####################

View File

@ -14,16 +14,9 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import typing as typ
import bpy import bpy
import sympy as sp
import sympy.physics.units as spu
import tidy3d as td
from blender_maxwell.assets.geonodes import GeoNodes, import_geonodes
from blender_maxwell.utils import bl_cache, logger from blender_maxwell.utils import bl_cache, logger
from blender_maxwell.utils import extra_sympy_units as spux
from ... import contracts as ct from ... import contracts as ct
from .. import base from .. import base