Commit Graph

14 Commits (9960cd3480e35fdb8044a09b891e413b009f22be)

Author SHA1 Message Date
Sofus Albert Høgsbro Rose 568fc449e8
fix: Caching now (seems to) work robustly.
The serialization routines are fast and effective.
Overall, the node graph feels snappy, and everything updates smoothly.
Logging on the action chain suggests that there aren't extraneous calls,
and that existing calls (ex. no-op previews) are fast.

There will likely be edge cases, and we'll see how it scales - but
for now, let's go with it!
2024-04-15 19:15:20 +02:00
Sofus Albert Høgsbro Rose 4f6bd8e990
refactor: Revamped serialization (non-working) 2024-04-15 17:46:31 +02:00
Sofus Albert Høgsbro Rose 3def85e24f
refactor: Non-working first-move of serialization logic 2024-04-15 15:21:13 +02:00
Sofus Albert Høgsbro Rose e1f11f6d68
fix: Revalidated cache logic w/KeyedCache.
This especially involved fixing the invalidation logic in
`trigger_action`.
It should now be far more accurate, concise, and performant.

The invalidation check ought still be optimized.
The reason this isn't trivial is because of the loose sockets:
To use our new `@keyed_cache` on a function like `_should_recompute_output_socket`, the loose
socket would also need to do an appropriate invalidation.

Such caching without accounting for invalidation on loose-socket change
would be incorrect.
For now, it seems as though performance is quite good, although it is
unknown whether this will scale to large graphs.

We've also left `kind`-specific invalidation alone for now (maybe
forever).
2024-04-15 15:12:29 +02:00
Sofus Albert Høgsbro Rose 7f2bd2e752
fix: A bug and a crash.
The crash: When a linked loose socket was deleted, the link remained in the
NodeLinkCache, and caused a crash when trying to ask the already-deleted
socket for removal consent. We fixed this by reporting all socket
removals to the node tree, so that links could be correctly removed
independently of link-change calculation.

The bug: The collection getter was cached improperly; Blender ID types
can't just be saved like that. We need to search every time. Performance
seems unaffected at first glance.
2024-04-12 15:58:07 +02:00
Sofus Albert Høgsbro Rose 480679a3c0
refactor: Streamlined graph-update semantics. 2024-04-12 15:39:13 +02:00
Sofus Albert Høgsbro Rose dc76ab7688
fix: Various critical fixes, field preview 2024-04-10 10:46:55 +02:00
Sofus Albert Høgsbro Rose 56abb3fb46
feat: Scientific constant node. 2024-04-09 10:37:50 +02:00
Sofus Albert Høgsbro Rose a75f697acd
feat: Robust DataFlowKind w/lazy structures.
This is essential for:
- Representing ranges as bounds
- Arbitrary symbolic/numeric representation of spectral distributions
- Parametric representation and JIT of critical-path procedures.

Unfortunately this broke a lot of nodes in small ways.
Next step is to finish the low-hanging fruit nodes + fix the ones we
have.
2024-04-09 08:50:32 +02:00
Sofus Albert Høgsbro Rose 54dc46290a
feat: Implemented fit of experim. medium data.
It's only good for dispersive media; specifically, a text file with
three floats per line: 'wl n k'.
A custom script was used to convert Maxim's data.

It's very fast, and has a ton of options.
Only the most important are exposed in the node for now.

A bug in MPL plotting aspect ratio declaration on MPL axis object was
fixed by manually running `set_aspect('auto')` after the fact.
It shouldn't do anything, and it doesn't, other than fix the bug :)

Also brought the plotting function of the viewer to parity with
the 3D preview, so the "Auto Plot" button works as expected.
2024-04-08 12:51:09 +02:00
Sofus Albert Høgsbro Rose 627457ff40
docs: Fix rendering of TODO.md 2024-04-08 09:42:31 +02:00
Sofus Albert Høgsbro Rose 221d5378e4
feat: ManagedObj Semantics 2024-04-01 16:48:56 +02:00
Sofus Albert Høgsbro Rose a4e764ba21
docs: Updated TODO 2024-03-22 13:51:58 +01:00
Sofus Albert Høgsbro Rose e6e7b88959 docs: Added README.md and LICENSE 2024-03-14 12:33:49 +01:00