Is there a way to check (or warning the user) if all objects in the scene have a material assigned, before exporting?

Or any other solution I could use?


  • $\begingroup$ Hi and welcome! Sure. What do you want to export? File format? Do you mind adding the current state of your code? Please read: blender.stackexchange.com/help/how-to-ask $\endgroup$
    – brockmann
    Dec 22 '20 at 13:46
  • $\begingroup$ @brockmann Thanks in advance. I'm exporting meshes on .FBX format. I know how to check if It has material or not assigned, but I don't know how to warning the user BEFORE the export. Something like: "You're exporting materials without material assigned. Do you want to proceed?" Is it possible? Thanks again! $\endgroup$
    – ManuCF
    Dec 22 '20 at 14:00
  • 1
    $\begingroup$ Yep: How to call a confirmation dialog box? I recommend edit your question accordingly... $\endgroup$
    – brockmann
    Dec 22 '20 at 14:01
  • 1
    $\begingroup$ @brockmann Thanks. And how do I call this dialog box before the export. I mean, press the File-> Export -> .fbx and in this moment call my script (before showing the export window) Is it possible? $\endgroup$
    – ManuCF
    Dec 22 '20 at 14:17
  • $\begingroup$ You would have to create your own custom operator like: blender.stackexchange.com/a/169820/31447 and add an invoke method (as described in the answer above). Don't think that's worth it TBH $\endgroup$
    – brockmann
    Dec 22 '20 at 14:55

Browse other questions tagged or ask your own question.