-
Notifications
You must be signed in to change notification settings - Fork 155
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
Scatter Layer on Image Viewer breaks export-as-script #2457
Comments
NB -- this will also apply to RegionScatterLayers (once they are implemented). We can fix both at once. |
I would guess that changing the offending line to |
That would deal with this particular error, but there are other calls to |
Ah yeah, looks like there are similar calls for other scatter viewer state properties (full sphere, degrees) |
I don't know when exactly this broke, but this is clearly something that I didn't check on when I added the support for the full-sphere and angle unit functionality. I can confirm that doing e.g.
will make things work for a scatter layer in an image viewer. I'm not sure what adding support for region layers would entail - if the behavior for those is significantly different we could use a dispatch function for the layer export. Not ideal, but we do need some kind of check on the viewer state so we can properly handle any pretransforms that the exporting viewer is using. |
Describe the bug
The "Save Python script..." option fails for an ImageViewer with a Scatter layer on top.
To Reproduce
Steps to reproduce the behavior such as:
Details:
python --version
): Python 3.10glue --version
): 1.14Additional context
I'm not sure when/if this previously worked. It seems like much of the logic in
python_export_scatter_layer
assumes that we are exporting a standalone ScatterViewer (many calls to layer._viewer_state). The hacky fix would be to disable this option for an image viewer with additional non-image layers on top.The text was updated successfully, but these errors were encountered: