Skip to main content

*mayatk is a collection of utility functions and helper classes for Autodesk Maya, providing convenience wrappers and common workflow patterns for Maya scripting.*

Project description

MAYATK (Maya Toolkit)

License: MIT Python Maya

mayatk is a collection of utility functions and helper classes for Autodesk Maya, providing convenience wrappers and common workflow patterns for Maya scripting.

Instance Separator

The new mayatk.core_utils.instance_separator.InstanceSeparator class wraps the payload discovery logic that powers the auto instancer. It lets you inspect a selection (or a supplied node list) and understand which meshes can be instanced before you modify the scene.

from mayatk.core_utils import InstanceSeparator

separator = InstanceSeparator(
	tolerance=0.99,
	require_same_material=False,
	split_shells=True,  # auto-separate multi-shell meshes
	rebuild_instances=True,
	template_position_tolerance=0.25,
	template_rotation_tolerance=7.5,
)
result = separator.separate()  # Uses the current Maya selection by default

for group in result.instantiable_groups:
	print(
		f"Prototype {group.prototype.transform} has {len(group.members)} duplicates"
	)

for assembly_group in result.instantiable_assembly_groups:
	print(
		f"Assembly {assembly_group.prototype.source_transform} has {len(assembly_group.members)} duplicates"
	)

Feed the result.groups back into AutoInstancer (or your own tool) to carry out the actual instancing, or let InstanceSeparator rebuild duplicate assemblies directly (enabled by default). Use result.unique_groups or result.unique_assemblies to flag geometry that still needs manual cleanup. Tune template_position_tolerance / template_rotation_tolerance if parts sit farther apart or have mirrored orientations.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mayatk-0.9.38.tar.gz (419.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mayatk-0.9.38-py3-none-any.whl (517.2 kB view details)

Uploaded Python 3

File details

Details for the file mayatk-0.9.38.tar.gz.

File metadata

  • Download URL: mayatk-0.9.38.tar.gz
  • Upload date:
  • Size: 419.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for mayatk-0.9.38.tar.gz
Algorithm Hash digest
SHA256 d163a41b59d0e0924982aeef9c7aba76f04b2310566f007688189ea4407e499c
MD5 0c9e13bf26e9b9f7e723d4bbb54b9ec9
BLAKE2b-256 3b616b286b6f3b1ee4d0c1f54a18c1fc1fc8be9d736446b35d40a8dfa7010715

See more details on using hashes here.

File details

Details for the file mayatk-0.9.38-py3-none-any.whl.

File metadata

  • Download URL: mayatk-0.9.38-py3-none-any.whl
  • Upload date:
  • Size: 517.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for mayatk-0.9.38-py3-none-any.whl
Algorithm Hash digest
SHA256 9bfd5975807b24caf489b7418a7cb2fcf3384348cc8fccff16d93889ca85e613
MD5 04e6fe5cf8be4a0c266a666706e7f66b
BLAKE2b-256 ca53ebc6033b25981f536bbdb7065dda565bc3d5c354e1b7a986b40d036292ac

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page