ShotgunORM.SgField.RETURN_TYPE_DATE_TIME: ShotgunORM.SgScriptFieldDateTime(), ShotgunORM.SgField.RETURN_TYPE_ENTITY: ShotgunORM.SgScriptFieldEntity(), ShotgunORM.SgField.RETURN_TYPE_MULTI_ENTITY: ShotgunORM.SgScriptFieldEntityMulti(), ShotgunORM.SgField.RETURN_TYPE_FLOAT: ShotgunORM.SgScriptFieldFloat(), ShotgunORM.SgField.RETURN_TYPE_INT: ShotgunORM.SgScriptFieldInt(), ShotgunORM.SgField.RETURN_TYPE_LIST: ShotgunORM.SgScriptFieldSelectionList(), ShotgunORM.SgField.RETURN_TYPE_TAG_LIST: ShotgunORM.SgScriptFieldTagList(), ShotgunORM.SgField.RETURN_TYPE_TEXT: ShotgunORM.SgScriptFieldText(), } def buildSearchExpFilter(sgEntityFieldInfos, sgArgs, sgSearchExpSpan): ''' Builds a logical operator from a search expression span. ''' if len(sgSearchExpSpan) <= 0: raise SgScriptError('search expression span empty') ShotgunORM.LoggerScriptEngine.debug( ' - Parsing sub-span: "%(sgSearchExpSpan)s"', {'sgSearchExpSpan': sgSearchExpSpan})
ShotgunORM.SgField.RETURN_TYPE_TEXT ] SCRIPT_FIELDS = { ShotgunORM.SgField.RETURN_TYPE_CHECKBOX: ShotgunORM.SgScriptFieldCheckbox(), ShotgunORM.SgField.RETURN_TYPE_COLOR: ShotgunORM.SgScriptFieldColor(), ShotgunORM.SgField.RETURN_TYPE_COLOR2: ShotgunORM.SgScriptFieldColor2(), ShotgunORM.SgField.RETURN_TYPE_DATE: ShotgunORM.SgScriptFieldDate(), ShotgunORM.SgField.RETURN_TYPE_DATE_TIME: ShotgunORM.SgScriptFieldDateTime(), ShotgunORM.SgField.RETURN_TYPE_ENTITY: ShotgunORM.SgScriptFieldEntity(), ShotgunORM.SgField.RETURN_TYPE_MULTI_ENTITY: ShotgunORM.SgScriptFieldEntityMulti(), ShotgunORM.SgField.RETURN_TYPE_FLOAT: ShotgunORM.SgScriptFieldFloat(), ShotgunORM.SgField.RETURN_TYPE_INT: ShotgunORM.SgScriptFieldInt(), ShotgunORM.SgField.RETURN_TYPE_LIST: ShotgunORM.SgScriptFieldSelectionList(), ShotgunORM.SgField.RETURN_TYPE_TAG_LIST: ShotgunORM.SgScriptFieldTagList(), ShotgunORM.SgField.RETURN_TYPE_TEXT: ShotgunORM.SgScriptFieldText(), } def buildSearchExpFilter(sgEntityFieldInfos, sgArgs, sgSearchExpSpan): ''' Builds a logical operator from a search expression span. ''' if len(sgSearchExpSpan) <= 0: raise SgScriptError('search expression span empty') ShotgunORM.LoggerScriptEngine.debug(' - Parsing sub-span: "%(sgSearchExpSpan)s"', {'sgSearchExpSpan': sgSearchExpSpan}) inverse = sgSearchExpSpan.startswith('!') if inverse: