1Format_duplicate_item = class 2 Menuaction "_Duplicate" "take a copy of an object" { 3 action x = map_unary copy x; 4} 5 6#separator 7 8Format_list_to_group_item = class 9 Menuaction "_List to Group" "turn a list of objects into a group" { 10 action x = Group x; 11} 12 13Format_group_to_list_item = class 14 Menuaction "_Group to List" "turn a group into a list of objects" { 15 action x = x.value; 16} 17 18#separator 19 20Format_break_item = class 21 Menuaction "_Break Up Object" 22 "break an object into a list of components" { 23 action x 24 = map_unary break x 25 { 26 break x 27 = bandsplit x, is_Image x 28 = map Vector x.value, is_Matrix x 29 = x.value, is_Vector x || is_Real x 30 = error "Breakup: not Image/Matrix/Vector/Real"; 31 } 32} 33 34Format_assemble_item = class 35 Menuaction "_Assemble Objects" 36 "assemble a list (or group) of objects into a single object" { 37 action x 38 = ass x.value, is_Group x 39 = ass x 40 { 41 ass x 42 = Vector x, is_real_list x 43 = Matrix x, is_matrix x 44 = bandjoin x, is_listof is_Image x 45 = Vector (map get_value x), is_listof is_Real x 46 = Matrix (map get_value x), is_listof is_Vector x 47 = map_unary ass x, is_list x 48 = error "Assemble: not list of Image/Vector/Real/image/real"; 49 } 50} 51