This is my first attempt at publishing an add-on. I call it API Navigator. Its purpose is to speed up the searching through the blender python api. I am still new to programming, so what I was trying to do, is to accelerate my learning. But I think this can be usefull even for advanced script writers.
In the text editor’s properties, a new panel is created called API Navigator. In it, you can browse trough the api tree structure like a file browser. For every tree level, it displays the documentation for the current level in the text area. If too many entries are in the list displayed, you can filter the results(for example, go to bpy.types). There is also an icon selector. (I know another add-on existed to show all icons. it was usefull, but it lags a lot, so it wasn’t a good idea to let it registered.) Now, you can scroll through all icons, when you have made your choice, just click on the icon and its name is copied to the clipboard.
Before getting to the official steps to publish it, I need some feedback from the community. And I also have a nasty bug.
Here is what feedback I’d like from the community:
What do you think of this add-on. Is it missing something that should be there in your opinion? Will you use it? Your impressions…
How do I get rid of my crash? How do I unregister the script?
Are the names used to explain the properties easily understandable. Are they correct according to the programming principles?(I am autodidact, so if I’m wrong, I hope someone will tell me)
Explanation about the bug:
When registering the script like any add-ons(copying the script in the add-ons folder and activating it in the user properties), it works correctly. The problem occurs when unregistering it. In a console editor, writing :
>>> bpy.context.scene.
and autocompleting the line(ctrl+space) crashes blender. I don’t know what happens. I think I am not unregistering the script correctly but don’t know what I’m doing wrong.
Thank you for any feedback. I hope every script writers will find it usefull.
hi, this looks really cool!
it will be a handy tool.
your welcome to start the official process now by requesting to join here: http://projects.blender.org/projects/bf-extensions/
then you could create a page for your script in the upload section to develop it further.
I’m really very sorry, due to a problem with another dev, he has mistreated your script.
the end result is I have quit as a Blender dev.
sorry, hopefully the next guy will be more friendly.
If your script has “wiki_url” and “tracker_url” in bl_addon_info and get some good review, it can go in svn, first contrib/ directory then possibly trunk/.
If your script has “wiki_url” and “tracker_url” in bl_addon_info and get some good review, it can go in svn, first contrib/ directory then possibly trunk/.
You’re welcome to upload your script on our “Upload” trackers!
Have a read at the guides linked at the beginning of the 2.5 scripts catalog in wiki
(I tried replying a couple of times before, but posting 2 links cuts the reply I guess, weird)
If your script has wiki_url and tracker_url fields properly filled in bl_addon_info and get a good review, it can go in svn, first contrib/ directory then possibly trunk/.
Also, feel free to come in #blenderpython in IRC to discuss any doubts.
@Meta-Androcto Hi! I’m not quite sure of what happened. Anyway, I did re-pasted the script in its more recent form.
the end result is I have quit as a Blender dev.
Are you saying that you are not any more a blender dev for what did happen? I hope it’s not the case. If it is, could you give me some informations of what occured related to my script. I feel very embarassed by the situation.
@minDrones Thank you for the repply. I know that I need a wiki page and a tracker_url. What I thought was to get as more feedback as possible before proceeding to the official steps. But as can I see, it is preferable to go by the book from the start, and get feedback at this point. This is what I’m going to do.
(I tried replying a couple of times before, but posting 2 links cuts the reply I guess, weird)
For myself, refreshing the blenderartists pages is very long, and I often loose functionality of the editing buttons. I think that blenderartists has some problems right now. Is it doing the same for you?
I still have a bug for registering. I don’t know exactly what I am doing wrong. If I save the user preferences with the addon activated, restarting blender gives an error. The registering is not correct. And even more. If I activate it, then deactivate it, and reactivate it, going in the text editor to look at the panel crashes blender.
If someone can help me it would be very appreciated.
thanks.
!!Oo!! i’m dying man !
what’s a super-toolbox ! i found it so …so excellent project !
thanks…a lot of thanks for that script…hope to see a new version soon…i can’t help at this level but it seems dedicated to a good future !
Concerning the icon scroller, it is now in system_icon_get.py, an addon mostly written by Crouch. His approach and mine have been merged together. It is still currently in my script, but most probably will not stay there. I am not fixed on how the script will evolve.
Right now, I have a problem and need some help : I have a PointerProperty and have problems re-registering it. I think that the problem is the unregistering.
Is someone know how to unregister correctly a PointerProperty? I think they need to be unregistered differently than other properties.
Axon D: The tracker is giving me problems (can’t post on it), so I’m posting here.
About the re-registering: you’re initiating properties in prop_def() but that function is only called when running the entire script file. This only happens when Blender enables the script the first time. The second time it’s enabled it only add the classes again and runs the register() function. So your properties (and more importantly the struct types) aren’t re-initiated. You can solve this by relocating the prop_def() call to the register() function. This stops the script from crashing. On re-enabling you still need to press the enable button twice, and you get some errors in the console, but I’m not certain that’s specifically related to this script, as I’m having that problem with some of my own scripts as well.
About the icons part: I’ve updated my script and done some additional cleaning. Changes compared to the latest pasteall version you added to the tracker:
icon_list is not a global anymore, but created on initialisation of the classes
small changes in the layout (columns and wrong alignments made icons jump around)
remove entry from console menu on unregistering, instead of adding it again
It’s in SVN right now. Thanks for the help.
I’ve also talked to Mindrones and he had a suggestion that might be a good solution: have the icons script as a separate add-on and the api-navigator can load the icons module, so it can include the icons functionality. That way people who just want the icons can do so by only enabling the icons add-on, while people who enable the api-navigator add-on don’t have to miss the icons part.
This also prevents potential problems when people enable both add-ons and they would both have separate code for the icons part (name clashing and all kind of ugly things).
Let me know what you think of it.
@Crouch
Sorry for the delay. Now most of the problems on my script are solved. Thank you for all your help. I learned a lot from that collaboration. I am gratefull to thee. And I totally agree with the idea of letting the icon script as a saperate addon. In the current version of my script, I removed it. Now, people can work with one addon and the other closed and vice versa. It is more flexible this way.
Moved Type report and Return report to the text area(this way it’s easy to copy)
The lists are now sensitive to object types and organized relating to this estimation
The doc text can be toggled on and off by pressing Escape key (but the key map seems to be overwritten at startup. F8 and it’s ok)
It is certainly not perfect, but I think it will be very usefull. I might have to check at pep-8 compliancy. I don’t know exactly what it is but I’ll have a look.
If people see things in my script that shouldn’t be this way, please give me some feedback explaining me what is wrong or how it could be improved. I hope to learn as much as possible. For example, what would you add to the report text area.
Could this be someway synced with the outliner in datablock view. And secondly the autocomplete feature… could this be incorporated into the text editor.
Could this be someway synced with the outliner in datablock view.
In fact, I don’t think that they share the same tree at all. Some parts may be the same, but I don’t think that they represent the same thing. Actually, I don’t even know what the Datablock outliner is really used for. I don’t use it.
For the autocompletion, I began to look at something. This could bring a lot to this script and be very usefull. But this is totally different feature. My script does not autocomplete right now. It only lists the children of an object in the tree. If you don’t have the complete name, it will evaluates it as a string and will list the attributes and methods of a string.
As I said, I began to work on autocompletion, but this might take a while. I am still a beginner in code programming and API Navigator is the more comlex code I have written by now.