Post #3275: ac

📋 Metadata

🏷️ Tags

macro python-scripting intermediate solved

  • Macro Editor
  • Python Scripting

💬 Content

actimelvanille:

Is it possible to somehow get the name of the selected object and use it for export?
So that an object called “Cube” gets exported as Cube.fbx?

Hi @actimelvanille,
Try this code:

exec(bpy.ops.export_scene.fbx(filepath=r"C:\Users\Christian\`%s.fbx" % C.object.name, use_selection=True, global_scale=0.01, object_types={'MESH'}, mesh_smooth_type='FACE'))

❤️ 3 likes


🔗 View on Blender Artists