athena.software package

Submodules

athena.software.atBlender module

athena.software.atBlender.select(to_select: Iterable[bpy.types.Object], replace: bool = True) None[source]

Allow software selection in Blender.

Parameters:
  • toSelect – All nodes to select.

  • replace (bool) – Whether or not to replace the current selection with the new objects to select.

athena.software.atBlender.get_display(object_: bpy.types.Object) str[source]

Get a proper displayable string for the given object.

Will simply return the object’s name.

Parameters:

object – The object to get the name from.

Returns:

The name of the given object.

Return type:

str

athena.software.atHoudini module

athena.software.atHoudini.select(to_select: Iterable[hou.Node], replace: bool = True) None[source]

Implement software selection in Houdini.

Parameters:
  • toSelect – All hou.Node to select.

  • replace (bool) – Whether or not the original selection must be replace with the given objects.

athena.software.atHoudini.get_display(object_: hou.Node) str[source]

Get the given nice name for the given hou.Node for display purpose.

Parameters:

object – The node to get a display from.

Returns:

The name of the given hou.Node for display purpose.

Return type:

str

athena.software.atMaya module

class athena.software.atMaya.PauseViewport[source]

Bases: object

Maya 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: FeedbackContainer

Maya specific FeedbackContainer that implement optimized selection and deselection.

This is a Maya’s custom implementation of a FeedbackContainer. While it’s not necessary to use this subtype of FeedbackContainer for 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 MayaFeedbackContainer is 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 MayaFeedbackContainer is 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.

feedback: Thread

The FeedbackContainer data must be the Thread for which it contain feedbacks.

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: Feedback

Represent 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 normal Feedback. 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 MayaFeedback is 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 MayaFeedback is 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: Process

A custom Process implementation to be used in Maya which define the best FeedbackContainer subclass to use.

It’s not mandatory to create a Maya Process using this Process subclass, the only thing it does is making sure to override the Process default FeedbackContainer is replace with a MayaFeedbackContainer which implement a better selection behavior. By using this the user’s won’t have to figure out which FeedbackContainer to use and implement it on all their Process.

FEEDBACK_CONTAINER_CLASS

alias of MayaFeedbackContainer

athena.software.atStandalone module

athena.software.atStandalone.select(to_select: Any, replace: bool = True) None[source]

Allow selection in standalone mode.

Raises:

NotImplementedError – This function is not implemented yet, will be in a future release.

athena.software.atStandalone.get_display(object_: Any) str[source]

Get a displayable string for the given object.

Raises:

NotImplementedError – This function is not implemented yet, will be in a future release.

athena.software.atUnrealEngine module

class athena.software.atUnrealEngine.SupportsStr(*args, **kwargs)[source]

Bases: Protocol

Type 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.

Module contents