Commit Graph

11 Commits (22daa6c603e959df48eb8f3c35e9dcf2be402b4d)

Author SHA1 Message Date
Sofus Albert Høgsbro Rose badadfbfc2
fix: Extract fixes incl. draw, array-copy on export. 2024-04-24 19:06:15 +02:00
Sofus Albert Høgsbro Rose 44d61b5639
feat: Safe, practical BLField.
BLField has gotten a huge facelift, to make it practical to wrangle
properties without the sharp edges.
- All the "special" UI-exposed property types can now be directly
  constructed in a BLField marked with 'prop_ui'.
- The most appropriate internal representation will be chosen to
  represent the attribute based on its type annotation, including sized
  vector-like `bool`, `int`, `float` for `tuple[...]`.
- Static EnumProperties can now be derived from a special `StrEnum`, to
  which a `to_name` and `to_icon` method is attached.
- Dynamic `EnumProperty` can now be used safely, with builtin
  workarounds to the real-world reference-loss-crash (realized
  in the Tidy3D Cloud Task node) and jankiness like empty enum.
- The update method is now fully managed, negating all bugs related to
  improper update callback naming.
- Python-side getter caching is preserved for ui-exposed
  properties, with the help of node/socket base class support for
  passing a `Signal.InvalidateCache` to BLFields that are altered in the
  UI.

The cost to all this niceness is rather low, and arguably, positive:
- Dynamic Enum/String searchers no longer "magically" invoke all the
  time, since the values seen by Blender are cached by the BLField.
- To regenerate the searcher output, an `@on_value_changed` should be
  made by the user to pass `Signal.ResetEnumItems` or
  `Signal.ResetStrSearch` to the `BLField`.
- Since searching is no longer eager, there is no danger of
  out-of-reference strings (which crash Blender from EnumProperty), but
  also a greatly reduced performance problems associated with
  the hot-loop regeneration of EnumProperty strings.
- The base classes are now involved with BLField invalidation, to ensure
  that the getter caches are cleared up when the UI changes. For the
  price of that small indirection (done cheaply with set lookup),
  all attribute lookups are generally done in a single lookup, completely
  avoiding Blender until needed.
- This does represent another increase in confidence wrt. the event
  system's integrity, but so far, that has been a very productive
  direction.

**NOTE**: The entire feature set of BLField is not well tested, and will
likely need adjustments as the codebase is converted to use them.
2024-04-23 07:55:54 +02:00
Sofus Albert Høgsbro Rose 9960cd3480
refactor: Big changes to data flow and deps loading 2024-04-19 16:53:24 +02:00
Sofus Albert Høgsbro Rose dfeb65feec
feat: Math nodes (non-working) 2024-04-17 16:03:15 +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 02c63e3b8f
fix: The rabid __mp_main__ segfault. 2024-04-07 18:39:27 +02:00
Sofus Albert Høgsbro Rose 221d5378e4
feat: ManagedObj Semantics 2024-04-01 16:48:56 +02:00
Sofus Albert Høgsbro Rose 6f665b891d
feat: Working logging, before- and after-deps.
We have a far more sane approach to nodeps now, which
allows us to essentially have two loggers - one that is
very useful, pretty, and clear, but requires a 'rich'
dependency, and one that is simple.
In this spirit, we factored out services/ too.

We can also set the initial console log level now when
packing the .zip.

There's still work to do with the actual flow for deps
installing / uninstalling.
But it should be far more robust now.

Finally, we have a barebones working `quartodoc`-based docs site.
It's super clever; see <https://github.com/machow/quartodoc>.
As it's "just" a quarto project with some python autodiscovery,
fleshing it out with ex. math, images, diagrams, and so forth
should be exceptionally easy.

As we develop, various linter-guided fixes are being realized.
This will be a long process, best done as we spiff everything up
in preparation for general release.
2024-03-21 18:45:38 +01:00
Sofus Albert Høgsbro Rose be4eec2242
feat: Completely revamped dependency system. 2024-03-20 12:55:40 +01:00
Sofus Albert Høgsbro Rose 59a236f33a
packaging: Initialize virtual 'rye' project. 2024-03-14 13:37:30 +01:00