Go to: Synopsis. Flags. Return value. Python examples.
stringArrayIntersector(
intersectorName
, [allowDuplicates=int], [defineTemplate=string], [edit=boolean], [exists=boolean], [intersect=string], [query=boolean], [query=boolean], [reset=boolean], [useTemplate=string])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
stringArrayIntersector is undoable, queryable, and editable.
The stringArrayIntersector command creates and edits an object which is
able to efficiently intersect large string arrays. The intersector object
maintains a sense of "the intersection so far", and updates the
intersection when new string arrays are provided using the -i/intersect
flag.
Note that the string intersector object may be deleted using the deleteUI
command.
allowDuplicates, defineTemplate, edit, exists, intersect, query, query, reset, useTemplate
Flag can appear in Create mode of command
|
Flag can appear in Edit mode of command
|
Flag can appear in Query mode of command
|
Flag can have multiple arguments, passed either as a tuple or a list.
|
string, or stringArray (depending on flags)
import maya.cmds as cmds
# Create an intersector
#
myIntersector = cmds.stringArrayIntersector('stringArrayIntersector')
# Intersect some string arrays using the intersector
#
initialArray = ['Excellent', 'Smithers', 'doh']
cmds.stringArrayIntersector( myIntersector, edit=True, intersect=initialArray )
cmds.stringArrayIntersector( myIntersector, edit=True, intersect=['Smithers', 'Homer'] )
# Query the intersector to see what the intersection is so far
#
cmds.stringArrayIntersector( myIntersector, query=True )
# Result: Smithers #
# Reset the intersector so that you can use it again with new string
# arrays
#
cmds.stringArrayIntersector( myIntersector, edit=True, reset=True )
# Delete the intersector as we are now done with it
#
cmds.deleteUI( myIntersector )
Return to Autodesk Index