Add PPI layer metadata save automation
This commit is contained in:
@@ -16,6 +16,10 @@ execute_process(
|
||||
--width 96
|
||||
--height 48
|
||||
--layer-name Roundtrip
|
||||
--layer-opacity 0.625
|
||||
--blend-mode 4
|
||||
--alpha-locked
|
||||
--hidden
|
||||
--layers 2
|
||||
--frames 3
|
||||
--frame-duration-ms 321
|
||||
@@ -31,7 +35,18 @@ string(FIND "${save_output}" "\"command\":\"save-project\"" save_command_index)
|
||||
string(FIND "${save_output}" "\"bytes\":65830" save_bytes_index)
|
||||
string(FIND "${save_output}" "\"layers\":2" save_layers_index)
|
||||
string(FIND "${save_output}" "\"frames\":3" save_frames_index)
|
||||
if(save_command_index LESS 0 OR save_bytes_index LESS 0 OR save_layers_index LESS 0 OR save_frames_index LESS 0)
|
||||
string(FIND "${save_output}" "\"layerOpacity\":0.625" save_opacity_index)
|
||||
string(FIND "${save_output}" "\"blendMode\":4" save_blend_index)
|
||||
string(FIND "${save_output}" "\"alphaLocked\":true" save_alpha_index)
|
||||
string(FIND "${save_output}" "\"visible\":false" save_visible_index)
|
||||
if(save_command_index LESS 0
|
||||
OR save_bytes_index LESS 0
|
||||
OR save_layers_index LESS 0
|
||||
OR save_frames_index LESS 0
|
||||
OR save_opacity_index LESS 0
|
||||
OR save_blend_index LESS 0
|
||||
OR save_alpha_index LESS 0
|
||||
OR save_visible_index LESS 0)
|
||||
message(FATAL_ERROR "save-project output did not contain expected summary: ${save_output}")
|
||||
endif()
|
||||
|
||||
@@ -58,6 +73,10 @@ string(FIND "${load_output}" "\"animationDurationMs\":963" load_duration_index)
|
||||
string(FIND "${load_output}" "\"layerNames\":[\"Roundtrip 1\",\"Roundtrip 2\"]" load_layer_index)
|
||||
string(FIND "${load_output}" "\"layerFrameCounts\":[3,3]" load_layer_frames_index)
|
||||
string(FIND "${load_output}" "\"layerDurationsMs\":[963,963]" load_layer_durations_index)
|
||||
string(FIND "${load_output}" "\"layerOpacities\":[0.625,0.625]" load_layer_opacity_index)
|
||||
string(FIND "${load_output}" "\"layerBlendModes\":[\"overlay\",\"overlay\"]" load_layer_blend_index)
|
||||
string(FIND "${load_output}" "\"layerAlphaLocked\":[true,true]" load_layer_alpha_index)
|
||||
string(FIND "${load_output}" "\"layerVisible\":[false,false]" load_layer_visible_index)
|
||||
if(load_command_index LESS 0
|
||||
OR load_width_index LESS 0
|
||||
OR load_height_index LESS 0
|
||||
@@ -66,6 +85,10 @@ if(load_command_index LESS 0
|
||||
OR load_duration_index LESS 0
|
||||
OR load_layer_index LESS 0
|
||||
OR load_layer_frames_index LESS 0
|
||||
OR load_layer_durations_index LESS 0)
|
||||
OR load_layer_durations_index LESS 0
|
||||
OR load_layer_opacity_index LESS 0
|
||||
OR load_layer_blend_index LESS 0
|
||||
OR load_layer_alpha_index LESS 0
|
||||
OR load_layer_visible_index LESS 0)
|
||||
message(FATAL_ERROR "load-project output did not contain expected round-trip summary: ${load_output}")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user