Skip to content

Commit 44c9e4b

Browse files
authored
RPRBLND-1984: Add New Cryptomatte workflow support. (#443)
PURPOSE In Blender 2.93 was changed Cryptomatte AOV workflow, and need to add support for this in Compositor. EFFECT OF CHANGE Renamed cryptomatte AOVs to the same as in Cycles, which made it work in new Cryptomatte node. Improved UI in AOVs panel related to cryptomatte.
1 parent 9f6ce20 commit 44c9e4b

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/rprblender/engine/render_engine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def set_render_result(render_passes: bpy.types.RenderPasses):
128128

129129
else:
130130
aovs_info = RPR_ViewLayerProperites.cryptomatte_aovs_info \
131-
if "Cryptomatte" in p.name else RPR_ViewLayerProperites.aovs_info
131+
if "Crypto" in p.name else RPR_ViewLayerProperites.aovs_info
132132
aov = next((aov for aov in aovs_info
133133
if aov['name'] == p.name), None)
134134
if aov and self.rpr_context.is_aov_enabled(aov['rpr']):

src/rprblender/properties/view_layer.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -410,32 +410,32 @@ class RPR_ViewLayerProperites(RPR_Properties):
410410
cryptomatte_aovs_info = (
411411
{
412412
'rpr': pyrpr.AOV_CRYPTOMATTE_MAT0,
413-
'name': "Cryptomatte Mat0",
413+
'name': "CryptoMaterial00",
414414
'channel': 'RGBA'
415415
},
416416
{
417417
'rpr': pyrpr.AOV_CRYPTOMATTE_MAT1,
418-
'name': "Cryptomatte Mat1",
418+
'name': "CryptoMaterial01",
419419
'channel': 'RGBA'
420420
},
421421
{
422422
'rpr': pyrpr.AOV_CRYPTOMATTE_MAT2,
423-
'name': "Cryptomatte Mat2",
423+
'name': "CryptoMaterial02",
424424
'channel': 'RGBA'
425425
},
426426
{
427427
'rpr': pyrpr.AOV_CRYPTOMATTE_OBJ0,
428-
'name': "Cryptomatte Obj0",
428+
'name': "CryptoObject00",
429429
'channel': 'RGBA'
430430
},
431431
{
432432
'rpr': pyrpr.AOV_CRYPTOMATTE_OBJ1,
433-
'name': "Cryptomatte Obj1",
433+
'name': "CryptoObject01",
434434
'channel': 'RGBA'
435435
},
436436
{
437437
'rpr': pyrpr.AOV_CRYPTOMATTE_OBJ2,
438-
'name': "Cryptomatte Obj2",
438+
'name': "CryptoObject02",
439439
'channel': 'RGBA'
440440
},
441441
)
@@ -460,14 +460,14 @@ def aov_enabled_changed(self, context):
460460
)
461461

462462
crytomatte_aov_object: BoolProperty(
463-
name="Cryptomatte Object AOVs",
463+
name="Cryptomatte Object",
464464
description="Enable Object Cryptomatte AOVs",
465465
default=False,
466466
update=aov_enabled_changed,
467467
)
468468

469469
crytomatte_aov_material: BoolProperty(
470-
name="Cryptomatte Material AOVs",
470+
name="Cryptomatte Material",
471471
description="Enable Material Cryptomatte AOVs",
472472
default=False,
473473
update=aov_enabled_changed,

src/rprblender/ui/view_layer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ def draw(self, context):
3131
# not displaying "Combined" pass as it is always enabled by Blender
3232
continue
3333

34-
col = col1 if i <= len(view_layer.enable_aovs) // 2 else col2
34+
col = col1 if i <= (len(view_layer.enable_aovs) // 2) + 1 else col2
3535
r = col.row()
3636
r.prop(view_layer, 'enable_aovs', index=i, text=aov['name'])
3737

38-
col1.prop(view_layer, 'crytomatte_aov_object')
38+
col2.prop(view_layer, 'crytomatte_aov_object')
3939
col2.prop(view_layer, 'crytomatte_aov_material')
4040

4141

0 commit comments

Comments
 (0)