Octolaspe can i make it run custom gcode lines before and after photo?

sorry for the long title name but i was curious if anyone knew how to get octolaspe to run a few lines of gcode before and after taking a photo

right now i am using the animated-printing setting on octolaspe and was simply curious to see if after moving into position if there was a way to further move the printer as id like it to run a line or two of gcode before and after the photo is taken

the lines of gcode i hope to run before the photo is

G91 ; set printer in relative to move the z axis up
G0 Z20 ; move the z axis up to avoid collision from following line
M280 P0 S10 ;release my Bl-touch probe to get a better photo without the probe looking red

then after the photo is taken

M280 P0 S90 ;store Bl-touch probe
G0 Z-20 ; move back to where it was
G90 ; set printer back to absolute positioning

to repeat myself from earlier i am just curious to see if this could possibly work and if it doesn't ill just end up putting it into the gcode