Cut/Copy/Paste objects and elements

Cut/Copy/Paste objects and elements

WARNING: The addon is work-in-progress, only object & mesh cut/copy/paste is currently implemented. Also, copying/pasting many objects/vertices/edges/faces (e.g. more than thousand) can be quite slow.

Still, some people might find it useful even in its current state.

Wiki: http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/3D_interaction/CutCopyPaste3D

An excerpt from the readme:

This addon makes it possible to cut/copy/paste objects and elements across different layers, scenes and Blender files.

When enabled, it would add a Copy/Paste panel to the Tool Shelf, and register Ctrl+X, Ctrl+C, Ctrl+V, Shift+Delete, Ctrl+Insert, Shift+Insert shortcuts for 3D view.

Options:

  • External: if enabled, Copy in Object mode would save current .blend file (so that it can be accessed from other instances of Blender).
  • Append: if enabled, pasted objects would be appended (fully copied); otherwise, they would be linked (similarly to “Link from Library” and “Duplicate Linked”).
  • Link ghost objects: if enabled, all group objects that aren’t linked to any scene will be link to current scene on pasting.
  • Paste at Cursor: if enabled, pasted selection’s pivot would be aligned with the 3D Cursor; otherwise, the selection would be pasted in the same coordinates as the original data.
  • Move to mouse: if enabled, pasted selection’s pivot would be aligned to match mouse screen position.
  • Align to view: if enabled, the pasted selection would be rotated to match the original orientation relative to the view.
  • Coordinate System: depending on this setting, geometry/bones would be pasted either in the absolute coordinates, or relative to the active object/bone.

Brilliant, I haven’t tried this but love the thinking behind it :wink:

Now the addon is able to cut/copy/paste mesh data. Due to implementation specifics, currently vertex groups and polygon textures would be ignored, and mesh data layers (bevel weight, uv, color, int/float/string, etc.) not present in the destination mesh won’t be created.
The mesh data can be pasted in Edit Mesh mode, Object mode (creates a new object), and Curve Edit mode (converts polygons and edges to cyclic/non-cyclic curves).
Pasting mesh to Curve can be used to make some interesting effects and structures :wink: Here’s Suzanne made of NURBS, Aligned Beziers and Auto Beziers:



1 Like

this is SUCH a useful addon. is this in trunk or addons conrtib/extern yet?

No, it’s not. Since the addon isn’t finished yet, I haven’t asked Blender developers to consider it for inclusion as a conrtib/extern one. And, apparently, it’s not as much useful as to gain a large user base :slight_smile:

And, apparently, it’s not as much useful as to gain a large user base

Maybe, but it would make blender easier to use for beginners, more intuitive. And it makes linking much easier for the pros.

Awesome!!!

I have been waiting a very long time for this functionality. plus, you can copy from scene to scene is great.

Thank you so much for making this addon. Please continue developing it.

It needs to be in trunk. :slight_smile:

Wow, how does I could miss this thread !!! Sounds so promissing. What a low interest of a community here.
Thanks a lot, yesterday I will take a try.

I know this thread is old but I just wanted to say thanks because it helped me (a beginner) out a lot!

I like this script so much, I wanted to thank you again. :slight_smile:

Is there a way to copy an object and to paste it in another blend file in “original position”? I don´t get to work it that way. A button like CTRL + ALT + V would be nice for this function :slight_smile:

Wich Version do you use???

Thank you for your quick answer and your spent time for the plugin :smiley: It´s really helpful and now i got it to work the way I wanted it to work. I didn´t active the options in the second blendfile where i wanted to paste is, so the object was just inserted somewhere :slight_smile: But activating these options in both files works fine :slight_smile:

How have I never seen this thread? I’ve looked for something like this for ages o_0

       Traceback (most recent call last):

File “c:\3d\blender\scripts\addons\space_view3d_cut_copy_paste.py”, line 786, in execute
self.write_mesh(obj, stream)
File “c:\3d\blender\scripts\addons\space_view3d_cut_copy_paste.py”, line 598, in write_mesh
serializer = serializers[seq_type + “.” + k]
KeyError: ‘edges.freestyle’

location: :-1

I am getting the above error on 2.67+ when copying vertices leading to complete failure of the plugin.

Thanks for the bug report :slight_smile: To fix this, I would need to update the script to the current API, but I’m afraid I would have to finish some other stuff before going to overhaul my outdated addons :confused:

key=seq_type+"."+k
if(key in serializers):
serializer = serializers[key]

    with ChunkWriter(stream, k):
        for layer_name in layers.keys():
            layer = layers[layer_name]
            
            with ChunkWriter(stream, layer_name):
                for elem in seq:
                    serializer(elem[layer])
    
    if seq_type == "faces":
        # bm.loops (BMLoopsSeq) are not iterable %)
        serialize_loops()
else:
    print(key+" does not exist")

This error is caused by the integration of Freestyle data into the BMesh API. In general, checking whether a property of the BMesh object has a serializer is probably a good idea for changes in the future as well.

Support for Freetype data copying/serialization would be nice as well. Personally I only have a few Freestyle edges so it’s not that big a deal for me but this plugin is very useful.

Well, I eventually got to fix the API inconsistencies and some other obscure bug. Sorry for taking so long :confused:
The python access to freestyle data still seems to be not implemented in Blender, so right now the addon will just ignore freestyle layers during serialization/deserialization.

I download the new version 0.6.4 on blender wiki, but when i try to install this zip files, nothing happen, please show me how to get this work ??

Thanks for informing me, this seemed to be a bug with the script that makes the zip archives. I fixed it and re-uploaded the archives.