Get Block Info

Block are composed of many data, such as a size, an area, a color model, a channel depth and pixel content. You can get some of these data through the following nodes.

Get Block of Layer

The following nodes will use an existing layer as a block.

Current

../../../_images/odysseybrush-nodes-block-layer-current.png

Just like “Get Stroke Block” (see this lesson), this node requires to be blended or combined with another sample to give a proper result.

  • Area: must be connected to “Make Odyssey Rectangle”.

by Index

../../../_images/odysseybrush-nodes-block-layer-index.png

In addition of the input Area (see previous), Get Block of Layer by Index requires an Index (or ID) to designate the right layer to use. This Index input is an Integer and starts from 0 (top layer) and any layers underneath will increase by +1.

In the example below, Layer 5 (top) Index is “0”, Layer 0 (bottom) Index is “5” and Layer 2 Index is “3”.

../../../_images/odysseybrush-nodes-block-layer-index-stack.png

In order to change this value easily, we advise you to connect Index input to a variable Integer and expose it.

The Blueprint:

../../../_images/odysseybrush-nodes-block-layer-index-variable-blueprint.png

The exposed parameter

../../../_images/odysseybrush-nodes-block-layer-index-variable-exposed.png

by Name

../../../_images/odysseybrush-nodes-block-layer-name.png

In addition of the input Area (see previous), Get Block of Layer by Name requires the actual name of the layer to be used. Since the Name input requires a String input, we strongly advise you to create a variable String and expose it to modify the source layer easily.

The Blueprint:

../../../_images/odysseybrush-nodes-block-layer-name-variable-blueprint.png

The exposed parameter

../../../_images/odysseybrush-nodes-block-layer-name-variable-exposed.png

Get Height or Width

../../../_images/odysseybrush-nodes-block-height-width.png

The input must be an Odyssey Block Reference (a stamp as a Texture 2D connected through the node “To Odyssey Block Reference”). The return value is an Integer which corresponds either to the width or the height of the block.

Get Block Channel Depth

../../../_images/odysseybrush-nodes-get-block-getchannel.png

Gets the Channel Depth (8 bit, 16bit or Float) from the Block and returns an Enum.

Get Block Color Model

../../../_images/odysseybrush-nodes-get-block-getcolormodel.png

Get the Color Model (RGB, HSL, HSV, etc) from the Block and returns an Enum.