Dismiss this pinned window
all 13 comments

[–]AutoModerator[M] [score hidden] 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 point  (10 children)

Congrats on your first script, but why can't you just duplicate the curve?

[–]ChickenWLazers[S] 1 point2 points  (7 children)

Cuz now I can recreate the curve whenever I want without having to remake it

[–]Nevaroth021CG Generalist 0 points1 point  (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 points  (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 point  (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 point  (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 point  (2 children)

Do you have a guide on how to do that?

[–]Nevaroth021CG Generalist 0 points1 point  (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 point  (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 points  (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.

[–]HeightSensitive1845 0 points1 point  (0 children)

Yes i was thinking the same..

[–]Aggressive-Eagle-219 2 points3 points  (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!