Add multi-layer PPI save automation
This commit is contained in:
@@ -16,6 +16,7 @@ execute_process(
|
||||
--width 96
|
||||
--height 48
|
||||
--layer-name Payload
|
||||
--layers 2
|
||||
--frames 2
|
||||
--frame-duration-ms 321
|
||||
--include-test-face-payload
|
||||
@@ -28,8 +29,10 @@ if(NOT save_result EQUAL 0)
|
||||
endif()
|
||||
|
||||
string(FIND "${save_output}" "\"command\":\"save-project\"" save_command_index)
|
||||
string(FIND "${save_output}" "\"layers\":2" save_layers_index)
|
||||
string(FIND "${save_output}" "\"frames\":2" save_frames_index)
|
||||
string(FIND "${save_output}" "\"facePayloads\":1" save_payload_index)
|
||||
if(save_command_index LESS 0 OR save_payload_index LESS 0)
|
||||
if(save_command_index LESS 0 OR save_layers_index LESS 0 OR save_frames_index LESS 0 OR save_payload_index LESS 0)
|
||||
message(FATAL_ERROR "save-project payload output did not contain expected summary: ${save_output}")
|
||||
endif()
|
||||
|
||||
@@ -52,15 +55,17 @@ string(FIND "${load_output}" "\"pixelDataLoaded\":true" load_pixels_index)
|
||||
string(FIND "${load_output}" "\"facePayloads\":1" load_payload_index)
|
||||
string(FIND "${load_output}" "\"width\":96" load_width_index)
|
||||
string(FIND "${load_output}" "\"height\":48" load_height_index)
|
||||
string(FIND "${load_output}" "\"layers\":2" load_layers_index)
|
||||
string(FIND "${load_output}" "\"frames\":2" load_frames_index)
|
||||
string(FIND "${load_output}" "\"animationDurationMs\":642" load_duration_index)
|
||||
string(FIND "${load_output}" "\"layerNames\":[\"Payload\"]" load_layer_index)
|
||||
string(FIND "${load_output}" "\"layerFrameCounts\":[2]" load_layer_frames_index)
|
||||
string(FIND "${load_output}" "\"layerNames\":[\"Payload 1\",\"Payload 2\"]" load_layer_index)
|
||||
string(FIND "${load_output}" "\"layerFrameCounts\":[2,2]" load_layer_frames_index)
|
||||
if(load_command_index LESS 0
|
||||
OR load_pixels_index LESS 0
|
||||
OR load_payload_index LESS 0
|
||||
OR load_width_index LESS 0
|
||||
OR load_height_index LESS 0
|
||||
OR load_layers_index LESS 0
|
||||
OR load_frames_index LESS 0
|
||||
OR load_duration_index LESS 0
|
||||
OR load_layer_index LESS 0
|
||||
|
||||
Reference in New Issue
Block a user