projects
/
fgen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
4945ffa
)
Add support for groupe-ref
author
Hugo Villeneuve
<hugo@hugovil.com>
Sat, 7 Oct 2023 04:01:46 +0000
(
00:01
-0400)
committer
Hugo Villeneuve
<hugo@hugovil.com>
Sat, 7 Oct 2023 15:57:56 +0000
(11:57 -0400)
fgen.sh
patch
|
blob
|
history
diff --git
a/fgen.sh
b/fgen.sh
index
9fbd121
..
385e211
100755
(executable)
--- a/
fgen.sh
+++ b/
fgen.sh
@@
-79,6
+79,14
@@
function get_group_id()
echo "${group}"
}
echo "${group}"
}
+# Arg1: group name
+function get_group_ref()
+{
+ local token
+ token=$(echo "${1}" | grep -e "^ref" | ${SED} "s/^\(ref\).*/\1/g")
+ echo "${token}"
+}
+
# Get duplicate from. Ex: "label:dup1-7 planXYZ,geometry..." will return 1
# Arg1: line
function get_dup_from()
# Get duplicate from. Ex: "label:dup1-7 planXYZ,geometry..." will return 1
# Arg1: line
function get_dup_from()
@@
-202,9
+210,6
@@
if [ ${trames} -eq 1 ]; then
# Remove background line:
${SED} -i -e /label:${bg_layer_name},.*/d ${layers}
# 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
# Create background frame:
convert -size ${size} xc:none ${dest}/background.png
@@
-219,7
+224,6
@@
if [ ${trames} -eq 1 ]; then
p=$(get_pos "${l}")
nf=$(get_frame_id "${l}")
ng=$(get_group_id "${l}")
p=$(get_pos "${l}")
nf=$(get_frame_id "${l}")
ng=$(get_group_id "${l}")
-
dup_from=$(get_dup_from "${l}")
dup_to=$(get_dup_to "${l}")
dup_from=$(get_dup_from "${l}")
dup_to=$(get_dup_to "${l}")
@@
-228,9
+232,18
@@
if [ ${trames} -eq 1 ]; then
nf=${dup_from}
fi
nf=${dup_from}
fi
+ log_dbg "Layer ${scene}"
+ log_dbg " nom: ${label}"
+ log_dbg " pos: ${p}"
+
+ group_ref=$(get_group_ref "${group}")
+ log_dbg " group_ref: ${group_ref}"
+
# Only change group if ng is set...
if [ x"${ng}" != x"" ]; then
# Only change group if ng is set...
if [ x"${ng}" != x"" ]; then
- generate_video
+ if [ x"${group_ref}" != x"ref" ]; then
+ generate_video
+ fi
group="${ng}"
log_dbg "New group: ${ng}"
group="${ng}"
log_dbg "New group: ${ng}"
@@
-243,9
+256,11
@@
if [ ${trames} -eq 1 ]; then
continue
fi
continue
fi
- log_dbg "Layer ${scene}"
- log_dbg " nom: ${label}"
- log_dbg " pos: ${p}"
+ if [ x"${group_ref}" != x"" ]; then
+ # Ignore all images in groupe-ref:
+ log_dbg " ignore (groupe-ref)"
+ continue
+ fi
files="${files} -page ${p} ${src}[${scene}]"
files="${files} -page ${p} ${src}[${scene}]"