I have a short script to reset values of about 78 vision client tags:.
def resetEntryData(buttonSelections):
dataTagPaths =[]
dataTagValues = []
startingPaths = []
if buttonSelections[0]:
startingPaths.append("[client]Entry/Line1")
if buttonSelections[1]:
startingPaths.append("[client]Entry/Line2")
if buttonSelections[2]:
startingPaths.append("[client]Entry/Line3")
for path in startingPaths:
for item in system.tag.browse(path, filter={"name": "*Piece*", "tagType": "AtomicTag", "recursive": True}).results:
dataTagPaths.append(str(item['fullPath']))
dataTagValues.append(0)
if len(dataTagPaths) <= 0:
return
system.tag.writeBlocking(dataTagPaths, dataTagValues)
return
However, instead of browsing recursively through the folder structure of the tags, system.tag.browse only returns the value of the folders/tags in the top level of the specified path.
I have also tried this with the path set to "[client]"
and it behaves the same way.
I have tried removing all the other filter keys other than "recursive"
, this does not seem to have any effect either.
I have tested this both in client and in the scripting console with the same result.
the general tag folder layout is:
[client]
| -Entry
| - Line1 (folder)
| - Tag1
| - Tag2
| - Folder1
| - Tag3
| - Tag4
| - Folder2
| - Tag5
| - Tag6
with folders 'Line2'
and 'Line3'
having the same layout as shown here with 'Line1'
Checking system.tag.browse
when the path is set to "[client]Entry/Line1"
and the same filter as specified in the above code, the results are only [tag1, tag2, folder1, folder2]
when it should be [tag1, tag2, tag3, tag4, tag5, tag6]
Testing with the same filter keys defined but in a global tag provider (path set to "[default]folder"
) results in the function properly going through all levels of subfolders and returning all the tags matching the name.
Am I setting a filter value wrong or is browsing recursively broken for vision client tags?