I would like to automate the process of modifying a .fbx file but I'm not quite sure why my code isn't working. All I'm doing is importing a .fbx file, separating the mesh by "Loose Parts", and then exporting it back out. Any thoughts?

import bpy

bpy.ops.import_scene.fbx(filepath="C:/Users/'user'/Downloads/Futuristic_ghetto_building/Futuristic ghetto building_one_Mesh_fbx.fbx")

buildings = bpy.data.objects['Plane']
buildings.select = True

Note: The code isn't exporting anything right now for testing purposes

  • $\begingroup$ You want to separate objects['Plane'] only? Did the imported fbx named 'Plane'? And are you use version 2.79 and below? $\endgroup$ – HikariTW Jul 22 at 1:33
  • $\begingroup$ Yes I would like to separate the “Plane” mesh as it shows in the objects tab. The fbx file itself is not named planes but the house mesh imported into the scene is called “Plane”. I’m using version 2.83 $\endgroup$ – BassoftheC Jul 22 at 12:21
  • $\begingroup$ If you're using newer Blender (2.80 and above) I don't think buildings.select = True will be able to run. You should use buildings.select_set(True) instead $\endgroup$ – HikariTW Jul 22 at 14:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.