Home Technical Talk

Maya CGFX custom AE

I've just released my custom script that improves attribute editor UI for cgfx shaders. You can download it on CreativeCrash: LINK or my own website: link
It should be useful to all authors of cgfx shaders, or to anyone that is using Cgfx in Maya!

To install: just extract the cgfxShader_customAE.mel file in
C:\Documents and Settings\NAME\Documents\maya\VERSION\scripts
and restart Maya. The cgfx plugin will load the script automatically the next time you start Maya.

By default, all it does is adding a display menu in the attribute editor.
where you can chose to display parameters either the classic way or by group (with or without texture swatches):

shaderdisplay.jpg


Here are the features:
  • you can group parameters (Note for authors: it's using the parameter semantic). This is working with all shaders, but if the author of the shader didn't use any semantic, the parameter won't go inside any group:

    shadergroup.jpg

  • it fixes the bug with the technique selection in Maya 2011, when multiple techniques are available:

    shadertechnique.jpg

  • you can see texture swatches with the sampler parameters
  • the sampler parameters now have the correct labels (i.e. 'Diffuse Map' instead of 'diffuseSampler').
    (Note for authors: It uses the texture UIName instead of sampler_state name):

    shaderswatch.jpg

  • and it works in Maya 2011, 2012 and 2013

I hope it will be useful to someone :)

Replies

  • haiddasalami
    Offline / Send Message
    haiddasalami polycounter lvl 14
    Nice stuff! Will definitely check it out
  • Slayvin
    Just to tell you I've updated the script:

    - improved speed when switching from 'Classic' to 'Group' mode
    - now supports new 'UIGroup' string annotation in shaders' parameters, to allow authors to group parameters. If the 'UIGroup' string is not specified, then the semantic is used. And if none of these two are specified, the parameter stays 'ungrouped'
    - added an option to group all 'ungrouped' parameters
    - fixed bug when creating shader from viewport (by right click -> assign new material)
    - file opening now occurs only once (and file opening error message shows only once too)

    You can download it on CreativeCrash: LINK
Sign In or Register to comment.