Quote:
Originally Posted by Terisa de morgan
How do I pass the list to the module? I've found how to define vars local/global to the chain but I don't know how the module would be able to read them
|
To
retrieve the variable using a python module:
Code:
chain.chain_vars.get('variable_name', '')
Quote:
Originally Posted by Terisa de morgan
How do you check that one and only one is selected? So you raise an error if no book is selected or more than one book is selected.
|
If you are doing this using python:
Code:
if len(gui.current_view().selectionModel().selectedRows()) !=1:
do_something
If you are doing it with a regular action, you can set a condition as illustrated in this
post.