Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/operations/COM_PlaneCornerPinOperation.cc
| Show First 20 Lines • Show All 203 Lines • ▼ Show 20 Lines | if (!m_corners_ready) { | ||||
| m_corners_ready = true; | m_corners_ready = true; | ||||
| } | } | ||||
| unlockMutex(); | unlockMutex(); | ||||
| return data; | return data; | ||||
| } | } | ||||
| void PlaneCornerPinMaskOperation::determineResolution(unsigned int resolution[2], | void PlaneCornerPinMaskOperation::determine_canvas(const rcti &preferred_area, rcti &r_area) | ||||
| unsigned int preferredResolution[2]) | |||||
| { | { | ||||
| if (execution_model_ == eExecutionModel::FullFrame) { | if (execution_model_ == eExecutionModel::FullFrame) { | ||||
| /* Determine inputs resolution. */ | /* Determine input canvases. */ | ||||
| PlaneDistortMaskOperation::determineResolution(resolution, preferredResolution); | PlaneDistortMaskOperation::determine_canvas(preferred_area, r_area); | ||||
| } | } | ||||
| resolution[0] = preferredResolution[0]; | r_area = preferred_area; | ||||
| resolution[1] = preferredResolution[1]; | |||||
| } | } | ||||
| void PlaneCornerPinMaskOperation::get_area_of_interest(const int UNUSED(input_idx), | void PlaneCornerPinMaskOperation::get_area_of_interest(const int UNUSED(input_idx), | ||||
| const rcti &UNUSED(output_area), | const rcti &UNUSED(output_area), | ||||
| rcti &r_input_area) | rcti &r_input_area) | ||||
| { | { | ||||
| /* All corner inputs are used as constants. */ | /* All corner inputs are used as constants. */ | ||||
| r_input_area = COM_SINGLE_ELEM_AREA; | r_input_area = COM_CONSTANT_INPUT_AREA_OF_INTEREST; | ||||
| } | } | ||||
| /* ******** PlaneCornerPinWarpImageOperation ******** */ | /* ******** PlaneCornerPinWarpImageOperation ******** */ | ||||
| PlaneCornerPinWarpImageOperation::PlaneCornerPinWarpImageOperation() : m_corners_ready(false) | PlaneCornerPinWarpImageOperation::PlaneCornerPinWarpImageOperation() : m_corners_ready(false) | ||||
| { | { | ||||
| addInputSocket(DataType::Vector); | addInputSocket(DataType::Vector); | ||||
| addInputSocket(DataType::Vector); | addInputSocket(DataType::Vector); | ||||
| ▲ Show 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | void PlaneCornerPinWarpImageOperation::get_area_of_interest(const int input_idx, | ||||
| const rcti &output_area, | const rcti &output_area, | ||||
| rcti &r_input_area) | rcti &r_input_area) | ||||
| { | { | ||||
| if (input_idx == 0) { | if (input_idx == 0) { | ||||
| PlaneDistortWarpImageOperation::get_area_of_interest(input_idx, output_area, r_input_area); | PlaneDistortWarpImageOperation::get_area_of_interest(input_idx, output_area, r_input_area); | ||||
| } | } | ||||
| else { | else { | ||||
| /* Corner inputs are used as constants. */ | /* Corner inputs are used as constants. */ | ||||
| r_input_area = COM_SINGLE_ELEM_AREA; | r_input_area = COM_CONSTANT_INPUT_AREA_OF_INTEREST; | ||||
| } | } | ||||
| } | } | ||||
| } // namespace blender::compositor | } // namespace blender::compositor | ||||