@eebs99 wrote:
I'm trying to make a method in my plugin that can take a List of Surfaces and generate an "animation" from them, like each surface is a different frame. Here's what I have so far:
EscapeKeyEventHandler handler = new EscapeKeyEventHandler("Press to stop visualization.");
bool pressed = false;
List guids = new List();for (int i = 0; i < surfaces.Count; i++) { guids.Add(doc.Objects.AddSurface(surfaces[i])); } for (int i = 0; i < surfaces.Count; i++) { doc.Objects.Hide(doc.Objects.Find(guids[i]), true); } //Here(); for (int i = 0; !pressed; i++) { if (handler.EscapeKeyPressed) { pressed = true; } doc.Objects.Hide(doc.Objects.Find(guids[i]), true); doc.Objects.Show(doc.Objects.Find(guids[i]), true); doc.Views.Redraw(); for(int e = 0; e < 9999999; e++) {} if (i + 1 == surfaces.Count) { i = -1; } }
In Wireframe mode, the visualization is beautiful. But I have two problems: for bigger surfaces, it takes longer to hide and show, which makes the animation a bit choppy, and in Rendered mode you can see each individual hide and show, which almost makes the visualization look transparent and choppy. Are there any ways to improve this method WITHOUT using other plugins, like Bongo?
Posts: 4
Participants: 2