通过目录浏览器将Blender数据导出到目录中

时间:2014-09-28 14:35:08

标签: python scripting blender directory-browsing

我想使用目录浏览器。我正在使用ExportHelper类,但它会弹出一个文件浏览器。是否有任何特殊内容可以将其转换为目录浏览器

以下是一些代码:

class ExampleExporter(bpy.types.Operator, ExportHelper):
  """My Mesh Exporter Script"""
  bl_idname      = "object.example_mesh_exporter"
  bl_label       = "Example Mesh Exporter"
  bl_description = "Export all meshes from the scene into a directory"
  bl_options     = {'REGISTER'}

  filename_ext   = ".huhu" # I don’t even need that

  sparse = BoolProperty (
      name        = "Sparse output"
    , description = "Should the output file be sparse?"
    , default     = False
    , )

  def execute(self, context):
    # do something with self.filepath

我不需要self.filepath,我需要像self.directory.这样的内容。

0 个答案:

没有答案