Exemplo n.º 1
0
	public void LoadFumeFrame(MegaFlow flow, string filename)
	{
		if ( flow.frames.Count > 0 )
		{
			if ( !EditorUtility.DisplayDialog("Add to or Replace", "Add new frame to existing frames", "Add", "Replace") )
				flow.DestroyFrames();
		}
		flow.AddFrame(MegaFlowFumeFX.LoadFrame(filename));
	}
Exemplo n.º 2
0
	public void LoadFGASeq(MegaFlow flow, string filename, int first, int last, int step)
	{
		if ( flow.frames.Count > 0 )
		{
			if ( !EditorUtility.DisplayDialog("Add to or Replace", "Add new frames to existing frames, or Replace All", "Add", "Replace") )
				flow.DestroyFrames();
		}

		for ( int i = first; i <= last; i += step )
		{
			float a = (float)(i + 1 - first) / (last - first);
			if ( !EditorUtility.DisplayCancelableProgressBar("Loading Fluid Frames", "Frame " + i, a) )
				flow.AddFrame(MegaFlowFGA.LoadFrame(filename, i, flow.namesplit, flow.decform));
			else
				break;
		}

		EditorUtility.ClearProgressBar();
	}