Package nukescripts :: Module udim
[hide private]
[frames] | no frames]

Module udim

source code

Classes [hide private]
  UDIMErrorDialog
  UDIMFile
  TableDelegate
  UDIMOptionsDialog
Functions [hide private]
 
parseUdimFile(f)
Parsing a filename string in search of the udim number.
source code
 
uv2udim(uv) source code
 
checkUdimValue(udim) source code
 
udimStr(s, label) source code
 
compare_UDIMFile(a, b) source code
 
splitInSequence(f) source code
 
findNextName(name) source code
 
allign_nodes(nodes, base) source code
 
udim_group(nodes) source code
 
udim_import(udim_parsing_func=<function parseUdimFile at 0x7fabd0917de8>, udim_column_label='UDIM')
Imports a sequence of UDIM files and creates the node material tree needed.
source code
Variables [hide private]
  __package__ = 'nukescripts'
Function Details [hide private]

parseUdimFile(f)

source code 

Parsing a filename string in search of the udim number. The function returns the udim number, and None if it is not able to decode the udim value.

The udim value is a unique number that defines the tile coordinate. If u,v are the real tile coordinates the equivalent udim number is calculated with the following formula: udim = 1001 + u + 10 * v (Note: u >=0 && u < 10 && udim > 1000 && udim < 2000)

Redefine this function if the parsing function is not appropriate with your filename syntax.

udim_import(udim_parsing_func=<function parseUdimFile at 0x7fabd0917de8>, udim_column_label='UDIM')

source code 
Imports a sequence of UDIM files and creates the node material tree needed.
    This function simplifies the process of importing textures. It generates a tree of nodes which
    adjusts the texture coordinates at rendering time for a model containing multiple texture tiles.
    In general a tile texture coordinate can be expressed with a single value(UDIM) or with a tuple(ST or UV).
    The udim_import function can decode a UDIM number from a filename.
    To determine the tile coordinate encoding for a generic filename convention, the udim_import script can use an
    external parsing function.

    The redefined parsing function needs to decode a filename string and return the udim or the u,v tile coordinate
    as an integer or tuple of integers. It should return None if the tile coordinate id can not be determined.

@param udim_parsing_func:   The parsing function. This parses a filename string and returns a tile id.
@param udim_column_label:   The name of the column in the dialog box used to show the tile id.
@return:                    None