From b921c3b5cd0a2bbbc271260e219dba4298f72d18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sofus=20Albert=20H=C3=B8gsbro=20Rose?= Date: Thu, 3 Oct 2024 07:29:32 +0200 Subject: [PATCH] refactor: Split assets to node-tree/general variants --- oscillode/__init__.py | 10 ++++------ .../assets/{structures => }/arrays/array_ring.blend | 0 oscillode/assets/converters/tdsphere_to_kp.blend | 3 +++ oscillode/assets/primitives/arrow.blend | 3 +++ oscillode/assets/{structures => }/primitives/box.blend | 0 .../assets/{structures => }/primitives/ring.blend | 0 .../assets/{structures => }/primitives/sphere.blend | 0 .../template.blend => workspaces/asset_template.blend} | 0 oscillode/assets/{ => workspaces}/starter.blend | 0 .../maxwell_sim_nodes}/assets/__init__.py | 0 .../assets/examples/sio_waveguide.blend | 0 .../maxwell_sim_nodes}/assets/geonodes.py | 0 .../assets/nodes/monitor/eh_field.blend} | 0 .../assets/nodes/monitor/permittivity.blend} | 0 .../assets/nodes/monitor/power_flux.blend} | 0 .../assets/nodes/simulation/sim_domain.blend} | 0 .../assets/nodes/source/gaussian_beam.blend} | 0 .../assets/nodes/source/plane_wave.blend} | 0 .../assets/nodes/source/point_dipole.blend} | 0 .../assets/nodes/structure/primitive_box.blend} | 0 .../assets/nodes/structure/primitive_cylinder.blend} | 0 .../assets/nodes/structure/primitive_ring.blend} | 0 .../assets/nodes/structure/primitive_sphere.blend} | 0 23 files changed, 10 insertions(+), 6 deletions(-) rename oscillode/assets/{structures => }/arrays/array_ring.blend (100%) create mode 100644 oscillode/assets/converters/tdsphere_to_kp.blend create mode 100644 oscillode/assets/primitives/arrow.blend rename oscillode/assets/{structures => }/primitives/box.blend (100%) rename oscillode/assets/{structures => }/primitives/ring.blend (100%) rename oscillode/assets/{structures => }/primitives/sphere.blend (100%) rename oscillode/assets/{structures/template.blend => workspaces/asset_template.blend} (100%) rename oscillode/assets/{ => workspaces}/starter.blend (100%) rename oscillode/{ => node_trees/maxwell_sim_nodes}/assets/__init__.py (100%) rename oscillode/{ => node_trees/maxwell_sim_nodes}/assets/examples/sio_waveguide.blend (100%) rename oscillode/{ => node_trees/maxwell_sim_nodes}/assets/geonodes.py (100%) rename oscillode/{assets/internal/monitor/_monitor_eh_field.blend => node_trees/maxwell_sim_nodes/assets/nodes/monitor/eh_field.blend} (100%) rename oscillode/{assets/internal/monitor/_monitor_permittivity.blend => node_trees/maxwell_sim_nodes/assets/nodes/monitor/permittivity.blend} (100%) rename oscillode/{assets/internal/monitor/_monitor_power_flux.blend => node_trees/maxwell_sim_nodes/assets/nodes/monitor/power_flux.blend} (100%) rename oscillode/{assets/internal/simulation/_simulation_sim_domain.blend => node_trees/maxwell_sim_nodes/assets/nodes/simulation/sim_domain.blend} (100%) rename oscillode/{assets/internal/source/_source_gaussian_beam.blend => node_trees/maxwell_sim_nodes/assets/nodes/source/gaussian_beam.blend} (100%) rename oscillode/{assets/internal/source/_source_plane_wave.blend => node_trees/maxwell_sim_nodes/assets/nodes/source/plane_wave.blend} (100%) rename oscillode/{assets/internal/source/_source_point_dipole.blend => node_trees/maxwell_sim_nodes/assets/nodes/source/point_dipole.blend} (100%) rename oscillode/{assets/internal/structure/_structure_primitive_box.blend => node_trees/maxwell_sim_nodes/assets/nodes/structure/primitive_box.blend} (100%) rename oscillode/{assets/internal/structure/_structure_primitive_cylinder.blend => node_trees/maxwell_sim_nodes/assets/nodes/structure/primitive_cylinder.blend} (100%) rename oscillode/{assets/internal/structure/_structure_primitive_ring.blend => node_trees/maxwell_sim_nodes/assets/nodes/structure/primitive_ring.blend} (100%) rename oscillode/{assets/internal/structure/_structure_primitive_sphere.blend => node_trees/maxwell_sim_nodes/assets/nodes/structure/primitive_sphere.blend} (100%) diff --git a/oscillode/__init__.py b/oscillode/__init__.py index bdefef1..5fc6ad3 100644 --- a/oscillode/__init__.py +++ b/oscillode/__init__.py @@ -18,9 +18,10 @@ from functools import reduce -# from . import node_trees -from . import assets, operators, preferences, registration from . import contracts as ct + +# from . import node_trees +from . import operators, preferences, registration from .utils import logger log = logger.get(__name__) @@ -31,24 +32,21 @@ log = logger.get(__name__) #################### BL_REGISTER: list[ct.BLClass] = [ *operators.BL_REGISTER, - *assets.BL_REGISTER, # *node_trees.BL_REGISTER, ] BL_HANDLERS: ct.BLHandlers = reduce( lambda a, b: a + b, [ - assets.BL_HANDLERS, operators.BL_HANDLERS, - assets.BL_HANDLERS, # node_trees.BL_HANDLERS, ], ct.BLHandlers(), ) BL_KEYMAP_ITEMS: list[ct.BLKeymapItem] = [ - *assets.BL_KEYMAP_ITEMS, *operators.BL_KEYMAP_ITEMS, + # node_trees.BL_KEYMAP_ITEMS, ] diff --git a/oscillode/assets/structures/arrays/array_ring.blend b/oscillode/assets/arrays/array_ring.blend similarity index 100% rename from oscillode/assets/structures/arrays/array_ring.blend rename to oscillode/assets/arrays/array_ring.blend diff --git a/oscillode/assets/converters/tdsphere_to_kp.blend b/oscillode/assets/converters/tdsphere_to_kp.blend new file mode 100644 index 0000000..e771874 --- /dev/null +++ b/oscillode/assets/converters/tdsphere_to_kp.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd9c7551b9b3a3f2bbc1e1f66e2bffdbb18d2f50d2ba8c06b386400cb776ce26 +size 1252531 diff --git a/oscillode/assets/primitives/arrow.blend b/oscillode/assets/primitives/arrow.blend new file mode 100644 index 0000000..3eb12a5 --- /dev/null +++ b/oscillode/assets/primitives/arrow.blend @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b0185304c5d4a0de4768487f466507e20499a84c13a6f2a69b3f267c0173c22f +size 826498 diff --git a/oscillode/assets/structures/primitives/box.blend b/oscillode/assets/primitives/box.blend similarity index 100% rename from oscillode/assets/structures/primitives/box.blend rename to oscillode/assets/primitives/box.blend diff --git a/oscillode/assets/structures/primitives/ring.blend b/oscillode/assets/primitives/ring.blend similarity index 100% rename from oscillode/assets/structures/primitives/ring.blend rename to oscillode/assets/primitives/ring.blend diff --git a/oscillode/assets/structures/primitives/sphere.blend b/oscillode/assets/primitives/sphere.blend similarity index 100% rename from oscillode/assets/structures/primitives/sphere.blend rename to oscillode/assets/primitives/sphere.blend diff --git a/oscillode/assets/structures/template.blend b/oscillode/assets/workspaces/asset_template.blend similarity index 100% rename from oscillode/assets/structures/template.blend rename to oscillode/assets/workspaces/asset_template.blend diff --git a/oscillode/assets/starter.blend b/oscillode/assets/workspaces/starter.blend similarity index 100% rename from oscillode/assets/starter.blend rename to oscillode/assets/workspaces/starter.blend diff --git a/oscillode/assets/__init__.py b/oscillode/node_trees/maxwell_sim_nodes/assets/__init__.py similarity index 100% rename from oscillode/assets/__init__.py rename to oscillode/node_trees/maxwell_sim_nodes/assets/__init__.py diff --git a/oscillode/assets/examples/sio_waveguide.blend b/oscillode/node_trees/maxwell_sim_nodes/assets/examples/sio_waveguide.blend similarity index 100% rename from oscillode/assets/examples/sio_waveguide.blend rename to oscillode/node_trees/maxwell_sim_nodes/assets/examples/sio_waveguide.blend diff --git a/oscillode/assets/geonodes.py b/oscillode/node_trees/maxwell_sim_nodes/assets/geonodes.py similarity index 100% rename from oscillode/assets/geonodes.py rename to oscillode/node_trees/maxwell_sim_nodes/assets/geonodes.py diff --git a/oscillode/assets/internal/monitor/_monitor_eh_field.blend b/oscillode/node_trees/maxwell_sim_nodes/assets/nodes/monitor/eh_field.blend similarity index 100% rename from oscillode/assets/internal/monitor/_monitor_eh_field.blend rename to oscillode/node_trees/maxwell_sim_nodes/assets/nodes/monitor/eh_field.blend diff --git a/oscillode/assets/internal/monitor/_monitor_permittivity.blend b/oscillode/node_trees/maxwell_sim_nodes/assets/nodes/monitor/permittivity.blend similarity index 100% rename from oscillode/assets/internal/monitor/_monitor_permittivity.blend rename to oscillode/node_trees/maxwell_sim_nodes/assets/nodes/monitor/permittivity.blend diff --git a/oscillode/assets/internal/monitor/_monitor_power_flux.blend b/oscillode/node_trees/maxwell_sim_nodes/assets/nodes/monitor/power_flux.blend similarity index 100% rename from oscillode/assets/internal/monitor/_monitor_power_flux.blend rename to oscillode/node_trees/maxwell_sim_nodes/assets/nodes/monitor/power_flux.blend diff --git a/oscillode/assets/internal/simulation/_simulation_sim_domain.blend b/oscillode/node_trees/maxwell_sim_nodes/assets/nodes/simulation/sim_domain.blend similarity index 100% rename from oscillode/assets/internal/simulation/_simulation_sim_domain.blend rename to oscillode/node_trees/maxwell_sim_nodes/assets/nodes/simulation/sim_domain.blend diff --git a/oscillode/assets/internal/source/_source_gaussian_beam.blend b/oscillode/node_trees/maxwell_sim_nodes/assets/nodes/source/gaussian_beam.blend similarity index 100% rename from oscillode/assets/internal/source/_source_gaussian_beam.blend rename to oscillode/node_trees/maxwell_sim_nodes/assets/nodes/source/gaussian_beam.blend diff --git a/oscillode/assets/internal/source/_source_plane_wave.blend b/oscillode/node_trees/maxwell_sim_nodes/assets/nodes/source/plane_wave.blend similarity index 100% rename from oscillode/assets/internal/source/_source_plane_wave.blend rename to oscillode/node_trees/maxwell_sim_nodes/assets/nodes/source/plane_wave.blend diff --git a/oscillode/assets/internal/source/_source_point_dipole.blend b/oscillode/node_trees/maxwell_sim_nodes/assets/nodes/source/point_dipole.blend similarity index 100% rename from oscillode/assets/internal/source/_source_point_dipole.blend rename to oscillode/node_trees/maxwell_sim_nodes/assets/nodes/source/point_dipole.blend diff --git a/oscillode/assets/internal/structure/_structure_primitive_box.blend b/oscillode/node_trees/maxwell_sim_nodes/assets/nodes/structure/primitive_box.blend similarity index 100% rename from oscillode/assets/internal/structure/_structure_primitive_box.blend rename to oscillode/node_trees/maxwell_sim_nodes/assets/nodes/structure/primitive_box.blend diff --git a/oscillode/assets/internal/structure/_structure_primitive_cylinder.blend b/oscillode/node_trees/maxwell_sim_nodes/assets/nodes/structure/primitive_cylinder.blend similarity index 100% rename from oscillode/assets/internal/structure/_structure_primitive_cylinder.blend rename to oscillode/node_trees/maxwell_sim_nodes/assets/nodes/structure/primitive_cylinder.blend diff --git a/oscillode/assets/internal/structure/_structure_primitive_ring.blend b/oscillode/node_trees/maxwell_sim_nodes/assets/nodes/structure/primitive_ring.blend similarity index 100% rename from oscillode/assets/internal/structure/_structure_primitive_ring.blend rename to oscillode/node_trees/maxwell_sim_nodes/assets/nodes/structure/primitive_ring.blend diff --git a/oscillode/assets/internal/structure/_structure_primitive_sphere.blend b/oscillode/node_trees/maxwell_sim_nodes/assets/nodes/structure/primitive_sphere.blend similarity index 100% rename from oscillode/assets/internal/structure/_structure_primitive_sphere.blend rename to oscillode/node_trees/maxwell_sim_nodes/assets/nodes/structure/primitive_sphere.blend