Is there a way to copy and paste all 3 coordinates from the Properties (N) menu in 3d view? I can do it one at a time, but not all 3 at the same time.
Try the following steps:
- Select the object(s) you want to move (the one you'd be "pasting" coordinates to).
- Shift+Select the object with coordinates you want to copy, making it the Active Object.
- In the 3D View's Properties region (N), right-click any one of the Location coordinate fields and choose Copy to Selected from the menu that appears
- All selected objects will have the same location as the active object. This also works for scale and rotation.
Not exactly one step, but close, using Python scripting - in Python Console, first paste the following script, which uses the
xsel program (Linux) to manipulate the clipboard (for more on the complications of piping into xsel, see Getting os.system to work in Python Console?):
import os, subprocess, shlex def getCurSelLoc(): print(bpy.context.active_object) mydat = str(bpy.context.active_object.location) # os.system("echo '%s' | xsel -b" % mydat) # nowork, see: # https://blender.stackexchange.com/questions/16329/getting-os-system-to-work-in-python-console # also, cannot use stdin=mydat: AttributeError: 'str' object has no attribute 'fileno' p1 = subprocess.Popen(shlex.split("echo '%s'" % mydat), stdout=subprocess.PIPE, stderr=subprocess.PIPE) p2 = subprocess.Popen(shlex.split("xsel -b"), stdin=p1.stdout) out, err = p2.communicate() print(out, err) print(mydat)
... and press Enter twice to have it parsed; then, with (say) the default Cube selected, type or paste in the Python Console
>>> getCurSelLoc() <bpy_struct, Object("Cube")> None None <Vector (0.0000, 0.0000, 0.0000)>
Clearly, you get the location and the name of the selected object in the Python Console - but if you "paste" in a text document after this action, then you would have
<Vector (0.0000, 0.0000, 0.0000)> pasted as text.
After you've ran
getCurSelLoc() in the Python Console once, it ends up in the command history, so re-running it is as easy as pressing Up arrow key to recall last command, and pressing Enter. This could probably be re-done to function as an UI script, but I'm not that well versed with that part for the time being.