[solved] space info?

can somone explain what happen witht he space info module
in latest built ?

get error now for this in 672 version !

ef register():
bpy.utils.register_module(name)

Add “Parabola add” menu to the “Add Mesh” menu

space_info.INFO_MT_mesh_add.append(menu_func)

bpy.types.INFO_MT_mesh_add.append(menu_func)

def unregister():
bpy.utils.unregister_module(name)

Remove “Parabola add” menu from the “Add Mesh” menu.

space_info.INFO_MT_mesh_add.remove(menu_func)

bpy.types.INFO_MT_mesh_add.remove(menu_func)

if name == “main”:
register()

thanks

Hi Ricky,

I’m currently stuck because of missing space_info as well, so would you mind telling me the trick ?

well is it for the add mesh menu ?

registration ?


 
 
 
def menu_func(self, context):
 self.layout.menu(Triangles_add_menu.bl_idname, icon="PLUGIN")
 
 
def register():
 bpy.utils.register_module(__name__)
 
 bpy.types.INFO_MT_mesh_add.append(menu_func)
# bpy.utils.register_class(Panelsimple1)
 
def unregister():
 bpy.utils.unregister_module(__name__)
 
 bpy.types.INFO_MT_mesh_add.remove(menu_func)
# bpy.utils.unregister_class(Panelsimple1)
 
if __name__ == "__main__":
 register()
 
 
 
 
 
 

happy 2.5

So it became bpy.types - thanks ! Completely overlooked that you already changed your example :o
The AddOn did not show up because I had no bl_info = {} statement - now everything works out.

bl id name must also have a dot in it and not upper case letters!

happy 2.5

Thanks for the heads-up, but are you sure this is still valid - or is it depending on the context ? Because regardless of missing dot and some uppercase letters, the code still worked (in a recent build).

unless there was some other API cahnge
this is written in API page for scripting!

good luck
happy 2.5