[AddOn] NP Point Copy

Hi people,

here’s another prototype of a CAD-like tool. It duplicates objects using reference point, emulating the standard ‘copy’ command from CAD apps. Besides that, before the end of command user can opt for an array of the last pair of copies.

If someone finds it useful and tries it out, please report bugs - the script is in development.

Current version: 002

http://pasteall.org/pic/show.php?id=107061

Example of usage on arbitrary objects

Example of usage on top of a CAD blueprint

A detail from previous. Three commands used - poly, move, copy.

INSTALLATION:

Unzip and copy .py to addons_contrib folder in your Blender folder. Start Blender, go to User Preferences/Addons. Turn on Testing filter and type ‘copy’ into the search box. Check the box next to the addon name. If you have a previous version uncheck it and then check the new one.

USAGE:

START - space search menu / type copy / enter or hit the shortcut key if you assigned it
LMB / CTRL+LMB - selection of reference points with snap, ALT - instanced duplicates
RMB - conclude copying and array last pair of copies
SPACE - entering / exiting the navigation mode during the command
ESC - concluding the command and exiting without an array
CTRL+SCROLL - controlling the number of items in the array phase
RMB / RET / TAB / CTRL+TAB - finishing the array command

WARNINGS:

Being a prototype, it may have some inconsistencies and cases in which it doesn’t operate as predicted. As the time goes, hopefully it will be perfected.

ADDON SETTINGS:

Unit scale: Distance multiplier for various unit scenarios
Suffix: Unit abbreviation after the numerical distance
Custom colors: Default or custom colors for graphical elements
Mouse badge: Option to display a small cursor label

SHORTCUT ASSIGNMENT:

Detailed instructions are inside the py.file, as with other NP add-ons.

It is made and tested in 2.75a. so please report eventual bugs.

Thanks for all the feedback and suggestions.

Attachments

NP_point_copy_002.py.zip (11.1 KB)

I really enjoy this usefull set of tools you are building :slight_smile: Thanks for sharing :slight_smile:

No problem bliblubli, i am glad if anyone finds them helpful :smiley: Have fun.

WOW, This absolutely fantastic!
This is by far one of my biggest, and also one of my last real gripes with Blender: Precision modeling tools.
This addon is absolutely perfect, it nails it just right. My most sincere gratitude and strong encouragement for this addon, this is absolutely needed!

I do tend to use a lot Bezier curve objects for this sort of Architecture modelling, and was pleasantly surprised to see this works seamlessly with curve objects, unlike existing solutions I’ve seen around. I did experience a lot of crashes while doing so (even though working with meshes seems quite solid)

Not sure if they stem from my custom keymap, or from the bezier curve objects themselves, I’ll keep testing and post any further findings.

Suggestion: Also allow moving (along with copying/duplicating objects) would be incridibly useful, and probably not too complicated, most of the groundwork already seems to be there.

Again, many, many thanks for this, would love to see it carried on to 2.8# days :slight_smile:

Ok, tried on a fresh 2.78 install and the crash is no longer happening, it seems itwas related to my custom keymap.
I have right-click assigned to Redo Last operator (so I can quickly bring back the operator options panel) and it seems to be somehow in conflict with the Array Last option causing it to crash.

Just one remark, it’s obviously a personal preference of mine, so it may not be to the linking of everyone, but right click is often used to cancel an operation in many other applications, having it tied to array here may lead to unexpected outcome for some users. Maybe leave right-click as cancel operation by default, and assign something else for the array (which seems like a less frequent operation)? Maybe the Enter key instead, or something else? Dunno

One last thing to be commended: General presentation of the UI like the viewport tooltips and user feedback are absolutely beautiful, well designed and responsive! Great work there!

Just WOW!
Gorgeous solution! Awesome design! One of the best I’ve seen. Like it very much)
We were solving this via Sideshift tool from 1D_Scripts (it works both object and edit mode, also allows to create instances and copies)

But, some issues and questions
= It will make sense to turn snap on by default and turn it temporaly off with CTRL button, because snap is primary reason to addon to be used.

= Instances (Linked objects) mode and move mode will be absolutely appreciated! Is it possible?

= We are using RMB for panning viewpot. Can you resolve RMB shortcut with some modifier, like ALT?

= I running function as space - “00”. Much convinient)

= Addon can also be installed in regular way (addons - install from file). Why it was told about “addon contrib” folder?

Totally agree.

You can make instances by pressing ALT while pasting objects, although that could be the default behavior.

I also use right mouse button tweak events for orbiting the 3D view, so I’d also like to see it freed for something else, or at least configurable.

WOW, This absolutely fantastic!
This is by far one of my biggest, and also one of my last real gripes with Blender: Precision modeling tools.
This addon is absolutely perfect, it nails it just right. My most sincere gratitude and strong encouragement for this addon, this is absolutely needed!

I do tend to use a lot Bezier curve objects for this sort of Architecture modelling, and was pleasantly surprised to see this works seamlessly with curve objects, unlike existing solutions I’ve seen around. I did experience a lot of crashes while doing so (even though working with meshes seems quite solid)

Thanks very much dphantom, your words mean a lot. I must admitt i didn’t even know it can work with beziers :smiley: I am glad if you could find a solution.

Also allow moving (along with copying/duplicating objects) would be incridibly useful, and probably not too complicated, most of the groundwork already seems to be there.

Maybe this one could do the trick. You can see it in action in the third link when i press ‘M’. It is an older generation but still has some kick. Hopefully i will have the time to rejuvenate it soon…

Again, many, many thanks for this, would love to see it carried on to 2.8# days :slight_smile:

I just hope someone makes these into some decent ‘built in’ commands and not me making these clumsy addons with next-to-no time to spare for it…

Just one remark, it’s obviously a personal preference of mine, so it may not be to the linking of everyone, but right click is often used to cancel an operation in many other applications, having it tied to array here may lead to unexpected outcome for some users. Maybe leave right-click as cancel operation by default, and assign something else for the array (which seems like a less frequent operation)? Maybe the Enter key instead, or something else? Dunno

You are totally right, and i’ve tried to set RMB for cancel (as it is with some other NP’s), and i did consider ‘enter’ for array, it’s just in this way it correlates better with NP poly addon (esc for ‘stop now’, rmb for finishing operation), along with some other problems with modal collisions. I guess i will have to reconsider that, it is definitely a valid remark. If it is not too late for you, i would try to implement that in the next round of versions.

If you feel adventurous, you can try switching places of code lines 396 and 423, but i advise to backup the original and hide behind the desk when operating it :slight_smile:

One last thing to be commended: General presentation of the UI like the viewport tooltips and user feedback are absolutely beautiful, well designed and responsive! Great work there!

Thanks man, it means a lot!

= It will make sense to turn snap on by default and turn it temporaly off with CTRL button, because snap is primary reason to addon to be used.

I use snapping exclusively with holding CTRL (in my workflow default snap is always off), this addon was made to be coherent with that, maybe some option in the addon prefs could be considered for future version, hope that is cool.

Instances (Linked objects) mode and move mode will be absolutely appreciated! Is it possible?

As dphantom mentioned, it should already be available with holding ALT while snapping :slight_smile:

We are using RMB for panning viewpot. Can you resolve RMB shortcut with some modifier, like ALT?

Well, this is a bit non-standard keymapping for most of the blender users, maybe some addon-preffs option could be considered in the future.
If you are in a hurry, maybe it would work if you change line 396 elif event.type == ‘RIGHTMOUSE’: into elif event.alt and event.type == ‘RIGHTMOUSE’: Hide behind the desk, of course :wink:

I running function as space - “00”. Much convinient

Didn’t quite get this one…

Addon can also be installed in regular way (addons - install from file). Why it was told about “addon contrib” folder?

Well, the coding in these addons is really primitive and i kinda felt it doesn’t quite deserve to go to ‘addons’ folder. Of course, you can change that and copy it to ‘addons’ folder and it should work just the same. I think :stuck_out_tongue:

Yes, my workflow default snap is also turned off, but when I run function, I use it mostly for copying with snap - so I just holding CTRL all the time. Guess, that holding CTRL for temporaly off will be more convinient - basically, I dont’t need turn snap off most of times when I use snapping copy function.
Or you can provide code fragment - a lot of people (like me with dphantom) will already appreciate it.

Some trigger, for example I key instead of holding ALT could be useful.
That will free our hands from holding ALT+CTRL all the time, because if we are going to make some instances, we’re definitely going to do that.

Pretty much nice solution! Thank you =)

A Lifehack.
If I run function as space - “NP” or “COPY” there are some other options in spacebar menu left, so I should find right option.
If I run as space “00” - no other options, but your function is left.

You are kidding)
There is 2016, and we still dont’ have better solution for CAD style copying in object mode (I looking for it pretty much long time)
There is no matter, how simple your function is - just how much it is useful matters.
That’s how addons actually get the contrib and trunk.

Great, thanks!
A must for any CAD-oriented purposes.

really appreciate your work - thanks

Yes, my workflow default snap is also turned off, but when I run function, I use it mostly for copying with snap - so I just holding CTRL all the time.

Yes, there are some cases you don’t need snap with this addon - for example you can snap only the start point, hit MMB for x or y or z axis constraint and type a numerical input. I get your point of view, though.

Or you can provide code fragment - a lot of people (like me with dphantom) will already appreciate it.

Well, you can try this - in the .py file find the line 232 and change False to True. I think that should do the trick.

Some trigger, for example I key instead of holding ALT could be useful.
That will free our hands from holding ALT+CTRL all the time, because if we are going to make some instances, we’re definitely going to do that.

I think you may have a point there, i could consider introducing that trigger for the upgrade. However, i think there is no fast code solution on this one…

Pretty much nice solution! Thank you =)

No sweat, glad it helped :slight_smile:

Great, thanks!
A must for any CAD-oriented purposes.

You’re welcome bluecd, hope it helps…

Not in a hurry but now I’m curious I might give just give it a try while I eagerly wait for updates
I’ll also look into your other addon, looks equally promising.

Let’s hope Blender 2.8 does bring a nice official solution, if not your addon will do just fine :slight_smile:
Thanks again

Thanks for the support guys. However, i can’t guarantee a fast release cycle. I have very little time to work on these, and because i want to do a lot of different commands, the work will most probably go to a new one. When (-if-) i finish that first round, i will most probably start from the beginning, optimizing them and adding new features. And there is quite few of them now, i can count 8 or 9. If you like, you can search them out in this forum.

Hımm a great and fun addon. I think you’re developer of other NP_ named addons. So why don’t you combine all of them in a “just one CAD addon” together?

Thanks.

Thanks blendertopia. Yeah, the final plan is to merge them into one addon. Unfortunately, i can’t find the correct way to do that yet. Most of NPs are macros, and they require a specific procedure for combining, unlike usual ones. I tried to combine them, with no success.

Searching for help also gave no results, because almost nobody makes their addons as macros, and the import procedures are very exotic. Not even Meta-Androcto could resolve that one. If you have an idea i am open to suggestions…

You may use interacitve help at webchat.freenode.net/?channels=#blender . Or opening an issue at blender’s developer page what makes your job easier.

More power to you man :wink:

And a question for gif. I saw a draft on that gif http://pasteboard.co/EOVTJVXz.gif so what type of darft/blueprint is that? SVG file or what’s that. How to snap if it is svg. Thanks

The blueprint is a standard curve object, with its elements - segments and control points. Blender can snap to curve points just as well as mesh vertices. And if you like, you can convert it to a standard mesh object consisted of edge and vertex elements with Alt+C. As far as i know, SVG-type objects don’t exist in Blender, SVGs are imported as curve or mesh objects.

This particular draft was imported as a DXF file that was made in QCAD drafting application. The main file formats for drafts outside Blender are DWG (commercial) and DXF (free exchange format), and sometimes SVG (also free). You can import DXF to Blender using the official DXF import addon v0.8.5. which is already in Blender. DXF should be properly cleaned from 3D solids, xrefs, blocks, hatches, texts, dimensions and splines.

Importing SVG’s is possible with SVG 1.1 import addon by JM Soler and S. Sharybin, also included in Blender. As far as i know there is no way to import DWG’s to Blender yet. DWG is a commercial file type and is mainly not supported in open-source apps, but conversion to DXF is a standard operation in most CAD apps.