Skip to content

exports does not take Output directory, if useExportsDir=False #4

@raanubis

Description

@raanubis

Hi,

may you add please an else statement, so that it is possible to use an userdefined output directory?

in _exports.py:
original:

    def _getDummyFileEntry(self, outputFilename, useExportsDir=True):
        def fileentry(ext):
            of = outputFilename
            if useExportsDir:
                of = os.path.basename(of)
                ed = mh.getPath("exports")
                of = os.path.join(ed,of)
            return of
        return fileentry

change please to:

    def _getDummyFileEntry(self, outputFilename, useExportsDir=True):
        def fileentry(ext):
            of = outputFilename
            if useExportsDir:
                of = os.path.basename(of)
                ed = mh.getPath("exports")
                of = os.path.join(ed,of)
            else:
                fileentry = outputFilename
            return of
        return fileentry

with this change it is possible to use an userdefined output directory with a statement like:
mhapi.exports.exportAsDAE(directory + "/" + filename,False)

without this change the export will be dropped to the root directory of makehuman, where makehuman.py is located, if the option is "useExportsDir=False".

Thanks in advance.

(sorry, my native language isn't english)

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions