Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setOption render options are invalid until IndigoRenderer is created. #1909

Open
twall opened this issue Apr 12, 2024 · 1 comment
Open

setOption render options are invalid until IndigoRenderer is created. #1909

twall opened this issue Apr 12, 2024 · 1 comment

Comments

@twall
Copy link

twall commented Apr 12, 2024

Rendering options such as "render-output-format" are not considered valid until an IndigoRenderer object is created.

Steps to Reproduce
Using indigo-1.18.0, python 3.11

from indigo import Indigo
indigo = Indigo()
indigo.setOption("render-output-format")

Expected behavior
setOption should accept the valid parameter.

Actual behavior
File ".../python3.11/site-packages/indigo/indigo/indigo.py", line 140, in setOption
IndigoLib.checkResult(
File ".../site-packages/indigo/indigo/indigo_lib.py", line 1005, in checkResult
raise exception_class(IndigoLib.lib.indigoGetLastError())
indigo.indigo.indigo_exception.IndigoException: option manager: Property "render-output-format" not defined

Why does the render parameter suddenly become valid after creating a seemingly unrelated object? It is certainly unexpected that it is only possible to set a render option on the Indigo object after creating an IndigoRenderer, with that indigo object as a parameter. If the option is specific to the renderer, I would expect it to be an option on the renderer object.

@AlexanderSavelyev
Copy link
Collaborator

Hi @twall , thanks for the suggested way to have options inside renderer object. It definitely makes sense to put it inside the relevant object from object oriented programming. The current approach was implemented using the API (e.g. REST and WASM) where all the options are inside one key-value container and can be used in one function. I think we can improve the error message so that it is more clear that use need to create indigorenderer object, or fully remove indigo renderer - but it is only future plans

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants