@@ -386,6 +386,7 @@ ignore-scenes-with-missing-plugins() {
386386 echo " Searching for missing plugins..."
387387
388388 while read scene; do
389+ # XML scenes (.scn): parse <RequiredPlugin> tags
389390 if grep -q ' ^[ ]*<[ ]*RequiredPlugin' " $scene " ; then
390391 grep ' ^[ ]*<[ ]*RequiredPlugin' " $scene " > " $output_dir /grep.tmp"
391392 while read match; do
@@ -411,6 +412,25 @@ ignore-scenes-with-missing-plugins() {
411412 fi
412413 done < " $output_dir /grep.tmp"
413414 rm -f " $output_dir /grep.tmp"
415+ # Python scenes (.py, .pyscn): parse addObject('RequiredPlugin', ...) calls
416+ elif grep -q " addObject(['\" ]RequiredPlugin['\" ]" " $scene " ; then
417+ grep " addObject(['\" ]RequiredPlugin['\" ]" " $scene " > " $output_dir /grep.tmp"
418+ while read match; do
419+ plugin=" $( echo " $match " | sed -e " s:.*name[ ]*=[ ]*[\'\" ]\([^\'\" ]*\)[\'\" ].*:\1:g" ) "
420+ local lib=" $( get-lib " $plugin " ) "
421+ if [ -z " $lib " ]; then
422+ if grep -q " $scene " " $output_dir /all-tested-scenes.txt" ; then
423+ grep -v " $scene " " $output_dir /all-tested-scenes.txt" > " $output_dir /all-tested-scenes.tmp"
424+ mv " $output_dir /all-tested-scenes.tmp" " $output_dir /all-tested-scenes.txt"
425+ rm -f " $output_dir /all-tested-scenes.tmp"
426+ if ! grep -q " $scene " " $output_dir /all-ignored-scenes.txt" ; then
427+ echo " ignore $scene : missing plugin \" $plugin \" "
428+ echo " $scene " >> " $output_dir /all-ignored-scenes.txt"
429+ fi
430+ fi
431+ fi
432+ done < " $output_dir /grep.tmp"
433+ rm -f " $output_dir /grep.tmp"
414434 fi
415435 done < " $output_dir /all-tested-scenes.txt"
416436 echo " Searching for missing plugins: done."
0 commit comments