ebLabs_codePuncher_fullLayout

Code Puncher

From: $14.99

Code snippet manager for Technical and Creative Artists. Codepuncher is a hybrid tool that can keep any number of code snippets organized and ready to use at any time, as well as being able to tailor scripts on the fly non-destructively through the Simple Component Editor.

Clear
SKU: N/A Category: Tags: ,

Product Description

Code Puncher Snippet Tools

An advanced scripting tool set geared towards versatility and function within Maya.

  • Useful for both technical artists, and non-technical artists.
  • Manage, Access and Share any number of code snippets.
  • Non-destructively modify scripts on the fly.
  • Easily Import/Export code from existing script editor tabs, or external files.
  • Use Searching and Tagging to quickly find any script.
  • Modularize your coding by mixing  and matching code snippets.

Manual

Version Info

  • Python  script, tested with Maya 2015, 2014, 2013, Linux, Windows and Mac
  • beta 2014-10-19-20:26, [lastupdated]

Basic Usage

Codepuncher is a hybrid tool that combines some aspects of an IDE with the benefits of working directly in maya. One advantage  of this  tool is that it can keep any number of code snippets organized and ready to use at any time, as well as being able to tailor scripts on the fly non-destructively through the Simple Component Editor.

Basic Editing

‘ + ‘ Click here to clear the editor to make a new script.
Save Save your script.
Sticky/Read Only Convenient tag checkboxes for sticky and read only tags.
Format Dropdown Switch the editor between Python, MEL, and text files. This will change the syntax highlighting mode, and make it possible to run the corresponding code.
Right Click Menu
  • Run
    • Run the entire script in the editor window.
  • Run Selected
    • Run only the highlighted code.
    • The return key also does this.
  • Save
    • Store any changes to your script
Save and Run Store the script and Run it.

Layouts

Simple

ebLabs_codePuncher_simpleLayout

Full

ebLabs_codePuncher_fullLayout

Main Code Puncher Window

Top Menu Bar

File Import/Export Native Files

  • Import  From Script Editor Tabs
    • This will import all current tabs from the script editor into the current CodePuncher Window.
  • Import From Files
    • Select any Python or MEL files you would like to import.
  • Export Selected
    • Export selected code snippets into their native format files(.mel, .py, .txt). Your scripts will never be locked into the  tool, you can always save out your scripts to native files at any time.

Load

  • Choose a .codepuncher file to load.

Save/Save As

  • Save your current session, or save to a new file.

Import

  • Choose a .codepuncher file to Import.

Export Selected

  • Export selected snippets to a .codepuncher file.

Load

  • Choose a .codepuncher file to load.

Save/Save As

  • Save your current session, or save to a new file.

Import

  • Choose a .codepuncher file to Import.

Export Selected

  • Export selected snippets to a .codepuncher file.
Quickload  By default this will give you a list of files from your maya/scripts folder. Although if you are using the custom launch command, you can add share folders as well as read-only share folders. Please see commands above.
Tags

Options to toggle tags on selected snippets as well as for showing/hiding snippets of various tags. You can use this to also create new tags.

There are several default tags that will always be in the list,

  • Untagged
    • This tag is  automatically  attached to snippets without any tags.
  • readOnly
    • This will prevent a snippet from being deleted or changed in any way.
  • Startup
    • Any snippet with this tag will be run when you start the CodePuncher Tool. This is a great tag to use for all your imports (eg. import maya.cmds as cmds).
  • Sticky
    • This will keep snippets tagged with sticky sorted at the top of the list.
Options Various tool options and cucustomization

  • Preferred Type
    • You can choose from Python, MEL, or Text. New code snippets will default to your choice here. Also snippets that aren’t the default type will have a small label next to the name to indicate their type.
  • Sort By
    • Sort code snippets by Name, Recently Edited or Most Used.
  • Save Every 5 Minutes
    • The tool will save your work every time you run your code and a change is detected. Although if you’re busy coding for a long time without actually running anything, this is helpful to have running if maya crashes.
  • Echo All Commands
    • Same as in the script editor, the listener tab will echo all of the maya commands that run.’
  • Auto Complete
    • This enables an auto complete feature  when you are typing.
  • Clear All Data
    • Wipes all snippets from memory.
Layout
  • Simple
    • A simpler UI that is more streamedlined for non-technical Artists. It has a list of code snippets and a larger Simple Component Editor window.
  • Full
    • For technical artists, this mode will display all UI elements.

Snippets, Tags and Searching

Code Snippet List  The list on the left will show you all of your code snippets. Looks for the following markers.

  • [*] Sticky, snippets that will stay at the top of the list
  • [S] Startup, these are run automatically on launching CodePuncher
  • [R] Read Only, protected scripts that cant be edited.
  • [MEL]
  • [Python]
  • [Text]

Right click for additional options.

Realtime Searching  As you type, the display will update.

  • You can simply start typing words or fragments of words to find matching scripts.
  • Also use Sublime style searching where you can search by typing  the first letter of each word in sequence. For example “playblast multi cameras”, can be found by typing “pmc”.
Tags >>  This button will expand the tags window. Use this for toggling visibility quickly.
Run Run one or more selected code snippets.
” – “ Delete selected snippets.

Simple Component Editor

Simple Component Editor Tab

This tab will automatically generate a UI for your code snippets. One thing to note, Simple Component variables are globally shared. So if you add your own value to a variable for

eg, MainObject =  ‘pCube’.

Any other Simple Component UI generated for another code snippet will automatically get this modification. If you keep this in mind, you can get all of your scripts working together.

Right click on text fields  For each variable type, there are popup options.

  • Number
    • Insert Current Frame
    • Insert Start Frame
    • Insert End Frame
    • Run Calculator, this will evaluate any simple expression you enter. eg. 5+2
  • String
    • Insert Selected Item
    • Insert Selected Attribute
    • Insert File Name
    • Insert Folder Path
  • List
    • Insert Selected Items
    • Insert Selected Attributes
    • Insert File Names
  • Boolean
    • Invert Value
Refresh This will update the UI to reflect any modifications you’ve made to the code.
Save New Save your edits as a new script.
Run Run the script with your modified values.
Reset Reset the values to their originals.
Output Field Below There is an output region right below that will display simplified error messages, or other info after a script has run.

Example Script Starter Pack

Sample Pack Included is a sample pack of tools. Some are designed to well with the simple component editor, and some are designed to be run without options.
Tips

There are a lot of possible ways to mix and match scripts to work together. Use your creativity to find new ways to combine tools, as well as how to modularize your workflow.

One fun approach that we’ve tried in a studio environment is  share our working folders with other artists. That way our bits of code can be used by other artists and can be shared like a library. Check out the advanced launch code above on how to set this up.

Installation and Setup

    • Save the contents of the zip file to to your maya scripts folder.
    • Add the following command and icon to a shelf button (or hotkey).
    • ebLabs_codePuncher

Simple Setup

Advanced Setup

This method allows for setting up share folders that are either  Read-Only or regular paths for reading/writing.

Reviews

There are no reviews yet.

Be the first to review “Code Puncher”

Your email address will not be published. Required fields are marked *