提交 01ac60c7 编写于 作者: J jp9000

UI: Allow alt-cropping on bounding box scene items

Allows the use of alt-cropping on scene items that have bounding box
enabled.  The crop will simply apply to the source within the bounding
box rather than try to do anything fancy.  A simple solution to an
annoying problem.
上级 1aeb87ac
...@@ -928,9 +928,6 @@ void OBSBasicPreview::CropItem(const vec2 &pos) ...@@ -928,9 +928,6 @@ void OBSBasicPreview::CropItem(const vec2 &pos)
uint32_t align = obs_sceneitem_get_alignment(stretchItem); uint32_t align = obs_sceneitem_get_alignment(stretchItem);
vec3 tl, br, pos3; vec3 tl, br, pos3;
if (boundsType != OBS_BOUNDS_NONE) /* TODO */
return;
vec3_zero(&tl); vec3_zero(&tl);
vec3_set(&br, stretchItemSize.x, stretchItemSize.y, 0.0f); vec3_set(&br, stretchItemSize.x, stretchItemSize.y, 0.0f);
...@@ -1035,7 +1032,8 @@ void OBSBasicPreview::CropItem(const vec2 &pos) ...@@ -1035,7 +1032,8 @@ void OBSBasicPreview::CropItem(const vec2 &pos)
obs_sceneitem_defer_update_begin(stretchItem); obs_sceneitem_defer_update_begin(stretchItem);
obs_sceneitem_set_crop(stretchItem, &crop); obs_sceneitem_set_crop(stretchItem, &crop);
obs_sceneitem_set_pos(stretchItem, (vec2*)&newPos); if (boundsType == OBS_BOUNDS_NONE)
obs_sceneitem_set_pos(stretchItem, (vec2*)&newPos);
obs_sceneitem_defer_update_end(stretchItem); obs_sceneitem_defer_update_end(stretchItem);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册