Adverti horiz upsell

Free stringMatrix for Maya 1.0.3 (maya script)

creates a matrix holding string values

License
Button download
102 Downloads

Compatibility

  • 2012, 2011, 2010, 2009

History

Created:12/23/2011
Last Modified:09/20/2012
File Size: 9.88 KB
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 if you have any questions or problems.
Please rate and review in the Review section.

People who favorited this item:

  • kursat turkay
    kursat turkay