Skip to content

Commit 53dc1a5

Browse files
Merge pull request #28 from BlankSourceCode/add-group-search
Search inside groups
2 parents 781b2d0 + ee1d603 commit 53dc1a5

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

obs-zoom-to-mouse.lua

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -520,9 +520,14 @@ function refresh_sceneitem(find_newest)
520520
if all_items then
521521
for _, item in pairs(all_items) do
522522
local nested = obs.obs_sceneitem_get_source(item)
523-
if nested ~= nil and obs.obs_source_is_scene(nested) then
524-
local nested_scene = obs.obs_scene_from_source(nested)
525-
table.insert(queue, nested_scene)
523+
if nested ~= nil then
524+
if obs.obs_source_is_scene(nested) then
525+
local nested_scene = obs.obs_scene_from_source(nested)
526+
table.insert(queue, nested_scene)
527+
elseif obs.obs_source_is_group(nested) then
528+
local nested_scene = obs.obs_group_from_source(nested)
529+
table.insert(queue, nested_scene)
530+
end
526531
end
527532
end
528533
obs.sceneitem_list_release(all_items)
@@ -655,11 +660,11 @@ function refresh_sceneitem(find_newest)
655660
zoom_info.source_crop_filter.w + obs.obs_data_get_int(settings, "cx")
656661
zoom_info.source_crop_filter.h =
657662
zoom_info.source_crop_filter.h + obs.obs_data_get_int(settings, "cy")
658-
log("Found existing relative crop/pad filter (" ..
663+
log("Found existing non-relative crop/pad filter (" ..
659664
name ..
660665
"). Applying settings " .. format_table(zoom_info.source_crop_filter))
661666
else
662-
log("WARNING: Found existing non-relative crop/pad filter (" .. name .. ").\n" ..
667+
log("WARNING: Found existing relative crop/pad filter (" .. name .. ").\n" ..
663668
" This will cause issues with zooming. Convert to relative settings instead.")
664669
end
665670
obs.obs_data_release(settings)
@@ -1559,4 +1564,4 @@ function populate_zoom_sources(list)
15591564

15601565
obs.source_list_release(sources)
15611566
end
1562-
end
1567+
end

0 commit comments

Comments
 (0)