individual split to scenes
1.4.0 - added: split selection to scenes individually
This commit is contained in:
@@ -1512,12 +1512,14 @@ def remove_scene_nodes_by_obj_names(scn, name_list, negative=False):
|
||||
if (n.parent and n.parent.label in name_list) or (n.type == 'FRAME' and n.label in name_list):
|
||||
scn.node_tree.nodes.remove(n)
|
||||
|
||||
def split_object_to_scene():
|
||||
def split_object_to_scene(objs=None, scene_name=None):
|
||||
'''Create a new scene from object selection'''
|
||||
|
||||
active = bpy.context.object
|
||||
scene_name = active.name
|
||||
objs = [o for o in bpy.context.selected_objects]
|
||||
if not scene_name:
|
||||
active = bpy.context.object
|
||||
scene_name = active.name
|
||||
if not objs:
|
||||
objs = [o for o in bpy.context.selected_objects]
|
||||
|
||||
if bpy.data.scenes.get(scene_name):
|
||||
print(f'Scene "{scene_name}" Already Exists')
|
||||
|
||||
Reference in New Issue
Block a user