Han-Batch SetParent

From Vectorlab
Jump to: navigation, search


Transfer all objects within a container to another one. By Orso B. Schmid


{ Orso *********************************************** }
{ moves all objects from a source container to a target container }
PROCEDURE H_BatchSetParent(sourceContainer, targetContainer: HANDLE);
	VAR
		temp_h : HANDLE;
		temp_b : BOOLEAN;
	BEGIN
		temp_h := FIn3D(sourceContainer);
		WHILE (temp_h <> NIL) & (temp_h <> targetContainer) DO BEGIN
			temp_b := SetParent(temp_h, targetContainer);
			temp_h := FIn3D(sourceContainer);
		END;
	END;