diff --git a/CHANGELOG.md b/CHANGELOG.md index ed562f1..db7bae7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,11 @@ Activate / deactivate layer opaticty according to prefix Activate / deactivate all masks using MA layers --> + +0.6.7 + +- fix: export json crop use scene name instead of first found GP. + 0.6.6 - fix: problem when creating Json diff --git a/__init__.py b/__init__.py index b4d69c0..c0c139b 100644 --- a/__init__.py +++ b/__init__.py @@ -2,7 +2,7 @@ bl_info = { "name": "GP Render", "description": "Organise export of gp layers through compositor output", "author": "Samuel Bernou", - "version": (0, 6, 6), + "version": (0, 6, 7), "blender": (2, 93, 0), "location": "View3D", "warning": "", diff --git a/fn.py b/fn.py index 0550689..f3ad0db 100644 --- a/fn.py +++ b/fn.py @@ -822,12 +822,19 @@ def export_crop_to_json(): for scn in bpy.data.scenes: # if scn.name in {'Scene', 'Render'}: - if scn.name == 'Scene': - continue + # if scn.name == 'Scene': + # continue if scn.render.use_border: scn_border = get_crop_pixel_coord(scn) - for ob in [o for o in scn.objects if o.type == 'GPENCIL']: - coord_dic[ob.name] = scn_border + ## use scn name + coord_dic[scn.name] = scn_border + ## use name of first found GP : + # gps = [o for o in scn.objects if o.type == 'GPENCIL'] + # if gps: + # for ob in gps: + # coord_dic[ob.name] = scn_border + # else: + # coord_dic[scn.name] = scn_border if coord_dic: json_path.parent.mkdir(parents=False, exist_ok=True)