Created
February 27, 2017 13:49
-
-
Save p2or/272ef1f0318fbc9cafa086eaeed88b55 to your computer and use it in GitHub Desktop.
DataBlock from active object #Blender
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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