I've been poking around at the Display Filename And Layer On LCD plugin because it wasn't functioning properly with my FLSUN FL-K Base Delta (it would display the text string and layer, but not the number). For whatever reason, Marlin bugfix-1.1.x didn't like showing any text after the colon, and after a bit of trial and error, I figured out where to remove the colon that was preventing the layer number from popping up on the LCD. That got me to thinking about how to get the plugin to display the current layer and the total number of layers. Unfortunately, my knowledge of python is non-existent, and while I know enough from other languages (namely VBA), what I can't figure out is how to get the total number of layers from the application. Can anyone point me to the documentation or toss me a text string of what I need to use?
Specifically, I'm looking at line 42 of DisplayFilenameAndLayerOnLCD.py, and want to edit it to "display_text = lcd_text + str(i) + total_layers", where total_layers is a string containing either "/" or " of " and the total layer count for the print. I just need to figure out how to get the total layer count. I can see that it's generated when I look at the gcode, but what is the variable that defines that?