From: Hugo Villeneuve Date: Fri, 6 Oct 2023 20:29:46 +0000 (-0400) Subject: Remove ref layers X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=d320a80b42e7b6bd47a056d54d807c6320b7dc2f;p=fgen.git Remove ref layers --- diff --git a/fgen.sh b/fgen.sh index 8de4036..45b3001 100755 --- a/fgen.sh +++ b/fgen.sh @@ -10,6 +10,7 @@ PROG_NAME=$(basename $0) # Set default values bg_layer_name="background" +ref_layer_prefix="ref" # Pour conversion vidéo: fps=8 @@ -80,18 +81,6 @@ function get_scene_id() echo "${token}" } -# Arg1: label -function is_skip_label() -{ - skip=$(echo "${1}" | grep -e "A8_.*") - - if [ x"${skip}" = x"" ]; then - return 1 - else - return 0 - fi -} - print_usage() { echo "${PROG_NAME} -- Générateur de séquence d'images PNG à partir d'un fichier Photoshop (PSD)." @@ -183,6 +172,9 @@ if [ ${trames} -eq 1 ]; then # Remove background line: ${SED} -i -e /label:${bg_layer_name},.*/d ${layers} + # Remove reference lines: + ${SED} -i -e /label:${ref_layer_prefix}.*/d ${layers} + # Create background frame: convert -size ${size} xc:none ${dest}/background.png @@ -200,11 +192,6 @@ if [ ${trames} -eq 1 ]; then log_dbg " nom: ${label}" log_dbg " pos: ${p}" - if is_skip_label "${label}"; then - log_dbg " skip..." - continue - fi - files="${files} -page ${p} ${src}[${scene}]" if [ x"${nf}" != x"" ]; then