from weSkel.src.core.props.svd import FSEntryRun in Maya with weSkel available. om.* types refer to maya.api.OpenMaya.
Non-plug data intended for a function-set consumer.
FSEntry carries data that does not pass through a Maya plug. Constructing it runs no function-set operation and does not modify the scene.
Generic[ValueT]FSEntryfrom weSkel.src.core.props.svd import FSEntryRun in Maya with weSkel available. om.* types refer to maya.api.OpenMaya.
| Item | Value |
|---|---|
| Class | FSEntry |
| Module | weSkel.src.core.props.svd |
| Direct parent | Generic[ValueT] |
| Kind | dataclass; frozen=True |
| Spec properties | None. |
This reference documents members defined by this class. Standard Python mechanisms and native inherited members are outside its member counts.
FSEntry(name: str, value: Optional[ValueT] = None, encode: Optional[Callable[[Any], Any]] = None, decode: Optional[Callable[[Any], Any]] = None) → FSEntry
| Parameter | Type | Default |
|---|---|---|
name |
str |
required |
value |
Optional[ValueT] |
None |
encode |
Optional[Callable[[Any], Any]] |
None |
decode |
Optional[Callable[[Any], Any]] |
None |
Only name is required. The other three fields default to None. FSEntry[float] can specify the expected type in an editor; this generic parameter performs no conversion.
Declared fields; a frozen dataclass prevents reassignment, not all nested mutations.
| Field | Return type | Access | Purpose |
|---|---|---|---|
name |
str |
R | Identifier of the non-plug operation or property. |
value |
Optional[ValueT] |
R | Value intended for the consumer of this entry. |
encode |
Optional[Callable[[Any], Any]] |
R | Optional encoding callable, stored without automatic execution. |
decode |
Optional[Callable[[Any], Any]] |
R | Optional decoding callable, stored without automatic execution. |
| Return type | Contract |
|---|---|
str |
Identifier of the non-plug operation or property. |
| Return type | Contract |
|---|---|
Optional[ValueT] |
Value intended for the consumer of this entry. |
| Return type | Contract |
|---|---|
Optional[Callable[[Any], Any]] |
Optional encoding callable, stored without automatic execution. |
| Return type | Contract |
|---|---|
Optional[Callable[[Any], Any]] |
Optional decoding callable, stored without automatic execution. |
Own methods.
| Method | Return type | Purpose |
|---|---|---|
as_dict |
Dict[str, Any] |
Produce a dictionary with both callables replaced by None. |
| Returns | Contract |
|---|---|
Dict[str, Any] |
Produce a dictionary with both callables replaced by None. |
Uses dataclass conversion, which recursively copies common containers and may copy other objects. The encode and decode callables are not called: their fields become None. Arbitrary value content is not guaranteed to be JSON-serializable; Maya data may also fail to copy.
The dataclass is frozen, but its value may remain mutable. ValueT is a typing parameter, without automatic runtime type validation.
Recognized names and accepted values depend on the consumer. An entry alone applies nothing, and as_dict() does not run encoding or decoding functions.
from weSkel.src.core.props.svd import FSEntry
entry = FSEntry(name="example", value={"amount": 2.0}, encode=lambda value: {"encoded": value})data = entry.as_dict()assert data == {"name": "example", "value": {"amount": 2.0}, "encode": None, "decode": None}data["value"]["amount"] = 9.0assert entry.value["amount"] == 2.0print("FSEntry: PASS")Expected result: FSEntry: PASS. No scene changes.
See also: SVDView · SVDPlug · SVDSnapshot.