python - Macro tool for maya -


on seeing photoshop action, curious develop macro tool maya using python. started working on it.

here sample,

path = "c:/desktop/file.txt" = open(path, 'w') #cmds.scripteditorinfo(ch = true, chf = true) cmds.scripteditorinfo( hfn=path, wh=true) a.close() 

i able record things. here recorded information.

createpolygonpyramid; performpolyprimitive pyramid 0; settoolto createpolypyramidctx; optionvar -query toolmessagevisible; optionvar -query toolmessagetime; optionvar -query toolmessageverticaloffset; optionvar -query toolmessagehorizontaloffset; headsupmessage -time 0.7 -verticaloffset -40 -horizontaloffset 0 -viewport 1 -          uvtextureeditor 0"drag on grid."; changetoolicon; polypyramid -ch on -o on -w 10.727425 -cuv 3 ; escapecurrenttool; autoupdateattred; updateanimlayereditor("animlayertab"); statuslineupdateinputfield; changetoolicon; 

the problem un-able categories things (record required things). records information. tried using combination of various flags se, sw, si, sr. un-able pick required information.

the output showing recording looks have "echo commands" enabled in script editor. sure thats necessary purpose of recording actions? "echo all" gives sub-commands executed initial command, redundant calling original command.

maybe can combine script editor logging approach, "echo all" turned off, , use undo queue record: cmds.undoinfo(q=true, printqueue=true)
either have clear undo queue first when start recording, or first run noop command creates "marker" know start in queue. operation "setattr" leaves blank named entry, able @ script editor record know missing in between. maybe 2 combined more accurate macro.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -