TrueCryer / blendermada_client

Blendermada Project - add-on for Blender
http://blendermada.com
27 stars 4 forks source link

bpy.ops.bmd.import() Syntax Error: invalid syntax #2

Open yokotsumo opened 8 years ago

yokotsumo commented 8 years ago

Blender version: 2.77 - 4e50010

Hello,

I try to run bpy.ops.bmd.import() in the blender console and I get the following error: SyntaxError: invalid syntax

Other commands like bpy.ops.bmd.update() or bpy.ops.bmd.help() work fine.

What is wrong? I tried autocomplete without success.

marklescroart commented 7 years ago

Hi, I ran into this same bug, and I suspect it is caused by a name collision. The bl_idname for the class BMDImport (which implements the operator) is "bmd.import"; I think this causes problems because "import" is a reserved keyword. I was able to get around the by modifying the bl_idname of BMDIMport to "bmd.importmat". I can fork and create a pull request if you'd like, but it's a very simple fix, just two lines where bmd.import needs changing to bmd.importmat (or whatever).

Cheers and thanks for the excellent code & materials.