Squid: Save image

squid
(Mesrop Andriasyan) #1

@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.

imageimage

0 Likes

(Mateusz Zwierzycki) #2

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

0 Likes

(Mathieu Huard) #3

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

0 Likes

(Mesrop Andriasyan) #4

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

0 Likes

(Mathieu Huard) #5

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

(Mesrop Andriasyan) #6

It worked. Thank you very much.

0 Likes