fix node coloring

This commit is contained in:
Pullusb
2021-09-17 18:36:15 +02:00
parent 364b45e473
commit df0231ac28
3 changed files with 20 additions and 7 deletions
+8
View File
@@ -285,6 +285,10 @@ def get_set_viewlayer_from_gp(ob, l, scene=None):
cp = add_rlayer(vl_name, scene=scene, location=loc)
cp.parent = frame
# use same color as layer
if fn.has_channel_color(l):
cp.use_custom_color = True
cp.color = l.channel_color
connect_render_layer(cp, frame=frame)
@@ -301,6 +305,10 @@ def get_set_viewlayer_from_gp(ob, l, scene=None):
if cp.layer != vl_name:
print(f'problem with {cp}: {cp.layer} != {vl_name}')
return
if fn.has_channel_color(l):
cp.use_custom_color = True
cp.color = l.channel_color
frame = [f for f in nodes if f.type == 'FRAME' and f.label == ob.name][0]
rl_nodes = frame_dic[frame.label] # get nodes from