athena.software package
Submodules
athena.software.atBlender module
athena.software.atHoudini module
athena.software.atMaya module
- class athena.software.atMaya.PauseViewport[source]
Bases:
objectMaya specific context manager to pause viewport execution during a processing.
- athena.software.atMaya.select_in_maya(to_select: Iterable[str | OpenMaya.MObject | OpenMaya.MDagPath | OpenMaya.MFnDependencyNode, ...], mode: str = 'add', replace: bool = True) None[source]
Allow software selection in Maya for different Maya types.
- Parameters:
to_select (Iterable[Union[str, OpenMaya.MObject, OpenMaya.MDagPath, OpenMaya.MFnDependencyNode], ...]) – The object(s) to select in Autodesk Maya.
mode (str) – The selection mode to use. (add or remove)
replace (bool) – Define whether the function should replace or add to the current selection.
Notes
This function require an Iterable as input, even if there’s only one item to select. The supported object types are:
str
MObject
MDagPath
MFnDependencyNodes (= All subtypes as well)
- athena.software.atMaya.get_display(object_: str | maya.api.OpenMaya.MObject | maya.api.OpenMaya.MDagPath | maya.api.OpenMaya.MFnDependencyNode) str[source]
Get a clean display name for a Maya object.
- Parameters:
object – The object for which we want to get a clean name as a string. If it’s already a string, the function will just return it. If it’s a Maya api type, it will do different things to get a displayable name.
- Returns:
A clean displayable name for the given Maya object.
- Return type:
str
Notes
Currently supported Maya types:
str
MObject
MDagPath
MFnDependencyNodes (= All subtypes as well)
- class athena.software.atMaya.MayaFeedbackContainer(feedback: Thread, selectable: bool, status: atStatus.Status)[source]
Bases:
FeedbackContainerMaya specific
FeedbackContainerthat implement optimized selection and deselection.This is a Maya’s custom implementation of a
FeedbackContainer. While it’s not necessary to use this subtype ofFeedbackContainerfor a Maya Process, it allow for a more optimized selection/deselection behavior, especially when there’s a lot of feedback to selection.- select(replace: bool = True) bool[source]
Implement Maya’s in-scene selection of the current
MayaFeedbackContainer.If the
MayaFeedbackContaineris not selectable, it will be skipped. On the other hand, if it is, it will do one single selection of all Feedbacks in the container, this allow for better performance than selecting each feedback one by one when there’s a lot of them.- Parameters:
replace (bool) – Whether or not the new elements must replace the current selection.
- Returns:
The state for the replace boolean. This allow to know if a chained selection must be replace again or not. Usually, it must replace for the first item, and then add, if not, we would end up with only the latest element.
- Return type:
bool
- deselect() None[source]
Implement Maya’s in-scene deselection of the current
MayaFeedbackContainer.If the
MayaFeedbackContaineris not selectable, it will be skipped. On the other hand, if it is, it will do one single deselection of all Feedbacks in the container, this allow for better performance than deselecting each feedback one by one when there’s a lot of them.
- status: atStatus.Status
The FeedbackContainer status represent the result state of the Thread based on the contained feedbacks
- selectable: bool
Determines whether the feedback is selectable. This attribute is not used in comparison, meaning two instances with the same data (
feedback) will be considered similar, regardless of the selectable value.
- children: List[ProtoFeedback]
Holds references to all child feedback instances. Unlike the feedback itself, this attribute is mutable, and as such, it is not considered in comparison, hashing, or sorting.
- class athena.software.atMaya.MayaFeedback(feedback: Any, selectable: bool)[source]
Bases:
FeedbackRepresent a single Maya Feedback, this allows for better display and selection/deselection behavior.
Using a MayaFeedback is not mandatory when doing a Maya
Process, and it can be used alongside normalFeedback. The benefits of using a Maya Feedback is that they allow for in-scene selection and return a clean display for complexes Maya API types.- select(replace: bool = True) bool[source]
Implement Maya’s in-scene selection of the current
MayaFeedback.If the
MayaFeedbackis selectable, it will be selected in the scene.- Parameters:
replace (bool) – Whether or not the new element must replace the current selection.
- Returns:
The result of the parent’s class implementation.
- Return type:
bool
- deselect() None[source]
Implement Maya’s in-scene deselection of the current
MayaFeedback.If the
MayaFeedbackis selectable, it will be deselected in the scene.
- feedback: Any
Represents the data held by the feedback instance, which can be of any type based on the specific needs of the associated process.
- selectable: bool
Determines whether the feedback is selectable. This attribute is not used in comparison, meaning two instances with the same data (
feedback) will be considered similar, regardless of the selectable value.
- children: List[ProtoFeedback]
Holds references to all child feedback instances. Unlike the feedback itself, this attribute is mutable, and as such, it is not considered in comparison, hashing, or sorting.
- class athena.software.atMaya.MayaProcess(*args: Any, **kwargs: Any)[source]
Bases:
ProcessA custom Process implementation to be used in Maya which define the best
FeedbackContainersubclass to use.It’s not mandatory to create a Maya Process using this
Processsubclass, the only thing it does is making sure to override theProcessdefaultFeedbackContaineris replace with aMayaFeedbackContainerwhich implement a better selection behavior. By using this the user’s won’t have to figure out whichFeedbackContainerto use and implement it on all theirProcess.- FEEDBACK_CONTAINER_CLASS
alias of
MayaFeedbackContainer
athena.software.atStandalone module
athena.software.atUnrealEngine module
- class athena.software.atUnrealEngine.SupportsStr(*args, **kwargs)[source]
Bases:
ProtocolType Hints Protocol implementation for all class that support string conversion.
- athena.software.atUnrealEngine.select(to_select: Iterable[unreal.Actor], replace: bool = True) None[source]
Allow in-scene selection for Unreal-Engine.
- Parameters:
to_select (Iterable[unreal.Actor]) – All Unreal actors to select in the current scene.
replace (bool) – Whether or not the current selection should be replaced with the new objects.
- athena.software.atUnrealEngine.get_display(object_: unreal.Actor | SupportsStr) str[source]
Get a displayable string for the given object.
If the input is an unreal.Actor object, it’s label is returned. If not, it’s just converted to string.
- Parameters:
object – The object to get a displayable string from. unreal.Actor are preferred but not mandatory.
- Returns:
A displayable string for the given object. For unreal.Actor, the label is returned.
- Return type:
str
Notes
This methods works whether the input is an unreal.Actor or anything else that implement the str protocol.