Skip to content

Instantly share code, notes, and snippets.

@ofhouse
Last active December 30, 2019 17:45
Show Gist options
  • Save ofhouse/8930db9fe55ef650ba9c3ba77529e900 to your computer and use it in GitHub Desktop.
Save ofhouse/8930db9fe55ef650ba9c3ba77529e900 to your computer and use it in GitHub Desktop.
Blender helper scripts
# Copies the length of the selected curve to the clipboard
import bpy
import subprocess
def copy2clip(txt):
cmd='echo '+str(txt).strip()+'|clip'
return subprocess.check_call(cmd, shell=True)
length = bpy.context.object.data.splines.active.calc_length()
copy2clip(length)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment