fixes ui and mutiuser case

This commit is contained in:
Pullusb
2021-09-16 00:19:57 +02:00
parent a3ab7644a7
commit 3a334404a2
6 changed files with 91 additions and 25 deletions
+5 -1
View File
@@ -217,7 +217,11 @@ def get_set_viewlayer_from_gp(ob, l, scene=None):
in_rds = scene.collection.all_objects.get(ob.name)
if not in_rds:
# TODO : link with a ob.data copy if its a multiuser object !
# TODO : ? duplicate the object with name with a specific suffix '_renderdupe' to still parse it ?
## make single user if its a multiuser object ? maybe let the user do it
if ob.data.users > 1:
print(f'/!!\ {ob.name} data has multiple users ! ({ob.data.users})')
# ob.data = ob.data.copy() # create duplicate (this will also affect the one in original scene !!!)
scene.collection.objects.link(ob)
ob.hide_viewport = ob.hide_render = False