stringMatrix 1.0.3 (maya script)

creates a matrix holding string values

License Type:

Freeware

File ID:

37867

File Size:

9.9 KB

Created / Updated:

Dec 23, 2011 / Sep 20, 2012

Owner:

nowayfra   More free downloads from this user See users marketplace items See this users portfolio Send a Private Message

Platforms:

Downloaded:

86

Maya:

2009, 2010, 2011, 2012

Tags:

helper, Storage, array, dimensional, Class, matrix, string, linked sort


The string matrix procedures simulate a matrix like the common matrix data type in maya except
that it holds string values instead of floats.

USAGE:

Copy all scripts into your scripts folder and source them. All provided scripts can be used
independently, means if you only want to use to set elements and get elements you only would
need to source stringMatrixSetElement.mel and stringMatrixGetElement.mel.
Have a look into the readme.txt for detailed descriptions of how to manipulate the string matrix.

v 1.0.1

-added "stringMatrixSetRow.mel" to set whole string arrays as matrix row
-added "stringMatrixStore.mel" and "stringMatrixLoad.mel" to save and load content from matrix to file and vice versa.

v 1.0.2

-added "stringMatrixSort.mel" for sorting matrix rows using the elements of a specified column index. It uses the
              'merge sort' algorithm so its 'stable'.

 
     EXAMPLES
     first, add some string arrays to the matrix:
        stringMatrixAddRow {"Tomatoes","red","11"};
        stringMatrixAddRow {"Blueberries","blue","2.01","tasty stuff","Sunday"};
        stringMatrixAddRow {"Bananas","yellow","-101"};
        stringMatrixAddRow {"Apples","green",".01","sour"};

    check matrix content:
        stringMatrixPrintMatrix();

        //0 <<Tomatoes,red,11>>
        //1 <<Blueberries,blue,2.01,tasty stuff,Sunday>>
        //2 <<Bananas,yellow,-101>>
        //3 <<Apples,green,.01,sour>>

    now sort the matrix at column index 1 and check result:
        stringMatrixSort 1 "string";
        stringMatrixPrintMatrix();

        //0 <<Blueberries,blue,2.01,tasty stuff,Sunday>>
        //1 <<Apples,green,.01,sour>>
        //2 <<Tomatoes,red,11>>
        //3 <<Bananas,yellow,-101>>

    finally sort the matrix using the numbers in column index 2 and check the result:
        stringMatrixSort 2 "number";
        stringMatrixPrintMatrix();

        //0 <<Bananas,yellow,-101>>
        //1 <<Apples,green,.01,sour>>
        //2 <<Blueberries,blue,2.01,tasty stuff,Sunday>>
        //3 <<Tomatoes,red,11>>   

v 1.0.3

-added "stringMatrixGetColumn.mel", lets one get a specified column as string array.
    So using the matrix filled as above and completed the linked sort based on the
    numbers we now want to get the sorted fruits into an array:
           string $result[] = stringMatrixGetColumn(0);

        // Result: Bananas Apples Blueberries Tomatoes //




Please use the Bug System to report any bugs.
Please use the Feature Requests to give me ideas.
Please use the Support Forum to ask any questions.
Please rate my product in the Review section.

People who have favorited this file