Squid: Save image

@MateuszZwierzycki please help!!

I’m using the squid plugin (shapediver version) to generate a bitmap and save it to a file.
The bitmap is correctly generated but the saved file is a plain alpha image. Although the resolution is preserved.


Hey, Please ask the support at shapediver… I’m not really aware of what modifications they made to make it work with shapediver.

Could you post a minimal definition that produces this bug? I cannot reproduce it at the moment.

Hi. Thank you for your responses. Here’s the simplified script.Shapediver squid save bitmap.gh (305.1 KB)

The SquidInstr input takes in a list of instructions. However, in your definition the Draw and Save instructions are in different tree branches and if you flatten them, you’ll see that the Save instruction is executed before the list of Draw instructions, which explains why you are getting an empty result.

In general, make sure to flatten everything and preferably use a Merge component for the instructions to make sure they are in the explicit order you want them to be.

Find attached the fixed definition.

Shapediver squid save bitmap.gh (321.2 KB)

1 Like

It worked. Thank you very much.