0

I was trying to follow this tutorial to use Pycharm with blender. I extracted the API from blender but when trying to use the bpy library, I get multiple errors. Is there some way to fix this or download a more stable version?

I get an error like this:

def template_list(listtype_name, list_id="", dataptr, propname, active_dataptr, active_propname, item_dyntip_propname="", rows=5, maxrows=5, type='DEFAULT', columns=9):' ^ SyntaxError: non-default argument follows default argument

This is after I fixed 7 errors. I know how to fix it but its a huge hassle to fix all the errors.

File: https://www.dropbox.com/s/rbi4r417p8qeq7y/bpy.py?dl=0

sajdnv
  • 294
  • 5
  • 9
  • I get an error like this: 'def template_list(listtype_name, list_id="", dataptr, propname, active_dataptr, active_propname, item_dyntip_propname="", rows=5, maxrows=5, type='DEFAULT', columns=9):' ^ SyntaxError: non-default argument follows default argument

    This is after I fixed 7 errors. I know how to fix it but its a huge hassle to fix all the errors.

    – sajdnv Apr 15 '18 at 12:25
  • Where does the template_list method come from? list_id="" is known as a default argument, ie it has a default value of "". It needs to be in argument list after the non-default arguments. – batFINGER Apr 15 '18 at 15:15
  • It is in the bpy file I posted above, line 76158 – sajdnv Apr 15 '18 at 15:19
  • What version of blender? did you read the important note at then end of step 4? – batFINGER Apr 15 '18 at 15:33
  • I did read the important note. I have blender 2.79 which they said: "does not work correctly with Blender newer than 2.78." – sajdnv Apr 15 '18 at 15:36
  • Hmm, been thinking of giving pycharm a run myself. Did you try the API defs in link associated with important note? – batFINGER Apr 15 '18 at 16:06
  • This answer suggests building blender as a module which can be imported in IDEs outside of blender. This one links to a code.blender article that has an addon to use pycharm to debug a script that is running in blender. – sambler Apr 15 '18 at 16:07
  • I’ve been thinking of building blender. If I did it on Linux would it work with windows? – sajdnv Apr 15 '18 at 16:10

0 Answers0