> For the complete documentation index, see [llms.txt](https://sulleyyys-organization.gitbook.io/manuals-of-ccs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sulleyyys-organization.gitbook.io/manuals-of-ccs/blueprint-nodes-list/mixingcameraextension.md).

# MixingCameraExtension

## GetSubCameraOfClass

Returns a sub-camera with given class. Returns nullptr if not found or invalid. Note that inherited classes will also be considered as desired. That is, if current sub-camera is B inherited from A, and your specified camera class is A, this function will return this sub-camera as **it is** a type of A.

![](/files/aTyTVdK5JW13lVrnIm0D)

<table><thead><tr><th width="163.33333333333331">Input / Output</th><th width="140"></th><th>Description</th></tr></thead><tbody><tr><td>Input</td><td></td><td></td></tr><tr><td></td><td>Target</td><td>A <code>MixingCameraExtension</code>target object.</td></tr><tr><td></td><td>Camera Class</td><td>The desired camera class you want to extract.</td></tr><tr><td>Output</td><td></td><td></td></tr><tr><td></td><td>Return Value</td><td>A camera object with your specified class. Can be nullptr.</td></tr></tbody></table>

## GetSubCameraOfIndex

Returns a sub-camera at specified index. This function will check if it's valid. If the input index is out of range, it will return nullptr.

![](/files/vN6FJG5EaAIpiphkNaIc)

<table><thead><tr><th width="163.33333333333331">Input / Output</th><th width="140"></th><th>Description</th></tr></thead><tbody><tr><td>Input</td><td></td><td></td></tr><tr><td></td><td>Target</td><td>A <code>MixingCameraExtension</code>target object.</td></tr><tr><td></td><td>Index</td><td>Camera index, in the order of how you set it up.</td></tr><tr><td>Output</td><td></td><td></td></tr><tr><td></td><td>Return Value</td><td>A camera object at the given index. Can be nullptr.</td></tr></tbody></table>

## NormalizeWeights

Normalize an array of input weights. Make sure the weight number is equal to the number of sub-cameras. Besides, this function will not take invalid cameras into account. If no valid camera is found, it will return the input weight array. If all input weights are zero, it will output an average weight array.

![](/files/HEnExn5GmnU8GCVvHhSG)

<table><thead><tr><th width="163.33333333333331">Input / Output</th><th width="140"></th><th>Description</th></tr></thead><tbody><tr><td>Input</td><td></td><td></td></tr><tr><td></td><td>Target</td><td>A <code>MixingCameraExtension</code>target object.</td></tr><tr><td></td><td>In Weights</td><td>Un-normalized weights. Make sure the number is equal to the number of sub-cameras.</td></tr><tr><td>Output</td><td></td><td></td></tr><tr><td></td><td>Return Value</td><td>A normalized weight array. Sum is 1.</td></tr></tbody></table>

## SetWeights

Set weights by given input weights.

![](/files/sbgWV2gso5wnbrbNCxOw)

<table><thead><tr><th width="163.33333333333331">Input / Output</th><th width="140"></th><th>Description</th></tr></thead><tbody><tr><td>Input</td><td></td><td></td></tr><tr><td></td><td>Target</td><td>A <code>MixingCameraExtension</code>target object.</td></tr><tr><td></td><td>In Weights</td><td>Input weights. Make sure their sum is 1.</td></tr></tbody></table>
