Are Foo Files still used?

Are .foo files still used in Maya ? Like the file reading program below :

def processFooLine(line):

        parts = line.split()

        if ( len(parts) < 4) :
            cmds.error ('BAD DATA' + line)

        x = float(parts[1])
        y = float(parts[2])
        z = float(parts[3])

        if (parts[0] == 'spr'):
            cmds.sphere()

        elif (parts[0] == 'cub'):
            cmds.polyCube()

        cmds.move(x, y, z)


def readFooFile():
       filePath = cmds.fileDialog2(fileMode = 1, fileFilter = 'FOO files(*.foo')

       fileRef = open(filePath[0], 'r')

       line = fileRef. readline()
       while(line):
           processFooLine(line)
           line = fileRef.readline()

       fileRef.close()

readFooFile()

I’ve never heard of a .foo file type for Maya, and it seems like a typical made-up file extension to use for example code.

When you create a file, you also provide the file extension. This extension allows the Operating System, file browsers etc to assume a file type and treat it accordingly, without affecting the content of the file.

This means you could manually create a text file and save with a .fbx extentendion and it will attempt (and likely fail) to be read as an fbx in supporting applications.

The .foo extension here, I believe is just a semi-random assigned extension for use in the purpose of this code.

This is helpful context.

2 Likes

i am with @Zach_Gray on this one, that code you are seeing was just example code, and “Foo” and “Bar” are common placeholders for programming examples

Metasyntactic variable - Wikipedia.