IRaptorModelVariantNamer
A module's naming rule for variant copies (RaptorSuiteModelVariant.VariantName).
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.EditorTools | Raptor.Editor | interface | preview, since 0.1.0 |
Register an implementation with RaptorModelVariantNamers.Register.
public interface IRaptorModelVariantNamerMethods
TryVariantName
bool TryVariantName(string sourceName, Func<string, bool> taken, out string name)Names the copy of sourceName. Return true and set name to handle the copy. Return false to pass it to the next namer and, after the last one, to RAPTOR's "<stem> Variant N" rule.
taken is the caller's test for a taken name, passed through unchanged. When it is null, use the namer's default, normally RaptorModelPlacement.NameTaken or its scoped overload.
| Parameter | Type | Description |
|---|---|---|
sourceName | string | The source model's name. |
taken | Func<string, bool> | The caller's test for a taken name, or null for the namer's default. |
name | out string | The name chosen. |
Returns: True when this namer names the copy.
Called by RAPTOR.
Related types
- RaptorModelVariantNamers: The registered variant namers, tried in order until one names the copy.
- RaptorSuiteModelVariant: Creates a variant copy of a model (Duplicate as variant).
- RaptorModelPlacement: Free spots and free names for a new model.