Skip to content

Commit

Permalink
Update miscTags.py
Browse files Browse the repository at this point in the history
Fix bug if vr tag has not been configured
  • Loading branch information
Tweeticoats authored Jan 19, 2024
1 parent 36b5ad4 commit 810b9db
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions plugins/miscTags/miscTags.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,15 @@ def processVRTags(scene,tags):
found=True
if found:
if 'vrTag' in stash.get_configuration()['ui']:
vr_tag=stash.get_configuration()['ui']['vrTag']
if vr_tag:
tags.append(vr_tag)
else:
tags.append('VR')
if 'vrTag' in stash.get_configuration()['ui']:
vr_tag=stash.get_configuration()['ui']['vrTag']
if vr_tag:
tags.append(vr_tag)
else:
tags.append('VR')
else:
tags.append('VR')

else:
tags.append('VR')
return None
Expand Down Expand Up @@ -142,13 +146,11 @@ def processScenes():
PLUGIN_ARGS = json_input['args']["mode"]
if 'processScenes' in PLUGIN_ARGS:
processScenes()
elif 'test' in PLUGIN_ARGS:
log.debug(stash.get_configuration()['ui']['vrTag'])



elif 'hookContext' in json_input['args']:
id=json_input['args']['hookContext']['id']
if json_input['args']['hookContext']['type']=='Scene.Update.Post':
scene=stash.find_scene(id)
processScene(scene)
processScene(scene)

0 comments on commit 810b9db

Please sign in to comment.