Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/operations/COM_PlaneTrackOperation.cc
| Show First 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | if (object) { | ||||
| plane_track = BKE_tracking_plane_track_get_named(tracking, object, this->m_planeTrackName); | plane_track = BKE_tracking_plane_track_get_named(tracking, object, this->m_planeTrackName); | ||||
| if (plane_track) { | if (plane_track) { | ||||
| float clip_framenr = BKE_movieclip_remap_scene_to_clip_frame(this->m_movieClip, frame); | float clip_framenr = BKE_movieclip_remap_scene_to_clip_frame(this->m_movieClip, frame); | ||||
| BKE_tracking_plane_marker_get_subframe_corners(plane_track, clip_framenr, corners); | BKE_tracking_plane_marker_get_subframe_corners(plane_track, clip_framenr, corners); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| void PlaneTrackCommon::determineResolution(unsigned int resolution[2], | void PlaneTrackCommon::determine_canvas(const rcti &preferred_area, rcti &r_area) | ||||
| unsigned int /*preferredResolution*/[2]) | |||||
| { | { | ||||
| resolution[0] = 0; | r_area = COM_AREA_NONE; | ||||
| resolution[1] = 0; | |||||
| if (this->m_movieClip) { | if (this->m_movieClip) { | ||||
| int width, height; | int width, height; | ||||
| MovieClipUser user = {0}; | MovieClipUser user = {0}; | ||||
| BKE_movieclip_user_set_frame(&user, this->m_framenumber); | BKE_movieclip_user_set_frame(&user, this->m_framenumber); | ||||
| BKE_movieclip_get_size(this->m_movieClip, &user, &width, &height); | BKE_movieclip_get_size(this->m_movieClip, &user, &width, &height); | ||||
| resolution[0] = width; | r_area = preferred_area; | ||||
| resolution[1] = height; | r_area.xmax = r_area.xmin + width; | ||||
| r_area.ymax = r_area.ymin + height; | |||||
| } | } | ||||
| } | } | ||||
| /* ******** PlaneTrackMaskOperation ******** */ | /* ******** PlaneTrackMaskOperation ******** */ | ||||
| void PlaneTrackMaskOperation::init_data() | void PlaneTrackMaskOperation::init_data() | ||||
| { | { | ||||
| PlaneDistortMaskOperation::init_data(); | PlaneDistortMaskOperation::init_data(); | ||||
| Show All 34 Lines | |||||