Page MenuHome

NP station - Contrib Review
Closed, ResolvedPublic

Description

Hi guys,

this is the initial commit of this package. It's purpose is to join all the NP operators i made over time and i am hoping to include it in the 2.79 addons_contrib release.

The functionality is mainly ready so you can inspect it. The details are not polished yet, the code is to be cleaned and the docs are still being worked on. Also, i will probably need some help on some issues.

I think i managed to put the structure up and make all the operators work as they did individually. Also, there is a couple of new, untested operators. The addon settings should also be working.

The package is made in 2.75a and tested briefly in 2.75a and 2.78b. There was a lot of work, while not much time to test it in production. I got some advice to try and publish this in time for 2.79 release.

NP operators are an experiment to see whether it is possible to emulate precision modeling tools and workflow in Blender, using it's existing technology. Working mostly in object mode, for quick CAD-like sketching and modification, with interaction and snap procedures. The operators are mainly macros manipulating with multiple Blender's modal operators.

This package is meant to be free and open-source GNU GPL software. I hereby waive all the design and code copyright in favor of Blender Foundation.

EDIT: The file below is the 020 version updated with requested corrections, some upgrades requested on the BA and with PDF doc removed from the zip. The PDF, together with the current addon version can now be found at the Wiki page:

EDIT: Added panel rename feature, np_ in the module names, nBurn's roto widget engine, changed numerics color in point_distance

https://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Object/NP_Station

Details

Type
Patch

Event Timeline

Ok developer i will try and review and test this addon if i find any bug i will contact you or fix it if i can

in line 122 from .utils_geometry import * cannot import BUG REPORT

I try all have the same problems on from .utils_geometry import * please fix it

hi @Okavango (Okavango) Glad to see you made the package, I'll have time to look at soon.
thanks for submitting.

@umar haruna abdullahi (pyc0d3r)
hi, thanks for help and testing, please don't assign tasks to yourself unless project admin or have assigned to you, if you wish to claim the task, it's best to chat about this in irc freenode #blenderpython with myself, @Okavango (Okavango), lijenstina or mont29

Brendon Murphy (meta-androcto) triaged this task as Normal priority.Mar 4 2017, 12:27 AM

Hi, i uploaded the package with a new float_box operator.

I also added mano-wii as a subscriber if that is ok, he expressed some interest in this earlier.

umar haruna abdullahi (pyc0d3r) Hi, thanks, but i wasn't able to reproduce the error in the usual releases.

Mistake with subscribers...

I really liked the result, the drawing in OpenGL, the snap features. It's excellent.
However the code has some areas that, imho, need to improve (readability and peformanse).
@Okavango (Okavango), as soon as I have time, I would like to propose some changes ;) if you allow me to

Of course, any help is welcome :) I will try to keep up.

Just noticed new operator overridden float_rectangle, corrected.

Hi @Okavango (Okavango) really interesting addon collection :) Some notes after using it:

  • The NP Point Distance operator prints hundreds of lines in the redo panel, making the UI very slow. All other operator print a lot of text in the redo panel, but less.

  • float box works great, but float rectangle disappear after second LMB click. Hiting enter works.

For roto move and point align, some docs would be great.
Really helpfull collection, thanks for sharing.

Okavango (Okavango) added a comment.EditedMar 17 2017, 1:23 PM

Hi @matali23 (matali23), thanks for testing.

I must admit i didn't consider consequences to the redo panel. I noticed what you mentioned though.
It could be due to the fact that it is a macro and is rotating a lot of internal operators. Not sure how can we avoid that.
Generally redo is not something i have been dealing with. Could you elaborate a bit how you use the redo panel?

It is strange that float_box works and float_rectangle doesn't, they share the same mini-engines. Are you sure you installed the last zip from the list?
The previous one had a problem with the float_rectangle. Be sure to completely remove the old folder if that is the case.
If the problem persists it would be helpful to see the blend file, i couldn't reproduce the error in my versions.
Does it perhaps shrink gradually to nothing or just suddenly disappear?

As for the roto_move and point_align, the docs for all the operators are in the works and should be released together with the addon on BA soon.

Thanks again for testing and positive comments.

@Okavango (Okavango) updated again and ensured that all files are overwritten, rectangle now works, sorry for the wrong report.
Regarding the redo panel, I have no Idea, sorry. The best thing would be to print nothing there to avoid slowdown. Maybe you can ask the pros on IRC ?
Can't wait for the final release :)

@matali23 (matali23) Ok. Just be sure to double-check, the display mini-engine has a habit to reduce the widget to null when you zoom in too much.
That could be what you experienced, it happens with the last version also.

Brendon Murphy (meta-androcto) renamed this task from NP station - initial commit to NP station - Contrib Review.Mar 20 2017, 2:42 AM

Hi, can you drop back in irc for a chat?
I think this would be ok in contrib but have asked @Germano Cavalcante (mano-wii) to have a look over.

@Okavango (Okavango),

To facilitate the review, it would be interesting to have a wiki, or a manual to be able to understand and test all the features of this addon.
It is a really interesting addon, but you have to be careful about some things.
When the addon is activated, a series of information appears in the terminal, and I have two errors:

C:\Users\Germano\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\NP_020\NP_020_point_distance.py:1391
search for unknown operator 'OBJECT_OT_np_point_distance_018', 'object.np_point_distance_018'
rna_uiItemO: operator missing srna 'object.np_point_distance_018'
Traceback (most recent call last):
  File "C:\Users\Germano\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\NP_020\NP_020_float_poly.py", line 667, in modal
    bpy.context.space_data.transform_orientation = NP020FP.trans_orients
AttributeError: type object 'NP020FP' has no attribute 'trans_orients'

Also, when it's used any operator, an excessive number of information is printed on terminal.
(These prints also make the code slower) :(
If they are important for debugging. You can create a print that only works if it is enabled. something like:

__npdebug__ = True

def np_print(*args):
    if __npdebug__:
        print(*args)

(There are other more efficient debug print solutions too -> http://stackoverflow.com/questions/560040/conditional-compilation-in-python)

I believe that these are the most important points to be resolved first
Keep up the good work ;)

Okavango (Okavango) added a comment.EditedMar 20 2017, 8:48 AM

Hi @Brendon Murphy (meta-androcto), @Germano Cavalcante (mano-wii), thanks for taking this under review. I will see to drop in to irc on one of the breaks, i'm at work right now.

I corrected the first two errors from mano-wii's report. Thanks for finding those, i expect there are many things to improve.

I uploaded a new zip with a draft manual included, on suggestions of @matali23 (matali23) and @Germano Cavalcante (mano-wii)

The package has been released on Blender Artists with the final docs.

Hi @Okavango (Okavango), thanks for this first release and the very detailed doc. Here is a version with all console prints commented. It is faster. Now, the redo panel prints have to be solved.

@matali23 (matali23), thanks for the modification! That was not a small task. If it really gains speed it is a valid improvement.

However, maybe it would be a good idea to use mano-wii's method, it is more elegant and keeps the debug possible without deleting all the comments that you made. I just went over it, i did not have the time to study it's implementation, _debug_ seems like a nice mod.

I will see to implement this, in one or the other way as soon as i get time. We can see about that redo panel after that. It is a big addon and i just need some air right now :)

Hi guys! With some help from @Germano Cavalcante (mano-wii) , here's the version with conditional console print. It uses a new submodule with a print function and it does seem a bit faster, thanks for the tip!

Please try it out and if it is ok i will put it in the task description as an official one.

I tested all operators. And it really is a great addon!!!
But I found a problem :( (I think it involves the use of macros):

  • The more time I spend using an operator, this panel is increasing and increasing!


It gets huge, and doing a redraw of the Tool Shelf takes a long time (almost as if it were freezing Blender) :\

This problem must be resolved before :(

Okavango (Okavango) added a comment.EditedMar 24 2017, 7:41 PM

Hey @Germano Cavalcante (mano-wii) , thanks for testing and kind words, coming from you that means a lot.

Yeah, that is the same problem @matali23 (matali23) reported, it is probably because the macros are rotating a lot of operators in designated loops. I didn't know it slowed down the performance that much...

Here's a version with different bl_options, please see if it is ok. Seems resolved but i am not sure if i broke something else...

Hi everyone, here's an updated version with aforementioned bl_options correction as well as an upgrade in NP Point Distance operator.
Based on some user feedback i added an optional 'hold_result' step.
Also, there is a small correction in NP Point Align behavior.

hi thanks for updates, we should look at this quickly for contrib.

Ok, i'm here if anything is needed.

The addon is working fine so far.
And for the utility of this addon, I think it would be a good addition to the official release :)

But before that, I vote put it in contribs (for last editions)

However, I don't have the capability to add members addons project :\

Thanks mano-wii. A question on documentation - is it enough to have it as an included .pdf, or should i transferr some of it to wiki?

Thanks mano-wii. A question on documentation - is it enough to have it as an included .pdf, or should i transferr some of it to wiki?

It is better that the documentation to be accessed via a link. (To avoid occupying unnecessary space in memory).
So, commit only the script, not large binary files. (animated gif's etc...)

The link is attached to the "wiki_url" key of bl_info (in __init__.py).
Generally the addons have their link directed to a subcategory of the https://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts

But this is not a general rule.

Ok mano-wii, thanks for the tips, i will try to transfer the docs from the pdf.

@Brendon Murphy (meta-androcto) , what is the time frame for wiki, how much time do i have? I'm a little bit tied up on work.
On that matter, how do i get a wiki account, do i drop by #blendercoders? Thanks.

For a wiki account, putting the request in on #blendercoders (and maybe #blenderwiki) is probably the fastest way. Another option might be the Bf-committers mailing list. You will need to give them the username you want to use and an email address (I just set up my own wiki account last week).

Thanks @nBurn (nBurn) , i did as you suggested. I will get acquainted with the writing style and the docs should be ready soon.

hi, did you receive commit access yet/ if not drop into irc for chat

Hi everyone.

As i understand, the deadline for commissions to the 2.79 addons_contrib is a couple days away. On the logistics side, i am ready to support the addon and develop it further, accept revisions and correct bugs noted by the reviewers and users. I am willing to do this, at available pace, at least until the major API changes in blender. And i would like to request for this addon to be included to the 2.79RC addons_contrib collection.

However, upon reviewing the commit mechanism (git vcs), due to work load on my day job, i am affraid that i do not have enough time to perfect my commit skills for the initial commission. If there is any possibility, it would be good if someone could do this instead, leaving the future upgrades to me, uppon getting familiar with the VCS and receiving the commit access rights.

hi, ok, we can do this for you

Great, thanks. Sorry, i was unaware i had to master the vcs myself for the inclusion.

I updated the file in the task description.

@Okavango (Okavango),
There are other things I've noticed that need correcting.

  • Always place one empty line at the end of each file (only one);
  • The license description can start in the first line;
  • It is better that the names of the python files are always in lowercase letters;
  • Do not put the addon version in the filename (this hinders the creation of diffs);

Blender already has the embedded GPL license, do you need it in the file as well?

hi, I've asked @nBurn (nBurn) if he's interested in helping out with this addon also.
I think we can go to contrib shortly so we can keep track of longer term development.
Thanks.
I made some changes to address most of @Germano Cavalcante (mano-wii) issues.


I did some tests & all seems working well.

Hi @Germano Cavalcante (mano-wii) , thanks for the review. I wasn't aware about those issues. I referenced the GPL in the manual, but i can redirect it to blender's root or a web link.

And @Brendon Murphy (meta-androcto) , huge thanks for the corrections, i guess you had to spend some time to go through all that.

Although i must say that some of those remarks and corrections changed the outlook of the structure of the addon as i imagined it, but i guess if that is the standard it has to obey, ok. I would just like to keep the np_ designation in the submodule file names, without the version number. If that is ok, i will submit the tweaked file in a couple of hours, along with some other small inside corrections that i noticed while testing it.

On that subject, would you guys know what is the code for the poll, for the operators not to be in the spacebar search while the user is not in object mode?

Also, the thing i would like to discuss with you is the merging of the addon tab with the tools tab. I know you declared it as a policy for the new addons because of ui issues, and that is understandable. And it is ok by me for now, giving the addons current size and complexity, but i would like to reserve a possibility for a separate tab in the future, if the development of the addon grows into the state i planned.

hi @Okavango (Okavango)
sounds good to me. you can keep the np without the versioning.
With the change to the the Tools Tab, I notice there's no option in the addons preferences for changing the tab name.
As seen here: https://developer.blender.org/T50726 we are using code so the user can choose own Tab name, we default to built in names so Blender ui & Tabs are cleaner.
I did notice much commented out code, try only to keep in commented out code you plan to use in the future.
I tested the addon a little today & it's very good, thanks.

Okavango (Okavango) updated the task description. (Show Details)

Hi everyone, i updated the file in the task description.

Added panel rename feature, np_ in the module names, nBurn's roto widget engine, numerics color in point_distance and fixed it's point_marker bug.

Okavango (Okavango) added a comment.EditedApr 19 2017, 12:50 PM

The numerics in the zip file name are just for the description, the folder and module names have all been kept clear of numbers, according to your suggestions.

@Okavango (Okavango) thanks for working so hard on this, lets say in 3 days I or @nBurn (nBurn) commit this for you to contrib?

That would be great, thanks.

committed to contrib @nBurn (nBurn) @Okavango (Okavango) thanks for getting this significant addon ready.
Please create a fresh task for future updates & let me know in irc
@Bastien Montagne (mont29) @nBurn (nBurn) will be looking after maintain & commits for this addon, would be good to add him as addons project member.
Thanks
Closing as resolved