Skip to content

Instantly share code, notes, and snippets.

@p2or
Created February 27, 2017 13:49
Show Gist options
  • Save p2or/272ef1f0318fbc9cafa086eaeed88b55 to your computer and use it in GitHub Desktop.
Save p2or/272ef1f0318fbc9cafa086eaeed88b55 to your computer and use it in GitHub Desktop.
DataBlock from active object #Blender
import bpy
ctx = bpy.context
active_obj = ctx.active_object
selection = [o for o in ctx.selected_objects if o != active_obj]
for o in selection:
if o.type == active_obj.type:
active_obj.data = o.data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment