fix export json crop
0.6.7 - fix: export json crop use scene name instead of first found GP.main
parent
b587794ac5
commit
4bdd6e9fb9
|
@ -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
|
||||
|
|
|
@ -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": "",
|
||||
|
|
15
fn.py
15
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)
|
||||
|
|
Loading…
Reference in New Issue