PDA

View Full Version : Maya Bevel Source Code?


Cabraswel
06-28-2012, 07:41 PM
Is the source code (hopefully in MEL or Python) for Maya's bevel tool available somewhere in the installation directory?

Basically I'd like to tweak it so that the tool adds edge loops, without actually altering the positions of a model's original vertices. Not exactly sure where to begin, though...

NaughtyNathan
06-28-2012, 09:52 PM
Most of the tools in Maya (especially those that add a history state like Bevel) are internally coded (in C++ or whatever) and you don't get access to actual source code, only the AutoDesk devs ever see that.
The only "source" code that users have access to in the install folder is the MEL scripts which do stuff like set up the UI, build the menus, and call all these internal commands (and some stuff like API example code, etc..)

What most people do who want to make "tweaks" to Maya tools like this is to write a wrapper function of some kind that calls the appropriate maya internal command (i.e. in this case polyBevel) after doing some custom preparation and then some post work (e.g. finding the newly added bevel edges and calculating where to add edge loops from that).

I suggest you start by looking at the MEL documentation for the polyBevel command because I don't think you'll find anything in the install folder about it, other than the MEL scripts that set up the menu items for it and it's options dialog.

Cabraswel
06-29-2012, 03:49 PM
Thanks for the prompt response, Naughty Nathan. I was afraid of that, but you've given me a good starting point with your suggestion of wrapping the polyBevel command. I'll give that a shot, and if it pays off I'll likely post the script here.

CGTalk Moderation
06-29-2012, 03:49 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.