less flashy color on render layer node color - eye care update
1.8.7 - changed: Layer `channel_colors` have _value component_ clamped to 0.65 when transfered to compo node (eye care update)main
parent
e67adcb3f7
commit
d6a102b044
|
@ -14,6 +14,10 @@ Activate / deactivate layer opacity according to prefix
|
||||||
Activate / deactivate all masks using MA layers
|
Activate / deactivate all masks using MA layers
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
1.8.7
|
||||||
|
|
||||||
|
- changed: Layer `channel_colors` have _value component_ clamped to 0.65 when transfered to compo node to limit color flashyness (eye care update)
|
||||||
|
|
||||||
1.8.6
|
1.8.6
|
||||||
|
|
||||||
- changed: removed mask terms from exclude export list `MA, MASK, mask, MSK, msk` (still excluded when opacity is at 0)
|
- changed: removed mask terms from exclude export list `MA, MASK, mask, MSK, msk` (still excluded when opacity is at 0)
|
||||||
|
|
|
@ -2,7 +2,7 @@ bl_info = {
|
||||||
"name": "GP Render",
|
"name": "GP Render",
|
||||||
"description": "Organise export of gp layers through compositor output",
|
"description": "Organise export of gp layers through compositor output",
|
||||||
"author": "Samuel Bernou",
|
"author": "Samuel Bernou",
|
||||||
"version": (1, 8, 6),
|
"version": (1, 8, 7),
|
||||||
"blender": (3, 0, 0),
|
"blender": (3, 0, 0),
|
||||||
"location": "View3D",
|
"location": "View3D",
|
||||||
"warning": "",
|
"warning": "",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import bpy
|
import bpy
|
||||||
from mathutils import Vector
|
from mathutils import Vector, Color
|
||||||
from . import fn
|
from . import fn
|
||||||
|
|
||||||
def add_rlayer(layer_name, scene=None, node_scene=None, location=None, color=None, node_name=None, width=400):
|
def add_rlayer(layer_name, scene=None, node_scene=None, location=None, color=None, node_name=None, width=400):
|
||||||
|
@ -317,6 +317,12 @@ def connect_render_layer(rlayer, ng=None, out=None, frame=None,
|
||||||
return ng, out
|
return ng, out
|
||||||
|
|
||||||
|
|
||||||
|
def clamp_color_value(color, clamp_value=0.65) -> Color:
|
||||||
|
'''Return Color instance with clamped value component'''
|
||||||
|
color = Color(color)
|
||||||
|
color.v = min(color.v, clamp_value)
|
||||||
|
return color
|
||||||
|
|
||||||
def get_set_viewlayer_from_gp(ob, l, scene=None, node_scene=None,
|
def get_set_viewlayer_from_gp(ob, l, scene=None, node_scene=None,
|
||||||
base_path=None, file_slot=None, layer_slot=None):
|
base_path=None, file_slot=None, layer_slot=None):
|
||||||
'''setup ouptut from passed gp obj > layer
|
'''setup ouptut from passed gp obj > layer
|
||||||
|
@ -434,7 +440,7 @@ def get_set_viewlayer_from_gp(ob, l, scene=None, node_scene=None,
|
||||||
# use same color as layer
|
# use same color as layer
|
||||||
if fn.has_channel_color(l):
|
if fn.has_channel_color(l):
|
||||||
cp.use_custom_color = True
|
cp.use_custom_color = True
|
||||||
cp.color = l.channel_color
|
cp.color = clamp_color_value(l.channel_color)
|
||||||
|
|
||||||
connect_render_layer(cp, frame=frame,
|
connect_render_layer(cp, frame=frame,
|
||||||
base_path=base_path, file_slot=file_slot, layer_slot=layer_slot)
|
base_path=base_path, file_slot=file_slot, layer_slot=layer_slot)
|
||||||
|
@ -455,7 +461,7 @@ def get_set_viewlayer_from_gp(ob, l, scene=None, node_scene=None,
|
||||||
|
|
||||||
if fn.has_channel_color(l):
|
if fn.has_channel_color(l):
|
||||||
cp.use_custom_color = True
|
cp.use_custom_color = True
|
||||||
cp.color = l.channel_color
|
cp.color = clamp_color_value(l.channel_color)
|
||||||
|
|
||||||
frame = next((f for f in nodes if f.type == 'FRAME' and f.label == ob.name), None)
|
frame = next((f for f in nodes if f.type == 'FRAME' and f.label == ob.name), None)
|
||||||
rl_nodes = frame_dic[frame.label] # get nodes from
|
rl_nodes = frame_dic[frame.label] # get nodes from
|
||||||
|
|
Loading…
Reference in New Issue