NP Station

Hi guys,

i finally managed to merge the addons i made. Huge thanks to mont29, Meta-Androcto and Ryker for making this possible, joining macros is rare and undocumented. The addon now installs all available NP operators and has been accepted to addons_contrib collection for Blender’s 2.78 daily builds and 2.79 release candidates.

The package is far from finished, the operators are still a bit unsynchronized and there is fine work to be done in various aspects. At the moment, the package is more of a testing ground for command behaviour and graphics, so use it with caution. Aside from simple integration of existing NP operators, a new graphics system and some new operators were introduced.

For newcomers - NP is an experiment to make some precise modelling tools in Blender, using it’s existing technology. Working mostly in object mode, for quick CAD-like sketching and modification, with interaction, snap procedures and numerical input. For more details you can consult the PDF manual that goes with the addon: NP_Station_020.pdf

INSTALLATION:

Download the version edited with the help of @nBurn: np_station_2017_09_29.zip . Unzip the file and place the np_station folder it in the Blender’s scripts / addons_contrib folder. Start Blender, go to User Preferences / Addons, turn on Testing filter and type ‘NP’ or ‘020’ into the search box. Check the box next to the NP_020 name. If you have a previous version, first deactivate that one and then check the new one. A new section with the name NP Station will appear in the Toolshelf (T) / Tools panel and will be active in object mode, addon’s operative context. All the commands should be there.

If you’d like to use the addon via pie menu, here’s one made by @11131 : NP_020_pie_menu.py.zip

USAGE:

Run operators by clicking on the corresponding buttons in the NP Station panel or by typing the operator name in the spacebar search dialog. If you’re trying to modify objects, select the objects first.
Detailed description on usage of individual operators can be found in the PDF file that accompanies the addon.

If someone tries it, please report bugs, the operators need a lot of testing. Joining them requires quite a bit of code meddling and i still don’t know if they work as they did individually. Thanks to everyone that participated, comments and suggestions are welcome, though be patient with development, the addon is done in spare time.

DEMO VIDEOS:

NP_float_poly

NP_float_box

NP_020_FB

NP_point_copy

NP_020_PC

NP_point_array

NP_020_PA

NP_roto_move

NP_point_align

NP_020_PL

NP_point_scale

NP_020_PS

NP_shader_brush

NP_020_SB

NP_point_distance

18 Likes

Awesome Setup! I test it a bit.
It need only some icons, which reflect the functions better…:cool:

Thank you for sharing. I will test your add-on this weekend. I’m interested on replacing Sketchup and Inventor with Blender. So any tools to help-me to do so are welcome.

1 Like

It looks so similar to Sketchup :slight_smile: is allowed now to snap a new drawed lines to middle point of other lines? Or to start drawing perpendicular lines from middle point of other line?

Wow, this looks impressive. Thank you for sharing. Any plans for merging documentation?

Thanks guys, hope it helps. Please report bugs if you notice any.

Awesome Setup! I test it a bit.
It need only some icons, which reflect the functions better…:cool:

Hi mkbreuer, thanks, glad you like it. You’re right, some custom icons would be nice, that would make it complete. It would be a serious task though, maybe at some point down the road when most of the planned features are integrated. Hopefully, this addon will grow to a quality state…

Thank you for sharing. I will test your add-on this weekend. I’m interested on replacing Sketchup and Inventor with Blender. So any tools to help-me to do so are welcome.

Hi artisanicview, long way from there, but thanks for comparison… :slight_smile:

It looks so similar to Sketchup :slight_smile: is allowed now to snap a new drawed lines to middle point of other lines? Or to start drawing perpendicular lines from middle point of other line?

Hi hris, midpoints are not yet implemented in Blender and this package inherits Blender’s snapping directly. So far, only endpoints are possible with vertex snapping and ‘nearest’ with ‘edge’ and ‘face’ snapping. Some developers are working on snap enhancements for Blender right now, if the midpoint snapping appears in Blender i will incorporate it.

There is a hidden way to choose snap between two designated points in Blender, if i find it i will post it here.

Wow, this looks impressive. Thank you for sharing. Any plans for merging documentation?

Hi emboo2, i didn’t quite get what you mean by merging, there is a complete pdf documentation included in the zip. Or are you referring to something else?

1 Like

WOW! Awesome script! Looking forward to seeing the evolution.

I have been looking at Mechanical Blender where they have achieved a “mid point snap” by allowing multiple points in the selection and presumably do some funky math to calculate said point. Seems a workable solution for lack of a mid point in the current Blender implementation.

Otherwise, would love to see some sort of polar/circular array

Thank you

1 Like

Hi

Point Align is really reliable tool
i have searching this for long time

thank you !

anyway i really wish there is an option for changing / customizing hotkey during modal or event elif
and also tried editing some .py but seems there is limitation

i am not using blender default navigation and have weird setup

this is my current setup blender x photoshop navigation

spacebar ( pan )
alt + space ( rotate )
ctrl + space ( scrubby zoom )

  • i have mimic 2D program navigation to blender for ease and muscle memory when switching app
    and im using pen and tablet

and using these setup conflict with add-on during navigation mode

i am hoping in future it will be customizable

thank you again

Wow, great collection of tools, with a 30 plus page manual too!! Didn’t realize you made this many NP add-ons. I saw the dev page for this a week or so ago, but I was busy trying to finish an update for my own add-on and didn’t get a chance to try it out. This looks waaaaaaay nicer than the current CAD add-on I’ve been working on. If I ever redo my Add-On’s point finding code, I may pirate some of your snap code.

Some bugs I found when doing a quick test run:

NP 020 Roto Move

This one looks very promising, but on my first try it crashed when I hit control after left clicking on the first point (I tried to do 2 control snaps in a row). It also crashed immediately after I attempted to reload the add-on with this in the error console: “location: <unknown location>:-1”. I had to exit and relaunch Blender to get it working again. On my second attempt it rotated objects as intended, but (as you already know) the displayed measure is always slightly off. I typed in 45 degrees for a rotation around the Z axis, but the measurement showed up as 44.94. I double checked with my own Add-On and Blender’s Ruler/Protractor tool and confirmed the rotation was actually 45 though. I looked at your “get_eul_z_angle_difffff_in_rotated_system” function in utils_geometry.py, but couldn’t quite figure out what that function was doing (or what all the f’s in the name meant). 100% guess here, but could it be you’re rounding off too many significant digits in the “get_eul_z_angle_difffff_in_rotated_system” code?

Update: Had a chance to do some troubleshooting with utils_geometry.py and confirmed the measure error is definitely caused by rounding off too many significant digits in get_eul_z_angle_difffff_in_rotated_system. Just as a test, I increased the last arg in all the round calls from 2 to 6 and replace all the 0.001 instances with 0.000001 and the displayed measurements when using Roto Move were far more accurate.

NP 020 Point Scale

If this add-on is run more than once (and sometimes when you load it after running another NP Add-On), it will skip the point selection part at the beginning and go right into scaling using the 3D Cursor as the scale base.

NP 020 Point Distance

This one is a request, not a bug. After left clicking the second point, would it be possible to have the add-on keep running (so the measurement cube thing stays visible) until you press ESC or RMB?

Other

I noticed you have polling for the toolbar menu, but not the individual Add-Ons. The problem is a lot of run instructions in the manual still instruct people to launch the individual Add-Ons from the spacebar menu. If you want to keep spacebar menu launching available, it might be worth adding polling to each individual Add-On file to prevent them from being showing up in the menu when the Editor Type isn’t Object Mode.

Hey nBurn, thanks for the bug report and kind words. Nice xOffsets addon that you mentioned btw, been checking it out. You have a slightly different field of operation and very nicely done, bringing that engineering taste that has been missing, congrats! We’re riding in the same direction :slight_smile: I’ll get back to your points later when i check them out, they all seem valid.

It looks so similar to Sketchup :slight_smile: is allowed now to snap a new drawed lines to middle point of other lines? Or to start drawing perpendicular lines from middle point of other line?

hris, the hidden Blender’s midpoint feature:

Turn on permanent snapping mode (SHIFT+TAB) / start transformation / when above a point with cursor, hit A to mark the point / go to other point and hit A again / click with LMB / RMB to midpoint or ot third portion of the distance. This feature is called Multiple Snapping Targets

It can work in NP with a little trick: when looking for the snapping point, hit SHIFT+TAB and do the rest as described - all NP’s use temporary snap (with CTRL) so this feature is not available by default.

WOW! Awesome script! Looking forward to seeing the evolution.

I have been looking at Mechanical Blender where they have achieved a “mid point snap” by allowing multiple points in the selection and presumably do some funky math to calculate said point. Seems a workable solution for lack of a mid point in the current Blender implementation.

Hey sceyefeye, thanks for the support. Yes, mauge is really making a revolution with Mechanical Blender, i was talking to him about maybe taking the Mechanical as the background for NP, but it is still early for such a move. Everyone should really check it out, not only new snap modes, but NAVIGATION during modal transforms, as well as inbuilt mesh dimensioning! It would be nice if we could show more support for his effort.

Otherwise, would love to see some sort of polar/circular array

On the list, but not until it’s foundation, the roto_move gets healthy (check nBurn’s comments). The roto_move operator will be the basis for all rotational commands and it has proven to be a tough challenge. Hopefully we will manage to sort it out soon.

Hi MatsuikoHiroka, you are welcome, hope it helps.

this is my current setup blender x photoshop navigation

spacebar ( pan )
alt + space ( rotate )
ctrl + space ( scrubby zoom )

Try this hack:

In float_poly’s class NPFPRunNavigate, in line 1189, change:

    elif event.type in {'MIDDLEMOUSE', 'WHEELUPMOUSE', 'WHEELDOWNMOUSE'}:

to:

elif event.type == ‘SPACE’ or event.ctrl and event.type == ‘SPACE’ or event.alt and event.type == ‘SPACE’:

If that works, find the same class in all operators that have navigation mode and do the same. Good idea for hotkey customisation though, plausible at some later version. However, please keep in mind that the feature whishlist is already long…

hey thank you i tried replacing it and it is partially working
i will be really happy if it will work fully ! i am using the np point align always and now i can rotate while using the tool

problem :
its weird, i can rotate pan zoom now but there is still overlapping in spacebar function like ( click or confirmation or toggle something )

is there a way to remap the default spacebar of np tools ?

Cool stuff. Some of tools reminds me of pivotPro addon, I made in past. Keep up the good work.

Hey, JoseConseco, thanks. Cool addon (pivotPro), nice that it is free and some really good functionality there. I am trying to go further though, totally eliminating the need for the user to to think about pivots independently from the tool. I’ve been trying to do this since i’ve sat down in front of Blender, for more then five years now. Nice job, would you mind if i looked at the code behind it if i find something interesting?

i will be really happy if it will work fully ! i am using the np point align always and now i can rotate while using the tool

problem :
its weird, i can rotate pan zoom now but there is still overlapping in spacebar function like ( click or confirmation or toggle something )

Hi MatsuikoHiroka, how can you rotate while using point_align? Navigation mode hasn’t been implemented there yet, do you maybe mean point_array instead?

hi again
its np point align
to demonstrate i was able to rotate / zoom & pan

[video]https://webmshare.com/play/nGX6P[/video]

Edit : never mind my post #12
i think i solve my problem by editing some hotkeys ( np_020_point_align.py )

im now comfortable using it
thanks again for the plugin

Oh wow MatsuikoHiroka, it really is point_align :smiley: I can see that modals are modified to act differently from default, but it seems to be a productive hack. Would you mind sharing the .py so i can learn something :slight_smile: ?

Anyway, if you inserted a Navigate operator into the .py, your keyboard conflict should be resolved by changing the navigate switch in the 'elif event.type == ‘SPACE’ statement from ‘SPACE’ to something else.

Hi nBurn, here are the replies to your bug scan post:

Didn’t realize you made this many NP add-ons.

Me neither :slight_smile: There are some new and some old ones revisited, though. If the time is abundant, there’ll be more.

If I ever redo my Add-On’s point finding code, I may pirate some of your snap code.

Check my ‘contributors’ list. Be my guest.

NP 020 Roto Move

This one looks very promising, but on my first try it crashed

Yeah, roto_move is the ‘pivotal’ transform operator of the package, and by far, it’s weakest point. All future rotational operators depend on this one and it’s giving me headaches.

it crashed when I hit control after left clicking on the first point (I tried to do 2 control snaps in a row)

Not sure what were you trying to do here, the second one is an opengl non-snap click, don’t use CTRL on that one. Be sure to check the docs for the default use.

It also crashed immediately after I attempted to reload the add-on with this in the error console: “location: <unknown location>:-1”. I had to exit and relaunch Blender to get it working again.

Welcome to my world…

I typed in 45 degrees for a rotation around the Z axis, but the measurement showed up as 44.94. I double checked with my own Add-On and Blender’s Ruler/Protractor tool and confirmed the rotation was actually 45 though.

You might find this surprising, but that was the intended behavior :slight_smile: Shifting the axis slightly off the balance was the only way i could preventing the roto-widget from flipping totally upside down on orthogonal surfaces.

I looked at your “get_eul_z_angle_difffff_in_rotated_system” function in utils_geometry.py, but couldn’t quite figure out what that function was doing (or what all the f’s in the name meant).

That is the weakest point of the package, that engine is calculating the rotational difference for the display of roto widget. The euler math i was forced to use is simply too complex for me and is quite unpredictable. It takes the helper’s object start euler, compares it with the current one and calculates the differential in a rotated euler system which is painful to control. I managed to put it to acceptable margins by some tricks but wires are sticking out (slightly shifted axis and approximate calculations). However, the operator does what it is supposed to and all the transformations are correct.

The excess 'f’s is me, trying the fourth version of the function :wink:

100% guess here, but could it be you’re rounding off too many significant digits in the “get_eul_z_angle_difffff_in_rotated_system” code?

100% correct.

I increased the last arg in all the round calls from 2 to 6 and replace all the 0.001 instances with 0.000001 and the displayed measurements when using Roto Move were far more accurate.

Great if it still works with that mod. Don’t mind if i pirate that one from you :slight_smile:

NP 020 Point Scale

If this add-on is run more than once (and sometimes when you load it after running another NP Add-On), it will skip the point selection part at the beginning and go right into scaling using the 3D Cursor as the scale base.

I couldn’t reproduce these, can you describe the exact steps?

NP 020 Point Distance

This one is a request, not a bug. After left clicking the second point, would it be possible to have the add-on keep running (so the measurement cube thing stays visible) until you press ESC or RMB?

Not sure exactly what you’re asking here, did you try with the step parameter in the addon settings / point_distance? Or did i misunderstand?

If you want to keep spacebar menu launching available, it might be worth adding polling to each individual Add-On file to prevent them from being showing up in the menu when the Editor Type isn’t Object Mode.

Totally valid remark, will do.

Again, thanks for the nice bug report, if you notice anything else let me know. These upgrades will be integrated to my ‘next’ package that i will put on review on developer.orq, the options are re-release 020 or wait for the 021 to go ahead.

@MatsuikoHiroka, i have to make a correction to my previous post. You can’t change the SPACE to anything else. That key has to be something transform.translate reacts to with confirmation and those are: selection mouse / ENTER / numpad ENTER / SPACE. I already used ENTER for snap target switch so i resorted to SPACE which is big and easy to use. Only other free option is numpad ENTER.

I knew i forgot something…

thank you for reply and confirmation
so its hard codded and not possible to change ;/
i wish it can be change somehow

i haven’t played other tools because of weird interaction of my modified blender hotkey setup
and it seems the only tool was compatible with my setup is the np point align

anyway i am satisfied with np point align and looking forward for
further updates and improvements

that tool is a must have for me

it reminds of this but with visual guide