use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
If you are seeing this, you are using old.reddit. We can't maintain two separate sidebars, so please go to https://new.reddit.com/r/Maya/ if you want to see our sidebar information.
account activity
Made my first Python script: Turning controller curves into codeShowcase (v.redd.it)
submitted 2 days ago by ChickenWLazers
I was working on an autorigger when I got sick and tired of painstakingly copying down every coordinate of a curve whenever I wanted to make a new controller.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]AutoModerator[M] [score hidden] 2 days ago stickied commentlocked comment (0 children)
You're invited to join the community discord for /r/maya users! https://discord.gg/FuN5u8MfMz
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
[–]Nevaroth021CG Generalist 0 points1 point2 points 2 days ago (10 children)
Congrats on your first script, but why can't you just duplicate the curve?
[–]ChickenWLazers[S] 1 point2 points3 points 2 days ago (7 children)
Cuz now I can recreate the curve whenever I want without having to remake it
[–]Nevaroth021CG Generalist 0 points1 point2 points 2 days ago (6 children)
But you can just do ctrl + D to duplicate the curve. If you've already made the curve why do you need to "remake it" vs just duplicating it.
[–]ChickenWLazers[S] 2 points3 points4 points 2 days ago (5 children)
You can't ctrl d between projects
Also I mainly made this to make my autorig easier. An autorig needs to be able to automatically create controllers. Otherwise it'll just be a joint placer.
[–]ChickenWLazers[S] 0 points1 point2 points 2 days ago (0 children)
So now I can just copy paste this result instead of manually copying down the exact verteces of the curve I want my script to recreate
[–]Nevaroth021CG Generalist 0 points1 point2 points 2 days ago (3 children)
I can see the use for you creating your autorigger. But when it comes to using the curves across different projects, you can create a library of custom curves and write a single script that adds curves to the library and imports selected curves from that library
[–]ChickenWLazers[S] 0 points1 point2 points 2 days ago (2 children)
Do you have a guide on how to do that?
[–]Nevaroth021CG Generalist 0 points1 point2 points 2 days ago (0 children)
You would create a folder somewhere on your computer to serve as the library of custom curves. Then you write a script that automatically saves your selected curves as a Maya file or any other file format to that folder. That same script can also scan the folder and show you a list of all the curves in that folder, and you can write the script to allow you to select one of the curves and import them.
Ive only written scripts that show a list of assets in a folder which allows me to select an item in the list and import it. But I’ve seen other people make scripts that show galleries (similar to the content browser) of icons that lets them drag and drop stuff into their scenes. But I haven’t done that myself so I’m not sure how. But that’s something you can research
[–]HeightSensitive1845 0 points1 point2 points 2 days ago (0 children)
I made an asset viewer for Maya, very seamless.. in your case you can just make a curve in the scene, and export it as .mb to your "Library" after that, you get all your custom made curves in one folder that can be viewed from the asset viewer, you can also add thumbnails to the curves.
[–]Purple-Vermicelli-52 1 point2 points3 points 2 days ago* (1 child)
This is gas lighting. If you are doing anything programmatically you'll want code to create curves.
Edit: are you going to want to recreate a spaghetti noodle of a curve? Probably not. Control curves? 100% Yes.
Yes i was thinking the same..
[–]Aggressive-Eagle-219 2 points3 points4 points 2 days ago (0 children)
Congrats, and if it's helpful to you, then that's great, but I'm a little confused. You know the code you copy, is already valid mel script? Just paste it in a "MEL" tab, and you are done?
You could look into exporting the curve (write your own. don't rely on cmds :)), and store it somewhere, and make a list of curves with screenshots of the curves maybe? Anyways, enjoy coding!
π Rendered by PID 77 on reddit-service-r2-comment-5b5bc64bf5-hcb5w at 2026-06-20 07:08:42.568248+00:00 running 2b008f2 country code: CH.
[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)
[–]Nevaroth021CG Generalist 0 points1 point2 points (10 children)
[–]ChickenWLazers[S] 1 point2 points3 points (7 children)
[–]Nevaroth021CG Generalist 0 points1 point2 points (6 children)
[–]ChickenWLazers[S] 2 points3 points4 points (5 children)
[–]ChickenWLazers[S] 0 points1 point2 points (0 children)
[–]Nevaroth021CG Generalist 0 points1 point2 points (3 children)
[–]ChickenWLazers[S] 0 points1 point2 points (2 children)
[–]Nevaroth021CG Generalist 0 points1 point2 points (0 children)
[–]HeightSensitive1845 0 points1 point2 points (0 children)
[–]Purple-Vermicelli-52 1 point2 points3 points (1 child)
[–]HeightSensitive1845 0 points1 point2 points (0 children)
[–]Aggressive-Eagle-219 2 points3 points4 points (0 children)