% OBJS2PIPELINE builds new pipelines in the given workbench from the
% history of the input objects.
%
% CALL: objs2pipeline(wb, objs)
%
% M Hewitson 12-11-10
%
% $Id: objs2pipeline.m,v 1.2 2010/08/06 19:10:49 ingo Exp $
%
function objs2pipeline(wb, objs)
  
  % loop over input objects
  for oo=1:numel(objs)
    % get the history object
    hist = objs(oo).hist;
    % get a list of commands
    cmds = hist2m(hist);
    % and discard the first and reorder
    cmds = cmds(end:-1:2);
    % create new diagram
    wb.cmds2pipeline(objs(oo).name, cmds);
  end % end loop over objects
  
end
