Friday 20 April 2012

RANDOM STUFF:


                                                         00.A bit of Scripting
Hi,

While I am rendering an animation on one of my computers, I thought it's a right time to update one of my scripts from last year. The rendering is still in progress and as usual rendering fluids is quite pain-full (taking 2-3 hours for a frame). The link for few screen-shots of what I am rendering can be found on CG TANTRA forum:
http://www.cgtantra.com/forums/showthread.php?p=213055#post213055

The script, changes the path of the directory for all or for some specific "Texture File Nodes", and is useful in situation where someone wants to change the Directory/folder from where the Images will be read by Autodesk Maya during project.
Although, the script which I wrote could had been written in a more robust way with tailor made High_Level_Languages like Pyqt/Python, however I wanted to know the DAG structure inside Maya -mainly how it can be traversed-,and since my knowledge of Python is a bit limited, so I chose to wrote this script in  MEL which I personally found more like C++/C.

Link for downloading the script:

http://www.creativecrash.com/maya/downloads/scripts-plugins/data-management/c/directory-path-change-script

Here are some of it's features:
 Enables one to:

       * Update path of the textures/image files for all file nodes in the scene.
       * Update  path of the textures/image files for specific files (e.g. files named using some naming convention like spec_XYZ,axv_SPEC001 etc.)

Limitations:
   * While updating specific files in the scene, user has to make sure that the file naming conventions are such that  the string which one wants to search among the file-names should have the occurrence of it's first character  before it's duplicate entry .

For example:-
     Searching for file with the file-name "scene01_Spec01.tga" with search keyword "spec" won't be found by the script as character "s" occurs before the "Spec" word. In contrast to this, the same keyword search will give a match if the file convention is like spec01_scene0.tga.

   *Moreover the search is case sensitive.


Here are some screenshots:

Option1:













Option2:
















To conclude I learnt DAG in MAYA to some extent and it did help me refreshing my knowledge of programming.  I made this for my personal project during Masters', one can use this script on their own risk. In case you guys have any ideas or suggestion regarding the script, you can reach me at my email address: shashi.woolverine@gmail.com.










No comments:

Post a Comment