0
$\begingroup$

I was watching a video on how to script an addon. When I loaded my script, the addons tab menu disappeared. In the script in the bl_info properties I deleted the

  • "warning": "",
  • "wiki_url": "",
  • "category": "Add Mesh",

I have tried reloading factory settings, but it did not help. I know reinstalling probably would help, but isn't there another way ?

enter image description here

This is the script I used for adding an object into the scene:

bl_info = {
    "name": "Head mesh",
    "author": "sensim",
    "version": (1, 0),
    "blender": (2, 78, 0),
    "location": "View3D > Add > Mesh > Basic head mesh",
    "description": "Adds a new basic head mesh"

    }


import bpy
from bpy.types import Operator
from bpy.props import FloatVectorProperty
from bpy_extras.object_utils import AddObjectHelper, object_data_add
from mathutils import Vector

def add_object(self, context):


    verts = [Vector((-1.1349272727966309, -1.7702020406723022, -1.0)), Vector((-1.0, -1.0, 0.7697991132736206)), Vector((-1.1349272727966309, 1.7702020406723022, -1.0)), Vector((-1.0, 1.0, 0.7697991132736206)), Vector((1.1349272727966309, -1.7702020406723022, -1.0)), Vector((1.0, -1.0, 0.7697991132736206)), Vector((1.1349272727966309, 1.7702020406723022, -1.0)), Vector((1.0, 1.0, 0.7697991132736206)), Vector((0.34025609493255615, -0.34025609493255615, -0.19741106033325195)), Vector((-0.34025609493255615, -0.34025609493255615, -0.19741106033325195)), Vector((-0.34025609493255615, 0.34025609493255615, -0.19741106033325195)), Vector((0.34025609493255615, 0.34025609493255615, -0.19741106033325195)), Vector((1.0, -1.0, 1.5482919216156006)), Vector((1.0, 1.0, 1.5482919216156006)), Vector((-1.0, 1.0, 1.5482919216156006)), Vector((-1.0, -1.0, 1.5482919216156006)), Vector((0.6152846813201904, -0.6152846813201904, 2.309370517730713)), Vector((-0.6152846813201904, -0.6152846813201904, 2.309370517730713)), Vector((0.6152846813201904, 0.6152846813201904, 2.309370517730713)), Vector((-0.6152846813201904, 0.6152846813201904, 2.309370517730713)), Vector((1.0, 0.308607816696167, 0.7697991132736206)), Vector((1.0, -0.308607816696167, 0.7697991132736206)), Vector((0.839706540107727, -0.2591400146484375, 0.5348026752471924)), Vector((0.839706540107727, 0.2591400146484375, 0.5348026752471924)), Vector((1.0, -0.308607816696167, 1.5482919216156006)), Vector((1.0, 0.308607816696167, 1.5482919216156006)), Vector((0.8649244904518127, 0.2669224739074707, 1.8155105113983154)), Vector((0.8649244904518127, -0.2669224739074707, 1.8155105113983154)), Vector((1.6463451385498047, 0.308607816696167, 0.7697991132736206)), Vector((1.6463451385498047, -0.308607816696167, 0.7697991132736206)), Vector((1.6463451385498047, -0.308607816696167, 0.9704011678695679)), Vector((1.6463451385498047, 0.308607816696167, 0.9704011678695679)), Vector((0.9206359386444092, -0.5034536123275757, 1.682616114616394)), Vector((0.8917638659477234, -0.7121753692626953, 1.8081958293914795)), Vector((0.8304011821746826, -0.670590877532959, 1.9223713874816895)), Vector((0.7614514231681824, 0.5765117406845093, 2.0202102661132812)), Vector((0.9254456162452698, 0.7405059933662415, 1.6957820653915405)), Vector((0.8664040565490723, -0.41031914949417114, 1.7657757997512817)), Vector((0.8678664565086365, 0.4280139207839966, 1.8096904754638672)), Vector((0.9254456162452698, 0.4457833170890808, 1.6957820653915405)), Vector((0.6621315479278564, -0.49928683042526245, 1.7157901525497437)), Vector((0.6621315479278564, -0.6392937302589417, 1.7157901525497437)), Vector((0.5842267274856567, -0.5613888502120972, 1.8699086904525757)), Vector((0.5842267274856567, 0.5613888502120972, 1.8699086904525757)), Vector((0.6621315479278564, 0.6392937302589417, 1.7157901525497437)), Vector((0.6347787976264954, -0.49084553122520447, 1.769901990890503)), Vector((0.6347787976264954, 0.49084553122520447, 1.769901990890503)), Vector((0.6621315479278564, 0.49928683042526245, 1.7157901525497437)), Vector((1.0, -0.6543039083480835, 1.5482919216156006)), Vector((1.0, -0.6543039083480835, 0.7697991132736206)), Vector((0.7401045560836792, -0.44110357761383057, 2.0624403953552246)), Vector((0.7401045560836792, 0.44110357761383057, 2.0624403953552246)), Vector((1.0, 0.6543039083480835, 0.7697991132736206)), Vector((0.5899813175201416, 0.2996980547904968, 0.16869580745697021)), Vector((1.0, 0.6543039083480835, 1.5482919216156006)), Vector((0.5899813175201416, -0.2996980547904968, 0.16869580745697021)), Vector((0.9319220781326294, -0.6377922296524048, 1.7014949321746826)), Vector((0.7940413951873779, -0.5443528890609741, 1.9580446481704712)), Vector((0.8146589398384094, 0.5022628307342529, 1.9149503707885742)), Vector((0.9254456162452698, 0.5931446552276611, 1.6957820653915405)), Vector((0.6621315479278564, -0.569290280342102, 1.7157901525497437)), Vector((0.6095027923583984, -0.526117205619812, 1.8199052810668945)), Vector((0.6095027923583984, 0.526117205619812, 1.8199052810668945)), Vector((0.6621315479278564, 0.569290280342102, 1.7157901525497437)), Vector((0.457908034324646, 0.1799527108669281, -0.02492871880531311)), Vector((0.457908034324646, -0.1799527108669281, -0.02492871880531311)), Vector((0.7220546007156372, 0.1370525062084198, 0.36232033371925354)), Vector((0.7220546007156372, -0.1370525062084198, 0.36232033371925354)), Vector((0.5899813175201416, 0.15850260853767395, 0.16869580745697021)), Vector((0.5899813175201416, -0.15850260853767395, 0.16869580745697021)), Vector((0.7715945839881897, 0.1799527108669281, -0.013859517872333527)), Vector((0.7715945839881897, -0.1799527108669281, -0.013859517872333527)), Vector((0.6496176719665527, 0.15850260853767395, 0.1365136206150055)), Vector((0.6496176719665527, -0.15850260853767395, 0.1365136206150055)), Vector((0.3584824204444885, 0.1370525062084198, 0.3188619315624237)), Vector((0.3584824204444885, -0.1370525062084198, 0.3188619315624237)), Vector((0.22640913724899292, 0.15850260853767395, 0.12523742020130157)), Vector((0.22640913724899292, -0.15850260853767395, 0.12523742020130157)), Vector((0.8025145530700684, -0.35401302576065063, 1.93897545337677)), Vector((0.8100641965866089, -0.428521066904068, 1.8883529901504517)), Vector((0.6221407651901245, -0.5084813833236694, 1.7949036359786987)), Vector((0.8025145530700684, 0.35401302576065063, 1.93897545337677)), Vector((0.841262698173523, 0.46513837575912476, 1.8623204231262207)), Vector((0.6221407651901245, 0.5084813833236694, 1.7949036359786987))]

    edges = []
    faces = [[9, 1, 3, 10], [10, 3, 7, 11], [53, 52, 20, 23], [8, 5, 1, 9], [2, 6, 4, 0], [2, 10, 11, 6], [3, 1, 15, 14], [0, 9, 10, 2], [4, 8, 9, 0], [14, 15, 17, 19], [7, 3, 14, 13], [6, 11, 8, 4], [81, 78, 27, 26], [1, 5, 12, 15], [16, 18, 19, 17], [15, 12, 16, 17], [13, 14, 19, 18], [48, 49, 21, 24], [23, 20, 21, 22], [20, 25, 31, 28], [24, 25, 26, 27], [52, 54, 25, 20], [53, 23, 66, 68], [81, 26, 38, 82], [49, 55, 22, 21], [24, 27, 37, 32], [29, 28, 31, 30], [24, 21, 29, 30], [21, 20, 28, 29], [25, 24, 30, 31], [38, 39, 47, 46], [82, 38, 46, 83], [26, 25, 39, 38], [16, 12, 33, 34], [48, 24, 32, 56], [54, 13, 36, 59], [50, 16, 34, 57], [13, 18, 35, 36], [51, 81, 82, 58], [58, 82, 83, 62], [36, 35, 43, 44], [56, 32, 40, 60], [59, 36, 44, 63], [57, 34, 42, 61], [32, 37, 45, 40], [34, 33, 41, 42], [79, 57, 61, 80], [39, 59, 63, 47], [33, 56, 60, 41], [37, 79, 80, 45], [27, 78, 79, 37], [78, 50, 57, 79], [25, 54, 59, 39], [12, 48, 56, 33], [35, 58, 62, 43], [5, 8, 55, 49], [18, 51, 58, 35], [22, 55, 69, 67], [7, 13, 54, 52], [12, 5, 49, 48], [18, 16, 50, 51], [11, 7, 52, 53], [67, 69, 77, 75], [69, 65, 71, 73], [55, 8, 65, 69], [23, 22, 67, 66], [11, 53, 68, 64], [8, 11, 64, 65], [71, 70, 72, 73], [68, 69, 73, 72], [64, 68, 72, 70], [65, 64, 70, 71], [77, 76, 74, 75], [66, 67, 75, 74], [69, 68, 76, 77], [68, 66, 74, 76], [51, 50, 78, 81]]

    mesh = bpy.data.meshes.new(name="New Object Mesh")
    mesh.from_pydata(verts, edges, faces)
    # useful for development when the mesh may be invalid.
    # mesh.validate(verbose=True)
    object_data_add(context, mesh, operator=self)


class OBJECT_OT_add_object(Operator, AddObjectHelper):
    """Create a new head mesh object"""
    bl_idname = "mesh.add_basic_head"
    bl_label = "Add head mesh object"
    bl_options = {'REGISTER', 'UNDO'}


    def execute(self, context):

        add_object(self, context)

        return {'FINISHED'}


# Registration

def add_object_button(self, context):
    self.layout.operator(
        OBJECT_OT_add_object.bl_idname,
        text="Add head mesh object",
        icon='PLUGIN')


# This allows you to right click on a button and link to the manual
def add_object_manual_map():
    url_manual_prefix = "http://wiki.blender.org/index.php/Doc:2.6/Manual/"
    url_manual_mapping = (
        ("bpy.ops.mesh.add_object", "Modeling/Objects"),
        )
    return url_manual_prefix, url_manual_mapping


def register():
    bpy.utils.register_class(OBJECT_OT_add_object)
    bpy.utils.register_manual_map(add_object_manual_map)
    bpy.types.INFO_MT_mesh_add.append(add_object_button)


def unregister():
    bpy.utils.unregister_class(OBJECT_OT_add_object)
    bpy.utils.unregister_manual_map(add_object_manual_map)
    bpy.types.INFO_MT_mesh_add.remove(add_object_button)


if __name__ == "__main__":
    register()

edit2: also getting this error message if i try the script.enter image description here

$\endgroup$
  • $\begingroup$ Please provide the script that leaded to this happening $\endgroup$ – Tak Jan 20 '17 at 9:38
  • 1
    $\begingroup$ Please paste the script here pasteall.org as the link you provided required signup and no one here will do this as you need to help others help you $\endgroup$ – Tak Jan 20 '17 at 10:09
  • $\begingroup$ what OS are you using and what blender version are you using as well? $\endgroup$ – Tak Jan 20 '17 at 10:48
  • $\begingroup$ Blender 2.78 in Windows 10 $\endgroup$ – Sensimas Jan 20 '17 at 10:54
  • $\begingroup$ Same, I'm using the same version and win7. Please download blender from here mirror.cs.umn.edu/blender.org/release/Blender2.78/… and install your script and see if it is working $\endgroup$ – Tak Jan 20 '17 at 11:01
1
$\begingroup$

I tried installing the script and it worked for me as shown below and I still have the addons showing in the user preferences. Try to download blender from here and install your script and it should work.

enter image description here

$\endgroup$
  • $\begingroup$ perhaps I need to delete the registry files or everything Blender related in my computer, because neither using the version you've provided neither uninstalling and installing helps ? $\endgroup$ – Sensimas Jan 20 '17 at 11:43
  • $\begingroup$ @Sensimas so when you downloaded the folder then opened blender then user preferences nothing was in the addon tab? Even without running the script? $\endgroup$ – Tak Jan 20 '17 at 12:09
  • $\begingroup$ That is right. It was a blank window with or without script. Also when I tried opening the script, I got an error message ( picture in the first post) $\endgroup$ – Sensimas Jan 20 '17 at 12:12
1
$\begingroup$

I have found out that it is a bug. There is no other way to fix this unless you reinstall blender. After you uninstall you must also delete all the registry entries (windows button + R -> regedit -> edit -> find -> look for "blender" -> delete all found blender related entries ). Also delete all the left over data from '\program files', '\documents'. Then in file explorer fileline enter '%appdata%' and check for Blender file left overs. Delete them if you find any. Then install blender again. Don't forget to save your preferences and keybind configs!

$\endgroup$
0
$\begingroup$

Do not delete Blender, go to your %appdata% folder and to this path

C:\Users\[INSERT USER ACCOUNT HERE]\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons 

and delete the offending script, reload Blender or hit refresh and it should come back.

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.