Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7964217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:49:49+00:00 2026-06-04T05:49:49+00:00

Hi I am currently learning python scripting in maya. I am looking for a

  • 0

Hi I am currently learning python scripting in maya. I am looking for a way to store models in code so I can access my unique models with the code. (I understand how to write a python amino acid sequence, just not how to store maya objects and access them with python in maya)

I have learned how to access the script editor and how to add specific shapes such as polySphere() and others. What I want to do is make a specific model, and then select the model and get the code for recreating all the selected items, which I can then run in a script to recreate that shape in another scene.

For example: I am currently making some amino acids, while it isn’t hard to model an amino acid, when I want to make a chain of them it would be very helpful to write a script that recreates those specific amino acid (3d models) in a sequence.

Thanks for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T05:49:50+00:00Added an answer on June 4, 2026 at 5:49 am

    This is a problem that many beginner to intermediate Maya users have. It stems form the fact that they don’t really grasp how Maya actually works. The trick here is that your actually looking it in the wrong way around. Before we go deeper into the answer its best if I define scripting so you dont get confused down the line. Scripting in Maya is the maya.cmds module, that is the scripting layer of Maya. Python also exposes Mayas programming layer in the maya.OpenMaya, more on that later.

    Now Mayas scripting interface is somewhat weird at first, because its not the tool that does the job. The real programming environment of Maya are the nodes, the scripting interface just exposes a programmatic way for you to layout the nodes. So in way Mayas scripting interface is a metaprogramming interface of kinds. You wont figure this out by looking at the scripting reference tough, but rather the hypergraph or the Node Reference. This means its a bit unintuitive to do what you want at a first glance.

    So your question mutates at this point(assuming you want to script as I defined above, and Maya manual defines it). What kinds of nodes can I use to build this amino acid chain?

    Well basically your left with two options, using particles and particle instancing or using a snapshot node (snapshot node is the only factory node that can do replication and change the shape of the dg, during run time). Particle instancing works its super fast and intuitive once you get a hang of it, and it can almost certainly do hundreds of thousands of molecules this way. Using the snapshot node is a bit complex, and you cant really easily animate it. The node you use to bind all this is into something useful is a expression node, which is Mayas custom data handler (and no expressions are not MEL).

    Now if you really want to do code, which I advice against, then you need to make a node using Mayas API, in combination to a script. Scripts build nodes remember so that building connections and user interface is a script and the API builds just the node internals. This is more straightforward coding, tough inefficient use of your time.

    It is also possible to use events and rebuild the damn thing on demand. Problem with this is that you’ll have maya puking all over you and fighting you all the way making your life miserable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im currently learning SQLite3 with Python. I'm looking at the manual, and it tells
im currently learning python (in the very begining), so I still have some doubts
I'm currently learning Python using Zelle's Introductory text, and I'm trying to recreate one
I'm currently learning python and trying to do exercises at pyschools (if anyone knows
I'm currently learning on how to use the Python optparse module. I'm trying the
I'm a hobbyist programmer with a fair grasp of Python and I'm currently learning
I'm currently learning clojure, but I was wondering how to get and store user
I am currently learning python programming (and am a beginner at it). Currently I
I'm currently learning python from a book called 'Python for the absolute beginner (third
I am currently learning python in preperation for a class over the summer and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.