paya.runtime.parts.PartGuide#
- class PartGuide(groupNode)#
Inheritance
PartBaseTrunk- addBuildSetting(name: str, defaultValue, **kwargs)#
Convenience method. Adds a settable-only attribute to a ‘BUILD_SETTINGS’ section on the group node. The attributeType can be omitted if defaultValue is
float,boolorint.
- getBuildSettings()#
- Returns
A mapping of
{attrName: attrValue}for each attribute created usingaddBuildSetting().- Return type
- getPartCreateArgsKwargs()#
- Raises
NotImplementedError – Not implemented on this class.
- Returns
Positional and keyword arguments that can be passed along to the
create()method on the associatedPartsubclass.- Return type
- createPart()#
Derives construction arguments from this guide and passed them along to
create()on the associatedPartsubclass to build the part.If there is no active
Nameblock, this guide’s innermost namespace will be used for the name.- Returns
The constructed part.
- Return type
- classmethod _getCreateNameContext()#
Called before a build wrapped by
partCreator()to establish the naming environment.Guides are named according to these rules:
The name element is always
'guide'; any enclosing blocks are ignored.There must be a namespace; if one is not active at the time of build, one will be derived, either from active
Nameelements or from the calling class name.
- Returns
A configured context manager.
- Return type