Long story short...im making a toolset that replicates the one similar in max to make life easier for myself.
Here is the button code for extrude:
bt0 = cmds.button( label='Extrude Face', width=203, command=cmds.'put command here' )
The command i want is the extrude one exactly the same as the extrude button in the 'Mesh Editing Tools'
im guessing i need to find the command then define it? how do i find this out?
Replies
or
Though I'd rather have context sensitive extrude if it was a button than 3 buttons for each component. But I like the context-sensitive marking menus for extrude.
A nice way to see what code is being executed when you enter a tool, run an action or change a setting etc., is to watch the code that's displayed in the script editor as you do those things.
Window > General Editors > Script Editor
Sometimes you have to turn on Echo All Commands to see the code you're seeking. Click clear history button first to clear irrelevant code before performing action you wish to get code for. Always turn Echo All Commands back off after finished since it can slow down Maya.
Usually it will be the top line(s) of code that are needed as they usually call the others that are displayed so don't copy and paste it all, just test out the minimum lines of code and see if it does everything you're needing.
History > Echo All Commands
http://help.autodesk.com/view/MAYAUL/2015/ENU/
Gives you good documentation and example on how to use the commands. See you are talking about the extrude in the modelling toolkit. You definitely want to use the echo all commands Perfect mentioned about.
If you are using python you need to import maya.mel and do
This is what i have so far:
bt0 = cmds.button( label='Extrude Face', width=203, command=cmds.PolyExtrude )
polyExtrudeEdge, polyExtrudeFacet, or polyExtrudeVertex based on your selection type.
put say you wanted to do a face extrusion with only 1 division you could do this.
also you do realize that the most of the basic modeling operations are in the marking menus, just use shift+rmb and you get a menu around the mouse with your basic extrude, bevel, bridge, merge, cut tools. This menu is dependent on what component mode your in also.
I encourage you to check out the marking menus which is my favorite thing about Maya. They're very fast, you don't have to wait for them to display, just drag as fast as you want after holding down shift + rmb. This allows quick access to actions and tools specific for whatever is selected. So for shift + rmb dragging down will extrude whatever component is selected, faces, edges or verts.
I customized all my context sensitive marking menus because I dislike the defaults. Though for those marking menus you have to manually edit their mel files. If interested I can help with that.
I understand what you mean completely with the shift+rmb but this script is just to familiarise myself and any max users picking up Maya for the first time to help them ease in.
Once I have the basic modelling tools from Max in one toolbar ported into Maya I will dish it out like candy to anyone that wants/needs to learn basic modelling tools. I am currently using Maya at Splash Damage but I always seem to prefer the 'toolbar look' I guess the max side of me loves the toolbar to much to let go .