Python bpy_extras.io_utils.ExportHelper() Examples

The following are 5 code examples of bpy_extras.io_utils.ExportHelper(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module bpy_extras.io_utils , or try the search function .
Example #1
Source File: operator_file_export.py    From Fluid-Designer with GNU General Public License v3.0 5 votes vote down vote up
def write_some_data(context, filepath, use_some_setting):
    print("running write_some_data...")
    f = open(filepath, 'w', encoding='utf-8')
    f.write("Hello World %s" % use_some_setting)
    f.close()

    return {'FINISHED'}


# ExportHelper is a helper class, defines filename and
# invoke() function which calls the file selector. 
Example #2
Source File: operator_file_export.py    From Fluid-Designer with GNU General Public License v3.0 5 votes vote down vote up
def write_some_data(context, filepath, use_some_setting):
    print("running write_some_data...")
    f = open(filepath, 'w', encoding='utf-8')
    f.write("Hello World %s" % use_some_setting)
    f.close()

    return {'FINISHED'}


# ExportHelper is a helper class, defines filename and
# invoke() function which calls the file selector. 
Example #3
Source File: __init__.py    From Fluid-Designer with GNU General Public License v3.0 5 votes vote down vote up
def execute(self, context):
        from . import export_xmodel
        start_time = time.clock()
        result = export_xmodel.save(self, context, **self.as_keywords(ignore=("filter_glob", "check_existing")))

        if not result:
            self.report({'INFO'}, "Export finished in %.4f sec." % (time.clock() - start_time))
            return {'FINISHED'}
        else:
            self.report({'ERROR'}, result)
            return {'CANCELLED'}

    # Extend ExportHelper invoke function to support dynamic default values 
Example #4
Source File: __init__.py    From Fluid-Designer with GNU General Public License v3.0 5 votes vote down vote up
def execute(self, context):
        from . import export_xanim
        start_time = time.clock()
        result = export_xanim.save(self, context, **self.as_keywords(ignore=("filter_glob", "check_existing")))

        if not result:
            self.report({'INFO'}, "Export finished in %.4f sec." % (time.clock() - start_time))
            return {'FINISHED'}
        else:
            self.report({'ERROR'}, result)
            return {'CANCELLED'}

    # Extend ExportHelper invoke function to support dynamic default values 
Example #5
Source File: export.py    From playcanvas-blender-tools with GNU General Public License v3.0 5 votes vote down vote up
def make_directories(dir_list):
    '''Creates the listed directories if they do not exist'''
    for direct in dir_list:
        if not os.path.isdir(direct):
            info("Making Directory {}".format(direct))
            os.makedirs(direct)

# ----------------------------- BLENDER UI THINGS -----------------------------


# ExportHelper is a helper class, defines filename and
# invoke() function which calls the file selector.